query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
1605e259b09f7b8affcaa68abacaab3c
get user profile reviews
[ { "docid": "d6eec6d53bc9f6cda100b008866da73a", "score": "0.63159645", "text": "public function userProfileReview_get(){\n // Call the verification method and store the return value in the variable\n $request = AUTHORIZATION::verify_request();\n if(empty($this->get()))\n $this->form_validation->set_data(['']);\n else\n $this->form_validation->set_data($this->get());\n //create card using post data\n if($this->form_validation->run('getUserProfileReview') == FALSE){\n $this->response(['error' => $this->form_validation->error_array(),'statusCode' => parent::HTTP_UNPROCESSABLE_ENTITY], parent::HTTP_UNPROCESSABLE_ENTITY); \n }\n else{\n if($response = $this->user_model->getUserProfileReview($this->get())){\n $statusCode = parent::HTTP_OK;\n $status = array('statusCode' => $statusCode,'message'=>'User Rating');\n $response = array('status'=>$status,'data'=>$response);\n $this->response($response, $statusCode); \n } \n else{\n $statusCode = parent::HTTP_OK;\n $status = array('statusCode' => $statusCode,'error'=>'No user found'); \n $this->response(['status' =>$status,], parent::HTTP_OK); \n }\n }\n }", "title": "" } ]
[ { "docid": "51745c65a24b38b2089485d9b19e556d", "score": "0.72326887", "text": "public function showUserReviews()\n {\n\n $data = Review::where('user_id', '=', auth()->user()->id)->with('reviewer')->paginate(8);\n return response()->json($data);\n }", "title": "" }, { "docid": "05289ce05d59d3f2ffe024cb2c6a2609", "score": "0.70973366", "text": "public function showProfileReviews($id)\n {\n\n $data = Review::where('user_id', '=', $id)->with('reviewer')->paginate(5);\n return response()->json($data);\n }", "title": "" }, { "docid": "3cf68cd5996377b0770f18fbf251d4c6", "score": "0.68977994", "text": "public function actionUserReviews() {\r\n $product_id = $this->_input->filterSingle(\"product_id\", XenForo_Input::INT);\r\n $product = $this->getModelFromCache('ProdsTool_Model_PTUtils')->getProductDetails($product_id);\r\n\t\t$page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));\r\n\t\t$count = 25;\r\n $reviews = $this->getModelFromCache('ProdsTool_Model_PTUtils')->getProductUserReviews($product_id, $page, $count);\r\n $categories = $this->getModelFromCache('ProdsTool_Model_PTUtils')->getAllCategories();\r\n array_pop($reviews); // Removing the editor review\r\n $viewParams = array(\"product\" => $product,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"page\" => $page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"count\" => $count,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"total\" => $this->getModelFromCache('ProdsTool_Model_PTUtils')->getUserReviewsCount($product_id),\r\n \"reviews\" => $reviews,\r\n \"tabClass\" => \"user_reviews\",\r\n \"categories\" => $categories,\r\n 'latest_prods' => $this->getModelFromCache('ProdsTool_Model_PTUtils')->getLatestProducts(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'latest_prods2' => $this->getModelFromCache('ProdsTool_Model_PTUtils')->getLatestProducts(5, 2),\r\n\t\t\t \"breadCrumbs\" => $this->getProductBreadcrumbs($product, $categories),\r\n \t\t\t\t\t\t\t\t\t\t'perms' => $this->perms);\r\n return $this->responseView('ProdsTool_ViewPublic_ProductUserReviews', 'ProdsTool_ProductUserReviews', $viewParams);\r\n }", "title": "" }, { "docid": "55ed306f22414d16d45a104bee3b2f1a", "score": "0.68790376", "text": "public function getReviews();", "title": "" }, { "docid": "55ed306f22414d16d45a104bee3b2f1a", "score": "0.68790376", "text": "public function getReviews();", "title": "" }, { "docid": "8ec2ef7a86ef17c6c407c15a041f7cbf", "score": "0.68019557", "text": "public function getReview();", "title": "" }, { "docid": "8ec2ef7a86ef17c6c407c15a041f7cbf", "score": "0.68019557", "text": "public function getReview();", "title": "" }, { "docid": "f82c0ab875f786eeedc75d3849b62286", "score": "0.662659", "text": "public function getUsersReviews()\n {\n return $this->hasMany(UserReview::className(), ['user_employee_id' => 'id']);\n }", "title": "" }, { "docid": "7d61249a16facbcfbf9e5844e60fcc06", "score": "0.66229135", "text": "static function getUserReviews($user_id, $limit = 10)\n {\n $userReviews = DB::table('reviews')\n ->join('users', 'users.user_id', '=', 'reviews.user_id')\n ->select('review_text', 'name')\n ->where('reviews.user_id', $user_id)\n ->take($limit)\n ->get();\n return $userReviews;\n }", "title": "" }, { "docid": "7ae9e6641b545d3ff8f4c12d88862629", "score": "0.66052014", "text": "function getReviews($userId)\n {\n $this->db->select('bookingId');\n $this->db->from('tbl_review');\n $this->db->where('userID', $userId);\n $query = $this->db->get();\n $result = $query->result();\n return $result;\n }", "title": "" }, { "docid": "a35419dedec340d30d92c08ed706c825", "score": "0.65254515", "text": "public function getReviews()\n {\n return $this->hasMany(Reviews::className(), ['userId' => 'id']);\n }", "title": "" }, { "docid": "a8af797ca5b1d69180274b89f9cf4eb6", "score": "0.6498325", "text": "public function getReviews()\n {\n return $this->hasMany(Reviews::class, ['user_id' => 'id'])->inverseOf('user');\n }", "title": "" }, { "docid": "7daf22c76878f4de2a40b46dae75a2ac", "score": "0.64821315", "text": "function get_reviews_by_post( $post_id ) {\n\t$post_id = absint( $post_id );\n\n\t$reviews = [];\n\tif ( empty( $post_id ) ) {\n\t\treturn $reviews;\n\t}\n\n\t$meta_key = 'review_of_post_' . $post_id;\n\n\t$users = get_users( [\n\t\t'meta_key' => $meta_key,\n\t\t'fields' => [ 'ID', 'user_nicename' ],\n\t] );\n\n\t// I know this isn't efficient, but for our demo it will suffice. In production, you'd want to write a join to get all the data at once.\n\tforeach ( $users as $user ) {\n\t\t$reviews[ $user->ID ] = [\n\t\t\t'review' => get_user_meta( $user->ID, $meta_key, true ),\n\t\t\t'image' => get_avatar_url( $user->ID, [ 'size' => 36 ] ),\n\t\t\t'name' => $user->user_nicename,\n\t\t\t'id' => $user->ID,\n\t\t];\n\t}\n\n\treturn $reviews;\n}", "title": "" }, { "docid": "511816e7c56b69692a54e5b1b80f35ca", "score": "0.6407814", "text": "public function reviews()\n {\n return $this->hasManyThrough('App\\User', App\\Review);\n }", "title": "" }, { "docid": "a7ff84361cf45ad5b931cb456dc1c6b6", "score": "0.63971776", "text": "public function getReviewRatingStatistics();", "title": "" }, { "docid": "7b15c9f74bff514b503f689d91995a17", "score": "0.6390131", "text": "public function showPostedReviews()\n {\n\n $data = Review::where('reviewer_id', '=', auth()->user()->id)->with('user')->paginate(8);\n return response()->json($data);\n }", "title": "" }, { "docid": "92b563211a606701f21b3a95f7f111ec", "score": "0.63253474", "text": "public function grabReviews() {\n\n return $this->db->select( '*', 'films');\n\n }", "title": "" }, { "docid": "e894940d7842f35ac35228996ae8b8d7", "score": "0.63019806", "text": "private function get_reviews()\n {\n if( isset( $this->item['CustomerReviews']['IFrameURL'] ) )\n {\n // Load the iFrame HTML from the URL returned by the API\n $text = file_get_contents( $this->item['CustomerReviews']['IFrameURL'] );\n\n // Clean up the HTML removing scripts and other unneeded data\n $text = preg_replace( '/(<style>.+?)+(<\\/style>)/i', '', $text );\n $search = array('@<script[^>]*?>.*?</script>@si', // javascript\n '@<style[^>]*?>.*?</style>@siU', // style tags properly\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@', // multi-line comments including CDATA\n '/^\\n+|^[\\t\\s]*\\n+/m', // empty lines\n );\n $text = trim( preg_replace( $search, '', $text ) );\n\n // Load HTML into SimpleXML for parsing\n libxml_use_internal_errors( TRUE );\n $dom = new \\DOMDocument();\n $dom->strictErrorChecking = FALSE;\n $dom->recover = TRUE;\n $dom->loadHTML( $text );\n $xml = simplexml_import_dom( $dom );\n\n // Get the total amount of reviews\n $stars = $xml->xpath( \"//span[@class='crAvgStars']\" );\n $total_reviews = isset( $stars[0] ) ? (int)preg_replace( '/[^\\d]/', '', $stars[0]->a ) : 0;\n\n // Get the average rating\n $summary = $xml->xpath( \"//span[@class='asinReviewsSummary']\" );\n if( isset($summary[0]) )\n {\n $img = $summary[0]->xpath('a/img');\n $summary = preg_replace( '/[^\\d]/', '', (string)$img[0]->attributes()->alt );\n $summary = (float)((int)substr( $summary, 0, strlen($summary)-1 ))/10;\n }\n else\n {\n $summary = 0;\n }\n\n // Set data in response\n $this->data['reviews'] = array(\n 'total' => $total_reviews,\n 'average' => $summary,\n );\n }\n }", "title": "" }, { "docid": "ffcac2840a691117d16eecc05eca6101", "score": "0.62885463", "text": "public function index()\n {\n //\n return Review::all()->where(\"user_id\", Auth::user()->id);\n }", "title": "" }, { "docid": "10dbe318d7966dc6e6d44b6e13e2c60a", "score": "0.6268772", "text": "public function reviews($id)\n {\n $user = User::find($id);\n\n $reviews = $user->reviews()->simplePaginate(5);\n\n if (\\request()->ajax()) {\n return view('front.user.loads.reviews', compact('user', 'reviews'))->render();\n }\n return view('front.user.reviews', compact('user', 'reviews'));\n }", "title": "" }, { "docid": "104ac6508ba40a518ddda633d2669f59", "score": "0.6234827", "text": "public function show(Request $request)\n {\n $data = [];\n if ($request->input('userId') === 'useAuthId') {\n $ratableId = Ratable::where('name', $request->input('ratable'))->value('id');\n $review = Review::where([\n ['user_id', '=', Auth::id()],\n ['ratable_id', '=', $ratableId]\n ])->first();\n if ($review) {\n if ($review->anonymous) {\n $anonymous = true;\n }\n else {\n $anonymous = false;\n }\n $rating = Rating::where([\n ['user_id', '=', Auth::id()],\n ['ratable_id', '=', $ratableId]\n ])->first();\n if ($rating) {\n if (!$rating->anonymous) {\n $rating = $rating->rating;\n }\n else {\n $rating = 0;\n }\n }\n else {\n $rating = 0;\n }\n $data = ['review' => htmlspecialchars($review->review), 'anonymous' => $anonymous, 'headline' => htmlspecialchars($review->headline), 'userId' => Auth::id(), 'user' => htmlspecialchars(Auth::user()->name), 'date' => date('F j, Y', strtotime((string)$review->updated_at)), 'rating' => $rating];\n }\n }\n else if ($request->input('userId') === 'all') {\n $ratableId = Ratable::where('name', $request->input('ratable'))->value('id');\n $reviews = Review::where('ratable_id', $ratableId)->get();\n $reviewsArr = [];\n if ($reviews) {\n foreach($reviews as $review) {\n if ($review->anonymous) {\n $user = \"\";\n $userId = '';\n }\n else {\n $user = User::where('id', $review->user_id)->value('name');\n $userId = $review->user_id;\n }\n $rating = Rating::where([\n ['user_id', '=', $review->user_id],\n ['ratable_id', '=', $ratableId],\n ['anonymous', '=', false]\n ])->first();\n if ($rating) {\n $rating = $rating->rating;\n }\n else {\n $rating = 0;\n }\n $reviewsArr[] = ['review' => htmlspecialchars($review->review), 'headline' => htmlspecialchars($review->headline), 'userId' => $userId, 'user' => htmlspecialchars($user), 'date' => date('F j, Y', strtotime((string)$review->updated_at)), 'rating' => $rating]; \n }\n $data = ['reviews' => $reviewsArr];\n }\n }\n else {\n $review = Review::where([\n ['user_id', '=', (int)$request->input('userId')],\n ['anonymous', '=', false]\n ])->skip($request->input('skip'))->first();\n if ($review) {\n $rating = Rating::where([\n ['user_id', '=', $review->user_id],\n ['ratable_id', '=', $review->ratable_id],\n ['anonymous', '=', false]\n ])->first();\n if ($rating) {\n $rating = $rating->rating;\n }\n else {\n $rating = 0;\n }\n $data = ['review' => htmlspecialchars($review->review), 'headline' => htmlspecialchars($review->headline), 'date' => date('F j, Y', strtotime((string)$review->updated_at)), 'rating' => $rating];\n }\n }\n return response()->json($data);\n }", "title": "" }, { "docid": "8f8ed82c92cd2542392acb9871f49b15", "score": "0.6153743", "text": "public function index()\n {\n $user=Auth::user();\n $user=VendorUser::where('user_id',$user->id)->firstOrFail(); \n $reviews=$user->reviews()->paginate(2);\n $to_reviewed=$user->bookings()->where('bookings.booking_status','completed')->whereDoesntHave('review')->get();\n\n\n \n \n\n \n\n\n return view('user.review.index',compact('reviews','user','to_reviewed'));\n }", "title": "" }, { "docid": "1b661bb5a6a17353046a1cb9056b3a51", "score": "0.6143714", "text": "public function reviews_get()\n\t{\n\t\t// Get reviewid parameter from the query.\n\t\t// CodeIgniter routing rules read anything less than 0 or non-numbers as NULL.\n\t\t$id = $this->get('reviewid');\n\n\t\t$check = $this->check_for_valid_id(\"Review\", $id);\n\t\t// If the review is NULL, return all reviews.\n\t\tif ($check === NULL)\n\t\t{\n\t\t\t$this->respond_with_all(\"reviews\");\n\t\t}\n\t\telse if ($check === TRUE)\n\t\t{\n\t\t\t// Get specific review from database.\n\t\t\t$data = $this->r2pdb_model->get_review_by_id_display($id);\n\n\t\t\t// Because of the validity check above it is certain that the product id is present in the table.\n\t\t\t$this->set_response($data, REST_Controller::HTTP_OK);\n\t\t}\n\t\t// If false, check_for_valid_id already set a response.\n\t}", "title": "" }, { "docid": "9e7b9683bb8f69ac28d268ba7566275f", "score": "0.6130403", "text": "public function show_review()\n {\n $data = Review::all();\n return $data;\n }", "title": "" }, { "docid": "76ae13f0b72783c4574a29a6491f71ec", "score": "0.6116863", "text": "public function facebookreview($id)\n {\n $client = new Client;\n $facebook=Socialmedia::where('name','facebook',true)->value('id');\n $placeid = Social::where('social_id', $facebook, true)->where('user_id', $id, true)->first();\n \n $place_id = $placeid->url; \n $access_token = $placeid->api; \n \n $response = $client->get('https://graph.facebook.com/v2.11/' .$place_id. '?access_token=' . $access_token . '&&fields=access_token,ratings{reviewer,rating,review_text,email,created_time,id}');\n\n $response = json_decode($response->getBody(), true);\n $ratings=$response['ratings']['data'];\n foreach ($ratings as $rating) \n {\n echo \"name: \".$rating['reviewer']['name'].'<br>';\n echo \"rating: \".$rating['rating'].'<br>';\n echo \"Commments: \".$rating['review_text'].'<br>';\n echo \"date: \".$rating['created_time'].'<br>';\n $date= substr($rating['created_time'], 0,-14);\n //echo $date=implode(\"T\",$rating['created_time']);\n //echo $date[0];\n // echo $date[1];\n $check=Rating::where('user_type',$rating['reviewer']['id'])->where('customer_id', $id)->get();\n if($check->count()=='0')\n {\n $rating= Rating::create([\n 'customer_id' =>$id,\n 'comment' => $rating['review_text'],\n 'rating' => $rating['rating'],\n 'name' => $rating['reviewer']['name'],\n 'email' => '',\n 'contact' => '',\n 'created'=>$date,\n 'user_type'=>$rating['reviewer']['id'],\n 'review_type'=>$facebook\n ]);\n }\n }\n }", "title": "" }, { "docid": "05e306004f6b0a395e523a2f3e3d3ece", "score": "0.6109588", "text": "public function actionReviews()\n\t{\n\t\n\t if(helpers::isiyer() || helpers::isguide()){\n\t $id =Yii::app()->user->id;\n\t\t\t$model = $this->loadModel($id);\n\t\t\t$reviews = Reviews::model()->get_review_all(Yii::app()->params['usertype'][$model->role],$id);\n\t\t\t\n\t\t\tif($reviews)\n\t\t\t$dataProvider = new CArrayDataProvider($reviews);\n\t\t\telse\n\t\t\t$dataProvider = array();\n\t\t\t$this->render('reviews',array(\n\t\t\t 'model'=> $model,\n\t\t\t 'reviews'=>$reviews,\n\t\t\t 'dataProvider'=>$dataProvider,\n\t\t\t));\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$id =Yii::app()->user->id;\n\t\t\t$model = $this->loadModel($id);\n\t\t\t$reviews = Reviews::model()->get_review_all_user($id);\n\t\t\t\n\t\t\tif($reviews)\n\t\t\t$dataProvider = new CArrayDataProvider($reviews);\n\t\t\telse\n\t\t\t$dataProvider = array();\n\t\t\t$this->render('reviews',array(\n\t\t\t'model'=> $model,\n\t\t\t'reviews'=>$reviews,\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t));\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "00ab63b9a370cb0a10c1b47615debf05", "score": "0.6108406", "text": "public function show(UserReview $userReview)\n {\n //\n }", "title": "" }, { "docid": "bee71a87bda9ed930ff630f1a00ec700", "score": "0.6095561", "text": "public function profile($id)\n {\n // Validate the value...\n $user = User::find($id);\n if ($user) {\n $posts = $user->posts()->orderBy('created_at', 'desc')->limit(2)->get();\n $reviews = $user->reviews()->limit(3)->get();\n $review = $user->review;\n return view('front.user.profile', compact('user', 'reviews', 'posts', 'review'));\n } else {\n abort(404, 'not found');\n\n }\n }", "title": "" }, { "docid": "0eb17e0bfc4f241c2028f00a2c324eea", "score": "0.6089438", "text": "static public function helpfulReviews($user_id)\n {\n return DB::select('SELECT SUM(vote) as total FROM review_votes where other_uid = ?', [$user_id])[0]->total;\n }", "title": "" }, { "docid": "5cc760cf461cf58193d4d575bfb9e48a", "score": "0.60733277", "text": "public function getUsersReviews0()\n {\n return $this->hasMany(UsersReview::className(), ['user_customer_id' => 'id']);\n }", "title": "" }, { "docid": "29c7756c959b16eaaec3731f10ac98d5", "score": "0.6059592", "text": "public function show(Reviews $reviews) {\n //\n }", "title": "" }, { "docid": "5605d648e5d492c523dbe391c8cf8874", "score": "0.6051748", "text": "function wp_review_user_review( $post_id, $votable = true, $force_display = false ) {\n\t$review = '';\n\n\tif ( $force_display || in_array( wp_review_get_user_rating_setup( $post_id ), array( WP_REVIEW_REVIEW_VISITOR_ONLY, WP_REVIEW_REVIEW_ALLOW_BOTH ) ) ) {\n\t\t$allowedClass = 'allowed-to-rate';\n\t\t$hasNotRatedClass = ' has-not-rated-yet';\n\t\t$postReviews = mts_get_post_reviews( $post_id );\n\t\t$userTotal = $postReviews['rating'];\n\t\t$usersReviewsCount = $postReviews['count'];\n\t\t$total = get_post_meta( $post_id, 'wp_review_total', true );\n\t\t$type = get_post_meta( $post_id, 'wp_review_user_review_type', true );\n\n\t\t$options = get_option('wp_review_options');\n\t\t$custom_colors = get_post_meta( $post_id, 'wp_review_custom_colors', true );\n\t\t\n\t\t$colors['color'] = get_post_meta( $post_id, 'wp_review_color', true );\n\t\tif( empty($colors['color']) ) $colors['color'] = '#333333';\n\t\t$colors['type'] = get_post_meta( $post_id, 'wp_review_type', true );\n\t\t$colors['fontcolor'] = get_post_meta( $post_id, 'wp_review_fontcolor', true );\n\t\t$colors['bgcolor1'] = get_post_meta( $post_id, 'wp_review_bgcolor1', true );\n\t\t$colors['bgcolor2'] = get_post_meta( $post_id, 'wp_review_bgcolor2', true );\n\t\t$colors['bordercolor'] = get_post_meta( $post_id, 'wp_review_bordercolor', true );\n\t\tif ( ! $custom_colors && ! empty($options['colors'] ) && is_array($options['colors'] ) ) {\n\t\t\t$colors = array_merge($colors, $options['colors']);\n\t\t}\n\t $colors = apply_filters('wp_review_colors', $colors, $post_id);\n\t $color = $colors['color'];\n\n\t\t$user_id = '';\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$user_id = get_current_user_id();\n\t\t}\n\n\n\t\tif ( $userTotal == '' ) {\n\t\t\t$userTotal = '0.0';\n\t\t}\n\t\t$value = $userTotal;\n\n\t\tif ( ! $votable || hasPreviousReview( $post_id, $user_id, wp_review_get_user_ip(), WP_REVIEW_COMMENT_TYPE_VISITOR ) || ( ! is_user_logged_in() && ! empty( $options['registered_only'] ) ) ) {\n\t\t\t$hasNotRatedClass = '';\n\t\t}\n\n\t\t$class = $allowedClass . $hasNotRatedClass;\n\n\t\t$template = mts_get_template_path( $type, 'star-output' );\n\t\tset_query_var( 'rating', compact( 'value', 'usersReviewsCount', 'user_id', 'class', 'post_id', 'color', 'colors' ) );\n\t\tob_start();\n\t\tload_template( $template, false );\n\t\t$review = ob_get_contents();\n\t\tob_end_clean();\n\n\n\n\t\tif ( $userTotal !== '0.0' && $total === '' ) {// dont'show if no user ratings and there is review\n\t\t\t$review .= '<div itemprop=\"aggregateRating\" itemscope itemtype=\"http://schema.org/AggregateRating\">\n <meta itemprop=\"ratingValue\" content=\"' . $userTotal . '\" />\n <meta itemprop=\"reviewCount\" content=\"' . $usersReviewsCount . '\" />\n </div>';\n\t\t}\n\t}\n\n\treturn $review;\n}", "title": "" }, { "docid": "1d921456a0c94d0c455ab792fcb6af63", "score": "0.60477805", "text": "function get_the_hrb_user_total_authored_reviews( $user = '' ) {\n\t$user = get_the_hrb_userdata( $user );\n\n\treturn (int) appthemes_get_user_authored_total_reviews( $user->ID );\n}", "title": "" }, { "docid": "f608fd13755d6b7df52795e6e77c2253", "score": "0.60132366", "text": "public function index()\n {\n\n\n $feed = \\Auth::user()\n ->feed()\n ->with('reviewer', 'book')\n ->paginate(20);\n\n $recommendation = [];\n $recommendation['users']=User::inRandomOrder()->take(3)->get();\n $recommendation['reviews']= Review::inRandomOrder()->take(3)->get();\n// dump($recommended_users);\n// dd($recommended_reviews);\n return view('home', compact('feed','recommendation'));\n }", "title": "" }, { "docid": "c2fa1f06153129995c5d607db7fcff49", "score": "0.600896", "text": "public function getReviews() {\n\t\t$reviews = array();\n\n\t\tforeach ($this->_data['review']['result'] as $data) {\n\t\t\t$reviews[] = new Review($data);\n\t\t}\n\n\t\treturn $reviews;\n\t}", "title": "" }, { "docid": "9050453a7ba8be9365433264aad7dd4d", "score": "0.60048", "text": "function bp_course_get_course_reviews($args=NULL){\n\n\t$defaults=array(\n\t\t'id' =>get_the_ID(),\n\t\t);\n\t$r = wp_parse_args( $args, $defaults );\n\t\textract( $r, EXTR_SKIP );\n\n\t$args = array(\n\t\t'status' => 'approve',\n\t\t'post_id' => $id\n\t\t);\n\t$comments_query = new WP_Comment_Query;\n\t$comments = $comments_query->query( $args );\n\n\t// Comment Loop\n\tif ( $comments ) {\n\t\t$ratings =0;\n\t\t$count=0;\n\t\t$rating = array();\n\t\tforeach ( $comments as $comment ) {\n\t\t\t$rate = get_comment_meta( $comment->comment_ID, 'review_rating', true );\n\t\t\tif(isset($rate) && $rate !='')\n\t\t\t\t$rating[] = $rate;\n\t\t}\n\n\t\t\n\n\t\t$count = count($rating);\n\n\t\tif(!$count) $count=1;\n\n\t\t$ratings = round((array_sum($rating)/$count),1);\n\t\t\n\t\tupdate_post_meta($id,'average_rating',$ratings);\n\t\tupdate_post_meta($id,'rating_count',$count);\n\n\t\t$reviews = array('rating' => $rating,'count'=>$count);\n\t\treturn $reviews;\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "f40d5d0e12e276a5be0faad02946fc15", "score": "0.5979249", "text": "public function get_loyalty_products_reviews_post() { \n # get post values \n $userId = $this -> post('user_id');\n $productId = $this -> post('product_id');\n \n # Get loyalty products\n $reviews = $this -> loyaltymodel -> get_loyalty_products_reviews_listing($productId);\n \n //Convert the time to time ago for reviews\n $i = 0;\n $is_review_added = 0;\n foreach ($reviews as $review) {\n\n if ($review['CreatedOn'])\n $reviews[$i]['CreatedOn'] = humanTiming(strtotime($review['CreatedOn'])) . \" ago\";\n\n if ($review['ProfileImage'])\n $reviews[$i]['ProfileImage'] = (front_url() . USER_IMAGE_PATH . 'medium/' . $review['ProfileImage']);\n else\n $reviews[$i]['ProfileImage'] = (front_url() . DEFAULT_USER_IMAGE_PATH);\n\n //To check if review added by user.\n\n if ($review['UserId'] == $user_id)\n $is_review_added = 1;\n\n $i++;\n }\n \n if($reviews)\n {\n $retArr['status'] = SUCCESS; \n $retArr['reviews'] = $reviews; \n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }else {\n $retArr['status'] = FAIL;\n $retArr['message'] = \"No reviews found\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n }", "title": "" }, { "docid": "b2191fa2d0911ea9ca6d169ac83fb300", "score": "0.59740263", "text": "private function reviews()\n {\n return Serie::withCount('comments')\n ->orderBy('comments_count', 'desc')\n ->limit(4)\n ->get();\n }", "title": "" }, { "docid": "bc068868d3b457257a712af1d3583d80", "score": "0.5964842", "text": "public function index()\n {\n return view('review.index')->with('reviews', Auth::user()->reviews);\n }", "title": "" }, { "docid": "b68382789c3140767ce058186a3470e5", "score": "0.5955581", "text": "function profile()\n {\n $id_user = $this->request->getParameter(\"id\");\n $user = $this->user->getUser($id_user);\n $items_from_user = $this->user->getUserExtendedCards($id_user);\n $number_of_items = $this->calculate->getTotalOfItemsFront();\n $number_of_cards = $this->calculate->getTotalOfCards();\n $number_of_links = $this->calculate->getTotalOfLinks();\n $total_comments_count = $this->calculate->getTotalOfComments();\n $total_users_count = $this->calculate->getTotalOfUsers();\n $this->generateView(array(\n 'user' => $user,\n 'items_from_user' => $items_from_user,\n 'number_of_items' => $number_of_items,\n 'number_of_cards' => $number_of_cards,\n 'number_of_links' => $number_of_links,\n 'total_comments_count' => $total_comments_count,\n 'total_users_count' => $total_users_count\n ));\n }", "title": "" }, { "docid": "aefc2f911ac5486843b2f14d4cc10b58", "score": "0.59396297", "text": "public function index()\n {\n // reviews\n $user = Auth::user();\n $result = DB::table('reviews as r')\n ->select('u.name as writer_name', 'r.star', 'r.comment', 'r.created_at')\n ->where('r.deal_user_id', $user->id)\n ->join('users as u', 'u.id', '=', 'r.write_user_id')\n ->get();\n\n // evaluate\n $reviews = Review::where('deal_user_id', $user->id);\n $evaluate['average'] = $reviews->avg('star');\n for ($i=1; $i <= 5 ; $i++) { $evaluate[$i] = clone $reviews; }\n for ($i=1; $i <= 5 ; $i++) { $evaluate[$i] = $evaluate[$i]->where('star', $i)->count(); }\n\n // user\n $_user['image_url'] = $user->image_url;\n $_user['star'] = floor($evaluate['average']);\n $_user['status_comment'] = $user->status_comment;\n\n return response()->json(['success' => $result, 'evaluate' => $evaluate, 'user' => $_user], $this->successStatus);\n }", "title": "" }, { "docid": "a627e31d909089c49930df2b173b7837", "score": "0.5939398", "text": "function get_the_hrb_user_total_reviews( $user = '', $args = array() ) {\n\t$user = get_the_hrb_userdata( $user );\n\n\treturn (int) appthemes_get_user_total_reviews( $user->ID, $args );\n}", "title": "" }, { "docid": "579d6165787cb4f0b27fbac6a77e14ab", "score": "0.59347636", "text": "public function getProfileDetail()\n\t{\n\t\t$userId \t= Auth::user()->id;\n\t\t\n\t\tif(Auth::user()->user_type==2)\n\t\t{\n\t\t\t$fields\t\t= ['id', 'name', 'email', 'allowed_review_rating', 'yelp_short_url', 'google_short_url', 'sms_request_for_rating', 'sms_below_threshold_rating', 'yelp_api_key','google_api_key'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields\t\t= ['id', 'name', 'email'];\n\t\t}\n\t\t\t\n\t\t$userDetail = User::select($fields)->where('id', $userId)->first();\n\t\t$userDetail['yelp_api_key'] = $userDetail->yelp_api_key!=null ? Crypt::decryptString($userDetail->yelp_api_key) : null;\n\t\t$userDetail['google_api_key'] = $userDetail->google_api_key!=null ? Crypt::decryptString($userDetail->google_api_key) : null;\n\t\treturn response()->json(['success' => true, 'user' => $userDetail], 200);\n\t}", "title": "" }, { "docid": "026f91b47ac49940ea82cf90c71315b0", "score": "0.5934136", "text": "public function getDoctorReviews($id){\n\n \t$doctor = Doctor::find($id); \n \tif(!$doctor)\n \t\treturn new Response(['message' => 'doctor id does not exist'],404);\n \t$reviews = $doctor->reviews()->paginate(10);\n\n \tforeach ($reviews as $review) {\n \t\t$review['user'] = $review->user()->get(['user_name']);\n \t}\n \t\n\n \treturn $reviews;\n }", "title": "" }, { "docid": "84bff279cb6eaa9233223da9d01f8e53", "score": "0.59250754", "text": "public function getReviews(): Collection\n {\n return $this->reviews;\n }", "title": "" }, { "docid": "b05597cb413d28cdaaed50b22e52c0bc", "score": "0.5880779", "text": "public function getReview()\n {\n return $this->review;\n }", "title": "" }, { "docid": "3090f788cc1fd2614234ed562e63b002", "score": "0.587459", "text": "public function showMe()\n {\n\n $user = User::where('id', '=', auth()->id())->with('status')->get();\n $reviews = Review::where('user_id', '=', auth()->id())->with('reviewer')->get();\n return response()->json(['user' => $user, 'reviews' => $reviews]);\n }", "title": "" }, { "docid": "1af7505600786944a5967263742eea9d", "score": "0.58709073", "text": "public function reviews()\n {\n \treturn $this->hasMany('\\App\\Models\\Professor\\ProfessorReview');\n }", "title": "" }, { "docid": "48564b7036119add32928922ee6912e4", "score": "0.5855423", "text": "static function getProductReviews($product_id, $skipTo)\n {\n $productReviews = DB::table('reviews')\n ->join('users', 'users.user_id', '=', 'reviews.user_id')\n ->select('review_text', 'name', 'users.user_id', 'users.avatar')\n ->where('prod_id', $product_id)\n ->skip($skipTo)\n ->take()\n ->get();\n return $productReviews;\n }", "title": "" }, { "docid": "3d6969deed408d2e6a10338137328b40", "score": "0.5844165", "text": "public function reviewers(): array {\n $storage = \\Drupal::entityTypeManager()->getStorage('user');\n $query = $storage->getQuery()->accessCheck(FALSE);\n $query->condition('topics', $this->id());\n $query->sort('name');\n $reviewers = [];\n foreach ($storage->loadMultiple($query->execute()) as $user) {\n $reviewers[$user->id()] = $user->name->value;\n }\n return $reviewers;\n }", "title": "" }, { "docid": "841da2c690ee4b8947ac0476048b330d", "score": "0.58348715", "text": "function getReviewById($id)\n {\n $statement = self::$db->prepare(\"SELECT \nreviews.id, reviews.category, reviews.content, reviews.date, reviews.picture, reviews.video, reviews.title, reviews.gameplay, users.username\nFROM reviews\nINNER JOIN users\nON reviews.user_id=users.id WHERE reviews.id = ? LIMIT 1\");\n $statement->execute(\n [\n $id\n ]\n );\n return $statement->fetch();\n }", "title": "" }, { "docid": "43656bdc0c073afdbc4b3754607672ef", "score": "0.5831299", "text": "function SRP_SelectUsersWithReviews($pivot)\r\n{\r\n global $wpdb;\r\n \r\n $select = \"SELECT DISTINCT u.id as ID, \";\r\n $select .= \" um_fname.meta_value AS fname_value, \";\r\n $select .= \" um_lname.meta_value AS lname_value, \";\r\n $select .= \" um_grade.meta_value AS grade_value \";\r\n $select .= \"FROM $wpdb->users u \";\r\n $select .= \"INNER JOIN $wpdb->posts p ON u.id = p.post_author \";\r\n $select .= SRP_CreatePivotJoin($wpdb->usermeta, 'u.id', $pivot);\r\n $select .= \"LEFT OUTER JOIN $wpdb->usermeta um_fname ON (um_fname.user_id = u.id AND um_fname.meta_key = %s) \";\r\n $select .= \"LEFT OUTER JOIN $wpdb->usermeta um_lname ON (um_lname.user_id = u.id AND um_lname.meta_key = %s) \";\r\n $select .= \"LEFT OUTER JOIN $wpdb->usermeta um_grade ON (um_grade.user_id = u.id AND um_grade.meta_key = %s) \";\r\n $select .= \"WHERE (p.post_type = %s AND p.post_status = %s) AND u.id NOT IN \";\r\n $select .= \"(SELECT user_id FROM $wpdb->usermeta WHERE meta_key LIKE %s AND meta_value LIKE %s) \";\r\n $select .= \"ORDER BY u.id \";\r\n\r\n $query = $wpdb->prepare($select, 'first_name', 'last_name', 'school_grade',\r\n 'post', 'publish', '%_capabilities', '%administrator%');\r\n $id_col = $wpdb->get_col($query, 0);\r\n $fname_col = $wpdb->get_col($query, 1);\r\n $lname_col = $wpdb->get_col($query, 2);\r\n $grade_col = $wpdb->get_col($query, 3);\r\n \r\n // $names becomes a list-of-lists indexed by post counts\r\n $names = array();\r\n for ($i = 0; $i < count($id_col); $i++)\r\n {\r\n $firstname = $fname_col[$i];\r\n $lastname = $lname_col[$i];\r\n $grade = $grade_col[$i];\r\n if (!isset($grade))\r\n $grade = '&lt;not set&gt;';\r\n $post_count = SRP_GetReviewCountByUser($id_col[$i]);\r\n $names[$post_count][] = $firstname . ' ' . $lastname . \", grade $grade [$post_count reviews]\";\r\n }\r\n\r\n krsort($names);\r\n \r\n $retval = array();\r\n // For each distinct post count...\r\n foreach ($names as $name)\r\n {\r\n // For each user that has that post count...\r\n foreach ($name as $n)\r\n {\r\n // Add that user to the return list\r\n $retval[] = $n;\r\n }\r\n }\r\n \r\n return $retval;\r\n}", "title": "" }, { "docid": "f6da3b5e866e1deb9f5c4ce026848ec9", "score": "0.5827093", "text": "public static function user_rating_score($user_id) {\n global $wpdb;\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n FROM $wpdb->posts as p\n join $wpdb->comments as C\n ON p.ID = c.comment_post_ID\n join $wpdb->commentmeta as M\n ON C.comment_ID = M.comment_id\n WHERE\n p.post_author = $user_id\n AND p.post_status ='finished'\n AND p.post_type ='mjob_order'\n AND M.meta_key = 'et_rate'\n AND C.comment_type ='mjob_review'\n AND C.comment_approved = 1\";\n\n $results = $wpdb->get_results($sql);\n if($results) {\n return array('rating_score' => $results[0]->rate_point , 'review_count' => $results[0]->count );\n }else {\n return array('rating_score' => 0 , 'review_count' => 0 );\n }\n }", "title": "" }, { "docid": "f3aca6586a50a3c62532cea900ac452c", "score": "0.5824862", "text": "public function getReview(Request $request)\n {\n return DB::table('reviews')\n ->where('is_template',1)\n ->where('topic_uuid',$request->data)->get();\n }", "title": "" }, { "docid": "6d20082c95385cb92aa7253245b660fb", "score": "0.5813938", "text": "public function index()\n {\n $reviews = Review::with('products', 'user')->get();\n\n return response()->json($reviews);\n }", "title": "" }, { "docid": "7914b3b5fdf337c16b925fb5a34e1fe7", "score": "0.58106613", "text": "public function reviews()\n {\n return $this->hasMany('App\\Models\\Reviews','user_to','id');\n }", "title": "" }, { "docid": "d0a1ed7969174bdcab1e6479bb454275", "score": "0.57865393", "text": "function getReviews($userId) {\n global $conn;\n $stmt = $conn->prepare('SELECT review.rating, buyer.id as reviewer_id, buyer.username AS reviewer_username, review.date, product.name as product_name, review.message, auction.id as auction_id,\n (SELECT image.filename\n FROM image\n WHERE product.id = image.product_id\n LIMIT 1) as image_filename\n FROM review\n INNER JOIN bid ON review.bid_id = bid.id\n INNER JOIN auction ON bid.auction_id = auction.id\n INNER JOIN \"user\" buyer ON bid.user_id = buyer.id\n INNER JOIN product ON auction.product_id = product.id\n INNER JOIN \"user\" seller ON auction.user_id = seller.id\n WHERE seller.id = :user_id');\n $stmt->bindParam('user_id', $userId);\n $stmt->execute();\n return $stmt->fetchAll();\n}", "title": "" }, { "docid": "d7cf0e6aced24050e5fc8eb86fcee896", "score": "0.5786206", "text": "public function getRecommendations()\r\n {\r\n $url = self::$api.'/user/recs';\r\n $additionalHeaders = array(\r\n 'X-Auth-Token: '.$this->tinderToken,\r\n 'Content-Type: application/json'\r\n );\r\n return $this->sendRequest($url, $additionalHeaders);\r\n }", "title": "" }, { "docid": "d32f8d1b4a02aa50f1c6230dde351eed", "score": "0.5783548", "text": "public function reviews()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = user_id, localKey = id)\n return $this->hasMany(Review::class);\n }", "title": "" }, { "docid": "92d8a425125c86bdf15fca3a310f364e", "score": "0.5780421", "text": "function get_review($user_id, $post_id) {\n \n global $wpdb;\n $review_table = $wpdb->prefix.'snv_review'; \n \n $review_result = $wpdb->get_results('SELECT * FROM '.$review_table.' WHERE user_id='.$user_id.' AND product_id='.$post_id.'');\n \n return $review_result; \n}", "title": "" }, { "docid": "af059452c249a8e88dd0ec8197228081", "score": "0.577126", "text": "public function getReviews()\n\t{\n\t\t$reviews = Yii::createComponent($this->module->reviewModelClass)\n\t\t\t\t\t ->findAll($this->getReviewCriteria());\n\t\t// get model type\n\t\t$type = get_class($this->owner);\n\t\tforeach($this->module->reviewableModels as $scope => $model) {\n\t\t\tif ($type == $model) {\n\t\t\t\t$type = $scope;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tforeach($reviews as $review) {\n\t\t\t/** @var review $review */\n\t\t\t$review->setType($type);\n\t\t\t$review->setKey($this->owner->primaryKey);\n\t\t}\n\t\treturn $reviews;\n\t}", "title": "" }, { "docid": "8948d51a7ffb7c46a72a5008f9a516dc", "score": "0.57696956", "text": "public function getReviewById($id)\n\t{\n\t\treturn $this->performRequest('GET',\"/api/getReviewById/{$id}\");\n\t}", "title": "" }, { "docid": "d393e9155ae94e4ad71af860c7940027", "score": "0.57478714", "text": "function mts_review_get_review() {\n // security\n check_ajax_referer( 'wp-review-security', 'nonce' );\n\n\t$options = get_option('wp_review_options');\n\t$post_id = intval($_POST['post_id']);\n\t$user_id = is_user_logged_in() ? get_current_user_id() : 0;\n\t$review = round( abs( filter_input( INPUT_POST, 'review' ) ), 2 );\n\t\n\t$review_text = $review;\n\n $uip = wp_review_get_user_ip();\n\n\tadd_action( 'comment_duplicate_trigger', function () {\n\t\techo 'MTS_REVIEW_DUP_ERROR';\n\t\texit;\n\t} );\n\n\tif ( $review > 0 &&\n\t\t! hasPreviousReview( $post_id, $user_id, $uip, WP_REVIEW_COMMENT_TYPE_VISITOR ) &&\n\t (\n\t ( is_user_logged_in() && ! empty( $options['registered_only'] ) ) ||\n ( is_user_logged_in() && empty( $options['registered_only'] ) ) ||\n ( ! is_user_logged_in() && empty( $options['registered_only'] ) )\n\t )\n\t) {\n\t\tif ( $insert = wp_insert_comment( array(\n\t\t\t\t'user_id' => $user_id,\n\t\t\t\t'comment_type' => WP_REVIEW_COMMENT_TYPE_VISITOR,\n\t\t\t\t'comment_post_ID' => $post_id,\n\t\t\t\t'comment_parent' => 0,\n\t\t\t\t'comment_author_IP' => $uip,\n\t\t\t\t'comment_content' => sprintf(__('Visitor Rating: %s', 'wp-review'), $review_text),\n\t\t\t\t'comment_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT']: '',\n\t\t\t\t'comment_date' => current_time('mysql'),\n\t\t\t\t'comment_date_gmt' => current_time( 'mysql', 1 ),\n\t\t\t\t'comment_approved' => 1\n\t\t) ) ) {\n\t\t\tif ( update_comment_meta( $insert, WP_REVIEW_VISITOR_RATING_METAKEY, $review ) ) {\n\t\t\t\t$post_reviews = mts_get_post_reviews( $post_id, true );\n\n\t\t\t\techo $post_reviews['rating'] . '|' . $post_reviews['count'];\n\t\t\t\texit;\n\t\t\t} else {\n\t\t\t\twp_delete_comment( $insert );\n\t\t\t}\n\t\t}\n\t}\n\n\techo 'MTS_REVIEW_DB_ERROR';\n\texit;\n}", "title": "" }, { "docid": "58896d51964f69dc433116811f4a450d", "score": "0.5725304", "text": "function getReviewers() {\n $query = \"SELECT * FROM \".User::TABLE_NAME.\" WHERE role_id=:revRole\";\n $reviewers = [];\n\n $db = getConnection();\n\n $stmt = $db->prepare($query);\n $stmt->execute(array(\":revRole\" => User::REVIEWER_ROLE_ID));\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach ($rows as $row) {\n $r = new User();\n $r->fill($row);\n $reviewers[] = $r;\n }\n\n $db = null;\n\n return $reviewers;\n }", "title": "" }, { "docid": "dbc2e21cf3a291ff6ed905b209042715", "score": "0.5708202", "text": "public function getReview()\n {\n return $this->Review;\n }", "title": "" }, { "docid": "07c3d08d6ea1acad9937b7bbe83f3be0", "score": "0.5694541", "text": "public function reviews($event_id)\n\t{\n\t\t$member = \\Auth::user()->profile;\n\t\t$event = Event::findOrFail($event_id);\n\n\t\t$options = [\n\t\t\t1 => 'Zeer slecht',\n\t\t\t2 => 'Slecht',\n\t\t\t3 => 'Gewoon',\n\t\t\t4 => 'Goed',\n\t\t\t5 => 'Zeer goed'\n\t\t];\n\n\t\tcreateReviewChart($event, 'stof', $options, $member);\n\n\t\t$options = [\n\t\t\t1 => 'Te weinig',\n\t\t\t2 => 'Weinig',\n\t\t\t3 => 'Voldoende',\n\t\t\t4 => 'Veel'\n\t\t];\n\n\t\tcreateReviewChart($event, 'aandacht', $options, $member);\n\n\t\t$options = [\n\t\t\t1 => 'Zeer vervelend',\n\t\t\t2 => 'Vervelend',\n\t\t\t3 => 'Gewoon',\n\t\t\t4 => 'Prettig',\n\t\t\t5 => 'Zeer prettig'\n\t\t];\n\n\t\tcreateReviewChart($event, 'mening', $options, $member);\n\n\t\t$options = [\n\t\t\t1 => 'Erg ontevreden',\n\t\t\t2 => 'Een beetje ontevreden',\n\t\t\t3 => 'Een beetje tevreden',\n\t\t\t4 => 'Erg tevreden'\n\t\t];\n\n\t\tcreateReviewChart($event, 'tevreden', $options, $member);\n\n\t\treturn view('profile.reviews', compact('event', 'member'));\n\t}", "title": "" }, { "docid": "705da49fa97d780d6b9ca8280aac77ad", "score": "0.5690794", "text": "public function getAppReview($token, $page, $place, $address) {\n\t\tif ( $user_row = $this->db->get_where('users', array('token' => $token, 'role' => 2) )->result() ) {\n $user = $user_row[0];\n\n $this->response['data']['place'] = $place;\n $this->response['data']['address'] = $address;\n $this->response['data']['page'] = $page;\n $this->response['data']['total'] = 0;\n $this->response['data']['rating'] = 0;\n $this->response['data']['is_end'] = true;\n $this->response['data']['reports'] = null;\n\n $sql_query = \"SELECT COUNT(rating) AS total, SUM(rating) AS sum_rating\";\n $sql_query .= \" FROM reports \";\n $sql_query .= \" WHERE place = '\" . $place . \"' AND address = '\" . $address . \"' AND type = 'App Review';\";\n $total_reports = $this->db->query($sql_query)->result();\n if ( $total_reports ) {\n $this->response['data']['total'] = $total_reports[0]->total + 0;\n if ( $total_reports[0]->total == 0 ) {\n $this->response['data']['rating'] = 0;\n $this->response['data']['is_end'] = true;\n } else {\n $this->response['data']['rating'] = $total_reports[0]->sum_rating / $total_reports[0]->total;\n\n if ( $total_reports[0]->total > $page * $this->counts_per_page ) {\n $this->response['data']['is_end'] = false;\n }\n \n $this->db->select('id, user_id, rating, comment, created_at')->from('reports')->where(array('type' => 'App Review', 'place' => $place, 'address' => $address))->limit($this->counts_per_page, ($page - 1) * $this->counts_per_page);\n $report_rows = $this->db->order_by('created_at', 'DESC')->get()->result();\n if ( $report_rows ) {\n foreach ( $report_rows as $report_row ) {\n $report = array(\n 'rating' => $report_row->rating + 0,\n 'comment' => $report_row->comment,\n 'created_at' => $report_row->created_at,\n 'user_name' => '',\n 'user_email' => '',\n );\n if ( $report_user_row = $this->db->get_where('users', array('id' => $report_row->user_id, 'role' => 2) )->result() ) {\n $report_user = $report_user_row[0];\n $report['user_name'] = $report_user->name;\n $report['user_email'] = $report_user->email;\n }\n $this->response['data']['reports'][] = $report;\n }\n }\n }\n }\n \n $this->response['error_type'] = 0;\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "a6964ea0913c4a08c09bf9798e4efa54", "score": "0.56849", "text": "public function getAllSReviews()\n\t{\n\t\tif(!$this->hasData('allreviews')) {\n\t\t\t//Mostraremos solo las reviews que esten aprobadas desde el admin\n\t\t\t$collection = Mage::getModel('salesreport/review')->getCollection()\n\t\t\t\t\t\t\t->addFieldToFilter('status_id',Mage::helper('salesreport')->getApprovedStatus())\n\t\t\t\t\t\t\t->setOrder('review_id','ASC');\n\t\t\t$this->setData('allreviews', $collection);\n\t\t}\n\t\treturn $this->getData('allreviews');\n\t}", "title": "" }, { "docid": "ca6354554ff219c5e895409be0e28be9", "score": "0.56833404", "text": "function get_reviewed_by(){\n\t\t\treturn $this->reviewed_by;\n\t\t}", "title": "" }, { "docid": "5a43c65dddf19dbe7f646991a6bbe02d", "score": "0.56764215", "text": "function the_hrb_user_total_authored_reviews( $user = '', $args = array(), $before = '', $after = '' ) {\n\techo $before . get_the_hrb_user_total_authored_reviews( $user, $args ) . $after;\n}", "title": "" }, { "docid": "31bd1f9dd5b5becd7f73a43973d923ae", "score": "0.5661034", "text": "function the_hrb_user_total_reviews( $user = '', $args = array(), $before = '', $after = '' ) {\n\techo $before . get_the_hrb_user_total_reviews( $user, $args ) . $after;\n}", "title": "" }, { "docid": "30ad8fb609cfa54d71a099f649bf4cc2", "score": "0.56519186", "text": "public function get_loyalty_products_reviews_ratings($userId,$loyaltyProductId) { \n # Set default data \n $reviewsData = array();\n $reviewsData['totalReviewsAndRatings'] = 0;\n $reviewsData['Rating'] = 0;\n $reviewsData['Review'] = \"\";\n \n # Get total Reviews count \n $this -> db -> select(\"case when count(r.Id) is null then 0 else count(r.Id) end as totalReviewsAndRatings\",FALSE); \n $this -> db -> from('loyalty_products_reviews as r'); \n $this -> db -> where('r.LoyaltyProductId ', $loyaltyProductId); \n $query = $this -> db -> get();\n \n if ($query -> num_rows() > 0) {\n $totalReviewsData = $query -> row_array();\n $reviewsData['totalReviewsAndRatings'] = $totalReviewsData['totalReviewsAndRatings'];\n }\n \n # Get product's Ratings and Review \n $this -> db -> select(\"r.Rating, r.Review\",FALSE); \n $this -> db -> from('loyalty_products_reviews as r'); \n $this -> db -> where('r.LoyaltyProductId ', $loyaltyProductId); \n $this -> db -> where('r.UserId ', $userId);\n $query = $this -> db -> get();\n \n if ($query -> num_rows() > 0) {\n $reviews = $query -> row_array();\n $reviewsData['Rating'] = $reviews['Rating'];\n $reviewsData['Review'] = $reviews['Review'];\n }\n \n return $reviewsData;\n }", "title": "" }, { "docid": "218d6c5c01bbdc79048dcbdf8138f7b5", "score": "0.56494063", "text": "public function review(Request $request, UserModel $obj)\r\n {\r\n \r\n \r\n $this->validate($request, array(\r\n // \"name\" => \"required\",\r\n // \"email\" => \"required|email\",\r\n \"comment\" => \"required\",\r\n \"rating\" => \"numeric\",\r\n ));\r\n \r\n \r\n $getreviewdetail = \\DB::table('user_review')\r\n ->select('created_at')\r\n ->where('client_id', '=', Session::get('client_id'))\r\n ->where('payment', '=', 1)\r\n ->orderBy('id', 'desc')\r\n ->first();\r\n \r\n \r\n \r\n \r\n \r\n \r\n $popup = 0;\r\n if (!empty($getreviewdetail)) {\r\n $created_date = $getreviewdetail->created_at;\r\n \r\n $finaldate = date('Y-m-d', strtotime($created_date. ' + 1 month'));\r\n \r\n if ($request->input(\"rating\") >= 4 && $request->input(\"booked_again\") == 1) {\r\n if ($finaldate < date('Y-m-d')) {\r\n $popup = 1;\r\n }\r\n }\r\n } else {\r\n if ($request->input(\"rating\") >= 4 && $request->input(\"booked_again\") == 1) {\r\n $popup = 1;\r\n }\r\n }\r\n \r\n \r\n \r\n // $this->validate($request, [\r\n // \"name\" => \"required\",\r\n // \"email\" => \"required|email\",\r\n // \"comment\" => \"required\",\r\n // \"rating\" => \"numeric\",\r\n // 'g-recaptcha-response' => 'required|captcha',\r\n // ], [\r\n // 'g-recaptcha-response.*' => 'Invalid captcha response'\r\n // ]);\r\n \r\n \r\n $name = Session::get('client_username');\r\n $email = Session::get('client_email');\r\n $client_id = Session::get('client_id');\r\n \r\n // $name = $request->input(\"name\");\r\n // $email = $request->input(\"email\");\r\n \r\n \r\n $comment = $request->input(\"comment\");\r\n $rating = $request->input(\"rating\");\r\n $booked_again = $request->input(\"booked_again\");\r\n $is_promoted = $request->input(\"is_promoted\") ? 1 : 0;\r\n $obj->reviews()->create([\"client_id\" => $client_id,\"name\" => $name, \"email\" => $email, \"comment\" => $comment,\r\n \"booked_again\" => $booked_again, \"rating\" => $rating, \"is_promoted\" => $is_promoted, \"created_at\" => Carbon::now()]);\r\n \r\n Mail::send(\"emails.contactUs\", [\"details\" => $comment, \"name\" => $name, \"email\" => $email], function ($message) {\r\n $message->from(config(\"mail.from.address\"), config(\"mail.from.name\"));\r\n $message->to(\"[email protected]\");\r\n $message->subject(\"GuysWay, Message\");\r\n });\r\n \r\n \r\n \r\n $getreviewid = \\DB::table('user_review')\r\n ->select('id')\r\n ->where('client_id', '=', $client_id)\r\n ->orderBy('id', '=', 'desc')\r\n ->first();\r\n\r\n return response([\"status\" => true, \"message\" => \"Review Added Successfully.\",'popup' => $popup,'review_id' =>$getreviewid->id ], 200);\r\n }", "title": "" }, { "docid": "9e4783dac31530f2095771e0cd23af11", "score": "0.56486624", "text": "public function get_loyalty_products_reviews($userId,$loyaltyProductId) { \n # Set default data \n $reviewsData = array();\n $reviewsData['totalReviews'] = 0;\n $reviewsData['Rating'] = 0;\n $reviewsData['Review'] = \"\";\n \n # Get total Reviews count \n //$this -> db -> select(\"case when count(r.Review) is null then 0 else count(r.Review) end as totalReviews\",FALSE); \n $this -> db -> select(\"case when count(r.Id) is null then 0 else count(r.Id) end as totalReviews\",FALSE); \n $this -> db -> from('loyalty_products_reviews as r'); \n $this -> db -> where('r.LoyaltyProductId ', $loyaltyProductId); \n $query = $this -> db -> get();\n \n if ($query -> num_rows() > 0) {\n $totalReviewsData = $query -> row_array();\n $reviewsData['totalReviews'] = $totalReviewsData['totalReviews'];\n }\n \n # Get product's Ratings and Review \n $this -> db -> select(\"r.Rating, r.Review\",FALSE); \n $this -> db -> from('loyalty_products_reviews as r'); \n $this -> db -> where('r.LoyaltyProductId ', $loyaltyProductId); \n $this -> db -> where('r.UserId ', $userId);\n $query = $this -> db -> get();\n \n if ($query -> num_rows() > 0) {\n $reviews = $query -> row_array();\n $reviewsData['Rating'] = $reviews['Rating'];\n $reviewsData['Review'] = $reviews['Review'];\n }\n \n return $reviewsData;\n }", "title": "" }, { "docid": "d3137ad2224a2f3aa72f92653447aeef", "score": "0.564448", "text": "public function review($slug){\n $userExists = $this->session->userdata('id');\n\n // Change this to whatever title you wish.\n $data['title'] = 'Games Reviews';\n\n // Condition checking if the user exists.\n if (!$userExists){\n\n //The user doesn't exist so change page accordigly.\n $data['show'] = true;\n \n }\n else{\n\n //The user does exist so change page accordigly.\n $data['show'] = false;\n\n }\n \n // Get the data from our Home Model.\n $data['result'] = $this->HomeModel->getReview($slug);\n\n //Load data on to our view page\n $data['head'] = 'review';\n $this->load->view('component', $data);\n\n \n }", "title": "" }, { "docid": "80c52568b8b11e53e053e50041a37394", "score": "0.5634836", "text": "public function getCurrentUserRating()\n {\n return $this->currentUserRating;\n }", "title": "" }, { "docid": "4b170e86f060bfd6270d37c1295a2eba", "score": "0.5632198", "text": "public function get($name, $optParams = array())\n {\n $params = array('name' => $name);\n $params = array_merge($params, $optParams);\n return $this->call('get', array($params), Google_Service_MyBusiness_Review::class);\n }", "title": "" }, { "docid": "6c5ea8e40346c5b0d856b2db598b87db", "score": "0.56321955", "text": "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "title": "" }, { "docid": "6c5ea8e40346c5b0d856b2db598b87db", "score": "0.56321955", "text": "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "title": "" }, { "docid": "6c5ea8e40346c5b0d856b2db598b87db", "score": "0.56321955", "text": "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "title": "" }, { "docid": "b51ea0592eec8f2ef0e2d8a2e6e9519f", "score": "0.56219155", "text": "public function getMyProfile()\n {\n $userId = auth()->user()->id;\n $User = User::where('id',$userId)->with('LastDeliveredOrder')->first();\n if(!$User){\n return Helper::responseData('user_not_found',false,false,__('default.error_message.user_not_found'),404);\n }\n $Skills = Skill::whereHas('UserSkills',function($UserSkills) use($userId){\n return $UserSkills->where('user_id',$userId);\n })->selectCard()->get();\n $User->skills = $Skills;\n// return Helper::responseData('success',true,$User);\n $Services = Service::selectCard()\n ->where('user_id',auth()->user()->id)\n ->with('Category')\n ->orderBy('id','DESC')\n ->paginate(5);\n return view('site.user.my_profile')->with('user',$User)->with('services',$Services);\n }", "title": "" }, { "docid": "7866efdae58fb35ce0ab7e44aafdda92", "score": "0.56018543", "text": "function getLastReviews($userId) {\n global $conn;\n $stmt = $conn->prepare('SELECT review.id AS review_id, auction.id AS auction_id, seller.username AS seller_username, seller.id as seller_id, review.date\n FROM review\n JOIN bid ON review.bid_id = bid.id\n JOIN auction ON bid.auction_id = auction.id\n JOIN \"user\" seller ON auction.user_id = seller.id\n JOIN \"user\" own ON bid.user_id = own.id\n WHERE own.id = :user_id\n ORDER BY review.date DESC\n LIMIT 2');\n $stmt->bindParam('user_id', $userId);\n $stmt->execute();\n return $stmt->fetchAll();\n}", "title": "" }, { "docid": "5e31b5dcf3ab9f544b1fb3512b1c3425", "score": "0.5595441", "text": "public function actionGivenRatings()\n {\n $userId = XenForo_Visitor::getUserId();\n\n /* @var $ratingModel ThemeHouse_UserRatings_Model_Ratings */\n $ratingModel = $this->getModelFromCache('ThemeHouse_UserRatings_Model_Ratings');\n\n //Pagination.\n $page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));\n $perPage = XenForo_Application::get('options')->ratingsPagination;\n\n //Get id of users being rated and visible ratings.\n $conditions = array(\n 'from_user' => $userId,\n 'active' => 1,\n );\n\n //Fetch ratings and pagination.\n $fetchOptions = array(\n 'join' => ThemeHouse_UserRatings_Model_Ratings::FETCH_BOTH_FULL_USERS,\n 'page' => $page,\n 'perPage' => $perPage,\n );\n\n //Get all ratings for this user.\n $entries = $ratingModel->getRatings($conditions, $fetchOptions);\n\n //Count all ratings for this user.\n $count = $ratingModel->countRatings($conditions);\n\n //Register variables for use in our template.\n $viewParams = array(\n 'user' => $userId,\n 'entries' => $entries,\n 'count' => $count,\n 'page' => $page,\n 'perPage' => $perPage,\n );\n\n return $this->_getWrapper(\n 'account', 'givenratings',\n $this->responseView('XenForo_ViewPublic_Base', 'th_user_given_ratings', $viewParams)\n );\n }", "title": "" }, { "docid": "cd9f128c37d847cdb51f6f42b22347ed", "score": "0.55939096", "text": "public function getReviewsList()\n\t{\n\t\t\n\t\t$arrReviews = array();\n\t\t$objReviews = $this->Database->execute(\"SELECT id, title FROM tl_wuapaa_reviews ORDER BY title\");\n\n\t\twhile ($objReviews->next())\n\t\t{\n\t\t\t/*if ($this->User->hasAccess($objArchives->id, 'reviews'))\n\t\t\t{*/\n\t\t\t\t$arrReviews[$objReviews->id] = $objReviews->title;\n\t\t\t//}\n\t\t}\n \n\t\treturn $arrReviews;\n\t}", "title": "" }, { "docid": "472ebcbcd727ed9e751c1e229fab2d52", "score": "0.5593292", "text": "protected function getReviews()\n {\n $reviews = [\n 'individual_stars' => [1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0]\n ];\n\n $ratingBox = $this->first(\".ebay-review-start-rating\");\n\n $reviews['overall_star'] = empty($ratingBox->text(true)) ? 0 : $ratingBox->text(true);\n $ratings = $this->first(\".ebay-review-list\")->find(\"li div\");\n\n foreach ($ratings as $rating) {\n $starValue = $rating->find(\".ebay-review-item-stars\")[0]->text();\n $reviews['individual_stars'][$starValue] = +$rating->find(\".ebay-review-item-r span\")->text();\n }\n\n $reviews['amount'] = array_sum($reviews['individual_stars']);\n $reviews['positive'] = 0;\n $reviews['neutral'] = 0;\n $reviews['negative'] = 0;\n\n return $reviews;\n }", "title": "" }, { "docid": "7fa8795cd902dc5b74977f29c1e5d6e7", "score": "0.5592331", "text": "public function show($id)\n {\n $username = $this->getUsername();\n $reviews = Review::where('movie_id', '=', $id)->where('deleted', '=', false)->orderByRaw('username = ? DESC', $username)->orderBy('created_at', 'DESC')->get();\n return[\n 'reviews' => $reviews\n ];\n }", "title": "" }, { "docid": "1d9112aebe7a84eb1706a90228335480", "score": "0.55871236", "text": "public function show(Review $review)\n {\n //\n return $review;\n }", "title": "" }, { "docid": "753318665c627ae33052ebff982046d9", "score": "0.55805653", "text": "function getProfileData($user_id=null){\n\t\treturn $this->Collection->getProfileData($user_id);\n\t}", "title": "" }, { "docid": "359a162db24a42316d7536d9dfafc45e", "score": "0.557156", "text": "function review($stmt,$pagesize){\n $data = array();\n \n $total = 0;\n \n $stmt->execute();\n \n $stmt->bind_result($col1, $col2, $col3, $col4, $col5, $col6, $col7);\n \n while ($stmt->fetch()) {\n $total = $col7;\n if($col5 != \"no-photo.jpg\"){\n $icon = IMAGES_URL.'/'.urlencode(base64_encode($col4.'/'.$col5));\n }else{\n $icon = INIT_URL.\"/img/\".$col5;\n }\n \n $data[] = array(\n \"shop_review_id\" => $col1,\n \"user_id\" => $col2,\n \"shop_review_comment\" => $col3,\n \"user_photo\" => $icon,\n \"username\" => $col4,\n \"comment_date\" => $col6\n );\n }\n \n $stmt->close();\n \n /*\n Function location in : /model/general/functions.php\n */\n credentialVerifiedCalc($data,$total,$pagesize);\n }", "title": "" }, { "docid": "f7f16369e16b2d7191df072756984a34", "score": "0.5568632", "text": "public function reviews()\n {\n \treturn $this->hasMany(Review::class);\n }", "title": "" }, { "docid": "482a4b1497f1f5fb7cd2c7e9bdd26fc3", "score": "0.5564089", "text": "public function reviewdata_get()\n\t{\n\t\t// Get reviewid parameter from the query.\n\t\t$reviewid = $this->get('reviewid');\n\t\t\n\t\t// Get datatype parameter from the query.\n\t\t$datatype = $this->get('datatype');\n\t\t\n\t\tif ($this->check_for_valid_id(\"Review\", $reviewid) === TRUE)\n\t\t{\n\t\t\t$reviewid = (int) $reviewid;\n\n\t\t\tif ($datatype !== NULL)\n\t\t\t{\n\t\t\t\t\tswitch ($datatype)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"comments\":\n\t\t\t\t\t\t\t$data = $this->r2pdb_model->get_review_comments_display($reviewid);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// Theoretically this is not possible.\n\t\t\t\t\t\t\t$this->response(['status' => FALSE, 'message' => \"This should not have happened, please contact the site administrator.\"], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif (!empty($data))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->response($data, REST_Controller::HTTP_OK);\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$this->response(['status' => FALSE, 'message' => \"Review has no \" . $datatype . \".\"], REST_Controller::HTTP_NOT_FOUND);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "af553c4932ff67649ab69db0cdf9ed28", "score": "0.5555076", "text": "public function loadreview() {\n\t\t// Get the id from the URL\n\t\t$project_id = $this->uri->segment(4);\n\t\t$last_image = $this->uri->segment(5);\n\t\t\n\t\t// Fetch the data\n\t\t$data = $this->ProjectModel->getReviewEntry($project_id, $last_image);\n\t\t\n\t\t// Return data as json\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "be892b6d511189cab21f20f7124b854b", "score": "0.5551261", "text": "public function profile(){\n\n $userid = Auth::id();\n $favourites = DB::select('SELECT posts.comic, posts.id, posts.title FROM posts INNER JOIN favourites ON favourites.postid = posts.id');\n $userId = DB::select('SELECT * FROM users WHERE id = ?', [$userid]);\n $postid = DB::select('SELECT * FROM favourites WHERE userid = ?', [$userid]);\n return view('comic.profile', compact('userId', 'favourites'));\n }", "title": "" }, { "docid": "ece6bc67723bbf5eff18911973966f12", "score": "0.55476815", "text": "public function reviews()\n {\n return view('reviews');\n }", "title": "" }, { "docid": "c4ead16ecc91572aa4e781828ec6304a", "score": "0.55472106", "text": "function getallreview($id) {\n $storeId = Mage::app()->getStore()->getId();\n return Mage::getModel('marketplace/sellerreview')\n ->getCollection()\n ->addFieldToFilter('status', 1)\n ->addFieldToFilter('store_id', $storeId)\n ->addFieldToFilter('seller_id', $id); \n }", "title": "" }, { "docid": "1ae62ed9beba584cf97a61ff2df1e947", "score": "0.5547084", "text": "public function getPreviewInformation($userId)\n {\n $theme = new ThemeEntity();\n $product = new ProductEntity();\n /** @var $shopFeedback ShopFeedbackEntity.php */\n $shopFeedback = new ShopFeedbackEntity();\n\n $query = ShopProfileEntity::find()\n ->select(['shop_profile.id', 'shop_profile.name', 'shop_profile.image', 'shop_profile.user_id',\n 'user.created_at as user_registration_date'])\n ->joinWith('user')\n ->where([\n 'shop_profile.user_id' => $userId\n ]);\n \n $shopProfile = $query->one();\n if ($shopProfile) {\n $rating = $shopFeedback->getAverageShopRating($shopProfile['user']['id']);\n $userRegistrationDate = $shopProfile->user->created_at;\n\n $shopProfile = $shopProfile->toArray();\n $shopProfile['user_registration_date'] = $userRegistrationDate;\n $shopProfile['rating'] = isset($rating['average_rating']) ? $rating['average_rating'] : 0;\n $shopProfile['is_online'] = UserRepository::isOnline($userId);\n $shopProfile['themes'] = $theme->getListShopThemes($userId, 10);\n $shopProfile['count_themes'] = $theme->getCountShopThemes($userId);\n $shopProfile['products'] = $product->getProducts($userId, 10);\n $shopProfile['count_products'] = $product->getCountShopProducts($userId);\n\n unset($shopProfile['user']);\n\n return $shopProfile;\n }\n\n return [];\n }", "title": "" }, { "docid": "cfd58d01f3fd0e7f66acddc947037a30", "score": "0.5545692", "text": "public static function findByUser($id) {\n return Rating::where('user','=',$id)->get();\n }", "title": "" }, { "docid": "a8fd286f5b1b1813bf957582d50c0e3d", "score": "0.5541797", "text": "public function userProfile(){\n $theme = Theme::uses('corex')->layout('layout');\n $users = User::orderby('id', 'desc')->get();\n\n $data = ['users' =>$users];\n return $theme->scope('users.profile', $data)->render();\n }", "title": "" }, { "docid": "b1f413db02f897b1a3c59278256b76d8", "score": "0.55344737", "text": "public function googlereview($user_id) \n {\n $client = new Client;\n $google = Socialmedia::where('name', 'google', true)->value('id');\n $get = Rating::where('customer_id', $user_id)->where('review_type', 2, true)->first();\n $social_id = 2;\n $socials = Social::where('social_id', $social_id)->where('user_id', $user_id, true)->first();\n $place_id = $socials->url;\n $api = $socials->api;\n //$response = $client->get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.$place_id.'&key='.$api);\n $response = $client->get('https://maps.googleapis.com/maps/api/place/details/json?placeid=123&key=282');\n $response = json_decode($response->getBody(), true);\n try\n {\n if(isset($response['result'])) \n {\n $ratings=$response;\n $reviews = $ratings['result']['reviews'];\n foreach ($ratings['result']['reviews'] as $rating) \n {\n $url=Rating::where('review_type', $google)->where('user_url', $rating['author_url'])->get();\n if(count($url) == 1) \n {\n echo 'already exists <b>' .$rating['author_url'] . '</b><br>';\n } \n else \n {\n $rating= Rating::create([\n 'customer_id' =>$user_id,\n 'comment' => $rating['text'],\n 'rating' => $rating['rating'],\n 'name' => $rating['author_name'],\n 'user_url' => $rating['author_url'],\n 'email' => '',\n 'contact' => '',\n // 'created'=>$date,\n //'user_type'=>$rating['reviewer']['id'],\n 'review_type'=>$google,\n //'created' => $date\n ]);\n }\n }\n $var_msg = \"Data Insreted\";\n throw new Exception($var_msg);\n } \n }\n catch (Exception $e) \n {\n echo \"Message: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "760679be3879b91af87a6e77fdc73291", "score": "0.55189824", "text": "public function getNumbersOfUserRating($resource_id, $type = null, $ratingparam_id=0, $value=0, $user_id = 0, $resource_type=null, $params=array()) {\n\n $allow_review = 1;\n if(!empty($resource_id)) {\n\t\t\t$listingTable = Engine_Api::_()->getDbtable('listings', 'sitereview');\n\t\t\t$listingtype_id = $listingTable->select()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->from($listingTable->info('name'),'listingtype_id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->where('listing_id = ?',$resource_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->query()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->fetchColumn();\n\t\t\t$ratingTable = Engine_Api::_()->getDbtable('ratings', 'sitereview');\n\t\t\t$rating_value = $ratingTable->select()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->from($ratingTable->info('name'),'rating')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->where('resource_id = ?',$resource_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->where('resource_type = ?',$resource_type)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->where('user_id = ?',$user_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->query()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->fetchColumn();\n\t\t $listingTypeTable = Engine_Api::_()->getDbtable('listingtypes', 'sitereview');\n\t\t\t$allow_review = $listingTypeTable->select()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->from($listingTypeTable->info('name'),'allow_review')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->where('listingtype_id = ?',$listingtype_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->query()\n\t\t\t\t\t\t\t\t\t\t\t\t\t->fetchColumn();\n }\n else {\n $rating_value = 1;\n }\n $tableReviewName = Engine_Api::_()->getDbtable('reviews', 'sitereview')->info('name');\n $tableRatingName = $this->info('name');\n \n if(!empty($allow_review) && !empty($rating_value)) {\n\t\t\t$select = $this\n\t\t\t\t\t\t\t->select()\n\t\t\t\t\t\t\t->setIntegrityCheck(false)\n\t\t\t\t\t\t\t->from($tableRatingName, new Zend_Db_Expr('COUNT(rating_id)'))\n\t\t\t\t\t\t\t->join($tableReviewName, \"$tableReviewName.review_id = $tableRatingName.review_id\", null)\n\t\t\t\t\t\t\t->where($tableReviewName . \".status = ?\", 1)\n\t\t\t\t\t\t\t->where(\"$tableRatingName.ratingparam_id = ?\", $ratingparam_id);\n }\n else {\n\t\t\t$select = $this\n\t\t\t\t->select()\n\t\t\t\t->from($tableRatingName, new Zend_Db_Expr('COUNT(rating_id)'))\n\t\t\t\t->where(\"$tableRatingName.ratingparam_id = ?\", $ratingparam_id);\n }\n \n if ($resource_id) {\n $select->where(\"$tableRatingName.resource_id = ?\", $resource_id);\n }\n\n if ($resource_type) {\n $select->where(\"$tableRatingName.resource_type = ?\", $resource_type);\n }\n\n if ($value) {\n $select->where(\"$tableRatingName.rating = ?\", $value);\n }\n\n $select->where(\"$tableRatingName.rating <> ?\", 0);\n\n if ($type == 'editor') {\n $select->where(\"$tableReviewName.type =?\", $type);\n } elseif ($type == 'user' || $type == 'visitor') {\n if(!empty($allow_review) && !empty($rating_value)) {\n\t\t\t\t$select->where(\"$tableReviewName.type in (?)\", array($type, 'visitor'));\n }\n else {\n $select->where(\"$tableRatingName.type in (?)\", array($type, 'visitor'));\n }\n }\n\n if ($user_id) {\n $select->where(\"user_id = ?\", $user_id);\n }\n if (isset($params['listingtype_id']) && !empty($params['listingtype_id'])) {\n //GET LISTING TABLE NAME\n $listingTable = Engine_Api::_()->getItemtable($resource_type);\n $sitereviewTableName = $listingTable->info('name');\n $primary = current($listingTable->info(\"primary\"));\n $select->join($sitereviewTableName, \"$tableReviewName.resource_id = $sitereviewTableName.$primary\", array());\n $select->where(\"$sitereviewTableName.`listingtype_id` =?\", $params['listingtype_id']);\n }\n $select->limit(1);\n\n $rating_users = $select\n ->query()\n ->fetchColumn();\n return $rating_users ? $rating_users : 0;\n }", "title": "" } ]
50c3eafc342032810d2c8201d66c9291
Returns a user's matchList given their account id.
[ { "docid": "7c4145f41f5b79cd533514cfd19e6cc2", "score": "0.64260334", "text": "public function getMatchList($accountId,$params=null) {\n if($params==null){\n $call = self::API_URL_MATCH_3 . 'matchlists/by-account/' . $accountId;\n }else{\n $call = self::API_URL_MATCH_3 . 'matchlists/by-account/' . $accountId .'?';\n\n //You can pass params either as an array or as string\n if(is_array($params))\n foreach($params as $key=>$param){\n //each param can also be an array, a list of champions, queues or seasons\n //refer to API doc to get details about params\n if(is_array($param))\n foreach($param as $p)\n $call .= $key . '=' . $p . '&';\n\n else\n $call .= $key . '=' . $param . '&';\n }\n\n else\n $call .= $params . '&';\n }\n\n return $this->request($call);\n }", "title": "" } ]
[ { "docid": "435f7da6c4dad7bbc4c4353ca24e5456", "score": "0.6075239", "text": "private function getMatchlist($threshold){\n\t\t\n\t\t// Make sure the user is logged in.\n\t\tif(! Auth::check()){\n\t\t\treturn redirect('/')->with('error', 'Unauthorised Page: Access Denied');\n\t\t}\n\t\t\n\t\t$userID = self::getID();\n\t\t\n\t\t$user = User::find($userID);\n\t\t\n\t\t// Make sure the user has set their preferences so we can calculate matches.\n\t\tif($user->preferenceSet==0){\n\t\t\treturn redirect('preferences')->with('error', \"You can't find matches until you have set your preferences.\");\n\t\t}\n\t\t\n\t\t// Get the potential matches.\n\t\t$array = self::getMatchArray($threshold);\n\t\t\n\t\t// Return the page with a list of matches.\n\t\treturn view('matchlist')->with('array', $array);\n\t}", "title": "" }, { "docid": "e37bdd4bfbe2300d088ce2dfb88ba4e2", "score": "0.5999981", "text": "public function get_players_by_match($id_match, $id_team)\n {\n global $wpdb;\n return $wpdb->get_results($wpdb->prepare(\"SELECT pt.id as player_id\n FROM $wpdb->player_data d\n LEFT JOIN $wpdb->player_team pt ON pt.id = d.id_player_team\n LEFT JOIN $wpdb->team t ON t.id = pt.id_team\n WHERE id_match = %d\n AND t.id = %d\",\n $id_match, $id_team)\n );\n }", "title": "" }, { "docid": "81a868bbd090b7be80db1aa36d0597d3", "score": "0.5999904", "text": "public function getParticipants($idOrganizeMatch){\n $stmt = $this->db->prepare(\"SELECT * FROM participantespartido WHERE idOrganizarPartido =?\");\n $stmt->execute(array(\n $idOrganizeMatch\n ));\n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $array_participantes = array();\n\n foreach($toret_db as $to){\n array_push($array_participantes, $to[\"loginUsuario\"]);\n }\n\n return $array_participantes;\n }", "title": "" }, { "docid": "3a633380c47d4d17a5e596d61c56a0c9", "score": "0.5980536", "text": "public function get_list($match_against = null) {\n\t\t$regexp = RegexpAddress::get_by_owner($this->oma->current_user, $_SESSION['limit'], $_SESSION['offset']['regexp']);\n\t\t$list = array();\n\t\tforeach($regexp as $rexp) {\n\t\t\t$row = array();\n\t\t\t$row['ID'] = $rexp->ID;\n\t\t\t$row['active'] = $rexp->active;\n\t\t\t$row['reg_exp'] = $rexp->reg_exp;\n\t\t\t$row['dest'] = $rexp->get_destinations();\n\t\t\tif(!is_null($match_against)\n\t\t\t && @preg_match($row['reg_exp'], $match_against)) {\n\t\t\t\t$row['matching']\t= true;\n\t\t\t} else {\n\t\t\t\t$row['matching']\t= false;\n\t\t\t\t}\n\t\t\t$list[] = $row;\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "6685c8a8bae215694f7d67ee0bf650e8", "score": "0.5797054", "text": "function fetchAllMatches()\r\n\t{\r\n\t\tglobal $mysqli,$db_table_prefix; \r\n\t\t$stmt = $mysqli->prepare(\"SELECT \r\n\t\t\tid,\r\n\t\t\tuser_id,\r\n\t\t\tpermission_id\r\n\t\t\tFROM \".$db_table_prefix.\"user_permission_matches\");\r\n\t\t$stmt->execute();\r\n\t\t$stmt->bind_result($id, $user, $permission);\r\n\t\twhile ($stmt->fetch()){\r\n\t\t\t$row[] = array('id' => $id, 'user_id' => $user, 'permission_id' => $permission);\r\n\t\t}\r\n\t\t$stmt->close();\r\n\t\treturn ($row);\t\r\n\t}", "title": "" }, { "docid": "5f53b7bfad8a31e2d6e800a9b0ed6441", "score": "0.5769272", "text": "public function getRecentMatchList($accountId) {\n $call = self::API_URL_MATCH_3 . 'matchlists/by-account/' . $accountId . '/recent';\n\n return $this->request($call);\n }", "title": "" }, { "docid": "64a99f7c4aab1b991aa108d5d68f1b19", "score": "0.5710691", "text": "function brainstorm_get_participants($brainstormid) {\r\n global $CFG;\r\n\r\n //Get all participants\r\n $sql = \"\r\n SELECT DISTINCT \r\n u.*\r\n FROM \r\n {$CFG->prefix}user u,\r\n {$CFG->prefix}brainstorm_responses c\r\n WHERE \r\n c.brainstormid = {$brainstormid} AND\r\n u.id = c.userid\r\n \";\r\n $participants = get_records_sql($sql);\r\n\r\n //Return students array (it contains an array of unique users)\r\n return ($participants);\r\n}", "title": "" }, { "docid": "44522a3cfad04325df25fbb8703fb8fd", "score": "0.55547667", "text": "public function getListAccountWithIDRole($id);", "title": "" }, { "docid": "a2d2d768b057c113fbe884486aaa1bd0", "score": "0.55118567", "text": "function get_users_list( $post_id ) {\n\n\t\tglobal $wpdb, $bp;\n\n\t\t// Prepare Sql\n\t\t$sql = $wpdb->prepare( \"SELECT user_id FROM {$bp->activity->table_name} WHERE type = 'activity_share' AND secondary_item_id = %d\", $post_id );\n\n\t\t// Get Result\n\t\t$result = $wpdb->get_results( $sql , ARRAY_A );\n\n\t\t// Get List of user id's & Remove Duplicated Users.\n\t\t$users = wp_list_pluck( $result, 'user_id' );\n\n\t\t// Get Users List.\n\t\tyz_get_popup_user_list( $users );\n\n\t}", "title": "" }, { "docid": "34b222789dbf88952e2f53462292b344", "score": "0.5503898", "text": "public function getMatchesById($matchId) {\n $matchArray = array();\n try {\n $q = $this->db->prepare('SELECT * FROM `matches` WHERE `pkMatch` = :idMatch');\n $q->bindValue(':idMatch', $matchId, PDO::PARAM_STR);\n $this->db->beginTransaction();\n $q->execute();\n while ($data = $q->fetch(PDO::FETCH_ASSOC)) {\n $matchArray[] = $data;\n }\n $this->db->commit();\n } catch (PDOException $e) {\n $this->db->rollback();\n }\n return $matchArray;\n }", "title": "" }, { "docid": "cd167ac47c32ec46bcf644308c7aed2d", "score": "0.5463838", "text": "function GetReports($match_id)\n\t{\n\t\t# define query\n\t\t$sql_query = \t\" SELECT reports.*, memb.nick_name AS member_nick, memb.id AS member_id FROM \".$GLOBALS['g_egltb_match_reports'].\" AS reports \".\n\t\t\t\t\t\t\" LEFT JOIN \".$GLOBALS['g_egltb_members'].\" AS memb \".\n\t\t\t\t\t\t\" ON reports.member_id=memb.id \".\n\t\t\t\t\t\t\" WHERE reports.match_id={$match_id} \";\n\t\treturn $this->pDBCon->FetchArrayObject( $this->pDBCon->Query( $sql_query ) );\n\t}", "title": "" }, { "docid": "c7cf28691ad7e70486fc5cabc67a1b44", "score": "0.5432778", "text": "public function findMatches($id)\n {\n MyLogger2::info(\"Enter JobDataService.findMatches()\");\n try\n {\n // Find all matching jobs.\n $result = $this->conn->prepare\n (\"SELECT s.NAME, \n \t\t j.ID, j.NAME, j.DESCRIPTION, j.COMPANY, j.REQUIREMENTS, j.SKILLS\n \t\t FROM \n skill as s\n INNER JOIN job as j\n ON j.SKILLS LIKE concat('%', s.NAME, '%') AND s.users_ID = :id\");\n $result->bindParam(':id', $id);\n $result->execute();\n \n MyLogger2::info(\"Exit JobDataService.findMatches()\");\n \n // Return an array of fetched results to the Business Service:\n return $result->fetchAll();\n }\n catch(PDOException $e)\n {\n MyLogger2::error(\"Exception: \", array(\n \"message\" => $e->getMessage()\n ));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n catch (Exception $exc)\n {\n MyLogger2::error(\"Exception: \", array(\n \"message\" => $exc->getMessage()\n ));\n // Throwing Exception with message:\n throw new $exc->getMessage();\n }\n \n }", "title": "" }, { "docid": "059a7c48a167dfade7fd61789c3f7773", "score": "0.5425493", "text": "public function getMatch():array\n {\n $stmt = self::connectToDb()->prepare('SELECT * FROM matches WHERE id = :id ');\n $stmt->bindParam(':id',$this->id);\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "9858b1b2267fbf99caff04e2a50bdedb", "score": "0.5413849", "text": "function get_list($user, $list_id){\n\t//grab the lists using previous functions\n\t$lists = lists::get_lists($user);\n\n\t//look for the requested one\n\tforeach ($lists as $list) {\n\t\tif($list->get_id() == $list_id ){\n\t\t\t$return_list = $list;\n\t\t}\n\t}\n\n\treturn $return_list;\n}", "title": "" }, { "docid": "e84e4185180d0892e7bded87ac40833c", "score": "0.5398075", "text": "public function getAccountUserMenuList($id)\n {\n $MenuList = $this->em->getRepository('CorporateBundle:CorpoAccountPermission')->getAccountUserMenuList($id);\n return $MenuList;\n }", "title": "" }, { "docid": "ea82fa1a91e4efa3baaf9520e0565e5c", "score": "0.5362595", "text": "function matchList($param)\n{\n unset($param);\n\n $ec = new ExtractorConfig();\n\n $matches = [];\n foreach ($ec->getConfig('matches') as $match) {\n $matches[] = [\n 'match' => $match['match'],\n 'teamNum' => $match[$ec->getConfig('team')],\n 'current' => ($ec->getConfig('currentMatch') === $match['match'])\n ];\n }\n\n // Handle any extra matches.\n $extra = ExtractorStorage::fetch('sys', 'extraMatches');\n if ($extra !== false) {\n foreach ($extra as $match) {\n $matches[] = [\n 'match' => $match['match'],\n 'teamNum' => $match['team'],\n 'current' => ($ec->getConfig('currentMatch') === $match['match'])\n ];\n }\n }\n\n $context = [\n 'team' => ExtractorUtil::teamNiceName($ec->getConfig('team')),\n 'teamColor' => ExtractorUtil::teamColor($ec->getConfig('team')),\n 'matches' => $matches,\n ];\n\n echo render('matchList', $context, 'Match List');\n\n return;\n}", "title": "" }, { "docid": "4ac0f8b33ceae4d49d52cf956bdf5916", "score": "0.53483033", "text": "function sortAccountsByName($db, $accountIdList)\n{\n $dbConn = $db->getNewConnection();\n\n $list = array();\n\n $query = \"SELECT `friend_id` FROM friends ORDER BY `profile_name` ASC;\";\n $result = mysqli_query($dbConn, $query);\n\n if ($result) {\n while ($row = mysqli_fetch_assoc($result)) {\n $id = $row[\"friend_id\"];\n if (in_array($id, $accountIdList)) {\n array_push($list, $id);\n }\n }\n }\n\n $db->closeConnection();\n\n return $list;\n}", "title": "" }, { "docid": "5e613aa6da80a773049ea026262f8da7", "score": "0.53448135", "text": "function getMatches($league_id) {\n\t\t\t$data = $this->fetch(\"SELECT t.id, t.challenger, t.league_id, t.match_date, t.created, t.completed, t.challengee_accepted, t.challenger_accepted, t.challenger_score, t.challengee_score, t.g_challenger, t.challengee, g2.guild AS g_challengee\n\t\t\t\t\t\t\t\t FROM (\n\t\t\t\t\t\t\t\t SELECT c1.id, c1.challenger, c1.created, c1.match_date, c1.league_id, c1.completed, c1.challengee_accepted, c1.challenger_accepted, c1.challenger_score, c1.challengee_score, g1.guild AS g_challenger, c1.challengee\n\t\t\t\t\t\t\t\t FROM \" . $this->prefix . \"guilds g1\n\t\t\t\t\t\t\t\t JOIN \" . $this->prefix . \"challenges c1\n\t\t\t\t\t\t\t\t ON g1.id = c1.challenger\n\t\t\t\t\t\t\t\t ) t \n\t\t\t\t\t\t\t\t JOIN guilds g2\n\t\t\t\t\t\t\t\t ON g2.id = t.challengee\n\t\t\t\t\t\t\t\t WHERE (t.league_id = '$league_id') AND (t.challengee_accepted != 2 AND t.challenger_accepted != 2)\n\t\t\t\t\t\t\t\t ORDER BY t.created DESC\t\n\t\t\t\t\t\t\t\t\");\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "117f970b91a2a775e61769e87e3135ab", "score": "0.53369963", "text": "public function getNearMatchGames($id, $matchid) {\n\t\tif (! $matchgames) {\n\t\t\t$map ['id'] = array (\n\t\t\t\t\t'gt',\n\t\t\t\t\t$id \n\t\t\t);\n\t\t\t$map ['match_id'] = $matchid;\n\t\t\t$gtMatchGames = $this->getMatchGamesInfo ( $map, 5 );\n\t\t\t$map ['id'] = array (\n\t\t\t\t\t'lt',\n\t\t\t\t\t$id \n\t\t\t);\n\t\t\t$ltMatchGames = $this->getMatchGamesInfo ( $map, 5 );\n\t\t\t\n\t\t\t$matchgames = array_merge ( $gtMatchGames?$gtMatchGames:array(), $ltMatchGames?$ltMatchGames:array() );\n\t\t\tS ( 'match_game_near_' . $id, $matchgames, 5000 );\n\t\t}\n\t\treturn $matchgames;\n\t}", "title": "" }, { "docid": "91df307bc2bb561b666867f674c66cd9", "score": "0.5324841", "text": "public function getGamesOwned($userId): GameList;", "title": "" }, { "docid": "4e5848fe8d5acf4d3488efba808137bd", "score": "0.53099215", "text": "function zg_get_clan_members($clan_id) {\n $member_ids = $rendered_users = [];\n\n $sql = 'SELECT users.id from users\n inner join clan_members on users.id = clan_members.fkey_users_id\n where clan_members.fkey_clans_id = %d;';\n $result = db_query($sql, $clan_id);\n\n while ($item = db_fetch_object($result)) {\n $member_ids[] = (int) $item->id;\n }\n firep($member_ids, 'clan member ids');\n\n $users = zg_fetch_users_by_ids($member_ids);\n\n foreach ($users as $user) {\n firep($user, 'clan member');\n $rendered_users[] = '<li class=\"overlay-list-item\">' . zg_render_user($user, 'clan') . '</li>';\n }\n\n if (count($rendered_users)) {\n $rendered_users[] = '</ul>';\n array_unshift($rendered_users, '<ul>');\n }\n\n return $rendered_users;\n}", "title": "" }, { "docid": "274ecf9f80ad9a7320c93b57a544fbdb", "score": "0.5304831", "text": "public function getList()\n {\n return $this->master->call('account/', 'GET');\n }", "title": "" }, { "docid": "f1d961323e0a2c47610c6740253ed46c", "score": "0.5299032", "text": "public function allUsersLike($match_login)\n\t{\n\t\t$db = $this->getAdapter();\n\t\t/* @var $db Zend_Db_Adapter_Pdo_Mysql */\n\t\t$where = $db->quoteInto(\"users_login like ?\", $match_login.\"%\");\n\t\t//$where .= $db->quoteInto(\" and users_login != ?\", $match_login);\n\t\treturn $this->fetchAll($where, \"users_login\");\n\t}", "title": "" }, { "docid": "73454672e2e409a06e2188eb6146441b", "score": "0.5298578", "text": "public function getMatching($match = null, $order = null, $limit = null, $offset = null)\n {\n $sql = 'SELECT * FROM ' . self::TABLE;\n $params = [];\n if (!is_null($match)) {\n $sql .= ' WHERE username LIKE :match OR birthdate LIKE :match OR email LIKE :match';\n $params = ['match' => \"%$match%\"];\n }\n if (!is_null($order)) {\n $sql .= \" ORDER BY $order\";\n }\n if (!empty($limit) && $limit > 0) {\n $sql .= \" LIMIT $limit\";\n }\n if (!empty($offset) && $offset > 0) {\n $sql .= \" OFFSET $offset\";\n }\n return $this->db->query(\"$sql;\", $params, '\\LRC\\User\\User');\n }", "title": "" }, { "docid": "ab30687981b4320bc90f9e8ec515c11d", "score": "0.52718776", "text": "public function get_match_byTouId($id) {\n\t$query = $this->_bdd->prepare(\"select * from APPARTENIR_TOURNOI where IdTournoi = :id\");\n\t$query->bindParam(\":id\", $id);\n\t$query->execute();\n\tif ( $query->rowCount() != 0 ) {\n\t $i = 0;\n\t $match = new Match($this->_bdd);\n\t $data = array();\n\t while ( $rep = $query->fetch() ) {\n\t\t$data[$i] = $match->search_byId($rep['IdMATCHS']);\n\t\t$i++;\n\t }\n\t return $data;\n\t} else {\n\t return null;\n\t}\n }", "title": "" }, { "docid": "1b9b08a97e3c4ed82b9a17b9cf8ba265", "score": "0.52665734", "text": "function getBet($matchID, $friendlist){\n global $sql;\n \n return $sql->doQuery(\n \"SELECT *\n FROM\n pronostics\n WHERE\n members_login = '\".mysqli_real_escape_string($sql->dbhandle, $this->login).\"' AND\n matches_id_match = '\".mysqli_real_escape_string($sql->dbhandle, $matchID).\"' AND\n friendlist_name = '\".mysqli_real_escape_string($sql->dbhandle, $friendlist).\"'\n \",\n true\n );\n }", "title": "" }, { "docid": "33079f1423fad9fb0a247c203faa03d6", "score": "0.5254872", "text": "public function getAccountsWithUsers();", "title": "" }, { "docid": "530fbd4791e92934bb7a2265742f4307", "score": "0.52533793", "text": "public function getAccounts( $user_id = '' )\r\n {\r\n $accounts = array();\r\n if ( !empty( $user_id ) ) {\r\n // get user by id\r\n $user = User::find( $user_id );\r\n if ( !$user ) {\r\n return array();\r\n }\r\n } else {\r\n // get loggedin user id\r\n $user = Auth::user();\r\n if ( $user ) {\r\n $user_id = $user->id;\r\n } else {\r\n // unauthenticated\r\n return array();\r\n }\r\n }\r\n\r\n // get attach_accounts from user\r\n $accounts = array();\r\n if ( isset( $user->attach_accounts ) ) {\r\n $attach_accounts = explode( ',', $user->attach_accounts );\r\n $accounts = array_merge( $accounts, $attach_accounts );\r\n }\r\n\r\n // add self account_id from user\r\n array_push( $accounts, $user->account_id );\r\n\r\n // get accounts\r\n $account_list = Account::whereIn( 'account_id', $accounts )->orderBy( 'accountName' )->get();\r\n return $account_list;\r\n }", "title": "" }, { "docid": "4239ef486d707f0ced493b4d12c3cb29", "score": "0.523446", "text": "public function get_team_owner_list($league_id = false) {\n \n\t\tif ($league_id === false)\n\t\t{\n\t\t\t$league_id = $this->league_id;\n\t\t}\n $team_owner_list = array();\n if (!$this->use_prefix) $this->db->dbprefix = '';\n if ($this->db->table_exists('teams')) {\n $this->db->select('teams.team_id, teams.name, teams.nickname, teams.logo_file, user_id')\n ->join($this->dbprefix.$this->table,$this->dbprefix.$this->table.'.team_id = teams.team_id', 'left outer')\n ->where('teams.league_id',$league_id)\n ->where('teams.allstar_team',0)\n ->where('teams.level',1);\n $query = $this->db->get('teams');\n\t\t\t//echo($this->db->last_query().\"<br />\");\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t$team_owner_list = $query->result();\n\t\t\t}\n }\n if (!$this->use_prefix) $this->db->dbprefix = $this->dbprefix;\n return $team_owner_list;\n\t}", "title": "" }, { "docid": "8a6f98a89be0888118072bfe52cb396e", "score": "0.52148163", "text": "public function get_match_by_id($id) {\n $query = $this->_bdd->prepare(\"select * from MATCHS where Id = :id\");\n $query->bindParam(\":id\", $id);\n $query->execute();\n $data_match = array();\n if ( $query->rowCount() == 1 ) {\n $data_match[0] = $query->fetch();\n $data_match[0]['Saison'] = $this->_bdd->query(\"select Saison from SAISONS where Id = \".$data_match[0]['IdSaison'])->fetch()['Saison'];\n }\n //$this->_fiche = $this->get_fiche_match($id);\n }", "title": "" }, { "docid": "73d704950f152f69fb7d7718963edc51", "score": "0.5193199", "text": "public static function getUsersFollowersById($id) {\n\t \t \n\t \tif ($id == NULL)\n\t \t\treturn NULL;\n\t \t \n\t \t$query = 'select user_id from '. self::DBTABLE . ' where id in ' .\n\t \t\t\t'(select distinct follower_id from ' . self::FOLLOWER_TABLE .\n\t \t\t\t\" where user_id=\" . $id . ')';\n\t \t \n\t \t#echo $query;\n\t \t \n\t \t$resultSet = DBAccess::runQuery($query);\n\t \tif ($resultSet->num_rows === 0) {\n\t \t\treturn NULL;\n\t \t}\n\t \t \n\t \t$followers = [];\n\t \tfor ($i = 0; $i < $resultSet->num_rows; $i++) {\n\t \t\t$row = mysqli_fetch_assoc($resultSet);\n\t \t\t$followers[] = $row['user_id'];\n\t \t}\n\t \t \n\t \treturn $followers;\n\t }", "title": "" }, { "docid": "98eb75cc9d69b907f93b6147d4666c4a", "score": "0.5190987", "text": "public function getMatches($user_id, $page_num=1){\n if (empty($user_id) || !is_numeric($user_id)){\n return array();\n }\n\n $conn = ConnectionManager::get('default');\n $sql = \"\nselect u.id,\n u.name,\n u.birth_date,\n u.zipcode,\n u.country_code,\n u.address,\n r.id file_id,\n r.file_name,\n u.month_branch_id,\n -- year score\n case yb.score\n -- if oppisite sign, incompatible when I'm younger and Yang\n when 0 then if (u.birth_date < me.birth_date, 0, 2+8)\n else yb.score+8\n end as year_score,\n -- month score\n case mb.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+6)\n else mb.score+6\n end as month_score,\n -- hour score\n case hb.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+4)\n else if (hb.score is null, 0, hb.score+4)\n end as hour_score,\n -- day score\n case db.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+2)\n else db.score+2\n end as day_score,\n case \n when me.hour_branch_id is null then 0\n else 1\n end has_hour\nfrom users u\ninner join users me on u.id != me.id and me.id = :user_id\n-- the matches are in the gender that I'm interested\ninner join user_into_genders ug on u.id = ug.user_id\n and ug.gender = me.gender\n-- I'm in the gender that my matches are interested\ninner join user_into_genders mg on u.gender = mg.gender\n and mg.user_id = me.id\n-- branch month rules\ninner join branch_rules mb on u.month_branch_id = mb.match_branch_id\n and mb.my_branch_id = me.month_branch_id\n-- branch year rules\ninner join branch_rules yb on u.year_branch_id = yb.match_branch_id\n and yb.my_branch_id = me.year_branch_id\n-- branch hour rules\nleft outer join branch_rules hb on u.hour_branch_id = hb.match_branch_id\n and me.hour_branch_id = hb.my_branch_id\n-- branch day rules\ninner join branch_rules db on u.day_branch_id = db.match_branch_id\n and db.my_branch_id = me.day_branch_id\n-- get images\nleft outer join user_images r on u.id = r.user_id and r.is_default = '1'\nwhere \n-- I'm in the age that interests the matches\nyear(curdate())-year(me.birth_date) between u.match_min_age and u.match_max_age\n-- the matches are in the age that interests me\nand year(curdate()) - year(u.birth_date) between me.match_min_age and me.match_max_age \n-- I'm not blocked by the matches\nand not exists (\n select 'x'\n from user_blocks\n where u.id = user_blocks.user_id\n and me.id = user_blocks.blocked_user_id\n)\n-- my matches are not blocked by me\nand not exists (\n select 'x'\n from user_blocks\n where me.id = user_blocks.user_id\n and u.id = user_blocks.blocked_user_id)\n-- the matches are not too far\nand (me.distance = 9999 \n or ( 3959 * acos( cos( radians(me.latitude) ) * cos( radians(u.latitude) ) \n * cos( radians(u.longitude) - radians(me.longitude)) + sin(radians(me.latitude)) \n * sin( radians(u.latitude)))) <= me.distance)\n-- the matches are still active\nand u.status = 'Active'\";\n\n $sql = \"select mtch.*,\n mtch.month_score + mtch.year_score + mtch.hour_score + mtch.day_score as total_score\nfrom ($sql) as mtch\nwhere ((mtch.month_score + mtch.year_score + mtch.hour_score + mtch.day_score) >= 24 and has_hour = 1) \n or ((mtch.month_score + mtch.year_score + mtch.hour_score + mtch.day_score) >= 18 and has_hour = 0)\norder by total_score desc\";\n\n // displaying 12 matches at a time\n $skip = 0;\n if (is_numeric($page_num) && $page_num > 1){\n $skip = ($page_num-1) * self::LIMIT;\n }\n $sql .= \"\nlimit \" . self::LIMIT . \" offset $skip\";\n \n $bind = array(':user_id' => $user_id);\n $ret = $conn->execute($sql, $bind)->fetchAll('assoc');\n return $ret;\n \n }", "title": "" }, { "docid": "c11875a3cefaf25554ec3c9a4a2ee294", "score": "0.51833737", "text": "public function getList()\n\t{\n\t\t/* @var $repo \\Application\\Entity\\Repository\\AccountRepository */\n\t\t$repo = $this->em->getRepository('Application\\Entity\\Account');\n\n\t\t$user = $this->identity();\n\t\tif ($user) {\n\n\t\t\t// Active or all lists\n \t$lists = $repo->findForUser($user);\n\n\t\t\t$accounts = array_map(function($account) {\n\t\t\t\t/* @var $list \\Application\\Entity\\Account */\n\t\t\t\treturn array(\n\t\t\t\t\t\"id\"\t=> $account->getId(),\n\t\t\t\t\t\"name\" \t=> $account->getName(),\n\t\t\t\t);\n\t\t\t}, $lists);\n\n\n\t\t\treturn new JsonModel(array('account' => $accounts));\n\t\t}\n\t\telse {\n\t\t\treturn $this->invalidAPIKeyResponse();\n\t\t}\n\t}", "title": "" }, { "docid": "64341342f8dfad701bf0db29648f468d", "score": "0.51807946", "text": "private function getMatchArray($threshold){\n\n\t\t// Get the user's match preferences.\n\t\t$user1ID = self::getID();\n\t\t$user1Preferences = self::getPreferences($user1ID);\n\t\t\n\t\t// Find the highest possible score so that matches are displayed as percentages.\n\t\t$maxScore = ($user1Preferences->location + $user1Preferences->movies + $user1Preferences->genre);\n\t\t$scores = array();\n\t\t\n\t\t$userList = self::getOthers();\n\t\t\n\t\t// Get the set of already matched users (so they are not included in matchmaking).\n\t\t$self = User::find($user1ID);\n\t\t$friends = $self->getFriends();\n\t\t\n\t\t\n\t\t// For each user...\n\t\tforeach($userList as $user2ID){\n\t\t\t\n\t\t\t// That is not already matched...\n\t\t\tif(! $friends->contains('id', $user2ID)){\n\t\t\t\t\n\t\t\t\t// Get the user's rating.\n\t\t\t\t$rating = self::getRating($user2ID);\n\t\t\n\t\t\t\t// If they meet the threshold...\n\t\t\t\tif($rating >= $threshold){\n\t\t\t\t\t\n\t\t\t\t\t// Get their similarity to the logged in user.\n\t\t\t\t\t$similarity = self::findSimilarity($user1ID, $user2ID);\n\t\t\t\t\t\n\t\t\t\t\t// Turn the similarity into a percentage (for display purposes)\n\t\t\t\t\t$percentage = $similarity / $maxScore;\n\t\t\t\t\t$percentage = round((float)$percentage * 100) . '%';\n\t\t\t\t\t\n\t\t\t\t\t// Get their name (for display purposes).\n\t\t\t\t\t$user2Name = self::getName($user2ID);\n\t\t\t\t\t\t\n\t\t\t\t\t// Add them to the array.\n\t\t\t\t\t$tempArray = array();\n\t\t\t\t\tarray_push($tempArray, $user2Name, $percentage, $user2ID, $similarity, $rating);\n\t\t\t\t\tarray_push($scores, $tempArray);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// Sort the array of matches.\n\t\tusort($scores, \"self::callbackSort\");\n\t\t\t\n\t\t// Return the array of matches.\n\t\treturn $scores;\n\t\t\t\n\t}", "title": "" }, { "docid": "2882ba525ad9873fb3a1d1bb711fb9a9", "score": "0.51773506", "text": "public function getMatchesIds()\n {\n return $this->matchesIds;\n }", "title": "" }, { "docid": "c42c6c262186907f6d80e13c1e2d3d96", "score": "0.5176405", "text": "function fetchPermissionUsers($permission_id)\r\n\t{\r\n\t\tglobal $mysqli,$db_table_prefix; \r\n\t\t$stmt = $mysqli->prepare(\"SELECT id, user_id\r\n\t\t\tFROM \".$db_table_prefix.\"user_permission_matches\r\n\t\t\tWHERE permission_id = ?\r\n\t\t\t\");\r\n\t\t$stmt->bind_param(\"i\", $permission_id);\t\r\n\t\t$stmt->execute();\r\n\t\t$stmt->bind_result($id, $user);\r\n\t\twhile ($stmt->fetch()){\r\n\t\t\t$row[$user] = array('id' => $id, 'user_id' => $user);\r\n\t\t}\r\n\t\t$stmt->close();\r\n\t\tif (isset($row)){\r\n\t\t\treturn ($row);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0bc06f819eae3c11ead8442eda03aa5f", "score": "0.51716596", "text": "public static function GetGamesForMatch($matchId) {\n $games = array();\n\n try {\n $db = new DB();\n $con = $db->GetConnection();\n\n $stmt = $con->prepare(\"SELECT * FROM game WHERE matchId=:matchId\");\n $stmt->bindValue( ':matchId', $matchId, PDO::PARAM_INT);\n $stmt->execute();\n\n while($row = $stmt->fetch()) {\n array_push($games, Game::PopulateGame($row));\n }\n\n return $games;\n }catch(Exception $ex) {\n return \"Unable to retrieve matches: \".$ex;\n }\n }", "title": "" }, { "docid": "2fda2fa59814ce260ac3baa48f8877ad", "score": "0.51638716", "text": "public function getToReview($id)\n {\n $match = $this->matchRepo->find($id);\n \n $data = new \\stdClass;\n\n //get my join\n $join = $match->joinings()->where([\n ['status', 'active'],\n ['player_id', Auth::id()]\n ])->first();\n \n //get opponent team\n $team = $match->team_1 == $join->team_id ? $match->team2 : $match->team1;\n \n $data->team_id = $team->id;\n $data->team_name = $team->name;\n $data->team_avatar = $team->avatar;\n\n $joinings = $match->joinings()->where('team_id', $join->team_id)->get();\n //get member\n $data->members = $joinings->map(function($join){\n $obj = new \\stdClass;\n $user = $join->user;\n $obj->id = $user->id;\n $obj->avatar = $user->info->avatar;\n $obj->name = $user->name;\n $obj->join_id = $join->id;\n return $obj;\n });\n\n //return\n return $data;\n }", "title": "" }, { "docid": "2e8fecb22168b3c4f1bcd12420c06b80", "score": "0.5160473", "text": "public static function getUserTeams($id)\n {\n $teams_member = \\frontend\\models\\TeamMember::find()->where(['user_id' => $id])->all();\n // for each relation...\n foreach ($teams_member as $team_member) {\n // ...store team name in an array\n $user_team[] = \\frontend\\models\\Team::find()->where(['id' => $team_member['team_id']])->one();\n }\n\n return $user_team;\n }", "title": "" }, { "docid": "ca5f6dd1764ddf9087c49f982044da94", "score": "0.51401395", "text": "public function findScoreMember($id)\n {\n $resultat = $this->db->query(\"SELECT u.id, st.id, st.date, st.score, st.id_user FROM users u INNER JOIN scoreTable st ON u.id = st.id_user WHERE u.id=$id\");\n return $resultat->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "dbedc463d42dc58810e15cd17eee0b58", "score": "0.5129106", "text": "function getUserList($roleID) {\n $CI = & get_instance();\n $table3 = LOGIN . ' as l';\n $where3 = array(\"l.role_id \" => $roleID, \"l.is_delete\" => \"0\");\n $fields3 = array(\"l.login_id\");\n $getCountofSupportuser1 = $CI->common_model->get_records($table3, $fields3, '', '', '', '', '', '', '', '', '', $where3);\n\n return $getCountofSupportuser1;\n}", "title": "" }, { "docid": "dbedc463d42dc58810e15cd17eee0b58", "score": "0.5129106", "text": "function getUserList($roleID) {\n $CI = & get_instance();\n $table3 = LOGIN . ' as l';\n $where3 = array(\"l.role_id \" => $roleID, \"l.is_delete\" => \"0\");\n $fields3 = array(\"l.login_id\");\n $getCountofSupportuser1 = $CI->common_model->get_records($table3, $fields3, '', '', '', '', '', '', '', '', '', $where3);\n\n return $getCountofSupportuser1;\n}", "title": "" }, { "docid": "c36d32d19b7958c34ef3b7237d862c8b", "score": "0.5127438", "text": "public static function getUsersFollowingById($id) {\n\t \t\n\t \tif ($id == NULL)\n\t \t\treturn NULL;\n\t \t\n\t \t$query = 'select user_id from '. self::DBTABLE . ' where id in ' .\n\t \t\t'(select distinct user_id from ' . self::FOLLOWER_TABLE .\n\t \t\t\" where follower_id=\" . $id . ')';\n\t \t\n\t \t#echo $query;\n\t \t\n\t \t$resultSet = DBAccess::runQuery($query);\n\t \tif ($resultSet->num_rows === 0) {\n\t \t\treturn NULL;\n\t \t}\n\t \t\n\t \t$following = [];\n\t \tfor ($i = 0; $i < $resultSet->num_rows; $i++) {\n\t \t\t$row = mysqli_fetch_assoc($resultSet);\n\t \t\t$following[] = $row['user_id'];\n\t \t}\n\t \t\n\t \treturn $following;\n\t }", "title": "" }, { "docid": "52b192d13f0227fae38ea1a9658ff95e", "score": "0.51180035", "text": "function quiz_get_participants($quizid) {\n/// (users with records in quiz_attempts and quiz_question_versions)\n\n global $CFG;\n\n //Get users from attempts\n $us_attempts = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_attempts a\n WHERE a.quiz = '$quizid' and\n u.id = a.userid\");\n\n //Get users from question_versions\n $us_versions = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_question_versions v\n WHERE v.quiz = '$quizid' and\n u.id = v.userid\");\n\n //Add us_versions to us_attempts\n if ($us_versions) {\n foreach ($us_versions as $us_version) {\n $us_attempts[$us_version->id] = $us_version;\n }\n }\n //Return us_attempts array (it contains an array of unique users)\n return ($us_attempts);\n\n}", "title": "" }, { "docid": "bfa71c42d951942c2bdc8baf12f7f3fe", "score": "0.5110793", "text": "public function getMatchById($id)\n {\n $match = parent::find($id);\n //$match = parent::where('id_match',$id)->get();\n if($match){\n $match->board = $this->changesBoardToArray($match->board);\n return $match;\n }\n return null;\n }", "title": "" }, { "docid": "4930cd932eb0d55e22a528ba88f510dc", "score": "0.5109695", "text": "public function get_all_participants($id){\n\n\t\t$event = Event::with('users')->find($id);\n\t\treturn $event->users;\n\n\t}", "title": "" }, { "docid": "c11240a8f2b98454350e3d28fe8e567d", "score": "0.51001686", "text": "public function getUsersAssigned($id) {\n $data = Account::where(\"user_id\", 2)->get();\n return $data;\n }", "title": "" }, { "docid": "58b587d56a28de3874bdb1c7d9b0dc5a", "score": "0.5093567", "text": "function cognitivefactory_get_participants($cognitivefactoryid) {\n global $CFG;\n\n // Get all participants.\n $sql = \"\n SELECT DISTINCT \n u.*\n FROM \n {user} u,\n {cognitivefactory_responses} c\n WHERE \n c.cognitivefactoryid = {$cognitivefactoryid} AND\n u.id = c.userid\n \";\n $participants = $DB->get_records_sql($sql);\n\n // Return students array (it contains an array of unique users).\n return ($participants);\n}", "title": "" }, { "docid": "3dbbcc75d0d8942e088e24423941ad37", "score": "0.50925606", "text": "protected function playerList($id)\n {\n $players = Team::where('id', $id)->first();\n return $players ?? '';\n }", "title": "" }, { "docid": "23f0924bfa5468201263daff80dba174", "score": "0.5062117", "text": "function getMatchesByRound($roundId) {\r\n\t\t$fields = array();\r\n\t\t$options = array();\r\n\t $fields['MATCH.ROUND'][OP_EQ_INT] = $roundId;\r\n\t $fields['MATCH.COMPETITION'][OP_EQ_INT] = $this->uid;\r\n//\t $options['debug'] = 1;\r\n\t\t$service = tx_cfcleaguefe_util_ServiceRegistry::getMatchService();\r\n \t$matches = $service->search($fields, $options);\r\n//t3lib_div::debug($roundId, 'tx_cfcleaguefe_models_competition'); // TODO: Remove me!\r\n \treturn $matches;\r\n }", "title": "" }, { "docid": "51eaf30a534bb02d6d847306d07c46b2", "score": "0.50608444", "text": "public static function getSlots($match_id)\r\n {\r\n if (null != $match_id) {\r\n $slots = DB::select(DB::raw(\"SELECT\r\n s.match_id,\r\n s.hero_id,\r\n s.player_slot,\r\n u.personaname AS nickname,\r\n u.steamid,\r\n u.account_id,\r\n m.duration\r\n FROM `slots` AS `s`\r\n LEFT JOIN users AS u ON u.account_id = s.account_id\r\n LEFT JOIN matches AS m ON m.match_id = s.match_id\r\n WHERE s.match_id = \" . $match_id));\r\n\r\n return $slots;\r\n } else {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "3550bf3f37a0e87c31b71843d9a3be73", "score": "0.50593406", "text": "public function getMatchScore($user_id, $match_user_id){\n if (empty($user_id) || !is_numeric($user_id) ||\n empty($match_user_id) || !is_numeric($match_user_id)){\n return array();\n }\n\n $conn = ConnectionManager::get('default');\n $sql = \"\nselect u.id,\n -- year score\n case yb.score\n -- if oppisite sign, incompatible when I'm younger and Yang\n when 0 then if (u.birth_date < me.birth_date, 0, 2+8)\n else yb.score+8\n end as year_score,\n yb.description year_text,\n -- month score\n case mb.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+6)\n else mb.score+6\n end as month_score,\n mb.description month_text,\n -- hour score\n case hb.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+4)\n else if (hb.score is null, 0, hb.score+4)\n end as hour_score,\n hb.description hour_text,\n -- day score\n case db.score\n when 0 then if (u.birth_date < me.birth_date, 0, 2+2)\n else db.score+2\n end as day_score,\n db.description day_text,\n case \n when me.hour_branch_id is null then 0\n else 1\n end has_hour\nfrom users u\ninner join users me on me.id = :user_id\n-- branch month rules\ninner join branch_rules mb on u.month_branch_id = mb.match_branch_id\n and mb.my_branch_id = me.month_branch_id\n-- branch year rules\ninner join branch_rules yb on u.year_branch_id = yb.match_branch_id\n and yb.my_branch_id = me.year_branch_id\n-- branch hour rules\nleft outer join branch_rules hb on u.hour_branch_id = hb.match_branch_id\n and me.hour_branch_id = hb.my_branch_id\n-- branch day rules\ninner join branch_rules db on u.day_branch_id = db.match_branch_id\n and db.my_branch_id = me.day_branch_id\nwhere \nu.id = :match_user_id\nand u.status = 'Active'\";\n\n $sql = \"select mtch.*,\n mtch.month_score + mtch.year_score + mtch.hour_score + mtch.day_score as total_score\nfrom ($sql) as mtch\";\n\n $bind = array(':user_id' => $user_id,\n ':match_user_id' => $match_user_id);\n $ret = $conn->execute($sql, $bind)->fetch('assoc');\n return $ret;\n }", "title": "" }, { "docid": "e2d837c22f5288c530bc79ce97925fb9", "score": "0.50538754", "text": "public function getProjectUsersList($id)\n\t{\n\t\t$userList = ProjectUsers::where('project_id',$id)->lists('user_id');\n\t\t$users = User::whereIn('id',$userList)->get(array('first_name','last_name','email','id'))->toJson();\n\t\treturn $users;\n\n\t}", "title": "" }, { "docid": "bd1f1661df8d56b09fd8251788977140", "score": "0.50436133", "text": "public function GetListOfCameraUser()\n {\n $resultat = ($_SESSION['Pdo']->Select(\"*\", \"camera\", 'IdUser= '.$this->idUser.'' ,\"\"));\n return $resultat;\n }", "title": "" }, { "docid": "6301f491db69fa1e255785462ae3cba4", "score": "0.5032651", "text": "function get_team_members($tl_id) {\n if (!check_supervisor($tl_id))\n return FALSE;\n else {\n $sql = \"SELECT user_id,username,fname,lname FROM users WHERE user_id IN (SELECT user_id FROM teams WHERE tl_id=\".$tl_id.\")\";\n //echo $sql;\n $result = $_SESSION['dbconn']->query($sql);\n return $result;\n }\n}", "title": "" }, { "docid": "2f3414f77a107f098dc478e5bcecce96", "score": "0.50290877", "text": "public function getFriendList($username);", "title": "" }, { "docid": "8548958b68b088a8732dfa852300c1c4", "score": "0.5028514", "text": "public static function getReferredUserList() {\n $userModel = new User();\n $data = array();\n $search = '';\n $input = Input::all();\n if (isset($input['search']['value'])) {\n $search = $input['search']['value'];\n }\n if (!$search) {\n $results = $userModel->getReferredUserListWeb(array('limit' => $input['length'], 'offset' => $input['start']));\n } else {\n $results = $userModel->getReferredUserListWeb(array('q' => $search, 'limit' => $input['length'], 'offset' => $input['start']));\n }\n\n\n foreach ($results['result'] as $result) {\n $cashback = 0;\n if(!empty($result->referred_user_id)) {\n $cashback = $result->actual_cost + $result->travel_cost;\n $cashback = ($cashback * $result->commission_percent) / 100;\n }\n $data[] = array(\n $result->id,\n $result->email,\n trim(ucwords($result->first_name).' '.ucwords($result->last_name)),\n $result->user_type,\n ucwords($result->referred_by_name),\n $result->bank_username,\n $result->bank_bsb_no,\n $result->bank_acc_no,\n '$'.$cashback\n );\n\n }\n\n return array('data' => $data, 'recordsTotal' => $results['count'], \"recordsFiltered\" => $results['count']);\n }", "title": "" }, { "docid": "102c460c4597898ae7717f5f03088a81", "score": "0.5022369", "text": "public function lists(): UserResponse;", "title": "" }, { "docid": "92aca316ceabce8291e739331e134d6c", "score": "0.50198257", "text": "function twitter_lists_user_memberships($user) {\r\n\treturn lists_paginated_process(DABR_API.\"{$user}/lists/memberships.xml\");\r\n}", "title": "" }, { "docid": "8e9e5ab7e9f33f98051d793609f0e64f", "score": "0.50023746", "text": "public function getLeadLists($id)\n {\n return $this->makeRequest('leads/'.$id.'/lists');\n }", "title": "" }, { "docid": "becc4e7b51d5c35c011254a452f05edc", "score": "0.4985718", "text": "function bbp_ab_get_users() {\n $roles = array( 'administrator', 'bbp_moderator' );\n $all_users = array();\n\n foreach ($roles as $role) {\n $users = get_users( array( 'role' => $role, 'fields' => array('ID', 'user_login' ) ) );\n $all_users = array_merge( $users, $all_users );\n }\n\n return array_unique( wp_list_pluck( $all_users, 'ID' ) );\n}", "title": "" }, { "docid": "4e754d9882ed1a659ede4c8f3fdaf1cb", "score": "0.49854094", "text": "public function getResultByMatch($matchId) {\n $resultArray = array();\n try {\n $q = $this->db->prepare('SELECT * FROM `results` inner join tiers on fkTier = pkTier WHERE `fkMatch` = :idMatch ');\n $q->bindValue(':idMatch', $matchId, PDO::PARAM_STR);\n $this->db->beginTransaction();\n $q->execute();\n while ($data = $q->fetch(PDO::FETCH_ASSOC)) {\n $resultArray[] = $data;\n }\n $this->db->commit();\n } catch (PDOException $e) {\n $this->db->rollback();\n }\n return $resultArray;\n }", "title": "" }, { "docid": "9023501aa8c209afe58fde22ef263514", "score": "0.49843282", "text": "public function getProjectTeamMemberIds($id)\n\t{\n\t\t$sql = $this->db->select()->from(array('pt'=> 'project_teams'))->columns(array('user_id'))->where(array('project_id' => $id));\n\t\t$members = $this->getRows($sql);\n\t\t$_members = array();\n\t\tforeach($members AS $member)\n\t\t{\n\t\t\t$_members[] = $member['user_id'];\n\t\t}\n\t\treturn $_members;\n\t}", "title": "" }, { "docid": "d54ec19c0d558aaff89b9acd20071d68", "score": "0.49816543", "text": "public function allLeader($group_id)\n\t{\n\t\t//$db = $this->getAdapter();\n\t\t/* @var $db Zend_Db_Adapter_Pdo_Mysql */\n\t\t//$where = $db->quoteInto(\"users_login like ?\", $match_login.\"%\");\n\t\t//$where .= $db->quoteInto(\" and users_login != ?\", $match_login); where users_id groups_id is_leader\n\t\t//return $this->fetchAll($where, \"users_login\");\n\n\n\t\t// selection tool\n\t\t$select = $this->_db->select();\n\n\t\t// the FROM clause\n\t\t$select->from($this->_name, $this->_getCols());\n\n\t\t// the JOIN clause\n\t\t$users = self::$prefix . \"users\";\n\t\t$users_to_groups = self::$prefix . \"users_to_groups\";\n\t\t$select->joinLeft($users_to_groups, \"$users_to_groups.users_id = $users.users_id\", array());\n\t\t//$select->joinLeft($users, \"$users.users_id = $users_to_groups.users_id\");\n\n\t\t$select->where(\"$users_to_groups.is_leader = 1 and $users_to_groups.groups_id = ?\", $group_id);\n\n\t\t//usvn_users_to_groups.is_leader\n // return the results\n $stmt = $this->_db->query($select);\n $data = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);\n\n\t\t$data = array(\n\t\t\t'table' => $this,\n\t\t\t'data' => $data,\n\t\t\t'rowClass' => $this->_rowClass,\n\t\t\t'stored' => true\n\t\t);\n\n\t\tZend_Loader::loadClass($this->_rowsetClass);\n\t\treturn new $this->_rowsetClass($data);\n\t}", "title": "" }, { "docid": "73f862ae69f8eafe83b2d63ff0a6c60f", "score": "0.4981597", "text": "public function getCampaignMembers($campaign_id) {\n $mysqli = $this->connect();\n\n $members = array();\n\n $query = \"SELECT sheet FROM members WHERE campaign=?\";\n $query = $mysqli->real_escape_string($query);\n\n $stmt = $mysqli->stmt_init();\n\n if(!$stmt->prepare($query)) {\n\tprint(\"Failed to prepare statement!\");\n } else {\n\t$stmt->bind_param('i', $campaign_id);\n\t$stmt->execute();\n\t$stmt->bind_result($sheet_id);\n\n\twhile($stmt->fetch()) {\n\t $members[] = $sheet_id;\n\t}\n\t\n\t$stmt->close();\n }\n\n $mysqli->close();\n return $members;\n }", "title": "" }, { "docid": "1905727d556fdce56f00e8ac7ee8d3ea", "score": "0.4978243", "text": "function userList() {\n\t\t$link = Db::link();\n\t\t$list = array();\n\t\t\t\n\t\t$sql = 'SELECT user_id, user_name, user_rank, user_mail, v.nb,\n\t\t user_language, user_tokenid, user_strongauth\n\t\t FROM uservca\n\t\t LEFT JOIN (SELECT vps_owner, count(vps_owner) as nb\n\t\t FROM vps GROUP BY vps_owner) v\n\t\t ON v.vps_owner=uservca.user_id';\n\t\t$res = $link->query($sql);\n\t\twhile($do = $res->fetch(PDO::FETCH_OBJ)) {\n\t\t\tif(empty($do->nb)) {\n\t\t\t\t$do->nb = 0;\n\t\t\t}\n\t\t\t$list[$do->user_id] = array(\n\t\t\t\t\t'user_id' => $do->user_id,\n\t\t\t\t\t'user_name' => $do->user_name,\n\t\t\t\t\t'user_rank' => $do->user_rank,\n\t\t\t\t\t'user_mail' => $do->user_mail,\n\t\t\t\t\t'user_language' => $do->user_language,\n\t\t\t\t\t'user_tokenid' => $do->user_tokenid,\n\t\t\t\t\t'user_strongauth'=> $do->user_strongauth,\n\t\t\t\t\t'nb_vps' => $do->nb\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "6198e40c6375dd93d4623cad4709f63b", "score": "0.49735552", "text": "function getAllMatchesToBet($friendlist){\n // Get sql connexion\n global $sql;\n // Get all not played matches\n $req = \"SELECT * FROM matches\n WHERE\n status = '\"._PLANNED.\"'\n ORDER BY date\n \";\n $res = $sql->doQuery($req);\n $matches = $sql->fetchAssoc($res);\n \n // Now for each match, check if the user has already done a bet\n $return = array();\n foreach($matches as $match){\n $req = \"SELECT * FROM pronostics\n WHERE\n members_login = '\".mysqli_real_escape_string($sql->dbhandle, $this->login).\"' AND\n matches_id_match = '\".mysqli_real_escape_string($sql->dbhandle, $match['id_match']).\"' AND\n friendlist_name = '\".mysqli_real_escape_string($sql->dbhandle, $friendlist).\"'\n \";\n $bet = $sql->doQuery($req, true);\n // If no bet is found for this match, return it\n if (!$bet){\n $return[] = $match;\n }\n }\n // Return the matches\n return $return;\n }", "title": "" }, { "docid": "4022fccea22d088dab588f6379f0048b", "score": "0.49713057", "text": "static function getAvailableUserList(&$db, $idGroup) {\n\t\t\n\t\t$db->Execute(\"SELECT DISTINCT u.id FROM \".DB_PREFIX.\"contact u\n\t\t\tLEFT JOIN \".DB_PREFIX.\"contact_to_object cto ON (u.id=cto.id_contact AND objectType='company')\n\t\t\tLEFT JOIN \".DB_PREFIX.\"group_entity ge ON (ge.id_entity=cto.id_object)\n\t\t\");\n\t\t\n\t\t$Tab=array();\n\t\twhile($db->Get_line()) {\n\t\t\t$Tab[] = $db->Get_field('id');\n\t\t}\n\t\t\n\t\treturn $Tab;\n\t\t\n\t}", "title": "" }, { "docid": "ef742bf93e1c0e9b13bfc97c4a0b092c", "score": "0.49712873", "text": "public function match($id)\n {\n return response()->json(Match::findOrFail($id));\n }", "title": "" }, { "docid": "e508eecc9caad206709d3419b23354a0", "score": "0.49705768", "text": "private function return_tribe_users($tribe_id){\n\t\t\t$users = array();\n\t\t\t$query = \"SELECT * FROM tribe_user INNER JOIN user ON tribe_user.uid=user.uid WHERE tribe_user.tid=\".$tribe_id;\n\n\t\t\t$result = mysqli_query($this->db->connection,$query);\n\n\t\t\tif($result->num_rows > 0){\n\t\t\t\t while($row = $result->fetch_assoc()){\n\t\t\t\t \tarray_push($users,$row);\n\t\t\t\t }\n\n\t\t\t\t return $users;\n\t\t\t}else{\n\t\t\t\techo \"There are no users in this Tribe.\\n\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6308907da6d5e1c8fa63ec17846fd342", "score": "0.4966573", "text": "public function findByRoleID($id)\n {\n $usersWithRepo = [];\n $users = $this->model->all();\n\n foreach ($users as $user) {\n if ($user->roles->first()->id == $id) {\n $usersWithRepo[] = $user;\n }\n }\n\n return $usersWithRepo;\n }", "title": "" }, { "docid": "abc10c12222d6b46c98cc46ad982c5b0", "score": "0.49637234", "text": "function getListOfFarmers() {\n\t\t$q = Doctrine_Query::create()->from('UserAccount u')->where(\"u.farmgroupid = '\".$this->getID().\"'\")->andwhere(\"u.type = '2'\")->orderby(\"u.firstname ASC\");\n\t\t$result = $q->execute();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5f1f70f44659b204e29d962464ffd3cf", "score": "0.49619317", "text": "function getTeamMembers($a_team_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$ids = array();\n\t\t\n\t\t$sql = \"SELECT user_id\".\n\t\t\t\" FROM il_exc_team\".\n\t\t\t\" WHERE ass_id = \".$ilDB->quote($this->getId(), \"integer\").\n\t\t\t\" AND id = \".$ilDB->quote($a_team_id, \"integer\");\n\t\t$set = $ilDB->query($sql);\n\t\twhile($row = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\t$ids[] = $row[\"user_id\"];\n\t\t}\n\t\t\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "47def9b3c7e9c05d83e702caf9adcc5e", "score": "0.49595383", "text": "public function listTeams($id)\n {\n return $this->find($id)->teams()->pluck('id');\n }", "title": "" }, { "docid": "8b6c7867ab6bb68f283b0429373886bc", "score": "0.495783", "text": "public function users($id, Request $request)\n {\n $users = Team::findOrFail($id)->users();\n return ApiHelper::parseMultiple($users, ['name', 'last_name'], $request->all());\n }", "title": "" }, { "docid": "8798562c2b0007744ba5648d4ef70307", "score": "0.4955566", "text": "function twii_userList(){\n\t$users = array();\n\t\n\t/**\n\tTested example:\n\tmysql> select id, username from twii_user order by username;\n\t+----+----------+\n\t| id | username |\n\t+----+----------+\n\t| 1 | user1 |\n\t| 2 | user2 |\n\t| 3 | user3 |\n\t| 4 | user4 |\n\t| 5 | user5 |\n\t+----+----------+\n\t5 rows in set (0.00 sec)\n\t*/\n\t$sql = \"SELECT id, username \n\t\t\tFROM twii_user \n\t\t\tORDER BY username\";\n\t$result = mysql_query($sql);\n\n\twhile ($data = mysql_fetch_object($result)){\n\t\t$users[$data->id] = $data->username;\n\t}\n\treturn $users;\n}", "title": "" }, { "docid": "16e2e4c6b4e39cb0a22ee929f47cf862", "score": "0.49492314", "text": "function allMatches($con) {\n $conn = Database::getInstance()->getConnection();\n $stmt = $conn->prepare(\"select id, names, matchlocation,refs, matchdate from tbl_matches\");\n $stmt->execute();\n return $stmt->fetchAll();\n}", "title": "" }, { "docid": "6a8908031f4ac0b4f2af22993db2b177", "score": "0.4947154", "text": "function getRegisteredUserForBankLoanListById($user_id=NULL)\n {\n\n $sql = \"SELECT ur.*, ltrans.*,ltr.*,lsm.loan_stage_name,ltrans.loan_id AS loan_transaction_id,\n ltm.description AS loan_type_name,ur.`created_at` AS createdDate,ltm1.`description` AS loan_sub_type_name,\n bm.bank_name AS BankName\n FROM `tbl_user_refrence` ur \n INNER JOIN `tbl_loan_transaction` ltrans\n ON ur.`user_ref_id` = ltrans.`user_ref_id`\n LEFT JOIN `tbl_bank_master` bm\n ON ltrans.`bank_id` = bm.`bank_id`\n LEFT JOIN `tbl_loan_type_master` ltm\n ON ltm.loan_type_id = ltrans.`loan_type`\n LEFT JOIN tbl_loan_type_master ltm1\n ON ltm1.loan_type_id = ltrans.`loan_sub_type`\n LEFT JOIN `tbl_loan_trans_reference` ltr\n ON ltrans.`loan_id` = ltr.`loan_id`\n LEFT JOIN `tbl_loan_stage_master` lsm\n ON lsm.`loan_stage_id` = ltr.`loan_stage_id` WHERE ur.user_id = \".$user_id;\n $result\t= Yii::app()->db->createCommand($sql)->queryAll();\n return $result;\n\n }", "title": "" }, { "docid": "303e89177f59af917fc7e6b3301c3d3e", "score": "0.49466035", "text": "public function allUsersInGroup($groups_id)\n\t{\n//\t\t$db = $this->getAdapter();\n\t\t/* @var $db Zend_Db_Adapter_Pdo_Mysql */\n//\t\t$where = $db->quoteInto(\"users_login like ? and \", $match_login.\"%\");\n\t\t//$where .= $db->quoteInto(\" and users_login != ?\", $match_login);\n//\t\treturn $this->fetchAll($where, \"users_login\");\n\n\t\t// selection tool\n\t\t$select = $this->_db->select();\n\n\t\t// the FROM clause\n\t\t$select->from($this->_name, $this->_getCols());\n\n\t\t// the JOIN clause\n\t\t$users = self::$prefix . \"users\";\n\t\t$users_to_groups = self::$prefix . \"users_to_groups\";\n\t\t$select->joinLeft($users_to_groups, \"$users_to_groups.users_id = $users.users_id\", array());\n\t\t//$select->joinLeft($users, \"$users.users_id = $users_to_groups.users_id\");\n\n\t\t$select->where(\"$users_to_groups.groups_id = ?\", $groups_id);\n\n\t\t//usvn_users_to_groups.is_leader\n // return the results\n $stmt = $this->_db->query($select);\n $data = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);\n\n\t\t$data = array(\n\t\t\t'table' => $this,\n\t\t\t'data' => $data,\n\t\t\t'rowClass' => $this->_rowClass,\n\t\t\t'stored' => true\n\t\t);\n\n\t\tZend_Loader::loadClass($this->_rowsetClass);\n\t\treturn new $this->_rowsetClass($data);\n\t}", "title": "" }, { "docid": "8d73aeb6f462579557e54771d76a6062", "score": "0.4944474", "text": "public function getMatchesByTeam($team_id)\n { \n $result = $this->conn->query(\"SELECT qn_match.id as match_id, qn_match.id_team_home, qn_match.id_team_visit, qn_match.name_team_home, qn_match.name_team_visit, qn_match.fixture, qn_match.match_date, qn_result.id as result_id, qn_result.score_home, qn_result.score_visit FROM qn_match LEFT JOIN qn_result ON qn_match.id=qn_result.match_id WHERE qn_match.id_team_home=$team_id OR qn_match.id_team_visit=$team_id ORDER BY fixture ASC\") or die($this->conn->error);\n \n $rows = array();\n \n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n \n return $rows;\n }", "title": "" }, { "docid": "8b0fa3e55dc0fcb2c3cdf62aa7cd8907", "score": "0.49437553", "text": "public function list_account() {\n \n $sql = \"SELECT * FROM \" . $this->tblAccount;\n \n //execute the query\n $query = $this->dbConnection->query($sql);\n\n // if the query failed, return false. \n if (!$query) {\n return false;\n }\n //if the query succeeded, but no accounts were found.\n if ($query->num_rows == 0) {\n return 0;\n }\n //search succeeded, and found at least 1 account\n //create an array to store all the returned accounts\n $accounts = array();\n \n //loop through all rows in the returned recordsets\n while ($obj = $query->fetch_object()) {\n $account = new Account($obj->account_id, $obj->email, $obj->username, $obj->balance, $obj->password);\n\n //set the id for the account\n $account->setAccount_id($obj->account_id);\n\n //add the account into the array\n $accounts[] = $account;\n }\n \n return $accounts;\n }", "title": "" }, { "docid": "5804df3e3e2fe9d14d04c655ddaf594d", "score": "0.4940055", "text": "public function getMatch($matchId, $includeTimeline = true) {\n $call = self::API_URL_MATCH_3 . 'matches/' . $matchId;\n\n if(!$includeTimeline)\n return $this->request($call);\n\n else\n $timelineCall = self::API_URL_MATCH_3 . 'timelines/by-match/' . $matchId;\n $data = $this->requestMultiple(array(\n \"data\"=>$call,\n \"timeline\"=>$timelineCall\n ));\n $data[\"data\"][\"timeline\"] = $data[\"timeline\"];\n return $data[\"data\"];\n }", "title": "" }, { "docid": "8bd8ab21606f411649b114f43891b385", "score": "0.49336824", "text": "function getMatches($htmlString, $teamId) {\r\n $this->domDoc->loadHTML($this->cleanUpString($htmlString));\r\n libxml_clear_errors();\r\n\r\n $leagueName = NULL;\r\n $matches = array(); $players = array();\r\n $links = $this->domDoc->getElementsByTagName('a');\r\n foreach ($links as $match) {\r\n $href = $match->getAttribute('href');\r\n if (strpos($href, 'draw')) {\r\n // This is a league match\r\n if (is_null($leagueName)) {\r\n $leagueName = trim($match->firstChild->nodeValue);\r\n }\r\n } elseif (0 < strpos($href, '/player/')) {\r\n $playerName = $match->firstChild->nodeValue;\r\n $div = $match->parentNode->parentNode;\r\n $spans = $div->getElementsByTagName('span');\r\n foreach ($spans as $span) {\r\n $class = $span->getAttribute('class');\r\n if (0 == strcmp($class, 'tag-duo__title')) {\r\n switch ($span->parentNode->getAttribute('title')) {\r\n case 'Enkel': $playerRatingSingles = trim($span->nodeValue);\r\n break;\r\n case 'Dubbel':$playerRatingDoubles = trim($span->nodeValue);\r\n break;\r\n }\r\n }\r\n }\r\n $players[] =\r\n new Player($playerName, $playerRatingSingles, $playerRatingDoubles);\r\n }\r\n }\r\n $links = $this->domDoc->getElementsByTagName(\"a\");\r\n $matchNumber = 0;\r\n foreach ($links as $match) {\r\n $class = $match->getAttribute(\"class\");\r\n if ('team-match__wrapper' == $class) {\r\n // Found a match, let's get the details\r\n $url = $match->getAttribute('href');\r\n $timeElement = $match->getElementsByTagName('time');\r\n $timeElement = $timeElement[0];\r\n $dateTime = $timeElement->getAttribute('datetime');\r\n printBasicMessage(\"Found league match starting at $dateTime\");\r\n $start = strtotime($dateTime);\r\n $divs = $match->getElementsByTagName('div');\r\n foreach ($divs as $div) {\r\n $subclass = $div->getAttribute(\"class\");\r\n $teamName = $div->nodeValue;\r\n $teamName = trim($teamName);\r\n $pos = strpos($subclass, 'is-team-');\r\n if (false !== $pos) {\r\n $pos = strpos($subclass, 'is-team-1');\r\n if (false !== $pos) {\r\n $team1 = $teamName;\r\n }\r\n $pos = strpos($subclass, 'is-team-2');\r\n if (false !== $pos) {\r\n $team2 = $teamName;\r\n }\r\n }\r\n }\r\n $summary = \"$team1 vs $team2\";\r\n $identifiers = explode('/', $url);\r\n $matchId = $identifiers[4];\r\n $leagueId = $identifiers[2];\r\n $newMatch = new LeagueMatch($matchId, $summary, $leagueName, $leagueId, $start, $team1, $team2);\r\n $newMatch->setPlayers($players);\r\n $newMatch->setMatchNumber($matchNumber++);\r\n $newMatch->setTeamId($teamId);\r\n $matches[] = $newMatch;\r\n }\r\n }\r\n return $matches;\r\n }", "title": "" }, { "docid": "68a55fa200108b41d3ffe7845fdbddfd", "score": "0.49315774", "text": "public function get($matches) {\n\t\t\t$id = $matches[1];\n\t\t\t$data = $this->db->getUser($id);\n\t\t\tif ($data) { \n\t\t\t\t$this->view->addData(\"user\", $data); \n\t\t\t\t\n\t\t\t\t$recipes = $this->db->getRecipesForUser($id);\n\t\t\t\tif (count($recipes)) { $this->view->addData(\"recipe\", $recipes); }\n\t\t\t} else {\n\t\t\t\t$this->view->addData(\"user\", array(\"id\"=>0));\n\t\t\t}\n\n\t\t\t$edit = HTTP::value(\"edit\", \"get\", 0);\n\t\t\tif ($edit) {\n\t\t\t\t$this->view->setTemplate(\"templates/user-form.xsl\");\n\t\t\t} else {\n\n\t\t\t\tif ($this->app->canModifyUser($id)) {\n\t\t\t\t\t$this->app->addAction(\"user\", array(\n\t\t\t\t\t\t\"method\"=>\"get\",\n\t\t\t\t\t\t\"icon\"=>\"edit\",\n\t\t\t\t\t\t\"action\"=>\"/autor/\".$id.\"?edit=1\",\n\t\t\t\t\t\t\"label\"=>\"Upravit uživatele\"\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\tif ($this->app->canDeleteUser($id)) {\n\t\t\t\t\t$this->app->addAction(\"user\", array(\n\t\t\t\t\t\t\"method\"=>\"delete\",\n\t\t\t\t\t\t\"icon\"=>\"delete\",\n\t\t\t\t\t\t\"action\"=>\"/autor/\".$id,\n\t\t\t\t\t\t\"label\"=>\"Smazat uživatele\"\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->view->setTemplate(\"templates/user.xsl\");\n\t\t\t}\n\t\t\t$this->app->output();\n\t\t}", "title": "" }, { "docid": "e02d39f01511e91d6e9c1e312f133f2c", "score": "0.49272436", "text": "public function findUsers(): Traversable;", "title": "" }, { "docid": "68660840f3a009884182a84b8584c359", "score": "0.49214908", "text": "function twitter_lists_list_members($user, $list) {\r\n\treturn lists_paginated_process(DABR_API.\"{$user}/{$list}/members.xml\");\r\n}", "title": "" }, { "docid": "03359478e498fc288909ab2f8a29118d", "score": "0.4908589", "text": "public function getUserById($id, $account_id) {\n $user = [];\n\n $condition = [\n \"fields\" => [\n \"um.var_first_name\",\n \"um.var_last_name\",\n \"um.var_email\"\n ],\n \"where\" => [\n [\"where\" => [\"um.id\", \"=\", $id]]\n ]\n ];\n $user = $this->fetch($condition);\n\n return $user;\n }", "title": "" }, { "docid": "70f3094d9d7949ed075ab5ba59effbb6", "score": "0.49071154", "text": "function getMatchsForRes($tieId, $teamL, $teamR)\r\n\t{\r\n\t\t$ut = new utils();\r\n\t\t// Select the matchs of the tie\r\n\t\t$fields = array('mtch_id', 'mtch_discipline', 'mtch_score',\r\n\t\t 'mtch_order', 'mtch_status', 'mtch_disci');\r\n\t\t$tables[] = 'matchs';\r\n\t\t$where = \"mtch_del != \".WBS_DATA_DELETE.\r\n\t\" AND mtch_tieId = $tieId\";\r\n\t\t$order = \"mtch_rank\";\r\n\t\t$res = $this->_select($tables, $fields, $where, $order);\r\n\r\n\t\t// Construc a table with the match\r\n\t\twhile ($match = $res->fetchRow(DB_FETCHMODE_ASSOC))\r\n\t\t{\r\n\t $match['mtch_regiId00'] = -10;\r\n\t $match['mtch_regiId01'] = -10;\r\n\t $match['mtch_regiId10'] = -10;\r\n\t $match['mtch_regiId11'] = -10;\r\n\t $match['mtch_result0'] = WBS_RES_NOPLAY;\r\n\t $match['mtch_result1'] = WBS_RES_NOPLAY;\r\n\t $match['mtch_teamId0'] = $teamL;\r\n\t $match['mtch_teamId1'] = $teamR;\n\t if ($match['mtch_discipline'] < 6) $match['mtch_num'] = $ut->getSmaLabel($match['mtch_discipline']);\n\t else $match['mtch_num'] = 'SP';\n\t $match['mtch_num'] .= ' ' . $match['mtch_order'];\r\n\t $matches[$match['mtch_id']] = $match;\r\n\t\t}\r\n\r\n\t\t// Select the players of the matchs of the tie\r\n\t\t$fields = array('mtch_id', 'regi_id', 'regi_teamId', 'i2p_pairId',\r\n\t\t 'rkdf_label', 'p2m_result');\r\n\t\t$tables = array('matchs', 'p2m', 'i2p', 'registration',\r\n\t\t 'ranks', 'rankdef', 'members');\r\n\t\t$where = \" mtch_del != \".WBS_DATA_DELETE.\r\n\t\" AND mtch_tieId = $tieId\".\r\n\t\" AND mtch_id = p2m_matchId\".\r\n\t\" AND p2m_pairId = i2p_pairId\".\r\n\t\" AND i2p_regiId = regi_id\".\r\n\t\" AND rank_regiId = regi_id\".\r\n\t\" AND rank_rankdefId = rkdf_id\".\r\n\t\" AND rank_discipline = mtch_disci\".\r\n\t\" AND regi_memberId = mber_id\";\r\n\t\t$order = \"mtch_id, regi_teamId, mber_sexe\";\r\n\t\t$res = $this->_select($tables, $fields, $where, $order);\r\n\r\n\t\t// Coomplete the table with player's match\r\n\t\t$uts = new utscore();\r\n\t\t$pairId=-1;\r\n\t\twhile ($player = $res->fetchRow(DB_FETCHMODE_ASSOC))\r\n\t\t{\r\n\t $match = $matches[$player['mtch_id']];\r\n\t $uts->setScore($match['mtch_score']);\r\n\t if ($player['regi_teamId'] == $teamL)\r\n\t {\r\n\t \tif ($pairId != $player['i2p_pairId'])\r\n\t \t{\r\n\t \t\t$match['mtch_regiId00'] = $player['regi_id'];\r\n\t \t\t$match['mtch_result0'] = $player['p2m_result'];\r\n\t \t\t$pairId = $player['i2p_pairId'];\r\n\t \t}\r\n\t \telse\r\n\t\t $match['mtch_regiId01' ] = $player['regi_id'];\r\n\t }\r\n\t else\r\n\t {\r\n\t \tif ($pairId != $player['i2p_pairId'])\r\n\t \t{\r\n\t \t\t$match['mtch_regiId10'] = $player['regi_id'];\r\n\t \t\t$match['mtch_result1'] = $player['p2m_result'];\r\n\t \t\t$pairId = $player['i2p_pairId'];\r\n\t \t}\r\n\t \telse\r\n\t\t $match['mtch_regiId11' ] = $player['regi_id'];\r\n\r\n\t }\r\n\t $matches[$player['mtch_id']] = $match;\r\n\t\t}\r\n\r\n\t\treturn $matches;\r\n\r\n\t}", "title": "" }, { "docid": "a22b1ac9b00a61ae3315c6ed6327985e", "score": "0.49054", "text": "public function getAllMatchReports()\r\n {\r\n\r\n /*\r\n * See getAllUsers for explantation\r\n */ \r\n\r\n $stmt = $this->conn->prepare(\"SELECT match_report_id, match_title, match_score , match_date, match_image, match_type FROM match_report\");\r\n $stmt->execute(); \r\n $stmt->bind_result($id, $title, $score, $date, $image, $type);\r\n $reports = array(); \r\n while($stmt->fetch())\r\n { \r\n $entry = array(); \r\n $entry['match_report_id'] = $id; \r\n $entry['match_title']=$title; \r\n $entry['match_score'] = $score;\r\n $entry['match_date'] = $date;\r\n $entry['match_image'] = $image; \r\n $entry['match_type'] = $type; \r\n array_push($reports, $entry);\r\n } \r\n \r\n return $reports; \r\n }", "title": "" }, { "docid": "371a356d6db6a10ec5baec2f17461ba7", "score": "0.49052677", "text": "public static function getFriendsList($id) {\n $data1 = (new \\yii\\db\\Query())\n ->select(['uid2'])\n ->from(Friendship::tableName())\n ->where(['uid1' => $id])\n ->column();\n $data2 = (new \\yii\\db\\Query())\n ->select(['uid1'])\n ->from(Friendship::tableName())\n ->where(['uid2' => $id])\n ->column();\n\n $result = array_merge($data1, $data2);\n sort($result);\n\n return $result;\n }", "title": "" }, { "docid": "aa36e2438d3f5183ff36ec7fb9c3aa5e", "score": "0.49041563", "text": "public function getRelationshipUsers($id)\n {\n return $this->model->with([\n 'users' => function ($q) {\n $q->orderBy('first_name')->orderBy('surname');\n },\n ]\n )->find($id);\n }", "title": "" }, { "docid": "61552071eb2f0f546224037134605575", "score": "0.49009877", "text": "function user_names_list( $arr_user_id )\n {\n\t\t$arr_user_ids_names = array();\n\t\t\n\t\tfor( $i = 0; $i < count( $arr_user_id ); $i++ )\n\t\t{\n\t\t\t$res_user = $this->view_user( $arr_user_id[$i]);\n\t\t\t$res_row = $this->m_obj_db->fetch( $res_user );\n\n\t\t\tif ( $res_row != null && $res_row != false )\n\t\t\t{\n\t\t\t\t$arr_id_firstlastname = array();\n\t\t\t\tarray_push( $arr_id_firstlastname, $res_row->UserId );\n\t\t\t\tarray_push( $arr_id_firstlastname, $res_row->FirstName );\n\t\t\t\tarray_push( $arr_id_firstlastname, $res_row->LastName );\n\n\t\t\t\tarray_push( $arr_user_ids_names, $arr_id_firstlastname );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $arr_user_ids_names; \n\t}", "title": "" }, { "docid": "ba2edcced26c25dfbbbf790b565eabc2", "score": "0.49000403", "text": "public function getUsersFromClub($club_id, $active=1)\n {\n\n $club_id = intval($club_id);\n $active = intval($active);\n\n $membership_user = DB::table('membership_user')\n ->select('user_id')\n ->join('memberships','membership_user.membership_id','=', 'memberships.id' )\n ->rightJoin('membership_club', 'membership_club.membership_id','=', 'memberships.id' )\n ->where('membership_club.club_id', '=', $club_id)\n ->where('memberships.active', $active )\n ->distinct()\n ->pluck('user_id');\n\n $users = User::whereIn('id' , $membership_user->toArray())\n ->orderBy('surname')\n ->get();\n\n return $users;\n\n }", "title": "" }, { "docid": "ed8c0a8605a7f9c7b042d39354a1d634", "score": "0.48908088", "text": "function get_campaign_users_by_campaign_id($id)\n {\n $this->db->select('*');\n $this->db->where(\n array(\n 'id' => $id\n )\n );\n $query = $this->db->get($this->table_campaign);\n $records = array();\n if ($query->num_rows() > 0 ) :\n $records = $query->result();\n endif;\n return $records;\n }", "title": "" }, { "docid": "aa3f6a13145b65c62d5017d06f3b207c", "score": "0.48905814", "text": "public static function getChatList($id) {\n require_once(\"../dbconfig.php\");\n $arr = array();\n $jsonData = '{\"results\":[';\n\n $db->query(\"SET NAMES 'UTF8'\");\n $statement = $db->prepare(\n \"SELECT * FROM\n (select chatlist.prodID, chatroomID, last_active, name\n FROM chatlist INNER JOIN user on chatlist.prodID = user.prodID)\n chatuser\n WHERE chatroomID IN\n (SELECT chatroomID FROM chatlist WHERE prodID=?)\n ORDER BY last_active DESC\");\n $statement->bind_param('i', $id);\n $statement->execute();\n $statement->bind_result($chatter, $chatroomID, $last_active, $username);\n $line = new stdClass;\n while ($statement->fetch()) {\n // if the receiver is not myself\n if ($id != $chatter) {\n $active_datetime = explode(' ', $last_active);\n if ($active_datetime[0] != Date('Y-m-d')) {\n $last_active = $active_datetime[0];\n } else {\n $last_active = $active_datetime[1];\n }\n $line->chatter = $chatter;\n $line->username = $username;\n $line->chatroomID = $chatroomID;\n $line->last_active = $last_active;\n $arr[] = json_encode($line); // encode the row into json format\n }\n }\n $statement->close();\n $db->close();\n\n $jsonData .= implode(\",\", $arr);\n $jsonData .= ']}';\n return $jsonData;\n }", "title": "" }, { "docid": "044262811fdc367291ddd3a41e39e3ae", "score": "0.48884162", "text": "public function get_players_team($team_id)\n {\n global $wpdb;\n return $wpdb->get_results($wpdb->prepare(\"SELECT pt.id, p.lastname, p.firstname\n FROM $wpdb->team t\n RIGHT JOIN $wpdb->player_team pt ON t.id = pt.id_team\n RIGHT JOIN $wpdb->player p ON p.id = pt.id_player\n WHERE t.id = %d\n ORDER BY p.lastname ASC, p.firstname ASC\",\n $team_id)\n );\n }", "title": "" }, { "docid": "5779ae93d3d58a29e9a7aca3bb1ea253", "score": "0.48877212", "text": "public function FindAll(callable $match) : ArrayList\r\n {\r\n if ($match !== null)\r\n {\r\n return $this->Where($match)->ToList();\r\n }\r\n else\r\n {\r\n throw new ArgumentNullException('match');\r\n }\r\n }", "title": "" }, { "docid": "690fc93c1569df14da8a703f57899062", "score": "0.48871142", "text": "function &_getPassedUsers($a_obj_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$passed_users = array();\n\t\t// Maybe SELECT DISTINCT(tst_active.user_fi)... ?\n\t\t$userresult = $ilDB->queryF(\"\n\t\t\tSELECT tst_active.active_id, COUNT(tst_sequence.active_fi) sequences\n\t\t\tFROM tst_tests\n\t\t\tINNER JOIN tst_active\n\t\t\tON tst_active.test_fi = tst_tests.test_id\n\t\t\tLEFT JOIN tst_sequence\n\t\t\tON tst_sequence.active_fi = tst_active.active_id\n\t\t\tWHERE tst_tests.obj_fi = %s\n\t\t\tGROUP BY tst_active.active_id\n\t\t\t\",\n\t\t\tarray('integer'), array($a_obj_id)\n\t\t);\n\t\t$all_participants = array();\n\t\t$notAttempted = array();\n\t\twhile ($row = $ilDB->fetchAssoc($userresult))\n\t\t{\n\t\t\tif($row['sequences'] == 0)\n\t\t\t{\n\t\t\t\t$notAttempted[$row['active_id']] = $row['active_id'];\n\t\t\t}\n\n\t\t\t$all_participants[$row['active_id']] = $row['active_id'];\n\t\t}\n\t\t\n\t\t$result = $ilDB->query(\"SELECT tst_result_cache.*, tst_active.user_fi FROM tst_result_cache, tst_active WHERE tst_active.active_id = tst_result_cache.active_fi AND \" . $ilDB->in('active_fi', $all_participants, false, 'integer'));\n\t\t$found_all = ($result->numRows() == count($all_participants)) ? true : false;\n\t\tif (!$found_all)\n\t\t{\n\t\t\t// if the result cache entries do not exist, create them\n\t\t\t$found_participants = array();\n\t\t\twhile ($data = $ilDB->fetchAssoc($result))\n\t\t\t{\n\t\t\t\tarray_push($found_participants, $data['active_fi']);\n\t\t\t}\n\t\t\tforeach ($all_participants as $active_id)\n\t\t\t{\n\t\t\t\tif (!in_array($active_id, $found_participants))\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"./Modules/TestQuestionPool/classes/class.assQuestion.php\";\n\t\t\t\t\tassQuestion::_updateTestResultCache($active_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result = $ilDB->query(\"SELECT tst_result_cache.*, tst_active.user_fi FROM tst_result_cache, tst_active WHERE tst_active.active_id = tst_result_cache.active_fi AND \" . $ilDB->in('active_fi', $all_participants, false, 'integer'));\n\t\t}\n\t\twhile ($data = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tif( isset($notAttempted[$data['active_fi']]) )\n\t\t\t{\n\t\t\t\t$data['failed'] = 0;\n\t\t\t\t$data['passed'] = 0;\n\t\t\t}\n\n\t\t\t$data['user_id'] = $data['user_fi'];\n\t\t\tarray_push($passed_users, $data);\n\t\t}\n\t\treturn $passed_users;\n\t}", "title": "" }, { "docid": "e7913a7fbfbfbd7e9d8b4a5e0bc66f1b", "score": "0.48809025", "text": "function get_user_list($search) {\n $search = mysqli_real_escape_string($this->connection, $search); \n return $this->query(\"SELECT username, first, last, sca_first, sca_last, id FROM user\n WHERE username LIKE '%$search%' OR first LIKE '%$search%' OR last LIKE '%$search%'\n OR nickname LIKE '%$search%' OR sca_first LIKE '%$search%' OR sca_last LIKE '%$search%'\n ORDER BY username LIMIT 10\");\n }", "title": "" }, { "docid": "2270406303b07b23bd17c9efa366bae7", "score": "0.4877413", "text": "public static function listAll()\n {\n global $PPHP;\n $db = $PPHP['db'];\n return $db->selectList('SELECT id FROM users WHERE active ORDER BY id ASC');\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "eef0d61272f16c658dfe250d392296a2", "score": "0.0", "text": "public function run()\n {\n DB::table('topics')->insert([\n ['TopicName'=>'espectaculo'],\n ['TopicName'=>'politica'],\n ['TopicName'=>'deportes'],\n ]);\n }", "title": "" } ]
[ { "docid": "0bfde9ef2f3ebe06cba65de4fe4e0c07", "score": "0.8007822", "text": "public function run()\n {\n factory('App\\User')->create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin123')\n ]);\n \n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Post', 50)->create();\n factory('App\\Tag', 10)->create();\n\n $posts = Post::all()->pluck('id');\n $tags = Tag::all()->pluck('id');\n\n foreach(range(1, 50) as $index){\n DB::table('taggables')->insert([\n 'tag_id' => $tags[rand(0,9)],\n 'taggable_id' => $posts[rand(0,49)],\n 'taggable_type' => 'App\\Post'\n ]);\n }\n\n factory('App\\Department', 20)->create();\n }", "title": "" }, { "docid": "be70abafa425894fc1f5fffa84ad1c58", "score": "0.799776", "text": "public function run()\n {\n\n Eloquent::unguard();\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n $faker = Faker::create();\n\n App\\ProductDetail::truncate();\n App\\Product::truncate();\n\n for ($i = 0; $i < 100; $i++) {\n $products = DB::table('products')->insert([\n 'product_name' => $faker->sentence($nbWords = 6, $variableNbWords = true),\n ]);\n }\n\n $productList = App\\Product::pluck('id')->toArray();\n\n for ($i = 0; $i < 100; $i++) {\n $productDetails = DB::table('product_details')->insert([\n 'product_id' => $faker->randomElement($productList),\n 'selling_price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0, $max = 23),\n 'product_cost' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0, $max = 23),\n 'weight' => $faker->randomDigit,\n 'weight_unit' => 'kg',\n 'SKU' => $faker->ean13,\n 'active' => true,\n 'descriptions' => $faker->paragraphs($nb = 3, $asText = true),\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "cbc18118ffdf77b61b5599ddb34c1812", "score": "0.79821414", "text": "public function run()\n {\n\n //Seed Users table with 50 entries \n factory(User::class, 10)->create();\n\n //Seed Articles table with 50 entries \n factory(Article::class, 10)->create();\n\n //Seed Tags table with 15 entries \n factory(Tag::class, 10)->create();\n\n //Seed Images table with 50 entries \n factory(Thumbnail::class, 10)->create();\n\n //Get array of ids of Users and Tags\n $articleIds = DB::table('articles')->pluck('id')->all();\n $tagsIds = DB::table('tags')->pluck('id')->all();\n\n\n //Seed article_tag table with 50 entries\n foreach ((range(1, 10)) as $index) {\n DB::table('article_tag')->insert(\n [\n 'article_id' => $articleIds[array_rand($articleIds)],\n 'tag_id' => $tagsIds[array_rand($tagsIds)]\n ]\n );\n } \n\n }", "title": "" }, { "docid": "e997c5cb5c91efaf84cdc8c54ff75337", "score": "0.7977852", "text": "public function run()\n {\n //Seed some random titles like Doctor, Chef, Technician, System Analyst\n DB::table('titles')->insert([\n 'name' => 'Human Resources Manager',\n 'salary' => '600000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Senior Accountant',\n 'salary' => '750000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Field Officer',\n 'salary' => '400000',\n 'department_id' => 2,\n 'user_id' => 2,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n }", "title": "" }, { "docid": "b0d690b7877e9052a404018f9bbcb857", "score": "0.7964612", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('pages')->delete();\n\n $page = array(\n array(\n 'content'=>'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam autem dolor facilis magni nemo placeat? Ad, aliquam cum deserunt excepturi fugit inventore ipsa odio possimus quaerat tempora voluptates voluptatum?',\n 'custom_fields'=>'',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('pages')->insert($page);\n\n DB::table('posts')->delete();\n\n $post = array(\n array(\n 'content'=>'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam autem dolor facilis magni nemo placeat? Ad, aliquam cum deserunt excepturi fugit inventore ipsa odio possimus quaerat tempora voluptates voluptatum?',\n 'custom_fields'=>'',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('posts')->insert($post);\n\n DB::table('categories')->delete();\n\n $post = array(\n array(\n 'name'=>'Simple',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('categories')->insert($post);\n }", "title": "" }, { "docid": "b8d732d24d0cafa0a09ae0fae273abc1", "score": "0.79600173", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('books')->insert([\n [\n 'title'=>'Name of the wind',\n 'description'=>'good book',\n ],\n [\n 'title'=>'Les rois mages',\n 'description'=>'Livre 1',\n ],\n [\n 'title'=>'Les mésirables',\n 'description'=>'faire machine avant',\n ],\n [\n 'title'=>'Name the goods',\n 'description'=>'good book two',\n ],\n [\n 'title'=>'Name of the world',\n 'description'=>'book type',\n ]\n ]);\n\n $this->call(AuthorTableSeeder::class);\n \n $this->call(BookTableSeeder::class);\n\n }", "title": "" }, { "docid": "28c90ca039b31e0b4ea668fe4b7200a1", "score": "0.79537797", "text": "public function run()\n {\n // $this->call(RolesTableSeeder::class);\n DB::table('roles')->insert([\n ['name' => 'Super Admin'],\n ['name' => 'Admin'],\n ['name' => 'Super Manager'],\n ['name' => 'Manager'],\n ['name' => 'User']\n ]);\n\n DB::table('departaments')->insert([\n ['name' => 'Developers'],\n ['name' => 'Managers'],\n ['name' => 'Mobiles'],\n ['name' => 'SEO']\n ]);\n\n DB::table('offices')->insert([\n ['name' => 'Trainee'],\n ['name' => 'Junior'],\n ['name' => 'Middle'],\n ['name' => 'Senjor']\n ]);\n }", "title": "" }, { "docid": "414c56fa7478f0f26f90e25015547739", "score": "0.7938816", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call('UserTableSeeder');\n User::truncate();\n App\\Models\\Article::truncate();\n // App\\Models\\Category::truncate();\n // factory(User::class, 47)->create()->each(function($u) {\n // $n = rand(1,30);\n // // dd($u);\n // $u->articles()->save(factory(App\\Models\\Article::class, $n)->make());\n // });\n $users = factory(App\\Models\\User::class, 13)\n ->create()\n ->each(function($u) {\n $n = rand(1,30);\n for ($i=1; $i < $n; $i ++) {\n $u->articles()->save(factory(App\\Models\\Article::class)->make());\n }\n });\n // factory(App\\Models\\Article::class, 54)->create();\n factory(App\\Models\\Category::class, 20)->create();\n // factory(App\\Mo/usdels\\Comment::class, 98)->create();\n // factory(App\\Models\\Notification::class, 12)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "e5a10ab44791834389d06f68b18e61a0", "score": "0.79154366", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Actor', 10)->create();\n factory('App\\Genre', 5)->create();\n factory('App\\Director', 3)->create();\n factory('App\\Movie', 20)->create();\n //factory('App\\MovieActor', 10)->create();\n factory('App\\MovieGenre', 10)->create();\n }", "title": "" }, { "docid": "78877988f9d7b9a209f3d7e3b76783c1", "score": "0.79043496", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(NewsTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n\n foreach (array_fill(0,49, 1) as $value) {\n DB::table('categories_news')->insert([\n 'categories_id' => rand(1, 10),\n 'news_id' => rand(1, 50)\n ]);\n DB::table('news_tags')->insert([\n 'news_id' => rand(1, 50),\n 'tags_id' => rand(1, 50)\n ]);\n }\n }", "title": "" }, { "docid": "519140d4569147b92caec85e96a7d54d", "score": "0.7861984", "text": "public function run()\n {\n DB::table('main')->insert(['name' => 'title', 'value' => 'All About Aqua']);\n DB::table('main')->insert(['name' => 'short-title', 'value' => 'A3']);\n DB::table('main')->insert(['name' => 'admin', 'value' => 'bRexx']);\n\n DB::table('categories')->insert(['name' => 'Fish']);\n DB::table('categories')->insert(['name' => 'Aquarium']);\n DB::table('categories')->insert(['name' => 'Food']);\n DB::table('categories')->insert(['name' => 'Decoration']);\n DB::table('categories')->insert(['name' => 'Medicine']);\n DB::table('categories')->insert(['name' => 'Others']);\n\n //admin seed\n DB::table('users')->insert(['name'=>'admin','email'=>'[email protected]','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n DB::table('shops')->insert(['name'=>'admin','email'=>'[email protected]','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n\n }", "title": "" }, { "docid": "cbe94f71f3320e562446a3857980162d", "score": "0.78545153", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // $table->increments('id');\n // $table->string('image');\n // $table->text('huni_too');\n // $table->text('usni_heregle');\n // $table->text('hereglesen_od');\n // $table->text('number');\n // $table->string('link');\n // $table->rememberToken();\n // $table->timestamps();\n\n\n DB::table('comus')->insert([\n 'image' => str_random(''),\n 'huni_too' => str_random('1'),\n 'usni_heregle' => str_random('2'),\n 'hereglesen_od' => str_random('5'),\n 'number' => str_random('666'),\n 'link' => str_random('gogo.mn'),\n ]);\n }", "title": "" }, { "docid": "32a1a19094e28fbcdf4c0f9a799b242e", "score": "0.78494513", "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 Element::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few elements in our database:\n for ($i = 0; $i < 50; $i++) {\n Element::create([\n 'title' => $faker->sentence,\n 'description' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "3aba22301887990477ce9cba4fcd6d61", "score": "0.78490025", "text": "public function run()\n {\n //seed for user account\n \\Illuminate\\Support\\Facades\\DB::table('users')->insert([\n [\n \"name\" => \"User\",\n \"email\" => \"[email protected]\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('user12345'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ],\n [\n \"name\" => \"Admin\",\n \"email\" => \"[email protected]\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('admin123'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ]\n ]);\n\n //seed for role each account\n DB::table('user_role')->insert([\n [\n 'user_id' => 1,\n 'role_id' => 1\n ],\n [\n 'user_id' => 2,\n 'role_id' => 2\n ]\n ]);\n }", "title": "" }, { "docid": "4a808c704f3d0986a8185bbaa1f0bda0", "score": "0.78462607", "text": "public function run()\n {\n\n // $this->call(UserSeeder::class);\n\n //DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //disable forign key checks temporaliry fr truncateing the tables\n\n //first truncate all the tables before seedingthe data in db\n User::truncate();\n Category::truncate();\n Course::truncate();\n Topic::truncate();\n Enrollment::truncate();\n\n //use the db facade to truncate the pivot tables since they dont have models\n DB::table('category_course')->truncate();\n DB::table('course_topic')->truncate();\n\n ///prevent listening to events when running our db seed command\n User::flushEventListeners();\n Category::flushEventListeners();\n Course::flushEventListeners();\n Topic::flushEventListeners();\n Enrollment::flushEventListeners();\n\n\n //setting quntity for the entities to put in database\n $usersQuantity = 1000;\n $categoriesQuantity = 30;\n $topicsQuantity = 100;\n $coursesQuantity = 100;\n $enrollmentsQuantity = 200;\n\n factory(User::class, $usersQuantity)->create();\n\n factory(Category::class, $categoriesQuantity)->create();\n\n factory(Topic::class, $topicsQuantity)->create();\n\n //create courses and attach relationships to each of them\n factory(Course::class, $coursesQuantity)->create()->each(\n function ($course) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $topics = Topic::all()->random(mt_rand(1, 5))->pluck('id');\n\n $course->categories()->attach($categories); //attching categories\n $course->topics()->attach($topics); //attaching topics\n }\n );\n\n factory(Enrollment::class, $enrollmentsQuantity)->create();\n }", "title": "" }, { "docid": "de244443af2a696896399e699e059f2a", "score": "0.78436476", "text": "public function run()\n {\n \t$faker = Faker::create();\n \tfor ($i=0; $i < 20; $i++) { \n \t\t$post = new App\\Post;\n \t\t$post->title = $faker->sentence;\n \t\t$post->body = $faker->paragraph;\n \t\t$post->category_id = rand(1, 5);\n $post->user_id = rand(1,2);\n \t\t$post->save();\n \t}\n\n $categories = ['General','Technology','Computer','Internet','Moblie'];\n foreach ($categories as $name) {\n $category= new App\\Category;\n $category ->name =$name;\n $category->save();\n }\n\n for ($i=0; $i <20 ; $i++) { \n $comment=new App\\Comment;\n $comment->comment=$faker->paragraph;\n $comment->post_id = rand(10, 20);\n $comment->save();\n }\n\n $bob = new App\\User;\n $bob->name='Bob';\n $bob->email='[email protected]';\n $bob->password=bcrypt('123456');\n $bob->save();\n\n $alice = new App\\User;\n $alice->name='Alice';\n $alice->email='[email protected]';\n $alice->password=bcrypt('12345678');\n $alice->save();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "07bb157e7f1f9063025b8db84ac92a02", "score": "0.78420794", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 20)->create();\n\n Topic::create(['name' => 'Featured Sites', 'slug' => 'featured']);\n Topic::create(['name' => 'Useful Links', 'slug' => 'links']);\n Topic::create(['name' => 'Guides & Tutorials', 'slug' => 'tutorials']);\n\n\n factory(Post::class, 20)->create();\n\n }", "title": "" }, { "docid": "8cbf125f1cbe9a706631b0b6739a5347", "score": "0.7840275", "text": "public function run()\n {\n factory(App\\Models\\User::class, 50)->create();\n// factory(App\\Models\\Category::class, 6)->create();\n $this->call(CategoriesTableSeeder::class);\n factory(App\\Models\\Post::class, 400)->create();\n factory(App\\Models\\Comment::class, 700)->create();\n factory(App\\Models\\Tag::class, 20)->create();\n $this->call(PostTagTableSeeder::class);\n $this->call(LikesTableSeeder::class);\n $this->call(BannersTableSeeder::class);\n }", "title": "" }, { "docid": "65770945a3971c8728c1a323d1cfe087", "score": "0.7829855", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Company::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,10) as $index) {\n Company::create([\n 'name' => $faker->catchPhrase,\n 'email' => $faker->unique()->companyEmail,\n 'website' => $faker->unique()->domainName,\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "f34bd24daeef3025bf64273a62304b04", "score": "0.7821777", "text": "public function run()\n {\n\n // \\App\\Models\\User::factory(10)->create();\n // Model::unguard();\n\n // $faker = Faker::create();\n\n // foreach(range(1, 30) as $index) {\n // Article::create([\n // 'title' => $faker->sentence(5),\n // 'content' => $faker->paragraph(6)\n // ]);\n // }\n\n\n // Model::reguard();\n }", "title": "" }, { "docid": "ed892f45b12929faabc610f2b0985f93", "score": "0.7821691", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('objects')->insert([\n 'name' => 'name1',\n 'description' => 'description1',\n 'type' => 'type1',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name2',\n 'description' => 'description2',\n 'type' => 'type2',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name3',\n 'description' => 'description3',\n 'type' => 'type3',\n ]);\n\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 2,\n ]);\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 3,\n ]);\n DB::table('relations')->insert([\n 'from' => 2,\n 'to' => 3,\n ]);\n\n }", "title": "" }, { "docid": "f7ba48b900e751e70594de5e33421d60", "score": "0.7802776", "text": "public function run()\n {\n // Seeding 1st user with 2 project\n User::factory(1)\n ->hasProjects(2)\n ->create();\n\n // Seed issue statuses\n DB::table('issue_statuses')->insert([\n 'name' => 'Backlog'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'To Do'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'In Progress'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Testing'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Completed'\n ]);\n\n // Seeding 8 issues, project_id will be random\n Issue::factory(8)\n ->create();\n }", "title": "" }, { "docid": "29cb5cb84c4bffd9e2b2c12fec684fa6", "score": "0.780078", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\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 < 4; $i++) {\n \n $main = $i == 0 ? 1 : 0;\n Address::create([\n 'user_id' => 1,\n 'address' => $faker->address,\n 'code' => $faker->postcode,\n 'city' => $faker->city,\n 'phone' => $faker->phoneNumber,\n 'main' => $main\n ]);\n }\n }", "title": "" }, { "docid": "f50f6d54fb799adc3b1bdb3b79c484d3", "score": "0.78002775", "text": "public function run()\n {\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\n \t\t$title=$faker->sentence(3);\n\n\t DB::table('articles')->insert([\n\t 'title' =>$title,\n\t 'content' => $faker->paragraph(5),\n\t 'slug'=> Str::slug($title),\n\t 'user_id'=>1,\n\t 'created_at' => new DateTime, \n\t 'updated_at' => new DateTime\n\t ]);\n }\n }", "title": "" }, { "docid": "5f769899c919388eb4ce556b4a40b76f", "score": "0.7799289", "text": "public function run()\n {\n \\DB::table('users')->insert(\n [\n 'name' => 'sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('INIT_PASSWD')),\n ]\n );\n\n //Creare 10 categorie\n $categories = factory(Category::class, 10)->create();\n //Creare 10 utenti\n $users = factory(User::class, 10)->create();\n //Creare 30 tags\n $tags = factory(Tag::class, 30)->create();\n\n //per ciascun utente creare 15 post\n foreach ($users as $user) {\n //assegnare una categoria random\n $category = $categories->random();\n $posts = factory(Post::class, 15)->create(\n [\n 'category_id' => $category->id,\n 'user_id' => $user->id,\n ]\n );\n //assegnare 3 tags random\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "b7cfff08e0d76911d75a02d312a85fed", "score": "0.77978605", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = collect();\n $users->push([\"username\" => \"Alessandro\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n $users->push([\"username\" => \"Giorgetto\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n $users->push([\"username\" => \"Marco\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n\n foreach($users as $user) {\n User::create([\n \"username\" => $user[\"username\"],\n \"email\" => $user[\"email\"],\n \"password\" => $user[\"password\"]\n ]);\n }\n\n $articles = collect();\n $articles->push([\"title\" => \"Titolo 1\", \"content\" => \"Articolo bellissimo 1\", \"user_id\" => 1]);\n $articles->push([\"title\" => \"Titolo 2\", \"content\" => \"Articolo bellissimo 2\", \"user_id\" => 2]);\n $articles->push([\"title\" => \"Titolo 3\", \"content\" => \"Articolo bellissimo 3\", \"user_id\" => 2]);\n $articles->push([\"title\" => \"Titolo 4\", \"content\" => \"Articolo bellissimo 4\", \"user_id\" => 3]);\n\n foreach($articles as $article) {\n Article::create([\n \"title\" => $article[\"title\"],\n \"content\" => $article[\"content\"],\n \"user_id\" => $article[\"user_id\"]\n ]);\n }\n }", "title": "" }, { "docid": "30fe5a8e5f9a52e2ff54231982691f0f", "score": "0.7795682", "text": "public function run()\n {\n $this->call(AdminSeeder::class);\n factory(App\\Models\\User::class, 50)->create();\n factory(App\\Models\\Category::class, 5)->create();\n factory(App\\Models\\Category::class, 5)->create();\n factory(App\\Models\\Book::class, 50)->create();\n factory(App\\Models\\Review::class, 100)->create();\n factory(App\\Models\\Comment::class, 200)->create();\n }", "title": "" }, { "docid": "78df9713302ed4286177ce6880823388", "score": "0.77945477", "text": "public function run()\n {\n /**\n * IMPORTANT!\n * The database seed is written to handle the task centralized\n * It should use:\n * php artisan db:seed\n * -> You can not run the seeds separately, it could cause errors!\n */\n\n // Truncate all tables, except migrations\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n $tables = DB::select('SHOW TABLES');\n foreach ($tables as $table) {\n if ($table->{'Tables_in_' . env('DB_DATABASE')} !=='migrations')\n DB::table($table->{'Tables_in_' . env('DB_DATABASE')})->truncate();\n }\n\n User::factory()->count(5)->create();\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n\n $this->call(CategoriesTableSeeder::class);\n Category::factory()->count(10)->create();\n\n Post::factory()->count(100)->create();\n\n Tag::factory()->count(20)->create();\n $this->call(PostTagTableSeeder::class);\n\n Comment::factory()->count(250)->create();\n }", "title": "" }, { "docid": "aff5888ce4fe9dc9547987a84da0f5b3", "score": "0.77938676", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class)->create(['email' => '[email protected]']);\n\n $series_collection = factory(\\App\\Series::class, 4)->create();\n foreach ($series_collection as $series) {\n factory(\\App\\Lesson::class, 8)->create(['series_id' => $series->id]);\n }\n }", "title": "" }, { "docid": "7a9160c6e6922f81836e612d863e24eb", "score": "0.77872473", "text": "public function run()\n {\n //\n // Let's truncate our existing records to start from scratch.\n Program::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Programs in our database:\n for ($i = 0; $i < 50; $i++) {\n Program::create([\n 'name' => $faker->sentence,\n 'type' => $faker->word,\n 'gif' => $faker->word,\n ]);\n }\n }", "title": "" }, { "docid": "f95dae06b42b3874fd917fdaad0f1532", "score": "0.7784616", "text": "public function run()\n {\n\n // DB::table('users')->insert([\n // 'name' => 'Demo',\n // 'email' => '[email protected]',\n // 'password' => Hash::make('demo'),\n // ]);\n\n // DB::table('roles')->insert([\n // 'name' => 'admin',\n // 'slug' => 'admin', \n // ]);\n\n // DB::table('users_roles')->insert([\n // 'user_id' => '1',\n // 'role_id' => '1', \n // ]);\n DB::table('statuses')->insert([\n ['name' => 'В обработке'],\n ['name' => 'Ожидает оплату'],\n ['name' => 'Оплачен'],\n ['name' => 'Завершен'],\n ]);\n\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(10)->create();\n // \\App\\Models\\Product::factory(2)->create();\n // \\App\\Models\\Review::factory(5)->create();\n // \\App\\Models\\News::factory(22)->create();\n\n }", "title": "" }, { "docid": "9bd3519b5c055646fdf21e6b831e35f3", "score": "0.77809006", "text": "public function run()\n {\n \t// DB::table('testings')->delete();\n\n $testings = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('testings')->insert($testings);\n }", "title": "" }, { "docid": "70a0a4edc2e80e4fcf2d6a5dfa07fb36", "score": "0.7778213", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $authors = factory(App\\Author::class, 1000)->create();\n // $this->call(BooksTableSeeder::class);\n // $this->call(CategoriesTableSeeder::class);\n $this->call(BookCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "4a914f5bd3889c772b35d5a600367ac9", "score": "0.7775184", "text": "public function run()\n {\n //User::factory(1)->create();\n //Category::factory(5)->create();\n\n //Tag::factory(10)->create();\n\n $this->call([\n //PostsTableSeeder::class,\n AbilitiesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "2904723cb5eb301c095322aa920e8d1d", "score": "0.7774837", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $authorTableSeeder = new AuthorTableSeeder();\n $authorTableSeeder->run();\n\n $categoryTableSeeder = new CategoryTableSeeder();\n $categoryTableSeeder->run();\n\n $languageTableSeeder = new LanguageTableSeeder();\n $languageTableSeeder->run();\n\n $publisherTableSeeder = new PublisherTableSeeder();\n $publisherTableSeeder->run();\n\n $bookTableSeeder = new BookTableSeeder();\n $bookTableSeeder->run();\n\n $booksCategoriesTableSeeder = new BooksCategoriesTableSeeder();\n $booksCategoriesTableSeeder->run();\n\n $booksLanguagesTableSeeder = new BooksLanguagesTableSeeder();\n $booksLanguagesTableSeeder->run();\n\n }", "title": "" }, { "docid": "8d6193c666b8022d4bb4d5d90e85f9c8", "score": "0.77674073", "text": "public function run()\n {\n //\n DB::table('authors')->delete();\n $faker = Faker::create();\n foreach (range(1, 10) as $index ) {\n DB::table('authors')->insert([\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName\n ]);\n }\n }", "title": "" }, { "docid": "d11b12ac185f2cce6ea50e0c94537c98", "score": "0.77665746", "text": "public function run()\n {\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n Role::truncate();\n $roleNames = [\n ['name'=>'Superadmin'],\n ['name'=>'Admin'],\n ['name'=>'Inventory Manager'],\n ['name'=>'Order Manager'],\n ['name'=>'Customer']\n ];\n\n DB::table(\"roles\")->insert($roleNames);\n }", "title": "" }, { "docid": "0ed44f3c88a0bd394dbf05e0a1eaf0e6", "score": "0.7765398", "text": "public function run()\n {\n $this->seed(CategoriesTableSeeder::class);\n $this->seed(UsersTableSeeder::class);\n $this->seed(PostsTableSeeder::class);\n $this->seed(PagesTableSeeder::class);\n $this->seed(TranslationsTableSeeder::class);\n }", "title": "" }, { "docid": "749e5d54beba75329a6df6b91aaf15df", "score": "0.7764386", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // DB::table('users')->create([\n // 'name' => 'Admin',\n // 'email' => '[email protected]',\n // 'password' => Hash::make('Admin'),\n // ]);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('Admin'),\n ]);\n\n // factory(App\\Group::class, 10)->create()->each(function($group) {\n // $group->mappings()->saveMany(\n // factory(App\\Mapping::class, rand(1,8))->make()\n // )->each(function($mapping) {\n // $mapping->logs()->saveMany(\n // factory(App\\Log::class, rand(1,30))->make()\n // );\n // });\n // });\n }", "title": "" }, { "docid": "88449646c44f6fc44e59d75c49da4932", "score": "0.7762312", "text": "public function run()\n {\n $categories = factory(App\\Category::class, 10)->create();\n $tags = factory(App\\Tag::class, 30)->create();\n\n App\\User::create([\n 'name' => 'Sidrit',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'role' => 'admin'\n ]);\n\n factory(App\\User::class, 9)->create();\n\n $users = App\\User::all();\n\n foreach ($users as $user) {\n $posts = factory(App\\Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()\n ]);\n\n foreach ($posts as $post) {\n $randomTags = $tags->random(3);\n\n $post->tags()->sync($randomTags->pluck('id'));\n }\n }\n }", "title": "" }, { "docid": "0b01af06c23cadcbf5be6127abe3744b", "score": "0.7760595", "text": "public function run()\n {\n $faker = Faker::create();\n foreach(range(1,10) as $index)\n {\n DB::table('expense_details')->insert([\n 'expense_details' => $faker->name,\n 'quantity' => $faker->numberBetween(5,20),\n 'cost_per_quantity' => $faker->numberBetween(100,200),\n 'created_at' => $faker->dateTimeBetween('-6 months','+1 month')\n ]);\n }\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(ConsigneeSeeder::class);\n $this->call(BrightSeeder::class);\n $this->call(roleManagement::class);\n $this->call(CategorySeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(ChallanSeeder::class);\n $this->call(OrderSeeder::class);\n $this->call(MapOrderChallanSeeder::class);\n $this->call(DesignationSeeder::class);\n $this->call(EmployeeSeeder::class);\n }", "title": "" }, { "docid": "9da011cdf6feb2eb2419c695706d6152", "score": "0.7759525", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $journals = factory('App\\Journal', 50)->create();\n $journals->each(function ($journal) {\n factory('App\\Entry', 10)->create(['journal_id' => $journal->id]);\n });\n }", "title": "" }, { "docid": "095d09077e72b251380fae2155ece479", "score": "0.7758182", "text": "public function run()\n {\n DB::table('posts')->delete();\n $faker = Faker::create();\n\n User::all()->each(function ($user) use ($faker) {\n Post::create([\n 'title' => $faker->word,\n 'body' => $faker->paragraph(),\n 'user_id' => $user->id\n ]);\n });\n }", "title": "" }, { "docid": "ac0c0ae6e47a2c4aa1523579e917e923", "score": "0.77538705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Create just one user\n DB::table('users')->insert([\n 'email' => '[email protected]',\n 'name' => 'Pierre-Yves',\n 'password' => Hash::make('secret'),\n 'created_at' => DB::raw('CURRENT_TIMESTAMP'),\n 'updated_at' => DB::raw('CURRENT_TIMESTAMP'),\n ]);\n\n // Create just one product\n DB::table('products')->insert([\n 'name' => 'Beer x24',\n 'price' => 1999,\n 'currency' => 'EUR',\n 'created_at' => DB::raw('CURRENT_TIMESTAMP'),\n 'updated_at' => DB::raw('CURRENT_TIMESTAMP'),\n ]);\n }", "title": "" }, { "docid": "1a661e3c68b00aab559fe0792729bdfa", "score": "0.7750661", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\indicadores::class, 50)->create()->each(function ($indicadores) {\n $indicadores->tipo_id()->save(factory(App\\tipo::class)->make());\n });\n }", "title": "" }, { "docid": "cb13c73a32f5f81d9840ca37255dfe68", "score": "0.774903", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //create default user\n \tDB::table('users')->insert([\n \t\t'name' => 'Christian Rosandhy',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('123456'), //Hash default laravel\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n\n \t//create example dummy post\n \tDB::table('post')->insert([\n \t\t'title' => 'Post Example Title',\n \t\t'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, dignissimos magnam eum voluptate saepe quis iste. Dolor aliquid, et beatae.',\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n \tDB::table('post')->insert([\n \t\t'title' => 'Another Title',\n \t\t'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, odit ab ea labore distinctio aut quam commodi deserunt expedita repudiandae nostrum. Illo aliquid, nemo quos maiores eos nostrum accusamus odit.',\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n }", "title": "" }, { "docid": "4947b62035e447361c6545d854cf992b", "score": "0.7748853", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => \"Luiz Otávio Rodrigues\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('users')->insert([\n 'name' => \"Geisibel Ramos\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('users')->insert([\n 'name' => \"André Vitebo\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('types')->insert([\n 'name' => \"Escolha Unica\",\n ]);\n DB::table('types')->insert([\n 'name' => \"Escolha Multipla\",\n ]);\n }", "title": "" }, { "docid": "5a9fc5195b15679581362e881c52240f", "score": "0.7747358", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('users')->delete();\n\n $users = array(\n \t['uname' => 'BluePrint', 'email' => '[email protected]', 'password' => 'temp'],\n \t['uname' => 'Howken', 'email' => '[email protected]', 'password' => 'temp']\n );\n\n // Uncomment the below to run the seeder\n DB::table('users')->insert($users);\n }", "title": "" }, { "docid": "390d111bc1635559242d183c3bf5278f", "score": "0.77467203", "text": "public function run()\n {\n // Seed the 2 user roles into the database.\n DB::table('user_role')->insert([\n 'name' => 'gebruiker'\n ]);\n DB::table('user_role')->insert([\n 'name' => 'administrator'\n ]);\n\n // Create an admin account\n DB::table('users')->insert([\n 'userRole' => '2',\n 'firstName' => 'admin',\n 'lastName' => 'admin',\n 'studentNumber' => '12345678',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n // Fill the database with random users.\n factory(App\\User::class, 50)->create()->each(function ($user) {});\n }", "title": "" }, { "docid": "a147f8a51837f71221c23210594445e5", "score": "0.7745889", "text": "public function run()\n {\n //没有弄数据工厂 直接使用是不行的\n //factory(\\App\\Article::class,5)->create();\n //https://github.com/fzaninotto/Faker\n $faker = Faker\\Factory::create(); //生成一个实例\n DB::table('articles')->insert([\n 'title' => $faker->title, //这个title是指标签 并不是指标题\n 'intro' => $faker->word,\n 'content' => $faker->paragraph,\n 'published_at' => \\Carbon\\Carbon::now()\n ]);\n }", "title": "" }, { "docid": "6b85b8debf03b969ec9a47557892cc2f", "score": "0.7741882", "text": "public function run()\n {\n //delete all data.\n //DB::statement('SET CONSTRAINTS ALL DEFERRED;');\n// Answer::truncate();\n //DB::statement('SET CONSTRAINTS ALL IMMEDIATE;');\n\n $faker = Faker\\Factory::create(\"ja_JP\");\n\n $questions = \\App\\Question::all();\n\n foreach ($questions as $q) {\n $answer = Answer::create([\n \"question_id\" => $q->id,\n \"text\" => $faker->text($maxNbChars = 20),\n ]);\n $answer->save();\n }\n }", "title": "" }, { "docid": "14f4502d7510513e57b886a9741f6f9a", "score": "0.77397126", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::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 User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => 'password',\n 'urlImage' => $faker->imageUrl($width = 300, $height = 300)\n ]);\n }\n }", "title": "" }, { "docid": "78c25d822f8fcd9980407ceac5f94ac6", "score": "0.7737599", "text": "public function run()\n {\n \\App\\Models\\User::factory(100)->create();\n \\App\\Models\\NewsCategory::factory(5)->create();\n \\App\\Models\\KindOfNews::factory(5)->create();\n\n $this->call([\n\t BrandsTableSeeder::class,\n UsersTableSeeder::class,\n\t CategoriesTableSeeder::class,\n\t ProductsTableSeeder::class,\n\t ImageTableSeeder::class,\n NewsTableSeeder::class,\n StatusTableSeeder::class,\n ProvincesTableSeeder::class,\n DistrictsTableSeeder::class,\n WardsTableSeeder::class,\n RevenueTableSeeder::class,\n ]);\n \\App\\Models\\Comment::factory(600)->create();\n \\App\\Models\\Slide::factory(2)->create();\n }", "title": "" }, { "docid": "759c59838d104fbdc111725a197a71f5", "score": "0.77345306", "text": "public function run()\n {\n $blogFaker = Faker::create();\n $min_user_id = DB::table('users')->min('id');\n $max_user_id = DB::table('users')->max('id');\n $user_id = rand($min_user_id,$max_user_id); // generating a random user id to be use on Faker\n //seeding blog_models Table\n foreach (range(1,30) as $index) {\n DB::table('blog_models')->insert([\n 'title' => $blogFaker->title,\n 'blog_description' => 'Blog description',\n 'user_id' => $user_id\n ]);\n }\n\n\n //seeding users Table\n DB::table('users')->insert([\n 'name'=>Str::random(10),\n 'email'=>Str::random(10).'@gmail.com',\n 'password'=>Str::random(10)\n ]);\n\n }", "title": "" }, { "docid": "5ddebd551a1747c3f86d747756748099", "score": "0.77317834", "text": "public function run()\n {\n //$this->call(UserSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(DisctrictSeeder::class);\n $this->call(ClientSeeder::class);\n $this->call(ProvinciaSeeder::class);\n $this->call(TipoPagoSeeder::class);\n\n \\App\\Models\\Product::factory(50)->create();\n Motorizado::factory(10)->create();\n Pedido::factory(400)->create();\n $this->call(PedidoSeeder::class);\n $this->call(ImageSeeder::class);\n }", "title": "" }, { "docid": "30e1f0977628b8f69a6f41ca53787d31", "score": "0.77316725", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n \n // Create 5 records\n for ($i = 0; $i < 5; $i++) {\n Item::create([\n 'name' => $faker->firstName,\n 'color' => $faker->rgbCssColor,\n 'ShippingCost' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2)\n ]);\n }\n }", "title": "" }, { "docid": "c5dd116e4598e2886f4b456ab6a3745d", "score": "0.7731391", "text": "public function run()\n {\n $this->call(ItemSeeder::class);\n\n DB::table('users')->truncate();\n\n $user = User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'is_admin' => True,\n ]);\n\n $user = User::create([\n 'name' => 'user1',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'is_admin' => False,\n ]);\n\n $this->call(OrderSeeder::class);\n $this->call(OrderedItemSeeder::class); \n $this->call(CategorySeeder::class); \n\n Item::all()->each(function ($item) {\n $ids = Category::all()->random(rand(1,Category::count()))->pluck\n ('id')->toArray();\n $item->categories()->attach($ids);\n\n });\n\n \n\n }", "title": "" }, { "docid": "08eaf2e19291f76c747104be264bb86e", "score": "0.7730943", "text": "public function run()\n {\n $this->seedCategories();\n $this->seedMovies();\n $this->seedActors();\n }", "title": "" }, { "docid": "ac98c07de7f448c43d8cd04f5b7cf375", "score": "0.7728929", "text": "public function run()\n {\n \n ///Eloquent::unguard();\n //$this->call('UsersTableSeeder'::Class);\n\n //user table seed\n DB::table('users')->delete();\n $users = array(\n array(\n\n 'name'=>'Admin User',\n 'password'=> Hash::make('admin1'),\n 'email'=>'[email protected]',\n )\n );\n\n DB::table('users')->insert($users);\n\n //vehicle table seed\n DB::table('vehicle')->delete();\n $vehicle = array(\n array(\n\n 'name'=>'Admin User',\n 'contactnumber'=> 719977232,\n 'email'=>'[email protected]',\n 'manufacture'=>'Volkswagon',\n 'type'=>'Polo',\n 'year'=>2010,\n 'colour'=>'White',\n 'mileage'=> 12000,\n 'created_at'=>date('Y-M-D h:m:s'),\n )\n );\n\n DB::table('vehicle')->insert($vehicle);\n }", "title": "" }, { "docid": "c1498193b69425fc2ad9300a42572dd3", "score": "0.7728553", "text": "public function run()\n {\n // removes previously created data\n \\App\\User::truncate();\n \\App\\Todo::truncate();\n\n // seeds the database\n factory(\\App\\User::class, 20)->create();\n factory(\\App\\Todo::class, 60)->create();\n }", "title": "" }, { "docid": "1db1d3897b4fa92b0187c48f545a59a1", "score": "0.77277166", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(UsersSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(ArticulosSeeder::class);\n $this->call(ArticuloCategoriaSeeder::class);\n\n Articulo::factory()->count(55)->create();\n\n\n\n }", "title": "" }, { "docid": "857343b3f1f9be61d656bcb899727c9d", "score": "0.7726611", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\Blog',100)->create();\n factory('App\\client',50)->create();\n factory('App\\App_Services',10)->create();\n factory('App\\Msg',30)->create();\n }", "title": "" }, { "docid": "b13076b4062ba89b35a625f899bbb96f", "score": "0.772651", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 8',\n 'price' => '22000',\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 11',\n 'price' => '31000',\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 11 pro',\n 'price' => '39000',\n ]);\n }", "title": "" }, { "docid": "51e41d2883ea3afa0a3f136436d8b297", "score": "0.7726129", "text": "public function run()\n {\n $user_ids = ['1'];\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(Article::class)->times(50)->make()->each(function ($articles) use ($faker, $user_ids) {\n $articles->user_id = $faker->randomElement($user_ids);\n });\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "33a330b6e5aa3b365ffb9df8e8361a48", "score": "0.7725176", "text": "public function run()\n {\n // \\App\\Models\\User::factory()->create();\n \\App\\Models\\Role::factory()->create();\n // \\App\\Models\\Profile::factory()->create();\n // \\App\\Models\\ContentSection::factory(3)->create();\n // \\App\\Models\\Language::factory(1)->create();\n\n $this->call([\n ContentSectionSeeder::class,\n ]);\n\n $this->call([\n LanguageSeeder::class,\n ]);\n }", "title": "" }, { "docid": "342d48d9c10a6f82d2ab72419a6764dd", "score": "0.77239937", "text": "public function run()\n {\n //\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Role::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Role::create([\n 'role_name' => 'admin',\n ]);\n Role::create([\n 'role_name' => 'etudiant',\n ]);\n Role::create([\n 'role_name' => 'enseignant',\n ]);\n }", "title": "" }, { "docid": "5089a000911f524c7758cc800589f1a0", "score": "0.77177197", "text": "public function run()\n {\n\n $this->call(LanguageSeeder::class);\n\n\n\n factory(App\\User::class)->create([\n 'name' => 'Eslam Fakhry',\n 'email' => '[email protected]',\n 'bio' => 'Full-stack web developer',\n ]);\n factory(App\\User::class, 20)->create();\n\n\n $this->call(BookSeeder::class);\n\n\n factory(App\\Review::class, 100)->create([\n 'reviewer_id' => function () {\n return \\App\\User::inRandomOrder()->first()->id;\n },\n 'book_id' => function () {\n return \\App\\Book::inRandomOrder()->first()->id;\n },\n 'language_id' => function () {\n return \\App\\Language::inRandomOrder()->first()->id;\n },\n ]);\n\n \\App\\User::find(1)->followings()->sync([2, 3, 4, 8, 10, 20, 8]);\n\n }", "title": "" }, { "docid": "6e1a2b00c8e9ea2d0430a94dd2dc07a6", "score": "0.77159035", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Deputy_Director::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker=Faker::create();\n $fakerS=Faker::create('es_ES');\n\n\n $genders = Gender::all()->pluck('id')->toArray();\n $document_types = Document_Type::all()->pluck('id')->toArray();\n\n\n for($i=0;$i<=19;$i++){\n\n $name= $faker->firstName.\" \".$faker->firstName;\n $lname= $faker->lastName;\n $var = explode(\" \", $name);\n $email= strtolower($var[0][0].$var[1][0].$lname).$faker->numberBetween($min=1,$max=20).\"@misena.edu.co\";\n\n Deputy_Director::create([\n 'document_type_id'=>$faker->randomElement($document_types),\n 'gender_id'=>$faker->randomElement($genders),\n 'deputy_director_names'=>$name,\n 'deputy_director_lastnames'=> $lname,\n 'document_number'=>$fakerS->unique()->dni,\n 'phone_number'=>$fakerS->mobileNumber,\n 'email'=>$email,\n 'digital_firm'=>'tmp/firms/'.bcrypt($faker->word).'.jpg',\n 'created_at'=>Carbon::now(),\n 'updated_at'=>Carbon::now()\n ]);\n }\n }", "title": "" }, { "docid": "86140c23beade708078da92aa5df55e1", "score": "0.7714966", "text": "public function run()\n {\n \\App\\Models\\User::create([\n 'name' => 'Admin',\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'is_admin' => true\n ]);\n \n $user = \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Category::create([\n 'name' => 'Lifestyle',\n 'slug' => 'lifestyle'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'Home',\n 'slug' => 'home'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'World',\n 'slug' => 'world'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'Sports',\n 'slug' => 'sports'\n ]);\n\n Category::all()->each(function($category) use ($user){\n return \\App\\Models\\Post::factory(5)->create([\n 'user_id' => rand(1,9),\n 'category_id' => $category->id\n ])->each(fn($post) => \\App\\Models\\Comment::factory(3)->create(['post_id' => $post->id]));\n });\n\n \\App\\Models\\Category::factory(30)->create();\n }", "title": "" }, { "docid": "59f955bedb8a711f268867709f8dea81", "score": "0.7714579", "text": "public function run()\n {\n DB::table('users')->insert([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'email_verified_at' => '2020-1-1 23:59:59',\n 'password' => Hash::make('12345678'),\n 'role' => '2',\n 'phone'=> '0123456789',\n 'address' => \"Ha Noi\"\n ]);\n\n $this->call(CategorySeeder::class);\n $this->call(UserSeeder::class);\n $this->call(PostSeeder::class);\n $this->call(CommentSeeder::class);\n\n\n }", "title": "" }, { "docid": "c821d4627c62beb0b71b0abb66435065", "score": "0.77121747", "text": "public function run()\n {\n \t$this->seedPresencesTable();\n \t#$this->seedFamillesTable();\n \t#$this->seedReponsesTable();\n }", "title": "" }, { "docid": "7efff028f8bcd73672942f6e64f55cb8", "score": "0.7711514", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Hotel::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // Create Hotels in our database:\n for ($i = 0; $i < 3; $i++) {\n Hotel::create([\n 'name' => $faker->name,\n 'address' => $faker->text,\n 'city' => $faker->city,\n 'state' => $faker->state,\n 'country' => $faker->country,\n 'zipcode' => $faker->text,\n 'phonenumber' => $faker->PhoneNumber,\n 'email' => $faker->email,\n 'image' => $faker->Image,\n ]);\n }\n }", "title": "" }, { "docid": "153c1f8bdfd59fce12788f6d5d7d6c36", "score": "0.77101886", "text": "public function run()\n {\n $this->call([\n CategorySeeder::class,\n UserTableSeeder::class\n ]);\n PostFactory::factoryForModel(Post::class)->count(12)->create();\n ProjectFactory::factoryForModel(Project::class)->count(12)->create();\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "c3a88275c1c72240c6d83f192871cfe3", "score": "0.7710164", "text": "public function run()\n {\n //\n $faker = Faker\\Factory::create();\n\n //\n foreach (range(1,20) as $index) {\n DB::table('el_news')->insert([\n 'title' => $faker->sentence(),\n 'content' => $faker->paragraph(50),\n 'description' => $faker->paragraph(50),\n 'type' => 1,\n 'image' => '',\n 'views' => 1,\n 'status' => 1,\n 'category_id' => $faker->randomElement(\\Modules\\News\\Entities\\NewsCategory::pluck('id')->toArray()),\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => date('Y-m-d H:I:s'),\n 'updated_at' => date('Y-m-d H:I:s'),\n ]);\n }\n }", "title": "" }, { "docid": "5281e1bc8fae384813e91026d075e658", "score": "0.77091146", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // for disable foreign key for some time\n\n User::truncate();\n Post::truncate();\n Comment::truncate();\n\n User::flushEventListeners();\n Post::flushEventListeners();\n Comment::flushEventListeners();\n\n factory(User::class,1000)->create();\n factory(Post::class,3000)->create();\n factory(Comment::class,5000)->create();\n }", "title": "" }, { "docid": "f8b16a91635feff9b0eed8613162a30c", "score": "0.77088976", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Doctor')->create(['nip' => 'doc', 'password' => bcrypt('123456')]);\n factory('App\\Patient')->create(['nip' => 'pat', 'password' => bcrypt('123456')]);\n factory('App\\Staff')->create(['nip' => 'stf', 'password' => bcrypt('123456')]);\n }", "title": "" }, { "docid": "bb1ac66935520f1e65bc2c3e57ceeb96", "score": "0.77083236", "text": "public function run()\n {\n // Truncate tables\n Schema::disableForeignKeyConstraints();\n DB::table(\"categories\")->truncate();\n DB::table(\"comments\")->truncate();\n DB::table(\"images\")->truncate();\n DB::table(\"password_resets\")->truncate();\n DB::table(\"posts\")->truncate();\n DB::table(\"tags\")->truncate();\n DB::table(\"users\")->truncate();\n DB::table(\"videos\")->truncate();\n Schema::enableForeignKeyConstraints();\n\n // User with same address\n App\\User::factory()->create([\n 'email' => \"[email protected]\"\n ]);\n // Create random data\n App\\User::factory()->count(20)->create();\n App\\Modele\\Category::factory()->count(10)->create();\n App\\Modele\\Post::factory()->count(250)->create();\n App\\Modele\\Tag::factory()->count(50)->create();\n App\\Modele\\Image::factory()->count(200)->create();\n App\\Modele\\Video::factory()->count(50)->create();\n App\\Modele\\Comment::factory()->count(1500)->create();\n }", "title": "" }, { "docid": "317c20db1e0b5a1227665f31230ccfc2", "score": "0.770664", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Department::truncate();\n \n $faker = \\Faker\\Factory::create();\n $departments = [\n 'Sales',\n 'Customer care',\n 'ping pong training',\n 'management',\n 'package repair'\n ];\n\n for ($I1 = 0; $I1 < 100; $I1++){\n Department::create([\n 'name' => $departments[$I1 % 5],\n 'head' => $faker->name,\n 'location' => $fake->city\n ]);\n }\n\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "53a3c8a23a49f26ca26290c5746850bc", "score": "0.7704476", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n //delete all data on each table on any call\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n //The quantities of factories to create\n $userQuantity = 200;\n $categoryQuantity = 30;\n $productQuantity = 1000;\n $transactionQuantity = 1000;\n\n //Use factory helper to create the data\n factory(User::class, $userQuantity)->create();\n factory(Category::class, $categoryQuantity)->create();\n factory(Product::class, $productQuantity)->create()->each(function($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n factory(Transaction::class, $transactionQuantity)->create();\n }", "title": "" }, { "docid": "f6f8b18092f343eec722788678235929", "score": "0.77022856", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n\n //Liga::factory()->has(Equipo::factory()->count(8))->create();\n\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n\n }", "title": "" }, { "docid": "a922d59f300416d258d2970e78be71ed", "score": "0.77017814", "text": "public function run() {\n\t\t//Model::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n DB::table('articles')->delete();\n \n $articles = array(\n ['titulo' => 'Project 1', 'conteudo' => 'project-1', 'autor' => 'Leonardo', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['titulo' => 'Project 2', 'conteudo' => 'project-2', 'autor' => 'Fernanda', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['titulo' => 'Project 3', 'conteudo' => 'project-3', 'autor' => 'Leonardo', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n\n // Uncomment the below to run the seeder\n DB::table('articles')->insert($articles);\n\t}", "title": "" }, { "docid": "c4ea649d992a2f46320661ff70d8946c", "score": "0.77015346", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(SpecialsTableSeeder::class);\n //MedicalCard::factory(10)->create();\n $user = User::factory(1)->create()->each(function ($user){\n Member::factory()->create([\n 'user_id'=>$user->id,\n 'id_card'=>null,\n 'id_spec'=>null,\n ]);\n });\n foreach ($user as $userWithoutRole){\n $userWithoutRole->assignRole('admin');\n }\n //Member::factory(10)->create();\n //Meet::factory(10)->create();\n //Recipe::factory(10)->create();\n //Appointment::factory(10)->create();\n //Time::factory(10)->create();\n }", "title": "" }, { "docid": "a32483a969494071a38b045c323d0f50", "score": "0.77011496", "text": "public function run()\n {\n\n\t\tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('questions')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,100) as $key => $value ) {\n \t\tQuestion::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(1),\n \t\t'cour_id'=>$faker->randomElement($cours) ,\n \t\t//'type'=>$faker->randomElement(['one'=>'one' , 'multiple'=>'multiple']) ,\n 'type'=>$faker->randomElement(['multiple'=>'multiple']) ,\n \t\t'score'=>$faker->numberBetween( 0, 100) ,\n 'pass'=>$faker->paragraph(1),\n 'fail'=>$faker->paragraph(1),\n 'partial'=>$faker->paragraph(1),\n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "1931281363962728676ce211cdbc898c", "score": "0.77004915", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(20)->create();\n // \\App\\Models\\Product::factory(100)->create();\n \\App\\Models\\Slider::factory(30)->create();\n // $this->call(ProductCategorySeeder::class);\n // $this->call(SizeSeeder::class);\n // $this->call(ProductSizeSeeder::class);\n // $this->call(ShippingMethodSeeder::class);\n // $this->call(RegionSeeder::class);\n\n }", "title": "" }, { "docid": "869b86c9673e17509719354cadb4e6ee", "score": "0.76994365", "text": "public function run()\n {\n factory(User::class, 10)->create()->each(function($user) {\n $user->articles()->saveMany(factory(Article::class, rand(1,6))->make());\n });\n factory(Category::class, 5)->create();\n\n// $this->call(UsersTableSeeder::class);\n// $this->call([\n// UserTableSeeder::class,\n// ArticlesTableSeeder::class,\n// ]);\n }", "title": "" }, { "docid": "ac903ce5d99a599c602b0990b0103290", "score": "0.7698475", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('groups')->delete();\n\n $projects = array(\n ['id'=> 1, 'name' => \"txtcmdr\"],\n ['id'=> 2, 'name' => \"duterte\"],\n ['id'=> 3, 'name' => \"baligod\"],\n ['id'=> 4, 'name' => \"marcos\"]\n );\n\n // Uncomment the below to run the seeder\n DB::table('projects')->insert($projects);\n }", "title": "" }, { "docid": "b9a88949d87e4830da37107328024747", "score": "0.76979405", "text": "public function run()\n {\n $this->seedSettings();\n $this->seedUsers();\n }", "title": "" }, { "docid": "87a0832df706dd20db820b1e2fab0c9c", "score": "0.7697926", "text": "public function run()\n {\n DB::table('users')->insert([\n \t'id' => '1',\n 'name' => 'Super Admin',\n 'email' => '[email protected]',\n 'role' => '1',\n 'password' => bcrypt('superadmin')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '2',\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'role' => '2',\n 'password' => bcrypt('admin123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '3',\n 'name' => 'Teacher',\n 'email' => '[email protected]',\n 'role' => '3',\n 'password' => bcrypt('teacher123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '4',\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'role' => '4',\n 'password' => bcrypt('student123')\n ]);\n\n $faker = Faker::create();\n \n \tforeach(range(5,20) as $i){\n \n \t DB::table('users')->insert([\n 'id' => $i,\n \t\t\t'name' => $faker->name,\n \t\t\t'email' => $faker->email,\n \t\t\t'role' => $faker->numberBetween(1,4),\n 'password' => bcrypt('password'),\n \t\t]);\n \n \t}\n }", "title": "" }, { "docid": "aa53f1c5fb430766e7a98e469ae64e55", "score": "0.769578", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /*DB::table('ambitos')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => bcrypt('secret'),\n ]);*/\n\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Laboratorios',\n ]\n );\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Inspección',\n ]\n );\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Certificación',\n ]\n );\n }", "title": "" }, { "docid": "dfd6d8c639638a96be0cadeef15562d9", "score": "0.76953965", "text": "public function run()\n {\n\n // factory(App\\User::class, 3)->create()->each(function($u) {\n // $u->questions()\n // ->saveMany(\n // factory(App\\Models\\Question::class, rand(1, 5))->make()\n // )->each(function ($q){\n // $q->answers()->saveMany(\n // factory(App\\Models\\Answer::class,rand(1,5))->make()\n // );\n // });\n // });\n // $this->call(UsersTableSeeder::class);\n //factory(App\\User::class,5)->create();\n //factory(Question::class,30)->create();\n // factory(App\\User::class,3)->create()->each(function($user){\n // $user->questions()\n // ->saveMany(\n // factory(Question::class)->make()\n // );\n // });\n // factory(App\\Models\\Question::class,20)->create();\n // $this->call([\n // UsersQuestionsAnswersTableSeeder::class,\n // FavoritesTableSeeder::class,\n // VotablesTableSeeder::class\n // ]);\n }", "title": "" }, { "docid": "27c99873266cde824f7337394289d5ba", "score": "0.7694441", "text": "public function run()\n {\n factory(Users::class, 1)->create(['name' => 'Maria', 'email' => '[email protected]']);\n\n factory(Users::class, 6)->create();\n\n //Fazendo seeds ao modo antigo\n /*$dados = [\n [\n 'id' => '1', \n 'name' => 'Maria',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'user_name' => 'Mariajog',\n 'language_id' => '1',\n 'user_type' => 'internal',\n 'entity_id' => NULL\n ],\n [\n 'id' => '2', \n 'name' => 'Jose',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'user_name' => 'Jose',\n 'language_id' => '1',\n 'user_type' => 'internal',\n 'entity_id' => NULL\n ]\n ];\n\n foreach ($dados as $value) {\n Users::create($value);\n }*/\n }", "title": "" }, { "docid": "50bfbb81e7f0b2cada39621bf4b75676", "score": "0.7692319", "text": "public function run()\n {\n // faker基本使用\n /*$faker = Faker\\Factory::create();\n $data = [];\n for ($i=1;$i<10;$i++) {\n $data[] = [\n 'title'=>$faker->name,\n 'desc'=>$faker->sentence\n ];\n }\n DB::table('articles')->insert($data);*/\n\n //使用faker数据工厂模拟数据\n factory(\\App\\Models\\ArticleModel::class, 20)->create();\n }", "title": "" }, { "docid": "44a48d15b3281fa6fbc422f22f3822ad", "score": "0.7691214", "text": "public function run()\n {\n $this->call([\n UsersTableSeeder::class,\n Users_ProfileTableSeeder::class,\n BlogSeeder::class,\n BookStoreSeeder::class,\n CategoryTableSeeder::class,\n AdvertisementSeeder::class,\n InterestTableSeeder::class,\n RelationshipTableSeeder::class,\n SkillTableSeeder::class,\n SubjectTableSeeder::class,\n UserMediaSeeder::class,\n\n\n\n ]);\n\n // User::factory(50)->create();\n // Advertisement::factory(100)->create();\n // UserMedia::factory(100)->create();\n // Book_Store::factory(100)->create();\n // Blog::factory(100)->create();\n\n\n }", "title": "" }, { "docid": "e4eee217bbf7d32481fc105c3b5751a3", "score": "0.76893795", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $key => $index) {\n PostCategory::create([\n 'category_id' => $faker->numberBetween($min = 1, $max = 5),\n 'post_id' => $faker->numberBetween($min = 1, $max = 5),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ]);\n }\n }", "title": "" }, { "docid": "fcb394d31b8bc02eaf3d748869eb0952", "score": "0.7688843", "text": "public function run()\n {\n\n $this->call([\n PermissionSeeder::class,\n RatingSeeder::class\n ]);\n Post::query()->delete();\n User::query()->delete();\n User::factory(1)\n ->create()\n ->each(function ($user) {\n $user->assignRole('admin');\n });\n User::factory(1)\n ->create()\n ->each(function ($user) {\n $user->assignRole('moderator');\n });\n User::factory(3)\n ->create()\n ->each(function ($user) {\n $user->assignRole('author');\n });\n User::factory(10)\n ->create()\n ->each(function ($user) {\n $user->assignRole('reader');\n });\n Post::factory(30)->create();\n }", "title": "" }, { "docid": "c1cba4ba964267e60436752e1daf7256", "score": "0.7688797", "text": "public function run(): void\n {\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'DE',\n 'language_code' => 'de',\n 'author_id' => random_int(1, 5),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'US',\n 'language_code' => 'en',\n 'author_id' => random_int(6, 10),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'FR',\n 'language_code' => 'fr',\n 'author_id' => random_int(11, 15),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'CH',\n 'language_code' => 'de',\n 'author_id' => random_int(16, 20),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'CH',\n 'language_code' => 'fr',\n 'author_id' => random_int(11, 20),\n ]);\n }", "title": "" }, { "docid": "4a0c4ba7e38375d8b1a0bdcf318313bd", "score": "0.76850325", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('review')->truncate();\n\n $data = [];\n\n foreach (range(1,10) as $value){\n $data[] = [\n 'id'=>$value,\n \"code_id\"=>$value,\n \"user_id\"=>1,\n \"company_id\"=>1\n ];\n\n }\n\n DB::table('review')->insert($data);\n }", "title": "" }, { "docid": "7d0e99ebf59b9e7e65637b3d9c38bddb", "score": "0.76849854", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n factory(MenuGroup::class, 5)->create()->each(function ($group) {\n $group->items()->createMany(factory(MenuItem::class, 2)->make()->toArray());\n });\n\n factory(MenuItem::class, 5)->create();\n\n $this->call(PostsTableSeeder::class);\n }", "title": "" }, { "docid": "de8bed7f0641273ac93ceebe6aee2ba9", "score": "0.7684196", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\tDB::table('users')->delete();\n\n\t\t$faker = \\Faker\\Factory::create('es_AR');\n\n\t\tforeach(range(0, 10) as $index)\n\t\t{\n\t\t\tUser::create([\n\t\t\t\t'nombres' => $faker->firstName,\n\t\t\t\t'apellidos' => $faker->lastName,\n\t\t\t\t'direccion' => $faker->address,\n\t\t\t\t'telefono' => $faker->phoneNumber,\n\t\t\t\t'celular' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 12345,\n\t\t\t]);\n\n\t\t\tProduct::create([\n\t\t\t\t'codigo' => $faker->uuid,\n\t\t\t\t'marca' => $faker->company,\n\t\t\t\t'modelo' => $faker->md5,\n\t\t\t\t'cantidad' => $faker->numberBetween(1, 100),\n\t\t\t]);\n\t\t}\n\n\t\tRole::create([\n\t\t\t'name' => 'Administrator',\n\t\t\t'detail' => 'Administrador de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Seller',\n\t\t\t'detail' => 'Vendedor de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Client',\n\t\t\t'detail' => 'Cliente de la tienda'\n\t\t]);\n\t}", "title": "" }, { "docid": "6cefa488bb7f414dd43c39041af00a3b", "score": "0.76809907", "text": "public function run()\n {\n //How to create multiple data for a table\n // $this->call(UsersTableSeeder::class);\n // DB::table('names')->insert(\n // [\n // 'name'=>str_random(10),\n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret'),\n // ]\n // );\n\n factory(App\\User::class,50)->create();\n $this->call(TestSeeder::class);\n\n //we can call multiple seeders here\n\n //to seed only a single seeder use\n //php artisan db:seed --class=TestSeeder\n }", "title": "" }, { "docid": "44ec12a31cf67e6e0e55dc0fd46fa7fd", "score": "0.76787496", "text": "public function run()\n\t{\n\t\t$faker = $this->getFaker();\n\t\t$users = NULL;\n\n\n\t\t// Uncomment the below to wipe the table clean before populating\n\t\tDB::table('users')->truncate();\n\n\n\t\t// Default user\n\t\t$users[] = array('username' => 'admin', 'email' => '[email protected]', 'password' => Hash::make('1234'), 'status' => 'Active');\n\n\t\t// Random users\n\t\tfor($i=0; $i<5; $i++)\n\t\t{\n\t\t\t$users[] = array('username' => strtolower($faker->firstname) ,\n\t\t\t\t 'email' => $faker->email,\n\t\t\t\t 'password' => Hash::make('1234'),\n\t\t\t\t 'status' => 'Active');\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('users')->insert($users);\n\t}", "title": "" } ]
ebc87f9b26fb77763eeadd2245a56a70
Test 'reload' method, if empty document is fetched
[ { "docid": "df737f2940d940a7b23a0d12f78640d8", "score": "0.8361404", "text": "public function testReloadEmpty()\n {\n $document = $this->createPartialMock(TestDocumentMetaSearch::class, []);\n $collection = $this->createMock(Collection::class);\n $document::$collectionMock = $collection;\n\n $document->id = 'a';\n $collection->expects($this->once())->method('findOne')->with(['_id' => 'a'])->willReturn(null);\n\n $result = $document->reload();\n\n $this->assertSame(false, $result);\n }", "title": "" } ]
[ { "docid": "d20572b05423b84a53ef14c0dd0d086d", "score": "0.6291263", "text": "public function reload(): bool {\n\t\t$idField = static::getIDField();\n\t\t$options = ['where' => $idField . '=' . $this->$idField, 'output' => SqlAdapter::ARR_FIRST];\n\t\ttry {\n\t\t\t$data = static::get($options);\n\t\t} catch( SqlException $e ) {\n\t\t\t$data = null;\n\t\t}\n\t\tif( !$data ) {\n\t\t\t$this->markAsDeleted();\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t$this->setData($data);\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "837b66af94c99b5c3ef18b4ff67b38fc", "score": "0.5955986", "text": "public function refresh(){\n $keys = static::getKeys();\n $db = static::getDatabase();\n $db = $db->table(static::getTableName());\n for ($i = 0; $i < count($keys); $i++) {\n $db = $db->where($keys[$i], '=', $this->data[$keys[$i]]);\n }\n $result = $db->selectOne();\n \n if ($result !== null) {\n $this->data = $result;\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "7f03d65afc8fc1d20fd6842b76fed31d", "score": "0.57881814", "text": "protected function maybe_reload_fields() {\n if (count($this->fields) === 0) {\n $this->reload_fields();\n }\n }", "title": "" }, { "docid": "1be73eabc4f63492afb34b47aebd63b4", "score": "0.5777238", "text": "public function reload()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$id = $this->id();\n\t\t\t\n\t\t\t$reloaded_instance = static::load($id, ['use_cache' => false]);\n\t\t\t$this->setDataArray($reloaded_instance->getDataArray());\n\t\t}\n\t\tcatch(\\Exception $e)\n\t\t{\n\t\t\tif($e->getCode() === static::ERROR_RECORD_NOT_FOUND)\n\t\t\t{\n\t\t\t\t$classname = get_called_class();\n\t\t\t\tthrow new \\Exception(\"$classname #$id could not be found in database anymore\", static::ERROR_RECORD_NOT_FOUND);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "da1118e581d0f7b473a4c3438ab49bb5", "score": "0.55819", "text": "function reload() {\n $rows = self::lookup(\"id = :id\", ['id'=>$this->id], [], static::$table);\n if (!$rows) return false;\n $this->name = $rows[0]->name;\n $this->condition_type = $rows[0]->condition_type;\n $this->stock = $rows[0]->stock;\n $this->price = $rows[0]->price;\n $this->description = $rows[0]->description;\n $this->created_date = $rows[0]->created_date;\n $this->suspention = $rows[0]->suspention;\n $this->dealer_id = $res[0]->dealer_id;\n $this->delivery_type_id = $res[0]->delivery_type_id;\n return true;\n }", "title": "" }, { "docid": "f104ebd603263ba7544bfb96d8934919", "score": "0.5559872", "text": "function testClearIndex() {\n\t\t$this->ApiClass->clearIndex();\n\t\t$result = $this->ApiClass->find('all');\n\t\t$this->assertFalse((bool)$result);\n\t}", "title": "" }, { "docid": "57bb2eb77a19bb210e9dd325bfec58d6", "score": "0.55300784", "text": "public function reload(): void;", "title": "" }, { "docid": "9b09f32c9b1c940fea4ae8d99f3cbe4b", "score": "0.5527829", "text": "public function reload()\n {\n }", "title": "" }, { "docid": "889eaf70475d274a83e6cfc2ee77d076", "score": "0.548017", "text": "public function reload();", "title": "" }, { "docid": "889eaf70475d274a83e6cfc2ee77d076", "score": "0.548017", "text": "public function reload();", "title": "" }, { "docid": "889eaf70475d274a83e6cfc2ee77d076", "score": "0.548017", "text": "public function reload();", "title": "" }, { "docid": "889eaf70475d274a83e6cfc2ee77d076", "score": "0.548017", "text": "public function reload();", "title": "" }, { "docid": "d0f8ab09da97758981835f1a8e843224", "score": "0.5469768", "text": "public function refresh(): void {\n $data = [];\n if ($this->id !== null) $data['visitor_id'] = $this->id;\n if ($this->uuid !== null) $data['visitor_uuid'] = $this->uuid;\n\n // if still empty, cannot fetch, inadequate data\n if ($data === []) return;\n\n // fetch from db\n $i = $this->model->asArray()->where($data)->first();\n if (!is_array($i)) return;\n $this->id = intval(keyornull($i, 'visitor_id'));\n $this->uuid = keyornull($i, 'visitor_uuid');\n $this->token = keyornull($i, 'visitor_token');\n $this->contactId = intval(keyornull($i, 'contact_id'));\n }", "title": "" }, { "docid": "883ac7a07712686984820766202ff8f0", "score": "0.5425352", "text": "public function refreshPartialInstance(): bool {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8351d7c6d6635e5b109c801815461a34", "score": "0.54223657", "text": "public function testSavingToAPreviouslyEmptyJoinUpdatesView()\n {\n $tripod = new \\Tripod\\Mongo\\Driver(\"CBD_testing\",\"tripod_php_testing\",array(\n \"defaultContext\"=>\"http://talisaspire.com/\",\n \"async\"=>array(OP_VIEWS=>false)\n ));\n\n // should be no triples with \"http://basedata.com/b/sequence123\" as subject in existing view\n $view = $tripod->getViewForResource(\"http://basedata.com/b/docWithEmptySeq123\",\"v_doc_with_seqeunce\");\n $this->assertTrue($view->has_triples_about(\"http://basedata.com/b/docWithEmptySeq123\"));\n $this->assertFalse($view->has_triples_about(\"http://schemas.talis.com/2005/user/schema#xyz\"));\n\n $newGraph = new \\Tripod\\ExtendedGraph();\n $newGraph->add_literal_triple(\"http://schemas.talis.com/2005/user/schema#xyz\",\"http://rdfs.org/sioc/spec/name\",\"Some name\");\n\n $tripod->saveChanges(new \\Tripod\\ExtendedGraph(),$newGraph);\n\n // should be triples with \"http://basedata.com/b/sequence123\" as subject in new view\n $view = $tripod->getViewForResource(\"http://basedata.com/b/docWithEmptySeq123\",\"v_doc_with_seqeunce\");\n $this->assertTrue($view->has_triples_about(\"http://basedata.com/b/docWithEmptySeq123\"));\n $this->assertTrue($view->has_triples_about(\"http://schemas.talis.com/2005/user/schema#xyz\"));\n }", "title": "" }, { "docid": "48cda0b11c38fc4418a4475c52efa15e", "score": "0.5417688", "text": "public function testClearCache()\n {\n $article = $this->Article->get(1000);\n $this->Article->updateColumn($article->id, 'title', 'not cached');\n $cached = $this->Article->get(1000);\n $this->assertEquals('Article #1', $cached->title);\n\n $this->Article->invalidateCache(false);\n $cached = $this->Article->get(1000);\n $this->assertEquals('not cached', $cached->title);\n }", "title": "" }, { "docid": "947354759ef9063f9bfef8d395001a66", "score": "0.5387559", "text": "public function runFullReindex($clearData = false);", "title": "" }, { "docid": "3d0fba80e6b92f58c525314bcd89e4ca", "score": "0.53762865", "text": "public function testFindAllEmptyCollection()\n {\n // reset fixtures since we already have some from setUp\n $this->loadFixturesLocal([]);\n $client = static::createRestClient();\n $client->request('GET', '/core/app/');\n\n $response = $client->getResponse();\n $results = $client->getResults();\n\n $this->assertResponseContentType(self::CONTENT_TYPE, $response);\n $this->assertResponseSchemaRel(self::SCHEMA_URL_COLLECTION, $response);\n\n $this->assertEquals([], $results);\n }", "title": "" }, { "docid": "e3bd14ac0663f67654ab746f46a84ab0", "score": "0.53260386", "text": "public function reload()\n {\n if ($this->client->indices()->exists(['index' => $this->name])) {\n $this->client->indices()->delete(['index' => $this->name]);\n }\n $this->create();\n }", "title": "" }, { "docid": "42897fdeb359a05c3ff619245c452c5a", "score": "0.5321162", "text": "public function testFetchEmpty()\n {\n $this->skip('abstract method');\n }", "title": "" }, { "docid": "30041d0dbbce334292febf812e4e7805", "score": "0.5293646", "text": "public function testSingleZero()\n {\n $qs = Person::objects()->filter('name', '=', 'Hrvoje');\n $qs->delete();\n\n $this->assertSame(0, $qs->count());\n $this->assertFalse($qs->exists());\n\n Person::objects()->filter('name', '=', 'Hrvoje')->single();\n }", "title": "" }, { "docid": "b422385e7700d5d156320d66fcbe60a5", "score": "0.52870566", "text": "public function testNoRefresh()\n {\n $this->kernel->expects($this->never())\n ->method('fetch')\n ;\n\n $refreshListener = new RefreshListener();\n $request = Request::create('http://example.com/foo');\n $event = new CacheEvent($this->kernel, $request);\n\n $refreshListener->handleRefresh($event);\n\n $this->assertNull($event->getResponse());\n }", "title": "" }, { "docid": "3ebd1aa771adbd943951a6ea8768be48", "score": "0.52866596", "text": "public function testFetchOne()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "e3ce2c9ebf862e01f78868aaeb2a739b", "score": "0.52580726", "text": "public function testSavingToAPreviouslyEmptySeqeunceUpdatesView()\n {\n $tripod = new \\Tripod\\Mongo\\Driver(\"CBD_testing\",\"tripod_php_testing\",array(\n \"defaultContext\"=>\"http://talisaspire.com/\",\n \"async\"=>array(OP_VIEWS=>false)\n ));\n\n // should be no triples with \"http://basedata.com/b/sequence123\" as subject in existing view\n $view = $tripod->getViewForResource(\"http://basedata.com/b/docWithEmptySeq123\",\"v_doc_with_seqeunce\");\n $this->assertTrue($view->has_triples_about(\"http://basedata.com/b/docWithEmptySeq123\"));\n $this->assertFalse($view->has_triples_about(\"http://basedata.com/b/sequence123\"));\n\n $newGraph = new \\Tripod\\ExtendedGraph();\n $newGraph->add_resource_to_sequence(\"http://basedata.com/b/sequence123\",\"http://basedata.com/b/sequenceItem123\");\n\n $tripod->saveChanges(new \\Tripod\\ExtendedGraph(),$newGraph);\n\n // should be triples with \"http://basedata.com/b/sequence123\" as subject in new view\n $view = $this->tripod->getViewForResource(\"http://basedata.com/b/docWithEmptySeq123\",\"v_doc_with_seqeunce\");\n $this->assertTrue($view->has_triples_about(\"http://basedata.com/b/docWithEmptySeq123\"));\n $this->assertTrue($view->has_triples_about(\"http://basedata.com/b/sequence123\"));\n }", "title": "" }, { "docid": "d1a6285b46f487f13f8c2e586da2d8a6", "score": "0.5257174", "text": "public function testFind()\n {\n $article = $this->Article->get(1000);\n $this->Article->updateColumn($article->id, 'title', 'not cached');\n $cached = $this->Article->get(1000);\n $this->assertEquals('Article #1', $cached->title);\n }", "title": "" }, { "docid": "2ed3855a6496c5d1c4a2fe2852b33f9a", "score": "0.52035946", "text": "public function reload()\n {\n return $this->repository->reload();\n }", "title": "" }, { "docid": "42c033f3605d050ba74777d09eec7ce6", "score": "0.5185347", "text": "public function refresh() {\n\t\t$this->dataCached = FALSE;\n\t\tif ($this->getData() === FALSE)\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "7c53532977c5aa2a495493872fc1d955", "score": "0.5183762", "text": "public function testLoadAll()\n\t{\n\t\t$q_before = $this->getQueries();\n\t\t$users = Sprig::factory('Test_User');\n\t\t$users = $users->load(NULL, FALSE);\n\t\t\n\t\t$this->assertEquals(4, count($users));\n\t\t$this->assertEquals('Mr' , $users[0]->title);\n\t\t$this->assertEquals('Mrs', $users[1]->title);\n\t\t$this->assertEquals('Dr' , $users[2]->title);\n\t\t\n\t\t$this->assertQueryCountIncrease(1, $q_before, $this->getQueries());\n\t}", "title": "" }, { "docid": "5989f090c151865c28a98a1ed883ec35", "score": "0.51535654", "text": "public function refresh($document)\n {\n $event = new Event\\RefreshEvent($document);\n $this->eventDispatcher->dispatch(Events::REFRESH, $event);\n }", "title": "" }, { "docid": "2e1a8e0ed51e8829a3658a521da09ea5", "score": "0.5146165", "text": "public function refresh() {\n }", "title": "" }, { "docid": "f9ae4cb3cde3776edfbc598f3747774f", "score": "0.5126522", "text": "public function Reload() {\n\t\t\t// Make sure we are actually Restored from the database\n\t\t\tif (!$this->__blnRestored)\n\t\t\t\tthrow new QCallerException('Cannot call Reload() on a new, unsaved DocumentosFase object.');\n\n\t\t\t// Reload the Object\n\t\t\t$objReloaded = DocumentosFase::Load($this->intDOCUMENTOIdDOCUMENTO);\n\n\t\t\t// Update $this's local variables to match\n\t\t\t$this->DOCUMENTOIdDOCUMENTO = $objReloaded->DOCUMENTOIdDOCUMENTO;\n\t\t\t$this->__intDOCUMENTOIdDOCUMENTO = $this->intDOCUMENTOIdDOCUMENTO;\n\t\t\t$this->FASEIdFASE = $objReloaded->FASEIdFASE;\n\t\t}", "title": "" }, { "docid": "9e95062d902a9aa5b22615bc6e306514", "score": "0.5121089", "text": "public function loadDocuments() {\n $this->query = self::LOAD;\n return $this->load();\n }", "title": "" }, { "docid": "f4eb8764901beb0f74e6a9369a89493f", "score": "0.50983405", "text": "public function test_get_evaluations_empty()\n {\n $response = $this->getJson('/evaluations/{fake-company}');\n // $response->dump();\n $response->assertStatus(200)\n ->assertJsonCount(0, 'data');\n }", "title": "" }, { "docid": "a537d3049f74855205915ff530d9c697", "score": "0.50964874", "text": "public function refresh()\n {\n \n }", "title": "" }, { "docid": "11afa936626c08353e81f82bad104374", "score": "0.50924647", "text": "public function testCallTheMonsterWithEmptyDB()\n\t{\n\t\t$repo = $this->documentManager->getRepository(Friend::class);\n\n\t\t//Execute request\n\t\tself::$client->request('GET', '/launch_the_battle');\n\n\t\t//HTTP response is OK\n\t\t$this->assertEquals(200, self::$client->getResponse()->getStatusCode());\n\n\t\t$responseContent = json_decode(self::$client->getResponse()->getContent(), true);\n\n\t\t//There should be an error\n\t\t$this->assertArrayHasKey('errors', $responseContent);\n\n\t\t//Map types of error in an array to simplify the check\n\t\t$errorTypes = array_map(function ($element) {\n\t\t\treturn $element['exception'];\n\t\t}, $responseContent['errors']);\n\n\t\t$this->assertContains(EmptyDBException::class, $errorTypes);\n\n\t\t$this->assertCount(0, $repo->findAll());\n\t}", "title": "" }, { "docid": "35c0497da8865d3c7892de88720a5028", "score": "0.5084109", "text": "public function reloadData() {\n #if ($this->isGodmode()) {\n # return true;\n #}\n\n $values = $this->user->getUserdataByID($this->userdata['Benutzer_Id']);\n if (count($values) > 0) {\n return $this->setLoadedData($values);\n } else {\n $this->userdata = false;\n $this->loggedIn = false;\n $this->destroySession();\n return false;\n }\n }", "title": "" }, { "docid": "b878b147579142e9b15aa27282ee5c54", "score": "0.50685704", "text": "private function reload() {\r\n\r\n\t\t$timestamp = (int) (microtime(true) * 1000);\r\n\r\n\t\t// if the value is empty\r\n\t\tif (!InputValidator::isEmpty($this->NAME) &&\r\n\t\t\t!InputValidator::isEmpty($this->NAVIGATIONCAPTION) &&\r\n\t\t\t!InputValidator::isEmpty($this->DESCRIPTION) &&\r\n\t\t\t$this->NEXT_REQUEST_TIMESTAMP > $timestamp) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->load();\r\n\t}", "title": "" }, { "docid": "270cf09c63275c9ff0fdd138f0006883", "score": "0.5061529", "text": "protected static function shouldRefetch(Oembed $oembed): bool\n\t{\n\t\tif ($oembed->title !== null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Give up after 10 failures\n\t\tif ($oembed->fail_count >= 10)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Don't refetch within an hour of failure\n\t\tif ($oembed->failed_date > (XF::$time - 3600))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "12c95cbe30937f99340fbf58031dc3cc", "score": "0.50595737", "text": "public function testLoadEmptyPK()\n\t{\n\t\t$user = Sprig::factory('Test_User');\n\t\t$this->assertFalse($user->loaded());\n\t\t$user->load();\n\t\t$this->assertFalse($user->loaded());\n\t}", "title": "" }, { "docid": "4ba31e9005f6dfc40e605ac87de7d5ea", "score": "0.504791", "text": "function testWhereHasOneNull() {\n $db = Octopus_DB::singleton();\n $db->query('UPDATE find_posts SET author_id = 0 WHERE author_id = 2');\n\n $posts = FindPost::find(array(\n 'author =' => null\n ));\n\n $this->assertEquals(3, count($posts));\n foreach($posts as $p) {\n $this->assertFalse(!!$p->author);\n }\n\n }", "title": "" }, { "docid": "955a8f3a7edff04a0e1b5335bd620d20", "score": "0.50430775", "text": "public function testRefresh()\n {\n $data = [\n 'id' => 1\n ];\n $json = json_encode($data);\n $resource = new BasicApiResource([\n 'id' => 2,\n 'name' => 'George Burdell'\n ]);\n $response = $resource->refresh([], $this->getMockClient(200, $json));\n\n $this->assertInstanceOf(BasicApiResource::class, $response);\n $this->assertEquals($resource, $response);\n $this->assertEquals($data, $response->attributes);\n }", "title": "" }, { "docid": "579faa5d286dfe443fa14cd2dc2603e6", "score": "0.50416404", "text": "public function refresh()\n {\n return $this->refreshFields();\n }", "title": "" }, { "docid": "4053673cff6c07be240bed9aaa0e5174", "score": "0.5023148", "text": "public function testLoad()\n {\n $fixtures = new Mad_Test_Fixture_Collection($this->_conn, 'unit_tests');\n $this->assertEquals('6', $this->_countRecords());\n }", "title": "" }, { "docid": "16abc85cb25e01ac9c3e121a8a270359", "score": "0.50196666", "text": "public function testWithNoResults()\n {\n $client = static::createClient();\n\n $items = $this->getItems(2);\n $links = $this->processRels($items['metadata']['links']);\n\n $this->assertEquals(0, count($items['data']));\n $this->assertEquals(0, count($links));\n }", "title": "" }, { "docid": "c3ef63ec8ac6a5c7d17efd62f7bb9881", "score": "0.49953222", "text": "public function testCanStillBeRetrieved()\n {\n // Create a detached post\n $this->resources->detachedPost();\n\n // Request posts\n $result = $this->writedown->getService('api')->post()->index(['where' => [\n 'e.detached = :detached' => ['detached' => true],\n ]]);\n\n // Check that an empty array is returned\n $this->assertTrue($result['success']);\n $this->assertEquals(1, count($result['data']));\n }", "title": "" }, { "docid": "8b94c2f9de77aca9f7634dae56ce647f", "score": "0.49896488", "text": "public function refreshAll() {\n\t\t// TODO: Optimize this for only one query\n\t\tforeach ($this->_cachedEntities AS $entity) {\n\t\t\t$entity->refresh(false); // seems awkward, but it's the pattern used in saveAll()\n\t\t}\n\t}", "title": "" }, { "docid": "f08dc5cfae9e3c72460edd44e70833ab", "score": "0.49882093", "text": "public function testIsUpdateQuery()\n {\n $this->assertFalse($this->fixture->isUpdateQuery());\n }", "title": "" }, { "docid": "5773694e8e80b4b8ec849111038e614b", "score": "0.498281", "text": "public function refresh(&$object) {\n if(!isset($this->objectsRepository[spl_object_hash($object)])){\n return;\n }\n $repository = $this->objectsRepository[spl_object_hash($object)];\n\n $mongoCollection = $repository->getCollection();\n\n $id = $repository->getHydrator()->unhydrate($object)[\"_id\"];\n\n if($this->debug){\n $this->logger->debug(\"Refresh datas for object with id \" . (string) $id . ' in collection ' . $mongoCollection);\n }\n\n $datas = (array) $mongoCollection->findOne([\"_id\" => $id]);\n\n if ($datas != null) {\n $repository->getHydrator()->hydrate($object, $datas);\n $repository->cacheObject($object);\n } else {\n $object = null;\n }\n }", "title": "" }, { "docid": "f3da72141ce4ff696e4c8bdb7e30d235", "score": "0.49823883", "text": "public function testClear()\n {\n $this->repository->add($this->page1);\n $this->repository->add($this->page2);\n $this->assertSame(2, $this->repository->numOfPages());\n\n $this->repository->clear();\n\n $this->assertSame(0, $this->repository->numOfPages());\n }", "title": "" }, { "docid": "b314712cec6387287040d56bc77d2e42", "score": "0.49716303", "text": "public function testLoadSingle()\n\t{\n\t\t$q_before = $this->getQueries();\n\n\t\t$user = Sprig::factory('Test_User');\n\t\t$user = $user->load(DB::select());\n\t\t$this->assertEquals(1, $user->id);\n\n\t\t$this->assertQueryCountIncrease(1, $q_before, $this->getQueries());\n\n\t\t$user = Sprig::factory('Test_User', array('id' => 1));\n\t\t$user = $user->load();\n\t\t$this->assertEquals(1, $user->id);\n\n\t\t$this->assertQueryCountIncrease(2, $q_before, $this->getQueries());\n\t}", "title": "" }, { "docid": "6e6755ecde61e649ea051db71cbe1bf5", "score": "0.49636027", "text": "public function testUpdateFull()\n {\n\n // Create a collection\n $collection = $this->getTestCollection();\n\n // Fake Document\n $document = array(\n 'user_id' => 1,\n 'email' => '[email protected]',\n 'tags' => array(\n array(\n 'slug' => 'performance-horizon',\n 'name' => 'Performance Horizon',\n 'count' => 5\n )\n ),\n 'notifications' => array(\n 'messages' => 1,\n 'requests' => 8\n )\n );\n $collection->insert($document);\n $collection->update(array('user_id' => 1), array(\n 'user_id' => 1,\n 'email' => '[email protected]',\n 'tags' => array(\n array(\n 'slug' => 'performance-horizon-group',\n 'name' => 'Performance Horizon Group',\n 'count' => 5\n )\n ),\n 'notifications' => array(\n 'messages' => 10,\n 'requests' => 3\n )\n ));\n\n // Check Data stored in database is compressed\n $document_after = $collection->findOne(array('email' => '[email protected]'));\n $this->assertEquals($document_after['tags'][0]['slug'], 'performance-horizon-group');\n $this->assertEquals($document_after['notifications']['messages'], 10);\n\n // Make sure an actual update was performed\n $document_after = $collection->findOne(array('email' => '[email protected]'));\n $this->assertEquals($document_after, null);\n\n }", "title": "" }, { "docid": "59470f1a896c64d1706c08f8c58ca0c0", "score": "0.49592572", "text": "public function refresh(){\n\t\t\n\t}", "title": "" }, { "docid": "b7a79c82ca195906bc89ab73b92e3ddd", "score": "0.49567172", "text": "public function refresh()\n {\n if ($this->isNew()) {\n throw new \\LogicException('The document is new.');\n }\n\n $this->setDocumentData($this->getRepository()->getCollection()->findOne(array('_id' => $this->getId())), true);\n\n return $this;\n }", "title": "" }, { "docid": "e04c963067c5adabc48fa6d3cf37f5f4", "score": "0.49467668", "text": "public function refresh()\n {\n $this->data = Diffy::request('GET', 'diffs/'.$this->diffId);\n }", "title": "" }, { "docid": "e4797cfb3f8eb5cacc9b2230a513d861", "score": "0.493187", "text": "public function testReset() {\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $entity = $storage->load($this->entityId);\n\n // Ensure loading after a save retrieves the updated entity rather than an\n // obsolete cached one.\n $entity->label = 'New label';\n $entity->save();\n $entity = $storage->load($this->entityId);\n $this->assertSame('New label', $entity->label);\n\n // Ensure loading after a delete retrieves NULL rather than an obsolete\n // cached one.\n $entity->delete();\n $this->assertNull($storage->load($this->entityId));\n }", "title": "" }, { "docid": "05098d6ac939a76e95488507ab213c70", "score": "0.49314946", "text": "public function refresh(): void\n {\n }", "title": "" }, { "docid": "05098d6ac939a76e95488507ab213c70", "score": "0.49314946", "text": "public function refresh(): void\n {\n }", "title": "" }, { "docid": "09552b9537d09435e41197144200581c", "score": "0.4929494", "text": "public function testClearRelatedCache()\n\t{\n\t\t$q_before = $this->getQueries();\n\n\t\t$name = Sprig::factory('Test_Name');\n\n\t\t// First, assign a full object\n\t\t$user1 = Sprig::factory('Test_User', array('id' => 1));\n\t\t$name->test_user = $user1;\n\t\t$this->assertEquals(1, $name->test_user->id);\n\n\t\t// Now, replace with a fixed ID value\n\t\t$name->test_user = 2;\n\t\t$this->assertEquals(2, $name->test_user->id);\n\n\t\t$this->assertQueryCountIncrease(0, $q_before, $this->getQueries());\n\t}", "title": "" }, { "docid": "9c4c562c40f91780da3ec9583aca210b", "score": "0.49208453", "text": "#[ReadOperation]\n public function load(): void\n {\n $this->page = $this->startPage;\n $this->cursor = $this->getStrategy()->initialize($this->query, $this->maxRows, $this->page);\n $this->loadCollection();\n }", "title": "" }, { "docid": "7b35b86d24f278fc69c2b5848a3c2e29", "score": "0.49173725", "text": "public function testFlushQueryCache() {\n\t\t$this->db->flushQueryCache();\n\t\t$this->db->query('SELECT 1');\n\t\t$this->db->query('SELECT 1');\n\t\t$this->db->query('SELECT 2');\n\t\t$this->assertAttributeCount(2, '_queryCache', $this->db);\n\n\t\t$this->db->flushQueryCache();\n\t\t$this->assertAttributeCount(0, '_queryCache', $this->db);\n\t}", "title": "" }, { "docid": "444153d9af0396f257798e0e0186ce1f", "score": "0.4913652", "text": "function testWhereHasOneNotNull() {\n $db = Octopus_DB::singleton();\n $db->query('UPDATE find_posts SET author_id = 0 WHERE author_id = 2');\n\n $posts = FindPost::find(array(\n 'author !=' => null\n ));\n\n $this->assertEquals(3, count($posts));\n foreach($posts as $p) {\n $this->assertTrue(!!$p->author);\n }\n\n }", "title": "" }, { "docid": "7be0995f07343aa14b3386b1a857e532", "score": "0.49131358", "text": "public function testAutoClearHistory()\n\t{\n\t\ttestpack( 'Auto clear history' );\n\t\t$book = R::dispense( 'book' );\n\t\t$book->pages = 100;\n\t\t$book->title = 'book';\n\t\tR::store( $book );\n\t\t$book = R::findOne( 'book' );\n\t\tasrt( $book->hasChanged( 'title' ), FALSE );\n\t\t$book->title = 'yes';\n\t\tR::store( $book );\n\t\tasrt( $book->hasChanged( 'title' ), TRUE );\n\t\tOODB::autoClearHistoryAfterStore( TRUE );\n\t\t$book = R::findOne( 'book' );\n\t\tasrt( $book->hasChanged( 'title' ), FALSE );\n\t\t$book->title = 'yes2';\n\t\tR::store( $book );\n\t\tasrt( $book->hasChanged( 'title' ), FALSE );\n\t\tOODB::autoClearHistoryAfterStore( FALSE );\n\t\t$book = R::findOne( 'book' );\n\t\tasrt( $book->hasChanged( 'title' ), FALSE );\n\t\t$book->title = 'yes';\n\t\tR::store( $book );\n\t\tasrt( $book->hasChanged( 'title' ), TRUE );\n\t}", "title": "" }, { "docid": "0b1a11ff1a9462e873351c5a7d7791ce", "score": "0.49119526", "text": "public function rerun(){\n //$this->run(); // or \n //declare you added tables\n \n \n }", "title": "" }, { "docid": "76f06012dbd1264cb106ae1bcc326046", "score": "0.49077377", "text": "public function testClientFetchOne(){\n \t$offset = 1; // offset should be at least one because offset 0 is a header\n \t$client = Client::getOne($offset);\n \t$this->assertInstanceOf('App\\Client', $client);\n\n \t// test failed fetch single record\n \t$offset = 100;\n \t$client = Client::getOne($offset);\n \t$this->assertFalse($client);\n }", "title": "" }, { "docid": "b3a13f1bfbfbb0b99dc8251ab1ebc893", "score": "0.4903776", "text": "function testNoRows() {\n\t\t// return a proper false response\n\t\t$good = $this->loader->init('users', $this->userColumns);\n\t\t$this->assertTrue($good);\n\t\t\n\t\t$numberAdded = $this->loader->commit($this->pdo());\n\t\t$this->assertEquals(-1, $numberAdded);\n\t}", "title": "" }, { "docid": "ec0a546cacb930200a10a6babc84f4fc", "score": "0.49009266", "text": "public function testIndexNoResults()\n {\n $user = User::first();\n $token = JWTAuth::fromUser($user);\n\n // It's okay to do this because we are using DatabaseTransactions\n // Changes will be rollback-ed after test\n Booking::where('id', 'like', '%%')->delete();\n\n $response = $this->json('GET', '/api/v1/bookings', [], ['Authorization' => 'Bearer ' . $token]);\n\n $response\n ->assertStatus(200)\n ->assertExactJson([\n 'data' => [],\n ]);\n }", "title": "" }, { "docid": "7181fa53e26d6cb213a405d5cf0a05a1", "score": "0.48941785", "text": "public function testClearContain(): void\n {\n $contains = [\n 'clients' => [\n 'orders' => [\n 'orderTypes',\n 'stuff' => ['stuffTypes'],\n ],\n 'companies' => [\n 'categories',\n ],\n ],\n ];\n\n $loader = new EagerLoader();\n $loader->contain($contains);\n $loader->setMatching('clients.addresses');\n\n $loader->clearContain();\n $result = $loader->normalized($this->table);\n $this->assertEquals([], $result);\n $this->assertArrayHasKey('clients', $loader->getMatching());\n }", "title": "" }, { "docid": "99cf465bd3ac395d62dcaeef981971a6", "score": "0.48867697", "text": "protected function _doFetch() {\n\t$this->lastQuery = $this->currentQuery;\n\treturn false;\n }", "title": "" }, { "docid": "3f8ad05db5852ad3ecf7283c6523a31f", "score": "0.48864758", "text": "function reload() {\n\t\t$this->set_fields( $this->get( $this->id ) );\n\t}", "title": "" }, { "docid": "52e325503a8187a5f3998e427c8eba2e", "score": "0.48793253", "text": "protected function fillIfNotFilled()\n {\n if (!$this->lazyLoad || $this->lazyLoaded || !$this->repository) {\n return;\n }\n\n $this->repository->fill($this, $this->lazyLoadAttributes);\n\n $this->lazyLoaded = true;\n }", "title": "" }, { "docid": "23eaf6d5d54f9130ad66367fd0a3a833", "score": "0.48761132", "text": "public function load() {\n\t\t$billrun = Billrun_Factory::db(array('name' => 'billrun'))->billrunCollection();\n\n\t\t$this->data = $billrun->query()\n\t\t\t->equals('stamp', $this->getStamp())\n\t\t\t->equals('source', 'ilds')\n\t\t\t->notExists('invoice_id');\n\n\t\tBillrun_Factory::log()->log(\"aggregator entities loaded: \" . $this->data->count(), Zend_Log::INFO);\n\n\t\tBillrun_Factory::dispatcher()->trigger('afterGeneratorLoadData', array('generator' => $this));\n\t}", "title": "" }, { "docid": "e7a5e9be8f21e737c86e3d13b008d999", "score": "0.48732948", "text": "public function recreate()\n {\n $this->baseCursor->recreate();\n $this->mongoCursor = $this->baseCursor->getMongoCursor();\n }", "title": "" }, { "docid": "ecfe7f54a3961ecce65f4ad38bd3deb4", "score": "0.4870357", "text": "public static function populateEmptyPIREPS() {\n\n $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'pireps ';\n\n $results = DB::get_results($sql);\n if (!$results) {\n return true;\n }\n\n foreach ($results as $row) {\n self::PopulatePIREPFinance($row, true);\n }\n\n return true;\n }", "title": "" }, { "docid": "7c4eee9c998ffbadeacd155aae878989", "score": "0.48614576", "text": "public function testCreateEntityWithQueryClearing()\n {\n $this->assertEquals($this->_normalized([\n \"host\" => \"localhost\",\n \"path\" => \"/\",\n ]), new Url($this->sampleUrl(), []));\n }", "title": "" }, { "docid": "eee59ecced7bd7886ba4f2c17e6200d4", "score": "0.4859686", "text": "public function testFetchObject()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "eee59ecced7bd7886ba4f2c17e6200d4", "score": "0.4859686", "text": "public function testFetchObject()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "f72954a61abb49b14790af1ea62b1879", "score": "0.4856249", "text": "public function clear()\n {\n $query = clone $this->query;\n $query->clear($this->relation->entity())\n ->execute();\n }", "title": "" }, { "docid": "2a49414761b592bd7fb7a17c001d41ae", "score": "0.4855823", "text": "public function testRenderUpdateNoID()\n {\n $this->withSession($this->adminSession)\n ->call('GET', '/product/model/edit');\n \n $this->assertResponseStatus(404);\n }", "title": "" }, { "docid": "ec0c9a7afd2eea98970ef641eddff894", "score": "0.48517558", "text": "protected function validateDocument()\n {\n // no-op\n }", "title": "" }, { "docid": "ec0c9a7afd2eea98970ef641eddff894", "score": "0.48517558", "text": "protected function validateDocument()\n {\n // no-op\n }", "title": "" }, { "docid": "0b4cd8c52c3d6d988f383cfe9c5d6d34", "score": "0.48516908", "text": "public function assert(): void\n {\n // fetch data\n $data = $this->fetchData();\n if (!$data) {\n throw new ContentNotFound(\"Fetched snapshot is empty.\");\n }\n\n $this->load();\n\n if (!$this->dataSet) {\n $this->printDebug('Snapshot is empty. Updating snapshot...');\n $this->dataSet = $data;\n $this->save();\n return;\n }\n\n try {\n $this->assertData($data);\n $this->printDebug('Data matches snapshot');\n } catch (AssertionFailedError $exception) {\n $this->printDebug('Snapshot assertion failed');\n\n if (!is_bool($this->refresh)) {\n $confirm = Debug::confirm('Should we update snapshot with fresh data? (Y/n) ');\n } else {\n $confirm = $this->refresh;\n }\n\n if ($confirm) {\n $this->dataSet = $data;\n $this->save();\n $this->printDebug('Snapshot data updated');\n return;\n }\n\n if ($this->showDiff) {\n throw $exception;\n }\n\n $this->fail($exception->getMessage());\n }\n }", "title": "" }, { "docid": "44f7693eefec47ec43b290a87e9b0eaf", "score": "0.48396495", "text": "function refreshCollFields(){\n\t\tforeach($this->collFieldVal as $field){\n\t\t\t$field = array();\n\t\t}\n\t}", "title": "" }, { "docid": "b778a3f2f9282255ca98626d8bce829a", "score": "0.48381203", "text": "function refresh($entity);", "title": "" }, { "docid": "f5777085decccc448a849c96b0e3d7b8", "score": "0.48368067", "text": "public function testLoadDataWithoutData()\n {\n $data = array();\n\n $table = $this->getConcreteTableBuilder();\n\n $table->loadData($data);\n\n $this->assertEquals(array(), $table->getRows());\n $this->assertFalse($table->hasRows());\n\n $this->assertEquals(0, $table->getTotal());\n }", "title": "" }, { "docid": "9371bcc0864ef59bef37814035bec8a3", "score": "0.48339543", "text": "public function shouldCorrectDetectChanges()\n {\n $this->specify(\n \"Snapshot does not work correctly with changed fields\",\n function () {\n $this->setUpModelsManager();\n $robots = Robots::findFirst();\n\n expect($robots->getChangedFields())->isEmpty();\n expect($robots->deleted)->null();\n expect($robots->hasChanged('deleted'))->false();\n\n $robots->deleted = 0;\n\n expect($robots->getChangedFields())->notEmpty();\n expect($robots->deleted)->notNull();\n expect($robots->hasChanged('deleted'))->true();\n }\n );\n }", "title": "" }, { "docid": "ab43c0df3b079f7a84783078baa33aa5", "score": "0.48263636", "text": "public function rewind()\n {\n $this->getDocuments()->rewind();\n }", "title": "" }, { "docid": "f9dbf1f5078b1dc4167d32193166899c", "score": "0.48115093", "text": "public function reload()\n\t{\n\t\t$this->redirect_to (Fails::$request->url());\n\t}", "title": "" }, { "docid": "b0742176959240c6ea8fd18d5e3d5e14", "score": "0.48105577", "text": "public function testPurgeNotDeleted()\n {\n $query = ['_id' => 'a', '_deleted' => true];\n\n $collection = $this->createMock(Collection::class);\n $collection->expects($this->once())->method('count')->with($query)->willReturn(0);\n\n $entity = $this->createPartialMock(TestEntityMeta::class, ['getId']);\n $entity->method('getId')->willReturn('a');\n\n TestDataMapperSoftDeletion::$collectionMock = $collection;\n TestDataMapperSoftDeletion::purge($entity);\n }", "title": "" }, { "docid": "d921582d4433e65e52ee747080e89e53", "score": "0.4803335", "text": "public function testOneEmptyStringPrimaryKey(): void\n {\n $data = [\n 'id' => '',\n 'username' => 'superuser',\n 'password' => 'root',\n 'created' => new DateTime('2013-10-10 00:00'),\n 'updated' => new DateTime('2013-10-10 00:00'),\n ];\n $marshall = new Marshaller($this->articles);\n $result = $marshall->one($data, []);\n\n $this->assertFalse($result->isDirty('id'));\n $this->assertNull($result->id);\n }", "title": "" }, { "docid": "009eeaa6dee704217da1670deebe3f3b", "score": "0.48012912", "text": "protected function relationLoaded()\n {\n return false;\n }", "title": "" }, { "docid": "99b96e90fe4f27520e76ac362ef3558e", "score": "0.47907764", "text": "function documents_civicrm_pre( $op, $objectName, $id, &$params ) {\n $repo = CRM_Documents_Entity_DocumentRepository::singleton();\n if ($objectName == 'Individual' || $objectName == 'Household' || $objectName == 'Organization') {\n if ($op == 'delete') {\n try {\n $contact = civicrm_api3('Contact', 'getsingle', array('contact_id' => $id, 'is_deleted' => '1'));\n //contact is in trash so this deletes the contact permanenty\n $docs = $repo->getDocumentsByContactId($id);\n foreach($docs as $doc) {\n $doc->removeContactId($id);\n $repo->persist($doc);\n }\n } catch (Exception $e) {\n //contact not found, or contact is in transh\n }\n }\n }\n\n if ($op == 'delete') {\n $refspec = CRM_Documents_Utils_EntityRef::singleton();\n $ref = $refspec->getRefByObjectName($objectName);\n if ($ref) {\n $documents = $repo->getDocumentsByEntityId($ref->getEntityTableName(), $id);\n foreach($documents as $doc) {\n $entity = new CRM_Documents_Entity_DocumentEntity($doc);\n $entity->setEntityId($id);\n $entity->setEntityTable($ref->getEntityTableName());\n $doc->removeEntity($entity);\n\n $repo->persist($doc);\n }\n }\n }\n}", "title": "" }, { "docid": "fbe47f3a7905cd2bd0f14f4fd79cd5b3", "score": "0.4787636", "text": "public function testReadOnlyCallingQueryAssociationWhenDefined() {\n\t\t$this->loadFixtures('Article', 'User', 'ArticlesTag', 'Tag');\n\t\tConnectionManager::create('test_no_queryAssociation', array(\n\t\t\t'datasource' => 'MockDataSource'\n\t\t));\n\t\t$Article = ClassRegistry::init('Article');\n\t\t$Article->Comment->useDbConfig = 'test_no_queryAssociation';\n\t\t$result = $Article->find('all');\n\t\t$this->assertTrue(is_array($result));\n\t}", "title": "" }, { "docid": "e3165440558256be008093c49845d776", "score": "0.4785504", "text": "protected function initRelationOnce() {\n\t\tif (!$this->_isRelationInitialized) {\n\t\t\t$this->initRelation();\n\t\t\t$this->_isRelationInitialized = true;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8b3c7c9e5888b75da2a4da2113008dd9", "score": "0.47851387", "text": "public function testSaveNotChangeAware()\n {\n $data = ['foo' => 'bar'];\n $options = ['zoo' => 'baz'];\n $queryResult = 'foo_object_result_with_id';\n\n $document = $this->createPartialMock(TestDocumentSoftDeletion::class, ['toData', 'cast', 'isNew']);\n $collection = $this->createMock(Collection::class);\n $document::$collectionMock = $collection;\n\n $document->expects($this->once())->method('toData')->willReturn($data);\n $collection->expects($this->once())->method('save')->with($data, $options)->willReturn($queryResult);\n $collection->expects($this->once())->method('useResultId')->with($document, 'id', $queryResult);\n\n $document->save($options);\n }", "title": "" }, { "docid": "0620a796e025a6a9f8374155bc6d88fc", "score": "0.47816342", "text": "function recache() {\r\n return $this->clearCache();\r\n }", "title": "" }, { "docid": "1c328ebaea862ee9a9bc6d1296765e4e", "score": "0.47790822", "text": "public function refreshCache()\n {\n $app = Facade::getFacadeApplication();\n $cache = $app->make('cache/request');\n if ($cache->isEnabled()) {\n $cache->delete('page/'.$this->getCollectionID());\n }\n }", "title": "" }, { "docid": "88de5e7ccb8c68395fb627cc1c153ad8", "score": "0.4778372", "text": "function test_update_existing() {\n\t}", "title": "" }, { "docid": "4114ee80828125c4808e7cb56db9046b", "score": "0.47748315", "text": "public function mustFetch(){\n\t\t/*#if DEV */if($this->results!==null) throw new Exception('$this->results!==null'); /*#/if*/\n\t\t$this->fetch();\n\t\tif(empty($this->results)) notFound();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "119f5079923db59010613f9f7640accc", "score": "0.4771087", "text": "public function testSelectAndUpdate()\n {\n $person1 = new Person();\n $person1->name = 'Short Lived Person';\n $person1->save();\n\n $update = Person::get($person1->id);\n $update->name = 'Long Lived Person';\n $update->save();\n }", "title": "" }, { "docid": "149d078ee54350d5a5c405eaadca90ed", "score": "0.47691923", "text": "public function testCachedTrue()\n {\n $this->setToken($this->token());\n\n $breed = Breed::create($this->get());\n\n $response = $this->runApp('GET', \"/breeds?name={$breed->name}\");\n $body = json_decode($response->getBody(), true);\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(true, $body['cached']);\n\n $breed = Breed::where('name','test')->first();\n\n $this->delete();\n\n }", "title": "" } ]
41a90e87636b9c20533c868491ee6fb6
Log guest (not logged in user) action
[ { "docid": "66319351f9b8442581452490d54ad3c1", "score": "0.59776956", "text": "public function logGuestAction($action, $userId = 0)\n {\n if (empty($action))\n return false;\n \n $this->log($action, false, false, $userId);\n }", "title": "" } ]
[ { "docid": "9e61cdfe87f953bb805a7b99dc71f457", "score": "0.7265806", "text": "public function guest()\n {\n\n $user = User::where('name', '=', 'Guest')->first();\n\n Auth::login($user);\n\n return redirect('/home');\n\n }", "title": "" }, { "docid": "10b1ac4a75a443322194dcffda0a0f97", "score": "0.685454", "text": "public function guest();", "title": "" }, { "docid": "d51bcf5467155417c9dba0d2bd7d32aa", "score": "0.6825043", "text": "function guest_only() {\n if (Auth::user()) {\n redirect('account');\n }\n}", "title": "" }, { "docid": "c4913094cc37cf35f74042bdc0df6b9b", "score": "0.6746837", "text": "protected function enterGuestAccess()\n {\n // todo: Protocoll the ip address via Yii::$app->getRequest()->getUserIP()\n\n $model = new User();\n // Username and email blank will block login\n $model->username = '';\n $model->email = '';\n $model->role = User::ROLE_ANONYMOUS;\n // It will not be possible to log in another time - so the password does not matter...\n $model->password = '*'; \n $model->generateAuthKey();\n if ($model->save(false) && Yii::$app->getUser()->login($model)) {\n // Reload to ensure the guest access is correctly visualized in the header\n return $this->refresh();\n } \n else {\n throw new HttpException(500, 'Anonymous login did not work.');\n }\n }", "title": "" }, { "docid": "5b7cfa90860cbe5d14820df98e1606de", "score": "0.6729614", "text": "public function actionGuestcapture()\n {\n if (!Yii::$app->user->can('anonymous')) {\n return $this->enterGuestAccess();\n } \n else {\n return $this->actionCapture();\n }\n }", "title": "" }, { "docid": "358b0bd2ff016fd3b228c6f0913e0698", "score": "0.6623636", "text": "public function actionGuestcreate()\n {\n if (!Yii::$app->user->can('anonymous')) {\n return $this->enterGuestAccess();\n }\n else {\n return $this->actionCreate();\n }\n }", "title": "" }, { "docid": "5eb5150490bb926d875b502463683669", "score": "0.66213673", "text": "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "title": "" }, { "docid": "779ff125d01d0cabc94d35a3bdf45070", "score": "0.6515959", "text": "public function _logout()\n {\n $this->_login( self::getGuestID() );\n }", "title": "" }, { "docid": "d6301b47b436de3df92c3d11bfc38c5f", "score": "0.64596474", "text": "public static function guest()\n {\n if (Auth::check() == true)\n {\n \n return redirect()->route('admin')->with('success', 'Вы успешно вошли как админ'); \n }\n else {\n return redirect()->route('login')->with('warning', 'Только авторезированным пользователям можно войти!!!'); \n }\n }", "title": "" }, { "docid": "f561d1c152e985e897f3453b54bf3391", "score": "0.64431566", "text": "private function guest ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "2abcdb58fb8f54fedd36a83f4ee20f21", "score": "0.6392438", "text": "private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }", "title": "" }, { "docid": "eeedf104ee1abff7271c7e54b5465f06", "score": "0.63756984", "text": "function sloodle_require_login_no_guest()\n {\n global $CFG, $SESSION, $FULLME;\n // Attempt a direct login initially\n require_login(0, false);\n // Has the user been logged-in as a guest?\n if (isguestuser()) {\n // Make sure we can come back here after login\n $SESSION->wantsurl = $FULLME;\n // Redirect to the appropriate login page\n if (empty($CFG->loginhttps)) {\n redirect($CFG->wwwroot .'/login/index.php');\n } else {\n $wwwroot = str_replace('http:','https:', $CFG->wwwroot);\n redirect($wwwroot .'/login/index.php');\n }\n exit();\n }\n }", "title": "" }, { "docid": "186795c0d2ee76add06f877a93097f80", "score": "0.6309053", "text": "protected function loginIfRequested() {}", "title": "" }, { "docid": "0d4dc2baa2e8d44de302dab4d84ab5d0", "score": "0.63065434", "text": "private static function setGuest() {\n if ( Config::get('guest') !== true ) {\n User::setError('Der Gastzugang wurde deaktiviert!');\n return;\n }\n $_SESSION['user']['verified'] = 'no';\n $_SESSION['user']['guest'] = true;\n }", "title": "" }, { "docid": "79fb50a1dce489d13a830dd4fff7c2e8", "score": "0.6259404", "text": "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "title": "" }, { "docid": "b41aac5a6e5758983358bba061e18cdd", "score": "0.6250997", "text": "public function runAction() {\n\t\t$user = new User();\n\n\t\tif($user->isLoggedIn()){\n\t\t\theader(\"Location: /\");\n\t\t\treturn;\n\t\t}\n\n\t\tView::renderTemplate('Home/login.twig');\n\t}", "title": "" }, { "docid": "9bd5255144780ab314ff72afaa6c5cf2", "score": "0.62163854", "text": "static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }", "title": "" }, { "docid": "a9308e3863d87c25b373faf76001af9d", "score": "0.62098116", "text": "function __redirectLoggedInUser()\n{\n global $action;\n \n if ($action == 'logout' || ! is_user_logged_in()) {\n return;\n }\n \n wp_redirect(current_user_can('read') ? admin_url() : home_url(), 302);\n\t\n\tdie();\n}", "title": "" }, { "docid": "1da9ea714e0d77413f4336008f3b17e4", "score": "0.62051994", "text": "public function login()\n\t{\n\t\tif (isLogin()) {\n\t\t\tredirect('/backoffice');\n\t\t} else {\n\t\t\t$this->display(\n\t\t\t\t'backoffice/login.html.twig'\n\t\t\t);\n\t\t}\n\n\t}", "title": "" }, { "docid": "8e0a256b221c8078f6ad31c75644c0cc", "score": "0.6181442", "text": "function auth_current_user_is_guest($db)\r\r\n{\r\r\n if (!ISSET($_SESSION['NX3_USER']))\r\r\n {\r\r\n return true;\r\r\n }\r\r\n else\r\r\n {\r\r\n return $_SESSION['NX3_USER']['user_id'] == (int)lookup_setting($db, 'nx3.global.guestuserid');\r\r\n }\r\r\n}", "title": "" }, { "docid": "bfa56b3f631780054a0dd2c9140cfe4d", "score": "0.6176436", "text": "public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }", "title": "" }, { "docid": "9080c9b4ac172a96b22871a56780d0ce", "score": "0.6173962", "text": "public function actionLogin()\n\t{\n\t\tif ($this->getUser()->isLoggedIn())\n\t\t\t$this->redirect('Administration:default');\n\t}", "title": "" }, { "docid": "095d680d7b009f7443805959f3dae774", "score": "0.6168818", "text": "function logout_guestuser() {\n global $USER;\n if (isguestuser()) {\n foreach ($USER as $key => $val) {\n unset($USER->{$key});\n }\n $USER->id = 0;\n }\n}", "title": "" }, { "docid": "d9d95fc6c365325408332037992f557d", "score": "0.61592484", "text": "public function actionLogin() {\n \n }", "title": "" }, { "docid": "26dbdc944effdb2a6078dd625be45b11", "score": "0.61420363", "text": "function isGuest()\n {\n return false;\n }", "title": "" }, { "docid": "2657d80c5924e0d9a44b4cf4a8505fc9", "score": "0.6137868", "text": "public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }", "title": "" }, { "docid": "9f7920c37546522d64ab64a62c2aac44", "score": "0.613323", "text": "public function guest()\n {\n return $this->user;\n }", "title": "" }, { "docid": "c0c3d0a0baf31a1ef275e2502b6794bf", "score": "0.6114444", "text": "function kickGuests($admin = false) {\n\tglobal $_user, $_vars;\n\t\n\tif ($admin && !$_vars['admin']) {\n\t\tredirectTo(\"/\");\n\t}\n\t\n\tif (!$_user->data['is_registered']) {\n\t\tredirectTo(\"/login\");\n\t}\n}", "title": "" }, { "docid": "6509eff95b11acd625438b62ae42d614", "score": "0.60887283", "text": "private function login(){\n \n }", "title": "" }, { "docid": "03ba36fad31674698be10a38661915a7", "score": "0.60851455", "text": "function userLoggedIn()\n{\n\tif(Auth::check()) {\n\t\t// Log::info('');\n\t\theader('Location: /users/account?id=' . Auth::id() );\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "859a597639d17ca9d7064c79d3974ccb", "score": "0.6078605", "text": "public static function guest(){\n return \\Illuminate\\Auth\\Guard::guest();\n }", "title": "" }, { "docid": "e9b3b7ee7c6df90334411377b109b7f5", "score": "0.60776085", "text": "public function guest() {\n\t\t\t// If user has session, return false\n\t\t\tif ($this->session->has('user')) return false;\n\t\t\t// If user is Authed return fales\n\t\t\tif ($this->auth()) return false;\n\t\t\t// Else, return true\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "e42c2c7cca643ce2f615b436c98a306e", "score": "0.6070925", "text": "function isGuest()\n {\n return true;\n }", "title": "" }, { "docid": "423810f4c7311ab8fb37932b7884e23d", "score": "0.6069099", "text": "public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f5e6702dfae5c042303216d8f0f0b0ef", "score": "0.6067443", "text": "function adminLogin()\n{\n\tglobal $twig; \n\t$navTop = true; \n\t$navBottomAdmin=true;\n\n\t# checkif the user is already authenticated.\n\t# If so display the list of faults instead of the login screen\n\t/*if(isset($_SESSION['isLoggedIn']))\n\t{\n\t\theader('Location: ./adminSelectRegion');\n\t\texit;\n\t}*/\n\n clearUserSession();\n\n\t# otherwise the user is presented with the login form\n\t$args_array=array(\n\t\t'navTop' => $navTop,\n\t\t'navBottomAdmin' => $navBottomAdmin,\n\t);\n\t\n\t$template='adminLogin';\n\techo $twig->render($template.'.html.twig',$args_array);\n}", "title": "" }, { "docid": "395a2068c0145b2014425b874d235863", "score": "0.6051634", "text": "public function get_login(){\n\t if (!Auth::guest()) \n\t \treturn Redirect::to('/')->with('message', 'You are already logged in!');\n\t else\n\t\t\t$this->layout->content = View::make('frontend.customers.login');\n\t}", "title": "" }, { "docid": "615dbf7a86a9240f2aa9ea953da35a55", "score": "0.6050561", "text": "protected function isUserLoggedIn() {}", "title": "" }, { "docid": "615dbf7a86a9240f2aa9ea953da35a55", "score": "0.6050561", "text": "protected function isUserLoggedIn() {}", "title": "" }, { "docid": "9474ae5fddbb0c39221bfc611fa508c4", "score": "0.6043984", "text": "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "title": "" }, { "docid": "5bdd423b55f895f5db0e564bd0f57db3", "score": "0.6032586", "text": "function noUser(){\n session_destroy();\n session_start();\n\t$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n $user = 'Guest';\n $_SESSION[\"activeUser\"]= $user;\n header(\"Location: http://ec2-34-227-117-216.compute-1.amazonaws.com/~BenFortier/Moduele3/news/homepage.php\");\n}", "title": "" }, { "docid": "d03d2df49c67497ca97cc9bb4ea08575", "score": "0.6032525", "text": "public function testGuest()\n {\n $this->userGhost();\n \n $method = Guest::make();\n $parameters = ['user_guest_name' => 'Casper'];\n MethodTest::make()->method($method)->parameters($parameters)->execute();\n assertEquals(GDT_Response::$CODE, 200);\n \n MethodTest::$USERS[] = $user = GDO_User::current();\n assertEquals('Casper', $user->getGuestName(), 'Check if guest register was success.');\n \n $user = Module_Core::instance()->cfgSystemUser();\n assertEquals('system', $user->getType(), 'Check if system user is still there.');\n }", "title": "" }, { "docid": "62d72ed6ddbb847ef70869955503f073", "score": "0.6017896", "text": "public function auth(){\n \tif (Auth::guest()) return Redirect::to('admin/login');\n }", "title": "" }, { "docid": "fbc1238282cc359cb14ecce976b16f96", "score": "0.6008356", "text": "public function guest_login()\n\t{\n\t\treturn \\Config::get('uniauth.guest_login', true);\n\t}", "title": "" }, { "docid": "acb6181f44d333e0ce371215a617f4ec", "score": "0.6008325", "text": "public function login()\n {\n //login in your member using the logic in the perent class.\n $message = parent::login();\n\n //add some administrator-spcific logic\n return $message . ' ... log this action in an administrator\\'s table';\n\n }", "title": "" }, { "docid": "990b35c238f28420524dc4556aa095c5", "score": "0.5998129", "text": "abstract protected function logout();", "title": "" }, { "docid": "6a077d4b62a0924196a0e78efa8862b2", "score": "0.59872055", "text": "function action_login(){\n \n if($this->request->method()==='POST'){\n \n $login = arr::get($_POST,'username');\n $password = arr::get($_POST,'password');\n if (Auth::instance()->login($login, $password )){\n $user = Auth::instance()->get_user();\n $this->redirect(Route::get('admin')->uri());\n }else{\n echo 'не залогинен';\n \n \n }\n \n \n \n }\n \n }", "title": "" }, { "docid": "40fc8027ec7ce62f16927946fdf31686", "score": "0.59769017", "text": "public function indexAction()\n\t{\t\t\n\t\tif(!authorization::areWeLoggedIn())\n\t\t{\n\t\t\t//we do it this way so that certain applicatiob classes can override the super Login action\n\t\t\tglobalRegistry::getInstance()->setRegistryValue('event','login_application_grabs_control','true');\n\t\t\t$this->doLogin();\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t}", "title": "" }, { "docid": "7143fcc83541c540dd576805810a5a5c", "score": "0.59722614", "text": "public function checkLogged() {\n if (!PlonkSession::exists('id')) {\n PlonkWebsite::redirect($_SERVER['PHP_SELF'] . '?' . PlonkWebsite::$moduleKey . '=home&' . PlonkWebsite::$viewKey . '=home');\n } \n }", "title": "" }, { "docid": "28ca9a72093f05210fe7680531206001", "score": "0.5967013", "text": "function action_userLogged() {\n if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {\n $_SESSION['logged'] = false;\n header('Location: /');\n } else {\n $_SESSION['logged'] = true;\n header('Location: /home/track');\n // Include view for this page.\n @include_once APP_PATH . 'view/track_page.tpl.php';\n }\n }", "title": "" }, { "docid": "b42fd5f673a2ec1abb12fa510eeeb4fc", "score": "0.59663194", "text": "public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}", "title": "" }, { "docid": "0db938599b24c433b2534268120ce8e7", "score": "0.5965022", "text": "function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}", "title": "" }, { "docid": "406cdd82eb98ebbf78006fac93706b99", "score": "0.5958046", "text": "abstract protected function isUserLoggedIn() ;", "title": "" }, { "docid": "422877500874d8b43e642117664e2730", "score": "0.5955663", "text": "public function logUser()\n {\n if (!$this->limpid->visitCounterManager->getEntry($_SERVER['REMOTE_ADDR']))\n $this->limpid->visitCounterManager->logUser($_SERVER['REMOTE_ADDR']);\n else\n $this->limpid->visitCounterManager->editEntry($_SERVER['REMOTE_ADDR'], ['last_visit' => date('Y-m-d H:i:s')]);\n }", "title": "" }, { "docid": "c220b2474f80c9bc8b5a332c39e3bd0e", "score": "0.5951996", "text": "public function actionDummyAdminLogin()\n\t{\n\t\t$identity = new DummyUserIdentity(1);\n\n\t\tif ($identity->authenticate())\n\t\t\tYii::app()->user->login($identity);\n\n\t\t$this->redirect(array('home/index'));\n\t}", "title": "" }, { "docid": "d8e2cc50f5be98259b03642c3b81bf6a", "score": "0.5938679", "text": "private function _signInRequested()\n {\n if ($this->model->signIn($_POST['username'], $_POST['password'])) {\n $this->utility->redirect('write');\n } else {\n $this->view->display($this->model);\n }\n }", "title": "" }, { "docid": "4d643011802d492df7b6b5af8359f45c", "score": "0.5930973", "text": "public function login(){\n echo $this->name . ' logged in';\n }", "title": "" }, { "docid": "c098110520334151cf321483b4f41412", "score": "0.5920671", "text": "function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}", "title": "" }, { "docid": "5952fb647a8967dc07b58feaa2afdb47", "score": "0.59179837", "text": "public function logOut(): void;", "title": "" }, { "docid": "e48bbbafae3d52dabd709af69b9fd356", "score": "0.59179467", "text": "public function require_no_user()\n {\n //{\n // Session::flash('notice', 'You must be logged out to see that page.');\n // redirect('/');\n //}\n }", "title": "" }, { "docid": "aed01dafeb1e6085a9688a6555ae2f63", "score": "0.591525", "text": "public function actionGuestupload()\n {\n if (!Yii::$app->user->can('anonymous')) {\n return $this->enterGuestAccess();\n } \n else {\n return $this->actionUpload();\n }\n }", "title": "" }, { "docid": "843bd48e4a2c3e7734bd9f16e5990d77", "score": "0.591438", "text": "public function testGuestUserCannotComment()\n {\n $this->createUser(1);\n $this->createChannel();\n $this->createEpisode();\n\n $this->visit('/episodes/1')\n ->see('Only logged in users can comment.');\n }", "title": "" }, { "docid": "16c7ac3feb194ed4acd367a9ae83add2", "score": "0.5895558", "text": "public function intendedLogin()\n {\n return redirect()->guest('auth/login');\n }", "title": "" }, { "docid": "50f6fa666fc184148dba28b0c7458bf0", "score": "0.5893302", "text": "function user_not_loggedin() {\n global $USER;\n return ($USER->id <= 0 || isguestuser());\n}", "title": "" }, { "docid": "cecdb5124d416e1accf6984d2113cf36", "score": "0.58784896", "text": "function admin()\n{\n # clear the user session by default upon reaching this page\n clearUserSession();\n\n header('Location: ./adminLogin');\n exit;\n}", "title": "" }, { "docid": "303078af51c80272657bb982aa3ef324", "score": "0.58702636", "text": "public function logoff() {}", "title": "" }, { "docid": "303078af51c80272657bb982aa3ef324", "score": "0.5867604", "text": "public function logoff() {}", "title": "" }, { "docid": "303078af51c80272657bb982aa3ef324", "score": "0.5866211", "text": "public function logoff() {}", "title": "" }, { "docid": "6d5c64b23d218c376f7111ec42ea4485", "score": "0.58548933", "text": "public function loginCheckAction()\n {\n }", "title": "" }, { "docid": "ecbc40a3532527ad7d338d4b84a2ae7f", "score": "0.5854301", "text": "function guestbook_user_is_logged() {\n $is_logged = FALSE;\n if (isset($_SESSION['user']['id'], $_SESSION['user']['login']) && session_id() == $_SESSION['user']['sid']) {\n $is_logged = TRUE;\n }\n return $is_logged;\n}", "title": "" }, { "docid": "f86cacba1f74d18469d46bccc42906c4", "score": "0.5853261", "text": "public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }", "title": "" }, { "docid": "faa778308047fbb4808ca6313fbff076", "score": "0.5843886", "text": "public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() {}", "title": "" }, { "docid": "0ad23e319425a911cc148a1bc1426ad7", "score": "0.58412385", "text": "public function login()\n {\n $this->vista->index();\n }", "title": "" }, { "docid": "4532f58b7d67c26f3b3004d642770300", "score": "0.5835587", "text": "function logginRequired(){\n\n}", "title": "" }, { "docid": "3ca1275213ba41498ee20d862b6340e9", "score": "0.5833975", "text": "public function restrict() {\n\t\tif (!$this->is_logged_in()) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "7e9ccf9b14317f82a08080705f350a19", "score": "0.58334816", "text": "public function home(){\n\t\t//debug($this->Session->read('Auth.User'));\n\t\t//juste verifier :\n\t\t//debug($this->Session->check('Auth.User'));\n\t\tif($this->Session->check('Auth.User')){\n\t\t\tif($this->Session->read('Auth.User.role')=='admin'){\n\t\t\t\t$this->redirect('/admins/home');\n\t\t\t}\n\t\t\telse{\n\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t}\n\t}", "title": "" }, { "docid": "1e6b9db87d4ca57231b0281e01bae974", "score": "0.58294225", "text": "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "title": "" }, { "docid": "9a2a4a3b6a196f0caec5c5143ce06f33", "score": "0.58225197", "text": "function isLogged();", "title": "" }, { "docid": "ee03c8462d0cacbfef3a9c942686a4a2", "score": "0.58204746", "text": "abstract public function logout();", "title": "" }, { "docid": "7ab6a5a6ac70f7e227b3f9ff1e004d04", "score": "0.58009005", "text": "public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}", "title": "" }, { "docid": "f3ccfb468a05f274f096efbcd75347e2", "score": "0.5798999", "text": "public function getGuestUser() {\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "797144aab28075a54495bc86a082a281", "score": "0.57981414", "text": "private function logInVOUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(44);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "title": "" }, { "docid": "50fa650cac0cf7497c7281e5fc5c9863", "score": "0.57942975", "text": "function isGuestLoginAvailable()\n{\n\treturn false;\n}", "title": "" }, { "docid": "c0e1f538e0648517be2c39654eea4593", "score": "0.5785331", "text": "public function loginCheckAction()\n {\n\n }", "title": "" }, { "docid": "b6d4fe1dae69b1a94f6769abb6d50125", "score": "0.57826734", "text": "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "title": "" }, { "docid": "15519e4ab69a9c6c44da064e7e4fc268", "score": "0.5781024", "text": "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "title": "" }, { "docid": "ad98fc729b17790d5ddd251cd9d7dc73", "score": "0.577958", "text": "public function loginUserConditionMatchIfUserIsNotLoggedIn() {}", "title": "" }, { "docid": "1f29795f8d6c8a6b26820c34cd83eb76", "score": "0.5778978", "text": "public static function anonymousPage(){\n\t\tif(self::isLogged()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "4a4209f49649ffe1c337057ce45d2164", "score": "0.57765245", "text": "public function guest()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return false;\n\n return true;\n }", "title": "" }, { "docid": "95b506b2592cd75a63a737f95bf69cfb", "score": "0.5774627", "text": "public function doGet(){\n if($this->request->session->exist('user_logged')){\n $this->request->session->delete_session();\n }\n //Redirecciono al front\n redirect(\"\");\n }", "title": "" }, { "docid": "5a2ab2ad7169e118ce866f5480363fa6", "score": "0.5771832", "text": "public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }", "title": "" }, { "docid": "e132e3c1fe78af05177256eb44b5de6e", "score": "0.57654345", "text": "public static function userLoggedIn()\n {\n //Hvis en bruker ikke er logget inn, vil han bli sent til login.php\n if (!isset($_SESSION['user'])) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $_SESSION['returnPage'] = $_SERVER['REQUEST_URI'];\n $alert = new Alert(Alert::ERROR, \"Du er nøtt til å være logget inn for å se den siden. Ikke prøv deg på noe.\");\n $alert->displayOnOtherPage('login.php');\n\n }\n }", "title": "" }, { "docid": "2dc744d0a165e9d4dd05ab711af4f28a", "score": "0.57591283", "text": "public function logoff();", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.5754659", "text": "public function login()\n {\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.5754659", "text": "public function login()\n {\n }", "title": "" }, { "docid": "8e5a47b75e6ed11f1db39a334525df45", "score": "0.57481956", "text": "public function logOff();", "title": "" }, { "docid": "60ad38a9e09bee1fc675c2e4a16e86ee", "score": "0.5741526", "text": "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "title": "" }, { "docid": "c157486f485f7d28ce82b2fe19492aaa", "score": "0.5740617", "text": "function preDispatch() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n if (!$auth->hasIdentity()) {\n $this->_redirect('login');\n } else {\n $user = $auth->getIdentity();\n $group = $user->code_groupe;\n if ($group != 'admin' && $group != 'acteur') {\n $this->view->user = $user;\n return $this->_redirect('index2');\n }\n $this->view->user = $user;\n }\n }", "title": "" }, { "docid": "a138229e7c023469338729dc33aa8f65", "score": "0.57403594", "text": "function getUserName() {\n return $this->userName . \".guest\";\n }", "title": "" }, { "docid": "f4a45a0c522a5c7e7980b8210f82bf5f", "score": "0.5739809", "text": "public function login(){\n\n }", "title": "" }, { "docid": "63ce5032e42d1b9ce2dd19475235e303", "score": "0.5732225", "text": "function is_user_logged_in()\n{\n $isGuest = Yii::$app->user->isGuest;\n return $isGuest ? false : true;\n}", "title": "" } ]
654215ecd148ec0ec1de9b270f80bf17
Add new order whith client, reservations, invoices (ajax method)
[ { "docid": "c483af71b0cb3c6306b1af129a89b71b", "score": "0.6871091", "text": "public function createAjax(Request $request): JsonResponse\n {\n $em = $this->getDoctrine()->getManager();\n $response = [\n 'success' => 1,\n 'message' => 'Order success create!'\n ];\n $taxConfig = 0.14;\n $error = \"\";\n $model = $this->get('vtereshenkov_reservation.reservation.manager');\n $user = $this->getUser();\n $clientId = $request->get('client');\n\n if (empty($clientId)) {\n $clientName = $request->get('client_name');\n $clientEmail = $request->get('client_email');\n $clientSocialProfile = $request->get('client_social_profile');\n $clientPhone = $request->get('client_phone');\n }\n $orderSumm = $request->get('reservation_total');\n $numberOfPeople = $request->get('order_number_of_people');\n $orderPaymentStatus = $request->get('order_payment_status');\n $orderStatus = $request->get('order_status');\n $orderResidentStatus = $request->get('order_resident_status');\n $orderTax = $request->get('order_tax');\n $orderTotal = $request->get('order_total_sum');\n $invoiceSumm = $request->get('order_invoice_sum');\n $reservationList = $request->get('reservation_list');\n $paymentMethod = $request->get('order_payment_method');\n $orderCreateInvoice = $request->get('order_create_invoice');\n\n $deposit = $request->get('order_deposit');\n $flagDeposit = $request->get('order_deposit_flag');\n\n /* Create client(optionality), order and reservation */\n if (!empty(($clientId || $clientName)) && !empty($numberOfPeople) && !empty($orderPaymentStatus) && !empty($reservationList)) {\n $reservationList = json_decode($reservationList, true);\n\n if (empty($clientId)) {\n //create people\n try {\n $clientC = new Client();\n $clientC->setName($clientName);\n $clientC->setEmail($clientEmail);\n $clientC->setProfile($clientSocialProfile);\n $clientC->setPhone($clientPhone);\n\n $em->persist($clientC);\n $em->flush();\n\n $clientId = $clientC->getId();\n } catch (\\Exception $ex) {\n $error = \"Could not create client.\";\n }\n } else {\n $clientC = $em->getRepository(Client::class)->find($clientId);\n }\n\n /* Create order */\n $locationsForOrder = $this->getOrderLocatons($reservationList);\n if ($error == \"\") {\n $paymentStatusF = $em->getRepository(PaymentStatus::class)->find($orderPaymentStatus);\n $statusF = $em->getRepository(Status::class)->find($orderStatus);\n $statusResidentF = $em->getRepository(ResidentStatus::class)->find($orderResidentStatus);\n $locationsF = $em->getRepository(Location::class)->findBy(['id' => $locationsForOrder]);\n $paymentMethodF = $em->getRepository(PaymentMethod::class)->find($paymentMethod);\n\n try {\n $orderC = new Order();\n $orderC->setDate(new \\DateTime('now'));\n $orderC->setSum($orderSumm);\n $orderC->setPaymentStatus($paymentStatusF);\n $orderC->setStatus($statusF);\n $orderC->setResidentStatus($statusResidentF);\n $orderC->setNumberOfPeople($numberOfPeople);\n foreach ($locationsF as $_location) {\n $orderC->addLocation($_location);\n }\n $orderC->setClient($clientC);\n $orderC->setCreatedManager($user);\n $orderC->setTax(!empty($orderTax) ? (float) $orderTax : 0.00);\n $orderC->setTotalSum($orderTotal);\n $orderC->setPaymentMethod($paymentMethodF);\n $orderC->setDeposit(!empty($deposit) ? (float) $deposit : 0.00);\n $orderC->setDepositFlag(!empty($flagDeposit) ? 1 : 0);\n $orderC->setNeedToPay($orderSumm);\n $orderC->setNeedToPayTotal($orderTotal); \n\n $em->persist($orderC);\n $em->flush();\n\n $orderId = $orderC->getId();\n /* Update order number */\n $orderC->setNumber(\"n\" . $orderId);\n $em->persist($orderC);\n $em->flush();\n } catch (\\Exception $ex) {\n $error = \"Could not create order. \" . $ex->getMessage();\n }\n }\n /* Сreate reservation */\n if ($error == \"\") {\n if (!empty($reservationList)) {\n $orderTax = (!empty($orderTax) ? (float) $orderTax : 0.00);\n $reservationItemSum = $this->getReservationItemSumFromOrderSum($reservationList, (float) $orderSumm);\n $reservationItemTax = (!empty($orderTax) ? $reservationItemSum * $taxConfig : 0.00);\n $reservationItemTotal = $reservationItemSum + $reservationItemTax;\n foreach ($reservationList as $reservation) {\n try {\n $model->createRoomReservation([\n 'check-in' => $reservation['checkIn'],\n 'check-out' => $reservation['checkOut'],\n 'bed' => $reservation['bed']['id'],\n 'order' => $orderC,\n 'location' => $reservation['location']['id'],\n 'status' => $statusF,\n 'status_payment' => $paymentStatusF,\n 'status_resident' => $statusResidentF,\n 'sum' => $reservationItemSum,\n 'tax' => $reservationItemTax,\n 'total_sum' => $reservationItemTotal,\n 'need_to_pay' => $reservationItemSum,\n 'need_to_pay_total' => $reservationItemTotal\n ]);\n } catch (\\Exception $ex) {\n $error = \"Could not create reservation.\";\n }\n }\n }\n }\n /* Create invoice */\n $dataInvoice = [];\n switch ($orderCreateInvoice) {\n case 'whole_sum':\n $dataInvoice = [\n 'sum' => (float) $orderSumm,\n 'tax' => (!empty($orderTax) ? (float) $orderTax : 0.00),\n 'total_sum' => (float) $orderTotal\n ];\n break;\n case '10_prepayment':\n $dataInvoice = [\n 'sum' => round(((float) $orderSumm) * 0.1, 2),\n 'tax' => (!empty($orderTax) ? round(((float) $orderTax) * 0.1, 2) : 0.00),\n 'total_sum' => round(((float) $orderTotal) * 0.1, 2)\n ];\n break;\n case 'any_sum':\n $sum = round(((float) $invoiceSumm), 2);\n $tax = $sum * $taxConfig;\n $total = $sum + $tax;\n $dataInvoice = [\n 'sum' => $sum,\n 'tax' => $tax,\n 'total_sum' => $total\n ];\n break;\n }\n if (!empty($dataInvoice)) {\n if ($error == \"\") {\n try {\n $invoiceC = new Invoice();\n $invoiceC->setDate(new \\DateTime('now'));\n $invoiceC->setClient($clientC);\n $invoiceC->setOrder($orderC);\n $invoiceC->setPaymentMethod($paymentMethodF);\n $invoiceC->setPaymentStatus($paymentStatusF);\n $invoiceC->setSum($dataInvoice['sum']);\n $invoiceC->setTax($dataInvoice['tax']);\n $invoiceC->setTotalSum($dataInvoice['total_sum']);\n\n $em->persist($invoiceC);\n $em->flush();\n\n /* Update invoice number */\n $invoiceC->setNumber('n' . $invoiceC->getId());\n $em->persist($invoiceC);\n $em->flush();\n } catch (\\Exception $ex) {\n $error = \"Could not create invoice.\";\n }\n }\n }\n /* Create deposit invoice (Deposit) */\n if (!empty($deposit) && $error == \"\") { \n try {\n if(!empty($flagDeposit)){\n $depositPaymentStatus = $em->getRepository(PaymentStatus::class)->find(1);\n }else{\n $depositPaymentStatus = $em->getRepository(PaymentStatus::class)->find(2);\n }\n \n $depositInvoice = new Invoice();\n $depositInvoice->setDate(new \\DateTime('now'));\n $depositInvoice->setClient($clientC);\n $depositInvoice->setOrder($orderC);\n $depositInvoice->setPaymentMethod($paymentMethodF);\n $depositInvoice->setPaymentStatus($depositPaymentStatus);\n $depositInvoice->setSum(round((float) $deposit, 2));\n $depositInvoice->setTax(0.00);\n $depositInvoice->setTotalSum(round((float) $deposit, 2));\n\n $em->persist($depositInvoice);\n $em->flush();\n \n $depositInvoice->setNumber('n' . $depositInvoice->getId());\n $em->persist($depositInvoice);\n $em->flush();\n } catch (\\Exception $ex) { \n $error = \"Could not create deposit invoice.\";\n }\n }\n if ($error != \"\") {\n $response = [\n 'success' => 0,\n 'message' => $error\n ];\n }\n } else {\n $response = [\n 'success' => 0,\n 'message' => \"Are not filled requirement field!\"\n ];\n }\n\n return new JsonResponse($response);\n }", "title": "" } ]
[ { "docid": "6119754fde00824d3cba5577745a7160", "score": "0.6668414", "text": "public function actionAddOrders()\r\n {\r\n if (Yii::$app->request->isAjax) {\r\n $row = Yii::$app->request->post('Orders');\r\n if((Yii::$app->request->post('isNewRecord') && Yii::$app->request->post('_action') == 'load' && empty($row)) || Yii::$app->request->post('_action') == 'add')\r\n $row[] = [];\r\n return $this->renderAjax('_formOrders', ['row' => $row]);\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "f535200d366a3664a9091662fade6569", "score": "0.6644504", "text": "public function actionAddOrder()\n {\n\n $proDetail = ProductInfo::model()->findByAttributes(['sku' => $_POST['sku']]);\n $userDetail = UserInfo::model()->findByAttributes(['user_id' => Yii::app()->user->getId()]);\n\n $orderInfo['invoice_number'] = $_POST['order_id'];\n $orderInfo['order_id'] = $_POST['order_id'];\n $orderInfo['order_status'] = 0;\n $orderInfo['user_id'] = $userDetail->user_id;\n $orderInfo['building'] = $userDetail->building_num;\n $orderInfo['street'] = $userDetail->street;\n $orderInfo['city'] = $userDetail->city;\n $orderInfo['country'] = $userDetail->country;\n $orderInfo['region'] = $userDetail->region;\n $orderInfo['postcode'] = $userDetail->postcode;\n $orderInfo['orderTotal'] = $_POST['amount'];\n $orderInfo['discount'] = 0;\n $orderInfo['netTotal'] = $_POST['amount'];\n $orderInfo['invoice_date'] = date('Y-m-d H:i:s');\n $orderInfo['company'] = $userDetail->business_name;\n $orderInfo['created_date']= date('Y-m-d H:i:s');\n //print_r($orderInfo); die;\n $orderInfoStatus = OrderHelper::CreateOrderInfo($orderInfo);\n if ($orderInfoStatus){\n $orderItem['order_info_id'] = $orderInfoStatus;\n $orderItem['product_id'] = $proDetail->product_id;\n $orderItem['item_qty'] = 1;\n $orderItem['item_disc'] = $proDetail->description;\n $orderItem['item_price'] = $_POST['amount'];\n $orderItem['created_at'] = date('Y-m-d H:i:s');\n\n if (OrderHelper::CreateOrderItem($orderItem)){\n echo json_encode([\n 'token' => 1,\n ]);\n }else{\n echo json_encode([\n 'token' => 2,\n ]);\n }\n }\n }", "title": "" }, { "docid": "430039d1299bf090b9386d5301c484f5", "score": "0.629296", "text": "public function addNewOrder()\n {\n $this->_rootElement->find($this->createNewOrder)->click();\n }", "title": "" }, { "docid": "6279d2ec3ddbf5fa434988caa0d93e10", "score": "0.62575805", "text": "function addOrder() {\n\t\tif($this->isLoggedIn()){\n\t\t\tif($this->isCheckedIn()){\n\t\t\t\t$preference = $this->customermodel->get_preference($this->input->post('preference'))[0];\n\t\t\t\t$rawAddons = json_decode($this->input->post('addons'),true);\n\t\t\t\tif(empty($rawAddons['addonIds'])){\n\t\t\t\t\t$rawAddons = \"\";\n\t\t\t\t}else{\n\t\t\t\t\t$addonsPrices = $this->customermodel->get_addonPrices($rawAddons['addonIds']);\t\t\t\t\t\n\t\t\t\t\tfor($index = 0 ; $index < count($rawAddons['addonIds']) ; $index++){\n\t\t\t\t\t\tforeach($addonsPrices as $addon){\n\t\t\t\t\t\t\tif($addon['aoID'] == $rawAddons['addonIds'][$index]){\n\t\t\t\t\t\t\t\t$rawAddons['addonIds'][$index] = intval($rawAddons['addonIds'][$index]);\n\t\t\t\t\t\t\t\t$rawAddons['addonQtys'][$index] = intval($rawAddons['addonQtys'][$index]);\n\t\t\t\t\t\t\t\tarray_push($rawAddons['addonSubtotals'], intval($this->input->post('quantity')) * (floatval($addon['aoPrice'])*intval($rawAddons['addonQtys'][$index])));\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\t$data = array(\n\t\t\t\t\t'id' => intval($this->input->post('preference')),\n\t\t\t\t\t'menu_id' => intval($preference['mID']),\n\t\t\t\t\t'name' => $preference['order'],\n\t\t\t\t\t'qty' => intval($this->input->post('quantity')),\n\t\t\t\t\t'orderDesc' => $preference['order'],\n\t\t\t\t\t'subtotal' => (floatval($preference[\"prPrice\"]) * intval($this->input->post('quantity'))) + get_sum($rawAddons[\"addonSubtotals\"]) ,\n\t\t\t\t\t'remarks' => $this->input->post('remarks'),\n\t\t\t\t\t'addons' => $rawAddons\n\t\t\t\t);\n\t\t\t\tif(!$this->session->has_userdata('orders')){\n\t\t\t\t\t$this->session->set_userdata('orders',array());\n\t\t\t\t}\n\t\t\t\t$order = $this->session->userdata('orders');\n\t\t\t\tarray_push($order, $data);\n\t\t\t\t$this->session->set_userdata('orders', $order);\n\t\t\t\techo json_encode($this->session->userdata('orders'));\n\t\t\t\t//term for adding as a temporary order\n\t\t\t}else{\n\t\t\t\tredirect('customer/checkin');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('login');\n\t\t}\n\t}", "title": "" }, { "docid": "02463fd75e976b5b2941c2cd9542bb84", "score": "0.61576545", "text": "public function add_invoice() {\n\t\tif ($this->session->user_name != null) {\n\t\t\t\n\t\t\t$this->load->model ( 'Usersmodel' );\n\t\t\t$results = $this->Usersmodel->get_users ();\n\t\t\t$data = array (\n\t\t\t\t\t'results' => $results \n\t\t\t);\n\t\t\t\n\t\t\t$this->load->model ( 'Projectsmodel' );\n\t\t\t$invoiceId = $this->Projectsmodel->get_current_invoiceId ();\n\t\t\t$data ['invoiceId'] = $invoiceId;\n\t\t\t\n\t\t\t$this->load->model ( 'Clientmodel' );\n\t\t\t$clientDetails = $this->Clientmodel->get_client_name_and_id ();\n\t\t\t$data ['clientdetails'] = $clientDetails;\n\t\t\t\n\t\t\t$this->load->view ( 'menu' );\n\t\t\t$this->load->view ( 'border' );\n\t\t\t$this->load->view ( 'createinvoice', $data );\n\t\t}\n\t}", "title": "" }, { "docid": "3fcaac94e5a9a866d5225ec182531355", "score": "0.6156948", "text": "public function ajax_add_product_for_order()\n\t{\n\t\tif ($this->input->is_ajax_request() AND $this->input->method() == 'post')\n\t\t{\n\t\t\t$this->load->model('shift_model');\n\t\t\t$this->load->model('order_model');\n\t\t\t$this->load->model('order_product_model');\n\n\t\t\t$post = $this->input->post();\n\n\n\t\t\tif (! $post['order_record_id'])\n\t\t\t{\n\t\t\t\t$user = $this->view_data['logged_in_user'];\n\t\t\t\t$shift = $this->shift_model->get_record(['user_record_id' => $user->record_id, 'end_date' => NULL]);\n\t\t\t\t$order = new $this->order_model(['user_record_id' => $user->record_id, 'shift_record_id' => $shift->record_id]);\n\t\t\t\t\n\t\t\t\t$post['order_record_id'] = $order->save_and_get_record_id();\n\t\t\t}\n\n\t\t\t$order_product = $this->order_product_model->get_record(['product_record_id' => $post['product_record_id'],'order_record_id' => $post['order_record_id']]);\n\t\t\t\n\t\t\tif ($order_product)\n\t\t\t{\n\t\t\t\t$order_product->quantity += $post['quantity'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$order_product = new $this->order_product_model($post);\n\t\t\t}\n\n\t\t\t$order_product->save();\n\n\t\t\techo $order_product->order_record_id;\n\t\t}\n\t}", "title": "" }, { "docid": "428ef8ff099495bb573db996094e8c61", "score": "0.61130637", "text": "public function newOrder(Request $request)\n\t{\n\n $validator = \\Validator::make($request->all(), [\n 'order_id' => 'required',\n ]);\n\n if($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()\n ]);\n }\n\t\t$orderDetails = OrderDetail::select('order_details.*', 'users.first_name', 'users.last_name', DB::raw('orders.status_id as status_id'), DB::raw('orders.user_id as user_id'), DB::raw('DATEDIFF(day, order_details.start_date, order_details.end_date) as total_time'), DB::raw('DATEDIFF(day, order_details.start_date, GETDATE()) as selisih'))\n ->leftJoin('orders', 'orders.id', '=', 'order_details.order_id')\n ->leftJoin('users', 'users.id', '=', 'orders.user_id')\n\t\t\t\t\t\t ->where('order_details.order_id', $request->order_id)\n\t\t\t\t\t\t ->get();\n\n\t\tif(count($orderDetails) > 0) {\n\n\t\t\t$data = OrderDetailResource::collection($orderDetails);\n\t\t\t$title = \"New Order (\" . $orderDetails[0]->id_name . \") from user\" . $orderDetails[0]->first_name . \" \" . $orderDetails[0]->last_name;\n\t SendNotifAdmin::dispatch($request->order_id, $title, $data, 'new-order', 'new order')->onQueue('processing');\n\t\t\treturn response()->json(['status' => 'success', 'message' => $title], 200);\n\t\t}\n\t}", "title": "" }, { "docid": "0ac9db286c268f392fcc82e5a8d8cd6c", "score": "0.6090045", "text": "public function addNewInvoice() {\n session_start();\n if (isset($_POST['btn-create-invoice'])) {\n\t\t\t\t\n\t\t\t\t$invoice = new InvoiceModel();\n\t\t\t\t\n\t\t\t\t$form_vars['number'] = $_POST[\"invoice_number\"];\n\t\t\t\t$form_vars['date'] = $_POST[\"invoice_date\"];\n\t\t\t\t$form_vars['company_id'] = $_POST[\"company\"];\n\t\t\t\t$form_vars['person_id'] = $_POST[\"person\"];\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$invoice->create($form_vars);\n\t\t\t\t\theader ('location: dashboard');\n\t\t\t\t\texit();\n\t\t\t\t} catch (InvoiceException $e) {\n\t\t\t\t\techo $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->showCreateInvoiceForm();\n\t\t}", "title": "" }, { "docid": "252c171ad060134673e2a13bb6bb9c97", "score": "0.60875547", "text": "public function orderAdd(){\n $this->request->allowMethod(['post']);\n $this->loadModel('OrderDetail');\n $this->loadModel('Customer');\n $today = Chronos::today();\n $message = '';\n $response = [];\n\n if ($this->request->is(['post'])) {\n $data = $this->request->getData();\n $countOrderDetails = count($data['OrderDetails']); \n $customer_id = $data['customer_id'];\n \n $customer = $this->Customer->find('all')->where(['Customer.customer_id' => $customer_id])->contain(['Product'])->first();\n $products = $customer->product;\n $nameCustomer = $customer->name;\n\n if($countOrderDetails <= 5){\n $listProductsPerm = [];\n foreach ($products as $key => $product) {\n $listProductsPerm[] = $product['product_id'];\n }\n\n \n $order = $this->Orders->newEntity(); \n $orderDetails = $data['OrderDetails'];\n $order = $this->Orders->patchEntity($order, $data);\n\n $total = 0;\n $listProductsRequest = [];\n if($orderDetails){\n foreach ($orderDetails as $key => $detail) {\n $total += $detail['price'] * $detail['quantity'];\n $listProductsRequest[] = $detail['product_id'];\n }\n }\n $listProductsDiff = array_diff($listProductsRequest, $listProductsPerm);\n\n $order->creation_date=$today;\n $order->total=$total;\n if(!$listProductsDiff){\n if ($this->Orders->save($order)) {\n $order_id = $order->order_id;\n \n if($orderDetails){\n foreach ($orderDetails as $key => $detail) {\n $orderDetails[$key]['order_id'] = $order_id;\n }\n }\n \n $details = $this->OrderDetail->newEntity(); \n $details = $this->OrderDetail->patchEntities($details, $orderDetails);\n \n $this->OrderDetail->saveMany($details);\n\n $response['data'] = $order = $this->Orders->find('all')->where(['Orders.order_id' => $order_id])->contain(['OrderDetail', 'Customer'])->first();\n $message = 'La orden del Sr.(a) ' . $nameCustomer . ' fue guardada correctamente'; \n $this->response->statusCode($code = 200); \n } else {\n $message = 'Se presento un error al guardar la orden';\n $this->response->statusCode($code = 400);\n }\n } else {\n $message = 'La orden cuenta con ' . count($listProductsDiff) . ' productos con que no son permitidos para este cliente y no se permite guardar';\n $this->response->statusCode($code = 202);\n }\n } else {\n $message = 'NO se permiten mas de 5 productos por orden';\n $this->response->statusCode($code = 202);\n }\n } else {\n $message = 'Metodo no permitido';\n $this->response->statusCode($code = 405);\n }\n\n $this->set([\n 'code' => $code,\n 'message' => $message,\n 'response' => $response,\n '_serialize' => ['message', 'response', 'code']\n ]);\n }", "title": "" }, { "docid": "8b86f282f3d687d71c5873385c8a569f", "score": "0.6002411", "text": "function GetNewOrder(){}", "title": "" }, { "docid": "ace49c4bbc119c44d537bba045ffd046", "score": "0.5964878", "text": "public function addAction(){\n\t\tif (!empty($_POST)){\n\t\t\t$_POST \t\t\t\t\t\t\t\t\t= FilterValidatorLib::filterRequest($_POST);\n\n\t\t\t$_POST['dataInicio'] \t\t\t\t\t= FilterValidatorLib::formatDate($_POST['dataInicio']);\n\t\t\t$_POST['dataFim'] \t\t\t\t\t\t= FilterValidatorLib::formatDate($_POST['dataFim']);\n\n\t\t\t$this->modelServicoCliente \t\t\t\t= new ServicosClienteModel();\n\t\t\t$this->modelServicoCliente->clienteID \t= $_POST['cliente'];\n\t\t\t$this->modelServicoCliente->servicoID \t= $_POST['servico'];\n\t\t\t$this->modelServicoCliente->dataInicio \t= $_POST['dataInicio'];\n\t\t\t$this->modelServicoCliente->dataFim \t= $_POST['dataFim'];\n\t\t\t\n\t\t\t$this->dao \t\t\t\t\t\t\t\t= new ServicosClienteDao();\n\n\t\t\t$result \t\t\t\t\t\t\t\t= $this->dao->add($this->modelServicoCliente); \n\t\t\techo \"<script>alert('{$result}')</script>\";\n\t\t\techo Application::redirect(\"?controller=servicosCliente\");\n\t\t}\n\t}", "title": "" }, { "docid": "e8f8913c814d485503f6753a1251e3ac", "score": "0.5944939", "text": "public function addOrder(){\n $productModel = $this->model('ProductModel');\n $products = $productModel->getProducts(); \n $defautModel = $this->model('defautModel');\n $customers = $defautModel->getCustomers();\n $this->view('order/viewAddOrder.php', $products, $customers);\n \n }", "title": "" }, { "docid": "adc8386b05d55c78b911567a5207908e", "score": "0.5938521", "text": "function order_ajax(){\n\t\t\t$status_id = ($_GET[\"status_id\"] != \"\") ? $_GET[\"status_id\"] : '';\n\t\t\t\n\t\t\t$cookie = array(\n\t\t\t\t\t\t\t\t'status_id' => $status_id\n\t\t\t\t\t\t\t);\n\t\t\t$this->EE->input->set_cookie('br_order_overview',base64_encode(serialize($cookie)),time()+(8640*30));\n\t\t\t\n\t\t\t// Get the order collection\n if($status_id == 'all'){$status_id = '';}\n $orders = $this->EE->order_model->get_order_collection('','',$_GET[\"iDisplayLength\"],$_GET[\"sSearch\"],$_GET[\"iDisplayStart\"],$_GET[\"iSortCol_0\"],$_GET[\"sSortDir_0\"],$status_id);\n\t\t\t\n\t\t\t// Individual order container\n\t\t\t\t$order = array();\n\t\t\t\n\t\t\t// Build the row array \n\t\t\t\tforeach ($orders[\"results\"] as $row){\n\t\t\t\t\t\n\t\t\t\t\t// Customer can be a member but we want to \n\t\t\t\t\t// handle the instance where the member has \n\t\t\t\t\t// been deleted better so the model returns \n\t\t\t\t\t// the billing_fname/lname as well in cases\n\t\t\t\t\t// where the customer response is Null\n\t\t\t\t\t\t$customer = ($row[\"customer\"] != null) ? '<a href=\"'.BASE.'&C=myaccount&id='.$row[\"member_id\"].'\">'.$row[\"customer\"].'</a>' : $row[\"billing_customer\"];\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$status = $this->_config[\"status\"][$row[\"status_id\"]];\n $order_link = BASE.AMP.'C=addons_modules&M=show_module_cp&module=brilliant_retail&method=order_detail&order_id='.$row[\"order_id\"];\n\t\t\t\t\t\t$order[] = array('\t<a href=\"'.$order_link . '\">'.$row[\"order_id\"] .'</a>', \n\t\t\t\t\t\t\t\t\t\t\t$this->EE->localize->format_date('%n/%d/%y %g:%i%a', $row[\"created\"]), \n\t\t\t\t\t\t\t\t\t\t\t$customer, \n\t\t\t\t\t\t\t\t\t\t\t$row[\"total\"],\n\t\t\t\t\t\t\t\t\t\t\t$row[\"payment\"],\n\t\t\t\t\t\t\t\t\t\t\t$row[\"balance\"],\n\t\t\t\t\t\t\t\t\t\t\t'<span class=\"order_status_'.$row[\"status_id\"].'\">'.$status.'</span>',\n '<a onclick=\"alert(\\'Cannot decide which item to download, please download from detail\\');\" href=\"'.$order_link.'\">Download link</a>',\n\t\t\t\t\t\t\t\t\t\t\t'<input type=\"checkbox\" name=\"batch['.$row[\"order_id\"].']\" />'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\n\t\t\t// Response array to json encode\n\t\t\t\t$output = array(\n\t\t\t\t\t\"sEcho\" => $_GET[\"sEcho\"],\n\t\t\t\t\t\"iTotalRecords\" => $orders[\"total\"],\n\t\t\t\t\t\"iTotalDisplayRecords\" => $orders[\"displayTotal\"],\n\t\t\t\t\t\"aaData\" => $order \n\t\t\t\t);\n\t\t\t\n\t\t\t// Return the json data with a success header and exit\n\t\t\t\t@header(\"HTTP/1.1 200 OK\");\n\t\t\t\techo json_encode($output);\n\t\t\t\texit();\n\t\t}", "title": "" }, { "docid": "0a784128e1ae3e31ac6710aad240892e", "score": "0.59275436", "text": "public function actionAddInventoryWithdrawaldetails()\n {\n if (Yii::$app->request->isAjax) {\n $row = Yii::$app->request->post('InventoryWithdrawaldetails');\n if((Yii::$app->request->post('isNewRecord') && Yii::$app->request->post('_action') == 'load' && empty($row)) || Yii::$app->request->post('_action') == 'add')\n $row[] = [];\n return $this->renderAjax('_formInventoryWithdrawaldetails', ['row' => $row]);\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "4cb81c56ea1daba0d35b6c54ab7735ae", "score": "0.59080684", "text": "public function orderCreate() {\r\n// echo 1; exit;\r\n $userId = $this->checkVerifyApiKey('CUSTOMER');\r\n if ($userId) {\r\n $this->loadModel('Orders');\r\n $this->loadModel('PaymentDetails');\r\n $requestArr = $this->getInputArr();\r\n $requiredFields = array(\r\n 'Order Id' => (isset($requestArr['order_id']) && $requestArr['order_id'] != '') ? $requestArr['order_id'] : ''\r\n );\r\n $validate = $this->checkRequiredFields($requiredFields);\r\n if ($validate != \"\") {\r\n $this->wrong($validate);\r\n }\r\n $order_id = $requestArr['order_id'];\r\n $order = $this->Orders->find('all')->where(['order_id' => $order_id, 'user_id' => $userId])->hydrate(false)->first();\r\n if (!empty($order)) {\r\n if (isset($order['total_amount']) && $order['total_amount'] != 0) {\r\n $orderPaymentPendingDetails = $this->PaymentDetails->find('all')->where(['order_id' => $order_id, 'user_id' => $userId, 'payment_status' => 'PENDING'])->hydrate(false)->first();\r\n if (isset($orderPaymentPendingDetails) && !empty($orderPaymentPendingDetails)) {\r\n $data = [];\r\n $data['order_id'] = $orderPaymentPendingDetails['payment_order_id'];\r\n $data['amount'] = $orderPaymentPendingDetails['payment_amount'];\r\n $data['receipt'] = $orderPaymentPendingDetails['order_id'];\r\n $tmpCreated = $orderPaymentPendingDetails['created_at']->format('Y-m-d H:i:s');\r\n $data['created_at'] = strtotime($tmpCreated);\r\n $this->success('Order Created!', $data);\r\n } else {\r\n $orderData = [\r\n 'receipt' => $order['order_id'],\r\n 'amount' => $order['total_amount'] * 100, // 2000 rupees in paise\r\n 'currency' => 'INR',\r\n 'payment_capture' => 1 // auto capture\r\n ];\r\n //echo \"https://\".RAZORPAY_KEY_ID.\":\".RAZORPAY_KEY_SECRET.\"@api.razorpay.com/v1/orders\"; exit;\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"https://\" . RAZORPAY_KEY_ID . \":\" . RAZORPAY_KEY_SECRET . \"@api.razorpay.com/v1/orders\");\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ch, CURLOPT_HEADER, FALSE);\r\n curl_setopt($ch, CURLOPT_POST, TRUE);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($orderData));\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n $response = curl_exec($ch);\r\n $err = curl_error($ch);\r\n curl_close($ch);\r\n if ($err) {\r\n $this->wrong(\"cURL Error #:\" . $err);\r\n } else {\r\n if (isset($response) && !empty($response)) {\r\n $orders = json_decode($response, true);\r\n $paymentDetails = $this->PaymentDetails->newEntity();\r\n $order_data = array(\r\n 'user_id' => $userId,\r\n 'order_id' => $order_id,\r\n 'payment_method' => 'RAZORPAY',\r\n 'payment_order_id' => $orders['id'],\r\n 'payment_amount' => $orders['amount'],\r\n 'payment_id' => '',\r\n 'payment_status' => 'PENDING',\r\n 'user_email' => '',\r\n 'user_phone' => '',\r\n 'razorpay_response_code' => '',\r\n 'notes' => ''\r\n );\r\n $paymentDetails = $this->PaymentDetails->patchEntity($paymentDetails, $order_data);\r\n $paymentDetails->created_at = date('Y-m-d H:i:s');\r\n $paymentDetails->modified_at = '';\r\n if ($this->PaymentDetails->save($paymentDetails)) {\r\n $data = [];\r\n $data['order_id'] = $orders['id'];\r\n $data['amount'] = $orders['amount'];\r\n $data['receipt'] = $orders['receipt'];\r\n $data['created_at'] = $orders['created_at'];\r\n $this->success('Order Created!', $data);\r\n } else {\r\n $this->wrong(__('UNABLE TO GET PAYMENT DATA.'));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n $this->wrong('Sorry, Order not found!');\r\n }\r\n } else {\r\n $this->wrong('Invalid API key.');\r\n }\r\n }", "title": "" }, { "docid": "a72c233cca5da7b54c14e159e78cdaf0", "score": "0.59030503", "text": "public function actionAgregarlinea(){\n \n if(isset($_POST['restaurarCombos'])){\n $res=array(\n 'SUBTIPOS'=>SubtipoTransaccion::darSubtipos(),\n 'CANTIDADES'=>TipoCantidadArticulo::darCantidades(),\n );\n echo CJSON::encode($res);\n }\n \n if(isset($_POST['DocumentoInvLinea']))\n $this->validarLineas($_POST['DocumentoInvLinea']); \n \n if(isset($_GET['tipo']))\n $this->cargarSubtipo($_GET['tipo']);\n \n if(isset($_GET['tipo_transaccion']))\n $this->cargarCantidades($_GET['tipo_transaccion']);\n \n \n if(isset($_GET['idBodega']))\n $this->cargarBodega($_GET['idBodega']);\n \n if(isset($_GET['idArticulo']))\n $this->cargarArticulo($_GET['idArticulo']);\n \n }", "title": "" }, { "docid": "0be39dec8d4da1cb50342340372d3ff2", "score": "0.58572066", "text": "public function addNewOrder(Request $request) {\n $order = new Orders;\n $order->users_id = Auth::id();\n if (empty($request->input('base'))){\n return redirect()->back()->withErrors(['Please Select an Entree']);\n }\n $base = Base::firstWhere('base', $request->input('base'));\n $order->order = $base->base;\n $order->bases_id = $base->id;\n $order->save();\n if (!empty($request->input('condiments'))){\n $condiments = $request->input('condiments');\n foreach ($condiments as $condiment) {\n $new_condiment = new Condiments;\n $new_condiment->orders_id = $order->id;\n $new_condiment->condiment = $condiment;\n $new_condiment->save();\n }\n }\n if (!empty($request->input('toppings'))){\n $toppings = $request->input('toppings');\n foreach ($toppings as $topping) {\n $new_topping = new Toppings;\n $new_topping->orders_id = $order->id;\n $new_topping->topping = $topping;\n $new_topping->save();\n }\n }\n return redirect()->route('home');\n }", "title": "" }, { "docid": "fda24dd9047c789a391d86e96515830a", "score": "0.58467317", "text": "public function newinsertorder(Request $request)\n\t{\n\t\t@session_start();\t\t\n \n\t\t$tour_id = 0;\n\t\tif($request->has('tour_id') && $request->get('tour_id') > 0) {\n\t\t\t$tour_id = $request->get('tour_id');\n\t\t}\n\t\telseif(Session::has('order_tour_id')) {\n\t\t\t$tour_id = Session::get('order_tour_id');\n\t\t}\n\t\telseif(isset($_SESSION['order_tour_id']) && $_SESSION['order_tour_id']>0) {\n\t\t\t$tour_id = $_SESSION['order_tour_id'];\n\t\t}\n\t\t\n\t\tif($tour_id > 0)\n\t\t{\n\t\t\t$firstname = $request->get('firstname');\n\t\t\t$lastname = $request->get('lastname');\n\t\t\t$email = $request->get('email');\n\t\t\t$phone = $request->get('phone');\n\t\t\t$address = $request->get('address');\n\t\t\t$pincode ='';\n\t\t\t// $pincode = $request->get('pincode');\n\t\t\t $city = $request->get('city');\n\t\t\t //$state = '';\n\t\t\t$state = $request->get('state');\n\t\t\t$country = $request->get('country');\n\t\t\t$productinfo = $request->get('productinfo');\n\t\t\t$price_per_person = $request->get('price_per_person');\n\t\t\t\n\t\t\tif($request->has(\"no_of_persons\")) {\n\t\t\t\t$no_of_persons = $request->get('no_of_persons');\n\t\t\t}\n\t\t\telseif($request->has(\"no_of_adults\")) {\n\t\t\t\t$no_of_persons = $request->get('no_of_adults');\n\t\t\t}\n\t\t\tif($request->has(\"no_of_child\")) {\n\t\t\t\t$no_of_child = $request->get('no_of_child');\n\t\t\t}\n\t\t\telseif($request->has(\"no_of_child\")) {\n\t\t\t\t$no_of_child = $request->get('no_of_child');\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$amount = $request->get('amount');\n\t\t\t$coupon_code = '';\n\t\t\tif($request->has(\"txt_coupon_code\")) {\n\t\t\t\t$coupon_code = $request->get('txt_coupon_code');\n\t\t\t}\n\t\t\telseif($request->has(\"applied_coupon_code\")) {\n\t\t\t\t$coupon_code = $request->get('applied_coupon_code');\n\t\t\t}\n\t\t\t\n\t\t\t$tour_date = date(\"Y-m-d\",strtotime($request->get('txt_tour_date')));\n\t\t\t\n\t\t\t$coupon_amount = 0;\n\t\t\tif(trim($coupon_code) != \"\")\n\t\t\t{\n\t\t\t\t$coupon = \\DB::table('coupons')->where('coupon_code', trim($coupon_code))->get()->toArray();\n\t\t\t\tif(!empty($coupon)) {\n\t\t\t\t\t$coupon_amount = $coupon[0]->coupon_amount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$_SESSION['orderfirstname'] = trim($firstname);\n\t\t\t$_SESSION['orderlastname'] = trim($lastname);\n\t\t\t$_SESSION['orderemail'] = trim($email);\n\t\t\t\n\t\t\t$user_id = 0;\n\t\t\tif($email != '')\n\t\t\t{\n\t\t\t\t$user_check = DB::table('users')->where('email',$email)->get()->first();\n\t\t\t\t\n\t\t\t\tif(!empty($user_check))\n\t\t\t\t{\n\t\t\t\t\t// GET USER\n\t\t\t\t\t$user_id = $user_check->id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$password = substr(md5(microtime()),rand(0,26),6);\n\t\t\t\t\t// INSERT USER\n\t\t\t\t\t$user_id = \\DB::table('users')->insertGetId([\n\t\t\t\t\t'name' => trim($firstname).' '.trim($lastname),\n\t\t\t\t\t'email' => trim($email),\n\t\t\t\t\t'password' => bcrypt($password),\n\t\t\t\t\t'status' => 'Active'\n\t\t\t\t\t]);\n\t\t\t\t\t\n\t\t\t\t\t$subject = \"Welcome to Tripindia\";\n\t\t\t\t\t$password_message = \"Your New Useranme (email) \".$email.\"<br /> Password is \".$password;\n\t\t\t\t\t\n\t\t\t\t\t$mg = new Mailgun(\"key-a886acc552c9ecb8cae8937ff13894ec\");\n\t\t\t\t\t$domain = \"bulkmail.influensell.net\";\n\t\t\t\t\t$batchMsg = $mg->BatchMessage($domain);\n\t\t\t\t\t$batchMsg->setFromAddress(\"[email protected]\", array(\"first\"=>\"Trip\", \"last\" => \"India\"));\n\t\t\t\t\t$batchMsg->setSubject($subject);\n\t\t\t\t\t$batchMsg->setHtmlBody($password_message);\n\t\t\t\t\t$batchMsg->addToRecipient($email, array(\"first\" => $firstname, \"last\" => $lastname));\n\t\t\t\t\t//$batchMsg->addBccRecipient(\"[email protected]\", array(\"first\"=>\"Jalpesh\", \"last\" => \"Anibyte\"));\n\t\t\t\t\t$batchMsg->finalize();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$order_id = \\DB::table('orders')->insertGetId([\n\t\t\t\t'tour_id' => $tour_id, \n\t\t\t\t'user_id' => $user_id, \n\t\t\t\t'tour_name' => trim($productinfo),\n\t\t\t\t'firstname' => trim($firstname),\n\t\t\t\t'lastname' => trim($lastname),\n\t\t\t\t'email' => trim($email),\n\t\t\t\t'phone' => trim($phone),\n\t\t\t\t'city' => trim($city),\n\t\t\t\t'state' => trim($state),\n\t\t\t\t'country' => trim($country),\n\t\t\t\t'address' => $address,\n\t\t\t\t'no_of_persons' => $no_of_persons,\n\t\t\t\t'no_of_child' => $no_of_child,\n\t\t\t\t'tour_date' => $tour_date,\n\t\t\t\t'coupon_code' => trim($coupon_code),\n\t\t\t\t'coupon_amount' => trim($coupon_amount),\n\t\t\t\t'amount' => trim($amount),\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t]); \n\t\t\t\n\t\t\tSession::put('order_id', $order_id);\n\t\t\t$_SESSION['order_id'] = $order_id;\n\t\t}\n\t}", "title": "" }, { "docid": "4b7472439e4e2ec0d66c5f8d02bf7601", "score": "0.58438534", "text": "public function addInvoice(Request $request) {\n $inputs = $request->input();\n $user = $request->user();\n $validations = $this->getInvoiceValidations($inputs);\n $messages = [\n 'required' => '*Required',\n 'required_if' => '*Required',\n 'required_with' => '*Required',\n 'numeric' => 'Must be a number',\n 'client.required_without' => '*Required if invoice is for existing client'\n ];\n\n Validator::make($inputs, $validations, $messages)->validate();\n\n DB::transaction(function() use ($inputs, $user) {\n\n $invoice = new Invoices;\n $invoice->user_id = $user->id;\n $invoice->invoiceNum = $inputs['invoiceNum'];\n $invoice->invoiceDate = Carbon::createFromFormat('m/d/Y', $inputs['invoiceDate']);\n\n //Get client\n if (isset($inputs['newClient']) && $inputs['newClient'] === 'on') {\n $client = new Clients;\n $client->name = $inputs['clientName'];\n $client->email = $inputs['clientEmail'];\n $client->address1 = $inputs['clientAddress1'];\n $client->address2 = $inputs['clientAddress2'];\n $client->city = $inputs['clientCity'];\n $client->state = $inputs['clientState'];\n $client->zipcode = $inputs['clientZip'];\n $client->user_id = $user->id;\n $client->save();\n\n $invoice->client_id = $client->id;\n } else {\n $invoice->client_id = $inputs['client'];\n }\n\n $invoice->total = $inputs['total'];\n $invoice->tax = $inputs['tax'];\n $invoice->subTotal = $inputs['subTotal'];\n\n if(isset($inputs['discount']) && $inputs['discount'] > 0){\n $invoice->discount = $inputs['discount'];\n }\n\n $invoice->totalPaid = $inputs['totalPaid'];\n $invoice->paid = (isset($inputs['paid']) && $inputs['paid'] === 'on') ? 1 : 0;\n $invoice->shipped = (isset($inputs['shipped']) && $inputs['shipped'] === 'on') ? 1 : 0;\n $invoice->save();\n\n $invoice_id = $invoice->id;\n\n $i = 1;\n\n while (isset($inputs['detail-' . $i . '-item']) && $inputs['detail-' . $i . '-item'] !== '') {\n $detail = new InvoiceDetail;\n $detail->invoiceHeader_id = $invoice_id;\n $detail->item_id = $inputs['detail-' . $i . '-item'];\n $detail->size_id = $inputs['detail-' . $i . '-size'];\n $detail->quantity = $inputs['detail-' . $i . '-quantity'];\n $detail->price = $inputs['detail-' . $i . '-price'];\n $detail->save();\n\n $i++;\n }\n\n flash('Your invoice was added.', 'success');\n });\n\n if ($inputs['saveNew'] === '1') {\n return redirect('llr/invoice', [\n 'inputs' => []\n ]);\n } else {\n return redirect('dashboard/invoices');\n }\n }", "title": "" }, { "docid": "b05fcb30a7cf0132302dd1eb16608a6a", "score": "0.5823616", "text": "public function newinvoice()\n\t{\n\t\t$data = array();\n\t\t$data['title'] \t\t\t= $this->title;\n\t\t$data['activemenu'] \t= $this->activemenu;\n\t\t$data['clients'] \t\t= $this->common_model->get_select_option('ci_clients', 'client_id', 'client_name');\n\t\t$data['taxrates'] \t\t= $this->common_model->get_select_option('ci_tax_rates', 'tax_rate_id', 'tax_rate_name', 1);\n\t\t$data['invoice_number']\t= $this->generate_invoice_number();\n\t\t$data['pagecontent'] \t= 'tax_invoices/newinvoice';\n\t\t$this->load->view('common/holder', $data);\n\t}", "title": "" }, { "docid": "fb858738bacd74408c610d70d2024597", "score": "0.58073306", "text": "function ajax_save_invoice()\n\t{\n\t\t$items = json_decode($this->input->post('items'));\n\t\t$invoice_number = $this->input->post('invoice_number');\n\t\t$invoice_id = $this->input->post('invoice_id');\n\t\t$save_type = $this->input->post('save_type');\n\n\t\t$invoice_items = 0;\n\t\tforeach ($items as $item) \n\t\t{\n\t\t\tif($item->item_quantity != '' && $item->item_price != '')\n\t\t\t{\n\t\t\t\t$invoice_items++;\n\t\t\t}\n\t\t}\n\t\tif($invoice_items > 0)\n\t\t{\n\t\t\t$valid = $this->tax_invoice_model->validate_invoice_num($invoice_number, $invoice_id);\n\n\t\t\tif($valid){\n\n\t\t\t\tif($save_type == 'new'){\n\t\t\t\t\t\t$invoice_details = array('user_id' \t\t\t\t=> $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'client_id' \t\t\t=> $this->input->post('invoice_client'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_number' \t\t=> $invoice_number,\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_terms' \t\t=> $this->input->post('invoice_terms'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_discount'\t\t=> $this->input->post('invoice_discount_amount'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_due_date' \t=> date('Y-m-d', strtotime($this->input->post('invoice_due_date'))),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_date_created' => date('Y-m-d', strtotime($this->input->post('invoice_date'))),\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$invoice_id = $this->common_model->saverecord('ci_tax_invoices', $invoice_details);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// add new for DEBT function aumatically it...\n\t\t\t\t\t\t$debt_details = array('user_id' \t\t\t\t=> $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'client_id' \t\t\t=> $this->input->post('invoice_client'),\n\t\t\t\t\t\t\t\t'invoice_id'\t\t\t=> $invoice_id,\n\t\t\t\t\t\t\t\t'debt_reference' \t\t=> 'Tax Invoice No: '.$invoice_number,\n\t\t\t\t\t\t\t\t'debt_description' \t\t=> $this->input->post('invoice_terms'),\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'debt_date_updated' \t=> date('Y-m-d'),\n\t\t\t\t\t\t\t\t'debt_date_created' \t=> date('Y-m-d', strtotime($this->input->post('invoice_date'))),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$debt_id = $this->common_model->saverecord('ci_debt', $debt_details);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t$invoice_details = array('client_id' \t\t\t=> $this->input->post('invoice_client'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_terms' \t\t=> $this->input->post('invoice_terms'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_number' \t\t=> $invoice_number,\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_status' \t\t=> $this->input->post('invoice_status'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_discount'\t\t=> $this->input->post('invoice_discount_amount'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_due_date' \t=> date('Y-m-d', strtotime($this->input->post('invoice_due_date'))),\n\t\t\t\t\t\t\t\t\t\t\t\t 'invoice_date_created' => date('Y-m-d', strtotime($this->input->post('invoice_date'))),\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->common_model->update_records('ci_tax_invoices', 'invoice_id', $invoice_id, $invoice_details);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update debt once anything changes\n\t\t\t\t\t\t//update amount once it is update or save in DEBT\n\t\t\t\t\t\t// but it need do a checking which is if old record and update, so...\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$debt_record = $this->common_model->select_record('ci_debt', 'invoice_id', $invoice_id);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($debt_record):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$debt_details = array(\n\t\t\t\t\t\t\t\t\t'user_id' \t\t\t\t=> $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t\t'client_id' \t\t\t=> $this->input->post('invoice_client'),\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'debt_reference' \t\t=> 'Tax Invoice No: '.$invoice_number,\n\t\t\t\t\t\t\t\t\t'debt_description' \t\t=> $this->input->post('invoice_terms'),\n\t\t\t\t\t\t\t\t\t'debt_date_created' \t=> date('Y-m-d', strtotime($this->input->post('invoice_date'))),\n\t\t\t\t\t\t\t\t\t'debt_date_updated' \t=> date('Y-m-d')\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->common_model->update_records('ci_debt', 'invoice_id', $invoice_id, $debt_details);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// add new for DEBT function aumatically it...\n\t\t\t\t\t\t\tif($this->input->post('invoice_status') == 'unpaid'){\n\t\t\t\t\t\t\t\t$debt_details = array('user_id' \t\t\t\t=> $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t\t\t'client_id' \t\t\t=> $this->input->post('invoice_client'),\n\t\t\t\t\t\t\t\t\t\t'invoice_id'\t\t\t=> $invoice_id,\n\t\t\t\t\t\t\t\t\t\t'debt_reference' \t\t=> 'Tax Invoice No: '.$invoice_number,\n\t\t\t\t\t\t\t\t\t\t'debt_description' \t\t=> $this->input->post('invoice_terms'),\n\t\t\t\t\t\t\t\t\t\t'debt_date_updated' \t=> date('Y-m-d'),\n\t\t\t\t\t\t\t\t\t\t'debt_date_created' \t=> date('Y-m-d', strtotime($this->input->post('invoice_date'))),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$debt_id = $this->common_model->saverecord('ci_debt', $debt_details);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tendif;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$debt_amount = 0;\n\t\t\t\t\n\t\t\t\tforeach ($items as $item) \n\t\t\t\t{\n\t\t\t\t\tif($item->item_quantity != '' && $item->item_price != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$item_id = $item->item_id;\n\t\t\t\t\t\t$item_details = array ('invoice_id'\t\t\t=> $invoice_id,\n\t\t\t\t\t\t\t\t\t\t\t 'item_name'\t\t\t=> $item->item_name,\n\t\t\t\t\t\t\t\t\t\t\t 'item_quantity'\t\t=> $item->item_quantity,\n\t\t\t\t\t\t\t\t\t\t\t 'item_description'\t=> $item->item_description,\n\t\t\t\t\t\t\t\t\t\t\t 'item_taxrate_id'\t=> $item->tax_rate_id,\n\t\t\t\t\t\t\t\t\t\t\t 'item_order'\t\t\t=> $item->item_order,\n\t\t\t\t\t\t\t\t\t\t\t 'item_price'\t\t\t=> $item->item_price,\n\t\t\t\t\t\t\t\t\t\t\t 'item_discount'\t\t=> $item->item_discount,\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t$debt_amount += (($item->item_price * $item->item_quantity) - $item->item_discount);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($item_id != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->common_model->update_records('ci_tax_invoice_items', 'item_id', $item_id, $item_details);\n\t\t\t\t\t\t\t$this->session->set_flashdata('success', 'The invoice has been edited successfully !!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->common_model->saverecord ('ci_tax_invoice_items', $item_details);\n\t\t\t\t\t\t\t$this->session->set_flashdata('success', 'The invoice has been created successfully !!');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t//update amount once it is update or save in DEBT\n\t\t\t\t$debt_record = $this->common_model->select_record('ci_debt', 'invoice_id', $invoice_id);\t\n\t\t\t\t$tax_percent = 1 + $this->common_model->get_tax($item->tax_rate_id);\t\t\t\t\n\t\t\t\t//$tax_percent = 1.06;\n\t\t\t\t\n\t\t\t\tif($debt_record):\n\t\t\t\t\t$debt_amount_details = array(\n\t\t\t\t\t\t\t'debt_amount_unpaid' \t\t=> ($debt_amount - $this->input->post('invoice_discount_amount')) * $tax_percent,\n\t\t\t\t\t\t\t'debt_date_updated' => date('Y-m-d')\n\t\t\t\t\t);\n\t\t\t\t\t$this->common_model->update_records('ci_debt', 'invoice_id', $invoice_id, $debt_amount_details);\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t$response = array(\n\t 'success' => 1,\n\t\t\t\t\t'item' => $items,\n\t );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$response = array(\n\t 'success' => 0,\n\t 'error' \t\t\t=> 'The invoice number already exists for another invoice',\n \t);\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = array(\n 'success' => 0,\n 'error' \t\t\t=> 'Please enter atleast one item',\n );\n\t\t}\n\t\techo json_encode($response);\t\n\t}", "title": "" }, { "docid": "1769a95f3b177a3ea74dae2fb6b4ee99", "score": "0.58067906", "text": "public function actionAjaxAddIngredient($id, $order_id, $productType, $total){\n\t\t$orderIngredient = new CustomerOrdersIngredients();\n\t\t\n\t\t\n\t\t\n\t\t//Form has been submitted process accordingly\n\t\tif ($orderIngredient->load(Yii::$app->request->post()))\n\t\t\t{\n\t\t\t\t\n\t\t\t//we also want to look up the product price and add this to the ingredient\n\t\t\t$orderIngredient->updatePrice();\n\t\t\t\n\t\t\tif($orderIngredient->save()) \n\t\t\t\t{\n\t\t\t\treturn print_r($orderIngredient);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t//form was submitted but failed to save correctly, resend the form through to be rendered\n\t\t\telse{\n\t\t\t\treturn print_r($orderIngredient->getErrors());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t//Form being rendered for the first time\n\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\tif($id == \"new\"){\n\t\t\t\t$orderIngredient = new CustomerOrdersIngredients();\n\t\t\t\t$orderIngredient->order_id = $order_id;\n\t\t\t\t$orderIngredient->created_on = Date('Y-m-d');\n\t\t\t\t$orderIngredient->ingredient_percent = 100-$total;\n\t\t\t\t}\t\n\t\t\telse{\n\t\t\t\t$orderIngredient = CustomerOrdersIngredients::findOne($id);\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Commodity\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [3];\n\t\t\t\t}\n\t\t\telseif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Mix\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [2];\n\t\t\t\t}\n\t\t\telseif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Pellet\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [1];\n\t\t\t\t}\n\t\t\telseif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Additive\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [4];\n\t\t\t\t}\n\t\t\telseif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Custom\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [4,3,2,1];\n\t\t\t\t}\n\t\t\telseif(Lookup::item($productType, 'ORDER_CATEGORY') == \"Pellet - Custom\")\n\t\t\t\t{\n\t\t\t\t$productTypes = [1,4];\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$products = Product::find()\n\t \t\t\t\t->where(['status' => Product::ACTIVE])\n\t \t\t\t\t->where(['Product_Category' => $productTypes])\n\t \t\t\t\t->select(['id', 'Name', 'Product_Category'])\n\t \t\t\t\t->all();\n\t \t\t\t\t\n\t \n\t $productList = ArrayHelper::map($products, 'id', 'Name', 'productTypeString');\n\t\t\treturn $this->renderAjax(\"/customer-orders-ingredients/_orderAdd\", ['model' => $orderIngredient, 'productList' => $productList]);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8a9159baf7d1460925d865b0f4842fa7", "score": "0.57805353", "text": "public function new_order(){\n\t\theader('Content-Type: application/json');\n\t\t$this->loadModel('Ride');\n\t\t$this->loadModel('Cupon');\n\t\t//$this->write_log($this->request->data);\n\t\tif($this->request->is('post')){\n\t\t\tif( isset($this->request->data['device_type']) && $this->request->data['device_type']>0 ){\n\t\t\t\t$picupcityname = '';\n\t\t\t\t$pick_up = ' '; \n\t\t\t\t$picupWithCity = (isset($this->request->data['pick_up']) && $this->request->data['pick_up']!='')?explode('*',$this->request->data['pick_up']):array();\n\t\t\t\tif(is_array($picupWithCity) && count($picupWithCity)>0){\n\t\t\t\t\t$pick_up = $picupWithCity['0'];\n\t\t\t\t\t$picupcityname = (isset($picupWithCity['1']))?$picupWithCity['1']:'';\n\t\t\t\t}\n\t\t\t\t$pick_up_lat = (isset($this->request->data['pick_up_lat']) && $this->request->data['pick_up_lat']!='')?$this->request->data['pick_up_lat']:' ';\n\t\t\t\t$pick_up_lon = (isset($this->request->data['pick_up_lon']) && $this->request->data['pick_up_lon']!='')?$this->request->data['pick_up_lon']:' ';\n\t\t\t\t$drop_off = (isset($this->request->data['drop_off']) && $this->request->data['drop_off']!='')?$this->request->data['drop_off']:' ';\n\t\t\t\t$drop_off_lat = (isset($this->request->data['drop_off_lat']) && $this->request->data['drop_off_lat']!='')?$this->request->data['drop_off_lat']:' ';\n\t\t\t\t$drop_off_lon = (isset($this->request->data['drop_off_lon']) && $this->request->data['drop_off_lon']!='')?$this->request->data['drop_off_lon']:' ';\n\t\t\t\t$user_id = (isset($this->request->data['user_id']) && $this->request->data['user_id']!='')?$this->request->data['user_id']:' ';\n\t\t\t\t$instruction = (isset($this->request->data['instruction']) && $this->request->data['instruction']!='')?$this->request->data['instruction']:' ';\n\t\t\t\t$ride_date_time = (isset($this->request->data['ride_date_time']) && $this->request->data['ride_date_time']!='')?date(\"Y-m-d G:i\",strtotime($this->request->data['ride_date_time'])):date(\"Y-m-d G:i\");\n\t\t\t\t$payment_type = (isset($this->request->data['payment_type']) && $this->request->data['payment_type']!='')?$this->request->data['payment_type']:'0';\n\t\t\t\t$ride_type = (isset($this->request->data['ride_type']) && $this->request->data['ride_type']!='')?$this->request->data['ride_type']:'0';\n\t\t\t\t//new addition address information send by customer\n\t\t\t\t$street_address = (isset($this->request->data['street_address']) && $this->request->data['street_address']!='')?$this->request->data['street_address']:'';\n\t\t\t\t$nearby_address = (isset($this->request->data['nearby_address']) && $this->request->data['nearby_address']!='')?$this->request->data['nearby_address']:'';\n\t\t\t\t$cupon_code = (isset($this->request->data['cupon_code']) && $this->request->data['cupon_code']!='')?$this->request->data['cupon_code']:'';\n\t\t\t\t//creadit card\n\t\t\t\t$creditcard_id = (isset($this->request->data['creditcardid']) && $this->request->data['creditcardid']>0)?$this->request->data['creditcardid']:'0';\n\t\t\t\t$company_id = (isset($this->request->data['company_id']) && $this->request->data['company_id']>0)?$this->request->data['company_id']:'1';\n\t\t\t\t//validation card info\n\t\t\t\tif($payment_type==1 && $creditcard_id==0){\n\t\t\t\t\tdie(json_encode(array('status'=>'0','msg'=>'Card not selected')));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//unbind the user models\n\t\t\t\t$this->Ride->User->unbindModel(array(\n\t\t\t\t\t'hasMany'=>array('UserCreditDetail','CustomerRide','DriverRide'),\n\t\t\t\t\t'hasOne'=>array('DriverCustom','VehicleDetail'),\n\t\t\t\t));\n\t\t\t\t$userdetails = $this->Ride->User->find('first',array('recursive'=>'0','conditions'=>array('User.id'=>$user_id)));\n\t\t\t\t\n\t\t\t\tif(is_array($userdetails) && count($userdetails)>0){\n\t\t\t\t\t\n\t\t\t\t\t$userName = $userdetails['User']['username'];\n\t\t\t\t\t$userName = ucwords($userdetails['User']['f_name'].\" \".$userdetails['User']['l_name']);\n\t\t\t\t\t$userMobileNo = $userdetails['User']['mobile'];\n\t\t\t\t\t\n\t\t\t\t\tif(isset($userdetails['User']['CustomerCustom']['user_image']) && $userdetails['User']['CustomerCustom']['user_image']!=''){\n\t\t\t\t\t\t$userPic = FULL_BASE_URL.$this->base.\"/userPic/\".$userdetails['User']['CustomerCustom']['user_image'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$userPic ='';\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tdie(json_encode(array('status'=>'0','msg'=>'Invalied Account.')));\n\t\t\t\t}\n\t\t\t\t//now get setver setting\n\t\t\t\t$this->siteconfiguration($company_id);\n\t\t\t\t\n\t\t\t\t// city id fetching from lat and long\n\t\t\t\tif($picupcityname ==''){\n\t\t\t\t\t\n\t\t\t\t\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?latlng=\".$pick_up_lat.\",\".$pick_up_lon.\"&sensor=true\";\n\t\t\t\t\tif($this->googleServerKey!=''){\n\t\t\t\t\t\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?latlng=\".$pick_up_lat.\",\".$pick_up_lon.\"&sensor=true&key=\".$this->googleServerKey;\n\t\t\t\t\t}\n\t\t\t\t\t$data = @file_get_contents($url);\n\t\t\t\t\t$jsondata = json_decode($data,true);\n\t\t\t\t\t // cityname\n\t\t\t\t\tif($jsondata[\"status\"]==\"OK\" || $jsondata[\"status\"]==\"ok\"){\n\t\t\t\t\t\tforeach ($jsondata[\"results\"] as $result) {\n\t\t\t\t\t\t\tforeach ($result[\"address_components\"] as $address) {\n\t\t\t\t\t\t\t\tif (in_array(\"locality\", $address[\"types\"])) {\n\t\t\t\t\t\t\t\t\t$picupcityname = $address[\"long_name\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//get city address\n\t\t\t\t$cityresult = $this->Ride->City->find('first',array(\n\t\t\t\t 'conditions'=>array('City.name LIKE'=>'%'.$picupcityname.'%','City.company_id'=>$company_id,'City.is_active'=>'0')\n\t\t\t\t));\n\n\t\t\t\tif(is_array($cityresult) && count($cityresult)>0 && isset($cityresult['City'])){\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$cityresult = $this->Ride->City->find('first',array(\n\t\t\t\t\t 'conditions'=>array('City.is_active'=>'0','City.company_id'=>$company_id)\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$cityid = (isset($cityresult['City']['id']))?$cityresult['City']['id']:0;\n\t\t\t\t\n\t\t\t\t//Code for cupon\n\t\t\t\t$discount = 0;\n\t\t\t\tif(isset($cupon_code) && $cupon_code!=''){\n\t\t\t\t\t$discount = $this->validateCuponCode($user_id,$cupon_code);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$range = (isset($cityresult['CityConfiguration']['inter_fare_distance']))?$cityresult['CityConfiguration']['inter_fare_distance']:5000; // get from city config\t\n\t\t\t\t\n\t\t\t\t$range=50000;\n\t\t\t\t$this->Ride->create();\n\t\t\t\t//$this->request->data['Ride']['card_id'] = $this->request->data['creditcardid'];\n\t\t\t\t$savedata['Ride']['pick_up'] = $pick_up;\n\t\t\t\t$savedata['Ride']['pick_lat'] = $pick_up_lat;\n\t\t\t\t$savedata['Ride']['pick_long'] = $pick_up_lon;\n\t\t\t\t$savedata['Ride']['drop_off'] = $drop_off;\n\t\t\t\t$savedata['Ride']['drop_lat'] = $drop_off_lat;\n\t\t\t\t$savedata['Ride']['drop_long'] = $drop_off_lon;\n\t\t\t\t$savedata['Ride']['user_id'] = $user_id;\n\t\t\t\t$savedata['Ride']['instruction'] = $instruction;\n\t\t\t\t$savedata['Ride']['payment_option'] = $payment_type;\n\t\t\t\t$savedata['Ride']['ride_type'] = $ride_type ;\n\t\t\t\t$savedata['Ride']['date_time'] = $ride_date_time ;\n\t\t\t\t$savedata['Ride']['city_id'] = $cityid ;\n\t\t\t\t//additional new param\n\t\t\t\t$savedata['Ride']['street_address']=$street_address;\n\t\t\t\t$savedata['Ride']['nearby_address']=$nearby_address;\n\t\t\t\t//New code for cupon_code\n\t\t\t\t$savedata['Ride']['cupon_code']=$cupon_code;\n\t\t\t\t$savedata['Ride']['discount']=$discount;\n\t\t\t\t$savedata['Ride']['card_id']=$creditcard_id;\n\t\t\t\t$savedata['Ride']['ordercreatetime']=date(\"Y-m-d G:i:s\");\n\t\t\t\t$savedata['Ride']['company_id']=$company_id;\n\t\t\t\t//pr($savedata);\n\t\t\t\t$device_type = $this->request->data['device_type'];\n\t\t\t\tif ($this->Ride->save($savedata)) {\t\n\t\t\t\t\t$ride_id = $this->Ride->id;\n\t\t\t\t\t\n\t\t\t\t\t$this->Ride->User->CustomerCustom->updateAll(array('CustomerCustom.device_unique_id'=>\"'\".$this->request->data['device_unique_id'].\"'\",'CustomerCustom.device_type'=>\"'\".$device_type.\"'\"), array( 'CustomerCustom.user_id'=>$user_id ));\n\t\t\t\t\t\n\t\t\t\t\tif($ride_type!=1){ //ride now \n\t\t\t\t\t\t$estTime = \"0 Min\";\n\t\t\t\t\t\t$dDetails = $this->getNearestdrivers($pick_up_lat, $pick_up_lon,$this->driverfindrange,0,0,$company_id);\n\t\t\t\t\t\t//pr($dDetails);\n\t\t\t\t\t\t// Searching for the nearest driver online\n\t\t\t\t\t\t$devicetype = 0;\n\t\t\t\t\t\tif(is_array($dDetails) && count($dDetails)>0){\n\t\t\t\t\t\t\t//get user rating\n\t\t\t\t\t\t\t$rating = $this->userrattingsection($user_id,2);\n\t\t\t\t\t\t\t$textmsg = \"New Ride\";\n\t\t\t\t\t\t\tforeach($dDetails as $driver){\n\t\t\t\t\t\t\t\t//$driver = $dDetails['0'];\n\t\t\t\t\t\t\t\t//find estimation time beetween driver and the user\n\t\t\t\t\t\t\t\t$driverlat = $driver['DriverCustom']['lat'];\n\t\t\t\t\t\t\t\t$driverlon = $driver['DriverCustom']['long'];\n\t\t\t\t\t\t\t\t$distanceDuration = $this->getDistanceAndDuration($pick_up_lat,$pick_up_lon,$driverlat,$driverlon,$this->googleServerKey);\n\t\t\t\t\t\t\t\t//pr($distanceDuration);\n\t\t\t\t\t\t\t\tif(isset($distanceDuration['status']) && $distanceDuration['status']==1){\n\t\t\t\t\t\t\t\t\t$driverdeatils = array_slice($distanceDuration,1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t$distance = isset($driver['0']['distance'])?($driver['0']['distance']/1000):0; //km\n\t\t\t\t\t\t\t\t\t$distance = round($distance);\n\t\t\t\t\t\t\t\t\t$timeneed = (($distance*60)/40); //minute\n\t\t\t\t\t\t\t\t\t$timeneed = round($timeneed);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$driverdeatils['duration']=$timeneed;\n\t\t\t\t\t\t\t\t\t$driverdeatils['distance']=$distance;\n\t\t\t\t\t\t\t\t\t$driverdeatils['durationinminit']=$timeneed;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$estTime = $driverdeatils['durationinminit'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//push dat related section\n\t\t\t\t\t\t\t\t$devicetype = $driver['DriverCustom']['device_type'];\n\t\t\t\t\t\t\t\t//push data create section\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$custom = array( \n\t\t\t\t\t\t\t\t\t'estTime'=>$estTime,\n\t\t\t\t\t\t\t\t\t'c_name'=>$userName,\n\t\t\t\t\t\t\t\t\t'c_rating'=>$rating,\n\t\t\t\t\t\t\t\t\t'c_address'=>$pick_up,\n\t\t\t\t\t\t\t\t\t'c_lat'=>$pick_up_lat,\n\t\t\t\t\t\t\t\t\t'c_long'=>$pick_up_lon,\n\t\t\t\t\t\t\t\t\t'c_mobile'=>$userMobileNo,\n\t\t\t\t\t\t\t\t\t'c_dropaddress'=>$drop_off,\n\t\t\t\t\t\t\t\t\t'c_pic'=>$userPic,\n\t\t\t\t\t\t\t\t\t'ride_id'=> $ride_id,\n\t\t\t\t\t\t\t\t\t'text'=>$textmsg,\n\t\t\t\t\t\t\t\t\t'street_address'=>$street_address,\n\t\t\t\t\t\t\t\t\t'nearby_address'=>$nearby_address,\n\t\t\t\t\t\t\t\t\t'status'=>'0',\n\t\t\t\t\t\t\t\t\t'c_drop_lat'=>$drop_off_lat,\n\t\t\t\t\t\t\t\t\t'c_drop_lon'=>$drop_off_lon\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t//pr($custom);\n\t\t\t\t\t\t\t\t$pushid = $driver['DriverCustom']['device_unique_id'];\n\t\t\t\t\t\t\t\tif($pushid!=''){\n\t\t\t\t\t\t\t\t\tif($devicetype=='1'){\n\t\t\t\t\t\t\t\t\t\t//send android notifications\n\t\t\t\t\t\t\t\t\t\t$registration_ids = array($pushid);\n\t\t\t\t\t\t\t\t\t\t$this->appandroidpushnotify($registration_ids,$this->DriverAppkey,$textmsg,$custom);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telseif($devicetype=='2'){\n\t\t\t\t\t\t\t\t\t\t$this->iospushnotification($pushid,$textmsg,$custom,1,1,$company_id);\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\tdie(json_encode(array('ride_id'=>$ride_id,'status'=>'1','msg'=>'Ride has been saved and push has been send to the driver.')));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//no driver found\n\t\t\t\t\t\t\t$driver=null;\n\t\t\t\t\t\t\tdie(json_encode(array('ride_id'=>$ride_id,'status'=>'0','msg'=>'Ride saved but no drivers found nearby.')));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdie(json_encode(array('ride_id'=>$ride_id,'status'=>'1','msg'=>'Ride has been saved as ride later.')));\n\t\t\t\t}else{\n\t\t\t\t\tdie(json_encode(array('status'=>'0','msg'=>'Ride cannot be save, please try again.')));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//error message\n\t\t\t\tdie(json_encode(array('status'=>'0','msg'=>'Device type parameter is missing, please try again.')));\n\t\t\t}\n\t\t}\n\t\tdie(json_encode(array('status'=>'0','msg'=>'Invalied.')));\n\t}", "title": "" }, { "docid": "cf1658e9bdd0dfb29bd1faecb0674c7d", "score": "0.57694334", "text": "public function create($order, Request $request)\n {\n //\n }", "title": "" }, { "docid": "184b9e96b8584bb7a473f8adf7f6169f", "score": "0.5753938", "text": "public function orderProcessAction() {\n\n $ordersModel = Application_Model_Orders::getInstance();\n $cartsModel = Application_Model_Addtocart::getInstance();\n $productsModel = Application_Model_Products::getInstance();\n $orderproductsModel = Application_Model_OrderProducts::getInstance();\n $deliveryModal = Application_Model_UserDeliveryAddr::getInstance();\n $response = new stdClass();\n $method = $this->getRequest()->getParam('method');\n if ($method) {\n\n switch ($method) {\n\n case'insertwebuserorders':\n\n if ($this->getRequest()->isPost()) {\n\n $orderdata = $this->getRequest()->getPost('orderdata');\n $order = (array) json_decode($orderdata, true);\n $orderId = $ordersModel->insertOrders($order);\n if ($orderId) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data['order_id'] = $orderId;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n echo json_encode($response, true);\n die();\n break;\n\n case'insertwebusercarts':\n\n if ($this->getRequest()->isPost()) {\n\n $cartitems = $this->getRequest()->getPost('bagitems');\n\n $bagitems = (array) json_decode($cartitems, true);\n if ($bagitems) {\n $cartIds = $cartsModel->insertCartProducts($bagitems);\n if ($cartIds) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data['cart_ids'] = $cartIds;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n\n case'getproductinfoofcarts':\n\n if ($this->getRequest()->isPost()) {\n\n $carts = $this->getRequest()->getPost('bagitems');\n $bag = (array) json_decode($carts, true);\n if ($bag) {\n $result = $cartsModel->getCartProductsByCartIds($bag);\n if ($result) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data = $result;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n case'insertuserorderproducts':\n\n if ($this->getRequest()->isPost()) {\n\n $order_products = $this->getRequest()->getPost('order_products');\n $order_productsnew = (array) json_decode($order_products, true);\n if ($order_productsnew) {\n\n $result = $orderproductsModel->insertOrderedCartProducts($order_productsnew);\n if ($result) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data = $result;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n case'insertuserdeliverydetails':\n\n if ($this->getRequest()->isPost()) {\n\n $delivery = $this->getRequest()->getPost('deliver');\n $deliverynew = (array) json_decode($delivery, true);\n if ($deliverynew) {\n $result = $deliveryModal->insertUserDeliveryAddress($deliverynew);\n if ($result) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data = $result;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n case'updateuserorderdetails':\n\n if ($this->getRequest()->isPost()) {\n $total_amount = $this->getRequest()->getPost('total_amount');\n if (!empty($total_amount)) {\n $data['total_amount'] = $total_amount;\n }\n $pay_type = $this->getRequest()->getPost('pay_type');\n if (!empty($pay_type)) {\n $data['pay_type'] = $pay_type;\n }\n $pay_status = $this->getRequest()->getPost('pay_status');\n if (!empty($pay_status)) {\n $data['pay_status'] = $pay_status;\n }\n $order_status = $this->getRequest()->getPost('order_status');\n if (!empty($order_status)) {\n $data['order_status'] = $order_status;\n }\n $delivery_status = $this->getRequest()->getPost('delivery_status');\n if (!empty($delivery_status)) {\n $data['delivery_status'] = $delivery_status;\n }\n $order_id = $this->getRequest()->getPost('order_id');\n if ($order_id && $data) {\n $result = $ordersModel->updateOrderDetails($data, $order_id);\n if ($result) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data = $order_id;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n\n case'updatepaymenttypedetails':\n\n if ($this->getRequest()->isPost()) {\n\n $order['pay_status'] = $this->getRequest()->getPost('pay_status');\n $order['order_status'] = $this->getRequest()->getPost('order_status');\n $order['delivery_status'] = $this->getRequest()->getPost('delivery_status');\n $order['pay_type'] = $this->getRequest()->getPost('pay_type');\n $order_id = $this->getRequest()->getPost('order_id');\n if ($order && $order_id) {\n $result = $ordersModel->updateOrderDetails($order, $order_id);\n if ($result) {\n $response->message = 'successfull';\n $response->code = 200;\n $response->data = $order_id;\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 197;\n $response->data = null;\n }\n } else {\n $response->message = 'Could Not Serve The Request';\n $response->code = 401;\n $response->data = NULL;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n }\n echo json_encode($response, true);\n die();\n break;\n }\n } else {\n $response->message = 'Invalid Request';\n $response->code = 401;\n $response->data = Null;\n echo json_encode($response);\n die();\n }\n }", "title": "" }, { "docid": "82a99c6f333279c417bf275c335089ba", "score": "0.57395494", "text": "private function _AddPedido() {\n if (self::$session->validateStartSesion()) {\n if (!self::$session->validateSesion()) {\n $objModelPedidos = new Application_Models_PedidosModel();\n $resultado = $objModelPedidos->addPedido($_POST['cantidad'], $_POST['precio_venta'], $_POST['fkPedido'], $_POST['pkComprobante'], $_POST['tipo'], $_POST[\"mensaje\"]);\n echo json_encode($resultado);\n } else {\n self::$session->redirect();\n }\n } else {\n self::$session->redirect();\n }\n }", "title": "" }, { "docid": "79043de9419309e798816cae34108674", "score": "0.57379735", "text": "public function newOrder(){\n $userFormat = new UserFormatter();\n $products = $this->productRepo->getAll();\n $users = $this->userRepo->getCustomers();\n\n\n $this->data['pageTitle'] = 'New Order'; // give page a title\n JavaScript::put([\n 'users' => $userFormat->bulkFormat($users),\n 'paymentMethods' => \\PaymentMethod::get(),\n 'products' => $this->productFormat->bulkFormat($products)\n\n ]);\n\n return View::make('admin.order-new', $this->data);\n }", "title": "" }, { "docid": "6956496dcda0ba2a80dda33a2f4191ec", "score": "0.5736083", "text": "public function insertorder(Request $request)\n\t{\n\t\t@session_start();\n\t\t\t\t\t\n \n\t\t$tour_id = 0;\n\t\tif($request->has('tour_id') && $request->get('tour_id') > 0) {\n\t\t\t$tour_id = $request->get('tour_id');\n\t\t}\n\t\telseif(Session::has('order_tour_id')) {\n\t\t\t$tour_id = Session::get('order_tour_id');\n\t\t}\n\t\telseif(isset($_SESSION['order_tour_id']) && $_SESSION['order_tour_id']>0) {\n\t\t\t$tour_id = $_SESSION['order_tour_id'];\n\t\t}\n\t\t\n\t\tif($tour_id > 0)\n\t\t{\n\t\t\t\n\t\t\t$firstname = $request->get('firstname');\n\t\t\t$lastname = $request->get('lastname');\n\t\t\t$email = $request->get('email');\n\t\t\t$phone = $request->get('phone');\n\t\t\t$address = $request->get('address');\n\t\t\t$pincode ='';\n\t\t\t// $pincode = $request->get('pincode');\n\t\t\t $city = $request->get('city');\n\t\t\t //$state = '';\n\t\t\t$state = $request->get('state');\n\t\t\t$country = $request->get('country');\n\t\t\t$productinfo = $request->get('productinfo');\n\t\t\t$price_per_person = $request->get('price_per_person');\n\t\t\t$agent_id = $request->get('agent_id');\n\t\t\t$discount = $request->get('discount');\n\t\t\t$disamount = $request->get('disamount');\n\t\t\t$agtamount = $request->get('newamount');\n\t\t\t\n\t\t\t\n\t\t\tif($request->has(\"no_of_persons\")) {\n\t\t\t\t$no_of_persons = $request->get('no_of_persons');\n\t\t\t}\n\t\t\telseif($request->has(\"no_of_adults\")) {\n\t\t\t\t$no_of_persons = $request->get('no_of_adults');\n\t\t\t}\n\t\t\tif($request->has(\"no_of_child\")) {\n\t\t\t\t$no_of_child = $request->get('no_of_child');\n\t\t\t}\n\t\t\telseif($request->has(\"no_of_child\")) {\n\t\t\t\t$no_of_child = $request->get('no_of_child');\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$amount = $request->get('newamount');\n\t\t\t$coupon_code = '';\n\t\t\tif($request->has(\"txt_coupon_code\")) {\n\t\t\t\t$coupon_code = $request->get('txt_coupon_code');\n\t\t\t}\n\t\t\telseif($request->has(\"applied_coupon_code\")) {\n\t\t\t\t$coupon_code = $request->get('applied_coupon_code');\n\t\t\t}\n\t\t\t\n\t\t\t$tour_date = date(\"Y-m-d\",strtotime($request->get('txt_tour_date')));\n\t\t\t\n\t\t\t$coupon_amount = 0;\n\t\t\tif(trim($coupon_code) != \"\")\n\t\t\t{\n\t\t\t\t$coupon = \\DB::table('coupons')->where('coupon_code', trim($coupon_code))->get()->toArray();\n\t\t\t\tif(!empty($coupon)) {\n\t\t\t\t\t$coupon_amount = $coupon[0]->coupon_amount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$_SESSION['orderfirstname'] = trim($firstname);\n\t\t\t$_SESSION['orderlastname'] = trim($lastname);\n\t\t\t$_SESSION['orderemail'] = trim($email);\n\t\t\t\n\t\t\t$user_id = 0;\n\t\t\tif($email != '')\n\t\t\t{\n\t\t\t\t$user_check = DB::table('users')->where('email',$email)->get()->first();\n\t\t\t\t\n\t\t\t\tif(!empty($user_check))\n\t\t\t\t{\n\t\t\t\t\t// GET USER\n\t\t\t\t\t$user_id = $user_check->id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$password = substr(md5(microtime()),rand(0,26),6);\n\t\t\t\t\t// INSERT USER\n\t\t\t\t\t$user_id = \\DB::table('users')->insertGetId([\n\t\t\t\t\t'name' => trim($firstname).' '.trim($lastname),\n\t\t\t\t\t'email' => trim($email),\n\t\t\t\t\t'password' => bcrypt($password),\n\t\t\t\t\t'status' => 'Active'\n\t\t\t\t\t]);\n\t\t\t\t\t\n\t\t\t\t\t$subject = \"Welcome to Tripindia\";\n\t\t\t\t\t$password_message = \"Your New Useranme (email) \".$email.\"<br /> Password is \".$password;\n\t\t\t\t\t\n\t\t\t\t\t$mg = new Mailgun(\"key-a886acc552c9ecb8cae8937ff13894ec\");\n\t\t\t\t\t$domain = \"bulkmail.influensell.net\";\n\t\t\t\t\t$batchMsg = $mg->BatchMessage($domain);\n\t\t\t\t\t$batchMsg->setFromAddress(\"[email protected]\", array(\"first\"=>\"Trip\", \"last\" => \"India\"));\n\t\t\t\t\t$batchMsg->setSubject($subject);\n\t\t\t\t\t$batchMsg->setHtmlBody($password_message);\n\t\t\t\t\t$batchMsg->addToRecipient($email, array(\"first\" => $firstname, \"last\" => $lastname));\n\t\t\t\t\t$batchMsg->addBccRecipient(\"[email protected]\", array(\"first\"=>\"Jalpesh\", \"last\" => \"Anibyte\"));\n\t\t\t\t\t$batchMsg->finalize();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t//echo $user_id; exit;\n\t\t\t$order_id = \\DB::table('orders')->insertGetId([\n\t\t\t\t'tour_id' => $tour_id, \n\t\t\t\t'user_id' => $user_id, \n\t\t\t\t'agent_id' => $agent_id, \n\t\t\t\t'tour_name' => trim($productinfo),\n\t\t\t\t'firstname' => trim($firstname),\n\t\t\t\t'lastname' => trim($lastname),\n\t\t\t\t'email' => trim($email),\n\t\t\t\t'phone' => trim($phone),\n\t\t\t\t'city' => trim($city),\n\t\t\t\t'state' => trim($state),\n\t\t\t\t'country' => trim($country),\n\t\t\t\t'address' => $address,\n\t\t\t\t'no_of_persons' => $no_of_persons,\n\t\t\t\t'no_of_child' => $no_of_child,\n\t\t\t\t'tour_date' => $tour_date,\n\t\t\t\t'coupon_code' => trim($coupon_code),\n\t\t\t\t'coupon_amount' => trim($coupon_amount),\n\t\t\t\t'agentdiscount' => $discount,\n\t\t\t\t'agent_desc_total' => trim($disamount),\n\t\t\t\t'agent_total_pay' => trim($agtamount),\n\t\t\t\t'amount' => trim($amount),\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t]); \n\t\t\t\n\t\t\tSession::put('order_id', $order_id);\n\t\t\techo $_SESSION['order_id'] = $order_id;\n\t\t}\n\t}", "title": "" }, { "docid": "44d0299098e19f68030b323edc3d8a3a", "score": "0.57342565", "text": "public function saveOrderAjax()\n\t{\n\t\t// Get the input\n\t\t$input = Factory::getApplication()->input;\n\t\t$pks = $input->post->get('cid', array(), 'array');\n\t\t$order = $input->post->get('order', array(), 'array');\n\n\t\t// Sanitize the input\n\t\tArrayHelper::toInteger($pks);\n\t\tArrayHelper::toInteger($order);\n\n\t\t// Get the model\n\t\t$model = $this->getModel();\n\n\t\t// Save the ordering\n\t\t$return = $model->saveorder($pks, $order);\n\n\t\tif ($return)\n\t\t{\n\t\t\techo \"1\";\n\t\t}\n\n\t\t// Close the application\n\t\tFactory::getApplication()->close();\n\t}", "title": "" }, { "docid": "6c537fc723d2195b63d3742042468528", "score": "0.573273", "text": "public function store(Request $request)\n {\n //creamos el nuevo cliente\n $cliente = ClienteController::saveNewClient($request);\n //Obtenemos las lineas de producto seleccionadas\n $lineas = LineaPedido::where(['session_id' => $request->session()->getId()])->orderBy('updated_at', 'ASC')->get();\n $lines = array();\n foreach ($lineas as $linea) {\n array_push($lines, $linea->id);\n }\n\n /*$dataPedido = array('idCliente' => $cliente->id,\n 'idLineas' => serialize($lines),\n 'idTipoPago' => $request->get('methodPayUserSelected'),\n 'totalPedido' => $request->get('totalPedido'),\n 'numIdentificacionPedido' => Uuid::generate(),\n 'totalIVA' => Cart::tax(),\n 'withoutIVA' => Cart::subtotal());\n $pedido = new Pedido($dataPedido);\n $statusP = $pedido->save();*/\n //registramos el cliente\n $pedido = $this->saveNewPedido($cliente, $request, $lines);\n if ($cliente->status & $pedido->status) {\n //creamos la factura asociada al pedido en BBDD\n FacturaController::createNewFactura($pedido);\n //generamos el pdf de la factura -> quizas convenga hacerlo a traves de un cron como las notificaciones..\n Helper::saveBillPDF($pedido->idPedido);\n //Enviamos el pedido al metodo de pago seleccionado\n return $this->getGatewayOrder($request->get('methodPayUserSelected'), $pedido);\n } else {\n if ($pedido->status && !$cliente->status) {\n //dd('fallo cliente');\n return view('pedidos/orderSuccessRegistered', ['title' => 'falloPedido Registrado']);\n }\n if (!$pedido->status && $cliente->status) {\n //dd('fallo pedido');\n return view('pedidos/orderSuccessRegistered', ['title' => 'Fallo']);\n }\n }\n }", "title": "" }, { "docid": "92fb3c915169f295b468ab0e70f34da4", "score": "0.5724099", "text": "public function create()\n {\n return view('pages.clients.orders.create');\n }", "title": "" }, { "docid": "d8b9effe106928f509d0816f62479450", "score": "0.5723618", "text": "function agregar_adetalle()\r\n {\r\n if($this->acceso(1)) {\r\n if ($this->input->is_ajax_request()){\r\n $usuario_id = $this->session_data['usuario_id'];\r\n $producto_id = $this->input->post('producto_id');\r\n $proveedor_id = $this->input->post('proveedor_id');\r\n $costo = $this->input->post('costo');\r\n $precio = $this->input->post('precio');\r\n $cantidad = $this->input->post('cantidad');\r\n $producto = $this->Producto_model->get_esteproducto($producto_id);\r\n \r\n $params = array(\r\n 'ordencompra_id' => 0, // por ser nuevo\r\n 'proveedor_id' => $proveedor_id,\r\n 'moneda_id' => $producto[\"moneda_id\"],\r\n 'producto_id' => $producto_id,\r\n 'detalleordencomp_codigo' => $producto[\"producto_codigo\"],\r\n 'detalleordencomp_cantidad' => $cantidad,\r\n 'detalleordencomp_unidad' => $producto[\"producto_unidad\"],\r\n 'detalleordencomp_costo' => $costo,\r\n 'detalleordencomp_precio' => $precio,\r\n 'detalleordencomp_subtotal' => ($costo * $cantidad),\r\n 'detalleordencomp_descuento' => 0,\r\n 'detalleordencomp_total' => ($costo * $cantidad),\r\n 'detalleordencomp_descglobal' => 0,\r\n 'detalleordencomp_tc' => $producto[\"moneda_tc\"],\r\n 'usuario_id' => $usuario_id,\r\n );\r\n $detalleordencomp_id = $this->Orden_compra_model->add_detalle_ordencompra_aux($params);\r\n \r\n $datos = \"ok\";\r\n echo json_encode($datos);\r\n }else{\r\n show_404();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "503031635ff7f30294bf675db8a7b20f", "score": "0.5722466", "text": "public function payment(Request $request) {\n\t\tif ($request->ajax()) {\n\t\t\t$validator = $request->validate([\n\t\t\t\t'date' => ['required', 'date'],\n\t\t\t\t'mode' => ['required', 'string'],\n\t\t\t\t'amount' => ['required', 'numeric'],\n\t\t\t]);\n\n\t\t\t$payment = new CasePayment;\n\t\t\t$payment->case_id = $request->case_id;\n\t\t\t$payment->date = $request->date;\n\t\t\t$payment->invoice_no = $request->invoice_no;\n\t\t\t$payment->mode = $request->mode;\n\t\t\t$payment->amount = $request->amount;\n\t\t\t$payment->save();\n\t\t\t$invoice_id = $payment->id;\n\t\t\treturn $this->success(['message' => _lang('client_payment_added_successfull.'), 'window' => route($this->route() . 'invoice', $invoice_id)]);\n\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\n\t}", "title": "" }, { "docid": "ca01b575e39aeed11366f15c9e0d4b5e", "score": "0.5713031", "text": "public function actionAdd()\n {\n $model = new Index();\n $post = Yii::$app->request->post();\n\n return $this->render('addOrder', [\n 'servicesLevel' => $model->getServicesLevel(),\n 'model' => $model,\n 'post' => $post,\n ]);\n }", "title": "" }, { "docid": "a878c970003b50459857554e3e1d98c3", "score": "0.5712365", "text": "function crear_ordencompra()\r\n {\r\n $data['sistema'] = $this->sistema;\r\n if($this->acceso(1)) {\r\n if ($this->input->is_ajax_request()){\r\n $usuario_id = $this->session_data['usuario_id'];\r\n $compra_id = $this->input->post('compra_id');\r\n $detalle_compra = $this->Compra_model->get_detalle_compra($compra_id);\r\n $proveedor_compra = $this->Compra_model->get_proveedor_id($compra_id);\r\n $proveedor_id = $proveedor_compra[0]['proveedor_id'];\r\n\r\n $this->Orden_compra_model->delete_detalle_ordencompra_aux($usuario_id);\r\n foreach($detalle_compra as $detalle){\r\n $params = array(\r\n 'ordencompra_id' => 0, // por ser nuevo\r\n 'proveedor_id' => $proveedor_id,\r\n 'moneda_id' => $detalle[\"moneda_id\"],\r\n 'producto_id' => $detalle[\"producto_id\"],\r\n 'detalleordencomp_codigo' => $detalle[\"detallecomp_codigo\"],\r\n 'detalleordencomp_cantidad' => $detalle[\"detallecomp_cantidad\"],\r\n 'detalleordencomp_unidad' => $detalle[\"detallecomp_unidad\"],\r\n 'detalleordencomp_costo' => $detalle[\"detallecomp_costo\"],\r\n 'detalleordencomp_precio' => $detalle[\"detallecomp_precio\"],\r\n 'detalleordencomp_subtotal' => $detalle[\"detallecomp_subtotal\"],\r\n 'detalleordencomp_descuento' => 0, //$detalle[\"detallecomp_descuento\"],\r\n 'detalleordencomp_total' => $detalle[\"detallecomp_total\"],\r\n 'detalleordencomp_descglobal' => 0, //$detalle[\"detallecomp_descglobal\"],\r\n //'detalleordencomp_fechavencimiento' => $detalle[\"detallecomp_fechavencimiento\"],\r\n //'detalleordencomp_tipocambio' => $detalle[\"detallecomp_tipocambio\"],\r\n //'cambio_id' => $detalle[\"cambio_id\"],\r\n 'detalleordencomp_tc' => $detalle[\"detallecomp_tc\"],\r\n //'detalleordencomp_series' => $detalle[\"detallecomp_series\"],\r\n 'usuario_id' => $usuario_id,\r\n );\r\n $detalleordencomp_id = $this->Orden_compra_model->add_detalle_ordencompra_aux($params);\r\n }\r\n //$detalle_compra_aux = $this->Orden_compra_model->get_detalle_ordencompra_aux($usuario_id);\r\n $datos = \"ok\";\r\n echo json_encode($datos);\r\n }else{\r\n show_404();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ad24932b8c89679fa8283a60d28a5b38", "score": "0.5685534", "text": "public function addClient() {\n $name = $_POST[\"client-name\"];\n $domain = $_POST[\"client-domain\"];\n $email = $_POST[\"client-email\"];\n $subscription = $_POST[\"subscription-type\"];\n if (isset($_POST[\"stock-data\"])) {\n $stocks = $_POST[\"stock-data\"];\n }\n $type = $_POST[\"data-type\"];\n $market = $_POST[\"data-market\"];\n\n $stock_code = $_POST[\"stock-code\"];\n $commodity_code = $_POST[\"commodity-code\"];\n $client_announcements = $_POST[\"client-announcements\"];\n $client_notification = $_POST[\"client-notification\"];\n\n $license = $this->generateLicense($name, $domain);\n\n $insert = Array(\n \"name\" => $name,\n \"domain\" => $domain,\n \"license\" => $license,\n \"email\" => $email,\n \"timezone\" => \"GMT+8\"\n );\n\n $result = $this->db->insert(\"clients\", $insert);\n $client = $result->insert_id();\n\n if ($subscription == \"bronze\") {\n if ($type == \"stock-price\") {\n $existing = $this->checkIfStockExists($stock_code, $market);\n\n if (!$existing) {\n $existing = $this->addNewStock($stock_code, $market);\n }\n\n $client_stocks = Array(\n \"clients_id\" => $client,\n \"stocks_id\" => $existing\n );\n\n $this->db->insert(\"clients_stocks\", $client_stocks);\n } else if ($type == \"commodity\") {\n $client_commodities = Array(\n \"clients_id\" => $client,\n \"commodities_indicies_id\" => $commodity_code\n );\n\n $this->db->insert(\"clients_commodities\", $client_commodities);\n }\n } else if ($subscription == \"silver\") {\n $this->addClientStocks($client, $stocks);\n } else if ($subscription == \"gold\") {\n $this->addClientStocks($client, $stocks);\n }\n\n $this->setPermissions($client, $subscription);\n \n if ($client_announcements != \"\") {\n $this->db->insert(\"clients_announcements\", Array( \"clients_id\" => $client, \"symbol\" => $client_announcements, \"notification_emails\" => $client_notification));\n }\n \n return true;\n }", "title": "" }, { "docid": "da999905591930f2c77d21d5672a97ab", "score": "0.5683337", "text": "public function insert_order()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_admin_auth();\n\t\t$CI->load->model('Orders');\n\t\t$order_id = $CI->Orders->order_entry();\n\t\t$this->session->set_userdata(array('message'=>display('successfully_added')));\n\t\t$this->order_inserted_data($order_id);\n\n\t\tif(isset($_POST['add-order'])){\n\t\t\tredirect(base_url('Corder/manage_order'));\n\t\t}elseif(isset($_POST['add-order-another'])){\n\t\t\tredirect(base_url('Corder'));\n\t\t}\n\t}", "title": "" }, { "docid": "e8974b427c9332bff0d02c46faa5839c", "score": "0.5663981", "text": "public function addItem() {\n \n $id = $this->input->POST('id');\n $idAtividade = $this->input->POST('idAtividade');\n \n \n $this->load->model('cadastroplanopreventivomodel');\n\n $retorno = $this->cadastroplanopreventivomodel->addItem($id, $idAtividade);\n\n echo json_encode($retorno);\n //echo ($retorno);\n }", "title": "" }, { "docid": "1b6c0b457afadc61aaa269c4a674518d", "score": "0.56600785", "text": "private function generateAndPostInvoices($order) {\n if (CraftSaasuSync::saasuIntegrationValid()) {\n $itemsDesc = 'Listed items';\n $itemsAndAmounts = CraftSaasuSync::generateLineItems($order);\n $itemsPayment = $order->datePaid ? CraftSaasuSync::generatePaymentDetails($order, $itemsAndAmounts['saasuAmount'], $itemsDesc) : null;\n $itemsPo = $order->gateway->handle == 'purchaseOrder' ? $order->orderReference : null;\n $itemsInvoice = CraftSaasuSync::generateInvoiceData($order, false, $itemsAndAmounts['items'], $itemsPayment, $itemsDesc, $itemsPo);\n CraftSaasuSync::postInvoice($itemsInvoice);\n\n if ($itemsAndAmounts['unlistedAmount'] > 0) {\n $unlistedItemsDesc = 'Unlisted items';\n $unlistedItems = CraftSaasuSync::generateUnlistedLineItem($itemsAndAmounts['unlistedAmount']);\n $unlistedItemsPayment = $order->datePaid ? CraftSaasuSync::generatePaymentDetails($order, $itemsAndAmounts['unlistedAmount'], $unlistedItemsDesc) : null;\n $unlistedItemsInvoice = CraftSaasuSync::generateInvoiceData($order, true, [$unlistedItems], $unlistedItemsPayment, $unlistedItemsDesc, $itemsPo);\n CraftSaasuSync::postInvoice($unlistedItemsInvoice);\n }\n }\n }", "title": "" }, { "docid": "8bc9f59b06eea7907ac6455aede10069", "score": "0.5655549", "text": "public function completeOrderCreation() {\n // TODO: Required field trick from course on the front-end as well as on the back-end\n $order = new Order();\n $order->approved = $this->approved;\n $order->total = $this->total;\n $order->client_id = $this->client->id;\n $order->user_id = $this->user->id;\n $order->save();\n\n foreach($this->products as $productID => $amount) {\n $order->products()->attach($productID, ['amount' => $amount]);\n }\n\n Notification::send(request()->user(), new OrderCreated($order));\n// request()->user()->notify(new OrderCreated());\n $this->redirect(url()->current());\n\n// $this->emit('orderCreationCompleted');\n }", "title": "" }, { "docid": "0bd6f6f813c28606e9d2499debc5b63a", "score": "0.5655138", "text": "public function order() {\n\t $id = $this->params['id'];\n\t \n // Get the details for the order\n $order = $this->OrderModel->findOrder($id);\n $orderLines = $this->OrderModel->findOrderLines($id);\n \n // Redirect when no valid order\n if (!$order || !$orderLines || count($orderLines) == 0) {\n $this->redirect('/user/orders');\n }\n \n // Add them to the template\n $this->pageTitle = 'Bestelling';\n $this->set('order', $order);\n $this->set('orderLines', $orderLines);\n\t \n\t}", "title": "" }, { "docid": "a2defe021d3162b50864fa09e562abc9", "score": "0.56547755", "text": "public function ajax_add()\n {\n $this->_validate();\n\n $data = array(\n 'cust_code' => $this->input->post('cust_code'),\n 'cust_name' => $this->input->post('cust_name'),\n 'cust_gender' => $this->input->post('cust_gender'),\n 'cust_birth_date' => $this->input->post('cust_birth_date'),\n 'cust_religion_id' => $this->input->post('cust_religion_id'),\n 'cust_personal_email' => $this->input->post('cust_personal_email'),\n 'cust_personal_phone' => $this->input->post('cust_personal_phone'),\n 'cust_personal_mobile_phone' => $this->input->post('cust_personal_mobile_phone'),\n 'cust_personal_address' => $this->input->post('cust_personal_address'),\n 'status' => 'Active',\n 'cust_start_date_contract' => $this->input->post('cust_start_date_contract'),\n 'cust_end_date_contract' => $this->input->post('cust_end_date_contract'),\n 'cust_type_id' => '1',\n\n 'cust_personal_insert' => date('Y-m-d H:i:s'),\n 'cust_personal_update' => date('Y-m-d H:i:s'),\n 'cust_personal_user' => $_SESSION['name']\n );\n $this->CustomerModel->insert_personal_data($data);\n echo json_encode(array(\"status\" => TRUE));\n }", "title": "" }, { "docid": "5bb5ee6b8209e41c896104dc46710f39", "score": "0.56541073", "text": "public function actionCreate()\n {\n $modelInvoice = new InvoiceForm();\n $modelsInvoiceItem = [new InvoiceItems()];\n if ($modelInvoice->load(Yii::$app->request->post())) {\n $modelsInvoiceItem = Model::createMultiple(InvoiceItems::classname());\n Model::loadMultiple($modelsInvoiceItem, Yii::$app->request->post());\n\n // ajax validation\n if (Yii::$app->request->isAjax) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ArrayHelper::merge(\n ActiveForm::validateMultiple($modelsInvoiceItem),\n ActiveForm::validate($modelInvoice)\n );\n }\n\n // validate all models\n $valid = $modelInvoice->validate();\n $valid = Model::validateMultiple($modelsInvoiceItem) && $valid;\n if ($valid) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $itemsCost = 0;\n foreach ($modelsInvoiceItem as $item) {\n /** @var InvoiceItems $item */\n $itemsCost += $item->price_in * $item->quantity;\n }\n $modelInvoice->cost = $itemsCost;\n\n if ($flag = $modelInvoice->save()) {\n $modelInvoice->id = $flag;\n /** @var InvoiceItems $modelInvoiceItem */\n foreach ($modelsInvoiceItem as $k => $modelInvoiceItem) {\n $modelInvoiceItem->invoice_id = $modelInvoice->id;\n\n // Если товар новый или его нет в базе то его добавляем в таблицу баркод темп для дальнейшего его рассмотрение адином\n if ($modelInvoiceItem->is_new) {\n $barcodeTemp = new BarcodeTemp();\n $barcodeTemp->number = $modelInvoiceItem->barcode;\n $barcodeTemp->name = $modelInvoiceItem->name;\n $barcodeTemp->is_partial = $modelInvoiceItem->is_partial;\n if (!$barcodeTemp->save())\n throw new Exception(\"Local barcode is not saved\");\n }\n\n // Добавляем товары инвоиса на склад\n $product = Product::findOne(['barcode' => $modelInvoiceItem->barcode]);\n\n if ($product) {\n $product->quantity += $modelInvoiceItem->quantity;\n } else {\n $product = new Product();\n $product->barcode = $modelInvoiceItem->barcode;\n $product->name = $modelInvoiceItem->name;\n $product->quantity = $modelInvoiceItem->quantity;\n $product->percentage_rate = $modelInvoiceItem->percentage_rate;\n $product->price_retail = $modelInvoiceItem->price_retail;\n $product->is_partial = $modelInvoiceItem->is_partial;\n $product->price_wholesale = $modelInvoiceItem->wholesale_price;\n $product->wholesale_value = $modelInvoiceItem->wholesale_value;\n $product->status = Product::STATUS_ACTIVE;\n }\n\n if (!$product->save())\n throw new Exception(\"Product is not saved\");\n\n if (! ($flag = $modelInvoiceItem->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n\n $sum = $itemsCost - $modelInvoice->paid_amount;\n Yii::$app->settings->setBalance($sum, true);\n }\n\n if ($flag) {\n $transaction->commit();\n return $this->redirect(['index', 'id' => $modelInvoice->id]);\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n throw $e;\n }\n }\n }\n\n return $this->render('create', [\n 'modelInvoice' => $modelInvoice,\n 'modelsInvoiceItem' => (empty($modelsInvoiceItem)) ? [new InvoiceItems()] : $modelsInvoiceItem\n ]);\n }", "title": "" }, { "docid": "f9b77e44a50bf22a6108e5052d90efde", "score": "0.5652955", "text": "protected function _createInvoice()\n {\n if (!$this->_order->canInvoice()) {\n return;\n }\n //$invoice = $this->_order->prepareInvoice();\n //$invoice->register()->capture();\n //$this->_order->addRelatedObject($invoice);\n }", "title": "" }, { "docid": "a67121ebc03730e8bbf084010b6c2126", "score": "0.5646619", "text": "public function actionCreate($id = 0)\n {\n $client = new Client;\n $order = new ClientOrder;\n $order->create_user_id = Yii::app()->user->getId();\n if ($id) {\n $client->project_id = intval($id);\n }\n\n $client->create_time = date('Y-m-d');\n $client->update_time = $client->create_time;\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Client'], $_POST['ClientOrder'][0])) {\n $transaction = $client->getDbConnection()->beginTransaction();\n $client->attributes = $_POST['Client'];\n $order->attributes = $_POST['ClientOrder'][0];\n if ($client->save()) {\n $order->client_id = $client->getPrimaryKey();\n if ($order->save()) {\n $transaction->commit();\n if (isset($_POST['exit'])) {\n $this->redirect(array('admin', 'id' => $client->project_id));\n } else {\n $this->redirect(array('update', 'id' => $client->id));\n }\n } else {\n $transaction->rollback();\n }\n }\n }\n\n $this->render('create', array('client' => $client, 'order' => $order));\n }", "title": "" }, { "docid": "54ff0b040d813c121a91d1487f83e89c", "score": "0.56445277", "text": "public function create()\n { \n $clients = $this->client->orderBy('created_at','desc')->get();\n return view('admin.invoice.create',compact('clients'));\n }", "title": "" }, { "docid": "bfb4c774fe338a0974c77233cca5f4c4", "score": "0.5621777", "text": "function order(){\n\t\t\t// Breadcrumb & Page Title \n\t\t\t\t$this->EE->cp->set_breadcrumb($this->base_url, lang('nav_br_store'));\n\t\t\t\t$this->vars['cp_page_title'] = lang('nav_br_order');\n\n\t\t\t// Right Button (Create Order)\n\t\t\t\t$this->EE->cp->set_right_nav(array(\n\t\t\t\t\t#'br_new_order' => BASE.AMP.'C=addons_modules&M=show_module_cp&module=brilliant_retail&method=order_new'\n\t\t\t\t));\n\t\t\t\n\t\t\t// Get the status options from the config variable\n\t\t\t\t$this->vars[\"status\"] = $this->_config[\"status\"];\t\t\t\n\t\t\t\t\n\t\t\t// Batch Action\n\t\t\t\t$this->vars['action']\t= $this->base_url.AMP.'method=order_batch';\n\n\t\t\t// AJAX url to get order_collection from data tables\n\t\t\t\t$this->vars[\"ajax_url\"] = $this->base_url.AMP.'method=order_ajax';\n\t\t\t\n\t\t\t// Get the statuses\n\t\t\t\t$this->vars[\"status\"] = $this->_config[\"status\"];\t\t\t\n\t\t\t\n\t\t\t// Set the selected status_id based on an existing cookie\n\t\t\t\t$cookie = $this->EE->input->cookie('br_order_overview');\n\t\t\t\tif($cookie == ''){\n\t\t\t\t\t$this->vars[\"status_id\"] = \"all\";\n\t\t\t\t}else{\n\t\t\t\t\t$arr = unserialize(base64_decode($cookie));\n\t\t\t\t\t$this->vars[\"status_id\"] = $arr[\"status_id\"];\n\t\t\t\t}\n\n $this->vars[\"action\"] = 'C=addons_modules&M=show_module_cp&module=brilliant_retail&method=order_batch';\n\n\t\t\treturn $this->_view('order/order', $this->vars);\t\n\t\t}", "title": "" }, { "docid": "6b577b14288e07ed760e0c22868f9373", "score": "0.5617622", "text": "public function store(Request $request, $id)\n { \n if($request->ajax()){\n $cliente = tramite_documento::consult($id);\n return response()->json($cliente); \n }\n}", "title": "" }, { "docid": "668715f21892021176a36042eff4e5b1", "score": "0.56093335", "text": "public function actionCreate()\n\t{\n\t\t$model=new Order;\n\t\t\n\t\t$session = Yii::app()->session;\n\t\t$session['clid'] = -1;\n\t\t$session['coid'] = -1;\n//\t\t$session['post'] = 2;\n\t\tif (!isset($_POST['Order'])) {\n//\t\t$session['cli'] = $session['cli']+1;\n\t\tOrderTemp::model()->deleteallbyattributes(array('tbl_user_id'=>Yii::app()->user->id));\n\t\t}\n\t\t$orderlist = new OrderTemp('search'); // byattributes(array('random'=>$session['random']));\n\t\t$orderlist->unsetattributes();\n\t\t$phlists = Phones::model()->findall();\n\t\t$cats = ProductCat::model()->findallbyattributes(array('tbl_cat_id'=>'21'));\n\t\t$i=0;\n\t\tforeach ($cats as $cat) {\n\t\t$prodcats[$i] = Product::model()->findbypk($cat->tbl_product_id);\n\t\t$i=$i+1;\n\t\t}\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Order']))\n\t\t{\n\t\t$order = new Order;\n\t\t$order->date_time = new CDbExpression('NOW()');\n\t\t$order->tbl_user_id = Yii::app()->user->id;\n\t\t$order->tbl_client_id = $_POST['Order']['tbl_client_id'];\n\t\tif (trim($_POST['Order']['description'])!='')$order->description = $_POST['Order']['description'];\n\t\tif (trim($_POST['Order']['tbl_courier_id'])!='') {$order->tbl_courier_id = $_POST['Order']['tbl_courier_id'];}\n\t\t$order->tbl_state_id = $_POST['Order']['tbl_state_id'];\n\t\t$order->cash = $_POST['Order']['cash'];\n\t\t$ordertems = OrderTemp::model()->findallbyattributes(array('tbl_user_id'=>Yii::app()->user->id));\n\t\t$order->cost = 0;\n\t\t$session = Yii::app()->session;\n\t\t$session['clid'] = Clients::model()->findbypk($order->tbl_client_id)->tbl_discount_type_id;\n\t\t$order->tbl_discount_type_id = Order::sales();\n\t\t$session['coid'] = $order->tbl_courier_id;\n\t\t$order->cost = Order::calc();\n//\t\t$session['post']= $order['cost'];\n\t\t$order->save();\n//\t\t$session['post'] = $ordertems;\n\t\tforeach ($ordertems as $ordertem) {\n\t\t$orderl = new OrderList;\n\t\t$orderl->count = $ordertem->count;\n\t\t$orderl->tbl_product_id=$ordertem->tbl_product_id;\n\t\t$orderl->tbl_order_id = $order->id;\n\t\t$orderl->cost = $ordertem->cost;\n\t\t$orderl->date = new CDbExpression('NOW()');\n//\t\t$orderl->cost_disc = \n\t\t$order->cost = $order->cost + $ordertem->cost;\n\t\t\n\t\t$orderl->save(false);\n\t\t$ingredsts = Product::ingcalc($ordertem->tbl_product_id);\n\t\tforeach ($ingredsts as $ingred) {\n\t\t\tforeach($ingred['ings'] as $ing) {\n\t\t\t$ording = new OrderIngred;\n\t\t\t$ording->tbl_order_id = $order->id;\n\t\t\t$ording->tbl_product_id = $ordertem->tbl_product_id;\n\t\t\t$ording->tbl_ingred_id = $ing['iid'];\n\t\t\t$ording->count = $ing['count'];\n\t\t\t$ording->dt = new CDbExpression('NOW()');\n\t\t\t$ording->held = 0;\n\t\t\t$ording->save(false);\t\t\t\n\t\t\t}\n\t\t}\n\t\t}\n\t\t\n\t\t$client = Clients::model()->findbypk($order->tbl_client_id);\n\t\t$client->ord_count = Clients::ordp($order->tbl_client_id);\n//\t\tif ($client->tbl_discount_type_id<6) {\n//\t\tif ($client->ord_count > 1){$client->tbl_discount_type_id = 2;}\n//\t\tif ($client->ord_count > 3){$client->tbl_discount_type_id = 3;}\n//\t\tif ($client->ord_count > 8){$client->tbl_discount_type_id = 4;}\n//\t\tif (($client->ord_count)%20==0){$client->tbl_discount_type_id = 5;}\n//\t\t}\n\t\t$client->save(false);\n\t\t$session = Yii::app()->session;\n\t\t$session['clid'] = '-1';\n\t\t$session['coid'] = '-1';\n\t\tOrderTemp::model()->deleteallbyattributes(array('tbl_user_id'=>Yii::app()->user->id));\n\n\t\t\t// if($model->save())\n\t\t$this->redirect(array('admin'));\n\t\t}\n\t\t\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'prodcats'=>$prodcats,\n\t\t\t'phlists'=>$phlists,\n\t\t\t'orderlist'=>$orderlist,\n\t\t));\n\t}", "title": "" }, { "docid": "155a116b20545d598e057a200306d09a", "score": "0.5591088", "text": "public function create()\n\t{\n\t\tif(!in_array('createOrder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n\t\t$this->data['page_title'] = 'Add Order';\n\n\t\t$this->form_validation->set_rules('product[]', 'Product name', 'trim|required');\n\t\t\n\t\n if ($this->form_validation->run() == TRUE) { \t\n \t\n \t$order_id = $this->model_orders->create();\n \t\n \tif($order_id) {\n \t\t$this->session->set_flashdata('success', 'Successfully created');\n \t\tredirect('orders/update/'.$order_id, 'refresh');\n \t}\n \telse {\n \t\t$this->session->set_flashdata('errors', 'Error occurred!!');\n \t\tredirect('orders/create/', 'refresh');\n \t}\n }\n else {\n // false case\n \t$company = $this->model_company->getCompanyData(1);\n \t$this->data['company_data'] = $company;\n \t$this->data['is_vat_enabled'] = ($company['vat_charge_value'] > 0) ? true : false;\n \t$this->data['is_service_enabled'] = ($company['service_charge_value'] > 0) ? true : false;\n\n \t$this->data['products'] = $this->model_products->getActiveProductData(); \t\n\n $this->render_template('orders/create', $this->data);\n }\t\n\t}", "title": "" }, { "docid": "155a116b20545d598e057a200306d09a", "score": "0.5591088", "text": "public function create()\n\t{\n\t\tif(!in_array('createOrder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n\t\t$this->data['page_title'] = 'Add Order';\n\n\t\t$this->form_validation->set_rules('product[]', 'Product name', 'trim|required');\n\t\t\n\t\n if ($this->form_validation->run() == TRUE) { \t\n \t\n \t$order_id = $this->model_orders->create();\n \t\n \tif($order_id) {\n \t\t$this->session->set_flashdata('success', 'Successfully created');\n \t\tredirect('orders/update/'.$order_id, 'refresh');\n \t}\n \telse {\n \t\t$this->session->set_flashdata('errors', 'Error occurred!!');\n \t\tredirect('orders/create/', 'refresh');\n \t}\n }\n else {\n // false case\n \t$company = $this->model_company->getCompanyData(1);\n \t$this->data['company_data'] = $company;\n \t$this->data['is_vat_enabled'] = ($company['vat_charge_value'] > 0) ? true : false;\n \t$this->data['is_service_enabled'] = ($company['service_charge_value'] > 0) ? true : false;\n\n \t$this->data['products'] = $this->model_products->getActiveProductData(); \t\n\n $this->render_template('orders/create', $this->data);\n }\t\n\t}", "title": "" }, { "docid": "46367f599f7391fae860cce2dae172fc", "score": "0.558699", "text": "public function addClient(){\n\t\tif(empty($_POST)){\n\t\t\t$view = new View('templates/client');\n\t\t\t$view->render('add.php', ['pageTitle'=>\"Crear cliente\"]);\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tClient::addClient($_POST['name'], $_POST['password'], $_POST['mail']);\n\t\t\t$_POST = \"\";\n\t\t\theader('Location:../listClient/');\n\t\t}\n\n\t}", "title": "" }, { "docid": "86492306eacc6511114559af50bfdab6", "score": "0.55851114", "text": "public function add(){\n\t\t$this->_validate();\n\t\t$request=array(\n\t\t\t'nik_request'=>$this->input->post('nik_request'),\n\t\t\t'nik_receipt'=>$this->input->post('nik_receipt'),\n\t\t\t'order_date'=>date(\"Y-m-d\"),\n\t\t\t'status_user'=>'open'\n\t\t);\n\t\t$task=array(\n\t\t\t'title'=>$this->input->post('title'),\n\t\t\t'task_detail'=>$this->input->post('task_detail'),\n\t\t\t'create_date'=>date(\"Y-m-d\"),\n\t\t\t'deadline'=>$this->input->post('deadline'),\n\t\t\t'doc_type'=>$this->input->post('doc_type')\n\t\t);\n\t\t$result=$this->request_model->save_request($request, $task);\n\t\techo json_encode(array('status'=>true, 'result'=>$result));\n\t}", "title": "" }, { "docid": "4beb17e6402d6fb9cb94f066f0301b12", "score": "0.55770546", "text": "public function add(RequestsCheckout $request){\n $create = ModelsCheckout::create($request->validated());\n //after insert data in check out then add check out to car\n $orders = Order::whereUser_id($request->user_id)->whereStatus(1)->wherePurchase(0)->get(\"id\");\n foreach($orders as $order):\n $cart = Cart::create([\n 'order_id' => $order->id,\n 'checkout_id' => $create->id,\n ]);\n $order->update([ 'purchase' => 1]);\n endforeach;\n return back()->withMsg('Your Purchase is done');\n }", "title": "" }, { "docid": "a8adfdf8e7abc16ab4520e8faf01c05c", "score": "0.5575674", "text": "public function create_invoice() {\n\t\t$company = $this->CompanyModel->view();\n\n $invoice = array(\n \t'number' => 'INV/'.date(\"Y\").'/'.date(\"m\").'/',\n 'payment_type' => $this->input->post('invoice_payment'),\n 'date' => $this->input->post('invoice_date'),\n 'total_untax' => $this->input->post('invoice_total_amount'),\n 'total_discount' => $this->input->post('invoice_total_discount'),\n 'total_tax' => $this->input->post('invoice_total_tax'),\n 'total_amount' => $this->input->post('invoice_subtotal'),\n 'customers_id' => $this->input->post('invoice_customer'),\n 'company_id' => $company[0]->id,\n );\n\n $last_invoice = $this->InvoiceModel->create($invoice);\n\n $invoice_lines = array();\n $line = array();\n for($i = 0; $i < count($this->input->post('invoice_product')); $i++) {\n $line['product_id'] = $this->input->post('invoice_product')[$i];\n $line['price'] =$this->input->post('invoice_price')[$i];\n $line['quantity'] = $this->input->post('invoice_qty')[$i];\n $line['discount'] = $this->input->post('invoice_discount')[$i];\n $line['tax'] = $this->input->post('invoice_tax')[$i];\n $line['total'] = $this->input->post('invoice_total')[$i];\n $line['invoice_id'] = $last_invoice[0]->id;\n $line['unit_of_measures_id'] = $this->input->post('invoice_uom_id')[$i];\n array_push($invoice_lines, $line);\n unset($lines);\n }\n\n $last_invoice_lines = $this->InvoiceModel->create_lines($last_invoice, $invoice_lines);\n $this->create_delivery_order($last_invoice, $last_invoice_lines);\n\n redirect('invoice/invoice/single_invoice?id='.$last_invoice[0]->id);\n }", "title": "" }, { "docid": "1dd45873f082fa90f1b0d50298dcd8c9", "score": "0.5571671", "text": "public function add_order($project_id,$nursery_id,$ctn_id) \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('order_instructions', 'Order Instructions', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t$order_id = $this->orders_model->add_order($project_id,$nursery_id,$ctn_id);\r\n\t\t\t//update order\r\n\t\t\tif($order_id > 0)\r\n\t\t\t{\r\n\t\t\t\t// $query = $this->orders_model->get_order_details_items($order_id);\r\n\t\t\t\t// foreach ($query->result() as $key) {\r\n\t\t\t\t// \t# code...\r\n\t\t\t\t// \t$order_number = $key->order_number;\r\n\t\t\t\t// }\r\n\t\t\t\t// redirect('cashier/payments/'.$order_id.'/'.$order_number);\r\n\t\t\t\t$this->session->set_userdata('success_message', 'You have successfully created an order');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update order. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\tredirect('tree-planting/orders/'.$project_id.'/'.$nursery_id.'/'.$ctn_id);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8de382eee252a7b28868d6b4e78d7465", "score": "0.55685234", "text": "public function createOrder();", "title": "" }, { "docid": "003704e0e72ad5eb5d5ca1114ee7ab34", "score": "0.5557445", "text": "public function create(Request $request)\n {\n $request->validate([\n 'address' => ['required', 'string', 'max:64000'],\n 'city' => ['required']\n ]);\n $fee = \\App\\fee::findorfail($request['city']);\n $selcteditems = Session::has('selcteditems') ? Session::get('selcteditems') : array();\n $order = new \\App\\order;\n $order->user_id = auth()->id();\n $order->address =$request['address'].\" - \".$request['zone'].\" - \" . $fee['name'];\n $order->save();\n $totalprice=0;\n $totalcost=0;\n\n foreach($selcteditems as $selecteditem)\n {\n $item = \\App\\item::find($selecteditem->item->id);\n $item->quantity-=$selecteditem->Quantity;\n $item->save();\n\n $totalprice+=$selecteditem->Quantity*$selecteditem->item->price;\n $totalcost+=$selecteditem->Quantity*$selecteditem->item->cost;\n\n DB::table('item_order')->insert(\n ['item_id' => $selecteditem->item->id,\n 'order_id' => $order->id,\n 'quantity' =>$selecteditem->Quantity]\n );\n \n }\n $order->total_price = $totalprice+$fee['value'];\n $order->total_cost = $totalcost;\n\n \n $order->save();\n Session::put('number_of_items',0 );\n Session::put('selcteditems',array());\n \n // $details = [\n // 'title' => 'You have new order',\n // 'order' => $order ,\n // ];\n // Nexmo::message()->send([\n // 'to' => '+201118221684',\n // 'from' => '+201118221684',\n // 'text' => 'You submit new order http://aqueous-dawn-37150.herokuapp.com/chat/'.auth()->id().\" .\",\n // ]);\n // \\Mail::to('[email protected]')->send(new SendMail($details));\n\n return redirect('lastorder');\n }", "title": "" }, { "docid": "26457d35eefa029e251e77028c1d5d1d", "score": "0.5555231", "text": "function registrar_ordencompra()\r\n {\r\n if($this->acceso(1)){\r\n if ($this->input->is_ajax_request()){\r\n $usuario_id = $this->session_data['usuario_id'];\r\n $parametro = $this->Parametro_model->get_parametros();\r\n $detalle_compra_aux = $this->Orden_compra_model->get_detalle_ordencompra_aux($usuario_id);\r\n $total = 0;\r\n foreach ($detalle_compra_aux as $detalle){\r\n $total = $total + $detalle[\"detalleordencomp_total\"];\r\n }\r\n \r\n $proveedor_id = $this->input->post('proveedor_id');\r\n if(!isset($proveedor_id)){\r\n $proveedor_id = $detalle_compra_aux[0][\"proveedor_id\"];\r\n }\r\n $estadocompra_id = 33;\r\n date_default_timezone_set('America/La_Paz');\r\n $fecha_orden = date('Y-m-d');\r\n $hora_orden = date('H:i:s');\r\n $params = array(\r\n 'moneda_id' => $parametro[0][\"moneda_id\"],\r\n 'usuario_id' => $usuario_id,\r\n 'proveedor_id' => $proveedor_id,\r\n 'estado_id' => $estadocompra_id,\r\n 'ordencompra_fecha' => $fecha_orden,\r\n 'ordencompra_hora' => $hora_orden,\r\n 'ordencompra_totalfinal' => $total,\r\n 'forma_id' => $this->input->post('forma_id'),\r\n 'ordencompra_fechaentrega' => $this->input->post('ordencompra_fechaentrega'),\r\n );\r\n $ordencompra_id = $this->Orden_compra_model->add_ordencompra($params);\r\n \r\n foreach ($detalle_compra_aux as $detalle){\r\n $params = array(\r\n 'ordencompra_id' => $ordencompra_id,\r\n 'moneda_id' => $detalle[\"moneda_id\"],\r\n 'producto_id' => $detalle[\"producto_id\"],\r\n 'detalleordencomp_codigo' => $detalle[\"detalleordencomp_codigo\"],\r\n 'detalleordencomp_cantidad' => $detalle[\"detalleordencomp_cantidad\"],\r\n 'detalleordencomp_unidad' => $detalle[\"detalleordencomp_unidad\"],\r\n 'detalleordencomp_costo' => $detalle[\"detalleordencomp_costo\"],\r\n 'detalleordencomp_precio' => $detalle[\"detalleordencomp_precio\"],\r\n 'detalleordencomp_subtotal' => $detalle[\"detalleordencomp_subtotal\"],\r\n 'detalleordencomp_descuento' => $detalle[\"detalleordencomp_descuento\"],\r\n 'detalleordencomp_total' => $detalle[\"detalleordencomp_total\"],\r\n 'detalleordencomp_descglobal' => $detalle[\"detalleordencomp_descglobal\"],\r\n 'detalleordencomp_fechavencimiento' => $detalle[\"detalleordencomp_fechavencimiento\"],\r\n 'detalleordencomp_tipocambio' => $detalle[\"detalleordencomp_tipocambio\"],\r\n 'cambio_id' => $detalle[\"cambio_id\"],\r\n 'detalleordencomp_tc' => $detalle[\"detalleordencomp_tc\"],\r\n );\r\n $detalleordencomp_id = $this->Orden_compra_model->add_detalle_ordencompra($params);\r\n }\r\n $this->Orden_compra_model->delete_detalle_ordencompra_aux($usuario_id);\r\n $datos = $ordencompra_id;\r\n echo json_encode($datos);\r\n }else{ \r\n show_404();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7d82ce4b1a0c44df8e93c99a3f56415c", "score": "0.5541446", "text": "public function orders(){\n // $this->request->allowMethod(['get']);\n $this->loadModel('Customer');\n $conditions=[];\n $functionBetween = [];\n $nameCustomer = '';\n\n $customer_id=null;\n $timeStampStart=null;\n $timeStampEnd=null;\n\n if($_GET){\n $customer_id = ($_GET['customer_id'] != 'null') ? $_GET['customer_id'] : null;\n $timeStampStart = ($_GET['timeStampStart'] != 'null') ? $_GET['timeStampStart'] : null;\n $timeStampEnd = ($_GET['timeStampEnd'] != 'null') ? $_GET['timeStampEnd'] : null;\n }\n\n if($customer_id){\n $conditions['Customer.customer_id'] = $customer_id;\n $customer = $this->Customer->find('all')->where(['Customer.customer_id' => $customer_id])->first();\n\n if($customer){\n $nameCustomer = $customer->name;\n }\n } else {\n $conditions['Orders.order_id'] = null;\n }\n\n if($timeStampStart && $timeStampEnd){\n $dtStart = new \\DateTime(\"@$timeStampStart\"); \n $dtEnd = new \\DateTime(\"@$timeStampEnd\");\n\n $functionBetween = function($exp) use ($dtStart, $dtEnd) {\n return $exp->between('Orders.creation_date', $dtStart, $dtEnd);\n };\n }\n\n $orders = $this->Orders->find('all')\n ->contain(['Customer', 'OrderDetail' => ['Product']])\n ->where([$conditions, $functionBetween])\n ->order(['Orders.creation_date' => 'ASC']);\n\n if ($orders->count()) {\n $message = 'Ordenes registradas a: ' . $nameCustomer;\n } else {\n $message = 'No se encontraron ordenes registradas';\n }\n\n $customersList = $this->Customer->find('list')->toArray();\n\n $this->set([\n 'customersList' => $customersList,\n 'message' => $message,\n 'orders' => $orders,\n '_serialize' => ['message', 'orders', 'customersList']\n ]);\n }", "title": "" }, { "docid": "b2efc750b9995f0011a1edc0130de7da", "score": "0.5526891", "text": "public function order_ajax(){\n if (isset($_POST['sortable'])) {\n $this->style_model->save_order($_POST['sortable']);\n }\n \n // Fetch all pages\n $this->data['pages'] = $this->style_model->get_nested($this->data['content_language_id']);\n \n // Load view\n $this->load->view($this->_subView.'order_ajax', $this->data);\n }", "title": "" }, { "docid": "0b89c99c98efc4a77155afcb0899751c", "score": "0.5521828", "text": "public function extra_add()\n\t\t{\n\t\t\t$data = array(\n 'appointment_id' => $this->input->post('appointment_id'),\n\t\t\t\t\t'title' => $this->input->post('title'),\n\t\t\t\t\t'charge' => $this->input->post('charge'),\n 'qty' => $this->input->post('qty'),\n\t\t\t\t);\n $this->common_model->data_insert(\"appointment_extra\",$data);\n\t\t\t \n\t\t\t /*get appointment and update amounts*/\n\t\t\t\t$apmId=(!empty($data))?$data['appointment_id']:0;\t\n\t\t\t\t$this->appointment_model->update_appointment_amount($apmId);\n\t\t\t/*get appointment and update amounts*/\n\t\t\t \n\t\t\techo json_encode(array(\"status\" => TRUE));\n\t\t}", "title": "" }, { "docid": "8031a1c4ed9a2c5e32a71d5ae2ffc90a", "score": "0.5516186", "text": "public function invoiceaddress() {\n\t \n\t // Set the page title\n\t $this->pageTitle = 'Nieuw facturatieadres';\n\n // Get the customer id\n if (!isset($_SESSION['LoginSession'])) {\n $this->redirect('/');\n }\n if (!isset($_SESSION['LoginSession']['customerid'])) {\n $this->redirect('/');\n }\n $customerId = $_SESSION['LoginSession']['customerid'];\n\t $customer = $this->CustomerModel->findOne($customerId);\n \n // Check if there is a post request\n if ($this->RequestHandler->isPost()) {\n\n // If the user cancelled, go back to the order/confirm page\n if (isset($this->params['form']['button']) && $this->params['form']['button'] == 'Annuleer') {\n $this->redirect('/order/confirm');\n }\n\n // Add the login stad to the parameters\n $params = $this->params['data'];\n \n // Validate the form\n $errors = array();\n $validator = Validation::getInstance();\n if (empty($params['name'])) {\n $errors[] = 'Naam is een verplicht veld';\n }\n if (empty($params['street'])) {\n $errors[] = 'Straat is een verplicht veld';\n }\n if (empty($params['postal_code'])) {\n $errors[] = 'Postcode is een verplicht veld';\n }\n if (empty($params['city'])) {\n $errors[] = 'Plaats is een verplicht veld';\n }\n if (empty($params['country'])) {\n $errors[] = 'Land is een verplicht veld';\n }\n if (empty($params['vat'])) {\n $errors[] = 'BTW nummer is een verplicht veld';\n }\n \n // Check for errors\n if (count($errors) > 0) {\n \n // Add the errors to the template\n $this->set('error', implode('<br/>', $errors));\n \n } else {\n\n // Add the customer to the database\n $result = $this->CustomerModel->addInvoiceAddress($customerId, $params);\n \n // Go back to the confirm screen\n if ($result) {\n $this->redirect('/order/confirm?invoice=' . $result['idFactadres']);\n } else {\n $this->set('error', 'Er ging iets verkeerd');\n }\n \n }\n\n }\n \n // Add the variables to the template\n $this->set('customer', $customer);\n\n\t}", "title": "" }, { "docid": "6d375404ee022500a7e21872b3a7524c", "score": "0.5515891", "text": "public function ajaxOrderDetailsBefore() {\n if (Helpers::isAjax()) {\n $values = array(\n 'order' => array(\n 'id' => $_POST['detailsID']\n )\n );\n die(Helpers::ajaxReturnContent('../app/views/account/order-details-before.php', $values));\n }\n }", "title": "" }, { "docid": "552c9620adb5892ed434190456211f90", "score": "0.55153096", "text": "public function add_order_detail_waiter_for_restaurant_post()\n { \n $response = new StdClass();\n $result2 = new StdClass();\n $admin_id=$this->input->post('admin_id');\n $waiter_mobile_no=$this->input->post('waiter_mobile_no');\n $customer_mobile_no=$this->input->post('customer_mobile_no');\n $table_no=$this->input->post('table_no');\n $menu_item_name=$this->input->post('menu_item_name');\n $quantity=$this->input->post('quantity');\n $half_and_full_status=$this->input->post('half_and_full_status');\n $menu_price=$this->input->post('menu_price');\n\n $total_item=$this->input->post('total_item');\n $total_price=$this->input->post('total_price');\n $gst_amount=$this->input->post('gst_amount');\n $gst_amount_price=$this->input->post('gst_amount_price');\n $net_pay_amount=$this->input->post('net_pay_amount');\n $order_status=$this->input->post('order_status');\n date_default_timezone_set('Asia/kolkata'); \n $now = date('Y-m-d H:i:s');\n $now1 = date('Y-m-d');\n $data->admin_id=$admin_id;\n $data->waiter_mobile_no=$waiter_mobile_no;\n $data->customer_mobile_no=$customer_mobile_no;\n $data->table_no=$table_no;\n $data->menu_item_name=$menu_item_name;\n $data->quantity=$quantity;\n $data->half_and_full_status=$half_and_full_status;\n $data->menu_price=$menu_price;\n $data->total_item=$total_item;\n $data->total_price=$total_price;\n $data->gst_amount=$gst_amount;\n $data->gst_amount_price=$gst_amount_price;\n $data->net_pay_amount=$net_pay_amount;\n $data->order_status=$order_status;\n $data->create_date=$now;\n $data->date=$now1;\n $data->status='2';\n $que=$this->db->query(\"select * from tbl_order_detail_for_restaurant where table_no='\".$table_no.\"' and order_status!='Complete' and admin_id='$admin_id' and payment_status!='1'\");\n\n $row = $que->num_rows();\n if($row>0)\n {\n $data1->status ='2';\n $data1->message = 'This table is already book.';\n array_push($result2,$data1);\n $response->data = $data1;\n }\n else\n {\n $result = $this->Supervisor->add_order_detail_for_waiter($data);\n $alphanumerric='ORD_0000'.$result;\n $update_order_detail = $this->Supervisor->update_order_waiter_id($alphanumerric,$result);\n if(!empty($result))\n { \n\n\n $menu_item_array =explode(\",\",rtrim($menu_item_name,\",\"));\n $menu_price =explode(\",\",rtrim($menu_price,\",\"));\n $quantity =explode(\",\",rtrim($quantity,\",\"));\n $half_and_full_status =explode(\",\",rtrim($half_and_full_status,\",\"));\n\n\n for($i=0;$i<count($menu_item_array);$i++)\n {\n\n $insert_array[]=array(\n 'menu_item_name'=>$menu_item_array[$i],\n 'quantity'=>$quantity[$i],\n 'half_and_full_status'=>$half_and_full_status[$i],\n 'menu_price'=>$menu_price[$i],\n 'order_id'=>$alphanumerric,\n 'status'=>'1',\n 'admin_id'=>$admin_id\n );\n \n }\n // print_r($insert_array);exit;\n $this->Supervisor->insertBatchOrder($insert_array);\n $data2->status ='1';\n $data2->message = 'success';\n array_push($result2,$data2);\n $response->data = $data2;\n }\n else\n {\n $data2->status ='0';\n $data2->message = 'failed';\n array_push($result2,$data2);\n $response->data = $data2;\n }\n }\n \n \n \n echo json_output($response);\n }", "title": "" }, { "docid": "032624730640e96f33613dcb0a75fb4f", "score": "0.55144584", "text": "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"orderdetails\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $orderdetail = new Orderdetails();\n $orderdetail->setproductid($this->request->getPost(\"productid\"));\r\n $orderdetail->setorderid($this->request->getPost(\"orderid\"));\r\n $orderdetail->setquantity($this->request->getPost(\"quantity\"));\r\n $orderdetail->setsubtotal($this->request->getPost(\"subtotal\"));\r\n \n\n if (!$orderdetail->save()) {\n foreach ($orderdetail->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"orderdetails\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"orderdetail was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"orderdetails\",\n 'action' => 'index'\n ]);\n }", "title": "" }, { "docid": "2cb1477166bd4359197b0636a687e3f9", "score": "0.5508903", "text": "public function addNewOrder()\n {\n $address = $this->input->post('address') . \"|\" . $this->input->post('city') . \"|\" . $this->input->post('state') . \"|\" . $this->input->post('postcode') . \"|\" . $this->input->post('country');\n $data = [\n 'user_id' => $this->input->post('employeeId'),\n 'customer_name' => $this->input->post('name'),\n 'customer_phone' => $this->input->post('phone'),\n 'customer_email' => $this->input->post('email'),\n 'customer_address' => $address,\n 'total_item' => sizeof($this->cart->contents()),\n 'total_price' => $this->cart->total(),\n 'status' => \"Processing\",\n 'createdAt' => time(),\n ];\n\n $this->db->insert('orders', $data);\n $order_id = $this->db->insert_id();\n\n foreach ($this->cart->contents() as $c) {\n $orderDetail = [\n 'order_id' => $order_id,\n 'product_code' => $c['product_code'],\n 'product_name' => $c['name'],\n 'price' => $c['price'],\n 'quantity' => $c['qty'],\n 'unit' => $c['unit'],\n 'subtotal' => $c['subtotal']\n ];\n $this->db->insert('orders_detail', $orderDetail);\n\n $dataProduct = $this->db->get_where('products', ['id' => $c['id']])->row_array();\n $new = $dataProduct['qty_stock'] - $c['qty'];\n $this->db->set('qty_stock', $new);\n $this->db->where('id', $c['id']);\n $this->db->update('products');\n }\n\n // Create new order invoice\n $invoice = [\n 'order_id' => $order_id,\n 'total_amount' => $this->cart->total(),\n 'status' => \"Unpaid\",\n 'createdAt' => time()\n ];\n $this->db->insert('invoices', $invoice);\n\n // Insert user (employee) activity to database\n $users = [\n 'user_id' => $this->input->post('employeeId'),\n 'activity' => 'Add new order',\n 'createdAt' => time()\n ];\n $this->db->insert('users_activities', $users);\n }", "title": "" }, { "docid": "158c8da3616f650bd6d6304bbefa4c0e", "score": "0.55044955", "text": "public function postNewVcliente(){\r\n $data = Obj::run()->vclienteModel->newVcliente();\r\n \r\n echo json_encode($data);\r\n }", "title": "" }, { "docid": "3322e708b0caf254986b7d0664e98cfb", "score": "0.5501016", "text": "public function invoiceAction(){\n \t\n \t/**\n \t * check license key\n \t */\n \tMage::helper('marketplace')->checkMarketplaceKey();\n \t \t\n \t$this->chekcingForMarketplaceSellerOrNot();\n \t\n $orderId = $this->getRequest()->getParam('id');\n /**\n * Getting order product ids\n */\n $orderPrdouctIds = Mage::helper('marketplace/vieworder')->getOrderProductIds(Mage::getSingleton('customer/session')->getId(),$orderId);\n /**\n * Getting cancel order items\n */\n $cancelOrderItemProductIds = Mage::helper('marketplace/vieworder')->cancelOrderItemProductIds(Mage::getSingleton('customer/session')->getId(),$orderId);\n \n $orderStatusFlag = Mage::getStoreConfig('marketplace/admin_approval_seller_registration/order_manage');\n \n if(count($orderPrdouctIds) >=1 && $orderStatusFlag == 1){ \t\n \t$order = Mage::getModel('sales/order')->load($orderId); \t\n \t$itemsarray = $itemsArr = array(); \n \t/**\n \t * prepare invoice items\n \t */ \t\n \tforeach($order->getAllItems() as $item) {\n \t\t$qty = 0;\n \t\t/**\n \t\t * Prepare invoice qtys\n \t\t */\n \t\t$itemProductId = $item->getProductId();\n \t\t$itemId = $item->getItemId();\n \t\tif(in_array($itemProductId,$orderPrdouctIds) && !in_array($itemProductId,$cancelOrderItemProductIds)){\n \t\t$itemsArr[] = $itemId;\n \t\t/**\n \t\t * Qty ordered for that item\n \t\t */\n \t\t$qty = $item->getQtyOrdered() - $item->getQtyInvoiced();\n \t\t}\n \t\t$itemsarray[$itemId] = $qty;\n \t} \t\n \t\n \ttry {\n \t\t/**\n \t\t * Create invoice\n \t\t */\n \tif($order->canInvoice()) {\n \t\tMage::getModel('sales/order_invoice_api')\n \t\t->create($order->getIncrementId(), $itemsarray ,'' ,1,1); \t\t\n \t\tMage::getModel('marketplace/order')->updateSellerOrderItemsBasedOnSellerItems($itemsArr,$orderId,1); \t \t\t\n \t\t\n \tMage::getSingleton('core/session')->addSuccess($this->__('The invoice has been created.'));\n \t} \n $this->_redirect('marketplace/order/vieworder/orderid/'.$orderId);\n } catch (Exception $e) {\n Mage::getSingleton('core/session')->addError($this->__($e->getMessage()));\n $this->_redirect('marketplace/order/vieworder/orderid/'.$orderId);\n } \t\n }else{\n \tMage::getSingleton('core/session')->addError($this->__('You do not have permission to access this page'));\n \t$this->_redirect('marketplace/order/manage');\n \treturn false;\n } \n }", "title": "" }, { "docid": "f613eaefe4af6b5e8455e89c226c5a81", "score": "0.5497427", "text": "public function ecommOrderAdd(OrderInterface $order)\n {\n // Prepare the parameters array\n $params = array('order' => $order->prepare());\n \n // Build the request URL\n $request = $this->client->prepare('ecommOrderAdd', $params);\n \n // Return the API response\n return $this->client->request($request);\n }", "title": "" }, { "docid": "d32902a5a97d97fef4d8ccd5dbad22e4", "score": "0.5487695", "text": "public function ajax_save_order_table()\n\t{\n\t\tif ($this->input->is_ajax_request() AND $this->input->method() == 'post')\n\t\t{\n\t\t\t$this->load->model('store_table_model');\n\t\t\t$this->load->model('order_model');\n\n\t\t\t$post = $this->input->post();\n\n\t\t\t$order_table = $this->store_table_model->get_record(['caption' => $post['order_table_caption']]);\n\n\t\t\t$order = $this->order_model->get_record(['record_id' => $post['order_record_id']]);\n\t\t\t$order->store_table_record_id = $order_table->record_id;\n\t\t\t$order->save();\n\t\t}\n\t}", "title": "" }, { "docid": "6daf62b2ebde6502f6b0f0b528edf323", "score": "0.5485142", "text": "public function new_orders(Request $request)\n {\n if (!User::where('type', 'delegate')->find($request->user()->id))\n return response()->json(['status' => 'false', 'message' => trans('app.delegate_not_found'), 'data' => null], 404);\n $delegate = User::where('type', 'delegate')->find($request->user()->id);\n if ($delegate->active != 'active')\n return response()->json(['status' => 'false', 'message' => trans('auth.deactivated_account'), 'data' => null], 403);\n if ($delegate->banned != '0')\n return response()->json(['status' => 'false', 'message' => trans('auth.banned_account'), 'data' => null], 401);\n try {\n return response()->json([\n 'status' => 'true',\n 'message' => '',\n 'data' => MiniDelegateOrder::collection(Order::where(['delegate_id' => null, 'has_provider_delegate' => 'no', 'order_category_type' => 'products'])->orderBy('created_at', 'DESC')->get())\n ], 200);\n } catch (Exception $e) {\n return response()->json(['status' => 'false', 'message' => trans('auth.something_went_wrong_please_try_again'), 'data' => null], 401);\n }\n }", "title": "" }, { "docid": "b4e1fb176af0fce3b176aa50432234aa", "score": "0.54769343", "text": "public function actionCreate()\n { \n $model = new Invoice();\n $branch = Branch::getBranchWithKeyId();\n $user = User::dataUser();\n $customer = CarInformation::dataCarInformation();\n $invoiceLastId = $this->_getInvoiceId();\n $category = Category::dataCategory();\n\n if ($postData = Yii::$app->request->post()) {\n $postData = Yii::$app->request->post();\n\n $message = \"\";\n $message = $this->validateInvoice($postData);\n\n if($message!='')\n return json_encode(array('status'=>'failed', 'message'=>$message, 'redirect'=>''));\n\n $invoice_id = Invoice::saveInvoice($postData);\n\n Yii::$app->getSession()->setFlash('success', 'Your record was successfully added in the database.');\n return json_encode(array('status'=>'success', 'message'=>'Your record was successfully added in the database.', 'redirect'=>'?r=invoice/view&id='.$invoice_id));\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'invoiceId' => $invoiceLastId,\n 'branch' => $branch,\n 'user' => $user,\n 'customer' => $customer,\n 'category' =>$category,\n 'redeem_point' => '0',\n 'redeem_price' => '0.00',\n ]);\n }\n }", "title": "" }, { "docid": "e50a6123a3859e6c06086e8b550a17d3", "score": "0.546839", "text": "public static function AddOrder()\n {\n \n $add = DB::table('order_items')->insert([\n ]);\n return $add;\n }", "title": "" }, { "docid": "96019d73af9e1b7dfa18da6214a35c6b", "score": "0.5463693", "text": "public function addAction(){\n $this->_disableView();\n $request = $this->getRequest();\n $mealId = (integer) $request->getParam('mealId');\n $optionRowId = (integer) $request->getParam('optionRowId');\n\n if ( $request->isPost() && $mealId && $optionRowId) {\n try {\n $mealoptionNn = new Yourdelivery_Model_Meal_MealoptionsNn();\n $mealoptionNn->setMealId($mealId);\n $mealoptionNn->setOptionRowId($optionRowId);\n $mealoptionNn->save();\n $this->_updateHasSpecials($mealoptionNn->getOptionRowId());\n $this->logger->adminInfo(sprintf('Neue Mealoption wurde hinzugefügt')); \n return $this->_json(array('id' => $mealoptionNn->getId()));\n }\n catch ( Yourdelivery_Exception_Database_Inconsistency $e ) { \n $this->logger->adminInfo(sprintf('Exception in request_restaurant/addmealoptionAction : %s', $e->getMessage()));\n }\n }\n \n return $this->_json(array('error' => __(\"Meal Option konnte nicht angelegt werden\")));\n }", "title": "" }, { "docid": "3faefe955d9307d63f464eed7ddaf638", "score": "0.5461495", "text": "public function testOrdersAdd()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "4006806a7c508691f4004a872b5efc6d", "score": "0.5460895", "text": "function create_invoice() \n {\n $data['title'] = $this->input->post('title');\n $data['invoice_number'] = $this->input->post('invoice_number');\n $data['grampanchayat_id'] = $this->input->post('grampanchayat_id');\n $data['creation_timestamp'] = $this->input->post('creation_timestamp');\n $data['due_timestamp'] = $this->input->post('due_timestamp');\n $data['vat_percentage'] = $this->input->post('vat_percentage');\n $data['discount_amount'] = $this->input->post('discount_amount');\n $data['status'] = $this->input->post('status');\n\n $invoice_entries = array();\n $descriptions = $this->input->post('entry_description');\n $amounts = $this->input->post('entry_amount');\n $number_of_entries = sizeof($descriptions);\n \n for ($i = 0; $i < $number_of_entries; $i++)\n {\n if ($descriptions[$i] != \"\" && $amounts[$i] != \"\")\n {\n $new_entry = array('description' => $descriptions[$i], 'amount' => $amounts[$i]);\n array_push($invoice_entries, $new_entry);\n }\n }\n $data['invoice_entries'] = json_encode($invoice_entries);\n\n $this->db->insert('invoice', $data);\n }", "title": "" }, { "docid": "5899f1e1869cf1582a9a13970d81ae95", "score": "0.5460436", "text": "function add_order($order)\n\t{\n\t\tif($order->quantity > 0)\n\t\t{\n\t\t\t$sql = \"insert into orders (user_id,order_filename,order_sheets,order_size\";\n\t\t\t$sql .= \",order_finish,order_quantity,order_status,order_type) values (\";\n\t\t\t$sql .= (\"'\" . $order->user2 . \"','\".$order->filename.\"','\".$order->sheets.\"',\");\n\t\t\t$sql .= (\"'\".mysql_real_escape_string($order->size).\"','\".$order->finish.\"','\".$order->quantity.\"','\");\n\t\t\t$sql .= ($order->status.\"','\".$order->type2.\"'\");\n\t\t\t$sql .= \")\";\n\n\t\t\tif(mysql_query($sql))\n\t\t\t{\n\t\t\t\t$getter2 = mysql_query(\"select * from orders order by last_updated_date desc limit 1\");\n\t\t\t\t$d = mysql_fetch_assoc($getter2);\n\t\t\t\tmysql_query(\"insert into cart (user_id,order_id,cart_finalized) values ('\".$order->user2.\"','\".$d['order_id'].\"','0')\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "75c7793b2cc3468a570f42afb7cc6454", "score": "0.54586196", "text": "function insertcommuneAction(){\n\t\tif($this->getRequest()->isPost()){\n\t\t\t$data = $this->getRequest()->getPost();\n\t\t\t$db_commune = new Other_Model_DbTable_DbCommune();\n\t\t\t$commune=$db_commune->addCommunebyAJAX($data);\n\t\t\tprint_r(Zend_Json::encode($commune));\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "eb95bfa3bd5b19f65ec09ce81907e446", "score": "0.545805", "text": "public function addInvoice_post(){\n \n /*START - Get Current Date Time */\n $currentFullDate=getdate();\n $d=$currentFullDate['mday'];\n $m=$currentFullDate['mon'];\n $y=$currentFullDate['year'];\n $time=date(\"h:i\");\n $today_date=$y.\"-\".$m.\"-\".$d.\"-\".$time;\n /*END - Get Current Date Time */\n\n $personID = $this->post('personID');\n if($personID == null){\n $personID = 1 ; /* refer to client debit sell */\n }\n\n $empID=$this->post('empID');\n $items = $this->post('items');\n $shiftID = $this->post('shiftID');\n $type = $this->post('type');\n $comment=$this->post('comment');\n $invoiceType = $this->post('invoiceType');\n $rest = $this->post('amountRest');\n $paid = $this->post('amountPaid');\n $amount = $rest + $paid;\n $totalProfit = $this->post('totalProfit');\n if($rest == null){\n $rest = 0; /* refer to sell on cash */\n } \n /* start execut querys */ \n $this->db->trans_begin();\n \n /* add debit persone */\n if($rest > 0){\n $this->operation_model->add_debit_person($personID,$rest);\n }\n /* check Type invoice */\n if($invoiceType == \"supply\"){\n $isSupply = 1;\n }else{\n $isSupply = 0;\n }\n /* insert into invoice */\n $this->operation_model->add_inv(array(\"amount\"=>$amount,\n \"type\" => $type,\"empID\"=>$empID,'dateTime'=>$today_date,'rest'=>$rest,'totalProfit'=>$totalProfit,\"shiftID\"=>$shiftID,\n \"personID\"=>$personID,\"note\"=>$comment,'isSupply'=>$isSupply));\n\n /* Get last inserted invoice ID */\n $invID = $this->db->insert_id(); \n\n /* insert into inv_order */\n foreach($items as $row){\n $itemID=$row['itemID'];\n $itemName = $row['name'];\n $quantity = $row['quantity'];\n $price = $row['price'];\n\n /* update stock */\n if($invoiceType == \"supply\"){\n $cost=$price;\n $price = 0 ;\n $avgCost=$this->operation_model->calculate_avg_cost_item($itemID,$quantity,$cost);\n $this->operation_model->update_stock($itemID,$quantity);\n $this->operation_model->updateCost_stock($itemID,$avgCost);\n }\n else if($invoiceType != \"supply\"){\n $cost=0;\n $this->operation_model->update_stock($itemID,-$quantity);\n }\n\n /* add inv Order*/ \n $this->operation_model->add_inv_order(array(\"invID\"=>$invID,\n \"itemID\" => $itemID,'quantity'=>$quantity,'cost'=>$cost,'price'=>$price));\n }\n\n\n /* End execut querys */ \n if ($this->db->trans_status() === false) {\n $this->db->trans_rollback();\n $this->response(\"Invoice information could not be saved. Try again.\", 404);\n } else {\n $this->db->trans_commit();\n $this->response(\"success\", 200);\n } \n }", "title": "" }, { "docid": "fde664757f38637e9be44e8d4971bc3f", "score": "0.545662", "text": "public function sendOrder()\n {\n // is request ajax?\n if( $this->request->is('ajax') ) {\n // get parameters for order\n $items = $this->request->data('items');\n // make a new order\n $order_table = TableRegistry::get('orders');\n $nprod = $order_table->newEntity();\n // fill the new order with data\n $nprod->user_id = $this->Auth->user('id');\n $nprod->products = $items;\n $nprod->created = date(\"Y-m-d H:i:s\");\n $allItemIds = json_decode($items,true);\n $product_table = TableRegistry::get('product');\n \n // check if there is enough of all products needed in stock, stop if not \n foreach (array_keys($allItemIds) as $item){\n $mprod = $product_table->get($item);\n if (($mprod->amount-$allItemIds[\"$item\"])<0){\n echo \"Order failed item not available:\".$mprod->name;\n return null;\n }\n }\n // enough availability, decrement the products' amounts in the database\n foreach (array_keys($allItemIds) as $item){\n $mprod = $product_table->get($item);\n $mprod->amount = $mprod->amount-$allItemIds[\"$item\"];\n $product_table->save($mprod);\n }\n // save the order\n if($order_table->save($nprod)){\n $this->getRequest()->getSession()->write('cart',[]);\n echo \"Ordered.\";\n\n }\n else // something went wrong, couldn't compleate order\n echo \"order failed\";\n }\n }", "title": "" }, { "docid": "0966a7a8108ac11d56fde29e34d51ed9", "score": "0.54542434", "text": "public function actionCreate()\n\t{\n\t\t$model=new Invoice;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Invoice']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Invoice'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->invoice_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "c9c1b6ec9184acbff170bb49bba62974", "score": "0.54526156", "text": "public function customer_order_insert_page()\n\t{\n\t\tif (!$this->Admin_model->is_admin_loged_in()) \n\t\t{\n\t\t\tredirect('Adminlogin/?logged_in_first');\n\t\t}else{\n\t\t\tif($this->admin_access('customer_order') != 1){\n\t\t\t\t$data['warning_msg']=\"You Are Not able to Access this Module...!\";\n\t\t\t\t$this->session->set_flashdata($data);\n\t\t\t\tredirect('order/dashboard');\n\t\t\t}\n\n\t\t\t$data['title'] = 'Customer & Order Information'; \n\t\t\t$data['content'] = 'customer_info/cus_order_entry';\n $data['cus_code'] = $this->Customer_model->create_customer_sl_no();\n\t\t\t$data['order_no'] = $this->Order_model->create_order_no();\n\t\t\t$data['lc_data'] = $this->LC_model->get_all_lc_info();\n\t\t\t$data['cars'] = $this->Purchase_model->unOrder_car_list();\n\t\t\t$this->load->view('admin/adminMaster', $data);\n\t\t}\t\n\t}", "title": "" }, { "docid": "bfb202b37f4cfe78d80bf45413217e9f", "score": "0.5452094", "text": "function add($ac = null, $id = null) {\n\t\t$total_jo = 0;\n\t\t$total_ge = 0;\n\t\t$total_quantity = 0;\n\n\t\tif(@$this->data['OrderingsDetail']['step'] == '1') {\n\t\t\t$params = array(\n\t\t\t\t'conditions'=>array('Item.name'=>$this->data['OrderingsDetail']['AutoItemName']),\n\t\t\t\t'recursive'=>0,\n\t\t\t);\n\t\t\t$item = $this->Item->find('first' ,$params);\n\t\t\tif($item){\n\t\t\t\t$this->set('item', $item);\n\t\t\t\t$params = array(\n\t\t\t\t\t'conditions'=>array('Subitem.item_id'=>$item['Item']['id']),\n\t\t\t\t\t'recursive'=>0,\n\t\t\t\t\t'order'=>array('Subitem.name'=>'asc')\n\t\t\t\t);\n\t\t\t\t$subitems = $this->Subitem->find('all' ,$params);\n\t\t\t\tif(empty($subitems)){\n\t\t\t\t\t$this->Session->setFlash('子品番が登録されていません。');\n\t\t\t\t}\n\t\t\t\t//labor_costがemptyだった場合、Itemのcostを入れる\n\t\t\t\tforeach($subitems as $key=>$value){\n\t\t\t\t\tif(empty($value['Subitem']['labor_cost'])){\n\t\t\t\t\t\t$subitems[$key]['Subitem']['labor_cost'] = $item['Item']['cost'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('subitems', $subitems);\n\t\t\t\t$params = array(\n\t\t\t\t\t'conditions'=>array('User.id'=>$this->Auth->user('id')),\n\t\t\t\t\t'recursive'=>0,\n\t\t\t\t);\n\t\t\t\t$user = $this->User->find('first' ,$params);\n\t\t\t\t$this->set('user', $user);\n\t\t\t\t$params = array(\n\t\t\t\t\t'conditions'=>array('Depot.section_id'=>$user['User']['section_id']),\n\t\t\t\t\t'recursive'=>0,\n\t\t\t\t);\n\t\t\t\t$depots = $this->Depot->find('list' ,$params);\n\t\t\t\t$this->set('depots', $depots);\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash('品番は正確に入力して下さい。');\n\t\t\t}\n\t\t}\n\t\tif(@$this->data['OrderingsDetail']['step'] == '2') {\n\t\t\t$params = array(\n\t\t\t\t'conditions'=>array('Depot.id'=>$this->data['OrderingsDetail']['depot']),\n\t\t\t\t'recursive'=>0,\n\t\t\t\t'fields'=>array('Depot.name')\n\t\t\t);\n\t\t\t$depot = $this->Depot->find('first' ,$params);\n\t\t\tif(!empty($this->data['OrderingsDetail']['order_id'])){\n\t\t\t\t$this->data['OrderingsDetail']['order_id'] = mb_convert_kana($this->data['OrderingsDetail']['order_id'], 'a', 'UTF-8');\n\t\t\t\t$this->data['OrderingsDetail']['order_id'] = ereg_replace(\"[^0-9]\", \"\", $this->data['OrderingsDetail']['order_id']);//半角数字以外を削除\n\t\t\t\t$params = array(\n\t\t\t\t\t'conditions'=>array('Order.id'=>$this->data['OrderingsDetail']['order_id']),\n\t\t\t\t\t'recursive'=>1,\n\t\t\t\t);\n\t\t\t\t$order = $this->Order->find('first' ,$params);\n\t\t\t\tif(!$order)$this->Session->setFlash(__('そんな受注番号はありません。', true));\n\t\t\t}\n\t\t\tif($this->data['Item']['stock_code'] == '3'){\n\t\t\t\tif($order AND !empty($order['OrderDateil'][0]['subitem_id'])){\n\t\t\t\t\t$this->data['subitem'] = array($order['OrderDateil'][0]['subitem_id']=>1);\n\t\t\t\t}else{\n\t\t\t\t\t$this->Session->setFlash(__('単品注文の発注は必ず受注番号も入れてください。', true));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$subitems = array_keys($this->data['subitem']);\n\t\t\tforeach($subitems as $subitem_id){\n\t\t\t\tif($this->data['subitem'][$subitem_id] > 0){\n\t\t\t\t\t$params = array(\n\t\t\t\t\t\t'conditions'=>array('Subitem.id'=>$subitem_id),\n\t\t\t\t\t\t'recursive'=>0\n\t\t\t\t\t);\n\t\t\t\t\t$subitem = $this->Subitem->find('first' ,$params);\n\t\t\t\t\t//仕入原価(labor_cost)が入っていなかったら、親品番の原価(cost)を採用する。&その逆str_replace\n\t\t\t\t\tif(empty($subitem['Subitem']['labor_cost'])) {\n\t\t\t\t\t\t$this->data['Subitem']['labor_cost'] = $subitem['Item']['cost'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->data['Subitem']['labor_cost'] = $subitem['Subitem']['labor_cost'];\n\t\t\t\t\t}\n\t\t\t\t\t//テキストボックスから原価が入力されたら、その値に変える\n\t\t\t\t\tif(!empty($this->data['OrderingsDetail']['changecost'])) $this->data['Subitem']['labor_cost'] = $this->data['OrderingsDetail']['changecost'];\n\t\t\t\t\t// factory_id が入っていたら工場をそれに変更\n\t\t\t\t\tif(!empty($this->data['OrderingsDetail']['factory_id'])){\n\t\t\t\t\t\t$this->data['OrderingsDetail']['factory_id'] = mb_convert_kana($this->data['OrderingsDetail']['factory_id'], 'a', 'UTF-8');\n\t\t\t\t\t\t$this->data['OrderingsDetail']['factory_id'] = ereg_replace(\"[^0-9]\", \"\", $this->data['OrderingsDetail']['factory_id']);//半角数字以外を削除\n\t\t\t\t\t\t$factory_name = $this->Factory->isName($this->data['OrderingsDetail']['factory_id']);\n\t\t\t\t\t\tif($factory_name){\n\t\t\t\t\t\t\t$this->data['Factory']['name'] = $factory_name;\n\t\t\t\t\t\t\t$this->data['Factory']['id'] = $this->data['OrderingsDetail']['factory_id'];\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$session_write['Subitem']['stock_qty'] = $this->Stock->SubitemDepotTotal($subitem['Subitem']['id'], $depot['Depot']['id']);\n\t\t\t\t\t//強制半角&コードを短く\n\t\t\t\t\t$qty = mb_convert_kana($this->data['subitem'][$subitem['Subitem']['id']], 'a', 'UTF-8');\n\t\t\t\t\t$session_write['Subitem']['id'] = $subitem['Subitem']['id'];\n\t\t\t\t\t$session_write['Subitem']['name'] = $subitem['Subitem']['name'];\n\t\t\t\t\t$session_write['Subitem']['jan'] = $subitem['Subitem']['jan'];\n\t\t\t\t\t$session_write['Subitem']['quantity'] = $this->data['subitem'][$subitem_id];\n\t\t\t\t\t$session_write['Subitem']['major_size'] = $subitem['Subitem']['major_size'];\n\t\t\t\t\t$session_write['Subitem']['minority_size'] = $subitem['Subitem']['minority_size'];\n\t\t\t\t\t$session_write['Item']['id'] = $subitem['Subitem']['item_id'];\n\t\t\t\t\t$session_write['Item']['stock_code'] = $this->data['Item']['stock_code'];\n\t\t\t\t\t$session_write['Subitem']['cost'] = $this->data['Subitem']['labor_cost'];\n\t\t\t\t\t$session_write['Item']['price'] = $this->data['Item']['price'];\n\t\t\t\t\t$session_write['Item']['sub_total_jo'] = $this->data['Item']['price'] * $qty;\n\t\t\t\t\t$session_write['Item']['sub_total_ge'] = $this->data['Subitem']['labor_cost'] * $qty;\n\t\t\t\t\t$session_write['Section']['name'] = $this->data['Section']['name'];\n\t\t\t\t\t$session_write['Factory']['name'] = $this->data['Factory']['name'];\n\t\t\t\t\t$session_write['Factory']['id'] = $this->data['Factory']['id'];\n\t\t\t\t\t$session_write['Depot']['id'] = $depot['Depot']['id'];\n\t\t\t\t\t$session_write['Depot']['name'] = $depot['Depot']['name'];\n\t\t\t\t\t$session_write['specified_date'] = $this->data['OrderingsDetail']['specified_date'];\n\t\t\t\t\t$session_write['order_id'] = $this->data['OrderingsDetail']['order_id'];\n\t\t\t\t\t//単品管理の場合は、子品番の変わりにJANコードを入れる\n\t\t\t\t\tif($this->data['Item']['stock_code'] == '3'){\n\t\t\t\t\t\t$subitem_name = $subitem['Subitem']['jan'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$subitem_name = $subitem['Subitem']['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$this->Session->write(\"OrderingsDetail.\".$subitem_id, $session_write);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->Session->check('OrderingsDetail')){\n\t\t\t$details = array();\n\t\t\t$session_read = $this->Session->read('OrderingsDetail');\n\t\t\tif($ac == 'del'){\n\t\t\t\t/* 5/12修正\n\t\t\t\t$params = array(\n\t\t\t\t\t'conditions'=>array('Subitem.id'=>$id),\n\t\t\t\t\t'recursive'=>0,\n\t\t\t\t\t'fields'=>array('Subitem.name', 'Subitem.jan')\n\t\t\t\t);\n\t\t\t\t$del_subitem = $this->Subitem->find('first' ,$params);\n\t\t\t\t$this->Session->delete(\"OrderingsDetail.\".$del_subitem['Subitem']['name']);\n\t\t\t\t*/\n\t\t\t\t$this->Session->delete(\"OrderingsDetail.\".$id);\n\t\t\t\tunset($session_read[$id]);\n\t\t\t}\n\t\t\tif($ac == 'alldel'){\n\t\t\t\t$this->Session->delete(\"OrderingsDetail\");\n\t\t\t\t$session_read = array();\n\t\t\t}\n\t\t\tif($ac == 'spesial' or $ac == 'basic' or $ac == 'custom' or $ac == 'repair' or $ac == 'other' or $ac == 'return'){\n\t\t\t\t$Ordering = array();\n\t\t\t\t$OrderingsDetail = array();\n\t\t\t\tforeach($session_read as $key=>$value){\n\t\t\t\t\t$Ordering = array();\n\t\t\t\t\t$OrderingsDetail = array();\n\t\t\t\t\tif($ac == 'other') $orderings_type = 99;\n\t\t\t\t\tif($ac == 'return') $orderings_type = 90;//\n\t\t\t\t\tif($ac == 'repair') $orderings_type = 4;\n\t\t\t\t\tif($ac == 'spesial') $orderings_type = 3;\n\t\t\t\t\tif($ac == 'basic') $orderings_type = 2;\n\t\t\t\t\tif($ac == 'custom') $orderings_type = 1;\n\t\t\t\t\t$params = array(\n\t\t\t\t\t\t'conditions'=>array('and'=>array(\n\t\t\t\t\t\t\t'Ordering.factory_id'=>$value['Factory']['id'],\n\t\t\t\t\t\t\t'Ordering.ordering_status'=>1,\n\t\t\t\t\t\t\t'Ordering.orderings_type'=>$orderings_type,\n\t\t\t\t\t\t)),\n\t\t\t\t\t\t'recursive'=>0\n\t\t\t\t\t);\n\t\t\t\t\t$Ordering = $this->Ordering->find('first' ,$params);\n\t\t\t\t\tif($Ordering == false){\n\t\t\t\t\t\t$Ordering['Ordering']['ordering_status'] = 1;\n\t\t\t\t\t\t$Ordering['Ordering']['factory_id'] = $value['Factory']['id'];\n\t\t\t\t\t\t$Ordering['Ordering']['created_user'] = $this->Auth->user('id');\n\t\t\t\t\t\t$Ordering['Ordering']['orderings_type'] = $orderings_type;\n\t\t\t\t\t\t$this->Ordering->save($Ordering);\n\t\t\t\t\t\t$Ordering['Ordering']['id'] = $this->Ordering->getInsertID();\n\t\t\t\t\t\t$this->Ordering->id = null;\n\t\t\t\t\t}\n\t\t\t\t\tif($orderings_type == 90){//返品の場合はとりあえず数量をマイナスに、遷移先のviewで確定されたら在庫チェック後在庫を減らす\n\t\t\t\t\t\t$value['Subitem']['quantity'] = '-'.$value['Subitem']['quantity'];\n\t\t\t\t\t}\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['ordering_id'] = $Ordering['Ordering']['id'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['subitem_id'] = $value['Subitem']['id'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['item_id'] = $value['Item']['id'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['major_size'] = $value['Subitem']['major_size'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['minority_size'] = $value['Subitem']['minority_size'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['depot'] = $value['Depot']['id'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['specified_date'] = $value['specified_date'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['order_id'] = $value['order_id'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['bid'] = $value['Subitem']['cost'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['ordering_quantity'] = $value['Subitem']['quantity'];\n\t\t\t\t\t$OrderingsDetail['OrderingsDetail']['created_user'] = $this->Auth->user('id');\n\t\t\t\t\t$this->OrderingsDetail->save($OrderingsDetail);\n\t\t\t\t\t$this->OrderingsDetail->id = null;\n\t\t\t\t}\n\t\t\t\t$this->Session->delete(\"OrderingsDetail\");\n\t\t\t\t$this->redirect(array('controller'=>'orderings', 'action'=>'index'));\n\t\t\t}\n\t\t\tforeach($session_read as $key=>$value){\n\t\t\t\t//単品管理の場合は、子品番の変わりにJANコードを入れる\n\t\t\t\tif($value['Item']['stock_code'] == '3'){\n\t\t\t\t\t$key = $value['Subitem']['jan'];\n\t\t\t\t}else{\n\t\t\t\t\t$key = $value['Subitem']['name'];\n\t\t\t\t}\n\t\t\t\t/* 5/12修正\n\t\t\t\tif($ac == 'del'){\n\t\t\t\t\tif($del_subitem['Subitem']['name'] == $key){\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$total_jo = $total_jo + $value['Item']['sub_total_jo'];\n\t\t\t\t\t\t$total_ge = $total_ge + $value['Item']['sub_total_ge'];\n\t\t\t\t\t\t$total_quantity = $total_quantity + $value['Subitem']['quantity'];\n\t\t\t\t\t\t$details[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$total_jo = $total_jo + $value['Item']['sub_total_jo'];\n\t\t\t\t\t$total_ge = $total_ge + $value['Item']['sub_total_ge'];\n\t\t\t\t\t$total_quantity = $total_quantity + $value['Subitem']['quantity'];\n\t\t\t\t\t$details[$key] = $value;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$total_jo = $total_jo + $value['Item']['sub_total_jo'];\n\t\t\t\t$total_ge = $total_ge + $value['Item']['sub_total_ge'];\n\t\t\t\t$total_quantity = $total_quantity + $value['Subitem']['quantity'];\n\t\t\t\t$details[$key] = $value;\n\t\t\t}\n\t\t\t$detailTotal['jo'] = $total_jo;\n\t\t\t$detailTotal['ge'] = $total_ge;\n\t\t\t$detailTotal['quantity'] = $total_quantity;\n\t\t\t$this->set('detailTotal', $detailTotal);\n\t\t\t$this->set('details', $details);\n\t\t}\n\t}", "title": "" }, { "docid": "5a77a9baf254eccec2937292467c67c0", "score": "0.54512256", "text": "public function AgregarNuevoCliente(){\n\n\t\t\t$tabla = \"clientes\";\n\n\t\t\t$datos = array(\"nombre\"=>$_POST[\"nuevoNombre_C\"],\n\t\t\t\t\t\t \"app\"=>$_POST[\"nuevoApellidoP_C\"],\n\t\t\t\t\t\t \"apm\"=>$_POST[\"nuevoApellidoM_C\"],\n\t\t\t\t\t\t \"correo\"=>$_POST[\"nuevo_Corrreo_C\"],\n\t\t\t\t\t\t \"rfc\"=>$_POST[\"nuevoRFC_C\"],\n\t\t\t\t\t\t \"calle\"=>$_POST[\"nuevoCalle_C\"],\n\t\t\t\t\t\t \"intt\"=>$_POST[\"nuevoInterior_C\"],\n\t\t\t\t\t\t \"ext\"=>$_POST[\"nuevoExterior_C\"],\n\t\t\t\t\t\t \"colonia\"=>$_POST[\"nuevoColonia_C\"],\n\t\t\t\t\t\t \"ciudad\"=>$_POST[\"nuevoCiudad_C\"],\n\t\t\t\t\t\t \"estado\"=>$_POST[\"nuevoEstado_C\"],\n\t\t\t\t\t\t \"codigo\"=>$_POST[\"nuevoPostal_C\"],\n\t\t\t\t\t\t \"tel1\"=>$_POST[\"nuevoNumero1_C\"],\n\t\t\t\t\t\t\t\"tel2\" => $_POST[\"nuevoNumero2_C\"]);\n\t\t\t$respuesta = ModeloClientes::mdlCrearNuevoCliente($tabla, $datos);\n\t\t\t$tabla2 = \"direccion_particular\";\n\n\t\t\t$respuesta2 = ModeloClientes::mdlAgregarNuevoDomicilio($tabla2, $datos,$respuesta[\"id\"]);\n\n\t\t echo json_encode($respuesta2);\n\t\t\t\n\t\t\t\n\n\t}", "title": "" }, { "docid": "4bfc9dd58cf6a52c050db6efae94dd06", "score": "0.54494464", "text": "Function InsertInvoiceOrder($int_orderID)\n{\n global $db_iwex, $employee_id;\n\n $int_invoiceID = FALSE;\n $flt_productcost = 0;\n $flt_vatamount = 0;\n $sql_insert_invoice = \"\";\n $flt_ordercost = 0;\n $flt_productcost = 0;\n $flt_vatamount = 0;\n $query = NULL;\n $int_customerid = FALSE;\n\n $int_invoiceID = GetField(SELECT_INVOICE_ID.$int_orderID);\n // When there is no INVOICE id insert a new one.\n if (!$int_invoiceID)\n {\n\n // Create a query to select the order detail\n $sql_orders = SQL_ORDERS . \"WHERE OrderID = $int_orderID\";\n\n $query = $db_iwex->query($sql_orders);\n\n if (mysql_num_rows($query))\n {\n while ($objshipment = mysql_fetch_object($query))\n {\n $str_shipname = $objshipment->Naam;\n if ($objshipment->attn != \"\")\n {\n $str_shipname .= \"\\nT.a.v. \".$objshipment->attn;\n }\n $str_shipaddress = \"$objshipment->straat $objshipment->huisnummer\";\n $str_shipcity = $objshipment->plaats;\n $str_shipZip = $objshipment->postcode;\n $str_shipcountry = $objshipment->land_naam;\n $int_customerid = $objshipment->ContactID;\n\n $date_shipdate = \"\";\n $int_paymenterm = $objshipment->Paymentterm;\n $str_vat_number = $objshipment->btw_number;\n }\n mysql_free_result($query);\n\n $int_invoice_adres_id = GetInvoiceAdresId($int_customerid);\n\n $qry_inv_adres = $db_iwex->query(\"SELECT * FROM Adressen\n LEFT JOIN country ON land = code \n WHERE AdresID = $int_invoice_adres_id\");\n while ($objshipment = mysql_fetch_object($qry_inv_adres))\n {\n $str_companyname = $objshipment->Naam;\n if ($objshipment->attn != \"\")\n {\n $str_companyname .= \"\\nT.a.v. \".$objshipment->attn;\n }\n $str_address = $objshipment->straat .\" \".$objshipment->huisnummer;\n $str_region = \"\";\n $str_city = $objshipment->plaats;\n $str_zipcode = $objshipment->postcode;\n $str_country = $objshipment->country;\n }\n mysql_free_result($qry_inv_adres);\n\n $sql_inventoryt = \"SELECT\n UnitPrice, Quantity AS UnitsSold, btw_percentage, cost_percentage AS added_cost\n FROM order_details \n WHERE OrderID = $int_orderID\";\n $query_invetory = mysql_query($sql_inventoryt)\n or die(ERROR_INSTER_QUERY . mysql_error());\n\n while ($obj_inventory = mysql_fetch_object($query_invetory))\n {\n $flt_ordercost += $obj_inventory->added_cost * $obj_inventory->UnitsSold; // Added costs\n $flt_productcost += $obj_inventory->UnitPrice*$obj_inventory->UnitsSold;\n $flt_vatamount += ($obj_inventory->added_cost + $obj_inventory->UnitPrice) * $obj_inventory->UnitsSold * $obj_inventory->btw_percentage;\n }\n\n mysql_free_result($query_invetory);\n\n $str_totalexclvat = sprintf(\"%.2f\", $flt_productcost + $flt_ordercost);\n $str_vatamount = sprintf(\"%.2f\", $flt_vatamount);\n\n // When payment term is upfront print within 14 days.\n if ($int_paymenterm == 4) $int_paymenterm = 2;\n\n $sql_insert_invoice = \"INSERT INTO invoices SET\n\t\t\t\t ShipName = '$str_shipname',\n\t\t\t\t ShipAddress = '$str_shipaddress',\n\t\t\t\t ShipCity = '$str_shipcity',\n\t\t\t\t ShipPostalCode = '$str_shipZip',\n\t\t\t\t ShipCountry = '$str_shipcountry',\n\t\t\t\t CustomerID = $int_customerid,\n EmployeeID = '$employee_id',\n\t\t\t\t companyName = '$str_companyname',\n\t\t\t\t Address = '$str_address',\n\t\t\t\t City = '$str_city',\n\t\t\t\t Region = '$str_region',\n\t\t\t\t PostalCode = '$str_zipcode',\n\t\t\t\t Country = '$str_country',\n\t\t\t\t orderID = $int_orderID,\n\t\t\t\t ShippedDate = '',\n\t\t\t\t Invoice_total = '$str_totalexclvat',\n\t\t\t\t Invoice_BTW = '$str_vatamount',\n paymentterm = $int_paymenterm,\n vat_number = '$str_vat_number',\n\t\t\t\t Invoice_date = CURDATE()\";\n // When the invoice is 0 set it to be paid direct.\n if (($str_totalexclvat + $str_vatamount) == 0)\n {\n $sql_insert_invoice .= \", paid_yn = 1,\n paid_amount = 0,\n paid_date = CURDATE(),\n payment_type = \".PAYMENT_ACCOUNT_ID_SYLVIA;\n }\n\n $qry_insert_invoice = mysql_query($sql_insert_invoice);\n if ($qry_insert_invoice)\n {\n upd_orderstatus($int_orderID);\n $int_invoiceID = GetField(SELECT_INVOICE_ID.$int_orderID);\n } else\n {\n echo \"Insert van de Invoice van order $int_orderID niet gelukt:<br> $sql_insert_invoice <br>error:\". mysql_error();\n }\n } else\n {\n echo \"<b>InsertInvoiceOrder called with an OrderID ($int_orderID) that has no order detail records</b>\";\n return FALSE;\n }\n }\n\n return $int_invoiceID;\n}", "title": "" }, { "docid": "11a93c6b1992e7a846ebf1b5ae888ddd", "score": "0.54460037", "text": "function create(){\n\n return view('admin.reactionist.orders');\n }", "title": "" }, { "docid": "ace3f558357fba71adc544675acdd1ee", "score": "0.5443673", "text": "function as_add_new_payment(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'payment_quantity' => trim($_POST['customers']),\n\t\t\t'payment_date' => trim($_POST['date']),\n\t\t\t'payment_time' => trim($_POST['time']),\n\t\t\t'payment_itemi' => trim($_POST['itemone']),\n\t\t\t'payment_itemii' => trim($_POST['itemtwo']),\n\t\t\t'payment_amount' => trim($_POST['amount']),\n\t\t 'payment_paid' => date('Y-m-d H:i:s'),\n\t\t\t'payment_paidby' => '1',\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_payment', $New_Item_Details ); \n\t}", "title": "" }, { "docid": "f6527e168705482740d78c65968b845f", "score": "0.54341596", "text": "protected function createOrder(Request $request)\n {\n $order = new Order();\n $customer = User::where('id',$request->id)->first();\n $order->customer_id = $request->id;\n $order->item_id = intVal($request->item);\n $order->name = $customer->name;\n $order->email = $customer->email;\n $order->type = $request->type;\n if($request->type==\"wallet\"){\n $wallet = Wallet::where('customer_id',$request->id)->first();\n if(floatVal($wallet->balance)<floatVal($request->total)){\n $response['message'] = \"Not enough money in your wallet, please select alternate option\";\n $response['status'] = \"Error\";\n return $response;\n }\n else{\n $walletBal = floatVal($wallet->balance)-floatVal($request->total);\n $wallet->balance = $walletBal;\n $wallet->save();\n }\n }\n $order->quantity = $request->quantity;\n $order->total = $request->total;\n $order->status = false;\n $order->save();\n\n $response['message'] = \"Order request sent successfully.\";\n $response['status'] = \"Success\";\n return $response;\n }", "title": "" }, { "docid": "7aa6e2c8493b16ade5a12be8d7d585d9", "score": "0.54336524", "text": "public function newAction(Request $request)\n {\n $translator = $this->get('translator');\n $order = new Order();\n $form = $this->createForm('AppBundle\\Form\\OrderType', $order);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n \n $total = 0;\n \n foreach($form->get('products')->getData() as $product) {\n $total += $product->getPrice();\n }\n \n $order->setTotal($total);\n \n $em->persist($order);\n $em->flush();\n\n return new JsonResponse([$translator->trans('order.created')], 200);\n }\n \n $errors = $this->getErrorMessages($form);\n\n return new JsonResponse($errors, 500);\n }", "title": "" }, { "docid": "0a92e30401e5d75a36d062be386cc458", "score": "0.54320496", "text": "public function getAdd(Request $request)\n {\n $orderId=$request->id;\n \treturn view(\"admin.tourer.add\",[\n 'orderId'=>$orderId\n \t\t]);\n }", "title": "" }, { "docid": "7f1ed07d90ed88e72021325a010e6c51", "score": "0.5427654", "text": "public function store(Request $request)\n {\n $request->validate([\n 'table_id' => 'required'\n ]);\n $invoice = new Invoice();\n // $invoice->staff_id = $request->user()->id;\n $invoice->table_id = $request->table_id;\n $invoice->date = Carbon::now();\n $invoice->is_paid = false;\n $invoice->check_in = Carbon::now();\n $invoice->save();\n $i=1;\n foreach($request->listOrder as $order){\n $invoice->dishes()->attach($order['dish']['id'],[\n 'numerical_order' => $i++,\n 'amount' => $order['amount'],\n 'price' => $order['dish']['price'],\n ]);\n }\n return response()->json($invoice);\n }", "title": "" }, { "docid": "9f6db04f8a74b1e9effb2179aa9fe0ef", "score": "0.5423756", "text": "public function postAddOrder(Request $request)\n {\n try {\n $order = array(\n 'order_number' => $request->get('order_number'),\n 'order_slug' => slug($request->get('order_number')),\n 'conf_date' => $request->get('conf_date'),\n 'description' => $request->get('description'),\n 'user_id' => $request->get('user_id'),\n \n );\n \n $rules = [\n 'order_number' => 'required|unique:orders',\n 'conf_date' => 'required',\n 'user_id' => 'required|exists:users,id',\n ];\n \n $order_id = $request->get('order_id');\n if ($order_id) {\n $rules['order_number'] = 'required|unique:orders,id,'. $order_id;\n }\n \n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)\n ->withInput();\n }\n\n $result = ($order_id) ? Order::whereId($order_id)->update($order) \n : Order::create($order);\n\n } catch (\\Exception $ex) {\n Log::error('Error in ' .__METHOD__ .' Error is: '. $ex->getMessage() . '\\n');\n }\n\n return redirect()->route('admin.orders');\n }", "title": "" }, { "docid": "4e262842e6904699cd853c8c9c18f9e7", "score": "0.54237014", "text": "public function C_AddClient(Request $request){\n\n $check = Validator::make($request->all(), ['Name' => 'required']);\n\n // If request detail incomplete:\n if($check->fails()){\n\n if(!($request->has('Name'))){\n return response()->json(['status'=>'Please insert Name'], 403);\n }\n\n }else{\n\n $client = new Client();\n $post = $request->all();\n\n //remove csrf token\n if(array_key_exists('_token', $post)){\n unset($post['_token']);\n }\n\n if($client->addClient($post)){\n return response()->json(['status'=>'success'], 201);\n }else{\n return response()->json(['status'=>'Failed to add client'], 404);\n }\n\n }\n }", "title": "" }, { "docid": "c6f26826af51fd40b28f3986f147be2c", "score": "0.54233825", "text": "public function store(Request $request, $id)\n { \n if($request->ajax()){\n $cliente = tramite_documento::consult($id);//se optiene la respuesta del modelo tramite_documento\n return response()->json($cliente); \n }\n}", "title": "" }, { "docid": "cfec63867da42dda1258cf756465d7ae", "score": "0.5423248", "text": "function _insertInvoice(){\n\t\t//insert into invoices_list table\n\t\t$this->insert_id = $this->InvoiceModel->insertInvoice($this->invoice_data);\n\t\tif(!empty($this->insert_id)){\t\t\t\n\t\t\t//to add invoice_id into invoice_items_details array\n\t\t\t$array = range(0,$this->invoice_data['invoice_no'] - 1);\n\t\t\tarray_walk($array, function ($value){\t\t\t\t\n\t\t\t\t$this->invoice_data['invoice_items'][$value]['invoice_id'] = $this->insert_id;\n\t\t\t});\n\t\t\t//insert into invoice items \n\t\t\tif($this->InvoiceModel->insertInvoiceItems($this->invoice_data['invoice_items']) == true){\n\t\t\t\t$this->session->set_flashdata('info_message', $this->invoice_sucess_messages['insert']);\n\t\t\t\tredirect('/');\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('info_message', $this->invoice_fail_messages['insert']);\n\t\t\t\tredirect('/');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->session->set_flashdata('info_message', $this->invoice_fail_messages['insert']);\n\t\t\tredirect('/');\n\t\t}\n\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "26e5fedb1bf5c141b3383310444a0286", "score": "0.54224193", "text": "public function actionCreate()\n {\n $model = new Orders;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Orders']))\n {\n $model->attributes = $_POST['Orders'];\n $model->order_createtime = date('Y-m-d H:i:s', time());\n $model->order_dinnertime = date('Y-m-d H:i:s', time());\n\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->order_id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "c42e5cecf39478231d8ae2c26fbfb649", "score": "0.54185927", "text": "public function add_client_restaurant_page(){\n\t\t$data['form_name']= 'Add Restaurant';\n\t\t$data['title']= 'SmartSend::Add Restaurant';\n\t\t$data['client_type']= 'restaurant';\n\t\t$this->welcome_to_add_client_page($data);\n\t}", "title": "" }, { "docid": "270530243feaa0d797d7f25a95dbb460", "score": "0.5417982", "text": "public function orderAction(){\n\t\t\t$this->check_access_token();\n\t\t\t$params = $this->getRequest()->getParams();\n\t\t\t$salesModel=Mage::getModel(\"sales/order\");\n\t\t\t$salesCollection = $salesModel->getCollection();\n\t\t\tif (isset($params['from'])) {\n\t\t\t\tif ($this->validateDate($params['from'])){\n\t\t\t\t\t$salesCollection->addFieldToFilter('created_at', array('gteq' => date(\"Y-m-d H:i:s\", strtotime($params['from']))));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//wrong date format\n\t\t\t\t\t$this->helper->buildJson(null,false,\"ERROR: FROM date format is invalid.\");die();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tif (isset($params['to'])) {\n\t\t\t\tif ($this->validateDate($params['to'])){\n\t\t\t\t\t$salesCollection->addFieldToFilter('created_at', array('lteq' => date(\"Y-m-d H:i:s\", strtotime($params['to']))));\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//wrong date format\n\t\t\t\t\t$this->helper->buildJson(null,false,\"ERROR: TO date format is invalid.\");die();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$salesArray = array('num_of_order' => sizeof($salesCollection));\n\t\t\t$this->helper->buildJson($salesArray);\n\t\t}", "title": "" }, { "docid": "82bd3714bbd08e7004e974aa95c80e92", "score": "0.5417684", "text": "public function addAction(Request $request, $id = null)\n {\n $em = $this->getDoctrine()->getManager();\n $_editMod = 0;\n\n $translator = $this->get('translator');\n if(isset($id)) { // Edition\n $c = $em->getRepository('FacnoteBundle:Client')->find($id);\n if(!$c) {\n throw $this->createNotFoundException($translator->trans('Client non trouvé'));\n }\n $_editMod = 1;\n } else {\n $c = new client();\n }\n $form = $this->createForm('FacnoteBundle\\Form\\ClientType', $c);\n\n if($request->isMethod('POST')) {\n $form->handleRequest($request);\n if($form->isValid()) {\n $em->persist($c);\n $em->flush();\n $flashMsg = $translator->trans('lbl.success.operation');\n $this->get('session')->getFlashBag()->add('flashMessage', $flashMsg);\n return $this->redirect($this->generateUrl('client_index'));\n }\n }\n\n return $this->render('@Facnote/client/form.html.twig', array(\n 'editMod' => $_editMod,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "4ce0c66048619ad6841a5c6e29c09d12", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n if(!empty($id) && isset($request))\n {\n $result = DB::table('categories')->where('id', '=', $id)->update([\n 'name' =>$request->name,\n 'type'=>$request->type\n ]);\n\n if($result)\n {\n \\Session::flash('key', ['class'=>'success','message'=>'Congratulations! Category Item Updated Successfully']);\n return redirect()->route('category.show');\n }\n }\n }", "title": "" } ]
[ { "docid": "b4e3ef83b1a29ff10f6ec4e5a5ce3acd", "score": "0.6514011", "text": "public function update(Resource $resource, ResourceRequest $request)\n {\n $resource->update($request->only('name'));\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "4e0f4f227895ae1ef285ecc22e5eb729", "score": "0.64828545", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was updated');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "1d58cc0ac499a6369b9847fb37dc69a6", "score": "0.64815474", "text": "public function updateResource($resource, $id, array $data = []) {\n $result = $this->put($resource . '/' . $id, $data);\n return reset($result);\n }", "title": "" }, { "docid": "dc93534b04eb8b81463653bc1fe9b4b9", "score": "0.62065244", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $resource->update($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was updated');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.61879224", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "85d21a332b71fa821f58587ae26611d6", "score": "0.6061138", "text": "public function update(Request $request)\n {\n $validatedData = $request->validate([\n 'resource_name' => 'required',\n 'hourly_rate' => 'required|numeric',\n ]);\n\n $resource = Resource::find($request->id);\n\n $resource->resource_name = $request->resource_name;\n $resource->hourly_rate = $request->hourly_rate;\n \n if ($resource->save()) {\n $request->Session()->flash('alert-success', 'resources details updated was successful!');\n return redirect('admin/index-resource');\n } else {\n $request->Session()->flash('alert-error', 'resources details updated was failed!');\n }\n }", "title": "" }, { "docid": "a44cde5599b432199ba53bd6e695fbcc", "score": "0.6049354", "text": "public function update(Request $request, $resource)\n { \n $this->form()->setModel($resource)->save(function() {});\n \n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "f73d66d218eef0be3b8199b19c37b26f", "score": "0.6045824", "text": "public function updateStream($path, $resource, Config $config)\n {\n $options = $config->get('options',[]);\n return $this->client->putObjectFromString($this->bucket,$path,$resource,$options);\n }", "title": "" }, { "docid": "a6e3d6ef1ecb867e394cc699e1165c81", "score": "0.60228753", "text": "public function update(SeriesRequest $request, Series $series)\n {\n //\n $this->authorize('author',$series);\n\n $series->update($request->all());\n\n if ($request->file('file')) {\n\n # code...\n $url = Storage::put('series',$request->file('file'));\n \n\n if ($series->image) {\n # code...\n Storage::delete($series->image->url);\n\n $series->image->update([\n\n 'url' => $url\n ]);\n } else{\n $series->image()->create([\n\n 'url' => $url\n ]);\n \n \n\n }\n\n}\n\nreturn redirect()->route('admin.series.edit', $series)->with('info','La serie se actualizo con éxito');\n}", "title": "" }, { "docid": "e0919a7b4ca0ee93949e8600cb6418f4", "score": "0.60216665", "text": "public function resourceUpdate($new = TRUE, $resource = NULL) {\n if (!$resource) {\n $resource = $this->resource;\n }\n\n $path = FALSE;\n $file = '';\n\n if (isset($resource['public_id'])) {\n $file = $resource['public_id'];\n $path = dirname($file);\n\n // Append file format into filename.\n if (!empty($resource['format'])) {\n $file .= '.' . $resource['format'];\n }\n\n $file = pathinfo($file, PATHINFO_BASENAME);\n\n if ($new) {\n $this->save($resource);\n }\n else {\n if ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FOLDER) {\n $this->deleteFolder($resource['public_id']);\n }\n elseif ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FILE) {\n $this->delete($resource['public_id']);\n }\n }\n }\n\n return array($path, $file);\n }", "title": "" }, { "docid": "ff76cc80d913540a356897bd9e7edf87", "score": "0.59819067", "text": "public function update(User $userAuthenticated, User $userResource)\n {\n //\n }", "title": "" }, { "docid": "748b4a954d0155bebbd137382c5201a0", "score": "0.5963811", "text": "public function update($id, CreateResourceRequest $request, Guard $auth)\n\t{ \n\t\t$resource = Resource::findOrFail($id);\n\t\t$user = $auth->user();\n\n\t\t$resource->name \t\t= $request->input('name');\n\t\t$resource->description \t= $request->input('description');\n\t\t$resource->type \t\t= $request->input('type');\n\t\t$resource->user_id \t\t= $user->id;\n\t\t$resource->signature_id = $request->input('signature');\n\t\t$resource->teacher_id \t= $request->input('teacher');\n\n\t\t$resource->save();\n\n\t\tif ( $request->hasFile('file') && $request->file('file')->isValid() ){\n\t\t\t$file = $request->file('file');\n\t\t\t$file_name = $resource->id . '_' . $user->id . '.' . $file->getClientOriginalExtension();\n\t\t\t\n\t\t\t$file->move($this->DESTINATION_PATH, $file_name);\n\n\t\t\t$resource->path = $file_name;\n\n\t\t\t$resource->save();\n\t\t}\n\n\t\t$this->log($resource, $auth->user(), 'update');\n\n\t\treturn redirect()->back();\n\t}", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.59250635", "text": "public function save($resource);", "title": "" }, { "docid": "7003560e3a9d31cfca396c50aa6ff75e", "score": "0.5862238", "text": "public function update(Request $request, $id)\n {\n //\n $resource = Resource::find($id);\n\n $resource->name = $request->resource_name;\n $resource->link = $request->resource_link;\n\n $resource->save();\n\n return [\"message\"=>\"Data updated\",\"status\"=>true];\n }", "title": "" }, { "docid": "ee8cdd9d7a907937ce79086e18097a3b", "score": "0.5857709", "text": "public function update(CompanyStorageRequest $request, $id)\n {\n return $this->save($request,$id); \n }", "title": "" }, { "docid": "bd52066336af51a1e0e57bbecc86f7ec", "score": "0.5847582", "text": "public function update(RequeteStoreRequest $request, $id)\n {\n$Requete=Requete::get()->where('id',$id)->first();\n if($Requete->update($request->toArray())) {\n return new RequeteResource($Requete);\n }\n }", "title": "" }, { "docid": "28c24d6c09bf3e40d09f31610f428cd7", "score": "0.5830984", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'ir_name' => 'required',\n 'ir_resource_type' => 'required',\n 'ir_subject' => 'required',\n 'ir_file' => ''\n ]);\n\n $refInstructional = InstructionalResource::find($id)->src_path;\n\n if (isset($request->ir_file)) {\n $newFileName = time() . '-' . str_replace(' ', '-', $request->ir_name) . '.' . $request->ir_file->extension();\n\n //store new file\n $request->file('ir_file')->storeAs('public', $newFileName);\n //delete old file\n if (Storage::disk('public')->exists($refInstructional)) {\n Storage::delete('public/' . $refInstructional);\n }\n } else {\n $newFileName = $refInstructional;\n }\n\n if (InstructionalResource::where('id', $id)\n ->update([\n 'name' => $request->ir_name,\n 'src_path' => $newFileName,\n 'user_id' => auth()->user()->id,\n 'resource_type_id' => $request->ir_resource_type,\n 'subject_id' => $request->ir_subject\n ])\n ) {\n $request->session()->flash('status', 'Task was successful!');\n }\n\n return back();\n }", "title": "" }, { "docid": "e67250003befec77cf9e6350d869f4c6", "score": "0.582003", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'cat' => 'required',\n 'image' => 'image',\n ]);\n $update = Product::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n $update->link = $request->link; \n $update->category_id = $request->cat; \n if($request->hasFile('image')){\n Storage::delete('products/'.$request->oldimage); \n $file = $request->image->store('products/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('product.index')->with('success','product updated');\n }", "title": "" }, { "docid": "ebf6708cd5a6c4cd7cc8acdfd9f26c08", "score": "0.5802846", "text": "public function update(Request $request, Product $product)\n {\n \\Storage::delete($product->image);\n $path=$request->file('image')->store('product');\n $params=$request->all();\n $params['image']=$path;\n $product->update($params);;\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "3e27d59acc6129f2d7e02abe1e9bdeb3", "score": "0.5782392", "text": "public function updateNote(NoteRequest $request, $resource)\n {\n $request->save($resource);\n }", "title": "" }, { "docid": "d29fc82b57f01c3fbe6bb99a3be246e9", "score": "0.577169", "text": "public function putAction()\n\t{\n\t\t// get account\r\n\t\t$account = $this->getActiveAccount();\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57518756", "text": "public function update($entity);", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5748858", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747582", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747582", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "794e05bd3692d966cd063aa2041fc336", "score": "0.5739305", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.5736318", "text": "public function setResource($resource);", "title": "" }, { "docid": "8ca0679ea794f66a39eaf0ff1d531d9c", "score": "0.5723916", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(202);\n }", "title": "" }, { "docid": "b743d37c52d097cc14915bd0a16b770e", "score": "0.5723849", "text": "public function update_put() {\n\n }", "title": "" }, { "docid": "424bc30e7bfe2058299766d4dae981b9", "score": "0.57148814", "text": "public function setResource(Resource $resource)\n {\n $this->resource = $resource;\n $this->isResourceModified = true;\n $this->stopPropagation();\n }", "title": "" }, { "docid": "148c03384f2be8de6650d8fb7868c9e0", "score": "0.5700414", "text": "public function update(Request $request, $id)\n {\n \n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'image' => 'image|dimensions:min_width=800,max_width=1920',\n ]);\n $update = Slide::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n if($request->hasFile('image')){\n Storage::delete('slides/'.$request->oldimage); \n $file = $request->image->store('slides/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('slide.index')->with('success','slide updated');\n }", "title": "" }, { "docid": "f3207026fe10a78c71deeca618c87d18", "score": "0.5699796", "text": "public function update(Request $request, $id) : StudentResource\n {\n $student = Student::find($id);\n $student->first_name = $request->first_name;\n $student->last_name = $request->last_name;\n $student->gender = $request->gender;\n $student->phone = $request->phone;\n $student->class = $request->class;\n $student->country = $request->country;\n\n\n if ($request->image) {\n \n if (empty($student->image)) {\n $image_path = public_path(). '/images/students/' .$student->image;\n unlink($image_path);\n\n // here we check if the studet image is not null unlick the image \n // from the folder else skip and update new image\n }\n }\n // here is the image part okay\n\n if ($request->hasFile('image')) {\n \n $file = $request->file('image');\n $file->move(public_path(). '/images/students', $file->getClientOriginalName());\n\n $student->image = $file->getClientOriginalName();\n }\n\n $student->save();\n return new StudentResource($student);\n }", "title": "" }, { "docid": "9e5c6816a1cdb070e1c6800898771f34", "score": "0.5693974", "text": "public function updateStream($path, $resource, array $config = [])\n {\n list($prefix, $path) = $this->getPrefixAndPath($path);\n\n return $this->getFilesystem($prefix)->updateStream($path, $resource, $config);\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.56914335", "text": "public function update($object);", "title": "" }, { "docid": "df12e12fb31bd67805101fd587a91508", "score": "0.56883985", "text": "public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'prev_image' => 'required|string',\n ]);\n // dd($request->all());\n\n if ($request->hasfile('image')) {\n $i = Storage::disk('public')->put('sliders', $request->image[0]);\n Storage::delete('/public/' . $request->prev_image);\n } else {\n $i = $request->prev_image;\n }\n $store = Slider::find($id);\n $store->title = $request->title;\n $store->link = $request->link;\n $store->link_name = $request->link_name;\n $store->description = $request->description;\n $store->image = $i;\n $store->update();\n if ($store) {\n return redirect()->back()->with('success', 'Slider Updated Successfully !!');\n } else {\n return redirect()->back()->with('error', 'Failed to Update !!');\n }\n\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.56745124", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.56745124", "text": "public function update($data);", "title": "" }, { "docid": "fcdf6c196ac99617a3c5a5718a18f7e9", "score": "0.5660249", "text": "public function update(Request $request, $id)\n {\n $rules = [\n 'name' => 'required|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'image'\n ];\n\n $request->validate($rules);\n\n // $product = \\App\\Product::find($id);\n\n // if ($request->hasFile('photo_url')){\n // $newPath = $request->file('photo_url')->store('public/products');\n\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = $newPath;\n // }\n//\n // if ($request->input('delete_photo') == true){\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = null;\n // }\n\n // $product->name = $request->input('name');\n // $product->price = $request->input('price');\n // $product->save();\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('photo_url')){\n $newPath = $request->file('photo_url')->store('public/products');\n\n Storage::delete($product->photo_url);\n\n $product->photo_url = $newPath;\n }\n\n if ($request->input('delete_photo') == true){\n Storage::delete($product->photo_url);\n\n $product->photo_url = null;\n }\n\n $product->fill($request->all());\n\n $product->save();\n\n return redirect('products');\n }", "title": "" }, { "docid": "689842d3aad9dcb88b75b155c54181eb", "score": "0.5647265", "text": "public function updateStream($path, $resource, Config $config)\n {\n if ( ! $this->has($path)){\n return false;\n } else {\n return $this->write($path, $resource, $config);\n } \n }", "title": "" }, { "docid": "fbd22036cd27458692009f909599ca04", "score": "0.56336755", "text": "public function update(Request $request, $id)\n {\n //dd($request);\n $product = new Product();\n $product_updated = $product->validateRequest($request)->store($id);\n\n if ($product_updated) {\n if ($request->has('blocks')) {\n ProductBlock::store($request, $product_updated['id']);\n }\n\n $product_updated->storeImages($request);\n\n if ($request->hasFile('file')) {\n $filepath = Photo::imageUpload($request->file('file'), $product_updated, 'pdf', 'pdf');\n\n Product::updateFilePath($product_updated, $filepath);\n }\n\n return redirect()->back()->with(['success' => 'Proizvod je uspješno snimljen.!']);\n }\n\n return redirect()->back()->with(['error' => 'Whoops..! Došlo je do greške sa snimanjem proizvoda.']);\n }", "title": "" }, { "docid": "00b2a6a53c34699e9c9f5020017ef232", "score": "0.562304", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::findorfail($id);\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n\n $resource->save();\n\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.5608646", "text": "public function update(){}", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.56080484", "text": "public function update(){}", "title": "" }, { "docid": "8ceb4c9e42d44542ef7be0dc09286ad0", "score": "0.5604469", "text": "public function update(Request $request, $id){\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');//meto los datos que hay en el array de recursos\n if(isset($resources[$id])) {//si existe ese id en el array de recursos\n $resource = $resources[$id];//cojo el id que esta en el array de recursos\n $idInput = $id;//en la variable idInput mete el id que hay(el que ponemos nosotros por defecto)\n $nameInput = $request->input('name');//en la variable nameInput meto el valor que estoy escribiendo en el input del name\n $prieceInput = $request->input('priece');//en la variable prieceInput meto el valor que estoy escribiendo en el input del price\n $resource['id'] = $idInput;//meto en el recurso del id el valor del idInput\n $resource['name'] = $nameInput;//meto en el recurso del name el valor del nameInput\n $resource['priece'] = $prieceInput;//meto en el recurso del precio el valor del prieceInput\n $resources[$idInput] = $resource;//mete el nuevo id en el array de recurso\n $request->session()->put('resources', $resources);\n return redirect('resource')->with('message', 'Se ha editado el elemento correctamente');\n }\n }\n return back()->withInput();//te lleva a la pantalla del index\n }", "title": "" }, { "docid": "fc59c0e54a38762a43464491404f10d3", "score": "0.5598566", "text": "function startPut($resource, $id, array $data);", "title": "" }, { "docid": "c0db760cd21841392ea5c5ef4b2148cc", "score": "0.559374", "text": "public function update(Request $request, $id)\n {\n $datos=request()->except('_token','_method');\n\n if($request->hasFile('imagen')){\n $dato=productos::findOrFail($id);\n Storage::delete('public/'.$dato->imagen);\n $datos['imagen']=$request->file('imagen')->store('uploads','public');\n }\n\n\n\n productos::where('id','=',$id)->update($datos);\n return redirect('productos');\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55825645", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55825645", "text": "public function update($request, $id);", "title": "" }, { "docid": "dffb1371124c6ce8693c2368a83f9606", "score": "0.5577572", "text": "public function update($param = array()) {\n $tail = '/' . $this->getUrlTail() . '/' . $this->getId();\n\n $url = $this->getService()->getUrl($tail);\n return $this->getClient()->put($url, $param);\n }", "title": "" }, { "docid": "8a53b6bc58310fb381219eebcf9b209d", "score": "0.5568937", "text": "public function update(Request $request, $id)\n {\n $product = new Product;\n\n $productData['name'] = $request->name;\n $productData['slug'] = str_slug($request->name);\n $productData['cpu'] = $request->cpu;\n $productData['ram'] = $request->ram;\n $productData['storage'] = $request->storage;\n $productData['display'] = $request->display;\n $productData['vga'] = $request->vga;\n $productData['battery'] = $request->battery;\n $productData['weight'] = $request->weight;\n $productData['material'] = $request->material;\n $productData['kind'] = $request->kind;\n $productData['condition'] = $request->condition;\n $productData['price'] = $request->price;\n $productData['promotion'] = $request->promotion;\n $productData['status'] = $request->status;\n $productData['featured'] = $request->featured;\n $productData['warranty'] = $request->warranty;\n $productData['description'] = $request->description;\n $productData['category'] = $request->category;\n if ($request->hasFile('img')) {\n $img = $request->img->getClientOriginalName();\n $productData['img'] = $img;\n $request->img->storeAs('./public/img', $img);\n }\n\n $product::where('product_id', $id)->update($productData);\n\n return redirect('admin/product');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.5568173", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a86060f0afd44ec384ed886d347caa73", "score": "0.55679923", "text": "abstract protected function save($resource);", "title": "" }, { "docid": "6696001dcc15e351e03c08acc8b2bcd9", "score": "0.5565031", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->has('file')) {\n $this->removeImage(FileConstant::PRODUCTS_IMAGES, $product->image_id);\n $image = GenericController::saveImage($request, 'file', FileConstant::PRODUCTS_IMAGES);\n $product->image_id = $image->id ?? null;\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->ingredient = $request->ingredient;\n $product->product_code = $request->product_code;\n $product->save();\n $product->tags()->detach();\n $product->tags()->attach($request->tags);\n return redirect()->route('manage_store')->with('success_message', 'Product successfully update.');\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "3e1652dc1efabe740a60dc879dc15b5a", "score": "0.5559118", "text": "public function update($id)\n\t{\n\t\t$this->resource->avatar = strlen(Input::get('_delete')) ? : STAPLER_NULL ; \n\t\tif ($this->resource->store(Input::all())) {\n\t return $this->respondTo(\n\t \tarray(\n\t \t\t'html' => function()\n\t \t\t\t\t {\n\t \t\t\t\t \treturn Redirect::route('admin.profiles.show', ['users' => $this->resource->id])\n\t \t\t\t\t->with('notice', 'Profile updated');\n\t \t\t\t\t }, \n\t \t\t'js' => function()\n\t \t\t\t\t{\n\t \t\t\t\t\treturn $this->resource;\n\t \t\t\t\t}\n\t \t\t)\n\t \t);\n\t }\n\t else {\n\t \treturn $this->respondTo(\n\t \t\tarray(\n\t \t\t\t'html' => function()\n\t \t\t\t\t\t {\n\t \t\t\t\t\t \treturn Redirect::action('admin\\Profiles@edit', ['user' => $this->resource])\n\t\t\t\t ->withInput(Input::all())\n\t\t\t\t ->withErrors($this->resource->errors());\n\t \t\t\t\t\t },\n\t \t\t\t'js' => function()\n\t \t\t\t{\n\t \t\t\t\treturn $this->resource->errors();\t\n\t \t\t\t},\n\t \t'status' => 422\n\t \t\t\t)\n\t \t\t);\n\t } \n\t}", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.5555397", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "6fd81565fe0197d15ae9c289b0ce5a96", "score": "0.5543478", "text": "public function updateResourceDimensions();", "title": "" }, { "docid": "b518a7b9f54c3cdcab6b1c0bdd364908", "score": "0.5539432", "text": "public function update(Request $request, $id)\n {\n $data=$this->validate($request,[\n 'icon'=>'required',\n 'main_title'=>'required',\n 'title'=>'required',\n 'description'=>'required',\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n unlink(\"/storage/$path\");\n $path=$request->file('thumbnail')->store('Thumbnail');\n $data['thumbnail']=$path;\n }\n \n ChooseUs::where('id',$id)->update($data);\n return redirect()->route('listChooseUs');\n\n }", "title": "" }, { "docid": "8c1b71d7fe33d5951e76205cc098ab6f", "score": "0.5536773", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeObject($path, $resource, $config);\n }", "title": "" }, { "docid": "f876ddfae189152894b680ec80767669", "score": "0.55353165", "text": "public function update(Request $request)\n {\n //\n //dd($request->all());\n\n $id = $request->input('eid');\n $name = $request->input('ename');\n $quantity = $request->input('equantity');\n $price = $request->input('eprice');\n $date = date(\"Y-m-d H:i:s\");\n\n //reading all products from file\n $products = Storage::disk('local')->get('public/products.json');\n $products = json_decode($products, true);\n\n //$id = count($products) + 1;\n //saving new producto in memory\n for ($i=0; $i < count($products); $i++) { \n if($products[$i]['id'] == $id){\n $products[$i] = [\n 'id' => $id\n ,'name' => $name\n , 'quantity' => $quantity\n , 'price' => $price\n , 'date' => $date\n ];\n }\n }\n \n\n Storage::put('public/products.json', json_encode($products));\n // dd($products);\n return redirect('/');\n }", "title": "" }, { "docid": "fd7ccf27b5b1585736a504a174476b51", "score": "0.55268157", "text": "public abstract function update($entity);", "title": "" }, { "docid": "030a7c4a93d5d783d93752dbd039d0a4", "score": "0.5524895", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n $product->fill($request->except('image'));\n\n if($request->offered == 'on'){\n $product->offered = true;\n }\n else{\n $product->offered = false;\n }\n\n if($request->hasFile('image'))\n {\n $image = $product->images->where('position', 1)->first();\n Storage::delete($image->url);\n $product->images()->detach($image);\n $image->delete();\n\n $imageProduct = $this->storeImage($request->file('image'), 1);\n $product->images()->attach($imageProduct);\n }\n\n $product->save();\n\n return redirect()->route('products.updated', $product->store);\n }", "title": "" }, { "docid": "2ed29b085a06b0ff193e001c8b6edc77", "score": "0.55234337", "text": "public function update(Request $request)\n {\n\n\n\n $product = Product::Find($request->pid);\n\n $product->product_name = $request->productName;\n $product->cantidad = $request->cantidad;\n $product->pCompra = $request->pCompra;\n $product->pBase = $request->pBase;\n $product->isr = $request->isr;\n $product->iva = $request->iva;\n $product->pVenta = $request->pVenta;\n $product->utilidad = $request->utilidad;\n\n if( $request->imagenProducto ){\n\n $file = $request->file('imagenProducto');\n $nombre = $file->getClientOriginalName();\n\n Storage::disk('productos')->put( $nombre , File::get($file));\n\n $product->imagen = $file->getClientOriginalName();\n\n $product->save();\n\n return true;\n\n }else{\n\n $product->save();\n\n return true;\n\n }\n\n\n\n }", "title": "" }, { "docid": "57943537b2639b438b8481f3c079a88f", "score": "0.5519305", "text": "public function update(string $resourceId, array $params)\n {\n\n\n $isDefaultFile = $this->isDefaultFile($resourceId);\n $srcPath = $params['src_path'];\n $fileWasProvided = (null !== $srcPath);\n $content = $this->getCommitListContent();\n $userRelPath = $params['user_rel_path'];\n $files = $params['files'];\n\n if (true === $isDefaultFile) {\n $section = \"to_update\";\n } else {\n $section = \"to_add\";\n }\n\n\n $resources = $content[$section];\n if (array_key_exists($resourceId, $resources)) {\n\n /**\n * If the user doesn't provide a file, but the entry exists in the to_update section, this means\n * that the user already used the gui to upload a file previously, and so the entry (in to_update) has been created and files\n * exist already on the vfs, and now the user updates the file again, but this time just the meta-data (i.e. not the file).\n * In that case, we move the old files to the new location (if the name has changed).\n *\n */\n $resource = $resources[$resourceId];\n $this->updateResourceFilePaths($resource, $files, $userRelPath);\n }\n\n\n $this->storeEntry($params, [\n \"resourceId\" => $resourceId,\n \"dry\" => !$fileWasProvided,\n \"section\" => $section,\n ]);\n\n }", "title": "" }, { "docid": "4238630fe835e2630790aa3af70cdd6d", "score": "0.5510922", "text": "public function update($segement);", "title": "" }, { "docid": "6151cf096d056f5c54e0c8112d1f45b1", "score": "0.5504307", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->fill($request->except('image', 'product_categories'));\n $product->is_visible = $request->has('is_visible');\n $product->is_alcoholic = $request->has('is_alcoholic');\n $product->is_visible_when_no_stock = $request->has('is_visible_when_no_stock');\n $product->price = str_replace(',', '.', $request->price);\n\n if ($request->file('image')) {\n $file = new StorageEntry();\n $file->createFromFile($request->file('image'));\n\n $product->image()->associate($file);\n }\n\n $product->account()->associate(Account::findOrFail($request->input('account_id')));\n\n $categories = [];\n if ($request->has('product_categories') && count($request->input('product_categories')) > 0) {\n foreach ($request->input('product_categories') as $category) {\n $category = ProductCategory::find($category);\n if ($category != null) {\n $categories[] = $category->id;\n }\n }\n }\n $product->categories()->sync($categories);\n\n $this->setRanks();\n\n $product->save();\n\n $request->session()->flash('flash_message', 'The product has been updated.');\n\n return Redirect::route('omnomcom::products::edit', ['id' => $product->id]);\n\n }", "title": "" }, { "docid": "d5316b557cb97c988d4dd7ad08ef95bf", "score": "0.5504176", "text": "public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'name'=> 'required',\n 'email'=> 'required',\n 'phone'=> 'required',\n 'address'=> 'required',\n 'type'=> 'required',\n 'photo'=> 'nullable',\n 'shop'=> 'required',\n 'account_number'=> 'nullable',\n 'bank_name'=> 'nullable',\n ]);\n\n $supplier = Supplier::find($id);\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->type = $request->type;\n $supplier->shop = $request->shop;\n $supplier->account_number = $request->account_number;\n $supplier->bank_name = $request->bank_name;\n\n if($request->hasFile('photo') ){\n //delete old image first\n if(File::exists('images/supplier/'.$supplier->photo))\n {\n File::delete('images/supplier/'.$supplier->photo);\n }\n $image = $request->file('photo');\n $img = time().'.'. $image->getClientOriginalExtension();\n $location = public_path('images/supplier/'.$img);\n Image::make($image)->save($location);\n $supplier->photo = $img;\n }\n\n $supplier->save();\n\n $notification = array(\n 'message' => 'Successfully Supplier Updated!',\n 'alert-type' => 'success'\n );\n\n return Redirect()->route('supplier.index')->with($notification);\n }", "title": "" }, { "docid": "a58e121b784e418e2b8e2b169e227565", "score": "0.5503382", "text": "public function update(Request $request, $id)\n {\n $update = product::where('id', $id)->first();\n $update->name = $request['name'];\n $update->price = $request['price'];\n $update->stock = $request['stock'];\n $update->size = $request['size'];\n $update->category = $request['category'];\n $update->description = $request['description'];\n\n if($request->file('picture') == \"\")\n {\n $update->picture = $update->picture;\n } \n else\n {\n $file = $request->file('picture');\n $fileName = $file->getClientOriginalName();\n $request->file('picture')->move(\"image/\", $fileName);\n $update->picture = $fileName;\n }\n\n $update->update();\n\n Toast()->success('Edit Success');\n return redirect()->to('/product');\n }", "title": "" }, { "docid": "713a0d373529950deb3cb81f9c35f528", "score": "0.55007476", "text": "public function update(Request $request, $id)\n {\n // On check si la requête valide le schéma de données\n $this->validate($request, [\n 'name' => 'required|string|min:5|max:100',\n 'description' => 'required|string',\n 'price' => 'required|string|min:0|not_in:0',\n 'reference' => 'required|string',\n 'category_id' => 'required|integer',\n 'state' => 'required|in:standard,solde',\n 'sizes' => 'required|array',\n 'sizes.*' => 'integer', // pour vérifier un tableau d'entiers il faut mettre sizes.*\n 'status' => 'required|in:published,unpublished',\n 'title_image' => 'string|nullable', // pour le titre de l'image si il existe\n 'picture' => 'image|max:3000',\n ]);\n\n // On récupère le produit à modifier\n $product = Product::find($id);\n\n $product->update($request->all()); // associé les fillables\n \n // on utilisera la méthode sync pour mettre à jour les tailles dans la table de liaison\n $product->sizes()->sync($request->sizes);\n\n // on check si l'utilisateur entre un nom d'image et on utiliser la méthode update pour mettre à jour le titre de l'image dans la table de liaison\n if (isset($request->name_image)) {\n $product->picture()->update([\n 'title' => $request->name_image,\n ]);\n }\n \n // On récupère l'image de la requête\n $im = $request->file('picture');\n \n // On vérifie si l'image existe\n if (!empty($im)) {\n\n // On récupère le lien de l'image\n $link = $request->file('picture')->store('images');\n // On retire Homme ou Femme du lien\n $newLink = str_replace(['Homme', 'Femme'], '', $link);\n // suppression de l'image si elle existe \n if(!empty($product->picture)){\n $product->picture()->delete(); // supprimer l'information en base de données\n }\n\n // mettre à jour la table picture pour le lien vers l'image dans la base de données\n $product->picture()->create([\n 'link' => $newLink,\n 'title' => $request->new_name_image?? $request->new_name_image\n ]);\n \n }\n\n //On retourne l'utilisateur vers la vue products index\n return redirect()->route('products.index')->with('message', 'success');\n }", "title": "" }, { "docid": "cab0a1cd64b69a7208a1539e0b20d010", "score": "0.5498759", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $update_data = $request->all();\n if ($request->hasFile('image')) {\n $extension = $request->file('image')->getClientOriginalExtension();\n $name = 'product_' . Str::random(5) . '.' . $extension;\n $path = \"assets/images/product/\";\n $request->file('image')->move($path, $name);\n $update_data['image'] = $path . $name;\n }\n if ($request->commission_percent) {\n $update_data['reseller_commission'] = $request->sell_price * ($request->commission_percent / 100);\n }\n $product->fill($update_data)->save();\n Toastr::success('Product Updated Successfully', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect()->to('/admin/product');\n }", "title": "" }, { "docid": "42a9d3235a287a318bd9326858f1dd4f", "score": "0.54972637", "text": "public function update(Request $request, $id)\n {\n $data = $request->except(['_token']); \n \n if ($request->hasFile('photo')) { \n $file = $request->file('photo');\n $filename = $file->getClientOriginalName();\n \n $destinationPath = base_path() . '/public/uploads/product';\n $file->move($destinationPath, $filename);\n \n $data['photo'] = $filename; \n }\n \n $update = \\DB::table('products')->where('id',$id)->update($data);\n \n if($update){\n \n return back()->with('success', 'Product has been updated.');\n }\n \n return back()->withInput();\n }", "title": "" }, { "docid": "c7993a3cf0cd18ff840d680b772b6dfe", "score": "0.5495035", "text": "public function update($id)\n\t{\n $model = $this->model;\n $resource = $model::find($id);\n\n if (!$resource) {\n return Response::apiNotFound();\n }\n\n $input = Input::all();\n\n try {\n $this->validator->validate($input);\n $resource->update($input);\n return Response::api(['resource' => $resource]);\n } catch (InputValidationException $e) {\n return Response::apiValidationErrors($e->getValidationErrors(), $e->getMessage());\n }\n\t}", "title": "" }, { "docid": "2cdc5be0acb052f86187218c7c65a79e", "score": "0.5493184", "text": "public function update_resources()\n\t{\n\t\tglobal $Mysql;\n\t\t\n\t\t// TODO: Make a way for newly-completed building upgrades to change this calculation.\n\t\t$seconds_passed = time() - $this->last_resource_update;\n\t\t$hours_passed = $seconds_passed / 3600;\n\t\t$this->resources->update($hours_passed);\n\t\t$this->last_resource_update = time();\n\t}", "title": "" }, { "docid": "8ad8f4cfd5795198c9d578ad85ec6def", "score": "0.5481553", "text": "public function update(ProductRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n if($request->hasFile('cover'))\n\t\t{\n Storage::disk('gcs')->delete($product->cover);\n $product->cover = Storage::disk('gcs')->put('products', $request->file('cover'));\n }\n $product->name = $request->name;\n $product->stock = $request->stock;\n\t\t$product->description = $request->description;\n\t\t$product->short_description =$request->short_description;\n\t\t$product->price =$request->price;\n $product->url = substr(str_slug($request->name),0,191);\n $product->category_id =$request->category_id;\n $product->save();\n return response()->json($product);\n }", "title": "" }, { "docid": "50ed1ecdb9317f01c85501581feccf07", "score": "0.54798114", "text": "public function update(Request $request, $id)\n { \n \n /* $file = $request->file('image');\n \n $name = $request->file('image')->getClientOriginalName(); //obtener nombre de archivo\n $file->move('storage', $name); //mover archivo a la carpeta store */\n \n $Service = Service::find($id);\n\n /* $Service->descripcion = $request->descripcion;\n $Service->host = $request->host;\n $Service->ip = $request->ip;\n $Service->image = $name; */\n \n $Service->update($request->all());\n \n return response()->json($Service, 200);\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.54773575", "text": "public function update($data) {\n }", "title": "" }, { "docid": "a4f2a1763433a848120dc2bf3227c04e", "score": "0.5473758", "text": "public function update(Request $request, $id)\n {\n $market = Market::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $market->path;\n }\n\n $market->update([\n 'servicename' => $request->servicename,\n 'price' => intval($request->price),\n 'description' => $request->content,\n 'path' => $path\n ]);\n session()->flash('success', 'Продукт успешно обновлен');\n return redirect()->route('market.index');\n }", "title": "" }, { "docid": "cd38b27f190e5c07f073bbe2dbf11656", "score": "0.54676855", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n\n try {\n\n $filename = $product->image;\n\n if($request->hasFile('image')){\n\n $filename = $this->file_manager->manageFile($request->file('image'), 'images/products');\n }\n\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'image' => $filename,\n ]);\n \n } catch (Exception $e) {\n \n DB::rollBack();\n\n return back();\n }\n\n DB::commit();\n\n return redirect()->route('products.index')->with('success', 'Product successfully updated');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.54605174", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "d5e71c0d1e98d1666d257e78c12ddd49", "score": "0.54573816", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = 'images/products/' . time() . '.' . $extension;\n $file->move('public/images/products', $filename);\n $product->image = $filename;\n $update_product = array(\n 'image' => $product->image,\n 'status' => $request->status\n\n );\n } else {\n $update_product = array(\n 'status' => $request->status\n );\n }\n $product->update($update_product);\n return redirect('admin/products');\n }", "title": "" }, { "docid": "b4084f98de3322212bce3e8332459ba2", "score": "0.54551", "text": "public function update(ArticleStoreRequest $request, Article $article): ArticleResource\n {\n $article->update($request->validated());\n\n $updated_article = $this->attachOrDetachTagsOfArticle(\n $article,\n $request->tags\n );\n\n $updated_article->save();\n\n return new ArticleResource(\n $updated_article\n );\n }", "title": "" }, { "docid": "6bbe8dedc2a827e34e1daaab8e4e817f", "score": "0.5454603", "text": "public function update(Request $request, $id)\n {\n $asset = Asset::find($id);\n $asset->name = $request->name;\n $asset->quantity = $request->quantity;\n $asset->price = $request->price;\n $asset->save();\n\n $status = [\n 'status' => 'info',\n 'msg' => 'Data berhasil di update'\n ];\n\n return redirect()->route('asset.index')->with( $status );\n }", "title": "" }, { "docid": "5909b7d875e8ebaed077d9aaa3103ffe", "score": "0.54507864", "text": "public function update(Request $request, $id)\n {\n $resident = Resident::findOrFail($id);\n $resident->update($request->except('photo_path'));\n if ($request->hasFile('photo_path')) {\n if ($resident->photo_path != '') Storage::disk('public')->delete($resident->photo_path);\n $path = $request->file('photo_path')->store('residents', 'public');\n $resident->update(['photo_path'=>$path]);\n }\n return redirect()->route('resident.index')->with('updated', 'Morador atualizado com sucesso!');\n }", "title": "" }, { "docid": "2917b6683ccb6c65cb2fb9e85bb625aa", "score": "0.5447052", "text": "public function update(Request $request, $id)\n {\n //获取要编辑的信息\n $Resources = $request->only(['name','type','size','file','status']);\n DB::table(\"Resources\")->where(\"id\",$id)->update($Resources);\n //返回试图\n return redirect('admin/shangchuan');\n }", "title": "" }, { "docid": "0e009016b15cbda45fcf52d873daf0b4", "score": "0.5445139", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'short_description' => 'required',\n 'price' => 'required',\n ]);\n // File Upload\n if ($request->hasFile('image')){\n // Get Filename with extension\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n // Get just Filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just Ext\n $extension = $request->file('image')->getClientOriginalExtension();\n // Store Filename | Not overwrite image with same name\n $filenameStore = $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('image')->storeAs('public/images/resto-product', $filenameStore);\n }\n // Create\n\n $resto_product = RestoProduct::find($id);\n $resto_product->title = $request->input('title');\n $resto_product->short_description = $request->input('short_description');\n $resto_product->price = $request->input('price');\n $resto_product->user_id = auth()->user()->id;\n if ($request->hasFile('image')){\n Storage::delete('public/images/resto-product'.$resto_product->image);\n $resto_product->image = $filenameStore;\n }\n $resto_product->save();\n\n return redirect('/menu-resto/resto-product')->with('success', 'Product Updated Successfully');\n }", "title": "" }, { "docid": "1d5c7db46310d9215057b0295ae4acf6", "score": "0.54424477", "text": "public function update($record, $request);", "title": "" }, { "docid": "8382479b28e811b0d9d1127b0c9f7585", "score": "0.54421824", "text": "public function update(Request $request, $id)\n {\n $scaleWeightItem = ScaleWeightItem::findOrFail($id);\n\n $scaleWeightItem->license_number = $request->get('license_number');\n $scaleWeightItem->driver = $request->get('driver');\n $scaleWeightItem->machine_code = $request->get('machine_code');\n $scaleWeightItem->user = $request->get('user');\n $scaleWeightItem->vendor = $request->get('vendor');\n $scaleWeightItem->item = $request->get('item');\n $scaleWeightItem->time = $request->get('time');\n $scaleWeightItem->gross_weight = $request->get('gross_weight');\n $scaleWeightItem->tare_weight = $request->get('tare_weight');\n $scaleWeightItem->net_weight = $request->get('net_weight');\n $scaleWeightItem->save();\n\n return new ApiResource($scaleWeightItem);\n }", "title": "" }, { "docid": "dfdcc32a6088cd7fa1a756fcbe3758df", "score": "0.54421", "text": "public function update(UpdateResourceRequest $request, $id)\n {\n $user = $request->user();\n $resource = Resource::find($id);\n if ($request->has('resource_name')) {\n $resource->resource_name = $request->get('resource_name');\n }\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n\n return new ResourceResource($resource);\n }", "title": "" }, { "docid": "52cbf49d1c53df8eac032ede3b214556", "score": "0.54409516", "text": "public function update(Request $request, $id)\n {\n $this->authChecker();\n $item = $this->provider::findOrFail($id);\n $item->name = $request->name;\n $item->restoarea_id = $request->restoarea_id;\n $item->size = $request->size;\n $item->update();\n\n return redirect()->route($this->webroute_path.'index')->withStatus(__('crud.item_has_been_updated', ['item'=>__($this->title)]));\n }", "title": "" }, { "docid": "fcbb8aa272243ff1148fb420a9930d94", "score": "0.5438374", "text": "public function update()\n {\n $this->validate(request(), [\n 'title' => 'required|max:255',\n 'pages' => 'integer',\n 'year' => 'integer',\n 'isbn' => 'required',\n ]);\n\n $book = Book::findOrFail(request('id'));\n $raw = request(['title', 'isbn', 'price', 'description', 'format', 'year', 'pages', 'source', 'publisher', 'series', 'availability', 'bookbinding']);\n $raw['image'] = $book->image;\n $book->prepare($raw)->update();\n\n $book->attach(request(['author', 'category', 'publisher']));\n\n if (is_array(request('price'))) {\n $book->updatePrices(request('price'));\n }\n\n session()->flash('success_message', 'Книга обновлена');\n return redirect()->route('book.list');\n }", "title": "" }, { "docid": "d9dfa985a23d52a88c5d6e0bc4baac1d", "score": "0.5435464", "text": "public function updateAction()\n {\n if ($this->request->hasArgument('uUID')) {\n $uuid = $this->request->getArgument('uUID');\n }\n if (empty($uuid)) {\n $this->throwStatus(400, 'Required uUID not provided', null);\n }\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\n if (is_object($ordenstypObj)) {\n $ordenstypObj->setOrdenstyp($this->request->getArgument('ordenstyp'));\n $this->ordenstypRepository->update($ordenstypObj);\n $this->persistenceManager->persistAll();\n $this->throwStatus(200, null, null);\n } else {\n $this->throwStatus(400, 'Entity Ordenstyp not available', null);\n }\n }", "title": "" }, { "docid": "5ad7cc720b3fecdc71fb75066e6e7715", "score": "0.54353356", "text": "public function update($id, Request $request)\n {\n $product = Product::find($id);\n $product->image_id = $request->image_id;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->sale_price = $request->sale_price ?? $request->price;\n\n $product->save();\n\n return redirect(route('product.edit', $id));\n }", "title": "" }, { "docid": "85cc828ef538f860045b5d8fccb280b0", "score": "0.54335415", "text": "public function update($input, $id)\n {\n if (request()->hasFile('image')) {\n $destinationPath = 'storage/Stores/images';\n $file_info = getimagesize(request()->file('image'));\n if (empty($file_info)) { // No Image?\n Flash::error(trans('common.messages.valid_image'));\n return false;\n }\n $file = request()->file('image');\n $attach = $destinationPath . '/' . rand() . '-stores-' . date(\"d-m-y-H-M\") . '-' . $file->getClientOriginalName();\n $file->move($destinationPath, ($attach));\n $input['image'] = trim($attach);\n }\n\n $store = Store::findOrFail($id);\n $store->fill($input)->save();\n\n return $store;\n }", "title": "" }, { "docid": "b8c2f01239a4821e25335f10d24bed76", "score": "0.54317147", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if (!$product) return redirect(route('products.index'));\n\n $this->validate($request,[\n 'name' => 'required',\n 'sell_price' => 'required|numeric',\n 'origin_price' => 'required|numeric',\n 'provider_id' => 'required|exists:providers,id',\n ]);\n Product::where('id',$id)\n ->update([\n 'name' => $request->name,\n 'sell_price' => $request->sell_price,\n 'origin_price' => $request->origin_price,\n 'provider_id' => $request->provider_id,\n ]);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image'); \n $filename = time() . time() * 360 . time() * 1024 . \".\" . $file->extension();\n \n $oldImage = $product->image->filename;\n\n Photo::where('id',$product->image->id)\n ->update([\n 'filename' => $filename,\n 'filesize' => $file->getClientSize(),\n 'extension' => $file->extension(),\n 'product_id' => $product->id,\n ]);\n $path = $file->move($this->path,$filename);\n File::delete($this->path . '/' . $oldImage);\n \n }\n session()->flash('message', 'تمت عملية التعديل بنجاح');\n session()->flash('status', 'success');\n return redirect(route('products.index'));\n }", "title": "" }, { "docid": "82dea4a48b80657331cbfd5c532ed380", "score": "0.5428506", "text": "public function _put() {\n\t\tif (!empty($this->id)) {\n\t\t\t$row = $this->getDb()[$this->id];\n\t\t\tif ($row) {\n\t\t\t\t$this->result = $row->update($this->data);\n\t\t\t}\n\t\t}\n\t\t$this->result;\n\t}", "title": "" }, { "docid": "d0cf26e6c4b3f625b549a6d0140e162d", "score": "0.54213333", "text": "public function update(Request $request, $id)\n {\n\n $image = Image::find($id);\n\n if ($request->hasFile('image')) {\n $imageName = $request->image;\n $imageName_new_name = time().$imageName->getClientOriginalName();\n $imageName->move('storage/',$imageName_new_name);\n $imageName = '/storage/'.$imageName_new_name;\n\n $image->path = $imageName;\n }\n\n $image->name = $request->name;\n $image->product_id = $request->product_id;\n $image->save();\n Session::flash('success','cập nhật thành công thành công!');\n\n return redirect()->route('admin.image.index');\n }", "title": "" }, { "docid": "50927265cd4834e00622acc58400363a", "score": "0.5420232", "text": "public function update(Request $request, $id)\n {\n $product = Product::Find($id);\n\n if($product === NULL)\n return view('errors.404');\n\n if(Gate::denies('update-product' , $product))\n return view('errors.refused');\n\n\n $request->validate([\n 'name' => ['required', 'string' , 'max:255'],\n 'description' => ['required' , 'string' , 'min:5' , 'max:500'],\n 'price' => ['required' , 'numeric'],\n 'quantity' => ['required' , 'numeric']\n ]);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->price = $request->input('price');\n $product->quantity = $request->input('quantity');\n $product->id_user = Auth::user()->id;\n $product->visible = 1;\n\n\n if($request->hasFile('image')){\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n Storage::disk('public')->put($filename, File::get($image));\n $product->image = $filename;\n };\n\n $product->save();\n\n return redirect('/products');\n\n }", "title": "" }, { "docid": "0159915c79f2e062ee97c0758cf5fc6d", "score": "0.54195684", "text": "public function update(string $data);", "title": "" }, { "docid": "a9bd5cde4f91473c17011fa280d1ed6e", "score": "0.54180807", "text": "public function update(StoreEditBiographie $request, $id)\n {\n $biographie = Biographie::find($id);\n\n $biographie->titre = $request->titre;\n $biographie->contenu = $request->contenu;\n if ($request->image != null)\n {\n Storage::disk('imgBiographie')->delete($biographie->image);\n \n \n $image = [\n \"name\" => $request->image,\n \"disk\" => \"imgBiographie\",\n \"w\" => 1000,\n \"h\" => 1000\n ];\n $biographie->image = $this->imageResize->imageStore($image);\n }\n\n $biographie->save();\n return redirect()->route('biographies.index',['biographie'=> $biographie->id]);\n }", "title": "" } ]
a1a8f802c57d80cc0f5595d8e330f9b4
This is a web edit form, we may not need this.
[ { "docid": "86f76aac68d0a1726880d4adbe31fc4e", "score": "0.6296187", "text": "public function edit() {\n }", "title": "" } ]
[ { "docid": "11ab5f7002d19d838af28b72c0184b4a", "score": "0.7457157", "text": "public function form_edit()\n\t{\n\t\t$this->return_header = false;\n\t\t$html = $this->exec(\"http://webinfo/Laporan/Forms/EditForm.aspx?Mode=Upload&CheckInComment=&ID=9919&RootFolder=%2FLaporan%2FInformation%20Technology%20Division%2FTesting&Source=http%3A%2F%2Fwebinfo%2FLaporan%2FForms%2FAllItems%2Easpx%3FRootFolder%3D%252fLaporan%252fInformation%2520Technology%2520Division%252fTesting%26FolderCTID%3D%26View%3D%257bF900070E%252d820E%252d49DB%252d927F%252d6898DAD3B1DE%257d\");\n\t\t$html = $this->replace($html);\n\t\techo $html;\n\t}", "title": "" }, { "docid": "9c40deb595ac4a285fa76f490ad8b576", "score": "0.7290318", "text": "public function fieldEditAction() {\n\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n $form->setTitle('Edit Form Question');\n $form->removeElement('search');\n $form->removeElement('display');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $form->removeElement('error');\n $form->removeElement('style');\n }\n }", "title": "" }, { "docid": "9de2e18a2191cecfcfb0caf10bda5cad", "score": "0.7233182", "text": "public function editForm() {\n\n // And return the HTML\n $html = '<input class=\"form-control\" name=\"'.$this->name.'\" value=\"'.$this->field_data->integer_data.'\" placeholder=\"Image ID\" />';\n\n if ($this->help)\n $html .= '<p class=\"help-block\">'.$this->help.'</p>';\n\n return $html;\n }", "title": "" }, { "docid": "12d19aedc2b8f3e2670e7b41151cfca6", "score": "0.7079261", "text": "function editObject()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\t$this->setPropertiesSubTabs(\"general\");\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\t\t$tpl->setContent($this->form_gui->getHTML());\n\t}", "title": "" }, { "docid": "11603f86c3d338bff5df2e4991687c06", "score": "0.7047195", "text": "function get_edit_form() {\n return $this->form;\n }", "title": "" }, { "docid": "5069ab4d37ad8824f8739ff562d0d370", "score": "0.70221484", "text": "function editForm() {\n render(\"guest/update\");\n }", "title": "" }, { "docid": "a45fde9ef577fbd5d381943bdfa1482b", "score": "0.6960905", "text": "public function settingForm();", "title": "" }, { "docid": "cd94983d14f6a6c144d9637ada743f12", "score": "0.6892659", "text": "public function getWebform();", "title": "" }, { "docid": "53adc442fed1dc21c37a56983fb62ecf", "score": "0.68036956", "text": "public function edit()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "90d6baf293ea11401e34f8d69e297f42", "score": "0.6784876", "text": "abstract protected function _edit();", "title": "" }, { "docid": "e558865f7a10dee3af3679d18ae9b241", "score": "0.6735121", "text": "public function EditForm() {\n\t\t$form = parent::EditForm();\n\n\t\tif ($this->currentRecord instanceof Product || is_subclass_of($this->currentRecord->class, 'Product')) {\n\t\t \n\t\t //Add another option to ParentType field for when products are not part of the site tree\n\t\t $fields = $form->Fields();\n\t\t $parentTypeField = $fields->fieldByName('Root.Behaviour.ParentType');\n\n\t\t if ($parentTypeField && $parentTypeField->exists() && $parentTypeField instanceof OptionsetField) {\n\t\t $source = $parentTypeField->getSource();\n\t\t $source['exempt'] = _t('ShopAdmin.NOT_PART_OF_SITE_TREE',\"Not part of the site tree\");\n\t\t $parentTypeField->setSource($source);\n\t\t $parentTypeField->setValue($this->currentRecord->getParentType());\n\t\t }\n\t\t}\n\t\t\n\t\tif(is_subclass_of($this->currentRecord->class, \"SiteTree\")) {\n\n\t\t\t$form->setActions($this->currentRecord->getCMSActions());\n\t\t\t\n\t\t\t$live_link = Controller::join_links($this->currentRecord->Link(),'?stage=Live');\n\t\t\t$stage_link = Controller::join_links($this->currentRecord->Link(),'?stage=Stage');\n\t\t\t\n\t\t\t$form->Fields()->insertFirst(\n\t\t\t new LiteralField('view','<div class=\"publishpreviews clr\">'._t('ShopAdmin.VIEW','View Page').': <a target=\"_blank\" href=\"'.$live_link.'\">'._t('ShopAdmin.VIEWLIVE','Live Site').'</a> <a target=\"_blank\" href=\"'.$stage_link.'\">'._t('ShopAdmin.VIEWDRAFT','Draft Site').'</a></div></div>')\n\t\t\t);\n\t\t\t$form->Fields()->insertFirst(\n\t\t\t new LiteralField('back','<div class=\"modelpagenav clr\"><button id=\"list_view\">&laquo; '._t('ShopAdmin.BACKTOLIST','Back to list view').'</button>')\n\t\t\t);\t\n\t\t}\t\n\t\telse {\n\t\t $form->Fields()->insertFirst(new LiteralField('back','<div class=\"modelpagenav clr\"><button id=\"list_view\">&laquo; '._t('ShopAdmin.BACKTOLIST','Back to list view').'</button></div>'));\t\t\n\t\t}\t\n\t\t\n\t\treturn $form;\t\n\t}", "title": "" }, { "docid": "cfddc37ceba3b764e6750d307a85dd67", "score": "0.67146665", "text": "protected function edit()\n {\n // TODO: Implement edit() method.\n }", "title": "" }, { "docid": "1e6aa7bc63c63da5ad66e5a0e49d6e8d", "score": "0.67065734", "text": "function pypediaEditForm($editPage) {\n\tglobal $wgServer;\n\tglobal $wgScriptPath;\n\n\t$msg = \"\";\n\tif ($editPage->mTitle->getNamespace() == \"\" && $editPage->section == \"\") {\n\t\t$msg = 'Warning: press \"Save page\" without altering the prefilled text. Editing is allowed per section, not in complete article.';\n\t\t$editPage->editFormPageTop .= \"<h3><span style='color:#0B0B0B'>$msg</span></h3>\";\n\t}\n\n\t$message = pypediaCheckIfEditIsAllowed($editPage);\n\tif ($message != \"ok\" && $message != \"proceed\") {\n\t\t//Should be big and ugly !\n\t\t$editPage->editFormPageTop .= \"<h3><span style='color:#FF0000'>This edit will <b>not</b> be saved<p>Reason: $message</p>Click <a href='$wgServer$wgScriptPath/index.php/PyPedia:Documentation#Who_can_contribute.3F'>here</a> for more info about editing</span></h3>\";\n\t\t//$editPage->editFormPageTop .= \"<script>document.getElementById('wpTextbox1').disabled = true;</script>\";\n\t}\n\t$editPage->editFormPageTop .= '<b>Click three times in the text area for code friendly editing</b><script>(function inject() { var baseUrl=\"' . $wgServer . $wgScriptPath . '/extensions/PyPedia_server/ace/build/textarea/src/\"; function load(path, module, callback) { path = baseUrl + path; if (!load.scripts[path]) { load.scripts[path] = { loaded: false, callbacks: [ callback ] }; var head = document.getElementsByTagName(\"head\")[0]; var s = document.createElement(\"script\"); function c() { if (window.__ace_shadowed__ && window.__ace_shadowed__.define.modules[module]) { load.scripts[path].loaded = true; load.scripts[path].callbacks.forEach(function(callback) { callback(); }); } else { setTimeout(c, 50); } }; s.src = path; head.appendChild(s); c(); } else if (load.scripts[path].loaded) { callback(); } else { load.scripts[path].callbacks.push(callback); } }; load.scripts = {}; window.__ace_shadowed_load__ = load; load(\"ace.js\", \"text!ace/css/editor.css\", function() { var ace = window.__ace_shadowed__; var Event = ace.require(\"pilot/event\"); var areas = document.getElementsByTagName(\"textarea\"); for (var i = 0; i < areas.length; i++) { Event.addListener(areas[i], \"click\", function(e) { if (e.detail == 3) { ace.options = { mode:\"python\",theme:\"twilight\",gutter:\"true\",fontSize:\"12px\",softWrap:\"off\",showPrintMargin:\"false\",useSoftTabs:\"false\" }; ace.transformTextarea(e.target); } }); } });})()</script>';\n\treturn true;\n}", "title": "" }, { "docid": "522e65a3ca4b0874aaf33f670021544b", "score": "0.66797936", "text": "public function edit()\r\n\t{\r\n\t}", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.66724217", "text": "public function edit();", "title": "" }, { "docid": "ea1efa40dcfc6ec44673561aabac48c2", "score": "0.6665036", "text": "abstract protected function _getFormAction();", "title": "" }, { "docid": "46cd920a24bb83c67cac7f7b5bdbd401", "score": "0.6665015", "text": "private function AdminPage() {\n\t$oFormIn = fcHTTP::Request();\n\n\t$doSave = $oFormIn->GetBool('btnSave');\n\tif ($doSave) {\n\t $this->PageForm()->Save();\n\t $this->SelfRedirect();\n\t}\n\n\t// page title\n\t\n\t$sTitle = 'Received Restock Line ID #'.$this->GetKeyValue();\n\tfcApp::Me()->GetPageObject()->SetPageTitle($sTitle);\n\n\t// header menu\n\t\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t $oMenu->SetNode($ol = new fcMenuOptionLink('do','edit',NULL,NULL,'edit this record'));\n \n\t $doEdit = $ol->GetIsSelected();\n\t\n//\t$doEdit = ($oPage->PathArg('edit'));\n\t$isNew = $this->IsNew();\n\t\n\t/* 2017-03-24 old\n\t$arActs = array(\n\t // (array $iarData,$iLinkKey,$iGroupKey=NULL,$iDispOff=NULL,$iDispOn=NULL)\n\t new clsActionLink_option(array(),'edit'),\n\t ); */\n\n\t//$oPage->PageHeaderWidgets($arActs);\n\t\n\t$frm = $this->PageForm();\n\t\n\tif ($isNew) {\n\t $frm->ClearValues();\n\t} else {\n\t $frm->LoadRecord();\n\t}\n\t$oTplt = $this->PageTemplate();\n\t$arCtrls = $frm->RenderControls($doEdit);\n\t$arCtrls['ID'] = $this->SelfLink();\n\t\n\t$out = NULL;\n\tif ($doEdit) {\n\t $out .= \"\\n<form method=post>\";\n\t} else {\n\t //$this->ParentID($idParent);\n\t $arCtrls['ID_Parent'] = $this->ParentRecord()->SelfLink_name();\n\t $arCtrls['ID_Item'] = $this->ItemRecord()->SelfLink_name();\n\t}\n\t// render the template\n\t$oTplt->SetVariableValues($arCtrls);\n\t$out .= $oTplt->RenderRecursive();\n\tif ($doEdit) {\n\t $out .= '<input type=submit name=\"btnSave\" value=\"Save\">';\n\t $out .= '</form>';\n\t}\n\t\n\treturn $out;\n }", "title": "" }, { "docid": "a5c7c50d77829e0b51f7d03f6b5e42d4", "score": "0.6647659", "text": "function edit() {\n\t\t$is_admin = is_admin (); \n\t\tif ($is_admin == false) {\n\t\t\t$go = site_url ( 'login' );\n\t\t\tsafe_redirect ( $go );\n\t\t}\n\t\t\n\t\t$layout = CI::view ( 'admin/iframe', true, true );\n\t\t$layout = CI::model ( 'template' )->parseMicrwoberTags ( $layout );\n\t\t//$layout = CI::model('template')->parseMicrwoberTags ( $layout );\n\t\tCI::library ( 'output' )->set_output ( $layout );\n\t}", "title": "" }, { "docid": "c9616245064c73a4a63c5600db0bf7aa", "score": "0.66331476", "text": "public function renderForm()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.6627754", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "63d0725af413b84399b53440608ff807", "score": "0.65861416", "text": "public function headingEditAction() {\n parent::headingEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n if ($form) {\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0, 'order' => '986'));\n\n $form->removeElement('display');\n $form->addElement('hidden', 'display', array('value' => 1, 'order' => '987'));\n }\n }", "title": "" }, { "docid": "eceb3abebc8ed415a13108f47de077b2", "score": "0.6581865", "text": "function get_edit_main(){\n\t\t?>\n\t\t<div class=\"component-main pt-3\">\n\t\t\t<input type=\"text\" class=\"form-control main-label\" name=\"<?=$this->id?>[label]\" id=\"<?=$this->id?>_label\" placeholder=\"Question\"\n\t\t\t<?php if($this->label!=''){echo 'value=\"'.$this->label.'\"';} ?>\n\t\t\trequired>\n\t\t\t<textarea class=\"form-control mt-2\" rows=\"5\" placeholder=\"A Long Answer\" disabled></textarea>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "9a57ebf3330d38ff3b1cfbadfc9fc69b", "score": "0.65764964", "text": "function edit() {\n\t\t\n\t\tif ($_POST) {\n\t\t\t$this->entity->update($_POST);\n\t\t\t$this->_relative_redirect('view');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4c478fe50fb32fbad762e7ed320ac75a", "score": "0.6545308", "text": "private function save_edit()\r\n {\r\n }", "title": "" }, { "docid": "ef8f2db01298c7ebf00062af41f2d799", "score": "0.65327084", "text": "public function editAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LOGGED IN USER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //SEND TAB ID TO TPL FILE\n $this->view->tab_selected_id = $this->_getParam('tab');\n\n //NOTE ITEM\n $sitepagenote = Engine_Api::_()->getItem('sitepagenote_note', $this->_getParam('note_id'));\n $getPackageNoteEdit = Engine_Api::_()->sitepage()->getPackageAuthInfo('sitepagenote');\n\n //PAGE ID\n $page_id = $sitepagenote->page_id;\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitepage_main');\n\n //GENERATE EDIT FORM\n $this->view->form = $form = new Sitepagenote_Form_Edit(array('item' => $sitepagenote));\n\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n\t\t\t$form->addElement(\"dummy\", \"dummy\", array('label' => 'Main Photo', 'description' => 'Sorry, the browser you are using does not support Photo uploading. We recommend you to edit a Note from your mobile / tablet without uploading a main photo for it. You can later upload the main photo from your Desktop.', 'order' => 7, 'style' => 'display:none;'));\n\t\t\tif (preg_match('/' . 'iPad' . '/i', $_SERVER['HTTP_USER_AGENT'])) {\n\t\t\t\tif (isset($form->photo)){\n\t\t\t\t\t$form->removeElement('photo');\n\t\t\t\t}\t\n\t\t\t} else {\n if (isset($form->photo)){\n $form->photo->setAttrib('accept', \"image/*\");\n }\n }\n }\n\n //GET SITEPAGE ITEM\n $this->view->sitepage = $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //START MANAGE-ADMIN CHECK\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n if (empty($isManageAdmin)) {\n $can_edit = 0;\n } else {\n $can_edit = 1;\n }\n //END MANAGE-ADMIN CHECK\n //SUPERADMIN, NOTE OWNER AND SITEPAGE OWNER CAN EDIT VIDEO\n if ($viewer->getIdentity() != $sitepagenote->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n //IF NOTE IN PUBLISHED STAT THAN REMOVE ELEMENT\n if ($sitepagenote->draft == \"0\") {\n $form->removeElement('draft');\n }\n\n //REMOVING THE PHOTO ELEMENT FROM THE FORM\n $form->removeElement('photo');\n\n //PREPARE TAGS\n $sitepageTags = $sitepagenote->tags()->getTagMaps();\n $tagString = '';\n foreach ($sitepageTags as $tagmap) {\n if ($tagString !== '') {\n $tagString .= ', ';\n }\n $tagString .= $tagmap->getTag()->getTitle();\n }\n $form->tags->setValue($tagString);\n\n //IF NOT POST OR FORM NOT VALID, RETURN\n if (!$this->getRequest()->isPost()) {\n $form->populate($sitepagenote->toArray());\n return;\n }\n\n //IF NOT POST OR FORM NOT VALID, RETURN\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //GETTING THE FORM VALUES\n $values = empty($getPackageNoteEdit) ? null : $form->getValues();\n if (empty($values)) {\n return;\n }\n\n //PROCESS\n Engine_Api::_()->sitepagenote()->setNotePackages();\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //SAVE NOTE DETAIL\n $sitepagenote->setFromArray($values);\n $sitepagenote->body = $_POST['body'];\n $sitepagenote->modified_date = date('Y-m-d H:i:s');\n $sitepagenote->tags()->setTagMaps($viewer, preg_split('/[,]+/', $values['tags']));\n $sitepagenote->save();\n\n //INSERT NEW ACTIVITY IF NOTE IS JUST GETTING PUBLISHED\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->getActionsByObject($sitepagenote);\n if (count($action->toArray()) <= 0 && isset($values['draft'])) {\n if ($values['draft'] == 0 && $sitepagenote->search == 1) {\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $activityFeedType = null;\n if (Engine_Api::_()->sitepage()->isPageOwner($sitepage) && Engine_Api::_()->sitepage()->isFeedTypePageEnable())\n $activityFeedType = 'sitepagenote_admin_new';\n elseif ($sitepage->all_post || Engine_Api::_()->sitepage()->isPageOwner($sitepage))\n $activityFeedType = 'sitepagenote_new';\n if ($activityFeedType) {\n $action = $actionTable->addActivity($viewer, $sitepage, $activityFeedType);\n Engine_Api::_()->getApi('subCore', 'sitepage')->deleteFeedStream($action);\n }\n //MAKE SURE ACTION EXISTS BEFOR ATTACHING THE NOTE TO THE ACTIVITY\n if ($action != null) {\n $actionTable->attachActivity($action, $sitepagenote);\n }\n }\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECTING TO THE NOTE VIEW PAGE\n return $this->_redirectCustom($sitepagenote->getHref(), array('prependBase' => false));\n }", "title": "" }, { "docid": "c054ffc03588a2c793e7d600c15e2e8a", "score": "0.6512748", "text": "public function edit_form_elements(){\n\t\t\n\t\t$fr = $this->loadAdditionalFragments();\n\t\t$comp = array();\n\t\tforeach($fr as $v)\n\t\t\t$comp []= htmlentities($v['text'], ENT_QUOTES, mb_internal_encoding());\n\t\t\t\n\t\t$elements['comp'] = new HtmlElement('<div class=\"compare_text\">'.implode('<hr></hr>',$comp).'</div>');\n\t\t\t\n\t\t$elements['text'] = new Textarea('Text:','text',$this->text,15,40);\n\t\t\n\t\t\n\t\t\t$query_style = \"SELECT s.id, s.class \n\t\t\t\t\t\t\tFROM content_class_style ccs \n\t\t\t\t\t\t\tJOIN style s ON s.id = ccs.style_id \n\t\t\t\t\t\t\tWHERE ccs.content_class_id='{$this->content_class_id}'\";\n\t\t\t$definition = array('query'=>$query_style,'keys'=>array('id'),'values'=>array('class'));\n\t\t$elements['style_id'] = new DataSelect('Style: ','style',$definition,$this->style_id); \n\t\t\n\t\t\t$pagelinks = array();\n\t\t\tforeach($GLOBALS['page_index'] as $i=>$p)\n\t\t\t\t$pagelinks[$i] = $p->__get('uri');\n\t\t\t\t\n\t\t$elements['link'] = new Select('Insert new link: ','link',$pagelinks);\n\t\t$elements['ins_link'] = new Submit('action','Link','link');\n\t\t\n\t\t\t$files = array();\n\t\t\tforeach(scandir(DOWNLOADS_DIR) as $file){\n\t\t\t\tif($file != '..' && $file != '.')\n\t\t\t\t\t$files[$file] = $file;\n\t\t\t}\n\t\tif(!empty($files))\n\t\t{\n\t\t\t$elements['file'] = new Select('Insert new file:','file',$files);\n\t\t\t$elements['ins_file'] = new Submit('action','File','file');\n\t\t}\n\t\t\n\t\treturn $elements;\n\t}", "title": "" }, { "docid": "0011db3eea8a256e0f9de3f5a4d3c768", "score": "0.65035343", "text": "function form( $tag ) {\r\n\t\trequire_once( 'edit-form.php' );\r\n\t}", "title": "" }, { "docid": "7ececbca50536acfbb8d1d8c129b7cab", "score": "0.64934385", "text": "public function edit()\n {\n // TODO: Implement edit() method.\n }", "title": "" }, { "docid": "c03fec755c02cda248228d139f13b84f", "score": "0.64837736", "text": "public static function edit();", "title": "" }, { "docid": "3d1d29e4ce8531e69f2d1d17f96c5910", "score": "0.64834195", "text": "public function form()\n {\n\t\t$this->hidden('id');\n\t\t$editor = [];\n\t\tforeach(config('xapp.editor') as $v){\n\t\t\tif(!empty(config(\"admin.extensions.{$v}.enable\"))) $editor[$v]=$v;\n\t\t}\n\t\t$this->select('editor','选择编辑器')->options($editor);\n\t\t$this->switch('disable_img','关闭图集字段');\n\t\t$this->number('max_img', '图片大小限止(K)')->default(2048)->help('默认2048K');\n }", "title": "" }, { "docid": "9e97b8bcd9d447553177459cb1643785", "score": "0.6483076", "text": "function build_editing_form()\r\n {\r\n $user = $this->user;\r\n $parent = $this->parent;\r\n\r\n $this->build_basic_form();\r\n\r\n $this->addElement('hidden', User :: PROPERTY_ID);\r\n }", "title": "" }, { "docid": "e9c80d6211d270b4bcd4bbc7da27f143", "score": "0.64752585", "text": "public function edit()\n {\n \t\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.64717513", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "05621ca0f6f04956c1eccb1d9c890103", "score": "0.6471053", "text": "function palanteanalytics_google_analytics_detail_content_type_edit_form($form, &$form_state) {\n // Does nothing!\n return $form;\n}", "title": "" }, { "docid": "da364a4097e0d2e65e22e2a31efb271f", "score": "0.64657176", "text": "public function openEditForm() {\n $url = '/contact/' . $this->contact->id . '/edit/part';\n $data = [\n 'source' => 'email',\n 'value' => '[email protected]'\n ];\n $response = $this->post($url, $data);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.6459109", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "a5fda503875aaa9eca87cbd0297fc83d", "score": "0.6448367", "text": "public function getEditForm() {\n $strReturn = \"\";\n $strReturn .= $this->objToolkit->formInputDropdown(\n \"unit\",\n array(\n \"f\" => $this->getLang(\"weather_fahrenheit\"),\n \"c\" => $this->getLang(\"weather_celsius\")\n ),\n $this->getLang(\"weather_unit\"),\n $this->getFieldValue(\"unit\")\n );\n $strReturn .= $this->objToolkit->formTextRow($this->getLang(\"weather_location_finder\"));\n $strReturn .= $this->objToolkit->formInputText(\"location\", $this->getLang(\"weather_location\"), $this->getFieldValue(\"location\"));\n return $strReturn;\n }", "title": "" }, { "docid": "d003f694cb280e3eac9f0ff7ded1000c", "score": "0.6446208", "text": "public function typeEditAction() {\n\n $option_id = $this->_getParam('option_id');\n include APPLICATION_PATH . '/application/modules/Sitestaticpage/controllers/license/license2.php';\n $option_table = Engine_Api::_()->fields()->getTable('sitestaticpage_page', 'options');\n //GENERATE FORM\n $this->view->form = $form = new Sitestaticpage_Form_Admin_Type();\n $form->setTitle('Edit Form Meta-data');\n $form->submit->setLabel('Save');\n $db = Engine_Db_Table::getDefaultAdapter();\n $default_email = Engine_Api::_()->getApi('settings', 'core')->getSetting('core.mail.contact');\n\n $select = $option_table->select()->from($option_table->info('name'), array('*'))\n ->where('option_id = ?', $option_id);\n $values = $option_table->fetchRow($select);\n $value = $values->toArray();\n if (empty($values['button_text']))\n $values['button_text'] = 'Submit';\n\n if (!$this->getRequest()->isPost()) {\n $form->form_heading->setValue($values['form_heading']);\n $form->form_description->setValue($values['form_description']);\n \n if(isset($form->recaptcha))\n $form->recaptcha->setValue($values['recaptcha']);\n \n $form->label->setValue($values['label']);\n if (empty($values['email']))\n $form->email->setValue($default_email);\n else\n $form->email->setValue($values['email']);\n $form->button_text->setValue($values['button_text']);\n return;\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n if (!empty($_POST['email'])) {\n $emailArray = explode(',', $_POST['email']);\n $errorMessage = array();\n $validatorEmail = new Zend_Validate_EmailAddress();\n $validatorEmail->getHostnameValidator()->setValidateTld(false);\n foreach ($emailArray as $val) {\n if (!$validatorEmail->isValid(trim($val))) {\n $errorMessage = \"Please enter valid email address\";\n break;\n }\n }\n if (!empty($errorMessage)) {\n $form->addError($errorMessage);\n return;\n }\n }\n $this->updateMail($_POST['email'], $_POST['form_heading'], $_POST['form_description'], $_POST['button_text'], $option_id);\n\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n ));\n }\n }", "title": "" }, { "docid": "ec3a2488b8bd91783e9f150cb28e7fa1", "score": "0.6445189", "text": "public function edit(){}", "title": "" }, { "docid": "005d2a304cfabaac98707aec4cc75818", "score": "0.64393413", "text": "function renderFormEdit(Form &$form, DataModel $model);", "title": "" }, { "docid": "7c88bffebb66eeda980072781ca7d913", "score": "0.64366", "text": "function _AddEditForm( $sFormId='' )\n {\n global $CNK;\n\n $mRid = $CNK->__oDisplay->LoadTpl('idx_form_opts');\n $aTpl = $CNK->__aWords;\n $sColId = $sType = $sDest = $sMTpl = '';\n\n if ( $sFormId != '' )\n {\n $CNK->__oDb->ExecQuery(\"SELECT * FROM pf_forms WHERE frm_id='$sFormId'\");\n if ( $aRes = $CNK->__oDb->Fetch() )\n {\n $aTpl['form_name'] = $CNK->__oStd->TxtSafeOutput( $aRes['frm_name'] );\n $sColId = $aRes['frm_color'];\n $sDest = $aRes['frm_dest'];\n $aTpl['form_email'] = $aRes['frm_email'];\n $sMTpl = $aRes['frm_mtpl_id'];\n $aTpl['form_width'] = $aRes['frm_width'];\n $aTpl['after_text'] = $CNK->__oStd->TxtSafeOutput( $aRes['frm_after_sub_txt'] );\n $aTpl['form_redirect'] = $aRes['frm_redirect'];\n\n $aTpl['btn_prev'] = $aRes['frm_btn_prev'];\n $aTpl['btn_next'] = $aRes['frm_btn_next'];\n $aTpl['btn_submit'] = $aRes['frm_btn_submit'];\n }\n }\n else\n {\n $sFormId = ShortUniqueId();\n $aTpl['form_name'] = $CNK->__aWords['L_vars_form_name'];\n $sDest = '1';\n $aTpl['btn_prev'] = $CNK->__aWords['L_col_frmopts_default_prev'];\n $aTpl['btn_next'] = $CNK->__aWords['L_col_frmopts_default_next'];\n $aTpl['btn_submit'] = $CNK->__aWords['L_col_frmopts_default_submit'];\n }\n\n $aTpl['form_id'] = $sFormId;\n $aTpl['color_select'] = BuildColorsSelect( $sColId );\n $aTpl['form_dest_select'] = BuildDestSelect( $sDest );\n $aTpl['form_mtpl_select'] = BuildSQLSelect( 'pf_mail_tpls', 'mtpl_name', 'mtpl_id', $sMTpl, 40);\n\n $this->__aTplData['onload_section'] .= 'ChangeDemoColor();ChangeFormDest();';\n\n $aTpl['L_idx_form_opts_doc'] = $this->_LoadNote( 'form_opts' );\n $this->__aTplData['L_page_title'] = $CNK->__aWords['L_page_frmopts'];\n $this->__aTplData['T_idx_wrapper_content'] = $CNK->__oDisplay->EvalTpl( $aTpl, '', $mRid );\n\n }", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.64301336", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "849e2e96c81e0e515311dfb20ce2441b", "score": "0.6421981", "text": "public function fieldEditAction() {\r\n\r\n //CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $product_id = $this->_getParam('product_id', null);\r\n $sitestoreproduct = Engine_Api::_()->getItem('sitestoreproduct_product', $product_id);\r\n\r\n $field = Engine_Api::_()->fields()->getField($this->_getParam('field_id'), $this->_fieldType);\r\n\r\n //CHECK TYPE PARAM AND GET FORM CLASS\r\n $cfType = $this->_getParam('type', $field->type);\r\n $adminFormClass = null;\r\n if (!empty($cfType)) {\r\n $adminFormClass = Engine_Api::_()->fields()->getFieldInfo($cfType, 'adminFormClass');\r\n }\r\n if (empty($adminFormClass) || !@class_exists($adminFormClass)) {\r\n $FormClass = 'Sitestoreproduct_Form_Field';\r\n }\r\n $FormClass = 'Sitestoreproduct_Form_Field';\r\n\r\n //CREATE FORM\r\n $this->view->form = $form = new $FormClass();\r\n $form->setTitle('Edit Question');\r\n\r\n //CHECK METHOD/DATA\r\n if (!$this->getRequest()->isPost()) {\r\n $form->populate($field->toArray());\r\n $form->populate($this->_getAllParams());\r\n if (is_array($field->config)) {\r\n $form->populate($field->config);\r\n }\r\n $this->view->search = $field->search;\r\n return;\r\n }\r\n\r\n if (!$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n\r\n Engine_Api::_()->fields()->editField($this->_fieldType, $field, $form->getValues());\r\n $this->view->status = true;\r\n $this->view->field = $field->toArray();\r\n $this->view->form = null;\r\n\r\n //RE-RENDER ALL MAPS THAT HAVE THIS FIELD AS A PARENT OR CHILD\r\n $maps = array_merge(\r\n Engine_Api::_()->fields()->getFieldsMaps($this->_fieldType)->getRowsMatching('field_id', $field->field_id), Engine_Api::_()->fields()->getFieldsMaps($this->_fieldType)->getRowsMatching('child_id', $field->field_id)\r\n );\r\n $html = array();\r\n foreach ($maps as $map) {\r\n $html[$map->getKey()] = $this->view->adminFieldMeta($map);\r\n }\r\n $this->view->htmlArr = $html;\r\n }", "title": "" }, { "docid": "c842177ad8151c824cac8de298d29f61", "score": "0.64142704", "text": "function addEditDialogHTML($add=0) {\n\t\tglobal $user;\n\t\t# dialog for on page editing\n\t\t$h = '';\n\t\t$h .= \"<div dojoType=dijit.Dialog\\n\";\n\t\t$h .= \" id=\\\"addeditdlg\\\"\\n\";\n\t\t$h .= \" title=\\\"Edit {$this->restypename}\\\"\\n\";\n\t\t$h .= \" duration=250\\n\";\n\t\t$h .= \" draggable=true>\\n\";\n\t\t$h .= \"<div id=\\\"addeditdlgcontent\\\">\\n\";\n\t\t$h .= \"<div id=\\\"mgmtnodedlgcontent\\\">\\n\";\n\t\t$h .= \"<div style=\\\"text-align: center;\\\">\\n\";\n\t\t$h .= \"<small>* denotes required fields</small><br><br>\\n\";\n\t\t$h .= \"</div>\\n\";\n\t\t# id\n\t\t$h .= \"<input type=\\\"hidden\\\" id=\\\"editresid\\\">\\n\";\n\n\t\t#$h .= \"<div style=\\\"width: 80%; margin-left: 10%;\\\">\\n\";\n\t\t# name\n\t\t$errmsg = i(\"Name can only contain letters, numbers, dashes(-), periods(.), and underscores(_). It can be from 1 to 50 characters long.\");\n\t\t$h .= labeledFormItem('name', i('Name') . '*', 'text', '^([a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,49})$',\n\t\t 1, '', $errmsg); \n\t\t# owner\n\t\t$extra = array('onKeyPress' => 'setOwnerChecking');\n\t\t$h .= labeledFormItem('owner', i('Owner') . '*', 'text', '', 1,\n\t\t \"{$user['unityid']}@{$user['affiliation']}\", i('Unknown user'),\n\t\t 'checkOwner', $extra);\n\t\t$cont = addContinuationsEntry('AJvalidateUserid');\n\t\t$h .= \"<input type=\\\"hidden\\\" id=\\\"valuseridcont\\\" value=\\\"$cont\\\">\\n\";\n\n\t\t# IP address\n\t\t$ipreg = '(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';\n\t\t$ipreg1 = \"^$ipreg$\";\n\t\t$errmsg = i(\"Invalid IP address specified - must be a valid IPV4 address\");\n\t\t$h .= labeledFormItem('ipaddress', i('IP Address') . '*', 'text', $ipreg1, 1, '', $errmsg); \n\n\t\t# State\n\t\t$vals = array(2 => \"available\", 10 => \"maintenance\", 5 => \"failed\");\n\t\t$h .= labeledFormItem('stateid', i('State'), 'select', $vals);\n\n\t\t# sysadmin email\n\t\t$reg = '^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4},)*([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4})$';\n\t\t$errmsg = i(\"Invalid email address(es) specified\");\n\t\t$h .= labeledFormItem('sysadminemail', i(\"SysAdmin Email Address(es)\"), 'text', $reg, 0, '',\n\t\t $errmsg, '', '', '', helpIcon('sysadminemailhelp')); \n\n\t\t# shared mailbox\n\t\t$reg = '^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4})$';\n\t\t$errmsg = i(\"Invalid email address specified\");\n\t\t$h .= labeledFormItem('sharedmailbox', i('Address for Shadow Emails'), 'text', $reg, 0, '',\n\t\t $errmsg, '', '', '', helpIcon('sharedmailboxhelp')); \n\n\t\t# checkininterval\n\t\t$extra = array('smallDelta' => 1, 'largeDelta' => 2);\n\t\t$h .= labeledFormItem('checkininterval', i('Check-in Interval (sec)'), 'spinner', '{min:5,max:30,places:0}',\n\t\t 1, '6', '', '', $extra, '', helpIcon('checkinhelp'));\n\n\t\t# installpath\n\t\t$reg = '^([-a-zA-Z0-9_\\.\\/]){2,100}$';\n\t\t$errmsg = i(\"Invalid install path specified\");\n\t\t$h .= labeledFormItem('installpath', i('Install Path'), 'text', $reg, 0, '', $errmsg,\n\t\t '', '', '', helpIcon('installpathhelp')); \n\n\t\t# timeserver list\n\t\t$reg = '^(([a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,49})(,?)){1,5}$';\n\t\t$errmsg = i(\"Invalid time server(s) specified. Must be comman delimited list of hostnames or IP addresses, with up to 5 allowed\");\n\t\t$val = getVariable('timesource|global');\n\t\t$h .= labeledFormItem('timeservers', i('Time Server(s)'), 'text', $reg, 0, $val, $errmsg,\n\t\t '', '', '', helpIcon('timeservershelp')); \n\n\t\t# keys\n\t\t$reg = '^([-a-zA-Z0-9_\\.\\/,]){2,1024}$';\n\t\t$errmsg = i(\"Invalid path to identity key files\");\n\t\t$h .= labeledFormItem('keys', i('End Node SSH Identity Key Files'), 'text', $reg, 0, '', $errmsg,\n\t\t '', '', '', helpIcon('identityhelp')); \n\n\t\t# sshport\n\t\t$extra = array('smallDelta' => 1, 'largeDelta' => 2);\n\t\t$h .= labeledFormItem('sshport', i('SSH Port for this Node'), 'spinner', '{min:1,max:65535,places:0}',\n\t\t 1, '22', '', '', $extra, '', helpIcon('sshporthelp'));\n\n\t\t# image library\n\t\t$h .= \"<div class=\\\"boxedoptions\\\">\\n\";\n\t\t# imagelibenable\n\t\t$extra = array('onChange' => 'toggleImageLibrary();');\n\t\t$h .= labeledFormItem('imagelibenable', i('Enable Image Library'), 'check', '', '', '', '', '',\n\t\t $extra, '', helpIcon('imagelibhelp'));\n\n\t\t# imagelibgroupid\n\t\t$disabled = array('disabled' => 'true');\n\t\t$vals = getUserResources(array('mgmtNodeAdmin'), array(\"manageGroup\"), 1);\n\t\t$h .= labeledFormItem('imagelibgroupid', i('Image Library Management Node Group'), 'select',\n\t\t $vals['managementnode'], '', '', '', '', $disabled, '', helpIcon('imagelibgrouphelp'));\n\n\t\t# imagelibuser\n\t\t$reg = '^([-a-zA-Z0-9_\\.\\/,]){2,20}$';\n\t\t$errmsg = i(\"Invalid image library user\");\n\t\t$h .= labeledFormItem('imagelibuser', i('Image Library User'), 'text', $reg, 0, '', $errmsg,\n\t\t '', $disabled, '', helpIcon('imagelibuserhelp')); \n\n\t\t# imagelibkey\n\t\t$reg = '^([-a-zA-Z0-9_\\.\\/,]){2,100}$';\n\t\t$errmsg = i(\"Invalid image library identity key\");\n\t\t$h .= labeledFormItem('imagelibkey', i('Image Library SSH Identity Key File'), 'text', $reg, 0, '', $errmsg,\n\t\t '', $disabled, '', helpIcon('imagelibkeyhelp')); \n\t\t$h .= \"</div>\\n\"; # image library\n\n\t\t# IP config method\n\t\t$h .= \"<div class=\\\"boxedoptions\\\">\\n\";\n\t\t# publicIPconfig\n\t\t$extra = array('onChange' => 'togglePublic();');\n\t\t$vals = array('dynamicDHCP' => 'Dynamic DHCP',\n\t\t 'manualDHCP' => 'Manual DHCP',\n\t\t 'static' => 'Static');\n\t\t$h .= labeledFormItem('publicIPconfig', i('Public NIC Configuration Method'), 'select', $vals,\n\t\t '', '', '', '', $extra, '', helpIcon('ipconfighelp'));\n\n\t\t# netmask\n\t\t$errmsg = i(\"Invalid public netmask\");\n\t\t$h .= labeledFormItem('publicnetmask', i('Public Netmask'), 'text', $ipreg1, 0, '', $errmsg,\n\t\t '', $disabled, '', helpIcon('netmaskhelp')); \n\n\t\t# gateway\n\t\t$reg = '^[a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,56}$';\n\t\t$errmsg = i(\"Invalid public gateway\");\n\t\t$h .= labeledFormItem('publicgateway', i('Public Gateway'), 'text', $reg, 0, '', $errmsg,\n\t\t '', $disabled, '', helpIcon('gatewayhelp')); \n\n\t\t# dnsserver\n\t\t$reg = \"^($ipreg,)*($ipreg)$\";\n\t\t$errmsg = i(\"Invalid public DNS server\");\n\t\t$h .= labeledFormItem('publicdnsserver', i('Public DNS Server'), 'text', $reg, 0, '', $errmsg,\n\t\t '', $disabled, '', helpIcon('dnsserverhelp')); \n\t\t$h .= \"</div>\\n\"; # IP config method\n\n\t\t# available public networks\n\t\t$h .= labeledFormItem('availablenetworks', i('Available Public Networks'), 'textarea', '', 1,\n\t\t '', '', '', '', '', helpIcon('availnetshelp'));\n\n\t\t# federated auth\n\t\t$h .= labeledFormItem('federatedauth', i('Affiliations Using Federated Authentication for Linux Images'),\n\t\t 'textarea', '', 1, '', '', '', '', '', helpIcon('federatedauthhelp'));\n\n\t\t# NAT Host\n\t\t$h .= \"<div id=\\\"nathost\\\" class=\\\"boxedoptions\\\">\\n\";\n\t\t# use as NAT host\n\t\t$extra = array('onChange' => \"toggleNAThost();\");\n\t\t$h .= labeledFormItem('nathostenabled', i('Use as NAT Host'), 'check', '', '', '1', '', '', $extra);\n\t\t# public IP\n\t\t$errmsg = i(\"Invalid NAT Public IP address specified - must be a valid IPV4 address\");\n\t\t$h .= labeledFormItem('natpublicipaddress', i('NAT Public IP Address'), 'text', $ipreg1, 1, '', $errmsg,\n\t\t '', '', '', helpIcon('natpubliciphelp')); \n\t\t# internal IP\n\t\t$errmsg = i(\"Invalid NAT Internal IP address specified - must be a valid IPV4 address\");\n\t\t$h .= labeledFormItem('natinternalipaddress', i('NAT Internal IP Address'), 'text', $ipreg1, 1, '', $errmsg,\n\t\t '', '', '', helpIcon('natinternaliphelp')); \n\t\t$h .= \"</div>\\n\"; # NAT Host\n\n\t\t$h .= \"</div>\\n\"; # mgmtnodedlgcontent\n\t\t$h .= \"</div>\\n\"; # addeditdlgcontent\n\n\t\t$h .= \"<div id=\\\"addeditdlgerrmsg\\\" class=\\\"nperrormsg\\\"></div>\\n\";\n\t\t$h .= \"<div id=\\\"editdlgbtns\\\" align=\\\"center\\\">\\n\";\n\t\t$h .= dijitButton('addeditbtn', \"Confirm\", \"saveResource();\");\n\t\t$h .= dijitButton('', \"Cancel\", \"dijit.byId('addeditdlg').hide();\");\n\t\t$h .= \"</div>\\n\"; # editdlgbtns\n\t\t$h .= \"</div>\\n\"; # addeditdlg\n\n\t\t$h .= \"<div dojoType=dijit.Dialog\\n\";\n\t\t$h .= \" id=\\\"groupingnote\\\"\\n\";\n\t\t$h .= \" title=\\\"Management Node Grouping\\\"\\n\";\n\t\t$h .= \" duration=250\\n\";\n\t\t$h .= \" draggable=true>\\n\";\n\t\t$h .= \"Each managemente node needs to be a member of a<br>management node resource group. The following dialog<br>will allow you to add the new management node to a group.<br><br>\\n\";\n\t\t$h .= \"<div align=\\\"center\\\">\\n\";\n\t\t$h .= dijitButton('', \"Close\", \"dijit.byId('groupingnote').hide();\");\n\t\t$h .= \"</div>\\n\"; # btn div\n\t\t$h .= \"</div>\\n\"; # groupingnote\n\n\t\t$h .= \"<div dojoType=dijit.Dialog\\n\";\n\t\t$h .= \" id=\\\"groupdlg\\\"\\n\";\n\t\t$h .= \" title=\\\"Management Node Grouping\\\"\\n\";\n\t\t$h .= \" duration=250\\n\";\n\t\t$h .= \" draggable=true>\\n\";\n\t\t$h .= \"<div id=\\\"groupdlgcontent\\\"></div>\\n\";\n\t\t$h .= \"<div align=\\\"center\\\">\\n\";\n\t\t$script = \" dijit.byId('groupdlg').hide();\\n\";\n\t\t$script .= \" checkFirstAdd();\\n\";\n\t\t$h .= dijitButton('', \"Close\", $script);\n\t\t$h .= \"</div>\\n\"; # btn div\n\t\t$h .= \"</div>\\n\"; # groupdlg\n\n\t\t$h .= \"<div id=\\\"tooltips\\\">\\n\";\n\t\t$h .= helpTooltip('sysadminemailhelp', i(\"Comma delimited list of email addresses for sysadmins who should receive error emails from this management node. Leave empty to disable this feature.\"));\n\t\t$h .= helpTooltip('sharedmailboxhelp', i(\"Single email address to which copies of all user emails should be sent. This is a high traffic set of emails. Leave empty to disable this feature.\"));\n\t\t$h .= helpTooltip('checkinhelp', i(\"the number of seconds that this management node will wait before checking the database for tasks.\"));\n\t\t$h .= helpTooltip('installpathhelp', i(\"path to parent directory of image repository directories (typically /install) - only needed with bare metal installs or VMWare with local disk\"));\n\t\t$h .= helpTooltip('timeservershelp', i(\"comma delimited list of time servers for this management node\"));\n\t\t$h .= helpTooltip('identityhelp', i(\"comma delimited list of full paths to ssh identity keys to try when connecting to end nodes (optional)\"));\n\t\t$h .= helpTooltip('sshporthelp', i(\"SSH port this node is listening on for image file transfers\"));\n\t\t$h .= helpTooltip('imagelibhelp', i(\"Enable sharing of images between management nodes. This allows a management node to attempt fetching files for a requested image from other management nodes if it does not have them.\"));\n\t\t$h .= helpTooltip('imagelibgrouphelp', i(\"This management node will try to get image files from other nodes in the selected group.\"));\n\t\t$h .= helpTooltip('imagelibuserhelp', i(\"userid to use for scp when copying image files from another management node\"));\n\t\t$h .= helpTooltip('imagelibkeyhelp', i(\"path to ssh identity key file to use for scp when copying image files from another management node\"));\n\t\t$h .= helpTooltip('ipconfighelp', i(\"Method by which public NIC on nodes controlled by this management node receive their network configuration <ul><li>Dynamic DHCP - nodes receive an address via DHCP from a pool of addresses</li><li>Manual DHCP - nodes always receive the same address via DHCP</li><li>Static - VCL will configure the public address of the node</li></ul>\"));\n\t\t$h .= helpTooltip('netmaskhelp', i(\"Netmask for public NIC\"));\n\t\t$h .= helpTooltip('gatewayhelp', i(\"IP address of gateway for public NIC\"));\n\t\t$h .= helpTooltip('dnsserverhelp', i(\"comma delimited list of IP addresses of DNS servers for public network\"));\n\t\t$h .= helpTooltip('availnetshelp', i(\"This is a list of IP networks, one per line, available to nodes deployed by this management node. Networks should be specified in x.x.x.x/yy form. It is for deploying servers having a fixed IP address to ensure a node is selected that can actually be on the specified network.\"));\n\t\t$h .= helpTooltip('federatedauthhelp', i(\"Comma delimited list of affiliations for which user passwords are not set for Linux image reservations under this management node. Each Linux image is then required to have federated authentication set up so that users' passwords are passed along to the federated authentication system when a user attempts to log in. (for clarity, not set setting user passwords does not mean users have an empty password, but that a federated system must authenticate the users)\"));\n\t\t$h .= helpTooltip('natpubliciphelp', i(\"This is the IP address on the NAT host of the network adapter that is public facing. Users will connect to this IP address.\"));\n\t\t$h .= helpTooltip('natinternaliphelp', i(\"This is the IP address on the NAT host of the network adapter that is facing the internal network. This is how the NAT host will pass traffic to the VCL nodes.\"));\n\t\t$h .= \"</div>\\n\"; # tooltips\n\t\treturn $h;\n\t}", "title": "" }, { "docid": "df0a8321ff7fbce0f32a3028149b1c88", "score": "0.6405262", "text": "public function action_edit()\n\t{\n\t\t$view = View::factory('kohanut/elements/edit',array('element'=>$this));\n\t\t\n\t\tif ($_POST)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->values($_POST);\n\t\t\t\t$this->update();\n\t\t\t\t$view->success = \"Update successfully\";\n\t\t\t}\n\t\t\tcatch (Validate_Exception $e)\n\t\t\t{\n\t\t\t\t$view->errors = $e->array->errors('page');\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $view;\n\t}", "title": "" }, { "docid": "ffbe64971a0b3cbc66a4e920940d5d56", "score": "0.64029235", "text": "function getEditWebSitePage($oWebSite) {\n global $default;\n \n $oUser = User::get($oWebSite->getWebMasterID());\n\n $sToRender .= renderHeading(_(\"Edit Website\"));\n $sToRender .= \"<table>\\n\";\n $sToRender .= \"<tr><td>\" . _(\"Update Website Properties\") . \"</td></tr>\\n\";\n $sToRender .= \"<tr></tr>\\n\";\n $sToRender .= \"<tr></tr>\\n\";\n $sToRender .= \"<tr>\\n\";\n $sToRender .= \"<td>\" . _(\"Webmaster\") . \":</td><td>\" . getUserDisplay($oUser) . \"</td>\\n\";\n $sToRender .= \"</tr>\\n\";\n $sToRender .= \"<tr>\\n\";\n $sToRender .= \"<td>\" . _(\"WebSite Name\") . \": </td><td>\" . getWebSiteName($oWebSite) . \"</td>\\n\";\n $sToRender .= \"<tr>\\n\";\n $sToRender .= \"<td>\" . _(\"WebSite URL\") . \": </td><td>\" . getWebSiteUrl($oWebSite,$iUserID) . \"</td>\\n\";\n $sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<input type=\\\"hidden\\\" name=\\\"fWebSiteID\\\" value=\\\"\" . $oWebSite->getID() . \"\\\">\\n\";\n $sToRender .= \"<tr></tr>\\n\";\n $sToRender .= \"<tr>\\n\";\n $sToRender .= \"<td></td>\" . getUpdateButton($oUser);\n $sToRender .= getCancelButton($oUser);\n $sToRender .= \"</tr>\\n\";\n $sToRender .= \"</table>\\n\";\n\n $sToRender .= \"\\n\\n<script language=\\\"javascript\\\">\\n<!--\\n\";\n\t$sToRender .= \"function validateForm(theForm) {\\n\";\n\t$sToRender .= \"\\tif (!(validRequired(theForm.fWebSiteName, 'WebSite Name'))) {\\n\";\n\t$sToRender .= \"\\t\\treturn false;\\n\";\n\t$sToRender .= \"\\t}\\n\"; \n\t$sToRender .= \"\\tif (!(validRequired(theForm.fWebSiteURL, 'WebSite URL'))) {\\n\";\n\t$sToRender .= \"\\t\\treturn false;\\n\";\n\t$sToRender .= \"\\t}\\n\";\n\t$sToRender .= \"return true;\\n}\\n\";\n\t$sToRender .= \"//-->\\n</script>\\n\\n\";\n \n return $sToRender;\n}", "title": "" }, { "docid": "b5c76593cfeb3f38602e8d89b3a244e8", "score": "0.640077", "text": "public function edit()\n\t{\t\t\n\t\t$form = $this->editForm();\n\t\t$form->setTemplate('LeftAndMain_EditForm');\n\t\t$form->addExtraClass('center cms-content');\n\t\t$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');\n\t\t\t\t\n\t\tRequirements::javascript(BULKEDITTOOLS_MANAGER_PATH . '/javascript/GridFieldBulkEditingForm.js');\t\n\t\tRequirements::css(BULKEDITTOOLS_MANAGER_PATH . '/css/GridFieldBulkEditingForm.css');\t\n\t\tRequirements::add_i18n_javascript(BULKEDITTOOLS_PATH . '/lang/js');\t\n\t\t\n\t\tif($this->request->isAjax())\n\t\t{\n\t\t\t$response = new SS_HTTPResponse(\n\t\t\t\tConvert::raw2json(array( 'Content' => $form->forAjaxTemplate()->getValue() ))\n\t\t\t);\n\t\t\t$response->addHeader('X-Pjax', 'Content');\n\t\t\t$response->addHeader('Content-Type', 'text/json');\n\t\t\t$response->addHeader('X-Title', 'SilverStripe - Bulk '.$this->gridField->list->dataClass.' Editing');\n\t\t\treturn $response;\n\t\t}\n\t\telse {\n\t\t\t$controller = $this->getToplevelController();\n\t\t\treturn $controller->customise(array( 'Content' => $form ));\n\t\t}\n\t}", "title": "" }, { "docid": "71461224e303762fab3844ed06fd5844", "score": "0.6393572", "text": "public function bodyAddForm(&$tableObject,$edit=false){\n\t\t\t$name = $tableObject->name;\n\t\t\t$attributes = $tableObject->attributes;\n\t\t\t$content = \"<h2 id='warning'><?php echo \\$this->message?></h2>\\n\";\n\t\t\t$content.= \"<center>\\n\";\n\t\t\t$content.= \"<form action='<?php echo PATH_APPLICATION; ?>/\".$this->prepareClassName($name).\"/save' method='post'>\\n\";\n\t\t\t$content.= \"<table>\\n\";\n\t\t\t\treset($attributes);\n\t\t\t\tif($edit){\n\t\t\t\t\t$cur = current($attributes);\n\t\t\t\t\t$label = isset($cur->comment) ? $cur->comment : $this->prepareLabelName($cur->name);\n\t\t\t\t\t$content.= $this->setTabText(1).\"<tr style='display:none'>\\n\";\n\t\t\t\t\t\n\t\t\t\t\t\t//Field\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"<td colspan='2'>\\n\";\n\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"<input name='\".$cur->name.\"' value='<?php echo \\$this->\".$name.\"['\".$cur->name.\"'];?>'\";\n\t\t\t\t\t\t\tif($cur->size > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$content.= \" maxlength='\".$cur->size.\"'\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$content.= \" id='\".$cur->name.\"' type='hidden'>\\n\";\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t\t\t$content.= $this->setTabText(1).\"</tr>\\n\";\n\t\t\t\t}\n\t\t\t\t$dateInputs= Array();\n\t\t\t\t$maskedInputs= Array();\n\t\t\t\t$multiPart= false;\n\t\t\t\t$textarea = false;\n\t\t\t\tnext($attributes);\n\t\t\t\twhile($cur = current($attributes)){\n\t\t\t\t\t$def= (substr($cur->defaultValue, 0, 5)=='Exec:')? '': preg_replace('/^\\'|\\'$/', '', $cur->defaultValue);\n\t\t\t\t\t$value = $edit ? \"<?php echo \\$this->\".$name.\"['\".$cur->name.\"']; ?>\" : $def;\n\t\t\t\t\t$label = isset($cur->comment) ? $cur->comment : $this->prepareLabelName($cur->name);\n\t\t\t\t\t$textarea = ($cur->type == 'text' || $cur->size > 200) ? true : false;\n\t\t\t\t\tif($cur->type== 'time')\n\t\t\t\t\t{\n\t\t\t\t\t\t$dateInputs[]= $cur->name;\n\t\t\t\t\t}elseif($cur->type== 'file')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t$multiPart= true;\n\t\t\t\t\t\t }\n\t\t\t\t\tif($cur->mask)\n\t\t\t\t\t{\n\t\t\t\t\t\t$maskedInputs[]= Array($cur->name, $cur->mask);\n\t\t\t\t\t}\n\t\t\t\t\t$content.= $this->setTabText(1).\"<tr>\\n\";\n\t\t\t\t\t\t//Label\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"<td>\\n\";\n\t\t\t\t\t\t\t$content.= $this->setTabText(3).$label.\":\\n\";\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Field\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"<td>\\n\";\n\t\t\t\t\t\tif(!isset($cur->options))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($textarea){\n\t\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"<textarea name='\".$cur->name.\"'\";\n\t\t\t\t\t\t\t\t$content.= \" id='\".$cur->name.\"' style='width:360px; height:210px;'>\".$value.\"</textarea> \\n\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"<input name='\".$cur->name.\"' value='\".$value.\"'\";\n\t\t\t\t\t\t\t\t\tif($cur->size > 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$content.= \" maxlength='\".$cur->size.\"'\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content.= \" id='\".$cur->name.\"' type='\".(($cur->type== 'file')? 'file': 'text').\"'>\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"<select id='\".$cur->name.\"' name='\".$cur->name.\"'>\";\n\t\t\t\t\t\t\t\tif(!$cur->required)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$content.= $this->setTabText(4).\"<option value=''></option>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor($i=0, $j=sizeof($cur->options); $i<$j; $i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$content.= \"\\n\".$this->setTabText(4).\"<option value='\".$cur->options[$i][0].\"' \";\n\t\t\t\t\t\t\t\t\tif($edit)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$content.= \"<?php echo (\\$this->\".$name.\"['\".$cur->name.\"'] == '\".$cur->options[$i][0].\"')? \\\" selected='selected'\\\" : ''; ?> \";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content.= \">\\n\".$this->setTabText(5).$cur->options[$i][1].\"\\n\".$this->setTabText(4).\"</option>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$content.= \"\\n\".$this->setTabText(3).\"</select>\\n\";\n\t\t\t\t\t\t\t\t//print_r($cur->options);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t\t\t$content.= $this->setTabText(1).\"</tr>\\n\";\n\t\t\t\t\t//enctype=\"multipart/form-data\"\n\t\t\t\t\tnext($attributes);\n\t\t\t\t}\n\t\t\t\tif($multiPart)\n\t\t\t\t{\n\t\t\t\t\t$content= preg_replace(\"/\\<form /\", \"<form enctype='multipart/form-data' \", $content, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Foreign Keys\n\t\t\t\t$fks = $this->getForeignKeys($tableObject);\n\t\t\t\treset($fks);\n\t\t\t\twhile($cur = current($fks)){\n\t\t\t\t\t$pk = reset($this->knowledge->tables[$cur]->attributes);\n\t\t\t\t\t$content.= $this->setTabText(1).\"<tr>\\n\";\n\t\t\t\t\t\t//Label\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"<td>\\n\";\n\t\t\t\t\t\t\t$content.= $this->setTabText(3).$this->prepareLabelName($cur).\":\\n\";\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Field\t\t\t\t\t\t\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"<td>\\n\";\n\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"<select name='\".$pk->name.\"'>\\n\";\n\t\t\t\t\t\t\t\t$content.= $this->setTabText(4).\"<?php\\n\";\n\t\t\t\t\t\t\t\t\t$content.= $this->setTabText(5).\"foreach (\\$this->\".$cur.\"Collection as \\$\".$cur.\")\\n\";\n\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(5).\"{\\n\";\n\t\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(6).\"?>\\n\";\n\t\t\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(7).\"<option <?php echo \\$this->\".$name.\"['\".$this->getPrefixNameFK().$cur.\"'] == \\$\".$cur.\"->\".$this->getPrefixNamePK().$cur.\" ? 'selected' : ''; ?> value=\\\"<?php echo \\$\".$cur.\"->\".$pk->name.\"; ?>\\\">\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(8).\"<?php echo \\$\".$cur.\"->\".$this->getOptionLabel($cur).\"; ?>\\n\";\n\t\t\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(7).\"</option>\\n\";\n\t\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(6).\"<?php\\n\";\n\t\t\t\t\t\t\t\t\t$content.=$this->setTabText(5).\"}\\n\";\n\t\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"?>\\n\";\n\t\t\t\t\t\t\t$content.= $this->setTabText(3).\"</select>\\n\";\n\t\t\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t\t\t$content.= $this->setTabText(1).\"</tr>\\n\";\n\t\t\t\t\tnext($fks);\n\t\t\t\t}\n\t\t\t$content.= $this->setTabText(1).\"<tr>\\n\";\n\t\t\t\t$content.= $this->setTabText(2).\"<td>\\n\";\n\t\t\t\t\t$content.= $this->setTabText(3).\"<input type='submit'>\\n\";\n\t\t\t\t$content.= $this->setTabText(2).\"</td>\\n\";\n\t\t\t$content.= $this->setTabText(1).\"</tr>\\n\";\n\t\t\t$content.= \"</table>\\n\";\n\t\t\t$content.= \"</form>\\n</center>\";\n\t\t\t$content.= \"\n\t<script type='text/javascript'>\n\t\t$(function() {\";\n\t\t\tif(sizeof($maskedInputs)>0)\n\t\t\t{\n\t\t\t\tfor($i=0, $j=sizeof($maskedInputs); $i<$j; $i++)\n\t\t\t\t{\n\t\t\t\t\t$content.= \"\n\t\t\t$('#\".$maskedInputs[$i][0].\"').mask('\".$maskedInputs[$i][1].\"');\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(sizeof($dateInputs)>0)\n\t\t\t{\n\t\t\t\tfor($i=0, $j=sizeof($dateInputs); $i<$j; $i++)\n\t\t\t\t{\n\t\t\t\t\t$content.= \"\n\t\t\t$('#\".$dateInputs[$i].\"').datepicker({\n\t\t\t\tchangeMonth: true,\n\t\t\t\tchangeYear: true\n\t\t\t});\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content.= \"\n\t\t});\n\t</script>\";\n\t\t\treturn $content;\n\t\t}", "title": "" }, { "docid": "0fb60a807bd52f5f4c864d360e97ebd7", "score": "0.6385058", "text": "function edit()\n\t{\n\t\tglobal $ilCtrl;\n\t\t\n\t\t$ilCtrl->setCmdClass(\"ilscorm2004pagegui\");\n\t\t$ilCtrl->setCmd(\"edit\");\n\t\t$this->executeCommand();\n\t}", "title": "" }, { "docid": "48b33c4d314289f14e48577cc5f62914", "score": "0.63812923", "text": "function editProperties() {\n global $tpl, $ilTabs;\n\n $ilTabs->activateTab(\"properties\");\n $this->initPropertiesForm();\n $this->getPropertiesValues();\n\n $tpl->setContent($this->form->getHTML());\n }", "title": "" }, { "docid": "3822d3b3b1697f517afd0bfcb51e954e", "score": "0.637503", "text": "function breol_fancy_box_fancy_box_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "title": "" }, { "docid": "577baf78f761c352fe29dce6b00e10b3", "score": "0.6336905", "text": "function _setFormDef()\n\t{\n\t\treturn parent::_setFormDef();\n\t}", "title": "" }, { "docid": "8f90cfd8faa2a8cabfdc7eb4f4096d0d", "score": "0.63357043", "text": "function edit()\n {\n JRequest::setVar('view', 'Domain');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "2f11f636150f7ecbe351bd3e0eb8eeb7", "score": "0.6321855", "text": "public function cc_form() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "43159eae49558dc3ee7a5cbd445cb897", "score": "0.6320244", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "b1bae600895279828c7738c4d4978ffb", "score": "0.63154316", "text": "function ign_self_edit($atts)\n {\n\t global $ign_user_db, $ign_user, $ign_err, $ign_use_custom, $step;\n\n\t extract(lAtts(array(\n\t\t 'form' => 'self_edit_form',\n\t\t\t ), $atts, 0)\n\t );\n\n\t //requires custom db (doesn't work on txp_users)\n\t if (!$ign_use_custom) return ''; //exit if not ign_use_custom\n\n\t $step = gps('step');\n\n\t //check if user is logged in\n\t if (!empty($ign_user))\n\t {\n\t\t if (!empty($step) && $step == 'ign_update_self')\n\t\t {\n\t\t\t //do update routine\n\t\t\t $out = ign_update_self($atts);\n\t\t\t return $out;\n\t\t }\n\n\t\t\t list($form_action) = explode('?', $_SERVER['REQUEST_URI']);\n\n\t\t\t $use_form = @fetch_form($form);\n\t\t\t if(empty($use_form) || $use_form == \"<p>form <strong>$form</strong> does not exist</p>\")\n\t\t\t {\n\t\t\t\t $use_form = ign_default_form('self_edit');\n\t\t\t }\n\n\t\t return\n\t\t\t \"<form action='{$form_action}' method='post'>\".\n\t\t\t eInput('ign_self_edit'). n .sInput('ign_update_self').\n\t\t\t n.parse($use_form).n.\n\t\t\t '</form>';\n\n\t }\n\t return '';\n }", "title": "" }, { "docid": "cf01723b8dff4fc54232d0189268ea21", "score": "0.63143814", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "b40344cb8bb06ecd8e1c33355b079160", "score": "0.6312247", "text": "abstract function getForm();", "title": "" }, { "docid": "33a97a8dfafc50a5f1e2d3623b0bf104", "score": "0.6309371", "text": "public function edit_saveEditForm() {\n $this->ajax_newChild($this->User);\n $this->render('/AppAjax/edit_tree');\n }", "title": "" }, { "docid": "cee06621accee02d5c964a4953265b4b", "score": "0.629539", "text": "function panels_mini_panels_mini_content_type_edit_form($form, &$form_state) {\n // Empty form to ensure we have the override title + context gadgets.\n return $form;\n}", "title": "" }, { "docid": "42fe34efc6045472f182ae23c6a5cfb1", "score": "0.6284622", "text": "function editProperties() {\n\t\tglobal $tpl, $ilTabs;\n\t\t\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t$this->initPropertiesForm();\n\t\t$this->getPropertiesValues();\n\t\t\n\t\t$this->initQuestionFinishForm();\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "bd55c6cca624fddd49faf3e7f8d44ebc", "score": "0.62812316", "text": "public function editAction()\n {\n// \treturn array('form'=>$form);\n }", "title": "" }, { "docid": "063d19f4823533676526be20147ddbbc", "score": "0.62803173", "text": "public function setForm() {\n\t\t$this->setMethod('post');\n\t\t$this->setFormTranslator();\n\t\t$this->addFullName();\n\t\t$this->addPhone();\n\t\t$this->addDriversLicenseAndState();\n\t\t$this->addFormerLastName();\n\t\t$this->addBirthDate();\n\t\t$this->addSsn();\n\t\t$this->addHeight();\n\t\t$this->addWeight();\n\t\t$this->addSex();\n\t\t$this->addEyeColor();\n\t\t$this->addHairColor();\n\t\t$this->addMaritalStatus();\n\t\t$this->addUsCitizen();\n\t\t$this->addDoYouSmoke();\n\t\t$this->addPets();\n\t\t$this->addPetDetails();\n\t\t$this->addSubmitButton();\n\t\t$this->setLegend('aboutYou');\n\t\t$this->setDisplayGroup();\n\t}", "title": "" }, { "docid": "bab57ad3855ad659378bb6246bcb88a7", "score": "0.62785834", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'race' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar( 'hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "14eb76aad7c23cad4dda49770690785c", "score": "0.6278172", "text": "public function editRequest(){\n\t\t\n\t\t//Gets the Id\n\t\t$id = $this->getInputString(\"id\", -1, \"G\");\n\t\t\n\t\t$d = $this->getMenuItems();\n\t\t\n\t\t$pages = \"\"; \n\t\t\n\t\t$out = $this->getFragment(\"editItem\");\n\t\t\n\t\tif($d[$id][2]==\"in\"){\n\t\t\t$link = str_replace(\"index.php?page=\", \"\", $d[$id][1]);\n\n\t\t\t$pages = $this->getPages($link);\n\t\t\t\n\t\t\t$out = str_replace(\"%EXTERNAL_LINK%\", \"\", $out);\n\t\t}else{\n\t\t\t$pages = $this->getPages();\t\n\t\t\t\n\t\t\t$out = str_replace(\"%EXTERNAL_LINK%\", $d[$id][1], $out);\n\t\t}\n\t\t\n\t\t$out = str_replace(\"%INTERNAL_PAGES%\",$pages, $out);\n\t\t\n\t\t$out = str_replace(\"%MENU_ID%\", $id, $out);\n\t\t\n\t\t$out = str_replace(\"%TITLE%\", $d[$id][0], $out);\n\t\t\t\t\n\t\t//Gets a fragment and sets it as content\n\t\t$this->setContent(\n\t\t\t\t\t\t\t$out\n\t\t\t\t\t\t );\n\t}", "title": "" }, { "docid": "26d6f7f69fa09e951e76a892ceab6a05", "score": "0.62737113", "text": "public function form()\n {\n global $L;\n\n $html = '<div class=\"alert alert-primary\" role=\"alert\">';\n $html .= $this->description();\n $html .= '</div>';\n\n $html .= '<div>';\n $html .= '<label>'.$L->get('Forum URL').'</label>';\n $html .= '<input name=\"forum_url\" value=\"'.$this->getValue('forum_url').'\">';\n $html .= '<span class=\"tip\">'.$L->get('The full URL to your Vanilla Forum.').'</span>';\n $html .= '</div>';\n\n $html .= '<div>';\n $html .= '<label>'.$L->get('Category ID').'</label>';\n $html .= '<input name=\"category_id\" value=\"'.$this->getValue('category_id').'\">';\n $html .= '<span class=\"tip\">'.$L->get('Optional. Specify the forum category ID where new discussions should be posted to. You can create a \"Blog\" category in your forum and have all comments grouped there, for example. Copy the ID from your broeser\\'s address bar when you edit a category in the Vanilla Forums dashboard, e.g. example-forum.com/vanilla/settings/editcategory?categoryid=6 yields the ID \"6\". Leave empty to use the forum default.').'</span>';\n $html .= '</div>';\n\n $html .= '<div>';\n $html .= '<label>'.$L->get('Position').'</label>';\n $html .= '<select name=\"position\">';\n $html .= '<option value=\"disabled\" '. ($this->getValue('position')==='disabled'?'selected':'').'>'.$L->get('Disabled').'</option>';\n $html .= '<option value=\"siteBodyBegin\" '.($this->getValue('position')==='siteBodyBegin'?'selected':'').'>'.$L->get('siteBodyBegin').'</option>';\n $html .= '<option value=\"pageBegin\" '. ($this->getValue('position')==='pageBegin'?'selected':'').'>'.$L->get('pageBegin').'</option>';\n $html .= '<option value=\"pageEnd\" '. ($this->getValue('position')==='pageEnd'?'selected':'').'>'.$L->get('pageEnd').'</option>';\n $html .= '<option value=\"siteBodyEnd\" '. ($this->getValue('position')==='siteBodyEnd'?'selected':'').'>'.$L->get('siteBodyEnd').'</option>';\n $html .= '</select>';\n $html .= '<span class=\"tip\">'.$L->get('Where to show the page comments, if enabled.').'</span>';\n $html .= '</div>';\n\n return $html;\n }", "title": "" }, { "docid": "00f9f4db7dfdf1beadd8a61197ac8356", "score": "0.6269871", "text": "function showTextEditForm( &$appctx )\n\t\t{\n\t\t$appctx->Indent() ; echo( \"<div class=\\\"texteditform\\\" id=\\\"texteditform\\\">\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetBold() ;\\\"><b>B</b></button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#ff0000\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#00ff00\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#0000ff\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#ffff00\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#ff00ff\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#00ffff\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#ffffff\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSetColor( this );\\\" style=\\\"color:#000000\\\">A</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<label>Taille:</label>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<select onchange=\\\"onSetFontSize( this.value );\\\">\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=1>1</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=2>2</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=3>3</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=4>4</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=5>5</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=6>6</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=7>7</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=8>8</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=9>9</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=10>10</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=11>11</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=12>12</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=13>13</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=14>14</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<option value=15>15</option>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"</select>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onClearStyle() ;\\\">Clear style</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onClear() ;\\\">Clear all</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"<button onclick=\\\"onSaveText();\\\">Valider</button>\\n\" ) ;\n\t\t$appctx->Indent() ; echo( \"</div>\\n\" ) ;\n\t\t}", "title": "" }, { "docid": "0e8ab641160650c7813e6a86a8a5bda3", "score": "0.6263628", "text": "public function do_edit()\n {\n //\n }", "title": "" }, { "docid": "57080f3bc363e8d7250aa7160f24403a", "score": "0.6257167", "text": "function book_edit_form($data) {\n $book = new Book();\n $book->byID($data['id']);\n $frm = new DbForm();\n $frm->build('book_edit_form', $book, $_SESSION['log_access_level']);\n}", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.62553847", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.62553847", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.62553847", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.62553847", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.62553847", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "eab196512dfa464446a17de27d1da7a5", "score": "0.62285197", "text": "public function render_edit_form() {\n\n $thread = self::thread();\n\n $thread_info = $thread->get_threadInfo();\n\n $thread_data = $thread_info['thread'];\n\n $forum_settings = self::get_forum_settings();\n\n $locale = fusion_get_locale(\"\", [FORUM_LOCALE, FORUM_TAGS_LOCALE]);\n\n $userdata = fusion_get_userdata();\n\n if ((!iMOD or !iSUPERADMIN) && $thread_data['thread_locked'])\n redirect(INFUSIONS.'forum/index.php');\n\n if (isset($_GET['post_id']) && isnum($_GET['post_id'])) {\n\n add_to_title($locale['global_201'].$locale['forum_0360']);\n BreadCrumbs::getInstance()->addBreadCrumb(['link' => FUSION_REQUEST, 'title' => $locale['forum_0360']]);\n\n $result = dbquery(\"SELECT tp.*, tt.thread_subject, tt.thread_poll, tt.thread_author, tt.thread_locked, MIN(tp2.post_id) AS first_post\n FROM \".DB_FORUM_POSTS.\" tp\n INNER JOIN \".DB_FORUM_THREADS.\" tt ON tp.thread_id=tt.thread_id\n INNER JOIN \".DB_FORUM_POSTS.\" tp2 ON tp.thread_id=tp2.thread_id\n WHERE tp.post_id='\".intval($_GET['post_id']).\"' AND tp.thread_id='\".intval($thread_data['thread_id']).\"' AND tp.forum_id='\".intval($thread_data['forum_id']).\"'\n GROUP BY tp2.post_id\n \");\n\n // Permission to edit\n if (dbrows($result) > 0) {\n\n $post_data = dbarray($result);\n\n if ((iMOD or iSUPERADMIN) || ($thread->getThreadPermission(\"can_reply\") && $post_data['post_author'] == $userdata['user_id'])) {\n\n $is_first_post = ($post_data['post_id'] == $thread_info['post_firstpost']) ? TRUE : FALSE;\n\n // no edit if locked\n if ($post_data['post_locked'] && !iMOD) {\n redirect(FORUM.\"postify.php?post=edit&error=5&forum_id=\".$thread_data['forum_id'].\"&thread_id=\".$thread_data['thread_id'].\"&post_id=\".$post_data['post_id']);\n }\n\n // no edit if time limit reached\n if (!iMOD && ($forum_settings['forum_edit_timelimit'] > 0 && (TIME - $forum_settings['forum_edit_timelimit'] * 60) > $post_data['post_datestamp'])) {\n redirect(FORUM.\"postify.php?post=edit&error=6&forum_id=\".$thread_data['forum_id'].\"&thread_id=\".$thread_data['thread_id'].\"&post_id=\".$post_data['post_id']);\n }\n\n if (isset($_POST['cancel']) && !empty($thread_data['thread_id'])) {\n\n if (fusion_get_settings(\"site_seo\")) {\n redirect(fusion_get_settings(\"siteurl\").\"infusions/forum/viewthread.php?thread_id=\".$thread_data['thread_id']);\n }\n redirect(FORUM.'viewthread.php?thread_id='.$thread_data['thread_id']);\n\n } else if (isset($_POST['post_edit'])) {\n\n require_once INCLUDES.\"flood_include.php\";\n\n if (!flood_control(\"post_datestamp\", DB_FORUM_POSTS, \"post_author='\".$userdata['user_id'].\"'\")) { // have notice\n\n $post_data = [\n 'forum_id' => $thread_data['forum_id'],\n 'thread_id' => $thread_data['thread_id'],\n 'post_id' => $post_data['post_id'],\n 'thread_subject' => '',\n 'post_message' => form_sanitizer($_POST['post_message'], '', 'post_message'),\n 'post_showsig' => isset($_POST['post_showsig']) ? 1 : 0,\n 'post_smileys' => isset($_POST['post_smileys']) || isset($_POST['post_message']) && preg_match(\"#(\\[code\\](.*?)\\[/code\\]|\\[geshi=(.*?)\\](.*?)\\[/geshi\\]|\\[php\\](.*?)\\[/php\\])#si\", $_POST['post_message']) ? 1 : 0,\n 'post_author' => $post_data['post_author'],\n 'post_datestamp' => $post_data['post_datestamp'], // update on datestamp or not?\n 'post_ip' => USER_IP,\n 'post_ip_type' => USER_IP_TYPE,\n 'post_edituser' => $userdata['user_id'],\n 'post_edittime' => isset($_POST['hide_edit']) ? 0 : time(),\n 'post_editreason' => form_sanitizer($_POST['post_editreason'], '', 'post_editreason'),\n 'post_hidden' => 0,\n 'notify_me' => 0,\n 'post_locked' => $forum_settings['forum_edit_lock'] || isset($_POST['thread_locked']) ? 1 : 0\n ];\n\n // require thread_subject if first post\n if ($is_first_post) {\n $post_data['thread_subject'] = form_sanitizer($_POST['thread_subject'], '', 'thread_subject');\n $_POST['thread_tags'] = isset($_POST['thread_tags']) ? $_POST['thread_tags'] : '';\n $current_thread_tags = form_sanitizer($_POST['thread_tags'], '', 'thread_tags');\n if ($thread_data['thread_tags'] !== $current_thread_tags) {\n // Assign the old ones into history\n $thread_data['thread_tags_old'] = $thread_data['thread_tags'];\n $thread_data['thread_tags_change'] = time();\n }\n\n $thread_data['thread_tags'] = $current_thread_tags;\n $thread_data['thread_subject'] = $post_data['thread_subject'];\n $thread_data['thread_locked'] = $post_data['post_locked'];\n }\n\n $thread_data['thread_sticky'] = isset($_POST['thread_sticky']) ? 1 : 0;\n\n if (\\defender::safe()) {\n\n // If post delete checkbox\n $this->delete_post($post_data['post_id'], $post_data['thread_id'], $post_data['forum_id']);\n\n // Update thread subject\n if ($is_first_post) {\n dbquery_insert(DB_FORUM_THREADS, $thread_data, \"update\", [\"keep_session\" => TRUE]);\n }\n\n // Prepare forum merging action\n $last_post_author = dbarray(dbquery(\"SELECT post_author FROM \".DB_FORUM_POSTS.\" WHERE thread_id='\".$thread_data['thread_id'].\"' ORDER BY post_id DESC LIMIT 1\"));\n if ($last_post_author == $post_data['post_author'] && $thread_data['forum_merge']) {\n $last_message = dbarray(dbquery(\"SELECT post_id, post_message FROM \".DB_FORUM_POSTS.\" WHERE thread_id='\".$thread_data['thread_id'].\"' ORDER BY post_id DESC\"));\n $post_data['post_id'] = $last_message['post_id'];\n $post_data['post_message'] = $last_message['post_message'].\"\\n\\n\".$locale['forum_0640'].\" \".showdate(\"longdate\", time()).\":\\n\".$post_data['post_message'];\n dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', ['primary_key' => 'post_id', 'keep_session' => TRUE]);\n } else {\n dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', ['primary_key' => 'post_id', 'keep_session' => TRUE]);\n }\n\n // Delete attachments if there is any\n foreach ($_POST as $key => $value) {\n if (!strstr($key, \"delete_attach\"))\n continue;\n $key = str_replace(\"delete_attach_\", \"\", $key);\n $result = dbquery(\"SELECT * FROM \".DB_FORUM_ATTACHMENTS.\" WHERE post_id='\".$post_data['post_id'].\"' AND attach_id='\".(isnum($key) ? $key : 0).\"'\");\n if (dbrows($result) != 0 && $value) {\n $adata = dbarray($result);\n unlink(FORUM.\"attachments/\".$adata['attach_name']);\n dbquery(\"DELETE FROM \".DB_FORUM_ATTACHMENTS.\" WHERE post_id='\".$post_data['post_id'].\"' AND attach_id='\".(isnum($key) ? $key : 0).\"'\");\n }\n }\n\n if (!empty($_FILES) && is_uploaded_file($_FILES['file_attachments']['tmp_name'][0]) && $thread->getThreadPermission(\"can_upload_attach\")) {\n $upload = form_sanitizer($_FILES['file_attachments'], '', 'file_attachments');\n if ($upload['error'] == 0) {\n foreach ($upload['target_file'] as $arr => $file_name) {\n $attachment = ['thread_id' => $thread_data['thread_id'],\n 'post_id' => $post_data['post_id'],\n 'attach_name' => $file_name,\n 'attach_mime' => $upload['type'][$arr],\n 'attach_size' => $upload['source_size'][$arr],\n 'attach_count' => '0', // downloaded times?\n ];\n dbquery_insert(DB_FORUM_ATTACHMENTS, $attachment, 'save', ['keep_session' => TRUE]);\n }\n }\n }\n\n if (\\defender::safe()) {\n redirect(FORUM.\"postify.php?post=edit&error=0&amp;forum_id=\".intval($post_data['forum_id']).\"&amp;thread_id=\".intval($post_data['thread_id']).\"&amp;post_id=\".intval($post_data['post_id']));\n }\n }\n }\n }\n\n // template data\n $form_action = FORUM.\"viewthread.php?action=edit&amp;forum_id=\".$thread_data['forum_id'].\"&amp;thread_id=\".$thread_data['thread_id'].\"&amp;post_id=\".$_GET['post_id'];\n\n // get attachment.\n $attachments = [];\n $attach_rows = 0;\n if ($thread->getThreadPermission(\"can_upload_attach\") && !empty($thread_info['post_items'][$post_data['post_id']]['post_attachments'])) { // need id\n $a_result = dbquery(\"SELECT * FROM \".DB_FORUM_ATTACHMENTS.\" WHERE post_id='\".intval($post_data['post_id']).\"' AND thread_id='\".intval($thread_data['thread_id']).\"'\");\n $attach_rows = dbrows($a_result);\n if ($attach_rows > 0) {\n while ($a_data = dbarray($a_result)) {\n $attachments[] = $a_data;\n }\n }\n }\n\n $info = [\n 'title' => $locale['forum_0507'],\n 'description' => $locale['forum_2000'].$thread_data['thread_subject'],\n 'openform' => openform('input_form', 'post', $form_action, ['enctype' => $thread->getThreadPermission(\"can_upload_attach\") ? TRUE : FALSE]),\n 'closeform' => closeform(),\n 'forum_id_field' => form_hidden('forum_id', '', $post_data['forum_id']),\n 'thread_id_field' => form_hidden('thread_id', '', $post_data['thread_id']),\n 'tags_field' => $is_first_post ? form_select('thread_tags[]', $locale['forum_tag_0100'], $thread_data['thread_tags'],\n [\n 'options' => $this->tag()->get_TagOpts(),\n 'inner_width' => '100%',\n 'multiple' => TRUE,\n 'delimiter' => '.',\n 'max_select' => 3, // to do settings on this\n ]) : '',\n \"forum_field\" => \"\",\n 'subject_field' => $thread_info['post_firstpost'] == $_GET['post_id'] ?\n form_text('thread_subject', $locale['forum_0051'], $thread_data['thread_subject'],\n ['required' => TRUE,\n 'placeholder' => $locale['forum_2001'],\n \"class\" => 'm-t-20 m-b-20'])\n : form_hidden(\"thread_subject\", \"\", $thread_data['thread_subject']),\n 'message_field' => form_textarea('post_message', $locale['forum_0601'], $post_data['post_message'],\n ['required' => TRUE,\n 'height' => '300px',\n 'preview' => TRUE,\n 'no_resize' => FALSE,\n 'form_name' => 'input_form',\n 'bbcode' => TRUE\n ]),\n // happens only in EDIT\n 'delete_field' => form_checkbox('delete', $locale['forum_0624'], '', ['class' => 'm-b-0', 'reverse_label' => TRUE]),\n 'edit_reason_field' => form_text('post_editreason', $locale['forum_0611'], $post_data['post_editreason'], ['placeholder' => '', 'class' => 'm-t-20 m-b-20']),\n 'attachment_field' => $thread->getThreadPermission(\"can_upload_attach\") ?\n form_fileinput('file_attachments[]', $locale['forum_0557'], \"\",\n ['input_id' => 'file_attachments',\n 'upload_path' => FORUM.'attachments/',\n 'type' => 'object',\n 'template' => 'modern',\n 'multiple' => TRUE,\n 'max_count' => $attach_rows > 0 ? $forum_settings['forum_attachmax_count'] - $attach_rows : $forum_settings['forum_attachmax_count'],\n 'max_byte' => $forum_settings['forum_attachmax'],\n 'valid_ext' => $forum_settings['forum_attachtypes']]).\"\n <div class='m-b-20'>\\n<small>\".sprintf($locale['forum_0559'], parsebytesize($forum_settings['forum_attachmax']), str_replace('|', ', ', $forum_settings['forum_attachtypes']), $forum_settings['forum_attachmax_count']).\"</small>\\n</div>\\n\"\n : \"\",\n // only happens during edit on first post or new thread AND has poll -- info['forum_poll'] && checkgroup($info['forum_poll']) && ($data['edit'] or $data['new']\n \"poll_form\" => '',\n 'smileys_field' => form_checkbox('post_smileys', $locale['forum_0622'], $post_data['post_smileys'], ['class' => 'm-b-0', 'reverse_label' => TRUE]),\n 'signature_field' => (array_key_exists(\"user_sig\", $userdata) && $userdata['user_sig']) ? form_checkbox('post_showsig', $locale['forum_0170'], $post_data['post_showsig'], ['class' => 'm-b-0', 'reverse_label' => TRUE]) : '',\n //sticky only in new thread or edit first post\n 'sticky_field' => ((iMOD || iSUPERADMIN) && $is_first_post) ? form_checkbox('thread_sticky', $locale['forum_0620'], $thread_data['thread_sticky'], ['class' => 'm-b-0', 'reverse_label' => TRUE]) : '',\n 'lock_field' => (iMOD || iSUPERADMIN) ? form_checkbox('thread_locked', $locale['forum_0621'], $thread_data['thread_locked'], ['class' => 'm-b-0', 'reverse_label' => TRUE]) : '',\n 'hide_edit_field' => form_checkbox('hide_edit', $locale['forum_0627'], (!empty($post_data['post_editreason']) && empty($post_data['post_edittime']) ? 1 : 0), ['class' => 'm-b-0', 'reverse_label' => TRUE]),\n // edit mode only\n 'post_locked_field' => (iMOD || iSUPERADMIN) ? form_checkbox('post_locked', $locale['forum_0628'], $post_data['post_locked'], ['class' => 'm-b-0', 'reverse_label' => TRUE]) : '',\n // edit mode only\n // not available in edit mode.\n 'notify_field' => '',\n //$forum_settings['thread_notify'] ? form_checkbox('notify_me', $locale['forum_0171'], $post_data['notify_me'], array('class' => 'm-b-0')) : '',\n 'post_buttons' => form_button('post_edit', $locale['save'], $locale['save'], ['class' => 'btn-primary']).form_button('cancel', $locale['cancel'], $locale['cancel'], ['class' => 'btn-default m-l-10']),\n 'last_posts_reply' => ''\n ];\n $a_info = '';\n if (!empty($attachments)) {\n foreach ($attachments as $a_data) {\n $a_info .= form_checkbox(\"delete_attach_\".$a_data['attach_id'],\n $locale['forum_0625'], 0,\n [\n \"reverse_label\" => TRUE,\n \"ext_tip\" => \"<a href='\".FORUM.\"attachments/\".$a_data['attach_name'].\"'>\".$a_data['attach_name'].\"</a> [\".parsebytesize($a_data['attach_size']).\"]\"\n ]);\n }\n\n $info['attachment_field'] = $a_info.$info['attachment_field'];\n }\n\n display_forum_postform($info);\n\n } else {\n if (fusion_get_settings(\"site_seo\")) {\n redirect(fusion_get_settings(\"siteurl\").\"infusions/forum/index.php\");\n }\n redirect(FORUM.'index.php'); // no access\n }\n } else {\n redirect(FORUM.\"postify.php?post=edit&error=4&forum_id=\".$thread_data['forum_id'].\"&thread_id=\".$thread_data['thread_id'].\"&post_id=\".$_GET['post_id']);\n }\n } else {\n if (fusion_get_settings(\"site_seo\")) {\n redirect(fusion_get_settings(\"siteurl\").\"infusions/forum/index.php\");\n }\n redirect(FORUM.\"index.php\");\n }\n }", "title": "" }, { "docid": "09557f31025bbb9b8bfcdb9e93ab25c6", "score": "0.6227648", "text": "function content_field_edit_form(&$form_state, $type_name, $field_name) {\n $output = '';\n $type = content_types($type_name);\n $field = $type['fields'][$field_name];\n\n if ($field['locked']) {\n $output = array();\n $output['locked'] = array(\n '#value' => t('The field %field is locked and cannot be edited.', array('%field' => $field['widget']['label'])),\n );\n return $output;\n }\n\n $field_types = _content_field_types();\n $field_type = $field_types[$field['type']];\n $widget_types = _content_widget_types();\n $widget_type = $widget_types[$field['widget']['type']];\n\n $title = isset($field['widget']['label']) ? $field['widget']['label'] : $field['field_name'];\n drupal_set_title(check_plain($title));\n\n // See if we need to change the widget type or label.\n if (isset($form_state['change_basic'])) {\n module_load_include('inc', 'content', 'includes/content.crud');\n $field_values = content_field_instance_collapse($field);\n return content_field_basic_form($form_state, $field_values);\n }\n\n $add_new_sequence = isset($_REQUEST['destinations']);\n\n // Remove menu tabs when we are in an 'add new' sequence.\n if ($add_new_sequence) {\n menu_set_item(NULL, menu_get_item('node'));\n }\n\n $form = array();\n $form['#field'] = $field;\n $form['#type'] = $type;\n\n // Basic iformation : hide when we are in an 'add new' sequence.\n $form['basic'] = array(\n '#type' => 'fieldset',\n '#title' => t('%type basic information', array('%type' => $type['name'])),\n '#access' => !$add_new_sequence,\n );\n $form['basic']['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Label'),\n '#value' => $field['widget']['label'],\n '#disabled' => TRUE,\n );\n $form['basic']['field_name'] = array(\n '#type' => 'hidden',\n '#title' => t('Field name'),\n '#value' => $field['field_name'],\n '#disabled' => TRUE,\n );\n $form['basic']['type'] = array(\n '#type' => 'hidden',\n '#title' => t('Field type'),\n '#value' => $field['type'],\n '#disabled' => TRUE,\n );\n $widget_options = content_widget_type_options($field['type']);\n $form['basic']['widget_type'] = array(\n '#type' => 'select',\n '#title' => t('Widget type'),\n '#options' => $widget_options,\n '#default_value' => $field['widget']['type'] ? $field['widget']['type'] : key($widget_options),\n '#disabled' => TRUE,\n );\n $form['basic']['change'] = array(\n '#type' => 'submit',\n '#value' => t('Change basic information'),\n '#submit' => array('content_field_edit_form_submit_update_basic'),\n );\n\n $form['widget'] = array(\n '#type' => 'fieldset',\n '#title' => t('%type settings', array('%type' => $type['name'])),\n '#description' => t('These settings apply only to the %field field as it appears in the %type content type.', array(\n '%field' => $field['widget']['label'],\n '%type' => $type['name'])),\n );\n $form['widget']['weight'] = array(\n '#type' => 'hidden',\n '#default_value' => $field['widget']['weight'],\n );\n\n $additions = (array) module_invoke($widget_type['module'], 'widget_settings', 'form', $field['widget']);\n drupal_alter('widget_settings', $additions, 'form', $field['widget']);\n $form['widget'] = array_merge($form['widget'], $additions);\n\n $form['widget']['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Help text'),\n '#default_value' => $field['widget']['description'],\n '#rows' => 5,\n '#description' => t('Instructions to present to the user below this field on the editing form.<br />Allowed HTML tags: @tags', array('@tags' => _content_filter_xss_display_allowed_tags())),\n '#required' => FALSE,\n );\n\n // Add handling for default value if not provided by field.\n if (content_callback('widget', 'default value', $field) == CONTENT_CALLBACK_DEFAULT) {\n\n // Store the original default value for use in programmed forms.\n // Set '#default_value' instead of '#value' so programmed values\n // can override whatever we set here.\n $default_value = isset($field['widget']['default_value']) ? $field['widget']['default_value'] : array();\n $default_value_php = isset($field['widget']['default_value_php']) ? $field['widget']['default_value_php'] : '';\n $form['widget']['default_value'] = array(\n '#type' => 'value',\n '#default_value' => $default_value,\n );\n $form['widget']['default_value_php'] = array(\n '#type' => 'value',\n '#default_value' => $default_value_php,\n );\n\n // We can't tell at the time we build the form if this is a programmed\n // form or not, so we always end up adding the default value widget\n // even if we won't use it.\n $form['widget']['default_value_fieldset'] = array(\n '#type' => 'fieldset',\n '#title' => t('Default value'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n // Default value widget.\n $widget_form = array('#node' => (object) array('type' => $type_name));\n $widget_form_state = array('values' => array($field['field_name'] => $default_value));\n // Make sure the default value is not a required field.\n $widget_field = $field;\n $widget_field['required'] = FALSE;\n module_load_include('inc', 'content', 'includes/content.node_form');\n $form_element = content_field_form($widget_form, $widget_form_state, $widget_field, 0);\n $form['widget']['default_value_fieldset']['default_value_widget'] = $form_element;\n $form['widget']['default_value_fieldset']['default_value_widget']['#tree'] = TRUE;\n // Set up form info that the default value widget will need to find in the form.\n $form['#field_info'] = array($widget_field['field_name'] => $widget_field);\n\n // Advanced: PHP code.\n $form['widget']['default_value_fieldset']['advanced_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('PHP code'),\n '#collapsible' => TRUE,\n '#collapsed' => empty($field['widget']['default_value_php']),\n );\n\n if (user_access('Use PHP input for field settings (dangerous - grant with care)')) {\n $db_info = content_database_info($field);\n $columns = array_keys($db_info['columns']);\n foreach ($columns as $key => $column) {\n $columns[$key] = t(\"'@column' => value for @column\", array('@column' => $column));\n }\n $sample = t(\"return array(\\n 0 => array(@columns),\\n // You'll usually want to stop here. Provide more values\\n // if you want your 'default value' to be multi-valued:\\n 1 => array(@columns),\\n 2 => ...\\n);\", array('@columns' => implode(', ', $columns)));\n\n $form['widget']['default_value_fieldset']['advanced_options']['default_value_php'] = array(\n '#type' => 'textarea',\n '#title' => t('Code'),\n '#default_value' => isset($field['widget']['default_value_php']) ? $field['widget']['default_value_php'] : '',\n '#rows' => 6,\n '#tree' => TRUE,\n '#description' => t('Advanced usage only: PHP code that returns a default value. Should not include &lt;?php ?&gt; delimiters. If this field is filled out, the value returned by this code will override any value specified above. Expected format: <pre>!sample</pre>To figure out the expected format, you can use the <em>devel load</em> tab provided by <a href=\"@link_devel\">devel module</a> on a %type content page.', array(\n '!sample' => $sample,\n '@link_devel' => 'http://www.drupal.org/project/devel',\n '%type' => $type_name)),\n );\n }\n else {\n $form['widget']['default_value_fieldset']['advanced_options']['markup_default_value_php'] = array(\n '#type' => 'item',\n '#title' => t('Code'),\n '#value' => !empty($field['widget']['default_value_php']) ? '<code>'. check_plain($field['widget']['default_value_php']) .'</code>' : t('&lt;none&gt;'),\n '#description' => empty($field['widget']['default_value_php']) ? t(\"You're not allowed to input PHP code.\") : t('This PHP code was set by an administrator and will override any value specified above.'),\n );\n }\n }\n\n $form['field'] = array(\n '#type' => 'fieldset',\n '#title' => t('Global settings'),\n '#description' => t('These settings apply to the %field field in every content type in which it appears.', array('%field' => $field['widget']['label'])),\n );\n $form['field']['required'] = array(\n '#type' => 'checkbox',\n '#title' => t('Required'),\n '#default_value' => $field['required'],\n );\n $description = t('Maximum number of values users can enter for this field.');\n if (content_handle('widget', 'multiple values', $field) == CONTENT_HANDLE_CORE) {\n $description .= '<br/>'. t(\"'Unlimited' will provide an 'Add more' button so the users can add as many values as they like.\");\n }\n $description .= '<br/><strong>'. t('Warning! Changing this setting after data has been created could result in the loss of data!') .'</strong>';\n $form['field']['multiple'] = array(\n '#type' => 'select',\n '#title' => t('Number of values'),\n '#options' => array(1 => t('Unlimited'), 0 => 1) + drupal_map_assoc(range(2, 10)),\n '#default_value' => $field['multiple'],\n '#description' => $description,\n );\n\n $form['field']['previous_field'] = array(\n '#type' => 'hidden',\n '#value' => serialize($field),\n );\n\n $additions = (array) module_invoke($field_type['module'], 'field_settings', 'form', $field);\n drupal_alter('field_settings', $additions, 'form', $field);\n $form['field'] = array_merge($form['field'], $additions);\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save field settings'),\n );\n $form['type_name'] = array(\n '#type' => 'value',\n '#value' => $type_name,\n );\n $form['field_name'] = array(\n '#type' => 'value',\n '#value' => $field_name,\n );\n $form['type'] = array(\n '#type' => 'value',\n '#value' => $field['type'],\n );\n $form['module'] = array(\n '#type' => 'value',\n '#value' => $field['module'],\n );\n $form['widget']['label'] = array(\n '#type' => 'value',\n '#value' => $field['widget']['label'],\n );\n $form['widget_module'] = array(\n '#type' => 'value',\n '#value' => $field['widget']['module'],\n );\n $form['columns'] = array(\n '#type' => 'value',\n '#value' => $field['columns'],\n );\n return $form;\n}", "title": "" }, { "docid": "d2658c38c02f0d63febbf4f1ee669a29", "score": "0.6225122", "text": "function post_page_edit($post) {\n return drupal_get_form('post_form', $post);\n}", "title": "" }, { "docid": "ee6b722022553a7d7fdeba621b0785c8", "score": "0.62245685", "text": "private function read_edit()\r\n {\r\n }", "title": "" }, { "docid": "cd7ff09d1d119e6746e226bd425b2d43", "score": "0.62226087", "text": "function edit_factor(){\n return drupal_get_form('edit_factor_form');\n}", "title": "" }, { "docid": "04ee65b4e9e4da48de71cb25dc072793", "score": "0.62217563", "text": "function fyc_awards_tab_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "title": "" }, { "docid": "c27c18a25c79fbf6a318e9b56766b871", "score": "0.62188643", "text": "public function edit_saveEditForm() {\n $this->ajax_newChild($this->Catalog);\n $this->render('/AppAjax/edit_tree');\n }", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.62168026", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.62168026", "text": "public function getForm();", "title": "" }, { "docid": "a03b6c9065a96f90f26752b341fecfa0", "score": "0.6213969", "text": "public function edit() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "a03b6c9065a96f90f26752b341fecfa0", "score": "0.6213969", "text": "public function edit() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ba81dc04c7d924598c27ffc6b471780e", "score": "0.6202323", "text": "public function assignform(){\n $id = isset($_GET['id'])?$_GET['id']:NULL;\n if ( !$id ) {\n throw new Exception('Internal error.');\n }\n print \"<h2>Assign Form</h2>\";\n print \"Underconstruction\";\n }", "title": "" }, { "docid": "4befe5eb5435ed14d12bac00b54a3d38", "score": "0.62011296", "text": "function edit_form_submit($form, &$form_state) {}", "title": "" }, { "docid": "c5d440b964bae1756523806106909e70", "score": "0.61989117", "text": "function dlgEdit() {\n // Datensatz auslesen\n $feedbacks = new sql_feedback();\n $check = $feedbacks->sql_getEntryByID($_REQUEST['fb_id']);\n if ((!$check) && ($feedbacks->error != fb_error_no_error)) {\n // SQL Fehler\n return $feedbacks->error; }\n elseif ((!$check) && ($feedbacks->error == fb_error_no_error)) {\n // Datensatz existiert nicht!\n return sprintf(fb_error_record_not_exists, $_REQUEST['fb_id']); }\n $parser = new templateParser();\n $parser->add('intro', fb_backend_edit_intro);\n $parser->add('action', ADMIN_URL. '/pages/modify.php?page_id='.$this->page_id.'&fb_action=save_edit&fb_id='.$_REQUEST['fb_id']);\n $parser->add('id', sprintf('%05d', $feedbacks->record['id']));\n $parser->add('mailto', $feedbacks->record['email']);\n $parser->add('sender', stripslashes($feedbacks->record['name']));\n $parser->add('date', date(fb_feedback_datetime, $feedbacks->record['timestamp']));\n $parser->add('header', stripslashes($feedbacks->record['header']));\n $parser->add('text', stripslashes($feedbacks->record['feedback']));\n $parser->add('comment_header', fb_backend_comment_header);\n $parser->add('comment', stripslashes($feedbacks->record['comment']));\n $parser->add('btn_submit', fb_btn_save);\n $parser->add('btn_abort', fb_btn_abort);\n $parser->add('abort_location', ADMIN_URL. '/pages/modify.php?page_id='.$this->page_id);\n $parser->parseTemplateFile(templatePath. 'backend.feedback.edit.htt');\n return $parser->getHTML();\n }", "title": "" }, { "docid": "7d599e4dd6cd79a3b7434b6e6f68f7a7", "score": "0.61893815", "text": "function elife_disqus_content_type_edit_form($form, &$form_state) {\n // Get the form state i.e. configuration values to load the default values.\n $conf = $form_state['conf'];\n return $form;\n}", "title": "" }, { "docid": "3ea67193ac00088ff2371bc316896a3d", "score": "0.61841017", "text": "public function ItemEditForm()\n {\n $list = $this->gridField->getList();\n\n if (empty($this->record)) {\n $controller = $this->getToplevelController();\n $noActionURL = $controller->removeAction($controller->getRequest()->getURL(true));\n\n $controller->getResponse()->removeHeader('Location'); //clear the existing redirect\n\n return $controller->redirect($noActionURL, 302);\n }\n\n $canView = $this->record->canView();\n $canEdit = $this->record->canEdit();\n $canDelete = $this->record->canDelete();\n $canCreate = $this->record->canCreate();\n\n if (!$canView) {\n return $this->getToplevelController()->httpError(403);\n }\n\n $actions = new FieldList();\n if ($this->record->ID !== 0) {\n if ($canEdit) {\n $actions->push(\n FormAction::create('doSave', _t('GridFieldDetailForm.Save', 'Save'))\n ->setUseButtonTag(true)\n ->addExtraClass('btn-primary font-icon-save')\n ->setAttribute('data-icon', 'accept')\n );\n }\n\n if ($canDelete) {\n $actions->push(\n FormAction::create('doDelete', _t('GridFieldDetailForm.Delete', 'Delete'))\n ->setUseButtonTag(true)\n ->addExtraClass('btn-outline-danger btn-hide-outline font-icon-trash-bin action-delete')\n );\n }\n } else { // adding new record\n //Change the Save label to 'Create'\n $actions->push(\n FormAction::create('doSave', _t('GridFieldDetailForm.Create', 'Create'))\n ->setUseButtonTag(true)\n ->addExtraClass('btn-primary font-icon-plus-thin')\n ->setAttribute('data-icon', 'add')\n );\n\n // Add a Cancel link which is a button-like link and link back to one level up.\n $curmbs = $this->Breadcrumbs();\n if ($curmbs && $curmbs->count() >= 2) {\n $one_level_up = $curmbs->offsetGet($curmbs->count() - 2);\n $text = sprintf(\n \"<a class=\\\"%s\\\" href=\\\"%s\\\">%s</a>\",\n \"crumb ss-ui-button btn-outline-danger btn-hide-outline font-icon-trash-bin cms-panel-link ui-corner-all\", // CSS classes\n $one_level_up->Link, // url\n _t('GridFieldDetailForm.CancelBtn', 'Cancel') // label\n );\n\n $actions->push(new LiteralField('cancelbutton', $text));\n }\n }\n\n // If we are creating a new record in a has-many list, then\n // pre-populate the record's foreign key.\n if ($list instanceof HasManyList && !$this->record->isInDB()) {\n $key = $list->getForeignKey();\n $id = $list->getForeignID();\n $this->record->$key = $id;\n }\n\n $fields = $this->component->getFields();\n if (!$fields) {\n $fields = ($this->record->hasMethod('getFrontEndFields') ? $this->record->getFrontEndFields() : $this->record->getCMSFields());\n }\n\n // If we are creating a new record in a has-many list, then\n // Disable the form field as it has no effect.\n if ($list instanceof HasManyList) {\n $key = $list->getForeignKey();\n\n if ($field = $fields->dataFieldByName($key)) {\n $fields->makeFieldReadonly($field);\n }\n }\n\n // this pushes the current page ID in as a hidden field\n // this means the request will have the current page ID in it\n // rather than relying on session which can have been rewritten\n // by the user having another tab open\n // see LeftAndMain::currentPageID\n if ($this->controller->hasMethod('currentPageID') && $this->controller->currentPageID()) {\n $fields->push(new HiddenField('CMSMainCurrentPageID', null, $this->controller->currentPageID()));\n }\n\n // Caution: API violation. Form expects a Controller, but we are giving it a RequestHandler instead.\n // Thanks to this however, we are able to nest GridFields, and also access the initial Controller by\n // dereferencing GridFieldDetailForm_ItemRequest->getController() multiple times. See getToplevelController\n // below.\n $form = new Form(\n $this,\n 'ItemEditForm',\n $fields,\n $actions,\n $this->component->getValidator()\n );\n\n $form->loadDataFrom($this->record, ($this->record->ID == 0 ? Form::MERGE_IGNORE_FALSEISH : Form::MERGE_DEFAULT));\n\n if ($this->record->ID && !$canEdit) {\n // Restrict editing of existing records\n $form->makeReadonly();\n\n // Hack to re-enable delete button if user can delete\n if ($canDelete) {\n $form->Actions()->fieldByName('action_doDelete')->setReadonly(false);\n }\n } else if (!$this->record->ID && !$canCreate) {\n // Restrict creation of new records\n $form->makeReadonly();\n }\n\n // Load many_many extraData for record.\n // Fields with the correct 'ManyMany' namespace need to be added manually through getCMSFields().\n if ($list instanceof ManyManyList) {\n $extraData = $list->getExtraData('', $this->record->ID);\n $form->loadDataFrom(['ManyMany' => $extraData]);\n }\n\n $cb = $this->component->getItemEditFormCallback();\n if ($cb) {\n $cb($form, $this);\n }\n\n $this->extend(\"updateItemEditForm\", $form);\n return $form;\n }", "title": "" }, { "docid": "c3f47e4e5d397dc6defdcf231226bc15", "score": "0.6182428", "text": "private function PageForm() {\n\tif (is_null($this->oForm)) {\n\t $oForm = new fcForm_DB($this);\n\t \n\t $oField = new fcFormField_Num($oForm,'ID_Parent');\n\t $oField = new fcFormField_Num($oForm,'ID_Item');\n\t $oField = new fcFormField_BoolInt($oForm,'isActive');\n\t $oField = new fcFormField_Text($oForm,'InvcLineNo');\n\t $oField = new fcFormField_Text($oForm,'InvcCatNo');\n\t $oField = new fcFormField_Num($oForm,'InvcQtyOrd');\n\t $oField = new fcFormField_Num($oForm,'InvcQtySent');\n\t $oField = new fcFormField_Text($oForm,'InvcDescr');\n\t $oField = new fcFormField_Num($oForm,'QtyRecd');\n\t $oField = new fcFormField_Num($oForm,'QtyFiled');\n\t $oField = new fcFormField_Num($oForm,'CostInvPer');\n\t $oField = new fcFormField_Num($oForm,'CostInvTot');\n\t $oField = new fcFormField_Num($oForm,'CostActTot');\n\t $oField = new fcFormField_Num($oForm,'CostActBal');\n\t $oField = new fcFormField_Text($oForm,'Notes');\n\t\t$oCtrl = new fcFormControl_HTML_TextArea($oField,array('rows'=>3,'cols'=>60));\n\t $this->oForm = $oForm;\n\t}\n\treturn $this->oForm;\n }", "title": "" }, { "docid": "bacab707efc07cf64c96f6cd9cec5604", "score": "0.61800027", "text": "public function validateEdit() {\r\n //pobierz parametry na potrzeby wyswietlenia danych do edycji\r\n //z widoku listy osób (parametr jest wymagany)\r\n $this->form->id = ParamUtils::getFromCleanURL(1, true, 'Błędne wywołanie aplikacji');\r\n return !App::getMessages()->isError();\r\n }", "title": "" }, { "docid": "e856f36bd2c9273d2d473a05c825532c", "score": "0.61729395", "text": "function edit_entry()\r\n {\r\n\t\t//-----------------------------------------\r\n\t\t//\tFilter\r\n\t\t//-----------------------------------------\r\n\r\n\t\t$_POST['edit_date']\t= ee()->localize->now;\r\n\r\n\t\tunset( $_POST['submit'] );\r\n\r\n\t\t//-----------------------------------------\r\n\t\t//\tUpdate\r\n\t\t//-----------------------------------------\r\n\r\n\t\tee()->db->query( \r\n\t\t\tee()->db->update_string(\r\n\t\t\t\t'exp_freeform_entries', \r\n\t\t\t\tee()->security->xss_clean($_POST), \r\n\t\t\t\t'entry_id=' . ee()->input->get_post('entry_id')\r\n\t\t\t) \r\n\t\t);\r\n\r\n\t\t$message\t= ee()->lang->line('entry_updated');\r\n\r\n return $this->manage_entries($message);\r\n }", "title": "" }, { "docid": "b6f84905ae1971bb4aa02b3f4b0c2c76", "score": "0.61714166", "text": "function edit()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $ilToolbar, $lng;\n\n\t\t$ilToolbar->addButton($lng->txt(\"cont_add_tab\"),\n\t\t\t$ilCtrl->getLinkTarget($this, \"addTab\"));\n\n\t\t$this->setTabs();\n\t\t$ilTabs->activateTab(\"cont_tabs\");\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPCTabsTableGUI.php\");\n\t\t$table_gui = new ilPCTabsTableGUI($this, \"edit\", $this->content_obj);\n\t\t$tpl->setContent($table_gui->getHTML());\n\t}", "title": "" }, { "docid": "fcdca105fa8f710e49ca97b82414aacf", "score": "0.6168529", "text": "function InputForm()\n\t{\t\n\t\tob_start();\n\n\t\t$data = $this->details;\n\t\tif ($this->id)\n\t\t{\t\n\t\t\tif (!$this->langused[$this->language])\n\t\t\t{\tif ($_POST)\n\t\t\t\t{\t// initialise details from this\n\t\t\t\t\tforeach ($_POST as $field=>$value)\n\t\t\t\t\t{\t$data[$field ] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t{\t$data = $_POST;\n\t\t}\n\t\t\n\t\t$form = new Form($_SERVER[\"SCRIPT_NAME\"] . \"?id=\" . $this->id . \"&lang=\" . $this->language);\n\t\t$form->AddTextInput(\"Label text\", \"textdesc\", $this->InputSafeString($data[\"textdesc\"]), \"long\", 255, 1);\n\t\t$form->AddTextInput(\"Order to list\", \"listorder\", (int)$data[\"listorder\"], \"short\", 5);\n\t\t$form->AddRawText($this->OptionsTable());\n\t\t$form->AddSubmitButton(\"\", $this->id ? \"Save Changes\" : \"Create New Payment Option\", \"submit\");\n\t\techo \"<h4>Dropdown box properties for field {\", $this->id, \"}</h4>\";\n\t\t$this->AdminEditLangList();\n\t\t$form->Output();\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.6158793", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.6158793", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.6158793", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.6158793", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.6158793", "text": "public function edit()\n {\n //\n }", "title": "" } ]
2e8dd3bbd8c1aafef3e430328d1662a4
SELECT FROM nhankhau, hokhau WHERE hokhau.mahk = 'hk001' AND hokhau.mahk = nhankhau.mahk AND hokhau.tench = nhankhau.hvt
[ { "docid": "31fa5ddbd48fc4b353190dab1ec58e18", "score": "0.6125412", "text": "public function show_once_hk($mahk)\n\t{\n\t\t$this->db->where('hokhau.mahk', $mahk)->where('hokhau.mahk = nhankhau.mahk')->where('hokhau.tench = nhankhau.hvt');\n\t\t$query = $this->db->get('nhankhau, hokhau');\n return $query->result_array();\n\t}", "title": "" } ]
[ { "docid": "1646d6a8c56fbbcdc1158edba0ace0e1", "score": "0.58115387", "text": "public function layTatCaSanPham() {\n $this->db->query(\"SELECT * FROM Giay JOIN HieuGiay ON Giay.MaHG = HieuGiay.MaHG JOIN LoaiGiay ON Giay.MaLG = LoaiGiay.MaLG\");\n\n $result = $this->db->resultSet();\n return $result;\n }", "title": "" }, { "docid": "48f8d6c7882eaee0962b750e12e01d8e", "score": "0.5645121", "text": "public function formulahijo($conn){\n$sql=\"select r.*,s.nombre from ramo r\ninner join formula_hijo fh on fh.id_hijo = r.id_ramo\ninner join subsector s on s.cod_subsector = r.cod_subsector where id_formula = \".$this->formula. \" order by r.id_orden\";\n$result =@pg_exec($conn,$sql) /*or die (\"Select fall� (Trae hijo formula): \" .$sql)*/;\n\treturn $result;\n}", "title": "" }, { "docid": "d3ed97fce282a7da8f1e7b2dca7fcb70", "score": "0.55535793", "text": "function sql_select_lj( $conexao, $tabela_a, $colunas, $tabela_b, $on, $order_by, $where, $all){\n\t//$on:String = \"clientes.id = projetos.id_cliente\";\n\t\n\t$sql=\"SELECT \".$colunas.\" FROM \".$tabela_a. \" LEFT JOIN \" . $tabela_b. \" ON \". $on;\t\n\t \n\tif(!empty($where)) $sql .= \" WHERE \". $where;\n\t\n\tif(!empty($order_by)) $sql .= \" ORDER BY \". $order_by.\";\";\n\telse $sql .= \";\"; \n\t \n\t$consulta = $conexao->query($sql);\n\t\n\tif($all){ \n\t\t$saida = array(); \n\t\twhile($result = $consulta->fetch_array()){\n\t\t\tarray_push($saida,$result);\t\n\t\t} \n\t\treturn $saida;\n\t\t\n\t}else{ \n\t\treturn $consulta->fetch_assoc(); \n\t}\n}", "title": "" }, { "docid": "23c2b1db9794024e3b3c945c897bda13", "score": "0.550118", "text": "function danh_sach_theo_loai($vi_tri, $so_luong, $ma_loai, $ma_lhkd)\r\n {\r\n //$ma_lhkd trong table loai_hinh_kinh_doanh\r\n $vi_tri = intval($vi_tri);\r\n $so_luong = intval($so_luong);\r\n $sql = \"SELECT dn . *, lhkd.ten_loai\r\n FROM doanh_nghiep dn, loai_hinh_kinh_doanh lhkd, phieu_dang_ky pdk, loai_phieu lp\r\n WHERE dn.loai_hinh_dn = lhkd.ma\r\n AND pdk.ma_dn = dn.ma\r\n AND pdk.loai_phieu = lp.ma\r\n AND lp.ma = '$ma_loai'\r\n AND lhkd.ma = '$ma_lhkd'\r\n LIMIT $vi_tri, $so_luong \";\r\n\r\n $this->setQuery($sql);\r\n return $this->loadAllRow();\r\n }", "title": "" }, { "docid": "eddd18cead75a17b96c0d4229f75cd08", "score": "0.53773636", "text": "function sql_query_historicoretiradas($z01_i_cgsund=null,$campos=\"*\",$ordem=null,$dbwhere=\"\") {\n $sql = \"select \";\n if ($campos != \"*\" ) {\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for ($i=0; $i<sizeof($campos_sql); $i++) {\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n } else {\n $sql .= $campos;\n }\n\n $sql .= \" from far_retiradaitens \";\n $sql .= \"inner join far_retirada on fa06_i_retirada=fa04_i_codigo \";\n $sql .= \"inner join db_depart on db_depart.coddepto = far_retirada.fa04_i_unidades \";\n $sql .= \"inner join cgs_und on z01_i_cgsund = fa04_i_cgsund \";\n $sql .= \"inner join far_matersaude on fa06_i_matersaude=fa01_i_codigo \";\n $sql .= \"inner join matmater on matmater.m60_codmater = far_matersaude.fa01_i_codmater \";\n $sql .= \"inner join matunid on matunid.m61_codmatunid = matmater.m60_codmatunid \";\n $sql .= \" left join far_listacontroladomed on far_listacontroladomed.fa35_i_codigo = far_matersaude.fa01_i_listacontroladomed \";\n $sql .= \" left join far_listacontrolado on far_listacontrolado.fa15_i_codigo = far_listacontroladomed.fa35_i_listacontrolado \";\n $sql .= \" left join far_retiradarequi on fa04_i_codigo=fa07_i_retirada \";\n $sql .= \" left join far_retiradaitemlote on fa06_i_codigo=fa09_i_retiradaitens \";\n $sql .= \" left join matestoqueitemlote on fa09_i_matestoqueitem=m77_matestoqueitem \";\n $sql .= \" left join db_usuarios on id_usuario = fa04_i_dbusuario \";\n \n $sql2 = \"\";\n\n if ($dbwhere==\"\") {\n if ($z01_i_cgsund!=null ) {\n $sql2 = \" where cgs_und.z01_i_cgsund = $z01_i_cgsund \";\n }\n } else if ($dbwhere != \"\") {\n $sql2 = \" where $dbwhere\";\n }\n $sql .= $sql2;\n if ($ordem != null ) {\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for ($i=0; $i<sizeof($campos_sql); $i++) {\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }", "title": "" }, { "docid": "bec2721856c16d91707fe8e842e8480c", "score": "0.5373666", "text": "function getByKunci($key){\n\n\t\t\t$this->db->select('*');\n\t\n\t\t\t$this->db->from('partai_tb');\n\t\n\t\t\t$this->db->join('stock_kain','stock_kain.no_tr_grey \t\t\t= partai_tb.no_tr_grey');\n\t\n\t\t\t$this->db->join('grey_tb', \t 'grey_tb.kd_kain \t\t\t\t\t= stock_kain.kd_kain');\n\t\n\t\t\t$this->db->join('warna_tb', \t 'warna_tb.kd_warna \t\t\t= stock_kain.kd_warna');\n\t\n\t\t\t$this->db->where($key);\n\t\n\t\t\t$query = $this->db->get();\n\t\n\t\t\treturn $query;\n\t\n\t}", "title": "" }, { "docid": "68889f18371ea392482cb5acc53688fa", "score": "0.53311026", "text": "function laytk($tendn,$matkhau){\n $this->getsql('select * from quantri where tendangnhap=? and matkhau=?');\n return $this->loadrow([$tendn,$matkhau]);\n }", "title": "" }, { "docid": "d0b47c6332c9172f70db37f5ee917f67", "score": "0.53094244", "text": "function danh_sach_theo_loai_all($vi_tri, $so_luong, $ma_loai)\r\n {\r\n //$ma_lhkd trong table loai_hinh_kinh_doanh\r\n $vi_tri = intval($vi_tri);\r\n $so_luong = intval($so_luong);\r\n $sql = \"SELECT dn . *\r\n FROM doanh_nghiep dn, loai_hinh_kinh_doanh lhkd, phieu_dang_ky pdk, loai_phieu lp\r\n WHERE dn.loai_hinh_dn = lhkd.ma\r\n AND pdk.ma_dn = dn.ma\r\n AND pdk.loai_phieu = lp.ma\r\n AND lp.ma = '$ma_loai'\r\n LIMIT $vi_tri, $so_luong \";\r\n\r\n $this->setQuery($sql);\r\n return $this->loadAllRow();\r\n }", "title": "" }, { "docid": "be93b07f891e39bfb98634316c93f3dc", "score": "0.53026927", "text": "public static function getDSnhanvien($hoten, $chucvu, $gioitinh, $manv, $ngaysinh, $dienthoai, $thongtincoquanid) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$where = \" Hoten LIKE '%$hoten%' \";\r\n\t\tif ($chucvu != '')\r\n\t\t\t$where = $where . \"AND ChucvuId = $chucvu \";\r\n\t\tif ($gioitinh != '' && $gioitinh != 'Tất cả')\r\n\t\t\t$where = $where . \"AND Gioitinh = '$gioitinh' \";\r\n\t\tif ($manv != '')\r\n\t\t\t$where = $where . \"AND Manhanvien LIKE '%$manv%' \";\r\n\t\tif ($ngaysinh != '')\r\n\t\t\t$where = $where . \"AND Ngaysinh = '$ngaysinh' \";\r\n\t\tif ($dienthoai != '')\r\n\t\t\t$where = $where . \"AND Dienthoai LIKE '%$dienthoai%' \";\r\n\t\t\t// Thuc hien cau lenh truy xuat du lieu\r\n\t\t$query = self::$db->query ( \"SELECT Id, Manhanvien, Hoten, (DATE_FORMAT(Ngaysinh,'%d/%m/%Y')) AS Ngaysinh, Gioitinh, (SELECT Tendantoc FROM tbldm_dantoc WHERE Id = DantocId) AS Dantoc, \r\n\t\t\t\t(SELECT Tenchucvu FROM tbldm_chucvu WHERE Id = ChucvuId) AS Chucvu, Dienthoai, IF((Ngayketthuc IS NULL OR Ngayketthuc = '0000-00-00'), 'Đang hoạt động', 'Ngừng hoạt động') AS Tinhtrang,\r\n\t\t\t\tIF(Gioitinh = 'Nam', YEAR(NOW()) - YEAR(Ngaysinh), '') AS Tuoinam,\r\n\t\t\t\tIF(Gioitinh = 'Nu', YEAR(NOW()) - YEAR(Ngaysinh), '') AS Tuoinu \r\n\t\t\t\t FROM tblnhanvien WHERE ThongtincoquanId = $thongtincoquanid AND $where\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "50f1f1f9bd74129964442e2f3388d684", "score": "0.5287476", "text": "function layds(){\n $this->getsql('select * from sanpham where trangthai!=3');\n return $this->loadrows();\n }", "title": "" }, { "docid": "987ada11e452c142f1f09354d52e2cda", "score": "0.5177336", "text": "function listQueryHubunganKerja($r_key) {\n\t\t\t$sql = \"select r.*, h.hubkerja\n\t\t\t\t\tfrom \".self::table('pe_rwthubungankerja').\" r \n\t\t\t\t\tleft join \".self::table('ms_hubkerja').\" h on h.idhubkerja=r.idhubkerja\n\t\t\t\t\twhere idpegawai='$r_key'\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "bc6af3b3ed12cb7b9d2febaea4c30a21", "score": "0.5160169", "text": "function join_maestros_table()\n{\n global $db;\n $sql = \" SELECT claveD,nombre,primerAp,SegundoAp,fecha_nacimiento,email,activo,GradoAc\";\n $sql .= \" FROM maestros \";\n $sql .= \" ORDER BY claveD ASC\";\n return find_by_sql($sql);\n}", "title": "" }, { "docid": "2e8438fde8110636f07c76d0d57546a8", "score": "0.5158541", "text": "public static function getQuanheHoso($id, $thongtincoquanId, $namhoatdong) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$query = self::$db->query ( \"SELECT Hoten, $namhoatdong-Namsinh AS Tuoicon, Nghenghiep FROM tblquanhe\r\n\t\t\t\tWHERE NhanvienId = $id AND ThongtincoquanId = $thongtincoquanId AND \r\n\t\t\t\tQuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Con%')\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "65d37cf2c59464816f382b190043f4cb", "score": "0.5150786", "text": "function join_maestros_table(){\n global $db;\n $sql =\" SELECT claveD,nombre,primerAp,SegundoAp,edad,email,activo,GradoAc\";\n $sql .=\" FROM maestros \";\n $sql .=\" ORDER BY claveD ASC\";\n return find_by_sql($sql);\n }", "title": "" }, { "docid": "6c979309968d095c5c4adb0673de02d0", "score": "0.51394683", "text": "function sql_query_julg_lote( $pc23_orcamforne = null, $pc23_orcamitem = null, $campos = \"*\", $ordem = null, $dbwhere = \"\") {\n $sql = \"select \";\n if($campos != \"*\" ){\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }else{\n $sql .= $campos;\n }\n $sql .= \" from pcorcamval \";\n $sql .= \" inner join pcorcamforne on pcorcamforne.pc21_orcamforne = pcorcamval.pc23_orcamforne\";\n $sql .= \" inner join pcorcamitem on pcorcamitem.pc22_orcamitem = pcorcamval.pc23_orcamitem\";\n $sql .= \" inner join pcorcamitemproc on pc31_orcamitem = pc22_orcamitem\";\n $sql .= \" inner join processocompraloteitem on pc69_pcprocitem = pc31_pcprocitem\";\n $sql .= \" inner join processocompralote on pc68_sequencial = pc69_processocompralote\";\n $sql .= \" inner join cgm on cgm.z01_numcgm = pcorcamforne.pc21_numcgm\";\n $sql .= \" inner join pcorcam on pc20_codorc = pcorcamitem.pc22_codorc\";\n $sql .= \" inner join pcorcamjulg on pcorcamjulg.pc24_orcamitem = pcorcamval.pc23_orcamitem and pcorcamjulg.pc24_orcamforne=pcorcamval.pc23_orcamforne\";\n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($pc23_orcamforne!=null ){\n $sql2 .= \" where pcorcamval.pc23_orcamforne = $pc23_orcamforne \";\n }\n if($pc23_orcamitem!=null ){\n if($sql2!=\"\"){\n $sql2 .= \" and \";\n }else{\n $sql2 .= \" where \";\n }\n $sql2 .= \" pcorcamval.pc23_orcamitem = $pc23_orcamitem \";\n }\n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\n $sql .= $sql2;\n if($ordem != null ){\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }", "title": "" }, { "docid": "a506e8af64aac807b941470931b2bcc2", "score": "0.5138065", "text": "function Sql_Table_Column_Hash_Qualify($hash,$glue=\" AND \")\n {\n $wheres=array();\n foreach ($hash as $data => $value)\n {\n array_push($wheres,$this->Sql_Table_Column_Name_Value_Qualify($data,$value));\n }\n\n return join($glue,$wheres);\n }", "title": "" }, { "docid": "573fac1ab71fca6e33e95f021331230a", "score": "0.50809354", "text": "function sql_query_fornec ( $pc23_orcamforne=null,$pc23_orcamitem=null,$campos=\"*\",$ordem=null,$dbwhere=\"\"){ \n $sql = \"select \";\n \n if($campos != \"*\" ){\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }else{\n $sql .= $campos;\n }\n $sql .= \" from pcorcamval \";\n $sql .= \" inner join pcorcamforne on pcorcamforne.pc21_orcamforne = pcorcamval.pc23_orcamforne\";\n $sql .= \" inner join pcorcamitem on pcorcamitem.pc22_orcamitem = pcorcamval.pc23_orcamitem\";\n $sql .= \" inner join cgm on cgm.z01_numcgm = pcorcamforne.pc21_numcgm\";\n $sql .= \" inner join pcorcam on pc20_codorc = pcorcamitem.pc22_codorc\";\n $sql .= \" left join pcorcamjulg on pcorcamjulg.pc24_orcamitem = pcorcamval.pc23_orcamitem and pcorcamjulg.pc24_orcamforne=pcorcamval.pc23_orcamforne\";\n $sql .= \" left join pcorcamfornelic on pcorcamforne.pc21_orcamforne = pcorcamfornelic.pc31_orcamforne\";\n $sql .= \" left join liclicitatipoempresa on pc31_liclicitatipoempresa = l32_sequencial\"; \n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($pc23_orcamforne!=null ){\n $sql2 .= \" where pcorcamval.pc23_orcamforne = $pc23_orcamforne \"; \n } \n if($pc23_orcamitem!=null ){\n if($sql2!=\"\"){\n $sql2 .= \" and \";\n }else{\n $sql2 .= \" where \";\n } \n $sql2 .= \" pcorcamval.pc23_orcamitem = $pc23_orcamitem \"; \n } \n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\n $sql .= $sql2;\n if($ordem != null ){\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }", "title": "" }, { "docid": "4950e4b4c86d7a0111bf96b3cebd558f", "score": "0.50750035", "text": "public static function hospedesCheckin(){\n $sql = new Sql();\n return $sql->select(\"SELECT * FROM hospedagem INNER JOIN hospede ON hospedagem.id_hospede = hospede.id_hospede and checkout is null and hospedagem.finalizado = 0\");\n}", "title": "" }, { "docid": "e9c8bb8c511134ebfd7d97238954dfbe", "score": "0.5053589", "text": "function searchForArtist($search)\n{\n global $dbh;\n $query = \"SELECT distinct name from artist join genre join album join music on artist.id=album.id_artist and genre.id=artist.id_genre and artist.id=music.id_artist and music.id_artist=album.id_artist and music.id_album=album.id where artist.name LIKE '%'||?||'%' or nome_album=? or name_music=? or genre.gen_name=? \";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array($search,$search,$search,$search));\n return $stmt->fetchAll();\n}", "title": "" }, { "docid": "83844e80dbe24f7d59a8c4514e94d1c3", "score": "0.5051156", "text": "public function select_cktk_nhankhau($id)\n\t{\n\t\t$this->db->where('cktk.id', $id);\n\t\t$this->db->where('cktk.socmnd = nhankhau.socmnd');\n\t\t$query = $this->db->get('cktk, nhankhau');\n return $query->result_array();\n\t}", "title": "" }, { "docid": "6c57ed45815b93c44b13282937682b2c", "score": "0.50289327", "text": "function get_kir_analisa_harga($koneksi){\n\t\t$query = \"SELECT k.id id_kir, k.kd_kir, k.id_supplier, \";\n\t\t$query .= \"s.nama nama_supplier, s.npwp, s.nik FROM kir k \";\n\t\t$query .= \"LEFT JOIN analisa_harga ah ON ah.id_kir = k.id \";\n\t\t$query .= \"JOIN supplier s ON s.id = k.id_supplier WHERE ah.id_kir IS NULL \";\n\t\t$query .= \"ORDER BY k.tgl DESC\";\n\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "eff9c2763bd5a002db2465602cdcba9a", "score": "0.50120217", "text": "public function formulaSoyHijo($conn){\n\t $sql=\"select * from formula_hijo where id_hijo=\".$this->ramo_hijo;\n$result =@pg_exec($conn,$sql) or die (\"Select fall� (Trae hijo formula): \" .$sql);\n\treturn $result;\n}", "title": "" }, { "docid": "f25db7e91de44c6e12d8b1d73e7d4a21", "score": "0.49935833", "text": "public static function getQuanheAnhEm($id, $thongtincoquanId, $namhoatdong) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$query = self::$db->query ( \"SELECT Hoten, $namhoatdong-Namsinh AS Tuoi, Quequan, Nghenghiep FROM tblquanhe\r\n\t\t\t\tWHERE NhanvienId = $id AND ThongtincoquanId = $thongtincoquanId AND\r\n\t\t\t\tQuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Anh%' OR Tenquanhe LIKE '%Em%')\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "9b876c82775288a51947bd9218225980", "score": "0.49735078", "text": "function tim_kiem ($tu_khoa)\r\n\t{\r\n\t\t//$this->setQuery($sql);\r\n\t\treturn $this->loadAllRow();\r\n\t}", "title": "" }, { "docid": "5f49b07ae7ba7be9f51a261803945cdf", "score": "0.49497977", "text": "function dbrows_pairs()\n{\n\n\tif (func_num_args()> 1)\n\t{\n\t\t$ar = func_get_args();\n\t\t$q = array_shift($ar);\n\t\tarray_walk($ar, \"_mescape\");\n\t\t$q = vsprintf($q, $ar);\n\t}\n\telse $q = func_get_arg(0);\n\n\t$res= dbquery($q);\n\t$ary =array();\n\twhile($row = mysql_fetch_row($res))\n\t{\n\t\t$ary[$row[0]]=$row[1];\n\t}\n\treturn $ary;\n}", "title": "" }, { "docid": "8c6b55524fb0f697546b24b470ff2846", "score": "0.4934275", "text": "public function get_sql_join();", "title": "" }, { "docid": "0cf383bab7a5aef20444417ac1bf9aa4", "score": "0.49180096", "text": "function getByKd_partai($kd_partai){\n\n\t\t\t$this->db->select('*');\n\t\n\t\t\t$this->db->from('partai_tb');\n\n\t\t\t$this->db->join('warna_tb','warna_tb.kd_warna = partai_tb.kd_warna','left');\n\n\t\t\t$this->db->join('stock_kain','stock_kain.no_tr_grey = partai_tb.no_tr_grey','left');\n\n\t\t\t$this->db->join('grey_tb','grey_tb.kd_kain = stock_kain.kd_kain');\n\n\t\t\t$this->db->join('customer_tb','customer_tb.kd_customer = stock_kain.kd_customer');\t\t\t\n\t\n\t\t\t$this->db->where('partai_tb.kd_partai', $kd_partai);\n\t\n\t\t\t$query = $this->db->get();\n\t\n\t\t\treturn $query;\n\t\n\t}", "title": "" }, { "docid": "bd7e0511dc24707bc58d220d1598b7ae", "score": "0.4908185", "text": "function getRowAssoc2($table,$columns,$where)\n {\n $sql = \"select $columns from $table where $where\";\n return getRowAssoc2($sql);\n }", "title": "" }, { "docid": "bd7e0511dc24707bc58d220d1598b7ae", "score": "0.4908185", "text": "function getRowAssoc2($table,$columns,$where)\n {\n $sql = \"select $columns from $table where $where\";\n return getRowAssoc2($sql);\n }", "title": "" }, { "docid": "92918b4d609970f6d1a103ecd67274c6", "score": "0.48939136", "text": "function basic_fetch_by_two_id($table,$where1,$id1,$where2,$id2)\n\t{\n $query=\"SELECT \n\t\t\t\t\t*\n\t\t\t\tFROM \n\t\t\t\t\t`\".$table.\"`\n\t\t\t\tWHERE \n\t\t\t\t\t(deleted_id=0)\n\t\t\t\tAND\n\t\t\t\t\t(\".$where1.\"='\".$id1.\"')\n\t\t\t\tAND\n\t\t\t\t\t(\".$where2.\"='\".$id2.\"')\"; \n\n\t\t$result = $this->DBH->prepare($query);\n\t\t$result->execute();\n\t\t$data=$result->fetchAll();\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "1dd13a1b46fb5072bdcea5eaa23a0dca", "score": "0.48662165", "text": "function mkSQL($conditions){\n\t\t$sql = \"\";\n\t\t\n\t\t$bind = array();//結合のforeign key配列を格納\n\t\tif(isset($conditions[\"bind\"])){\n\t\t\t$bind = $coditions[\"bind\"];\n\t\t\tunset($conditions[\"bind\"]);\n\t\t}\n\t\t\n\t\tif(!empty($conditions)){\n\t\t\t$column = \"\";\n\t\t\t$join = \"\";\n\t\t\t$where = \"\";\n\t\t\t$junnbann = \"\";\n\t\t\t$seigenn = \"\";\n\t\t\tif(count($conditions)==1){//bindがない場合\n\t\t\t\tif(!isHash($conditions)){//テーブル名のみならば\n\t\t\t\t\t$sql = \"SELECT * FROM {$conditions[0]};\";\n\t\t\t\t}else{//テーブル名以下設定があれば\n\t\t\t\t\t$sql = \"SELECT \\n\";\n\t\t\t\t\tforeach($conditions as $tbl => $item){\n\t\t\t\t\t\t$condition = $item[\"conditions\"];//\n\t\t\t\t\t\t$order = isset($item[\"order\"])?$item[\"order\"]:\"\";\n\t\t\t\t\t\t$limit = isset($item[\"limit\"])?$item[\"limit\"]:\"\";\n\t\t\t\t\t\t$fields = isset($item[\"fields\"])?$item[\"fields\"]:\"\";//\n\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\tif(!empty($fields)){//fieldsがあれば\n\t\t\t\t\t\t\tforeach($fields as $field){//fieldsを設定\n\t\t\t\t\t\t\t\tif($num == count($fields)-1){//最後の要素\n\t\t\t\t\t\t\t\t\t$sql .= $field.\"\\n\";\n\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t$sql .= $field.\",\\n\";\n\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//fieldsの設定がなければ\n\t\t\t\t\t\t\t$sql .= \"*\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sql .= \"FROM\\n\";\n\t\t\t\t\t\t$sql .= $tbl.\"\\n\";\n\t\t\t\t\t\tif(!empty($condition)){//conditionsがあれば\n\t\t\t\t\t\t\t$sql .= \"WHERE\\n\";\n\t\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\t\tforeach($condition as $fie => $con){\n\t\t\t\t\t\t\t\tif(!is_array($con) && strpos($fie,\"?\")==false){//当てはめ?無しで且つ値での指定の場合\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$sql .= $fie.\"=\".(is_string($con)?\"'\".$con.\"'\":$con).\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$sql .= $fie.\"=\".(is_string($con)?\"'\".$con.\"'\":$con).\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}elseif(is_array($con)){//配列指定の場合(当てはめ?必須)\n\t\t\t\t\t\t\t\t\t//$chgd = str_replace(\"?\", \"%s\", $fie);\n\t\t\t\t\t\t\t\t\t$fie_arr = explode(\"?\",$fie);\n\t\t\t\t\t\t\t\t\t$comp_str = \"\";\n\t\t\t\t\t\t\t\t\tfor($i=0;$i<count($fie_arr);$i++){\n\t\t\t\t\t\t\t\t\t\t$comp_str .= $fie_arr[$i];\n\t\t\t\t\t\t\t\t\t\tif(isset($con[$i])){\n\t\t\t\t\t\t\t\t\t\t\tif(is_string($con[$i])){\n\t\t\t\t\t\t\t\t\t\t\t\t$comp_str .= \"'\".$con[$i].\"'\";\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$comp_str .= $con[$i];\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}\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$sql .= $comp_str.\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$sql .= $comp_str.\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{//当てはめ?に値を指定してある場合\n\t\t\t\t\t\t\t\t\t$chgd = str_replace(\"?\", \"%s\", $fie);\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$sql .= sprintf($chgd,(is_string($con)?\"'\".$con.\"'\":$con)).\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$sql .= sprintf($chgd,(is_string($con)?\"'\".$con.\"'\":$con)).\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\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\tif(!empty($order)){//orderがあれば\n\t\t\t\t\t\t\t$sql .= \"ORDER BY\\n\";\n\t\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\t\tforeach($order as $by => $jun){\n\t\t\t\t\t\t\t\tif($num == count($order)-1){//最後の要素\n\t\t\t\t\t\t\t\t\t$sql .= $by.\" \".$jun.\"\\n\";\n\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t$sql .= $by.\" \".$jun.\",\\n\";\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\tif(!empty($limit)){//limitがあれば\n\t\t\t\t\t\t\t$sql .= \"LIMIT {$limit}\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \";\";\n\t\t\t\t}\n\t\t\t}elseif(count($conditions)>1){//bindがある場合\n\t\t\t\tif(!isHash($conditions)){//テーブル名のみならば\n\t\t\t\t\t$sql = \"SELECT * FROM \\n\";\n\t\t\t\t\t$num = 0;\n\t\t\t\t\tforeach($conditions as $tbl){\n\t\t\t\t\t\tif($num==0){//最初の要素\n\t\t\t\t\t\t\t$first_table = $tbl;\n\t\t\t\t\t\t\t$sql .= $tbl.\" \\n\";\n\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t}elseif($num==count($conditions)-1){//最後の要素\n\t\t\t\t\t\t\t$sql .= \"LEFT JOIN \".$tbl.\" ON (\".$first_table.\".id=\".$tbl.\".\".$first_table.\"_id);\";\n\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t$sql .= \"LEFT JOIN \".$tbl.\" ON (\".$first_table.\".id=\".$tbl.\".\".$first_table.\"_id) \\n\";\n\t\t\t\t\t\t\t$num++;\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//個別に変数に格納し\n\t\t\t\t\t$fie_count = 0;\n\t\t\t\t\t$conditions_count = 0;\n\t\t\t\t\t$order_count = 0;\n\t\t\t\t\t$limit_count = 0;\n\t\t\t\t\t$tbl_count = 0;\n\t\t\t\t\t\n\t\t\t\t\t$fie_count_chk = 0;\n\t\t\t\t\t$conditions_count_chk = 0;\n\t\t\t\t\t$order_count_chk = 0;\n\t\t\t\t\t$limit_count_chk = 0;\n\t\t\t\t\tforeach($conditions as $tbl => $item){\n\t\t\t\t\t\t$condition = $item[\"conditions\"];//\n\t\t\t\t\t\t$order = $item[\"order\"];\n\t\t\t\t\t\t$limit = $item[\"limit\"];\n\t\t\t\t\t\t$fields = $item[\"fields\"];//\n\t\t\t\t\t\tif(!empty($fields)){//fieldsがあれば\n\t\t\t\t\t\t\t$fie_count_chk++;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($condition)){//conditionsがあれば\n\t\t\t\t\t\t\t$conditions_count_chk++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!empty($order)){\n\t\t\t\t\t\t\t$order_count_chk++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!empty($limit)){//limitがあれば\n\t\t\t\t\t\t\t$limit_count_chk++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tforeach($conditions as $tbl => $item){\n\t\t\t\t\t\t$condition = $item[\"conditions\"];//\n\t\t\t\t\t\t$order = $item[\"order\"];\n\t\t\t\t\t\t$limit = $item[\"limit\"];\n\t\t\t\t\t\t$fields = $item[\"fields\"];//\n\t\t\t\t\t\tdefine(\"FIRST_TABLE\", $tbl);\n\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($fields)){//fieldsがあれば\n\t\t\t\t\t\t\t$fie_count++;\n\t\t\t\t\t\t\tforeach($fields as $field){//fieldsを設定\n\t\t\t\t\t\t\t\tif($num == count($fields)-1 && $fie_count == $fie_count_chk){//最後の要素\n\t\t\t\t\t\t\t\t\t$column .= $field.\"\\n\";\n\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t$column .= $field.\",\\n\";\n\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif($count == count($conditions)-1 && $fie_count==0){//全てのテーブルにfieldsの設定がなければ\n\t\t\t\t\t\t\t$column .= \"*\\n\";\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t//結合処理ここから\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($tbl_count==0){//最初の要素\n\t\t\t\t\t\t\t\t$first_table = $tbl;\n\t\t\t\t\t\t\t\t$tbl_count++;\n\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t$join .= \"LEFT JOIN \".$tbl.\" ON (\".$first_table.\".id=\".$tbl.\".\".$first_table.\"_id) \\n\";\n\t\t\t\t\t\t\t\t$tbl_count++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//結合処理ここまで\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($condition)){//conditionsがあれば\n\t\t\t\t\t\t\t//$where .= \"WHERE\\n\";\n\t\t\t\t\t\t\t$conditions_count++;\n\t\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\t\tforeach($condition as $fie => $con){\n\t\t\t\t\t\t\t\tif(!is_array($con) && strpos($fie,\"?\")==false){//当てはめ?無しで且つ値での指定の場合\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1 && $conditions_count==$conditions_count_chk){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$where .= $fie.\"=\".(is_string($con)?\"'\".$con.\"'\":$con).\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$where .= $fie.\"=\".(is_string($con)?\"'\".$con.\"'\":$con).\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}elseif(is_array($con)){//配列指定の場合(当てはめ?必須)\n\t\t\t\t\t\t\t\t\t//$chgd = str_replace(\"?\", \"%s\", $fie);\n\t\t\t\t\t\t\t\t\t$fie_arr = explode(\"?\",$fie);\n\t\t\t\t\t\t\t\t\t$comp_str = \"\";\n\t\t\t\t\t\t\t\t\tfor($i=0;$i<count($fie_arr);$i++){\n\t\t\t\t\t\t\t\t\t\t$comp_str .= $fie_arr[$i];\n\t\t\t\t\t\t\t\t\t\tif(isset($con[$i])){\n\t\t\t\t\t\t\t\t\t\t\tif(is_string($con[$i])){\n\t\t\t\t\t\t\t\t\t\t\t\t$comp_str .= \"'\".$con[$i].\"'\";\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$comp_str .= $con[$i];\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}\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1 && $conditions_count==$conditions_count_chk){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$where .= $comp_str.\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$where .= $comp_str.\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{//当てはめ?に値を指定してある場合\n\t\t\t\t\t\t\t\t\t$chgd = str_replace(\"?\", \"%s\", $fie);\n\t\t\t\t\t\t\t\t\tif($num == count($condition)-1 && $conditions_count==$conditions_count_chk){//最後の要素\n\t\t\t\t\t\t\t\t\t\t$where .= sprintf($chgd,(is_string($con)?\"'\".$con.\"'\":$con)).\"\\n\";\n\t\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t\t$where .= sprintf($chgd,(is_string($con)?\"'\".$con.\"'\":$con)).\" AND\\n\";\n\t\t\t\t\t\t\t\t\t\t$num++;\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\t\n\t\t\t\t\t\tif(!empty($order)){//orderがあれば\n\t\t\t\t\t\t\t//$sql .= \"ORDER BY\\n\";\n\t\t\t\t\t\t\t$order_count++;\n\t\t\t\t\t\t\t$num = 0;\n\t\t\t\t\t\t\tforeach($order as $by => $jun){\n\t\t\t\t\t\t\t\tif($num == count($order)-1 && $order_count==$order_count_chk){//最後の要素\n\t\t\t\t\t\t\t\t\t$junnbann .= $by.\" \".$jun.\"\\n\";\n\t\t\t\t\t\t\t\t}else{//それ以外\n\t\t\t\t\t\t\t\t\t$junnbann .= $by.\" \".$jun.\",\\n\";\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\tif(!empty($limit)){//limitがあれば\n\t\t\t\t\t\t\t//$sql .= \"LIMIT {$limit}\\n\";\n\t\t\t\t\t\t\t$limit_count++;\n\t\t\t\t\t\t\t$seigenn = $limit;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//最後に結合\n\t\t\t\t\t$sql = \"SELECT\\n\";\n\t\t\t\t\t$sql .= $column;\n\t\t\t\t\t$sql .= \"FROM\\n\";\n\t\t\t\t\t$sql .= FIRST_TABLE.\"\\n\";\n\t\t\t\t\t$sql .= $join;\n\t\t\t\t\tif($conditions_count!=0){\n\t\t\t\t\t\t$sql .= \"WHERE\\n\";\n\t\t\t\t\t\t$sql .= $where;\n\t\t\t\t\t}\n\t\t\t\t\tif($order_count!=0){\t\n\t\t\t\t\t\t$sql .= \"ORDER BY\\n\";\n\t\t\t\t\t\t$sql .= $junnbann;\n\t\t\t\t\t}\n\t\t\t\t\tif($limit_count!=0){\t\n\t\t\t\t\t\t$sql .= \"LIMIT {$limit}\\n\";\n\t\t\t\t\t\t$sql .= $seigenn;\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \";\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "5c0f7c33cf37d620ac364132624742eb", "score": "0.48426142", "text": "function pasien_masuk($sql_plus_1,$txt_tgl,$txt_bulan,$txt_tahun){\r\n\t\r\n\tglobal $db;\r\n\r\n\t$masuk = \" SELECT a.no_kunjungan,a.dr_merawat, a.tgl_masuk, a.kelas_pas, a.kode_ruangan, \tc.kode_kelompok, c.no_mr, c.nama_pasien, c.jen_kelamin FROM ri_tc_rawatinap a, mt_master_pasien c,tc_kunjungan d WHERE $sql_plus_1 a.no_kunjungan=d.no_kunjungan and d.no_mr=c.no_mr and day(a.tgl_masuk)='$txt_tgl' and month(a.tgl_masuk)='$txt_bulan' and year(a.tgl_masuk)='$txt_tahun' and a.bag_pas='$kode_bagian' ORDER BY c.nama_pasien\";\r\n\r\n\t$_masuk = & $db->Execute($masuk);\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "c2811d7554065a2016a451cf47013361", "score": "0.48398", "text": "function llenararealizar($IdExamen){\r\n$con = new ConexionBD;\r\n\tif($con->conectar()==true){\r\n\t\t $sqlText=\"select t2.id as idsuministrante, t2.suministrante, t1.id as idexamensuministrante\r\nfrom lab_examen_suministrante t1\r\njoin lab_suministrante t2 on (t1.id_suministrante=t2.id)\r\nwhere id_conf_examen_estab =$IdExamen;\";\r\n\t\t$dt = pg_query($sqlText) ;\r\n\t}\r\n\treturn $dt;\r\n\r\n}", "title": "" }, { "docid": "7e3d06c5a7cbf3c59b9824158b7908b9", "score": "0.48373693", "text": "function tableQuery($id, $kue){\n\t\t$result = $this->db->query($kue);\n\t\t$db = $result->result();\n\t\t$this->datatable_plain($id, $db);\n\t}", "title": "" }, { "docid": "98f040450b522edc731223d7bbe57ae8", "score": "0.48235533", "text": "public function consultar_hospital($raz,$nit,$tip_id){\r\n \tif($raz!=\"\")\r\n\t\t$sql=\"SELECT * FROM NITS WHERE NITS_NOMBRES LIKE ('%$raz%') AND TIP_NIT_ID=$tip_id ORDER BY nits_apellidos ASC\";\r\n\tif($nit!=\"\")\r\n\t\t$sql=\"SELECT nit_id,nits_num_documento FROM NITS WHERE TIP_NIT_ID=$tip_id AND NITS_NUM_DOCUMENTO LIKE ('%$nit%')\";\r\n\t $ejecutar = mssql_query($sql) or die (\"no se puede realizar la consulta\");\r\n\treturn $ejecutar;\t \t\r\n}", "title": "" }, { "docid": "0c350184ba3d36d3f7305bd512eb4b9a", "score": "0.48152834", "text": "function Select_query_cherch_labo($db,$var,$fields) \n { \n foreach ($fields as $field) \n {\n // Assume the data is coming from a form\n $values[] = $_POST[$field];\n }\n \n $st = $db->prepare(\"SELECT * FROM Chercheur JOIN Laboratoire WHERE Chercheur.Laboratoire_Code=Laboratoire.Code AND \n (\" . implode(' AND ',$var) . ') ');\n \n $st->execute($values);\n \n return $st;\n }", "title": "" }, { "docid": "a4024938e5e64083b78570d0dd3be453", "score": "0.48041886", "text": "function listQueryRiwayatPangkat($r_key) {\n\t\t\t$sql = \"select r.*,js.namajenissk,'('||p.golongan||') '||p.namapangkat as namagolongan,coalesce(cast(r.masakerjathn as varchar),'0')||' tahun '||coalesce(cast(r.masakerjabln as varchar),'0')||' bulan' as masakerja\n\t\t\t\t\tfrom \".self::table('pe_rwtpangkat').\" r \n\t\t\t\t\tleft join \".self::table('ms_jenissk').\" js on js.jenissk = r.jenissk\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" p on p.idpangkat = r.idpangkat\n\t\t\t\t\twhere idpegawai='$r_key'\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "e09c437ce43ef08e5900cc5e7015df93", "score": "0.48029393", "text": "function kttrung_yeycau($ten, $sdt, $mail,$monhoc) {\n $qr = \"Select * from `hocvien` where `TEN_HOCVIEN`='$ten' AND `SDT_HOCVIEN`='$sdt' AND `EMAIL__HOCVIEN`='$mail' and `DK_MON`='$monhoc'\";\n $result = mysql_query($qr);\n if (mysql_fetch_array($result) > 0) {\n return 1;\n } \n else {\n return 0;\n }\n}", "title": "" }, { "docid": "1c6c436bafb60470ce7ea7526ccb38c4", "score": "0.4797591", "text": "public static function getInfoHoso($id, $thongtincoquanId, $namhoatdong) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$query = self::$db->query ( \"SELECT Id, Manhanvien, Hoten, Tenkhac, DAY(Ngaysinh) AS Ngaysinh, Hinhanh,\r\n\t\t\t\tMONTH(Ngaysinh) AS Thangsinh, YEAR(Ngaysinh) AS Namsinh, Gioitinh, Thuongtru, CMND, \r\n\t\t\t\tNoicap, DAY(Ngaycap) AS Ngaycap, MONTH(Ngaycap) AS Thangcap, YEAR(Ngaycap) AS Namcap, \r\n\t\t\t\tDienthoai, Noiohiennay, Noisinh, Quequan, DantocId, TongiaoId, Tpxuatthan, TrinhdovanhoaId, TrinhdongoainguId,\r\n\t\t\t\t(SELECT Tentrinhdovanhoa FROM tbldm_trinhdovanhoa WHERE Id = TrinhdovanhoaId) AS Trinhdovanhoa,\r\n\t\t\t\t(SELECT Tentrinhdongoaingu FROM tbldm_trinhdongoaingu WHERE Id = TrinhdongoainguId) AS Trinhdongoaingu,\r\n\t\t\t\t(SELECT Noiketnapdang FROM tbldoandang WHERE NhanvienId = Id) AS Noiketnapdang,\r\n\t\t\t\t(SELECT Noiketnapdoan FROM tbldoandang WHERE NhanvienId = Id) AS Noiketnapdoan, \r\n\t\t\t\t(SELECT Tendantoc FROM tbldm_dantoc WHERE Id = DantocId) AS Tendantoc,\r\n\t\t\t\t(SELECT Tentongiao FROM tbldm_tongiao WHERE Id = TongiaoId) AS Tongiao,\r\n\t\t\t\t(SELECT Tentongiao FROM tbldm_tongiao WHERE Id = TongiaoId) AS Tongiao,\r\n\t\t\t\t(SELECT DAY(Ngaychinhthuc) FROM tbldoandang WHERE NhanvienId = Id) AS Ngayvaodang,\r\n\t\t\t\t(SELECT MONTH(Ngaychinhthuc) FROM tbldoandang WHERE NhanvienId = Id) AS Thangvaodang,\r\n\t\t\t\t(SELECT YEAR(Ngaychinhthuc) FROM tbldoandang WHERE NhanvienId = Id) AS Namvaodang,\r\n\t\t\t\t(SELECT DAY(Ngayvaodoan) FROM tbldoandang WHERE NhanvienId = Id) AS Ngayvaodoan,\r\n\t\t\t\t(SELECT MONTH(Ngayvaodoan) FROM tbldoandang WHERE NhanvienId = Id) AS Thangvaodoan,\r\n\t\t\t\t(SELECT YEAR(Ngayvaodoan) FROM tbldoandang WHERE NhanvienId = Id) AS Namvaodoan,\r\n\t\t\t\t(SELECT Hoten FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Hotenbo,\r\n\t\t\t\t(SELECT $namhoatdong - Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Tuoibo,\r\n\t\t\t\t(SELECT Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND Quanheid IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Namsinhcuabo,\r\n\t\t\t\t(SELECT Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Namsinhbo,\r\n\t\t\t\t(SELECT Quequan FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Quequanbo,\r\n\t\t\t\t(SELECT Nghenghiep FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Bố%')) AS Nghenghiepbo,\r\n\t\t\t\t(SELECT Hoten FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Mẹ%')) AS Hotenme,\r\n (SELECT $namhoatdong - Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Mẹ%')) AS Tuoime,\r\n (SELECT Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Mẹ%')) AS Namsinhcuame,\r\n \t(SELECT Quequan FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Mẹ%')) AS Quequanme,\r\n\t\t\t\t(SELECT Nghenghiep FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Mẹ%')) AS Nghenghiepme,\r\n\t\t\t\t(SELECT Hoten FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Vợ%')) AS Hotenvo,\r\n\t\t\t\t(SELECT $namhoatdong - Namsinh FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Vợ%')) AS Tuoivo,\r\n\t\t\t\t(SELECT Quequan FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Vợ%')) AS Quequanvo,\r\n\t\t\t\t(SELECT Nghenghiep FROM tblquanhe WHERE NhanvienId = tblnhanvien.Id AND QuanheId IN (SELECT Id FROM tbldm_quanhe WHERE Tenquanhe LIKE '%Vợ%')) AS Nghenghiepvo\r\n\t\t\t\tFROM tblnhanvien WHERE Id = $id AND ThongtincoquanId = $thongtincoquanId\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "99adb80a1e4fa75c1306aab6bfc1bb16", "score": "0.47920394", "text": "function db_getCompanyData($id = -1, $name = \"-1\")\n{\n global $conn;\n $stmt = $conn->prepare(\"SELECT id AS id, vallalat_nev AS name\n FROM ceg\n WHERE id = :id OR vallalat_nev = :cname\");\n $stmt->bindParam(':id', $id);\n $stmt->bindParam(':cname', $name);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_BOTH);\n}", "title": "" }, { "docid": "0dcf5135291bc08bb0c29696ac4ad4ea", "score": "0.47879973", "text": "function getPengirim($table, $table2, $id_barang, $id_anggota){\n\t\t$sql = \"SELECT `nama` FROM `$table` JOIN `$table2` ON `$table`.`id_asal`=`$table2`.`id` WHERE `$table`.`id_barang`='$id_barang' \";\n\t\treturn $this->db->query($sql);\n\t}", "title": "" }, { "docid": "48c408c6d1abecd46dc59f536254ba5b", "score": "0.47848216", "text": "function table_to_table($table1,$table2,$FK,$attribute,$vari,$bdd,$end=''){\n $key=primary_key_table($table1,$bdd);\n $a=$table1.'.'.primary_key_table($table1,$bdd);\n $b=$table2.'.'.$FK;\n $sql=\"SELECT * FROM $table1 JOIN $table2 ON $a = $b WHERE $attribute = '$vari' $end\";\n $req=$bdd->query($sql);\n if($req){\n return $req;\n }\n }", "title": "" }, { "docid": "37ec9724e0ef05378e105abfe3be6a20", "score": "0.47782412", "text": "function getAllHouseholdChores($home_id) {\n require(\"../db.php\");\n\n try {\n $results = $db->query(\"\n SELECT\n chores.chore_id as chore_id,\n chores.title as name,\n chores.description as notes,\n chores.active as active,\n chores.completed as completed,\n chores.user_id as user_id,\n users.firstName as chore_owner,\n users.color as user_color\n\n FROM chores\n INNER JOIN users\n ON chores.home_id = 1\");\n } catch (Exception $e) {\n echo(\"Could not get Home\");\n exit;\n }\n\n $chores = $results->fetchAll(PDO::FETCH_ASSOC);\n return $chores;\n}", "title": "" }, { "docid": "fb5cd71cb5270b2b4ad739bafb9df458", "score": "0.4764934", "text": "function query_sandwiches() {\n\t\t$conn = db_connect;\n\t\t\n\t\t$query = \"SELECT name, description, price FROM sandwiches\";\n\t\treturn $result = pg_query($conn,$query);\n\t}", "title": "" }, { "docid": "c7e7ba44957e4786c64f758f18652479", "score": "0.47574022", "text": "public function findMatchBetweenSpecificPlayers($idJoueur1,$idjoueur2) {\n $query = $this->getEntityManager()\n ->createQuery(\"select m from FTTAdminBundle:ResultatMatch m \"\n . \" inner join FTTAdminBundle:MatchInfo m1 with m1.id=m.idMatch \"\n . \"where \"\n . \"m1.idJoueur1 =:id1 and m1.idJoueur2 =:id2 \"\n . \"or m1.idJoueur1 =:id2 and m1.idJoueur2 =:id1\")\n ->setParameter('id1',$idJoueur1)\n ->setParameter('id2',$idjoueur2);\n return $query->getResult();\n }", "title": "" }, { "docid": "f2ac3786e4926e8bffed208e339e23fc", "score": "0.47494927", "text": "function select($query){\n $select = $this->db->prepare($query);\n $select->bindParam('id_hs', $this->id_hs, PDO::PARAM_INT);\n $select->bindParam('town', $this->town, PDO::PARAM_STR);\n $select->bindParam('league', $this->league, PDO::PARAM_STR);\n $select->bindParam('mascot', $this->mascot, PDO::PARAM_STR);\n $select->execute();\n return $select->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "9185a79975eb396c6bfe66c10a5812a5", "score": "0.47464013", "text": "function get_jawaban_by_topik($topik)\n {\n $this->db->select('*');\n $this->db->from('jawaban_tessay');\n $this->db->where('id_jTugas', $topik);\n $query = $this->db->get();\n return $query;\n }", "title": "" }, { "docid": "921a6a3229f9082a4ec6d1ba05487968", "score": "0.47434112", "text": "public function test_Simple_Join_select_name()\n {\n $sql = ' SELECT bl.N, la_somme, tarif_estime '\n . ' FROM bl '\n . 'INNER JOIN r_bl_commande '\n . ' ON bl.id =r_bl_commande.id_bl'\n . ' INNER JOIN commande'\n . ' ON commande.id =r_bl_commande.id_commande'\n . ' WHERE 1';\n $sqlquery = (new QuerySQL())->select(\"bl.N\", \"la_somme\", \"tarif_estime\")\n ->from(\"bl\")\n ->join(\"commande\", \"INNER\", true)\n ->query();\n $this->assertEquals($sql, $sqlquery);\n }", "title": "" }, { "docid": "60e9e09f0e1e41fa374a34dec3e0e970", "score": "0.4736044", "text": "function sql_query_retiradas_continuados($m40_codigo=null,$campos=\"*\",$ordem=null,$dbwhere=\"\") {\n $sql = \"select \";\n if ($campos != \"*\" ) {\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for ($i=0; $i<sizeof($campos_sql); $i++) {\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n } else {\n $sql .= $campos;\n }\n\n $sql .= \" from far_retiradaitens \";\n $sql .= \" inner join far_retirada on far_retirada.fa04_i_codigo = far_retiradaitens.fa06_i_retirada \";\n $sql .= \" inner join far_controle on far_controle.fa11_i_cgsund = far_retirada.fa04_i_cgsund \";\n $sql .= \" inner join far_controlemed on far_controlemed.fa10_i_controle = far_controle.fa11_i_codigo \";\n $sql .= \" and far_controlemed.fa10_i_medicamento = far_retiradaitens.fa06_i_matersaude \";\n $sql .= \" inner join far_matersaude on far_matersaude.fa01_i_codigo = far_controlemed.fa10_i_medicamento \";\n $sql .= \" inner join matmater on matmater.m60_codmater = far_matersaude.fa01_i_codmater \";\n $sql .= \" inner join matunid on matunid.m61_codmatunid = matmater.m60_codmatunid \";\n $sql .= \" inner join cgs_und on cgs_und.z01_i_cgsund = far_controle.fa11_i_cgsund \";\n $sql .= \" inner join db_depart on db_depart.coddepto = far_retirada.fa04_i_unidades \";\n $sql2 = \"\";\n\n if ($dbwhere==\"\") {\n if ($mfa06_i_codigo!=null ) {\n $sql2 = \" where far_retiradaitens.fa06_i_codigo = $fa06_i_codigo \";\n }\n } else if ($dbwhere != \"\") {\n $sql2 = \" where $dbwhere\";\n }\n $sql .= $sql2;\n if ($ordem != null ) {\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for ($i=0; $i<sizeof($campos_sql); $i++) {\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }", "title": "" }, { "docid": "7a9bac7cb92fc2e1d1671d39617f792c", "score": "0.47275215", "text": "function getByKey($key){\n\n\t\t\t$this->db->select('*');\n\t\n\t\t\t$this->db->from('partai_tb');\n\t\n\t\t\t$this->db->join('stock_kain','stock_kain.no_tr_grey \t\t\t= partai_tb.no_tr_grey');\n\t\n\t\t\t$this->db->join('grey_tb', \t 'grey_tb.kd_kain \t\t\t\t\t= stock_kain.kd_kain');\n\t\n\t\t\t$this->db->join('customer_tb', \t 'customer_tb.kd_customer \t\t= stock_kain.kd_customer');\n\t\n\t\t\t$this->db->join('warna_tb', \t 'warna_tb.kd_warna \t\t\t= stock_kain.kd_warna');\n\t\n\t\t\t$this->db->where($key);\n\t\n\t\t\t$query = $this->db->get();\n\t\n\t\t\treturn $query->result();\n\t\n\t}", "title": "" }, { "docid": "0374f3a2819df019d3580f1b8ff79db4", "score": "0.47255203", "text": "public function show(qlsv_thoikhoabieu $qlsv_thoikhoabieu)\n {\n //\n }", "title": "" }, { "docid": "aa34d1106788d7dceccbe5952794ec4e", "score": "0.46986666", "text": "function select_all($halaman,$batas){\n\t\treturn $this->db->query(\"select r.*,o.nama_obat\n\t\t\t from resep as r, obat as o\n\t\t\t where r.id_obat = o.id_obat\n\t\t\t limit $halaman,$batas\");\n \n\t}", "title": "" }, { "docid": "cd7fcad3fdbc97a482e9d5c75f6d1732", "score": "0.46938547", "text": "function get_horas_trabajadas($fechai, $fechaf, $idoperador) {\r\n\tglobal $bcdb, $bcrs, $pager;\r\n $sql = sprintf(\"SELECT a.*, c.nombres, c.apaterno, c.amaterno, l.nombre as lugar, m.descripcion as maquina\r\n FROM %s a\r\n INNER JOIN %s c\r\n ON a.idcliente = c.id\r\n INNER JOIN %s l\r\n ON a.idlugar = l.id\r\n INNER JOIN %s m\r\n ON a.idmaquina = m.id\r\n INNER JOIN %s o\r\n ON m.idoperador = o.id\r\n WHERE o.id ='%s' \r\n AND fecha BETWEEN '%s' AND '%s'\",\r\n $bcdb->alquiler, $bcdb->cliente, $bcdb->lugar, $bcdb->maquina, $bcdb->operador, $idoperador, $fechai, $fechaf);\r\n $recibos = ($pager) ? $bcrs->get_results($sql) : $bcdb->get_results($sql);\r\n\t\r\n $data = $recibos;\t\r\n\treturn $data;\r\n}", "title": "" }, { "docid": "721477946a03463988183566b0cc8e95", "score": "0.46885076", "text": "function sv_doimatkhau($mssv, $hinh, $matkhau) {\r\n $mk = md5($matkhau);\r\n $sql = \"UPDATE sinh_vien SET hinhdaidien='$hinh',matkhau='$mk'\r\n WHERE mssv='$mssv'\";\r\n mysql_query($sql);\r\n }", "title": "" }, { "docid": "e37e9d6261d23e69e183810d28634a74", "score": "0.46854448", "text": "function get_smetki($DB, $from, $to, $fromrow, $torow, $hours, $filters, $check, $objects)\n{\n $counter = 0;\n $objectfilters = apply_obektifilter($objects, \"SMETKI.OBEKTID\");\n $rows = apply_rowsfilter($fromrow, $torow, $check);\n \n $sql = <<<SQL\n SELECT\n smetki.nomer AS NOMER,\n smetki.prdate AS PRDATE,\n smetki.macare AS MACARE,\n smetki.timeopen AS TIMEOPEN,\n smetki.editdate AS EDITDATE,\n partnernames.partnername AS PARTNERNAME,\n smetki.docno AS DOCNO,\n smetki.razcr AS RAZCR,\n smetki.razcrsuma AS RAZCRSUMA,\n smetki.kaca AS KACA,\n doctypenames.doctype AS DOCTYPE,\n obekti.name AS OBEKTNAME,\n obekti.id AS OBEKTID,\n (select min(moneyoper.suma) from moneyoper where smetki.obektid = moneyoper.obektid and smetki.nomer = moneyoper.smetkano) AS SUMA\n from smetki \n join partnernames on smetki.partnernameid = partnernames.id \n join doctypenames on smetki.doctypeid = doctypenames.id\n join obekti on smetki.obektid = obekti.id \n where smetki.prdate > '$from $hours:00:00' and smetki.prdate < '$to $hours:00:00' $objectfilters\n order by prdate\n $rows\nSQL;\n //echo $sql;\n //echo $sql;\n $sth = $DB->query($sql);\n if ($check == 1) //ОПИТ ЗА ИЗЧИТАНЕ НА КОЛОНИТЕ.МОЖЕ ДА СЕ ПРОМЕНЯ ТОВА\n {\n get_columnnames($sth); //Печата колоните и излиза с exit();\n }\n //ЗАПОЧВА ГЕНЕРИРАНЕТО НА HTML в $result\n $result = '<ul data-role=\"listview\" data-theme=\"a\" data-filter=\"true\" class=\"spravka-ul\" data-input=\"#filterBasic-input\">';\n while ($row = $sth->fetch(PDO::FETCH_OBJ)) {\n $counter++;\n $result .= '\n<li data-theme=\"a\" class=\"liresult\" data-spravka2=\"0\" data-obektnum=\"' . $row->OBEKTID . '\" data-num=\"' . $row->NOMER . '\"> \n<div class=\"containerspravka\"><div class=\"importantdiv\" >\n<p>\n<span class=\"obektvspravka\">' . fix_str($row->OBEKTNAME) . '</span>\n<span class=\"datavspravka\">' . fix_date($row->PRDATE) . \"</span>\n</p>\";\n if ($row->PARTNERNAME != NULL) //Ако има клиент го печата\n $result .= '<p><span class=\"partnervspravka\">' . fix_str($row->PARTNERNAME) . '</span></p>';\n $result .= '<p><span>' . fix_str($row->DOCTYPE) . ' : ' . $row->DOCNO . '</span></p>';\n if ($row->EDITDATE != NULL)\n $result .= '<p style=\"color:#ED4337\">Редакция: ' . fix_date($row->EDITDATE) . '</p>';\n $result .= '<p><span class=\"sumaspravka\">Сума : ' . fix_numb($row->SUMA, 2) . ' лв.</span></p></div>';\n //НАЧАЛО НА НЕЩАТА КОИТО СЕ ВИЖДАТ САМО НА ЛАНДСКЕЙП\n $result .= '<div class=\"notimportantdiv\">';\n if ($row->MACARE != NULL) //АКО ИМА МАСА И ЧАС НА ОТВАРЯНЕ\n {\n if (hoursToSecods(date('H:i:s', strtotime($row->TIMEOPEN))) + 10800 < hoursToSecods(date('H:i:s', strtotime($row->PRDATE))))\n $color = \"red\"; //АКО Е ОТВОРЕНА ПОВЕЧЕ ОТ ТРИ ПРЕДИ ПРИКЛЮЧВАНЕ ЧЕРВЕНО....\n else\n $color = \"black\";\n $result .= '<p><span class=\"datavspravka\" ' . $color . ';\"><strong>Отворена в: ' . fix_date($row->TIMEOPEN) . '</strong></span></p>\n <p><span >Маса: <strong>' . $row->MACARE . '</strong></span></p>';\n }\n $result .= '<p>Сметка номер : <strong> ' . $row->NOMER . '</strong></p>';\n if ($row->RAZCR == 1)\n $result .= '<p>Разсрочено, Сума разср. : <strong>' . fix_numb($row->RAZCRSUMA, 2) . ' </strong>, Каса : <strong>' . $row->KACA . '</strong></p>';\n else\n $result .= '<p>Платено , Каса : <strong>' . $row->KACA . '</strong></p>';\n $result .= '</div></div></li>';\n }\n $result .= '</ul>';\n echo $result; //ПРИНТИРА ГЕНЕРИРАНИЯ HTML\n echo print_footerspravka($counter, $fromrow, $torow); //ДОБАВЯ СТАНДАРТНИЯ ФУТЪР ЗА СПРАВКИТЕ С ПРОДЪЛЖЕНИЕ\n}", "title": "" }, { "docid": "bf6d1df5517807a044052ee790596c09", "score": "0.46691877", "text": "public function LoadAllHodnoceni()\n {\n $table_name = \"hodnoceni\";\n $columns = \"*\";\n $where = array();\n // $where[] = array(\"column\" => \"zkratka\", \"value\" => \"KIV/DB1\", \"symbol\" => \"=\");\n\n $prispevky = $this->DBSelectAll($table_name, $columns, $where);\n return $prispevky;\n }", "title": "" }, { "docid": "83d13fda37918fc6af1288955b087b4a", "score": "0.46634948", "text": "public function PhieuXuatKho()\n\t{\n\t\tif(Qss_Lib_System::fieldActive('ONhapKho', 'PhieuXuatKho'))\n\t\t{\n\t\t\t/*$PhanLoai = $this->_object->getFieldByCode('LoaiNhapKho')->intRefIOID;\n\t\t\t$dataSQL = $this->_db->fetchOne(sprintf('select * from OLoaiNhapKho where IOID = %1$d',$PhanLoai));\n\t\t\t$loai = ($dataSQL)?$dataSQL->Loai:'';*/\n\n\t\t\t$sql = ' v.IOID in ( ';\n\t\t\t$sql .= sprintf('\n SELECT OXuatKho.IOID\n FROM OXuatKho\n INNER JOIN qsiforms ON OXuatKho.IFID_M506 = qsiforms.IFID\n LEFT JOIN OPhieuBaoTri ON ifnull(OXuatKho.Ref_PhieuBaoTri, 0) = ifnull(OPhieuBaoTri.IOID, 0)\n LEFT JOIN qsiforms AS qsiforms2 ON ifnull(OPhieuBaoTri.IFID_M759, 0) = ifnull(qsiforms2.IFID, 0)\n WHERE qsiforms.Status = 2 ');\n\t\t\tif(Qss_Lib_System::fieldActive('OXuatKho', 'PhieuBaoTri')\n\t\t\t\t&& (int)$this->_object->intStatus == 1\n\t\t\t\t&& $this->loai == Qss_Lib_Extra_Const::INPUT_TYPE_RETURN)\n\t\t\t{\n\t\t\t\t$sql .= ' AND ( ifnull(OXuatKho.Ref_PhieuBaoTri, 0) = 0 OR ifnull(qsiforms2.Status, 0) in (2,3)) ';\n\t\t\t}\n\t\t\t$sql .= ' )';\n\n\t\t\t$this->_object->getFieldByCode('PhieuXuatKho')->arrFilters[] = $sql;\n\t\t}\n\t}", "title": "" }, { "docid": "d88bc7b3b0bc65f11040336194b1da1a", "score": "0.46608645", "text": "private function _sdiff_sql($keys) {\n \t$c = count($keys);\n \t$sql = \"FROM <DB> WHERE pkey=?\";\n \tfor($i=1; $i<$c; $i++) {\n \t\t$sql .= \" AND field NOT IN (SELECT field FROM <DB> WHERE pkey=?)\";\n \t}\n \t$sql .= \" ORDER BY id\";\n \treturn $sql;\n }", "title": "" }, { "docid": "b3340a96e687b531ddf3e27631ee80d8", "score": "0.46596912", "text": "function dQuery($con,$tabulka,$where=\"\",$order=\"\"){\r\n //Slozeni sql dotazu podle parametru funkce\r\n $query = \"SELECT * FROM $tabulka \";\r\n \r\n if($where){\r\n $query .= \" WHERE $where \";\r\n }\r\n \r\n if($order){\r\n $query .= \" ORDER BY $order \";\r\n }\r\n \r\n $query .= \";\";\r\n \r\n $result = mysqli_query($con, $query);\r\n if(!chyba($con)){\r\n return false;\r\n } \r\n return $result;\r\n}", "title": "" }, { "docid": "fb6fb2326a9bbc03ee1584b450bfa5f4", "score": "0.46586463", "text": "public static function getInfobyId($manhanvien) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$query = self::$db->query ( \"SELECT Id, CMND, DATE_FORMAT(Ngaycap, '%d/%m/%Y') AS Ngaycap, Noicap, Manhanvien,\r\n\t\t\t\tTenkhac, Dienthoai, Email, TrinhdoId, ChuyennganhId, Tinhtranghonnhan, TrinhdovanhoaId,\r\n\t\t\t\tNoisinh, Quequan, Thuongtru, Noiohiennay, Tpxuatthan, Hinhanh, TrinhdongoainguId,\r\n\t\t\t\t(SELECT Tentrinhdohocvan FROM tbldm_trinhdohocvan WHERE Id = TrinhdoId) AS Tentrinhdo,\r\n\t\t\t\t(SELECT Tenchuyennganh FROM tbldm_chuyennganh WHERE Id = ChuyennganhId) AS Tenchuyennganh,\r\n\t\t\t\tIF (Namtotnghiep = 0, '', Namtotnghiep) AS Namtotnghiep,\r\n\t\t\t\tDATE_FORMAT(Ngayhopdong, '%d/%m/%Y') AS Ngayhopdong, ChucdanhId, ChucvukiemnghiemId, \r\n\t\t\t\tDATE_FORMAT(Ngaytuyendung, '%d/%m/%Y') AS Ngaytuyendung, Coquantuyendung, \r\n\t\t\t\tDATE_FORMAT(Ngayve, '%d/%m/%Y') AS Ngayve, DATE_FORMAT(Ngaythangcongnhan, '%d/%m/%Y') AS Ngaythangcongnhan, \r\n\t\t\t\tPhongbanId, Hinhthuc, DATE_FORMAT(Ngaybonhiemvaonganh, '%d/%m/%Y') AS Ngaybonhiemvaonganh, \r\n\t\t\t\tLoaicanboId, UutienId, Sotaikhoan, Nganhangmo,\r\n\t\t\t\t(SELECT Tenchucdanh FROM tbldm_chucdanh WHERE Id = ChucdanhId) AS Tenchucdanh,\r\n\t\t\t\t(SELECT Tenchucvu FROM tbldm_chucvu WHERE Id = ChucvukiemnghiemId) AS Tenchucvukiemnghiem,\r\n\t\t\t\t(SELECT Tenbophan FROM tbldm_bophan WHERE Id = PhongbanId) AS Tenphongban,\r\n\t\t\t\t(SELECT Tenloaicanbo FROM tbldm_loaicanbo WHERE Id = LoaicanboId) AS Tenloaicanbo,\r\n\t\t\t\t(SELECT Tenuutien FROM tbldm_uutien WHERE Id = UutienId) AS Tenuutien,\r\n\t\t\t\t(SELECT Tentrinhdovanhoa FROM tbldm_trinhdovanhoa WHERE Id = TrinhdovanhoaId) AS Trinhdovanhoa,\r\n\t\t\t\t(SELECT Tentrinhdongoaingu FROM tbldm_trinhdongoaingu WHERE Id = TrinhdongoainguId) AS Trinhdongoaingu,\r\n\t\t\t\tDiaban, Dangnhanluc\r\n\t\t\t\t\r\n\t\t\t\tFROM tblnhanvien WHERE Manhanvien = '$manhanvien'\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "cd9accc22e675b857508ddcd8785abfc", "score": "0.46586365", "text": "function absen_info($id_absen_dibuka)\n\t{\n\t\t// \tWHERE siswa.username IN(SELECT username FROM absen WHERE id_absen_dibuka = $id_absen_dibuka);\");\n\t\t$this->db->select('nis_siswa, nama_siswa, nama_kelas');\n\t\t$this->db->from('siswa');\n\t\t$this->db->join('kelas', 'siswa.id_kelas = kelas.id_kelas', 'inner');\n\t\t$this->db->where(\"siswa.username IN (SELECT username FROM absen WHERE id_absen_dibuka = $id_absen_dibuka)\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "ee24cd6c178bf1dc4238c53ccc111d82", "score": "0.4656736", "text": "function fetch_data() {\n \n $query = $this->db->select('pocet_prijatych.id id, skola.nazev nazev, obor.nazev obor, pocet_prijatych.pocet pocet, pocet_prijatych.rok rok, skola.geolat geolat, skola.geolong geolong')\n //->from('pocet_prijatych, skola')\n ->from('pocet_prijatych') \n //->join('mesto','skola.mesto = mesto.id') mesto.nazev nazevMesta,\n ->join('skola', 'pocet_prijatych.skola = skola.id') \n ->join('obor', 'pocet_prijatych.obor = obor.id')\n \n //->join('mesto','mesto = mesto.id')\n ->get();\n return $query->result();\n }", "title": "" }, { "docid": "c605caed663d0bc45e6cfe4546ef76e8", "score": "0.46489048", "text": "function query_akademik($sql, &$result_akademik, &$nr_akademik)\n {\n global $app;\n\t\t$result_akademik = $app['db']['query']($app['db']['connection_akademik'],$sql);\n\t\tif (eregi(\"select\", $sql)):\n \t $nr_akademik = $app['db']['num_rows']($result_akademik);\n \tendif;\n\t\tif($app['db']['error']($app['db']['connection_akademik'])){\n\t\t\tif ($app[debug]):\n\t\t\t\t$err[] = \"SQL : $sql\";\n\t\t\t\t$err[] = \"ERROR : \" . @$app['db']['error']($result_akademik);\n\t\t\t\tprint_r($err);\n\t\t\t\texit;\n\t\t\tendif;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "e6edf64449b5337df08dcafedff6ccdf", "score": "0.4640788", "text": "function naj_god($nazwa_tabeli, $nazwa_slupka, $dzien_roku)\r\n{\r\n\tglobal $wartosc, $db;\r\n\t\r\n\t$stmt = $db->query(\"SELECT id, $nazwa_slupka FROM $nazwa_tabeli WHERE id='$dzien_roku' LIMIT 1\");\r\n\t\r\n\twhile($wiersz = $stmt->fetch(PDO::FETCH_ASSOC)){\t\r\n\t\t$wartosc = $wiersz[\"$nazwa_slupka\"];\t\t\r\n\t}\t\r\n}", "title": "" }, { "docid": "672d918bc43ee57d98de4afcb0a7addd", "score": "0.4637127", "text": "function get_matches($limit = null) {\r\n\t$sql = new sql('matches');\r\n //$join = $sql->join(['match_users'], [['match_id', 'match_user_match_id']]);\r\n\t$matches = $sql->select(array('limit' => $limit), sql::SELECT_MULTIPLE);\r\n\treturn $matches;\r\n}", "title": "" }, { "docid": "fe7cb33ace526acbb55dd24e577e7eee", "score": "0.46347928", "text": "public static function danhsachdieuchinhbh($thongtincoquanid) {\r\n\t\tif (self::$db == null) {\r\n\t\t\tself::$db = Zend_Registry::get ( \"db\" );\r\n\t\t}\r\n\t\t\r\n\t\t$result = array ();\r\n\t\t$query = self::$db->query ( \"SELECT tblnhanvien.Hoten, DATE_FORMAT(tblnhanvien.Ngaysinh,'%d/%m/%Y') AS Ngaysinh, tblnhanvien.Gioitinh,\r\n\t\t\t\t DATE_FORMAT(tblbaohiem.Tungay,'%m') AS Tungay, DATE_FORMAT(tblbaohiem.Denngay,'%m') AS Denngay\r\n\t\t\t\t FROM tblnhanvien INNER JOIN tblbaohiem ON tblnhanvien.Id= tblbaohiem.NhanvienId \r\n\t\t\t\tWHERE tblnhanvien.ThongtincoquanId='$thongtincoquanid'\" );\r\n\t\t$result = $query->fetchAll ();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f7bcf399f4ff38116a4cfa6254590bb7", "score": "0.46298778", "text": "function index()\n {\n $this->load->model('khachhang_model');\n $sql = 'SELECT hd.ID, banid, datbanid, hinhthucpvu.ID as PhucVuID, \n hinhthucpvu.PHIPV, hd.khachhangid, tinhtrang, ngay, chitiet.thanhtien \n FROM (SELECT * FROM hoadon WHERE hoadon.HINHTHUCID = 2) \n AS hd JOIN \n ( SELECT hoadonid, sum(soluong*dongia) AS thanhtien \n FROM chitiethoadon GROUP BY hoadonid ) AS chitiet \n ON hd.id = chitiet.hoadonid \n JOIN hinhthucpvu \n ON hd.hinhthucid = hinhthucpvu.ID';\n\n $query = $this->chitiethoadon_model->query($sql);\n $this->data['query'] = $query;\n \n $this->data['temp'] = 'admin/hoadon/index';\n $this->load->view('admin/main', $this->data);\n }", "title": "" }, { "docid": "589f931f48a60e69d37edf200a0c2dd5", "score": "0.4627863", "text": "function PocasiSql($data){\n\t\n\t$dnes = $data['id_pocasi_zitra'];\n\t$zitra = VypocitejZitrejsiPocasi($data['id_pocasi_dnes'], $data['id_pocasi_zitra'], $data['rocni_obdobi']);\n\t\n\t$sql = \" id_pocasi_dnes = $dnes, id_pocasi_zitra = $zitra\";\n\treturn $sql;\n}", "title": "" }, { "docid": "7e1890a7aab6c5a85d969217556c299e", "score": "0.4626954", "text": "public function getBy($what, $args, $queryParts=null, $params=null) {\n\t\t$what = lcfirst($what); //nazwa pola po ktorym bedzie prowadzone szukanie\n\t\t$entityPkColumnName = $this->_entityPkColumnName; //pobieram nazwe klucza gl w tabeli\n\t\tif($what == 'id') { //jesli w funkcji szukano po id, nie wiadomo czy nazwa klucza glownego jest wlasnie taka stad podmiana\n\t\t\t$what = $entityPkColumnName;\n\t\t}\n\t\telse {\n\t\t\t$exists = false; //szukana nazwa moze nie istniec jako pole w tabeli\n\t\t\tforeach($this->_fields AS $fieldName=>$fieldDefinition) { //w innym przypadku trzeba zmapowac poszukiwana nazwe pola obiektu na pole nazwe pola tabeli\n\t\t\t\tif($fieldDefinition['nameInObj'] == $what) {\n\t\t\t\t\t$what = $fieldName; //odnaleziono nazwe pola w bazie danych\n\t\t\t\t\t$exists = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($exists === false) { //jeslii nie istnieje zglaszam wyjatek, ine wiadomo czgo szukano\n\t\t\t\tthrow new DataMapperException('Szukane pole nie istnieje w tabeli bazy danych');\n\t\t\t}\n\t\t}\n\t\t//tymczasowe tablice i zmienne dla utworzenia odpowiedniego zapytania\n\t\t$whatArr = array();\n\t\t$whereStr = '';\n\t\t\n\t\tif(is_array($args) && count($args) > 0) {\n\t\t\tforeach($args AS $index => $value) {\n\t\t\t\t$newIndex = ':' . $what . '_' . $index;\n\t\t\t\t$whatArr[$newIndex] = $value;\n\t\t\t}\n\n\t\t\t$whatStr = '';\n\t\t\t$whatArrKeys = array_keys($whatArr);\n\t\t\t$whatStr = implode(', ', $whatArrKeys);\n\t\t\t$whereStr = \"`\". $what . \"` IN( \" . $whatStr . \")\"; //przygotowany kawalek zapytania dla klauzuli WHERE\n\t\t\t\n\t\t}\n\t\telseif(!is_array($args)) {\n\t\t\t$whatArr = array(\":$what\" => $args);\n\t\t\t$whereStr = \"`\" . $what . \"` = :\" . $what; //przygotowany kawalek zapytania dla WHERE\n\t\t\t\n\t\t}\n\t\t\n\t\t$tmpArray = array(); //jesli w argumencie funkcji przeslano juz kawalki zapytania dla WHERE, trzeba je polaczyc\n\t\tif(isset($queryParts['where'])) {\n\t\t\tif(is_array($queryParts['where'])) {\n\t\t\t\t$queryParts['where'][] = $whereStr;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tmpArray = array($queryParts, $whereStr);\n\t\t\t\t$queryParts['where'] = $tmpArray;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$queryParts['where'] = array($whereStr);\n\t\t}\n\t\t\n\t\tif(isset($params)) { //podobnie trzeba polaczyc wartosci parametrow\n\t\t\tif(is_array($params)) {\n\t\t\t\t$params = array_merge($params, $whatArr);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$params = $whatArr;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$params = $whatArr;\n\t\t}\n\n\t\treturn $this->getAll($queryParts, $params);\t\t\n\t}", "title": "" }, { "docid": "1291b9d185ccc69e9f43ee9159412ac1", "score": "0.4622784", "text": "function sql_select( $conexao, $tabela, $colunas, $order_by, $where, $all ){\n\t\n\t$sql=\"SELECT \".$colunas.\" FROM \".$tabela; \n\t\n\tif(!empty($where)) $sql .= \" WHERE \". $where;\n\t\n\tif(!empty($order_by)) $sql .= \" ORDER BY \". $order_by.\";\"; \n\telse $sql .= \";\"; \n\t\n\t$consulta = $conexao->query($sql);\n\t\n\tif($all){ \n\t\t$saida = array(); \n\t\twhile($result = $consulta->fetch_array()){\n\t\t\tarray_push($saida,$result);\t\n\t\t} \n\t\treturn $saida;\n\t\t\n\t}else{ \n\t\treturn $consulta->fetch_assoc(); \n\t} \n}", "title": "" }, { "docid": "f08226c6b2adf2b5d4bdbfe4849a886b", "score": "0.462233", "text": "public function test(){\n\t\t$sql = \"SELECT verkregen,voornaam,achternaam,naam,cleanName\n\t\t\t\tFROM thor.houderschap h \n\t\t\t\tinner join persoon p on h.idpersoon = p.id\n\t\t\t\tinner join titel t on h.idtitel = t.id\n\t\t\t\tWHERE t.functie = 1\n\t\t\t\tAND verkregen in (SELECT max(verkregen)\n\t\t\t\t\t\t\t\tFROM thor.houderschap h \n\t\t\t\t\t\t\t\tinner join titel t on h.idtitel = t.id\n\t\t\t\t\t\t\t\tWHERE t.functie = 1\n\t\t\t\t\t\t\t\tGROUP BY verkregen\n\t\t\t\t\t\t\t\torder by verkregen desc limit 2,5)\n\t\t\t\torder by verkregen desc,rang\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute();\n\t\tprint_r( $query->fetchAll());\n\t}", "title": "" }, { "docid": "4f891dcc1079dc99fcf23e8b6b308b9d", "score": "0.46216705", "text": "public function test_Simple_Join_column_name()\n {\n $sql = ' SELECT N, la_somme, tarif_estime '\n . ' FROM bl '\n . ' INNER JOIN r_bl_commande '\n . ' ON bl.id =r_bl_commande.id_bl'\n . ' INNER JOIN commande'\n . ' ON commande.id =r_bl_commande.id_commande'\n . ' WHERE 1';\n $sqlquery = (new QuerySQL())->select()\n ->column(\"N\")\n ->column(\"la_somme\")\n ->column(\"tarif_estime\")\n ->from(\"bl\")\n ->join(\"commande\", \"INNER\", true)\n ->query();\n $this->assertEquals($sql, $sqlquery);\n }", "title": "" }, { "docid": "84ae42bba3cd3adb80b052a45a514e10", "score": "0.46153763", "text": "function hitung_dana2_upj_tahun(){\n $this->db->select('tahun,COUNT(tahun_hibah) as ttl_thn_abdi');\n $this->db->from($this->dana2_upj);\n $this->db->join($this->tahun, 't_dana2_upj.tahun_hibah = tahun.tahun','RIGHT');\n $this->db->group_by('tahun'); \n $this->db->order_by('tahun', 'ASC'); \n return $this->db->get()->result(); \n }", "title": "" }, { "docid": "df7f71e68b079804bc37d9b41b7b8051", "score": "0.4613044", "text": "function get_pegawai_skp($cari,$mulai,$batas){\n\t\t$sqlstr=\"SELECT a.*,d.*\nFROM users a\nLEFT JOIN (user_pegawai c,rekap_peg d) ON (a.user_id=c.user_id AND c.id_pegawai=d.id_pegawai) \nWHERE a.group_id=7\nAND (a.username LIKE '%$cari%' OR a.nama_user LIKE '%$cari%')\nORDER BY a.user_id ASC\nLIMIT $mulai,$batas\n\";\n\t\t$hslquery = $this->db->query($sqlstr)->result();\n\t\treturn $hslquery;\n\t}", "title": "" }, { "docid": "2d790030f38ddd1173515d5a2bfa98a5", "score": "0.4609732", "text": "function requeteTailleTshirt($idTshirt){\n $requete='SELECT tail_id as idTaille,tail_nom as taille,exem_stock as stock FROM exemplaires LEFT OUTER JOIN tailles on tail_id = exem_fk_tail WHERE exem_fk_tee = :idTshirt ORDER BY `exemplaires`.`exem_fk_tee` ASC ';\n $connexion=connexion_PDO();\n $resultat=$connexion->prepare($requete);\n $resultat->execute([\":idTshirt\"=>$idTshirt]);\n return $resultat->fetchAll(PDO::FETCH_OBJ);\n}", "title": "" }, { "docid": "727fdf8aec8116acef704f612de7c55b", "score": "0.46023202", "text": "function row_exist($table, $where)\n {\n global $result;\n $sql = \"SELECT * FROM \" . $table . \" WHERE \" . $where;\n \n //$result = $conn->query($sql);\n \n if($this->conn->query($sql)) {\n return TRUE;\n } else {\n error_log(\"ERROR OCCURED WHILE ECECUTING SQL IN ROW_EXIST FUNTION : \".$this->conn->error);\n return FALSE;\n }\n }", "title": "" }, { "docid": "c49e29036b0f6b91b34fbf6761b5832e", "score": "0.45953074", "text": "function select($columns, $tables, $where = '', $smartQuotes = true, $addon = '', $statementAddon = '') {\n $str = 'SELECT %s %s FROM %s %s %s';\n $cols = QueryHelper::_getCommaSep($columns);\n $tabs = QueryHelper::_getCommaSep($tables);\n\n $query = sprintf($str, $statementAddon, $cols, $tabs, QueryHelper::_where($where, $smartQuotes) ,$addon);\n return $query;\n}", "title": "" }, { "docid": "0d708a4d6bd1aafa3a392f9a56ea2fca", "score": "0.4592013", "text": "function get_hadiah($id_hadiah)\n {\n return $this->db->get_where('hadiah',array('id_hadiah'=>$id_hadiah))->row_array();\n }", "title": "" }, { "docid": "e98e8af4e8d1e18c76c78a01d61aab18", "score": "0.45910633", "text": "function qry_akademik($sql)\n {\n global $app;\n\t\t$rs = $app[db][query]($app[db][connection_akademik],$sql);\n\t\tif($app[db][error]($result)){\n\t\t\tif ($app[debug]):\n\t\t\t\t$err[] = \"SQL : $sql\";\n\t\t\t\t$err[] = \"ERROR : \" . $app[db][error]($result);\n\t\t\t\t//app::debug($err);\n\t\t\t\texit;\n\t\t\tendif;\n\t\t\t$app[err_qry]=1;\n\t\t}\n\t\tunset($rs);\n }", "title": "" }, { "docid": "c024ac670b9c70f91b25736411ec56ca", "score": "0.45841655", "text": "function fetch($key1,$key2,$key3){\n $query = \"SELECT * from `$key1` WHERE `userId` = '$key2' and `productId` = '$key3'\";\n $query = mysqli_query($GLOBALS['conn'], $query);\n return mysqli_num_rows($query);\n }", "title": "" }, { "docid": "fb4611dff862d4e21ee9224d60c3cc88", "score": "0.45833153", "text": "function LlenarCmbOrigenMuestra($IdTipo){\r\n\r\n$con = new ConexionBD;\r\n\tif($con->conectar()==true){\r\n\t\t $sqlText= /*\"SELECT mnt_origenmuestra.IdOrigenMuestra,mnt_origenmuestra.OrigenMuestra\r\n\t\t\t FROM mnt_origenmuestra\r\n\t\t\t WHERE mnt_origenmuestra.IdTipoMuestra=$IdTipo\";*/\r\n\r\n \" select t01.id, t01.origenmuestra\r\n from mnt_origenmuestra t01\r\n where t01.idtipomuestra=$IdTipo\";\r\n\r\n\t\t$dt = pg_query($sqlText) ;\r\n\t}\r\n\t//echo $sqlText;\r\n\treturn $dt;\r\n\r\n}", "title": "" }, { "docid": "35e4bd991739ce002f271d2d8eb72bb8", "score": "0.45801163", "text": "public function actionIndexByHrd(){\n $searchModel = new PermohonanCutiNontahunanSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('indexByHrd',[\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "857b5643b8bcc10697b0cc8a31f345a2", "score": "0.45728147", "text": "function DftrJdwl() {\r\n $s = \"select j.*, h.Nama as HR, concat(d.Nama, ', ', d.Gelar) as DSN, \r\n time_format(j.JamMulai, '%H:%i') as JM,\r\n time_format(j.JamSelesai, '%H:%i') as JS\r\n from jadwal j\r\n left outer join hari h on j.HariID=h.HariID\r\n left outer join dosen d on j.DosenID=d.Login\r\n where j.TahunID='$_SESSION[tahun]'\r\n and INSTR(j.ProgramID, '.$_SESSION[prid].')>0\r\n and INSTR(j.ProdiID, '.$_SESSION[prodi].')>0\r\n order by j.HariID, j.JamMulai\";\r\n $r = _query($s); $n = 0; $hr = '1234560987';\r\n $hdr = \"<tr><th class=ttl>ID</th>\r\n <th class=ttl>Ruang</th>\r\n <th class=ttl>Jam</th>\r\n <th class=ttl>Kode</th>\r\n <th class=ttl>Matakuliah</th>\r\n <th class=ttl>Kelas</th>\r\n <th class=ttl>Jenis</th>\r\n <th class=ttl>Dosen</th>\r\n <th class=ttl title='Jumlah Mhsw/Target Peserta'>Mhsw/<br />Kaps</th>\r\n <th class=ttl>Koreksi</th>\r\n </tr>\";\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\";\r\n while ($w = _fetch_array($r)) {\r\n $n++;\r\n if ($hr != $w['HariID']) {\r\n $hr = $w['HariID'];\r\n echo \"<tr><td class=ul colspan=15><font size=+1>$w[HR]</td></tr>\";\r\n echo $hdr;\r\n }\r\n if ($w['Final'] == 'Y') {\r\n $koreksi = \"&times;\";\r\n }\r\n else {\r\n $koreksi = \"<a href='?mnux=koreksikelas&gos=KoreksiKelas&jid=$w[JadwalID]'><img src='img/check.gif'></a>\";\r\n }\r\n echo \"<tr><td class=inp>$w[JadwalID]</td>\r\n <td class=ul>$w[RuangID]&nbsp;</td>\r\n <td class=ul>$w[JM]-$w[JS]</td>\r\n <td class=ul>$w[MKKode]</td>\r\n <td class=ul>$w[Nama]</td>\r\n <td class=ul>$w[NamaKelas]</td>\r\n <td class=ul>$w[JenisJadwalID]</td>\r\n <td class=ul>$w[DSN]</td>\r\n <td class=ul align=right>$w[JumlahMhsw]/$w[Kapasitas]</td>\r\n <td class=ul align=center>$koreksi</td>\r\n </tr>\";\r\n }\r\n echo \"</table></p>\";\r\n}", "title": "" }, { "docid": "75c5625d44d202b0bd65a16d3ec67e26", "score": "0.45706248", "text": "function jumlah_data_pel_bab($pel, $bab){\n $this->db->where('bs.publish','1');\n $this->db->where('bs.id_bab', $bab);\n $this->db->where('mapel.id_mapel', $pel);\n $this->db->join('tb_bab bab','bab.id_bab=bs.id_bab');\n $this->db->join('tb_mata_pelajaran mapel', 'mapel.id_mapel = bab.id_mapel' );\n return $this->db->get('tb_bank_soal bs')->num_rows();\n }", "title": "" }, { "docid": "c9e334b6ebe9534f5813bd92a1b8d37c", "score": "0.45691484", "text": "function keyrow($query, array $map = array(), $in = false);", "title": "" }, { "docid": "aaea7f0b7641a7fae247f195e2afdd80", "score": "0.45671335", "text": "protected static function targetedSearch($searchHash){\n\t\t\n\t\t$query = \"SELECT * FROM \". static::$table_name . \" WHERE \";\n\t\tforeach($searchHash as $nick=>$value){\n\t\t\t$query .= \"`\" . static::$field_nicks_map[$nick] . \"` = '\" . $value . \"' AND \";\n\t\t}\n\t\t$query = substr($query, 0, -4);// remove the last AND\n\t\t\n\t\t$classname = get_called_class();\n\t\t$objs = SQL::query($query, array($classname, 'constructFromRecord'));\n\t\t$objs = static::markLoaded($objs);\n\t\t\n\t\treturn $objs;\n\t}", "title": "" }, { "docid": "0a1675646abb970b6954e7ccce5dcc75", "score": "0.45603353", "text": "public function selectQuerywithJoin($data,$mapping,$query){\n\t\t\t\n\t\t\t$sql = \"SELECT \";\n\t\t\tforeach($data as $t => $d){\n\t\t\t\t/* Table */\n\t\t\t\tif($table == NULL){\n\t\t\t\t\t$table = \" FROM \".$t;\n\t\t\t\t}else{\n\t\t\t\t\t$table .= \", \".$t;\n\t\t\t\t}\n\t\t\t\tforeach($d as $dO){\n\t\t\t\t\t/* att */\n\t\t\t\t\tif($att == NULL){\n\t\t\t\t\t\t$att = $dO;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$att = \" AND \".$dO;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Mapping */\n\t\t\tforeach($mapping as $m){\n\t\t\t\tif($map == NULL){\n\t\t\t\t\t$map = $m;\n\t\t\t\t}else{\n\t\t\t\t\t$map .= \",\".$m;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql .= $att;\n\t\t\t$sql .= $table;\n\t\t\t$sql .= \"WHERE $map AND $query\";\n\t\t\t// $result = $this->sqlConect->query($sql);\n\t\t\t// WriteLog::write(WriteLog::DEBUG,__CLASS__ .\"::\". __FUNCTION__ .\"/QUERY:\". $sql);\n\t\t\t// if(!$result){\n\t\t\t\t// return false;\n\t\t\t// }\n\t\t\techo $sql.\"<br><br>\";\n\t\t\t// while($row = mysqli_fetch_array($result,MYSQLI_NUM)){\n\t\t\t\t// $out[] = $row;\n\t\t\t// }\n\t\t\t// WriteLog::write(WriteLog::DEBUG,__CLASS__ .\"::\". __FUNCTION__ .\"/NUMBER OF RESULT:\". sizeof($out));\n\t\t\t// if(!isset($out))\n\t\t\t\t// return NULL;\n\t\t\t// return $out;\n\t\t}", "title": "" }, { "docid": "bd95c72a06fe28cdd05b427b413acf6c", "score": "0.45498627", "text": "function buildWicketsTableMySQLquery()\n {\n $_SESSION['MySQLselectExp' ] .= ', `wickets_lost`, `wickets_taken`';\n array_push($_SESSION['tableColHeadingsArray'],\n 'Team<br />Wickets<br />Lost', 'Opposition<br />Wickets<br />Lost');\n array_push($_SESSION['tableDataTypes'], 'int', 'int');\n\n // finish table headings\n $_SESSION['tableHeading1'] .= 'Match Wickets Table';\n }", "title": "" }, { "docid": "cecc88e771dd2dcab3e9e4cfff356b90", "score": "0.45479703", "text": "public function getAllFromDatabaseDependingOn($kk_ids, $k_ids) {\n // Alle Kompetenzen aus Kompetenzkategorien\n if (count($kk_ids) > 0) {\n\n // Kompetenzen aus den angegebenen Kategorien\n $sql = 'SELECT k.kompetenz_id FROM kompetenzen k WHERE k.kompetenz_kategorie_id IN (';\n\n // Alle Einzelkategorien\n foreach ($kk_ids as $value) {\n $sql .= $value . ',';\n }\n\n // Letztes Komma entfernen\n $sql = substr($sql, 0, -1);\n\n $sql .= ')';\n\n // und alle KOmeptenzen aus deren Unterkategorien\n foreach ($kk_ids as $value) {\n $sql .= \" OR k.kompetenz_kategorie_id IN\n (SELECT \n kompetenz_kategorie_id \n FROM kompetenz_kategorien \n WHERE lft > (SELECT lft FROM kompetenz_kategorien WHERE kompetenz_kategorie_id = $value) \n AND rgt < (SELECT rgt FROM kompetenz_kategorien WHERE kompetenz_kategorie_id = $value)\n AND root_id = (SELECT root_id FROM kompetenz_kategorien WHERE kompetenz_kategorie_id = $value)\n )\";\n }\n\n // nur aktive Kompetenzen anzeigen\n $sql .= ' AND k.aktiv = 1';\n }\n\n // Alle Kompetenzen und die, die die (3 mal ;)) gleiche Bezeichnung haben\n if (count($k_ids) > 0) {\n\n if (count($kk_ids) > 0) {\n $sql .= ' UNION ';\n } else {\n $sql = '';\n }\n\n // plain SQL wegen Komplexität\n $sql .= '(SELECT k.kompetenz_id FROM kompetenzen k WHERE k.kompetenz_id IN (';\n\n foreach ($k_ids as $value) {\n $sql .= $value . ',';\n }\n\n // Letztes Komma entfernen\n $sql = substr($sql, 0, -1);\n\n $sql .= ' \n )\n AND k.aktiv = 1 )';\n }\n //sfFirePHP::getInstance(true)->fb($sql);\n if (isset($sql)) {\n // TODO use this oder ähnliches\n $doctrine = Doctrine_Manager::getInstance()->getCurrentConnection()->getDbh();\n $q = $doctrine->query($sql);\n\n // Alle gefundenen Kompetenzen\n return $q->fetchAll(PDO::FETCH_COLUMN);\n } else {\n return false;\n }\n \n }", "title": "" }, { "docid": "86fafab88ba1c22ff23db7d05786f9de", "score": "0.4544016", "text": "function get_all_bahan_baku($koneksi){\n\t\t$query = \"SELECT * FROM bahan_baku\";\n\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "057d6f07ba5836874868d54d3b148469", "score": "0.45430526", "text": "function getPartaiByMaklun($no_tr_maklun){\n\t\n\t\t\t$this->db->select('*');\n \t\n \t\t\t$this->db->from('partai_tb');\n\n \t\t\t//$this->db->join('stock_kain','stock_kain.no_tr_grey \t\t\t= partai_tb.no_tr_grey');\n\t\n\t\t\t//$this->db->join('grey_tb', \t 'grey_tb.kd_kain \t\t\t\t\t= stock_kain.kd_kain');\n\t\n\t\t \t$this->db->where('status','M');\n\t\n\t\t \t$this->db->where('no_tr_maklun',$no_tr_maklun);\n\t\n\t\t \t$this->db->group_by('kd_partai');\n \t\n \t\t\t$query = $this->db->get()->result();\n \t\n \t\t\treturn $query;\n\t\n\t}", "title": "" }, { "docid": "e2dc4b91a275b0a722ca3351480205a0", "score": "0.4537121", "text": "function get_obektnameid($DB, $obektid)\n{\n $result = 0;\n $sth = $DB->query(\"SELECT obektinames.id from obektinames \n join obekti on obektinames.obekt = obekti.name \n where obekti.id = \" . $obektid);\n if ($sth)\n foreach ($sth as $row) {\n $result = $row[0];\n }\n if ($result > 0)\n return $result;\n else\n return 1;\n}", "title": "" }, { "docid": "1bc6ea0bea3fa711b127014e9b07508c", "score": "0.45321319", "text": "function uprav($con,$tabulka, $hodnoty,$where){\r\n $query = \"UPDATE $tabulka SET \";\r\n foreach ($hodnoty as $key => $value) {\r\n $query .= \"$key = '\".$value.\"'\";\r\n // pridani carky na konec pokud se nejedna o posledni item v poli\r\n if( next( $hodnoty ) ) { \r\n $query .= \" , \";\r\n } \r\n }\r\n \r\n $query .= \" WHERE $where ;\"; \r\n \r\n $result = mysqli_query($con,$query);\r\n if(!chyba($con)){\r\n return false;\r\n }\r\n info(\"Zaznam v tabulce $tabulka byl upraven.\");\r\n return $result;\r\n}", "title": "" }, { "docid": "c9a65ce27df3163319d3662e5b4701dc", "score": "0.45266566", "text": "function cuentaivas(){\n\t\t\t$sql=$this->query(\" SELECT co.account_id, co.description,co.manual_code\n\t\t\t FROM cont_accounts co\n\t\t\t WHERE co.status=1 \n\t\t\t AND co.removed=0 \n\t\t\t AND co.affectable=1 \n\t\t\t AND co.account_code like '1%' \n\t\t\t union SELECT co.account_id, \n\t\t\t co.description,co.manual_code FROM cont_accounts co \n\t\t\t WHERE co.status=1 AND co.removed=0 \n\t\t\t AND co.affectable=1 AND co.account_code like '2%'\");\n\t\t\t return $sql;\n\t\t}", "title": "" }, { "docid": "0522201f2e5f6ef2e1707490c150f2f6", "score": "0.45255473", "text": "function keyrows($query, array $map = array(), $in = false);", "title": "" }, { "docid": "2c7bbb0ffb6ab449a59a3498e8385f85", "score": "0.4525419", "text": "public function geneSql($name)\n {\n $query1 = $this->db->select('*')->from('ngene1')->where(\"symbol='$name'\")->get()->result_array();\n $query2 = $this->db->select('*')->from('ngene2')->where(\"symbol='$name'\")->get()->result_array();\n $query = array_merge($query1,$query2);\n $result = self::toJsonResult($query);\n return $result;\n }", "title": "" }, { "docid": "8c65c7caf0a00411cfab615bc0d83ad8", "score": "0.45235178", "text": "function DanhSachTheLoai(){\n\t$qr = \"\n\t\tSELECT * FROM the_loai \n\t\t \n\t\t \n\t\";\n\treturn mysql_query($qr);\n}", "title": "" }, { "docid": "d719290ddb9ca8b41be992de05ca5e1f", "score": "0.45213348", "text": "function getByTrKainjadi($no_tr_kainjadi){\n\n\t\t\t$this->db->select('* , COUNT(partai_tb.no_tr_grey) AS jml_rol, GROUP_CONCAT(partai_tb.no_tr_grey) AS list_grey');\n\t\n\t\t\t$this->db->from('partai_tb');\n\t\n\t\t\t$this->db->join('stock_kain','stock_kain.no_tr_grey \t\t\t= partai_tb.no_tr_grey');\n\t\n\t\t\t$this->db->join('grey_tb', \t 'grey_tb.kd_kain \t\t\t\t\t= stock_kain.kd_kain');\n\t\n\t\t\t$this->db->join('customer_tb', \t 'customer_tb.kd_customer \t\t= stock_kain.kd_customer');\n\t\n\t\t\t$this->db->where('partai_tb.no_tr_kainjadi', $no_tr_kainjadi);\n\t\n\t\t\t$this->db->where('partai_tb.status', 'F');\n\t\n\t\t\t$this->db->group_by('partai_tb.kd_partai');\n\t\n\t\t\t$query = $this->db->get();\n\t\n\t\t\treturn $query;\n\t\n\t}", "title": "" }, { "docid": "07a65e068bf334db1343e088a95abed7", "score": "0.45202416", "text": "function GetEtudiant($id){\n\n \ttry {\n \t\t$bdd=$this->connexion();\n\t\t$reponse=$bdd->prepare(\"select *\n\t\t\t \t from Adherent INNER JOIN Etudiant WHERE Adherent.cin=? AND Etudiant.cin=?\n\t\t\t\t\t\t\t\t \");\n\n\n \t\t\t$reponse->execute([$id,$id]);\n\t\t\t$fetch=$reponse->fetch();\n \t\t\t$reponse->closeCursor();\n \t\t\treturn $fetch;\n\n \t} catch (Exception $e) {\n \t\t echo $e->getMessage();\n \t}\n\n}", "title": "" }, { "docid": "d43bc7606e3af79cfa57615397a9940e", "score": "0.4516123", "text": "function getDataTable_Values($table_name, $where_id = \"\", $debug =FALSE){\n // $where_id =\"AND attributes.attribute = {$id}\";//change this to set select where\n $where_id = \"\" ? \"\" : \" where 1=1 \" . $where_id;\n $sql = \"SELECT * FROM {$table_name}\" . $where_id;\n if ($debug){\n printf( \"<br>\".$sql.\"<br>\");\n }\n $res = sql($sql, $eo);\n return db_fetch_assoc($res);\n}", "title": "" } ]
818184185db2aa8021d78d1ca95cb936
Get a class instance
[ { "docid": "8022f56b774f6a1e76255827dc5ef16a", "score": "0.0", "text": "public function get(string $sClass)\n {\n if($this->locator !== null && $this->locator->has($sClass))\n {\n return $this->locator->get($sClass);\n }\n return $this->container->get($sClass, ContainerInterface::NULL_ON_INVALID_REFERENCE);\n }", "title": "" } ]
[ { "docid": "880811fed8f995e9ff299ce9416ac284", "score": "0.7769345", "text": "public static function get($class = __CLASS__)\n {\n if(self::$_instance == null) {\n self::$_instance = new $class;\n }\n return self::$_instance;\n }", "title": "" }, { "docid": "a6ac9a0c8a79f1ea62b80fc9ddcf10ad", "score": "0.7602417", "text": "public static function get($class)\n {\n return $class::getInstance();\n }", "title": "" }, { "docid": "5c353c4d05e5cc7dd55cdb18e0130327", "score": "0.75727856", "text": "public function getInstance($class) {\n return $this->_objectManager->get($class);\n }", "title": "" }, { "docid": "a68aee12106377702286c1696c3220a2", "score": "0.73823833", "text": "public static final function instance() {\n\t\t\t// Get the class\n\t\t\t$class = self::className();\n\t\t\t// Return a new instance instance\n\t\t\treturn new $class;\n\t\t}", "title": "" }, { "docid": "ed05608f8927614cc5d6a22e74e53b0b", "score": "0.7378295", "text": "public static function getInstance() {\n $classname = __CLASS__;\n return new $classname;\n }", "title": "" }, { "docid": "49cabd678f937a7f5364a7e965b67521", "score": "0.73733914", "text": "public function get(string $class): object;", "title": "" }, { "docid": "a74eeec41f412a97bf45241c8d1e6d7e", "score": "0.7323618", "text": "public static function instance() {\n return self::getInstanceOf(__CLASS__);\n }", "title": "" }, { "docid": "78a063e33444b8d1857e889a8a3d3287", "score": "0.72428954", "text": "public function get($class){\n\t\t\t\n\t\t\t$this->reflection = new \\ReflectionClass($class);\n\t\t\t$constructor = $this->reflection->getConstructor();\n\n\t\t\tif(is_null($constructor)){\n\t\t\t\treturn new $class();\n\t\t\t}else{\n\t\t\t\t$this->getDependencies($class,$constructor);\n\t\t\t\treturn $this->instantiateAndReturn($class);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "40de266376a2dc5b55fa6359d58164c3", "score": "0.72026324", "text": "public static function getInstance()\n {\n $clazz = get_called_class();\n \n if (!array_key_exists($clazz, self::$_instances)) {\n self::$_instances[$clazz] = new $clazz();\n }\n \n return self::$_instances[$clazz];\n }", "title": "" }, { "docid": "d2318cd36c26f92e018b5b4d5c490787", "score": "0.71933913", "text": "public static function instance() {\n\t\t$class_name = get_called_class();\n\n\t\tif ( ! isset( self::$instances[ $class_name ] ) ) {\n\t\t\tself::$instances[ $class_name ] = new $class_name; // phpcs:ignore WordPress.Classes.ClassInstantiation.MissingParenthesis\n\t\t\tself::$instances[ $class_name ]->setup();\n\t\t}\n\n\t\treturn self::$instances[ $class_name ];\n\t}", "title": "" }, { "docid": "92dad7a97278bc66c652d27deec87b11", "score": "0.7172236", "text": "function getInstance($class_name)\n{\n\tif(class_exists($class_name)) {\n\n\t\treturn new $class_name;\n\n\t} else {\n\t\treturn null;\n\t}\n\n}", "title": "" }, { "docid": "b223b7ebfa7094735463f1b4d27e6390", "score": "0.7116161", "text": "public static function get_instance() {\n $self = __CLASS__;\n\n if ( is_null( $self::$instance ) ) {\n $self::$instance = new $self;\n }\n\n return $self::$instance;\n }", "title": "" }, { "docid": "7048c0f3fb235bda74a83028c44ad0bf", "score": "0.7096381", "text": "public static function getInstance() {\r\n\t\t$class = get_called_class();\r\n\t\tif(! isset(static::$_instances[$class])) {\r\n\t\t\tstatic::$_instances[$class] = new $class();\r\n\t\t}\r\n\t\treturn(static::$_instances[$class]);\r\n\t}", "title": "" }, { "docid": "d4e21e7502b006aa41f58ebfa0f14afb", "score": "0.7067553", "text": "static function get_instance() {\n if (self::$instance) {\n return self::$instance;\n }\n else {\n // we want to instanciate child class, not parent class.\n $class = get_called_class();\n return new $class;\n }\n }", "title": "" }, { "docid": "d1757dd747bda080cd759308bef7d01e", "score": "0.70529896", "text": "public static function newInstance() {\n\t\t$reflectionClass = new ReflectionClass ( __CLASS__ );\n\t\treturn $reflectionClass->newInstance ();\n\t}", "title": "" }, { "docid": "97592808dfa0d03537ca6082a680e8ca", "score": "0.70169944", "text": "public static function instance() {\n // See http://stackoverflow.com/questions/15443458\n $class = get_called_class();\n\n if (!$class::$instance) {\n $class::$instance = new $class();\n }\n return $class::$instance;\n }", "title": "" }, { "docid": "48d2de208e2c5f1643ca0e54801a2737", "score": "0.70077044", "text": "public static function getInstance() {\n $class = get_called_class();\n\n if (!isset(self::$instances[$class])) {\n self::$instances[$class] = new $class;\n }\n return self::$instances[$class];\n }", "title": "" }, { "docid": "726a0a2defda7ec21783e5dff887b224", "score": "0.6984868", "text": "public static function instance() \n {\n\t\t// if the instance hasn't been created yet\n if (!isset(self::$instance)) {\n\t\t\t// use the current classname\n $C = __CLASS__;\n\t\t\t// and create the instance as a new object of that class\n self::$instance = new $C;\n }\n\n\t\t// return a reference to the instance\n return self::$instance;\n }", "title": "" }, { "docid": "b874e5dee4225bced1e7e1f6fcd14e0b", "score": "0.6962155", "text": "public static function getInstance()\n {\n $object = __CLASS__;\n self::$instance = new $object();\n return self::$instance;\n }", "title": "" }, { "docid": "b874e5dee4225bced1e7e1f6fcd14e0b", "score": "0.6962155", "text": "public static function getInstance()\n {\n $object = __CLASS__;\n self::$instance = new $object();\n return self::$instance;\n }", "title": "" }, { "docid": "b874e5dee4225bced1e7e1f6fcd14e0b", "score": "0.6962155", "text": "public static function getInstance()\n {\n $object = __CLASS__;\n self::$instance = new $object();\n return self::$instance;\n }", "title": "" }, { "docid": "880881ec6c5107824811e87eadaaab09", "score": "0.69478667", "text": "private static function instantiate($class){\n $service = new $class();\n return $service;\n }", "title": "" }, { "docid": "35fda207f9325acc96760cb5a3870c1e", "score": "0.6943093", "text": "public static function getInstance() {\n\n static $instance;\n\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self;\n\n return $instance;\n }", "title": "" }, { "docid": "09bfafa08b7e2b9eabff54eff6c7572a", "score": "0.6936432", "text": "public static function get_instance() {\n\t\tif (!isset(self::$_instance)) {\n\t\t\t$c = __CLASS__;\n\t\t\tself::$_instance = new $c;\n\t\t}\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "8a781b5c475a28d34f95f03f6c0ed414", "score": "0.69251996", "text": "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "aceca3d8110231577a301aefd2e91757", "score": "0.69214535", "text": "public static function getInstance() \n {\n \t$class = __CLASS__;\n \tif (!isset(self::$_Object)) {\n \t\treturn new $class();\n \t}\t\n \treturn self::$_Object;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "4f727d4e38abd33c9304202b0e90e366", "score": "0.69183624", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n\n return self::$classInstance;\n }", "title": "" }, { "docid": "b4dceca67a6cfb043a70ab13defa5d4a", "score": "0.6916905", "text": "public static function get_instance($class)\n {\n $place_of_viewers=self::$place_of_viewers;\n return eval(\"return \\$instance=new $place_of_viewers$class();\");\n }", "title": "" }, { "docid": "31ee0445b02ca967b6e8f4c18813cc24", "score": "0.6912885", "text": "static public function get_instance( )\n\t{\n\t\tif (is_null(self::$_instance)) {\n\t\t\t$c = __CLASS__;\n\t\t\tself::$_instance = new $c( );\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "427ea01b70cac7e09ed3a85bfbb4b514", "score": "0.69062126", "text": "final public static function getInstance() {\n\n static $instance;\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self;\n\n return $instance;\n }", "title": "" }, { "docid": "8cade1e908b6f5941de88c8b08b20c27", "score": "0.6902486", "text": "public static function getInstance() \r\n {\r\n \t$class = __CLASS__;\r\n \tif (!isset(self::$_Object)) {\r\n \t\treturn new $class();\r\n \t}\t\r\n \treturn self::$_Object;\r\n }", "title": "" }, { "docid": "5b2a83f2a945ae4b5d7eb57ac847a095", "score": "0.6897652", "text": "public static function getInstance()\n {\n if ( self::$classInstance === null )\n {\n self::$classInstance = new self();\n }\n \n return self::$classInstance;\n }", "title": "" }, { "docid": "1139c00bc85497c25b4a70500eb1b0c7", "score": "0.68866473", "text": "public static function instance() {\n if (!self::$instance) {\n $class = __CLASS__;\n self::$instance = new $class();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "5129482dc6b868cc790b9f3d90fb2b4b", "score": "0.688174", "text": "public static function getInstance()\n {\n static $instance;\n\n if($instance === null) {\n $calledClass = get_called_class();\n $instance = new $calledClass();\n }\n\n return $instance;\n }", "title": "" }, { "docid": "7f8447f21c4ddef4e05f7e5e9d6bfd9b", "score": "0.68573576", "text": "static public function getInstance()\n\t{\n\t\t$class = strtolower(get_called_class());\n\t\t\n\t\tif($class == __CLASS__)\n\t\t\twp_die('Unable to call protected method getInstance on ' . __CLASS__);\n\t\t\n\t\tif(!isset(self::$_instance[$class]))\n\t\t\tself::$_instance[$class] = new $class();\n\t\t\n\t\treturn self::$_instance[$class];\n\t}", "title": "" }, { "docid": "014ca3f183b373052c9a3caaee7e9e00", "score": "0.6852547", "text": "private static function instantiate($class) \n {\n $reflection = new ReflectionClass($class);\n return $reflection->newInstanceWithoutConstructor(); \n }", "title": "" }, { "docid": "4f4f9589dbb733a358f58e979efc91c7", "score": "0.6839337", "text": "public static function getInstance()\n {\n static $instance;\n if ($instance === null) {\n $class = __CLASS__;\n $instance = new $class();\n }\n return $instance;\n }", "title": "" }, { "docid": "ecb550294fe1f329830965ada15b53af", "score": "0.68320185", "text": "public static function getInstance() {\n\n $class = __CLASS__;\n if(self::$instance == null) {\n self::$instance = new $class;\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "c850576d6b36742dca8cea489b5ff3db", "score": "0.6810567", "text": "public function get_instance();", "title": "" }, { "docid": "903e92040e5e018e8d9d2f4ddbc28530", "score": "0.6802337", "text": "public static function getInstance()\n {\n $className = get_called_class();\n if (!isset(self::$instances[$className])) {\n self::$instances[$className] = new $className;\n }\n\n return self::$instances[$className];\n }", "title": "" }, { "docid": "1d6dc1062a30cc0d74fca159ff780cdb", "score": "0.6799223", "text": "protected function getInstance($class_name)\r\n {\r\n return new $class_name();\r\n }", "title": "" }, { "docid": "39761059384b033bec72a9cb86db16d2", "score": "0.6792851", "text": "static public function getInstance($class = 'queryPeople') {\r\n if (!isset(self::$instance)) {\r\n $class = __CLASS__;\r\n self::$instance = new $class;\r\n } //end if\r\n\r\n return self::$instance;\r\n }", "title": "" }, { "docid": "49e9d8fa7f75e7192209fa33f1e2c82f", "score": "0.6790092", "text": "public static function instance() {\n\t\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t\t$className = __CLASS__;\n\t\t\t\tself::$instance = new $className;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "title": "" }, { "docid": "81a8b962f26adcce0dd4025cc78a6d96", "score": "0.67848784", "text": "public static function get_instance() {\n if ( ! static::$instance ) {\n try {\n static::$instance = ( new ReflectionClass( get_called_class() ) )\n ->newInstanceWithoutConstructor();\n call_user_func_array( array( static::$instance, \"__init\" ), func_get_args() );\n } catch ( \\ReflectionException $e ) {\n wp_die( $e->getMessage() );\n }\n }\n\n return static::$instance;\n }", "title": "" }, { "docid": "f66047bc6ea314cadadbba107b8f61d0", "score": "0.67830306", "text": "final public static function getInstance() {\n $class_name = get_called_class();\n if(!isset(self::$_instance[$class_name])) {\n self::$_instance[$class_name] = new $class_name();\n }\n return self::$_instance[$class_name];\n }", "title": "" }, { "docid": "6d63da3405b1e0d53d09209ac551b3d8", "score": "0.678233", "text": "protected function getInstance($class)\n {\n \tif (isset($this->methods[$class])) {\n \t\t$method = $this->methods[$class];\n \t\t\n \t\tif (!method_exists($this, $method)) {\n \t\t\tthrow new Exception('Method ' . $method . ' does not exist');\n \t\t}\n \t\t\n return $this->$method($class);\n \t}\n \t\n \tif (!class_exists($class)) {\n \t throw new Exception('Class \"' . $class . '\" does not exist');\n \t}\n \t\n return new $class();\n }", "title": "" }, { "docid": "7596d2fd3a70a78c02fa8828217bc055", "score": "0.678051", "text": "public static function getInstance() {\n\t\treturn GeneralUtility::makeInstance(self::class);\n\t}", "title": "" }, { "docid": "184ffa6fe5aa2fa3ba89f5f1c5d719f3", "score": "0.67700493", "text": "protected static function getInstance($class)\n {\n if (is_object($class))\n {\n return $class;\n }\n\n if (isset(static::$instances[$class]))\n {\n return static::$instances[$class];\n }\n\n return static::$instances[$class] = new $class();\n }", "title": "" }, { "docid": "079671866392ca7f1eb8cd8170418625", "score": "0.67661446", "text": "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "title": "" }, { "docid": "437c9db359e91bbd53b4cda8ee23940f", "score": "0.67658305", "text": "private function instantiateAndReturn($class){\n\t\t\t\n\t\t\tforeach($this->objects as $object){\n\t\t\t\t$this->instantiatedObjects[] = (new JexmDi)->get($object->name);\n\t\t\t}\n\t\t\treturn $this->reflection->newInstanceArgs($this->instantiatedObjects);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "bb38035db395b365f9f80e88907382fb", "score": "0.67583114", "text": "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "title": "" }, { "docid": "fb276b9b8df31c2ae3d74c4aacb56232", "score": "0.6749911", "text": "final public static function getInstance() {\n\t\t$c = get_called_class();\n\t\t\n\t\t\n\t\tif(!isset(self::$instance[$c])) {\n\t\t\tself::$instance[$c] = new $c;\n\t\t}\n\t\t\n\t\treturn self::$instance[$c];\n\t}", "title": "" }, { "docid": "0b196470e263b9a21693397440f0c7b5", "score": "0.67402947", "text": "public static function instance()\n {\n\t\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t\t$className = __CLASS__;\n\t\t\t\tself::$instance = new $className;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "title": "" }, { "docid": "78e2b46ad343af0ff5fe355c6efb4560", "score": "0.67261076", "text": "public static function GetInstance ();", "title": "" }, { "docid": "f17d2a2a881da3659036cc8315c18f0a", "score": "0.6725772", "text": "public static function getInstance() {\n\t\tif (!isset(self::$instance)) {\n\t\t\t$class = __CLASS__;\n\t\t\tself::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "58d01c8e5bbc8f718f47ac16b6327097", "score": "0.672518", "text": "public static function getInstance() {\n\t\treturn Singleton::getInstance(__CLASS__);\n\t}", "title": "" }, { "docid": "4ca17e2cb810edc317697869532a6842", "score": "0.6721505", "text": "public static function getInstance() {\n\t\tif (! isset ( self::$instance )) {\n\t\t\t$className = __CLASS__;\n\t\t\tself::$instance = new $className ();\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "21fde65ec064376a1d00de6c5c6758c0", "score": "0.67200935", "text": "public static function instance() {\n\t\t\tif ( !isset( self::$_this ) ) {\n\t\t\t\t$className = __CLASS__;\n\t\t\t\tself::$_this = new $className;\n\t\t\t}\n\t\t\treturn self::$_this;\n\t\t}", "title": "" }, { "docid": "cf4cb049fc5f34da8a2bcb20e9aa5dde", "score": "0.67090183", "text": "protected static function instance()\n\t{\n\t\treturn self::getInstanceOf( get_class() );\n\t}", "title": "" }, { "docid": "bd958733dc4be96ccfd7c1d085ca35f2", "score": "0.6696415", "text": "public static function getInstance()\n {\n if (self::$uniqueInstance === null) {\n $className = __CLASS__;\n self::$uniqueInstance = new $className();\n }\n\n return self::$uniqueInstance;\n }", "title": "" }, { "docid": "9c179b2dfe9d9d452336930db04272b5", "score": "0.66902417", "text": "public static function get_instance() {\n\t\tif ( !is_a( self::$instance, __CLASS__ ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7addbc25cd02df3ad7393d6ea0e9c46f", "score": "0.66897416", "text": "public static function getInstance() {\n\t\tif (self::$instance === null) {\n\t\t\t$class = __CLASS__;\n\t\t\treturn self::$instance = new $class;\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "c6e98d01dcb9c07b555c73458fdcbb50", "score": "0.66802585", "text": "public static function get(){\n if ( is_null(self::$instance) ) {\n self::create();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "97581a2f9b31c06d431d3e145adf289c", "score": "0.66749525", "text": "public static function getInstance()\n {\n if ( empty( static::$instance ) ) {\n $className = get_called_class();\n\n static::$instance = new $className();\n\n if ( method_exists( static::$instance, '__reconstruct' ) ) {\n call_user_func_array( [ &static::$instance, '__reconstruct' ], func_get_args() );\n }\n }\n\n return static::$instance;\n }", "title": "" }, { "docid": "dbc8a1099073dde33e2f5fa07777eefa", "score": "0.6672205", "text": "public static function getInstance()\n {\n $class = get_called_class();\n\n if (!isset(self::$instances[$class])) {\n self::$instances[$class] = new static();\n }\n return self::$instances[$class];\n }", "title": "" }, { "docid": "621f8a1259371f86b4eca37ae1b0e54b", "score": "0.6668489", "text": "public static function getInstance(){\n if(!isset(self::$instance)){\n $clase = __CLASS__;\n self::$instance = new $clase;\n }\n return self::$instance;\n }", "title": "" }, { "docid": "08a4a77297b8a16d26ec99feba201905", "score": "0.6668012", "text": "function getInstance(string $className)\n {\n $container = getContainer();\n\n return $container->get($className);\n }", "title": "" }, { "docid": "14f99a72c53d6d4101a210aa23393335", "score": "0.6665099", "text": "public static function getInstance(){\r\n\t\treturn self::getSingletonInstance(__CLASS__);\r\n\t}", "title": "" }, { "docid": "5e84b2909ed03535d1fdf44968b06647", "score": "0.6665035", "text": "public static function getInstance() {\n \n if (self::$uniqueInstance === NULL) {\n $className = __CLASS__;\n self::$uniqueInstance = new $className;\n }\n return self::$uniqueInstance;\n \n }", "title": "" }, { "docid": "8961f74ad9f2c01df76efa1802aa59f1", "score": "0.6658022", "text": "public static function get_instance()\n {\n return self::$instance ?: (self::$instance = new self());\n }", "title": "" }, { "docid": "dd1dae64d5dab933c4ba2da33a1f8306", "score": "0.6653582", "text": "public static function getInstance()\n {\n if (!self::$instance)\n {\n $class = __CLASS__;\n self::$instance = new $class();\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "8153d596c9741e91f72d4bdd855e6f5e", "score": "0.6639971", "text": "private static function Set_Instance()\n\t{\n\t\t$Class = get_class();\n\n\t\tif(self::Check_IsInstanced() == FALSE)\n\t\t{\n\t\t\tstatic::$Instance = new $Class();\n\t\t\treturn static::$Instance;\n\t\t}\n\t}", "title": "" }, { "docid": "90f0e338a64729a881aea5daafb0dfa3", "score": "0.66382605", "text": "public static function getInstance()\n {\n if (!isset(self::$_instance)) {\n $class = __CLASS__;\n self::$_instance = new $class;\n }\n\n return self::$_instance;\n }", "title": "" }, { "docid": "dc879928c09bcb67e58a150ea7e66367", "score": "0.6629542", "text": "public static function getInstance()\n {\n if (!isset(self::$_instance) || !is_object(self::$_instance)) {\n $c = __CLASS__;\n self::$_instance = new $c();\n }\n return self::$_instance;\n }", "title": "" }, { "docid": "9a1577eb4fca21441c83dcff4aa93a11", "score": "0.6628382", "text": "public function instance();", "title": "" }, { "docid": "4ded2844d014484167096b8b8e362133", "score": "0.66241807", "text": "public static function GetInstance()\n {\n static $oInstance = null;\n if (is_null($oInstance)) {\n $oInstance = new self();\n }\n\n return $oInstance;\n }", "title": "" }, { "docid": "59688f515e3e28090a26e05131b5ca65", "score": "0.66137725", "text": "public static function getInstance()\n {\n $calledClass = get_called_class();\n\n if (!isset(self::$instances[$calledClass])) {\n self::$instances[$calledClass] = new $calledClass();\n }\n\n return self::$instances[$calledClass];\n\n \n }", "title": "" }, { "docid": "0d84823dedfd837608fb7cb3cff2d6b1", "score": "0.6610828", "text": "public static function &getInstance() {\n\t\t$className = __CLASS__;\n\t\tif (isset ( self::$_instance ) === false) {\n\t\t\tself::$_instance = new $className ();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "70e5b5685fae778d51f195625ad81057", "score": "0.66079265", "text": "function singleton($class)\n{\n return Container::getInstance()->get($class);\n}", "title": "" }, { "docid": "a28f2ddee22948434c388495a546d702", "score": "0.6602536", "text": "public static function getInstance() {\n if (self::$instance == null) {\n $object = __CLASS__;\n self::$instance = new $object;\n }\n return self::$instance;\n }", "title": "" }, { "docid": "21eb0caf18de00b51a21403102581171", "score": "0.6591871", "text": "public static function make( $class ) {\n\t\treturn static::container()->make( $class );\n\t}", "title": "" } ]
62eee83d54261bedb22d15b67bbd0fbb
Update the resource in storage.
[ { "docid": "3c8d1ad2d5869ada782d59a2c9f7947d", "score": "0.0", "text": "protected function edit()\n {\n try {\n $this->project->update($this->data());\n } catch ( \\Exception $e ) {\n $this->setError('Could not update the resource in storage.', 500);\n return false;\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "352ddad568859b94ee19a4459347b263", "score": "0.76682067", "text": "public function update() {\n $data = array($this->backing);\n $results = json_decode($this->context->make_request(\n $this->resource_type, \"PUT\", strval($this->backing[\"id\"]), \n json_encode($data), NULL, NULL), true);\n $this->backing = $results[0];\n }", "title": "" }, { "docid": "b8af9491d409a852eeea996523d9e2fa", "score": "0.75100297", "text": "protected function updateResource()\n {\n $this->context->resource->fill($this->context->input);\n $this->applyHooks(BeforeUpdate::class);\n $this->applyHooks(BeforeSave::class);\n $this->context->resource->save();\n $this->applyHooks(AfterSave::class);\n $this->refreshResource();\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6550313", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.65004265", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d16d32440e89b8f31c0ca259c26f0400", "score": "0.63662523", "text": "public function update() {\r\n\t\t$this->_update();\r\n\t}", "title": "" }, { "docid": "0f2093f72bda4c4078acc25979466bfc", "score": "0.6327056", "text": "public function update() {\n\t\t$this->_update();\n\t}", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.6303813", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "880715ba5af0affb767965ac42e71574", "score": "0.62310517", "text": "public function update()\n {\n // Temporary cheaty way, should see if a more effictient way is\n // available\n $this->storage->deleteLink($this->id); // Cannot have removeAllNodes called\n $this->save();\n }", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.6221645", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "9455f5aa9c989bb04e6b6d3e1b419576", "score": "0.6204887", "text": "public function update()\n {\n $this->beginAction('update');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->gatherInput();\n $this->validateInput(true);\n $this->updateResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "3389492293a758320b4c643143959b53", "score": "0.61706936", "text": "function update( $resource ){\n\n $image_path = asset_dir( 'img\\\\products\\\\') ;\n $image = 'img/products/'.$_FILES['product_image']['name'];\n\n $data = [\n\n \"product_name\" => $_POST['product_name'],\n \"product_description\" => $_POST['product_description'],\n \"product_brand\" => $_POST['product_brand'],\n \"sku\" => $_POST['sku'],\n \"product_type\" => $_POST['product_type'],\n \"updated_at\" => date( 'Y-m-d H:i:s' ),\n\n\n ];\n\n if( ! $_FILES['product_image']['error'] == 4){\n $data['product_image'] = $image;\n }\n\n if(!upload_post_image( $_FILES['product_image'], $image_path )){\n redirect( route( 'product/create?message=1' ) );\n }\n\n if( !patch( 'products', $resource, $data ) ){\n redirect( route( 'product/create?message=1' ) );\n }\n\n //Do Stock Process\n\n $stock_data = [\n\n 'product_id' => where( 'products', \"sku = {$_POST['sku']}\" )[0]['id'],\n 'stock' => $_POST['stock'],\n 'stock_limit' => $_POST['stock_limit'],\n 'created_at' => date( 'Y-m-d H:i:s' ),\n 'updated_at' => date( 'Y-m-d H:i:s' )\n\n ];\n\n if( !insert( 'inventory', $stock_data) ){\n\n redirect( route( 'product/create?message=1' ) );\n\n }\n\n redirect( route( \"product/{$resource}/edit\" ) );\n\n}", "title": "" }, { "docid": "e0f169404ca14678f1031bc947789344", "score": "0.6068444", "text": "public function update(Request $request, $id)\n {\n $codeno = \"JPM-\".rand(11111,99999);\n $item=Item::find($id);\n $name=$request->name;\n $newphoto=$request->photo;\n //$codeno=$request->codeno;\n $oldphoto=$item->photo;\n $price=$request->price;\n $discount=$request->discount;\n $description=$request->description;\n $subcategoryid=$request->subcategoryid;\n $brandid=$request->brandid;\n\n if($request->hasFile('photo'))\n {\n $imageName=time().'.'.$newphoto->extension();\n $newphoto->move(public_path('images/item'),$imageName);\n $filepath='images/item/'.$imageName;\n if (\\File::exists(public_path($oldphoto))) \n {\n (\\File::delete(public_path($oldphoto)));\n }\n }\n else\n {\n $filepath=$oldphoto;\n }\n\n $item->name=$name;\n $item->photo=$filepath;\n $item->codeno = $codeno;\n $item->price=$price;\n $item->discount=$discount;\n $item->description=$description;\n $item->subcategory_id=$subcategoryid;\n $item->brand_id=$brandid;\n\n $item->save();\n\n $message='Item updated successfully.';\n $status=200;\n $result= new ItemResource($item);\n\n\n $response=[\n 'status'=>$status,\n 'success'=>true,\n 'message'=>$message,\n 'data'=>$result\n ];\n return response()->json($response);\n\n }", "title": "" }, { "docid": "7bd2525beb3449c96f96e3f57ddfd9d4", "score": "0.6023428", "text": "public function save()\n {\n if ($this->dirty) {\n $name = pSQL($this->name);\n $content = pSQL(json_encode($this->storage));\n $expiration = (int)(time() + $this->ttl);\n\n $connection = Db::getInstance();\n $table = bqSQL(_DB_PREFIX_ . 'coreupdater_cache');\n $updateSql = (\n \"INSERT INTO $table(name, content, expiration) \" .\n \"VALUES ('$name', '$content', $expiration) \" .\n \"ON DUPLICATE KEY UPDATE content=VALUES(content), expiration=VALUES(expiration)\"\n );\n if (! $connection->execute($updateSql)) {\n $connection->displayError();\n }\n $this->dirty = false;\n }\n }", "title": "" }, { "docid": "1b95c33d6856dbe3d6806b3117503341", "score": "0.60176677", "text": "public function updateEntry (Liquid_Storage_Entry $entry);", "title": "" }, { "docid": "1a0bc6bd780bf78dd90b1811d1432481", "score": "0.5925688", "text": "protected function refreshResource()\n {\n $this->context->resource = $this->context->resource->fresh($this->getRelations());\n }", "title": "" }, { "docid": "e7748ddc421ea081fef92f2fc58caadf", "score": "0.5921437", "text": "protected function update() {\n }", "title": "" }, { "docid": "e7748ddc421ea081fef92f2fc58caadf", "score": "0.5921437", "text": "protected function update() {\n }", "title": "" }, { "docid": "79da2146a3794a65b80951c7ea2a2404", "score": "0.5911985", "text": "public function save()\n {\n $this->storage->save();\n }", "title": "" }, { "docid": "0fd5c1c545da27512d8277d6ce8e8397", "score": "0.5911398", "text": "public function update(){\n \treturn $this->persistency->update($this->to_array());\n }", "title": "" }, { "docid": "4b46715f49975fda8120c11e061f9ee5", "score": "0.5904723", "text": "function Update () {\n $this->Purify ();\n parent::Update ();\n }", "title": "" }, { "docid": "1e02da1912e8bc5a895cb1c54511f04f", "score": "0.589823", "text": "public function update()\n {\n }", "title": "" }, { "docid": "8b73dba39ae08dde13c502b11f4a48f0", "score": "0.58952075", "text": "public function update(Request $request, StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "0796347760b32b6ecbcbd8ff6bb30bbc", "score": "0.5888276", "text": "public function update(Request $request)\n {\n //\n $old = store::find($request['id']);\n $bol = 0;\n\n if ($old['file_path'] == $request['file'] || $request['file'] == null) $bol = 0;\n else $bol++;\n\n\n $img_name = $old['file_path'];\n\n if ($bol > 0) {\n $ex = $request->file->getClientOriginalExtension();\n $img_name = time() . '.' . $ex;\n $request->file->move(public_path('images'), $img_name);\n }\n\n $old->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'discount' => $request->discount,\n \"file_path\" => $img_name,\n ]);\n session()->flash('Edit', 'T-Shirt Edited');\n $store = store::all();\n return redirect('/store');\n }", "title": "" }, { "docid": "99ed289a15485d5777e53825867aacf1", "score": "0.58702266", "text": "public function update() {\n }", "title": "" }, { "docid": "99ed289a15485d5777e53825867aacf1", "score": "0.58702266", "text": "public function update() {\n }", "title": "" }, { "docid": "42fdb14771f2a094213fff3ad60fa7a3", "score": "0.58650756", "text": "protected function updateResouces()\n {\n $resources = $this->user->nation->resources;\n\n foreach ($this->updates as $update)\n $resources->{$update} += $this->{$update} * $this->diff;\n\n $resources->save();\n }", "title": "" }, { "docid": "af040437e7fb45157da33c190771f474", "score": "0.585456", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Resource::getRulesForUpdate($id));\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tif (Input::file('file')){\n\t\t\t$file = Input::file('file');\n\n\t\t\t$extension = $file->getClientOriginalExtension();\n\t\t\t$destinationPath = 'eltdpResources';\n\t\t\t$filename = preg_replace('/\\s+/', '_', $data['name']);\n\t\t\t$uploadSuccess = $file->move($destinationPath, $filename .'.'. $extension);\n\t\t\t\t\n\t\t\tif ($uploadSuccess) {\n\n\t\t\t\t$data['picture'] = Resource::getExtensionType($file, $destinationPath, $filename);\n\n\t\t\t\tif($data['picture']){\n\n\t\t\t\t\t$data['file'] = $destinationPath .'/'. $filename .'.'. $extension;\n\n\t\t\t\t\t$resourceId = $this->resource->create($data)->id;\n\n\t\t\t\t\treturn Redirect::route('resources.show', $resourceId)\n\t\t\t\t\t->with('message', 'Resource saved.');\n\n\t\t\t\t} else {\n\t\t\t\t\tResource::destroy($this->resource->id);\n\t\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('message', 'The file you are trying to upload is not supported.<br> Supported file types are pdf, doc, docx, jpg, gif, bmp, mp3, mp4');\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($Validator)\n\t\t\t\t\t->with('message', 'Please upload a file.');\n\t\t\t}\n\t\t}\n\t\t$resource->update($data);\n\n\t\treturn Redirect::route('resources.index');\n\t}", "title": "" }, { "docid": "be0cf7dcfb27e1ca530927cf14a45683", "score": "0.58427614", "text": "protected function _update()\n {\n }", "title": "" }, { "docid": "241abe88cb12c84c9ac5ad453b88fdde", "score": "0.58392626", "text": "protected function put()\n {\n $article = ArticleModel::init($this->args['articleId']);\n $this->user->assertArticleAccess($article);\n\n // Read the version to set as current.\n $versionId = trim($this->request->getBody());\n if (!is_numeric($versionId)) {\n $this->response->setStatusCode(400);\n $this->response->setHeader('Content-Type', 'text/plain');\n $this->response->setBody(\"Request body must be the integer ID of the version to promote to current. (text/plain)\");\n return;\n }\n\n try {\n $version = VersionModel::init($this->args['articleId'], $versionId);\n } catch (ResourceException $e) {\n if ($e->getCode() === ResourceException::NOT_FOUND) {\n throw new ResourceException(\n \"Version {$versionId} does not belong to this article.\",\n ResourceException::INVALID_DATA\n );\n }\n throw $e;\n }\n\n // Fail if the passed version is already the current version.\n if ($version->isCurrent) {\n throw new ResourceException(\n \"Version {$version->versionId} is already the current version.\",\n ResourceException::CONFLICT\n );\n }\n\n // Point the article to the new version.\n $article->setCurrentVersion($version);\n\n // Out the article.\n $this->response->setStatusCode(200);\n $this->response->setHeader('Content-Type', 'application/json');\n $this->response->setBody(json_encode($article));\n }", "title": "" }, { "docid": "c4d757ef327886959b7e0e652b0d54f4", "score": "0.5838358", "text": "private function update(ResourceInterface $resource)\n {\n $this->dispatcher->dispatch(ResourceEvents::PRE_UPDATE, $resource);\n $this->eventfullySave($resource);\n $this->dispatcher->dispatch(ResourceEvents::POST_UPDATE, $resource);\n }", "title": "" }, { "docid": "ffe21bd762149997c44b26db5d482ba7", "score": "0.5835084", "text": "public function update()\n {\n // TODO: Implement update() method.\n }", "title": "" }, { "docid": "b643f98659bfb48decbed178cf3a090b", "score": "0.5832249", "text": "public function update() {\n \n }", "title": "" }, { "docid": "59ba6270b1c4aa7c84730765d69dfad2", "score": "0.58235246", "text": "public function update(): void\n {\n $this->addPaymentMethods();\n $this->updateMediaData();\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5819039", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5819039", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5819039", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5819039", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5819039", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "367ed20159082fde3a61a6959e75f873", "score": "0.58179796", "text": "public function put() {}", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.5791831", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "20c20b5820c0f7ea955178f8f2ccab93", "score": "0.578902", "text": "public function update(){\n try{\n $entity = Val::getPayload($this,$this->TABLE_NAME);\n\n if(is_string($entity)){\n $entity = json_decode($entity,true);\n }\n\n $entity = ((array) $entity);\n\n $entity = R::dispense($entity);\n if($entity->id == 0){\n throw new Exception(\"Speichern einer entity ist so nicht möglich\");\n }\n\n $this->beforeUpdate($entity);\n R::store($entity);\n $this->afterUpdate($entity);\n\n $this->returnObject($entity,200);\n }catch (Exception $e){\n $this->makeResponse(null,$e->getMessage(),null,$e->getTraceAsString());\n }\n }", "title": "" }, { "docid": "c37580590cfb1b1fabab8a3db5c6b913", "score": "0.5773028", "text": "protected function update()\n {\n }", "title": "" }, { "docid": "ea6c6d07b930d59249f71b7957ae928d", "score": "0.5771892", "text": "public function update(HomeSliderUpdateRequest $request, $id)\n {\n $HomeSlider=HomeSlider::where('id',$id)->first();\n $HomeSlider->slider_url=$request['url'];\n $HomeSlider->slider_alt = $request['alt_text'];\n $HomeSlider->slider_sequence = $request['slider_sequence'];\n $HomeSlider->admin_id=Auth::user()->id; \n $file=$request->file('image'); \n if($file){\n $img_found = Storage::disk('slider_image')->exists( $HomeSlider->slider_name );\n if ($img_found) {\n $img=public_path().\"/image/home/slider/\".$HomeSlider->slider_name;\n $img_delete=unlink($img);\n $image=$request->image->getClientOriginalName();\n $img_name=date('Ymdhis') . '-' . $image ;\n $HomeSlider->slider_name=$img_name; \n if($HomeSlider->update()){\n Storage::disk('slider_image')->put($img_name, File::get($file) );\n return redirect()->route('admin-home_slider.index')->with(['success'=>'Successfully update.']);\n }\n else{\n return redirect()->route('admin-home_slider.index')->with(['error'=>'Unable to update.']);\n }\n }\n else{\n $image=$request->image->getClientOriginalName();\n $img_name=date('Ymdhis') . '-' . $image ;\n $HomeSlider->slider_name=$img_name; \n if($HomeSlider->update()){\n Storage::disk('slider_image')->put($img_name, File::get($file) );\n return redirect()->route('admin-home_slider.index')->with(['success'=>'Successfully update.']);\n }\n else{\n return redirect()->route('admin-home_slider.index')->with(['error'=>'Unable to update.']);\n }\n }\n \n }\n else{ \n if($HomeSlider->update()){\n return redirect()->route('admin-home_slider.index')->with(['success'=>'Successfully update.']);\n }\n else{\n return redirect()->route('admin-home_slider.index')->with(['error'=>'Unable to update.']);\n } \n } \n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5765951", "text": "public function update($data);", "title": "" }, { "docid": "4df6dc16bb8efe2c8eba411726e1c954", "score": "0.5746654", "text": "public function update() {\n\t\n\t}", "title": "" }, { "docid": "dae8a6503505f86c42e3ac3dd124b03f", "score": "0.57281154", "text": "public function update(Request $request, $id)\n {\n $book = Book::findorFail($id);\n $book->book_name=$request->input('book_name'); \n $book->author_name=$request->input('author_name');\n $book->shelf_no=$request->input('shelf_no');\n $book->shelf_image=\"\";\n $book->row_no=$request->input('row_no');\n $book->column_no=$request->input('column_no');\n $book->book_image=\"\";\n $book->book_quantity=$request->input('book_quantity');\n if($book->save()){\n $shelf_image = $request->file('shelf_image');\n if($shelf_image != null){\n $ext = $shelf_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($shelf_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n $book_image = $request->file('book_image');\n if($book_image != null){\n $ext = $book_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($book_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n \n return new BookResource($book);\n \n } \n }", "title": "" }, { "docid": "2a2dd650332c40648085bbdb87a6d49e", "score": "0.57111746", "text": "protected function _update()\n {\n $this->_setModificationInfo();\n $this->_protectCreatedInfo();\n }", "title": "" }, { "docid": "603936ee6603d028d17bbb52e971abda", "score": "0.56989837", "text": "public function testUpdateStore()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.5695618", "text": "public function update()\n {\n }", "title": "" }, { "docid": "7092f61a041cc71ed2c92f5221258a84", "score": "0.5690383", "text": "public function updateResources() {\r\n if(!$this->isloaded) $this->loadResources ();\r\n \r\n $items = implode(',', array_keys($this->_resource_id_index));\r\n $systems = implode(',', array_keys($this->_markets));\r\n \r\n $query = \"http://api.eve-marketdata.com/api/item_prices2.json\";\r\n $query_fields = array (\r\n 'char_name' => 'Azam Azara',\r\n 'type_ids' => $items,\r\n 'solarsystem_ids' => $systems,\r\n 'buysell' => 'a'\r\n );\r\n \r\n $html = new HttpRequest($query);\r\n $html->setQueryData($query_fields);\r\n \r\n $result = $html->send()->getBody();\r\n \r\n $json_data = json_decode($result,TRUE);\r\n \r\n foreach ($json_data['emd']['result'] as $row) {\r\n $data = $row['row'];\r\n $system = $this->_markets[$data['solarsystemID']];\r\n \r\n switch ($data['buysell']) {\r\n case 'b':\r\n $buysell = 'buy';\r\n break;\r\n case 's':\r\n $buysell = 'sell';\r\n break;\r\n default:\r\n $buysell='Unknown';\r\n }\r\n $this->_resource_id_index[(int)$data['typeID']][$system][$buysell] = $data['price'];\r\n }\r\n touch('last_updated');\r\n\r\n $this->saveResources();\r\n $this->loadResources(FALSE);\r\n }", "title": "" }, { "docid": "577df4a8eca4576fbfbc6c8b72e0277d", "score": "0.56878376", "text": "function update_resource($name, $id, $payload, $query=null)\n{\n # So we will need to do this in a non-REST way.\n\n return send_request(\"$name/$id/edit?$query\", [\n // CURLOPT_CUSTOMREQUEST => \"PUT\",\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => [\"payload\" => json_encode($payload)],\n ]);\n}", "title": "" }, { "docid": "3003ecf965cfc6406e1202af1d9d00b1", "score": "0.56835866", "text": "public function update(Request $request,$id)\n {\n $DatosServicio=request()->except(['_token','_method']);\n if($request->hasFile('foto'))\n {\n $servicios = servicio::findOrFail($id); //verifica que id exista\n Storage::delete('public/'.$servicios->foto); //borra la foto que esta en storage\n $DatosServicio['foto']=$request->File('foto')->store('uplouds','public');\n }\n\n\n servicio::where('id','=',$id)->update($DatosServicio);\n\n $servicios = servicio::findOrFail($id);\n return view('Servicios.editar',compact('servicios'));\n }", "title": "" }, { "docid": "daa0a7fe66ad01ee8d15a188d10aceff", "score": "0.56824696", "text": "public function update()\n\t{\n\n\t}", "title": "" }, { "docid": "07b2676db1c75d1139140a39e4d5c39c", "score": "0.56772006", "text": "public function update()\n {\n //\n\n }", "title": "" }, { "docid": "2f0564e2f4df1801272ea324d702327f", "score": "0.567237", "text": "public function update()\n {\n // dopo\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.56692", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.56692", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.56692", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.566735", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.566735", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.566735", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.566735", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "80cf3c720aac3dbd01072aa99df771f5", "score": "0.5664822", "text": "public function update()\n {\n $this->doctrineManager->flush();\n }", "title": "" }, { "docid": "4fb722a30d7bc9ee7b15ea95b806c418", "score": "0.56627125", "text": "public function update(Request $request, $id)\n {\n $category = Category::find($id);\n $name=$request->name;\n $newphoto = $request->photo;\n $oldphoto = $category->photo;\n \n if($request->hasFile('photo')){\n //file upload\n $imageName= time().'.'.$newphoto->extension();\n $newphoto->move(public_path('images/category'),$imageName);\n $filepath = 'images/category/'.$imageName;\n\n if(\\File::exists(public_path($oldphoto))){\n \\File::delete(public_path($oldphoto));\n }\n }else{\n $filepath = $oldphoto;\n }\n \n $category->name = $name;\n $category->photo = $filepath;\n $category->save();\n $status=200;\n $result = new CategoryResource($category);\n $message = \"Category updated Successfully\";\n $response=[\n 'status' => $status,\n 'succcess'=>true,\n 'message' =>$message,\n 'data' => $result\n ];\n return response()->json($response); \n\n\n\n }", "title": "" }, { "docid": "3be8b6342541d63ffbf1356e790cdf37", "score": "0.5658084", "text": "public static function update()\n {\n return static::store();\n }", "title": "" }, { "docid": "77d406dcbb1a534f17b055a2c871125c", "score": "0.56568843", "text": "public function update(Request $request, $id)\n { \n // dd($request->all());\n $slider_data = $request->validate([ \n\n 'heading_one' => 'required',\n 'heading_two' => 'required',\n 'heading_three' => 'required',\n 'button_link' => 'required',\n\n ]); \n\n $slider = Slider::find($id);\n\n if($request->image){\n\n if(Storage::disk('public')->exists($slider->image)){\n\n Storage::disk('public')->delete($slider->image); \n }\n\n $imageName = time().'.' . $request->image->extension();\n $imageNameFinal = $request->image->storeAs('images', $imageName,'public');\n\n }else{ \n\n $imageNameFinal = $request->image_old;\n\n }\n\n $slider->image = $imageNameFinal;\n $slider->heading_one = $request->heading_one;\n $slider->heading_two = $request->heading_two;\n $slider->heading_three = $request->heading_three;\n $slider->button_link = $request->button_link;\n $slider->save();\n\n if($slider){\n\n return redirect()->route('admin.slider.index');\n\n }else{\n\n return 'failed';\n }\n }", "title": "" }, { "docid": "87b94ef57e935c17718702789beec1ba", "score": "0.56483597", "text": "function _statisticsresource_update($id, $data) {\n global $user;\n $view = statisticsresource_get_view($id);\n unset(\n\n$data->created);\n $data->id = $id;\n $data->uid = $view->uid;\n $data->modified = time();\n \n\nstatisticsresource_write_view($data);\n \n return (object)array(\n 'id' => $id,\n 'uri' => services_resource_uri(array('view', $id)),\n );\n}", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.56418526", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "9ff6c156edfd5340e54c47c3c918a914", "score": "0.56412363", "text": "public function update($data){\n $this->_storeProperties($data);\n }", "title": "" }, { "docid": "4f01a659633c656cdab7092bafc9fc73", "score": "0.5639238", "text": "public function update(Request $request, $id)\n {\n $old = Event::findOrFail($id);\n //$user = User::find($id);\n $data = $request->all();\n // $user->update($data);\n if ($request->file('image') == NULL) {\n $data['image'] = $old->image;\n //Storage::delete($request->user()->image);\n }else{\n $data['image'] = $request->file('image')->store('assets/gallery','public');\n }\n $item = Event::findOrFail($id);\n $item->update($data);\n return redirect(url('event'))->with('status','Event berhasil diubah');\n }", "title": "" }, { "docid": "4c918686af4f25ca69e952e282b47c7c", "score": "0.56323063", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => '',\n 'description' => '',\n 'price' => '',\n 'stock' => '',\n 'picture' => ''\n ]);\n\n // Membuat object dari Model Post\n $store = Store::find($id); \n $store->title = $request->input('title');\n $store->desc = $request->input('description');\n $store->price = $request->input('price');\n $store->stock = $request->input('stock');\n $path = 'storage/store_image/'.$store->pic;\n if($request->hasFile('picture')){\n unlink($path);\n $fileNameWithExt = $request->file('picture')->getClientOriginalName();\n $filename = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n $extension = $request->file('picture')->getClientOriginalExtension();\n $filenameSimpan = $filename.'_'.time().'.'.$extension;\n $path = $request->file('picture')->storeAs('public/store_image', $filenameSimpan);\n $store->pic = $request->input('picture');\n }else{\n $filenameSimpan = $store->pic;\n }\n $store->pic = $filenameSimpan;\n\n\n $store->save();\n\n return redirect('/adminstore')->with('success', 'Data telah diubah.');\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.56218976", "text": "public function put($data);", "title": "" }, { "docid": "9219fec89bfb5026cff77fd433655d20", "score": "0.5615276", "text": "public function testUpdate()\n {\n $old = $this->doTestRequest('POST', '/admin/content/store');\n $id = $this->decode()->id;\n\n /*\n * update it\n */\n $new = [\n 'title' => 'hhhh',\n 'route' => '-test-'.str_random(),\n 'tags' => 'c,dd',\n ];\n\n $this->doTestRequest('PUT', \"/admin/content/{$id}\", $new);\n\n $this->assertEquals(true, $this->decode()->result);\n\n /*\n * check if any data miss\n */\n $this->client->request('GET', '/admin/content/'.$id);\n\n $raw = $this->decode()->raw;\n\n $old['title'] = $new['title'];\n $old['route'] = $new['route'];\n $old['tags'] = explode(',', $new['tags']);\n\n unset($raw->updated_at);\n\n $this->assertEquals($old, (array)$raw);\n }", "title": "" }, { "docid": "9f45283208c596c68a5d41eeed009ed5", "score": "0.5612554", "text": "public function PUT () {\r\n \r\n }", "title": "" }, { "docid": "29dac3a7e4281bffb0bdf72c2a18c733", "score": "0.5612517", "text": "public function update()\r\n {\r\n }", "title": "" }, { "docid": "ff8620d972e560c355108f1adf752347", "score": "0.56120515", "text": "public function update(Request $request, $id)\n {\n\n $validator = Validator::make( $request->all(), [\n 'name' => 'required|max:100|string',\n 'description' => 'required|max:100|string',\n 'selectedfield' => ['required', Rule::in(['field1', 'field2'])],\n 'availability' => ['required', Rule::in(['0', '1'])],\n ]);\n\n if ( $validator->fails() ) {\n return response()->json([\n 'data' => [\n 'success' => FALSE,\n 'errors' => $validator->errors(),\n ]\n ]);\n }\n\n $device = Device::find($id);\n $device->name = $request->name;\n $device->description = $request->description;\n $device->field = $request->selectedfield;\n $device->availability = $request->availability;\n\n if(isset($request->dev_image)){\n unlink(public_path('storage/'.$device->id.'/'.$device->image));\n $image = $request->get('dev_image');\n $image_name = time().'.'.$request->dev_image->extension();\n $request->dev_image->move(public_path('/storage/'.$device->id), $image_name);\n $device->image = $image_name;\n }\n \n $device->save();\n\n $device->image = '/public/storage/'.$device->id.'/'.$device->image;\n\n return response()->json([\n 'success' => TRUE,\n 'data' => $device,\n 'message' => \"Device Updated\"\n ]);\n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.5604472", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "74b9d6dde264e2ac5f5097c472156d10", "score": "0.55999917", "text": "public function updateRecord();", "title": "" }, { "docid": "47eeccf3f1cf7fc81f0e4e712113d6ce", "score": "0.5596876", "text": "function updateData() {\n global $data;\n file_put_contents(storage, json_encode($data));\n}", "title": "" }, { "docid": "1d0bb5f7bf30b0c60548dedd141eeeaf", "score": "0.5592628", "text": "public function update(ProductFormRequest $request, Products $product): ProductsResource\n {\n $picture = $request->picture;\n $name = str_slug($request->name).'update_'.time();\n $folder = '/uploads/images/';\n $filePath = \"http://localhost:8888/cours-laravel/Wolfgang/public\". $folder . $name . '.' . $picture->getClientOriginalExtension();\n $this->uploadOne($picture, $folder, 'public', $name);\n\n $product->update(\n [\n 'name' => $request->name, \n 'reference' => $request->reference, \n 'picture' => $filePath, \n 'price' => $request->price, \n 'description' => $request->description,\n ]\n );\n\n return new ProductsResource($product);\n }", "title": "" }, { "docid": "9c20822df745e41d8d41c20390064ae1", "score": "0.5589724", "text": "public function update(Request $request, $id)\n {\n $found = Supply::findOrfail($request->get('supply_id'));\n $photo=\"\"; \n if($found){\n\n if($request->hasFile('Photo')){\n Storage::delete('public/'.$found->photo);\n $photo = $request->file('Photo')->store('suppliesUploads','public'); \n }\n\n $supplies = [\n 'user_id' => auth()->id(),\n 'name' => $request->get('Name'),\n 'price' => $request->get('Price'), \n 'stock' => $request->get('Stock'), \n 'offer' => $request->get('Offer'),\n 'photo' => $photo \n ];\n\n if(Supply::where('id','=',$found->id)->update($supplies))\n return redirect('supplies')->with('success','Supply updated successfuly');\n else \n return redirect('supplies')->with('error','Something is wrong, try later');\n }\n return redirect('supplies')->with('error','Supply not found, try again'); \n \n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.55846965", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "8286c17eacfe236df6038d5372070538", "score": "0.5581457", "text": "public function update(Request $request, $id)\n { $file=Request()->file('picture');\n //validate\n $this->validate($request,[\n 'name'=>'required|max:100',\n //unique:products no me deja regrabar\n 'description'=>'required|max:500',\n 'price'=>'required|numeric',\n 'category_id'=>'required|integer',\n 'stock'=>'required|integer',\n 'purchable'=>'required|boolean'\n ]);\n //recuperar el producto de la DB\n $prod= Product::find($id); \n //save\n $prod->name = $request->name;\n $prod->description = $request->description;\n $prod->price = $request->price;\n $prod->category_id = $request->category_id;\n $prod->stock = $request->stock;\n $prod->purchable = $request->purchable;\n //guardar la imagen\n if($request->hasFile('picture')){\n $nombre= str_slug($prod->name) . '.' .request()->file('picture')->extension();\n $file->storeAs('/public/products/', $nombre);\n //asociar la imagen con el prod\n $prod->picture = $nombre; \n } \n $prod->save();\n //redirect\n return redirect('/admin/products/');\n }", "title": "" }, { "docid": "359d84c7d511ae4b3f898ca4163e1aaf", "score": "0.5575644", "text": "public function update(Request $request, $id)\n {\n $this->validateData();\n// Update plan\n $article = Article::findOrFail($id);\n $article -> name = $request -> input('name');\n $article -> intro = $request -> input('intro');\n $article -> text = $request -> input('text');\n\n\n if ($request->hasFile('image')) {\n\n// Get file name with extention\n $fileExtention = $request -> file('image') -> getClientOriginalName();\n// Get just file name\n $filename =pathinfo($fileExtention,PATHINFO_FILENAME);\n// Get just ext\n $extention = $request -> file('image') -> getClientOriginalExtension();\n $filenameToStore = $filename.'_'.time().'.'.$extention;\n $path = $request -> file('image') -> storeAs('public/img/articles',$filenameToStore);\n\n Storage::delete('public/img/articles/' . $article->image);\n\n $article -> image = $filenameToStore;\n }\n\n $article -> save();\n\n if($request -> input('partner-name') != ''){\n\n $partner = Partner::where('name',$request -> input('partner-name')) -> get();\n\n if($partner != null){\n $article -> partners() -> attach($partner[0]->id);\n }\n }\n\n\n\n return redirect('/articles/'.$article->id)->with('success','ArticleResource is updated');\n }", "title": "" }, { "docid": "f9280080197f2bbc5ea4d99f8d9ab9a3", "score": "0.55743456", "text": "public function update($data)\n {\n }", "title": "" }, { "docid": "ba9bb58edbef3eb9a558cef211fa3aa0", "score": "0.55679065", "text": "public function refresh()\n {\n $res = $this->getDatabase()->getResource($this->getPath());\n\n if (null !== $res && $this->isRaw() === $res->isRaw())\n {\n $this->path = $res->getPath();\n $this->modified = $res->getModified();\n $this->mime = $res->getContentType();\n if (method_exists($res, 'getSize') && method_exists($this, 'setSize'))\n {\n $this->setSize($res->getSize());\n }\n\n return $this;\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "12920983690919e9305680a6202b352a", "score": "0.5564025", "text": "public function update($id,Request $request)\n\t{\n\t\t$data = $request->all();\n\t\t$settings = File::put($this->file,json_encode($data));\n\n\n\t\treturn Redirect::route('socials.index');\n\t}", "title": "" }, { "docid": "45184aa27ac2793fa69fdae2e5359a5c", "score": "0.5562686", "text": "public function put()\n {\n }", "title": "" }, { "docid": "af1ecfb517bec3e1060c710281cb6693", "score": "0.5562452", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'min:6|required',\n 'image' => 'required',\n 'price' => 'required|integer|min:0',\n 'description' => 'required',\n 'stock' => 'required|integer|min:0'\n ]);\n\n $product = Product::findOrFail($id);\n $input = $request->input();\n\n if($request->file('image')){\n if(Storage::exists('public/picture/product/'.$product->image)){\n Storage::delete('public/picture/product/'.$product->image);\n }\n\n $path = $request->file('image')->store('public/picture/product');\n $input['image'] = str_replace('public/picture/product/', '', $path);\n\n }\n\n $product->fill($input)->save();\n\n return redirect()->route('product.show', $id);\n\n }", "title": "" } ]
b59e16023221728232f6a1058d53f510
Create a new Amazon SQS SNS subscription queue instance
[ { "docid": "7635d15486cd41f57d6d4dcaf050adb9", "score": "0.0", "text": "public function __construct(SqsClient $sqs, $default, $prefix = '', $routes = [])\n {\n parent::__construct($sqs, $default, $prefix);\n\n $this->routes = $routes;\n }", "title": "" } ]
[ { "docid": "9fc732abbc185122da558d1fe74be052", "score": "0.66485995", "text": "public function connect(array $config)\n {\n $config = $this->getDefaultConfiguration($config);\n\n return new SqsSnsQueue(\n new SqsClient(EventServiceProvider::prepareConfigurationCredentials($config)),\n $config['queue'],\n Arr::get($config, 'prefix', ''),\n Arr::get($config, 'suffix', ''),\n );\n }", "title": "" }, { "docid": "ffef90184839384608b9fe03401c5cef", "score": "0.6173962", "text": "function create_subscription($pubsub, $topicName, $subscriptionName) {\n global $debugpubsub;\n\n $topic = $pubsub->topic($topicName);\n $subscription = $topic->subscription($subscriptionName);\n $subscription->create();\n\n $debugpubsub = $debugpubsub . 'Subscription created: ' . $subscription->name();\n }", "title": "" }, { "docid": "95f18e5f7b1b0fa0fee9750dbcbf1345", "score": "0.60195506", "text": "static public function get($name) {\n return new AwsSqsQueueJson($name);\n }", "title": "" }, { "docid": "92a346104a33fe5d65138ef883c393d5", "score": "0.60043555", "text": "public function create_subscription(){\r\n\t\t$endpoint = \"subscriptions/0\";\r\n\t\t$resource_name = \"subscription\";\r\n\t\t\r\n\t\t$available_args = array(\r\n\t\t\t'subscriber_id', //int\r\n\t\t\t'cost',\r\n\t\t\t'pubid', //int\r\n\t\t\t'comp', //bool as int\r\n\t\t\t'paid', //bool as int\r\n\t\t\t'source', //string\r\n\t\t\t'status',\r\n\t\t\t'startdate',\r\n\t\t\t'endate',\r\n\t\t\t'subscriber_type_ID',\r\n\t\t\t'copies',\r\n\t\t\t'media_type_id',\r\n\t\t\t'is_gift', //bool as int\r\n\t\t\t'gift_subscriber_id',\r\n\t\t\t'verified_date',\r\n\t\t\t'qualified_date',\r\n\t\t\t'promo_code',\r\n\t\t);\r\n\t\t\r\n\t\t$defaults = array(\r\n\t\t\t'copies' \t\t\t=> 1,\r\n\t\t\t'startdate'\t\t\t=> date('Y-m-d', time() ),\r\n\t\t\t'verified_date'\t\t=> date('Y-m-d', time() ),\r\n\t\t\t'is_gift'\t\t\t=> 0,\r\n\t\t);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4c142a2c7d9c8785fdc74ee6a17e8862", "score": "0.59481746", "text": "public function createQueue() {\n }", "title": "" }, { "docid": "5fb1169373a8312045d0be0381bca43f", "score": "0.5725579", "text": "public function onCreateSubscription(Sheep_Subscription_Model_Subscription $subscription, Mage_Sales_Model_Order $order);", "title": "" }, { "docid": "7ac02a82e8f68bb00a7922dee711294b", "score": "0.5672081", "text": "public function testCreateQueue()\n {\n $client = $this->getAwsClient();\n $this->assertInstanceOf(\n BaseQueue::class,\n QueueFactory::createQueue($client, 'queue-name', 'queue-url', new BasicWorker())\n );\n }", "title": "" }, { "docid": "b27ceffd99518750b6530a0368072b3b", "score": "0.55923516", "text": "public function __construct($config_options = [])\n {\n $this->topicARN = isset($config_options['topic_arn']) ? $config_options['topic_arn'] : '';\n $this->protocol = isset($config_options['protocol']) ? $config_options['protocol'] : '';\n\n $this->sns = SnsClient::factory(array(\n 'credentials' => array(\n 'key' => AWS_KEY,\n 'secret' => AWS_SECRET,\n ),\n 'region' => self::REGION,\n 'version' => 'latest'\n ));\n }", "title": "" }, { "docid": "c56fed572bf01208c909e2da282720ed", "score": "0.54947144", "text": "function test_CreateQueue() {\r\n\t\tglobal $TEST_QUEUE, $TEST_USERS, $TEST_PASSWD, $TEST_DESC, $TEST_GROUPS, $SPECIAL_MESSAGE, $address, $simpleAddress;\r\n\t\t$con = connectToServer($address, null, null);\r\n\t\tcreateEmptyQueue($con, $TEST_QUEUE[0]);\r\n\t}", "title": "" }, { "docid": "aac669550b4cca43998ac58144d89594", "score": "0.5485129", "text": "public static function create (amazon_sns_topic $topic, $endpoint, $protocol = 'email') {\n\t\t$response = amazon_sns_helper::request(array('Action'=>'Subscribe', 'TopicArn'=>$topic->getArn(), 'Endpoint'=>$endpoint, 'Protocol'=>$protocol));\n\t}", "title": "" }, { "docid": "de572d7e410c14bb9c36e5ceab92840c", "score": "0.54614246", "text": "public function connect(array $config)\r\n {\r\n $connectionString = 'Endpoint=' . $config['endpoint'] . ';SharedSecretIssuer=' . $config['secretissuer'] . ';SharedSecretValue=' . $config['secret'];\r\n $serviceBusRestProxy = ServicesBuilder::getInstance()->createServiceBusService($connectionString);\r\n\r\n return new AzureQueue($serviceBusRestProxy, $config['queue']);\r\n }", "title": "" }, { "docid": "b104999700a93b90dee5452db1e84715", "score": "0.53914136", "text": "abstract public function onSubscriptionCreated(SubscriptionCreatedEvent $event);", "title": "" }, { "docid": "d5123430b7dde2e980e1b9959e01be68", "score": "0.5371272", "text": "function __construct($notify_list='arn:aws:sns:us-east-1:482819455284:1_hour_bucket')\n {\n $this->notify_list=$notify_list;\n $this->sns= new AmazonSNS();\n\n }", "title": "" }, { "docid": "4ed083d8213af87af8ee8894badf3ba1", "score": "0.5371267", "text": "public function setupSns($message)\n {\n if (self::$isSnsSetup) {\n return true;\n }\n\n MailLog::info('Set up Amazon SNS for email delivery tracking');\n\n $fromEmail = array_keys($message->getFrom())[0];\n\n $awsIdentity = $fromEmail;\n $verifyByDomain = false;\n try {\n $this->sesClient()->setIdentityFeedbackForwardingEnabled(array(\n 'Identity' => $awsIdentity,\n 'ForwardingEnabled' => true,\n ));\n } catch (\\Exception $e) {\n $verifyByDomain = true;\n MailLog::warning(\"From Email address {$fromEmail} not verified by Amazon SES, using domain instead\");\n }\n\n if ($verifyByDomain) {\n // Use domain name as Aws Identity\n $awsIdentity = substr(strrchr($fromEmail, '@'), 1); // extract domain from email\n $this->sesClient()->setIdentityFeedbackForwardingEnabled(array(\n 'Identity' => $awsIdentity, // extract domain from email\n 'ForwardingEnabled' => true,\n ));\n }\n\n $topicResponse = $this->snsClient()->createTopic(array('Name' => self::SNS_TOPIC));\n $subscribeUrl = StringHelper::joinUrl(Setting::get('url_delivery_handler'), self::SNS_TYPE);\n\n $subscribeResponse = $this->snsClient()->subscribe(array(\n 'TopicArn' => $topicResponse->get('TopicArn'),\n 'Protocol' => stripos($subscribeUrl, 'https') === 0 ? 'https' : 'http',\n 'Endpoint' => $subscribeUrl,\n ));\n\n if (stripos($subscribeResponse->get('SubscriptionArn'), 'pending') === false) {\n $this->subscription_arn = $result->get('SubscriptionArn');\n }\n\n foreach ($this->notificationTypes as $type) {\n $this->sesClient()->setIdentityNotificationTopic(array(\n 'Identity' => $awsIdentity,\n 'NotificationType' => $type,\n 'SnsTopic' => $topicResponse->get('TopicArn'),\n ));\n }\n\n self::$isSnsSetup = true;\n }", "title": "" }, { "docid": "75092e08f3fab8d735c5889fd6055056", "score": "0.5317141", "text": "public function run()\n {\n NewsletterSubscription::factory(100)->create();\n }", "title": "" }, { "docid": "ae6668e5d4b257416026bbe871b56887", "score": "0.52983296", "text": "public function create($to, $options = array()) \n\t{\n $options = new Values($options);\n\n $recipients = array();\n $body = array(\n 'body' => $options['body'],\n 'send_at' => $options['sendAt'],\n 'batch_name' => $options['batchName'],\n 'batch_id' => $options['batchId']\n );\n\n if (is_array($to)) {\n $index = 0;\n foreach ($to as $recipientName => $recipient) {\n $recipients[\"recipients[$index]\"] = $recipient;\n $recipients[\"addressee[$index]\"] = $recipientName;\n $index++;\n }\n $body += $recipients;\n } else {\n $body['recipients'] = $to;\n $body['addressee'] = $options['recipientName'];\n }\n\n $data = Values::of($body);\n\n $payload = $this->version->create(\n 'POST',\n $this->uri,\n array(),\n $data\n );\n\n //when multiple recipients, id is array instead of integer, use batchId instead\n $smsData = array(\n 'id' => count($payload['data']) > 1 ? $payload['data'] : $payload['data'][0],\n 'batch_id' => $payload['batch_id']\n );\n\n return new SmsInstance($this->version, $smsData);\n\t}", "title": "" }, { "docid": "18f973d85f418f6d8c8ef61318aa67ab", "score": "0.5282709", "text": "public function connect(array $config)\n {\n $config = config('queue.connections.mns');\n\n return new MnsQueue(\n new MnsAdapter(\n new MnsClient($config['endpoint'], $config['key'], $config['secret']),\n $config['queue']\n )\n );\n }", "title": "" }, { "docid": "8381df7e99d47896f7aa5c5231f1e38f", "score": "0.52615273", "text": "public function created(SubscribeTask $subscribeTask)\n {\n dispatch(new JobSubscribeTask($subscribeTask))->onQueue('sending')\n ->afterResponse();\n }", "title": "" }, { "docid": "3326809e67e7c6940851a74faeb2f626", "score": "0.5230328", "text": "public static function create($_class, $_conf=NULL)\n {\n //Fetch the class\n $_class = ucfirst( $_class ) . 'Queue';\n if ( ! isset( self::$_classes[$_class] ) ) {\n require dirname(__FILE__) .\"/{$_class}.class.php\";\n self::$_classes[$_class] = true;\n }\n\n //return the newly created instance\n return new $_class($_conf);\n }", "title": "" }, { "docid": "b98f37e35ee9ecce4689a04a7d3a4c15", "score": "0.51950276", "text": "public function snsClient()\n {\n if (!self::$snsClient) {\n self::$snsClient = \\Aws\\Sns\\SnsClient::factory(array(\n 'credentials' => array(\n 'key' => trim($this->aws_access_key_id),\n 'secret' => trim($this->aws_secret_access_key),\n ),\n 'region' => $this->aws_region,\n 'version' => '2010-03-31'\n ));\n }\n\n return self::$snsClient;\n }", "title": "" }, { "docid": "addadbad9f5ad9574b05e4832f79dfe3", "score": "0.51493394", "text": "function publish_to_topic($subject, $msg_body)\n {\n $err_msg = \"Failed to read SNS config file\";\n $sns_connection_info = read_info_from_config_file(constant(\"SNS_CONFIG\"), $err_msg);\n $topic_name = $sns_connection_info['topic_name'];\n $region = $sns_connection_info['region'];\n\n $sns_client = new Aws\\Sns\\SnsClient([\n 'version' => 'latest',\n 'region' => \"$region\"\n ]);\n\n try\n {\n $topic_arn = get_topic_arn($topic_name, $region);\n\n $sns_client->publish([\n 'TopicArn' => $topic_arn,\n 'Subject' => $subject,\n 'Message' => $msg_body\n ]);\n }\n catch (\\Aws\\Sns\\Exception\\SnsException $sns_exception)\n {\n echo \"Failed to publish message to $topic_name, \" . $sns_exception->getMessage() .\"\\n\";\n exit(1);\n }\n }", "title": "" }, { "docid": "b13aef8dc9f3b35d6b0ec2a643a89b5e", "score": "0.51001334", "text": "public function testCreate()\n {\n $client = $this->getAwsClient();\n $worker = new BasicWorker();\n $factory = new QueueFactory($client);\n\n $queue = $factory->create('queue-name', 'queue-url', $worker);\n $this->assertInstanceOf(BaseQueue::class, $queue);\n\n // Cached?\n $queue2 = $factory->create('queue-name', 'queue-url', $worker);\n $this->assertEquals($queue, $queue2);\n }", "title": "" }, { "docid": "92881d519f9dc708c42c52e254ac59be", "score": "0.50914943", "text": "function publish($msg){\n\t$connection = new AMQPStreamConnection('172.17.0.2', 5672, 'guest', 'guest');\n\t$channel = $connection->channel();\n\t$channel->queue_declare('hello', false, false, false, false);\n\t$qMsg = new AMQPMessage($msg);\n\t$channel->basic_publish($qMsg, '', 'hello');\n}", "title": "" }, { "docid": "0e16e7e213421be6ff1544227f63cd9e", "score": "0.5088489", "text": "protected function createQueueMessage($message)\n {\n $queueMessage = new QueueMessage();\n $queueMessage->setPersistent(false);\n $queueMessage->setBody($message);\n $queueMessage->setQueue($this->queueName);\n\n return $queueMessage;\n }", "title": "" }, { "docid": "385f628f9063d88d8c5a57409e42b57a", "score": "0.50739855", "text": "public function createSubscription()\n {\n if ( !$this->subscriber->model->event->hasAvailableSeats() ) {\n\n // If No Seats Available, Set user status to Waiting List\n $this->subscriber->messages->add('errors', 'No Seats Available');\n\n return $this->subscriber->setSubscriptionState($this->subscriber->getWaitingState());\n }\n\n // check whether already subscribed\n if ( !$this->subscriber->model->subscriptionConfirmed() ) {\n\n if ( $this->checkInvalidRegistrationType() ) {\n // @todo : more efficient way to determine the free or paid event\n if ( $this->subscriber->model->event->isFreeEvent() ) {\n // Free Event\n return $this->subscriber->setSubscriptionState($this->subscriber->getConfirmedState());\n } else {\n // Paid Event\n return $this->subscriber->setSubscriptionState($this->subscriber->getPaymentState());\n }\n }\n } else {\n return $this->subscriber->setSubscriptionState($this->subscriber->getPaymentState());\n }\n\n }", "title": "" }, { "docid": "4439ce940a69454f9297adcd53a40d54", "score": "0.5060285", "text": "public function create($parameters)\n {\n $parameters = $this->encodeVariables($parameters);\n return new Subscription($this->client->request('POST', '/subscriptions', $parameters));\n }", "title": "" }, { "docid": "b8388812cdb944ae7a38d161d2a423f4", "score": "0.5050987", "text": "public function __construct($email_queue_id)\n {\n $this->email_queue_id = $email_queue_id;\n }", "title": "" }, { "docid": "2c32d05953ed4005148bc610d2cd64ab", "score": "0.5048065", "text": "public static function factory($name)\n {\n return new Redis_Queue($name);\n }", "title": "" }, { "docid": "1427587c38e3319887438d5b4c0a0cf3", "score": "0.5033181", "text": "public static function subscriptionService(): SubscriptionService\n {\n return new SubscriptionService(new StripeSubscription());\n }", "title": "" }, { "docid": "efd4ee23442cba8b1dd793895dc193e6", "score": "0.5029262", "text": "public function __construct(Subscription $subscription)\n {\n $this->subscription = $subscription;\n }", "title": "" }, { "docid": "947daecb141516363ff938d092816616", "score": "0.5015281", "text": "public function actionCreate() {\n $model = new Queue();\n $formModelObj = new QueuesForm();\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n if (isset($_POST['QueuesForm'])) {\n $attributes = $_POST['QueuesForm'];\n $commandArray = array();\n $formModelObj->attributes = $attributes;\n if ($formModelObj->validate()) {\n $attrs = $formModelObj->attributes;\n $cmd = 'qmgr -c \"create queue ' . $attributes['name'] . ' queue_type=' . $attributes['queue_type'] . '\"';\n array_push($commandArray, $cmd);\n $tempStr = \"\";\n if (isset($attrs['disallowed_types'])) {\n foreach ($attrs['disallowed_types'] as $attribute) {\n $tempStr .= $attribute . \",\";\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' disallowed_types+=' . $attribute . '\"';\n array_push($commandArray, $cmd);\n }\n unset($attributes['disallowed_types']);\n }\n if ($tempStr !== \"\") {\n $tempStr = trim($tempStr, \",\");\n $attributes['disallowed_types'] = $tempStr;\n }\n if (isset($attributes['enabled']) && (int) $attributes['enabled'] === 1) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' enabled=true\"';\n $attributes['enabled'] = TRUE;\n } else {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' enabled=false\"';\n $attributes['enabled'] = FALSE;\n }\n array_push($commandArray, $cmd);\n if (!isset($attributes['keep_completed'])) {\n $attributes['keep_completed'] = 0;\n }\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' keep_completed=' . $attributes['keep_completed'] . '\"';\n array_push($commandArray, $cmd);\n if (!isset($attributes['kill_delay'])) {\n $attributes['kill_delay'] = 2;\n }\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' kill_delay=' . $attributes['kill_delay'] . '\"';\n array_push($commandArray, $cmd);\n if (isset($attributes['max_queuable']) && $attributes['max_queuable'] !== NULL) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' max_queuable=' . $attributes['max_queuable'] . '\"';\n array_push($commandArray, $cmd);\n }\n if (isset($attributes['max_running']) && $attributes['max_running'] !== NULL) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' max_running=' . $attributes['max_running'] . '\"';\n array_push($commandArray, $cmd);\n }\n if (isset($attributes['max_user_queuable']) && $attributes['max_user_queuable'] !== NULL) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' max_user_queuable=' . $attributes['max_user_queuable'] . '\"';\n array_push($commandArray, $cmd);\n }\n if (isset($attributes['max_user_run']) && $attributes['max_user_run'] !== NULL) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' max_user_run=' . $attributes['max_user_run'] . '\"';\n array_push($commandArray, $cmd);\n }\n if (!isset($attributes['priority'])) {\n $attributes['priority'] = 0;\n }\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' priority=' . $attributes['priority'] . '\"';\n array_push($commandArray, $cmd);\n if (isset($attributes['require_login_property'])) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' require_login_property=' . $attributes['require_login_property'] . '\"';\n array_push($commandArray, $cmd);\n }\n if (isset($attributes['started']) && (int) $attributes['started'] === 1) {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' started=true\"';\n $attributes['started'] = TRUE;\n } else {\n $cmd = 'qmgr -c \"set queue ' . $attributes['name'] . ' started=false\"';\n $attributes['started'] = FALSE;\n }\n array_push($commandArray, $cmd);\n $host = Yii::app()->params->hostDetails['host'];\n $port = Yii::app()->params->hostDetails['port'];\n $user = Yii::app()->user->name;\n $encryptedPassword = Yii::app()->user->password;\n $aes = new AES($encryptedPassword);\n $sshHost = new SSH($host, $port, $user);\n if ($sshHost->isConnected() && $sshHost->authenticate_pass($aes->decrypt())) {\n foreach ($commandArray as $cmd) {\n echo $sshHost->cmd($cmd);\n }\n }\n $sshHost->disconnect();\n $model->attributes = $attributes;\n\n if ($model->save(FALSE)) {\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n }\n\n $this->render('create', array(\n 'model' => $formModelObj,\n 'modelTemp' => $model\n ));\n }", "title": "" }, { "docid": "96d70fedd70c34bca428d577ee5f8e3c", "score": "0.50099796", "text": "public function __construct($subscription)\n {\n $this->subscription = $subscription;\n }", "title": "" }, { "docid": "17b0d8a12e5592cad2daa54048844040", "score": "0.49995378", "text": "public function _construct() {\n $this->init('mysubscription');\n }", "title": "" }, { "docid": "01c89ffeafb71db89f6915d54cb81d01", "score": "0.49744955", "text": "protected function newQueuedJob(): QueuedSmsableJob\n {\n return new QueuedSmsableJob($this);\n }", "title": "" }, { "docid": "8e4235939ef8f90734af5cf6331a43f8", "score": "0.49660656", "text": "public function createQueue($options = null)\n {\n\n // create the query for the newsletter\n $c = $this->modx->newQuery('Newsletter');\n $c->innerJoin('modDocument', 'modDocument', '`modDocument`.`id` = `Newsletter`.`docid`');\n if($options['nl']) {\n $c->where('`Newsletter`.`id` = ' . $options['nl']);\n } else {\n $c->where('`Newsletter`.`state` = 1');\n $c->where('((sent_date IS NULL AND `modDocument`.`publishedon` < UNIX_TIMESTAMP() AND `modDocument`.`publishedon` > 0) OR (`modDocument`.`pub_date` < UNIX_TIMESTAMP() AND `modDocument`.`publishedon` < `modDocument`.`pub_date` AND `modDocument`.`pub_date` > 0))');\n $c->sortby('`Newsletter`.`priority`', 'ASC');\n \t\t$c->sortby('`modDocument`.`publishedon`', 'ASC'); // first document first\n }\n $c->limit(1, 0); // one per run is enough\n\n $newsletter = $this->modx->getObject('Newsletter',$c);\n if(!$newsletter) {\n return;\n }\n\n $document = $this->modx->getObject('modDocument', $newsletter->get('docid'));\n $composedNewsletter = $this->composeNewsletter($document);\n\n /**\n * @since 2013-04-11 Added a cache file creation instead of storing composed newsletter in content of resource\n */\n $cacheOptions = array(\n xPDO::OPT_CACHE_KEY => '',\n xPDO::OPT_CACHE_HANDLER => 'xPDOFileCache',\n xPDO::OPT_CACHE_EXPIRES => 0,\n );\n $cacheElementKey = 'newsletter/' . $document->get('id');\n\n // Now the subscribers\n $c = $this->modx->newQuery('Subscriber');\n if($options['subscriber']) {\n $c->where(array('id:IN' => $options['subscriber']));\n } else {\n // they have to be in the group\n $c->innerJoin('GroupSubscriber', 'GroupSubscriber', '`GroupSubscriber`.`subscriber` = `Subscriber`.`id`');\n $c->innerJoin('NewsletterGroup', 'NewsletterGroup', '`NewsletterGroup`.`group` = `GroupSubscriber`.`group` AND `NewsletterGroup`.`newsletter` = '. $newsletter->get('id'));\n $c->leftJoin('Group', 'Group', '`Group`.id = `NewsletterGroup`.`group`');\n $c->groupby('`Subscriber`.`id`'); // only send once per subscriber\n $c->sortby('`Group`.`priority`', 'ASC');\n }\n $c->select('`Subscriber`.`id`');\n $c->where(array('active:=' => 1)); // only active ones\n $subscribers = $this->modx->getCollection('Subscriber', $c);\n\n // build queue\n $count = 0;\n foreach($subscribers as $subscriber) {\n $tStart = $this->modx->getMicroTime();\n\n $queueItem = $this->modx->newObject('Queue');\n $queueItem->fromArray(array(\n 'newsletter' => $newsletter->get('id'),\n 'subscriber' => $subscriber->get('id'),\n 'state' => 0,\n 'priority' => $newsletter->get('priority'),\n 'created' => time(),\n 'type' => $options['type'],\n 'scheduled' => $options['scheduled'],\n ));\n $queueItem->save();\n\t\t\t //md5 verschluesselte QueueID als key-Attribut mitspeichern\n $queueItem->set('key', md5($queueItem->get('id')));\n\n $tEnd = $this->modx->getMicroTime();\n $properties = unserialize($queueItem->get('properties'));\n $properties['created'] = sprintf(\"%2.4f\", $tEnd - $tStart);\n $queueItem->set('properties', serialize($properties));\n\n $queueItem->save();\n $queueItem = null;\n $count++;\n }\n\n if($count > 0) {\n\t\t\t/**\n\t\t\t* Feed the manager log\n\t\t\t*/\n $l = $this->modx->newObject('modManagerLog');\n $data = array(\n 'user' => 41,\n 'occurred' => date('Y-m-d H:i:s'),\n 'action' => 'queued_newsletter_items (' . $count . ')',\n 'classKey' => 'Newsletter',\n 'item' => $newsletter->get('id')\n );\n\n $l->fromArray($data);\n $l->save();\n }\n\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Everthing is fine. We saved the newsletter.');\n\n // Save the date\n $newsletter->set('sent_date', time());\n $newsletter->set('total', $count);\n if(!$newsletter->save())\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'An error occurred while saving the newsletter.');\n\n $link = $this->modx->getOption('manager_url') . '?a=' . $this->config['actionId'] . '#campaigner-tab-queue';\n $system_mail = array(\n 'subject' => $this->modx->lexicon('campaigner.system.mail.queue_new.subject'),\n 'body' => $this->modx->lexicon('campaigner.system.mail.queue_new.body', array('count' => $count, 'link' => $link)),\n );\n $this->sendSystemMail($system_mail);\n\n return $count;\n }", "title": "" }, { "docid": "968ffac9d2633a539332bd36cbac7855", "score": "0.4959974", "text": "static function create($name, $params, $batchCount = 50)\n\t{\n\t\t$q = new Queue();\n\t\t$q->count = 0;\n\t\t$q->sendOffset = 0;\n\t\t$q->date = time();\n\t\t$q->lastBatchDate = NULL;\n\t\t$q->sendLog = [];\n\t\t$q->title = $name;\n\t\t$q->batchCount = $batchCount;\n\t\t$q->locked = false;\n\t\t$q->volume = 0;\n\t\t$q->id = uniqid();\n\t\t\n\t\t\n\t\t// take parameters from environement (such as root path)\n\t\t$q->setup($params);\n\t\t\n\t\t// create a sub-folder for this queue\n\t\tif ( !file_exists($q->root . \"/$q->id\") )\n\t\t\tif ( !mkdir($q->root . \"/$q->id\") )\n\t\t\t\tthrow new \\Nettools\\Mailing\\Exception(\"Can't create folder for queue '$name'\");\n\t\t\n\t\t\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "f5e2945db74f3df97ad02f71af106e79", "score": "0.4946899", "text": "public function create_object_schedule_messages() {\n\t\tif ( ! isset( $this->messages[ 'schedule' ] ) ) {\n\t\t\t$this->messages[ 'schedule' ] = SLP_Message_Manager::get_instance( array( 'slug' => 'schedule' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "ad62c1da24933e7a747887eec1954773", "score": "0.49349537", "text": "public function __construct()\n {\n \\Log::info('----Example Queue----');\n }", "title": "" }, { "docid": "0476e523f43a5bbb6b1f5a0368eb9125", "score": "0.49328253", "text": "public static function make(){\n return new AccountSubscription;\n }", "title": "" }, { "docid": "9fe00eab04b2468bcb677c56f1f8956e", "score": "0.49252713", "text": "public\n function testSns(Request $request)\n {\n $messages = pushqueue::where('push_date', null)->orWhere('push_date', '<', Carbon::now())->take(500);\n\n $arr = array();\n\n //foreach ($messages->get() as $key => $item) {\n foreach ($messages->get() as $key => $item) {\n $arr[$key]['id'] = $item->id;\n $arr[$key]['endpoint'] = $item->endpoint;\n $arr[$key]['title'] = $item->title;\n $arr[$key]['body'] = $item->body;\n $arr[$key]['batch'] = $item->batch;\n $arr[$key]['ios'] = $item->ios;\n\n }\n //Remove from subsequesnt polls\n $messages->delete();\n\n return response()->json($arr);\n }", "title": "" }, { "docid": "a4f0278c2ef244b7bbe956205fad875c", "score": "0.48991728", "text": "public function create()\n {\n return view('queues.create');\n }", "title": "" }, { "docid": "a6718658ebc2b4cc35bdf4f479518f14", "score": "0.48892298", "text": "public function createTopic($name);", "title": "" }, { "docid": "8c3c2f7f4bd3393a55b57d9dcdea713f", "score": "0.48889616", "text": "public function create_object_schedule_messages() {\n\t\tif ( ! isset( $this->schedule_messages ) ) {\n\t\t\t$this->schedule_messages = SLP_Message_Manager::get_instance( array( 'slug' => 'schedule' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "8e7107c9784c5ef7e01c31ab0ac2a483", "score": "0.48728198", "text": "public function create_subscriber(){\r\n\t\t$available_args = array(\r\n\t\t\t'firstName',\r\n\t\t\t'lastName',\r\n\t\t\t'address1',\r\n\t\t\t'address2',\r\n\t\t\t'city',\r\n\t\t\t'state',\r\n\t\t\t'zipCode',\r\n\t\t\t'contact_country',\r\n\t\t\t'emailAddress',\r\n\t\t\t'cellPhoneNumber',\r\n\t\t\t'officePhoneNumber',\r\n\t\t\t'alternatePhoneNumber',\r\n\t\t\t'alternateFaxNumber',\r\n\t\t\t'faxNumber',\r\n\t\t\t'isPrimaryContact',\r\n\t\t\t'companyId',\r\n\t\t\t'contact_notes',\r\n\t\t\t'subscriber_type_ID',\r\n\t\t\t'active',//bool as int\r\n\t\t\t'password'\r\n\t\t);\r\n\t\t\r\n\t\t$defaults = array(\r\n\t\t\t'active' \t=> 1,\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "24658e28abee9c0273ceed758ace6cf2", "score": "0.48648968", "text": "public function __construct(Subscription $sub)\n {\n\t\t$this->subscription = $sub;\n\t}", "title": "" }, { "docid": "8561680cf9eca04507eec45de87308c1", "score": "0.4851214", "text": "public function push(QueueMessageInterface $msg);", "title": "" }, { "docid": "dc35a03073c24571ea9a8013c98aa774", "score": "0.48246235", "text": "public function test_subscription_created() {\n // Setup test data.\n $user = $this->getDataGenerator()->create_user();\n $course = $this->getDataGenerator()->create_course();\n $digestforum = $this->getDataGenerator()->create_module('digestforum', array('course' => $course->id));\n $user = $this->getDataGenerator()->create_user();\n $context = context_module::instance($digestforum->cmid);\n\n // Add a subscription.\n $record = array();\n $record['course'] = $course->id;\n $record['digestforum'] = $digestforum->id;\n $record['userid'] = $user->id;\n $subscription = $this->getDataGenerator()->get_plugin_generator('mod_digestforum')->create_subscription($record);\n\n $params = array(\n 'context' => $context,\n 'objectid' => $subscription->id,\n 'other' => array('digestforumid' => $digestforum->id),\n 'relateduserid' => $user->id,\n );\n\n $event = \\mod_digestforum\\event\\subscription_created::create($params);\n\n // Trigger and capturing the event.\n $sink = $this->redirectEvents();\n $event->trigger();\n $events = $sink->get_events();\n $this->assertCount(1, $events);\n $event = reset($events);\n\n // Checking that the event contains the expected values.\n $this->assertInstanceOf('\\mod_digestforum\\event\\subscription_created', $event);\n $this->assertEquals($context, $event->get_context());\n $expected = array($course->id, 'digestforum', 'subscribe', \"view.php?f={$digestforum->id}\", $digestforum->id, $digestforum->cmid);\n $this->assertEventLegacyLogData($expected, $event);\n $url = new \\moodle_url('/mod/digestforum/subscribers.php', array('id' => $digestforum->id));\n $this->assertEquals($url, $event->get_url());\n $this->assertEventContextNotUsed($event);\n\n $this->assertNotEmpty($event->get_name());\n }", "title": "" }, { "docid": "09c08e520ae582be3c2d69221a83d3d6", "score": "0.48231915", "text": "public function create($token = null, array $options = [])\n {\n $customer = $this->getStripeCustomer($token, $options);\n\n $stripeSubscription = $customer->subscriptions->create($this->buildPayload());\n\n if ($this->skipTrial) {\n $trialEndsAt = null;\n } else {\n $trialEndsAt = $this->trialExpires;\n }\n \n // registers the subscription\n $subscription = $this->owner->subscriptions()->create([\n 'name' => $this->name,\n 'stripe_id' => $stripeSubscription->id,\n 'stripe_plan' => '',\n 'quantity' => 0,\n 'trial_ends_at' => $trialEndsAt,\n 'ends_at' => null,\n ]);\n \n // registers the subscription's items\n foreach ($stripeSubscription->items->data as $item) {\n $subscription->subscriptionItems()->create([\n 'stripe_id' => $item['id'],\n 'stripe_plan' => $item['plan']['id'],\n 'quantity' => $item['quantity'],\n ]);\n }\n \n return $subscription;\n }", "title": "" }, { "docid": "f28bac398298034e7f1ca0494f46ac8c", "score": "0.48174608", "text": "public function createBucket(AwsS3Request $request);", "title": "" }, { "docid": "98b64b8a1c18980f9efb700eae7ccb91", "score": "0.48151562", "text": "public function queueCreate($queueName)\n {\n try {\n $queue = new Queue;\n\n $queue->name = $queueName;\n\n if (!$queue->validate()) {\n foreach ($queue->getErrors() as $attribute => $errors) {\n throw new \\Exception($queue->getErrorSummary(true)[0]);\n }\n }\n\n $queue->insert();\n } catch (Exception $e) {\n if (strncmp($e->getMessage(), 'E11000', 6) === 0) {\n throw new \\Exception('QUEUE_NAME_EXISTS');\n }\n\n throw $e;\n }\n\n return $queue;\n }", "title": "" }, { "docid": "276f4ccfc4ad9861f2c13ecf8dd85b41", "score": "0.48144323", "text": "public function createNewsletterAccount(Varien_Event_Observer $observer)\n {\n if (!$this->_canObserve($observer)) {\n return;\n }\n\n $changed = $observer->getEvent()->getDataObject()->getIsStatusChanged();\n $subscribed = $observer->getEvent()->getDataObject()->getStatus();\n\n if ( $changed && ($subscribed == 1) ) {\n $subscriber = $observer->getEvent()->getDataObject()->getSubscriberEmail();\n\n $this->_addToQueue(\n 'newsletter',\n 'subscribe',\n array(\n 'email' => $subscriber,\n 'subscription_date' => time(),\n )\n );\n\n $this->_debug->log(sprintf('Event queued: newsletter.subscribe(%s).', $subscriber), Zend_Log::DEBUG);\n }\n }", "title": "" }, { "docid": "9ce9ad1bb69f0a7e9789309c6d56546b", "score": "0.4800674", "text": "public function testApiV2WebsocketOnSubscribeCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ea232efa8cedfee0c79748633617baa8", "score": "0.4796921", "text": "public function Create() {\n parent::Create();\n $this->BufferResponse = '';\n $this->ConnectParent('{C6D2AEB3-6E1F-4B2E-8E69-3A1A00246850}');\n //Anzahl die in der Konfirgurationsform angezeigt wird - Hier Standard auf 1\n $this->RegisterPropertyString('Topic', '');\n }", "title": "" }, { "docid": "5cacdbd228adee206ddac524f16ed391", "score": "0.47939032", "text": "public function queue($queue = \"msgs\", $exchange = \"router\");", "title": "" }, { "docid": "423d4439c5d4fe3d45e59898fdc07816", "score": "0.47930905", "text": "public function testCreate()\n {\n $createTargetedMessageRequest = CreateTargetedMessageRequest::create();\n \n $this->assertNotNull($createTargetedMessageRequest);\n }", "title": "" }, { "docid": "656894c5faa46b7679c6f142327e9428", "score": "0.47692195", "text": "protected function _create ()\n {\n parent::_create ();\n\n $parent = $this->parent_folder ();\n\n if (! isset ($parent))\n {\n $sec = $this->security_definition ();\n $sec->set_inherited (false);\n }\n else\n {\n $subscriber_query = $parent->subscriber_query ();\n /** @var SUBSCRIBER[] $objects */\n $objects = $subscriber_query->objects ();\n foreach ($objects as $obj)\n {\n $obj->subscribe ($this->id, Subscribe_folder);\n }\n }\n }", "title": "" }, { "docid": "05f5e68c5c5b75d593f58ee0786b6122", "score": "0.4756173", "text": "function sendAdShotRunnerNotification($subject, $message) {\n\t\n\t//Create the SES handler object\n\t$aws = getAWSFactory();\n\t$snsHandler = $aws->get('sns');\n\n\t$result = $snsHandler->publish(array(\n\t 'TargetArn' => 'arn:aws:sns:us-east-1:469658404108:MenuGrabberEvents',\n\t 'Message' => $message,\n 'Subject' => $subject\n\t));\n\n\t\t\n\t//Return response status.\n\treturn $result;\n}", "title": "" }, { "docid": "ccd8e675f89047c2ce8d379fb2114bdd", "score": "0.4740086", "text": "public function __construct($endpoint) {\n if(!preg_match('/^json:(.+)(;.*)?$/', $endpoint, $matches)) {\n throw new \\Exception(\"Endpoint '$endpoint' isn't accepted by SharedQueueClient - check the syntax?\");\n }\n\n $fn = $matches[1];\n\n $this->queue = new \\Ensemble\\JSONQueue($fn);\n }", "title": "" }, { "docid": "e4ac439034575f2c95f194a963de1e01", "score": "0.4698876", "text": "function CSubscription()\r\n {\r\n }", "title": "" }, { "docid": "37b17511cdc404544b9b3a5a8c5711e6", "score": "0.46986136", "text": "static function create($username, $message, $event_id)\n {\n\n return Message::create(['message' => $message,\n 'username' => $username,\n 'event_id' => $event_id]);\n }", "title": "" }, { "docid": "394c6003bd54b6dccc86cb6b9962e704", "score": "0.46921727", "text": "public function createSubscription(array $subscribingData)\n {\n $this->validateData($subscribingData);\n\n $this->em->beginTransaction();\n\n try {\n $client = $this->clientHandler->create($subscribingData);\n $this->auth->setupAuthForClient($client);\n $this->subscribeClientOnEvents($client, $subscribingData['eventsSubscribe']);\n $this->handleRoutes($client, $subscribingData);\n\n $this->em->flush();\n $this->em->commit();\n } catch (\\Exception $e) {\n $this->em->rollback();\n throw $e;\n }\n\n return $client;\n }", "title": "" }, { "docid": "e1cc7651dd3af81a1e17233bda6e9b40", "score": "0.46851194", "text": "function __construct($queueId)\r\n \t\t{ \r\n \t\t$this->mDoQueue = new DoQueue($queueId);\r\n \t\t}", "title": "" }, { "docid": "63ac40eee3f572f24b42ceeac710080a", "score": "0.46712214", "text": "function createSubscription1($fname, $lname, $cardnum, $cardcode, $expdate, $address, $city, $country, $state, $zip, $email, $phone)\n{\n $merchantAuthentication = new MerchantAuthenticationType();\n $merchantAuthentication->setName(\\SampleCodeConstants::MERCHANT_LOGIN_ID);\n $merchantAuthentication->setTransactionKey(\\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Subscription Type Info\n $subscription = new ARBSubscriptionType();\n $subscription->setName(\"Reggie's Virtual Bootcamp\");\n\n $interval = new IntervalAType();\n $interval->setLength(\"7\");\n $interval->setUnit(\"days\");\n\n $paymentSchedule = new PaymentScheduleType();\n $paymentSchedule->setInterval($interval);\n $paymentSchedule->setStartDate(new DateTime(date(\"Y-m-d\")));\n $paymentSchedule->setTotalOccurrences(\"12\");\n $paymentSchedule->setTrialOccurrences(\"0\");\n\n $subscription->setPaymentSchedule($paymentSchedule);\n $subscription->setAmount(\"25.00\");\n $subscription->setTrialAmount(\"0.00\");\n\n $creditCard = new CreditCardType();\n $creditCard->setCardNumber($cardnum);\n $creditCard->setExpirationDate($expdate);\n $creditCard->setCardCode($cardcode);\n\n $payment = new PaymentType();\n $payment->setCreditCard($creditCard);\n $subscription->setPayment($payment);\n\n $order = new OrderType();\n $order->setInvoiceNumber(\"123544\");\n $order->setDescription(\"Join coach Reggie for a week full-body Virtual Bootcamp!\");\n $subscription->setOrder($order);\n\n $billTo = new NameAndAddressType();\n $billTo->setFirstName($fname);\n $billTo->setLastName($lname);\n $billTo->setAddress($address);\n $billTo->setCity($city);\n $billTo->setCountry($country);\n $billTo->setState($state);\n $billTo->setZip($zip);\n\n $subscription->setBillTo($billTo);\n\n $customer = new CustomerType();\n $customer->setEmail($email);\n $customer->setPhoneNumber($phone);\n\n $subscription->setCustomer($customer);\n\n $request = new ARBCreateSubscriptionRequest();\n $request->setmerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setSubscription($subscription);\n $controller = new AnetController\\ARBCreateSubscriptionController($request);\n\n // For PRODUCTION use\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\")) {\n echo \"<div class='success'><h4>You are Successfully Subscribed for Reggie's Virtual Bootcamp </h4>\\n Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n <br>Please save this 'Subscription ID' for future use. \\n</div>\";\n //echo \"Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n\";\n //echo \"<br>Please save this 'Subscription ID' for future use. \\n\";\n\n } else {\n echo \"<div class='fail'><h4>There is an error. Please review your details and try again\\n</h4></div>\";\n //$errorMessages = $response->getMessages()->getMessage();\n //echo \"Response : \" . $errorMessages[0]->getCode() . \" \" . $errorMessages[0]->getText() . \"\\n\";\n\n }\n return $response;\n}", "title": "" }, { "docid": "2700e78a21cef0cdb1b85ebb159bc749", "score": "0.46693817", "text": "function create_subscription($customer_id, $plan_id){\n try{\n $subscription = \\Stripe\\Subscription::create([\n 'customer' => $customer_id,\n 'items' => [['plan' => $plan_id]],\n ]);\n \n if(empty($subscription)){\n return array('status'=>false,'message'=>'Something went wrong');\n }\n \n return array('status'=>true,'message'=>'Subscribed successfully', 'data'=>$subscription); //success\n \n }catch (Exception $e) {\n $message = $e->getMessage();\n return array('status'=>false,'message'=>$message);\n }\n }", "title": "" }, { "docid": "ee0b5c885b348bf69cbd122d90295a5b", "score": "0.46660736", "text": "public function pop($queue = null)\n {\n $queue = $this->getQueue($queue);\n\n $response = $this->sqs->receiveMessage([\n 'QueueUrl' => $queue,\n 'AttributeNames' => ['ApproximateReceiveCount'],\n ]);\n\n if (count($response['Messages']) > 0) {\n return new SqsSnsJob(\n $this->container,\n $this->sqs,\n $queue,\n $response['Messages'][0],\n $this->routes\n );\n }\n }", "title": "" }, { "docid": "d0fb600a1905ed2733e6af59395491a3", "score": "0.46640366", "text": "public function newSubscription($subscription, $plan)\n {\n throw new \\BadMethodCallException('Not implemented yet');\n \n }", "title": "" }, { "docid": "7ef3b117b83617184ff779be80934504", "score": "0.46625513", "text": "public static function toQueue($message, $to_user_id)\n {\n $queueMessage = new MessageQueue;\n $queueMessage->to_user_id = $to_user_id;\n $queueMessage->message_id = $message->id;\n $queueMessage->save();\n }", "title": "" }, { "docid": "78b8a9b13fd785edc690f3562b2cd81f", "score": "0.46625218", "text": "function callSample(): void\n{\n $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]');\n\n delete_queue_sample($formattedName);\n}", "title": "" }, { "docid": "0d39a6df50e3870b4b88bc3d3e47a98b", "score": "0.46615192", "text": "private function createMessage()\n {\n return new $this->messageClass;\n }", "title": "" }, { "docid": "207daa0ff69dc90021e1587a3a2dc472", "score": "0.46601465", "text": "private function createDelayedTopic(StompDestination $queue): StompDestination\n {\n $destination = $this->getContext()->createTopic($queue->getStompName().'.delayed');\n $destination->setType(StompDestination::TYPE_EXCHANGE);\n $destination->setDurable(true);\n $destination->setAutoDelete(false);\n $destination->setRoutingKey($queue->getStompName());\n\n return $destination;\n }", "title": "" }, { "docid": "125d79d6762960ea96b69370a3afca50", "score": "0.46584573", "text": "public function connect(array $config)\n {\n $this->connection = new AMQPStreamConnection($config['host'], $config['port'], $config['login'], $config['password'], $config['vhost']);\n\n return new RabbitMQQueue($this->connection, $this->container, $config);\n }", "title": "" }, { "docid": "c0e32079421e5e0830b56d15ce036781", "score": "0.46578243", "text": "public function __construct(Queue $queueModel)\n {\n $this->queueModel = $queueModel;\n }", "title": "" }, { "docid": "e1db141d66909a084d06a2dc6d6b9d92", "score": "0.46496177", "text": "public function __construct($name)\n {\n // Set the queue name\n $this->_name = $name;\n }", "title": "" }, { "docid": "aad27e208c5ef9561022237d172fac78", "score": "0.46450356", "text": "function createSubscription2($fname, $lname, $cardnum, $cardcode, $expdate, $address, $city, $country, $state, $zip, $email, $phone)\n{\n $merchantAuthentication = new MerchantAuthenticationType();\n $merchantAuthentication->setName(\\SampleCodeConstants::MERCHANT_LOGIN_ID);\n $merchantAuthentication->setTransactionKey(\\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Subscription Type Info\n $subscription = new ARBSubscriptionType();\n $subscription->setName(\"Fit and Fierce with Grace\");\n\n $interval = new IntervalAType();\n $interval->setLength(\"1\");\n $interval->setUnit(\"months\");\n\n $paymentSchedule = new PaymentScheduleType();\n $paymentSchedule->setInterval($interval);\n $paymentSchedule->setStartDate(new DateTime(date(\"Y-m-d\")));\n $paymentSchedule->setTotalOccurrences(\"12\");\n $paymentSchedule->setTrialOccurrences(\"0\");\n\n $subscription->setPaymentSchedule($paymentSchedule);\n $subscription->setAmount(\"20.00\");\n $subscription->setTrialAmount(\"0.00\");\n\n $creditCard = new CreditCardType();\n $creditCard->setCardNumber($cardnum);\n $creditCard->setExpirationDate($expdate);\n $creditCard->setCardCode($cardcode);\n\n $payment = new PaymentType();\n $payment->setCreditCard($creditCard);\n $subscription->setPayment($payment);\n\n $order = new OrderType();\n $order->setInvoiceNumber(\"123544\");\n $order->setDescription(\"This program works on a whole-body transformation.\");\n $subscription->setOrder($order);\n\n $billTo = new NameAndAddressType();\n $billTo->setFirstName($fname);\n $billTo->setLastName($lname);\n $billTo->setAddress($address);\n $billTo->setCity($city);\n $billTo->setCountry($country);\n $billTo->setState($state);\n $billTo->setZip($zip);\n\n\n\n\n $subscription->setBillTo($billTo);\n\n $customer = new CustomerType();\n $customer->setEmail($email);\n $customer->setPhoneNumber($phone);\n\n $subscription->setCustomer($customer);\n\n\n $request = new ARBCreateSubscriptionRequest();\n $request->setmerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setSubscription($subscription);\n $controller = new AnetController\\ARBCreateSubscriptionController($request);\n\n // For PRODUCTION use\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\n\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\")) {\n echo \"<div class='success'><h4>You are Successfully Subscribed for Fit and Fierce </h4>\\n Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n <br>Please save this 'Subscription ID' for future use. \\n</div>\";\n //echo \"Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n\";\n //echo \"<br>Please save this 'Subscription ID' for future use. \\n\";\n\n } else {\n echo \"<div class='fail'><h4>There is an error. Please review your details and try again\\n</h4></div>\";\n //$errorMessages = $response->getMessages()->getMessage();\n //echo \"Response : \" . $errorMessages[0]->getCode() . \" \" . $errorMessages[0]->getText() . \"\\n\";\n }\n return $response;\n}", "title": "" }, { "docid": "e1d26d044c15b105bf3bdcf5eab679ba", "score": "0.4637966", "text": "public function createByUUID($uuid) {\n $create_vars = ['notification_uuid' => $uuid];\n return $this->create($create_vars);\n }", "title": "" }, { "docid": "14da069c9b6985e679405b00c1e84e53", "score": "0.46305114", "text": "function queue()\r\n {\r\n foreach (Jojo::listPlugins('classes/newsletter_subscriber.class.php') as $pluginfile) {\r\n require_once($pluginfile);\r\n break;\r\n }\r\n \r\n if (empty($this->data['groupid'])) return false;\r\n $num_queued = 0;\r\n $subscriptions = Jojo::selectQuery(\"SELECT * FROM {newsletter_subscription} WHERE active='yes' AND groupid=?\", $this->data['groupid']);\r\n foreach ($subscriptions as $subscription) {\r\n $subscriber = new newsletter_subscriber(false, false, $subscription['subscriberid']);\r\n if (empty($subscriber->email)) continue; //can't queue if email is empty for some reason\r\n $data = Jojo::selectRow(\"SELECT * FROM {newsletter_queue} WHERE subscriberid=? AND messageid=?\", array($subscriber->subscriberid, $this->messageid));//don't send the same message twice\r\n if (!count($data)) {\r\n Jojo::insertQuery(\"INSERT INTO {newsletter_queue} SET subscriberid=?, messageid=?, email=?, queued=?, status='queued'\", array($subscriber->subscriberid, $this->messageid, $subscriber->email, time()));\r\n $num_queued++;\r\n }\r\n }\r\n\r\n $this->data['status'] = 'queued';\r\n $this->saveToDb();\r\n return $num_queued;\r\n }", "title": "" }, { "docid": "1cbfae082e09b68044eba0eb01ff5478", "score": "0.4629791", "text": "public function add(QsQueueItem $item);", "title": "" }, { "docid": "314b0c20aa47a287c0ec75633a23af04", "score": "0.46265894", "text": "public function create(AwsPresenter $presenter): Form {\n\t\t$form = $this->factory->create();\n\t\t$form->setTranslator($form->getTranslator()->domain('cloud.amazonAws.form'));\n\t\t$fileName = 'MqttMessaging';\n\t\t$this->manager->setFileName($fileName);\n\t\t$form->addText('endpoint', 'endpoint')->setRequired();\n\t\t$form->addUpload('cert', 'certificate')->setRequired();\n\t\t$form->addUpload('key', 'pkey')->setRequired();\n\t\t$form->addSubmit('save', 'save')\n\t\t\t\t->onClick[] = function (SubmitButton $button) use ($presenter) {\n\t\t\t$values = $button->getForm()->getValues();\n\t\t\t$this->save($values, $presenter);\n\t\t};\n\t\t$form->addSubmit('save_restart', 'save_restart')\n\t\t\t\t->onClick[] = function (SubmitButton $button) use ($presenter) {\n\t\t\t$values = $button->getForm()->getValues();\n\t\t\t$this->save($values, $presenter, true);\n\t\t};\n\t\t$form->addProtection('core.errors.form-timeout');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "17028b736550add120fca118faf581dd", "score": "0.46083593", "text": "private function createNewSubscription($arrData, $custom_data, $plan_id = null){\n $this->process_steps .= '29; ' ;\n $subscription = new Subscriptions();\n $subscription->user_id = $custom_data['user_id'];\n $subscription->trans_id = isset($arrData['txn_id']) ? $arrData['txn_id'] : 'trial';\n $subscription->subscr_id = $arrData['subscr_id'];\n $subscription->subscription_id = $plan_id; //because field 'subscription_id' corresponds with 'id' in SubscriptionPlans\n $date = isset($arrData['payment_date']) ? $arrData['payment_date'] : $arrData['subscr_date'];\n $subscription->payment_date = date('Y-m-d H:i:s',strtotime($date));\n $subscription->status = 'active';\n $subscription->items_count = $custom_data['service_id'];\n $subscription->created_at = date(\"Y-m-d H:i:s\");\n $subscription->updated_at = date('Y-m-d H:i:s');\n if($subscription->save()){\n return $subscription;\n }else{\n Yii::log(\"[CUSTOM-LOG-SBSCR-ERROR] -> Can't create new subscription\", 'ERROR'); exit;\n }\n }", "title": "" }, { "docid": "387384e7fc9587690b5d4a0839dfc389", "score": "0.4604222", "text": "public function connect(array $config)\n\t{\n\t\t$connection = new AMQPConnection($config['host'], $config['port'], $config['user'], $config['pass']);\n\n\t\treturn new RabbitMqQueue($connection->channel(), $config);\n }", "title": "" }, { "docid": "218ea035b9269c72097b2a891726303c", "score": "0.4601724", "text": "public function create($name, Google_Service_Pubsub_Subscription $postBody, $optParams = array())\r\n {\r\n $params = array('name' => $name, 'postBody' => $postBody);\r\n $params = array_merge($params, $optParams);\r\n return $this->call('create', array($params), \"Google_Service_Pubsub_Subscription\");\r\n }", "title": "" }, { "docid": "8bf0a77f4ed980de476adde58c7e2cc1", "score": "0.45978606", "text": "public function subscribe ( $topic_arn, $protocol, $endpoint, $options = array() ) {\n\t\t\t\n\t\t\t$options['TopicArn'] = $topic_arn;\n\t\t\t$options['Protocol'] = $protocol;\n\t\t\t$options['Endpoint'] = $endpoint;\n\t\t\t\n\t\t\t$result = $this->request( 'Subscribe', $options, '//aws:SubscriptionArn' );\n\t\t\t\n\t\t\t$result->response = (string)$result->response[0];\n\t\t\t\n\t\t\treturn $result;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2e0ffb730db3777761acc1989ec99d17", "score": "0.45887196", "text": "public function __construct()\n {\n parent::__construct();\n $this->queueService = app(QueueService::class);\n }", "title": "" }, { "docid": "4bb38c60dcfafd7e8896424bfd9b100e", "score": "0.4582012", "text": "public function testExecute()\n {\n $commandTester = $this->createCommandTester(new QueueCreateCommand());\n $commandTester->execute([\n 'name' => 'my-queue-name',\n '--delay_seconds' => 1,\n '--maximum_message_size' => 1,\n '--message_retention_period' => 1,\n '--receive_message_wait_time_seconds' => 1,\n '--visibility_timeout' => 1,\n '--content_based_deduplication' => true,\n ]);\n\n $output = $commandTester->getDisplay();\n $this->assertContains('Created successfully. New Queue URL: new-queue-url', $output);\n }", "title": "" }, { "docid": "5d7d2c8690d743b607bbd253d6cfa0d5", "score": "0.45750743", "text": "public function add() {\n\t\t$task = $this->queueTaskName();\n\t\t$this->QueuedJobs->createJob($task);\n\n\t\t$this->success('Added ' . $task . ' task');\n\t}", "title": "" }, { "docid": "16c0c358caeb3bb19b13924a882b1f7b", "score": "0.45728973", "text": "public function createBucketAsync(AwsS3Request $request);", "title": "" }, { "docid": "0d2f9e1d3ee91fab70440323a356920c", "score": "0.4564466", "text": "public function testCreateObject()\n {\n try {\n $obj = (new Sms)->withKeys(self::PUBLIC_KEY, self::PRIVATE_KEY);\n $this->assertTrue($obj instanceof Sms);\n\n return $obj;\n } catch (\\Exception $e) {\n echo \"{$e->getMessage()}\\n\";\n $this->assertTrue(false);\n\n return null;\n }\n }", "title": "" }, { "docid": "fec3b16289db3c90b63503c96925148d", "score": "0.45613068", "text": "public function __construct($sendTo, $emailInfo, $event)\n {\n\n $this->sendTo = $sendTo;\n $this->emailInfo = $emailInfo;\n $this->event = $event;\n\n\n // Name of the Queue\n $this->onQueue('email');\n\n }", "title": "" }, { "docid": "b9e0e031269dc98d38ec4c1d696e2334", "score": "0.45602", "text": "public function canCreateNewSubscription()\n {\n // Assert\n $customer = Ezypay::createCustomer();\n $subscription = Ezypay::createSubscription($customer['id']);\n\n $this->assertNotNull($subscription['id']);\n }", "title": "" }, { "docid": "f317dc21fb94c2d2b1b8802ef203ac61", "score": "0.4549179", "text": "private function addToQueue(string $user_id, string $type)\n {\n // Create new email\n $email = new Email();\n\n // Set user_id for email\n $email->user_id = $user_id;\n\n // Set email status new\n $email->status = Email::STATUS_NEW;\n\n // Set email type\n $email->type = $type;\n\n // Save email to db\n $email->save();\n }", "title": "" }, { "docid": "a8ed7c1c4207da7e89016649503035d1", "score": "0.45422405", "text": "function __construct($subscriptionId, $subscriptionName, $groupId, $recipientId)\n\t{\n\t $this->db = Zend_Registry::get(\"messageDB\");\n\t $this->subscriptionId = $subscriptionId;\n\t $this->subscriptionName = $subscriptionName;\n\t $this->groupId = $groupId;\n\t $this->recipient = new Warecorp_User('id', $recipientId);\n\t $this->load($subscriptionId);\n\t}", "title": "" }, { "docid": "7e1aca204d444533c63b7f48a9de4be6", "score": "0.45279846", "text": "public function __construct(SubscriptionService $subscriptionService)\n {\n $this->subscriptionService = $subscriptionService;\n parent::__construct();\n }", "title": "" }, { "docid": "4a10d87d200a943e2d74f39222cf3846", "score": "0.45210603", "text": "public function createQueue($name)\n {\n throw new Exception\\UnsupportedMethodCallException(\n __FUNCTION__ . '() is not supported by ' . get_called_class()\n );\n }", "title": "" }, { "docid": "fa21339cbf466158e95cfc637898fc34", "score": "0.45160958", "text": "public function __construct(QueuedSms $sms)\n {\n //\n $this->sms = $sms;\n $this->delay(5);\n }", "title": "" }, { "docid": "75d3ce8ce8d60e5ea8d6dfd2cc0ba9d7", "score": "0.45145094", "text": "public function getQueue()\n {\n $this->createDirectExchange();\n $this->createQueue();\n $this->bindQueueToExchange();\n\n return new Queue($this->channel, $this->name);\n }", "title": "" }, { "docid": "242d9ca06f062dd48f6f0b3a7ff8427e", "score": "0.4509214", "text": "public function subscription($subscription = 'default')\n {\n throw new \\BadMethodCallException('Not implemented yet');\n }", "title": "" }, { "docid": "1529dc7f32537d993003f14d882202dd", "score": "0.45045245", "text": "public function create()\n {\n //POST /topics/create\n }", "title": "" }, { "docid": "22d010b570fbaf14f64cbce48ddfc9e4", "score": "0.45016965", "text": "public function store()\n {\n $rules = array(\n \t'email' => 'required|email',\n \t'subscription_id' => 'required'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules);\n\n if ($validator->fails()) {\n \tSession::flash('message', 'Failed to subscribe to newsletter');\n } else {\n \t// store\n \t$subscriber = new Subscriber;\n \t$subscriber->email = \\Input::get('email');\n \t$subscriber->subscription_id = \\Input::get('subscription_id');\n \t$subscriber->enabled = true;\n \t$subscriber->save();\n\n $subscriber->name =\"New Subscriber\";\n\n //TODO: create subscription email \n \t// \\Session::flash('message', 'Successfully subscribed to newsletter');\n // Mail::send('emails.contact.subscription', ['subscriber' => $subscriber], function($m) use ($subscriber) {\n // $subject = 'You are now enrolled to receive TXRA updates and newsletters';\n // $m->from(env('MAIL_FROM_EMAIL'), 'TXRA');\n // $m->to($subscriber->email, $subscriber->name)->subject($subject);\n // $m->bcc('[email protected]', 'TXRA Communications Committee');\n\n // });\n }\n\n }", "title": "" }, { "docid": "9b5fab5d0d4ebd13e557558bbdbf0b6c", "score": "0.44927394", "text": "public function connect(array $config): Queue\n {\n /** @var MQClient $client */\n $client = new MQClient(Arr::get($config, 'namesrv'), Arr::get($config, 'access_key'),Arr::get($config, 'secret_key'));\n $this->dispatcher->listen(WorkerStopping::class, function () use ($client) {\n //$client->close();\n });\n\n $worker = Arr::get($config, 'worker', 'default');\n\n if ($worker === 'default') {\n return new RocketMQQueue($client, $config);\n }\n\n if ($worker === 'horizon') {\n $this->dispatcher->listen(JobFailed::class, RocketMQFailedEvent::class);\n\n return new HorizonRocketMQQueue($client, $config);\n }\n\n if ($worker instanceof RocketMQQueue) {\n return new $worker($client, $config);\n }\n\n throw new InvalidArgumentException('Invalid worker.');\n }", "title": "" }, { "docid": "adf7ecf8def7eecc8734d28c3188b58e", "score": "0.4488421", "text": "public function makeSubscription($subscriptionFields = [])\n {\n /** @var SubscriptionRepository $subscriptionRepo */\n $subscriptionRepo = App::make(SubscriptionRepository::class);\n $theme = $this->fakeSubscriptionData($subscriptionFields);\n return $subscriptionRepo->create($theme);\n }", "title": "" }, { "docid": "78e0ecf96ff5b8ca7478ce0fe06d0575", "score": "0.44877127", "text": "public function store(Subscription $subscription)\n {\n return $this->post('/api/subscriptions', $subscription, 'subscription');\n }", "title": "" } ]
68e1c7b077d6a23858a61512787e26a6
Runnable method to execute this class
[ { "docid": "8dd34fd19f5b9fb193b96a750338220d", "score": "0.0", "text": "public function run() {\n\t\t$this->create_version();\n\t\t$this->create_database();\n\t}", "title": "" } ]
[ { "docid": "9b957d3b97b5dfe082dcfcfea94f9fd3", "score": "0.76212496", "text": "protected function run() {}", "title": "" }, { "docid": "c078e98834b4db7862d99a52bc1c38d3", "score": "0.7596902", "text": "protected abstract function run();", "title": "" }, { "docid": "2efef1cc5ba6b787abe237fd41aed146", "score": "0.7471822", "text": "public abstract function run();", "title": "" }, { "docid": "aebf0e079264a81c7a42a21c6f05b9a2", "score": "0.7394558", "text": "public function run()\n {\n $this->call(Admindata::class);\n $this->call(Admin_role::class);\n $this->call(Categories::class);\n // $this->call(Category_post::class);\n $this->call(Classes::class);\n $this->call(Croles::class);\n \n $this->call(Permessions::class);\n $this->call(Permession_role::class);\n $this->call(Roles::class);\n $this->call(Teacher::class);\n $this->call(User::class);\n // $this->call(Post::class);\n }", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.73921704", "text": "abstract protected function run();", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.73921704", "text": "abstract protected function run();", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.73905826", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.73905826", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.73905826", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.73905826", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.73905826", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4a41d9793afc4e93c518b703d0a37cbb", "score": "0.7379194", "text": "public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.7357887", "text": "abstract public function run();", "title": "" }, { "docid": "9f10ddd46524b413645e48945733cbb2", "score": "0.7315788", "text": "public function run()\n {\n $this->call(Users::class);\n //$this->call(Playlists::class);\n //$this->call(Camps::class);\n //$this->call(Reviews::class);\n //$this->call(Favorite_User::class);\n $this->call(PermissionSeeder::class);\n //$this->call(Artists::class);\n //$this->call(Artist_Playlist::class);\n }", "title": "" }, { "docid": "b381b072eb78dcdfcac46e7846295bbc", "score": "0.7298823", "text": "abstract protected function _run();", "title": "" }, { "docid": "4c9d60823941369a5f02a0fc5ccc8814", "score": "0.7271579", "text": "public function run()\n {\n //\n }", "title": "" }, { "docid": "4c9d60823941369a5f02a0fc5ccc8814", "score": "0.7271579", "text": "public function run()\n {\n //\n }", "title": "" }, { "docid": "4c9d60823941369a5f02a0fc5ccc8814", "score": "0.7271579", "text": "public function run()\n {\n //\n }", "title": "" }, { "docid": "4c9d60823941369a5f02a0fc5ccc8814", "score": "0.7271579", "text": "public function run()\n {\n //\n }", "title": "" }, { "docid": "4c9d60823941369a5f02a0fc5ccc8814", "score": "0.7271579", "text": "public function run()\n {\n //\n }", "title": "" }, { "docid": "0ab8d48e67646ce34d63ebe5d5f72c41", "score": "0.7264546", "text": "public function run() \n {\n $this->_executeActions();\n }", "title": "" }, { "docid": "5287a3cae09de3f82dfc3a3521cc84aa", "score": "0.7263343", "text": "public function run(){\n }", "title": "" }, { "docid": "f84bf8b494741841dbf29521d20b9cda", "score": "0.72619617", "text": "public function run()\n {\n $this->call([\n //\n ]);\n }", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.7236459", "text": "abstract function run();", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.7236459", "text": "abstract function run();", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.7236459", "text": "abstract function run();", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "71fd9eb280553614419d16367e7c4a5c", "score": "0.7225177", "text": "public function run()\n {\n }", "title": "" }, { "docid": "975b0ed42784476cb0c2bac9365ff890", "score": "0.7208351", "text": "public function run()\n {\n \n }", "title": "" }, { "docid": "8a87fdd57961c85825b93cac7b950725", "score": "0.7184289", "text": "public function run()\n {\n $this->call(Profile::class);\n $this->call(Users::class);\n $this->call(Representantes::class);\n //$this->call(Ejecutivos::class);\n //$this->call(Distribuidoras::class);\n //$this->call(Supervisores::class);\n }", "title": "" }, { "docid": "04f4494522ffe24263e1318e9708b2a5", "score": "0.71787775", "text": "public function run()\n {\n \n }", "title": "" }, { "docid": "f09b83f3d2c0a75c2481787592741b6e", "score": "0.71772313", "text": "public function run()\n {\n }", "title": "" }, { "docid": "b12a31c0faafaf616e4c3dd50f308273", "score": "0.71710205", "text": "public function run()\n {\n // \n }", "title": "" }, { "docid": "a73cc481d19c22e259080e87499aff0a", "score": "0.7156235", "text": "public function run() { }", "title": "" }, { "docid": "30705c9b5030f9d7fe388863b0e2f05b", "score": "0.7156073", "text": "public function run()\n {\n \t$this->call(news_source_bbc::class);\n \t$this->call(news_source_marketwatch::class);\n $this->call(news_source_cnbc::class);\n $this->call(news_source_investing::class);\n }", "title": "" }, { "docid": "b1b930b3f247b7e256df053d53e83988", "score": "0.71478367", "text": "public function run() {\n \n }", "title": "" }, { "docid": "6ee05f51d85cc86d492118a196c236d6", "score": "0.7128845", "text": "public function run()\n {\n\n }", "title": "" }, { "docid": "6ee05f51d85cc86d492118a196c236d6", "score": "0.7128845", "text": "public function run()\n {\n\n }", "title": "" }, { "docid": "6ee05f51d85cc86d492118a196c236d6", "score": "0.7128845", "text": "public function run()\n {\n\n }", "title": "" }, { "docid": "a9c3dee912671525a8c1a4eeee087798", "score": "0.7123686", "text": "public function run(){\n\t\t$this->doLogic();\n\t}", "title": "" }, { "docid": "3eee2b95be3ce5607971ca346d750d6f", "score": "0.7107923", "text": "protected function _execute(){ }", "title": "" }, { "docid": "9589236b286cd97682f035bfd34627a3", "score": "0.7104288", "text": "public function run()\n {\n\n\n }", "title": "" }, { "docid": "97366c9dcf73017823698a01acd21ff7", "score": "0.7066443", "text": "public function run()\n {\n \n }", "title": "" }, { "docid": "4fb836371e075c3e32b106aa2aa79d9e", "score": "0.7041951", "text": "public function run()\r\n {\r\n /*$this->call([\r\n ]);*/\r\n }", "title": "" }, { "docid": "65d01385f3dba96529f031c98c37d295", "score": "0.703438", "text": "public function run(){\n\n }", "title": "" }, { "docid": "2d2411d7e5fb86ac73072c5ba81f2474", "score": "0.70267177", "text": "public function run()\n {\n parent::run();\n }", "title": "" }, { "docid": "2d2411d7e5fb86ac73072c5ba81f2474", "score": "0.70267177", "text": "public function run()\n {\n parent::run();\n }", "title": "" }, { "docid": "45f610c017fd7d575475577049804787", "score": "0.7025754", "text": "public function run()\n {\n $this->call(topmenuSider::class);\n $this->call(submenuSider::class);\n $this->call(lapasSider::class);\n $this->call(rindasSider::class);\n $this->call(kategorsSider::class);\n $this->call(galerijaSider::class);\n /*$this->call(fotoSider::class);*/\n $this->call(roleSider::class);\n $this->call(kontaktSider::class);\n $this->call(katalogs::class);\n $this->call(useroleSider::class);\n $this->call(poga::class);\n\n }", "title": "" }, { "docid": "ac43b81cefadee794980157114410b5a", "score": "0.70204467", "text": "public function run()\n { \n }", "title": "" }, { "docid": "258294e0d4cd06e2ef5f77b5fb4a8442", "score": "0.6960814", "text": "public function run()\n {\n $this->call(Street_seeder::class);\n $this->call(Transport_seeder::class);\n $this->call(Transport_Street_seeder::class);\n }", "title": "" }, { "docid": "4a6201ad1d1e1cf6684329735ecdb972", "score": "0.69340277", "text": "public function run()\n {\n\n \techo get_class($this). \"::run\" . PHP_EOL;\n }", "title": "" }, { "docid": "244108eba8616bee184ddfb8c1a839e7", "score": "0.6905478", "text": "public function run(): void\n {\n // to be implemented in subclass\n }", "title": "" }, { "docid": "a4a4efce99dbb3544a5a35a3735df956", "score": "0.6871095", "text": "public function run()\n {\n $this->call(CatygorySeeds::class);\n // $this->call(Sub_CatygorySeeds::class);\n }", "title": "" }, { "docid": "ab7e7834ea6ca357f234337d275fe01d", "score": "0.68498594", "text": "abstract public function execute_();", "title": "" }, { "docid": "c7560ba0d8b64f3f10dae23eb9c78540", "score": "0.6848324", "text": "public function run()\n\t{\n\t\tJet_Class::truncate();\n\n\t\t$jet_classes = array (\n\t\t\t0 => array (\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'Small'\n\t\t\t),\n\t\t\t1 => array (\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'Average'\n\t\t\t),\n\t\t\t2 => array (\n\t\t\t\t'id' => 3,\n\t\t\t\t'name' => 'Large'\n\t\t\t),\n\t\t\t3 => array (\n\t\t\t\t'id' => 4,\n\t\t\t\t'name' => 'Long-haul'\n\t\t\t),\n\t\t);\n\n\t\tforeach($jet_classes as $jet_class)\n\t\t\tJet_Class::create($jet_class);\n\t}", "title": "" }, { "docid": "fcc98c29b60dfa594e96d7e6c259b74b", "score": "0.6823761", "text": "public function execute(){}", "title": "" }, { "docid": "d831a9e2b96c5791da86e4eaf83c9c8b", "score": "0.6799481", "text": "abstract function doRun();", "title": "" }, { "docid": "aa879a6bca500bd80dd7d015f6f76fdd", "score": "0.67969716", "text": "protected function doExecute()\n {\n }", "title": "" }, { "docid": "2bf881bdd081f7249a84880539361e61", "score": "0.6792796", "text": "public function run()\n { \n $this->tipopagamenti();\n $this->attachmenttypes(); \n $this->tasktypes(); \n $this->classificazioni();\n $this->mappingtable();\n $this->bollitable();\n\n $this->mappingruoli();\n $this->insertUsers_Plesso();\n }", "title": "" }, { "docid": "25ec8a1851ef1bd528bc9f7312894a91", "score": "0.67649513", "text": "public function run(): void;", "title": "" }, { "docid": "0bdbd520cbb68e91f3eaff1884529baf", "score": "0.6744248", "text": "public function run()\n {\n $this->call([\n user_roles::class,\n products_types::class,\n products_categories::class,\n Documents_type::class,\n UsersTableSeeder::class,\n UnitsMeasure::class,\n products::class,\n product_allerns::class,\n\n\n ]);\n\n }", "title": "" }, { "docid": "a7427e43f138e0e723accee8540e160f", "score": "0.67279124", "text": "public function run()\n {\n $this->call(Usuarioseder::class);\n $this->call(ConversacionTable::class);\n $this->call(MensajeTable::class);\n }", "title": "" }, { "docid": "5766d74388adc2cfca3d597fa15aeb8a", "score": "0.67088807", "text": "public function run()\n {\n $this->call(SoalsTIUseeder::class);\n $this->call(SoalsTWKseeder::class);\n $this->call(SoalsTKPseeder::class);\n }", "title": "" }, { "docid": "d767abff15011b0f0721e5808edf7c0f", "score": "0.67072046", "text": "public function run()\n {\n // 1. Roles\n $this->roles();\n \n // 2. Users\n $this->users();\n \n // 3. Menus\n $this->menus();\n \n // 4. Posts start\n $this->posts();\n \n // 5. Pages\n $this->pages();\n \n // 6. Events \n $this->events();\n \n // 7. Categories \n $this->categories();\n \n // 8. Taxes \n $this->taxes();\n \n // 9. Banners \n $this->banners();\n \n // 10. Contacts \n $this->contacts();\n \n // 11. Bookings \n $this->bookings();\n \n // 12. Commissions \n $this->commissions();\n \n // 13. Tags \n $this->tags();\n }", "title": "" }, { "docid": "4f9f2b050b5af28ba48b27b8aac44821", "score": "0.67004645", "text": "public function execute(){\r\n \t$action = $this->actions[$this->action];\r\n $this->{$action}();\r\n }", "title": "" }, { "docid": "f3a8c9d9496e9ad4366a4c4d671c8647", "score": "0.66911644", "text": "public function run () {\n $ctrlObj = new $this->_controller;\n\n // Aktion Methode aufrufen und ihr die Parameter mit übergeben\n $ctrlObj->{$this->_action}($this->_params);\n\n }", "title": "" } ]
ea19e6e14d78a6df8c4cae126b6a6771
Returns array of fielddescriptors.
[ { "docid": "a8a5a30ee892f6a8d0ea0dfddc598efd", "score": "0.73611796", "text": "private function getFieldDescriptors()\n {\n return $this->get('sulu_core.list_builder.field_descriptor_factory')\n ->getFieldDescriptorForClass($this->getParameter('sulu.model.thread.class'));\n }", "title": "" } ]
[ { "docid": "8439ba1b61c18720e035189c5b8e6125", "score": "0.69585645", "text": "public function getFieldList()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "f227074ca517612825c53c67853f5a96", "score": "0.6842066", "text": "public function getFieldDefinitions()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "b0e60f3f61c18758d86f40b8fff86908", "score": "0.6615548", "text": "public function getFields() : array {\n\n\t\t\treturn $this->fields;\n\t\t}", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6607515", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6607515", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6607515", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2831d73eac8c956a5e1f28256d4f45b0", "score": "0.6602382", "text": "public function getDescriptorsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "e041fee9d70642865bd73de27f1eaed5", "score": "0.6549166", "text": "public function getFieldList();", "title": "" }, { "docid": "f282ad4093c161eedd39db2c50b8c7f3", "score": "0.6514477", "text": "public function list_fields()\n {\n $field_names = [];\n for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) {\n // Might trigger an E_WARNING due to not all subdrivers\n // supporting getColumnMeta()\n $field_names[$i] = @$this->result_id->getColumnMeta($i);\n $field_names[$i] = $field_names[$i]['name'];\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "a17013f4996c9c66616e5cf15b4adce8", "score": "0.64973265", "text": "public static function getFieldDefinitions(): array\n {\n return [\n 'id' => [\n 'name' => 'id',\n 'type' => Type::id(),\n 'description' => 'The id of the entity'\n ],\n 'uid' => [\n 'name' => 'uid',\n 'type' => Type::string(),\n 'description' => 'The uid of the entity'\n ],\n ];\n }", "title": "" }, { "docid": "16ebb4ea80e60599a8e3d1f9051de011", "score": "0.6495584", "text": "public function getFieldsArray()\n {\n $fields = [];\n\n foreach ($this->fields as $field) {\n $fields[$field->getKey()] = $field->getValue();\n }\n\n return $fields;\n }", "title": "" }, { "docid": "0de46b7b38f55e10a11301c44ff54fee", "score": "0.64846337", "text": "public function fields(): array\n {\n return $this->schema->getLookupFields();\n }", "title": "" }, { "docid": "25a3de6a55a40fc24c019a882ed10033", "score": "0.64414614", "text": "public function getFields() : array;", "title": "" }, { "docid": "7bd1c62e9f0eba62efda799e63c2c069", "score": "0.64387083", "text": "public function getFieldTypes() {\n return array();\n }", "title": "" }, { "docid": "a4f2d64af7355dcf144da22f00180b79", "score": "0.6414433", "text": "public function getFields(): array\n {\n return $this->all();\n }", "title": "" }, { "docid": "17ac49b460a7e75efb95433e8e6081f5", "score": "0.6412495", "text": "public function getFields()\n {\n return [];\n }", "title": "" }, { "docid": "fa7cc17f2c12ab20df8668a0f8d167e9", "score": "0.6407382", "text": "function getFieldArray()\n\t{\n\t\t$arr = array();\n\t\tforeach($this->fields as $field => $type)\n\t\t{\n\t\t\tif ($this->filter && $this->filter->isExcluded($field)) continue;\n\t\t\t$arr[] = $field;\n\t\t}\n\t\t\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "aca88ed169f55de39a48bc1304e894d9", "score": "0.64055586", "text": "protected function listFields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "90ea7bf35a9c8ea5b38eccf3fee3f208", "score": "0.64038265", "text": "public static function getFields () {\n\t\tif (static::$fields === null) {\n\t\t\t$table = static::$table;\n\t\t\treturn static::$fields = static::$Db->query(\"DESCRIBE `$table`\", \\PDO::FETCH_COLUMN, 0)->fetchAll();\n\t\t}\n\n\t\treturn static::$fields;\n\t}", "title": "" }, { "docid": "c7da32275ee3b9d909b93675ed1fd43d", "score": "0.63751405", "text": "public function fields()\n {\n return array();\n }", "title": "" }, { "docid": "80c614ac0c4921ebf42097f1d11228e4", "score": "0.63368326", "text": "protected function arrayableFields(): array {\n return $this->_fields;\n }", "title": "" }, { "docid": "f579e2f57e5335e0f5f989d09ec38006", "score": "0.633291", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "2ea6182619581b9dcaff601f764ef2e8", "score": "0.631938", "text": "public function getReflectionFields()\n {\n return $this->_reflectionFields;\n }", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.63178945", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.63178945", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.63178945", "text": "public function getFields(): array;", "title": "" }, { "docid": "1d384918cde040182ae022b354ee7833", "score": "0.6307495", "text": "public function fields() : array\n {\n return [\n 'edges' => [\n 'type' => Type::nonNull(Type::listOf(Type::entity())),\n 'resolve' => function ($parent, $args, $context, ResolveInfo $info) {\n return $parent->getCollection();\n }\n ],\n 'totalCount' => [\n 'type' => Type::int(),\n 'resolve' => function ($parent, $args, $context, ResolveInfo $info) {\n return $parent->count();\n }\n ],\n 'pageInfo' => [\n 'type' => Type::pageInfo(),\n 'resolve' => function ($parent, $args, $context, ResolveInfo $info) {\n return $parent;\n }\n ]\n ];\n }", "title": "" }, { "docid": "5854c6c2b61825ef70bd362eeb9b5d6f", "score": "0.63039047", "text": "public function getReflectionProperties(): array\n {\n return $this->reflFields;\n }", "title": "" }, { "docid": "e9afe21ad9dff970296720038e831462", "score": "0.63004345", "text": "public function getFieldColumns()\n {\n $options = [];\n foreach ($this->describeTable() as $key => $field) {\n $type = $this->_helper->convertTypesTables($field['DATA_TYPE']);\n $options[$this->getEntityTypeCode()][] = [\n 'field' => $key,\n 'type' => $type,\n 'select' => []\n ];\n }\n return $options;\n }", "title": "" }, { "docid": "d6a4407fdd54e92d80ffd8dcde487367", "score": "0.63001186", "text": "public function fields() : array\n {\n return $this->bean->with('order by seqn,name')->ownFormField;\n }", "title": "" }, { "docid": "42bfc9d6d08caf1f0703d8330e3327ec", "score": "0.6294537", "text": "public function get_fields()\n {\n return [\n 'isys_catg_fc_port_list__title' => 'Port ' . _L('LC__CATG__STORAGE_FCPORT__TITLE'),\n 'isys_catg_hba_list__title' => 'LC__CMDB__CATG__HBA',\n 'isys_catg_fc_port_list__wwn' => 'LC_FC_PORT_POPUP__CHOSEN_WWNS',\n 'isys_fc_port_type__title' => 'LC__CATG__STORAGE_FCPORT__TYPE',\n 'isys_fc_port_medium__title' => 'LC__CATG__STORAGE_FCPORT__MEDIUM',\n 'object_connection' => 'LC__CMDB__CATG__NETWORK__TARGET_OBJECT',\n 'connector_title' => 'LC__CATG__STORAGE_CONNECTION_TYPE'\n ];\n }", "title": "" }, { "docid": "e3097b7a536d672b6655d3c1ae2c4e57", "score": "0.6290695", "text": "public function list_fields()\n {\n $field_names = array();\n $this->result_id->field_seek(0);\n while ($field = $this->result_id->fetch_field())\n {\n $field_names[] = $field->name;\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "c3daa9bb5b3985606a6995f4850780e2", "score": "0.6276247", "text": "public function fields(): array\n {\n return array_keys($this->_fields);\n }", "title": "" }, { "docid": "f7e452bcdd4481368358087a83294028", "score": "0.62713873", "text": "public function list_fields()\n {\n return array();\n }", "title": "" }, { "docid": "4a7c21d785d0686ff4ae12e59d980d2a", "score": "0.6266783", "text": "protected function getFields()\n\t{\n\t\tif($this->fieldArray == null)\n\t\t{\n\t\t\t$start = microtime(true);\n\t\t\t$results = $this->wpdb->get_results('SHOW columns FROM '.$this->getTable());\n\t\t\t$GLOBALS['DB_MODELS_DEBUG'][] = ['SHOW columns FROM '.$this->getTable(), microtime(true) - $start, false];\n\t\t\tforeach($results as $field)\n\t\t\t{\n\t\t\t\tif(strtolower($field->Key) == 'pri') $this->primaryKey = $field->Field;\n\t\t\t\t$this->fieldArray[] = $field->Field;\n\t\t\t}\n\t\t}\n\t\treturn $this->fieldArray;\n\t}", "title": "" }, { "docid": "e339a901522dfdced1847d3768c3245b", "score": "0.62494475", "text": "public function getLazyFields() : array {\n $ret = [];\n $fields = $this->getFields();\n foreach ($fields as $field){\n if ($field->getLazyFetch()){\n $ret[] = $field->getName();\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "5dfba84419ff1ca71c9737c2c36e46c2", "score": "0.62414134", "text": "public function getFields(): array\n {\n return [];\n }", "title": "" }, { "docid": "8d768238ec845f5621941a6a6c7d9755", "score": "0.6227697", "text": "public function getFields()\n\t{\n\t\tif (!$this->fields) {\n\t\t\t$moduleBlockFields = Vtiger_Field_Model::getAllForModule($this->targetModuleModel);\n\t\t\t$this->fields = [];\n\t\t\tforeach ($moduleBlockFields as $moduleFields) {\n\t\t\t\tforeach ($moduleFields as $moduleField) {\n\t\t\t\t\t$block = $moduleField->get('block');\n\t\t\t\t\tif (empty($block)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$this->fields[$moduleField->get('name')] = $moduleField;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "edfe7479e5005e176e4f151ac57eae12", "score": "0.6217706", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'additionalDetails' => fn(ParseNode $n) => $o->setAdditionalDetails($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'lastHealthCheckDateTime' => fn(ParseNode $n) => $o->setLastHealthCheckDateTime($n->getDateTimeValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'result' => fn(ParseNode $n) => $o->setResult($n->getEnumValue(CloudPcConnectivityEventResult::class)),\n ];\n }", "title": "" }, { "docid": "ac7c2511f11d4dfb44b99965f3475682", "score": "0.61979467", "text": "protected function getFormFields(): array\n {\n $table = $this->resourceModel->getTable();\n $columns = array_flip(\\Schema::getColumnListing($table));\n $fillable = $this->resourceModel->getFillable();\n\n $columns = array_only($columns, $fillable);\n\n foreach ($columns as $name => $val){\n $columns[$name] = \\DB::connection()->getDoctrineColumn($table, $name)->getType()->getName();\n }\n\n return $columns;\n }", "title": "" }, { "docid": "077e1284273e4391a8824ac82f82b47a", "score": "0.6191668", "text": "public function grabFieldList()\n {\n return field_info_field_map();\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.6180557", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "cb7d334c4b01ff02f32b8f57e6dc6fc5", "score": "0.6174978", "text": "public function get_fields() {\n\t\t\tif (!$this->fields) {\n\t\t\t\t$this->load_fields();\n\t\t\t}\n\t\t\treturn $this->fields;\n\t\t}", "title": "" }, { "docid": "16e7ffea0f831d8aa1a11eb1d09acb65", "score": "0.6174771", "text": "public function getFields(): array\n {\n $fields = [];\n\n foreach ($this->getNodes() as $node) {\n if ($node instanceof AbstractNode) {\n $fields = \\array_merge($fields, $node->getFields());\n } else if ($node instanceof Command) {\n $fields[] = $node->getField();\n }\n }\n\n return \\array_unique($fields);\n }", "title": "" }, { "docid": "3d32844f9f8eb894c1f2817fb0ee4fd1", "score": "0.6172431", "text": "public function getFields() {\n return $this->fieldCollection;\n }", "title": "" }, { "docid": "8143c2f72fd38f423ce0a9fcb3020bc5", "score": "0.6167356", "text": "public final function _fieldData()\n\t{\n\t\t$retval = array();\n\t\twhile ($field = mysqli_fetch_field($this->_result))\n\t\t{\n\t\t\t$F\t\t\t\t= new stdClass();\n\t\t\t$F->name \t\t= $field->name;\n\t\t\t$F->type \t\t= $field->type;\n\t\t\t$F->default\t\t= $field->def;\n\t\t\t$F->max_length\t= $field->max_length;\n\t\t\t$F->primary_key = $field->primary_key;\n\n\t\t\t$retval[] = $F;\n\t\t}\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "b4d7229d03786ffa02b334cddc3222a7", "score": "0.6163665", "text": "public function getFieldInfo(): array {\n return $this->fieldInfo;\n }", "title": "" }, { "docid": "bb2c5257ddeb8498d392178ac46a40b5", "score": "0.61609685", "text": "protected function getFields()\r\n {\r\n if (!$this->fields) {\r\n $component = $this->filter->getComponent();\r\n $this->fields = $this->metadataProvider->getFields($component);\r\n }\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "02e4ee64ac247f7338a22a821dfdc9cf", "score": "0.61565256", "text": "public function getDefinedFields()\n {\n // field names are taken from the fields array\n // if the element value is an array, we assume the key is the\n // field name; otherwise, we assume the value is the field name.\n $fields = array();\n foreach ($this->fields as $key => $value) {\n $fields[] = is_array($value) ? $key : $value;\n }\n\n return $fields;\n }", "title": "" }, { "docid": "f8efcab9a0fca974ae85892381363913", "score": "0.6150941", "text": "public function fields() {\n\n\t\tif (is_null($this->fields)) {\n\t\t\t$this->fields = new Model\\Field($this->listFields());\n\n\t\t}\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "1349f3795d09b40a4eebacc78e411d16", "score": "0.61427", "text": "private function _getFieldData(): array\n {\n $data = [];\n\n $fieldRows = (new Query())\n ->select([\n 'fields.id',\n 'fields.name',\n 'fields.handle',\n 'fields.context',\n 'fields.instructions',\n 'fields.searchable',\n 'fields.translationMethod',\n 'fields.translationKeyFormat',\n 'fields.type',\n 'fields.settings',\n 'fields.uid',\n 'fieldGroups.uid AS fieldGroup',\n ])\n ->from(['{{%fields}} fields'])\n ->leftJoin('{{%fieldgroups}} fieldGroups', '[[fields.groupId]] = [[fieldGroups.id]]')\n ->all();\n\n $fields = [];\n $fieldService = Craft::$app->getFields();\n\n // Massage the data and index by UID\n foreach ($fieldRows as $fieldRow) {\n $fieldRow['settings'] = Json::decodeIfJson($fieldRow['settings']);\n $fieldInstance = $fieldService->getFieldById($fieldRow['id']);\n $fieldRow['contentColumnType'] = $fieldInstance->getContentColumnType();\n\n $fieldRow['searchable'] = (bool)$fieldRow['searchable'];\n\n $fields[$fieldRow['uid']] = $fieldRow;\n }\n\n foreach ($fields as $field) {\n $fieldUid = $field['uid'];\n unset($field['id'], $field['uid']);\n $data[$fieldUid] = $field;\n }\n\n return $data;\n }", "title": "" }, { "docid": "51ebf8db22882b495c6d66f0917c6614", "score": "0.6139506", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'compute' => fn(ParseNode $n) => $o->setCompute($n->getObjectValue([TeamworkPeripheral::class, 'createFromDiscriminatorValue'])),\n 'hdmiIngest' => fn(ParseNode $n) => $o->setHdmiIngest($n->getObjectValue([TeamworkPeripheral::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'processorModel' => fn(ParseNode $n) => $o->setProcessorModel($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "28cae086960d7ccb82729a6dd0660468", "score": "0.6126583", "text": "protected function getFieldOptions() {\n $entityTypeManager = \\Drupal::service('entity_field.manager');\n $fields = $entityTypeManager->getFieldDefinitions($this->fieldDefinition->getTargetEntityTypeId(), $this->fieldDefinition->getTargetBundle());\n $options = [];\n foreach ($fields as $field) {\n if ($field->isDisplayConfigurable('form') && !in_array($field->getName(), [\n 'uid',\n 'status',\n 'created',\n ])) {\n $options[$field->getName()] = $field;\n }\n }\n return $options;\n }", "title": "" }, { "docid": "7443f7330141060c67c39da19574395b", "score": "0.61135876", "text": "public function getFieldDefinitions();", "title": "" }, { "docid": "23d7c5be1c8bc739abf0fac53468f6c6", "score": "0.61082506", "text": "function FieldTypesArray()\r\n\t{\r\n\t\t$arr = array();\r\n\t\tfor ($i=0, $max=$this->_numOfFields; $i < $max; $i++) \r\n\t\t\t$arr[] = $this->FetchField($i);\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "756947994c917252b2d4639a841f2189", "score": "0.6107313", "text": "protected function getFields() {\n $context = 'view';\n $fields = ['' => $this->t('-- Select field --')];\n $field_definitions = array_filter($this->entityFieldManager->getFieldDefinitions($this->fieldDefinition->getTargetEntityTypeId(), $this->fieldDefinition->getTargetBundle()), function (FieldDefinitionInterface $field_definition) use ($context) {\n return $field_definition->getName() <> $this->fieldDefinition->getName()\n && $field_definition->isDisplayConfigurable($context)\n && $field_definition->getFieldStorageDefinition()->getCardinality() === 1\n && in_array($field_definition->getType(), $this->pluginDefinition['title_field_types'], TRUE);\n });\n\n /** @var \\Drupal\\field\\Entity\\FieldConfig $field_definition */\n foreach ($field_definitions as $field_name => $field_definition) {\n $fields[$field_name] = $field_definition->label();\n }\n\n return $fields;\n }", "title": "" }, { "docid": "8ed5906bfe0af67d073d27ded0685ab4", "score": "0.60691893", "text": "public function fields()\n {\n $fieldIds = [];\n foreach ($this->field_groups as $group) {\n $fieldIds = array_merge($fieldIds, $group->fields->pluck('field_id')->all());\n }\n return EntryField::whereIn('field_id', $fieldIds);\n }", "title": "" }, { "docid": "0becd32572ced3034a44467664082f5d", "score": "0.6061219", "text": "public function getRepositoryDescriptors() {\n $dom = $this->getDomFromBackend(self::REPORT, $this->server,\n self::buildReportRequest('dcr:repositorydescriptors'));\n if ($dom->firstChild->localName != 'repositorydescriptors-report' ||\n $dom->firstChild->namespaceURI != self::NS_DCR) {\n throw new PHPCR_RepositoryException('Error talking to the backend. '.$dom->saveXML());\n }\n\n $descs = $dom->getElementsByTagNameNS(self::NS_DCR, 'descriptor');\n $descriptors = array();\n foreach($descs as $desc) {\n $values = array();\n foreach($desc->getElementsByTagNameNS(self::NS_DCR, 'descriptorvalue') as $value) {\n $type = $value->getAttribute('type');\n if ($type == '') $type = PHPCR_PropertyType::TYPENAME_UNDEFINED;\n $values[] = jackalope_Factory::get('Value', array($type, $value->textContent));\n }\n if ($desc->childNodes->length == 2) {\n $descriptors[$desc->firstChild->textContent] = $values[0];\n } else {\n $descriptors[$desc->firstChild->textContent] = $values;\n }\n }\n return $descriptors;\n }", "title": "" }, { "docid": "081595294465b154fcfb8b3d95413f33", "score": "0.60544276", "text": "public function getFields(): array\n {\n return [\n 'id' => $this->id,\n 'firstName' => $this->first_name,\n 'lastName' => $this->last_name,\n 'email' => $this->email,\n 'verified' => $this->verified,\n ];\n }", "title": "" }, { "docid": "ce543b3d65160383ed16a693bb1d0963", "score": "0.6041743", "text": "public function getFieldNames() : array;", "title": "" }, { "docid": "ada61c4387c629cf9591f8f2840324db", "score": "0.6035902", "text": "public function getFieldHandles()\n {\n $handles = [];\n /** @var Field[] $fields */\n $fields = Craft::$app->getFields()->getAllFields('simple-forms');\n foreach ($fields as $field) {\n $handles[] = ['label' => $field->name, 'value' => $field->handle];\n }\n\n return $handles;\n }", "title": "" }, { "docid": "6bff1d8cd76a98575c8fdb6243f14fac", "score": "0.603298", "text": "public function getFields()\t{ return array(); }", "title": "" }, { "docid": "990368088db11732f1b5dd995be55dcb", "score": "0.6024857", "text": "function getFields()\n {\n return $this->_impl->getFields();\n }", "title": "" }, { "docid": "726c80c42bb1af340c21db8641612b9e", "score": "0.60224986", "text": "public function get_fields()\n\t{\n\t\treturn array_keys( $this->fields );\n\t}", "title": "" }, { "docid": "33d611cec9f96fd51a151397d785fa93", "score": "0.602231", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "33d611cec9f96fd51a151397d785fa93", "score": "0.602231", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "2499322ebe7d90baffe2d6aa595c7246", "score": "0.6018495", "text": "public function getFieldData() : array \n\t{\n\t\t$retval = [];\n\t\tforeach (sqlsrv_field_metadata( $this->resultID ) as $i => $field) {\n\t\t\t$retval[ $i ] = new stdClass();\n\t\t\t$retval[ $i ]->name = $field['Name'];\n\t\t\t$retval[ $i ]->type = $field['Type'];\n\t\t\t$retval[ $i ]->max_length = $field['Size'];\n\t\t}\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "074b5d5dba967e2f4a785c86f8415cc2", "score": "0.6013688", "text": "function get_fields_list(){\n global $conn;\n \n $fields = [];\n $sql = \"SELECT `column_name` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='\" . constant('DB_NAME') . \"' AND `TABLE_NAME`='\" . $this->table_name . \"';\";\n \n $query_rs = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($query_rs)) {\n $fields[] = $row['column_name'];\n }\n\n return $fields;\n }", "title": "" }, { "docid": "13962de272c9d25042c4f157ef9c68db", "score": "0.6010841", "text": "public function get_fields(){\n\t\t$this->maybe_set_fields();\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6007961", "text": "public function getFields();", "title": "" }, { "docid": "2cfaace797c43d8fd373ed77af0e932c", "score": "0.60019404", "text": "public function getFieldKeys(): array\n {\n return $this->fieldKeys;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.59938514", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.59938514", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.59938514", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "a57328f7b2f77ce2fc1db5fc56f94a8a", "score": "0.59889394", "text": "function getFieldValues() {\n $rv = array();\n foreach($this->getFields() as $k=>$v) {\n $rv[$k] = $v->getValue();\n }\n return $rv;\n }", "title": "" }, { "docid": "d4a8247b4f7f08a945e51f38193d12cf", "score": "0.5988678", "text": "public function getFields()\n\t{\n\t\treturn $this->aFields;\n\t}", "title": "" }, { "docid": "274531bd276b9888c5b44059b4d4c591", "score": "0.5985862", "text": "protected static function getFields()\n {\n static $fields = array();\n $called_class = get_called_class();\n\n if (!array_key_exists($called_class, $fields)) {\n $reflection_class = new \\ReflectionClass($called_class);\n\n $properties = array();\n\n foreach ($reflection_class->getProperties() as $property) {\n $properties[] = $property->name;\n }\n\n $fields[$called_class] = $properties;\n }\n\n return $fields[$called_class];\n }", "title": "" }, { "docid": "3d9582a2ddea4879f7261ef8fc72ca5e", "score": "0.5980337", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'commands' => fn(ParseNode $n) => $o->setCommands($n->getCollectionOfObjectValues([OnenotePatchContentCommand::class, 'createFromDiscriminatorValue'])),\n ];\n }", "title": "" }, { "docid": "a9ca0134b3a0549ea596523729dee724", "score": "0.59792036", "text": "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "a9ca0134b3a0549ea596523729dee724", "score": "0.59792036", "text": "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "a9ca0134b3a0549ea596523729dee724", "score": "0.59792036", "text": "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "728d146684d83a06a517acdf45d45c2d", "score": "0.5977717", "text": "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.59743696", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" } ]
511813d381258f87e93f78f0488ddce3
Validamos la etnia si es un dato de labase de datos AEJP
[ { "docid": "7fb0c895aad2f37afd6b12c4f5922671", "score": "0.0", "text": "function validar_etnia($petnica, $lista_etnia) {\n $petnica = trim($petnica);\n if(empty($petnica)){\n $petnica = '-1';\n return $petnica;\n }\n\n foreach ($lista_etnia as $key => $value) {\n if ($value->id == $petnica) {\n return $value->id;\n } else {\n return '-1';\n }\n }\n }", "title": "" } ]
[ { "docid": "57d6ceb67e9c9a51bef061c595a9fea1", "score": "0.7052854", "text": "function ValidaData($dat){\n\n\t\t$res = false;\n\n\t\t# SEPARA DIA/MES/ANO DA DATA\n\t\t$data = explode(\"/\",\"$dat\");\n\n\t\tif(isset($data[0]) and isset($data[1]) and isset($data[2])){\n\t\t\t$d = $data[0]; $m = $data[1]; $a = $data[2];\n\t\t\tif(is_numeric($d) and is_numeric($m) and is_numeric($a)){\n\t\t\t\t$res = checkdate($m,$d,$a);\n\t\t\t}\n\t\t}\n\n\t\treturn($res);\n\t}", "title": "" }, { "docid": "3abd22763dc4fb72da2e275cca5b8b53", "score": "0.6885582", "text": "private function valida() {\n\n if (trim($this->request['DesdeFecha']) == '')\n $this->errores[] = \"Debe indicar una fecha de inicio\";\n if (trim($this->request['HastaFecha']) == '')\n $this->errores[] = \"Debe indicar una fecha de fin\";\n if (count($this->errores) == 0) {\n $fecha = new Fecha($this->request['DesdeFecha']);\n $this->desdeFecha = $fecha->getaaaammdd();\n $fecha = new Fecha($this->request['HastaFecha']);\n $this->hastaFecha = $fecha->getaaaammdd();\n unset($fecha);\n if ($this->desdeFecha > $this->hastaFecha)\n $this->errores[] = \"La fecha de fin debe ser igual o superior a la de inicio\";\n }\n\n return (count($this->errores) == 0);\n }", "title": "" }, { "docid": "320a5cbb3ec41488a13f2dc2d53c892d", "score": "0.68313146", "text": "function checkDataEN($dataRecebida){ \r\n if(strpos($dataRecebida, '-') === false) {\r\n return false;\r\n\r\n }else{\r\n $dataExplode = explode(\"-\", $dataRecebida);\r\n return checkdate($dataExplode[1], $dataExplode[2], $dataExplode[0]); // int $month , int $day , int $year \r\n }\r\n}", "title": "" }, { "docid": "3f3198b34dfa80cd7f7b47dde5420f90", "score": "0.6801771", "text": "function _data_check() {\n\t\t$this->form_validation->set_rules('absent_date_1', 'Tanggal Awal Izin', 'trim|required');\n//\t\t$this->form_validation->set_rules('saldo_cuti', 'Saldo Cuti', 'is_numeric_no_zero');\n\t}", "title": "" }, { "docid": "a988ac8c872cf4b761fb346aa55d14eb", "score": "0.6698922", "text": "function ValidaData($data){\n // data é menor que 8\n if ( strlen($data) < 8){\n return false;\n }else{\n // verifica se a data possui\n // a barra (/) de separação\n if(strpos($data, \"/\") !== FALSE){\n //\n $partes = explode(\"/\", $data);\n // pega o dia da data\n $dia = $partes[0];\n // pega o mês da data\n $mes = $partes[1];\n // prevenindo Notice: Undefined offset: 2\n // caso informe data com uma única barra (/)\n $ano = isset($partes[2]) ? $partes[2] : 0;\n \n if (strlen($ano) < 4) {\n return false;\n } else {\n // verifica se a data é válida\n if (checkdate($mes, $dia, $ano)) {\n return true;\n } else {\n return false;\n }\n }\n }else{\n return false;\n }\n }\n}", "title": "" }, { "docid": "8af6c8e980964b715b88b196b32255b4", "score": "0.65357316", "text": "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "c962eb3427523f1f75df87d25ccf8d1c", "score": "0.6464992", "text": "function isDataValid()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "de90e906b00503acb0aedfe20f700ed7", "score": "0.6431561", "text": "private function Valida_Dados(&$MsgErro){\r\n\t //print_r($this);\r\n\t\tif (!(is_numeric($this->SQ_Profissional) && (int)$this->SQ_Profissional > 0)){\r\n\t\t\t$MsgErro = 'Sequencial Profissional inválido';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t$data = explode('/', $this->DT_Ini_Escala);\r\n\t\tif ($this->DT_Ini_Escala == '' || !checkdate($data[1], $data[0], $data[2])){\r\n\t\t\t$MsgErro = 'Data de Inicio da Escala inválida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->DT_Fim_Escala <> '' && $this->DT_Fim_Escala <> '00/00/0000'){\r\n\t\t\t$data = explode('/', $this->DT_Fim_Escala);\r\n\t\t\tif (!checkdate($data[1], $data[0], $data[2])){\r\n\t\t\t\t$MsgErro = 'Data Final da Escala inválida';\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\telseif (strtotime(implode('-', array_reverse(explode('/',$this->DT_Fim_Escala)))) <= \r\n\t\t\t\t\tstrtotime(implode('-', array_reverse(explode('/',$this->DT_Ini_Escala))))){\r\n\t\t\t\t$MsgErro = 'Data de Fim deve ser maior que Inicio';\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\t\r\n\t\tif (!(is_numeric($this->Dia_Semana) && (int)$this->Dia_Semana > 0 && (int)$this->Dia_Semana < 8 )){\r\n\t\t\t$MsgErro = 'Dia da Semana inválido';\r\n\t\t return FALSE;\r\n\t\t}\r\n\t\t\r\n\t\tif (!(is_numeric($this->Intervalo) && (int)$this->Intervalo < 21)){\r\n\t\t\t$MsgErro = 'Intervalo Atendimento invalido - nao numerico ou muito grande - deve ser menor que 25 minutos';\r\n\t\t return FALSE;\r\n\t\t}\r\n\t\tif (!(is_numeric($this->Duracao) && (int)$this->Duracao > 0 && (int)$this->Duracao < 120 )){\r\n\t\t\t$MsgErro = 'Duração da Sessão invalida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\t//echo $this->HR_Ini_Turno1;\r\n\t\tif (!isTime($this->HR_Ini_Turno1,true,false)){\r\n\t\t\t$MsgErro = 'Hora Inicio Turno 1 inválida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\tif (!isTime($this->HR_Fim_Turno1,true,false)){\r\n\t\t\t$MsgErro = 'Hora Fim Turno 1 inválida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->HR_Fim_Turno1 <= $this->HR_Ini_Turno1){\r\n\t\t\t$MsgErro = 'Data de Fim deve ser maior que Inicio';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n/*\t\t\r\n\t\tif (!isTime($this->HR_Ini_Turno2,true,false)){\r\n\t\t\t$MsgErro = 'Hora Inicio Turno 2 inválida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\tif (!isTime($this->HR_Fim_Turno2,true,false)){\r\n\t\t\t$MsgErro = 'Hora Fim Turno 2 inválida';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n*/\t\t\t\r\n\t\tif ($this->HR_Fim_Turno2 < $this->HR_Ini_Turno2){\r\n\t\t\t$MsgErro = 'Data de Fim turno 2 deve ser maior que Inicio';\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "2f31d711bd4196a5368dab681892b811", "score": "0.6377685", "text": "public function checkData($data) {\n \n $componentParams = JComponentHelper::getParams('com_maratonregister');\n $marathon_datetime = time();\n $config_marathon_datetime = date_parse($componentParams->get('maraton_date','2013-10-13'));\n if (is_array($config_marathon_datetime) ) {\n $marathon_datetime = mktime (\n 0,\n 0,\n 0,\n $config_marathon_datetime['month'],\n $config_marathon_datetime['day'],\n $config_marathon_datetime['year']);\n }\n \n foreach ($data as $key=>$value) {\n if (!is_array($value))\n $data[$key]= preg_replace('/[ ]+/',' ',trim ($value));\n }\n \n $datetime = $this->getDateTime($data['date_of_birth']);\n $data['date_of_birth'] = $this->parseDate($data['date_of_birth']);\n \n if ($data['type_of_check'] != 'fidal' )\n $data['num_tes'] = '';\n if ($data['type_of_check'] != 'other_ass') {\n $data['other_ass_name']='';\n $data['other_num_tes']='';\n }\n if ($data['type_of_check'] != 'group_fidal')\n unset($data['member_num_tes']);\n \n if ($id > 0) {\n $this->errors['first_name']=array(\n 'message'=>'Sei già registrato alla '.JComponentHelper::getParams('com_maratonregister')->get('maraton_name','Maratonina dei borghi di Pordenone').', contatta lo staff per eventuali problemi'\n );\n }\n if ($data['num_tes'] != '') {\n if (!preg_match('/^[a-zA-Z0-9]{8}$/',$data['num_tes']))\n $errors['num_tes']=array(\n 'message'=>'Il numero tessera è errato'\n ); \n } else if ($data['other_num_tes'] != '') {\n if ($data['other_ass_name'] == '')\n $errors['other_ass_name']=array(\n 'message'=>'Il nome dell\\'associazione è richiesto'\n );\n } else if ( key_exists('member_num_tes', $data) ) {\n if ( !is_array($data['member_num_tes']) )\n {\n $errors['group_fidal_container']=array(\n 'message'=>'Dati del gruppo non validi'\n ); \n }\n \n if (sizeof($data['member_num_tes']) <1) {\n $errors['group_fidal_container']=array(\n 'message'=>'Dev\\'esserci almeno un membro nel gruppo'\n ); \n }\n \n if ($data['first_name'] == '')\n $errors['first_name']=array(\n 'message'=>'Il nome è richiesto'\n );\n else if (strlen($data['first_name'])>50)\n $errors['first_name']=array(\n 'message'=>'Il nome può avere al massimo 50 caratteri'\n );\n if ($data['last_name'] == '')\n $errors['last_name']=array(\n 'message'=>'Il cognome è richiesto'\n );\n else if (strlen($data['last_name'])>50)\n $errors['last_name']=array(\n 'message'=>'Il cognome può avere al massimo 50 caratteri'\n );\n \n if ($data['phone'] == '')\n $errors['phone']=array(\n 'message'=>'Il telefono è richiesto'\n );\n else if (!preg_match('/^[ \\+0-9]+$/', $data['phone']))\n $errors['phone']=array(\n 'message'=>'Il telefono può contenere numeri, spazi e +'\n );\n \n if ($data['payment_type'] == '')\n $errors['paypal']=array(\n 'message'=>'La modalità di pagamento è richiesta'\n );\n if ($data['email'] != '') {\n if (!preg_match('/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/', $data['email']))\n $errors['email']=array(\n 'message'=>'La mail non è valida'\n ); \n }\n \n if(!key_exists('group_fidal_container', $errors)) {\n foreach($data['member_num_tes'] as $key=>$value) {\n if (!preg_match('/^[a-zA-Z0-9]{8}$/', $value)) {\n $errors['group_fidal_container']=array(\n 'message'=>'Il numero di tessera '.$value.'non è valido.'\n );\n }\n $member_data = $data;\n $member_data['num_tes']=$value;\n \n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query\n ->select('COUNT(id)')\n ->from('#__atlete')\n ->where('removed <> 1 AND id = '. $db->Quote($this->generateKey($member_data)));\n $db->setQuery($query);\n $db->query();\n $id = intval($db->loadResult());\n if ($id > 0) {\n $errors['group_fidal_container']=array(\n 'message'=>'L\\'atleta con tessera numero '.$value.' risulta già registrato.'\n );\n }\n \n }\n }\n } else {\n if ($data['first_name'] == '')\n $errors['first_name']=array(\n 'message'=>'Il nome è richiesto'\n );\n else if (strlen($data['first_name'])>50)\n $errors['first_name']=array(\n 'message'=>'Il nome può avere al massimo 50 caratteri'\n );\n if ($data['last_name'] == '')\n $errors['last_name']=array(\n 'message'=>'Il cognome è richiesto'\n );\n else if (strlen($data['last_name'])>50)\n $errors['last_name']=array(\n 'message'=>'Il cognome può avere al massimo 50 caratteri'\n );\n if ($data['sex'] == '')\n $errors['female']=array(\n 'message'=>'Il sesso è richiesto'\n );\n if ($data['citizenship'] == '')\n $errors['citizenship']=array(\n 'message'=>'La cittadinanza è richiesta'\n );\n else if (strlen($data['citizenship'])>50)\n $errors['citizenship']=array(\n 'message'=>'La cittadinanaza può avere al massimo 50 caratteri'\n );\n if ($data['address'] == '')\n $errors['address']=array(\n 'message'=>'La via è richiesta'\n );\n else if (strlen($data['address'])>50)\n $errors['address']=array(\n 'message'=>'L\\'indirizzo può avere al massimo 50 caratteri'\n );\n if ($data['zip'] == '')\n $errors['zip']=array(\n 'message'=>'Il CAP è richiesto'\n );\n else if (!preg_match('/^[0-9]{5}$/', $data['zip']))\n $errors['zip']=array(\n 'message'=>'Il CAP è errato'\n );\n if ($data['city'] == '')\n $errors['city']=array(\n 'message'=>'La città è richiesta'\n );\n else if (strlen($data['city'])>50)\n $errors['city']=array(\n 'message'=>'La città può avere al massimo 50 caratteri'\n );\n if ($data['phone'] == '')\n $errors['phone']=array(\n 'message'=>'Il telefono è richiesto'\n );\n else if (!preg_match('/^[ \\+0-9]+$/', $data['phone']))\n $errors['phone']=array(\n 'message'=>'Il telefono può contenere numeri, spazi e +'\n );\n if ($data['medical_certificate'] == '' && sizeof($_FILES) ==0)\n $errors['medical_certificate']=array(\n 'message'=>'Il certificato medico è richiesto'\n );\n }\n if ( !key_exists('member_num_tes', $data) ) {\n if ( $data['date_of_birth'] == '' )\n $errors['date_of_birth']=array(\n 'message'=>'La data di nascita è richiesta'\n );\n else if (\n $data['type_of_check'] == 'fidal' &&\n $datetime > $marathon_datetime - 18 * 31556926 \n )\n $errors['date_of_birth']=array(\n 'message'=>'Devi avere almeno 18 anni al '.strftime('%d/%m/%Y',$marathon_datetime)\n );\n else if (\n $data['type_of_check'] != 'fidal' &&\n $datetime > $marathon_datetime - 23 * 31556926 \n )\n $errors['date_of_birth']=array(\n 'message'=>'Devi avere almeno 23 anni al '.strftime('%d/%m/%Y',$marathon_datetime)\n );\n }\n if ($data['payment_type'] == '')\n $errors['paypal']=array(\n 'message'=>'La modalità di pagamento è richiesta'\n );\n if ($data['email'] != '') {\n if (!preg_match('/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/', $data['email']))\n $errors['email']=array(\n 'message'=>'La mail non è valida'\n ); \n }\n \n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query\n ->select('COUNT(id)')\n ->from('#__atlete')\n ->where('removed <> 1 AND id = '. $db->Quote($this->generateKey($data)));\n $db->setQuery($query);\n $db->query();\n $id = intval($db->loadResult());\n if ($id > 0) {\n $errors['first_name']=array(\n 'message'=>'Atleta già registrato'\n );\n }\n \n if (sizeof($errors) ==0) {\n $this->data = $data;\n }\n $this->errors = $errors;\n }", "title": "" }, { "docid": "5aab8b42f6e69d6fef362629561e3b63", "score": "0.6369701", "text": "function valida_data($data)\n {\n if ($data[2] == \"\\\\\" || $data[5] == \"\\\\\")\n return false;\n\n $dia = intval(substr($data, 0, 2));\n $mes = intval(substr($data, 3, 4));\n $ano = intval(substr($data, 6));\n\n if (!checkdate($mes, $dia, $ano))\n return false;\n\n return $ano . \"-\" . $mes . \"-\" . $dia;\n }", "title": "" }, { "docid": "2ca14debbedccb232ab0d07f6f0fda68", "score": "0.63361716", "text": "function validBuletinDataEliberarii($p_data)\n{\n if (preg_match(\"^\\d{2}/\\d{2}/\\d{4}^\", $p_data))\n {\n //Extract date into array\n $date_array = explode('/', $p_data);\n\n //If it is not a date\n if(! checkdate($date_array[1], $date_array[0], $date_array[2]))\n {\n return false;\n }\n }\n //If not in dd/mm/yyyy format\n else\n {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "c95175cd468cd42067f2810e8c31d732", "score": "0.6301633", "text": "function valida_data($data){\n if($data[2] == \"\\\\\" || $data[5] == \"\\\\\")\n return false;\n\n $dia = intval(substr($data, 0, 2));\n $mes = intval(substr($data, 3, 4));\n $ano = intval(substr($data, 6));\n\n if(!checkdate($mes, $dia, $ano))\n return false;\n\n return $ano . \"-\" . $mes . \"-\" . $dia;\n}", "title": "" }, { "docid": "8bd129ddd57c77d7c21318eefe3cea36", "score": "0.62921095", "text": "protected function validaDados() {\r\n\r\n\t\tif (!$this->dadosform[\"nomecompleto\"]) $this->erro_campos[] = 'nomecompleto';\r\n\r\n if ($this->dadosform[\"datanascimento\"] && !checkdate(substr($this->dadosform[\"datanascimento\"], 3, 2), substr($this->dadosform[\"datanascimento\"], 0, 2), substr($this->dadosform[\"datanascimento\"], 6, 4))) $this->erro_campos[] = \"datanascimento\";\r\n\r\n\t\tif ($this->dadosform[\"falecido\"] && !checkdate(substr($this->dadosform[\"datafalecimento\"], 3, 2), substr($this->dadosform[\"datafalecimento\"], 0, 2), substr($this->dadosform[\"datafalecimento\"], 6, 4))) $this->erro_campos[] = \"falecimento\";\r\n\r\n\t\t//if (!$this->dadosform[\"biografia\"]) $this->erro_campos[] = \"biografia\";\r\n\r\n\t\tif (!$this->dadosform[\"email\"]) $this->erro_campos[] = \"email\";\r\n\r\n\t\tif (!$this->dadosform[\"codpais\"]) $this->erro_campos[] = \"pais\";\r\n\r\n\t\tif ($this->dadosform[\"codpais\"] == ConfigGerenciadorVO::getCodPaisBrasil()) {\r\n\t\t\tif (!$this->dadosform[\"codestado\"]) $this->erro_campos[] = \"estado\";\r\n\t\t\tif (!$this->dadosform[\"codcidade\"]) $this->erro_campos[] = \"codcidade\";\r\n\t\t} elseif (!$this->dadosform[\"cidade\"]) $this->erro_campos[] = \"cidade\";\r\n\r\n\t\tif ($this->dadosform[\"email\"]) {\r\n\t\t\tif (!Util::checkEmail($this->dadosform[\"email\"])) {\r\n\t\t\t\t$this->erro_campos[] = \"email\";\r\n\t\t\t\t$this->erro_mensagens[] = \"E-mail está em formato incorreto\";\r\n\t\t\t} elseif ($this->autordao->existeEmail($this->dadosform[\"email\"], 2, $this->dadosform[\"codautor\"])) {\r\n\t\t\t\t$this->erro_campos[] = \"email\";\r\n\t\t\t\t$this->erro_mensagens[] = \"E-mail já existente\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->dadosform[\"cpf\"]) {\r\n\t\t\tif ($this->autordao->existeCpf($this->dadosform[\"cpf\"], $this->dadosform[\"codautor\"])) {\r\n\t\t\t\t$this->erro_campos[] = \"cpf\";\r\n\t\t\t\t$this->erro_mensagens[] = \"CPF já existente\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\tif (is_uploaded_file($this->arquivos[\"imagem\"][\"tmp_name\"])) {\r\n\t\t\tif ($this->arquivos[\"imagem\"][\"size\"] > 2200000) {\r\n\t\t\t\t$this->erro_mensagens[] = \"Imagem ilustrativa está com mais de 2MB\";\r\n\t\t\t\t$this->erro_campos[] = \"imagem\";\r\n\t\t\t}\r\n\t\t\t$extensao = strtolower(Util::getExtensaoArquivo($this->arquivos[\"imagem\"][\"name\"]));\r\n\t\t\tif (($extensao != 'jpg') && ($extensao != 'jpeg') && ($extensao != 'gif') && ($extensao != 'png')) {\r\n\t\t\t\t$this->erro_mensagens[] = \"Apenas enviar imagem no formato jpg, gif ou png\";\r\n\t\t\t\t$this->erro_campos[] = \"imagem\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\r\n\t\tif (!$this->dadosform[\"codautor\"]) {\r\n\t\t\tif (!$this->dadosform[\"tipo_autor\"]) {\r\n\t\t\t\t$this->erro_campos[] = \"tipo_autor\";\r\n\t\t\t}\r\n\t\t\tif (!$this->dadosform[\"finalendereco\"]) {\r\n\t\t\t\t$this->erro_campos[] = \"finalendereco\";\r\n\t\t\t} elseif (!eregi(\"^[a-zA-Z0-9]+$\", $this->dadosform[\"finalendereco\"])) {\r\n\t\t\t\t$this->erro_mensagens[] = \"Final do endereço só pode conter letras e números\";\r\n\t\t\t\t$this->erro_campos[] = \"finalendereco\";\r\n\t\t\t} elseif ($this->autordao->existeFinalEndereco($this->dadosform[\"finalendereco\"], $this->dadosform[\"codautor\"])) {\r\n\t\t\t\t$this->erro_mensagens[] = \"Final do endereço já existente\";\r\n\t\t\t\t$this->erro_campos[] = \"finalendereco\";\r\n\t\t\t}\r\n\t\t\tif (!$this->dadosform[\"senha\"] && !$this->dadosform[\"falecido\"] && $this->dadosform[\"tipo_autor\"] == 2) {\r\n\t\t\t\t$this->erro_campos[] = \"senha\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($this->dadosform[\"finalendereco\"] && ($_SESSION['logado_dados']['nivel'] >= 7)) {\r\n\t\t\t\tif ($this->autordao->existeFinalEndereco($this->dadosform[\"finalendereco\"], $this->dadosform[\"codautor\"], 2)) {\r\n\t\t\t\t\t$this->erro_mensagens[] = \"Final do endereço já existente\";\r\n\t\t\t\t\t$this->erro_campos[] = \"finalendereco\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->dadosform[\"tipo_autor\"] == 2 && !$this->dadosform[\"codautor\"]) {\r\n\t if (!$this->dadosform[\"falecido\"] && $this->dadosform[\"senha\"] != $this->dadosform[\"senha2\"]) {\r\n\t\t\t\t$this->erro_mensagens[] = \"A Senha está diferente da Repetição\";\r\n\t\t\t\t$this->erro_campos[] = \"senha\";\r\n\t\t\t}\r\n\t if ($this->dadosform[\"senha\"] && strlen($this->dadosform[\"senha\"]) < 6 && !$this->dadosform[\"falecido\"]) {\r\n\t\t\t\t$this->erro_mensagens[] = \"A Senha precisa ter no mínimo 6 caracteres\";\r\n\t\t\t\t$this->erro_campos[] = \"senha\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (count($this->erro_campos)) {\r\n\t\t\tthrow new Exception(implode(\"<br />\\n\", $this->erro_mensagens));\r\n\t\t}\r\n }", "title": "" }, { "docid": "61b0a0de6186213d6ca3c8d1c5c53a8e", "score": "0.6267991", "text": "function validBuletinDataEliberarii($p_data)\n{\n //If in dd/mm/yyyy format\n if (preg_match(\"^\\d{2}/\\d{2}/\\d{4}^\", $p_data))\n {\n //Extract date into array\n $date_array = explode('/', $p_data);\n\n //If it is not a date\n if(! checkdate($date_array[1], $date_array[0], $date_array[2]))\n {\n return false;\n }\n }\n //If not in dd/mm/yyyy format\n else\n {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "f326dec099799032df0e04c9a5a6cf18", "score": "0.6218747", "text": "public function validar_fecha($fecha){\r\n # validamos que la fecha cuente con la cantidad de caracteres necesarios\r\n if (strlen($fecha) == 10) {\r\n // convertimos una fecha en un array para recorrerlo\r\n str_split($fecha);\r\n\r\n // Validamos que en el elemento 4 y 7 el valor sea un guion, de lo contrario la fecha no es valida\r\n if ($fecha[4] != \"-\") {\r\n return 0;\r\n } else {\r\n if ($fecha[7] != \"-\") {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n \r\n }\r\n }else {\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "ac05ba72b93bc493659a4335e22644d4", "score": "0.6205064", "text": "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "title": "" }, { "docid": "3f97874efc9d5ccdccb56efbabcb2040", "score": "0.61872196", "text": "function __validFecha($fecha){\n $test_arr = explode('/', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[0], $test_arr[2])) {//MES / DIA / YEAR\n return true;\n }\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "54753ff35a2285ed7bc4091bc65e9519", "score": "0.6162965", "text": "public function dateValidation() {\n $dobs = $this->request->getPost('AdobOne');\n $adut = $this->request->getPost('ddlAdult', 'int');\n $flag = false;\n for ($i = 0; $i < $adut; $i++) {\n if (!isset($dobs[$i]) || $dobs[$i] == '')\n $flag = true;\n }\n if ($flag == false)\n return false; // field is valid\n return 'Please Enter Date of Birth'; // field is not valid\n }", "title": "" }, { "docid": "023ba836f0a9db28689a09dc2177fcb5", "score": "0.6158448", "text": "function ValidarDatos($campo)\n {\n\t\t$CadenasProhibidas = array(\"Content-Type:\",\n\t\t//evita email injection\n\t\t\"MIME-Version:\", \"Content-Transfer-Encoding:\",\"Return-path:\",\"Subject:\",\"From:\",\"Envelope-to:\",\"To:\",\"bcc:\",\"cc:\",\n\t\t\"UNION\",\n\t\t// evita sql injection\n\t\t\"DELETE\",\"DROP\",\"SELECT\",\"INSERT\",\"UPDATE\",\"CREATE\",\"TRUNCATE\",\"ALTER\",\"INTO\",\"DISTINCT\",\"GROUP BY\",\"WHERE\",\"RENAME\",\"DEFINE\",\"UNDEFINE\",\"PROMPT\",\"ACCEPT\",\"VIEW\",\"COUNT\",\"UNION\",\"HAVING\",\"'\",'\"',\"{\",\"}\",\"[\",\"]\",\n\t\t// evita introducir direcciones web\n\t\t\"HOTMAIL\",\"WWW\",\".COM\",\"@\",\"W W W\",\". c o m\",\"http://\",\n\t\t//variables y comodines\n\t\t\"$\", \"&\",\"*\",\"'\",\"&nbsp;\",\"%\");\n\t\t//Comprobamos que entre los datos no se encuentre alguna de\n\t\t//las cadenas del array. Si se encuentra alguna cadena se\n\t\t//dirige a la pagina anterior\n\t\tforeach($CadenasProhibidas as $valor){\n \tif(strpos(strtolower($campo), strtolower($valor)) !== false)\n\t\t\t{\n echo(\"<script>\n\t\t\t\talert('Datos Incorrectos!!!');\n ;</script>\");\n exit;\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "f391a79a8c2faffa32997ab744057957", "score": "0.6101141", "text": "public function checkData()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "377d8d8e64f1f26786444c3c7dff9662", "score": "0.6098129", "text": "function jevalidny($databazaValidacia)\n\t{\n\t\tglobal $databaza;\n\t\tglobal $STDERR;\n\t\t$surovnake = array_diff_key($databazaValidacia, $databaza); //daju sa vsetky tabulky vlozit do databazovej struktury\n\t\tif(!(empty($surovnake))) //ak sa tam prvky nezmestia vypisem chybu\n\t\t{\n\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\tfclose($STDERR);\n\t\t\texit(91);\n\t\t}\n\t\tforeach($databazaValidacia as $tabulkaValidacia)\n\t\t{\n\t\t\t$menotabulkyV = preg_replace(\"/CREATE TABLE /\", \"\", $tabulkaValidacia[0]); //istim si meno tabulky\n\t\t\t$menotabulkyV = preg_replace(\"/\\($/\", \"\", $menotabulkyV);\n\t\t\tforeach($tabulkaValidacia as $riadokValidacia)\n\t\t\t{\n\t\t\t\tif(preg_match('/CREATE TABLE /',$riadokValidacia) or preg_match('/\\);$/',$riadokValidacia) or preg_match('/ PRIMARY KEY.*$/',$riadokValidacia))\n\t\t\t\t{//ak to neni cudzi kluc\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$polozka = preg_replace(\"/ BIT.*/\", \"\", $riadokValidacia); //ziskam si meno cudzieho kluca\n\t\t\t\t$polozka = preg_replace(\"/ INT.*/\", \"\", $polozka);\n\t\t\t\t$polozka = preg_replace(\"/ FLOAT.*/\", \"\", $polozka);\n\t\t\t\t$polozka = preg_replace(\"/ NVARCHAR.*/\", \"\", $polozka);\n\t\t\t\t$polozka = preg_replace(\"/ NTEXT.*/\", \"\", $polozka);\n\t\t\t\tif(preg_match('/BIT/',$riadokValidacia)) //zistujem ci datovy ak je BIT mozem vlozit do druhej tabulky ako ostatne\n\t\t\t\t{\n\t\t\t\t\tif(!(in_array($polozka . \" NTEXT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NTEXT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(in_array($polozka . \" NVARCHAR,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NVARCHAR\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!(in_array($polozka . \" FLOAT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" FLOAT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif(!(in_array($polozka . \" INT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" INT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(!(in_array($polozka . \" BIT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" BIT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\t\t\t\t\t\t\t\tfclose($STDERR);\n\t\t\t\t\t\t\t\t\t\texit(91);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(preg_match('/INT/',$riadokValidacia)) //zistujem ci mozem vlozit INT do druhej tabulky, moze mat hocico okrem BIT, do BIT nemozem vlozit\n\t\t\t\t{\n\t\t\t\t\tif(!(in_array($polozka . \" NTEXT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NTEXT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(in_array($polozka . \" NVARCHAR,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NVARCHAR\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!(in_array($polozka . \" FLOAT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" FLOAT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif(!(in_array($polozka . \" INT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" INT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\t\t\t\t\t\t\tfclose($STDERR);\n\t\t\t\t\t\t\t\t\texit(91);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(preg_match('/FLOAT/',$riadokValidacia)) //nemozem vlozit do bit a int\n\t\t\t\t{\n\t\t\t\t\tif(!(in_array($polozka . \" NTEXT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NTEXT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(in_array($polozka . \" NVARCHAR,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NVARCHAR\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!(in_array($polozka . \" FLOAT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" FLOAT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\t\t\t\t\t\tfclose($STDERR);\n\t\t\t\t\t\t\t\texit(91);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(preg_match('/NVARCHAR/',$riadokValidacia)) //nemozem vlzit do bit int a float\n\t\t\t\t{\n\t\t\t\t\tif(!(in_array($polozka . \" NTEXT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NTEXT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(in_array($polozka . \" NVARCHAR,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NVARCHAR\", $databaza[$menotabulkyV])))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\t\t\t\t\tfclose($STDERR);\n\t\t\t\t\t\t\texit(91);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(preg_match('/NTEXT/',$riadokValidacia)) //mozem vlozit iba do ntext\n\t\t\t\t{\n\t\t\t\t\tif(!(in_array($polozka . \" NTEXT,\", $databaza[$menotabulkyV])) and !(in_array($polozka . \" NTEXT\", $databaza[$menotabulkyV])))\n\t\t\t\t\t{\t\n\t\t\t\t\t\tfwrite($STDERR, \"Subor je navalidny! \\n\");\n\t\t\t\t\t\tfclose($STDERR);\n\t\t\t\t\t\texit(91);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8e647ab0eebaf70ebf3e5aed9034e567", "score": "0.60920656", "text": "public function cadastro_prova_falha_formato_data_request()\n {\n $response = $this->postJson('/api/prova',[\n 'data' => (new \\DateTime('now'))->format('Y-m-d').' abs',\n 'tipo' => 3\n ]);\n \n $response->assertStatus(500);\n $this->assertFalse($response['success']);\n \n }", "title": "" }, { "docid": "8986858902552e102cc159efddb748e5", "score": "0.60915697", "text": "public function check_data();", "title": "" }, { "docid": "2344f11fbe343c75f294feca1c37c65e", "score": "0.6050244", "text": "function validarAperturaCaja($idEmpresa, $fecha, $idCaja) {\n\t$queryConfig400 = sprintf(\"SELECT * FROM pg_configuracion_empresa config_emp\n\t\tINNER JOIN pg_configuracion config ON (config_emp.id_configuracion = config.id_configuracion)\n\tWHERE config.id_configuracion = 400 AND config_emp.status = 1 AND config_emp.id_empresa = %s;\",\n\t\tvalTpDato($idEmpresa, \"int\"));\n\t$rsConfig400 = mysql_query($queryConfig400);\n\tif (!$rsConfig400) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE_);\n\t$rowConfig400 = mysql_fetch_assoc($rsConfig400);\n\t\n\tif ($rowConfig400['valor'] == 1) { // 0 = Caja Propia, 1 = Caja Empresa Principal\n\t\t$queryEmpresa = sprintf(\"SELECT suc.id_empresa_padre FROM pg_empresa suc WHERE suc.id_empresa = %s;\",\n\t\t\tvalTpDato($idEmpresa, \"int\"));\n\t\t$rsEmpresa = mysql_query($queryEmpresa);\n\t\tif (!$rsEmpresa) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE_);\n\t\t$rowEmpresa = mysql_fetch_assoc($rsEmpresa);\n\t\t\n\t\t$idEmpresa = ($rowEmpresa['id_empresa_padre'] > 0) ? $rowEmpresa['id_empresa_padre'] : $idEmpresa;\n\t}\n\t\n\t//VERIFICA SI LA CAJA TIENE CIERRE - Verifica alguna caja abierta con fecha diferente a la actual.\n\t$queryCierreCaja = sprintf(\"\n\tSELECT fechaAperturaCaja FROM an_apertura\n\tWHERE statusAperturaCaja IN (%s)\n\t\tAND fechaAperturaCaja NOT LIKE %s\n\t\tAND idCaja = %s\n\t\tAND id_empresa = %s\n\t\t\n\tUNION\n\t\n\tSELECT fechaAperturaCaja FROM sa_iv_apertura\n\tWHERE statusAperturaCaja IN (%s)\n\t\tAND fechaAperturaCaja NOT LIKE %s\n\t\tAND idCaja = %s\n\t\tAND id_empresa = %s;\",\n\t\tvalTpDato(\"1,2\", \"campo\"), // 0 = CERRADA, 1 = ABIERTA, 2 = CERRADA PARCIAL\n\t\tvalTpDato(date(\"Y-m-d\", strtotime($fecha)), \"date\"),\n\t\tvalTpDato($idCaja, \"int\"),\n\t\tvalTpDato($idEmpresa, \"int\"),\n\t\tvalTpDato(\"1,2\", \"campo\"), // 0 = CERRADA, 1 = ABIERTA, 2 = CERRADA PARCIAL\n\t\tvalTpDato(date(\"Y-m-d\", strtotime($fecha)), \"date\"),\n\t\tvalTpDato($idCaja, \"int\"),\n\t\tvalTpDato($idEmpresa, \"int\"));\n\t$rsCierreCaja = mysql_query($queryCierreCaja);\n\tif (!$rsCierreCaja) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE_);\n\t$totalRowsCierreCaja = mysql_num_rows($rsCierreCaja);\n\t$rowCierreCaja = mysql_fetch_array($rsCierreCaja);\n\t\n\tif ($totalRowsCierreCaja > 0) {\n\t\treturn array(false, \"Debe cerrar la caja del dia: \".date(spanDateFormat, strtotime($rowCierreCaja['fechaAperturaCaja'])));\n\t} else {\n\t\t// VERIFICA SI LA CAJA TIENE APERTURA\n\t\t$queryVerificarApertura = sprintf(\"\n\t\tSELECT * FROM an_apertura\n\t\tWHERE statusAperturaCaja IN (%s)\n\t\t\tAND fechaAperturaCaja LIKE %s\n\t\t\tAND idCaja = %s\n\t\t\tAND id_empresa = %s\n\t\t\t\n\t\tUNION\n\t\t\n\t\tSELECT * FROM sa_iv_apertura\n\t\tWHERE statusAperturaCaja IN (%s)\n\t\t\tAND fechaAperturaCaja LIKE %s\n\t\t\tAND idCaja = %s\n\t\t\tAND id_empresa = %s;\",\n\t\t\tvalTpDato(\"1,2\", \"campo\"), // 0 = CERRADA, 1 = ABIERTA, 2 = CERRADA PARCIAL\n\t\t\tvalTpDato(date(\"Y-m-d\", strtotime($fecha)), \"date\"),\n\t\t\tvalTpDato($idCaja, \"int\"),\n\t\t\tvalTpDato($idEmpresa, \"int\"),\n\t\t\tvalTpDato(\"1,2\", \"campo\"), // 0 = CERRADA, 1 = ABIERTA, 2 = CERRADA PARCIAL\n\t\t\tvalTpDato(date(\"Y-m-d\", strtotime($fecha)), \"date\"),\n\t\t\tvalTpDato($idCaja, \"int\"),\n\t\t\tvalTpDato($idEmpresa, \"int\"));\n\t\t$rsVerificarApertura = mysql_query($queryVerificarApertura);\n\t\tif (!$rsVerificarApertura) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE_);\n\t\t$totalRowsVerificarApertura = mysql_num_rows($rsVerificarApertura);\n\t\t\n\t\treturn ($totalRowsVerificarApertura > 0) ? array(true, \"\") : array(false, \"Esta caja no tiene apertura\");\n\t}\n}", "title": "" }, { "docid": "ca2b50e8cf799455642992ff6b455439", "score": "0.6044071", "text": "function checkDataBR($dataRecebida){ \r\n if(strpos($dataRecebida, '/') === false) {\r\n return false;\r\n\r\n }else{\r\n $dataExplode = explode(\"/\", $dataRecebida);\r\n return checkdate($dataExplode[1] ,$dataExplode[0] ,$dataExplode[2]); // int $month , int $day , int $year \r\n }\r\n}", "title": "" }, { "docid": "2a651a3d64fa37d5a412af0235f6ad86", "score": "0.6040789", "text": "private function validaDados($oDados) {\n\n /**\n * Quando alizamos os dados do registro 89 não temos as propriedades setadas abaixo.\n * Setamos elas com vazi para o php não lançar um warning ao montar o array de validações.\n */\n if ($oDados->tipo_registro == 89) {\n\n $oDados->aluno = $oDados->turma = $oDados->etapa = \"\";\n $this->validaDadosEscola( $oDados );\n }\n\n\n $iCodigo = !empty($oDados->codigo_aluno_escola) ? $oDados->codigo_aluno_escola : '';\n $dtNascimento = !empty($oDados->data_nascimento) ? $oDados->data_nascimento : '';\n\n $iTurmaInep = !empty($oDados->codigo_turma_inep) ? $oDados->codigo_turma_inep : '';\n $sTurma = !empty($oDados->turma) ? $oDados->turma : '';\n\n\n $aValidacoes = array( 89 => array( \"email_gestor_escolar\" => \"Email do gestor não informado.\"\n ,\"cargo_gestor_escolar\" => \"Cargo do gestor não foi informado.\"\n ,\"nome_gestor_escolar\" => \"Nome do gestor não informado.\"\n ,\"cpf_gestor_escolar\" => \"Cpf do gestor não informado.\"\n ,\"codigo_escola_inep\" => \"Escola não possui código INEP.\"\n ),\n 90 => array( \"codigo_turma_inep\" => \"Turma {$oDados->turma} - {$oDados->etapa} do aluno(a) {$oDados->aluno} está sem o código do INEP.\"\n ,\"codigo_aluno_inep\" => \"O(a) aluno(a) {$iCodigo} - {$oDados->aluno} ({$dtNascimento}) está sem o código do INEP.\"\n ,\"codigo_matricula_inep\" => \"O(a) aluno(a) {$iCodigo} - {$oDados->aluno} ({$dtNascimento}) não possui matrícula do INEP. Turma {$sTurma} INEP: {$iTurmaInep} \"\n ,\"codigo_modalidade\" => \"Modalidade não informada.\"\n ,\"codigo_etapa_censo\" => \"Etapa do censo da turma {$oDados->turma} - {$oDados->etapa} não informada.\"\n ),\n 91 => array( \"codigo_aluno_inep\" => \"O(a) aluno(a) {$iCodigo} - {$oDados->aluno} ({$dtNascimento}) está sem o código do INEP.\")\n );\n\n foreach ($aValidacoes[$oDados->tipo_registro] as $sCampoValidar => $sMensagem) {\n\n if (empty($oDados->{$sCampoValidar}) ) {\n \t$this->logErro($sMensagem, $oDados->tipo_registro);\n }\n }\n\n return !$this->lTemInconsistencia;\n }", "title": "" }, { "docid": "e6502d997c85c799bf92bfe18e3004ff", "score": "0.59957784", "text": "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t\t'identificacion_proveedor' => 5,\n\t\t\t\t\t\t\t\t'nro_factura' => 1,\n\t\t\t\t\t\t\t\t'fecha_emision' => 0,\n\t\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t\t'saldo' => 1,\n\t\t\t\t\t\t\t\t'comentarios' => 0,\n\t\t\t\t\t\t\t\t'id_user' => 1,\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "title": "" }, { "docid": "2483e01e047ab0fdd1afb452df632367", "score": "0.5993022", "text": "static function IsAValidDate($fecha) {\n\t\t$result = true;\n\t\tif (!CheckInt($fecha['dia'])) { $result = false; }\n\t\tif (!CheckInt($fecha['mes'])) { $result = false; }\n\t\tif (!CheckInt($fecha['ano'])) { $result = false; }\n\t\tif ($result) {\n\t\t\t$result = checkdate($fecha['mes'],$fecha['dia'],$fecha['ano']); // php function\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c04d79b830c5ec9e7a1e9448d295cca4", "score": "0.5990231", "text": "public static function esfechavalida($fecha) {\n if (strlen($fecha) !== 10)\n return false;\n \n // Primero verifica el patron\n if (preg_match(\"/^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/\", $fecha)) return false;\n \n // Mediante el delimitador \"/\" separa dia, mes y año\n $fecha = explode(\"/\", $fecha);\n $day = (int)$fecha[0];\n $month = (int)($fecha[1]);\n $year = (int)($fecha[2]);\n \n // Verifica que dia, mes, año, solo sean numeros\n $error = ( isNan($day) || isNan($month) || isNan($year) );\n \n // Lista de dias en los meses, por defecto no es año bisiesto\n $ListofDays = [31,28,31,30,31,30,31,31,30,31,30,31];\n if ( $month === 1 || $month > 2 )\n if ( $day > $ListofDays[$month-1] || $day < 0 || $ListofDays[$month-1] === 'undefined' )\n return false;\n \n // Detecta si es año bisiesto y asigna a febrero 29 dias\n if ( $month === 2 ) {\n $lyear = ( (!($year % 4) && $year % 100) || !($year % 400) );\n if ( $lyear === false && $day >= 29 )\n return false;\n if ( $lyear === true && $day > 29 )\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "63ff61348b1a884598764dec71bc8523", "score": "0.5988057", "text": "function _data_check() {\n\t\t$this->form_validation->set_rules('posisi', 'Employee Position', 'trim|required');\n\t}", "title": "" }, { "docid": "b32b6f876cc000aa9ce7294a3f7b8fc2", "score": "0.5987284", "text": "public static function validarFechaNac($fecha){\n $nacio = DateTime::createFromFormat('Y-m-d', $fecha);\n //Calculamos usando diff y la fecha actual\n $calculo = $nacio->diff(new DateTime());\n //Obtenemos la edad\n $edad = $calculo->y; \n if ($edad < 18) \n {\n //echo \"Usted es menor de edad. Su edad es: $edad\\n\";\n return false; \n }else{\n //echo \"Usted es mayor de edad. Su edad es: $edad\\n\";\n return true; \n }\n }", "title": "" }, { "docid": "dfb219c96cbb85cf899169657bb3945e", "score": "0.5980503", "text": "function validacion_fechas()\n\t{\n\t\tif(empty($_POST['vigencia_desde']) || empty($_POST['vigencia_hasta']))\n\t\t\treturn false;\n\n\t\t$datetime1 = new DateTime($_POST['vigencia_desde']);\n\t\t$datetime2 = new DateTime($_POST['vigencia_hasta']);\n\t\t$interval = $datetime1->diff($datetime2);\n\n\t\tif(!$interval->invert && ($interval->d>0 || $interval->m>0 || $interval->y>0))\n\t\t\treturn true;\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('validacion_fechas', 'La fecha Válida desde debe ser menor a la fecha Válida hasta.');\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1fe8c44b71c086a5a6de3b802f5d46a8", "score": "0.59791195", "text": "function validacion_existencias()\n\t{\n\t\t// Combina el arreglo de alianzas con su arreglo de existencias\n\t\t$alianzas_regalo_promocion=$this->combinar_arreglos($_POST['regaloAlianzas'],$_POST['cantidadRegalosAlianzas']);\n\n\t\tif($alianzas_regalo_promocion)\n\t\t{\n\t\t\t$errores='';\n\t\t\t$i=1;\n\t\t\tforeach ($alianzas_regalo_promocion as $k=>$v)\n\t\t\t{\n\t\t\t\t// Busca los folios disponibles\n\t\t\t\t$total_diponibles = $this->base->get_dato('count(usado)','alianzas_folios',array('alianzas_id'=>$k, 'usado'=>0));\n\t\t\t\t$existencia = $total_diponibles - $v;\n\n\t\t\t\tif($existencia<0)\n\t\t\t\t{\n\t\t\t\t\t$errores.='La cantidad disponible de folios para la alizanza de la fila '.$i. ' es '.$total_diponibles.'. ';\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\tif(empty($errores))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('validacion_existencias', $errores);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5cef88f4ba450669e5ab39fd82cb9451", "score": "0.59571636", "text": "function check_dataset($date_list, &$msg)\r\n{\r\n\tforeach($date_list as $value)\r\n\t{\r\n\t\tif (!strstr($value, \",\"))\r\n\t\t{\r\n\t\t\t$msg = \"Invalid data: One or more entries is not formatted correctly\" ;\r\n\t\t\treturn FALSE ;\r\n\t\t}\r\n\t\t$years = get_years($value) ;\r\n\t\t$birth = $years[\"birth\"] ;\r\n\t\t$death = $years[\"death\"] ;\r\n\t\tif ( ($birth < 1900) || ($birth > 2000) )\r\n\t\t{\r\n\t\t\t$msg = \"Invalid data: One or more birth years out of scope\" ;\r\n\t\t\treturn FALSE ;\r\n\t\t}\r\n\t\tif ( ($death < 1900) || ($death > 2000) )\r\n\t\t{\r\n\t\t\t$msg = \"Invalid data: One or more deatch years out of scope\" ;\r\n\t\t\treturn FALSE ;\r\n\t\t}\r\n\t\tif($birth > $death)\r\n\t\t{\r\n\t\t\t$msg = \"Invalid data: One or more birth years occur after a respective death year\" ;\r\n\t\t\treturn FALSE ;\r\n\t\t}\r\n\t}\r\n\treturn TRUE ;\r\n}", "title": "" }, { "docid": "37b97f60876a25da936bb206bba4c43d", "score": "0.5954678", "text": "public function alojamientoValidado() {\n $resultado = true;\n \n if ($this->error_nombre === \"\" &&\n $this->error_categoria === \"\" &&\n $this->error_cantidadHabitacionesInd === \"\" &&\n $this->error_cantidadHabitacionesDob === \"\" &&\n $this->error_ciudad === \"\" &&\n $this->error_regimen === \"\"&&\n $this->error_email === \"\" &&\n $this->error_precio === \"\"/*&&\n //$this->error_servicios === \"\" */\n \n ) {\n \n $resultado = true;\n } else {\n $resultado = false;\n }\n \n return $resultado;\n }", "title": "" }, { "docid": "d2231584b38ec772077a97f3fbcbd370", "score": "0.59436333", "text": "public function valid()\n\t{\n\t\t$this->data = $this->db->fetchAssoc($this->res);\n\n\t\treturn is_array($this->data);\n\t}", "title": "" }, { "docid": "ff831d14989ddf7826424a74c89a7953", "score": "0.59317124", "text": "private function validData ()\n {\n if (strlen($this->getStreetnumber()) <= 0 ||\n strlen($this->getPostcode()) < 6)\n return false;\n else\n return true;\n }", "title": "" }, { "docid": "d9f80ed9232507957cdfde1291beae97", "score": "0.5926361", "text": "static public function validuotiDokumenta(){\n return(TRUE);\n }", "title": "" }, { "docid": "db2084ade9d3f38b395017fb2a847f4e", "score": "0.59231377", "text": "public function possuiEstimativaValida() {\n\n $aWhere = array(\n \"pc53_solicitapai = {$this->iCodigoSolicitacao}\",\n \"pc10_solicitacaotipo = 4\",\n \"pc67_solicita is null\",\n );\n\n $oDaoSolicita = new cl_solicitavinculo();\n $sSqlVinculos = $oDaoSolicita->sql_query_filhas(null,\"pc53_solicitafilho\",null, implode(' and ', $aWhere));\n $oDaoSolicita->sql_record($sSqlVinculos);\n if ($oDaoSolicita->numrows > 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "86a3d88e55a05ae0280242af31765333", "score": "0.5917988", "text": "public function validarCadastro(){\n\t\t\n\t\t$valido = true;\n\n\t\tif(strlen($this->__get('nome')) < 3){\n\t\t\n\t\t\t$valido = false;\n\t\t}\n\t\t\n\t\tif(strlen($this->__get('email')) < 3){\n\t\t\n\t\t\t$valido = false;\n\t\t}\n\t\t\n\t\tif(strlen($this->__get('senha')) < 3){\n\t\t\n\t\t\t$valido = false;\n\t\t}\n\t\t\n\t\treturn $valido;\n\t}", "title": "" }, { "docid": "e3db3709bb1d7e7e061e36858f8e34f4", "score": "0.5867114", "text": "public function validarPostulacion(){\n \t$bandera =true;\n \tif($this['titulo']->getValue() == null || $this['titulo']->getValue() == ''){\n \t\t$bandera = false;\n \t}\n \t//echo 'titulo'.$bandera;\n \t/*\n \t if($this['archivos']['resumen']['ruta']->getValue() == null\n \t\t|| $this['archivos']['definicion_problema_y_solucion']['ruta']->getValue() == null\n \t\t|| $this['archivos']['marco_teorico']['ruta']->getValue() == null\n \t\t|| $this['archivos']['bibliografia']['ruta']->getValue() == null\n \t\t|| $this['archivos']['objetivos']['ruta']->getValue() == null\n \t\t|| $this['archivos']['metodologia']['ruta']->getValue() == null\n \t\t|| $this['archivos']['plan_de_trabajo']['ruta']->getValue() == null\n \t\t|| $this['archivos']['resultados']['ruta']->getValue() == null\n \t\t|| $this['archivos']['carta_compromiso']['ruta']->getValue() == null\n \t\t|| $this['archivos']['carta_respaldo_ua']['ruta']->getValue() == null){\n \t\t\t$bandera = false;\n \t}*/\n \t$suma_recursos = 0;\n \tforeach($this->getObject()->getRecursos() as $recurso){\n \t $suma_recursos = $suma_recursos + $recurso->getTotal();\n \t $archivos_recurso = $recurso->getArchivosRecurso();\n \t if($recurso->getItemConcurso()->getItem()->getAcronimo() != 'gastos_operacion'){\n \t if(($recurso->excedePorcentaje() && $recurso->getTotal() != 0)){\n \t $bandera = false;\n \t //echo 'porcentaje'.$bandera;\n \t }\n \t }else{\n \t if($archivos_recurso[0]->getRuta() == null && $recurso->getTotal() != 0){\n \t $bandera = false;\n \t }\n \t \n \t }\n \t /*\n \t if($archivos_recurso[0]->getRuta() == null && $recurso->getTotal() != 0){\n \t if($recurso->getItemConcurso()->getItem()->getAcronimo() != 'gastos_operacion'){\n \t $bandera = false;\n \t //echo $archivos_recurso[0]->getRecurso()->getItemConcurso()->getItem()->getAcronimo();\n \t }\n \t }*/\n \t}\n \t\n \tif($suma_recursos == 0){\n \t $bandera = false;\n \t}\n \t\n \tforeach($this->getObject()->getArchivosPostulacion() as $archivo_postulacion){\n \t if($archivo_postulacion->getTipoArchivo()->getAcronimo() == 'carta_compromiso'\n \t || $archivo_postulacion->getTipoArchivo()->getAcronimo() == 'carta_respaldo_ua'\n \t || $archivo_postulacion->getTipoArchivo()->getAcronimo() == 'trabajo_adelantado'\n \t || $archivo_postulacion->getTipoArchivo()->getAcronimo() == 'evaluadores_sugeridos'\n \t || $archivo_postulacion->getTipoArchivo()->getAcronimo() == 'evaluadores_con_conflictos'){\n \t \n \t }else{\n \t if($archivo_postulacion->getRuta() == null){\n \t $bandera = false;\n \t //echo $archivo_postulacion->getTipoArchivo()->getAcronimo();\n \t }\n \t }\n \t}\n \t\n \t\n \t\n \tif($this->getObject()->getPersona()->getTipoProfesor()->getNumeroTipo() == 4){\n \t\tif($this['archivos']['certificado_titulo']['ruta']->getValue() == null ){\n \t\t\t$bandera = false;\n \t\t}\n \t}\n \t\n \tif($this->getObject()->getPersona()->getTipoProfesor()->getNumeroTipo() == 4 || $this->getObject()->getPersona()->getTipoProfesor()->getNumeroTipo() == 3){\n \t if($this['archivos']['carta_compromiso']['ruta']->getValue() == null\n \t\t|| $this['archivos']['carta_respaldo_ua']['ruta']->getValue() == null){\n \t $bandera == false;\n \t }\n \t}\n \t\n \treturn $bandera;\n \t\n }", "title": "" }, { "docid": "6849b504a7900f89196d3c65fc77fe41", "score": "0.582274", "text": "private function validate() {\r\n if (empty($this->name)) {\r\n throw new Exception(\"Timetabling point must have a name\");\r\n }\r\n \r\n if (empty($this->lat)) {\r\n $this->lat = 0;\r\n }\r\n \r\n if (empty($this->lon)) {\r\n $this->lon = 0;\r\n }\r\n \r\n if (empty($this->slug)) {\r\n $this->createSlug(); \r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "4378b5ea1f1b22f7b41082437f375775", "score": "0.5797404", "text": "public function verifyAndLoad ($data) {\n \n $datetime = strptime($data['date_of_birth'], '%d/%m/%Y');\n \n $add_year = 1900;\n if ($datetime['tm_year'] < 20) \n $add_year = 2000;\n\n $datetime = mktime (\n 0,\n 0,\n 0,\n $datetime['tm_mon']+1,\n $datetime['tm_mday'],\n $datetime['tm_year']+$add_year);\n\n $data['date_of_birth'] = strftime('%Y-%m-%d',$datetime);\n \n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query\n ->select('id')\n ->from('#__atlete')\n ->where('\n removed <> 1 AND (\n (\n LOWER(first_name) = '. $db->Quote(trim(strtolower($data['first_name']))) .' AND\n LOWER(last_name) = '. $db->Quote(trim(strtolower($data['last_name']))) .' AND\n LOWER(date_of_birth) = '. $db->Quote(trim(strtolower($data['date_of_birth']))) .' AND\n '. $db->Quote(trim(strtolower($data['num_tes']))).' = \"\" \n )\n OR (\n LOWER(num_tes) = '. $db->Quote(trim(strtolower($data['num_tes']))).' AND\n '. $db->Quote(trim(strtolower($data['num_tes']))).' <> \"\"\n )\n )\n ');\n \n $db->setQuery($query);\n $id = $db->loadResult();\n $atlete = $this->getTable();\n if ($id != '' )\n $atlete->load($id);\n return $atlete;\n }", "title": "" }, { "docid": "d57f356aac3a0c973849211da2d929ec", "score": "0.57884467", "text": "function isValid(){\n $valid=true;\n if ($this->getPalabra() == null){\n $this->setPalabraError('* No se Ingreso ninguna palabra en este campo.');\n $valid=false; \n }\n return $valid;\n }", "title": "" }, { "docid": "1a754bed17819c93d0d63aa415f21b1b", "score": "0.57863426", "text": "public function valid()\n {\n $allowed_values = array(\"alpr_results\", \"alpr_group\", \"heartbeat\");\n if (!in_array($this->container['data_type'], $allowed_values)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d5be08ba245bfd100cfa428be0ac044c", "score": "0.5783477", "text": "function validar_dav ($alumno,$dig_rut){\t \n\t\t $alumno = $alumno;\n\t\t $dig_rut = $dig_rut;\t\t \n\t\t $largo_rut = strlen($alumno);\n\t\t $multiplicador = 2;\n\t\t $resultado = 0;\n\t\t $largo=$largo_rut-1;\t\t\t \n\t\t for ($i=0; $i < $largo_rut; $i++){\n\t\t\t $num = substr($alumno,$largo,1);\n\t\t\t \n\t\t\t if ($multiplicador > 7){\n\t\t\t\t $multiplicador = 2;\n\t\t\t }\n\t\t\t $resultado = $resultado + ($multiplicador * $num);\t\t\t \n\t\t\t $multiplicador++; \n\t\t\t $largo--;\t\t \n\t\t }\t\t\t\t \n\t\t $resto = 11-($resultado%11);\t\t \n\t\t \n\t\t if ($resto==10){\n\t\t\t $dig = \"K\";\n\t\t }else{\n\t\t if ($resto==11){\n\t\t\t $dig = 0;\n\t\t\t }else{\t \n\t\t $dig = $resto;\n\t\t\t }\t \n\t\t }\t \n\t\t \n\t\t if ($dig_rut==\"k\"){\n\t\t $dig_rut=\"K\"; \n\t\t } \n\t\t \n\t\t if ($dig==$dig_rut){\n\t\t\t $ok=1; \n\t\t }else{\n\t\t\t $ok=0;\n\t\t }\t\n\t\t return $ok;\n\t\t \t \n\t}", "title": "" }, { "docid": "48442d77015dec68a5006009a1f2dc79", "score": "0.5776371", "text": "function validarDatos($datos){\n $errores = [];\n if ($datos[\"nombre_completo\"]==\"\") {\n $errores[\"nombre_completo\"]=\"Por favor ingrese su nombre\";\n }\n if ($datos[\"email\"]==\"\") {\n $errores[\"email\"]=\"Por favor ingrese su email\";\n }elseif (!filter_var($datos[\"email\"],FILTER_VALIDATE_EMAIL)) {\n $errores[\"email\"]=\"Por favor ingrese un email valido\";\n }elseif(mailRepetido($datos[\"email\"])){\n $errores[\"email\"] = \"el email ya está en la base de datos, ingresá otro\";\n }\n\n if ($datos[\"usuario\"]==\"\") {\n $errores[\"usuario\"]=\"Por favor ingrese su usuario\";\n }\n if ($datos[\"password\"]==\"\") {\n $errores[\"password\"]= \"Por favor ingrese una contraseña\";\n }\n if ($datos [\"repassword\"]==\"\") {\n $errores[\"repassword\"]= \"Por favor reingrese su contraseña\";\n }elseif ($datos[\"password\"]!==$datos[\"repassword\"]) {\n $errores[\"repassword\"]=\"Las contraseñas no coinciden\";\n }\n\n return $errores;\n\n}", "title": "" }, { "docid": "bd7f3a8fadb17f6fcc05561e2cc7c136", "score": "0.5756626", "text": "public function isDataValid()\n {\n //provera da li je u username sacinjen od slova i brojeva i da li mu je duzina izmedju 5 i 12 karaktera,slicno i za password\n return (preg_match('/^[a-zA-Z0-9]{5,12}$/',$this->_username) && preg_match('/^[a-zA-Z0-9]{5,20}$/',$this->_password))? 1 : 0;\n }", "title": "" }, { "docid": "b5f561e8042d2b00a07f72ccbd168a2a", "score": "0.57558656", "text": "public function esisteevento($nome,$data)\n {\n $sql=\"SELECT * FROM \".static::getTables().\" WHERE nome= '\".$nome.\"' and data_e = '\".$data->format('Y-m-d').\"' ;\";\n $result = parent::loadSingle($sql);\n if ($result==null)\n return false;\n else\n return true;\n }", "title": "" }, { "docid": "483ca7e03e8d651a25e9d627b8a4616d", "score": "0.57394785", "text": "function prepare()\n\t{\n\t\t// 入力チェック(必須)\n\t\tif ($this->af->validate() > 0) {\n\t\t\t$this->backend->getLogger()->log(LOG_ERR, 'バリデーションエラー');\n\t\t\treturn 'enError';\n\t\t}\n\n\t\t// 会期\n\t\tif ('e' == $this->af->get('year')) {\n\t\t\tif ('' == $this->af->get('date_from_yyyy') && '' != $this->af->get('date_from_mm')) {\n\t\t\t\t$this->ae->add('date_from_yyyy', 'The start of the period has not been entered.');\n\t\t\t}\n\t\t\tif ('' != $this->af->get('date_from_yyyy') && '' == $this->af->get('date_from_mm')) {\n\t\t\t\t$this->ae->add('date_from_mm', 'The start of the period has not been entered.');\n\t\t\t}\n\t\t\tif ('' == $this->af->get('date_to_yyyy') && '' != $this->af->get('date_to_mm')) {\n\t\t\t\t$this->ae->add('date_to_yyyy', 'The end of the period has not been entered.');\n\t\t\t}\n\t\t\tif ('' != $this->af->get('date_to_yyyy') && '' == $this->af->get('date_to_mm')) {\n\t\t\t\t$this->ae->add('date_to_mm', 'The end of the period has not been entered.');\n\t\t\t}\n\t\t\tif ('' != $this->af->get('date_from_yyyy') && '' != $this->af->get('date_from_mm')\n\t\t\t\t&& '' != $this->af->get('date_from_yyyy') && '' != $this->af->get('date_from_mm')\n\t\t\t\t&& '' != $this->af->get('date_to_yyyy') && '' != $this->af->get('date_to_mm')\n\t\t\t\t&& '' != $this->af->get('date_to_yyyy') && '' != $this->af->get('date_to_mm')) {\n\t\t\t\tif ($this->af->get('date_from_yyyy').$this->af->get('date_from_mm') > $this->af->get('date_to_yyyy').$this->af->get('date_to_mm')) {\n\t\t\t\t\t$this->ae->add('date_from_yyyy', 'The period you have entered is incorrect. The start date is past the end date.');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ('' == $this->af->get('date_from_yyyy') && '' == $this->af->get('date_from_mm')\n\t\t\t\t&& '' == $this->af->get('date_from_yyyy') && '' == $this->af->get('date_from_mm')\n\t\t\t\t&& '' == $this->af->get('date_to_yyyy') && '' == $this->af->get('date_to_mm')\n\t\t\t\t&& '' == $this->af->get('date_to_yyyy') && '' == $this->af->get('date_to_mm')) {\n\t\t\t\t$this->ae->add('date_to_mm', 'The period has not been entered.');\n\t\t\t}\n\t\t}\n\n\t\t// エラー判定\n\t\tif (0 < $this->ae->count()) {\n\t\t\t$this->backend->getLogger()->log(LOG_ERR, '詳細チェックエラー');\n\t\t\t$this->_setMenuSelecte();\n\t\t\treturn 'enFairList';\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "fb4ec781f8e221b2d13f9c1d37eb2863", "score": "0.57240826", "text": "function validateDate($date, $format = 'Y-m-d'){\n $d = DateTime::createFromFormat($format, $date); // crée un objet date au format indiqué dans $format, ou bien retourne false si la date fournie ne respecte pas le format fournie\n if($d && $d->format($format) == $date){ // la date est correct si $d vaut true ( sinon c'est que date ne respect pas le format fourni) ET que l'objet $d formaté est identique à la date fournie ( sinon c'est que l'on a donné par exemple 1975-02-30 au lieu de 1975-03-02)\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9f524c6a22cf83d7c23a20a990c8c6ca", "score": "0.5719105", "text": "function consultar_eventos_anual() {\n if ($this->input(\"año\")) {\n $resultado = $this->modelo->consultar_porcentajes($_POST[\"año\"]);\n if ($resultado != null) {\n $this->success($resultado);\n } else {\n $this->error(\"No hay asistencias en el año \".$_POST[\"año\"]);\n }\n }\n }", "title": "" }, { "docid": "2b428f639ea8489491eaff1ba9d10da2", "score": "0.57187283", "text": "function check_data(){\r\n\t\tif (!$this->data_flags) $this->sql_get_data_flags();\r\n\t\treset($this->datain);\r\n\t\t$i = 0;\r\n\t\tforeach ($this->datain as $k => $v) {\r\n\t\t if ($k !='id' && ($v == 'null' || $v == null) && $this->data_flags[$k]['not_null']){\r\n\t\t \t$this->fali[$i] = $k;\r\n\t\t \t$i++;\r\n\t\t }\t\t\t \t\r\n\t\t}\r\n\t\tif (is_array($this->fali)) {\r\n/*\t\t\t\t$filename = \"g:/xampp/htdocs/access.log\";\r\n\t\t\t$handle = fopen($filename, 'a');\r\n\t\t\tforeach ($fali as $k => $v) fwrite($handle, \"fali :\" . $v);\r\n\t\t\tfclose($handle); */\t\t\t\r\n\t\t\treturn FALSE;\r\n\t\t}else{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d9faaad17fc026966ceb91d7b5dd3ccf", "score": "0.5707766", "text": "public static function checkCampoVacio($datos){\n\t\t\tforeach ($datos as $k => $v) if( empty($v) ) self::$error[]=$k.'_vacio';\n\t\t\treturn self::$error;\n\t\t}", "title": "" }, { "docid": "1e871f77f0278d92ef0065bf1aa3b664", "score": "0.57075053", "text": "public function validarNuevaCuenta()\n {\n if(!$this->nombre) {self::$alertas['error'] [] = 'Su nombre es obligatorio';}\n if(!$this->apellido) { self::$alertas['error'] [] = \"Su apellido es obligatorio\" ;}\n if(!$this->telefono) { self::$alertas['error'] [] = \"Su numero de telefono es obligatorio\" ;}\n if(!$this->email) { self::$alertas['error'] [] = \"Su email es obligatorio\" ;}\n if(!$this->password) { self::$alertas['error'] [] = \"Debe introducir una contraseña\" ;}\n if(strlen($this->password)< 6) {self::$alertas['error'] [] = \"La contraseña debe contener al menos 6 caracteres\" ;} \n return self::$alertas;\n }", "title": "" }, { "docid": "214269cd18d88ca841223ee8786989b2", "score": "0.5701615", "text": "function fecha_correcta($fecha)\n\t{\n\t\t$separar = preg_split (\"/\\-/\", $fecha);\n\t\tif(count($separar) == 3)\n\t\t\t//la funcion checkdate recibe como parámetros los números de mes, día y año en ese orden\n\t\t\treturn checkdate($separar[1],$separar[0],$separar[2]);\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "2bc9f217e481a68b4d0e46a67864830b", "score": "0.5685334", "text": "function validarFecha($fecha, $formato = 'd/m/Y') { //Pasamos la fecha y un valor por defecto\n $d = DateTime::createFromFormat($formato, $fecha); //Reformateamos usando el formato (modificable si queremos)\n return $d && $d->format($formato) == $fecha; //Devolvemos la fecha si es correcto, false si es incorrecto\n}", "title": "" }, { "docid": "cfde190e58751d84ebcec18454059d6a", "score": "0.56792", "text": "public function validateData($geofenceData){\n }", "title": "" }, { "docid": "eeb911b988643070776bc47c4cae2374", "score": "0.566829", "text": "function validate($datas,$skipAutoInc= true){\n\n\t\t$this->clearError();\n\t\t$displays = $datas;\n\t\t#var_dump($datas);\n\t\tif (is_array($datas)){\n\t\t\t$success = true;\n\t\t\tforeach($this->getFields() as $field){\n\t\t\t\t$key = $field->getAlias();\n\n\t\t\t\tif($field->isForeignKey()){\n\t\t\t\t\t$key = $field->getKey()->getAlias();\n\t\t\t\t}\n\t\t\t\t#var_dump($key);\n\t\t\t\t$value = $datas[$key];\n\n\t\t\t\t// format dates\n\n\t\t\t\tif($field->getType() == 'date' && !empty($value) &&($format=Env::getConfig('formats')->get('dateFormatTransform'))){\n\n\t\t\t\t\tif(preg_match('/'.Env::getConfig('formats')->get('dateFormatSourceCheck').'/i',$value)){\n\n\t\t\t\t\t\tsscanf($value, $format, $day, $month, $year);\n\t\t\t\t\t\t$value = $year.\"-\".$month.\"-\".$day;\n\t\t\t\t\t} else{\n\t\t\t\t\t\tif(!$field->isMandatory()){\n\t\t\t\t\t\t\t$value = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($field->getType() == 'datetime' && !empty($value) &&($format=Env::getConfig('formats')->get('dateTimeFormatTransform'))){\n\t\t\t\t\t//dateTimeFormatSourceCheck\n\n\t\t\t\t\tif(preg_match('/'.Env::getConfig('formats')->get('dateTimeFormatSourceCheck').'/i',$value)){\n\t\t\t\t\t\tsscanf($value, $format, $day, $month, $year,$h,$i,$s);\n\t\t\t\t\t\t$value = $year.\"-\".$month.\"-\".$day.\" \".intval($h).\":\".intval($i).\":\".intval($s);\n\t\t\t\t\t//\tvar_dump($value);\n\t\t\t\t\t} else{\n\n\t\t\t\t\t\tif(!$field->isMandatory() && empty($value)){\n\t\t\t\t\t\t\t$value = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($field->getType()=='point'){\n\n\n\t\t\t\t\t$x = $datas[$key.'_x'];\n\t\t\t\t\t$y = $datas[$key.'_y'];\n\t\t\t\t\tif($field->isMandatory()){\n\t\t\t\t\t\tif(empty($x) || empty($y)){\n\t\t\t\t\t\t\t$success = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"GeomFromText('POINT(\".$x.\" \".$y.\")',0)\";\n\n\t\t\t\t}\n\t\t\t\t//var_dump($datas);\n\t\t\t\t$datas[$field->getAlias()]=$value;\n\n\t\t\t\t//skip auto_increment value check\n\t\t\t\t#var_dump($skipAutoInc,$field->isPrimaryKey(), $field->hasFlag('auto_increment'));\n\t\t\t\tif(($skipAutoInc && $field->isPrimaryKey() && $field->hasFlags('auto_increment'))){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(!$field->checkValue($datas[$field->getAlias()]) ){\n\t\t\t\t\t$success = false;\n\t\t\t\t\t$this->setError($field->getError());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//removed, we need the values anyway\n\t\t//\tif($success){\n\t\t#\tvar_dump($datas);\n\t\t\t\t$this->setValues($datas);\n\t\t\t\t$this->setDisplayValues($displays);\n\t\t//\t}\n\t\t\treturn $success;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a8838491b931cfcbd330ec7081e8e532", "score": "0.5667459", "text": "public function validate(){\n\t\t\n /**\n\t\t * Amount\n\t\t */\n\t\tif ($this->amount <= 0){\n\t\t\t$this->errorsAmount[] = \"Kwota musi być większa od zera.\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * Date\n\t\t */\n\t\t$format = 'Y-m-d';\n\t\t$date = DateTime::createFromFormat($format, $this->date);\n\t\t\n\t\tif( !( $date && $date->format($format) === $this->date )){\n\t\t\t$this->errorsDate[] = \"Podana data nie jest prawidłowa.\";\n\t\t}\t\t\n\t\t\n\t\t/**\n\t\t * Category\n\t\t */\t\n\t\t$incomeCategories = ExpenseCategory::getUserExpenseCategories($this->userID);\n\t\t$flagOK = false;\n\t\t\n\t\tforeach($incomeCategories as $category){\n\t\t\tif($category['id'] == $this->category){\n\t\t\t\t$flagOK = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( !$flagOK ){\n\t\t\t$this->errorsCategory[] = \"Podana kategoria jest nieprawidłowa.\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * Method\n\t\t */\t\n\t\t$paymentMethods = PaymentMethod::getUserPaymentMethods($this->userID);\n\t\t$flagOK = false;\n\t\t\n\t\tforeach($paymentMethods as $method){\n\t\t\tif($method['id'] == $this->method){\n\t\t\t\t$flagOK = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( !$flagOK ){\n\t\t\t$this->errorsCategory[] = \"Podana kategoria jest nieprawidłowa.\";\n\t\t}\n\n\t\t/**\n\t\t * Comment\n\t\t */\n\t\tif(strlen($this->comment) > 100){\n\t\t\t$this->errorsComment[] = \"Podany komentarz jest za długi.\";\n\t\t}\n\t\telse if($this->comment == \"\"){\n\t\t\t$this->comment = \"-\";\n\t\t}\t\t\t\n\n }", "title": "" }, { "docid": "f9da6543fe44ab1266dbad258daef755", "score": "0.5659882", "text": "public function inscription($values){\n $cpControle = \"/^(([0-8][0-9])|(9[0-5]))[0-9]{3}$/\";\n $stringControle = '/^\\p{L}+$/ui';\n $good = true;\n $civilite = [\"Mr\", \"Mme\"];\n $niveau_etude = [1,2,3,4,5];\n $dateExplode = explode(\"-\", $values['DateNaissance']);\n\n $resultat = [\n 'nom' => $values['Nom'],\n 'prenom' => $values['Prenom'],\n 'email' => $values['Email'],\n 'date_naissance' => $values['DateNaissance'],\n 'adresse' => $values['Adresse'],\n 'code_postal' => $values['CodePostal'],\n 'ville' => $values['Ville'],\n 'type_contrat' => $values['TypeContrat'],\n 'civilite' => $values['Civilite'],\n 'niveau_etude' => $values['NiveauEtude']\n ];\n\n foreach ($resultat as $key){\n if (empty($key)){\n $good = false;\n }\n }\n\n if(!preg_match($stringControle,$resultat['nom']) || !preg_match($stringControle,$resultat['prenom'])\n || !preg_match($stringControle,$resultat['ville'])){\n $good = false;\n }\n\n if(!in_array($resultat['niveau_etude'], $niveau_etude) || !in_array($resultat['civilite'], $civilite)){\n $good = false;\n }\n\n if(!preg_match($cpControle, $resultat['code_postal'] )){\n $good = false;\n }\n\n if (!filter_var( $resultat['email'], FILTER_VALIDATE_EMAIL))\n {\n $good = false;\n }\n\n if (sizeof($dateExplode) != 3){\n $good = false;\n }\n else{\n if (strlen($dateExplode[0]) == 4 && strlen($dateExplode[1]) == 2 && strlen($dateExplode[2]) == 2) {}\n else {$good = false;}\n }\n\n if(is_numeric($dateExplode[0]) && is_numeric($dateExplode[1]) && is_numeric($dateExplode[2])){}\n else{$good = false;}\n\n if ($good){\n $this->membre->addMembre($resultat, \"membre\");\n }\n\n return $good;\n }", "title": "" }, { "docid": "c3ac4102551500de488000c5e31ee468", "score": "0.564609", "text": "protected static function verificar_fecha($fecha){\n\t\t\t$valores=explode('-', $fecha);\n\t\t\tif(count($valores)==3 && checkdate($valores[1],$valores[2],$valores[0])){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c3af6b9316b205b04c88f971fb49110b", "score": "0.56364864", "text": "function informacionEsIncorrecta()\n{\n\n $errores = [];\n\n // verificar que ningun campo este vacio\n $campos = ['nombre', 'apellido', 'usuario', 'cedula', 'clave', 'reclave'];\n foreach ($campos as $campo) {\n if (empty($_POST[$campo]))\n $errores[$campo] = $campo . ' no puede estar vacio';\n }\n\n /* verificar que nombre, apellido sea solo letras */\n if (!ctype_alpha($_POST['nombre']))\n $errores['nombre'] = 'Nombre solo debe contener letras';\n if (!ctype_alpha(($_POST['apellido'])))\n $errores['apellido'] = 'Apellido solo debe contener letras';\n\n /* verificar que cedula sean solo numeros */\n if (!ctype_digit($_POST['cedula']))\n $errores['cedula'] = 'Cedula solo puede contener numeros';\n\n /* verificar que las claves coincidan */\n if ($_POST['clave'] !== $_POST['reclave'])\n $errores['reclave'] = 'Claves deben coincidir';\n\n\n if (count($errores) > 0)\n return $errores;\n else\n return false;\n}", "title": "" }, { "docid": "e308aaef56863e2f8eb61bedcf621ef2", "score": "0.5627103", "text": "public static function validar_campos($data) {\n return ($data != null && strlen($data) > 0 && $data != '') ? true : false;\n }", "title": "" }, { "docid": "543872fb9948427c4bda216c1dd73ef7", "score": "0.5616576", "text": "public function validarPlacasVehiculo(){\n\n\t\t\t\t$datos = $this->placasVehiculo;\n\n\t\t\t\t$respuesta = GestorVehiculosController::validarPlacasVehiculoController($datos);\n\n\t\t\t\techo $respuesta;\n\t\t\t}", "title": "" }, { "docid": "9763ea92c77433142aac792566b7a404", "score": "0.5611791", "text": "protected function validarFechaLicencia() {\t\t\n $salida=\"\";\t\t\n try\t\t{\n $emp_codigo=$this->getUser()->getAttribute('emp_codigo');\t\n if($emp_codigo){\t\t\t\t\n $hoy_fecha=date(\"Y-m-d\");\t\n //echo($hoy_fecha.'-');\t\n $conexion = new Criteria();\n $conexion->add(EmpresaPeer::EMP_CODIGO, $emp_codigo);\n //$conexion->add(EmpresaPeer::EMP_FECHA_LIMITE_LICENCIA, $hoy_fecha, CRITERIA::GREATERLESS_EQUAL);\t\n //$conexion->addAnd(EmpresaPeer::EMP_FECHA_INICIO_LICENCIA, $hoy_fecha, CRITERIA::LESS_EQUAL);\t\n $empresa = EmpresaPeer::doSelectOne($conexion);\t\n if($empresa){\t\t\t\n $fin=$empresa->getEmpFechaLimiteLicencia();\n $ini=$empresa->getEmpFechaInicioLicencia();\n //echo($fin.'-'.$ini);\n if( $fin>=$hoy_fecha && $ini<=$hoy_fecha){\n return \"true\";\n }\t\t\n else{\n $salida=\"La licencia del software no este activa en este periodo\";\n }\t\t\n }\t\t\t\t\n else{\n $salida=\"No se ha podido capturar la empresa a la que pertenece este usuario\";\n }\n }\t\t\t\n else {\t\t\n $salida=\"No se ha podido capturar la empresa a la que pertenece este usuario\";\n }\t\t \n }\t\t\n catch (Exception $excepcion) {\t\n throw $excepcion;\t\n }\n return $salida;\n }", "title": "" }, { "docid": "76308e0e03c945d66a6b9ddc18051601", "score": "0.5600306", "text": "public function validar($tipo,$valor='')\n\t{\t$valor\t= $this->escaparMysql($valor);\n\t\tswitch ($tipo)\n\t\t{\tcase\t\"fecha\":\n\t\t\t\t\t$fecha\t= explode(\"-\",$valor);\n\t\t\t\t\tif(!checkdate($fecha[1],$fecha[2],$fecha[0]))\n\t\t\t\t\t{\t$this->msjErrorValid\t= \"La Fecha no es correcta.\";\n\t\t\t\t\t\treturn false;\t\n\t\t\t\t\t}\t\n\t\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f8aff55c431ba51fd21bd193a7c90f6b", "score": "0.5598777", "text": "function cuisineValidation()\n {\n global $CFG;\n\n $cuisine_name = $this->filterInput($_POST[\"cuisine_name\"]);\n $noofrows = $this->getNumvalues($CFG['table']['cuisine'], \"cuisine_name='\" . $cuisine_name .\n \"'\");\n\n if ($noofrows != 0)\n {\n echo \"exist\";\n exit();\n }\n }", "title": "" }, { "docid": "9bf6cafb4b3cb1317f6349969adcf2a1", "score": "0.55946815", "text": "public function PkgCmsFormDataIsValid()\n {\n //call parent to skip TABLEEDITOR_RECORD_ID_NOT_VALID message\n return parent::DataIsValid();\n }", "title": "" }, { "docid": "3dd36a5826e2a7f24fda85a2ba3cd580", "score": "0.5575885", "text": "function validar($jsonDatos) {\n\t\t$num = 0;\n\t\t$valores[$num][\"etiqueta\"] = \"Fecha\";\n\t\t$valores[$num][\"valor\"] = $jsonDatos->sac_fecha;\n\t\t$valores[$num][\"tipo\"] = \"todo\";\n\t\t$valores[$num][\"requerido\"] = true;\n\t\t$num++;\n\t\t\n\t\t$valores[$num][\"etiqueta\"] = \"Hora\";\n\t\t$valores[$num][\"valor\"] = $jsonDatos->sac_hora;\n\t\t$valores[$num][\"tipo\"] = \"todo\";\n\t\t$valores[$num][\"requerido\"] = true;\n\t\t$num++;\n\t\t\n\t\t$valores[$num][\"etiqueta\"] = \"Accion\";\n\t\t$valores[$num][\"valor\"] = $jsonDatos->sac_accion;\n\t\t$valores[$num][\"tipo\"] = \"todo\";\n\t\t$valores[$num][\"requerido\"] = true;\n\t\t$num++;\n\t\t\n\t\t//for_archivo_url\n\t\t$val = NEW VALIDADOR;\n\t\t$respuesta = new stdClass();\n\t\tif ($val->validar($valores)) {\n\t\t\t$respuesta->estado = TRUE;\n\t\t} else {\n\t\t\t$respuesta->mensaje = $val->mensaje;\n\t\t\t$respuesta->estado = FALSE;\n\t\t}\n return $respuesta;\n }", "title": "" }, { "docid": "66eed162363f719e396414561565c31c", "score": "0.5573278", "text": "protected function checkDataParam()\n {\n }", "title": "" }, { "docid": "8901f6db390948ff5fdf4db50497fb6a", "score": "0.55573106", "text": "public function wrongDate($tab, $data) {\n foreach ($tab as $it) {//sprawdzanie czy daty nie nakladaja sie\n if ($it->getDataOd() <= $data->getDataOd() && $it->getDataDo() >= $data->getDataOd() ||\n $it->getDataOd() <= $data->getDataDo() && $it->getDataDo() >= $data->getDataDo()\n )\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "28a6a9f562e1c4a54bacb6172ce39ada", "score": "0.5550785", "text": "function validar($a, $tabela) {\r\n // $tabela = string com o nome do fomrulário / tabela checada\r\n\r\n session_start();\r\n\r\n $_SESSION[$tabela] = array();\r\n\r\n foreach ($a as $k=>$valor) {\r\n // segurança\r\n $k = htmlentities($k);\r\n $valor = htmlentities($valor);\r\n\r\n $posbarra = strpos($k, '|');\r\n\r\n if ($posbarra !== false) {\r\n $qtdeespeciais = $posbarra - strlen($k);\r\n $caracteres = substr($k, $qtdeespeciais);\r\n $k = substr($k, 0, $posbarra);\r\n $_SESSION[$tabela][$k] = $valor;\r\n\r\n if (strpos($caracteres, '!')) { // campo não foi preenchido\r\n if (empty($_SESSION[$tabela][$k]))\r\n $_SESSION['erros'][$k]['NAO_PREENCHIDO'] = true;\r\n }\r\n if (strpos($caracteres, '#')) { // campo deve ser numérico\r\n if (!preg_match(\"/^([0-9]+)$/\", $_SESSION[$tabela][$k]) && !empty($_SESSION[$tabela][$k]))\r\n $_SESSION['erros'][$k]['NUMERICO'] = true;\r\n if (empty($_SESSION[$tabela][$k])) {\r\n $_SESSION[$tabela][$k] = 0;\r\n }\r\n }\r\n if (strpos($caracteres, 'd')) { // campo data\r\n list($dia, $mes, $ano) = split ('[/.-]', $_SESSION[$tabela][$k], 3);\r\n if (!checkdate($mes, $dia, $ano))\r\n $_SESSION['erros'][$k]['DATA'] = true;\r\n }\r\n if (strpos($caracteres, '@')) { // campo e-mail (a implementar)\r\n\r\n }\r\n }\r\n else\r\n //if (empty($valor))\r\n //$_SESSION[$tabela][$k] = 0;\r\n //else\r\n $_SESSION[$tabela][$k] = $valor;\r\n\r\n }\r\n\r\n /*\r\n echo '<pre>';\r\n print_r($_SESSION['usuario']);\r\n print_r($_SESSION['erros']);\r\n echo '</pre>';\r\n */\r\n\r\n }", "title": "" }, { "docid": "9b063c72d70732a27b1276fb60e7f59e", "score": "0.5548202", "text": "function validate_date($name,$value){\n\t\tif($this->validate_req($name)){\n\t\t\t$a = $this->eval_data[$name];\n\t\t\t$error = 0;\n\t\t\t$eval_format = [\n\t\t\t\t\"Y-m-d\",\n\t\t\t\t\"Y/m/d\",\n\t\t\t\t\"d-m-Y\",\n\t\t\t\t\"d/m/Y\"\n\t\t\t];\n\t\t\tforeach ($eval_format as $keyFormat => $format) {\n\t\t\t\t$d = DateTime::createFromFormat($format, $a);\n\t\t\t\tif($d && $d->format($format) == $a)\n\t\t\t\t\t$error++;\n\t\t\t}\n\t\t\t// si tout les formats on renvoyer une erreur alors il y a une erreur.\n\t\t\tif($error == count($eval_format))\n\t\t\t\t$this->error[$name][\"date\"] = $this->getMsg(\"date\");\n\t\t}\n\t}", "title": "" }, { "docid": "30413daa1d558dbdd50b904c7058b443", "score": "0.55378675", "text": "public function recuperaDatidaValidare(){\n $datiDaValidare; \n foreach ($_POST as $key => $value) {\n if($key === 'provincia' || $key === 'provinciaClinica' || $key ==='codiceFiscale')\n {\n $value = strtoupper($value);\n }\n $datiDaValidare[$key] = trim($value);\n }\n return $datiDaValidare;\n }", "title": "" }, { "docid": "62ad6895fcacb566d5b663a27e94101a", "score": "0.55329305", "text": "private function validarDatosFormulario($data) {\n\t if(empty($data['nombre'])) {\n\t\t$mensaje.='El nombr del Staff esta vacío<br/>';\n\t }\n\t if(empty($data['cargo'])) {\n\t\t$mensaje.='El cargo del Staff esta vacío<br/>';\n\t }\n\t \n\t return $mensaje;\n\t}", "title": "" }, { "docid": "31501749b9aa128cb2ae3e4da815b813", "score": "0.5531646", "text": "function ValidarDatos($campo){\n//Array con las posibles cabeceras a utilizar por un spammer\n$badHeads = array(\"Content-Type:\",\n\"MIME-Version:\",\n\"Content-Transfer-Encoding:\",\n\"Return-path:\",\n\"Subject:\",\n\"From:\",\n\"Envelope-to:\",\n\"To:\",\n\"bcc:\",\n\"cc:\");\n\n$value = array();\n//Comprobamos que entre los datos no se encuentre alguna de\n//las cadenas del array. Si se encuentra alguna cadena se\n//dirige a una página de Forbidden\n foreach($badHeads as $valor){\n if(strpos(strtolower($campo), strtolower($valor)) !== false){\n $value[] = 1;\n \n } else {\n $value[] = 0;\n }\n }\nif (array_search(1,$value) === false) {\n return true;\n} else {\n return false;\n}\n}", "title": "" }, { "docid": "0e1c0c3ebdc6a38ddd3fb4788df2d0a2", "score": "0.5523695", "text": "function is_valid_date($timestamp, $dateFormat) {\r\n $date_array = split_localized_date($timestamp,$dateFormat);\r\n \r\n $status_ok = false;\r\n if ($date_array != null) {\r\n $status_ok = checkdate($date_array['month'],$date_array['day'],$date_array['year']);\r\n }\r\n \r\n return $status_ok;\r\n}", "title": "" }, { "docid": "598cab6d859988cc7ff657f8180d2db5", "score": "0.55185896", "text": "public function valid() {\n\n\t\tif ( ! preg_match( '/^[A-Za-z0-9-.]*$/', $this->container['source_id'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( strlen( $this->container['oid'] ) > 100 ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( ! preg_match( '/^[A-Za-z0-9.-]*$/', $this->container['oid'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( ! preg_match( '/^[0-9]{1,3}$/', $this->container['municipality'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( ! preg_match( '/^[0-9]{7}-[0-9]{1}$/', $this->container['business_code'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( null === $this->container['publishing_status'] ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.5517264", "text": "public function valid() {}", "title": "" }, { "docid": "d291f5717e9171e23b1bb19a762a8281", "score": "0.55118155", "text": "protected function validation(){\t\t\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"estado\",\n\t\t\t\"domain\" => array('D', 'R'),\n\t\t\t\"required\" => true\n\t\t));\n\t\tif($this->validationHasFailed()==true){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "bd85fb5e32b7a6c1f0b7646f0a4d1141", "score": "0.5506218", "text": "public function Valida($rut){\n $jsonresponse = array();\n try{\n $stm = $this->pdo->prepare(\"SELECT al.id_alum,\n al.rut_alum,\n al.ap_pat_alum,\n al.ap_mat_alum,\n al.nombres_alum,\n al.sexo_alum,\n al.otras_becas_alum\n FROM alumnos as al, carreras as carr\n WHERE al.rut_alum = ? AND al.cod_carrera_alum = carr.codigo_car\");\n $stm->execute(array($rut));\n $r = $stm->fetch(PDO::FETCH_OBJ);\n if($r!= false){\n $busq = new AlumnoBecas();\n $busq->__SET('alumbeca_id', $r->id_alum);\n $busq->__SET('alumbeca_rut', $r->rut_alum);\n $busq->__SET('alumbeca_apepat', $r->ap_pat_alum);\n $busq->__SET('alumbeca_apemat', $r->ap_mat_alum);\n $busq->__SET('alumbeca_nombres', $r->nombres_alum);\n $busq->__SET('alumbeca_sexo', $r->sexo_alum);\n $busq->__SET('alumbeca_otrasbecas', $r->otras_becas_alum);\n\n $jsonresponse['success'] = true;\n $jsonresponse['message'] = 'Se valida alumno correctamente';\n $jsonresponse['datos'] = $busq->returnArray();\n }else{\n $jsonresponse['success'] = true;\n $jsonresponse['message'] = 'No Se obtuvo alumno correctamente';\n $jsonresponse['datos'] = null;\n }\n } catch (Exception $e){\n //die($e->getMessage());\n $jsonresponse['success'] = false;\n $jsonresponse['message'] = 'Error al validar alumno'; \n }\n return $jsonresponse;\n }", "title": "" }, { "docid": "854c52415264e1a34f0b1b51c0ed9265", "score": "0.54956317", "text": "public function Validar()\n {\n $ficha_sisben = new Sisben();\n $ficha_ciudadano = new Ciudadano();\n\n //Valida que se este recibiendo una cedula para validar\n if (isset($_REQUEST['cedula'])) {\n $ficha_sisben = $this->modelSisben->consultar($_REQUEST['cedula']);\n $ficha_ciudadano = $this->modelCiudadano->consultar($_REQUEST['cedula']);\n\n require_once 'view/header.view.php';\n require_once 'view/navbar.view.php';\n require_once 'view/preinscripcion/validar.view.php';\n require_once 'view/footer.view.php';\n }\n }", "title": "" }, { "docid": "74460effab95317123ae0e17f6a953f8", "score": "0.54806507", "text": "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ($column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n } \n }\n\n return parent::beforeValidate ();\n }", "title": "" }, { "docid": "3bdb34e137e4bd29febdf4ae7a97ef38", "score": "0.54749346", "text": "function validate($arrayData,$codigo=false){\n\t\t$oDBV=new PFDBValidator($this->oDBM,$this->tabla);\n\t\t$oDBV->codigo=$codigo;\n\t\t$oDBV->arrayData=$arrayData;\n\t\t$b=$oDBV->validarVector();\n\t\tif($b){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t$this->aErrors=$oDBV->arrayErrores;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "82e2b4104f7a9edb779f6d07a67539d0", "score": "0.5469109", "text": "private function _validate(): bool\n {\n // Create a DateTime object with a format of YYYY-MM-DD using the supplied date_of_birth\n $objDate = \\DateTime::createFromFormat('Y-m-d', $this->date_of_birth);\n\n // Validate the DateTime object worked and\n if ($objDate === false || !$objDate instanceof \\DateTime || $objDate->format('Y-m-d') !== $this->date_of_birth) {\n throw new \\InvalidArgumentException('Invalid owner date of birth');\n }\n\n return true;\n }", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5463814", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5463814", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5463814", "text": "public function valid();", "title": "" }, { "docid": "ee0bf491cda93ff6dc7af2d63ed67d9a", "score": "0.54630864", "text": "public function validateFields($par)\n {\n $i=0;\n foreach ($par as $key => $value){\n if(empty($value)){\n $i++;\n }\n }\n if($i==0){\n return true;\n }else{\n $this->setErro(\"Preencha todos os dados\");\n return false;\n }\n }", "title": "" }, { "docid": "44d84518990555a664ce92c2743d1e47", "score": "0.54610306", "text": "public function valid()\n {\n\n if ($this->container['end_date'] === null) {\n return false;\n }\n if ($this->container['id_session'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['dates'] === null) {\n return false;\n }\n if ($this->container['name'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "7b9e7888206b2f2df528159c053f6ab7", "score": "0.54604095", "text": "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ( $column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n }\n\n return parent::beforeValidate ();\n }", "title": "" }, { "docid": "aef4e1e6dcf1c81dd576e7a8e05a69d0", "score": "0.54494077", "text": "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date'){\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }elseif ($column->dbType == 'timestamp without time zone'){\n //$this->$columnName = date('Y-m-d H:i:s', CDateTimeParser::parse($this->$columnName, Yii::app()->locale->dateFormat));\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n }\n\n return parent::beforeValidate ();\n }", "title": "" }, { "docid": "e258777fad2c7b4c3a5237d433ed48ee", "score": "0.5444732", "text": "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t}", "title": "" }, { "docid": "5bc45b82c53ddece549e6746ff39140a", "score": "0.5444583", "text": "function validarFecha ($fecha) {\n $valores = explode(\"/\", $fecha);\n $dia = $valores[0];\n $mes = $valores[1];\n $anho = $valores[2];\n return checkDate($mes, $dia, $anho);\n }", "title": "" }, { "docid": "d390781a7e78bb40791f69367d7d460a", "score": "0.5444533", "text": "public function validateData(): bool\n {\n $me = collect(Arr::except($this->toArray(), ['uid', 'vc_version_uid', 'updated_at']));\n\n $difference = $me->diffAssoc($this->versions()->latest()->first()->toArray());\n\n return $difference->isEmpty();\n }", "title": "" }, { "docid": "e0503636e21f8e25c06db857e1b258c5", "score": "0.54407984", "text": "function checkDateImport()\n{\n global $HTTP_POST_FILES;\n global $bolShowResult;\n $strResult = \"\";\n $arrDate = []; // menampung data daftar tanggal yang ada\n if (is_uploaded_file($HTTP_POST_FILES[\"fileData\"]['tmp_name'])) {\n $dbf = dbase_open($HTTP_POST_FILES[\"fileData\"]['tmp_name'], 0);\n if ($dbf) {\n $intLen = dbase_numrecords($dbf);\n for ($i = 1; $i <= $intLen; $i++) {\n $arrTmp = dbase_get_record_with_names($dbf, $i);\n $strStatus = trim($arrTmp['FCSTATUS']);\n $strAttendanceDate = timestampDate2Date($arrTmp['FDDATE']);\n $strTime = timestampTime2Time($arrTmp['FCTIME']);\n list($tahun, $bulan, $tanggal) = explode(\"-\", $strAttendanceDate);\n $tsTmp = mktime(0, 0, 0, (int)$bulan, (int)$tanggal, $tahun);\n $dtTmp = getdate($tsTmp);\n $strAttendanceDate = $dtTmp['year'] . \"-\" . $dtTmp['mon'] . \"-\" . $dtTmp['mday']; // biar seragam\n $arrDate[$strAttendanceDate] = 1;\n }\n foreach ($arrDate AS $strDate => $tmp) {\n $strResult .= \"<a href=\\\"javascript:insertDate('$strDate')\\\">\" . pgDateFormat($strDate, \"d M Y\") . \"</a><br>\";\n }\n }\n dbase_close($dbf);\n }\n return $strResult;\n}", "title": "" }, { "docid": "de88144a17f20f50138b541e06a62575", "score": "0.54405826", "text": "public function isValid()\n {\n return self::validar($this->rut,$this->dv);\n }", "title": "" }, { "docid": "76182dd2b6fd767d5dd33320a651a155", "score": "0.54324967", "text": "public function validate(): DCATValidationResult\n {\n $result = parent::validate();\n\n if (!$this->isDateTime()) {\n $result->addMessage(\n 'value ' . $this->getData() . ' is not conform the given format ' .\n $this->getFormat()\n );\n }\n\n return $result;\n }", "title": "" }, { "docid": "a56b4090f2df478e0594597a54602b42", "score": "0.5418663", "text": "public function validateFields($par)\r\n {\r\n $i=0;\r\n foreach ($par as $key => $value){\r\n if(empty($value)){\r\n $i++;\r\n }\r\n }\r\n if($i==0){\r\n return true;\r\n }else{\r\n $this->setErro(\"Preencha todos os dados!\");\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b7069c7bac5cb996a806c2b9ea9fa6c9", "score": "0.5415557", "text": "function validarPermisoDcto($datos) {\n global $sql;\n \n $respuesta = array();\n\n $maxPermiso = $sql->obtenerValor('usuarios', 'dcto_maximo', 'usuario = \"' . $datos[\"usuario\"] . '\" AND contrasena = \"' . $datos[\"contrasena\"] . '\"');\n\n if ($maxPermiso > $datos['dcto_maximo']) {\n $respuesta['autorizar'] = true;\n $respuesta['fila'] = \"#\" . $datos['fila'];\n $respuesta['dcto'] = $datos['dcto_maximo'];\n \n } else {\n $respuesta['autorizar'] = false;\n $respuesta['fila'] = \"#\" . $datos['fila'];\n $respuesta['dcto'] = $datos['dcto_maximo'];\n \n }\n\n\n Servidor::enviarJSON($respuesta);\n}", "title": "" } ]
e63f512d425449aa29650300fa63258c
Function for classes that inherit from this controller, to give them the opportunity to serialize stuff
[ { "docid": "f4f4f22100b9568b7af927db0f80af63", "score": "0.0", "text": "protected function serialize($object)\n {\n return $this->restUtils->serialize($object);\n }", "title": "" } ]
[ { "docid": "da2e6549b327f4c57d2bcf64ca3b4c90", "score": "0.71780986", "text": "public function serialize() {\n\t}", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.70908946", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.70908946", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "5f0a7d92dce706aff93c2b08a7696f11", "score": "0.6942378", "text": "public function doSerialize()\n {\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "de56b22b3eb203bf37e399d1a44bf406", "score": "0.6820982", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "b14677764c8a081e74986a7b5ce1d5b0", "score": "0.67918766", "text": "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "title": "" }, { "docid": "0f3d166570d4c7aa0162d9977945b1da", "score": "0.6671611", "text": "public function jsonSerialize(){\n return $this -> serialize();\n }", "title": "" }, { "docid": "af0cb4e4a53817915de0908c696f029c", "score": "0.65836966", "text": "public function serialize();", "title": "" }, { "docid": "af0cb4e4a53817915de0908c696f029c", "score": "0.65836966", "text": "public function serialize();", "title": "" }, { "docid": "af0cb4e4a53817915de0908c696f029c", "score": "0.65836966", "text": "public function serialize();", "title": "" }, { "docid": "af0cb4e4a53817915de0908c696f029c", "score": "0.65836966", "text": "public function serialize();", "title": "" }, { "docid": "af0cb4e4a53817915de0908c696f029c", "score": "0.65836966", "text": "public function serialize();", "title": "" }, { "docid": "a10cfdac84eeb37c462e66607584468a", "score": "0.6570244", "text": "public function jsonSerialize(): mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "d82af04d3ceeedf656fc9e74e4b27d2c", "score": "0.6569936", "text": "public function serialize()\n {\n return serialize(['public'=>$this->public,'protected'=> $this->protected,'parent' =>parent::serialize()]) ;\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6544502", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6544502", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6543402", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6543402", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6543402", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "fca58c9b9c4df173545221de94e27806", "score": "0.6543135", "text": "public function serialize(){\n return $this->returnString(parent::serialize());\n }", "title": "" }, { "docid": "e582313ba4d6b0963ddc275cb8cd94fd", "score": "0.6541829", "text": "public function jsonSerialize()\n {\n }", "title": "" }, { "docid": "2d1f77a27c4f8f296545946017c62b20", "score": "0.6483254", "text": "public function serialize(): void\n {\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "ab72d40f39a8771f877d764337864e0a", "score": "0.6444787", "text": "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "3c570d0a228315f67910b2f4e42ae96e", "score": "0.6389428", "text": "public function jsonSerialize() {}", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "title": "" }, { "docid": "6c861b00b8d3b0a783a5b3b0d8a93131", "score": "0.638279", "text": "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "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": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "03308cdf1f3eb0c47d8f3059a2a11231", "score": "0.7062654", "text": "public function show(Resource $resource)\n {\n app('App\\Http\\Controllers\\ViewsController')->resourceView($resource);\n\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.70187664", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "921410ad408e73391c76fba66fc4ab57", "score": "0.65274835", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n require_once($CFG->libdir.'/filelib.php');\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n /// Fetch parameters\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n $page = optional_param('page', 0, PARAM_INT);\n $frameset= optional_param('frameset', '', PARAM_ALPHA);\n\n /// Init some variables\n $errorcode = 0;\n $buttontext = 0;\n $querystring = '';\n $resourcetype = '';\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n /// Cache this per request\n static $items;\n\n /// Check for errors\n $errorcode = $this->check4errors($resource->reference, $course, $resource);\n\n /// If there are any error, show it instead of the resource page\n if ($errorcode) {\n if (!has_capability('moodle/course:activityvisibility', get_context_instance(CONTEXT_COURSE, $course->id))) {\n /// Resource not available page\n $errortext = get_string('resourcenotavailable','resource');\n } else {\n /// Depending of the error, show different messages and pages\n if ($errorcode ==1) {\n $errortext = get_string('invalidfiletype','error', $resource->reference);\n } else if ($errorcode == 2) {\n $errortext = get_string('filenotfound','error', $resource->reference);\n } else if ($errorcode == 3) {\n $errortext = get_string('packagenotdeplyed','resource');\n } else if ($errorcode == 4) {\n $errortext = get_string('packagechanged','resource');\n } else if ($errorcode == 5) {\n $errortext = get_string('packagenotdeplyed','resource'); // no button though since from repository.\n }\n }\n /// Display the error and exit\n if ($inpopup) {\n print_header($pagetitle, $course->fullname.' : '.$resource->name);\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n print_simple_box_start('center', '60%');\n echo '<p align=\"center\">'.$errortext.'</p>';\n /// If errors were 3 or 4 and isteacheredit(), show the deploy button\n if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id)) && ($errorcode == 3 || $errorcode == 4)) {\n $link = 'type/ims/deploy.php';\n $options['courseid'] = $course->id;\n $options['cmid'] = $cm->id;\n $options['file'] = $resource->reference;\n $options['sesskey'] = $USER->sesskey;\n $options['inpopup'] = $inpopup;\n if ($errorcode == 3) {\n $label = get_string ('deploy', 'resource');\n } else if ($errorcode == 4) {\n $label = get_string ('redeploy', 'resource');\n }\n $method='post';\n /// Let's go with the button\n echo '<center>';\n print_single_button($link, $options, $label, $method);\n echo '</center>';\n }\n print_simple_box_end();\n /// Close button if inpopup\n if ($inpopup) {\n close_window_button();\n }\n\n print_footer();\n exit;\n }\n\n /// Load serialized IMS CP index to memory only once.\n if (empty($items)) {\n if (!$this->isrepository) {\n $resourcedir = $CFG->dataroot.'/'.$course->id.'/'.$CFG->moddata.'/resource/'.$resource->id;\n }\n else {\n $resourcedir = $CFG->repository . $resource->reference;\n }\n if (!$items = ims_load_serialized_file($resourcedir.'/moodle_inx.ser')) {\n error (get_string('errorreadingfile', 'error', 'moodle_inx.ser'));\n }\n }\n\n /// Check whether this is supposed to be a popup, but was called directly\n\n if (empty($frameset) && $resource->popup && !$inpopup) { /// Make a page and a pop-up window\n\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" target=\\\"resource{$resource->id}\\\" onclick=\\\"return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', 'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo \"<p>&nbsp;</p>\";\n echo '<p align=\"center\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo \"</p>\";\n\n print_footer($course);\n exit;\n }\n\n\n /// No frames or framesets anymore, except iframe. in print_ims, iframe filled.\n /// needs callback to this file to display table of contents in the iframe so\n /// $frameset = 'toc' leads to output of toc and blank or 'ims' produces the\n /// iframe.\n if (empty($frameset) || $frameset=='ims') {\n\n /// Conditional argument to pass to IMS JavaScript. Need to be global to retrieve it from our custom javascript! :-(\n global $jsarg;\n $jsarg = 'false';\n if (!empty($this->parameters->navigationmenu)) {\n $jsarg = 'true';\n }\n /// Define $CFG->javascript to use our custom javascript. Save the original one to add it from ours. Global too! :-(\n global $standard_javascript;\n $standard_javascript = $CFG->javascript; // Save original javascript file\n $CFG->javascript = $CFG->dirroot.'/mod/resource/type/ims/javascript.php'; //Use our custom IMS javascript code\n\n /// moodle header\n if ($resource->popup) {\n //print_header($pagetitle, $course->fullname.' : '.$resource->name);\n print_header();\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n }\n /// content - this produces everything else\n $this->print_ims($cm, $course, $items, $resource, $page);\n /// Moodle footer is back! Now using the DOMContentLoaded event (see resize.js) to trigger the resize\n /// no Moodle footer (because we cannot insert there the resize script).\n /// echo \"</div></div><script type=\\\"text/javascript\\\">resizeiframe($jsarg);</script></body></html>\";\n /// print_footer();\n echo \"</div></div></body></html>\";\n\n /// log it.\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n exit;\n }\n\n if ($frameset == 'toc') {\n print_header();\n $this->print_toc($items, $resource, $page);\n echo '</div></div></body></html>';\n exit;\n }\n }", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.64993453", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6273607", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62220424", "text": "public function getAction()\n {\n \t/**\n \t * @todo handle error cases and return an error, return valid users ondly\n \t */\n \t$id = $this->_request->getParam('id');\n \t$result = $this->_table->find($id);\n \t$this->view->resource = $result->current();\n }", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.6141969", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "556fa9c7c8b0bbfca3848834f795e687", "score": "0.6119021", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60701436", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.6056663", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "02d611037299aac573636734fd64f517", "score": "0.59945476", "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_League l')\n ->where('l.leagueid = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->league = $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": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "7b8f897ba2297696b69f6d8202444107", "score": "0.59492433", "text": "public function displayAction()\n {\n $params = $this->dispatcher->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n echo Las::display($firewall->name);\n }\n }", "title": "" }, { "docid": "89b549ed67b4702bbd94de618931239c", "score": "0.594717", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "text": "public function display()\n {\n $this->_getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.5861693", "text": "public function viewResources($resourceid='')\n {\n $resourceid = db::escapechars($resourceid);\n \n $sql = \"SELECT * FROM kidschurchresources ORDER BY resourceName ASC\";\n $resources = db::returnallrows($sql);\n if(count($resources) > 0){\n $resourceOutput = \"<table class=\\\"memberTable\\\"><tr><th>ID</th><th>Name</th><th>Description</th><th>Type</th><th>Quantity</th><th>Task</th></tr>\";\n foreach($resources as $resource){\n if($resource['resourceID'] == $resourceid){\n $resourceOutput .= \"<tr class=\\\"highlight\\\">\";\n }\n else{\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"<td>\".$resource['resourceID'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceName'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceDescription'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceType'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceQuantity'].\"</td>\";\n $resourceOutput .= \"<td> \n <a href=\\\"index.php?mid=431&action=edit&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"runbutton\\\">Edit</a>\n <a href=\\\"index.php?mid=430&action=remove&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"delbutton\\\">Remove</a>\n </td>\";\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"</table>\";\n }\n else{\n $resourceOutput = \"<p>There are no resources stored at present.</p>\";\n }\n return $resourceOutput;\n }", "title": "" }, { "docid": "8c23114005d84f0741705b7da9ef9695", "score": "0.58511454", "text": "public function list_display($resource){\n\t\techo(\"<table border='1' >\\n<tr>\");\n\t\tforeach($this->list_headers as $head){\n\t\t\techo(\"<th>$head</th>\\n\");\n\t\t}\n\t\tif($this->ed_flag){\n\t\t\techo(\"<th colspan='2'>Admin</th>\\n\");\n\t\t}\n\t\techo(\"</tr>\");\n\t\twhile($row = mysql_fetch_array($resource)){\n\t\t\t\techo(\"<tr>\\n\");\n\t\t\t\tforeach($row as $key => $value) {\n\t\t\t\t$row[$key] = stripslashes($value);\n\t\t\t}\n\t\t\tforeach($this->list_table_cols as $val) {\n\t\t\t\techo(\"<td valign='top'>$row[$val]</td>\");\n\t\t\t}\n\t\t\tif($this->ed_flag){\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Edit</a></td>\\n\"); //Adds Edit button to end of display table\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Delete</a></td>\\n\"); //Adds Delete button to end of display table\n\t\t\t}\n\t\t}\n\t\techo(\"</tr>\\n</table>\");\n\t}", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843188", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5841994", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.5824328", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.58195084", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n if (empty($this->value)) {\n $this->value = null;\n }\n\n try {\n $file = new GenericFile($this->value);\n\n $path = FileCache::get($file, function ($file, $path) {\n return basename($path);\n });\n\n $url = vsprintf('%s/%s', [\n 'nova-vendor/skydiver/nova-cached-images',\n $path\n ]);\n\n $value = url($url);\n } catch (\\Throwable $th) {\n $value = 'remote image not found';\n }\n\n $this->value = $value;\n }", "title": "" }, { "docid": "58526873a63ddff4b306282ce5155a89", "score": "0.58138895", "text": "public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "426c72f34858b1f8fc0c2377d1350691", "score": "0.58062166", "text": "public function show()\n {\n $arguments = func_get_args()[0];\n $id = $arguments[0];\n\n echo \"Show $id\";\n // return $this->view('example.show');\n }", "title": "" }, { "docid": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57953733", "text": "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::add('error', 'msg_info', array('message' => Kohana::message('gw', 'event.view.not_allowed'), 'is_persistent' => FALSE, 'hash' => Text::random($length = 10)));\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5777744", "text": "protected function _resource($data, $name)\r\n {\r\n $data = get_resource_type($data);\r\n $this->_renderNode('Resource', $name, $data);\r\n }", "title": "" }, { "docid": "ecd6aa7074b9a655f317e213378a7ab9", "score": "0.57773685", "text": "public function show() {\n if (isset($_GET['name'])) {\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n $this->view->setData($this->model::get($_GET));\n $this->view->setTemplate(SRC_SHOW);\n $this->view->setLayout(SHOW_LAYOUT);\n $this->view->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "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": "91b553cd446c5431be6377bad7d6e9b7", "score": "0.57440376", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "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": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5712024", "text": "protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract\n {\n $uri = $this->getResourceUri($name, $options) . '/{' . $base . '}';\n\n $action = $this->getResourceAction($name, $controller, 'show', $options);\n\n return $this->router->get($uri, $action);\n }", "title": "" }, { "docid": "61a627e0c8c8b3a47cc8487387ee35b2", "score": "0.57057", "text": "public function show($id)\n\t{\n\t\t//No need for showing\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "690a36be877c22d14829a018fd5e04e9", "score": "0.56947994", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $information = $em->getRepository('ThiefaineReferentielBundle:Information')->find($id);\n\n if (!$information) {\n throw $this->createNotFoundException(\"Impossible de trouver l'information.\");\n }\n\n $showForm = $this->createShowForm($information);\n $twig = 'ThiefaineReferentielBundle:Information:show.html.twig';\n $paramTwig = array(\n 'information' => $information,\n 'show_form' => $showForm->createView(),\n );\n\n return $this->render($twig,$paramTwig);\n }", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694748", "text": "public function show($id)\n {\n $this->crud->hasAccessOrFail('show');\n\n // set columns from db\n $this->crud->setFromDb();\n\n // cycle through columns\n foreach ($this->crud->columns as $key => $column) {\n // remove any autoset relationship columns\n if (array_key_exists('model', $column) && array_key_exists('autoset', $column) && $column['autoset']) {\n $this->crud->removeColumn($column['name']);\n }\n }\n\n // get the info for that entry\n $this->data['entry'] = $this->crud->getEntry($id);\n $this->data['crud'] = $this->crud;\n $this->data['title'] = trans('bcrud::crud.preview').' '.$this->crud->entity_name;\n\n // remove preview button from stack:line\n $this->crud->removeButton('preview');\n $this->crud->removeButton('delete');\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->getShowView(), $this->data);\n }", "title": "" }, { "docid": "851cd390daf8f79de66a294538711bfd", "score": "0.5691463", "text": "public function view(HTTPRequest $request)\n {\n $id = $request->param('ID');\n if ($display = Display::get_by_id($id)) {\n return $this->renderPresentation($display);\n }\n\n return $this->httpError(404);\n }", "title": "" }, { "docid": "89380f02c69f1ed066b5443620b90407", "score": "0.568851", "text": "public function show($id)\n\t{ \n \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": "" } ]
4ede9b6bd28bc20c962a44a2601f1540
Search Donation or/and Needs
[ { "docid": "e8a4d62d846566924fb9fb764032741d", "score": "0.77099186", "text": "public function searchDonationsOrNeeds(){\n\n $search = Input::get('search');\n $searchFor = Input::get('type');\n $donations = array();\n $needs = array();\n \n if($searchFor == \"all\" || $searchFor =='donations'){\n $donations = $this->donation->searchDonations($search);\n }\n if($searchFor == \"all\" || $searchFor == \"needs\"){\n $needs = $this->need->searchNeeds($search);\n }\n \n Input::flash();\n return view('frontend/home')\n ->with([\n 'donations' => ($donations) ? $donations : array(),\n 'needs' => ($needs) ? $needs : array()\n ]);\n \n }", "title": "" } ]
[ { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.6059944", "text": "public function search();", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.6059944", "text": "public function search();", "title": "" }, { "docid": "76e60206e9295323fd6822b466349ec0", "score": "0.6056088", "text": "public function search(){}", "title": "" }, { "docid": "033e9371f5b63a538cd31f6ff7ffeef1", "score": "0.5797781", "text": "public function search()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "f2b1db8a8397bfc08cc93ee2098866f2", "score": "0.5754719", "text": "public function searchWithCriteria(){\n\n\n //change default message for required rule\n $this->unsetSessionData();\n $this->setSessionData();\n\n\n if(isset($_SESSION['searchKeyword']) && isset($_SESSION['timecon'])){\n $this->searchByLocationAndDay();\n }else if(isset($_SESSION['searchKeyword']) && isset($_SESSION['timecon'])==FALSE){\n $this->searchByLocation();\n }else if(isset($_SESSION['searchKeyword'])==FALSE && isset($_SESSION['timecon'])){\n $this->searchByCalendar();\n }\n }", "title": "" }, { "docid": "c697a125b4643aa2f29fcc30883d24be", "score": "0.5706981", "text": "function search() {}", "title": "" }, { "docid": "a4df84f9f144fbb0ef1a27732ba0b5e6", "score": "0.5669514", "text": "function search( $searchText, $params = array(), $searchTypes = array() )\n {\t\n \n $cl = new SphinxClient();\n\t \t$cl->SetServer( $this->SphinxServerHost, $this->SphinxServerPort );\n\t \t\n\t \t// Match mode\n\t \t$matchModes = array(\n\t \t\t'SPH_MATCH_ANY' => SPH_MATCH_ANY,\n\t \t\t'SPH_MATCH_ALL' => SPH_MATCH_ALL,\n\t \t\t'SPH_MATCH_PHRASE' => SPH_MATCH_PHRASE,\n\t \t\t'SPH_MATCH_BOOLEAN' => SPH_MATCH_BOOLEAN,\n\t \t\t'SPH_MATCH_EXTENDED' => SPH_MATCH_EXTENDED,\n\t \t\t'SPH_MATCH_FULLSCAN' => SPH_MATCH_FULLSCAN,\n\t \t\t'SPH_MATCH_EXTENDED2' => SPH_MATCH_EXTENDED2,\n\t \t);\t \t\n\t \t$cl->SetMatchMode((isset($params['MatchType']) and key_exists($params['MatchType'],$matchModes)) ? $matchModes[$params['MatchType']] : SPH_MATCH_ANY);\n\t \t\n\t \t \n\t \t// Perhaps anyone have an idea how to implement this type checking in Sphinx ?\n\t \t// (ezcontentobject.section_id in (1)) OR (ezcontentobject.contentclass_id in (1, 19, 20, 27, 29, 30, 31, 32, 33, 34, 40, 44, 47, 48, 50, 51, 52, 57, 59, 61) AND ezcontentobject.section_id in (3))\n\t \t// At this moment it can be implemented directly in sphinx configuration query.\n\t \t/*$limitation = false;\n if ( isset( $params['Limitation'] ) )\n {\n $limitation = $params['Limitation'];\n }\n $limitationList = eZContentObjectTreeNode::getLimitationList( $limitation );\n $sqlPermissionChecking = eZContentObjectTreeNode::createPermissionCheckingSQL( $limitationList );*/\n \n\t \t\n\t \t// Set limit, offset\t \t\n\t\t$cl->SetLimits((int)$params['SearchOffset'],(int)$params['SearchLimit']);\n\t\t\t \n\t\t// Language filter, eZFind copied and changed a little bit :D\n\t\t$ini = eZINI::instance();\n $languages = $ini->variable( 'RegionalSettings', 'SiteLanguageList' );\n $mainLanguage = $languages[0]; \n $cl->SetFilter( 'language_code',array(abs(crc32($mainLanguage))));\n \n // Fetch only not deleted records\n\t\t$cl->SetFilter( 'is_deleted',array(0));\n\t\t\n\t\t\t\n\t \t// Build section filter\n\t \t$searchSectionID = $params['SearchSectionID'];\n\t \tif ( is_numeric( $searchSectionID ) and $searchSectionID > 0 )\n { \n $cl->SetFilter( 'section_id', array( (int)$searchSectionID ) );\n }\n else if ( is_array( $searchSectionID ) )\n {\n \t$cl->SetFilter( 'section_id',$searchSectionID);\n }\n \n // Build class filter \n $searchContentClassID = isset($params['SearchContentClassID']) ? $params['SearchContentClassID'] : 0 ; \n if ( is_numeric( $searchContentClassID ) and $searchContentClassID > 0 )\n {\n \t $cl->SetFilter( 'contentclass_id', array((int)$searchContentClassID));\n }\n else if ( is_array( $searchContentClassID ) )\n { \n $cl->SetFilter( 'contentclass_id',$searchContentClassID);\n }\n \n // Build parent node filter\n $searchParentNodeID = isset($params['ParentNodeID']) ? $params['ParentNodeID'] : 0 ; \n if ( is_numeric( $searchParentNodeID ) and $searchParentNodeID > 0 )\n {\n \t $cl->SetFilter( 'parent_node_id', array((int)$searchParentNodeID));\n }\n else if ( is_array( $searchParentNodeID ) )\n { \n $cl->SetFilter( 'parent_node_id',$searchParentNodeID);\n }\n \n // Build subtree filter\n $searchSubtreeNodeID = isset($params['SearchSubTreeArray']) ? $params['SearchSubTreeArray'] : 0 ; \n if ( is_numeric( $searchSubtreeNodeID ) and $searchSubtreeNodeID > 0 )\n {\n \t $cl->SetFilter( 'pathnodes', array((int)$searchSubtreeNodeID));\n }\n else if ( is_array( $searchSubtreeNodeID ) and count( $searchSubtreeNodeID ) )\n { \n $cl->SetFilter( 'pathnodes',$searchSubtreeNodeID);\n }\n \n \n // Visibility check\n $ignoreVisibility = $params['IgnoreVisibility'] == 'true' ? true : false;\n if (!$ignoreVisibility)\n {\n \t\t$cl->SetFilter( 'is_invisible',array(0));\n } \n \n // Publish date,timestamp date filter, borrowed from ezsearchengine plugin. :) \n if ( isset( $params['SearchDate'] ) )\n \t$searchDate = $params['SearchDate'];\n\t else\n\t\t $searchDate = -1;\n\t\t\n\t if ( isset( $params['SearchTimestamp'] ) )\n\t\t $searchTimestamp = $params['SearchTimestamp'];\n\t else\n\t\t $searchTimestamp = false;\n \t\t \n \n if ( ( is_numeric( $searchDate ) and $searchDate > 0 ) or\n $searchTimestamp )\n {\n $date = new eZDateTime();\n $timestamp = $date->timeStamp();\n $day = $date->attribute('day');\n $month = $date->attribute('month');\n $year = $date->attribute('year');\n $publishedDateStop = false;\n if ( $searchTimestamp )\n {\n if ( is_array( $searchTimestamp ) )\n {\n $publishedDate = $searchTimestamp[0];\n $publishedDateStop = $searchTimestamp[1];\n }\n else\n $publishedDate = $searchTimestamp;\n }\n else\n {\n switch ( $searchDate )\n {\n case 1:\n {\n $adjustment = 24*60*60; //seconds for one day\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 2:\n {\n $adjustment = 7*24*60*60; //seconds for one week\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 3:\n {\n $adjustment = 31*24*60*60; //seconds for one month\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 4:\n {\n $adjustment = 3*31*24*60*60; //seconds for three months\n $publishedDate = $timestamp - $adjustment;\n } break;\n case 5:\n {\n $adjustment = 365*24*60*60; //seconds for one year\n $publishedDate = $timestamp - $adjustment;\n } break;\n default:\n {\n $publishedDate = $date->timeStamp();\n }\n }\n }\n \n if ($publishedDateStop)\n {\n \t$cl->SetFilterRange('published', $publishedDate, $publishedDateStop); // Range type\n } else {\n \t$cl->SetFilterRange('published', 0, $publishedDate, true); // > type\n }\n }\n \n if ( isset( $params['SortBy'] ) )\n $sortArray = $params['SortBy'];\n else\n $sortArray = array(); \n \n // Build sort params \n \t$sortString = $this->buildSort($sortArray); \t\n \tif ($sortString != '')\n \t{\n \t\t$cl->SetSortMode(SPH_SORT_EXTENDED, $sortString); // During sorting we set extended sort mode\n \t}\n \n \n \t\n // Filter , Partly based on ezpersistenobject eZPersistentObject::conditionTextByRow() method \t\n\t\t$fitlerRanges = isset($params['Filter']) ? $params['Filter'] : null;\n\t\tif ( is_array( $fitlerRanges ) and\n count( $fitlerRanges ) > 0 )\n {\n \t\n \tforeach ($fitlerRanges as $id => $cond)\n \t{ \t\t\n \t\tif ( is_array( $cond ) )\n {\n if ( is_array( $cond[0] ) ) // = operator behaviour\n {\n \t$cl->SetFilter( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) , (int)$cond[0] ); \n }\n else if ( is_array( $cond[1] ) ) // Betweeen range\n { \n $range = $cond[1];\n $cl->SetFilterRange('attr_srch_int_pos'.$this->getPositionClassAttribute($id), (int)$range[0], (int)$range[1], $cond[0] == 'true' ); \t\n }\n else\n {\n switch ( $cond[0] )\n {\n case '>=': \n case '>': \n {\n \t $cl->SetFilterRange( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) ,0, (int)$cond[1], true );\n \n } break;\n \n case '<=': \n case '<': \n {\n \t $cl->SetFilterRange( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id),0, (int)$cond[1], false );\n \n } break;\n \n \n default:\n {\n eZDebug::writeError( \"Conditional operator '$cond[0]' is not supported.\",'eZSphinx::search()' );\n } break;\n }\n\n }\n } else {\n \t$cl->SetFilter( 'attr_srch_int_pos'.$this->getPositionClassAttribute($id) , array($cond) ); \t\n }\n \t}\n }\n\t\t\n // Sphinx field weightning\n if (isset($params['FieldWeight']) and is_array($params['FieldWeight']) and count($params['FieldWeight']) > 0)\n {\n \t$tmpFields = array();\n \tforeach ($params['FieldWeight'] as $classAttributeID => $weight)\n \t{\n \t\t$tmpFields['attr_srch_pos'.$this->getPositionClassAttribute($classAttributeID)] = $weight;\n \t} \n \t$cl->SetFieldWeights($tmpFields);\n \tunset($tmpFields);\n }\n \n \n // this will work only if SPH_MATCH_EXTENDED mode is set\n $AppendExtendQuery = '';\n if (isset($params['MatchType']) and key_exists($params['MatchType'],$matchModes) and $matchModes[$params['MatchType']] == SPH_MATCH_EXTENDED)\n {\n \t$searchClassAttributeID = isset($params['SearchClassAttributeID']) ? $params['SearchClassAttributeID'] : 0 ; \n\t if ( is_numeric( $searchClassAttributeID ) and $searchClassAttributeID > 0 )\n\t {\n\t \t $AppendExtendQuery = '@attr_srch_pos'.$this->getPositionClassAttribute((int)$searchClassAttributeID).' ';\n\t }\n\t else if ( is_array( $searchClassAttributeID ) )\n\t { \n\t \n\t $SubElements = array();\n\t foreach ($searchClassAttributeID as $ClassAttributeID)\n\t {\n\t \t$SubElements[] = 'attr_srch_pos'.$this->getPositionClassAttribute($ClassAttributeID);\n\t }\n\t \t$AppendExtendQuery = '@('.implode(',',$SubElements).') ';\t \n\t }\n }\n \n // Transofrm without special characters like i understood. Actualy in sphinx it's not needed. But like indexing converts them to normalized text, it will be changed in futher versions..\n $trans = eZCharTransform::instance();\n $searchText = $trans->transformByGroup( $searchText, 'search' ); \n\t \t$result = $cl->Query( $AppendExtendQuery.trim($searchText) , isset($params['IndexName']) ? $params['IndexName'] : $this->SphinxIndexName );\n\t \t\t\n\t \t// If nothing found return immediately \t\n\t \tif ($result['total_found'] == 0)\n\t \t{\t \t\n\t\t \treturn array( \"SearchResult\" => array(),\n\t \"SearchCount\" => 0,\n\t \"StopWordArray\" => array() );\n\t \t} \n\t \t\n\t \t$NodeIDList = array();\n\t \n\t \t$SingleNodeID = null;\n\t \t\n\t \tif ($result['total_found'] > 1)\n\t \t{\n\t\t \t// Build nodes ID's\n\t\t \tforeach ($result['matches'] as $match)\n\t\t \t{ \t\t\n\t\t \t\t$NodeIDList[$match['attrs']['node_id']] = $match['attrs']['node_id'];\n\t\t \t}\n\t \t} else {\n\t \t\t\tforeach ($result['matches'] as $match)\n\t\t\t \t{\t \t\t\n\t\t\t \t\t$NodeIDList = $match['attrs']['node_id'];\n\t\t\t \t\t$SingleNodeID = $match['attrs']['node_id'];\n\t\t\t \t}\n\t \t}\n\t \t\n\t \t\n\t \t$nodeRowList = array();\n \t\t$tmpNodeRowList = eZContentObjectTreeNode::fetch( $NodeIDList, false, isset($params['AsObjects']) ? $params['AsObjects'] : true );\n \t\t \t\n // Workaround for eZContentObjectTreeNode::fetch behaviour\n if ( count( $tmpNodeRowList ) === 1 )\n {\n $tmpNodeRowList = array( $tmpNodeRowList ); \n unset($NodeIDList); \n $NodeIDList = array();\n $NodeIDList[$SingleNodeID] = $SingleNodeID;\n }\n \n // If fetched objects, keeps fetched sorting as Sphinx returned it\n if (!isset($params['AsObjects']) || $params['AsObjects'] === true)\n { \n\t\t\tforeach ($tmpNodeRowList as $node)\n\t\t\t{\n\t\t\t\t$NodeIDList[$node->attribute('node_id')] = $node;\n\t\t\t}\n } else { // If fetched array\n \tforeach ($tmpNodeRowList as $node)\n\t\t\t{\n\t\t\t\t$NodeIDList[$node['node_id']] = $node;\n\t\t\t}\n } \n \tunset($tmpNodeRowList);\n \t \t\n\t \t$searchResult = array(\n\t \t\t'SearchCount' => $result['total_found'],\n\t \t\t'SearchResult' => $NodeIDList,\n\t \t\t'SearchTook' => $result['time'],\n\t \t\t\"StopWordArray\" => array() // Perhaps anyone nows how to set this ? :)\n\t \t);\n \n return $searchResult; \n }", "title": "" }, { "docid": "2edf49a0cb590a59026e280e13f58572", "score": "0.56676555", "text": "function search() {\n\t$clauses = [];\n\t$params = [];\n\n // When searching for fire/last name, we use like clauses for fuzzy searching.\n buildLikeClause('first_name', 'first_name', $params, $clauses);\n buildLikeClause('last_name', 'last_name', $params, $clauses);\n\n // Do an equality search for the dept.\n if (isset($_GET['dept'])) {\n $dept = trim($_GET['dept']);\n if (strlen($dept)) {\n $clauses[] = \"dept = ?\";\n $params[] = $dept;\n }\n }\n\n // Use equality searching for courses and p_langs.\n buildAlternationSubClause('courses', 'courses', $params, $clauses);\n buildAlternationSubClause('p_langs', 'p_langs', $params, $clauses);\n\n // Connect to the db.\n $db = new PDO(\"mysql:host=localhost;dbname=cmpe226\", \"root\", \"\");\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // Finish constructing our sql.\n $sql = 'SELECT * FROM studentrecord_assignment1';\n if ($clauses) {\n $sql .= ' where ' . join(' and ', $clauses);\n }\n\n // Execute and fetch.\n $stmt = $db->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "a84bdd8962c8d2979b653127365beca6", "score": "0.5658075", "text": "public function search($para1){ \n\t\t$this->layout = false;\t\t\n\t\t$approve_cond = $para1 == 'pending' ? array('is_approve' => 'W','Client.status' => '2') : array('is_approve' => 'A','Client.status' => '0');\n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\t\t\t\n\t\t\t$this->Client->unBindModel(array('belongsTo' => array('Creator')));\n\t\t\t$data = $this->Client->find('all', array('fields' => array('Client.client_name','ContactBranch.branch'),\n\t\t\t'group' => array('Client.client_name','ContactBranch.branch'), 'conditions' => \tarray(\"OR\" => array ('Client.client_name like' => '%'.$q.'%',\n\t\t\t'ContactBranch.branch like' => '%'.$q.'%'), 'AND' => array('Client.is_deleted' => 'N', $approve_cond))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "title": "" }, { "docid": "2b875edb8a5eccd18767951ae6354770", "score": "0.5622753", "text": "public function search($search)\n {\n // $search_fields = ['from', 'to', 'fundraiser_user_id', 'amount'];\n\n $online_donation = new Online_Donation;\n $online = $online_donation->search($search)->get();\n\n $online->map(function($don) {\n $don->type = 'online_donation';\n $don->status = 'receipted';\n return $don;\n });\n\n $donut_donation = new Donation;\n\n // If someone searches specifically for 'all', don't filter by donation type. This will be needed for getting historic donation data.\n if(isset($search['type'])) {\n if($search['type'] == 'all') {\n unset($search['type']);\n }\n } else { // If no type is specified, use the 'crowdfunding_patforms' - for 2020 and forward.\n $search['type'] = 'crowdfunding_patforms'; \n }\n $donuts = $donut_donation->baseSearch($search)->get();\n\n $all_donations = $online->merge($donuts)->sortByDesc('added_on')->all();\n\n return array_values($all_donations); // If array_values is not there, it will preserve the key after sorting. Array index will be something like 3,0,2,1.\n }", "title": "" }, { "docid": "fe816e0e59f9ab7df7202c56dd35edb7", "score": "0.55596924", "text": "public function search($params = []);", "title": "" }, { "docid": "903868e4cd086663dd7c910905abeb7d", "score": "0.5544113", "text": "function criteria(&$query){\n $id = $this->input->post('id', true);\n $k = $this->input->post('k', true);/*kind*/\n $t = $this->input->post('t', true);/*title*/\n $s = $this->input->post('s', true);/*sub*/\n $b = $this->input->post('b', true);/*background*/\n $so = $this->input->post('so', true);/*sort*/\n if(!empty($id)){/*where like include: before(%pattern), after(pattern%) and both(%pattern%)*/\n $query = $query->like('id', $id, 'both');\n }\n if(!empty($k)){\n $query = $query->like('kind', $k, 'both');\n }\n if(!empty($t)){\n $query = $query->like('title', $t, 'both');\n }\n if(!empty($s)){\n $query = $query->like('sub', $s, 'both');\n }\n if(!empty($b)){\n $query = $query->like('background', $b, 'both');\n }\n if(!empty($so)){\n $query = $query->like('sort', $so, 'both');\n }\n }", "title": "" }, { "docid": "e013aaf04591bb865ab997578bec6da7", "score": "0.5539066", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('drg_id',$this->drg_id);\n\t\t$criteria->compare('drg_uid',$this->drg_uid,true);\n\t\t$criteria->compare('drg_name',$this->drg_name,true);\n\t\t$criteria->compare('drg_surname',$this->drg_surname,true);\n\t\t$criteria->compare('drg_email',$this->drg_email,true);\n\t\t$criteria->compare('drg_username',$this->drg_username,true);\n\t\t$criteria->compare('drg_pass',$this->drg_pass,true);\n\t\t$criteria->compare('drg_image',$this->drg_image,true);\n\t\t$criteria->compare('drg_addr1',$this->drg_addr1,true);\n\t\t$criteria->compare('drg_addr2',$this->drg_addr2,true);\n\t\t$criteria->compare('drg_addr3',$this->drg_addr3,true);\n\t\t$criteria->compare('drg_town',$this->drg_town,true);\n\t\t$criteria->compare('drg_county',$this->drg_county,true);\n\t\t$criteria->compare('drg_zip',$this->drg_zip,true);\n\t\t$criteria->compare('drg_country',$this->drg_country,true);\n\t\t$criteria->compare('drg_phone',$this->drg_phone,true);\n\t\t$criteria->compare('drg_gender',$this->drg_gender,true);\n\t\t$criteria->compare('drg_dob',$this->drg_dob,true);\n\t\t$criteria->compare('drg_question',$this->drg_question,true);\n\t\t$criteria->compare('drg_answer',$this->drg_answer,true);\n\t\t$criteria->compare('drg_pstatus',$this->drg_pstatus,true);\n\t\t$criteria->compare('drg_notes',$this->drg_notes,true);\n\t\t$criteria->compare('drg_rdate',$this->drg_rdate,true);\n\t\t$criteria->compare('drg_ltime',$this->drg_ltime,true);\n\t\t$criteria->compare('drg_ip',$this->drg_ip,true);\n\t\t$criteria->compare('drg_status',$this->drg_status,true);\n\t\t$criteria->compare('drg_currency',$this->drg_currency);\n\t\t$criteria->compare('co_slogon',$this->co_slogon,true);\n\t\t$criteria->compare('co_title',$this->co_title,true);\n\t\t$criteria->compare('co_fax',$this->co_fax,true);\n\t\t$criteria->compare('co_website',$this->co_website,true);\n\t\t$criteria->compare('co_name',$this->co_name,true);\n\t\t$criteria->compare('drg_user_type',$this->drg_user_type,true);\n\t\t$criteria->compare('drg_verifycode',$this->drg_verifycode,true);\n\t\t$criteria->compare('drg_active_link',$this->drg_active_link,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "5fd540aa7aa58c63d3d323121e7b0977", "score": "0.5528264", "text": "public function queryAll($campos=\"*\",$criterio=\"\");", "title": "" }, { "docid": "803d6600be55815176a91e3c694d37b0", "score": "0.55109507", "text": "function search($conn)\n{\n $includedValue = getIncludedValues(); //Get user included values\n $excludedValue = getExcludedValues(); //Get user excluded values\n if ($includedValue != \"\" && $excludedValue != \"\") {\n changeText(\"ShowSearchString\", \"Include: \" . $includedValue . \"</br>Exclude: \" . $excludedValue);\n } elseif ($includedValue != \"\") {\n changeText(\"ShowSearchString\", \"Include: \" . $includedValue);\n } elseif ($excludedValue != \"\") {\n changeText(\"ShowSearchString\", \"Exclude: \" . $excludedValue);\n } else {\n changeText(\"DefaultString\", \"Show All by Default Search\");\n }\n $searchString = getSearchString();\n $sql = \"SELECT * FROM contribution\" . $searchString;\n $inputObject = new searchObject();\n $inputObject->set_attributes();\n return getData($conn, $sql, $inputObject);\n}", "title": "" }, { "docid": "d17fe93063a83de8016ddc10b17c79fc", "score": "0.5495036", "text": "function search()\n\t{}", "title": "" }, { "docid": "d17fe93063a83de8016ddc10b17c79fc", "score": "0.5495036", "text": "function search()\n\t{}", "title": "" }, { "docid": "60ed6c7e434b993b53b157c524e422fc", "score": "0.5485076", "text": "public function getSearch();", "title": "" }, { "docid": "035897524f1b5340df06a13d4c3456f3", "score": "0.5439493", "text": "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('sample_id', $this->sample_id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('case_id', $this->case_id);\n $criteria->compare('date_rec', $this->date_rec, true);\n $criteria->compare('ext_inst_id', $this->ext_inst_id);\n $criteria->compare('ext_label', $this->ext_label, true);\n if (strlen($this->sample_preserve) > 1) {\n // Because we add \"\" to the top of the ENUM pulldown (see ZHTML.php)\n // We need to only add criteria when a pulldown value is selected\n $criteria->compare('sample_preserve', $this->sample_preserve, true);\n }\n if (strlen($this->status) > 1) {\n // Because we add \"\" to the top of the ENUM pulldown (see ZHTML.php)\n // We need to only add criteria when a pulldown value is selected\n $criteria->compare('status', $this->status, true);\n }\n if ($this->researcher) {\n $criteria->compare('researcher', $this->researcher, true);\n }\n if (strlen($this->sample_type) > 1) {\n // Because we add \"\" to the top of the ENUM pulldown (see ZHTML.php)\n // We need to only add criteria when a pulldown value is selected\n $criteria->compare('sample_type', $this->sample_type, true);\n }\n $criteria->compare('tissue_mion', $this->tissue_mion);\n $criteria->compare('tissue_loc_mion', $this->tissue_loc_mion);\n if (strlen($this->exp_design_sdb) > 1) {\n // Because we add \"\" to the top of the ENUM pulldown (see ZHTML.php)\n // We need to only add criteria when a pulldown value is selected\n $criteria->compare('exp_design_sdb', $this->exp_design_sdb, true);\n }\n $criteria->compare('tissue_sdb', $this->tissue_sdb, true);\n $criteria->compare('lib_id_sdb', $this->lib_id_sdb, true);\n if (strlen($this->sample_use) > 1) {\n // Because we add \"\" to the top of the ENUM pulldown (see ZHTML.php)\n // We need to only add criteria when a pulldown value is selected\n $criteria->compare('sample_use', $this->sample_use, true);\n }\n $criteria->compare('note', $this->note, true);\n $criteria->compare('status_sdb', $this->status_sdb, true);\n $criteria->compare('antibody', $this->antibody, true);\n $criteria->compare('treatment', $this->treatment, true);\n $criteria->compare('knockdown', $this->knockdown, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => 25,\n ),\n ));\n }", "title": "" }, { "docid": "103bdd1a0ac269fff2a8a0c5d5a92d45", "score": "0.54362583", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('ID', $this->ID, true);\n $criteria->compare('IntentionName', $this->IntentionName, true);\n $criteria->compare('RentPrice', $this->RentPrice, true);\n $criteria->compare('RentUnit', $this->RentUnit, true);\n $criteria->compare('SalePrice', $this->SalePrice, true);\n $criteria->compare('SaleUnit', $this->SaleUnit, true);\n $criteria->compare('IsNegotiable', $this->IsNegotiable);\n $criteria->compare('StuctureArea', $this->StuctureArea);\n $criteria->compare('StuctureAreaUnit', $this->StuctureAreaUnit, true);\n $criteria->compare('UsedArea', $this->UsedArea);\n $criteria->compare('UsedAreaUnit', $this->UsedAreaUnit, true);\n $criteria->compare('CategoryName', $this->CategoryName, true);\n $criteria->compare('FloorHeight', $this->FloorHeight);\n $criteria->compare('StructureName', $this->StructureName, true);\n $criteria->compare('FunctionName', $this->FunctionName, true);\n $criteria->compare('RentPeriodA', $this->RentPeriodA, true);\n $criteria->compare('RentPeriodB', $this->RentPeriodB, true);\n $criteria->compare('Contact', $this->Contact, true);\n $criteria->compare('Phone', $this->Phone, true);\n $criteria->compare('RentalType', $this->RentalType, true);\n $criteria->compare('MinArea', $this->MinArea);\n $criteria->compare('Height', $this->Height);\n $criteria->compare('Width', $this->Width);\n $criteria->compare('LandLincense', $this->LandLincense, true);\n $criteria->compare('CertificateProperty', $this->CertificateProperty, true);\n $criteria->compare('LeftYears', $this->LeftYears);\n $criteria->compare('ProtocolUrl', $this->ProtocolUrl, true);\n $criteria->compare('Details', $this->Details, true);\n $criteria->compare('InfoValidPeriod', $this->InfoValidPeriod, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "257a5b19dd7dbf1e57b76f6b353062f6", "score": "0.5432802", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cdos',$this->cdos,true);\n\t\t$criteria->compare('cus',$this->cus,true);\n\t\t$criteria->compare('nam',$this->nam,true);\n\t\t$criteria->compare('sur',$this->sur,true);\n\t\t$criteria->compare('mid',$this->mid,true);\n\t\t$criteria->compare('otn',$this->otn,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('telephone',$this->telephone,true);\n\t\t$criteria->compare('dbir',$this->dbir,true);\n\t\t$criteria->compare('mna',$this->mna,true);\n\t\t$criteria->compare('fna',$this->fna,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('res',$this->res,true);\n\t\t$criteria->compare('tcus',$this->tcus,true);\n\t\t$criteria->compare('resnam',$this->resnam,true);\n\t\t$criteria->compare('rso',$this->rso,true);\n\t\t$criteria->compare('breg',$this->breg,true);\n\t\t$criteria->compare('tpc',$this->tpc,true);\n\t\t$criteria->compare('qua',$this->qua,true);\n\t\t$criteria->compare('sal',$this->sal);\n\t\t$criteria->compare('ca',$this->ca);\n\t\t$criteria->compare('town',$this->town,true);\n\t\t$criteria->compare('tbir',$this->tbir,true);\n\t\t$criteria->compare('pro',$this->pro,true);\n\t\t$criteria->compare('sec',$this->sec,true);\n\t\t$criteria->compare('sta',$this->sta,true);\n\t\t$criteria->compare('proc',$this->proc,true);\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('idis',$this->idis,true);\n\t\t$criteria->compare('idid',$this->idid,true);\n\t\t$criteria->compare('ided',$this->ided,true);\n\t\t$criteria->compare('psp',$this->psp,true);\n\t\t$criteria->compare('pspis',$this->pspis,true);\n\t\t$criteria->compare('pspid',$this->pspid,true);\n\t\t$criteria->compare('psped',$this->psped,true);\n\t\t$criteria->compare('dcre',$this->dcre,true);\n\t\t$criteria->compare('uti',$this->uti,true);\n\t\t$criteria->compare('utimo',$this->utimo,true);\n\t\t$criteria->compare('dou',$this->dou,true);\n\t\t$criteria->compare('dmo',$this->dmo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "94edebe358af2bb0caa909991dfae2eb", "score": "0.5432634", "text": "public function get_donor($filters = array()) {\n }", "title": "" }, { "docid": "082a6198dae05d93255d975d29fdd111", "score": "0.5420827", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('kd_responden',$this->kd_responden);\n\t\t$criteria->compare('kd_umpi',$this->kd_umpi);\n\t\t$criteria->compare('sdrt',$this->sdrt);\n\t\t$criteria->compare('nomor',$this->nomor);\n\t\t$criteria->compare('nama',$this->nama,true);\n\t\t$criteria->compare('kd_tempatlahir',$this->kd_tempatlahir);\n\t\t$criteria->compare('tempatlahir',$this->tempatlahir,true);\n\t\t$criteria->compare('tgllahir',$this->tgllahir,true);\n\t\t$criteria->compare('tg',$this->tg);\n\t\t$criteria->compare('bl',$this->bl);\n\t\t$criteria->compare('th',$this->th);\n\t\t$criteria->compare('jeniskelamin',$this->jeniskelamin,true);\n\t\t$criteria->compare('kd_statusnikah',$this->kd_statusnikah);\n\t\t$criteria->compare('kd_pendidikan',$this->kd_pendidikan);\n\t\t$criteria->compare('kd_jurusanpendidikan',$this->kd_jurusanpendidikan);\n\t\t$criteria->compare('kd_agama',$this->kd_agama);\n\t\t$criteria->compare('kd_pekerjaan',$this->kd_pekerjaan);\n\t\t$criteria->compare('kd_bidangusaha',$this->kd_bidangusaha);\n\t\t$criteria->compare('bidangusaha',$this->bidangusaha,true);\n\t\t$criteria->compare('nomorkartukuning',$this->nomorkartukuning,true);\n\t\t$criteria->compare('nik',$this->nik,true);\n\t\t$criteria->compare('telpongenggam',$this->telpongenggam,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('ipk',$this->ipk,true);\n\t\t$criteria->compare('tb',$this->tb);\n\t\t$criteria->compare('bb',$this->bb);\n\t\t$criteria->compare('waktuupdate',$this->waktuupdate,true);\n\t\t$criteria->compare('kd_operator',$this->kd_operator);\n\t\t$criteria->compare('migrasi',$this->migrasi);\n\t\t$criteria->compare('waktumigrasi',$this->waktumigrasi,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t));\n\t}", "title": "" }, { "docid": "7b55a21f4971c714a86a468f16fe0609", "score": "0.54187363", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n$criteria->compare('hidturno',$this->hidturno);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$criteria->compare('codestado',$this->codestado,true);\n\t\t$criteria->compare('codigo',$this->codigo,true);\n\t\t$criteria->compare('numero',$this->numero,true);\n\t\t$criteria->compare('dispo',$this->dispo,true);\n\t\t$criteria->compare('util',$this->util,true);\n\t\t$criteria->compare('descripcion',$this->descripcion);\n\t\t$criteria->compare('np',$this->np);\n\t\t$criteria->compare('ns',$this->ns);\n\t\t$criteria->compare('htt',$this->htt,true);\n\t\t$criteria->compare('ntt',$this->ntt);\n\t\t$criteria->compare('textocorto',$this->textocorto,true);\n\t\t$criteria->compare('codcen',$this->codcen,true);\n\t\t$criteria->compare('codtipo',$this->codtipo,true);\n\t\t$criteria->compare('ap',$this->ap,true);\n\t\t$criteria->compare('nombres',$this->nombres,true);\n\t\t$criteria->compare('nombreobjeto',$this->nombreobjeto,true);\n\n\t\tif(isset($_SESSION['sesion_Trabajadores'])) {\n\t\t\t$criteria->addInCondition('codresponsable', $_SESSION['sesion_Trabajadores'], 'OR');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codresponsable',$this->codresponsable,true);\n\t\t}\n if(isset($_SESSION['sesion_Ot'])) {\n\t\t\t$criteria->addInCondition('codproyecto', $_SESSION['sesion_Ot'], 'AND');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codproyecto',$this->codproyecto,true);\n\t\t}\n if(isset($_SESSION['sesion_Inventario'])) {\n\t\t\t$criteria->addInCondition('codigoaf', $_SESSION['sesion_Inventario'], 'AND');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codigoaf',$this->codigoaf,true);\n\t\t}\n \n \n \n\t\tif((isset($this->fecha) && trim($this->fecha) != \"\") && (isset($this->fecha1) && trim($this->fecha1) != \"\")) {\n\t\t\t\t$criteria->addBetweenCondition('fecha', ''.$this->fecha.'', ''.$this->fecha1.'');\n\t\t}\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "dce1e95bad1c1881d4ba5ded99610221", "score": "0.54167855", "text": "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$data = $this->BdSpoc->find('all', array('fields' => array('HrEmployee.first_name'),\n\t\t\t'group' => array('first_name'), 'conditions' => \tarray(\"OR\" => array ('first_name like' => '%'.$q.'%'),\n\t\t\t'AND' => array('HrEmployee.status' => '1', 'HrEmployee.is_deleted' => 'N','BdSpoc.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "title": "" }, { "docid": "89a32a09387844945ef59d5ea94de0f9", "score": "0.5415818", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\n\t\t$criteria->compare('process_id',$this->process_id,true);\n\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\n\t\t$criteria->compare('functionality',$this->functionality,true);\n\n\t\t$criteria->compare('user_interface',$this->user_interface,true);\n\n\t\t$criteria->compare('external_interfaces',$this->external_interfaces,true);\n\n\t\t$criteria->compare('reliability',$this->reliability,true);\n\n\t\t$criteria->compare('efficiency',$this->efficiency,true);\n\n\t\t$criteria->compare('maintenance',$this->maintenance,true);\n\n\t\t$criteria->compare('portability',$this->portability,true);\n\n\t\t$criteria->compare('limitations',$this->limitations,true);\n\n\t\t$criteria->compare('interoperability',$this->interoperability,true);\n\n\t\t$criteria->compare('reuse',$this->reuse,true);\n\n\t\t$criteria->compare('legal',$this->legal,true);\n\n\t\t$criteria->compare('sent',$this->sent);\n\n\t\t$criteria->compare('project_manager_validated',$this->project_manager_validated);\n\n\t\t$criteria->compare('technical_leader_validated',$this->technical_leader_validated);\n\n\t\t$criteria->compare('change_request',$this->change_request);\n\n\t\t$criteria->compare('change_request_details',$this->change_request_details,true);\n\n\t\treturn new CActiveDataProvider('software_requirements', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "fce8b8796acda2f5fe30db24a6ea0334", "score": "0.5408381", "text": "public function searchDefault2($data = array())\r\n {\r\n $filter = $data['search_all2'];\r\n $cond = array(\r\n 'OR' => array(\r\n\r\n $this->alias . '.id' => $filter,\r\n $this->alias . '.first_name like' => '%' . $filter . '%',\r\n $this->alias . '.last_name like' => '%' . $filter . '%',\r\n $this->alias . '.phone like' => '%' . $filter . '%',\r\n $this->alias . '.mobile like' => '%' . $filter . '%',\r\n $this->alias . '.email like' => '%' . $filter . '%',\r\n $this->alias . '.condition like' => '%' . $filter . '%',\r\n $this->alias . '.year like' => '%' . $filter . '%',\r\n $this->alias . '.make like' => '%' . $filter . '%',\r\n $this->alias . '.model like' => '%' . $filter . '%',\r\n $this->alias . '.type like' => '%' . $filter . '%',\r\n $this->alias . '.condition_trade like' => '%' . $filter . '%',\r\n $this->alias . '.year_trade like' => '%' . $filter . '%',\r\n $this->alias . '.make_trade like' => '%' . $filter . '%',\r\n $this->alias . '.model_trade like' => '%' . $filter . '%',\r\n $this->alias . '.type_trade like' => '%' . $filter . '%',\r\n $this->alias . '.status like' => '%' . $filter . '%',\r\n $this->alias . '.gender like' => '%' . $filter . '%',\r\n $this->alias . '.best_time like' => '%' . $filter . '%',\r\n $this->alias . '.buying_time like' => '%' . $filter . '%',\r\n $this->alias . '.source like' => '%' . $filter . '%',\r\n $this->alias . '.contact_status_id like' => '%' . $filter . '%',\r\n $this->alias . '.created like' => '%' . $filter . '%',\r\n $this->alias . '.modified like' => '%' . $filter . '%',\r\n $this->alias . '.unit_color like' => '%' . $filter . '%',\r\n $this->alias . '.usedunit_color like' => '%' . $filter . '%',\r\n $this->alias . '.lead_status like' => '%' . $filter . '%',\r\n $this->alias . '.sales_step like' => '%' . $filter . '%',\r\n $this->alias . '.stock_num like' => '%' . $filter . '%',\r\n $this->alias . '.stock_num_trade like' => '%' . $filter . '%',\r\n\r\n ));\r\n return $cond;\r\n }", "title": "" }, { "docid": "a4178627d5a16f2a0a47b9b3317f7da0", "score": "0.5403189", "text": "public function search($recycleBin = false)\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('category_id', $this->category_id, true);\n $criteria->compare('brand_id', $this->brand_id, true);\n $criteria->compare('model_id', $this->model_id, true);\n $criteria->compare('user_id', $this->user_id, true);\n $criteria->compare('user_address_id', $this->user_address_id, true);\n $criteria->compare('operator_id', $this->operator_id, true);\n $criteria->compare('repairman_id', $this->repairman_id, true);\n $criteria->compare('create_date', $this->create_date, true);\n $criteria->compare('modified_date', $this->modified_date, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('requested_date', $this->requested_date);\n// $criteria->compare('requested_time', $this->requested_time, true);\n// $criteria->compare('service_date', $this->service_date, true);\n// $criteria->compare('service_time', $this->service_time, true);\n $criteria->compare('request_type', $this->request_type);\n if ($recycleBin)\n $criteria->addCondition('status = -1');\n else {\n $criteria->compare('status', $this->status);\n $criteria->addCondition('status > 0 OR status = -2');\n }\n\n $criteria->order = 'create_date DESC';\n\n // add requested date filter\n $day = null;\n if (isset($_GET['Requests']['requested_date']['day']))\n $day = $_GET['Requests']['requested_date']['day'];\n\n $month = null;\n if (isset($_GET['Requests']['requested_date']['month']))\n $month = $_GET['Requests']['requested_date']['month'];\n\n $year = null;\n if (isset($_GET['Requests']['requested_date']['year']))\n $year = $_GET['Requests']['requested_date']['year'];\n\n if($day and $month and $year){\n $from = JalaliDate::mktime(0, 0, 0, $month, $day, $year);\n $to = JalaliDate::mktime(23, 59, 59, $month, $day, $year);\n $criteria->addBetweenCondition('requested_date', $from, $to);\n }\n\n // add service date filter\n $day = null;\n if (isset($_GET['Requests']['service_date']['day']))\n $day = $_GET['Requests']['service_date']['day'];\n\n $month = null;\n if (isset($_GET['Requests']['service_date']['month']))\n $month = $_GET['Requests']['service_date']['month'];\n\n $year = null;\n if (isset($_GET['Requests']['service_date']['year']))\n $year = $_GET['Requests']['service_date']['year'];\n\n if($day and $month and $year){\n $from = JalaliDate::mktime(0, 0, 0, $month, $day, $year);\n $to = JalaliDate::mktime(23, 59, 59, $month, $day, $year);\n $criteria->addBetweenCondition('service_date', $from, $to);\n }\n\n\n if (isset($_GET['pendingAjax'])) {\n if (isset($_GET['last']))\n $criteria->compare('id', ' >' . (int)$_GET['last']);\n\n $result = [];\n $result['count'] = self::model()->countByAttributes(['status' => Requests::STATUS_PENDING]);\n\n if (isset($_GET['table'])) {\n Yii::app()->controller->beginClip('table');\n foreach (self::model()->findAll($criteria) as $data) {\n Yii::app()->controller->renderPartial('_item_view', array('data' => $data));\n }\n Yii::app()->controller->endClip();\n $result['table'] = Yii::app()->controller->clips['table'];\n }\n\n if (isset($_GET['push'])) {\n Yii::app()->controller->beginClip('push');\n foreach (self::model()->findAll($criteria) as $data) {\n Yii::app()->controller->renderPartial('_push_view', array('data' => $data));\n }\n Yii::app()->controller->endClip();\n $result['push'] = Yii::app()->controller->clips['push'];\n }\n\n $result['last'] = $this->getMaxID();\n return $result;\n }\n\n $config = [\n 'criteria' => $criteria\n ];\n\n if (Yii::app()->controller->route === 'requests/manage/pending')\n $config['pagination'] = false;\n\n return new CActiveDataProvider($this, $config);\n }", "title": "" }, { "docid": "39be47b4d82dc323dbe76ba874f1d245", "score": "0.53889924", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('donante_id',$this->donante_id);\n\t\t$criteria->compare('cedula',$this->cedula,true);\n\t\t$criteria->compare('apellido1',$this->apellido1,true);\n\t\t$criteria->compare('apellido2',$this->apellido2,true);\n\t\t$criteria->compare('nombre1',$this->nombre1,true);\n\t\t$criteria->compare('nombre2',$this->nombre2,true);\n\t\t$criteria->compare('fecha_nacimiento',$this->fecha_nacimiento,true);\n\t\t$criteria->compare('causa_muerte',$this->causa_muerte,true);\n\t\t$criteria->compare('fecha_muerte',$this->fecha_muerte,true);\n\t\t$criteria->compare('tipo_donante_id',$this->tipo_donante_id);\n\t\t$criteria->compare('centro_id',$this->centro_id);\n\t\t$criteria->compare('nacionalidad',$this->nacionalidad,true);\n\t\t$criteria->compare('peso',$this->peso,true);\n\t\t$criteria->compare('talla',$this->talla,true);\n\t\t$criteria->compare('genero',$this->genero,true);\n\t\t$criteria->compare('diagnostico',$this->diagnostico,true);\n\t\t$criteria->compare('antecedentes_personales_patologicos',$this->antecedentes_personales_patologicos,true);\n\t\t$criteria->compare('antecedentes_epidemiologicos',$this->antecedentes_epidemiologicos,true);\n\t\t$criteria->compare('examen_fisico',$this->examen_fisico,true);\n\t\t$criteria->compare('hemodinamia',$this->hemodinamia,true);\n\t\t$criteria->compare('diuresis',$this->diuresis,true);\n\t\t$criteria->compare('proceso_infeccioso',$this->proceso_infeccioso,true);\n\t\t$criteria->compare('tratamiento_antibiotico',$this->tratamiento_antibiotico,true);\n\t\t$criteria->compare('sangre_id',$this->sangre_id);\n\t\t$criteria->compare('perfil_renal',$this->perfil_renal,true);\n\t\t$criteria->compare('perfil_hepatico',$this->perfil_hepatico,true);\n\t\t$criteria->compare('hematies',$this->hematies,true);\n\t\t$criteria->compare('hemoglobina',$this->hemoglobina,true);\n\t\t$criteria->compare('hematocrito',$this->hematocrito,true);\n\t\t$criteria->compare('vcm',$this->vcm,true);\n\t\t$criteria->compare('hcm',$this->hcm,true);\n\t\t$criteria->compare('chcm',$this->chcm,true);\n\t\t$criteria->compare('leucocitos',$this->leucocitos,true);\n\t\t$criteria->compare('plaquetas',$this->plaquetas,true);\n\t\t$criteria->compare('cultivos',$this->cultivos,true);\n\t\t$criteria->compare('serologia',$this->serologia,true);\n\t\t$criteria->compare('drogas_vasoactivas',$this->drogas_vasoactivas,true);\n\t\t$criteria->compare('estatus_id',$this->estatus_id,false);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4d940340ff351c6b309e94234aefa1d7", "score": "0.53819513", "text": "private function _getSearchCriteria()\n\t{\n\t\t$fieldTaskNo = trim($this->taskNumber->Text);\n\t\t$clientRefNo = trim($this->clientRefNumber->Text);\n\t\t$serialNo = trim($this->serialNumber->Text);\n\t\t$searchPartTypeId = trim($this->partType->getSelectedValue());\n\t\t$searchAttendedById = trim($this->attendedBy->getSelectedValue());\n\t\t$recipientTechId = trim($this->recipientTech->getSelectedValue());\n\t\t$attendedStatus = $this->frStatus->getSelectedValues();\n\t\t$taskStatus = trim($this->ftStatus->getSelectedValue());\n\t\t$hasReserve = trim($this->hasReserve->getSelectedValue());\n\t\t$sentToWarehouseId = trim($this->sendTo->getSelectedValue());\n\t\t$sentToTechId = Factory::service('Warehouse')->getDefaultMobileWarehouse(trim($this->recipientTech->getSelectedValue()));\n\t\t$workTypeIds = $this->workType->getSelectedValues();\n\t\t$zoneSetIds = $this->zoneSet->getSelectedValues();\n\n\t\t$return = array($fieldTaskNo, $clientRefNo, $searchPartTypeId, $searchAttendedById, $attendedStatus, $taskStatus, $hasReserve, $sentToWarehouseId, $sentToTechId, $workTypeIds, $zoneSetIds, $serialNo,$recipientTechId);\n\t\tforeach($return as $value)\n\t\t{\n\t\t\t$checkingValue = (is_array($value) ? implode(\",\", $value) : $value);\n\n\t\t\tif(trim($checkingValue) !== self::OPTION_FOR_ALL && $checkingValue !== '')\n\t\t\treturn $return;\n\t\t}\n\n\t\tthrow new Exception(\"Please provide at least one search criteria!\");\n\t}", "title": "" }, { "docid": "dbd31923dba6ae6521fc762b5faa74c1", "score": "0.5376304", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t\n\t}", "title": "" }, { "docid": "db62c1b076293af659299d19329c0721", "score": "0.5375669", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('nu_Contrato',$this->nu_Contrato,true);\n\t\t$criteria->compare('vl_Contrato',$this->vl_Contrato,true);\n\t\t$criteria->compare('date_format(dt_AssinaturaContrato,\"%d/%m/%Y\")',$this->dt_AssinaturaContrato,true);\n\t\t$criteria->compare('de_ObjetivoContrato',$this->de_ObjetivoContrato,true);\n\t\t$criteria->compare('nu_ProcessoLicitatorio',$this->nu_ProcessoLicitatorio,true);\n\t\t$criteria->compare('cd_Moeda',$this->cd_Moeda);\n\t\t$criteria->compare('tp_PessoaContratado',$this->tp_PessoaContratado);\n\t\t$criteria->compare('cd_CicContratado',$this->cd_CicContratado,true);\n\t\t$criteria->compare('nm_Contratado',$this->nm_Contratado,true);\n\t\t$criteria->compare('date_format(dt_VencimentoContrato,\"%d/%m/%Y\")',$this->dt_VencimentoContrato,true);\n\t\t$criteria->compare('nu_DiarioOficial',$this->nu_DiarioOficial,true);\n\t\t$criteria->compare('date_format(dt_Publicacao,\"%d/%m/%Y\")',$this->dt_Publicacao,true);\n\t\t$criteria->compare('st_RecebeValor',$this->st_RecebeValor);\n\t\t$criteria->compare('nu_CertidaoINSS',$this->nu_CertidaoINSS,true);\n\t\t$criteria->compare('date_format(dt_CertidaoINSS,\"%d/%m/%Y\")',$this->dt_CertidaoINSS,true);\n\t\t$criteria->compare('date_format(dt_ValidadeINSS,\"%d/%m/%Y\")',$this->dt_ValidadeINSS,true);\n\t\t$criteria->compare('nu_CertidaoFGTS',$this->nu_CertidaoFGTS,true);\n\t\t$criteria->compare('date_format(dt_CertidaoFGTS,\"%d/%m/%Y\")',$this->dt_CertidaoFGTS,true);\n\t\t$criteria->compare('date_format(dt_ValidadeFGTS,\"%d/%m/%Y\")',$this->dt_ValidadeFGTS,true);\n\t\t$criteria->compare('nu_CertidaoFazendaEstadual',$this->nu_CertidaoFazendaEstadual,true);\n\t\t$criteria->compare('date_format(dt_CertidaoFazendaEstadual,\"%d/%m/%Y\")', $this->dt_CertidaoFazendaEstadual,true);\n\t\t$criteria->compare('date_format(dt_ValidadeFazendaEstadual,\"%d/%m/%Y\")', $this->dt_ValidadeFazendaEstadual,true);\n\t\t$criteria->compare('nu_CertidaoFazendaMunicipal',$this->nu_CertidaoFazendaMunicipal,true);\n\t\t$criteria->compare('date_format(dt_CertidaoFazendaMunicipal,\"%d/%m/%Y\")',$this->dt_CertidaoFazendaMunicipal,true);\n\t\t$criteria->compare('date_format(dt_ValidadeFazendaMunicipal,\"%d/%m/%Y\")',$this->dt_ValidadeFazendaMunicipal,true);\n\t\t$criteria->compare('nu_CertidaoFazendaFederal',$this->nu_CertidaoFazendaFederal,true);\n\t\t$criteria->compare('date_format(dt_CertidaoFazendaFederal,\"%d/%m/%Y\")',$this->dt_CertidaoFazendaFederal,true);\n\t\t$criteria->compare('date_format(dt_ValidadeFazendaFederal,\"%d/%m/%Y\")',$this->dt_ValidadeFazendaFederal,true);\n\t\t$criteria->compare('nu_CertidaoOutras',$this->nu_CertidaoOutras,true);\n\t\t$criteria->compare('date_format(dt_CertidaoOutras,\"%d/%m/%Y\")',$this->dt_CertidaoOutras,true);\n\t\t$criteria->compare('date_format(dt_ValidadeCertidaoOutras,\"%d/%m/%Y\")',$this->dt_ValidadeCertidaoOutras,true);\n\t\t$criteria->compare('tp_Contrato',$this->tp_Contrato);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d990adfcef8d0a91b44b218feb8dc1d5", "score": "0.5375087", "text": "function get_doctors_by_search($spec = 0, $has_booking = 0, $hospital = 0, $availability = 0, $name = \"\", $page = 1, $per_page = 10)\n {\n\n\t\t// HAS BOOKing FILTER\n\t\tif($has_booking == 0)\n\t\t\t$this->db->select('*')->from('tbl_doctor'); // any doctor w/ or without booking\n\t\telse\n\t\t\t$this->db->select('*')->from('tbl_doctor')->where('doc_has_booking', $has_booking);\n\n if($name != \"\") {\n $this->db->like(\"CONCAT(doc_fname, ' ', doc_lname)\", $name); \n }\n\n\t\t// SPECIALIZATION FILTER\n\t\tif($spec == 0) {\t// any specialization\n\t\t\t// do nothing\n\t\t\t$this->db->join('tbl_doc_spec', 'tbl_doc_spec.docspec_doc_id = tbl_doctor.doc_id');\n\t\t\t$this->db->join('tbl_specialization_list', 'tbl_specialization_list.spec_id = tbl_doc_spec.docspec_spec_id');\n\t\t}\n\t\telse {\n\t\t\t$this->db->join('tbl_doc_spec', 'tbl_doc_spec.docspec_doc_id = tbl_doctor.doc_id')->where('docspec_spec_id', $spec);\n\t\t\t$this->db->join('tbl_specialization_list', 'tbl_specialization_list.spec_id = tbl_doc_spec.docspec_spec_id');\n\t\t\t// $this->db->select('*')->where('docspec_spec_id', $spec)->from('tbl_doc_spec');\n\t\t}\n\n\t\tif($hospital == 0) { // any hospital\n\t\t\t// do nothing\n\t\t}\n\t\telse{\n\t\t\t$this->db->join('tbl_office', 'tbl_office.office_doc_id = tbl_doctor.doc_id')->where('office_hosp_id', $hospital);\n\t\t}\n\n\t\t/* add filter for availability here! */\n\n\t\t// add other info for doctor here like: - offices, - stars\n\t\t// $this->db->join('tbl_office', 'tbl_office.office_doc_id = tbl_doctor.doc_id');\n\n\n /* Getting of doctors' image */\n $this->db->join('tbl_doctor_image', 'tbl_doctor_image.img_doc_id = tbl_doctor.doc_id');\n\n\n /* Add LIMITS for PAGINATION HERE */\n if($page != 0)\n $this->db->limit($per_page, ($page - 1) * $per_page);\n\n\n\t\t$query = $this->db->get();\n\t\techo $this->db->last_query();\n\n\t\t$doctors = $query->result(); \n\n\t\tforeach ($doctors as $doctor) {\n\t\t\t$this->db->reset_query();\n\t\t\t$query = $this->db->get_where('tbl_office', array('office_doc_id' => $doctor->doc_id));\n\n\t\t\t$doc_offices = $query->result();\n\n\t\t\t$doctor->offices = $doc_offices;\n\t\t}\n\n\n\t\t//echo '<br/>' . $this->db->last_query();\n\t\treturn $doctors;\n }", "title": "" }, { "docid": "ae5e59f3b79ac8514b4e439d92a83031", "score": "0.53657866", "text": "public function searchByNameAndCareer(Request $request)\n {\n //separate words, this help whit 2 or more spaces cases and avoid a lot problems\n $searchValues = preg_split('/\\s+/', $request->search, -1, PREG_SPLIT_NO_EMPTY); \n\n //i know that's a lot cases, but that way, we can see all the possibilities \n if(isset($request->day) && isset($request->month) && isset($request->year)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereYear('born_date', '=', $request->year)\n ->whereMonth('born_date', '=', $request->month)\n ->whereDay('born_date', '=', $request->day)\n ->orderBy('born_date', 'DESC')->get();\n \n } else if(isset($request->day) && isset($request->month)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereDay('born_date', '=', $request->day)\n ->whereMonth('born_date', '=', $request->month)\n ->orderBy('born_date', 'DESC')->get();\n\n } else if(isset($request->day) && isset($request->year)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereYear('born_date', '=', $request->year)\n ->whereDay('born_date', '=', $request->day)\n ->orderBy('born_date', 'DESC')->get(); \n\n } else if(isset($request->day)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereDay('born_date', '=', $request->day)\n ->orderBy('born_date', 'DESC')->get();\n \n\n } else if(isset($request->month) && isset($request->year)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereMonth('born_date', '=', $request->month)\n ->whereYear('born_date', '=', $request->year)\n ->orderBy('born_date', 'DESC')->get();\n \n } else if(isset($request->year)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereYear('born_date', $request->year)\n ->orderBy('born_date', 'DESC')\n ->get();\n \n } else if(isset($request->month)) {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->whereMonth('born_date', $request->month)\n ->orderBy('born_date', 'DESC')->get();\n\n } else {\n $results = User::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->orWhere('name', 'like', \"%{$value}%\")\n ->orWhere('career', 'like', \"%{$value}%\");\n }})->orderBy('born_date', 'DESC')->get(); \n \n }\n return response()->json(compact('results'));\n }", "title": "" }, { "docid": "15a16f2a3f7fa621bd15c070d4142212", "score": "0.5348719", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id_ppto_mm_fmldo',$this->id_ppto_mm_fmldo);\n\t\t$criteria->compare('co_ppto_mm_fmldo',$this->co_ppto_mm_fmldo);\n\t\t$criteria->compare('co_ppto_mm_plfdo',$this->co_ppto_mm_plfdo);\n\t\t$criteria->compare('mnto_1',$this->mnto_1,true);\n\t\t$criteria->compare('mnto_2',$this->mnto_2,true);\n\t\t$criteria->compare('mnto_3',$this->mnto_3,true);\n\t\t$criteria->compare('mnto_4',$this->mnto_4,true);\n\t\t$criteria->compare('mnto_5',$this->mnto_5,true);\n\t\t$criteria->compare('mnto_6',$this->mnto_6,true);\n\t\t$criteria->compare('mnto_7',$this->mnto_7,true);\n\t\t$criteria->compare('mnto_8',$this->mnto_8,true);\n\t\t$criteria->compare('mnto_9',$this->mnto_9,true);\n\t\t$criteria->compare('mnto_10',$this->mnto_10,true);\n\t\t$criteria->compare('mnto_11',$this->mnto_11,true);\n\t\t$criteria->compare('mnto_12',$this->mnto_12,true);\n\t\t$criteria->compare('mnto_ttl',$this->mnto_ttl,true);\n\t\t$criteria->compare('vrsn',$this->vrsn);\n\t\t$criteria->compare('por_vrbl_mcrnoca',$this->por_vrbl_mcrnoca);\n\t\t$criteria->compare('fe_crea',$this->fe_crea,true);\n\t\t$criteria->compare('fe_modf',$this->fe_modf,true);\n\t\t$criteria->compare('usr_crea',$this->usr_crea,true);\n\t\t$criteria->compare('usr_modf',$this->usr_modf,true);\n\t\t$criteria->compare('in_stat',$this->in_stat,true);\n\t\t$criteria->compare('tx_desc',$this->tx_desc,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2242d5fb407ab72afc61134dc0bca861", "score": "0.5344505", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\tif (!empty($this->dokrekammedis_id)){\n\t\t$criteria->addCondition('dokrekammedis_id ='.$this->dokrekammedis_id);\n\t\t}\n\t\tif (!empty($this->warnadokrm_id)){\n\t\t$criteria->addCondition('warnadokrm_id ='.$this->warnadokrm_id);\n\t\t}\n\t\tif (!empty($this->subrak_id)){\n\t\t$criteria->addCondition('subrak_id ='.$this->subrak_id);\n\t\t}\n\t\tif (!empty($this->lokasirak_id)){\n\t\t$criteria->addCondition('lokasirak_id ='.$this->lokasirak_id);\n\t\t}\n\t\tif (!empty($this->pasien_id)){\n\t\t$criteria->addCondition('pasien_id ='.$this->pasien_id);\n\t\t}\n\t\t\n\t\t$criteria->compare('LOWER(nodokumenrm)',strtolower($this->nodokumenrm),true);\n\t\t$criteria->compare('LOWER(tglrekammedis)',strtolower($this->tglrekammedis),true);\n\t\t$criteria->compare('LOWER(tglmasukrak)',strtolower($this->tglmasukrak),true);\n\t\t$criteria->compare('LOWER(statusrekammedis)',strtolower($this->statusrekammedis),true);\n\t\t$criteria->compare('LOWER(tglkeluarakhir)',strtolower($this->tglkeluarakhir),true);\n\t\t$criteria->compare('LOWER(tglmasukakhir)',strtolower($this->tglmasukakhir),true);\n\t\t$criteria->compare('LOWER(nomortertier)',strtolower($this->nomortertier),true);\n\t\t$criteria->compare('LOWER(nomorsekunder)',strtolower($this->nomorsekunder),true);\n\t\t$criteria->compare('LOWER(nomorprimer)',strtolower($this->nomorprimer),true);\n\t\t$criteria->compare('LOWER(warnanorm_i)',strtolower($this->warnanorm_i),true);\n\t\t$criteria->compare('LOWER(warnanorm_ii)',strtolower($this->warnanorm_ii),true);\n\t\t$criteria->compare('LOWER(tgl_in_aktif)',strtolower($this->tgl_in_aktif),true);\n\t\t$criteria->compare('LOWER(tglpemusnahan)',strtolower($this->tglpemusnahan),true);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "fc42f5eb97c718c849d9fdacaadd9473", "score": "0.5325783", "text": "public function search()\n\t{\n\t\treturn self::extraSearch($this);\n\t}", "title": "" }, { "docid": "b3fe4043c67e71c187203a24f6078743", "score": "0.5317572", "text": "function searchDocmanItem($sessionKey, $group_id, $item_id, $criterias) {\n $params = array('id' => $item_id);\n foreach($criterias as $criteria) {\n $params[$criteria->field_name] = $criteria->field_value;\n }\n return _makeDocmanRequest($sessionKey, $group_id, 'search', $params);\n}", "title": "" }, { "docid": "7464fa93c6b2a0985e902902c6f546ec", "score": "0.53159404", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n $arreglo = explode(\" \",$this->cliente_nombre);\n $nombreApellido = array();\n foreach($arreglo as $palabra){\n if(trim($palabra)!= ''){\n $nombreApellido[]=$palabra;\n }\n }\n $criteriaNombreUser1 = new CDbCriteria();\n $palabras = count($nombreApellido);\n if($palabras == 1){\n $busqueda = $nombreApellido[0];\n if(trim($busqueda) != ''){\n $criteriaNombreUser1->compare('u.nombre',$busqueda,true);\n $criteriaNombreUser1->compare('u.apellido',$busqueda,true,'OR');\n }\n }\n\n if($palabras == 2){\n $nombre = $nombreApellido[0];\n $apellido = $nombreApellido[1];\n $criteriaNombreUser1->compare('u.nombre',$nombre,true);\n $criteriaNombreUser1->compare('u.apellido',$apellido,true);\n }\n\n $criteria->compare('id',$this->id);\n $criteria->mergeWith($criteriaNombreUser1,'AND');\n\n\t\t\n\t\t$criteria->compare('rol',$this->rol,true);\n\t\t$criteria->compare('causa',$this->causa,true);\n\t\t$criteria->compare('contrato_id',$this->contrato_id);\n $criteria->compare('f.nombre',$this->formato,true);\n $criteria->join = \n ' join contrato on contrato.id = t.contrato_id'\n . ' join cliente as c on c.id = contrato.cliente_id '\n . ' join usuario as u on u.id = c.usuario_id '\n . ' join formato_demanda as f on f.id = t.formato_demanda_id';\n $criteria->compare('contrato.folio',$this->folio);\n \n if(Yii::app()->user->rol == 'propietario'){\n $criteriaPropietario = new CDbCriteria();\n $contratos = Contrato::model()->relacionadosConPropietario(Yii::app()->user->id);\n foreach($contratos as $contrato_id){\n $criteriaPropietario->compare('contrato.id', $contrato_id, false,'OR'); \n }\n $criteria->mergeWith($criteriaPropietario,'AND');\n }\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array(\n\t\t 'attributes'=>array(\n\t\t 'folio'=>array(\n\t\t 'asc'=>'contrato.folio',\n\t\t 'desc'=>'contrato.folio DESC',\n\t\t ),\n 'cliente_rut'=>array(\n\t\t 'asc'=>'c.rut',\n\t\t 'desc'=>'c.rut DESC',\n\t\t ),\n 'cliente_nombre'=>array(\n\t\t 'asc'=>'u.apellido,u.nombre',\n\t\t 'desc'=>'u.apellido DESC,u.nombre DESC',\n\t\t ),\n 'formato'=>array(\n\t\t 'asc'=>'f.nombre',\n\t\t 'desc'=>'f.nombre DESC',\n\t\t ),\n\t\t '*',\n\t\t ),\n\t\t ),\n\t\t));\n\t}", "title": "" }, { "docid": "a7cb9ffdae6110a1b5a5b8c020d8712e", "score": "0.5314732", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('co_plan_cpra',$this->co_plan_cpra);\n\t\t$criteria->compare('co_ppto',$this->co_ppto);\n\t\t$criteria->compare('actv_plan_cpra',$this->actv_plan_cpra,true);\n\t\t$criteria->compare('nb_und_mdda',$this->nb_und_mdda,true);\n\t\t$criteria->compare('nb_fmla',$this->nb_fmla,true);\n\t\t$criteria->compare('nb_cod_sap',$this->nb_cod_sap,true);\n\t\t$criteria->compare('cntd_1',$this->cntd_1);\n\t\t$criteria->compare('cntd_2',$this->cntd_2);\n\t\t$criteria->compare('cntd_3',$this->cntd_3);\n\t\t$criteria->compare('cntd_4',$this->cntd_4);\n\t\t$criteria->compare('cntd_5',$this->cntd_5);\n\t\t$criteria->compare('cntd_6',$this->cntd_6);\n\t\t$criteria->compare('cntd_7',$this->cntd_7);\n\t\t$criteria->compare('cntd_8',$this->cntd_8);\n\t\t$criteria->compare('cntd_9',$this->cntd_9);\n\t\t$criteria->compare('cntd_10',$this->cntd_10);\n\t\t$criteria->compare('cntd_11',$this->cntd_11);\n\t\t$criteria->compare('cntd_12',$this->cntd_12);\n\t\t$criteria->compare('cntd_ttl',$this->cntd_ttl);\n\t\t$criteria->compare('vrsn',$this->vrsn);\n\t\t$criteria->compare('nb_resp',$this->nb_resp,true);\n\t\t$criteria->compare('tlf_resp',$this->tlf_resp,true);\n\t\t$criteria->compare('email_resp',$this->email_resp,true);\n\t\t$criteria->compare('fe_crea',$this->fe_crea,true);\n\t\t$criteria->compare('fe_modf',$this->fe_modf,true);\n\t\t$criteria->compare('usr_crea',$this->usr_crea,true);\n\t\t$criteria->compare('usr_modf',$this->usr_modf,true);\n\t\t$criteria->compare('in_stat',$this->in_stat,true);\n\t\t$criteria->compare('tx_desc',$this->tx_desc,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "b9de073e5c8efb076937a3f322819759", "score": "0.53075427", "text": "public function search($data=array())\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\tif( isset($data['search_fio']) ){\n\t\t\t$criteria->with = array('patient');\n\t $criteria->compare('patient.fio',$this->patient_id, true);\n\t\t} else {\n\t $criteria->compare('patient_id',$this->patient_id);\n\t\t}\n\n\n $criteria->compare('doctor_id',$this->doctor_id);\n\t\t$criteria->compare('affiliate_id',$this->affiliate_id);\n $criteria->compare('discount_id',$this->discount_id);\n\t\t$criteria->compare('datetime_visit',$this->datetime_visit,true);\n\t\t$criteria->compare('duration',$this->duration);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('date_added',$this->date_added,true);\n\t\t$criteria->compare('date_modifidied',$this->date_modifidied,true);\n\t\t$criteria->compare('status_record_id',$this->status_record_id);\n\n\t\t$criteria->select= \"*, \n CASE \n WHEN discount > 0 \n THEN (total-discount) \n ELSE total\n END as total2\n\t\t\";\n\n\t\t$criteria->compare('total2', $this->total);\n\n $sort = new CSort();\n\n $sort->defaultOrder = 't.date_added DESC';\n $sort->attributes = array(\n 'total2'=>array(\n 'asc'=>'total2',\n 'desc'=>'total2 desc',\n ),\n '*',\n );\n\n\t\treturn new CActiveDataProvider($this, array(\n\t 'criteria' => $criteria,\n\t 'sort' => $sort,\n\t 'pagination' => array(\n\t 'pageSize' => 20,\n\t ),\n \t));\n\n\t}", "title": "" }, { "docid": "10210eb710eff3fe237ed0431ef69acb", "score": "0.52923685", "text": "public function search(){\n //includes google maps script for place autocomplete and to get experiences\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','places_autocomplete','get_experiences','logo_fly','jquery.dropdown','cookies'));\n \n //sets motives, schools and departments by alphbetical order\n $this->__set_motives_schools_and_departments();\n }", "title": "" }, { "docid": "fac31a2861b0317e357f95a938214094", "score": "0.52906364", "text": "function count_doctors_by_search($spec = 0, $has_booking = 0, $hospital = 0, $availability = 0, $name = \"\") {\n\n // HAS BOOKing FILTER\n if($has_booking == 0)\n $this->db->select('COUNT(*)')->from('tbl_doctor'); // any doctor w/ or without booking\n else\n $this->db->select('COUNT(*)')->from('tbl_doctor')->where('doc_has_booking', $has_booking);\n\n if($name != \"\") {\n $this->db->like(\"CONCAT(doc_fname, ' ', doc_lname)\", $name); \n }\n\n // SPECIALIZATION FILTER\n if($spec == 0) { // any specialization\n // do nothing\n $this->db->join('tbl_doc_spec', 'tbl_doc_spec.docspec_doc_id = tbl_doctor.doc_id');\n $this->db->join('tbl_specialization_list', 'tbl_specialization_list.spec_id = tbl_doc_spec.docspec_spec_id');\n }\n else {\n $this->db->join('tbl_doc_spec', 'tbl_doc_spec.docspec_doc_id = tbl_doctor.doc_id')->where('docspec_spec_id', $spec);\n $this->db->join('tbl_specialization_list', 'tbl_specialization_list.spec_id = tbl_doc_spec.docspec_spec_id');\n // $this->db->select('*')->where('docspec_spec_id', $spec)->from('tbl_doc_spec');\n }\n\n if($hospital == 0) { // any hospital\n // do nothing\n }\n else{\n $this->db->join('tbl_office', 'tbl_office.office_doc_id = tbl_doctor.doc_id')->where('office_hosp_id', $hospital);\n }\n\n // add filter for availability here!\n\n // add other info for doctor here like: - offices, - stars\n // $this->db->join('tbl_office', 'tbl_office.office_doc_id = tbl_doctor.doc_id');\n\n $query = $this->db->get();\n return $query->result_array()[0]['COUNT(*)'];\n }", "title": "" }, { "docid": "157b2f3c947af7d5a25f0d18c156d8cd", "score": "0.5285642", "text": "public function searchAReajustar() {\n // should not be searched.\n \n $nombre = \"\";\n $apellido = \"\";\n $nombres = explode(\" \",$this->cliente_nombre);\n if(count($nombres) == 1){\n $nombre = $this->cliente_nombre;\n $apellido = $this->cliente_nombre;\n }\n elseif(count($nombres) == 2){\n $nombre = $nombres[0];\n $apellido = $nombres[1];\n }\n \n $criteria = new CDbCriteria;\n $criteria->with = array('departamento', 'tipoContrato', 'cliente');\n $criteria->join .= 'join departamento as d on d.id = t.departamento_id '\n . ' join propiedad as p on p.id = d.propiedad_id'\n . ' join tipo_contrato as tipo on tipo.id = t.tipo_contrato_id '\n . ' join cliente as c on c.id = t.cliente_id '\n . ' join usuario as u on u.id = c.usuario_id ';\n \n $arreglo = explode(\" \",$this->cliente_nombre);\n $nombreApellido = array();\n foreach($arreglo as $palabra){\n if(trim($palabra)!= ''){\n $nombreApellido[]=$palabra;\n }\n }\n $criteriaNombreUser1 = new CDbCriteria();\n $palabras = count($nombreApellido);\n if($palabras == 1){\n $busqueda = $nombreApellido[0];\n if(trim($busqueda) != ''){\n $criteriaNombreUser1->compare('u.nombre',$busqueda,true);\n $criteriaNombreUser1->compare('u.apellido',$busqueda,true,'OR');\n }\n }\n\n if($palabras == 2){\n $nombre = $nombreApellido[0];\n $apellido = $nombreApellido[1];\n $criteriaNombreUser1->compare('u.nombre',$nombre,true);\n $criteriaNombreUser1->compare('u.apellido',$apellido,true);\n }\n\n $criteria->compare('folio', $this->folio);\n $criteria->mergeWith($criteriaNombreUser1,'AND');\n \n $criteria->compare('fecha_inicio', Tools::fixFecha($this->fecha_inicio), true);\n $criteria->compare('p.nombre', $this->propiedad_nombre, true);\n $criteria->compare('d.numero', $this->depto_nombre, true);\n $criteria->compare('c.rut', $this->cliente_rut, true);\n $criteria->compare('t.vigente', 1);\n //$criteria->compare('t.reajusta', 1);\n \n \n if(Yii::app()->user->rol == 'cliente'){\n $cliente = Cliente::model()->findByAttributes(array('usuario_id'=>Yii::app()->user->id));\n if($cliente!=null){\n $criteria->compare('t.cliente_id',$cliente->id);\n }\n else{\n $criteria->compare('t.cliente_id',-1);\n }\n }\n \n $criteriaReajustan = new CDbCriteria();\n $reajustan = $this->reajustanProximoMes();\n $criteriaReajustan->addInCondition('t.id', $reajustan);\n $criteria->mergeWith($criteriaReajustan,'AND');\n \n \n if(Yii::app()->user->rol == 'propietario'){\n $criteriaPropietario = new CDbCriteria();\n $contratos = Contrato::model()->relacionadosConPropietario(Yii::app()->user->id);\n foreach($contratos as $contrato_id){\n $criteriaPropietario->compare('t.id', $contrato_id, false,'OR'); \n }\n $criteria->mergeWith($criteriaPropietario,'AND');\n }\n \n \n \n \n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'attributes' => array(\n 'depto_nombre' => array(\n 'asc' => 'd.numero',\n 'desc' => 'd.numero DESC',\n ),\n 'tipo_nombre' => array(\n 'asc' => 'tipo.nombre',\n 'desc' => 'tipo.nombre DESC',\n ),\n 'cliente_rut' => array(\n 'asc' => 'c.rut',\n 'desc' => 'c.rut DESC',\n ),\n 'cliente_nombre' => array(\n 'asc' => 'u.apellido,u.nombre',\n 'desc' => 'u.apellido DESC,u.nombre DESC',\n ),\n 'propiedad_nombre' => array(\n 'asc' => 'p.nombre',\n 'desc' => 'p.nombre DESC',\n ),\n '*',\n ),\n ),\n ));\n }", "title": "" }, { "docid": "743706d9a79e6dc0d9208d649c7b029e", "score": "0.5284231", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('linkman', $this->linkman, true);\n $criteria->compare('tel', $this->tel, true);\n $criteria->compare('t.status', $this->status);\n if($this->customer_name || $this->customer_mobile){\n $criteria->with=array(\n 'customer',\n );\n $criteria->compare('customer.name', $this->customer_name, true);\n $criteria->compare('customer.mobile', $this->customer_mobile, true);\n }\n $criteria->order = 't.id DESC';\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "1558bf2c9202c9abeb3d62f976a367fc", "score": "0.52651936", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t}", "title": "" }, { "docid": "9b5674f7fc78cde947728452fbbe0131", "score": "0.52622294", "text": "function validar_atributos_search()\n {\n\n if ($this->nombre !== '') {\n $nomberExito = $this->validar_Nombre_buscar();\n if (is_array($nomberExito)) {\n return $this->feedback;\n }\n }\n if ($this->fecha !== '') {\n $nomberExito = $this->validar_Fecha();\n if (is_array($nomberExito)) {\n return $this->feedback;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "54b5305751dab138f14d2f5d5471d299", "score": "0.52607083", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n if($this->pesquisar == ''){\n \t\t$criteria->compare('id',$this->id,true);\n\n\t\t$criteria->compare('tipo_frete',$this->tipo_frete,true);\n\n\t\t$criteria->compare('valor_frete',$this->valor_frete,true);\n\n\t\t$criteria->compare('data_transacao',$this->data_transacao,true);\n\n\t\t$criteria->compare('anotacao',$this->anotacao,true);\n\n\t\t$criteria->compare('id_transaction',$this->id_transaction,true);\n\n\t\t$criteria->compare('taxas_extras',$this->taxas_extras,true);\n\n\t\t$criteria->compare('tipo_pagamento',$this->tipo_pagamento,true);\n\n\t\t$criteria->compare('status_transacao',$this->status_transacao,true);\n\n\t\t$criteria->compare('parcelas',$this->parcelas);\n\n\t\t$criteria->compare('usuarios_id',$this->usuarios_id,true);\n\n }else{\n \n \t\t$criteria->compare('id',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('tipo_frete',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('valor_frete',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('data_transacao',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('anotacao',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('id_transaction',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('taxas_extras',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('tipo_pagamento',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('status_transacao',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('parcelas',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('usuarios_id',$this->pesquisar,true,'OR');\n\n }\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize'=>Yii::app()->params['PageSize'],\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "0d668b360aaa3ec65f82859a89582b5b", "score": "0.52569664", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->with=array('Doc',);\n\t\t$criteria->addSearchCondition('Doc.doc_type_label', $this->documento);\n\n\t\t$criteria->compare('carat_meta_id', $this->carat_meta_id);\n\t\t$criteria->compare('carat_meta_desc', $this->carat_meta_desc, true);\n\t\t$criteria->compare('carat_meta_label', $this->carat_meta_label, true);\n\t\t$criteria->compare('doc_type_id', $this->doc_type_id);\n\t\t$criteria->compare('is_special', $this->is_special);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t 'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4c9f72cf4d24e23b721fe3d30d154899", "score": "0.5256579", "text": "public function search() {\n // should not be searched.\n \n $nombre = \"\";\n $apellido = \"\";\n $nombres = explode(\" \",$this->cliente_nombre);\n if(count($nombres) == 1){\n $nombre = $this->cliente_nombre;\n $apellido = $this->cliente_nombre;\n }\n elseif(count($nombres) == 2){\n $nombre = $nombres[0];\n $apellido = $nombres[1];\n }\n \n $criteria = new CDbCriteria;\n $criteria->with = array('departamento', 'tipoContrato', 'cliente');\n $criteria->join .= 'join departamento as d on d.id = t.departamento_id '\n . ' join propiedad as p on p.id = d.propiedad_id'\n . ' join tipo_contrato as tipo on tipo.id = t.tipo_contrato_id '\n . ' join cliente as c on c.id = t.cliente_id '\n . ' join usuario as u on u.id = c.usuario_id ';\n \n $arreglo = explode(\" \",$this->cliente_nombre);\n $nombreApellido = array();\n foreach($arreglo as $palabra){\n if(trim($palabra)!= ''){\n $nombreApellido[]=$palabra;\n }\n }\n $criteriaNombreUser1 = new CDbCriteria();\n $palabras = count($nombreApellido);\n if($palabras == 1){\n $busqueda = $nombreApellido[0];\n if(trim($busqueda) != ''){\n $criteriaNombreUser1->compare('u.nombre',$busqueda,true);\n $criteriaNombreUser1->compare('u.apellido',$busqueda,true,'OR');\n }\n }\n\n if($palabras == 2){\n $nombre = $nombreApellido[0];\n $apellido = $nombreApellido[1];\n $criteriaNombreUser1->compare('u.nombre',$nombre,true);\n $criteriaNombreUser1->compare('u.apellido',$apellido,true);\n }\n\n $criteria->compare('folio', $this->folio);\n $criteria->mergeWith($criteriaNombreUser1,'AND');\n \n $criteria->compare('fecha_inicio', Tools::fixFecha($this->fecha_inicio), true);\n $criteria->compare('p.nombre', $this->propiedad_nombre, true);\n $criteria->compare('d.numero', $this->depto_nombre, true);\n $criteria->compare('c.rut', $this->cliente_rut, true);\n $criteria->compare('t.vigente', 1);\n \n if(Yii::app()->user->rol == 'cliente'){\n $cliente = Cliente::model()->findByAttributes(array('usuario_id'=>Yii::app()->user->id));\n if($cliente!=null){\n $criteria->compare('t.cliente_id',$cliente->id);\n }\n else{\n $criteria->compare('t.cliente_id',-1);\n }\n }\n \n if(Yii::app()->user->rol == 'propietario'){\n $criteriaPropietario = new CDbCriteria();\n $contratos = Contrato::model()->relacionadosConPropietario(Yii::app()->user->id);\n foreach($contratos as $contrato_id){\n $criteriaPropietario->compare('t.id', $contrato_id, false,'OR'); \n }\n $criteria->mergeWith($criteriaPropietario,'AND');\n }\n \n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'attributes' => array(\n 'depto_nombre' => array(\n 'asc' => 'd.numero',\n 'desc' => 'd.numero DESC',\n ),\n 'tipo_nombre' => array(\n 'asc' => 'tipo.nombre',\n 'desc' => 'tipo.nombre DESC',\n ),\n 'cliente_rut' => array(\n 'asc' => 'c.rut',\n 'desc' => 'c.rut DESC',\n ),\n 'cliente_nombre' => array(\n 'asc' => 'u.apellido,u.nombre',\n 'desc' => 'u.apellido DESC,u.nombre DESC',\n ),\n 'propiedad_nombre' => array(\n 'asc' => 'p.nombre',\n 'desc' => 'p.nombre DESC',\n ),\n '*',\n ),\n ),\n ));\n }", "title": "" }, { "docid": "8b5d955f0e08e304ea03d3cf26ad97e3", "score": "0.525438", "text": "public function searchMyContacts() {\n $criteria = new CDbCriteria;\n\n $accessLevel = Yii::app()->user->checkAccess('ContactsView') ? 1 : 0;\n $conditions = $this->getAccessConditions($accessLevel);\n foreach ($conditions as $arr) {\n $criteria->addCondition($arr['condition'], $arr['operator']);\n $criteria->params = array_merge($criteria->params, $arr['params']);\n }\n\n // $condition = 'assignedTo=\"'.Yii::app()->user->getName().'\"';\n // $parameters=array('limit'=>ceil(Profile::getResultsPerPage()));\n // $parameters['condition']=$condition;\n // $criteria->scopes=array('findAll'=>array($parameters));\n\n return $this->searchBase($criteria);\n }", "title": "" }, { "docid": "99100a09f7b873e7515fc563ffe36e0b", "score": "0.52512085", "text": "public function search(){\n if(isset($_POST['text_search'])){\n $title = trim($this->input->post('text_search') , ' ');\n $data = $this->base_model->search_data('deal' , 'customer' , 'deal.* , customer.fullname , unit.name' ,'deal.customer_id = customer.id' , 'left' , array('customer.fullname'=>$title) , NULL , array('deal.id' , 'DESC') , NULL , array('unit','deal.money_id = unit.id'));\n echo json_encode($data);\n }else{\n show_404();\n }\n }", "title": "" }, { "docid": "db7a95a1522be72aa1f116543b13ca99", "score": "0.5249628", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('gh_type',$this->gh_type);\n\t\t$criteria->compare('gh_amount',$this->gh_amount,true);\n\t\t$criteria->compare('m_p_water',$this->m_p_water,true);\n\t\t$criteria->compare('m_u_water',$this->m_u_water,true);\n\t\t$criteria->compare('m_p_cement',$this->m_p_cement,true);\n\t\t$criteria->compare('m_u_cement',$this->m_u_cement,true);\n\t\t$criteria->compare('m_p_ash',$this->m_p_ash,true);\n\t\t$criteria->compare('m_u_ash',$this->m_u_ash,true);\n\t\t$criteria->compare('m_p_gravel',$this->m_p_gravel,true);\n\t\t$criteria->compare('m_u_gravel',$this->m_u_gravel,true);\n\t\t$criteria->compare('m_p_sand',$this->m_p_sand,true);\n\t\t$criteria->compare('m_u_sand',$this->m_u_sand,true);\n\t\t$criteria->compare('m_p_river_sand',$this->m_p_river_sand,true);\n\t\t$criteria->compare('m_u_river_sand',$this->m_u_river_sand,true);\n\t\t$criteria->compare('m_p_additive',$this->m_p_additive,true);\n\t\t$criteria->compare('m_u_additive',$this->m_u_additive,true);\n\t\t$criteria->compare('capacity',$this->capacity,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('add_time',$this->add_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\t\t$criteria->compare('s_number',$this->s_number,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "1fdb95965e74b3c97482d9840292fb42", "score": "0.524874", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codalm',$this->codalm,true);\n\t\t$criteria->compare('creadopor',$this->creadopor,true);\n\t\t$criteria->compare('creadoel',$this->creadoel,true);\n\t\t$criteria->compare('modificadopor',$this->modificadopor,true);\n\t\t$criteria->compare('modificadoel',$this->modificadoel,true);\n\t\t$criteria->compare('fechainicio',$this->fechainicio,true);\n\t\t$criteria->compare('fechafin',$this->fechafin,true);\n\t\t$criteria->compare('periodocontable',$this->periodocontable,true);\n\t\t$criteria->compare('codresponsable',$this->codresponsable,true);\n\t\t//$criteria->compare('codart',$this->codart,true);\n\t\t$criteria->compare('codcen',$this->codcen,true);\n\t\t$criteria->compare('um',$this->um,true);\n\t\t$criteria->compare('cantlibre',$this->cantlibre);\n\t\t//$criteria->compare('descripcion',$this->descripcion,TRUE);\n\t\t$criteria->compare('canttran',$this->canttran);\n\t\t$criteria->compare('cantres',$this->cantres);\n\t\t$criteria->compare('ubicacion',$this->ubicacion,true);\n\t\t$criteria->compare('lote',$this->lote,true);\n\t\t$criteria->compare('siid',$this->siid,true);\n\t\t$criteria->compare('ssiduser',$this->ssiduser,true);\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->addcondition(\" descripcion like '%\".MiFactoria::cleanInput($this->descripcion).\"%' \");\n\t\tif($this->haystock=='1')\n\t\t$criteria->addCondition(\"cantlibre > 0 \");\n\t\tif($this->hayreserva=='1')\n\t\t\t$criteria->addCondition(\"cantres > 0 \");\n\t\tif($this->haytransito=='1')\n\t\t\t$criteria->addCondition(\"canttran > 0 \");\n // $criteria->addCondition(\"cantlibre > 0 or cantres >0 or canttran > 0\");\n\t\t if(isset($_SESSION['sesion_Maestrocompo'])) {\n\t\t\t\t\t$criteria->addInCondition('codart', $_SESSION['sesion_Maestrocompo'], 'AND');\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t } ELSE {\n\t\t\t\t\t\t$criteria->compare('codart',$this->codart,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t }\n\t\t//$criteria->addSearchCondition('descripcion',$this->descripcion,FALSE,'and','LIKE');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'pageSize' => 100,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "c6a55b31909c8664f00484e0e4f32040", "score": "0.5248417", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->with = 'patient';\n\n $criteria->compare('id', $this->id);\n $criteria->compare('patient_id', $this->patient_id);\n $criteria->compare('husband_name', $this->husband_name, true);\n $criteria->compare('husband_occupation', $this->husband_occupation, true);\n $criteria->compare('no_of_children_born_alive', $this->no_of_children_born_alive);\n $criteria->compare('no_of_living_children', $this->no_of_living_children);\n $criteria->compare('no_of_abortion', $this->no_of_abortion);\n $criteria->compare('no_of_stillbirths_fetal_deaths', $this->no_of_stillbirths_fetal_deaths);\n $criteria->compare('last_delivery_type', $this->last_delivery_type, true);\n $criteria->compare('large_babies_history', $this->large_babies_history, true);\n $criteria->compare('diabetes_history', $this->diabetes_history, true);\n $criteria->compare('previous_illness', $this->previous_illness, true);\n $criteria->compare('allergy', $this->allergy, true);\n $criteria->compare('previous_hospitalization', $this->previous_hospitalization, true);\n $criteria->compare('urinalysis', $this->urinalysis, true);\n $criteria->compare('cbc', $this->cbc, true);\n $criteria->compare('hbs_antigen', $this->hbs_antigen, true);\n $criteria->compare('prevoius_pregnancy_complication', $this->prevoius_pregnancy_complication, true);\n $criteria->compare('gravida', $this->gravida, true);\n $criteria->compare('para', $this->para, true);\n $criteria->compare('a', $this->a, true);\n $criteria->compare('stillbirth', $this->stillbirth, true);\n $criteria->compare('cmp', $this->cmp, true);\n $criteria->compare('edc', $this->edc, true);\n $criteria->compare('where_to_deliver', $this->where_to_deliver, true);\n $criteria->compare('to_be_attended_by', $this->to_be_attended_by, true);\n $criteria->compare('plan_to_submit', $this->plan_to_submit, true);\n $criteria->compare('risk_codes', $this->risk_codes, true);\n $criteria->compare('pregnancy_terminated_date', $this->pregnancy_terminated_date, true);\n $criteria->compare('outcome', $this->outcome, true);\n $criteria->compare('birthwt', $this->birthwt);\n $criteria->compare('place_of_delivery', $this->place_of_delivery, true);\n $criteria->compare('attended_by', $this->attended_by, true);\n $criteria->compare('checklist', $this->checklist, true);\n $criteria->compare('vit_a_date_given', $this->vit_a_date_given, true);\n $criteria->compare('vit_a_prescribed', $this->vit_a_prescribed, true);\n $criteria->compare('iron_folic_date_given', $this->iron_folic_date_given, true);\n $criteria->compare('iron_folic_prescribed', $this->iron_folic_prescribed, true);\n $criteria->compare('iron_folic_month', $this->iron_folic_month, true);\n $criteria->compare('mebendazole_date_given', $this->mebendazole_date_given, true);\n\n $criteria->compare('patient_family_name', $this->patient_family_name, true);\n $criteria->compare('patient_middle_name', $this->patient_family_name, true, 'OR');\n $criteria->compare('patient_first_name', $this->patient_family_name, true, 'OR');\n $criteria->compare('family_no', $this->family_no, true);\n\n $sort = new CSort();\n $sort->attributes = array(\n 'patient_family_name' => array(\n 'asc' => 'patient_family_name',\n 'desc' => 'patient_family_name desc'\n ),\n 'family_no' => array(\n 'asc' => 'family_no',\n 'desc' => 'family_no desc'\n ),\n '*'\n );\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => $sort,\n ));\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5245503", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5245503", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "da6df0794d501dda753330a7327a750b", "score": "0.5239165", "text": "function clients_select_getSearchQuery($ctlData,$searchRow) {\n\tif($ctlData['SEARCHABLE'] != 'no') {\n\t\t$identifier = strtolower($ctlData['IDENTIFIER']);\n\n\t\t## the A part\t\n\t\t$query_A = '';\n\t\t\n\t\t## the B part\n\t\t$query_B = '';\n\t\t\n\t\t## the C part\n\t\t$search_value = $searchRow['value'];\n\t\t$query_C = ' AND ';\n\t\t$query_C .= DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].'.'.$identifier.' like'.\"'%\".$search_value.\"%'\";\n\t\t\n\t\treturn array('partA'=>$query_A,'partB'=>$query_B,'partC'=>$query_C);\n\t}\n}", "title": "" }, { "docid": "834fa1ee6786b84df405e58b92bd2224", "score": "0.5237238", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('personID',$this->personID);\n\t\t$criteria->compare('per_title',$this->per_title,true);\n\t\t$criteria->compare('per_firstName',$this->per_firstName,true);\n\t\t$criteria->compare('per_lastName',$this->per_lastName,true);\n\t\t$criteria->compare('per_gender',$this->per_gender,true);\n\t\t$criteria->compare('per_dateofBirth',$this->per_dateofBirth,true);\n\t\t$criteria->compare('per_bloodGroup',$this->per_bloodGroup,true);\n\t\t$criteria->compare('per_nationality',$this->per_nationality,true);\n\t\t$criteria->compare('per_fathersName',$this->per_fathersName,true);\n\t\t$criteria->compare('per_mothersName',$this->per_mothersName,true);\n\t\t$criteria->compare('per_husbandsName',$this->per_husbandsName,true);\n\t\t$criteria->compare('per_parmanentAddress',$this->per_parmanentAddress,true);\n\t\t$criteria->compare('per_postCode',$this->per_postCode,true);\n\t\t$criteria->compare('per_telephone',$this->per_telephone,true);\n\t\t$criteria->compare('per_mobile',$this->per_mobile,true);\n\t\t$criteria->compare('per_email',$this->per_email,true);\n\t\t$criteria->compare('per_presentAddress',$this->per_presentAddress,true);\n\t\t$criteria->compare('per_maritulStatus',$this->per_maritulStatus,true);\n\t\t$criteria->compare('per_englishLanguageProficiency',$this->per_englishLanguageProficiency,true);\n\t\t$criteria->compare('per_computerLiteracy',$this->per_computerLiteracy,true);\n\t\t$criteria->compare('per_otherActivities',$this->per_otherActivities,true);\n\t\t$criteria->compare('per_personalStatment',$this->per_personalStatment,true);\n\t\t$criteria->compare('per_criminalConviction',$this->per_criminalConviction);\n\t\t$criteria->compare('per_convictionDetails',$this->per_convictionDetails,true);\n\t\t$criteria->compare('per_refereeOneName',$this->per_refereeOneName,true);\n\t\t$criteria->compare('per_refereeOneOccupation',$this->per_refereeOneOccupation,true);\n\t\t$criteria->compare('per_refereeOneAddress',$this->per_refereeOneAddress,true);\n\t\t$criteria->compare('per_refereeOneEmail',$this->per_refereeOneEmail,true);\n\t\t$criteria->compare('per_refereeOneMobile',$this->per_refereeOneMobile,true);\n\t\t$criteria->compare('per_refereeTwoName',$this->per_refereeTwoName,true);\n\t\t$criteria->compare('per_refereeTwoOccupation',$this->per_refereeTwoOccupation,true);\n\t\t$criteria->compare('per_refereeTwoAddress',$this->per_refereeTwoAddress,true);\n\t\t$criteria->compare('per_refereeTwoEmail',$this->per_refereeTwoEmail,true);\n\t\t$criteria->compare('per_refereeTwoMobile',$this->per_refereeTwoMobile,true);\n\t\t$criteria->compare('per_entryDate',$this->per_entryDate,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "1ade65c11811c00ff2680e07d27feb1b", "score": "0.523719", "text": "public function get_search_doctor($requested_data) {\n\n $columns = \"user_id, \n CONCAT(user_first_name,' ',user_last_name) AS user_name,\n user_photo_filepath \n \";\n\n $get_doctor_detail_query = \" SELECT \n \" . $columns . \" \n FROM \n \" . TBL_USERS . \" \n LEFT JOIN \n \" . TBL_DOCTOR_CLINIC_MAPPING . \" \n ON \n user_id = doctor_clinic_mapping_user_id AND doctor_clinic_mapping_status = 1\n WHERE\n user_status=1 AND\n user_id != '\" . $requested_data['doctor_id'] . \"' AND\n user_type=2 AND\n doctor_clinic_mapping_role_id = 1 \";\n\n if (!empty($requested_data['search'])) {\n\n $get_doctor_detail_query .=\" \n AND \n (\n user_first_name LIKE '%\" . $requested_data['search'] . \"%' OR\n user_last_name LIKE '%\" . $requested_data['search'] . \"%' OR\n user_email LIKE '%\" . $requested_data['search'] . \"%' \n )\n \";\n }\n\n $get_doctor_data = $this->get_all_rows_by_query($get_doctor_detail_query);\n\n return $get_doctor_data;\n }", "title": "" }, { "docid": "047e33875807f88110193a911b427855", "score": "0.52368414", "text": "public function search($search);", "title": "" }, { "docid": "a6687c11d4d1b4ba7d188cc586e539fa", "score": "0.52308565", "text": "public function getSearchedContributorsList($params)\n {\n $where = '';\n if($params['searchsubmit'] == 'Search')\n {\n if($params['aotitle']!='0')\n {\n $contribsIdsList= $this->getContribsInAo($params['aotitle']);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['contrib']!='0')\n {\n $where.= \" AND u.identifier=\".$params['contrib'];\n }\n if($params['type']!='0')\n {\n $where.= \" AND u.profile_type='\".$params['type'].\"'\";\n }\n if($params['type2']!='0')\n {\n if($params['type2'] == 'writer')\n $where.= \" AND u.type2 IS NULL\";\n else\n $where.= \" AND u.type2='\".$params['type2'].\"'\";\n }\n if($params['status']!='0')\n {\n $where.= \" AND u.status='\".$params['status'].\"'\";\n }\n if($params['blacklist']!='0')\n {\n $where.= \" AND u.blackstatus='\".$params['blacklist'].\"'\";\n }\n if($params['nationalism']!='0')\n {\n $where.= \" AND cb.nationality=\".$params['nationalism'];\n }\n if($params['minage']!='')\n {\n // $where.= \" AND cb.dob='\".$minage.\"'\";\n $where.= \" AND ((DATEDIFF(NOW(),cb.dob))/365) >='\".$params['minage'].\"' AND ((DATEDIFF(NOW(),cb.dob))/365) <='\".$params['maxage'].\"'\";\n }\n if($params['minartsvalid']!='')\n {\n $whereQuery= \" WHERE status IN ('bid', 'under_study', 'disapproved', 'time_out', 'published', 'closed', 'on_hold')\n GROUP BY user_id HAVING COUNT(user_id) Between \".$params['minartsvalid'].\" and \".$params['maxartsvalid'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['mintotalparts']!='')\n {\n $whereQuery= \" GROUP BY user_id HAVING COUNT(user_id) Between \".$params['mintotalparts'].\" and \".$params['maxtotalparts'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['minartssent']!='')\n {\n $whereQuery= \" WHERE status IN ('under_study','disapproved', 'published')\n GROUP BY user_id HAVING COUNT(user_id) Between \".$params['minartssent'].\" and \".$params['maxartssent'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['minpartsrefused']!='')\n {\n $whereQuery= \" WHERE status IN ('bid_refused')\n GROUP BY user_id HAVING COUNT(user_id) Between \".$params['minpartsrefused'].\" and \".$params['maxpartsrefused'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['minartsrefused']!='')\n {\n $whereQuery= \" WHERE status IN ('closed')\n GROUP BY user_id HAVING COUNT(user_id) Between \".$params['minartsrefused'].\" and \".$params['maxartsrefused'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['noofdisapproved']!='')\n {\n $whereQuery= \" WHERE refused_count > 0\n GROUP BY user_id HAVING COUNT(user_id) <= \".$params['noofdisapproved'].\"\";\n $contribsIdsList= $this->getContibsIdsForSearch($whereQuery);\n $where.= \" AND u.identifier IN (\".$contribsIdsList.\")\";\n }\n if($params['category']!=0)\n {\n $str1 = \" REGEXP ('\";\n $find_ini='';\n foreach($params['category'] as $catid => $catvalue)\n {\n $exp = $catvalue;\n for($i=$catvalue; $i<100; $i++)\n {\n $exp.= \"|\".($i+1);\n }\n\n $str1.= \"(\".$catid.\"@\".$exp.\")|\";\n $category1[] = $str1;\n }\n $str1 = substr($str1, 0, -1).\"')\";\n $where.= \" AND cb.category_more \".$str1.\" AND find_in_set('\".$catid.\"', cb.favourite_category)>0\";\n }\n if($params['contribquiz']!=0)\n {\n $where.= \" AND qp.quiz_id = \".$params['contribquiz'];\n }\n if($params['language']!='0')\n {\n $where.= \" AND cb.language = '\".$params['language'].\"'\";\n }\n if($params['language2']!='0')\n {\n $langstr1 = \" REGEXP ('\";\n foreach($params['language2'] as $lang2id => $lang2value)\n {\n $exp = $lang2value;\n for($i=$lang2value; $i<100; $i++)\n {\n $exp.= \"|\".($i+1);\n }\n $langstr1.= \"(\".$lang2id.\"@\".$exp.\")|\";\n $language2[] = $langstr1;\n }\n $langstr1 = substr($langstr1, 0, -1).\"')\";\n $where.= \" AND cb.language_more \".$langstr1;\n //$where.= \" AND cb.language_more = '\".$language2.\"'\";\n }\n if($params['start_date']!='' && $params['end_date']!='')\n {\n $start_date = str_replace('/','-',$params['start_date']);\n $end_date = str_replace('/','-',$params['end_date']);\n $start_date = date('Y-m-d', strtotime($start_date));\n $end_date = date('Y-m-d', strtotime($end_date));\n $where.= \" AND DATE_FORMAT(u.created_at, '%Y-%m-%d') BETWEEN '\".$start_date.\"' AND '\".$end_date.\"'\";\n }\n if($params['act_start_date']!='' && $params['act_end_date']!='')\n {\n $act_start_date = str_replace('/','-',$params['act_start_date']);\n $act_end_date = str_replace('/','-',$params['act_end_date']);\n $act_start_date = date('Y-m-d', strtotime($act_start_date));\n $act_end_date = date('Y-m-d', strtotime($act_end_date));\n $where.= \" AND DATE_FORMAT(p.created_at, '%Y-%m-%d') BETWEEN '\".$act_start_date.\"' AND '\".$act_end_date.\"'\";\n }\n }\n elseif($params['total_contribs']=='yes')\n $where.= \" \";\n elseif($params['never_participated']=='yes')\n $where.= \" AND u.identifier NOT IN (select user_id from Participation)\";\n elseif($params['never_sent']=='yes')\n $where.= \" AND u.identifier IN (select user_id from Participation where status NOT IN ('closed','disapproved','published', 'under_study', 'disapprove_client','closed_client'))\";\n elseif($params['never_validated']=='yes')\n {\n $where.= \" AND u.identifier IN (select user_id from Participation where status NOT IN\n ('bid','under_study','time_out','validated','published','refused','ignored','disapproved','approved','closed','on_hold','bid_temp','bid_refused_temp','bid_nonpremium_timeout','bid_premium_timeout','disapproved_temp','closed_temp','plag_exec','closed_client_temp','disapprove_client','closed_client'))\";\n }\n elseif($params['once_validated']=='yes')\n $where.= \" AND u.identifier IN (select user_id from Participation where status IN ('bid', 'under_study', 'disapproved', 'time_out', 'published', 'closed', 'on_hold'))\";\n elseif($params['once_published']=='yes')\n $where.= \" AND u.identifier IN (select user_id from Participation where status IN ('published'))\";\n else\n $where = \" \";\n\n $Query = \"select distinct u.identifier,u.email, u.created_at, u.blackstatus, u.profile_type, u.status, up.initial, u.password,\n up.first_name, up.address, up.city, up.state, up.zipcode, up.country, up.phone_number, up.last_name, cb.university,\n cb.dob, cb.profession, cb.favourite_category, cb.category_more, cb.language_more, cb.language, cb.payment_type, cb.self_details from User u\n\t\tLEFT JOIN UserPlus up ON u.identifier=up.user_id\n\t\tLEFT JOIN Contributor cb ON u.identifier=cb.user_id\n\t\tLEFT JOIN Participation p ON p.user_id = cb.user_id\n\t\tLEFT JOIN QuizParticipation qp ON qp.user_id = cb.user_id\n\t where u.type='contributor' \".$where.\"\";\n if(($result = $this->getQuery($Query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "title": "" }, { "docid": "eba0417cdde741f5a94c17c0cb9ef500", "score": "0.5227642", "text": "public function search($query);", "title": "" }, { "docid": "21ec763e4ce81134bc0e1fd47e906a66", "score": "0.52090025", "text": "public function search()\n {\n \n //if(!auth()->user()->active) return Redirect('/');\n\n $medics = [];\n \n if(request()->all())\n {\n if(trim(request('q')) != '' || request('province') != '' || request('canton') != '' || request('district') != '' || request('lat') != '' || request('lon') != '' || request('speciality') != ''){\n $search['q'] = trim(request('q'));\n $search['speciality'] = request('speciality');\n $search['province'] = request('province');\n $search['canton'] = request('canton');\n $search['district'] = request('district');\n $search['lat'] = request('lat');\n $search['lon'] = request('lon');\n $search['general'] = request('general');\n $search['active'] = 1;\n $selectedSpeciality = $search['speciality'];\n \n \n $medics = $this->medicRepo->findAll($search);\n //$count = $medics->count();\n\n //flash('Se '. (($count > 1) ? \"encontraron\" : \"encontró \") . $count.' Médico(s)','success');\n \n if(request('speciality'))\n {\n $specialist = 1;\n return view('user.search.medics.index',compact('medics','search','selectedSpeciality','specialist')); \n }\n if(request('general'))\n {\n $general = 1;\n return view('user.search.medics.index',compact('medics','search','selectedSpeciality','general')); \n }\n \n \n \n \n\n return view('user.search.medics.index',compact('medics','search','selectedSpeciality'));\n }\n }\n\n return view('user.search.medics.index',compact('medics','specialist'));\n\n }", "title": "" }, { "docid": "687083dbb4991462e4d19f7efbb22bd6", "score": "0.5206586", "text": "protected function _searchPrams(array $params = array())\n {\n if ($params['keywords']) {\n $this->where['_complex'] = array(\n 'id' => array('like', '%' . $params['keywords'] . '%'),\n 'member_id' => array('like', '%' . $params['keywords'] . '%'),\n '_logic' => 'or'\n );\n }\n if ($params['hatcher'] || $params['hatcher'] === '0') {\n $this->where['is_hatcher'] = $params['hatcher'];\n }\n if ($params['status'] || $params['status'] === '0') {\n $this->where['status'] = $params['status'];\n }\n }", "title": "" }, { "docid": "e5c71ef0f76ff7e7914aef99a6414110", "score": "0.5204452", "text": "public function mysearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\n\t\t$criteria->condition =\"miscellaneous_fees_payment_cheque_student_id = :studentid && miscellaneous_fees_payment_cheque_status = :miscellaneous_fees_payment_cheque_status && miscellaneous_fees_payment_cheque_draft_status = :miscellaneous_fees_payment_cheque_draft_status\";\n\t\t$criteria->params = array (\n\t\t':studentid' => $_REQUEST['id'],\n\t\t':miscellaneous_fees_payment_cheque_status' => 0,\n\t\t':miscellaneous_fees_payment_cheque_draft_status' => 1,\n\t\t);\n\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_master_id',$this->miscellaneous_fees_payment_cheque_master_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_id',$this->miscellaneous_fees_payment_cheque_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_number',$this->miscellaneous_fees_payment_cheque_number);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_date',$this->dbDateSearch($this->miscellaneous_fees_payment_cheque_date),true);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_bank',$this->miscellaneous_fees_payment_cheque_bank);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_branch',$this->miscellaneous_fees_payment_cheque_branch,true);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_amount',$this->miscellaneous_fees_payment_cheque_amount);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_status',$this->miscellaneous_fees_payment_cheque_status);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_draft_status',$this->miscellaneous_fees_payment_cheque_draft_status);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_student_id',$this->miscellaneous_fees_payment_cheque_student_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_receipt_id',$this->miscellaneous_fees_payment_cheque_receipt_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_organization_id',$this->miscellaneous_fees_payment_cheque_organization_id);\n\t\t$cheque_data = new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t$_SESSION['cheque_data']=$cheque_data;\n\t\treturn $cheque_data;\n\t}", "title": "" }, { "docid": "def3feabebe482be526c8fe3997ce224", "score": "0.5203744", "text": "public function search2()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ptopartida',$this->ptopartida,true);\n\t\t$criteria->compare('distpartida',$this->distpartida,true);\n\t\t$criteria->compare('provpartida',$this->provpartida,true);\n\t\t$criteria->compare('dptopartida',$this->dptopartida,true);\n\t\t$criteria->compare('ptollegada',$this->ptollegada,true);\n\t\t$criteria->compare('distllegada',$this->distllegada,true);\n\t\t$criteria->compare('provllegada',$this->provllegada,true);\n\t\t$criteria->compare('dptollegada',$this->dptollegada,true);\n\t\t$criteria->compare('direccionformaldes',$this->direccionformaldes,true);\n\t\t$criteria->compare('direcciontransportista',$this->direcciontransportista,true);\n\t\t$criteria->compare('c_numgui',$this->c_numgui,true);\n\t\t$criteria->compare('c_coclig',$this->c_coclig,true);\n\t\t$criteria->compare('d_fecgui',$this->d_fecgui,true);\n\t\t$criteria->compare('c_estgui',$this->c_estgui,true);\n\t\t$criteria->compare('c_rsguia',$this->c_rsguia,true);\n\t\t$criteria->compare('c_codtra',$this->c_codtra,true);\n\t\t$criteria->compare('c_trans',$this->c_trans,true);\n\t\t$criteria->compare('c_motivo',$this->c_motivo,true);\n\t\t$criteria->compare('c_placa',$this->c_placa,true);\n\t\t$criteria->compare('c_licon',$this->c_licon,true);\n\t//\t$criteria->compare('d_fectra',$this->d_fectra,true);\n\t\t$criteria->compare('c_desgui',$this->c_desgui,true);\n\t\t$criteria->compare('c_descri',$this->c_descri,true);\n\t\t$criteria->compare('n_guia',$this->n_guia,true);\n\t\t$criteria->compare('c_texto',$this->c_texto,true);\n\t\t$criteria->compare('c_dirsoc',$this->c_dirsoc,true);\n\t\t$criteria->compare('c_serie',$this->c_serie,true);\n\t\t//$criteria->compare('c_salida',$this->c_salida,true);\n\t\t$criteria->compare('razondestinatario',$this->razondestinatario,true);\n\t\t$criteria->compare('rucdestinatario',$this->rucdestinatario,true);\n\t\t$criteria->compare('ructrans',$this->ructrans,true);\n\t\t$criteria->compare('razontransportista',$this->razontransportista,true);\n\t\t$criteria->compare('c_estado',$this->c_estado,true);\n\t\t$criteria->compare('n_direc',$this->n_direc);\n\t\t$criteria->compare('n_direcformaldes',$this->n_direcformaldes);\n\t\t$criteria->compare('n_directran',$this->n_directran);\n\t\t$criteria->compare('n_dirsoc',$this->n_dirsoc);\n\t\t$criteria->compare('creadopor',$this->creadopor,true);\n\t\t$criteria->compare('modificadopor',$this->modificadopor,true);\n\t\t$criteria->compare('creadoel',$this->creadoel,true);\n\t\t$criteria->compare('modificadoel',$this->modificadoel,true);\n\t\t$criteria->compare('rucsoc',$this->rucsoc,true);\n\t\t$criteria->compare('estado',$this->estado,true);\n\t\t$criteria->compare('n_hguia',$this->n_hguia,true);\n\t\t$criteria->compare('c_itguia',$this->c_itguia,true);\n\t\t$criteria->compare('n_cangui',$this->n_cangui);\n\t\t$criteria->compare('c_codgui',$this->c_codgui,true);\n\t\t$criteria->compare('c_edgui',$this->c_edgui,true);\n\t\t$criteria->compare('c_descri',$this->c_descri,true);\n\t\t$criteria->compare('m_obs',$this->m_obs,true);\n\t\t$criteria->compare('c_codactivo',$this->c_codactivo,true);\n\t\t$criteria->compare('c_um',$this->c_um,true);\n\t\t$criteria->compare('c_codep',$this->c_codep,true);\n\t\t$criteria->compare('n_detgui',$this->n_detgui,true);\n\t\t$criteria->compare('l_libre',$this->l_libre,true);\n\t\t$criteria->compare('nomep',$this->nomep,true);\n\t\t$criteria->compare('motivo',$this->motivo,true);\n\t\t$criteria->compare('estadodetalle',$this->estadodetalle,true);\n\t\t$criteria->compare('c_af',$this->c_af,true);\n\t\t$criteria->compare('cod_cen',$this->cod_cen,true);\n\t\t$criteria->compare('c_codsap',$this->c_codsap,true);\n\t\t$criteria->compare('hidref',$this->hidref,true);\n\t\t$criteria->compare('docref',$this->docref,true);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$case=$this->d_fectra;\n\t\t$criteria->compare('d_fectra',trim(\" \".$case.\" \"),false);\n\t\t$case2=$this->d_fectra1;\n\t\t//$criteria->compare('d_fectra1',trim(\" \".$case2.\" \"),false);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$fechaactual = date(\"Y-m-d\");\n\t\t$criteria->addCondition(\"d_fectra = '\".$fechaactual.\"'\");\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "8f78d0bef53335a0abad255c86f1de21", "score": "0.52028954", "text": "function AdvancedSearchWhere() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\t\t$sWhere = \"\";\n\t\tif (!$Security->CanSearch()) return \"\";\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->PK_TINBAI_ID, FALSE); // PK_TINBAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_CONGTY_ID, FALSE); // FK_CONGTY_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMGIOITHIEU_ID, FALSE); // FK_DMGIOITHIEU_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMTUYENSINH_ID, FALSE); // FK_DMTUYENSINH_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, FALSE); // FK_DTSVTUONGLAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVDANGHOC_ID, FALSE); // FK_DTSVDANGHOC_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTCUUSV_ID, FALSE); // FK_DTCUUSV_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, FALSE); // FK_DTDOANHNGHIEP_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TITLE, FALSE); // C_TITLE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_SUMARY, FALSE); // C_SUMARY\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_CONTENTS, FALSE); // C_CONTENTS\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_HIT_MAINSITE, FALSE); // C_HIT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NEW_MYSEFLT, FALSE); // C_NEW_MYSEFLT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_COMMENT_MAINSITE, FALSE); // C_COMMENT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ORDER_MAINSITE, FALSE); // C_ORDER_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_STATUS_MAINSITE, FALSE); // C_STATUS_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_VISITOR_MAINSITE, FALSE); // C_VISITOR_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ACTIVE_MAINSITE, FALSE); // C_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, FALSE); // C_TIME_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, FALSE); // FK_NGUOIDUNGID_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NOTE, FALSE); // C_NOTE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_ADD, FALSE); // C_USER_ADD\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ADD_TIME, FALSE); // C_ADD_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_EDIT, FALSE); // C_USER_EDIT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_EDIT_TIME, FALSE); // C_EDIT_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_EDITOR_ID, FALSE); // FK_EDITOR_ID\n\n\t\t// Set up search parm\n\t\tif ($sWhere <> \"\") {\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->PK_TINBAI_ID); // PK_TINBAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_CONGTY_ID); // FK_CONGTY_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMGIOITHIEU_ID); // FK_DMGIOITHIEU_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMTUYENSINH_ID); // FK_DMTUYENSINH_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID); // FK_DTSVTUONGLAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVDANGHOC_ID); // FK_DTSVDANGHOC_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTCUUSV_ID); // FK_DTCUUSV_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID); // FK_DTDOANHNGHIEP_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TITLE); // C_TITLE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_SUMARY); // C_SUMARY\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_CONTENTS); // C_CONTENTS\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_HIT_MAINSITE); // C_HIT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NEW_MYSEFLT); // C_NEW_MYSEFLT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_COMMENT_MAINSITE); // C_COMMENT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ORDER_MAINSITE); // C_ORDER_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_STATUS_MAINSITE); // C_STATUS_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_VISITOR_MAINSITE); // C_VISITOR_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ACTIVE_MAINSITE); // C_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NOTE); // C_NOTE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_ADD); // C_USER_ADD\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ADD_TIME); // C_ADD_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_EDIT); // C_USER_EDIT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_EDIT_TIME); // C_EDIT_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_EDITOR_ID); // FK_EDITOR_ID\n\t\t}\n\t\treturn $sWhere;\n\t}", "title": "" }, { "docid": "acbca331bd14a0a533526f42d83119ca", "score": "0.51973605", "text": "public function search(Request $request)\r\n {\r\n /*$request->validate([\r\n 'query' => 'required|min:3',\r\n ]);\r\n*/\r\n $query = $request->input('query');\r\n\r\n // $products = Product::where('name', 'like', \"%$query%\")\r\n // ->orWhere('details', 'like', \"%$query%\")\r\n // ->orWhere('description', 'like', \"%$query%\")\r\n // ->paginate(10);\r\n\r\n $listings = Listing::search($query)->paginate(10);\r\n}", "title": "" }, { "docid": "29e0fdd10dd5e79d18c8aae66b881477", "score": "0.5193891", "text": "public static function searchByName($q)\n {\n // //->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['name', 'notes']]])\n // ->query(['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]], ['term' => ['user_id' => UserUtil::getBrockerIds()]])\n // ->source(['user_id', 'name', 'notes'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n\n $searchResult = Deal::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]]\n ]\n ]\n ])\n ->source(['user_id'])\n ->from(0)\n ->size(10000)\n ->raw();\n\n\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $dealResult = array_map('intval', Arr::pluck($results, '_id'));\n\n //-----------\n\n // $searchResult = DealContact::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]])\n // ->source(['deal_id'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = DealContact::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]]\n ]\n ]\n ])\n ->source(['deal_id', 'phone'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n\n $dealcontactResult = Arr::pluck($results, '_source.deal_id');\n\n //--------------\n\n // $searchResult = Reminder::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['details', 'tags']]])\n // ->source(['deal_id','details', 'tags'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = Reminder::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['details', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','details', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $reminderResult = Arr::pluck($results, '_source.deal_id');\n\n $searchResult = JournalEntry::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['notes', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','notes', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $journalentryResult = Arr::pluck($results, '_source.deal_id');\n\n\n return array_values(Arr::sort(array_values(array_unique(Arr::collapse([$dealResult, $dealcontactResult, $reminderResult, $journalentryResult])))));\n }", "title": "" }, { "docid": "ee7ea53aa5be976a71ff5c419dc3fb31", "score": "0.51913905", "text": "public function index(Request $request)\n {\n $qs = Person::where('type_register_id', '=', 1);\n $qs->where('closed' , '=', false);\n if(count($request->all()) > 0){\n if ($request->folio){\n $qs = $qs->where('folio' , 'like', '%'.$request->folio.'%');\n }\n if ($request->name){\n $columns = ['first_name','last_name_1','last_name_2'];\n $value = $request->name;\n $qs->where(function ($q) use ($columns, $value) {\n foreach ($columns as $column) {\n $q->orWhere($column, 'like', \"%{$value}%\");\n }\n });\n\n /*\n $fullName = $this->split_name($request->name);\n $arrayName = [];\n if($fullName['first_name'] != null){\n array_push($arrayName, ['first_name' , 'like', '%'.$fullName['first_name'].'%']);\n }\n if($fullName['middle_name'] != null){\n array_push($arrayName, ['last_name_1', 'like', '%'.$fullName['middle_name'].'%']);\n }\n if ($fullName['last_name'] != null){\n if($fullName['middle_name'] != null){\n array_push($arrayName, ['last_name_2', 'like', '%'.$fullName['last_name'].'%']);\n }else{\n array_push($arrayName, ['last_name_1', 'like', '%'.$fullName['middle_name'].'%']);\n }\n }else{\n array_push($arrayName, ['last_name_1', 'like', '%'.$fullName['middle_name'].'%']);\n }\n $qs = $qs->where($arrayName);\n */\n }\n if ($request->date){\n $qs = $qs->whereHas('disappearance_report', function($q) use ($request){\n $q->where('date', '=', date($request->date));\n });\n }\n }\n $this->authorize('index', Search::class);\n return view('search.locatel.index', [\n 'people' => $qs->orderBy('id', 'desc')->limit(50)->get(),\n ]);\n }", "title": "" }, { "docid": "b90f15e5e800081ea8f0846264f76c5a", "score": "0.5188153", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n \n\t\t$criteria->compare('ESUB_ID',$this->ESUB_ID);\n\t\t$criteria->compare('ESUB_EMP_ID',$this->ESUB_EMP_ID);\n//\t\t$criteria->compare('ESUB_SUBSCRS_ID',$this->ESUB_SUBSCRS_ID);\n// $criteria->together=true;\n\t\t\n//\t\t$criteria->compare('ESUB_PAYMENT_ID',$this->ESUB_PAYMENT_ID);\n $criteria->with = array( 'eSUBSUBSCRS' );\n $criteria->compare('eSUBSUBSCRS.SUBSCR_RATE', $this->ESUB_PAYMENT_ID,true);\n $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $this->ESUB_SUBSCRS_ID,true);\n\t\t$criteria->compare('ESUB_STATUS',$this->ESUB_STATUS,true);\n $criteria->compare('ESUB_PURCHASE_DATE',$this->ESUB_PURCHASE_DATE,true);\n\t\t$criteria->compare('ESUB_EXPIRY_DATE',$this->ESUB_EXPIRY_DATE,true);\n\t\t$criteria->compare('ESUB_UTILIZED_COUNT',$this->ESUB_UTILIZED_COUNT,true);\n\t\t$criteria->compare('ESUB_REMAIN_COUNT',$this->ESUB_REMAIN_COUNT,true);\n// $criteria->compare('date(ESUB_PURCHASE_DATE)',$this->ESUB_PURCHASE_DATE,true);\n////\n// $criteria->compare('date(ESUB_EXPIRY_DATE)',$this->ESUB_EXPIRY_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_PURCHASE_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_EXPIRY_DATE,true);\n// if($this->ESUB_SUBSCRS_ID)\n// {\n// $criteria->together = true;\n// $criteria->with = ( 'eSUBSUBSCRS' );\n// $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $model->ESUB_SUBSCRS_ID,true);\n// }\n// if(strlen($this->ESUB_PURCHASE_DATE) && strlen($this->ESUB_EXPIRY_DATE)) {\n// $criteria->params[':ESUB_PURCHASE_DATE'] = date('Y-m-d', strtotime($this->ESUB_PURCHASE_DATE));\n// \n// $criteria->params[':ESUB_EXPIRY_DATE'] = date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE));\n//// (strlen($this->ESUB_EXPIRY_DATE)) ? date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE)) : $criteria->params[':post_date'];\n// $criteria->addCondition('DATE(ESUB_PURCHASE_DATE) BETWEEN :ESUB_PURCHASE_DATE AND :ESUB_EXPIRY_DATE');\n// }\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n \n\t\t));\n\t}", "title": "" }, { "docid": "24bbe029fc7ff1f2eb8a78678c955a91", "score": "0.51858497", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "336e7581bc1f450c65d357b56c92a268", "score": "0.51850635", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('t.id',$this->id);\n\t\t$criteria->compare('t.property_name_or_address',$this->property_name_or_address,true);\n\t\t$criteria->compare('t.postal_code',$this->postal_code,true);\n\t\t$criteria->compare('t.unit_from',$this->unit_from);\n\t\t$criteria->compare('t.unit_to',$this->unit_to);\n\t\t$criteria->compare('t.location_id',$this->location_id);\n\t\t$criteria->compare('t.property_type_id',$this->property_type_id);\n\t\t$criteria->compare('t.tenure',$this->tenure,true);\n\t\t$criteria->compare('t.furnished',$this->furnished);\n\t\t$criteria->compare('t.of_bathrooms_from',$this->of_bathrooms_from);\n\t\t$criteria->compare('t.of_bathrooms_to',$this->of_bathrooms_to);\n\t\t$criteria->compare('t.of_bedroom_from',$this->of_bedroom_from);\n\t\t$criteria->compare('t.of_bedroom_to',$this->of_bedroom_to);\n\t\t$criteria->compare('t.type_selling',$this->type_selling,true);\n\t\t$criteria->compare('t.floor_area',$this->floor_area,true);\n\t\t$criteria->compare('t.tenancy_expiry_date',$this->tenancy_expiry_date,true);\n\t\t$criteria->compare('t.monthly_rental_amount',$this->monthly_rental_amount);\n\t\t$criteria->compare('t.remark',$this->remark,true);\n\t\t$criteria->compare('t.nric',$this->nric,true);\n\t\t$criteria->compare('t.owner_particular',$this->owner_particular,true);\n\t\t$criteria->compare('t.fullname',$this->fullname,true);\n\t\t$criteria->compare('t.contact_no',$this->contact_no,true);\n\t\t$criteria->compare('t.email',$this->email,true);\n\t\t$criteria->compare('t.target_price',$this->target_price,true);\n $criteria->order = \"t.id DESC\";\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize'=> Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']),\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "a4ad76a02f937f25350d73bc10c78513", "score": "0.51829153", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('reg_no',$this->reg_no,true);\n\t\t$criteria->compare('service_date',$this->service_date,true);\n\t\t$criteria->compare('oil_lubricant_type',$this->oil_lubricant_type,true);\n\t\t$criteria->compare('oil_lubricant_quantity',$this->oil_lubricant_quantity);\n\t\t$criteria->compare('oil_lubricant_total_cost',$this->oil_lubricant_total_cost);\n\t\t$criteria->compare('outsource_material',$this->outsource_material,true);\n\t\t$criteria->compare('outsource_material_cost',$this->outsource_material_cost);\n\t\t$criteria->compare('outsource_labour_total_cost',$this->outsource_labour_total_cost);\n\t\t$criteria->compare('description_of_ourtsource_work_performed',$this->description_of_ourtsource_work_performed,true);\n\t\t$criteria->compare('odometer_reading',$this->odometer_reading);\n\t\t$criteria->compare('duration_week',$this->duration_week,true);\n\t\t$criteria->compare('costyear',$this->costyear);\n\t\t$criteria->compare('analysisperiod',$this->analysisperiod);\n\t\t$criteria->compare('cost_rec_id',$this->cost_rec_id);\n\t\t$criteria->compare('duration_start',$this->duration_start,true);\n\t\t$criteria->compare('duration_end',$this->duration_end,true);\n\t\t$criteria->compare('approaved',$this->approaved);\n\t\t$criteria->compare('user_created',$this->user_created);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "e1ff471f60a0bf93a27aafdd6e9fe942", "score": "0.5181639", "text": "public function search($keyword)\n\t{\n\t\t// $builder = $this->table('tbl_customer');\n\t\t// $builder->like('name', $keyword);\n\t\t// return $builder;\n\n\n\t\treturn $this->table('tbl_suppliers')->like('supplier_name', $keyword)->orLike('address', $keyword)->orLike('no_telp', $keyword);\n\t}", "title": "" }, { "docid": "5a967da3b9aeb3f0a32bf8d9859888bc", "score": "0.517993", "text": "public function index()\n {\n if( Request::ajax() ) {\n\n $where_str = \"1 = ?\";\n $where_params = array(1);\n $consultant_ids = [];\n\n if (Input::has('sSearch'))\n {\n $search \t= Input::get('sSearch');\n\n $where_str .= \" and ( \"\n \t\t\t. \"title_of_consultancy like '%{$search}%'\"\n \t\t\t. \" or consultants.surname like '%{$search}%'\"\n \t\t\t. \" or consultants.title like '%{$search}%'\"\n \t\t\t. \" or akdn_manager_email like '%{$search}%'\"\n \t\t\t. \" or \".DB::raw('DATE_FORMAT(start_date, \"%d-%m-%Y\")').\" like '%{$search}%'\"\n \t\t\t. \" or \".DB::raw('DATE_FORMAT(end_date, \"%d-%m-%Y\")').\" like '%{$search}%'\"\n \t\t\t. \")\";\n }\n\n if (Input::get('sSearch_0') != \"\"){\n $search = Input::get('sSearch_0');\n\n $where_str .= \" and title_of_consultancy like '%{$search}%'\"; \n \t}\n \tif (Input::get('sSearch_1') != \"\"){\n $search = Input::get('sSearch_1');\n\n $where_str .= \" and akdn_manager_name like '%{$search}%'\"; \n }\n if (Input::get('sSearch_2') != \"\"){\n $search = Input::get('sSearch_2');\n\n $where_str .= \" and akdn_manager_email like '%{$search}%'\"; \n }\n if (Input::get('sSearch_3') != \"\"){\n $search = Input::get('sSearch_3');\n\n $where_str .= \" and start_date like '%{$search}%'\"; \n }\n if (Input::get('sSearch_4') != \"\"){\n $search = Input::get('sSearch_4');\n\n $where_str .= \" and end_date like '%{$search}%'\"; \n }\n\n\n $total_count = ConsultantAssignment::select('consultant_assignments.id')\n \t\t\t\t\t\t\t\t\t->leftJoin('consultants','consultants.id','=','consultant_assignments.consultant_id')\n\t\t\t\t\t\t ->where('consultant_assignments.akdn_id',Auth::akdn()->get()->id)\n\t\t\t\t\t\t ->whereRaw($where_str,$where_params)\n\t\t\t\t\t\t ->count();\n \n $columns = array('consultant_assignments.id','consultant_id','status','title_of_consultancy', 'surname', 'other_names', 'akdn_manager_name', 'akdn_manager_email', DB::raw('DATE_FORMAT(start_date, \"%d-%m-%Y\") as start_date_dmy'), DB::raw('DATE_FORMAT(end_date, \"%d-%m-%Y\") as end_date_dmy'));\n\n $user = ConsultantAssignment::select($columns)\n \t\t->leftJoin('consultants','consultants.id','=','consultant_assignments.consultant_id')\n \t\t->where('consultant_assignments.akdn_id',Auth::akdn()\n \t\t->get()->id)\n \t\t->whereRaw($where_str, $where_params);\n \n\n if(Input::has('iDisplayStart') && Input::get('iDisplayLength') !='-1')\n {\n $user->take(Input::get('iDisplayLength'))->skip(Input::get('iDisplayStart'));\n } \n\n if(Input::has('iSortCol_0'))\n {\n $sql_order='';\n for ( $i = 0; $i < Input::get('iSortingCols'); $i++ )\n {\n $column = $columns[Input::get('iSortCol_' . $i)];\n\n if(false !== ($index = strpos($column, ' as ')))\n {\n $column = substr($column, 0, $index);\n }\n\n $user->orderBy($column,Input::get('sSortDir_'.$i)); \n }\n }\n\n $user = $user->get()->toArray();\n \n $response = array(\n\n 'iTotalDisplayRecords' => $total_count,\n 'iTotalRecords' => $total_count,\n 'sEcho' => intval(Input::get('sEcho')),\n 'aaData' => $user\n );\n\n return Response::json($response, 200);\n }\n\n return View::make('akdn.consultant.awarded');\n }", "title": "" }, { "docid": "6c683e298585f67d19cc553a3ffe4cb8", "score": "0.51779", "text": "public function searchCostBill() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n $criteria = new CDbCriteria;\n $criteria->order = 'id DESC';\n $criteria->compare('id', $this->id);\n $criteria->compare('bill_no', $this->bill_no, true);\n // $criteria->compare('bill_date', $this->bill_date, true);\n $criteria->compare('bill_from_date', $this->bill_from_date, true);\n $criteria->compare('bill_to_date', $this->bill_to_date, true);\n $criteria->compare('customer_id', $this->customer_id);\n // $criteria->compare('purchase_order_id', $this->purchase_order_id);\n $criteria->compare('item_id', $this->item_id);\n $criteria->compare('bill_type', $this->bill_type, true);\n $criteria->compare('print_type', $this->print_type, true);\n $criteria->compare('added_on', $this->added_on, true);\n $criteria->compare('particulars', $this->particulars, true);\n $criteria->condition=\"bill_type='cost_bill'\";\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "227ac70398f921af8a29a85abe07bb12", "score": "0.5174999", "text": "public function search()\n {\n if (request('bulan') && request('no')) {\n $nice = explode(\"-\", request('bulan'));\n $no = request('no');\n $borrowsRes = Borrow::whereMonth('tanggal_peminjaman', $nice[1])\n ->whereYear('tanggal_peminjaman', $nice[0])\n ->where('member_no', 'like', \"%{$no}%\")\n ->paginate(10)\n ->appends(request()->query());\n } else if (request('bulan')) {\n $nice = explode(\"-\", request('bulan'));\n $borrowsRes = Borrow::whereMonth('tanggal_peminjaman', $nice[1])\n ->whereYear('tanggal_peminjaman', $nice[0])\n ->paginate(10)\n ->appends(request()->query());\n } else {\n $no = request('no');\n\n $borrowsRes = Borrow::where('member_no', 'like', \"%{$no}%\")\n ->paginate(10)\n ->appends(request()->query());\n }\n return view('admin.borrow.table', compact('borrowsRes'));\n }", "title": "" }, { "docid": "bb69edc363c41f58ca5ce0a1cfc82f2c", "score": "0.51692706", "text": "public function getSearch($parameters = array());", "title": "" }, { "docid": "14aeb6b7347eb5494901b09b4264da57", "score": "0.51682436", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('report_id',$this->report_id);\n\t\t$criteria->compare('access_road_good_condition',$this->access_road_good_condition,true);\n\t\t$criteria->compare('access_road_good_condition_ACTION',$this->access_road_good_condition_ACTION,true);\n\t\t$criteria->compare('access_road_good_condition_ACTION_DATE',$this->access_road_good_condition_ACTION_DATE,true);\n\t\t$criteria->compare('access_road_good_condition_FS_COMMENT',$this->access_road_good_condition_FS_COMMENT,true);\n\t\t$criteria->compare('access_road_good_condition_FS_COMMENT_DATE',$this->access_road_good_condition_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('transformer_leakage',$this->transformer_leakage,true);\n\t\t$criteria->compare('transformer_leakage_ACTION',$this->transformer_leakage_ACTION,true);\n\t\t$criteria->compare('transformer_leakage_ACTION_DATE',$this->transformer_leakage_ACTION_DATE,true);\n\t\t$criteria->compare('transformer_leakage_FS_COMMENT',$this->transformer_leakage_FS_COMMENT,true);\n\t\t$criteria->compare('transformer_leakage_FS_COMMENT_DATE',$this->transformer_leakage_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('used_part_oil_dump',$this->used_part_oil_dump,true);\n\t\t$criteria->compare('used_part_oil_dump_ACTION',$this->used_part_oil_dump_ACTION,true);\n\t\t$criteria->compare('used_part_oil_dump_ACTION_DATE',$this->used_part_oil_dump_ACTION_DATE,true);\n\t\t$criteria->compare('used_part_oil_dump_FS_COMMENT',$this->used_part_oil_dump_FS_COMMENT,true);\n\t\t$criteria->compare('used_part_oil_dump_FS_COMMENT_DATE',$this->used_part_oil_dump_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('visible_celtel_billboard',$this->visible_celtel_billboard,true);\n\t\t$criteria->compare('visible_celtel_billboard_ACTION',$this->visible_celtel_billboard_ACTION,true);\n\t\t$criteria->compare('visible_celtel_billboard_ACTION_DATE',$this->visible_celtel_billboard_ACTION_DATE,true);\n\t\t$criteria->compare('visible_celtel_billboard_FS_COMMENT',$this->visible_celtel_billboard_FS_COMMENT,true);\n\t\t$criteria->compare('visible_celtel_billboard_FS_COMMENT_DATE',$this->visible_celtel_billboard_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('ecg_mains_near_site',$this->ecg_mains_near_site,true);\n\t\t$criteria->compare('ecg_mains_near_site_ACTION',$this->ecg_mains_near_site_ACTION,true);\n\t\t$criteria->compare('ecg_mains_near_site_ACTION_DATE',$this->ecg_mains_near_site_ACTION_DATE,true);\n\t\t$criteria->compare('ecg_mains_near_site_FS_COMMENT',$this->ecg_mains_near_site_FS_COMMENT,true);\n\t\t$criteria->compare('ecg_mains_near_site_FS_COMMENT_DATE',$this->ecg_mains_near_site_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('signs_of_fuel_on_site',$this->signs_of_fuel_on_site,true);\n\t\t$criteria->compare('signs_of_fuel_on_site_ACTION',$this->signs_of_fuel_on_site_ACTION,true);\n\t\t$criteria->compare('signs_of_fuel_on_site_ACTION_DATE',$this->signs_of_fuel_on_site_ACTION_DATE,true);\n\t\t$criteria->compare('signs_of_fuel_on_site_FS_COMMENT',$this->signs_of_fuel_on_site_FS_COMMENT,true);\n\t\t$criteria->compare('signs_of_fuel_on_site_FS_COMMENT_DATE',$this->signs_of_fuel_on_site_FS_COMMENT_DATE,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('closed_date',$this->closed_date,true);\n\t\t$criteria->compare('closed_by',$this->closed_by,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "7d724fa7ee7b72516de404f096b4ac77", "score": "0.5165357", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->simpanan_id))$criteria->addCondition('simpanan_id = '.$this->simpanan_id);\n\t\t//$criteria->compare('simpanan_id',$this->simpanan_id);\n\t\tif(!empty($this->jenissimpanan_id))$criteria->addCondition('jenissimpanan_id = '.$this->jenissimpanan_id);\n\t\t//$criteria->compare('jenissimpanan_id',$this->jenissimpanan_id);\n\t\tif(!empty($this->buktikasmasukkop_id))$criteria->addCondition('buktikasmasukkop_id = '.$this->buktikasmasukkop_id);\n\t\t//$criteria->compare('buktikasmasukkop_id',$this->buktikasmasukkop_id);\n\t\tif(!empty($this->keanggotaan_id))$criteria->addCondition('keanggotaan_id = '.$this->keanggotaan_id);\n\t\t//$criteria->compare('keanggotaan_id',$this->keanggotaan_id);\n\t\t$criteria->compare('nosimpanan',$this->nosimpanan,true);\n\t\t$criteria->compare('tglsimpanan',$this->tglsimpanan,true);\n\t\t$criteria->compare('satuan',$this->satuan,true);\n\t\t$criteria->compare('jumlahsimpanan',$this->jumlahsimpanan);\n\t\t$criteria->compare('keterangansimpanan',$this->keterangansimpanan,true);\n\t\t$criteria->compare('makstglpenarikan',$this->makstglpenarikan,true);\n\t\t$criteria->compare('jangkawaktusimpanan',$this->jangkawaktusimpanan);\n\t\t$criteria->compare('persenjasa_thn',$this->persenjasa_thn);\n\t\t$criteria->compare('persenpajak_thn',$this->persenpajak_thn);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\t\t$criteria->compare('create_loginpemakai_id',$this->create_loginpemakai_id,true);\n\t\t$criteria->compare('update_loginpemakai_id',$this->update_loginpemakai_id,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d69be6775c252df8ecf4e9541d44a5bd", "score": "0.5163662", "text": "public function search() \n { \n // @todo Please modify the following code to remove attributes that should not be searched. \n\n $criteria=new CDbCriteria; \n\n $criteria->compare('id',$this->id);\n $criteria->compare('bill_other_id',$this->bill_other_id);\n $criteria->compare('type',$this->type);\n $criteria->compare('fee',$this->fee,true);\n\n return new CActiveDataProvider($this, array( \n 'criteria'=>$criteria, \n )); \n }", "title": "" }, { "docid": "1a4426305433d01d0115b2fd332d246e", "score": "0.5160606", "text": "public function search(Request $request)\n\t{\n\t\tif ($request->input(\"action\")==\"person_name\")\n\t\t{\t\n\t\t\t$name=PersonInfo::where('nationalid','LIKE', '%' . $request->input(\"person_name\"). '%')->orWhere('name','LIKE', '%' . $request->input(\"person_name\"). '%')->get();\n\t\n\t\t\treturn $name;\n\t\t}\n\t}", "title": "" }, { "docid": "88112a9484ef8b5ca7278da6d4dc46cc", "score": "0.5159371", "text": "public function search(Request $request)\n {\n $input = $request->all();\n $query = [['isvalid','=',1]];\n $textsearch=\"\";\n\n if($this->app_name=='gyertekel.hu') {\n $input['parent_id']=4;\n }\n if(isset($input['category']) && $input['category']!=\"\") {\n array_push($query, [\"categories_id\",\"=\",$input['category']]);\n }\n if(isset($input['when']) && $input['when']!=\"\") {\n array_push($query, ['startdate','<=',$input['when']]);\n array_push($query, ['enddate','>=',$input['when']]);\n }\n if(isset($input['textsearch']) && $input['textsearch']!=\"\") {\n $textsearch=$input['textsearch'];\n }\n //http://laravel.io/forum/09-18-2014-orm-query-where-clause-on-related-table\n //https://github.com/jarektkaczyk/eloquence\n $ads = Ads::with('city','category','tag', 'company','rooms')\n ->where($query)\n ->where(function ($query) use ($textsearch) {\n $query->where(\"title\",\"LIKE\",\"%\".$textsearch.\"%\")\n ->orWhere(\"description\",\"LIKE\",\"%\".$textsearch.\"%\")\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('tag', function($cq) use ($textsearch) {\n $cq->where([['name', $textsearch],\n ['container_type', 'ad']\n ]);\n });\n })\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('company', function($cq) use ($textsearch) {\n $cq->where('name',\"LIKE\",\"%\".$textsearch.\"%\");\n });\n })\n ->orWhere(function($q) use ($textsearch) {\n $q->whereHas('rooms', function($cq) use ($textsearch) {\n $cq->where('assets',\"LIKE\",\"%\".$textsearch.\"%\");\n });\n })\n ;\n })\n ->where(function($q) use ($input) {\n if(isset($input['citysearch']) && $input['citysearch']!=\"\") {\n $q->whereHas('city', function($cq) use ($input) {\n $cq->where('name', $input[\"citysearch\"]);\n });\n }\n })\n ->where(function($q) use ($input){\n if(isset($input['parent_id']) && $input['parent_id']!=\"\") {\n $q->whereHas('category', function($cq) use ($input) {\n $cq->where('parent_id', $input[\"parent_id\"]);\n });\n }\n })\n ->paginate(env('PAGINATION_SIZE'));\n return view('models.ads.index')->with('ads', $ads);\n }", "title": "" }, { "docid": "ebdc8d35c8a2d756f8a9f7c8845fb98c", "score": "0.5158638", "text": "public function searchApplying($params)\n {\n $this->load($params);\n $this->status = 2;\n return $this->searchApplicants();\n }", "title": "" }, { "docid": "805b05f86e35404c94744e0a1972188d", "score": "0.51580685", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('refno',$this->refno);\n\t\t$criteria->compare('customercode',$this->customercode);\n\t\t$criteria->compare('locationcode',$this->locationcode);\n\t\t$criteria->compare('projectcode',$this->projectcode);\n\t\t$criteria->compare('blockrefnumber',$this->blockrefnumber);\n\t\t$criteria->compare('payplanrefno',$this->payplanrefno);\n\t\t$criteria->compare('nofinstallments',$this->nofinstallments);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('installamount',$this->installamount);\n\t\t$criteria->compare('totalpayable',$this->totalpayable);\n\t\t$criteria->compare('paymentduedate',$this->paymentduedate);\n\t\t$criteria->compare('agrementstartdate',$this->agrementstartdate,true);\n\t\t$criteria->compare('agrementfinishdate',$this->agrementfinishdate,true);\n\t\t$criteria->compare('saletype',$this->saletype);\n\t\t$criteria->compare('salerightoff_amt',$this->salerightoff_amt);\n\t\t$criteria->compare('salerightoff_status',$this->salerightoff_status);\n\t\t$criteria->compare('salerightoff_comment',$this->salerightoff_comment,true);\n\t\t$criteria->compare('deleted',$this->deleted);\n\t\t$criteria->compare('addedby',$this->addedby);\n\t\t$criteria->compare('addeddate',$this->addeddate,true);\n\t\t$criteria->compare('addedtime',$this->addedtime,true);\n\t\t$criteria->compare('lastmodifiedby',$this->lastmodifiedby);\n\t\t$criteria->compare('lastmodifieddate',$this->lastmodifieddate,true);\n\t\t$criteria->compare('lastmodifiedtime',$this->lastmodifiedtime,true);\n\t\t$criteria->compare('deletedby',$this->deletedby);\n\t\t$criteria->compare('deleteddate',$this->deleteddate,true);\n\t\t$criteria->compare('deletedtime',$this->deletedtime,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "ef85a07d3cdf63c5b5ffeee6883b8271", "score": "0.51567614", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('staff_id',$this->staff_id);\n\t\t$criteria->compare('recruitment_id',$this->recruitment_id);\n\t\t$criteria->compare('staff_inspur_id',$this->staff_inspur_id,true);\n\t\t$criteria->compare('staff_name',$this->staff_name,true);\n\t\t$criteria->compare('staff_en_name',$this->staff_en_name,true);\n\t\t$criteria->compare('staff_age',$this->staff_age);\n\t\t$criteria->compare('staff_contact_number',$this->staff_contact_number,true);\n\t\t$criteria->compare('staff_id_card',$this->staff_id_card,true);\n\t\t$criteria->compare('staff_work_status',$this->staff_work_status);\n\t\t$criteria->compare('source_types',$this->source_types);\n\t\t$criteria->compare('source',$this->source,true);\n\t\t$criteria->compare('bank_card',$this->bank_card,true);\n\t\t$criteria->compare('avatar_path',$this->avatar_path,true);\n\t\t$criteria->compare('educational_level',$this->educational_level);\n\t\t$criteria->compare('graduated_school',$this->graduated_school,true);\n\t\t$criteria->compare('hometown',$this->hometown,true);\n\t\t$criteria->compare('hometown_address',$this->hometown_address,true);\n\t\t$criteria->compare('emergency_contact',$this->emergency_contact,true);\n\t\t$criteria->compare('emergency_telephone',$this->emergency_telephone,true);\n\t\t$criteria->compare('other',$this->other,true);\n\t\t$criteria->compare('create_user_id',$this->create_user_id);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_user_id',$this->update_user_id);\n\t\t$criteria->compare('update_time',$this->update_time);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "c7ddffa075f884b7d89e0f4d3faa0ffe", "score": "0.5151619", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('marketing_id',$this->marketing_id);\n $criteria->compare('no_quotation',$this->no_quotation,true);\n $criteria->compare('customer_id',$this->customer_id);\n $criteria->compare('customer_name',$this->customer_name,true);\n $criteria->compare('phone',$this->phone,true);\n $criteria->compare('contact_person',$this->contact_person,true);\n $criteria->compare('note',$this->note,true);\n $criteria->compare('name_of_employer',$this->name_of_employer);\n $criteria->compare('include_driver',$this->include_driver);\n $criteria->compare('include_ppn',$this->include_ppn);\n $criteria->compare('date',$this->date,true);\n $criteria->compare('address',$this->address,true);\n $criteria->compare('fax',$this->fax,true);\n $criteria->compare('handphone_customer',$this->handphone_customer,true);\n $criteria->compare('office_boss',$this->office_boss,true);\n $criteria->compare('hanphone',$this->hanphone,true);\n $criteria->compare('email',$this->email,true);\n $criteria->compare('create_user',$this->create_user);\n $criteria->compare('create_date',$this->create_date,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "b26044d465bf7b5ef5562ab94a626722", "score": "0.5149458", "text": "function searchBuzzIdea($srchData){\n\n\t\t$srchData = json_decode($srchData,true);\n\n\t\tif(count($srchData)>0){\n\n\t\t\tif($srchData['srchDD']==2){\n\n \t\t\treturn $whereCondition = $this->db->where('cast(created_on as date) BETWEEN \"'. date('Y-m-d', strtotime($srchData['fromdate'])). '\" and \"'. date('Y-m-d', strtotime($srchData['todate'])).'\"'); \n\n\t\t\t}else if($srchData['srchDD']==1){\t\t\t\t\n\n\t\t\t $whereCondition = '(title LIKE \"'.$srchData['search'].'%\")';\n\n \t\t return $this->db->where($whereCondition);\n\n \t\t\t}\n\n\t\t}\n\n \t}", "title": "" }, { "docid": "ca6e74973e3d0739ef8787232db21b80", "score": "0.5149094", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('service_general',$this->service_general,true);\n\t\t$criteria->compare('service_share',$this->service_share,true);\n\t\t$criteria->compare('service_business',$this->service_business,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\t\t$criteria->compare('create_user_id',$this->create_user_id);\n\t\t$criteria->compare('update_user_id',$this->update_user_id);\n\t\t$criteria->compare('image_header_1',$this->image_header_1,true);\n\t\t$criteria->compare('image_header_2',$this->image_header_2,true);\n\t\t$criteria->compare('image_header_3',$this->image_header_3,true);\n\t\t$criteria->compare('image_header_4',$this->image_header_4,true);\n\t\t$criteria->compare('image_header_5',$this->image_header_5,true);\n\t\t$criteria->compare('products_on_sales',$this->products_on_sales,true);\n\t\t$criteria->compare('less_than_1000',$this->less_than_1000,true);\n\t\t$criteria->compare('for_rent',$this->for_rent,true);\n\t\t$criteria->compare('for_options',$this->for_options,true);\n\t\t$criteria->compare('baby_products',$this->baby_products,true);\n\t\t$criteria->compare('groceries',$this->groceries,true);\n\t\t$criteria->compare('fashion_and_beauty',$this->fashion_and_beauty,true);\n\t\t$criteria->compare('office_products',$this->office_products,true);\n\t\t$criteria->compare('books_and_learning',$this->books_and_learning,true);\n\t\t$criteria->compare('smartphones',$this->smartphones,true);\n\t\t$criteria->compare('computers',$this->computers,true);\n\t\t$criteria->compare('wholesales_and_commodity',$this->wholesales_and_commodity,true);\n\t\t$criteria->compare('home_services',$this->home_services,true);\n\t\t$criteria->compare('advert_mini_header',$this->advert_mini_header,true);\n\t\t$criteria->compare('primary_books_and_learning',$this->primary_books_and_learning,true);\n\t\t$criteria->compare('secondary_books_and_learning',$this->secondary_books_and_learning,true);\n\t\t$criteria->compare('tertiary_books_and_learning',$this->tertiary_books_and_learning,true);\n\t\t$criteria->compare('professional_books_and_learning',$this->professional_books_and_learning,true);\n\t\t$criteria->compare('other_books_and_learning',$this->other_books_and_learning,true);\n\t\t$criteria->compare('learning_tools_and_learning',$this->learning_tools_and_learning,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d2979c51635f4391f897ebe30d555bfd", "score": "0.51419115", "text": "public function getSearchEnabled() {}", "title": "" }, { "docid": "6a0750f0912c7b88c311a26c45de0243", "score": "0.51412034", "text": "public function search() {\n try {\n if (!($this->toDoList instanceof Base_Model_ObtorLib_App_Core_Crm_Entity_ToDoList)) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception(\" ToDoList Entity not intialized\");\n } else {\n $objToDoList = new Base_Model_ObtorLib_App_Core_Crm_Dao_ToDoList();\n $objToDoList->toDoList = $this->toDoList;\n return $objToDoList->search();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception($ex);\n }\n }", "title": "" }, { "docid": "874848e89db804c20efb6a40e491a00e", "score": "0.5137371", "text": "function BasicSearchWhere() {\n\tglobal $Security, $dpp_proveedores;\n\t$sSearchStr = \"\";\n\t$sSearchKeyword = ew_StripSlashes(@$_GET[EW_TABLE_BASIC_SEARCH]);\n\t$sSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];\n\tif ($sSearchKeyword <> \"\") {\n\t\t$sSearch = trim($sSearchKeyword);\n\t\tif ($sSearchType <> \"\") {\n\t\t\twhile (strpos($sSearch, \" \") !== FALSE)\n\t\t\t\t$sSearch = str_replace(\" \", \" \", $sSearch);\n\t\t\t$arKeyword = explode(\" \", trim($sSearch));\n\t\t\tforeach ($arKeyword as $sKeyword) {\n\t\t\t\tif ($sSearchStr <> \"\") $sSearchStr .= \" \" . $sSearchType . \" \";\n\t\t\t\t$sSearchStr .= \"(\" . BasicSearchSQL($sKeyword) . \")\";\n\t\t\t}\n\t\t} else {\n\t\t\t$sSearchStr = BasicSearchSQL($sSearch);\n\t\t}\n\t}\n\tif ($sSearchKeyword <> \"\") {\n\t\t$dpp_proveedores->setBasicSearchKeyword($sSearchKeyword);\n\t\t$dpp_proveedores->setBasicSearchType($sSearchType);\n\t}\n\treturn $sSearchStr;\n}", "title": "" }, { "docid": "b973a887da99d890d8db71e55dad94b2", "score": "0.5136827", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('guarantee_no',$this->guarantee_no,true);\n\t\t$criteria->compare('contract_id',$this->contract_id);\n\t\t$criteria->compare('letter_confirm',$this->letter_confirm,true);\n\t\t$criteria->compare('cost',$this->cost,true);\n\t\t$criteria->compare('guarantee_date',$this->guarantee_date,true);\n\t\t$criteria->compare('letter_return',$this->letter_return,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "3a937870c9019d2925ae797774187a7c", "score": "0.5135641", "text": "public function searchPrint()\n {\n // should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\tif (!empty($this->dokrekammedis_id)){\n\t\t$criteria->addCondition('dokrekammedis_id ='.$this->dokrekammedis_id);\n\t\t}\n\t\tif (!empty($this->warnadokrm_id)){\n\t\t$criteria->addCondition('warnadokrm_id ='.$this->warnadokrm_id);\n\t\t}\n\t\tif (!empty($this->subrak_id)){\n\t\t$criteria->addCondition('subrak_id ='.$this->subrak_id);\n\t\t}\n\t\tif (!empty($this->lokasirak_id)){\n\t\t$criteria->addCondition('lokasirak_id ='.$this->lokasirak_id);\n\t\t}\n\t\tif (!empty($this->pasien_id)){\n\t\t$criteria->addCondition('pasien_id ='.$this->pasien_id);\n\t\t}\n\t\t\n\t\t$criteria->compare('LOWER(nodokumenrm)',strtolower($this->nodokumenrm),true);\n\t\t$criteria->compare('LOWER(tglrekammedis)',strtolower($this->tglrekammedis),true);\n\t\t$criteria->compare('LOWER(tglmasukrak)',strtolower($this->tglmasukrak),true);\n\t\t$criteria->compare('LOWER(statusrekammedis)',strtolower($this->statusrekammedis),true);\n\t\t$criteria->compare('LOWER(tglkeluarakhir)',strtolower($this->tglkeluarakhir),true);\n\t\t$criteria->compare('LOWER(tglmasukakhir)',strtolower($this->tglmasukakhir),true);\n\t\t$criteria->compare('LOWER(nomortertier)',strtolower($this->nomortertier),true);\n\t\t$criteria->compare('LOWER(nomorsekunder)',strtolower($this->nomorsekunder),true);\n\t\t$criteria->compare('LOWER(nomorprimer)',strtolower($this->nomorprimer),true);\n\t\t$criteria->compare('LOWER(warnanorm_i)',strtolower($this->warnanorm_i),true);\n\t\t$criteria->compare('LOWER(warnanorm_ii)',strtolower($this->warnanorm_ii),true);\n\t\t$criteria->compare('LOWER(tgl_in_aktif)',strtolower($this->tgl_in_aktif),true);\n\t\t$criteria->compare('LOWER(tglpemusnahan)',strtolower($this->tglpemusnahan),true);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\t$criteria->order = 'dokrekammedis_id';\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "ab34088abee92a346752af0dfb107865", "score": "0.51250345", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('property_detail_id',$this->property_detail_id);\n\t\t$criteria->compare('property_id',$this->property_id);\n\t\t$criteria->compare('stories',$this->stories,true);\n\t\t$criteria->compare('spa',$this->spa);\n\t\t$criteria->compare('apt_suite',$this->apt_suite,true);\n\t\t$criteria->compare('amenities_stove_id',$this->amenities_stove_id);\n\t\t$criteria->compare('amenities_refrigerator',$this->amenities_refrigerator);\n\t\t$criteria->compare('amenities_dishwasher',$this->amenities_dishwasher);\n\t\t$criteria->compare('amenities_washer_id',$this->amenities_washer_id);\n\t\t$criteria->compare('amenities_fireplace_id',$this->amenities_fireplace_id);\n\t\t$criteria->compare('amenities_parking_id',$this->amenities_parking_id);\n\t\t$criteria->compare('amenities_microwave',$this->amenities_microwave);\n\t\t$criteria->compare('amenities_gated_community',$this->amenities_gated_community);\n\t\t$criteria->compare('photo2',$this->photo2,true);\n\t\t$criteria->compare('caption2',$this->caption2,true);\n\t\t$criteria->compare('photo3',$this->photo3,true);\n\t\t$criteria->compare('caption3',$this->caption3,true);\n\t\t$criteria->compare('photo4',$this->photo4,true);\n\t\t$criteria->compare('caption4',$this->caption4,true);\n\t\t$criteria->compare('photo5',$this->photo5,true);\n\t\t$criteria->compare('caption5',$this->caption5,true);\n\t\t$criteria->compare('interior_features',$this->interior_features,true);\n\t\t$criteria->compare('exterior_features',$this->exterior_features,true);\n\t\t$criteria->compare('first_sale_type',$this->first_sale_type);\n\t\t$criteria->compare('second_sale_type',$this->second_sale_type);\n\t\t$criteria->compare('property_repair_price',$this->property_repair_price);\n\t\t$criteria->compare('reference',$this->reference,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "58ed10027fdad3485a9e0128e6eaf81d", "score": "0.5122441", "text": "public function search_()\n\t{\n\t\t\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ptopartida',$this->ptopartida,true);\n\t\t$criteria->compare('distpartida',$this->distpartida,true);\n\t\t$criteria->compare('provpartida',$this->provpartida,true);\n\t\t$criteria->compare('dptopartida',$this->dptopartida,true);\n\t\t$criteria->compare('ptollegada',$this->ptollegada,true);\n\t\t$criteria->compare('distllegada',$this->distllegada,true);\n\t\t$criteria->compare('provllegada',$this->provllegada,true);\n\t\t$criteria->compare('dptollegada',$this->dptollegada,true);\n\t\t$criteria->compare('direccionformaldes',$this->direccionformaldes,true);\n\t\t$criteria->compare('direcciontransportista',$this->direcciontransportista,true);\n\t\t$criteria->compare('c_numgui',$this->c_numgui,true);\n\t\t$criteria->compare('c_coclig',$this->c_coclig,true);\n\t\t$criteria->compare('d_fecgui',$this->d_fecgui,true);\n\t\t$criteria->compare('c_estgui',$this->c_estgui,true);\n\t\t$criteria->compare('c_rsguia',$this->c_rsguia,true);\n\t\t$criteria->compare('c_codtra',$this->c_codtra,true);\n\t\t$criteria->compare('c_trans',$this->c_trans,true);\n\t\t$criteria->compare('c_motivo',$this->c_motivo,true);\n\t\t$criteria->compare('c_placa',$this->c_placa,true);\n\t\t$criteria->compare('c_licon',$this->c_licon,true);\n\t//\t$criteria->compare('d_fectra',$this->d_fectra,true);\n\t\t//$criteria->compare('c_descri',$this->c_descri,true);\n\n\t\t$criteria->compare('n_guia',$this->n_guia,true);\n\t\t$criteria->compare('c_texto',$this->c_texto,true);\n\t\t$criteria->compare('c_dirsoc',$this->c_dirsoc,true);\n\t\t$criteria->compare('c_serie',$this->c_serie,true);\n\t\t//$criteria->compare('c_salida',$this->c_salida,true);\n\t\t$criteria->compare('razondestinatario',$this->razondestinatario,true);\n\t\t$criteria->compare('rucdestinatario',$this->rucdestinatario,true);\n\t\t$criteria->compare('ructrans',$this->ructrans,true);\n\t\t$criteria->compare('razontransportista',$this->razontransportista,true);\n\t\t$criteria->compare('c_estado',$this->c_estado,true);\n\t\t$criteria->compare('n_direc',$this->n_direc);\n\t\t$criteria->compare('n_direcformaldes',$this->n_direcformaldes);\n\t\t$criteria->compare('n_directran',$this->n_directran);\n\t\t$criteria->compare('n_dirsoc',$this->n_dirsoc);\n\t\t$criteria->compare('creadopor',$this->creadopor,true);\n\t\t$criteria->compare('modificadopor',$this->modificadopor,true);\n\t\t$criteria->compare('creadoel',$this->creadoel,true);\n\t\t$criteria->compare('modificadoel',$this->modificadoel,true);\n\t\t$criteria->compare('rucsoc',$this->rucsoc,true);\n\t\t$criteria->compare('estado',$this->estado,true);\n\t\t$criteria->compare('n_hguia',$this->n_hguia,true);\n\t\t$criteria->compare('c_itguia',$this->c_itguia,true);\n\t\t$criteria->compare('n_cangui',$this->n_cangui);\n\t\t$criteria->compare('c_codgui',$this->c_codgui,true);\n\t\t$criteria->compare('c_edgui',$this->c_edgui,true);\n\t\t$criteria->compare('c_descri',$this->c_descri,true);\n\t\t$criteria->compare('m_obs',$this->m_obs,true);\n\t\t$criteria->compare('c_codactivo',$this->c_codactivo,true);\n\t\t$criteria->compare('c_um',$this->c_um,true);\n\t\t$criteria->compare('c_codep',$this->c_codep,true);\n\t\t$criteria->compare('n_detgui',$this->n_detgui,true);\n\t\t$criteria->compare('l_libre',$this->l_libre,true);\n\t\t$criteria->compare('nomep',$this->nomep,true);\n\t\t$criteria->compare('motivo',$this->motivo,true);\n\t\t$criteria->compare('estadodetalle',$this->estadodetalle,true);\n\t\t$criteria->compare('c_af',$this->c_af,true);\n\t\t$criteria->compare('cod_cen',$this->cod_cen,true);\n\t\t$criteria->compare('c_codsap',$this->c_codsap,true);\n\t\t$criteria->compare('hidref',$this->hidref,true);\n\t\t$criteria->compare('docref',$this->docref,true);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$case=$this->d_fectra;\n\t\t//$criteria->compare('d_fectra',trim(\" \".$case.\" \"),false);\n\t\t$case2=$this->d_fectra1;\n\t\t\n\t\t//$criteria->compare('d_fectra1',trim(\" \".$case2.\" \"),false);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t if((isset($this->d_fectra) && trim($this->d_fectra) != \"\") && (isset($this->d_fectra1) && trim($this->d_fectra1) != \"\")) {\n\t\t // $limite1=date(\"Y-m-d\",strotime($this->d_fectra)-24*60*60); //UN DIA MENOS \n\t\t\t\t\t // $limite2=date(\"Y-m-d\",strotime($this->d_fectra)+24*60*60); //UN DIA mas \n\t\t \n $criteria->addBetweenCondition('d_fectra', ''.$this->d_fectra.'', ''.$this->d_fectra1.''); \n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\n\t\t//$fechaactual = date(\"Y-m-d\");\n\t\t//$criteria->addCondition(\"d_fectra = '\".$fechaactual.\"'\");\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "c84b70e81d87e124fcae79cb12d112e5", "score": "0.5120289", "text": "public function search($mode = '') {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->with = array('Vessel', 'VoyageOrder');\n $criteria->together = true;\n $criteria->condition = 'Vessel.VesselName LIKE :data OR VoyageOrder.VoyageOrderNumber LIKE :data ';\n $criteria->params = array(':data' => '%' . trim($this->VesselName_VoyageOrderNumber) . '%');\n\n $criteria->compare('t.id_purchase_request', $this->id_purchase_request);\n $criteria->compare('t.PRNumber', $this->PRNumber, true);\n $criteria->compare('t.PRDate', $this->PRDate, true);\n $criteria->compare('t.PRNo', $this->PRNo);\n $criteria->compare('t.PRMonth', $this->PRMonth);\n $criteria->compare('t.PRYear', $this->PRYear);\n $criteria->compare('t.id_po_category', $this->id_po_category);\n $criteria->compare('t.amount', $this->amount, true);\n $criteria->compare('t.metric', $this->metric);\n $criteria->compare('t.dedicated_to', $this->dedicated_to, true);\n $criteria->compare('t.id_vessel', $this->id_vessel);\n $criteria->compare('t.id_voyage_order', $this->id_voyage_order);\n $criteria->compare('t.notes', $this->notes, true);\n $criteria->compare('t.is_mutliple_item', $this->is_mutliple_item);\n $criteria->compare('t.requested_user', $this->requested_user, true);\n $criteria->compare('t.requested_date', $this->requested_date, true);\n $criteria->compare('t.ip_user_requested', $this->ip_user_requested, true);\n $criteria->compare('t.Status', $this->Status);\n $criteria->compare('t.approved_user', $this->approved_user, true);\n $criteria->compare('t.approval_date', $this->approval_date, true);\n $criteria->compare('t.ip_user_approved', $this->ip_user_approved, true);\n $criteria->compare('t.approval_level', $this->approval_level, true);\n\n /*\n if($mode=='agency'){\n $sort=array(\n 'defaultOrder'=>'PRDate DESC',\n 'attributes'=>array(\n 'VesselName_VoyageOrderNumber'=>array(\n 'asc'=>'VoyageOrder.VoyageOrderNumber ASC',\n 'desc'=>'VoyageOrder.VoyageOrderNumber DESC',\n ),\n '*',\n ),\n );\n }else{\n $sort=array(\n 'defaultOrder'=>'PRDate DESC',\n 'attributes'=>array(\n 'VesselName_VoyageOrderNumber'=>array(\n 'asc'=>'Vessel.VesselName ASC',\n 'desc'=>'Vessel.VesselName DESC',\n ),\n '*',\n ),\n );\n } */\n\n if ($mode == 'agency') {\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'PRDate DESC',\n 'attributes' => array(\n 'VesselName_VoyageOrderNumber' => array(\n 'asc' => 'VoyageOrder.VoyageOrderNumber ASC',\n 'desc' => 'VoyageOrder.VoyageOrderNumber DESC',\n ),\n '*',\n ),\n ),\n /*\n 'pagination'=>array(\n 'pageSize'=>15,\n ),\n */\n /// page size nya\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n } else {\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'PRDate DESC',\n 'attributes' => array(\n 'VesselName_VoyageOrderNumber' => array(\n 'asc' => 'Vessel.VesselName ASC',\n 'desc' => 'Vessel.VesselName DESC',\n ),\n '*',\n ),\n ),\n /*\n 'pagination'=>array(\n 'pageSize'=>15,\n ),\n */\n /// page size nya\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n }\n }", "title": "" }, { "docid": "6eb5246cff630bf6c0eb0a979ac557d7", "score": "0.5119131", "text": "public function search(Request $req) {\n $result = '';\n $customers = Customer::where('TenKhachHang','like','%'.$req->key.'%')\n ->orWhere('CMND','like','%'.$req->key.'%')->orWhere('GioiTinh','like','%'.$req->key.'%')->orWhere('DiaChi','like','%'.$req->key.'%')->orWhere('DienThoai','like','%'.$req->key.'%')->orWhere('QuocTich','like','%'.$req->key.'%')->get();\n $html = view('admin.customer.search',compact('customers'))->render();\n return response($html); \n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "77f5382eaa58b16cbd8469a9056771da", "score": "0.0", "text": "public function create()\n {\n $course = Course::All();\n return view('pagesStudent.registerstudent',['course'=>$course]);\n }", "title": "" } ]
[ { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.76252395", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "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": "e29bfa68ffaef61efeb49c80001ed407", "score": "0.7406699", "text": "public function create()\n\t{\n\t\treturn view('properties.creation_form');\n\t}", "title": "" }, { "docid": "a88dfafe57fd2497dd585577ba27a652", "score": "0.7350552", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('pages.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "8a64a4d98dad0ad9bf563bea212fd7ee", "score": "0.7299795", "text": "public function create()\n {\n return view('pages.ministry.createForm');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "d003f30dbf6733d773b642b79c6ae697", "score": "0.726753", "text": "public function newAction()\n {\n $form = $this->createForm($this->form, $this->entity);\n\n return $this->render($this->path_template.':new.html.twig', array(\n 'entity' => $this->entity,\n 'form' => $form->createView(),\n 'route_prefix' => $this->route_prefix\n ));\n }", "title": "" }, { "docid": "8654d58fdfc61d0a0f4ff85bc7de99cf", "score": "0.7236886", "text": "public function showCreateForm(){\n return view('create', [\n 'mode' => 'create'\n ]);\n }", "title": "" }, { "docid": "3fd8b0caa9c41dad35b63cf58721af6c", "score": "0.7234004", "text": "public function create()\n {\n return view('frontend.forms.create');\n \n }", "title": "" }, { "docid": "ee2aca4be13b6a0d979d2ece5284d39a", "score": "0.72299236", "text": "public function create()\n {\n //Показываем предстовления для добавления\n return view('back.car.create');\n }", "title": "" }, { "docid": "ede2ebb819285ef917e2b5a240f72abf", "score": "0.7228684", "text": "public function create()\n {\n //Show a form to create new record.\n return view('record.create');\n }", "title": "" }, { "docid": "f06182781baa0b805a9fec90241a5c37", "score": "0.7224664", "text": "public function create()\n {\n $this->authChecker();\n\n return view('general.form', ['setup' => [\n 'inrow'=>true,\n 'title'=>__('crud.new_item', ['item'=>__($this->title)]),\n 'action_link'=>route($this->webroute_path.'index'),\n 'action_name'=>__('crud.back'),\n 'iscontent'=>true,\n 'action'=>route($this->webroute_path.'store'),\n ],\n 'fields'=>$this->getFields(), ]);\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "b8aeabd2768a2ce4a6eea6ab19bdc556", "score": "0.7179397", "text": "public function create()\n {\n return view('addform');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7155322", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "4be7c43f422dc5a438147a5a698b32d9", "score": "0.7153373", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'curriculums/form' , array(\n\t\t\t'title' => 'Ajouter une formation',\n\t\t\t'timeslots' => Timeslot::all()\n\t\t) ) );\n\t}", "title": "" }, { "docid": "9b5e65ccdf189da41ab955a4ab00bd49", "score": "0.71506685", "text": "public function create()\n {\n return view('add-form');\n }", "title": "" }, { "docid": "c8569f6d3d5a0d408e7ad230e384a162", "score": "0.7142166", "text": "public function showForm()\n {\n return view('setup.people.create');\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": "578e81ebc73ea116268e741f66c4dc24", "score": "0.71221834", "text": "public function create()\n {\n return view('rest.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "4008dd9a844cc262307fa041eb2dee16", "score": "0.71077675", "text": "public function newAction()\n {\n $entity = new Contador();\n $form = $this->createForm(new ContadorType(), $entity);\n\n return $this->render('ContadoresBundle:Contador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'contador_new'\n ));\n }", "title": "" }, { "docid": "07a64cd24a5f1e5d3715fda7ce81a07d", "score": "0.7089027", "text": "public function create()\n {\n\n return view('back_end.forms.hires.create');\n }", "title": "" }, { "docid": "e7930383d5f0c0a2ea4021d59a43c3a8", "score": "0.70830286", "text": "public function create()\n {\n return view('new.create');\n }", "title": "" }, { "docid": "05f249c0d81bbf1140380ae6f2855bb1", "score": "0.70815283", "text": "public function create()\n {\n $form = Forms::firstOrNew(array('id' => -1));\n\n return view('formbuilder::admin.forms.create', compact('form'));\n }", "title": "" }, { "docid": "c3ae649f0eb4efa3ab932240c426d328", "score": "0.7080392", "text": "public function create()\n {\n $data['url'] = route('admin.' . $this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['categories_select'] = $this->getCategory();\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "d96ee85fb50128d36ec966c8d1341d40", "score": "0.7077796", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/locations/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle implantation',\n\t\t\t'school_id' => (int) $this->getRequest()->get( 'school_id' )\n\t\t) ) );\n\t}", "title": "" }, { "docid": "6d417d3813fb26a07adc44e97c37c7cb", "score": "0.70716494", "text": "public function create()\n {\n //\n return view('penulis/add');\n }", "title": "" }, { "docid": "3d71bfc84cbf694bce46b63fdb6800a6", "score": "0.70663685", "text": "public function create()\n {\n // MOSTRAR VISTA DE FORMULARIO\n return view('admin.director.create');\n }", "title": "" }, { "docid": "1b1107c8c82f06e8836658e1dd6b8af5", "score": "0.7066249", "text": "public function create()\n {\n return view ('guru.form');\n }", "title": "" }, { "docid": "d068d0081544540b36fbe64a62df48c3", "score": "0.7065966", "text": "public function create()\n {\n return view('drdr.form',['location' => 'Document Review & Distribution Request']);\n }", "title": "" }, { "docid": "533cfd54aea57067b2e130dc0d9b0d25", "score": "0.7060761", "text": "public function create()\n {\n return view('conection.form');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "155e046a493adfb2e9e37bfd7fd9cfb4", "score": "0.70395017", "text": "public function create()\n {\n return view('laralite::admin.product.form', [\n 'type' => 'create',\n ]);\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "ccd7222b977fae80d1e5a91064dcf3f5", "score": "0.7020462", "text": "public function create()\n {\n //\n return view('ireul/new');\n }", "title": "" }, { "docid": "0afba6121689958a008f66b75bb8be57", "score": "0.70147616", "text": "public function create() //there are controller actions\n\t{\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "380a2b351ac1030e3005f6f9daa97b3f", "score": "0.700952", "text": "public function create()\r\n {\r\n return view(\"add\");\r\n }", "title": "" }, { "docid": "17654b771a3310caa720e204f0f9365d", "score": "0.70036525", "text": "public function create()\n\t{\n\t\treturn view('hoadonnhap.create');\n\t}", "title": "" }, { "docid": "db6f3f5275afa6be79af48cc164f12b3", "score": "0.7001917", "text": "public function createAction() : object\n {\n // Load framework services\n $page = $this->di->get(\"page\");\n $session = $this->di->get(\"session\");\n\n // Active user id\n $userid = $session->get(\"user\", false);\n\n // Collect data\n $form = new CreateForm($this->di, $userid);\n $form->check();\n\n $data = [\n \"title\" => \"Frågor | Skapa ny\",\n \"navbar\" => 'question',\n \"intro_mount\" => 'Frågor',\n \"intro_path\" => 'Skapa ny',\n \"form\" => $form->getHTML()\n ];\n\n // Add and render views\n $page->add(\"mahw17/intro/subintro\", $data, \"subintro\");\n $page->add(\"mahw17/question/crud/create\", $data, \"main\");\n\n return $page->render($data);\n }", "title": "" }, { "docid": "bf2059d4d118ee786d18d4a90906eef2", "score": "0.70009905", "text": "public function create()\n\t{\n\t\treturn View::make('allowances.create');\n\t}", "title": "" }, { "docid": "c299c48c1f296bf66e8cdcf3e0f57dad", "score": "0.6997466", "text": "public function create()\n {\n $model = new Supplier();\n return view('admin.supplier.form', compact('model'));\n }", "title": "" }, { "docid": "4dd938930c0d9c3df89bd85bd0788218", "score": "0.69970447", "text": "public function newAction()\n {\n $entity = new $this->entityClass();\n $form = $this->createCreateForm($entity);\n\n return $this->render($this->render_prefix.'new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c133f085eb2e1a836af4bc4199701298", "score": "0.6992541", "text": "public function create()\n {\n return view(\"fragment.project.form\");\n }", "title": "" }, { "docid": "0dac64c43fb1ef4240ca5acfde71a1f3", "score": "0.69911814", "text": "public function newAction()\n {\n $entity = new CortePrenda();\n $form = $this->createForm(new CortePrendaType(), $entity, array());\n\n $data['titulo_cabecera'] = \"Cortes\";\n $data['titulo_principal'] = \"Corte - Nuevo registro\";\n $data['entity'] = $entity;\n $data['form'] = $form->createView();\n\n return $this->render('CreceRegistroBundle:CortePrenda:new.html.twig', $data);\n }", "title": "" }, { "docid": "9d1962f7179a2e73924d6e8ffcbd7fa9", "score": "0.6985977", "text": "public function create()\n {\n return view ('admin.nomenclaturas.create');\n }", "title": "" }, { "docid": "199d8719bade44313f54fd7f51c74d4a", "score": "0.69835865", "text": "public function create()\n {\n SEO::setTitle('Create ' . title_case($this->singular));\n SEO::setDescription('Create ' . title_case($this->singular));\n\n $fields = $this->getFieldsFromRules(new $this->formRequest);\n\n $viewPrefix = request()->is('admin*') ? 'admin.' : '';\n\n return view(\n $viewPrefix.'crud.create',\n [\n 'slug' => $this->slug,\n 'model' => $this->model,\n 'fields' => $fields,\n ]\n );\n }", "title": "" }, { "docid": "fe3e46fd58af29cb48481581ae0de0b2", "score": "0.6980721", "text": "public function create()\n {\n return view('siswa.form');\n }", "title": "" }, { "docid": "6fb9045be9dc19050a475201096a7558", "score": "0.6975281", "text": "public function create()\n {\n return view ('pilihan.create');\n }", "title": "" }, { "docid": "7bf3ffcd51f64242d7b97a5bfe9f3065", "score": "0.697331", "text": "public function create()\n\t{\n\t\treturn View::make('ekstra.create');\n\t}", "title": "" }, { "docid": "8ad27ef2c924f5ed4baee8b0b6be49ed", "score": "0.6967698", "text": "public function create()\n {\n return view('marketing.hotmart.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "0a8864e0fefc68a0b923fed5bc033585", "score": "0.69568026", "text": "public function create()\n {\n return view ('livro.create');\n }", "title": "" }, { "docid": "df2d4c10e663c5e6017c53e6b2c821eb", "score": "0.6948988", "text": "public function create()\n {\n //Return Caregiver form\n return view('caregiver.create');\n }", "title": "" }, { "docid": "95fb9a388abcd56273de19cb2ca44c89", "score": "0.6945631", "text": "public function create()\n {\n return view('vinyls.create');\n }", "title": "" }, { "docid": "1d48c829643cbd9ac81333950ddcb4db", "score": "0.69405484", "text": "public function create()\n {\n $data['designations'] = Designation::orderBy('name', 'asc')->get();\n $data['user_types'] = UserType::where('id', '!=', 1)->orderBy('user_type', 'asc')\n ->get();\n return view('humanResource.humanResourceForm', $data);\n }", "title": "" }, { "docid": "6cd3db66a165d4bfece0d03b5ab62ca8", "score": "0.6935949", "text": "public function create()\n {\n return view('presensi::create');\n }", "title": "" }, { "docid": "b40ba4940b2b8342898480f2b67766eb", "score": "0.6935113", "text": "public function create()\n\t{\n\t\treturn view('registerhamils.create');\n\t}", "title": "" }, { "docid": "214a38e5841db268c513869d01a78ef1", "score": "0.69301075", "text": "public function create() {\n $this->data['action'] = 'Create';\n \t\treturn view('brand.form',$this->data);\n \t}", "title": "" }, { "docid": "b74e67d554c312fd5f4d53bfaf69251e", "score": "0.6928995", "text": "public function create()\n {\n $action = route('admin.flores.store');\n return view('admin.flores.form', compact('action'));\n }", "title": "" }, { "docid": "71e21da0cf61608bfc6a3fd38a4b09a6", "score": "0.69269365", "text": "public function create()\n\t{\n\t\treturn view('konselor.create');\n\t}", "title": "" }, { "docid": "d25ce1cb8774e2810f7f5636e8d3c3c1", "score": "0.6922813", "text": "public function create()\n {\n return view('book.bookadd');\n }", "title": "" }, { "docid": "726d68b28ff59e41d60c97aa8795c184", "score": "0.6921532", "text": "public function create()\n {\n $type ='add';\n $menu = 'Iklan';\n $submenu = 'index';\n $pagename = 'Iklan';\n return view('dashboard.iklan.form', compact('menu', 'submenu', 'pagename', 'type'));\n }", "title": "" }, { "docid": "cb8709fb04c248c1ba63342e526c5646", "score": "0.69189334", "text": "public function create()\n {\n return view('healthexpertform');\n }", "title": "" }, { "docid": "4cc618292f3b10c40b709baa2f548833", "score": "0.6915715", "text": "public function create() {\n\n //validate the incoming request\n if (!is_numeric(request('resource_id')) || !in_array(request('resource_type'), $this->approved_resources)) {\n //hide the add button\n request()->merge([\n 'visibility_list_page_actions_add_button' => false,\n ]);\n }\n\n //payload\n $payload = [];\n\n //show the view\n return new CreateResponse($payload);\n }", "title": "" }, { "docid": "a511dc05130f630f248f7d9e7bfdc4b7", "score": "0.69146746", "text": "public function create()\n {\n $name = \"Osaa inayat\";\n return view('AdminPanel.AddingNewProduct.ProductForm',compact('name'));\n }", "title": "" }, { "docid": "82b22b9f466b32b12e30d34ff6379faf", "score": "0.6913649", "text": "public function create()\n\t{\n\t\treturn view('hoadontk.create');\n\t}", "title": "" }, { "docid": "c9f1137f9370eb2b5a601d1eab133a0d", "score": "0.6909412", "text": "public function create()\n {\n \n return view('control.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "82a112e6801a21325d7d6387e9c21d43", "score": "0.69034535", "text": "public function create()\n {\n // $tambah_catalog = \\App\\model_catalog::all();\n return view('form');\n }", "title": "" }, { "docid": "82bccdb6ba01bbfa961f7a135f2ea8c2", "score": "0.69002265", "text": "public function create()\n {\n return view('manufacturer.ManufacturerForm');\n }", "title": "" }, { "docid": "318d6b1f3710da9252c900caa8730e2c", "score": "0.689854", "text": "public function create()\n\t{\n\t\treturn View::make('dynaflow::sysflow.form');\n\t}", "title": "" }, { "docid": "d875494da1f4659d50a3a7e9a879a767", "score": "0.689584", "text": "public function create() //renders the view to display the form to create a Farm\n {\n //\n return view('farms.create');\n }", "title": "" }, { "docid": "52b58d6fc4a50661368b682a572eca31", "score": "0.6890648", "text": "public function create()\n {\n return view('main.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "140b03129b019858acfaf2da89962546", "score": "0.6887986", "text": "public function create() {\n print ('aki esta el formulario de crear');\n }", "title": "" }, { "docid": "9d96152ef5a961f400ba5e942b648dfc", "score": "0.68878675", "text": "public function create()\n {\n return \"form.blade.php\";\n }", "title": "" }, { "docid": "067b9d24b5dac175821c0735d6d806cc", "score": "0.688674", "text": "public function create()\n {\n return view('master.form.store-form');\n }", "title": "" }, { "docid": "d9fb9408a2ea2284ba0eb01e9b9f0ad9", "score": "0.6885999", "text": "public function create()\n\t{\n\t\treturn view('bookadd');\n\t}", "title": "" }, { "docid": "6ef3748a0657559a1fd00a6cc4d782a8", "score": "0.68856096", "text": "public function create() //Mostra o formulário de criar\n {\n return view('novocliente');\n }", "title": "" }, { "docid": "ac084576ebba1a00bcfe56d170892acd", "score": "0.68847346", "text": "public function create()\n {\n //\n return view('hr.job.new');\n }", "title": "" }, { "docid": "3e7f6652e7cb52b2c7212149ee225866", "score": "0.6883263", "text": "public function create()\n {\n return view('admin.addNewMemberForm');\n }", "title": "" }, { "docid": "ec8d29c90d63c7dd5dc4c06d47bbbc59", "score": "0.6882876", "text": "public function create()\n\t{\n\t\treturn View::make('marcas.create');\n\t}", "title": "" }, { "docid": "a1931b2dade47be4ae044efee6a437c9", "score": "0.6881667", "text": "public function create()\n {\n return view('terms.form.create');\n }", "title": "" }, { "docid": "6ff9402d5f32e658ee203214231d02a5", "score": "0.68814975", "text": "public function create()\n\t{\n\t\treturn view('siswa.create');\n\t}", "title": "" }, { "docid": "029d8900ec4b878546c64c7d4964c9d0", "score": "0.6878531", "text": "public function create()\n {\n // grazina vaizda i client.create vaizda- forma sukurimui\n return view (\"client.create\");\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "442b566398321ea055dcc29fb9151c08", "score": "0.6872473", "text": "public function create()\r\n {\r\n //\r\n return view('secretary.secretary-form');\r\n }", "title": "" }, { "docid": "6e5bbe77c19ff98d3f26567dbcab62ac", "score": "0.6870498", "text": "public function create()\n {\n return view('pharmacist.create');\n }", "title": "" }, { "docid": "b61af7c8c374791295e620c96cd2efe2", "score": "0.68676805", "text": "public function create()\n\t{\n\t\treturn view('promotores.create');\n\t}", "title": "" }, { "docid": "cbfb3722629fd217139fdd353b1d221a", "score": "0.6866691", "text": "public function newAction()\n {\n\t\t$request = Request::createFromGlobals();\n\n $entity = new Customer();\n\n $form = $this->createForm(new CustomerType(), $entity);\n\n return $this->render('EcsCrmBundle:Customer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "aa81c39ccad2d288485f3d159e37562d", "score": "0.6865642", "text": "public function create()\n {\n $resources = Resource::all();\n return view('income.add', compact('resources'));\n }", "title": "" }, { "docid": "4715d6a980032ef3d97b14b36b6a4836", "score": "0.68620414", "text": "public function create()\n {\n // load the create form\n return View::make('admin/contacts/create');\n }", "title": "" }, { "docid": "5262a456380a2fc8192827bb080bd28d", "score": "0.68597555", "text": "public function create()\n {\n //\n return view('cajas.new');\n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "c9a768f923d50e25007dbaadf55c20e4", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth:admin');\n }", "title": "" } ]
[ { "docid": "d9326c5cccbc2dd88181065b59b8d16d", "score": "0.7718656", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "7522b4e75e8022f9b4896d6adb036aec", "score": "0.7408162", "text": "protected function createController($controllerName) {\n require_once PATH_CONTROLLERS_DIR.$controllerName.'.php';\n return new $controllerName;\n }", "title": "" }, { "docid": "6814871bdb6f8d91f6d863bacc689705", "score": "0.739726", "text": "public function createController()\n {\n return $this->validateController($this->controller, $this->action);\n }", "title": "" }, { "docid": "14fafcd88b131b2eaa5f30e438b6d974", "score": "0.73584074", "text": "public function createController()\n {\n // Derive the correct namespace\n $name = $this->qualifyClass(\"Http/Controllers/{$this->singular()}Controller\");\n\n // Determine the file path\n $path = $this->getPath($name);\n\n // Ensure this controller doesn't already exist\n if ($this->alreadyExists($path)) {\n $this->error('Controller already exists!');\n return false;\n }\n\n // Ensure the path is reachable\n $this->makeDirectory($path);\n\n // Fetch out stubbed file template\n $stub = $this->files->get($this->stubPath('controller'));\n\n // Replace stubbed placeholders with real values\n $controller = $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n $replacements = [\n 'DummyFullModelClass' => $this->singular(),\n 'DummyModelClass' => class_basename($this->singular()),\n 'DummyModelVariablePlural' => lcfirst($this->plural()),\n 'DummyModelVariable' => lcfirst($this->singular()),\n ];\n\n $controller = str_replace(array_keys($replacements), array_values($replacements), $controller);\n\n // Write the file to disk\n $this->files->put($path, $controller);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "cda5a4cfd3158f3568dcfbf30501ba0c", "score": "0.7157658", "text": "public function CreateController() {\n\t\t//does the class exist?\n\t\tif (class_exists($this->controller)) {\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t//does the class extend the controller class?\n\n\t\t\tif (method_exists($this->controller,$this->action)) {\n\t\t\t\treturn new $this->controller($this->action,$this->urlvalues);\n\t\t\t} else {\n\t\t\t\t//bad method error\n\t\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t//bad controller error\n\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t}\n\t}", "title": "" }, { "docid": "6f4b3e1f2d4642658323f5ca5d89ff15", "score": "0.7145347", "text": "public function createController(){\n\t\t// Check Class\n\t\tif(class_exists($this->controller)){\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)){\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t} else {\n\t\t\t\t\t// Method Does Not Exist\n\t\t\t\t\techo '<h1>Method does not exist</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not found</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exist\n\t\t\techo '<h1>Controller class does not exist</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "18e976b5fe04d773fbcc524bd8e07d39", "score": "0.6996465", "text": "public static function init(): Controller\n {\n return new CompanyController();\n }", "title": "" }, { "docid": "c30b5e0cdc833f02671bd56ba0818419", "score": "0.6947697", "text": "function create_controller () {\n\t\t$file_content = file_get_contents('generator/GeneratedObjectController.php');\n\n\t\t// replace names\n\t\t$file_content = $this->replace_names($file_content);\n\n\t\t// replace datatable display & search columns\n\t\t$content = [];\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\t$content[] = \"'$name'\";\n\t\t}\n\t\t$file_content = str_replace('// generator display columns', '$this->datatable->display_columns = ['.implode(', ', $content).'];', $file_content);\n\t\t$file_content = str_replace('// generator search columns', '$this->datatable->search_columns = ['.implode(', ', $content).'];', $file_content);\n\n\t\t// replace validator rules\n\t\t$content = '';\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tif ($type != 'ai') {\n\t\t\t\t$content .= '\t\t$validator->rules[] = [\\''.ucfirst(str_replace('_', ' ', $name)).'\\', \\''.$name.'\\', \\'required\\'];'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$file_content = str_replace('\t\t// generator rules', rtrim($content, PHP_EOL), $file_content);\n\n\t\t// create new class file with content\n\t\tfile_put_contents('app/controllers/'.$this->name['class'].'Controller.php', $file_content);\n\t}", "title": "" }, { "docid": "3e36ab8b17f0acf1f70a5f948e8e68f9", "score": "0.694347", "text": "public function setController()\n {\n if (isset($this->url[0])) {\n if (file_exists(__DIR__.'/../controllers/'.$this->url[0].'Controller.php')) {\n $this->controller = '\\App\\\\Controllers\\\\'.ucfirst($this->url[0]).'Controller';\n }\n unset($this->url[0]);\n }\n return new $this->controller;\n }", "title": "" }, { "docid": "5e49e15057f2dc0fc7a292ca0315aed4", "score": "0.6919487", "text": "public static function build(): Controller;", "title": "" }, { "docid": "7c22a989693f747de29e4a8acfe67cd7", "score": "0.6913309", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n\n // check extends\n if(in_array('Controller', $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Method does not exist</h3></center>\";\n }\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Base controller does not exist</h3></center>\";\n }\n\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Class does not exist</h3></center>\";\n }\n }", "title": "" }, { "docid": "14112aaf6855b202948ff99a111500e5", "score": "0.68924665", "text": "private function createController(Request $request)\n {\n $controller = \"Post\"; // Default controller\n if ($request->existParameter('controller'))\n {\n $controller = $request->getParameter('controller');\n $controller = ucfirst (strtolower($controller)); // First letter in upper case\n }\n\n // Create the controller file name\n $classController = $controller . \"Controller\";\n $fileController = \"controller/\" . $classController . \".php\"; // concatenation for build the name of the controller file\n if (file_exists($fileController)) \n {\n // Instantiation of the controller adapted to the query\n require($fileController);\n $controller = new $classController();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"Fichier '$fileController' introuvable\");\n }", "title": "" }, { "docid": "93d7df3a09cc014864daa234c8723abb", "score": "0.68385243", "text": "public function makeApiController()\n {\n $controllerClass = \"{$this->module}/{$this->module}Controller\";\n\n $this->call('make:controller', [\n 'name' => $controllerClass,\n '--api' => true,\n ]);\n }", "title": "" }, { "docid": "bb4542d12133680bee2ccc4ff64862ac", "score": "0.6778695", "text": "public function createController(string $controller, array $services) {\n return new $controller($this->getServices($services));\n }", "title": "" }, { "docid": "4097d4198a1dff708b62c949425ca696", "score": "0.6770579", "text": "protected function createController($controller,$action,$params) {\n $object = new $controller();\n call_user_func_array(array($object, $action), $params);\n }", "title": "" }, { "docid": "741d17127e5bffbe3e123e20f5163cec", "score": "0.6766812", "text": "public function CreateController()\n {\n if(class_exists($this->controller))\n {\n $parents = class_parents($this->controller);\n\n //does the class extend the controller class\n //if not error to bad url\n if(in_array('BaseController', $parents))\n {\n //does the class contain the requested method\n //if not error to bad url\n if(method_exists($this->controller, $this->action))\n {\n return new $this->controller($this->action, $this->urlParams);\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }", "title": "" }, { "docid": "1da6b6bfbe1b17981fb3006484b5611d", "score": "0.6766166", "text": "public function createController(){\n // check for class User in the url\n if(class_exists($this->controller)){\n //class_parents — Return parent classes of the given class as array\n //eg.User class in index.php/User/register\n //if User extends class Controller, then result is an array of parent class Controller\n $parents = class_parents($this->controller);\n \n //check Extend\n //in_array(needle, haystack)\n //checks for class Controller in the returned array\n if(in_array('Controller', $parents)){\n //does the class User have a method register?\n //bool method_exists ( mixed $object , string $method_name )\n if(method_exists($this->controller, $this->action)){\n //creates an instance object of the User class\n //this class is extends base Controller class\n //its passed a method (register) and the url (index.php/Users/register)\n return new $this->controller($this->action, $this->request);\n }else{\n //Method does not exist\n echo 'Method does not exist';\n return;\n }\n }else {\n //Base controller not found\n echo \"Base controller not found\";\n }\n }else{\n //Controller class does not exist\n echo \"Controller class does not exist\";\n }\n }", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.6703522", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "e5e0c55c4714900fb5374b54efede745", "score": "0.6685761", "text": "public function createControllerFile()\n {\n $controller_path = app_path('Http/Controllers/' . $this->replaces['{role_class}']);\n if (!$this->files->exists($controller_path)) {\n $this->files->makeDirectory($controller_path, 0755, true);\n }\n\n // create controller file\n $controller_file = $controller_path . '/' . $this->replaces['{model_class}'] . 'Controller.php';\n\n // make sure controller file does not exist\n if ($this->files->exists($controller_file)) {\n $this->warn('Controller file exists: <info>' . $controller_file . '</info>');\n return;\n }\n\n $controller_stub = $this->files->get($this->stubs_path . '/controller.stub');\n $this->files->put($controller_file, $this->replace($controller_stub));\n $this->line('Controller file created: <info>' . $controller_file . '</info>');\n }", "title": "" }, { "docid": "d4769cc643f23b8ae5ddf8d17915f6c8", "score": "0.6559158", "text": "function factory($type, $router = null) {\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tControllerFactory::import($type);\n\t\t\n\t\t$class_name = Inflector::camelize(basename($type)).'Controller';\n\t\t\n\t\tif (!class_exists($class_name)) {\n\t\t\ttrigger_error(\"Controller file for '$type' exists, but doesn't contain controller class '$class_name'\", E_USER_ERROR);\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller = new $class_name;\n\t\t\n\t\tif (!is_a($controller, 'Controller')) {\n\t\t\ttrigger_error(\"Class '$class_name' doesn't extend Controller\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller->full_type = $type;\n\t\t$controller->router = $router;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "10fd6cfcfb90d057fcdf8ec6193fa1d4", "score": "0.6557814", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\t\t$this->Controller = new Controller();\n\t\t$this->Controller->uses = array();\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "02bd8c3ae81871f15337ca5bf36784cc", "score": "0.6527491", "text": "public function __construct()\n {\n $CONTROLLER_PATH = '../app/controllers/';\n\n // turn arguments from url after /public/ into array, where \n // [0] - controllers name\n // [1] - method name\n // [2..n] - arguments\n $url = $this->parseUrl();\n\n if (isset($url[0])) {\n if (file_exists($CONTROLLER_PATH . $url[0] . '.php')) {\n $this->controller = $url[0];\n unset($url[0]);\n }\n }\n\n require_once($CONTROLLER_PATH . $this->controller . '.php');\n\n // create a new object identified by its name \n $this->controller = new $this->controller;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // save the rest of parameters into params\n $this->params = $url ? array_values($url) : [];\n\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "3a693593064e4c5786a26a77fe6ffe4a", "score": "0.6518577", "text": "private function createObjFromFile(){\n\t\t\n\t\t\n\t\t$this->controller = new $this->controller;\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "860f1221cf9e7f33ca2f7d14a8352a4d", "score": "0.64851624", "text": "protected function generateController()\n {\n $translatableName = $this->translator->translate($this->argument('name'));\n $namespace = $this->getNamespace(true, $translatableName->toModelName());\n $path = $this->getPath($namespace);\n $target = \"$path/{$translatableName->toRepositoryName()}Controller.php\";\n\n // Render and create repository controller if not exists\n if (!$this->filesystem->exists($target)) {\n $this->renderTemplate('controller_class.txt', $target, [\n 'NAMESPACE' => $namespace,\n 'CLASSNAME' => \"{$translatableName->toRepositoryName()}Controller\",\n 'REPOSITORY' => \"Eloquent{$translatableName->toRepositoryName()}Repository\"\n ]);\n } else {\n $this->error(\"Controller for repository '{$translatableName->toRepositoryName()}Repository' already exists.\");\n }\n }", "title": "" }, { "docid": "901fccfeeeff48ee3d2a996f0035f62f", "score": "0.64692736", "text": "protected function buildController(): void\n {\n $path = $this->namespace.$this->controllerPath.$this->argument('controller');\n // Controller namespace\n $this->controller = str_replace('/', '\\\\', $path);\n if ($this->laravel->runningInConsole()) {\n // Controller does not exists\n if (!class_exists($this->controller.$this->controllerExtension)) { // Append the 'Controller' suffix for path checking\n $response = $this->ask(\"Controller [{$this->controller}] does not exist. Would you like to create it?\", 'Yes');\n if ($this->rateResponse($response)) {\n // Build the controller by mocking the Artisan::call()\n $this->mock('controller', $this->controller.$this->controllerExtension);\n $this->line(\"Controller [{$this->controller}] has been successfully created.\");\n } else {\n $this->line(\"Controller [{$this->controller}] does not get created.\");\n }\n }\n }\n\n $controllerParts = explode('\\\\', $this->controller);\n $this->controllerName = array_pop($controllerParts);\n }", "title": "" }, { "docid": "2f8252c499ee07c46b4ca37b039a7869", "score": "0.6456961", "text": "public static function factory($controller)\n {\n $className = \"app\\\\controllers\\\\{$controller}\";\n return class_exists($className) ? new $className() : null;\n }", "title": "" }, { "docid": "8770562d3bf1c23b3024e35fc387ed0e", "score": "0.64533633", "text": "public static function instantiateController( $class )\n {\n $controller = new $class();\n\n return $controller;\n }", "title": "" }, { "docid": "2801a9234e783d115aae92da3c727892", "score": "0.6442282", "text": "public function testInstantiatingController()\n {\n global $config;\n\n $action = new Action( 'indexAction' );\n\n $controller = new HomeController();\n $controller->setDispatcher( new Dispatcher() );\n $controller->addDefaultListeners( $config );\n $controller->setAction( $action );\n\n $this->assertNotNull( $controller );\n }", "title": "" }, { "docid": "a6e6b0d124f20a1cb2d58a70d077ff7a", "score": "0.643471", "text": "public function createAccount()\n {\n return new CreateAccountController($this->dataRecord, $this);\n }", "title": "" }, { "docid": "22c5802794fb4a7741267b3d008c88ce", "score": "0.6424693", "text": "public function create()\n\t{\n\t\t//\n\t\treturn 'CobrosController.create()';\n\t}", "title": "" }, { "docid": "5e48ebea1216127ead2d9806b65182f8", "score": "0.6418414", "text": "public static function getController()\n {\n if (is_null(self::$instance))\n self::$instance = new Controller();\n return self::$instance;\n }", "title": "" }, { "docid": "55f605d4165a52b1b46b8eb8c5ef254a", "score": "0.6402445", "text": "public function __invoke(): Controller\\Customer\n {\n // Since we don't have a database, we're going to insert data manually and pretend the database exists.\n $data = new Vo\\Customer('Joe Schmoe', $this->getRentals());\n\n $model = new Model\\Customer($data);\n $view = new View\\Customer($model);\n\n $controller = new Controller\\Customer($model, $view);\n\n return $controller;\n }", "title": "" }, { "docid": "2844b870664f9dded954d2ad081e20af", "score": "0.6387934", "text": "private function registerControllerFactory()\n {\n \\Amvisie\\Core\\ControllerBuilder::current()->setControllerFactory(new \\Demo\\MyControllerFactory($this->injector));\n }", "title": "" }, { "docid": "577df751ec34d0c1ff25889ffa48882f", "score": "0.6322067", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = GetClickwrapsService::getClickwraps($this->args, $this->clientService);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Get a list of clickwraps\",\n \"Get a list of clickwraps\",\n \"Results from the ClickWraps::getClickwraps method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "fff7ef09f4829cc8af5393dca2558e2c", "score": "0.627688", "text": "function loadControler() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = root . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $name . '.php';\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "9224437f2f27e230e9e4591310df8791", "score": "0.6235137", "text": "public function initController()\n\t{\n\t\t// already created\n\t\t// already created\n\t\tif ($this->controller instanceof Controller) {\n\t\t\treturn;\n\t\t}\n\t\t$slug = $this->request->getControllerString();\n//\t\tllog($slug);\n\t\tif (!$slug) {\n\t\t\tthrow new Exception404($slug);\n\t\t}\n\t\tif ($_REQUEST['d']) {\n\t\t\t$this->log(__METHOD__, $slug);\n\t\t}\n\t\t$this->loadController($slug);\n\t\t$this->bodyClasses[] = is_object($this->controller) ? get_class($this->controller) : '';\n\t\tTaylorProfiler::stop(__METHOD__);\n\t}", "title": "" }, { "docid": "b8c392744b1df1c8c46abef0029cc784", "score": "0.62313515", "text": "public function getController() {}", "title": "" }, { "docid": "e88f1c4982abeadc16518a9506523df4", "score": "0.62152797", "text": "public function loadController() {\n $non_camel_case_name = tableize($this->request->controller).'_controller';\n // Get class name\n $name = classify($non_camel_case_name);\n // Get file name to load it at runtime\n $file = APPLICATION_ROOT.'controllers/'.$non_camel_case_name.'.php';\n // Load controller file\n require($file);\n // Load controller $name\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "5cd05100b345a60dfcbf429aea50a3c8", "score": "0.6206137", "text": "public function createAction()\n {\n $class = $this->getClass();\n $action = new $class;\n\n return $action;\n }", "title": "" }, { "docid": "645c0458cd626c6744636bf2c08ea107", "score": "0.6196702", "text": "public function createController(): void\n {\n $this->checkDsToken();\n\n // Call the worker method\n $results = $this->bulkImportUserData();\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Add users via bulk import\",\n \"Add users via bulk import\",\n \"Results from UserImport:addBulkUserImport method:\",\n json_encode(json_encode($results))\n );\n }\n }", "title": "" }, { "docid": "4aeb0b94f9be731f783ab7bf0b5508c5", "score": "0.61859673", "text": "function createController()\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Create a form group\",\n \"Create a form group\",\n \"Results of FormGroups::createFormGroup\",\n json_encode(json_encode($results))\n );\n }\n\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "08bea968232eea8d3853a40ab4236c6d", "score": "0.6182294", "text": "public function __construct(){\n\n $url = $this->getUrlParams();\n \n // Checking for controller\n if(isset($url[0]) && file_exists(APPROOT . \"/controllers/\" . ucfirst($url[0]) . \".php\")){\n $this->controller = ucfirst($url[0]);\n unset($url[0]);\n }else{\n return handleResponse(404,\"Controller not found. It may occurs if you haven't passed the controller or the controller does not exist.\");\n }\n\n // Requring the controller\n require_once APPROOT . \"/controllers/\" . $this->controller . \".php\";\n // Initializing the controller\n $this->controller = new $this->controller();\n\n // Checking for method\n if(isset($url[1]) && method_exists($this->controller, $url[1])){\n // If method is passed and exists\n $this->method = $url[1];\n unset($url[1]);\n } else if(isset($url[1])){\n // If method is passed but doesn't exist\n return handleResponse(404, \"Method $url[1] does not exist.\");\n }\n\n // Checking for parameters\n $this->parameters = $url ? array_values($url) : [];\n\n // Call the method inside the controller with the array of parameters\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n\n }", "title": "" }, { "docid": "25d306fadf279fa880b398b6ca58c7ad", "score": "0.61748606", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $controller->helloMessage();\n $controller->helloMessageView();\n $controller->hello();\n $controller->helloWithArgument(\"hello\");\n $this->assertInstanceOf(\"\\App\\Controller\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "b8cf453cf0b6ad8c82139f43c158518d", "score": "0.61523783", "text": "private function createRCAController(){\r\n\t\t$route = $this->_request->getParam('controller_route');\r\n\t\t$conroller = $this->_request->getParam('controller_controller');\r\n\t\t$action = $this->_request->getParam('controller_action');\r\n\t\t$controller_type = $this->_request->getParam('controller_type');\r\n\r\n\t\t$crr = $this->_request->getParam('controller_route_regex');\r\n\t\t$ccr = $this->_request->getParam('controller_controller_regex');\r\n\t\t$car = $this->_request->getParam('controller_action_regex');\r\n\r\n\t\t$extends = $this->_request->getParam('extend_to_class');\r\n\r\n\t\t$sampleTemplate = 'sample_template.phtml';\r\n\t\t$isAdmin = false;\r\n\r\n\t\tif($controller_type == 'admin'){\r\n\t\t\t$sampleTemplate = 'admin/sample_template.phtml';\r\n\t\t\t$isAdmin = true;\r\n\t\t}\r\n\r\n\t\tif(!strlen($route)){\r\n\t\t\t$route = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($conroller)){\r\n\t\t\t$conroller = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($action)){\r\n\t\t\t$action = \"Index\";\r\n\t\t} \r\n\r\n\t\tif($route == 'system' || $route == 'System'){\r\n\t\t\t$this->returnError('400', 'System route is reserved for Opoink\\'s developer panel.');\r\n\t\t} else {\r\n\t\t\t$invalidPatternMsg = 'You will use regex for the {{path}}, but your pattern seems to be invalid. To avoid error please make sure your pattern is valid.';\r\n\t\t\tif($crr === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $route)) {\r\n\t\t\t\t\t$route = 'Reg'.sha1($route);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'route', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($ccr === 'yes'){;\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $conroller)) {\r\n\t\t\t\t\t$conroller = 'Reg'.sha1($conroller);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'conroller', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($car === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $action)) {\r\n\t\t\t\t\t$action = 'Reg'.sha1($action);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'action', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$conType = 'public';\r\n\t\t\t$xmlFilename = strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\r\n\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t$conType = 'admin';\r\n\t\t\t\t$xmlFilename = 'admin_'.strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\Admin\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\t\t\t}\r\n\r\n\t\t\tif(!empty($extends)){\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/* \r\n\t\t\t\t\t * this is to try if the class to extend exists\r\n\t\t\t\t\t * if it is not injector will raise an error\r\n\t\t\t\t\t */\r\n\t\t\t\t\t$this->_di->make($extends);\r\n\t\t\t\t} catch (\\Exception $e) {\r\n\t\t\t\t\t$this->returnError('400', $e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->_controller->setExtends($extends);\r\n\t\t\t}\r\n\r\n\t\t\t$create = $this->_controller->setVendor($this->vendor_name)\r\n\t\t\t->setModule($this->module_name)\r\n\t\t\t->setRoute($route)\r\n\t\t\t->setController($conroller)\r\n\t\t\t->setAction($action)\r\n\t\t\t->create($conType);\r\n\r\n\t\t\tif($create){\r\n\t\t\t\t/** insert into module config */\r\n\t\t\t\tif($crr === 'yes' || $ccr === 'yes' || $car === 'yes'){\r\n\t\t\t\t\t$regexCount = 0;\r\n\t\t\t\t\twhile (isset($this->config['controllers']['regex_'.$regexCount])) {\r\n\t\t\t\t\t\t$regexCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$routerName = 'regex_'.$regexCount;\r\n\t\t\t\t\t$routerInfo = [\r\n\t\t\t\t\t\t'route' => $this->routerInfoHelper($crr, 'controller_route'),\r\n\t\t\t\t\t\t'route_regex' => $crr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'controller' => $this->routerInfoHelper($crr, 'controller_controller'),\r\n\t\t\t\t\t\t'controller_regex' => $ccr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'action' => $this->routerInfoHelper($crr, 'controller_action'),\r\n\t\t\t\t\t\t'action_regex' => $car === 'yes' ? true : false,\r\n\t\t\t\t\t\t'class' => $controllerClass\r\n\t\t\t\t\t];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$routerName = $xmlFilename;\r\n\t\t\t\t\t$routerInfo = $controllerClass;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->config['controllers'][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t$this->_configManager->setConfig($this->config)\r\n\t\t\t\t->createConfig();\r\n\t\t\t\t/** end insert into module config */\r\n\r\n\t\t\t\t/** insert into installation config */\r\n\t\t\t\t$_config = ROOT . DS . 'etc' . DS. 'Config.php';\r\n\t\t\t\tif(file_exists($_config)){\r\n\t\t\t\t\t$_config = include($_config);\r\n\r\n\t\t\t\t\t$vm = $this->vendor_name.\"_\".$this->module_name;\r\n\t\t\t\t\tif(isset($_config['controllers'][$vm])){\r\n\t\t\t\t\t\t$_config['controllers'][$vm][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t\t\t$data = '<?php' . PHP_EOL;\r\n\t\t\t\t\t\t$data .= 'return ' . var_export($_config, true) . PHP_EOL;\r\n\t\t\t\t\t\t$data .= '?>';\r\n\r\n\t\t\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t\t\t$_writer->setDirPath(ROOT . DS . 'etc' . DS)\r\n\t\t\t\t\t\t->setData($data)\r\n\t\t\t\t\t\t->setFilename('Config')\r\n\t\t\t\t\t\t->setFileextension('php')\r\n\t\t\t\t\t\t->write();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/** end insert into installation config */\r\n\r\n\t\t\t\t/** create controller xml layout here */\r\n\r\n\t\t\t\t$body = \"\\t\\t\".'<container xml:id=\"main_container\" htmlId=\"main_container\" htmlClass=\"main_container\" weight=\"1\">' . PHP_EOL;\r\n\t\t\t\t\t$body .= \"\\t\\t\\t\".'<template xml:id=\"sample_template\" vendor=\"'.$this->vendor_name.'\" module=\"'.$this->module_name.'\" template=\"'.$sampleTemplate.'\" cacheable=\"1\" max-age=\"604800\"/>' . PHP_EOL;\r\n\t\t\t\t$body .= \"\\t\\t\".'</container>' . PHP_EOL;\r\n\r\n\t\t\t\t$this->_xml->setVendor($this->vendor_name)\r\n\t\t\t\t->setModule($this->module_name)\r\n\t\t\t\t->setFileName($xmlFilename);\r\n\t\t\t\tif($isAdmin){\r\n\t\t\t\t\t$this->_xml->create(false, $isAdmin, 999, $body);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->_xml->create(true, $isAdmin, 999, $body);\r\n\t\t\t\t}\r\n\t\t\t\t/** end create controller xml layout here */\r\n\r\n\t\t\t\t/** create the sample template here */\r\n\t\t\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->vendor_name.DS.$this->module_name.DS.'View'.DS.'Template';\r\n\t\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t\t$target .= DS.'admin';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$data = \"<p>\".$route.\" \".$conroller.\" \".$action.\" works</p>\";\r\n\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t$_writer->setDirPath($target)\r\n\t\t\t\t->setData($data)\r\n\t\t\t\t->setFilename('sample_template')\r\n\t\t\t\t->setFileextension('phtml')\r\n\t\t\t\t->write();\r\n\t\t\t\t/** end create the sample template here */\r\n\r\n\t\t\t\t$response = [];\r\n\t\t\t\t$response['error'] = 0;\r\n\t\t\t\t$response['message'] = 'New conroller created.';\r\n\t\t\t\t$this->jsonEncode($response);\r\n\t\t\t} else {\r\n\t\t\t\t$this->returnError('400', 'Cannot create, controller is already existing.');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "15785cee110b7a5fa7884ea2196c96d8", "score": "0.6138628", "text": "protected function createController($controller) {\n \n // Make sure controller can be found\n if (false === strpos($controller, '::')) {\n throw new \\InvalidArgumentException(sprintf('Unable to find controller \"%s\".', $controller));\n }\n\n list($class, $method) = explode('::', $controller, 2);\n\n // Make sure the controller exists\n if (!class_exists($class)) {\n throw new \\InvalidArgumentException(sprintf('Class \"%s\" does not exist.', $class));\n }\n \n // Create the callable\n return array(new $class($this->request), $method);\n \n }", "title": "" }, { "docid": "ec27e5a6e9ccce083b8c01bff0f3692a", "score": "0.6120848", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n $results = ListEnvelopesService::worker($this->args, $this->clientService);\n\n if ($results) {\n # results is an object that implements ArrayAccess. Convert to a regular array:\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Envelope list\",\n \"List envelopes results\",\n \"Results from the Envelopes::listStatusChanges method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "0b34426a487f3d5feb0fe456c48c735b", "score": "0.6088194", "text": "protected function getControllerObject($className)\n {\n if (!class_exists($className)) {\n throw new \\Exception('Controller class \"' . $className . '\" does not exist');\n }\n\n return new $className();\n }", "title": "" }, { "docid": "5289d69f9bdc993d46a5b5a133a834ce", "score": "0.6077799", "text": "public function __construct(){\n \n //Setup sessions\n Session::start();\n \n //Get controller, action & params from user\n $this->splitUrl();\n \n // check for the controller.. Does it exist?\n $controllerFile = './application/controllers/' . (($this->area) ? $this->area . '/' : '') . $this->controller . '.php';\n \n if(file_exists($controllerFile)){\n //if so, load the controller and create a new object\n require($controllerFile);\n $this->controller = new $this->controller();\n \n //Now check for an action\n if(method_exists($this->controller, $this->action)){\n call_user_func_array(array($this->controller, $this->action), $this->params);\n } else {\n //Fallback to the default index action\n //$this->controller->index();\n //die(\"Invalid URL (1)\");\n Redirect::to(404);\n }\n } else {\n //Invalid URL.. Show 404? \n //die(\"Invalid URL (2)\");\n Redirect::to(404);\n }\n \n }", "title": "" }, { "docid": "94b94d25bbe7c313f289e6d26302b5ba", "score": "0.6057803", "text": "public function __construct()\n\t{\n\t\t$router = framewerk_RouterFactory::getRouter();\n\n\t\t// Instantiate the controller\n\t\t$controller_name = $router->getController();\n\t\t$class_name = 'controller_' . $controller_name;\n\n\t\t$controller = new $class_name;\n\n\t\t$action_name = $router->getAction();\n\n\t\t// Else, try and call the action sent in request string. If that does not exist, try and get the controllers default action\n\t\t$action = is_callable(array($controller, $action_name)) ? $action_name : $controller->default_action;\n\t\t\n\t\tif(!$action)\n\t\t{\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\n\t\t// Set some view defaults. Templates are mapped to ControllerName/actionName.tpl.php\n\t\t$controller->view->setController($controller_name);\n\t\t$controller->view->setAction($action);\n\t\t$controller->view->setRequestId($router->getRequestId());\n\n\t\t// Does this action have a definition in the controller?\n\t\t$action_definition_name = $action_name.'_definition';\n\n\t\tif(isset($controller->$action_definition_name))\n\t\t{\n\t\t\t$action_definition = $controller->$action_definition_name;\n\n\t\t\t$request_data = $router->getRequestData($action_definition['data_source']);\n\n\t\t\t// If data_source is empty, do not create the request object\n\t\t\t// This allows actions to actually check whether an action should be performed, or just view.\n\t\t\tif(!empty($request_data)) $controller->request = new framewerk_Request($action_definition, $request_data);\n\t\t}\n\n\t\t// Pass input data back to the view - before action, so action can overwrite if needed\n\t\tif($controller->request && Config::populateViewWithRequestData())\n\t\t{\n\t\t\t$controller->view->setData($controller->request->input_data_objects);\n\t\t}\n\n\n\t\t// Call the action\n\t\t$controller->$action();\n\n\t\t/*\n\t\t// Check for invalid / invalidated data, create notices\n\t\tif($controller->request)\n\t\t{\n\t\t\tif(!$controller->request->isValid())\n\t\t\t{\n\t\t\t\tforeach($controller->request->getInvalidObjects() as $field_name => $input_data_object)\n\t\t\t\t{\n\t\t\t\t\t// If this field has a message\t\t\t\t\t\n\t\t\t\t\tif( ($message = $input_data_object->getError()) ) $controller->view->setNotice($message, framewerk_Notice::TYPE_ERROR, $field_name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t// Render the view.\n\t\t$controller->view->render();\n\t}", "title": "" }, { "docid": "7a87ff9b48792e87255828837574a1d9", "score": "0.6057443", "text": "public function getController() {\n self::load('Panda.router.Router');\n $router = new Router;\n $router->loadKnownRoutes($this->name());\n\n //Try to find a matching route\n try {\n $matchedRoute = $router->getRoute(HTTPRequest::requestURI());\n } catch (RuntimeException $error) {\n if ($error->getCode() === Router::NO_ROUTE_FOUND) {\n HTTPResponse::redirect404($this);\n }\n }\n\n $_GET = array_merge($_GET, $matchedRoute->vars());\n $controllerClass = $matchedRoute->module() . 'Controller';\n //and load the matching controller\n self::load('App.' . strtolower($this->name()) . '.module.' . strtolower($matchedRoute->module()) . '.' . $matchedRoute->module() . 'Controller');\n return new $controllerClass($this, $matchedRoute->module(), $matchedRoute->action());\n }", "title": "" }, { "docid": "0f55d264929f691b94f7038e53696e53", "score": "0.6038518", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $envelope_id = $this->args['envelope_id'];\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = ApplyBrandToEnvelopeService::worker($this->args, $this::DEMO_DOCS_PATH, $this->clientService);\n\n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Brand applying to envelope\",\n \"Brand applying to envelope\",\n \"The brand has been applied to the envelope!<br/> Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } elseif (!$token_ok) {\n $this->clientService->needToReAuth($this->eg);\n } elseif (!$envelope_id) {\n $this->clientService->envelopeNotCreated(\n basename(__FILE__),\n $this->routerService->getTemplate($this->eg),\n $this->routerService->getTitle($this->eg),\n $this->eg,\n ['envelope_ok' => false]\n );\n }\n }", "title": "" }, { "docid": "f56a64bb7cfeb36f9051c562c69f3277", "score": "0.6022596", "text": "protected function callController() {\n\n\t\t\t// Create class name\n\t\t\t$className = self::get(\"applicationNamespace\") . \"\\\\Controllers\\\\\" . $this->_activeRoute->controller;\n\n\t\t\t// Create the controller\n\t\t\t$controllerInstance = new $className($this->_request, $this->_activeRoute, $this->_urlVariables);\n\n\t\t\t// Is it a Controller-derived classed?\n\t\t\tif (!is_subclass_of($controllerInstance, \"ChickenWire\\Core\\Controller\")) {\n\t\t\t\tthrow new \\Exception(get_class($controllerInstance) . \" does not extend ChickenWire\\\\Core\\\\Controller.\", 1);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Call the action!\n\t\t\t$controllerInstance->{$this->_activeRoute->action}();\n\n\n\t\t}", "title": "" }, { "docid": "c6ebab64f6899be399a108fc8801c174", "score": "0.60070246", "text": "private function autoInjectConstructor () {\n\n\t\t$reflectionClass = new \\ReflectionClass($this->controller);\n\t\t$parameters = $reflectionClass->getConstructor()->getParameters();\n\t\t$countParams = $reflectionClass->getConstructor()->getNumberOfParameters();\n\t\t$arguments = $this->getDataArguments('constructor', $parameters, $countParams);\n\n\t\tif ($countParams === 0) {\n\t\t\t$this->controller = new $this->controller;\n\t\t}\n\n\t\tif ($countParams > 0) {\n\t\t\t$class = new \\ReflectionClass($this->controller);\n\t\t\t$this->controller = $class->newInstanceArgs( $arguments);\n\t\t}\n\n\t}", "title": "" }, { "docid": "8feab6599948b1901888f3629d4a6f42", "score": "0.6004968", "text": "public static function getControllerByName($controllerName) {\n $controllerClassName = \"\\\\App\\\\Controller\\\\\" . ucfirst($controllerName);\n $controller = new $controllerClassName();\n\n return $controller;\n }", "title": "" }, { "docid": "44ba2c933da7f98d547b57bcc717630e", "score": "0.6002322", "text": "public function testCreate()\n {\n $http = new MockHttpClient();\n $util = new Util($http);\n $session = new MockSession();\n $http = new MockHttpClient();\n $controller = new YatzyController($util, $session, $http);\n $this->assertInstanceOf(\"\\pereriksson\\Controllers\\YatzyController\", $controller);\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "b3d0f810431c48da48d574a3342f562d", "score": "0.5951398", "text": "private function run() {\n\n new PublicController();\n }", "title": "" }, { "docid": "b68e4cd0cb46bde7d422a5e20dfe11c2", "score": "0.59435284", "text": "private function createIndexControllerFolderAndFile(): void\n {\n if (!file_exists($this->getModulePath() . '/Controllers')) {\n mkdir($this->getModulePath() . '/Controllers');\n }\n\n if (!file_exists($this->getModulePath() . '/Controllers/IndexController.php')) {\n $moduleController = fopen($this->getModulePath() . '/Controllers/IndexController.php', 'a+');\n $content = require __DIR__ . '/templates/indexController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "b69e39d0dbba22f31778a3f49782d751", "score": "0.5922964", "text": "public function __construct() {\n if (empty($_GET[\"controller\"])) {\n $_GET[\"controller\"] = \"Index\";\n }\n include_once \"controllers/\". $_GET[\"controller\"] .\".php\";\n $obj = new $_GET[\"controller\"];\n return (empty($_GET[\"method\"]) ? $obj : $obj->$_GET[\"method\"]());\n }", "title": "" }, { "docid": "220aa77fc5d4f6030fca8a7d6c0a452b", "score": "0.59076506", "text": "public static function factory($name, $config) {\n $instance = new AdminController();\n $instance->name = $name;\n $instance->config = new $config($name);\n return $instance;\n }", "title": "" }, { "docid": "357d9524ad24f73d9991299d2869f17f", "score": "0.5899775", "text": "public function __construct() {\n\t\t$this->categoryController = new CategoriaController();\n\t}", "title": "" }, { "docid": "11fc5e77841e71e79ca850a2cdcc4a08", "score": "0.58807135", "text": "public function __construct() {\n $this->Services = new services\\ServicesController();\n }", "title": "" }, { "docid": "ffd63bfff3466f0a879bebc0914e0bc2", "score": "0.5879503", "text": "public function get_controller();", "title": "" }, { "docid": "a35f36e4e684ae02470abde9bfe293c8", "score": "0.5878065", "text": "public function controller($name)\n {\n $fileName = \"{$name}.php\";\n\n if (isset($this->arguments[2])) {\n $actions = explode(',', $this->arguments[2]);\n\n if (count($actions) == 0) {\n $actions = array('index');\n }\n\n } else {\n $actions = array('index');\n }\n\n $file = $this->appPath . \"/Controllers/\" . $fileName;\n $class = $name;\n $date = date(\"n/j/Y\");\n $contents = array('<?php');\n $contents[] = '/*';\n $contents[] = \" * {$name} controller\";\n $contents[] = ' *';\n $contents[] = ' * @author ';\n $contents[] = ' * @version 1.0';\n $contents[] = \" * @date $date\";\n $contents[] = ' */';\n $contents[] = '';\n $contents[] = 'namespace Controllers;';\n $contents[] = 'use \\Core\\Controller;';\n $contents[] = '';\n $contents[] = 'class ' . $class . ' extends Controller';\n $contents[] = '{';\n\n foreach ($actions as $action) {\n $contents[] = \"\";\n $contents[] = \" public function \" . $action . \"Action()\";\n $contents[] = \" {\";\n $contents[] = \" \";\n $contents[] = \" }\";\n $contents[] = \"\";\n }\n\n $contents[] = '}';\n\n if (file_put_contents($file, implode(\"\\n\", $contents))) {\n echo Utils::colorize('Create ' . $file, 'SUCCESS');\n\n return true;\n } else {\n echo Utils::colorize('Can\\'t create ' . $file, 'FAILURE');\n\n return false;\n }\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.58657455", "text": "public function create() { }", "title": "" }, { "docid": "d77b48f20163df66d3b44768c441b457", "score": "0.5864596", "text": "public function runClient()\n {\n new Controller($this->getResourceContainer());\n }", "title": "" }, { "docid": "d82231dcca17151b07356febf43aa474", "score": "0.58513033", "text": "private function createModuleController(): void\n {\n $fileName = $this->moduleName . 'Module.php';\n\n if (!file_exists($this->getModulePath() . '/' . $fileName)) {\n $moduleController = fopen($this->getModulePath() . '/' . $fileName, 'a+');\n $content = require __DIR__ . '/templates/moduleController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "ecbb99afcad292f7d778c36fffda6276", "score": "0.5847455", "text": "public function create()\n {\n // NON USED SINCE ITS FOR API\n }", "title": "" }, { "docid": "970d803afad2ceb029f0b4ef18238639", "score": "0.5841589", "text": "private function setControllerClass()\n {\n $name = ucwords(strtolower($this->argument('name')));\n\n $modelClass = $this->parseName($name);\n\n $this->repositoryClass = $modelClass . 'Controller';\n\n return $this;\n }", "title": "" }, { "docid": "8aef7aa4e91feb5999be9085ab0e8f94", "score": "0.58400834", "text": "public function setController(Controller $controller);", "title": "" }, { "docid": "d7e27ec5d03e84ea2631159e66ee4e5b", "score": "0.5837599", "text": "public function getController()\n {\n $dom = new DOMDocument;\n $dom->load(dirname(__FILE__).'/../apps/'.$this->app()->name().'/config/routes.xml');\n\n // Search the routes.xml file to find a route matching with the URL\n foreach ($dom->getElementsByTagName('route') as $route)\n {\n if (preg_match('`^'.$route->getAttribute('url').'$`', $this->app()->httpRequest()->requestURI(), $matches)) \n {\n $module = $route->getAttribute('module');\n $action = $route->getAttribute('action');\n \n $classname = ucfirst($module).'Controller';\n $file = dirname(__FILE__).'/../apps/'.$this->app()->name().'/modules/'.$module.'/'.$classname.'.class.php';\n \n if (!file_exists($file))\n throw new RuntimeException('The module used by the route \"' . $route->getAttribute('url') . '\" does not exist');\n \n require $file;\n\n $controller = new $classname($this->app(), $module, $action);\n\n if ($route->hasAttribute('vars'))\n {\n $vars = explode(',', $route->getAttribute('vars'));\n \n foreach ($matches as $key => $match)\n {\n if ($key !== 0)\n $this->app()->httpRequest()->addGetVar($vars[$key - 1], $match);\n }\n }\n \n break;\n }\n }\n if (!isset($controller))\n $this->app()->httpResponse()->redirect404();\n return $controller;\n }", "title": "" }, { "docid": "6466e04207610ca1765905e139c3682d", "score": "0.5837279", "text": "public function getControllerInstance()\n {\n return new BloggersController($this->entityManager, $this->doctrine);\n }", "title": "" }, { "docid": "388654da5e3be7df86b6233839952240", "score": "0.582698", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = json_decode(PermissionSetUserGroupService::worker($this->args, $this->clientService), true);\n \n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Set a permission profile to a group of users\",\n \"Set a permission profile to a group of users\",\n \"The permission profile has been set!<br/>\n Permission profile id: {$results['groups'][0]['permissionProfileId']}<br/>\n Group id: {$results['groups'][0]['groupId']}\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "316cc69dd98c7efc2537188ddc7730a6", "score": "0.5824567", "text": "public function testMakeController()\n {\n $code = $this->artisan('lpackager:controller', [\n 'class' => 'GoboController',\n 'package' => 'Tobo',\n 'path' => 'Kernel/Tobo',\n 'namespace' => \"Kernel\\Tobo\",\n ]);\n\n $this->assertEquals(0, $code);\n }", "title": "" }, { "docid": "e51f285a86ddbda521abf8565cb9dfce", "score": "0.582353", "text": "protected function run(){\n $programRoute = $this->findProgramRoute();\n $parts = explode('/', $programRoute);\n $controller = \"controllers\\\\\" . ucfirst(array_shift($parts) . \"Controller\");\n $action = lcfirst(array_shift($parts));\n $params = $parts;\n $this->createController($controller,$action,$params);\n }", "title": "" }, { "docid": "938c043ecf58d3ef78f56c8b729dcb65", "score": "0.58222675", "text": "public function setUp()\n {\n $this->class_object = $this->newController('Website_Controller');\n }", "title": "" }, { "docid": "4be837d7e50c8642a0e2e285d9ea04fe", "score": "0.58186156", "text": "public static function controller($name)\n {\n static::make(\n \"ControllerTemplate\",\n (new Convert($name . \"Controller\"))->toPascal(),\n \"Controllers\",\n [\n \"templateview\" => (new Convert($name))->toKebab(),\n ]\n );\n }", "title": "" }, { "docid": "5f7f79b6433cbf038e2ad7a925580444", "score": "0.5818051", "text": "private function getMockController() {\n \t$controller = $this->generate('Locations');\n \t$controller->constructClasses();\n \t$controller->Components->init($controller);\n \treturn $controller;\n }", "title": "" }, { "docid": "6b88b919f0d1d70ab9e0a1faf806eacc", "score": "0.58156353", "text": "public function getDefaultController()\n\t{\n\t\t$class_name = $this->getDefaultControllerName();\n\t\treturn new $class_name($this->getRequest(), $this->getResponse());\n\t}", "title": "" }, { "docid": "ef09b25682a9f1867aa178915b4fd85f", "score": "0.5811402", "text": "protected function _initController()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$response = $this->getResponse();\n\t\tif(isset($this->modes[$request->getModeName()]) && isset($this->modes[$request->getModeName()]['controller']))\n\t\t{\n\t\t\t$class_name = $this->modes[$request->getModeName()]['controller'];\n\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['path']);\n\n\t\t\tif($class_path)\n\t\t\t{\n\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t}\n\t\t\tif($class_name && class_exists($class_name))//NOTE: autoload in the play\n\t\t\t{\n\t\t\t\t$this->_current_controller = new $class_name($request, $response);\n\t\t\t\t//give access to current request object, user defined init\n\t\t\t\t$this->_current_controller->setRequest($this->getRequest())->init();\n\t\t\t}\n\t\t\t// Known controller (found in e_admin_dispatcher::$modes), class not found exception\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO - admin log\n\t\t\t\t// get default controller\n\t\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t\t// add messages\n\t\t\t\te107::getMessage()->add('Can\\'t find class <strong>&quot;'.($class_name ? $class_name : 'n/a').'&quot;</strong> for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t\t//\n\t\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t\t}\n\n\t\t\tif(vartrue($this->modes[$request->getModeName()]['ui']))\n\t\t\t{\n\t\t\t\t$class_name = $this->modes[$request->getModeName()]['ui'];\n\t\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['uipath']);\n\t\t\t\tif($class_path)\n\t\t\t\t{\n\t\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t\t}\n\t\t\t\tif(class_exists($class_name))//NOTE: autoload in the play\n\t\t\t\t{\n\t\t\t\t\t$this->_current_controller->setParam('ui', new $class_name($this->_current_controller));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_current_controller->setParam('modes', $this->modes);\n\n\t\t}\n\t\t// Not known controller (not found in e_admin_dispatcher::$modes) exception\n\t\telse\n\t\t{\n\t\t\t// TODO - admin log\n\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t// add messages\n\t\t\te107::getMessage()->add('Can\\'t find class for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t// go to not found page\n\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "36f10fe19ad1967c6d91d05e14a3e9ca", "score": "0.580944", "text": "public function __construct() {\n if(!empty(App::post('uid'))) {\n App::setUID(App::post('uid'));\n }\n if(!empty(App::get('lang')) || !empty(App::post('lang'))) {\n Translator::setLanguage(App::get('lang') ?? App::post('lang'));\n }\n if(!empty(App::get('r'))) {\n $url = \"/\".App::get('r');\n } else { // Pretty URL\n $uri = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'].'?','?'));\n $url = str_replace($_SERVER['BASE'], '', $uri);\n }\n // Uppercase char with prefix _\n $url = str_replace(\" \",\"\",ucwords(str_replace(\"_\", \" \", $url)));\n $controllerName = ucfirst(substr($url,1,strpos($url.\"/\",\"/\",1)-1));\n if (!empty($controllerName)) {\n $controllerNameLength = strlen($controllerName)+2;\n $actionName = 'action' . ucfirst(substr($url,$controllerNameLength,strpos($url.\"/\",\"/\",$controllerNameLength)-1));\n $actionName = ($actionName!='action') ? $actionName : 'index';\n } else {\n $controllerName=ucfirst(App::params('defaultController'));\n $actionName='index';\n }\n $controllerName = 'app\\\\controllers\\\\' . $controllerName . 'Controller';\n \n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n if (@method_exists($controller,$actionName)) {\n $controller->$actionName();\n } elseif (@method_exists($controller,'index')) {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no action $actionName\");\n $controller->index();\n } else {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no Index action\");\n }\n } else {\n http_response_code(404);\n if (file_exists(self::$error404Page)) {\n include self::$error404Page;\n }\n die();\n }\n }", "title": "" }, { "docid": "bcaa36de43243b111f5dfd296978cbdf", "score": "0.5808198", "text": "public function __construct()\n {\n $this->model = str_replace('Controller', '', (new ReflectionClass(get_class($this)))->getShortName());\n }", "title": "" }, { "docid": "2f45aa4b0488f5dc936f0a345b22e012", "score": "0.5802636", "text": "function factory($type, $router = null) {\n\t\t$factory = ControllerFactory::get_instance();\n\n\t\treturn $factory->factory($type, $router);\n\t}", "title": "" }, { "docid": "6cd876307619929a796e0ed5d9b4eca1", "score": "0.58016664", "text": "protected function createErrorController() {\n\t\trequire_once PATH_CONTROLLERS_DIR.'error.php';\n\t\treturn new Error();\n\t}", "title": "" }, { "docid": "ccd44d7229847bd580813da88f4172a4", "score": "0.5789172", "text": "public function create()\n {\n // NOT USED\n }", "title": "" }, { "docid": "930be58cde198b15fd1f9a45b4192794", "score": "0.5788672", "text": "protected function _loadController() {\n\t\t\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__d('cake_console', 'Controller not found'));\n\t\t}\n\n\t\t$plugin = null;\n\t\tif ($this->plugin) {\n\t\t\t$plugin = $this->plugin . '.';\n\t\t}\n\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\tApp::uses($controllerClassName, $plugin . 'Controller');\n\t\tif (!class_exists($controllerClassName)) {\n\t\t\t$file = $controllerClassName . '.php';\n\t\t\t$this->err(__d('cake_console', \"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", $file));\n\t\t\treturn $this->_stop();\n\t\t}\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->plugin = $this->plugin;\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj = $controllerObj->{$controllerObj->modelClass};\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$schema = $modelObj->schema(true);\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->_associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = $displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$fields = $schema = $associations = array();\n\t\t}\n\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t$pluralHumanName = $this->_pluralHumanName($this->controllerName);\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields', 'associations', 'modelObj');\n\t}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "92172974cac87df19bb67ea3d4350f7d", "score": "0.577289", "text": "public function getController()\n\t{\n\t\t$name = $this->Module ? $this->Module : 'Controller_Frontend';\n\t\t$class = new $name();\n\t\t$class->setContentPage( $this );\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "608fab0113e466fc64c06feb8bc94c59", "score": "0.57523835", "text": "private function define_object()\r\n\t\t{\r\n\t\t\t$class_name = ucwords(self::$controller) . self::controller_posfix;\r\n\t\t\trequire AURA_APP . DS . self::$app . DS . 'controllers' . DS . $class_name . '.php';\r\n\t\t\t\r\n\t\t\t$this->object = new $class_name;\r\n\t\t}", "title": "" }, { "docid": "33d5cde53049ec73827be08d3837ab8c", "score": "0.5750729", "text": "private function _createControllerClass($controllerpath, $element){\r\n \r\n $controller = $this->file->get($this->mouldpath .DS. 'controller.mould');\r\n \r\n $controllernamespace = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Controllers';\r\n $controllerclass = ucfirst($element).'Controller';\r\n \r\n $ctrl = str_replace('{{{ctrl_namespace}}}', $controllernamespace, $controller);\r\n $ctrldata = str_replace('{{{ctrl_classname}}}', $controllerclass, $ctrl);\r\n \r\n //use model\r\n $modelclass = ucfirst($element).'Model';\r\n $usemodel = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Models\\\\'.$modelclass;\r\n \r\n \r\n //add the model packages\r\n $ctrldata = str_replace('{{{full_model_name}}}', $usemodel, $ctrldata);\r\n $ctrldata = str_replace('{{{model_class_name}}}', $modelclass, $ctrldata);\r\n \r\n //use view\r\n $viewclass = ucfirst($element).'View';\r\n $useview = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Views\\\\'.$viewclass;\r\n \r\n //add the view\r\n $ctrldata = str_replace('{{{full_view_name}}}', $useview, $ctrldata);\r\n $ctrldata = str_replace('{{{view_class_name}}}', $viewclass, $ctrldata);\r\n \r\n return $this->file->put($controllerpath .DS. $controllerclass.'.php', $ctrldata);\r\n }", "title": "" }, { "docid": "ab9c79723d50f2af14860db38ca5b0bd", "score": "0.57440096", "text": "public function getController()\n\t{\n\t\tif (! $this->controller) {\n\t\t\t$class = $this->parseControllerCallback()[0];\n\n\t\t\t$this->controller = app()->make(ltrim($class, '\\\\'));\n\t\t}\n\n\t\treturn $this->controller;\n\t}", "title": "" }, { "docid": "e2955efb416fa33e467c8735896dd15a", "score": "0.5741264", "text": "private function createTestForController($args=array())\r\n {\r\n // if there is a value of controller and create for the argument values,\r\n // then a test file will be created when that controller is created.\r\n if($args['class']==\"controller\" && $args['classMethod']==\"create\" && isset($args['controller'])){\r\n\r\n // The symfony process will be executed as an application method.\r\n $this->app->command('test create','controller:'.strtolower($args['controller']).'');\r\n }\r\n }", "title": "" }, { "docid": "12971e39125096f43b32931cd0c9fd28", "score": "0.5737575", "text": "public function create() {\n\t\t// Not needed currently\n\t}", "title": "" }, { "docid": "219809912c88210d9b5fa627691d8f22", "score": "0.572778", "text": "function &get_instance()\n{\n return Controller::getInstance();\n}", "title": "" }, { "docid": "ab075d4427a33f1e9765dd429fb21b9b", "score": "0.5721565", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game(2);\n $this->assertInstanceOf(\"\\Mos\\Dice\\Game\", $controller);\n }", "title": "" }, { "docid": "d3f00b09b523e6aaf178e141c83cb011", "score": "0.57075703", "text": "public function run()\n {\n if (!isset($_SERVER['REQUEST_URI'])) {\n throw new \\Exception('Server Request URI not found');\n }\n // Check for namespace configurations\n if (!isset($this->Di->Config->configurations['namespaces']['controllers'])) {\n throw new \\Exception('Controllers namespaces not defined in configurations');\n }\n // Set some local variables\n $uriParts = parse_url($_SERVER['REQUEST_URI']);\n $uri = $uriParts['path'];\n $route = $this->Di->router->getRoute($uri);\n $libraryNamespace = $this->Di->Config->configurations['namespaces']['library'];\n $controllersNamespace = $this->Di->Config->configurations['namespaces']['controllers'];\n $controllerClassName = ucwords($route['controller']) . 'Controller';\n $controllerClass = $controllersNamespace . '\\\\' . $controllerClassName;\n // Check if controller class exists\n if (!class_exists($controllerClass)) {\n throw new \\Exception('Controller not found: ' . $controllerClassName);\n }\n // Instantiate our target controller class\n /* @var BaseController $Controller */\n $Controller = new $controllerClass();\n // Make sure our controller extends base controller\n if (!is_a($Controller, $libraryNamespace . '\\\\BaseController')) {\n throw new \\Exception('Controller ('.$controllerClassName.') does not extends BaseController.');\n }\n // Inject DI into controller\n $Controller->setDi($this->Di);\n // Finally execute magic method to start controller\n $magicMethodName = 'execute____' . ucwords($route['action']);\n $Controller->$magicMethodName();\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5704155", "text": "public function create();", "title": "" } ]
68e07b4a3167b6f8f283603a45d4d03f
Carga vista con formulario definido en clase UserType Configura datos de formulario en objeto User de la session Comprueba datos de email y nick antes de guardar datos Guarda imagen y configura dato de imagen Usa session para poder mostrar mensajes en el proceso de registro.
[ { "docid": "d0d7edec0436ba92a2b9b7553c0af297", "score": "0.64371574", "text": "public function editUserAction(Request $request)\n {\n $user = $this->getUser(); //carga los datos de usuario logueado\n $user_image = $user->getImage(); // imagen antigua\n $form = $this->createForm(UserType::class, $user);\n\n // configura datos de envio del formulario en objeto user\n $form->handleRequest($request);\n // procesado de envio de form de registro\n if ($form->isSubmitted()) {\n if ($form->isValid()) {\n\n $em = $this->getDoctrine()->getManager();\n\n $query = $em->createQuery('SELECT u FROM BackendBundle:User u WHERE u.email = :email OR u.nick = :nick')\n ->setParameter('email', $form->get(\"email\")->getData())\n ->setParameter('nick', $form->get(\"nick\")->getData());\n\n $user_isset = $query->getResult();\n\n // si los datos nuevos (email o nick) del form de edicion de perfil\n // en la base de datos no hay otro email ni nick igual\n // o si los datos de session (email y nick) son iguales a los que hay en (BD y datos form)\n if (count($user_isset) == 0 || ($user->getEmail() == $user_isset[0]->getEmail() && $user->getNick() == $user_isset[0]->getNick())) {\n\n // upload file\n $file = $form[\"image\"]->getData();\n\n if (!empty($file) && $file != null) {\n $ext = $file->guessExtension(); // obtencion de extension\n if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'gif') {\n $file_name = $user->getId().'_imgprofile_'.time().'.'.$ext;\n $user_media_route = 'uploads/media/'.$user->getId().'_usermedia';\n $file->move($user_media_route, $file_name);\n\n $user->setImage($file_name);\n }\n } else {\n $user->setImage($user_image);\n }\n\n $em->persist($user);\n $flush = $em->flush();//guardar en BD\n\n if ($flush == null) {\n $status = \"Has modificado tus datos correctamente\";\n } else {\n $status = \"No se han podido modificar tus datos correctamente\";\n }\n\n } else {\n $status = \"Hay ya un usuario existente con el email o nick\";\n }\n\n } else {\n $status = \"No se han modificado tus datos correctamente\";\n }\n\n $this->session->getFlashBag()->add(\"status\", $status);\n return $this->redirect('my-data');\n }\n\n return $this->render('AppBundle:User:edit_user.html.twig', array(\n \"form\" => $form->createView()\n ));\n }", "title": "" } ]
[ { "docid": "a9dd0935bb3ea175e57d285100de78d2", "score": "0.6561517", "text": "public function store()\n\t{\n\t\t\t$user = new Usuario();\n\t\t\t$user->tipo = Input::get('tipo');\n\t\t\t$user->sexo = Input::get('sexo');\n\n\t\t\tif (Input::get('selectTratamientoM')!=''){\n\t\t\t\t$user->tratamiento = Input::get('selectTratamientoM');\n\t\t\t\tif ($user->tratamiento=='Otro'){\n\t\t\t\t\t$user->tratamiento = Input::get('txtTratamiento');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Input::get('selectTratamientoF')!=''){\n\t\t\t\t$user->tratamiento = Input::get('selectTratamientoF');\n\t\t\t\tif ($user->tratamiento=='Otro'){\n\t\t\t\t\t$user->tratamiento = Input::get('txtTratamiento');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Input::get('first_name')!=''){\n\t\t\t\t$user->nombre_primero = Input::get('first_name');\n\t\t\t}\n\n\t\t\tif(Input::get('middle_name')!=''){\n\t\t\t\t$user->nombres_sgtes = Input::get('middle_name');\n\t\t\t}\n\n\t\t\tif(Input::get('paternal_surname')!=''){\n\t\t\t\t$user->apellido_pat = Input::get('paternal_surname');\n\t\t\t}\n\n\t\t\tif(Input::get('maternal_surname')!=''){\n\t\t\t\t$user->apellido_mat = Input::get('maternal_surname');\n\t\t\t}\n\n\t\t\tif(Input::get('nickname')!=''){\n\t\t\t\t$user->apodo = Input::get('nickname');\n\t\t\t}\n\n\t\t\tif(Input::get('full_name')!=''){\n\t\t\t\t$user->nombre_completo = Input::get('full_name');\n\t\t\t}\n\n\t\t\tif(Input::get('dni')!=''){\n\t\t\t\t$user->dni = Input::get('dni');\n\t\t\t}\n\n\t\t\tif(Input::get('date_of_birth')!=''){\n\t\t\t\t$user->fecha_nac = Input::get('date_of_birth');\n\t\t\t}\n\n\t\t\tif(Input::get('date_of_birth')!=''){\n\t\t\t\t$user->organizacion_id = Input::get('organizacion');\n\t\t\t}\n\n\t\t\tif(Input::get('organizacion')!=0){\n\t\t\t\t$user->organizacion_id = Input::get('organizacion');\n\t\t\t}\n\n\t\t\tif(Input::get('area')!=0){\n\t\t\t\t$user->area_id = Input::get('area');\n\t\t\t}\t\t\t\n\n\t\t\tif (Input::get('selectLimiteCredito')!=''){\n\t\t\t\t$user->limite_credito = Input::get('selectLimiteCredito');\n\t\t\t\tif ($user->limite_credito=='Otro'){\n\t\t\t\t\t$user->limite_credito = Input::get('txtLimiteCredito');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Input::get('selectTiempoCredito')!=''){\n\t\t\t\t$user->tiempo_credito = Input::get('selectTiempoCredito');\n\t\t\t\tif ($user->tiempo_credito=='Otro'){\n\t\t\t\t\t$user->tiempo_credito = Input::get('txtTiempoCredito');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Input::get('position')!=''){\n\t\t\t\t$user->cargo = Input::get('position');\n\t\t\t}\n\n\t\t\tif(Input::get('salary')!=''){\n\t\t\t\t$user->salario = Input::get('salary');\n\t\t\t}\n\n\t\t\tif(Input::get('date_of_admission')!=''){\n\t\t\t\t$user->fecha_ingreso = Input::get('date_of_admission');\n\t\t\t}\n\n\t\t\tif(Input::get('address')!=''){\n\t\t\t\t$user->direccion = Input::get('address');\n\t\t\t}\n\n\t\t\tif(Input::get('telephone_number')!=''){\n\t\t\t\t$user->telefono = Input::get('telephone_number');\n\t\t\t}\n\n\t\t\tif(Input::get('cell_phone_1')!=''){\n\t\t\t\t$user->celular1 = Input::get('cell_phone_1');\n\t\t\t}\n\n\t\t\tif(Input::get('cell_phone_2')!=''){\n\t\t\t\t$user->celular2 = Input::get('cell_phone_2');\n\t\t\t}\n\n\t\t\tif(Input::get('email')!=''){\n\t\t\t\t$user->email = Input::get('email');\n\t\t\t}\n\n\t\t\tif(Input::get('username')!=''){\n\t\t\t\t$user->username = Input::get('username');\n\t\t\t}\n\n\t\t\tif(Input::get('password')!=''){\n\t\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t}\n\n\t\t\tif(Input::get('password_confirmation')!=''){\n\t\t\t\t$user->password_confirmation = Hash::make(Input::get('password_confirmation'));\n\t\t\t}\n\n\t\t\t$validator = Usuario::validate(array(\n\t\t\t 'nombre_primero' => Input::get('first_name'),\n\t\t\t 'nombres_sgtes' => Input::get('middle_name'),\n\t\t\t 'apellido_pat' => Input::get('paternal_surname'),\n\t\t\t 'apellido_mat' => Input::get('maternal_surname'),\n\t\t\t 'apodo' => Input::get('nickname'),\n\t\t\t 'nombre_completo' => Input::get('full_name'),\n\t\t\t 'dni' => Input::get('dni'),\n\t\t\t 'fecha_nac' => Input::get('date_of_birth'),\n\t\t\t 'cargo' => Input::get('position'),\n\t\t\t 'salario' => Input::get('salary'),\n\t\t\t 'fecha_ingreso' => Input::get('date_of_admission'),\n\t\t\t 'telefono' => Input::get('telephone_number'),\n\t\t\t 'celular1' => Input::get('cell_phone_1'),\n\t\t\t 'celular2' => Input::get('cell_phone_2'),\n\t\t 'email' => Input::get('email'),\n\t\t 'username' => Input::get('username'),\n\t\t 'password' => Input::get('password'),\n\t\t 'password_confirmation' => Input::get('password_confirmation')\n\t\t ));\n\n\t\t if($validator->fails()){\n\t\t $errors = $validator->messages()->all();\n\t\t $user->password = null;\n\t\t return Redirect::to('usuarios/create')->withErrors($validator)->withInput();\n\t\t /*return Redirect::to('usuarios/create')->with('user', $user)->with('errors', $errors);*/\n\t\t }else{\n\t\t $user->save();\n\t\t return Redirect::to('usuarios/create')->with('notice', 'El usuario ha sido creado correctamente.');\n\t\t }\n\t}", "title": "" }, { "docid": "11c0df8d36ec9e9e727ef116b8d9f89e", "score": "0.6374146", "text": "public function cambiarUser()\r\n {\r\n $password = encriptar(input(\"user1\"));\r\n $usu = $_SESSION['usuario'];\r\n $objOrm = new EtORM();\r\n $data = $objOrm->Ejecutar(\"sp_login_user\", array($usu, $password));\r\n\r\n if (count($data) > 0) {\r\n if (input('user2') == input('user3')) {\r\n $usuario = User::find($_SESSION['id']);\r\n $usuario->usuario = encriptar(input('user2'));\r\n $usuario->usuariod = input('user2');\r\n $usuario->guardar();\r\n redirecciona()->to(\"/usuario/perfil\")->withMessage(array(\r\n \"estado\" => \"false\",\r\n \"alert\" => \"success\",\r\n \"tipo\" => \"¡CORRECTO!\",\r\n \"mensaje\" => \"¡El nombre de usuario se cambió correctamente!\",\r\n ));\r\n } else {\r\n redirecciona()->to(\"/usuario/perfil\")->withMessage(array(\r\n \"estado\" => \"false\",\r\n \"alert\" => \"info\",\r\n \"tipo\" => \"¡ADVERTENCIA!\",\r\n \"mensaje\" => \"¡No coincide el nuevo nombre de usuario en ambas casillas!\",\r\n ));\r\n }\r\n } else {\r\n redirecciona()->to(\"/usuario/perfil\")->withMessage(array(\r\n \"estado\" => \"false\",\r\n \"alert\" => \"danger\",\r\n \"tipo\" => \"¡ERROR!\",\r\n \"mensaje\" => \"¡La contraseña no es la correcta!\",\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "38ecc95a11a746abc4a2d3e3ea29d1b9", "score": "0.63211304", "text": "public static function buscarRegistro( UserUser $userUser, $tipoLista ){\n\t\t$strEmail = $userUser->email;\n\n\t\t$conexion = new Conexion();\n\n\t\t$consulta = $conexion->prepare(\"SELECT A.id, A.email, A.confirmed, A.blacklisted, A.optedin, A.bouncecount, A.entered, A.modified, A.uniqid, A.uuid, A.htmlemail, A.subscribepage, A.disabled FROM phplist_user_user AS A INNER JOIN phplist_user_user_attribute AS B ON A.id = B.userid AND B.attributeid = 1 WHERE A.email = :email\");\n\n\t\t$consulta->bindParam( ':email', $strEmail, PDO::PARAM_STR );\n\n\t\t$consulta->execute();\n\n\t\t$registro = $consulta->fetch();\n\n\t\tif($registro){\n\t\t\t$userUser->id = $registro['id'];\n\t\t\t$userUser->email = $registro['email'];\n\t\t\t$userUser->confirmed = $registro['confirmed'];\n\t\t\t$userUser->blacklisted = $registro['blacklisted'];\n\t\t\t$userUser->optedin = $registro['optedin'];\n\t\t\t$userUser->bouncecount = $registro['bouncecount'];\n\t\t\t$userUser->entered = $registro['entered'];\n\t\t\t$userUser->modified = $registro['modified'];\n\t\t\t$userUser->uniqid = $registro['uniqid'];\n\t\t\t$userUser->uuid = $registro['uuid'];\n\t\t\t$userUser->htmlemail = $registro['htmlemail'];\n\t\t\t$userUser->subscribepage = $registro['subscribepage'];\n\t\t\t$userUser->disabled = $registro['disabled'];\n\n\t\t}else{\n\t\t\t$userUser->uuid = null;\n\t\t}\n\t\treturn $userUser;\n\t}", "title": "" }, { "docid": "2486147096497ab5ba2df2052b09d711", "score": "0.6290183", "text": "public function createAction()\n {\n $entity = new Profesor();\n $request = $this->getRequest();\n $es_ajax=false;\n if($request->isXmlHttpRequest()){\n $es_ajax=true;\n }\n $form = $this->createForm(new ProfesorType(), $entity);\n $form->handleRequest($request);\n \n if ($form->isValid()) { \n $em = $this->getDoctrine()->getEntityManager();\n $query = $em->createQuery('SELECT count(a) FROM NetpublicCoreBundle:Usuario a WHERE a.username LIKE :nombre')\n ->setParameters(array(\n \"nombre\"=>$entity->getNombre().'%' \n \n )\n );\n $count = $query->getSingleScalarResult();\n\t\t\t$nombre=$entity->getNombre();\n\t\t\tif($count>0){\n\t\t\t\t$nombre=$entity->getNombre().$count;\n\t\t\t}\n\t\t\t\n $usuario=new Usuario(); \n //$primer_nombre=explode(\" \",);\n $usuario->setUsername($nombre);\n $usuario->setSalt(md5(time()));\n $encoder = new MessageDigestPasswordEncoder('sha512', true, 10);\n $password = $encoder->encodePassword($entity->getCedula(), $usuario->getSalt());\n $usuario->setPassword($password);\n $usuario->setEsAlumno(FALSE);\n $usuario->setProfesor($entity);\n $entity->setUsuario($usuario); \n if($entity->getTipo()==1){\n //Rector\n $mi_rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->find(3);\n }\n if($entity->getTipo()==3){\n //Secretaria Auxiliar\n $mi_rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->find(4);\n }\n if($entity->getTipo()==2){ \n //Profesor\n \n \n $mi_rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->find(2);\n }\n if($entity->getTipo()==4){\n //Coordinador Academico\n $mi_rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->find(3);\n }\n if($entity->getTipo()==5){\n //Coordinador De Convivencia\n $mi_rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->find(3);\n }\n $usuario->addRol($mi_rol); \n $em->persist($usuario); \n $em->persist($entity); \n $em->flush();\n $file=$form['foto_academica']->getData();\n if($file){\n $nombre_archivo= 'profesor'.$entity->getId(); \n //$file->move(__DIR__.'/../../../../web/'.'uploads/documents',$nombre_archivo);\n $imagine = new \\Imagine\\Gd\\Imagine();\n $image = $imagine->open($file);\n $thumbnail_mini = $image->thumbnail(new Box(50, 50));\n $thumbnail_mini->save(__DIR__.'/../../../../../web/'.'uploads/documents/mini'.$nombre_archivo.'.jpg');\n $thumbnail_strong = $image->thumbnail(new Box(135, 300));\n $thumbnail_strong->save(__DIR__.'/../../../../../web/'.'uploads/documents/strong'.$nombre_archivo.'.jpg');\n $usuario->setEsFotoperfil(TRUE);\n \n }\n $file1=$form['foto_firma']->getData();\n if($file1){\n $nombre_archivo= 'firma_profe'.$entity->getId().'.'.$file1->guessExtension(); \n $file1->move(__DIR__.'/../../../../../web/'.'uploads/documents',$nombre_archivo);\n }\n $em->persist($mi_rol); \n if($entity->getTipo()==2){\n \n $ano_escolar_activo= $this->getDoctrine()\n ->getRepository(\"NetpublicCoreBundle:Dimension\")\n ->findAnoEscolarActivo();\n \n $perios_escolares=$this->getDoctrine()\n ->getRepository(\"NetpublicCoreBundle:Dimension\")\n ->findPeriodosEscolar($ano_escolar_activo);\n foreach ($perios_escolares as $p_e) { \n\n $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Profesor\")\n ->generarFechasEntregasProfesor($entity,$p_e);\n\n } \n } \n $em->flush();\n if ($this->container->get('request')->isXmlHttpRequest()){\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n }\n return $this->redirect($this->generateUrl('profesor_show', array('id' => $entity->getId())));\n \n }\n \n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'es_ajax' =>$es_ajax\n );\n }", "title": "" }, { "docid": "d873927a4168ef276be732ab6a3b86e6", "score": "0.62595904", "text": "public function set_user($valor){\n\n\t\t///Expresión regular para validad estructura nombre\n $er = new Er();\n if ( !$er->valida_nombre($valor) ){\n $this->errores[] = \"Usuario \".$valor.\" NO valido \";\n }\n\n $rs = $this->consulta_sql(\"select * from USUARIO where user = '$valor'\");\n $rows = $rs->GetArray();\n \n if(count($rows) > 0){\n $this->errores[] = \"Este usuario (\".$valor.\") ya esta registrado\"; \n }else{\n $this->usuario = trim($valor);\n }\n }", "title": "" }, { "docid": "a48195b4ccbb167e41ace3b0b148d97e", "score": "0.62259054", "text": "public function singin()\n\t{\n\t\t//se crea el objeto usuario\n\t\t$usuario = new Ususrio();\n\t\t//se accede a cada atributo de la clase y se le asigna el valor del formulario\n\t\t$usuario->nombre = $_POST['nombre'];\n\t\t$usuario->apellidoPaterno = $_POST['app'];\n\t\t$usuario->apellidoMaterno = $_POST['apm'];\n\t\t$usuario->usuario = $_POST['usuario'];\n\t\t$usuario->correo = $_POST['correo'];\n\t\t$usuario->contrasennia = $_POST['password'];\n\t\t$usuario->fotoPerfil = $_POST['foto'];\n\t\t$usuario->create();\n\t}", "title": "" }, { "docid": "c0d8218a788126d345dd7dd4bd6036a5", "score": "0.6211435", "text": "public function newAction(Request $request)\n {\n set_time_limit(300);\n $session = $request->getSession(); //obtengo la session\n if ($session->get('login') == true)://verifico si el usuario esta logueado\n $usuario = new Usuario();\n\n\n $form = $this->createForm('VerantBundle\\Form\\UsuarioEmpresaType', $usuario);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n\n //formateo de rut\n $rutF = $this->formatoRut($form->get('rut')->getData()); //tomo el rut y lo envío a la funcion formatoRut, la cual me devuelve el rut sin puntos y separado del dv\n $rut = $rutF['rut'];\n $dv = $rutF['dv'];\n\n //Encriptacion de password\n $password = md5($form->get('password')->getData()); //obtengo el dato\n //\n $region = $form->get('region')->getData();\n $ciudad = $form->get('ciudad')->getData();\n $comuna = $form->get('comuna')->getData();\n \n \n $usuario->setRegion($region);\n $usuario->setCiudad($ciudad);\n $usuario->setComuna($comuna);\n //\n //setteo de variables\n $usuario->setPassword($password); //setteo el password\n $usuario->setRut($rut);\n $usuario->setDv($dv);\n\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($usuario);\n $em->flush();\n\n return $this->redirectToRoute('usuario_empresa_index', array('id' => $usuario->getId()));\n }\n\n return $this->render('usuarioempresa/new.html.twig', array(\n 'usuario' => $usuario,\n 'form' => $form->createView(),\n ));\n else://si no está logueado lo reenvío a loguearse\n $this->get('session')->getFlashBag()->add(\"mensaje\", \"Debe Loguearse\"); //mensaje para loguearse\n return $this->redirectToRoute('web_verant_login'); //redireccion\n endif;\n }", "title": "" }, { "docid": "4357efe3e32b37fb00e7cf8bce51f625", "score": "0.6149134", "text": "function altaUsuario($con){\n\n $id = isset($_POST['Usuario']) ? $_POST['Usuario'] : null;\n $pass = isset($_POST['Contraseña']) ? $_POST['Contraseña'] : null;\n $nome = isset($_POST['Nombre']) ? $_POST['Nombre'] : null;\n $ape1 = isset($_POST['Primer_Apellido']) ? $_POST['Primer_Apellido'] : null;\n $ape2 = isset($_POST['Segundo_Apellido']) ? $_POST['Segundo_Apellido'] : null;\n $tlf = isset($_POST['Telefono']) ? $_POST['Telefono'] : null;\n $tipo = isset($_POST['tipo']) ? $_POST['tipo'] : null;\n\n $usuario = new Usuario($id,$pass,$tipo,$nome,$ape1,$ape2,$tlf);\n $usuario->darAlta($con);\n\n}", "title": "" }, { "docid": "e05c21759e4731fd36dbf93499467d3b", "score": "0.61326116", "text": "public function __construct() {\n //llamamos al modelo usuario(clase) e instanciamos un objeto de esa clase\n //$this->usuarioModelo = $this->modelo('Usuario');\n \n \n }", "title": "" }, { "docid": "af857ca34c3560b7353f6bb0259d613d", "score": "0.61310977", "text": "public function store(UsuarioCreateRequest $request) //usamos el request personalizado para su uso en el formulario\n {\n User::create([ //creamos una nueva instancia de usuario\n 'id' => $request['id'],\n 'nombres' => $request['nombres'],\n 'apellidos' => $request['apellidos'], //se ingresan los datos uno por uno esto es porque el formulario posee mas elementos que no se involucran con el modelo\n 'telefono' => $request['telefono'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['password']), //indicamos que uso el algoritmo bcrypt para encriptar la contraseña\n 'municipio_id' => $request{'municipio_id'}\n ]\n );\n\n return response()->json([\n 'mensaje' => 'Usuario Agregado' //se retorna un json indicando que se ha realizado la transaccion se ha realizado\n ]);\n }\n\n /**\n * Display the specified resource.\n *\n * @param int $id\n * @return \\Illuminate\\Http\\Response\n */\n public function show($id)\n {\n //\n }\n\n /**\n * Show the form for editing the specified resource.\n *\n * @param int $id\n * @return \\Illuminate\\Http\\Response\n */\n public function edit($id)\n {\n $pais = pais::lists('nombre', 'id'); //generamos una lista de paises la cual sea usada en un select para su uso\n $user = User::find($id); //usamos la funcion find para encontrar un usuario en especifico usando el id\n return view('usuarios.edit', ['user' => $user, 'pais' => $pais]); //retornamos la vista de edicion de usuarios, enviando los datos de usuario y la lista de paises\n }\n\n /**\n * Update the specified resource in storage.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param int $id\n * @return \\Illuminate\\Http\\Response\n */\n public function update(UsuarioUpdateRequest $request, $id) //usamos el request personalizado para su uso en el formulario\n {\n $user = User::find($id);//usamos la funcion find para encontrar un usuario en especifico usando el id\n //$user->id = $request->get('iden');\n $user->nombres = $request->get('nombres');\n $user->apellidos = $request->get('apellidos');\n $user->telefono = $request->get('telefono');\n $user->email = $request->get('email');\n if($request->has('password')){\n $user->password = bcrypt($request->get('password'));\n }", "title": "" }, { "docid": "4f0fa9f487182ecf4dc88911cd83c72f", "score": "0.6124038", "text": "protected function getOroUser_Form_UserService()\n {\n return $this->services['oro_user.form.user'] = $this->get('form.factory')->createNamed('oro_user_user_form', 'oro_user_user', NULL);\n }", "title": "" }, { "docid": "41825c0ded669819630d540f79f54173", "score": "0.6070927", "text": "public function registerAction(Request $request)\n {\n // si el usuario esta logueado se redirecciona a /home\n if (is_object($this->getUser())) {\n return $this->redirect('home');\n }\n\n $user = new User();\n $form = $this->createForm(RegisterType::class, $user);\n\n // configura datos de envio del formulario en objeto user\n $form->handleRequest($request);\n // procesado de envio de form de registro\n if ($form->isSubmitted()) {\n if ($form->isValid()) {\n\n $em = $this->getDoctrine()->getManager();\n // $user_repo = $em->getRepository(\"BackendBundle:User\");\n\n $query = $em->createQuery('SELECT u FROM BackendBundle:User u WHERE u.email = :email OR u.nick = :nick')\n ->setParameter('email', $form->get(\"email\")->getData())\n ->setParameter('nick', $form->get(\"nick\")->getData());\n\n $user_isset = $query->getResult();\n\n if (count($user_isset) == 0) {\n\n // codificacion de password\n $factory = $this->get(\"security.encoder_factory\");\n $encoder = $factory->getEncoder($user);\n $password = $encoder->encodePassword($form->get(\"password\")->getData(), $user->getSalt());\n\n // configurar datos restantes del objeto User\n $user->setPassword($password);\n $user->setRole(\"ROLE_USER\");\n $user->setImage(null);\n\n $em->persist($user);\n $flush = $em->flush();//guardar en BD\n\n if ($flush == null) {\n $status = \"Te has registrado correctamente\";\n\n $this->session->getFlashBag()->add(\"status\", $status);\n return $this->redirect(\"login\");\n } else {\n $status = \"Error al registrar\";\n }\n\n } else {\n $status = \"El usuario ya existe !!\";\n }\n\n } else {\n $status = \"No te has registrado correctamente !!\";\n }\n\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n\n // crea vista con formulario\n return $this->render('AppBundle:User:register.html.twig', array(\n \"form\" => $form->createView()\n ));\n }", "title": "" }, { "docid": "65896eec043804ed8afbc87a621d6abd", "score": "0.6035906", "text": "function createUser()\n\t{\n\t\t// $this->f3->clear('SESSION');\n\t\t// Render template\n\t\tif (\n\t\t\t$this->f3->get('POST.password') == '' && $this->f3->get('POST.password2') == ''\n\t\t\t&& $this->f3->get('POST.username') == '' && $this->f3->get('POST.email') == ''\n\t\t\t&& $this->f3->get('POST.names') == ''\n\t\t) {\n\t\t\t$this->f3->set('message', 'Debe rellenar todo el formulario');\n\t\t} elseif ($this->f3->get('POST.password') != $this->f3->get('POST.password2')) {\n\t\t\t$this->f3->set('message', 'Las contraseñas no coinciden');\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$user = new User($this->f3->DB);\n\t\t\t\t$password = password_hash($this->f3->get('POST.password'), PASSWORD_DEFAULT); //input \n\t\t\t\t$user->username = $this->f3->get('POST.username');\n\t\t\t\t$user->name = $this->f3->get('POST.names');\n\t\t\t\t$user->email = $this->f3->get('POST.email');\n\t\t\t\t$user->password = $password;\n\t\t\t\t$user->save();\n\t\t\t\t$this->f3->set('SESSION.user', $user->cast());\n\t\t\t\t$this->f3->reroute('/');\n\t\t\t} catch(PDOException $e) {\n\t\t\t\t$err=$e->errorInfo;\n\t\t\t\t// $this->f3->set('message', $err[2]);\n\t\t\t\t $this->f3->set('message', 'El email o usuario ya esta en uso ');\n\t\t\t}\n\t\t\n\t\t}\n\t\t$this->register();\n\t}", "title": "" }, { "docid": "9c8ec6b86ec6892f66c69b0c53a8e4c1", "score": "0.60334164", "text": "public static function crearUsuario($datos){\n //hasheo de contraseña\n $contraHash = password_hash($datos[\"pass\"], PASSWORD_DEFAULT);\n $datos[\"avatar\"] = \"perfilDesconocido.png\";\n //crea una instancia de la clase usuario con los datos recibidos por $_POST. El avatar, perfil y val_user se pasan como un para luego ser cargados de forma independiente\n $usuario = new Usuario($datos[\"nombre\"], $datos[\"apellido\"], $datos[\"email\"], $contraHash, $datos[\"fecha\"], $datos[\"sexo\"], $datos[\"avatar\"], null, null, null, null, null);\n //retorna la instancia de la clase usuario\n return $usuario;\n }", "title": "" }, { "docid": "a1aa0e1b57aac8e895b79973f5943e68", "score": "0.6032387", "text": "public function Usuarios_Add2($tipo=false){\n \n $this->_Visual->Json_Info_Update('Titulo','Usuários');\n \n if(isset($_POST['email'])){\n $email = \\anti_injection($_POST['email']);\n }else{\n $email = '';\n }\n if(isset($_POST['login'])){\n $login = \\anti_injection($_POST['login']);\n }else{\n $login = '';\n }\n $existeemail = usuario_Modelo::VerificaExtEmail($this->_Modelo,$email);\n $existelogin = usuario_Modelo::VerificaExtLogin($this->_Modelo,$login);\n if(\\Framework\\App\\Sistema_Funcoes::Control_Layoult_Valida_Email($email)===false && $tipo!='cliente' && \\Framework\\App\\Acl::Sistema_Modulos_Configs_Funcional('usuario_Admin_EmailUnico')){\n $mensagens = array(\n \"tipo\" => 'erro',\n \"mgs_principal\" => __('Erro'),\n \"mgs_secundaria\" => __('Email Inválido')\n );\n $this->_Visual->Json_IncluiTipo('Mensagens',$mensagens); \n $this->layoult_zerar = false;\n $this->_Visual->Javascript_Executar('$(\"#email\").css(\\'border\\', \\'2px solid #FFAEB0\\').focus();');\n }else if($existeemail===true && ($tipo!=='cliente' || $email!='') && \\Framework\\App\\Acl::Sistema_Modulos_Configs_Funcional('usuario_Admin_EmailUnico')){\n $mensagens = array(\n \"tipo\" => 'erro',\n \"mgs_principal\" => __('Erro'),\n \"mgs_secundaria\" => __('Email Ja Existe')\n );\n $this->_Visual->Json_IncluiTipo('Mensagens',$mensagens);\n $this->layoult_zerar = false; \n $this->_Visual->Javascript_Executar('$(\"#email\").css(\\'border\\', \\'2px solid #FFAEB0\\').focus();');\n }else if($existelogin===true && $tipo!=='cliente'){\n $mensagens = array(\n \"tipo\" => 'erro',\n \"mgs_principal\" => __('Erro'),\n \"mgs_secundaria\" => __('Login ja existe')\n );\n $this->_Visual->Json_IncluiTipo('Mensagens',$mensagens); \n $this->layoult_zerar = false;\n $this->_Visual->Javascript_Executar('$(\"#login\").css(\\'border\\', \\'2px solid #FFAEB0\\').focus();');\n }else{\n $tipousuario = \\anti_injection($tipo);\n\n // atualiza todos os valores por get, retirando o nivel admin\n //self::mysql_AtualizaValores($usuario);\n\n \n\n // Cria novo Usuario\n $usuario = new Usuario_DAO;\n self::mysql_AtualizaValores($usuario);\n \n // confere senha\n if(isset($_POST['senha'])){\n if($_POST['senha']==''){\n $mensagens = array(\n \"tipo\" => 'erro',\n \"mgs_principal\" => __('Erro'),\n \"mgs_secundaria\" => __('Senha Inválida')\n );\n $this->_Visual->Json_IncluiTipo('Mensagens',$mensagens);\n $this->layoult_zerar = false;\n return;\n }\n }\n\n // captura indicado;\n if(!isset($_COOKIE['indicativo_id'])) $_COOKIE['indicativo_id'] = 0;\n self::mysql_AtualizaValor($usuario,'indicado_por', $_COOKIE['indicativo_id']);\n\n // Atualiza\n // Recarrega ListarUsuario\n if($tipo===false AND !(\\Framework\\App\\Sistema_Funcoes::Perm_Modulos('usuario_mensagem'))){\n $sucesso = $this->_Modelo->db->Sql_Inserir($usuario);\n $executar = 'ListarUsuario';\n }else if(\\Framework\\App\\Sistema_Funcoes::Perm_Modulos('usuario_mensagem')){\n $sucesso = $this->_Modelo->db->Sql_Inserir($usuario);\n if($sucesso){$identificador = $this->_Modelo->db->Sql_Select('Usuario', Array(),1,'id DESC');\n $identificador = $identificador->id;\n usuario_mensagem_Controle::Mensagem_formulario_Static($identificador);}\n $executar = false;\n //\\Framework\\App\\Sistema_Funcoes::Redirect(URL_PATH.'usuario_mensagem/Suporte/Mensagem_formulario');\n }else if($tipo==='cliente'){\n if(!isset($_GET['grupo'])){\n $usuario->grupo = CFG_TEC_IDCLIENTE;\n }\n $sucesso = $this->_Modelo->db->Sql_Inserir($usuario);\n $executar = 'ListarCliente';\n }else if($tipo==='funcionario'){\n if(!isset($_GET['grupo'])){\n $usuario->grupo = CFG_TEC_IDFUNCIONARIO;\n }\n $sucesso = $this->_Modelo->db->Sql_Inserir($usuario);\n $executar = 'ListarFuncionario';\n }else{\n if(!isset($_GET['grupo'])){\n $usuario->grupo = CFG_TEC_IDADMIN;\n }\n $sucesso = $this->_Modelo->db->Sql_Inserir($usuario);\n $executar = 'ListarUsuario';\n }\n // Caso seja Inserido mostra Mensagem\n if($sucesso===true){\n $mensagens = array(\n \"tipo\" => 'sucesso',\n \"mgs_principal\" => __('Inserção bem sucedida'),\n \"mgs_secundaria\" => __('Voce foi cadastrado com sucesso.')\n );\n // loga usuario\n \n //#update Invez de tipo !=cliente tem que ser de acordo com as opcoes do sistema\n if($tipo!='cliente' && !$this->_Acl->Usuario_GetLogado()){\n $this->_Modelo->Usuario_Logar($login, \\Framework\\App\\Sistema_Funcoes::Form_Senha_Blindar($_POST['senha'],true)); \n }\n $this->_Visual->Json_Info_Update('Titulo','Adicionado com Sucesso.');\n \n if($executar){\n $this->$executar();\n }\n }else{\n $mensagens = array(\n \"tipo\" => 'erro',\n \"mgs_principal\" => __('Erro'),\n \"mgs_secundaria\" => __('Erro')\n );\n }\n $this->_Visual->Json_IncluiTipo('Mensagens',$mensagens); \n }\n $this->_Visual->Json_Info_Update('Historico', false);\n }", "title": "" }, { "docid": "f07fbf8f9c39ee847f0e127bf15051bb", "score": "0.60291845", "text": "static public function ctrIngresoUsuario()\n {\n\n if (isset($_POST[\"user\"]) && isset($_POST[\"pass\"])) \n {\n if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"user\"]))\n {\n if (preg_match('/^(?=.*\\d)(?=.*[A-Za-z])(?=.*[!@#$%.ñÑ])[0-9A-Za-zñÑ!@#$%.]{8,16}$/', $_POST[\"pass\"])) \n {\n $user = base64_encode($_POST[\"user\"]);\n $pass = base64_encode($_POST[\"pass\"]);\n \n $oUsuario_Model = new Usuario_Model;\n \n $oUsuario = $oUsuario_Model->VerificarLogin($user, $pass);\n \n $content = \"error|Datos de acceso incorrectos\";\n if ($oUsuario != null)\n {\n \n $idRol = $oUsuario->idRol->getValue();\n $rol = $oUsuario->Rol->nombre->GetValue();\n //incrementar usuario a la variable de session\n $idUsuario = $oUsuario->idUsuario->GetValue();\n $usuario = $oUsuario->username->GetValue();\n $email = $oUsuario->email->GetValue();\n $idEmpleado = $oUsuario->idEmpleado->GetValue();\n //\n \n $oRolModulo_model = new RolModulo_Model;\n $oObjeto_Model = new Objeto_Model;\n \n $lista = $oRolModulo_model->GetListByRol($idRol);\n \n $acl = array();\n $cad = \"\";\n\n foreach($lista as $item)\n {\n $idModulo = $item->idModulo->GetValue();\n \n $listaObjetos = $oObjeto_Model->GetListByModulo($idModulo);\n $cad2 = \"\";\n \n $iObjetos = array();\n foreach($listaObjetos as $item2){\n $cad2 .= $item2->nombre->GetValue() . \",\";\n \n $iObjetos[] = array(\"idObjeto\" => $item2->idObjeto->GetValue(),\n \"nombre\" => $item2->nombre->GetValue(),\n \"nombreControl\" =>$item2->nombreControl->GetValue(),\n );\n\n $_SESSION[\"ObjetosValidos\"][] = $item2->nombreControl->GetValue();\n }\n \n $iModulos[] = array(\"idModulo\" => $idModulo,\n \"nombre\" => $item->Modulo->nombre->GetValue(),\n \"icono\" => $item->Modulo->icono->GetValue(),\n \"listaObjetos\" => $iObjetos);\n \n $cad .= $item->Modulo->nombre->GetValue() . \"(\". $cad2 .\")\";\n }\n\n $usuarioactivo = array(\n \"idUsuario\" => $idUsuario,\n \"usuario\" => $usuario,\n \"email\" => $email,\n \"idEmpleado\" => $idEmpleado);\n\n $acl = array(\"idRol\" => $idRol,\n \"nombre\" => $rol,\n \"usuario_activo\" => $usuarioactivo,\n \"listaModulos\" => $iModulos);\n\n $_SESSION[\"ACL\"] = $acl;\n\n \n $content = \"ok|Datos Correctos\";\n echo '<script>\n\n window.location = \"inicio\";\n\n </script>';\n \n }\n else\n {\n echo '\n <script>\n\n swal({\n\n type: \"error\",\n title: \"¡Usuario y/o contraseña incorrectos! Intente de nuevo\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n\n if(result.value){\n \n window.location = \"inicio\";\n\n }\n\n });\n \n\n </script>';\n }\n }\n else{\n echo '\n <script>\n\n swal({\n\n type: \"error\",\n title: \"¡La contraseña no cumple con los requisitos mínimos de 8 a 16 caracteres! Intente de nuevo\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n\n if(result.value){\n \n window.location = \"inicio\";\n\n }\n\n });\n \n\n </script>';\n }\n \n }\n else\n {\n \n echo '\n <script>\n\n swal({\n\n type: \"error\",\n title: \"¡Usuario inválido, no debe contener caracteres especiales! Intente de nuevo\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n\n if(result.value){\n \n window.location = \"inicio\";\n\n }\n\n });\n \n\n </script>';\n }\n }\n else\n {\n // echo '<br><div class=\"alert alert-success\">Servicio Activo</div>';\n }\n }", "title": "" }, { "docid": "7ecc2e839284890d832608ee666920b3", "score": "0.60142785", "text": "function save(){\n\n $email = $_POST['user-email'];\n $password = $_POST['user-password'];\n $confirm = $_POST['user-confirm-password'];\n $lastname = $_POST['user-lastname'];\n $firstname = $_POST['user-firstname'];\n $number = $_POST['user-address-number'];\n $street = $_POST['user-address-street'];\n $zipcode = $_POST['user-address-zipcode'];\n $city = $_POST['user-address-city'];\n\n \n //si le mot de passe saisie est strictement identique a la confirmation de mot de passe \n if ($password === $confirm){\n // alors on copie le modele user sur le quel on vas se baser pour creer un nouvel utilisateur\n include __DIR__ . '/../Entity/User.php';\n //creer un nouvel utilisateur\n $user = new User;\n\n //dans chaque champ defini auparavant dans l'entité, on vas attribuer une valeur\n //on dit qu'on hydrate les parametres avec les données qui seront envoyées pas l'utilisateur\n //on ne renseigne pas l'id , mysql vas s'en charger avec l'auto-incrémentation\n\n $user->email = $email;\n $user->lastname = $lastname;\n $user->firstname = $firstname;\n $user->address_number = $number;\n $user->address_street = $street;\n $user->address_zipcode = $zipcode; \n $user->address_city = $city;\n $user->password = password_hash($password, PASSWORD_BCRYPT);\n $user->roles = 'ROLE_USER';\n\n //on enregistre la variable $user nouvellemtn hydratée de tous les parametres\n $user->save();\n\n header('LOCATION: /login');\n }\n else{\n include __DIR__ . '/../../templates/navbar.html.php';\n echo '<div>votre mot de passe et la confirmation doivent être identique</div>';\n include __DIR__ .'/../../templates/registration/index.html.php';\n }\n}", "title": "" }, { "docid": "b1be8fe4f794f85e99ad88470a5eb338", "score": "0.5998878", "text": "public function registrar()\n\t{\n\t\t$usr=new Usuario_dm();\n\n\t\t$usr->nombre =$_POST[\"nombre\"];\n\t\t$usr->apellidos = $_POST['Apellidos'];\n\t\t$usr->login = $_POST['Usuario'];\n\t\t$usr->email = $_POST['Email'];\n\t\t$usr->nacimiento = $_POST['Fecha'];\n\t\t$usr->password = $_POST['password'];\n\t\t$usr->admin = 0;\n\t\t$usr->ciudad = $_POST['Ciudad'];\n\t\t$usr->calle = $_POST['Calle'];\n\t\t$usr->codPostal = (int)$_POST['CodPos'];\n\t\t\n\t\tif($_POST['sexo'] == \"mujer\"){\n\t\t\t$usr->sexo = 0;\n\t\t}else{\n\t\t\t$usr->sexo = 1;\n\t\t}\n\n\t\tswitch((int)$_POST['Nacionalidad']){\n\t\t\tcase \"00\":\n\t\t\t\t$usr->nacionalidad = \"español\";\n\t\t\tbreak;\n\t\t\tcase \"01\":\n\t\t\t\t$usr->nacionalidad = \"Europea\";\n\t\t\tbreak;\n\t\t\tcase \"02\":\n\t\t\t\t$usr->nacionalidad = \"Extra Comunitaria\";\n\t\t\tbreak;\n\t\t\tcase \"03\":\n\t\t\t$usr->nacionalidad = \"Estado Unidense\";\n\t\t\tbreak;\n\t\t}\n $this->Usuario_dm->Registrar($usr);\n\n\t\tredirect('/Home/index');\n\t}", "title": "" }, { "docid": "f2310cc3b3a89320a97cbf280f9a466b", "score": "0.5996288", "text": "public function editAction(Request $request, Usuario $usuario)\n {\n set_time_limit(300);\n $session = $request->getSession(); //obtengo la session\n\n if ($session->get('login') == true)://verifico si el usuario esta logueado\n\n $deleteForm = $this->createDeleteForm($usuario); // creo el formulario para la eliminacion del registro\n\n $dv = $usuario->getDv(); //obtengo el Dv desde el formulario creado\n $rut = $this->puntosRut($usuario->getRut()); //setteo el rut para agregar los puntos\n\n $usuario->setRut($rut . '-' . $dv); // envío el rut setteado al formulario\n\n\n $editForm = $this->createForm('VerantBundle\\Form\\UsuarioEmpresaType', $usuario); // creo el formulario\n// $editForm->setRut($rut . '-' . $dv);\n $editForm->handleRequest($request); // obtengo el formulario\n\n if ($editForm->isSubmitted() && $editForm->isValid()) { //solo si se envía un formulario\n\n $pass = $editForm->get('password')->getData(); //obtengo el password del usuario desde el formulario\n\n \n $region = $editForm->get('region')->getData();\n $ciudad = $editForm->get('ciudad')->getData();\n $comuna = $editForm->get('comuna')->getData();\n \n \n $usuario->setRegion($region);\n $usuario->setCiudad($ciudad);\n $usuario->setComuna($comuna);\n \n if (!empty($pass)) {//si existe un password lo setteo\n //Encriptacion de password\n $password = md5($editForm->get('password')->getData()); //obtengo el dato\n\n $usuario->setPassword($password); //setteo el password\n } else {\n //si no existe un password lo recupero de la BD\n $recoverPass = $this->recoverPass($usuario->getId());\n $usuario->setPassword($recoverPass[0]['password']);\n }\n\n\n $rutF = $this->formatoRut($editForm->get('rut')->getData()); //tomo el rut y lo envío a la funcion formatoRut, la cual me devuelve el rut sin puntos y separado del dv\n $rut = $rutF['rut']; //obtengo el rut\n $dv = $rutF['dv']; //obtengo el dv\n $usuario->setRut($rut); //envío el rut\n $usuario->setDv($dv); // envio el dv\n\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($usuario);\n $em->flush();\n\n $this->get('session')->getFlashBag()->add(\"mensaje\", \"Usuario Actualizado\"); //mensaje para loguearse\n return $this->redirectToRoute('usuario_empresa_index', array('id' => $usuario->getId()));\n }\n\n return $this->render('usuarioempresa/edit.html.twig', array(\n 'usuario' => $usuario,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n else://si no está logueado lo reenvío a loguearse\n $this->get('session')->getFlashBag()->add(\"mensaje\", \"Debe Loguearse\"); //mensaje para loguearse\n return $this->redirectToRoute('web_verant_login'); //redireccion\n endif;\n }", "title": "" }, { "docid": "03a75175670b794b6ac45d40039c3c63", "score": "0.5996193", "text": "public function autentificar(){\n $auten = new Autentificacion(); // instanciamos la clase modelo\n // capturamos los datos enviados desde el formularios\n $usuario = $_REQUEST['usuario'];\n $password = $_REQUEST['password'];\n\n // Enviamos los datos a consulta\n $auten = $this->model->Validacion($usuario, $password);\n // Creamos la sesión de nuestro usuario logueado\n $this->model->Sesion($auten);\n }", "title": "" }, { "docid": "db12e1a55f5bfeffa74dc3281d848ae4", "score": "0.5994878", "text": "public function autentificar(){\r\n $auten = new Autentificacion(); // instanciamos la clase modelo\r\n // capturamos los datos enviados desde el formularios\r\n $usuario = $_REQUEST['usuario'];\r\n $password = $_REQUEST['password'];\r\n $vista = \"Autentificacion\";\r\n // Enviamos los datos a consulta\r\n $auten = $this->model->Validacion($usuario, $password);\r\n // Creamos la sesión de nuestro usuario logueado\r\n $this->model->Sesion($auten, $vista);\r\n }", "title": "" }, { "docid": "ca4e01ae72ac4398f7ee081a2b24bc52", "score": "0.5987633", "text": "function ModeloAutentificaUsuario() { //Constructor de la clase del modelo\r\n\t\t$this->base_datos = new medoo();\r\n\t}", "title": "" }, { "docid": "6c28ce2c0831eb71ce53a11a6beb8fdb", "score": "0.59854394", "text": "private function _addUser(){\n $semantic=$this->jquery->semantic();\n\n $user=new Utilisateur();\n $user->idSite=\"\";\n $user->idStatut=\"\";\n\n $form=$semantic->dataForm(\"frmUserAdd\", $user);\n\n $form->setFields([\"login\",\"password\",\"elementsMasques\",\"fondEcran\",\"couleur\",\"idStatut\",\"idSite\",\"submit\"]);\n $form->setCaptions([\"Login\",\"Password\",\"Elements Masqués\",\"Fond d'écran\",\"Couleur\",\"Statut\",\"Site\",\"Valider\"]);\n\n $sites=DAO::getAll(\"models\\Site\");\n $form->fieldAsDropDown(\"idSite\",JArray::modelArray($sites,\"getId\",\"getNom\"));\n\n $status=DAO::getAll(\"models\\Statut\");\n $form->fieldAsDropDown(\"idStatut\",JArray::modelArray($status,\"getId\",\"getLibelle\"));\n\n $form->fieldAsSubmit(\"submit\",\"blue\",\"UsersController/newUser/\",\"#divUsers\");\n }", "title": "" }, { "docid": "a22af863be9ce3ef1621b53395b46a50", "score": "0.59830266", "text": "function form_agrega_usuario() \t//Si se modifica, modificar (agrega_usuario) tambien\n\t\t{\n\t\t\tif($this->_veri_log()){\n\t\t\t\t$data['titulo']='Agregar Usuario';\n\t\t\n\t\t\t\t$session_data = $this->session->userdata('logged_in');\n\t\t\t\t$data['id_perfil'] = $session_data['id_perfil'];\n\t\t\t\t$data['nombre'] = $session_data['nombre'];\n\t\t\n\t\t\t\t$this->load->view('admin/front/header', $data);\n\t\t\t\t$this->load->view('admin/front/aside', $data);\n\t\t\t\t$this->load->view('agregausuario_view');\n\t\t\t\t$this->load->view('admin/front/footer');\n\t\t\t}else{\n\t\t\tredirect('login', 'refresh'); }\n\t\t}", "title": "" }, { "docid": "ef83c7c7828413673769f35323486c0f", "score": "0.5946475", "text": "function loadNewUser( $usuario, $dataFormulario ) {\n\t$connection = connectDB();\n\t$tabla = 'afiliados';\n\t$fecha_actual = date(\"Y-m-d\");\n\n\t//apellido y nombre lo pasa a minúsculas\n\t$apellido = isset($_POST['lastname']) ? strtolower($_POST['lastname']) : '';\n\t$nombre = isset($_POST['name']) ? strtolower($_POST['name']) : '';\n\t$cuit = isset($_POST['cuit']) ? $_POST['cuit'] : '';\n\t$cuil = isset($_POST['cuil']) ? $_POST['cuil'] : '';\n\t$dni = isset($_POST['dni']) ? $_POST['dni'] : '';\n\t$fechaIngreso = isset($_POST['date-start']) ? $_POST['date-start'] : '';\n\n\t//SANITIZE:\n\t$apellido = filter_var(ucwords($apellido),FILTER_SANITIZE_STRING);\n\t$apellido = mysqli_real_escape_string($connection, $apellido);\n\t$nombre = filter_var(ucwords($nombre),FILTER_SANITIZE_STRING);\n\t$nombre = mysqli_real_escape_string($connection, $nombre);\n\t$cuit = filter_var($cuit,FILTER_SANITIZE_NUMBER_INT);\n\t$cuit = mysqli_real_escape_string($connection, $cuit);\n\t$cuil = filter_var($cuil,FILTER_SANITIZE_NUMBER_INT);\n\t$cuil = mysqli_real_escape_string($connection, $cuil);\n\t$dni = filter_var($dni,FILTER_SANITIZE_NUMBER_INT);\n\t$dni = mysqli_real_escape_string($connection, $dni);\n\t\n\n\t\n\t$member_email = isset($_POST['member_email']) ? strtolower($_POST['member_email']) : '';\n\t$member_tel = isset($_POST['member_tel']) ? $_POST['member_tel'] : '';\n\t$member_movil = isset($_POST['member_cellphone']) ? $_POST['member_cellphone'] : '';\n\t$job_street = isset($_POST['job_street']) ? strtolower($_POST['job_street']) : '';\n\t$job_number = isset($_POST['job_number']) ? $_POST['job_number'] : '';\n\t$job_city = isset($_POST['job_city']) ? strtolower($_POST['job_city']) : '';\n\n\t//SANITIZE:\n\t$member_email = filter_var($member_email,FILTER_SANITIZE_EMAIL);\n\t$member_email = mysqli_real_escape_string($connection, $member_email);\n\t$member_tel = filter_var($member_tel,FILTER_SANITIZE_NUMBER_INT);\n\t$member_tel = mysqli_real_escape_string($connection, $member_tel);\n\t$member_movil = filter_var($member_movil,FILTER_SANITIZE_NUMBER_INT);\n\t$member_movil = mysqli_real_escape_string($connection, $member_movil);\n\t\n\t$job_street = filter_var(ucwords($job_street),FILTER_SANITIZE_STRING);\n\t$job_street = mysqli_real_escape_string($connection, $job_street);\n\t$job_number = filter_var($job_number,FILTER_SANITIZE_NUMBER_INT);\n\t$job_number = mysqli_real_escape_string($connection, $job_number);\n\n\t//ajusta locacion:\n\tswitch ($job_city) {\n\t\tcase 'caba':\n\t\t$job_city = 'Ciudad de Buenos Aires';\n\t\tbreak;\n\t\tcase 'buenos-aires':\n\t\t$job_city = 'Buenos Aires';\n\t\tbreak;\n\t\tcase 'catamarca':\n\t\t$job_city = 'Catamarca';\n\t\tbreak;\n\t\tcase 'chaco':\n\t\t$job_city = 'Chaco';\n\t\tbreak;\n\t\tcase 'chubut':\n\t\t$job_city = 'Chubut';\n\t\tbreak;\n\t\tcase 'cordoba':\n\t\t$job_city = 'Córdoba';\n\t\tbreak;\n\t\tcase 'corrientes':\n\t\t$job_city = 'Corrientes';\n\t\tbreak;\n\t\tcase 'entre-rios':\n\t\t$job_city = 'Entre Ríos';\n\t\tbreak;\n\t\tcase 'formosa':\n\t\t$job_city = 'Formosa';\n\t\tbreak;\n\t\tcase 'jujuy':\n\t\t$job_city = 'Jujuy';\n\t\tbreak;\n\t\tcase 'la-pampa':\n\t\t$job_city = 'La Pampa';\n\t\tbreak;\n\t\tcase 'la-rioja':\n\t\t$job_city = 'La Rioja';\n\t\tbreak;\n\t\tcase 'mendoza':\n\t\t$job_city = 'Mendoza';\n\t\tbreak;\n\t\tcase 'misiones':\n\t\t$job_city = 'Misiones';\n\t\tbreak;\n\t\tcase 'neuquen':\n\t\t$job_city = 'Neuquén';\n\t\tbreak;\n\t\tcase 'rio-negro':\n\t\t$job_city = 'Río Negro';\n\t\tbreak;\n\t\tcase 'salta':\n\t\t$job_city = 'Salta';\n\t\tbreak;\n\t\tcase 'san-juan':\n\t\t$job_city = 'San Juan';\n\t\tbreak;\n\t\tcase 'san-luis':\n\t\t$job_city = 'San Luis';\n\t\tbreak;\n\t\tcase 'santa-cruz':\n\t\t$job_city = 'Santa Cruz';\n\t\tbreak;\n\t\tcase 'santa-fe':\n\t\t$job_city = 'Santa Fé';\n\t\tbreak;\n\t\tcase 'santiago-del-estero':\n\t\t$job_city = 'Santiago del Estero';\n\t\tbreak;\n\t\tcase 'tierra-del-fuego':\n\t\t$job_city = 'Tierra del Fuego';\n\t\tbreak;\n\t\tcase 'tucuman':\n\t\t$job_city = 'Tucumán';\n\t\tbreak;\n\t}\n\n\t//ahora se arman las variables para cargar la base de datos\n\n\t//los datos de la empresa vienen de la otra base de datos externa, solo hay que sumarle el domicilio y serializarlo\n\t$empresa = array(\n\t\t'razon-social' => $usuario['razonSocial'],\n\t\t'cuit-empresa' => $usuario['cuit'],\n \t'sucursal' => $usuario['sucursal'],\n \t'fecha-ingreso' => $usuario['mesDDJJ']. '/' .$usuario['anioDDJJ'],\n \t'id-convenio' => $usuario['idConvenio'],\n \t'id-rama' => $usuario['idRama'],\n \t'nombre-convenio' => $usuario['nonmbreConvenio'],\n \t'empresa_domicilio' => $job_street . ' ' . $job_number . ', ' . $job_city,\n\t);\n\n\t$empresa = serialize($empresa);\n\n\t$query = \"INSERT INTO $tabla (member_cuil,member_cuit,member_dni, member_apellido, member_nombre, member_fecha_ingreso, member_empresa, member_email, member_telefono, member_movil) VALUES ('$cuil', '$cuit', '$dni', '$apellido', '$nombre', \";//continua el query debajo\n\n\tif ( $fechaIngreso > $fecha_actual || $fechaIngreso == '' || $fechaIngreso == '0000-00-00' ) {\n\t\t$query .= \"NULL \";\n\t} else {\n\t\t$query .= \"'\".$fechaIngreso.\"'\";\n\t}\n\n\t$query .= \", '$empresa', '$member_email', '$member_tel', '$member_movil') \";\n\t\n\t$nuevoMembert = mysqli_query($connection, $query); \n\t$memberID = mysqli_insert_id($connection);\n\n\tcloseDataBase( $connection );\n\n\treturn $memberID;\t\t\t\n}", "title": "" }, { "docid": "e6485fe55926524ef02343b5d4c32ea2", "score": "0.59255683", "text": "public function registrarAction() {\n $request = $this->getRequest();\n $user = new UserProject();\n $form = $this->createForm(new UserProjectType(), $user);\n $string = array();\n if ($request->isMethod(\"POST\")) {\n $form->handleRequest($request);\n if ($form->isValid()) {\n $factory = $this->get('security.encoder_factory');\n $encoder = $factory->getEncoder($user);\n $password = $encoder->encodePassword($user->getPassword(), $user->getSalt());\n $user->setPassword($password);\n $roles = $this->getDoctrine()->getRepository('TareaBundle:Rol');\n $states = $this->getDoctrine()->getRepository('TareaBundle:State');\n $user->setRol($roles->findOneBy(array('rol' => 'ROLE_USER')));\n $user->setState($states->findOneBy(array('state' => 'CREATE')));\n $beginingDate = new \\DateTime(\"now\");\n $user->setBeginningDate($beginingDate);\n $user->setEndingDate(null);\n $em = $this->getDoctrine()->getManager();\n $em->persist($user);\n $em->flush();\n $userOnline = $this->container->get('security.context')->getToken()->getUser();\n if (is_null($userOnline)) {\n return $this->redirect($this->generateUrl(\"login\"));\n } else {\n return $this->redirect($this->generateUrl(\"userList\"));\n }\n } else {\n $string = $this->convertirErrores($form);\n return $this->render('ProyectoSecurityBundle:UserProject:new.html.twig', array(\n 'form' => $form->createView(), 'errors' => $string));\n }\n }\n return $this->render('ProyectoSecurityBundle:UserProject:new.html.twig', array('form' => $form->createView(), 'errors' => $string));\n }", "title": "" }, { "docid": "9064e25f0f7489192b6b1cd362accd94", "score": "0.5914932", "text": "public function store(UserFormRequest $request)//se guarda los datoas a la BD\n {\n $usuario = new User();\n \n $usuario->name = request('name');\n $usuario->email = request('email');\n $usuario->password = bcrypt(request('password'));\n\n if($request->hasFile('imagen')){\n $file = $request->imagen;\n $file->move(public_path(). '/imagenes', $file->getClientOriginalName());\n $usuario->imagen = $file->getClientOriginalName();\n }\n\n $usuario->save();\n\n $usuario->asignarRol($request->get('rol'));//este linea de codiogo asigna el rol automaticamente\n\n return redirect('/usuarios');\n\n }", "title": "" }, { "docid": "d8c129a07bdf3c370058b830568a1f8a", "score": "0.58978254", "text": "public function getuser()\n {\n \n # logica para buscar cadastro aqui.\n \n }", "title": "" }, { "docid": "6644845c489f70dcfca38ba8b7fa0ee5", "score": "0.588955", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->correo=$_POST['correo'];\n\t\t$this->nivel=$_POST['nivel'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->login=$_POST['login'];\n\t\t$this->clave=$_POST['clave'];\n\t\t$this->confirmar=$_POST['confirmar'];\n\t}", "title": "" }, { "docid": "129329bd77cb010a9d117cb2ff42ff7c", "score": "0.58678275", "text": "protected function setUser()\n {\n $telegramId = $this->message['from']['id'];\n $userName = '';\n if (!empty($this->message['from']['first_name'])) {\n $userName .= $this->message['from']['first_name'];\n }\n if (!empty($this->message['from']['last_name'])) {\n $userName .= ' '.$this->message['from']['last_name'];\n }\n $this->user = User::ofTelegramId($telegramId)->first();\n $isOwner = 0;\n $isActive = config('bot.free_access');\n if (config('bot.owner_id') == $telegramId) {\n $isOwner = 1;\n $isActive = 1;\n }\n if (!$this->user) {\n $this->user = User::create([\n 'telegram_id' => $telegramId,\n 'name' => $userName,\n 'is_active' => $isActive,\n 'is_admin' => $isOwner,\n 'password' => Hash::make(Str::random(8))\n ]);\n } else {\n $this->mode = $this->user->mode;\n }\n }", "title": "" }, { "docid": "9bc54aaaa132a06868accbe49047479e", "score": "0.58657557", "text": "public function registrautenteAction(){\n \n $request = $this->getRequest();\n $this->_logger->info('Attivato ' . __METHOD__ . ' ');\n \n \n if (!$this->getRequest()->isPost()) {\n $this->_helper->redirector('home');\n }\n \n $formRegistrazione = $this->_formRegistrazione;\n \n if (!$formRegistrazione->isValid($request->getPost())){\n \n $this->_logger->info('Attivato If della form registrazione');\n $formRegistrazione->setDescription('Attenzione: alcuni dati inseriti sono errati.');\n $this->_logger->debug(print_r($formRegistrazione->getErrors(), true));\n return $this->render('registrazione');\n \n \n }\n \n $values = $formRegistrazione->getValues();\n $values['role']=\"user\"; \n\n /*Blocco Try-Catch che cattura l'eccezione riguardante un username già presente*/\n try{\n $this->_PublicModel->insertUser($values);\n $formRegistrazione->setDescription('Registrazione effettuata con successo!');\n $this->_helper->redirector('home');\n \n }\n catch(Exception $e){\n $formRegistrazione->setDescription('ATTENZIONE! Username già presente!');\n $this->render('registrazione');\n }\n \n \n \n }", "title": "" }, { "docid": "3c7b4d8e8d94a7ef39b6f9777657b4b2", "score": "0.5860501", "text": "public function registro(Request $request){\n //decodificar el json\n $params = json_decode($request->getContent(), true);\n \n //comprobar y valdiar datos\n \n if($params != null){\n $name = (!empty($params['name'])) ? $params['name']: null;\n $documento = (!empty($params['documento'])) ? $params['documento']: null;\n $email = (!empty($params['email'])) ? $params['email']: null;\n $celular = (!empty($params['celular'])) ? $params['celular']: null;\n $password = (!empty($params['password'])) ? $params['password']: null;\n\n $validator = Validation::createValidator();\n $validate_email = $validator->validate($email, [\n new Email()\n ]);\n \n if(!empty($email) && count($validate_email) ==0 \n && !empty($name) && !empty($documento) \n && !empty($celular) && !empty($password))\n {\n //si la validación es correcta, crear el objeto de usuario\n $user = new User();\n $user->setName($name);\n $user->setDocumento($documento);\n $user->setEmail($email);\n $user->setCelular($celular);\n $user->setCreatedAt(new \\Datetime('now'));\n //sifrar contraseña\n $pwd = hash('sha256',$password);\n $user->setPassword($pwd);\n //comprobar si existe el usuario\n $doctrine=$this->getDoctrine();\n $em =$doctrine->getManager();\n\n $user_repo = $doctrine->getRepository(User::class);\n $isset_user = $user_repo->findBy(array(\n 'email'=>$email\n ));\n //si no existe guardar en bd\n if(count($isset_user)==0){\n //guardar usuario\n $em->persist($user);\n $em->flush();\n $data = [\n 'status' => 'success',\n 'code' => 200,\n 'message' => 'Se guardaron los datos con exito',\n 'user' => $user\n ];\n\n }else{\n $data = [\n 'status' => 'error',\n 'code' => 200,\n 'message' => 'El usuario ya existe'\n ];\n }\n \n }else{\n $data = [\n 'status' => 'error',\n 'code' => 400,\n 'message' => 'no se enviaron datos o datos incorrectos'\n ];\n }\n\n }else{\n $data = [\n 'status' => 'error',\n 'code' => 400,\n 'message' => 'no se enviaron datos o datos incorrectos'\n ];\n }\n\n return $this->resjson($data);\n }", "title": "" }, { "docid": "5495d3c02cdf1e6dbd84645d32ee88f1", "score": "0.5858716", "text": "static public function registro_user_model($infoUser,$tabla)\n\t{\n\t\t$crearUsuario = CONEXION::conectar() -> prepare(\"INSERT INTO $tabla(nom_usu,ape_usu,cor_usu) values (?,?,?)\");\n \n $crearUsuario -> bindParam(1,$infoUser[\"nameuser\"],PDO::PARAM_STR);\n $crearUsuario -> bindParam(2,$infoUser[\"apeser\"],PDO::PARAM_STR);\n $crearUsuario -> bindParam(3,$infoUser[\"email\"],PDO::PARAM_STR);\n \n\n $crearUsuario -> execute();\n\n\t\tif ($crearUsuario == TRUE) {\n\n\t\t return \"exito\";\n\t\t\n\t\t}else{\n\n\t\t\treturn print_r(Conexion::conectar()->errorInfo());\n\t\t}\n\n\t\t$crearUsuario -> close();\n\n\t\t$crearUsuario = null;\n\t\t\t\n\t}", "title": "" }, { "docid": "f2ea76359bee41742b55ad1168ea07c0", "score": "0.5856116", "text": "public function process(){\n if($this->form->getData()->getPassword()!='') {\n\n $role = new Role();\n $rc = $this->doctrine->getRepository('AppBundle:Role');/*select*/\n $default = $rc->getDefaultRole();\n\n //il attends un objet entité \"role\"\n $this->form->getData()->setRoles($default);\n\n $newName = $this->userPasswordEncoder->encodePassword($this->form->getData(), $this->form->getData()->getPassword());\n\n $this->form->getData()->setPassword($newName);\n $this->form->getData()->setLastConnection(new \\DateTime());\n\n $message = \\Swift_Message::newInstance()\n ->setSubject('Inscription réussie')\n ->setFrom('[email protected]')\n ->setTo($this->form->getData()->getEmail())\n ->setBody(\n// $this->renderView(\n // app/Resources/views/Emails/registration.html.twig\n// 'Emails/registration.html.twig',\n// array('name' => $name)\n// )\n 'Vous avez bien été inscrit'\n ,'text/html'\n )\n ;\n $this->mailer->send($message);\n\n }\n\n parent::process();//fais le process de Formhandler et ensuite s'occupe de l'image\n }", "title": "" }, { "docid": "0635878d740500e5d68da13cfc999ca8", "score": "0.58557683", "text": "public function Usuario()\n {\n // section -64--88-0-100--b2dec8:13357253886:-8000:0000000000001821 begin\n $this->ModeloUsuario = new ModeloUsuario();\n session_start();\n \n // section -64--88-0-100--b2dec8:13357253886:-8000:0000000000001821 end\n }", "title": "" }, { "docid": "f47aebe4d67ca398f9a7825d7428475a", "score": "0.5849601", "text": "function __construct() {\n parent::__construct('usuarios');\n $this->fields = array('primer_nombre', 'segundo_nombre',\n 'paterno', 'materno', 'login', 'password', 'email', 'tipo');\n }", "title": "" }, { "docid": "41457ac5e7d37d774ad4e9e7c579d601", "score": "0.58459425", "text": "public function members_add_post() {\n\t\t//Validar que tenga permisos de agregar\n\t\t$result = array('x' => 0, 'y' => 0, 'z' => 0);\n\n\t\t$user = new User;\n\n\t\t//Validar que el dominio no sea localhost pq no pasa la validacion del correo\n\t\tif ($_SERVER['SERVER_NAME'] == 'localhost') {\n\t\t\t$correo = uniqid(mt_rand(10, 99)) . '@' . $_SERVER['SERVER_NAME'] . '.com';\n\t\t} else {\n\t\t\t$correo = uniqid(mt_rand(10, 99)) . '@' . $_SERVER['SERVER_NAME'];\n\t\t}\n\n\t\t$user->username = $correo;\n\t\t$user->email = $user->username;\n\t\t$user->password = uniqid(mt_rand(10, 99));\n\t\t$user->password_confirmation = $user->password;\n\t\t$user->username_confirmation = $user->username;\n\n\t\t//Validar que el usuario le esta dando acceso al sistema\n\t\tif (Input::get('profile') <= 2) {\n\t\t\t$user->username = Input::get('email');\n\t\t\t$user->username_confirmation = $user->username;\n\t\t\t$user->email = Input::get('email');\n\t\t\t$user->password = Input::get('password');\n\t\t\t$user->password_confirmation = Input::get('confirm');\n\t\t}\n\n\t\t$user->save();\n\n\t\tif ($user->id) {\n\t\t\t//Agrega el detalle del usuario\n\t\t\t$userdetail = new Userdetail;\n\t\t\t$userdetail->date_of_birth = Input::get('date_of_birth');\n\t\t\t$userdetail->sex = Input::get('sex');\n\t\t\t$userdetail->role_id = Input::get('role');\n\t\t\t$userdetail->name = Input::get('name');\n\t\t\t$userdetail->lastname = Input::get('lastname');\n\t\t\t$userdetail->mothersname = Input::get('mothersname');\n\t\t\t$userdetail->cellphone = Input::get('cellphone');\n\t\t\t$userdetail->familie_id = Auth::user()->userdetail->familie_id;\n\t\t\t$userdetail->user_id = $user->id;\n\t\t\t$userdetail->confirmed = 1;\n\t\t\t$userdetail->photo = 'default.jpg';\n\t\t\t$userdetail->profile = Input::get('profile');\n\n\t\t\t$userdetail->save();\n\n\t\t\tif ($userdetail->id) {\n\t\t\t\t$result['x'] = 1;\n\t\t\t\t$result['y'] = $user->id;\n\t\t\t}\n\t\t}\n\n\t\t$json = json_encode($result);\n\t\treturn View::make('json', array('json' => $json));\n\t}", "title": "" }, { "docid": "471b7ffe9fe7feb0178b9892a400c117", "score": "0.584273", "text": "public function editar(){\n\t\tif($this->_validarCampos()){\n // recuperando a instancia da classe de acesso a dados //\n $instancia = ServicosAcomapnhanteDAO::getInstancia();\n // retornando o Usuario //\n return $instancia->editar($this); \n }\n\t}", "title": "" }, { "docid": "24b86a07c9d81faa210a1f62f2e64605", "score": "0.58417374", "text": "public function createsAction(){\n ini_set('memory_limit', '-1');\n set_time_limit(0); \n \n $em = $this->getDoctrine()->getEntityManager(); \n $session= $this->getRequest()->getSession();\n $entity = new Alumno();\n $request = $this->getRequest();\n $form = $this->createForm(new AlumnoType(), $entity);\n $form->handleRequest($request);\n if ($form->isValid()) {\n $ano_escolar_activo=$em->getRepository(\"NetpublicCoreBundle:Dimension\")\n ->findAnoEscolarActivo();\n $ano_escolar_id_s=$session->get(\"ano_escolar_id\",$ano_escolar_activo->getId());\n $ano_escolar_activo=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->find($ano_escolar_id_s);\n \n //Generamos claves temporalares a los alumno registrados como nuevo\n $usuario=new Usuario();\n $em = $this->getDoctrine()->getEntityManager();\n $query = $em->createQuery('SELECT count(a) FROM NetpublicCoreBundle:Usuario a WHERE a.username LIKE :cedula')\n ->setParameters(array(\n \"cedula\"=>$entity->getNombre().'%' \n \n )\n );\n $count = $query->getSingleScalarResult();\n\t\t\t$nombre=$entity->getNombre();\n\t\t\t\n\t\t\tif($count>0){\n\t\t\t\t$nombre=$entity->getNombre().$count;\n\t\t\t}\n\n $usuario->setUsername($nombre);\n $usuario->setSalt(md5(time()));\n $encoder = new MessageDigestPasswordEncoder('sha512', true, 10);\n $password = $encoder->encodePassword($entity->getCedula(), $usuario->getSalt());\n $usuario->setPassword($password);\n $usuario->setEsAlumno(TRUE); \n $usuario->setAlumno($entity);\n $entity->setUsuario($usuario);\n //$rol=new Rol();\n //$rol->setRole(\"ROLE_ESTUDIANTE\");\n if($entity->getTipo()==0)\n $rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->findOneBy(array(\"role\"=>\"ROLE_ESTUDIANTE\"));\n if($entity->getTipo()==1)\n $rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->findOneBy(array(\"role\"=>\"ROLE_ACUDIENTE\"));\n \n $usuario->addRol($rol); \n//Generamos registros para hacer seguimientos al proceso de matricula.\n $reg_matricula=new MatriculaAlumno();\n $reg_matricula->setAlumno($entity);\n //Selecciones Ano Escolar activo\n \n //$ano_escolar_activo=$this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Dimension\")->find($id_ano_escolar);\n $reg_matricula->setAno($ano_escolar_activo);\n $reg_matricula->setEsMatricula(TRUE);\n $reg_matricula->setGrupo($entity->getGrupo());\n $reg_matricula->setEsPagoMatricula(TRUE);\n $reg_matricula->setEsPapeles(TRUE);\n $reg_matricula->setEsUltimaMatricula(TRUE);\n $reg_matricula->setObservaciones(\"Escriba observaciones del proceso de matricula\");\n $em->persist($reg_matricula);\n $em->persist($entity);\n $em->persist($rol);\n $em->persist($usuario); \n $em->flush();\n $file=$form['foto_academica']->getData();\n if($file){\n $nombre_archivo= 'alumno'.$entity->getId(); \n $entity->getUsuario()->setEsFotoperfil(1);\n $entity->getFotoAcademica()->move(__DIR__.'/../../../../web/'.'uploads/documents',\n $entity->getFotoAcademica()->getClientOriginalName()); \n $imagen=$this->get('image.handling');\n $imagen->open(__DIR__.'/../../../../web/'.'uploads/documents/'.$entity->getFotoAcademica()->getClientOriginalName())\n ->resize(140,150)\n ->save(__DIR__.'/../../../../web/'.'uploads/documents/strong'.$nombre_archivo.'.png','png');\n $imagen->open(__DIR__.'/../../../../web/'.'uploads/documents/'.$entity->getFotoAcademica()->getClientOriginalName())\n ->resize(40,43)\n ->save(__DIR__.'/../../../../web/'.'uploads/documents/mini'.$nombre_archivo.'.png','png');\n \n $usuario->setEsFotoperfil(TRUE);\n \n }\n \n \n \n \n \n $em->persist($usuario);\n $em->flush();\n $periodos_academicos=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->findPeriodosEscolar($ano_escolar_activo);\n foreach ($periodos_academicos as $periodo) { \n $this->getDoctrine()\n ->getRepository(\"NetpublicCoreBundle:NivelAcademico\")\n ->generarNivelesACademicosAlumno($entity,$periodo);\n \n }\n $em->persist($reg_matricula); \n //Matriculamos al estudiante.\n $cargas=$em->getRepository(\"NetpublicCoreBundle:CargaAcademica\")->findBy(array(\n 'ano_escolar'=>$ano_escolar_id_s,\n 'grupo'=>$entity->getGrupo()\n ));\n foreach ($cargas as $ca) {\n $padre=$ca->getPadreEvaluacion();\n if($padre){\n $em->getRepository(\"NetpublicCoreBundle:Alumno\")->crearDimensionesPadreGc($padre,$ca,$entity);\n }\n }\n $em->flush();\n if($request->isXmlHttpRequest())\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n return $this->redirect($this->generateUrl('alumno_show', array('id' => $entity->getId())));\n \n \n } \n }", "title": "" }, { "docid": "89162ef87fdf2683b03039fc59bfb418", "score": "0.5835658", "text": "public function registerData(){\n if(isset($_POST['register'])){\n $user = new Usuario(); // Instancia el objeto User\n $user->setNombreUsuario($_POST['nombreUsuario']);\n $user->setApellidoUsuario($_POST['apellidoUsuario']);\n $user->setCedulaUsuario($_POST['cedulaUsuario']);\n $user->setTelefonoUsuario($_POST['telefonoUsuario']);\n $user->setEmailUsuario($_POST['emailUsuario']);\n $user->setUsuario($_POST['usuario']);\n $user->setRolUsuario($_POST['rolUsuario']);\n $user->setPasswordUsuario($_POST['passwordUsuario']);\n // var_dump($_POST['nombreUsuario']);\n $save = $user->insert();\n }\n $this->redirect('Usuario','gestionarUsuario');\n }", "title": "" }, { "docid": "6b1dafbf9021c581bebafca5b1c3f5a8", "score": "0.58128256", "text": "public function registerAction(Request $request)\n {\n\n $usuario = new User();\n\n\n $form = $this->createFormBuilder($usuario)\n ->add(\"email\", \"email\" , array(\"required\"=> true )) \n ->add(\"firstname\", \"text\" , array(\"required\"=> true )) \n ->add(\"phone\", \"text\" , array(\"required\"=> true )) \n ->add(\"biography\", \"text\" , array(\"required\"=> true )) \n ->add(\"username\", \"text\" , array(\"required\"=> true ))\n ->add(\"password\", \"repeated\" , array(\n 'type' => 'password',\n 'invalid_message' => 'las contrasenias deben coincidir.',\n 'options' => array('attr' => array('class' => 'password-field')),\n 'required' => true,\n 'first_options' => array('label' => 'Password'),\n 'second_options' => array('label' => 'Repita Password'),\n ))\n ->add('captcha', 'captcha')\n ->getForm(); \n\n\n\n if ($request->isMethod('POST')) {\n \n //$user = $this->get('fos_user.user_manager')->findUserByEmail($email);\n\n $form->bind($request);\n\n \n $data = $form->getData(); \n\n $username = $data->getUserName();\n\n $email = $data->getEmail();\n\n\n $em = $this->getDoctrine()->getManager();\n\n $existe_username = $em->getRepository('ApplicationSonataUserBundle:User')->findOneBy(array(\"username\"=> $username ));\n\n $existe_email = $em->getRepository('ApplicationSonataUserBundle:User')->findOneBy(array(\"email\"=> $email ));\n \n\n if ( !($existe_email) && !($existe_username) ) {\n \n \n if ($form->isValid() ) {\n\n\n\n $factory = $this->get('security.encoder_factory');\n\n $encoder = $factory->getEncoder($usuario);\n\n $pass = $encoder->encodePassword($usuario->getPassword(), $usuario->getSalt());\n $usuario->setPassword( $pass );\n $usuario->setEnabled( 1 );\n\n $em = $this->getDoctrine()->getManager();\n $em->persist( $usuario );\n $em->flush();\n\n return $this->redirect($this->generateUrl('registro_exitoso'));\n\n }else{\n\n $error = \"Codigo o Contraseñas no coinciden\";\n return $this->render('CelmediaToyocostaSeminuevoBundle:Pages:register.html.twig' , \n array(\"form\"=> $form->createView(), \"error\" => $error)\n );\n //print_r($form->getErrors());\n\n\n // foreach($form->getErrors() as $e) {\n // echo $e->__toString(); \n // }\n\n }\n\n\n } else {\n \n $error = \"Usuario o email ya registrados\";\n return $this->render('CelmediaToyocostaSeminuevoBundle:Pages:register.html.twig' , \n array(\"form\"=> $form->createView(), \"error\" => $error)\n );\n }\n \n\n // if ($form->isValid() && !($existe_email) && !($existe_username) ) {\n\n\n\n // $factory = $this->get('security.encoder_factory');\n\n // $encoder = $factory->getEncoder($usuario);\n\n // $pass = $encoder->encodePassword($usuario->getPassword(), $usuario->getSalt());\n // $usuario->setPassword( $pass );\n // $usuario->setEnabled( 0 );\n\n // $em = $this->getDoctrine()->getManager();\n // $em->persist( $usuario );\n // $em->flush();\n\n // return $this->redirect($this->generateUrl('registro_exitoso'));\n\n // }else{\n // print_r($form->getErrors());\n // $error = \"Usuario o email ya registrados\";\n // return $this->render('CelmediaToyocostaSeminuevoBundle:Pages:register.html.twig' , \n // array(\"form\"=> $form->createView(), \"error\" => $error)\n // );\n // }\n\n\n }\n\n\n\n return $this->render('CelmediaToyocostaSeminuevoBundle:Pages:register.html.twig' , \n array(\"form\"=> $form->createView() , \"error\" => false )\n );\n }", "title": "" }, { "docid": "7b76fbf42a0698f0f6f30d9a33ae4049", "score": "0.5812656", "text": "public function save_user()\n {\n $usuario = $this->getUsuairo();\n $pass = $this->getPassword();\n $rol_usuario = $this->getRol();\n $grupo = $_SESSION['user']->grupo;\n $save = $this->db->prepare(\"INSERT INTO usuario VALUES(null, :usuario, :pass, :rol_usuario, :grupo)\");\n $save->bindParam(\":usuario\", $usuario, PDO::PARAM_STR);\n $save->bindParam(\":pass\", $pass, PDO::PARAM_STR);\n $save->bindParam(\":rol_usuario\", $rol_usuario, PDO::PARAM_STR);\n $save->bindParam(\":grupo\", $grupo, PDO::PARAM_INT);\n $save->execute();\n\n $usuario_id = $this->db->lastInsertId();\n $apiario_id = $_SESSION['apiario_actual']->id;\n $vinculo = $this->db->prepare(\"INSERT INTO user_api VALUES(:usuario_id, :apiario_id)\");\n $vinculo->bindParam(\":usuario_id\", $usuario_id, PDO::PARAM_INT);\n $vinculo->bindParam(\":apiario_id\", $apiario_id, PDO::PARAM_INT);\n $vinculo->execute();\n\n return $save;\n }", "title": "" }, { "docid": "7448a4b3850a9f7a9ca5f5304ce54258", "score": "0.58113253", "text": "function armarUsuario($datos) {\n return [\n \"id\" => proximoId(),\n \"name\" => ucfirst($datos[\"name\"]),\n \"lastName\" => ucfirst($datos[\"lastName\"]),\n \"userName\" => ucfirst($datos[\"userName\"]),\n \"date\" => $datos[\"date\"],\n \"pais\" => ucfirst($datos[\"pais\"]),\n \"email\" => $datos[\"email\"],\n \"password\" => password_hash($datos[\"password\"], PASSWORD_DEFAULT),\n \"phone\" => $datos[\"phone\"],\n \"avatar\" => $datos[\"avatar\"]\n ];\n}", "title": "" }, { "docid": "175d32e87bd71656bc64a3409f76c78b", "score": "0.5805559", "text": "public function form($idUser = null) {\n if (empty($idUser)) {\n $data['get_perusahaan'] = $this->M_Perusahaan->getPerusahaan('getAll', NULL, NULL, NULL, false);\n $data['get_departemen'] = $this->M_Departemen->getDepartemen('getAll', NULL, NULL, NULL, false);\n $data['get_jabatan'] = $this->M_Jabatan->getJabatan('getAll', NULL, NULL, NULL, false);\n $data['get_grup'] = $this->M_Grup->getGrup('getAll', NULL, NULL, NULL, false);\n $this->template->backend($this->VIEW_PATH.\"/form\", \"Create User\", $data);\n } if (!empty($idUser)) {\n $data['get_perusahaan'] = $this->M_Perusahaan->getPerusahaan('getAll', NULL, NULL, NULL, false);\n $data['get_departemen'] = $this->M_Departemen->getDepartemen('getAll', NULL, NULL, NULL, false);\n $data['get_jabatan'] = $this->M_Jabatan->getJabatan('getAll', NULL, NULL, NULL, false);\n $data['get_grup'] = $this->M_Grup->getGrup('getAll', NULL, NULL, NULL, false);\n $data['get_user'] = $this->M_User->getUser(\"getDataByPK\", null, null, decode_str($idUser));\n $this->template->backend($this->VIEW_PATH.\"/form\", \"Update User\", $data);\n }\n }", "title": "" }, { "docid": "f85172ae92818cbb0e447a14ef6282d9", "score": "0.57997626", "text": "public function adduser()\n {\n \t\n $user = $this->Users->newEntity();\n $this->set('user',$user);\n if ($this->request->is('post')) {\n if (isset($this->request->data['Aceptar'])) {\n $coshreo=$this->request->data['username'];\n $conshrasena=$this->request->data['password'];\n $tipo=$this->request->data['tipo_rol'];\n if ($tipo==0){\n $t='Administrador';\n } else if ($tipo==1){\n $t='Guarda';\n } \n \n if (strpos($coshreo, '@ucr.ac.cr') === false) {\n $this->Flash->set('El usuario debe ser de dominio ucr.ac.cr.', [\n 'element' => 'usuario'\n ]);\n } else {\n if (strlen($conshrasena)<6){\n $this->Flash->set('La contraseña debe ser de mínimo 6 caracteres.', [\n 'element' => 'usuario'\n ]);\n } else {\n $user = $this->Users->patchEntity($user, $this->request->data);\n $user->role = $t;\n $user->active = 0;\n \n if ($this->Users->save($user)) {\n $this->Flash->set('El usuario ha sido creado con éxito.', [\n 'element' => 'success'\n ]);\n } else {\n $this->Flash->set('Error:El usuario no pudo ser guardado.', [\n 'element' => 'error'\n ]);\n \n if($user->errors()){\n $error_msg = [];\n foreach( $user->errors() as $errors){\n if(is_array($errors)){\n foreach($errors as $error){\n $error_msg[] = $error;\n }\n }else{\n $error_msg[] = $errors;\n }\n }\n\n if(!empty($error_msg)){\n $this->Flash->set('Se encontró lo siguiente: '.implode(\"\\n \\r\", $error_msg), [\n 'element' => 'error'\n ]);\n\n }\n }\n }\n }\n }\n }\n else if (isset($this->request->data['Cancelar'])){\n return $this->redirect(['action' => 'adduser']);\n }\n }\n $this->set('_serialize', ['user']);\n }", "title": "" }, { "docid": "729bcfc75858991c5a18771726f2db48", "score": "0.57993007", "text": "function __construct()\n\t\t{\n\t\t\t$this->usuarioModelo = $this->modelo('Usuario');\n\t\t}", "title": "" }, { "docid": "e16efad3640adb17fb27a9a696e9773f", "score": "0.57985646", "text": "public function newAction(Request $request)\n {\n $user = new User();\n $form = $this->createForm(UserType::class, $user);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $user->setSalt(md5(uniqid()));//envoie le salt en dur\n\n $factory = $this->get('security.encoder_factory');\n $encoder = $factory->getEncoder($user);\n $password = $encoder->encodePassword($form->get('password')->getData(), $user->getSalt());\n $user->setPassword($password);\n\n\n $user->setRoles(array('ROLE_BLOGGER'));//envoie role par default\n $em = $this->getDoctrine()->getManager();\n $em->persist($user);\n $em->flush($user);\n\n return $this->redirectToRoute('user_show', array('id' => $user->getId()));\n }\n\n return $this->render('user/new.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "0d229379bbded53e4f9867d9d234561d", "score": "0.57984084", "text": "function guardarUsuario(User $user) {\n\n\t\t$query = $this->conn->prepare(\"Insert into usuarios values(default, :mail, :pass,:activo,:nombre,:faceId, :avatar)\");\n\n\t\t$query->bindValue(\":mail\", $user->getmail());\n\t\t$query->bindValue(\":pass\", $user->getPass());\n\t\t$query->bindValue(\":activo\", $user->getActivo());\n $query->bindValue(\":nombre\", $user->getNombre());\n $query->bindValue(\":faceId\", $user->getFaceId());\n \t$query->bindValue(\":avatar\", $user->getAvatar());\n\n\n\t\t$query->execute();\n\n\t\t$id = $this->conn->lastInsertId();\n\t\t$user->setId($id);\n\n\n\n\t\treturn $user;\n\n\t}", "title": "" }, { "docid": "25bf78ca9128b11c8e07e34e847cd367", "score": "0.5796152", "text": "public function miCuenta() {\n $this->viewBuilder()->layout('publico');\n if (!$this->request->session()->read('Auth.User.username')) $this->redirect('/');\n $this->loadModel('Users');\n $this->loadModel('Videos');\n $user = $this->Users->get($this->request->session()->read('Auth.User.id'), [\n 'contain' => []\n ]);\n if ($this->request->is(['patch', 'post', 'put'])) {\n $user = $this->Videos->patchEntity($user, $this->request->data);\n $this->log($this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('Cuenta editada correctamente.'));\n } else {\n $this->Flash->error(__('Ha habido un error al editar su cuenta.'));\n }\n }\n $this->set('user', $user);\n $this->set('_serialize', ['user']);\n }", "title": "" }, { "docid": "c0733d0828ca848bdcd29d598489d740", "score": "0.5792017", "text": "private function _user_info(){\n if ( $this->get_id() ){\n if ( !empty($this->get_session('cfg')) ){\n $this->cfg = $this->get_session('cfg');\n $this->id_group = $this->get_session('id_group');\n }\n else if ( $d = $this->db->rselect(\n $this->class_cfg['tables']['users'],\n array_unique(array_values($this->fields)),\n x::merge_arrays(\n $this->class_cfg['conditions'],\n [$this->fields['active'] => 1],\n [$this->fields['id'] => $this->id]))\n ){\n $r = [];\n foreach ( $d as $key => $val ){\n $this->$key = $val;\n $r[$key] = $key === $this->fields['cfg'] ? json_decode($val, true) : $val;\n }\n $this->cfg = $r['cfg'] ?: [];\n // Group\n $this->id_group = $r['id_group'];\n $this->session->set($r, self::$un);\n $this->save_session();\n }\n }\n return $this;\n }", "title": "" }, { "docid": "28121ab9b5b6a3b4b54290b53ecfba22", "score": "0.5785752", "text": "protected function createUserObjectFromSession(){\n\t\t$user =null;\n\t\tif (isset($_SESSION['user']['id'])) {\n\t\t\t$id = $_SESSION['user']['id'];\n\t\t\t\n\t\t\t//refreshing logintime - always the time of the last action\n\t\t\t$_SESSION['user']['logintime'] = date('Y-m-d H:i');\n\t\t\tswitch($_SESSION['user']['type']) {\n\t\t\tcase 0:\n\t\t\tcase 1:\t\n\t\t\t\t//admin = 0; guardian = 1\n\t\t\t\tif (isset($id) ){\n\t\t\t\t\t//Debug::writeDebugLog(__method__,\"create with ID: \".$id);\n\t\t\t\t\t}\n\t\t\t\t$user = Model::getInstance()->getUserById($id);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t//Teacher\n\t\t\t\t$user = Model::getInstance()->getTeacherByTeacherId($id);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t//StudentUser\n\t\t\t\t$user = Model::getInstance()->getStudentUserById($id);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$user = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tself::$user = $user;\n\t\t\t\n\t\t} else {\n\t\t\t//Debug::writeDebugLog(__method__,\"unlogic call!\");\n\t\t\t//die(\"How did you get here?\");\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "7336b05e3e114a122f67db4421beadd2", "score": "0.5783045", "text": "public function registrarUsuario($nom_user,$tel_user,$correo_user,$dir_user,$user,$pass_user,$fecha_ingreso,$cat_user,$est_user,$suc_user,$cod_user){\n\n\t\t$conectar= parent::conexion();\n\t\tparent::set_names(); \n\n\t\t$sql=\"insert into usuarios values (null,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t$sql=$conectar->prepare($sql);\n\t\t$sql->bindValue(1, $nom_user);\n\t\t$sql->bindValue(2, $tel_user);\n\t\t$sql->bindValue(3, $correo_user);\n\t\t$sql->bindValue(4, $dir_user);\n\t\t$sql->bindValue(5, $user);\n\t\t$sql->bindValue(6, $pass_user);\n\t\t$sql->bindValue(7, $fecha_ingreso);\n\t\t$sql->bindValue(8, $cat_user);\n\t\t$sql->bindValue(9, $est_user);\n\t\t$sql->bindValue(10, $suc_user);\n\t\t$sql->bindValue(11, $cod_user);\n\n\t\t$sql->execute();\n\n\t\t$id_usuario = $conectar->lastInsertId();\n\n $str = '';\n $detalles = array();\n $detalles = json_decode($_POST['permisosUser']);\n \n foreach($detalles as $d=>$v){\n $permisos = $v->permisos;\n $sql_detalle= \"insert into usuario_permiso values(null,?,?)\";\n $sql_detalle=$conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $id_usuario);\n $sql_detalle->bindValue(2, $permisos);\n $sql_detalle->execute();\n\t }\n\t//fin, función registrarUsuario\n }", "title": "" }, { "docid": "8604de1b762cd7ea0bb6fff3453e118f", "score": "0.5781212", "text": "public function datosUsuario($usuario){\n\n $conexion = $this->getConnection();\n\n\n $consulta=$conexion->prepare('select * from usuarios where email=?');\n\n $usu=$usuario;\n \n $consulta->bindParam(1, $usu);\n\n if($consulta->execute()){\n while ($fila=$consulta->fetch()){ \n $dev=$fila;\n $nuevoUsuario = new Usuario($dev['nombre'], $dev['apellido'], $dev['email'], \n $dev['telefono'], $dev['id'], $dev['pass'], $dev['pais'], $dev['provincia'],\n $dev['localidad'], $dev['calle'], $dev['detalle'], $dev['cp'],$dev['tipo']); \n };\n }\n if(isset($dev)){\t\n return $nuevoUsuario;\n }\n\n }", "title": "" }, { "docid": "f4ea63842ef0be43b9513c872dd1ad3f", "score": "0.5781039", "text": "public function store(Request $request)\n {\n\n $request->validate([\n\n 'Correo'=>'required',\n 'nombre'=>'required',\n 'contraseña'=>'required'\n\n ]);\n //////////bitacora////////\n $id=auth()->user()->persona_id;\n $persona=persona::findOrFail($id);\n $bitacora=new bitacora();\n $bitacora->usuario=$persona->nombre;\n $bitacora->tabla='crear de user';\n $bitacora->descripcion='el usuario'. $persona->nombre.'ingreso a las '.date(\"Y-m-d H:i:s\");;\n $bitacora->user_id=auth()->user()->id;\n $bitacora->save();\n ////////////////\n $user=new User();\n $user->name=$request->nombre;\n $user->email=$request->Correo;\n $user->password=bcrypt($request->input('contraseña'));\n if($request->hasFile('imagen')) {\n $imagen=$request->file('imagen')->store('public/img');\n $url=Storage::url($imagen);\n $user->imagen=$url;\n }\n $user->imagen='/storage/img/usuario.png';\n $user->persona_id=$request->cajeros;\n $user->save();\n $role=Role::findOrFail($request->role_id);\n $user->assignRole($role->name);\n return redirect()->back()->with('usuario ya creado');\n\n\n\n }", "title": "" }, { "docid": "571b432b56b6df5e91ecfd6511bcaac9", "score": "0.5779469", "text": "function bajaUser(){\n\n\t\t//Creamos un objeto para insertar nueva carpeta en BD\n\t\trequire_once CARPETAMODELOS . \"carpetas.php\";\n $this->modeloCarpetas = new modeloCarpetas;\n\t\t//Recogemos el id de usuario\n\t\t$idUser = $_SESSION['idUser'];\n\t\t//seleccionamos la primera carpeta del usuario\n\t\t$datosCarpeta = $this->modeloCarpetas->recogeCarpeta($idUser, null);\n\t\t//borramos la carpeta y lo que hay dentro de la base de datos\n\t\t$this->modeloCarpetas->eliminarCarpeta($datosCarpeta['ID_CARPETA']);\n\t\t//Borramos la carpeta y lo que hay dentro de la fisica:\n\t\t$source = \"CARPETAS/\" . $datosCarpeta['NOM_CARPETA'];\n\t\t$Orden = \"rm -R $source\";\n exec ($Orden);\n //Borramos el usuario \n $this->modelo->eliminarUsuario($idUser);\n $directorio = \"log/\" . $_SESSION['mail'] . \".txt\";\n\t\t$fp = fopen($directorio,\"a\");\n\t\tfwrite($fp, date(\"d-m-Y H:i:s\"). \" - Usuario eliminado\" . PHP_EOL);\n\t\tfclose($fp);\n\t\trequire_once CARPETAVISTAS . \"index.php\";\n \n\t\t\t\n }", "title": "" }, { "docid": "4218cf83aa8124d29e4f4ab554ba9fe9", "score": "0.57788086", "text": "public function MostrarC(){\n $user = $_SESSION[\"user\"];\n $respuesta = ActivoM::MostrarM($user);\n \n echo '<label>Nombre de Usuario</label>\n <input type=\"text\" name=\"nombre\" value=\"'.$respuesta[\"nombre\"].'\">\n <label>Nombre</label>\n <input type=\"text\" name=\"nombrep\" value=\"'.$respuesta[\"nombrep\"].'\">\n <label>Primer apellido</label>\n <input type=\"text\" name=\"paterno\" value=\"'.$respuesta[\"paterno\"].'\">\n <label>Segundo apellido</label>\n <input type=\"text\" name=\"materno\" value=\"'.$respuesta[\"materno\"].'\">\n <label>E-mail</label>\n <input type=\"text\" name=\"email\" value=\"'.$respuesta[\"email\"].'\">\n <input type=\"submit\" name=\"actualizarU\" value=\"Guardar\">';\n }", "title": "" }, { "docid": "e03c93927e4d6fa40ddeb36f19563481", "score": "0.5774657", "text": "public function editUserAction($idUser, Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('mycpBundle:country')->findAll();\n $data['countries'] = $countries;\n $data['error'] = \"\";\n $count_errors = 0;\n\n $data['edit'] = true;\n $user = $em->getRepository('mycpBundle:user')->findOneBy(array('user_id' => $idUser));\n// dump($user); die;\n\n //$data['user_role'] = $user->getUserRole();\n $request_form = $request->get('mycp_mycpbundle_client_stafftype');\n $data['password'] = $request_form['user_password']['Clave:'];\n $form = $this->createForm(new clientStaffType($data));\n\n if ($request->getMethod() == 'POST') {\n $post = $request->request->get('mycp_mycpbundle_client_stafftype');\n if ($post['user_email'] != \"\" && !Utils::validateEmail($post['user_email'])) {\n $data['error'] = 'Correo no válido';\n $count_errors++;\n }\n\n $form->handleRequest($request);\n if ($form->isValid() && $count_errors == 0) {\n $factory = $this->get('security.encoder_factory');\n $user = $em->getRepository('mycpBundle:user')->editUserStaff($idUser, $request, $this->container, $factory);\n $message = 'Usuario actualizado satisfactoriamente.';\n $this->get('session')->getFlashBag()->add('message_ok', $message);\n $service_log = $this->get('log');\n $service_log->saveLog($user->getLogDescription(), BackendModuleName::MODULE_USER, log::OPERATION_UPDATE, DataBaseTables::USER);\n return $this->redirect($this->generateUrl('mycp_backend_front'));\n }\n } else {\n\n $user = $em->getRepository('mycpBundle:user')->find($idUser);\n $data_user['user_name'] = $user->getName();\n $data_user['user_address'] = $user->getUserAddress();\n $data_user['user_email'] = $user->getUserEmail();\n $data_user['user_user_name'] = $user->getUserUserName();\n $data_user['user_last_name'] = $user->getUserLastName();\n $data_user['user_phone'] = $user->getUserPhone();\n $data_user['user_city'] = $user->getUserCity();\n $data_user['user_country'] = $user->getUserCountry()->getCoId();\n // $data_user['user_role'] = $user->getUserRole();\n $userRole = $em->getRepository('mycpBundle:role')->findOneBy(array('role_name' => $user->getUserRole()));\n $data_user['user_role'] = $userRole;\n $form->setData($data_user);\n }\n return $this->render('mycpBundle:user:newUser.html.twig', array('form' => $form->createView(), 'data' => $data, 'id_role' => '', 'edit_user' => $idUser, 'message_error' => $data[\"error\"]));\n\n }", "title": "" }, { "docid": "eb9b002ceefedab5c6e6571973eb3fee", "score": "0.57620656", "text": "public function auth($usuario, $clave){\n \t$datos = array();\n \t$data['select'] = 'u.id as iduser, u.perfil_id, u.usuario, u.fecha_ult_ingreso, u.created_at, p.email, u.estado as estadouser, CONCAT(p.nombres,\" \",p.apellidos) as nombresapellidos, p.avatar, p.descripcion';\n \t$data['tabla'] = 'usuario u';// Tabla de la base de datos\n \t$data['join'] = array(0 => array(\"tabla\" => \"persona p\", \"condicion\" => \"p.id = u.persona_id\", \"tipo\" => \"RIGHT\"));//Permite realizar joins\n \t$data['where'] = array( \n \t\t\t\t\t 0 => array(\"campo\" => \"\", \"valor\" => \"(u.usuario = '$usuario' OR p.email = '$usuario') \n\t \t\t AND password = '$clave'\", \"tipo\" => \"wherequery\"), // Condiciones\n \t\t);\n\t\t$userchek = $this->CI->Global_model->mostrar($data);\n\t\tif(!is_null($userchek)){\n\n\t\t\t if($this->ComprobarEstadoSitio() == 'Desactivado' && $userchek[0]->perfil_id !=1 or $this->ComprobarEstadoSitio() == 'Inactivo' && $userchek[0]->perfil_id !=1){\n\n\t\t\t \tswitch(ESTADO_SITIO){\n\t\t\t \t\tcase 'Desactivado':\n\t\t \t \t\t\t\t$datos['error'] = '<b>Lo Sentimos</b> Pero El <b>Sistema</b> Se Encuentra en <b>Mantenimiento.</b>';\n\t\t \t \t\t\t\tbreak;\n\n\t\t \t \t\t\t\tcase 'Inactivo':\n\t\t \t \t\t\t\t$datos['error'] = '<b>Lo Sentimos</b> Pero El <b>Sistema</b> Se Encuentra <b>Inactivo.</b';\n\t\t \t \t\t\t\tbreak;\n\t\t\t \t}\n\t\t\t }\n\t\t \t else{\n\t\t \t \t\tswitch ($userchek[0]->estadouser){\n\t\t\t \t\t\tcase 'Activado':\n\t\t\t \t\t\t\t $data = array('usuariosesion' => array(\n 'login' => TRUE,\n 'usuario_id' => $userchek[0]->iduser,\n 'avatar' => $userchek[0]->avatar,\n 'nombres' => $userchek[0]->nombresapellidos,\n 'perfilid' => $userchek[0]->perfil_id,\n 'usuario' => $userchek[0]->usuario,\n 'email' => $userchek[0]->email,\n 'fecha_registro' => str_replace('-', '/', $userchek[0]->created_at),\n 'fecha_ult_ingreso' => str_replace('-', '/', $userchek[0]->fecha_ult_ingreso),\n 'estado' => $userchek[0]->estadouser,\n 'perfilnombre' => $this->perfil($userchek[0]->perfil_id),\n 'descripcion' => $userchek[0]->descripcion,\n \t)\n\t\t\t \t\t\t\t);\n\t\t\t \t\t\t\t $this->CI->session->set_userdata($data);\n\n\t\t\t \t\t\t\t $datosupdate['tabla'] = 'usuario';\n\t\t\t \t\t\t\t $datosupdate['where'] = array( \n\t\t\t\t \t\t\t\t\t 0 => array(\"campo\" => \"id\", \"valor\" => $userchek[0]->iduser, \"tipo\" => \"where\"), // Condiciones\n\t\t\t\t \t\t );\n\t\t\t\t \t\t $datosactualizar = ['fecha_ult_ingreso' => FECHAGESTOR];\n\t\t\t \t\t\t\t $this->CI->Global_model->actualizar($datosupdate, $datosactualizar);\n\n\t\t\t \t\t\t\t $datos['success'] = '<b>Datos Correctos!</b> bienvenido estimado Usuario. Ingresando a administraci&oacute;ne.</b>';\n\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\t\n\t\t\t \t\t\tcase 'Desactivado':\n\t\t\t \t\t\t\t$datos['error'] = 'Usuario <b>'.$usuario.'</b> se encuentra <b>Desactivado</b>';\n\t\t\t \t\t\t\tbreak;\n\n\t\t\t \t\t\t\tcase 'Bloqueado':\n\t\t\t \t\t\t\t$datos['error'] = 'Usuario <b>'.$usuario.'</b> se encuentra <b>Bloquedo</b>';\n\t\t\t \t\t\t\tbreak;\n\n\t\t\t \t\t\tdefault:\n\t\t\t \t\t\t\t$datos['error'] = 'No <b>existe</b> Ningun <b>estado</b> Comuniquese con el <b>administrador</b>';\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t}\n\t\t \t\t}\t\n\t\t}else{\n\n\t\t\t$data['tabla'] = 'usuario u';// Tabla de la base de datos\n \t\t$data['join'] = array(0 => array(\"tabla\" => \"persona p\", \"condicion\" => \"p.id = u.persona_id\", \"tipo\" => \"RIGHT\"));//Permite realizar joins\n \t\t$data['where'] = array( \n \t\t\t\t\t 0 => array(\"campo\" => \"\", \"valor\" => \"(u.usuario = '$usuario' OR p.email = '$usuario')\", \"tipo\" => \"wherequery\"), // Condiciones\n \t\t);\n\n\t\t\t$userintent = $this->CI->Global_model->mostrar($data);\n\t\t\tif (!is_null($userintent)) {\n\t\t\t\t$datos['error'] = 'La <b>Contraseña</b> Ingresada no es la correcta';\n\t\t\t}else{\n\t\t\t\t$datos['error'] = 'El Usuario <b>'.$usuario.'</b> No <b>existe</b> en nuestra <b>Base de Datos</b>';\n\t\t\t}\n\t\t}\n\n\t\treturn $datos;\n }", "title": "" }, { "docid": "ca87269aac7aebdcb1eece38bde45ffa", "score": "0.57580096", "text": "public function form($user)\n {\n\n }", "title": "" }, { "docid": "543873a525640dc948449d53d570ff9f", "score": "0.57524693", "text": "public function profilAction(Request $request) {\n\n $user = $this->getUser();\n\n // on vérifie que l'utilisateur est bien connécté\n $em = $this->getDoctrine()->getManager(); // récupère l'objet ORM Doctrine\n $visiteur = $em->getRepository('CRGSBRBundle:visiteur')->find($user);\n // créer le formulaire \n $form = $this->get('form.factory')->createBuilder('form', $visiteur)\n ->add('nom', 'text')\n ->add('prenom', 'text')\n ->add('adresse', 'text')\n ->add('cp', 'number')\n ->add('ville', 'text')\n ->add('dateEmbauche', 'date', array(\n 'widget' => 'single_text'))\n ->add('username', 'text')\n ->add('mdp', 'password')\n ->add('Mettre_à_jour', 'submit')\n ->getForm();\n\n if ($form->handleRequest($request)->isValid()) { // vérifie que le formulaire est valide\n $em->persist($visiteur); // persiste la nouvelle entité modifié\n $em->flush(); // enregistre en BDD\n $request->getSession()->getFlashBag()->add('success', 'Le profil a bien été modifié');\n }\n\n return $this->render('CRGSBRBundle:Home:profil.html.twig', array(\n 'form' => $form->createView(), // créer la vue du formulaire\n ));\n }", "title": "" }, { "docid": "6083538fb5c5b4083b7b2d6965941cae", "score": "0.57520807", "text": "protected function getOroUser_Form_Type_UserService()\n {\n if (!isset($this->scopedServices['request'])) {\n throw new InactiveScopeException('oro_user.form.type.user', 'request');\n }\n\n return $this->services['oro_user.form.type.user'] = $this->scopedServices['request']['oro_user.form.type.user'] = new \\Oro\\Bundle\\UserBundle\\Form\\Type\\UserType($this->get('security.context'), $this->get('request'));\n }", "title": "" }, { "docid": "a882b9e69aace9a9279d856bb3aba89a", "score": "0.57481587", "text": "public function do_cadastro() {\n\n\t\t$this->load->library('session');\n\t\t$this->load->helper('url');\n\n\t\t// fazer alguma coisa somente quando rota vier por post e se ou não houver ninguém logado\n\t\t// ou caso quem esteja logado seja adm\n\t\tif($this->input->post() && (!$this->session->user || $this->session->is_adm)) {\n\n\t\t\t// validação guy\n\t\t\t$this->load->library('form_validation');\n\n\t\t\t$this->form_validation->set_rules('nome', 'Nome', 'required|trim|max_length[500]');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required|trim|max_length[100]|valid_email');\n\t\t\t$this->form_validation->set_rules('senha', 'Senha', 'required');\n\t\t\t$this->form_validation->set_rules('sexo', 'Sexo', 'required|in_list[masculino,feminino]');\n\t\t\t$this->form_validation->set_rules('telefone', 'Telefone', 'required|trim|max_length[13]|numeric');\n\n\t\t\t// pra uso no elements()\n\t\t\t$user_infos = ['nome', 'email', 'senha', 'sexo', 'telefone'];\n\n\t\t\t// se um adm estiver logado, é possível que ele cadastre um novo adm. nesse caso, considerar\n\t\t\t// o possível campo 'super' (suposto que seja uma checkbox ou switch (materialize))\n\t\t\tif(isset($this->session->is_adm)) {\n\t\t\t\t$user_infos []= 'super';\n\t\t\t}\n\n\t\t\t// se houver um valor pra super, bota logo true\n\t\t\t$user_data = $this->elements($user_infos, $this->input->post());\n\t\t\tif(isset($user_data['super'])) {\n\t\t\t\t$user_data['super'] = true;\n\t\t\t}\n\n\t\t\t// sha256 guy\n\t\t\t$this->load->helper('security');\n\t\t\t$user_data['senha'] = do_hash($user_data['senha'], 'sha256');\n\n\t\t\t// taca\n\t\t\t$this->load->model('UsuarioDAO', 'udao');\n\t\t\t$this->udao->insert($user_data);\n\n\t\t\t// configs email\n\t\t\t$config = Array(\n\t\t\t 'protocol' => 'smtp',\n\t\t\t 'smtp_host' => 'ssl://smtp.googlemail.com',\n\t\t\t 'smtp_port' => 465,\n\t\t\t 'smtp_user' => '[email protected]',\n\t\t\t 'smtp_pass' => 'webdeveloper123',\n\t\t\t 'mailtype' => 'html',\n\t\t\t\t\t'smtp_timeout' => '4',\n\t\t\t 'charset' => 'utf-8'\n\t\t\t);\n\t\t\t$this->load->library('email',$config);\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t// enviando o email\n\t\t\t$this->email->from('[email protected]','admin');\n\t\t\t$this->email->to($user_data['email']);\n\t\t\t$this->email->subject('Mensagem Automática: Inscrição Gamelibray');\n\t\t\t$this->email->message('Obrigado por ser registrar em nosso site. ');\n\t\t\tif ($this->email->send()){\n\t\t\t\t// entregue ;)\n\t\t\t\tredirect('controller/index');\n\t\t\t} else{\n\t\t\t\techo $this->email->print_debugger();\n\t\t\t}\n\t\t} else {\n\t\t\t// o redirect eh o mesmo, mas poderia ser diferente...\n\t\t\tredirect('controller/index');\n\t\t}\n\t}", "title": "" }, { "docid": "497a04623dad214079b988245b25dac2", "score": "0.5746106", "text": "public function editarUsuarioCompleto($idUsuario,$nombre,$apellido,$email,$password,$modificado,$telefono,$foto_usuario){\n// Observe que también cambiamos a BCRYPT, que tendrá siempre 60 caracteres.\n$opciones = ['cost' => 12];\n$contrasenaFinal = password_hash($password, PASSWORD_BCRYPT,$opciones);\n\n // Aqui verifico de que el correo no este dentro del sistema\n $sqlCorreo = \"SELECT id,nombres,apellidos,email,telefono,creado,foto_usuario,permiso FROM usuarios WHERE email='$email'\";\n $revisarCorreo = ejecutarConsultaSimpleFila($sqlCorreo);\n\nif($revisarCorreo > 0){\n \t$idRevisar = $revisarCorreo['id'];\nif ($idUsuario == $idRevisar) {\n\nif ($foto_usuario=='user-default.jpg') {\n// Actualizando el documento\n$sql2 = \"UPDATE usuarios SET nombres='$nombre', apellidos='$apellido', email='$email',password='$contrasenaFinal', modificado='$modificado', telefono='$telefono' WHERE id = '$idUsuario'\";\n\n$insert = ejecutarConsulta($sql2);\nif($insert){\n $sql = \"SELECT * FROM usuarios WHERE id='$idUsuario'\";\n $prevUser = ejecutarConsultaSimpleFila($sql);\n if($prevUser > 0){\n // Aqui asigno la id del usuario a la session\n $sessionUsuario['usuario']['id'] = $prevUser['id'];\n $sessionUsuario['usuario']['nombre'] = $prevUser['nombres'];\n $sessionUsuario['usuario']['apellido'] = $prevUser['apellidos'];\n $sessionUsuario['usuario']['email'] = $prevUser['email']; \n $sessionUsuario['usuario']['telefono'] = $prevUser['telefono'];\n $sessionUsuario['usuario']['foto_usuario']=$prevUser['foto_usuario'];\n $sessionUsuario['usuario']['permiso']=$prevUser['permiso'];\n $sessionUsuario['usuario']['creado']=$prevUser['creado'];\n $_SESSION['DatosUsuario'] = $sessionUsuario;\n }\n\n $sessData['estado']['type'] = 'success';\n $sessData['estado']['msg'] = 'Se actualizo el usuario.';\n\n\n}else{\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'Ha ocurrido algún problema, por favor intente de nuevo.';\n}\n}else{\n// Actualizando el documento\n$sql2 = \"UPDATE usuarios SET nombres='$nombre', apellidos='$apellido', email='$email',password='$contrasenaFinal', modificado='$modificado', telefono='$telefono', foto_usuario='$foto_usuario' WHERE id = '$idUsuario'\";\n\n$insert = ejecutarConsulta($sql2);\nif($insert){\n\n$sql = \"SELECT * FROM usuarios WHERE id='$idUsuario'\";\n $prevUser = ejecutarConsultaSimpleFila($sql);\n if($prevUser > 0){\n // Aqui asigno la id del usuario a la session\n $sessionUsuario['usuario']['id'] = $prevUser['id'];\n $sessionUsuario['usuario']['nombre'] = $prevUser['nombres'];\n $sessionUsuario['usuario']['apellido'] = $prevUser['apellidos'];\n $sessionUsuario['usuario']['email'] = $prevUser['email']; \n $sessionUsuario['usuario']['telefono'] = $prevUser['telefono'];\n $sessionUsuario['usuario']['foto_usuario']=$prevUser['foto_usuario'];\n $sessionUsuario['usuario']['permiso']=$prevUser['permiso'];\n $sessionUsuario['usuario']['creado']=$prevUser['creado'];\n $_SESSION['DatosUsuario'] = $sessionUsuario;\n }\n\n $sessData['estado']['type'] = 'success';\n $sessData['estado']['msg'] = 'Se actualizo el usuario.';\n}else{\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'Ha ocurrido algún problema, por favor intente de nuevo.';\n }\n}\n\n\n}else{\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'Este email ya esta en uso en el sistema por favor ingresa otro email.';\n}\n}else{\n}\n\necho json_encode($sessData);\n\n}", "title": "" }, { "docid": "d1d4d784c7634bc8c9908ac4def911fc", "score": "0.57257813", "text": "protected function form()\n {\n $userModel = config('admin.database.users_model');\n $roleModel = config('admin.database.roles_model');\n\n $form = new Form(new $userModel());\n\n $form->display('id', 'ID');\n\n if (request()->isMethod('POST')) {\n $userTable = config('admin.database.users_table');\n $userNameRules = \"required|unique:{$userTable}\";\n } else {\n $userNameRules = 'required';\n }\n\n $form->text('username', '登录用户名')->rules($userNameRules);\n $form->text('name', '渠道昵称')->rules('required');\n $form->image('avatar', trans('admin.avatar'));\n $form->password('password', trans('admin.password'))->rules('required|confirmed');\n $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required')\n ->default(function ($form) {\n return $form->model()->password;\n });\n\n $form->ignore(['password_confirmation']);\n\n // 排除超级管理员\n $form->multipleSelect('roles', trans('admin.roles'))\n ->options($roleModel::all()->where('id', '!=', 1)->pluck('name', 'id'));\n\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n $form->footer(function (Form\\Footer $footer) {\n $footer->disableViewCheck();\n });\n\n return $form;\n }", "title": "" }, { "docid": "6f57734e9f862aa1f666bd435c35ed91", "score": "0.5725137", "text": "function registrarse(){\n\t\t //Recogemos los datos \n\t\t\t$correo = $_POST['correo'];\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\t$apellidos = $_POST['apellidos'];\n\t\t\t$contrasenya = $_POST['contrasenya'];\n\t\t\t//Miramos si el correo coincide con alguno de la base de datos:\n \t$usuario = $this->modelo->existeUsuari($correo);\n \tif($usuario==true){\n \t\t$error=\"Correo ya existente!\";\n\t\t\t\trequire_once CARPETAVISTAS . \"index.php\";\n \t}\n \telse {\n\t\t\t\t//Cogemos la imagen y la subimos\n\t\t\t\tif (is_uploaded_file ($_FILES['imagen']['tmp_name'])){\n\t\t \t$nombre = $_FILES['imagen']['name'];\n\t\t \t//movemos archivo a la carpeta\n\t\t \t$directorio = \"IMAGENES/USUARIS/\";\n\t \t$idUnico = time();\n\t \t$nombreFichero = $idUnico . \"-\" . $nombre;\n\t \tmove_uploaded_file ($_FILES['imagen']['tmp_name'], $directorio . $nombreFichero);\n\t \t$nombreCompleto = $directorio . $nombreFichero;\n\t \t}\n\t \telse $nombreCompleto = \"IMAGENES/USUARIS/no_avatar.jpeg\";//COgemos la de por defecto\n\t \t\n\t\t\t\t$nombre = $_POST['nombre'];\n\t\t //Creamos una array para pasar todos los datos al metodo para subir el usuario a la base de datos\n\t\t $datosUsuari = array(\n\t\t \t\t\"correo\"=>$correo,\n\t\t \t\t\"nombre\"=>$nombre,\n\t\t \t\t\"apellidos\"=>$apellidos,\n\t\t \t\t\"contrasenya\"=>$contrasenya,\n\t\t \t\t\"imagen\"=>$nombreCompleto,\n\t\t \t);\n\t\t $this->modelo->registrarse($datosUsuari);\n\t\t $error=\"Usuario creado correctamente!\";\n\t\t //Creamos la carpeta de usuario\n\t\t mkdir(\"CARPETAS/\".$correo, 0777);\n\t\t //Recogemos los datos de usuario por que necesitamos el id para crear la carpeta en la BD\n\t\t $datosUsuario = $this->modelo->recogerUsuario($correo);\n\t\t //Creamos un objeto para insertar nueva carpeta en BD\n\t\t require_once CARPETAMODELOS . \"carpetas.php\";\n \t\t$this->modeloCarpetas = new modeloCarpetas;\n \t\t$this->modeloCarpetas->crearCarpetaPersonal($datosUsuario);\n\t\t\t\trequire_once CARPETAVISTAS . \"index.php\";\n \t}\n\t\t\t\n }", "title": "" }, { "docid": "66fc48910e6e8c1fb2936ded933f86f1", "score": "0.5723173", "text": "public function register(Request $req){\n\n $json = $req->input('json', null);\n\n $params = json_decode($json); //objeto\n $params_array = json_decode($json, true);\n\n\n if (!empty($params) && !empty($params_array)) {\n //Limpiar datos\n\n $params_array = array_map('trim', $params_array);\n\n //Validar datos\n\n $validate = \\Validator::make($params_array,[\n 'name' => 'required|alpha',\n 'surname' => 'required|alpha',\n 'mail' => 'required|email|unique:users',\n 'password' => 'required',\n 'docNumber' => 'required|unique:users'\n ]);\n\n if ($validate->fails()) {\n //La validacion falla\n\n $data = array(\n \"status\" => 'error',\n \"code\" => 404,\n \"message\" => 'el usuario no se ha creado correctamente',\n \"errors\" => $validate->errors()\n );\n }else{\n //La validacion ha ido correcta\n\n //Cifrar pass\n\n $pwd = hash('sha256',$params->password);\n\n //Crear usuario\n\n $user = new User();\n $user->name = $params_array['name'];\n $user->surname = $params_array['surname'];\n $user->mail = $params_array['mail'];\n $user->password = $pwd;\n $user->docNumber = $params_array['docNumber'];\n $user->accepted = $params_array['accepted'];\n $user->role = 'ROLE_USER';\n\n //Guardar Usuario\n\n if ($params_array['accepted']==1) {\n $userA = new UsersAccepted();\n $userA->name = $params_array['name'];\n $userA->surname = $params_array['surname'];\n $userA->mail = $params_array['mail'];\n $userA->password = $pwd;\n $userA->docNumber = $params_array['docNumber'];\n $userA->accepted = $params_array['accepted'];\n $userA->role = 'ROLE_USER';\n $userA->save();\n }\n\n $user->save();\n\n $data = array(\n \"status\" => 'success',\n \"code\" => 200,\n \"message\" => 'el usuario se ha creado correctamente',\n 'user' => $user\n );\n }\n }else{\n $data = array(\n \"status\" => 'error',\n \"code\" => 404,\n \"message\" => 'los datos enviados no son correctos'\n );\n }\n\n return response()->json($data, $data['code']);\n }", "title": "" }, { "docid": "6b8ad6c33f1f74a737ac1499a969a304", "score": "0.57178634", "text": "function creaUsuarioDeCliente(Request $request,$password,$idCliente){\n \tif ($request) {\n \t\ttry{ \t\t\t \n\t\t \t$usuario = new User ();\n\t\t \t$usuario->idperfil = Constantes::PERFIL_ADMIN_CLIENTE;\n\t\t \t$usuario->name \t = trim($request->get ('nombreResponsable'));\n\t\t \t$usuario->paterno = trim($request->get ('paternoResponsable'));\n\t\t \t$usuario->materno = trim($request->get ('maternoResponsable'));\n\t\t \t$usuario->email = strtolower(trim($request->get ('emailResponsable')));\n\t\t \t$usuario->password = $password;\n\t\t \t$usuario->dummy = true;\n\t\t \t$usuario->activo = true;\n\t\t \t$usuario->idcliente = $idCliente;\n\t\t \t$usuario->idempresa = Session::get('idUser');\n\t\t \t$usuario->save ();\n \t\t}\n\t \tcatch ( \\Exception $e ) {\n \t\t\tthrow $e;\n\t \t} \n \t}\n }", "title": "" }, { "docid": "2f1888a2e52b8fca3482f9d691d5e1d2", "score": "0.5716312", "text": "public function login() {\n define('TENTATIVAS_ACEITAS', 4);\n\n // Constante com a quantidade minutos para bloqueio\n define('MINUTOS_BLOQUEIO', 30);\n $usuario = $this->contexto->get('login');\n $senha = $this->contexto->get('senha');\n \n $modeloUsuario = new ModeloUsuarios();\n $dados= $modeloUsuario->buscarusuario($usuario,$senha);\n if ($dados==true){\n \n echo \"Encontrei\";\n $this->sessao->add('idUser', $dados->id);\n $this->sessao->add('Usuario', $dados->login);\n $this->sessao->add('telefone', $dados->telefone);\n $this->sessao->add('email', $dados->email);\n \n echo $this->sessao->get('idUser');\n echo $this->sessao->get('Usuario');\n echo $this->sessao->get('telefone');\n echo $this->sessao->get('email');\n \n /*echo $dados->id;\n echo $dados->login;\n echo $dados->senha;\n echo $dados->telefone;\n echo $dados->email;*/ \n echo '<script>location.href = \"tela-adm\"</script>';\n }else {\n echo \"Usuário e/ou Senha Inválido\";\n }\n /*\n $User = new Usuario();\n $User->setUsername($username);\n $senha += 'ERTYUI';\n $senha = md5($senha);\n $User->setSenha($senha);\n $mUser = new MUsuario();\n //$result = $mUser->ler($User);\n\n if ($mUser->ler($User)) {\n $this->sessao->add('username', $User->getUsername());\n // $this->sessao->add('senha', $User->getSenha());\n // echo 'logado';\n echo '<script>location.href = \"logado\"</script>';\n// $response = new RedirectResponse('//logado');\n// $response->send();\n } else {\n echo 'nao logado';\n }\n\n if ($this->sessao->existe('ez')) {\n echo json_encode($_SESSION);\n exit();*/\n }", "title": "" }, { "docid": "1dbcd1d7706f2f7058235d05ca677962", "score": "0.57125664", "text": "public function store(Request $request)\n {\n $user = new User();\n \n $validarDatos = Validator::make($request->all(),\n [\n 'username'=>'required|max:16|unique:users,username',\n 'password'=>'required|max:30',\n 'fecha_nacimiento'=>'required',\n 'email'=>'required|max:30|unique:users,email',\n 'id_comuna'=>'required',\n ],\n [\n 'username.unique'=>'El nombre de usuario ya existe',\n 'username.required'=>'Debe ingresar un nombre de usuario',\n 'password.required'=>'Debe ingresar una contraseña',\n 'fecha_nacimiento.required'=>'Debe ingresar una fecha de nacimiento',\n 'email.required'=>'Debe ingresar un correo electronico',\n 'email.unique'=>'El correo electronico ya existe',\n 'id_comuna.required'=>'Debe ingresar un id de comuna'\n ]\n );\n\n if ($validarDatos->fails()){\n //Si el logueo no fue correcto\n return back()->with('registerError', $validarDatos->errors());\n }\n\n $user->username= $request->username;\n $user->password= Hash::make($request->password); //Se encripta la contraseña\n $user->fecha_nacimiento= $request->fecha_nacimiento;\n $user->monedero= 0.0;\n $user->email= $request->email;\n $user->id_comuna= $request->id_comuna;\n $user->id_tipo_usuario= 1;\n\n $user->save();\n\n return redirect()->route('vistaIndice')->with('register','Te has registrado con exito !');\n\n }", "title": "" }, { "docid": "36850e75458e6b92b73909793be870c9", "score": "0.57091314", "text": "public function update(Request $request){\n // usando User::find($idProduto)\n //Vai ser necessario usar rotas com parametro \n \n $usuario = User::find($request->idUsuario);\n \n $usuario->name = $request->nomeUsuario;\n $usuario->email = $request->emailUsuario;\n $usuario->password = $request->passwordUsuario;\n $usuario->perfil = $request->perfilUsuario;\n $usuario->status = $request->statusUsuario;\n \n $result = $usuario->save();\n \n return view('formUpdateUsuario', [\"result\"=>$result]);\n }", "title": "" }, { "docid": "49dadd55109c3779433cef97481df753", "score": "0.57073057", "text": "public function tipoBusquedaUsuarios(){\n\t\t\t// Recuperamos el texto de búsqueda de la variable de formulario\n\t\t\t$tipoBusqueda = $_REQUEST[\"tipoBusqueda\"];\n\t\t\t// Lanzamos la búsqueda y enviamos los resultados a la vista de lista de incidencias\n\t\t\t$data['listaUsuarios'] = $this->usuario->getOrder($tipoBusqueda);\n\t\t\t$data['msjInfo'] = \"Busquedas ordenadas por: \\\"$tipoBusqueda\\\"\";\n\t\t\t$this->vista->mostrar(\"usuario/mostrarUsuarios\", $data);\n\t\t}", "title": "" }, { "docid": "b403c8df607c3b201745aa16e6f02627", "score": "0.5707211", "text": "public function __construct(User $usuario)\n {\n $this->usuario = $usuario;\n }", "title": "" }, { "docid": "a118045a212c653914a689fee6039452", "score": "0.5700792", "text": "public function nuevoProyectoAction(Request $request)\n {\n if (!($this->getRequest()->isXmlHttpRequest())) // Verifica si la petición No es de AJAX \n {\n return $this->render('SisproBundle:Plantillas:prohibido.html.twig');\n }\n $proyecto = new Proyecto();\n \n $formulario = $this->createForm(new ProyectoType(), $proyecto);\n \n if ($request->isMethod('POST')) \n { \n $paquete = $request->request->get('proyecto');\n $data = $request->request->get('data'); \n\n $formulario->bind($request); \n \n if ($formulario->isValid())\n { \n // Buscamos la Parroquia \n $parroquia = $this->getDoctrine()\n ->getRepository('SisproBundle:Parroquia')\n ->find($data['idParroquia']); \n // Buscamos el Poblado\n $poblado = $this->getDoctrine()\n ->getRepository('SisproBundle:Poblado')\n ->find($data['idPoblado']);\n \n // Buscamos el estatus\n $estatus = $this->getDoctrine()\n ->getRepository('SisproBundle:Estatus')\n ->find(1); \n \n $proyecto->setEstatus($estatus);\n $proyecto->setParroquia($parroquia);\n $proyecto->setPoblado($poblado);\n $proyecto->setUsuario($this->getUser());\n $proyecto->setEstructura($this->getUser()->getEstructura());\n $proyecto->setMeta(0);\n $proyecto->setPobFemenina(0);\n $proyecto->setPobMasculina(0);\n $proyecto->setPobTotal(0);\n $proyecto->setEmpleosDirectosEjecucion(0);\n $proyecto->setEmpleosIndirectosEjecucion(0);\n $proyecto->setEmpleosDirectosOperacion(0);\n $proyecto->setEmpleosIndirectosOperacion(0);\n $proyecto->setNacional(false); \n $proyecto->setFechaRegistro(new \\DateTime('now'));\n \n // CODIGO AUTOGENERADO\n $ente = $this->getUser()->getEstructura()->getSiglas2();\n $estado = $parroquia->getMunicipio()->getEstado()->getSigla(); \n $ahora = getdate(time());\n $year= substr($ahora['year'],-2);\n $fecha1 = new \\DateTime($ahora['year'].'-1-1');\n $fecha2 = new \\DateTime($ahora['year'].'-12-31');\n \n $em = $this->getDoctrine()->getManager();\n $query = $em->createQuery('SELECT MAX(p.codigo)\n FROM SisproBundle:Proyecto p \n JOIN p.estructura e\n JOIN p.parroquia q\n JOIN q.municipio m\n JOIN m.estado s \n WHERE p.estructura = :estructura\n AND m.estado = :estado\n AND p.fechaRegistro >= :fecha1\n AND p.fechaRegistro <= :fecha2')\n ->setParameter('estructura', $this->getUser()->getEstructura())\n ->setParameter('estado', $parroquia->getMunicipio()->getEstado())\n ->setParameter('fecha1', $fecha1 )\n ->setParameter('fecha2', $fecha2 );\n\n $codigoActual=$query->getResult(\\Doctrine\\ORM\\Query::HYDRATE_SINGLE_SCALAR); \n \n $codigoActual=($codigoActual == null)? array(0, 0, 0):split('-', $codigoActual);\n \n $nro = (intval($codigoActual[2])+1); \n \n if ($nro > 999 or $nro < 1)\n die (json_encode(array('error'=>'HA SUPERADO EL LÍMITE DE PROYECTOS (999)')));\n elseif ($nro > 99) $nro;\n elseif ($nro > 9) $nro = '0'.$nro;\n else $nro = '00'.$nro;\n \n $codigo= $ente.'-'.$estado.$year.'-'.$nro;\n \n $proyecto->setCodigo($codigo);\n \n $error='';\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($proyecto);\n try { \n $em->flush();\n } catch (\\Exception $e) { // Atrapa Error del servidor\n if(stristr($e->getMessage(), 'Not null violation')) \n {\n $error='Debe llenar todos los campos correctamente';\n }\n else if(stristr($e->getMessage(), 'Unique violation')) \n {\n $error='Proyecto Duplicado en el Servidor';\n }\n else $error = $e->getMessage();\n \n die (json_encode(array('error'=>$error)));\n }\n \n $data['proyecto'] = $proyecto;\n \n if (!$this->_setCoordenadas($data)) \n die (json_encode(array('error'=>'Error Registrando Coordenadas')));\n \n // GUARDA LA ACCION EN LA BITACORA;\n $bitacora= new Bitacora();\n $registro='Registro de Proyecto: '.$proyecto->getCodigo().' - '.\n $proyecto->getNombre().'. Realizado por: ';\n $registro.=$this->getUser()->__toString(). '('.$this->getUser()->getCorreo().')';\n \n $bitacora->setRegistro($registro);\n $bitacora->setEntidad('Proyecto');\n $bitacora->setAccion('INSERT');\n $bitacora->setUsuario($this->getUser());\n $bitacora->setIp($_SERVER['REMOTE_ADDR']);\n //$bitacora->setIp($this->get('request')->getClientIp());\n $bitacora->setUserAgent($this->getRequest()->headers->get('user-agent'));\n $bitacora->setFecha(new \\DateTime('now'));\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($bitacora); \n try { \n $em->flush();\n } catch (\\Exception $e) { // Atrapa Error del servidor\n $error='Ocurrió un error al registrar en la Bitácora.'.$e->getMessage(); \n die (json_encode(array('error'=>$error)));\n } \n\n // REGISTRO EXITOSO: PASAMOS EL CONTROL A EDICION FORMULARIO 02\n die (json_encode(array('error'=>$error, 'idProyecto'=>$proyecto->getId())));\n }\n } \n \n $data['estados'] = $this->_getComboEstados(isset($data['idEstado'])?$data['idEstado']:0);\n \n return $this->render('SisproBundle:Proyectos:nuevo.html.twig',\n array('formulario' => $formulario->createView(),\n 'data' => $data,) ); \n }", "title": "" }, { "docid": "d9d84be2e5b0a3a2ded4c49a1bea698b", "score": "0.5693244", "text": "public function createAction(Request $request)\n {\n\n $entity = new Cuotas();\n $form = $this->createForm(new CuotasType(), $entity);\n $form->bind($request);\n if ($form->isValid()) {\n $forms=$request->request->get('vecinos',0);\n $vecinos=explode(',', $forms);\n if(count($vecinos)>0){\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n $dias=$request->request->get('txtCantidad',0);\n $tiempo=$request->request->get('slcPeriodo',0);\n $recorrido=$request->request->get('slcDia',0);\n if($dias != 0 && $tiempo != 0 ){\n $lafecha=$entity->getFechaDeInicio();\n $arrayFecha = $em->getRepository('SisafBundle:EstadoFinanciero')->setFechaUser($dias,$tiempo,$recorrido,$lafecha);\n $entity->setDiaproximo($arrayFecha);\n $entity->setDiasRecurrencia($dias.'|'.$tiempo.'|'.$recorrido);\n }\n $em->persist($entity);\n $em->flush();\n foreach ($vecinos as $key) {\n if($key>0){\n $cuotavecino=new cuotaVecino();\n $cuotavecino->setCuota($entity->getId());\n $cuotavecino->setVecino($key);\n $cuotavecino->setEstado(0);\n $em->persist($cuotavecino);\n $em->flush();\n // echo $key.'holA<br>'; return $this->render('SisafBundle:Cuotas:new.html.twig', array());\n }\n }\n // return $this->render('::error.html.twig', array());\n return $this->redirect($this->generateUrl('cuotas_show', array('id' => $entity->getId())));\n }\n \n }\n $conn = $this->get('database_connection');\n $residentes = $conn->fetchAll('SELECT * FROM Usuario');\n return $this->render('SisafBundle:Cuotas:new.html.twig', array(\n 'residentes' => $residentes,\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "7ebf846642a79992f491346de29153ee", "score": "0.5688201", "text": "public function __construct($params = array())\r\n {\r\n parent::__construct('user');\r\n $this->add(array(\r\n 'name' => 'id',\r\n 'type' => 'Hidden',\r\n ));\r\n $this->add(array(\r\n 'name' => 'name',\r\n 'type' => 'Text',\r\n 'attributes'=> array(\r\n 'autocomplete' => 'off',\r\n 'class' => 'form-control'\r\n ),\r\n 'options' => array(\r\n 'label' => 'Nom',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'firstname',\r\n 'type' => 'Text',\r\n 'attributes'=> array(\r\n 'autocomplete' => 'off',\r\n 'class' => 'form-control'\r\n ),\r\n 'options' => array(\r\n 'label' => 'Prénom',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'email',\r\n 'type' => 'Text',\r\n 'attributes'=> array(\r\n 'autocomplete' => 'off',\r\n 'class' => 'form-control'\r\n ),\r\n 'options' => array(\r\n 'label' => 'Email',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'societe',\r\n 'type' => 'Text',\r\n 'attributes'=> array(\r\n 'autocomplete' => 'off',\r\n 'class' => 'form-control'\r\n ),\r\n 'options' => array(\r\n 'label' => 'Société',\r\n ),\r\n )); \r\n $this->add(array(\r\n 'name' => 'profil_id',\r\n 'type' => 'Select',\r\n 'attributes'=> array(\r\n 'class' =>\"form-control\"\r\n ),\r\n 'options' => array(\r\n 'label' => 'Profil',\r\n /*'empty_option' => 'Choisir',*/\r\n 'value_options' => ((isset($params['profil']) && count($params['profil']) > 0)?$params['profil']:array()),\r\n )\r\n ));\r\n $this->add(array(\r\n 'name' => 'published',\r\n 'type' => 'Radio',\r\n 'attributes'=> array(\r\n 'class' => 'radio_custom'\r\n ),\r\n 'options' => array(\r\n 'label' => 'Statut',\r\n 'label_attributes' => array(\r\n 'class' => 'radio-control'\r\n ),\r\n 'value_options' => array(\r\n '0' => 'Inactif',\r\n '1' => 'Actif',\r\n ),\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'submit',\r\n 'type' => 'Submit',\r\n 'attributes' => array(\r\n 'value' => 'Valider',\r\n 'id' => 'submitbutton',\r\n 'class' => 'btn btn-info btn-sm'\r\n ),\r\n ));\r\n }", "title": "" }, { "docid": "07428769ec09763cb8b89ae0822d08d5", "score": "0.5688132", "text": "public function crearUsuario($data) {\n if ($this->modeloUsuario->save($data)){}\n }", "title": "" }, { "docid": "bfff6cae069616f9ef4b597bc751b0dd", "score": "0.5679491", "text": "public function store() {\n //recupera todos los campos\n $input = Input::all();\n $validation = Validator::make($input, $this->rules);\n //si pasa el validador\n if (!$validation->fails()) {\n $ObjUsuario = new Usuario;\n $ObjUsuario->email = $input['email'];\n $ObjUsuario->password = Hash::make($input['password']);// tipo de encriptacion Bcrypt\n $ObjUsuario->fecha_creacion = date('Y-m-d');\n $ObjUsuario->id_trabajador = $input['id_trabajador'];\n $ObjUsuario->id_tipo_usuario = $input['id_tipo_usuario'];\n $ObjUsuario->activo = 1;\n $ObjUsuario->save();\n //si se han guardado los datos correctamente nos devuelve la vista que lista los usuarios\n return Redirect::to('sistema/usuario');\n } else {//si falla al validar, nos muestra los errores\n return Redirect::back()->withErrors($validation)->withInput();\n }\n }", "title": "" }, { "docid": "4b102d3193ff9cf79717f224233dade0", "score": "0.56786746", "text": "public function registerAction(Request $request)\n {\n $connectedUser = $this->getUser();\n if($connectedUser){\n $this->addFlash('warning', 'Vous êtes déjà inscrit.');\n return $this->redirectToRoute('homepage');\n }\n\n $preferences = new Preferences();\n $profil = new Profil();\n $user = new Users();\n $user->setPictures(null);\n\n\n $form = $this->createForm(UsersType::class, $user);\n $form->handleRequest($request);\n if($form->isSubmitted() && $form->isValid())\n {\n $profil->setAge($user->getAge($user->getBirthdate()));\n $profil->setSexe($user->getGenre());\n $preferences->setAge($profil->getAge());\n if($profil->getSexe() == 'Homme')\n {\n $preferences->setSexe('Femme');\n } else\n {\n $preferences->setSexe('Homme');\n }\n\n // hash le mot de passe\n $password = $user->getPassword();\n $encoder = $this->container->get('security.password_encoder');\n $encoded = $encoder->encodePassword($user, $password);\n $user->setPassword($encoded);\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($preferences);\n $profil->setPreferences($preferences);\n $em->persist($profil);\n $user->setProfil($profil);\n $em->persist($user);\n $em->flush();\n\n return $this->redirectToRoute(\"registerOK\");\n }\n\n return $this->render('RencontresBundle:Users:register.html.twig', [\n \"form\" => $form->createView()\n ]);\n }", "title": "" }, { "docid": "30c85fed4acd179cdb9421a1e8536d06", "score": "0.56776917", "text": "public function entrar($email,$password){\n\n // Aqui verifico si el usuario esta activo en el sistema\n $sql = \"SELECT id,nombres,apellidos,email,password,telefono,creado,foto_usuario,permiso FROM usuarios WHERE email='$email' AND estado='1' LIMIT 1\";\n $prevUser = ejecutarConsultaSimpleFila($sql);\n\n // Aqui verifico si el usuario esta inactivo en el sistema\n $sql2 = \"SELECT email FROM usuarios WHERE email='$email' AND estado='0' LIMIT 1\";\n $prevUser2 = ejecutarConsultaSimpleFila($sql2);\n\n //Aqui verifico solo el correo\n $sql3 = \"SELECT email FROM usuarios WHERE email='$email' LIMIT 1\";\n $prevUser3 = ejecutarConsultaSimpleFila($sql3);\n\n if($prevUser > 0){\n $sql4=\"SELECT email,permiso FROM usuarios WHERE email='$email' AND permiso='1' LIMIT 1\";\n $prevUser4 = ejecutarConsultaSimpleFila($sql4);\n \n if($prevUser4 > 0){\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'No puedes entrar como un usuario normal ya que eres un administrador';\n }else{\n\nif (password_verify($password, $prevUser['password'])) {\n $sessData['estado']['type'] = 'success';\n $sessData['estado']['msg'] = 'Bienvenido '.$prevUser['nombres'].'!';\n\n // Aqui asigno la id del usuario a la session\n $sessionUsuario['usuario']['id'] = $prevUser['id'];\n $sessionUsuario['usuario']['nombre'] = $prevUser['nombres'];\n $sessionUsuario['usuario']['apellido'] = $prevUser['apellidos'];\n $sessionUsuario['usuario']['email'] = $prevUser['email']; \n $sessionUsuario['usuario']['telefono'] = $prevUser['telefono'];\n $sessionUsuario['usuario']['foto_usuario']=$prevUser['foto_usuario'];\n $sessionUsuario['usuario']['permiso']=$prevUser['permiso'];\n $sessionUsuario['usuario']['creado']=$prevUser['creado'];\n $_SESSION['DatosUsuario'] = $sessionUsuario;\n}else{\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'El email es correcto pero la contraseña no lo es, intenta de nuevo con otra contraseña';\n}\n\n \n }\n }elseif($prevUser2>0) {\n \n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'No puedes entrar ya que estas desactivado, revisa tu correo para poder entrar a la página web';\n\n }else{\n if ($prevUser3>0) { \n }else{\n $sessData['estado']['type'] = 'error';\n $sessData['estado']['msg'] = 'El Email que ingreso no se encuentra en el sistema, por favor ingrese el correo correctamente'; \n }\n }\n echo json_encode($sessData);\n}", "title": "" }, { "docid": "43a32fb8ff573a34c303a0b15615cf88", "score": "0.56753397", "text": "public static function addUserForm($values = [\"ime\" => \"\", \"priimek\" => \"\",\n \"mail\" => \"\", \"uporabnisko_ime\" => \"\", \"geslo\" => \"\", \"aktiven\" => \"\",\n \"telefon\" => \"\", \"ulica\" => \"\", \"stevilka\" => \"\", \"posta\" => \"\", \"kraj\" => \"\"]) {\n $values[\"geslo\"] = \"\";\n $values[\"geslo2\"] = \"\";\n $values[\"stranka\"] = true;\n $form = new OsebaForm('registracija', $values, \"dodajanje\");\n echo ViewHelper::render(\"view/salesman-user-add.php\", [\"form\" => $form]);\n }", "title": "" }, { "docid": "cf2f91d693addfe3acf270668efd880e", "score": "0.56724113", "text": "public function registerAction()\n {\n $user = new User();\n $errors = []; // On déclare un tableau d'erreurs à vide\n\n \n // On demande, si le formulaire a été posté\n // Si c'est le cas, on appelle et modifie les variables contenues dans l'objet $user grâce aux setters\n if(!empty($_POST)){\n \n // Validation \n if(!$this->validate($_POST['lastname'], new Assert\\NotBlank())){ // Appelle d'une méthode NotBlank stockée dans Symfony\\Component\\Validator\\Constraints\n $errors['lastname'] = 'Le nom est obligatoire';\n }\n \n if(!$this->validate($_POST['firstname'], new Assert\\NotBlank())){ \n $errors['firstname'] = 'Le prénom est obligatoire';\n }\n \n if(!$this->validate($_POST['email'], new Assert\\NotBlank())){ \n $errors['email'] = 'L\\'email est obligatoire';\n } elseif(!$this->validate($_POST['email'], new Assert\\Email())){\n $errors['email'] = \"L'email n'est pas valide\";\n }\n \n if(!$this->validate($_POST['password'], new Assert\\NotBlank())){ \n $errors['password'] = 'Le mot de passe est obligatoire';\n }\n \n if(empty($errors)){\n $user\n ->setLastname($_POST['lastname'])\n ->setFirstname($_POST['firstname'])\n ->setEmail($_POST['email'])\n // On va créer un service pour encoder le mot de passe (qu'on retrouvera dans Service / UserManager\n ->setPassword($this->app['user.manager']->encodePassword($_POST['password']))\n ;\n \n $this->app['user.repository']->insert($user);\n $this->app['user.manager']->login($user); // Pour connecter automatiquement l'utilisateur inscrit\n \n return $this->redirectRoute('homepage'); // Et on le redirige vers la page d'accueil\n } else{\n $msg = '<strong>Le formulaire contient des erreurs</strong>';\n $msg .= '<br>-' . implode('<br>-', $errors);\n \n $this->addFlashMessage($msg, 'error');\n }\n }\n \n return $this->render('register.html.twig');\n }", "title": "" }, { "docid": "a5e0dc34fef2ffcdbb7ec9275f2143f1", "score": "0.5668715", "text": "public function create()\n\t{\t/*$combobox = array(0 => \"[ Seleccione ... ]\") + $users->lists('id', 'name');*/\n\t\t\n\t\t$user = new Usuario;\n\t\t$organizaciones = array('' => \"Seleccione... \") + Organizacion::lists('nombre', 'id');\n $areas = array('' => \"Seleccione... \") + Area::lists('nombre', 'id');\n\n return View::make(\"usuario.formUsuario\", array(\"organizaciones\" => $organizaciones, \"areas\" => $areas, 'user' => $user ));\n \n\t\t/*$organizaciones = Organizacion::all()->lists('nombre', 'id');\n\t\t$combobox = array(0 => \"Seleccione ... \") + $tipos;\n\t\t$selected = array();\n\t\treturn View::make(\"usuario.form\", compact('combobox', 'selected'));\n\t\t\n\t\treturn View::make('');*/\n\t}", "title": "" }, { "docid": "578ca03326873c81f298257ee8d19dbb", "score": "0.5662924", "text": "public function saveUsuario() {\n\n\t\t$save = false;\n\t\t$fecha_actual = date('d-m-Y');\n\n\t\t$registrado = Usuarios::esRegistradoMail($this->email);\n\n\t\t// Si ya está registrado actualizamos su fecha_ultima_actualizacion\n\t\tif ($registrado) {\n\n\t\t\t$query = \"UPDATE \" . $this->tabla . \"\n\t\t\t\t\t\tSET fecha_ultima_actualizacion = '\" . $fecha_actual . \"', ultima_accion = '\" . $this->ultima_accion . \"'\n\t\t\t\t\t\tWHERE email = '\" . $this->email . \"';\";\n\n\t\t} else {\n\n\t\t\t$query = \"INSERT INTO \" . $this->tabla . \" (nick, nombre, apellidos, telefono,\n\t\t\t\t\t\temail, password, fecha_registro, fecha_ultima_actualizacion, tipo_usuario, estado)\n\t \tVALUES('\" . $this->nick . \"',\n\t '\" . $this->nombre . \"',\n\t '\" . $this->apellidos . \"',\n\t '\" . $this->telefono . \"',\n\t '\" . $this->email . \"',\n\t '\" . $this->password . \"',\n\t '\" . $fecha_actual . \"',\n\t '\" . $fecha_actual . \"',\n\t '\" . $this->tipo_usuario . \"',\n\t '\" . $this->estado . \"');\";\n\t\t}\n\n\t\t$save = $this->c->query($query);\n\n\t\treturn $save;\n\t}", "title": "" }, { "docid": "57336b4fe50b43d53e25c60774689560", "score": "0.5661489", "text": "public function ingresarUsuario()\n {\n $paises = Country::All();\n $roles = Role::All();\n $rol_check = \"\";\n $positions = Position::All();\n\n return view('mantenedores.users.insertar',\n [\n 'paises' => $paises,\n 'roles' => $roles,\n 'positions' => $positions,\n 'rol_check' => $rol_check\n ]);\n\n }", "title": "" }, { "docid": "78227352b0029780931cacaa1864e187", "score": "0.5653616", "text": "public function registrar()\n{\n\n\n $nombreUsuario = $this->session->userdata('user_data');\n $this->load->view('layout/header');\n $this->load->view('layout/nav');\n $User['nombreUser']=$nombreUsuario['nombre'];\n $this->load->view('layout/navar',$User);\n \n $this->load->view('layout/scriptjs');\n $this->load->view('proyectos/registrar');\n\n}", "title": "" }, { "docid": "ad6fdeada90eb0055e8e316b086b42cc", "score": "0.56494653", "text": "public function createAction(){\n ini_set('memory_limit', '-1');\n set_time_limit(0); \n $em = $this->getDoctrine()->getEntityManager(); \n $entity = new Alumno();\n $request = $this->getRequest();\n $form = $this->createForm(new AlumnoType(), $entity);\n $data=$request->get('ntp_inacholeebundle_alumnotype');\n $id_ano_escolar=$data['ano_escolar'];\n \n $form->handleRequest($request);\n \n if ($form->isValid()) {\n $query = $em->createQuery('SELECT count(a) FROM NetpublicCoreBundle:Usuario a WHERE a.username LIKE :cedula')\n ->setParameters(array(\n \"cedula\"=>$entity->getNombre().'%' \n \n )\n );\n $count = $query->getSingleScalarResult();\n\t\t\t$nombre=$entity->getNombre();\n\t\t\t\n\t\t\tif($count>0){\n\t\t\t\t$nombre=$entity->getNombre().$count;\n\t\t\t}\n\t\t\t\t\t \n //Generamos claves temporalares a los alumno registrados como nuevo\n $usuario=new Usuario();\n \n $usuario->setUsername($nombre);\n $usuario->setSalt(md5(time()));\n $encoder = new MessageDigestPasswordEncoder('sha512', true, 10);\n $password = $encoder->encodePassword($entity->getCedula(), $usuario->getSalt());\n $usuario->setPassword($password);\n $usuario->setEsAlumno(TRUE); \n $usuario->setAlumno($entity);\n $entity->setUsuario($usuario);\n //$rol=new Rol();\n //$rol->setRole(\"ROLE_ESTUDIANTE\");\n $rol= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Rol\")->findOneBy(array(\"role\"=>\"ROLE_ESTUDIANTE\"));\n $usuario->addRol($rol); \n//Generamos registros para hacer seguimientos al proceso de matricula.\n $reg_matricula=new MatriculaAlumno();\n $reg_matricula->setAlumno($entity);\n //Selecciones Ano Escolar activo\n $em->persist($rol);\n $em->persist($usuario);\n $ano_escolar_activo=$this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Dimension\")->findAnoEscolarActivo();\n $reg_matricula->setAno($ano_escolar_activo);\n $reg_matricula->setGrupo($entity->getGrupo());\n $reg_matricula->setEsMatricula(TRUE);\n $reg_matricula->setEsPagoMatricula(TRUE);\n $reg_matricula->setEsPapeles(TRUE);\n $reg_matricula->setEsUltimaMatricula(TRUE);\n $reg_matricula->setObservaciones(\"Escriba observaciones del proceso de matricula\");\n $periodos_academicos=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->findPeriodosEscolar($ano_escolar_activo);\n foreach ($periodos_academicos as $periodo) {\n $this->getDoctrine()\n ->getRepository(\"NetpublicCoreBundle:NivelAcademico\")\n ->generarNivelesACademicosAlumno($entity,$periodo);\n \n }\n $em->persist($reg_matricula); \n $em->persist($entity); \n $em->flush();\n $file=$form['foto_academica']->getData();\n if($file){\n $nombre_archivo= 'alumno'.$entity->getId(); \n //$file->move(__DIR__.'/../../../../web/'.'uploads/documents',$nombre_archivo);\n $imagine = new \\Imagine\\Gd\\Imagine();\n $image = $imagine->open($file);\n $thumbnail_mini = $image->thumbnail(new Box(50, 50));\n $thumbnail_mini->save(__DIR__.'/../../../../../web/'.'uploads/documents/mini'.$nombre_archivo.'.jpg');\n $thumbnail_strong = $image->thumbnail(new Box(135, 300));\n $thumbnail_strong->save(__DIR__.'/../../../../../web/'.'uploads/documents/strong'.$nombre_archivo.'.jpg');\n \n $usuario->setEsFotoperfil(TRUE);\n }\n $file1=$form['foto_firma']->getData();\n if($file1){\n $nombre_archivo= 'alumno'.$entity->getId(); \n $imagine = new \\Imagine\\Gd\\Imagine();\n $image = $imagine->open($file1);\n $thumbnail_mini = $image->thumbnail(new Box(50, 50));\n $thumbnail_mini->save(__DIR__.'/../../../../../web/'.'uploads/documents/firma'.$nombre_archivo.'.jpg');\n $usuario->setEsFotoperfil(TRUE);\n \n }\n $em->flush();\n return new Response(\"ok\");\n }\n if($request->isXmlHttpRequest())\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n return $this->redirect($this->generateUrl('alumno_show', array('id' => $entity->getId())));\n \n \n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n \n }", "title": "" }, { "docid": "4c4ef063236b008e44b619f05c0d62f6", "score": "0.564891", "text": "public function userAction(Request $request)\n {\n // Pour récupérer la liste de toutes les annonces : on utilise findAll()\n $em = $this->getDoctrine()->getManager();\n $userRepository=$em->getRepository('ECommBundle:User');\n\n\n if ($this->get('security.authorization_checker')->isGranted('ROLE_USER')) {\n $user = $this->get('security.token_storage')->getToken()->getUser();\n }\n\n //form\n $form = $this->createForm(UserType::class, $user);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n // save the Product!\n $em = $this->getDoctrine()->getManager();\n $em->persist($user);\n $em->flush();\n $this->addFlash('notice', 'Utilisateur ajouté ');\n }\n\n $listUser=$userRepository->findAll();\n\n return $this->render('AdminBundle:User:user.html.twig', array(\n 'listuser' => $listUser,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "5a2fb1472a0ac2cba0777c0fbe89a78b", "score": "0.5641906", "text": "public function registro()\n {\n //COMPROBAMOS SI LOS DATOS SON MANDADOS POR POST\n if ($this->request->is('post')) {\n $captcha = $this->request->data('g-recaptcha-response');\n if (!empty($captcha)) {\n //ARRAY DE USUARIO\n $usuario = array();\n //ARRAY DE EMPRESA\n $empresa = array();\n //OBTENEMOS LOS DATOS DEL USUARIO\n $verificacion = str_replace(' ', '', $this->request->data['password']);\n $password = str_replace(' ', '', $this->request->data['password']);\n $this->request->data['verificacion'] = $verificacion;\n $this->request->data['password'] = $password;\n $usuario['email'] = $this->request->data['email'];\n $usuario['password'] = $this->request->data['password'];\n $usuario['rol'] = ConstantesRoles::CLIENTE;\n $usuario['verificacion'] = $this->request->data['password'];\n //OBTENEMOS LOS DATOS DE LA EMPRESA\n foreach ($this->request->data as $key => $value) {\n if ($key != 'password') {\n $empresa[$key] = $value;\n }\n }\n //CONTRUIMOS LA DIRECCION DE LA EMPRESA\n $address = $empresa['direccion'] . \",\" . $empresa['numero'] . \",\" . $empresa['ciudad'] . \",\" . $empresa['provincia'];\n //OBTENEMOS LOS DATOS DE LATITUD Y LONGITUD\n $coords = $this->obtener_coordenadas($address);\n //COLOCAMOS LOS DATOS DE LAS COORDENADAS\n $empresa['latitud'] = $coords[0];\n $empresa['longitud'] = $coords[1];\n //GUARDAMOS LOS DOS REGISTROS\n if ($this->Usuario->nuevo($usuario) && $this->Empresa->nuevo($empresa)) {\n $mensaje = \"BIenvenido a nuestra plataforma, tus datos de sesion son:\";\n $mensaje .= \"\\n\\t Email: '\" . $this->request->data('email').\"'\";\n $mensaje .= \"\\n\\t Contraseña: '\" . $this->request->data('password').\"'\";;\n $mensaje .= \"\\nAtentamente getmarried.ml\";\n $email = new CakeEmail('gmail');\n //$email = new CakeEmail('default');\n //$email->from('[email protected]');\n $email->to($this->request->data('email'));\n $email->subject('Registro');\n $email->send($mensaje);\n //MOSTRAMOS MENSAJE DE REGISTRO\n $this->Flash->success(ConstantesMensaje::REGISTRO_BIEN);\n //REDIRECCIONAMOS AL LOGIN\n $this->redirect(array(\n 'controller' => 'usuarios',\n 'action' => 'login'\n ));\n } else {\n $this->Flash->error(ConstantesMensaje::REGISTRO_MAL);\n }\n }\n }\n //SI NO TENEMOS DATOS POR POST ES PORQUE ESTAMOS INTENTANDO VISUALIZAR EL FORMULARIO DE REGISTRO\n //LE MANDAMOS LAS OPCIONES DEL TIPO DE EMPRESA\n $options = $this->Tipo->find('list');\n $this->set(array(\n 'options' => $options,\n ));\n\n }", "title": "" }, { "docid": "c9326d653811bf85eebada0ac1026c8a", "score": "0.56370234", "text": "function RegistroUsuario($nombre,$apellido,$email,$pass,$confirm,$avatar){\n $imagen=\"img/avatar-man.png\";\n $usuario=[];\n $ext='';\n $nombreArchivo=\"\";\n $errorNombre=\"\";\n $errorApellido=\"\";\n $errorEmail=\"\";\n $errorPassword=\"\";\n $errorConfirm=\"\";\n $id=0;\n\n //$errorArchivo=\"\";\n\n if(strlen($nombre)==0){\n $errorNombre=\"Ingrese su nombre\";\n }\n\n if(strlen($apellido)==0){\n $errorApellido=\"Ingrese su apellido\";\n }\n\n if(strlen($email)==0){\n $errorEmail=\"Ingrese su email\";\n }else if(filter_var($_POST[\"email\"], FILTER_VALIDATE_EMAIL)==false){\n $errorEmail=\"Ingrese un email valido\";\n $email=\"\";\n }\n\n if(strlen($pass)<8){\n $errorPassword=\"La contraseña debe tener por lo menos 8 caracteres\";\n }\n\n if($pass!=$confirm){\n $errorConfirm=\"Las contraseñas no coinciden\";\n }\n if($errorNombre==\"\" && $errorApellido==\"\"&&$errorPassword==\"\"&&$errorConfirm==\"\"&&$errorEmail==\"\"){\n\n if($avatar!=null){\n if($avatar['error']==0){\n\n $ext=pathinfo($avatar['name'],PATHINFO_EXTENSION);\n if($ext!='jpg'&&$ext!='jpeg'&&$ext!='png'){\n $errorArchivo=\"Formato invalido.Solo se permiten archivos jpg, jpeg o png\";\n }else{\n $nombreArchivo=$email . \".\".$ext;\n move_uploaded_file($avatar['tmp_name'],'img/'.$nombreArchivo);\n $imagen='img/'.$nombreArchivo;\n }\n\n }else{\n $errorArchivo=\"Error al cargar el archivo\";\n }\n }\n\n $usuario['avatar']=$imagen;\n $usuario[\"nombre\"]=$nombre;\n $usuario[\"apellido\"]=$apellido;\n $usuario[\"email\"]=$email;\n $usuario[\"password\"]=password_hash($pass,PASSWORD_DEFAULT);\n\n if(file_exists(\"usuarios.json\")){\n $usuarios=jsonToArray(\"usuarios.json\");\n\n foreach($usuarios as $usuarioGuardado){\n if($usuarioGuardado[\"email\"]==$usuario[\"email\"]){\n $errorEmail=\"El email ya existe\";\n }\n if($usuarioGuardado[\"id\"]>$id) {\n $id = $usuarioGuardado[\"id\"];\n }\n }\n }\n if(empty($errorEmail)){\n $id++;\n $usuario['id']=$id;\n $usuarios[]=$usuario;\n $jsonUsuarios=json_encode($usuarios);\n file_put_contents(\"usuarios.json\",$jsonUsuarios);\n\n //$archivo=file_get_contents('usuarios.json');\n header('location:login.php');\n }\n }\n\n\n\n}", "title": "" }, { "docid": "62d2e4321e45b8bf1c998acc08b527aa", "score": "0.56333864", "text": "function loguearUsuario(array $datos)\n{\n\tif(!($user = checkDuplicado('email', $datos['email'])))\n\t{\n\t\treturn ['email' => 'El email ingresado no esta registrado en nuestra base de datos'];\n\t}\n\n\t//chequear el password\n\tif(!password_verify($datos['password'], $user['contrasena']))\n\t{\n\t\treturn ['password' => 'El password ingresado es inválido'];\n\t}\n\n\t//guardamos en la session\n\tguardarUserEnSession($user);\n\n\t//suponiendo que chequeo el recordarme\n\tif(isset($datos['recordarme']))\n\t{\n\t\t//guardamos la cookie de remember\n\t\tsetcookie('fs05_user', $user['id'], 5*365*24*60*60+time());\n\t}\n\n\treturn [];\n}", "title": "" }, { "docid": "e5a309f1c1aa0fcddcde9f41370071c9", "score": "0.5632716", "text": "public function __construct($username=NULL, $password=NULL, $email=NULL, $PEC=NULL, $telefono=NULL, $nome=NULL, $cognome= NULL){\n if($password!==NULL && $email!==NULL && $PEC!==NULL)\n {\n parent::__construct($username, $password, $email);\n parent::setTipoUser('amministratore');\n parent::setPEC($PEC);\n $this->_id = NULL; // nel db è autoincrement\n $this->_telefono = $telefono;\n $this->_nome = $nome;\n $this->_cognome = $cognome;\n $this->_categorie = Array();\n $this->_user = Array();\n }\n else\n {\n $fAmministratore = USingleton::getInstance('FAmministratore');\n $attributiAmministratore = $fAmministratore->cercaAmministratore($username);\n if (is_array($attributiAmministratore) && count($attributiAmministratore)===1) \n {\n parent::setUsername($attributiAmministratore[0]['Username']);\n parent::setPassword($attributiAmministratore[0]['Password']);\n parent::setEmail($attributiAmministratore[0]['Email']);\n parent::setPEC($attributiAmministratore[0]['PEC']);\n parent::setBloccato($attributiAmministratore[0]['Bloccato']);\n parent::setConfermato($attributiAmministratore[0]['Confermato']);\n parent::setCodiceConfermaUser($attributiAmministratore[0]['CodiceConferma']);\n parent::setTipoUser($attributiAmministratore[0]['TipoUser']);\n $this->_id = $attributiAmministratore[0]['IdAmministratore']; // nel db è autoincrement\n $this->_telefono = $attributiAmministratore[0]['Telefono'];\n $this->_nome = $attributiAmministratore[0]['Nome'];\n $this->_cognome = $attributiAmministratore[0]['Cognome'];\n $this->_categorie = Array();\n $this->_user = Array();\n }\n else\n {\n throw new XAmministratoreException('Amministratore inesistente.');\n }\n }\n \n }", "title": "" }, { "docid": "4c133b1827dd5dd29218ccd543a4c1f9", "score": "0.5632521", "text": "function mostrarDatos()\n\t{\n\t\tsession_start();\n\t\t$modelo = $this->cargarModelo(\"login\");\n\t\t//MOSTRAR EL USUARIO\n\t\t$this->fila = $modelo->mostrarDatosUser();\n\t}", "title": "" }, { "docid": "618a32a3aebcf71f27400300cb943531", "score": "0.5631754", "text": "public function createAction(Request $request)\n {\n $entity = new Usuario();\n $generator = new SecureRandom();\n\n // $form = $this->createCreateForm($humanReadableString);\n $form = $this->createCreateForm($entity);\n\n //var_dump($entity);\n $form->handleRequest($request);\n\n $humanReadableString = bin2hex($generator->nextBytes(7));\n\n $factory = $this->get('security.encoder_factory');\n $encoder = $factory->getEncoder($entity);\n $password = $encoder->encodePassword($humanReadableString, $entity->getSalt());\n $entity->setPassword($password);\n $entity->setNombre($entity->getNombre());\n\n// var_dump($password);die;\n\n// $entity->setPassword($humanReadableString);\n $entity->setActivo(1);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n //var_dump($entity);\n\n try {\n\n// llamaral metodo enviar email en la controladora email y ponerleel usuario y la contrase�a generada\n// aleatoriamente para que el usuario la reciba\n\n $name = $entity->getNombre();\n $password = $entity->getPassword();\n\n $email = $entity->getCorreo();\n\n $this->forward(\n 'sisconeeAppBundle:Email:SendEmail',\n array('name' => $name, 'password' => $humanReadableString, 'email' => $email)\n );\n\n $em->flush();\n\n //Register Log ()\n $data = $entity->getCorreo() . ',' . $entity->getNombre() . ',' . $entity->getRol() . ',' . $entity->getUsername() . ',' . $entity->getEntidad();\n $em->getRepository('sisconeeAppBundle:Trazas')->persistLog(\n 'Añadido',\n 'user',\n $entity->getId(),\n $data,\n $this->getCurrentUser()\n );\n\n $this->get('session')->getFlashBag()->add(\n 'notice',\n 'Los cambios fueron actualizados.'\n );\n } catch (\\Exception $e) {\n $this->get('session')->getFlashBag()->add(\n 'error',\n 'El usuario no pudo ser insertado. Ya existe un registro con ese nombre.'\n );\n }\n\n return $this->redirect($this->generateUrl('administracion_usuario', array('id' => $entity->getId())));\n }\n\n return $this->render(\n 'sisconeeAdministracionBundle:Usuario:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "d9a4db5270433b218ee4072ef12d7cb6", "score": "0.5628881", "text": "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])\n\t\t\t){\n\n\t\t\t\t$tabla = \"users\";\n\t\t\t\t$item = \"dni\";\n\t\t\t\t$valor = $_POST[\"ingUsuario\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\tif($respuesta[\"dni\"]==$_POST[\"ingUsuario\"] && \n\t\t\t\t\tpassword_verify($_POST[\"ingPassword\"], $respuesta[\"password\"]) &&\n\t\t\t\t\t$respuesta[\"estado\"]=='A'\n\t\t\t\t){\n\n\t\t\t\t\t//echo '<br><div class=\"alert alert-success\">Bienvenido al sistema</div>';\n\n\t\t\t\t\t/*===== Creando Variables Session para Utilizar en la Navegación ======*/\n\t\t\t\t\t$_SESSION[\"iniciarSesion\"] = \"ok\";\n\t\t\t\t\t$_SESSION[\"tipoUser\"] = $respuesta[\"tipo_usuario\"];\n\t\t\t\t\t$_SESSION[\"nomUser\"] = $respuesta[\"name\"];\n\t\t\t\t\t$_SESSION[\"dniUser\"] = $respuesta[\"dni\"];\n\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\n\t\t\t\t\t\twindow.location = \"inicio\";\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t}else if($respuesta[\"estado\"]=='N'){\n\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, su usuario esta Inactivado por el Administrador.</div>';\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo.</div>';\n\n\t\t\t\t}\n\t\t\t\t//var_dump($respuesta[\"perfil\"]);\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "97996d14303c0fc817df9eaf55091d95", "score": "0.5625408", "text": "public function store(Request $request)\n {\n $this->validation($request);\n $user = new User;\n $operador = new Operador;\n $admin = new Administrador;\n $userpermission = new UserPermission;\n $user->nome = $request->nome;\n $user->email = $request->email;\n $user->password = bcrypt($request->password);\n $user->apelido = $request->apelido;\n $user->telefone = $request->telefone;\n $user->tipoUsuario = $request->tipo;\n $user->estado = 1;\n $user->save();\n //verificacao do tipo de user a ser gravado\n if($request->tipo == 2){\n $operador->estado = 1;\n $administrador = Administrador::where('users_id', Auth::id())->get();\n $operador->administradors_id =$administrador[0]->id;\n $operador->users_id = $user->id;\n $operador->save();\n $userpermission->permission_id = 2;\n $userpermission->user_id = $user->id;\n $userpermission->save();\n return view('utilizadores.create'); \n }\n else{\n $admin->estado = 1;\n $admin->users_id = $user->id;\n $admin->save();\n $userpermission->permission_id = 1;\n $userpermission->user_id = $user->id;\n $userpermission->save();\n return view('utilizadores.create'); \n }\n \n }", "title": "" }, { "docid": "cd7aa8af6b1a700357cc89c593868b8d", "score": "0.5625142", "text": "protected function form()\n {\n return Admin::form(User::class, function (Form $form) {\n\n $form->text('id', 'ID')->attribute('disabled', true);\n $form->text('user_login','用户名')->rules('required|min:3');\n $form->text('user_nicename', '昵称')->rules('required|min:2');\n $form->email('user_email', '邮箱')->rules('required|min:3');\n $form->text('user_mobile', '手机号')->rules('required|min:3');\n $form->number('score', '积分');\n $form->select('sex')->options([0 => '未知', 1 => '男', 2 => '女']);\n $form->radio('user_status','用户状态')->options([ 1 => '启用', 0 => '拉黑'])->default('1');\n \n $form->password('user_pass', '密码');\n\n $form->datetime('created_at', '创建时间')->attribute('disabled', true);\n $form->datetime('updated_at', '更新时间')->attribute('disabled', true);\n\n $form->saving(function (Form $form) {\n if ($form->user_pass && $form->model()->user_pass != $form->user_pass) {\n $form->user_pass = bcrypt($form->user_pass);\n }\n });\n });\n }", "title": "" }, { "docid": "fcbc0e5ca08170413ec4b31f1dd31afa", "score": "0.5624642", "text": "public function valida(){ \r\n\t\t$data['pass'] = $this->input->post(\"pass\");\r\n\t\t$data['user'] = $this->input->post(\"user\");\r\n\r\n\t\t$usuario = $this->Usuario->Auth($data);\r\n\t\tif($usuario->total){\r\n\t\t\t$negocio = $this->Negocios->getNegocio($usuario->id);\r\n\r\n\t\t\t$usuarioInfo = array(\r\n 'user' => $data['user'],\r\n 'tipo' => $usuario->tipouser,\r\n 'id' => $usuario->id,\r\n 'nombrecompleto' => $usuario->nombrecompleto,\r\n 'negocioid' => $negocio->negocioid,\r\n 'ok' => 1,\r\n 'negocio' => $negocio->negocio\r\n );\r\n\t\t\t$this->session->set_userdata(\"sesiones\",$usuarioInfo);\r\n\t\t\t// $this->session->set_userdata('user',$data['user']);\r\n\t\t\t// $this->session->set_userdata('tipo',$usuario->tipouser);\r\n\t\t\t// $this->session->set_userdata('id',$usuario->id);\r\n\t\t\t// $this->session->set_userdata('nombrecompleto',$usuario->nombrecompleto);\r\n\t\t\t// $negocio = $this->Negocios->getNegocio($usuario->id);\r\n\t\t\t// $this->session->set_userdata('negocioid',$negocio->negocioid);\r\n\t\t\t// $this->session->set_userdata('ok',1);\r\n\r\n\t\t\tif((int)$usuario->tipouser == 3){\r\n\t\t\t\tredirect('Venta/Nueva');\t\r\n\t\t\t}else{\r\n\t\t\t\tredirect('Cliente/GetAll');\r\n\t\t\t}\t\t\t\r\n\t\t}else{\r\n\t\t\t$this->session->set_userdata('error','Usuario o Contrase&ntilde;a incorrectos');\r\n\t\t\tredirect('Login/index');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3f56a288cab472e711bc0d5956e542f8", "score": "0.5623495", "text": "public function register(){\n $user = new Usuarios;\n\t\t$user->setUsername(addslashes($_POST[\"username\"]));\n\t\t$user->setPassUser( addslashes($_POST[\"password\"]));\n\t\t$user->setFirstName(addslashes($_POST[\"firstname\"]));\n\t\t$user->setGenero($_POST[\"gender\"]);\n\n echo $_POST[\"username\"];\n\n return $this->userDao->insertUser($user);\n }", "title": "" }, { "docid": "e2b696abc780ff18fafb022d998796da", "score": "0.5614751", "text": "public function getDemoUser()\n {\n if ($this->_user === false) {\n\n //$this->_user = User::findOne(['role' => User::ROLE_DEMO]);\n\n //return $this->_user;\n\n $settingForm=new SettingForm();\n\n\n $demo_account_id=$settingForm->getValue('demo_account_id', 0);\n $default_currency=$settingForm->getValue('default_currency','UAH');\n\n if($demo_account_id) {\n\n $user= User::findOne(['id' => $demo_account_id]);\n\n if($user){\n\n\n $new_demo_user=new User();\n\n // $new_demo_user->id=0;\n\n $new_demo_user->username=$user->username;\n\n // $new_demo_user->auth_key=$user->auth_key;\n\n $new_demo_user->email=md5(time().rand(0,99999999999999999999)).'@sensation.com.ua';//$user->email;\n\n $new_demo_user->role=User::ROLE_DEMO;\n\n $new_demo_user->status=User::STATUS_ACTIVE;//$user->status;\n\n $new_demo_user->default_currency=$default_currency;//$user->default_currency;\n\n $new_demo_user->setPassword('123456');\n\n $new_demo_user->generateAuthKey();\n\n if($new_demo_user->save(false)){\n\n\n //Нужно скопирывать фотокнигу\n\n $settingUserForm=new UserSettingForm();\n\n $settingUserForm->user_id=$new_demo_user->id;\n\n $settingUserForm->save();\n\n\n\n /*\n *\n *\n * $settingForm=new SettingForm();\n\n\n $demo_account_id=$settingForm->getValue('demo_account_id', 0);\n\n $photobooks=Photobook::find()->where(['status'=>Photobook::STATUS_NEW])->all();\n\n\n if(count($photobooks)>0){\n\n\n $photobook=$photobooks[0];\n\n\n $photobookForm=new PhotobookForm();\n\n\n\n if($photobookForm->loadById($photobook->id)){\n\n\n $photobookForm->copyToUser($new_demo_user->id);\n\n\n }\n\n\n }*/\n\n\n\n $this->_user=$new_demo_user;\n\n\n\n\n\n }\n\n\n }\n\n //$this->_user = User::findOne(['role' => User::ROLE_DEMO]);\n\n }\n /*if(!$this->_user)\n $this->_user = User::findByEmail($this->username);*/\n }\n\n return $this->_user;\n }", "title": "" }, { "docid": "2dcf8112f01456353a20b829913bbf2d", "score": "0.56142145", "text": "public function registrar_datos(){\n\t\tif($_SESSION[\"rol\"]!=\"operario\"\tand $_SESSION[\"rol\"]!=\"tostador\")\n\t\t{\n\t\t\t// agrego mensaje a arreglo de datos para ser mostrado \n\t\t\t$datos['mensaje_advertencia'] ='Usted no tiene permiso para realizar esta acción';\n\t\t\t\t// vuelvo a llamar la misma vista con los datos enviados previamente para que usuario corrija\n\t\t\t$this->vista('/paginas/index',$datos);\n\t\t\t\treturn;\t\t\n\t\t}\n\n\t\t//Y los guardo en la variable datos para hacer el Insert en la BD\n\t\t\t$datos=[\n\t\n\t\t\t\t'codigoFinalizar'=>trim($_POST['codigoFinalizar']),\t\t\t\t\t\n\t\t\t\t'idcafe'\t=>trim($_POST['idcafe']),\n\t\t\t\t'observacion'=>trim($_POST['observacion']),\n\t\t\t\t'mermaTueste'=>trim($_POST['mermaTueste']),\t\n\t\t\t\t\n\t\t\t];\n\t\t\t\t//var_dump($datos);\n\n\t\t$id = $this->TorrefaccionModelo->insertar_procesoTorrefaccionfinalizado($datos);\n\n\t\tif($id==1){\n\n\t\t\t$datos['mensaje_exito']='Se guardaron los datos';\t\t\n\t\t\t$this->vista('/EstadosTorrefaccion/registrar_inicio', $datos);\n\t\t\treturn;\n\t\t\t\n\t\t}else{\n\t\t\t$datos['mensaje_error'] ='Ocurrió un problema al procesar la solicitud';\n\t\t\t$this->vista('/EstadosTorrefaccion/registrar_finalizacion', $datos);\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t}", "title": "" } ]
684381275d16e14ff3739235991457ce
Grab all of our form elements.
[ { "docid": "d2b939969da75c1cef77d9959d411995", "score": "0.0", "text": "public function postRegistration($request)\n {\n // Our username and password from the form\n // will be used to log in as the new user if the\n // account is successfully created.\n // All of the elements (besides password) as a whole will be used\n // in order to cache this form for if registration fails.\n $email = $request->request->get('email');\n $password = $request->request->get('password');\n $firstName = $request->request->get('firstName');\n $lastName = $request->request->get('lastName');\n $token = $request->request->get('token');\n\n // Cache the form in case registration fails.\n $form = [\n 'email' => $email,\n 'firstName' => $firstName,\n 'lastName' => $lastName,\n 'token' => $token\n ];\n\n $formCache = new Component\\CachedItem('registrationForm');\n $formCache->setValue($form);\n\n $cacheMapper = $this->mapperFactory->createCacheMapper();\n $cacheMapper->save($formCache);\n\n // If we successfully create a new user,\n // we can log in as them.\n // If this failed, the error information will be stored\n // in StateObserver->'registration' via the Registration service.\n // if ($this->userAPIController->postUser($request)) {\n // $this->identificationAPIController->postLogin($request);\n // }\n\n $errors = $this->apiProvider->postJson('/register', $request);\n\n if (empty($errors->errors)) {\n return $this->apiProvider->postJson('/login', $request);\n }\n\n return $errors;\n }", "title": "" } ]
[ { "docid": "ff21621fc54337013fd1da7ba7b620bb", "score": "0.78836966", "text": "abstract function form_elements();", "title": "" }, { "docid": "2ac2492fa47f4934b3db490f4f5a7d74", "score": "0.7782435", "text": "protected function form_elements() {\n return array();\n }", "title": "" }, { "docid": "b6aae4bd302de5e62a0a39e3545cbe39", "score": "0.7231732", "text": "public function getFormElements() {\n return iterator_to_array($this->getGenerator(TRUE, TRUE, \"Loops\\Form\\Element\", [ \"value\", \"loopsid\", \"pagepath\", \"elements\" ]));\n }", "title": "" }, { "docid": "ab379a748a9fa8cae48ed3f99ba4c09f", "score": "0.71335346", "text": "public function get_elements() {\n return $this->_form->_elements;\n }", "title": "" }, { "docid": "288f94658e2a06e5a2911211ac41cb00", "score": "0.71335053", "text": "public function getFormElements() {\n $formArray = array();\n foreach($this->nameFormElements as $value) {\n array_push($formArray,$value);\n }\n foreach($this->contactFormElements as $value) {\n array_push($formArray,$value);\n }\n return $formArray;\n }", "title": "" }, { "docid": "f028ac616bc394039ae7707cd21d7293", "score": "0.689837", "text": "public function get_all_forms();", "title": "" }, { "docid": "57611de499ea21d103ab89c41f328f6e", "score": "0.66716725", "text": "public function pullFields(){\n $form = $this->pull();\n $fields = [];\n\n foreach($form->elements as $element){\n $fieldElement = new FieldElement($element, $this->_client);\n $fieldElement->getOptionList();\n $fields[] = $fieldElement;\n }\n return $fields;\n }", "title": "" }, { "docid": "cb035ee7ff788fdbf80136bba835af1b", "score": "0.66019994", "text": "abstract protected function get_form_fields();", "title": "" }, { "docid": "f47d159c7787bae84278e217bc7aebf7", "score": "0.65274", "text": "public function iterateComponentForm() {\n $elements = [];\n\n if (!is_null($this->componentFormElements)) {\n foreach ($this->componentFormElements as $element) {\n $elements[] = $element;\n $elements = array_merge($elements, $element->iterateChildren());\n }\n }\n\n return $elements;\n }", "title": "" }, { "docid": "d31c0e106d26131dc01e33c8eae30a6d", "score": "0.6489824", "text": "abstract protected function getFormFields();", "title": "" }, { "docid": "7900596b18e42a64b16bc9676af95add", "score": "0.6442904", "text": "protected function _getElements() {\n $this->addElement(\"hidden\", \n \"id\", array(\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"Imagen\", \n \"art\", array(\n 'label' => \"Art\",\n 'required' => false,\n 'attribs' => array(\"class\" => \"\")\n )\n )\n ->addElement(\"text\", \n \"name\", array(\n 'label' => \"Name\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control\")\n )\n )\n ->addElement(\"text\", \n \"letter\", array(\n 'label' => \"Letter\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control\")\n )\n )\n ->addElement(\"select\", \n \"category\", array(\n 'label' => \"Art Category\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control chosen\")\n )\n )\n ->addElement(\"FlexCheckbox\", \n \"activo\", array(\n 'label' => \"Active\",\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"FlexCheckbox\", \n \"default\", array(\n 'label' => \"Default\",\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"Mensaje\", \n \"mensaje\", array(\n 'required' => false\n )\n )\n ->addElement(\"FormAction\", \n \"buttons\", array(\n 'label' => \"\",\n 'required' => false,\n 'attribs' => array()\n )\n );\n }", "title": "" }, { "docid": "447b05e88a863f948a292818f708c2d7", "score": "0.6372625", "text": "public function get_forms() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "e401acc1de911b7301d33c3a5a50f8cd", "score": "0.63726246", "text": "public function getInputs() {\n\t\t// TODO: A few more cases should be taken in account\n\t\t// - Several form tags on the page\n\t\t// - Other input tags such as textarea\n\t\tif (empty ( $this->html ))\n\t\t\treturn array ();\n\t\t\n\t\t$return = array ();\n\t\t\n\t\t$dom = new DOMDocument ();\n\t\t@$dom->loadHtml ( $this->html );\n\t\t$inputs = $dom->getElementsByTagName ( 'input' );\n\t\tforeach ( $inputs as $input ) {\n\t\t\tif ($input->hasAttributes () && $input->attributes->getNamedItem ( 'name' ) !== NULL) {\n\t\t\t\tif ($input->attributes->getNamedItem ( 'value' ) !== NULL)\n\t\t\t\t\t$return [$input->attributes->getNamedItem ( 'name' )->value] = $input->attributes->getNamedItem ( 'value' )->value;\n\t\t\t\telse\n\t\t\t\t\t$return [$input->attributes->getNamedItem ( 'name' )->value] = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.63650477", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.63650477", "text": "public function getForm();", "title": "" }, { "docid": "1465b84321c1653041865f9790335ed0", "score": "0.6353638", "text": "public static function getFilledForms()\n {\n }", "title": "" }, { "docid": "db9724019beebd0dcafad194060d41ad", "score": "0.6349364", "text": "protected function fields()\n\t{\n\t\t$fields = '';\n\n\t\tforeach($this->elements as $element) {\n\t\t\t$func = 'form_' . $element->type(); // variable function call\n\t\t\t$fields .= $this->$func($element) . \"\\n\";\n\t\t}\n\t\t$fields = rtrim($fields, \"\\n\");\n\n\t\t$this->body = $fields;\n\t}", "title": "" }, { "docid": "534c1bc0791bf36b8d70e3d6f7abab16", "score": "0.63276213", "text": "protected function getFormElements() {\n\t\treturn array(\n\t\t\t'fromid' => array(\n\t\t\t\t'name' => 'fromid',\n\t\t\t\t'default' => $this->getRequest()->getVal( 'fromid' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'wb-redirectentity-fromid',\n\t\t\t\t'label-message' => 'wikibase-redirectentity-fromid'\n\t\t\t),\n\t\t\t'toid' => array(\n\t\t\t\t'name' => 'toid',\n\t\t\t\t'default' => $this->getRequest()->getVal( 'toid' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'wb-redirectentity-toid',\n\t\t\t\t'label-message' => 'wikibase-redirectentity-toid'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "63c2251e2c8ffecbcf633974128e866e", "score": "0.6262835", "text": "public function toFormElements(): array\n {\n return [];\n }", "title": "" }, { "docid": "e154c405b91f3e9dbcaa8cf0fef4cec1", "score": "0.62499136", "text": "public function elements()\n {\n return [\n \n \"@email\"=>\"[name=email]\",\n \n \"@password\"=>\"[name=password]\",\n \n \"@name\"=>\"[name=name]\",\n \n \"@birth_day\"=>\"[name=birth_day]\",\n \n \"@phone\"=>\"[name=phone]\",\n \n \"@gender\"=>\"[name=gender]\",\n '@submit'=>'[type=submit]'\n ];\n }", "title": "" }, { "docid": "02f523b2a1066627a1c43ee0e0384466", "score": "0.623779", "text": "protected abstract function getFormElementNamesAndDefaultValues();", "title": "" }, { "docid": "9ceeaf6919f2cb57fde978b1b0cc9cd5", "score": "0.6191715", "text": "private function formElements()\n {\n return join($this->renderedElements);\n }", "title": "" }, { "docid": "1884f9fd1f35d1649178c43c4a992177", "score": "0.6139992", "text": "public function elements()\n {\n return [\n '@title' => 'input[name=\"title\"]',\n '@price' => 'input[name=\"price\"]',\n '@cash' => 'input[name=\"payment_method[]\"][value=\"cash\"]',\n '@non-cash' => 'input[name=\"payment_method[]\"][value=\"non-cash\"]',\n '@persons' => 'input[name=\"person_count\"]',\n '@categories' => 'input[name=\"categories[]\"][id=\"category-checkbox-1\"]',\n ];\n }", "title": "" }, { "docid": "d0888602a6b9317501ab225a474f92b7", "score": "0.6131032", "text": "public function prepareForm();", "title": "" }, { "docid": "e265f28056ffb165e8c4afba1f166d4e", "score": "0.6122074", "text": "private function prepare()\n {\n // Create an anonymous function to pass through to element classes\n $parent = $this;\n $anonFindElement = function($elementName) use ($parent)\n {\n return $parent->findElement($elementName);\n };\n \n \n // Added Hidden Form Id\n $hiddenFormId = new FormElement_Hidden('__form_id', ['value'=>$this->formId], $anonFindElement, $this->postMode);\n \n // Create Nonce Element\n $nonceElement = new FormElement_Hidden('__nonce', ['value'=>$this->nonceKey], $anonFindElement, $this->postMode);\n \n // Check Nonce if in Post Mode\n if ($this->postMode) {\n $this->nonceValid = \\TohirExternal\\NonceUtil::check(FORM_SALT.'~'.$hiddenFormId->getValue(), $nonceElement->getValue());\n }\n \n // If nonce failed, mark form as invalid, and add an error message\n if (!$this->nonceValid ) {\n $this->isValid = FALSE;\n $this->validationErrors[] = 'Form submission timeout exceeded, please try again.';\n \n // Generate a new Nonce Key and Element!\n $newNonceKey = \\TohirExternal\\NonceUtil::generate(FORM_SALT.'~'.$hiddenFormId->getValue(), FORM_TIMEOUT);\n $nonceElement = new FormElement_Hidden('__nonce', ['value'=>$newNonceKey], $anonFindElement);\n }\n \n // Add Rendered Items\n $this->renderedElements[] = $hiddenFormId->getRendered();\n $this->renderedElements[] = $nonceElement->getRendered();\n \n // Loop through elements\n foreach ($this->elements as $name => $element)\n {\n // Form Element Names MUST start with a letter, and may only contain letters, digits and underscores\n if (!preg_match('/\\A(?:[a-z][\\w|_]+)\\Z/i', $name)) { // Regex Buddy: [a-z][\\w|_]+\n throw new Exception('Invalid Element Name! Form Element Names MUST start with a letter, and may only contain letters, digits and underscores: <pre>'.htmlspecialchars($name).'</pre>');\n }\n \n $class = 'FormElement_'.strtoupper($element['type']);\n if (class_exists($class)) {\n \n // Nonce Valid should always be true for hidden elements to preserve their values\n $nonceValid = ($class == 'FormElement_HIDDEN') ? TRUE : $this->nonceValid;\n \n $item = new $class($name, $element, $anonFindElement, $this->postMode, $nonceValid, $this->formId, $this->elementLayout);\n \n $this->renderedElements[] = $item->getRendered();\n $this->validationRules = array_merge($this->validationRules, $item->getValidation());\n \n $itemValidationMessage = $item->getValidationMessage();\n if (!empty($itemValidationMessage)) {\n $this->validationMessages[$name] = $itemValidationMessage;\n }\n \n // Adjust enctype if for File Upload\n if ($class == 'FormElement_FILE') {\n $this->formParts['enctype'] = 'multipart/form-data';\n }\n \n $this->addOnJavascript = array_merge($this->addOnJavascript, $item->getAddOnJavascript());\n $this->formOnInputCode = array_merge($this->formOnInputCode, $item->getFormOnInputCode());\n \n // If postMode, and nonce passes, then get the Posted values, and check Validation\n // If nonce fails, we dont retrieve posted values and do validation checks\n // This is to punish them!!!\n if ($this->postMode && $this->nonceValid && $class != 'FormElement_HTML') { // Ignore HTML type\n $this->formData = array_merge($this->formData, $item->getPostData());\n \n // If Item is Not Valid\n if (!$item->isValid()) {\n \n // Mark as such\n $this->isValid = FALSE;\n \n // Get Validation Errors\n $this->validationErrors = array_merge($this->validationErrors, $item->getValidationErrors());\n }\n }\n } else {\n echo '<br /> - NO Class for Type '.$element['type'].' Yet<br />';\n }\n }\n \n // Cancel Button\n if (empty($this->formParts['cancelurl'])) {\n $cancelLink = '';\n } else {\n $cancelLink = sprintf(' &nbsp; / &nbsp; <a href=\"%s\">Cancel</a>', $this->formParts['cancelurl']);\n }\n\n // Add Submit Button\n $submitButton = new FormElement_SUBMIT('submitbutton', [\n \t'value'=>$this->formParts['submitbutton'],\n\t\t'cssClass'=>$this->formParts['submitbuttonClass']\n\t\t]);\n $this->renderedElements[] = $submitButton->getRendered().$cancelLink;\n \n $this->formParts['oninput'] = implode(';', $this->formOnInputCode);\n }", "title": "" }, { "docid": "0396e9d9b2b3066b89ad3563e0da166c", "score": "0.6111525", "text": "protected function makeElems()\n {\n $elems = new My_FormElement();\n \n $this->fname = $elems->getCommonTbox('fname','First name:');\n $this->lname = $elems->getCommonTbox('lname','Last name:');\n $this->uuid = $elems->getUuidTbox();\n $this->employer = $elems->getCommonTbox('employer','Employer:');\n $this->wantedJob = $elems->getCommonTbox('wanted_job','What job do you want for your co-op experience?');\n $this->curJob = $elems->getCommonTbox('current_job', 'Job title:');\n $this->department = $elems->getCommonTbox('department', 'Department:');\n $this->sdate = $elems->getDateTbox('start_date','Start date');\n $this->edate = $elems->getDateTbox('end_date','End date');\n $this->payRate = $elems->getPayRateTbox();\n $this->address = $elems->getCommonTbox('address', 'Address/City/ZIP:');\n $this->jobAddr = $elems->getCommonTbox('job_address', 'Address/City/ZIP:');\n //$this->grad = $elems->getDateTbox('grad_date', 'Graduation date');\n $this->grad = $elems->getSemesterDropdown('grad_date', 'Graduation date');\n $this->major = $elems->getMajorSelect();\n $this->semInMaj = $elems->getSemesterInMajorRadio();\n $this->phone = $elems->getCommonTbox('phone', 'Telephone:');\n $this->email = $elems->getEmailTbox('email','E-mail:');\n $this->employer = $elems->getCommonTbox('employer', 'Employer:');\n $this->supervName = $elems->getCommonTbox('superv_name', 'Supervisor\\'s name:');\n $this->supervTitle = $elems->getCommonTbox('superv_title', 'Supervisor\\'s title:');\n $this->supervPhone = $elems->getCommonTbox('superv_phone', 'Supervisor\\'s telephone:');\n $this->supervEmail = $elems->getEmailTbox('superv_email', 'Supervisor\\'s e-mail:');\n $this->agree = $elems->getAgreementRadio('');\n $this->submit = $elems->getSubmit();\n \n }", "title": "" }, { "docid": "a49975aa54fe0dec5bc5eb8c30f8062d", "score": "0.60753936", "text": "public function get_form();", "title": "" }, { "docid": "b4307f1390db8ec17cc71c347df7b772", "score": "0.6072069", "text": "public function elements()\n {\n return [\n '@respondentName' => 'input[name=\"respondent.name\"]',\n '@respondentEmail' => 'input[name=\"respondent.email\"]',\n '@respondentActive' => 'input[name=\"respondent.active\"]',\n '@portfolioId' => 'select[name=\"portfolio.id\"]',\n '@emailSend' => 'select[name=\"email.send_email\"]',\n '@emailSubject' => 'input[name=\"email.subject\"]',\n '@emailAttachPortfolio' => 'input[name=\"email.attach_portfolio\"]',\n '@emailUseTemplate' => 'select[name=\"email.use_email_template\"]',\n '@emailContent' => 'textarea[name=\"email.content\"]',\n '@emailTemplateId' => 'select[name=\"email.template_id\"]',\n '@previous' => 'form + div button:first-child',\n '@next' => 'form + div button:last-child',\n '@apply' => 'button[type=\"submit\"]',\n ];\n }", "title": "" }, { "docid": "bd4c1d64c8320de30a9a33386c7ec9d9", "score": "0.6066264", "text": "public function elements()\n {\n return [\n '@moduleId' => 'input[name=module_id]',\n '@category' => 'select[name=category_l_id]',\n '@caption' => 'input[name=caption]',\n '@description' => 'textarea[name=description]',\n ];\n }", "title": "" }, { "docid": "1d8dfba39e4482a1908fbd93e62a7a77", "score": "0.6051687", "text": "public function elements() {\n return [\n '@email' => 'input[name=email]',\n '@submit' => 'button[type=submit]',\n ];\n }", "title": "" }, { "docid": "2e2d63e463164639cb53840a7b692208", "score": "0.6027018", "text": "protected function formElements()\n\t\t{\n\t\t\t$this->addFormElement((new Text(\"name\", 'Menu text*'))->setClasses('half inline-label first')->addValidation(Element::REQUIRED), \"Content\");\n\t\t\t//$this->addFormElement((new Text(\"contentTitle\", 'Content Title'))->setClasses('inline-label half'), \"Content\");\n\n\t\t\tparent::formElements();\n\t\t\t// if(PAGE_BANNER)\n\t\t\t// {\n\t\t\t// \t$this->addFormElement(new ImageElement('bannerImage', 'Banner', $this->bannerImage), \"Content\");\n\t\t\t// }\n\n\t\t\t$this->addFormElement(new BasicEditor(\"contentTitle\", 'Content Title <span>(optional)</span>'), \"Content\");\n\n\t\t\t$this->addFormElement(new Editor(\"content\", 'Content'), \"Content\");\n\n\n\n\t\t\t// if(PAGE_BANNER_TEXT)\n\t\t\t// {\n\t\t\t// \t$this->addFormElement((new Text(\"bannerText\", 'Banner Text')), \"Content\");\n\t\t\t// }\n\n\t\t\t if(PAGE_AUX_IMAGE)\n\t\t\t {\n\t\t\t \t$this->addFormElement(new ImageElement('image', 'Image', $this->image), \"Content\");\n\t\t\t }\n\n\t\t\tif(PAGE_HAS_SLIDESHOW)\n\t\t\t{\n\t\t\t\t$this->addFormElement(new Checkbox(\"useSlideshow\", 'Display banner/slideshow'), \"Banner/Slideshow\");\n\t\t\t\t//\n\t\t\t\t// /** @var ImageProperty $imageProperty */\n\t\t\t\t$this->addFormElement(new GridElement('slides', 'Slides'), \"Banner/Slideshow\");\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Text(\"title\", 'Page Title'), \"Metadata\");\n\t\t\t$this->addFormElement(new Textarea(\"keywords\", 'Keywords'), \"Metadata\");\n\t\t\t$this->addFormElement(new Textarea(\"description\", 'Description'), \"Metadata\");\n\t\t\t$this->addFormElement(new Select(\"module\", 'Page type', $this->getPageTypeOptions()), \"Setup\");\n\t\t\t$this->addFormElement(new SearchingText(\"parent\", 'Parent (\"Select none\" for top level pages)', $this->getParentSearchValues()), \"Setup\");\n\n\t\t\t$pageType = \"normalPage\";\n\n\t\t\tif($this->isExternalRedirect)\n\t\t\t{\n\t\t\t\t$pageType = \"externalLink\";\n\t\t\t}\n\t\t\telse if($this->isInternalRedirect)\n\t\t\t{\n\t\t\t\t$pageType = \"internalLink\";\n\t\t\t}\n\t\t\telse if($this->isDuplicate)\n\t\t\t{\n\t\t\t\t$pageType = \"duplicate\";\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Radio(\"actsAs\", \"Acts as\",\n\t\t\t[\n\t\t\t\t\"Normal Page\" => \"normalPage\",\n\t\t\t\t\"External Link (enter URL below)\" => \"externalLink\",\n\t\t\t\t\"Internal Link (select page below)\" => \"internalLink\",\n\t\t\t\t\"Duplicate of (select page below)\" => \"duplicate\"\n\t\t\t], $pageType), \"Setup\");\n\n\t\t\t$this->addFormElement(new Text(\"redirect\", \"Redirect URL\", $this->redirect), \"Setup\");\n\t\t\t$this->addFormElement(new SearchingText(\"original\", \"Link to / Duplicate of\", $this->getOriginalSearchValues()), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox(\"onNav\", 'Display in main menu'), \"Setup\");\n\n\t\t\tif(SITE_SECONDARY_NAV)\n\t\t\t{\n\t\t\t\t$this->addFormElement(new Checkbox(\"onSecondaryNav\", 'Display in footer menu (Quicklinks)'), \"Setup\");\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Checkbox('useNewWindow', 'Open in new browser tab'), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox('isHomepage', 'Set as Home page'), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox(\"isErrorPage\", 'Set as Error page'), \"Setup\");\n\t\t}", "title": "" }, { "docid": "d3226411c04f380b7b7c6036efb91f5f", "score": "0.6026886", "text": "function make_form() {\n #$xml_str = file_get_contents( $xml_src );\n if( ! $form_dom = domxml_open_file( $this->xml_src ) ) {\n die( \"Cannot find XML source dcument, \" . $this->xml_src . \".<br>\\n\" );\n }\n $formlist = $form_dom->document_element();\n /*\n * Identify the form element values that need to be used by database queries\n */\n $fattr_list = $formlist->get_elements_by_tagname( 'formattr' );\n for( $i = 0; $i < count( $fattr_list ); ++$i ) {\n $xml_fattr = $fattr_list[$i];\n $fattr_name = $xml_fattr->get_content( );\n $fattr_ary[$fattr_name] = $form_attrs[$fattr_name];\n }\n /* Get the list of database queries */\n /* NOT YET IMPLEMENTED\n */\n $query_ary = $formlist->get_elements_by_tagname( 'query' );\n for ($i = 0; $i<count($query_ary); $i++) {\n $xml_query = $query_ary[$i];\n $query_name = $xml_query->get_attribute( \"name\" );\n if( ! $query_name ) {\n echo \"<b>Warning: Ignoring unnamed query.</b>\\n\";\n continue;\n }\n /*\n * Get the columns to select and format a query string\n */\n $select_elems = $xml_query->get_elements_by_tagname( 'select' );\n for( $j = 0; $j < count( $select_elems ); ++$j ) {\n $xml_select = $select_elems[$j];\n $query_as = $xml_select->get_attribute( \"as\" );\n if( $j > 0 ) { /* Comma-separated select values */\n $query_sel_str .= \", \";\n }\n $xml_sel_src = $xml_select->get_attribute( \"src\" );\n /*\n * If the SELECT specifies a src attribute and a form-submitted variable\n * exists, use the form -submitted value in the select. Otherwise, use\n * the XML content\n */\n if( $xml_sel_src && $fattr_ary[$xml_sel_src] ) { /* Get value from a form submission */\n $query_sel_str .= $fattr_ary[$xml_sel_src];\n } else {\n $query_sel_str .= $xml_select->get_content();\n }\n if( $xml_select->get_attribute( \"as\" ) ) {\n $query_sel_str .= \" AS \" . $xml_select->get_attribute( \"as\" );\n }\n }\n /*\n * Get the tables to select from and format a query string\n */\n $query_tbl_str = \"\";\n $table_elems = $xml_query->get_elements_by_tagname( 'from' );\n for( $j = 0; $j < count( $table_elems ); ++$j ) {\n $xml_table = $table_elems[$j];\n if( $j > 0 ) { /* Comma-separated select values */\n $query_tbl_str .= \", \";\n }\n /* Include a table join\n */\n $xml_join_src = $xml_table->get_attribute( \"join\" );\n if( $xml_join_src && $j > 0 ) { /* Get value from a form submission */\n $query_tbl_str .= $xml_join_src . \" JOIN \";\n }\n $xml_tbl_src = $xml_table->get_attribute( \"src\" );\n /*\n * If the TABLE specifies a src attribute and a form-submitted variable\n * exists, use the form -submitted value in the select. Otherwise, use\n * the XML content\n */\n if( $xml_tbl_src && $fattr_ary[$xml_tbl_src] ) { /* Get value from a form submission */\n $query_tbl_str .= $fattr_ary[$xml_tbl_src];\n } else {\n $query_tbl_str .= $xml_table->get_content();\n }\n }\n /*\n * Extract the query constraint. A constraint consists of:\n * <where src=\"formvar\">\n * <expr src=\"formvar\" operator=\"=\">\n * An expr expression will be written as\n * <operator> 'expr_content'\n * If src is specified and $form_attrs[$src] is defined, $form_attrs[$src]\n * will be used instead of expr_content\n */\n $query_where_str = \"\";\n $where_elems = $xml_query->get_elements_by_tagname( 'where' );\n for( $j = 0; $j < count( $where_elems ); ++$j ) {\n $xml_where = $where_elems[$j];\n $expr_elems = $xml_query->get_elements_by_tagname( 'expr' );\n for( $k = 0; $k < count( $expr_elems ); ++$k ) {\n $xml_expr = $expr_elems[$k];\n $qry_expr_src = $xml_expr->get_attribute( 'src' );\n $qry_expr_opr = $xml_expr->get_attribute( 'operator' );\n if( $qry_expr_opr ) {\n $query_where_str .= $qry_expr_opr;\n }\n if( $qry_expr_src && isset( $form_attrs[$qry_expr_src] ) ) {\n $query_where_str .= \"'\" . $form_attrs[$qry_expr_src] . \"'\";\n } else {\n $query_where_str .= $xml_expr->get_content();\n }\n }\n }\n $query_str = \"SELECT \" . $query_sel_str . \" \" .\n \"FROM \" . $query_tbl_str;\n if( $query_where_str ) {\n $query_str .= \" WHERE \" . $query_where_str;\n }\n/* echo \"DEBUG: The full query is: $query_str.<br>\\n\"; */\n $this->queries[$query_name] = $query_str;\n }\n /* Get the list of forms */\n $forms_ary = $formlist->get_elements_by_tagname( 'form' );\n for( $i = 0; $i < count( $forms_ary ); ++$i ) {\n $xml_form = $forms_ary[$i];\n $form_name = $xml_form->get_attribute( \"name\" );\n $form_query = $xml_form->get_attribute( \"query\" );\n $form_method = $xml_form->get_attribute( \"method\" );\n $form_pre = $xml_form->get_attribute( \"pre\" );\n $form_post = $xml_form->get_attribute( \"post\" );\n $form_class = $xml_form->get_attribute( \"class\" );\n $form_nodata = $xml_form->get_attribute( \"nodata\" );\n $form_action = $xml_form->get_attribute( \"action\" );\n /* Use this script if nothing is specified */\n if( ! $form_action ) {\n $form_action = $_SERVER[PHP_SELF];\n }\n if( $form_name == $f_name || $f_name == \"\" ) {\n /* Check to see if any database queries have been specified and populate\n * the form fields as appropriate.\n * For each row returned, we will need to see if the fields match any\n * form element and update the form. Queries extracting rows for inclusion\n * in a SELECT element may return numerous rows which may override the\n * options given in the XML document, or one entry may simply choose the\n * selected item.\n */\n if( $queries[$form_query] ) {\n if( ! $qry_res_ary[$form_query] ) {\n// echo \"DEBUG: Running query \" . $queries[$form_query] .\n// \" for form, \" . $form_name . \".<br>\\n\";\n $qry_res_ary[$form_query] = mysql_query( $queries[$form_query] );\n if( ! mysql_numrows( $qry_res_ary[$form_query] ) &&\n $form_nodata == \"break\" ) {\n continue;\n }\n }\n }\n /* Check what to do if the query returns no results */\n \n $form_ary[$form_name] = new Form( $form_name, $form_action, $form_method );\n $form_ary[$form_name]->setProperty( \"preStr\", $form_pre );\n $form_ary[$form_name]->setProperty( \"postStr\", $form_post );\n $input_elems = $xml_form->get_elements_by_tagname( 'input' );\n for( $j = 0; $j < count( $input_elems ); ++$j ) {\n $xml_input = $input_elems[$j];\n $input_order = 0;\n $elem_attrs = array();\n /* Set a form wide class if specified */\n if( $form_class ) { $elem_attrs['class'] = $form_class; }\n $input_name = $xml_input->get_attribute( 'name' );\n $input_type = $xml_input->get_attribute( 'type' );\n $input_class = $xml_input->get_attribute( 'class' );\n $input_order = $xml_input->get_attribute( 'order' );\n /* Override element class if specified */\n if( $input_class ) {\n $elem_attrs['class'] = $input_class;\n }\n $input_disabled = $xml_input->get_attribute( 'disabled' );\n $elem_attrs['onclick'] = $xml_input->get_attribute( 'onclick' );\n $elem_attrs['disabled'] = $xml_input->get_attribute( 'disabled' );\n $input_readonly = $xml_input->get_attribute( 'readonly' );\n $elem_attrs['readonly'] = $xml_input->get_attribute( 'readonly' );\n $elem_attrs['preStr'] = $xml_input->get_attribute( 'pre' );\n $elem_attrs['postStr'] = $xml_input->get_attribute( 'post' );\n /* Retain a form submitted value rather than the XML value */\n if( $form_attrs[$input_name] ) {\n $elem_attrs['elemValue'] = $form_attrs[$input_name];\n } else {\n $elem_attrs['elemValue'] = $xml_input->get_content();\n }\n if( ! $input_order ) {\n $input_order = $input_name;\n }\n $input_elem = new InputElement( $input_type, $input_name );\n $input_elem->elemRegister( $elem_attrs );\n $form_ary[$form_name]->addElement( $input_elem, $input_order );\n }\n /*\n * Retrive any textarea items\n */\n $tarea_elems = $xml_form->get_elements_by_tagname( 'input' );\n for( $j = 0; $j < count( $tarea_elems ); ++$j ) {\n $xml_tarea = $input_elems[$j];\n $tarea_order = 0;\n $elem_attrs = array();\n /* Set a form wide class if specified */\n if( $form_class ) { $elem_attrs['class'] = $form_class; }\n $tarea_name = $xml_tarea->get_attribute( 'name' );\n $tarea_cols = $xml_tarea->get_attribute( 'cols' );\n $tarea_rows = $xml_tarea->get_attribute( 'rows' );\n $tarea_class = $xml_tarea->get_attribute( 'class' );\n $tarea_id = $xml_tarea->get_attribute( 'id' );\n $tarea_order = $xml_tarea->get_attribute( 'order' );\n if( $tarea_class ) { $elem_attrs['class'] = $tarea_class; }\n $tarea_disabled = $xml_tarea->get_attribute( 'disabled' );\n $elem_attrs['onclick'] = $xml_tarea->get_attribute( 'onclick' );\n $elem_attrs['disabled'] = $xml_tarea->get_attribute( 'disabled' );\n $tarea_readonly = $xml_tarea->get_attribute( 'readonly' );\n $elem_attrs['readonly'] = $xml_tarea->get_attribute( 'readonly' );\n $elem_attrs['preStr'] = $xml_tarea->get_attribute( 'pre' );\n $elem_attrs['postStr'] = $xml_tarea->get_attribute( 'post' );\n /* Retain a form submitted value rather than the XML value */\n if( $form_attrs[$tarea_name] ) {\n $elem_attrs['elemValue'] = $form_attrs[$tarea_name];\n } else {\n $elem_attrs['elemValue'] = $xml_tarea->get_content();\n }\n if( ! $tarea_order ) {\n $tarea_order = $tarea_name;\n }\n $tarea_elem = new InputElement( $tarea_name );\n $tarea_elem->elemRegister( $elem_attrs );\n $form_ary[$form_name]->addElement( $tarea_elem, $tarea_order );\n }\n /*\n * Extract any dropdown (select) lists\n * The fill attribute can be one of:\n * db: use only the values from the database, where the value attribute\n * gives the name of the column to use for the option value, and the\n * display attribute gives the name of the column to use for the\n * displayed text for the option.\n * select: The option list is populated from the XML file with the\n * value attribute used to specify which column should be matched to\n * provide a selected option. If the XML value attribute has no\n * value, no match is attempted.\n * file: The option list is populated from the database query where\n * the value attribute gives the name of the column to use for the\n * option value, and the display attribute gives the name of the\n * column to use for the displayed text for the option. Any of the\n * dropdown elements value attribute values that match the database\n * column will be marked 'selected'.\n */\n $select_elems = $xml_form->get_elements_by_tagname( 'dropdown' );\n for( $j = 0; $j < count( $select_elems ); ++$j ) {\n $xml_select = $select_elems[$j];\n $select_name = $xml_select->get_attribute( 'name' );\n $select_fill = $xml_select->get_attribute( 'fill' );\n $select_order = $xml_select->get_attribute( 'order' );\n $select_class = $form_class;\n if( $xml_select->get_attribute( 'class' ) ) {\n $select_class = $xml_select->get_attribute( 'class' );\n }\n $select_value = $xml_select->get_attribute( 'value' );\n $select_multiple = $xml_select->get_attribute( 'multiple' );\n $select_disabled = $xml_select->get_attribute( 'disabled' );\n $select_size = $xml_select->get_attribute( 'size' );\n $select_pre = $xml_select->get_attribute( 'pre' );\n $select_post = $xml_select->get_attribute( 'post' );\n $select_subq = $xml_select->get_attribute( 'opt_query' );\n $select_opts = $xml_select->get_elements_by_tagname( 'option' );\n\n $sel_opt_ary = array();\n for( $k = 0; $k < count( $select_opts ); ++$k ) {\n $select_option = $select_opts[$k];\n $option_val = $select_option->get_attribute( 'value' );\n $option_disp = $select_option->get_content();\n $sel_opt_ary[$option_val] = $select_option->get_content();\n }\n $select_obj = new SelectElement( $select_name, $sel_opt_ary );\n $select_obj->setProperty( \"class\", $select_class );\n $select_obj->setProperty( \"multiple\", $select_multiple );\n $select_obj->setProperty( \"sub_query\", $select_subq );\n $select_obj->setProperty( \"size\", $select_size );\n $select_obj->setProperty( \"disabled\", $select_disabled );\n $select_obj->setProperty( \"preStr\", $select_pre );\n $select_obj->setProperty( \"postStr\", $select_post );\n /*\n * Check the database query for a field that matches the value\n * attribute for this form and, if not set via POST/GET, apply the\n * db value to the form object\n * FIXME: This is very inefficient considering that we also hack\n * through the array in the same way below, if not for the\n * same reasons.\n */\n if( $qry_res_ary[$form_query] && ! $form_attrs[$select_name] ) {\n for( $k = 0; $k < mysql_numrows( $qry_res_ary[$form_query] ); ++$k ) {\n $qry_row = mysql_fetch_array( $qry_res_ary[$form_query], MYSQL_ASSOC );\n if( is_array( $qry_row ) ) {\n while( list( $col, $value ) = each( $qry_row ) ) {\n if( $col == $select_value ) {\n $select_obj->setProperty( \"elemValue\", $value );\n }\n }\n }\n }\n }\n $form_ary[$form_name]->addElement( $select_obj, $select_order );\n }\n /*\n * Check the database query to see if there are any updates that need\n * to be applied to the form. Don't update the form object if the\n * form_attr array already contains a value, i.e., has been populated\n * by a form submission.\n */\n if( $qry_res_ary[$form_query] &&\n mysql_numrows( $qry_res_ary[$form_query] ) ) {\n /* Reset the database rows */\n mysql_data_seek( $qry_res_ary[$form_query], 0 );\n for( $k = 0; $k < mysql_numrows( $qry_res_ary[$form_query] ); ++$k ) {\n $qry_row = mysql_fetch_array( $qry_res_ary[$form_query],\n MYSQL_ASSOC );\n while( list( $col, $value ) = each( $qry_row ) ) {\n if( ! $form_attrs[$col] ) {\n $form_ary[$form_name]->setElementAttrById( $col,\n \"elemValue\", $value );\n }\n }\n }\n mysql_freeresult( $qry_res_ary[$form_query] );\n }\n }\n }\n return( $form_ary );\n}", "title": "" }, { "docid": "0aed2cc029360c7c06aa5ef1a23b15ac", "score": "0.6026771", "text": "public function getAll() {\n\t\t$all = $this->wire(new InputfieldsArray());\n\t\tforeach($this->children as $child) {\n\t\t\tif($child instanceof InputfieldWrapper) {\n\t\t\t\tforeach($child->getAll() as $c) {\n\t\t\t\t\t$all->add($c); \n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$all->add($child); \n\t\t\t}\n\t\t}\n\t\treturn $all;\n\t}", "title": "" }, { "docid": "0f14da86937490331bd966803ae4d0d8", "score": "0.60257685", "text": "function getForm();", "title": "" }, { "docid": "1ee0b5e2cb58ee37ae167fd09d411521", "score": "0.6012207", "text": "abstract protected function prepareFormFields();", "title": "" }, { "docid": "989e1e23cf1367a99b49193aeca2d10d", "score": "0.60064286", "text": "abstract protected function buildForm();", "title": "" }, { "docid": "faab9d15b9fc161a4db8a8f7c1ff9a29", "score": "0.6002101", "text": "public function buildFormFields()\n {\n }", "title": "" }, { "docid": "393916ad16b0ab625cc5175099729135", "score": "0.5981744", "text": "public function initializeFormElement()\n {\n }", "title": "" }, { "docid": "393916ad16b0ab625cc5175099729135", "score": "0.5981744", "text": "public function initializeFormElement()\n {\n }", "title": "" }, { "docid": "802fa29839c0bea57afd42b6b2ae0720", "score": "0.59658617", "text": "public function read_form()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "7a36f96216bd044499a5ccf33d7b735c", "score": "0.5953526", "text": "protected function initAllForms()\n {\n }", "title": "" }, { "docid": "0a3eed4707ce86c03a73de56dfed3ff8", "score": "0.5952987", "text": "public function index()\n {\n return new FormCollection(Form::all());\n }", "title": "" }, { "docid": "9efb134d674ecdebc03f6d9dfac5a936", "score": "0.59057176", "text": "function renderInputs($formxml) {\n\tforeach($formxml->inputelements->children() as $element) {\n\n\t\t// render hidden variable\n\t\tif ($element->type=='hidden') renderHidden($element);\n\t\t// render line of text\n\t\tif ($element->type=='const_text') renderConstText($element);\n\n\t\t// render hyperlink\n\t\tif ($element->type=='ahref') renderAhref($element);\n\t\t//render text as input field\n\t\tif ($element->type=='form_text') renderFormText($element);\n\t\t//render images \n\t\tif ($element->type=='captcha') renderCaptcha($element);\n\t\t\n\t\t//render text as input field\n\t\tif ($element->type=='text') renderText($element);\n\n\t\t//render text area as input field\n\t\tif ($element->type=='textarea') renderTextArea($element);\n\n\t\t//render email as input field\n// still to do\n\t\tif ($element->type=='email') renderTexteMail($element);\n\t\t\n\t\t//render password as input field\n\t\tif ($element->type=='password') renderPwd($element);\n\t\t\n\t\t//render select \n\t\tif ($element->type=='select') renderSelect($element);\n\t\t\n\t\t//render radio\n\t\tif ($element->type=='radio') renderRadio($element);\n\t\t\n\t\t//render checkboxes\n\t\tif ($element->type=='checkbox') renderCheckboxes($element);\n\t\t\n\t\t//render divider\n\t\tif ($element->type=='divider') renderDivider($element);\n\n\t\t//render file field\n\t\tif ($element->type=='file') renderFileButton($element);\n\t\t\n\t}\n}", "title": "" }, { "docid": "bb56dac0118b9787ce5794c3007492d1", "score": "0.59016955", "text": "public function elements()\n {\n return [\n '@start' => 'input[name=start]',\n '@duration' => 'input[name=duration]',\n '@taskType' => 'select[name=taskType]',\n '@description' => 'input[name=description]',\n '@cancel' => 'a[name=cancel]',\n '@create' => '#create'\n ];\n }", "title": "" }, { "docid": "dacfe3a9052ccd7dd3f9459434c95b7e", "score": "0.58904886", "text": "public function get_form()\n\t{\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM FORM;\";\n\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "4eba2c8229385231cdfda9d1349c7cac", "score": "0.5875698", "text": "public function GetSubmitFields ();", "title": "" }, { "docid": "7810e733eefa51bc4994f87d4a1935b3", "score": "0.5875055", "text": "protected function collectFields()\n {\n $fields = clone $this->form->fields();\n\n $all = $fields->toArray();\n\n foreach ($this->form->rows() as $row) {\n $rowFields = $row->fields()->map(function ($field) {\n return $field['element'];\n });\n\n $match = false;\n\n foreach ($rowFields as $field) {\n if (($index = array_search($field, $all)) !== false) {\n if (! $match) {\n $fields->put($index, $row);\n } else {\n $fields->pull($index);\n }\n\n $match = true;\n }\n }\n\n $this->hasRows = true;\n }\n\n $fields = $fields->slice($this->offset);\n\n $this->offset += $fields->count();\n\n return $fields;\n }", "title": "" }, { "docid": "bf2c50ac392c03f4d7a15b6bac22f9be", "score": "0.58448994", "text": "public function getXMLFormContent(){\n\n\t\treturn $this->FormFieldList;\n\n\t}", "title": "" }, { "docid": "9e13c22e6554cac6b1b7cf26eada9289", "score": "0.58406955", "text": "public function all()\n {\n $endpoint = 'https://api.hubapi.com/forms/v2/forms';\n\n return $this->client->request('get', $endpoint);\n }", "title": "" }, { "docid": "bd4eb9bce1d1d7603af01f50529162b6", "score": "0.58396316", "text": "public function getElements()\n {\n return array(\n array(\n 'id' => 'id',\n 'element' => 'hidden',\n ),\n array(\n 'id' => 'word',\n 'element' => 'text', \n 'attributes' => array(\n 'class' => 'form-control input-large',\n ),\n ),\n array(\n 'id' => 'delete',\n 'element' => 'checkbox',\n ),\n );\n }", "title": "" }, { "docid": "77ce2ccf689dd6319179302056b0189e", "score": "0.57696927", "text": "public function elements()\n\t{\n\t\treturn [\n\t\t\t'@sign-in-email' => '#signInForm input[name=\"email\"]',\n\t\t\t'@sign-in-password' => '#signInForm input[name=\"password\"]',\n\t\t\t'@forgot-password-email' => '#modalsForgotPassword input[name=\"email\"]',\n\t\t];\n\t}", "title": "" }, { "docid": "ed745e797c19aebe52f85ad0d598ddc6", "score": "0.57621765", "text": "public function elements(): array\n {\n $fields = $this->transformer->getOptionsFields();\n $fields[] = new Submit();\n \n $fields[] = new Hidden(\n '_transformer',\n [\n 'default' => $this->transformer::getSlug()\n ]\n );\n return $fields;\n }", "title": "" }, { "docid": "ed8ae392a23632af7ed89fda35569d6e", "score": "0.57559437", "text": "public function prepareForm() {\n\n }", "title": "" }, { "docid": "897dc3936d643c5eaa0449756e8d770c", "score": "0.575388", "text": "protected function prepareFormFields() {\n\n }", "title": "" }, { "docid": "5c11f643ba8b34b73635297c57da6bea", "score": "0.573561", "text": "function get_form_attrs() {\n\t\treturn array(\n\t\t\t'action' => 'options.php',\n\t\t\t'method' => 'post',\n\t\t\t'enctype' => 'multipart/form-data',\n\t\t);\n\t}", "title": "" }, { "docid": "92bccc4bf383746b4e3026f1eaa9c96b", "score": "0.57282186", "text": "function urkund_get_form_elements($mform) {\n $ynoptions = array( 0 => get_string('no'), 1 => get_string('yes'));\n $tiioptions = array(0 => get_string(\"never\"), 1 => get_string(\"always\"));\n if ($mform->elementExists('submissiondrafts')) { // Just show this on assignment submission page for now.\n $tiioptions[2] = get_string(\"showwhendue\", \"plagiarism_urkund\");\n $tiioptions[3] = get_string(\"showwhencutoff\", \"plagiarism_urkund\");\n\n }\n $urkunddraftoptions = array(\n PLAGIARISM_URKUND_DRAFTSUBMIT_IMMEDIATE => get_string(\"submitondraft\", \"plagiarism_urkund\"),\n PLAGIARISM_URKUND_DRAFTSUBMIT_FINAL => get_string(\"submitonfinal\", \"plagiarism_urkund\")\n );\n\n $mform->addElement('header', 'plagiarismdesc', get_string('urkund', 'plagiarism_urkund'));\n $mform->addElement('select', 'use_urkund', get_string(\"useurkund\", \"plagiarism_urkund\"), $ynoptions);\n $mform->addElement('select', 'urkund_show_student_score',\n get_string(\"urkund_show_student_score\", \"plagiarism_urkund\"), $tiioptions);\n $mform->addHelpButton('urkund_show_student_score', 'urkund_show_student_score', 'plagiarism_urkund');\n $mform->addElement('select', 'urkund_show_student_report',\n get_string(\"urkund_show_student_report\", \"plagiarism_urkund\"), $tiioptions);\n $mform->addHelpButton('urkund_show_student_report', 'urkund_show_student_report', 'plagiarism_urkund');\n if ($mform->elementExists('submissiondrafts')) {\n $mform->addElement('select', 'urkund_draft_submit',\n get_string(\"urkund_draft_submit\", \"plagiarism_urkund\"), $urkunddraftoptions);\n }\n if ($mform->elementExists('submissiondrafts')) { // Just show this on assignment submission page for now.\n $resubmitoptions = array(PLAGIARISM_URKUND_RESUBMITNO => get_string('no'),\n PLAGIARISM_URKUND_RESUBMITDUEDATE => get_string('resubmitdue', 'plagiarism_urkund'),\n PLAGIARISM_URKUND_RESUBMITCLOSEDATE => get_string('resubmitclose', 'plagiarism_urkund'));\n $mform->addElement('select', 'urkund_resubmit_on_close', get_string(\"urkund_resubmit_on_close\", \"plagiarism_urkund\"),\n $resubmitoptions);\n $mform->addHelpButton('urkund_resubmit_on_close', 'urkund_resubmit_on_close', 'plagiarism_urkund');\n $mform->setType('urkund_resubmit_on_close', PARAM_INT);\n }\n\n $contentoptions = array(PLAGIARISM_URKUND_RESTRICTCONTENTNO => get_string('restrictcontentno', 'plagiarism_urkund'),\n PLAGIARISM_URKUND_RESTRICTCONTENTFILES => get_string('restrictcontentfiles', 'plagiarism_urkund'),\n PLAGIARISM_URKUND_RESTRICTCONTENTTEXT => get_string('restrictcontenttext', 'plagiarism_urkund'));\n $mform->addElement('select', 'urkund_restrictcontent', get_string('restrictcontent', 'plagiarism_urkund'), $contentoptions);\n $mform->addHelpButton('urkund_restrictcontent', 'restrictcontent', 'plagiarism_urkund');\n $mform->setType('urkund_restrictcontent', PARAM_INT);\n $mform->addElement('text', 'urkund_receiver', get_string(\"urkund_receiver\", \"plagiarism_urkund\"), array('size' => 40));\n $mform->addHelpButton('urkund_receiver', 'urkund_receiver', 'plagiarism_urkund');\n $mform->setType('urkund_receiver', PARAM_EMAIL);\n $mform->addElement('select', 'urkund_studentemail', get_string(\"urkund_studentemail\", \"plagiarism_urkund\"), $ynoptions);\n $mform->addHelpButton('urkund_studentemail', 'urkund_studentemail', 'plagiarism_urkund');\n $mform->setType('urkund_studentemail', PARAM_INT);\n\n $filetypes = urkund_default_allowed_file_types(true);\n\n $supportedfiles = array();\n foreach ($filetypes as $ext => $mime) {\n $supportedfiles[$ext] = $ext;\n }\n $mform->addElement('select', 'urkund_allowallfile', get_string('allowallsupportedfiles', 'plagiarism_urkund'), $ynoptions);\n $mform->addHelpButton('urkund_allowallfile', 'allowallsupportedfiles', 'plagiarism_urkund');\n $mform->setType('urkund_allowallfile', PARAM_INT);\n $mform->addElement('select', 'urkund_selectfiletypes', get_string('restrictfiles', 'plagiarism_urkund'),\n $supportedfiles, array('multiple' => true));\n $mform->setType('urkund_selectfiletypes', PARAM_TAGLIST);\n\n $mform->addElement('select', 'urkund_storedocuments', get_string('storedocuments', 'plagiarism_urkund'), $ynoptions);\n $mform->addHelpButton('urkund_storedocuments', 'storedocuments', 'plagiarism_urkund');\n $mform->setType('urkund_storedocuments', PARAM_INT);\n}", "title": "" }, { "docid": "69d5aa4c3e3359da6ad930fc61d0f6a6", "score": "0.5692773", "text": "private function getWufooForms(){\n\t\t$url = \"https://\".$this->wufoo_username.\".wufoo.com/api/v3/forms.json\";\n\t\treturn json_decode($this->getAuthenticated($url));\n\t}", "title": "" }, { "docid": "82224ebb15bd09554efddd327b13c95f", "score": "0.56902033", "text": "public function build()\n {\n // build each field in the form definition\n foreach ($this->config->getFields() as $name => $field) {\n if ($fieldObj = FieldFactory::make($name, $field, $this->getValue($name))) {\n $this->fields[] = $fieldObj;\n }\n }\n }", "title": "" }, { "docid": "4dfe5e88a23cbc7d2fdecf23c15566d2", "score": "0.5685934", "text": "function _icg_csv_import_ui_get_xpaths($form_name, $form) {\n\n // Traverse through the the $hashes copy of $form and find all the element #hash values.\n $hashes = $form;\n _icg_csv_import_ui_gather_hashes($hashes);\n _icg_csv_import_ui_convert_array_keys($hashes, '#type', '#originalType');\n _icg_csv_import_ui_convert_array_keys($hashes, '0', 'x');\n _icg_csv_import_ui_remove_numeric_keys($hashes);\n\n // Now load and process the $form, using $form_name, to build an array of corresponding xpaths.\n if (isset($form_name)) {\n module_load_include('inc', 'xml_form_builder', 'XMLFormRepository');\n $doc = XMLFormRepository::Get($form_name); // This is a DOMDocument representation of the form\n\n if ($doc) {\n $debugXML = $doc->saveXML($doc);\n $xpath = new DOMXPath($doc);\n $result = $xpath->query('//element[@name]');\n // $result = $xpath->query('//element[@name] | //@*'); // failed attempt to get attributes\n $elements = dom_node_list_to_array($result); // a mix of DOMElement and DOMAttr nodes\n if (count($elements) > 0) {\n $output = array();\n\n foreach ($elements as $element) {\n $debugXML = $element->ownerDocument->saveXML($element);\n $test = $xpath->evaluate(\n 'ancestor-or-self::node()[@name]/properties/type[text()=\"textfield\" or text()=\"select\" or text()=\"textarea\"]', $element);\n if ($test->length === 0) {\n continue;\n }\n $result = $xpath->query('ancestor-or-self::node()[@name]', $element);\n $ancestors = dom_node_list_to_array($result);\n $ancestors_array = array();\n\n if (count($ancestors) > 0) {\n foreach ($ancestors as $ancestor) {\n $name = $ancestor->getAttribute('name');\n // Does this $ancestor have an enumerator?\n $ancestors_array[] = (string) $name;\n }\n }\n\n $x = \"/mods/\" . implode('/', $ancestors_array);\n $val = str_replace('/0', '[x]', $x);\n $branch = _icg_csv_import_ui_build_branch($ancestors_array, $val);\n $output = array_merge_recursive($output, $branch);\n }\n $output = array_merge_recursive($output, $hashes);\n _icg_csv_import_ui_convert_array_keys($output, '0', 'xpath');\n _icg_csv_import_ui_remove_numeric_keys($output);\n\n return $output;\n }\n }\n }\n return array(NULL => t('Metadata Form Not Found!'));\n}", "title": "" }, { "docid": "1bcdb44283bebd86d3b4148559a22cae", "score": "0.56812894", "text": "public function getFormFields()\n {\n return [];\n }", "title": "" }, { "docid": "07ca453b07cfec7fdc356c854b426725", "score": "0.5679725", "text": "public function _createElements() {\n\n $this->_generateId();\n\n $this->setElements([\n $this->createFormElement('text', 'filetypes', $this->getLabel(), [\n 'id' => $this->getAttribute('id'),\n ]),\n\n $this->createFormElement('static', 'browser', null,\n '<span data-filetypesbrowser=\"'.$this->getAttribute('id').'\"></span>'),\n\n $this->createFormElement('static', 'descriptions', null,\n '<div data-filetypesdescriptions=\"'.$this->getAttribute('id').'\"></div>')\n ]);\n }", "title": "" }, { "docid": "83e8168faf38b3fe8c3f9d4e51fa7bda", "score": "0.5678013", "text": "public function process(){\n\n\t\t$error\t\t= array();\n\t\t$results \t= array();\n\n\t\t// Put together an array of all expected indices\n\t\tif(is_array($this->_form_array['form_structure'])){\n\t\t\tforeach($this->_form_array['form_structure'] as $field){\n\t\t\t\t\n\t\t\t\t$field = (array)$field;\n\n\t\t\t\t$field['required'] = ($field['required'] == 'checked');\n\n\t\t\t\tif($field['cssClass'] == 'input_text' || $field['cssClass'] == 'textarea'){\n\n\t\t\t\t\t$val = $this->getPostValue( $this->elemId($field['values']));\n\n\t\t\t\t\tif($field['required'] && empty($val)){\n\t\t\t\t\t\t$error[] = 'Please complete the ' . $field['values'] . ' field.';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$results[ $this->elemId($field['values']) ] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($field['cssClass'] == 'radio' || $field['cssClass'] == 'select'){\n\n\t\t\t\t\t$val = $this->getPostValue( $this->elemId($field['title']));\n\n\t\t\t\t\tif($field['required'] && empty($val)){\n\t\t\t\t\t\t$error[] = 'Please complete the ' . $field['title'] . ' field.';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$results[ $this->elemId($field['title']) ] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($field['cssClass'] == 'checkbox'){\n\t\t\t\t\t$field['values'] = (array)$field['values'];\n\t\t\t\t\tif(is_array($field['values']) && !empty($field['values'])){\n\n\t\t\t\t\t\t$at_least_one_checked = false;\n\n\t\t\t\t\t\tforeach($field['values'] as $item){\n\t\t\t\t\t\t\t$item = (array)$item;\n\t\t\t\t\t\t\t$elem_id = $this->elemId($item['value'], $field['title']);\n\n\t\t\t\t\t\t\t$val = $this->getPostValue( $elem_id );\n\n\t\t\t\t\t\t\tif(!empty($val)){\n\t\t\t\t\t\t\t\t$at_least_one_checked = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$results[ $this->elemId($item['value']) ] = $this->getPostValue( $elem_id );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(!$at_least_one_checked && $field['required']){\n\t\t\t\t\t\t\t$error[] = 'Please check at least one ' . $field['title'] . ' choice.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else { }\n\t\t\t}\n\t\t}\n\t\t$success = empty($error);\n\t\treturn array('success'=>$success,'results'=>$results,'errors'=>$error);\t\t\n\t}", "title": "" }, { "docid": "9abcb36db47e5488650961cd14156a87", "score": "0.56581277", "text": "public static function returnExtFormElements() {\n\n $mod_tpl = static::returnTpl();\n $class = __CLASS__;\n\n ##\n ## EXTFORM SEO\n ##\n \tExtForm::add(\n ## Name of element\n \"seo\",\n ## Closure for templates (html-code)\n function($name = 'seo', $value = '', $params = null) use ($mod_tpl, $class) {\n if (!Allow::action('seo', 'edit', true))\n return false;\n\n ## default template\n $tpl = \"extform_seo\";\n ## custom template\n if (@$params['tpl']) {\n $tpl = $params['tpl'];\n unset($params['tpl']);\n }\n\n #$value = $element_meta->seo;\n /*\n ## Don't work with i18n versions\n if ( $value === false || $value === null ) {\n $val = Form::text($name);\n Helper::dd($val);\n preg_match(\"~value=['\\\"]([^'\\\"]+?)['\\\"]~is\", $val, $matches);\n Helper::dd($matches);\n $val = @$matches[1];\n $array = json_decode($val, true);\n if ($array)\n $value = $array;\n }\n #*/\n\n ## return view with form element\n return View::make($mod_tpl.$tpl, compact('name', 'value', 'params'));\n \t },\n ## Processing results closure\n function($params) use ($mod_tpl, $class) {\n\n #Helper::dd($params);\n\n $module = isset($params['module']) ? $params['module'] : false;\n $unit_id = isset($params['unit_id']) ? $params['unit_id'] : false;\n $data = isset($params['data']) ? $params['data'] : false;\n $locale = isset($params['locale']) ? $params['locale'] : NULL;\n\n if (!$module || !$unit_id)\n return false;\n\n #Helper::dd($data);\n #$data['module'] = $module;\n #$data['unit_id'] = $unit_id;\n #Helper::dd($data);\n\n foreach ($data as $d => $dat) {\n if (!is_string($dat))\n continue;\n $data[$d] = trim($dat);\n }\n\n $seo = Seo::firstOrCreate(array('module' => $module, 'unit_id' => $unit_id, 'language' => $locale));\n $seo->update($data);\n\n return $seo;\n }\n );\n }", "title": "" }, { "docid": "e3c4352bbafa8897fd0252f4b813ca2c", "score": "0.56564575", "text": "function & getForms()\n\t{\n\t\treturn $this->_forms;\n\t}", "title": "" }, { "docid": "ef15e938a3e88f62397a3c85f3fb0ace", "score": "0.5646455", "text": "function news_feed_admin_form() {\n $form = array();\n\n // Dynamically changing element objects.\n $form['databaseInfo'] = news_feed_refresh();\n\n // Static control button objects.\n $form['news_feed_ControlButtons'] = news_feed_ControlButtons();\n return $form;\n}", "title": "" }, { "docid": "ab6c675aa2c3eb37f09b5b451fbeaa25", "score": "0.5642352", "text": "public function all()\n {\n return $this->get('/forms');\n }", "title": "" }, { "docid": "b279983168fbb9f142d1a7e9590da36d", "score": "0.5639845", "text": "abstract public function _form();", "title": "" }, { "docid": "041cd920559ab586f1f3df034b1cd5bd", "score": "0.563377", "text": "public function getFormFields()\n {\n return $this->form_fields;\n }", "title": "" }, { "docid": "61370f4b9afc28915c9e6a9a52c73c56", "score": "0.56226397", "text": "function populate_form()\n {\n\t\n }", "title": "" }, { "docid": "723850c749b637e92191d7fa34eb4b5d", "score": "0.5621104", "text": "function renderForm() {\n\t\tif (empty($this->children)) {\n\t\t\tforeach ($this as $fieldKey => $value) {\n\t\t\t\tif (is_null($value) || in_array($fieldKey, ['id','class','method','action','variable','readonly','config','widgetName','tagName','children','header','leading','enctype'])) continue;\n\t\t\t\t$this->children[$fieldKey] = $value;\n\t\t\t\tunset($this->{$fieldKey});\n\t\t\t}\n\t\t}\n\n\t\tif ($this->debug) debugMsg($this, '$this');\n\n\t\t$this->config = is_array($this->config) ? (Object) $this->config : $this->config;\n\t\t$this->readonly = \\SG\\getFirst($this->config->readonly, $this->readonly);\n\t\t$this->variable = \\SG\\getFirst($this->variable, $this->config->variable);\n\t\t$formEncrypt = $this->enctype = \\SG\\getFirst($this->enctype, $this->config->enctype);\n\t\t$formMethod = $this->method = \\SG\\getFirst($this->config->method, $this->method);\n\t\t$formAction = $this->action = \\SG\\getFirst($this->action, $this->config->action);\n\t\t$formCheckValid = \\SG\\getFirst($this->checkValid, $this->data['data-checkValid'], $this->data['data-checkvalid']);\n\t\t$formTitle = \\SG\\getFirst($this->title, $this->config->title);\n\n\t\tif ($this->action) {\n\t\t\t$ret .= _NL.'<!-- sg-form -->'._NL;\n\t\t\tif (isset($this->leading)) $ret .= $this->leading;\n\t\t\tunset($this->config->data['rel']);\n\t\t\t$formStr = '<form'\n\t\t\t\t. ' id=\"'.$this->id.'\"'\n\t\t\t\t. ' class=\"widget-form form '\n\t\t\t\t. ($this->class ? $this->class:'')\n\t\t\t\t. ($this->readonly ? ' -readonly' : '')\n\t\t\t\t. ($this->mainAxisAlignment ? ' -main-axis-'.strtolower($this->mainAxisAlignment) : '')\n\t\t\t\t. ($this->crossAxisAlignment ? ' -cross-axis-'.strtolower($this->crossAxisAlignment) : '')\n\t\t\t\t. '\"' // class\n\t\t\t\t. ' method=\"'.$formMethod.'\"'\n\t\t\t\t. ($formEncrypt ? ' enctype=\"multipart/form-data\"' : '')\n\t\t\t\t. ' action=\"'.$formAction.'\"'\n\t\t\t\t. (isset($formCheckValid) && $formCheckValid ? ' data-checkvalid=\"true\"' : '')\n\t\t\t\t. (isset($this->attribute) ? ' '.(is_array($this->attribute) ? sg_implode_attr($this->attribute) : $this->attribute) : '')\n\t\t\t\t. (isset($this->config->attr) ? ' '.(is_array($this->config->attr) ? sg_implode_attr($this->config->attr) : $this->config->attr) : '')\n\t\t\t\t. (isset($this->config->data) ? ' '.(is_array($this->config->data) ? sg_implode_attr($this->config->data) : $this->config->data) : '')\n\t\t\t\t. ($this->onSubmit ? ' onSubmit = \\'return '.$this->onSubmit.'(event)\\'' : '')\n\t\t\t\t. ($this->onFormSubmit ? ' data-onformsubmit = \\''.$this->onFormSubmit.'\\'' : '')\n\t\t\t\t. ($this->style ? ' style=\"'.$this->style.'\"' : '')\n\t\t\t\t. ' >';\n\n\t\t\t$ret .= $formStr._NL._NL;\n\n\t\t\t$this->formArray['form'] = $formStr;\n\t\t}\n\n\t\tif ($this->header->text) {\n\t\t\t$ret .= '<header class=\"header'\n\t\t\t\t. ($this->header->attr->class ? ' '.$this->header->attr->class : '').'\">'\n\t\t\t\t. $this->header->text\n\t\t\t\t. '</header>';\n\t\t}\n\n\t\t// Render form title\n\t\tif ($formTitle) {\n\t\t\tif (\\SG\\isWidget($formTitle)) {\n\t\t\t\t$ret .= $formTitle->build();\n\t\t\t} else {\n\t\t\t\t$ret .= '<h3 class=\"title\">'.$formTitle.'</h3>'._NL;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->description) $ret .= '<div class=\"description\">'.$this->description.'</div>';\n\n\t\t$ret .= $this->_renderFormChild($this->children);\n\n\t\tif ($this->footer) $ret .= $this->footer;\n\t\tif ($this->action) $ret .= '</form>'._NL;\n\t\tif (isset($this->trailing)) $ret .= $this->trailing;\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2f902cb989b7efc8a751ed555cf9e7e6", "score": "0.56208074", "text": "public function allRegisteredElements();", "title": "" }, { "docid": "956415f4ccf58482d68f26e1c86bb1a1", "score": "0.5616311", "text": "public function getFormElemNames()\n\t{\n\t\t$names = array();\n\t\tforeach ($this->getFormElems() as $elem)\n\t\t{\n\t\t\t$name = $elem->getAttribute('name');\n\t\t\tif (!empty($name))\n\t\t\t\t$names[] = $name;\n\t\t}\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "fd423f76775968a2ea1333ffb8fe8059", "score": "0.56156933", "text": "function bum_get_registered_forms()\n\t{\n\t\treturn bum_register_form();\n\t}", "title": "" }, { "docid": "b537bfa0a980b8a6fa9259929e3717e8", "score": "0.56097835", "text": "public function elements()\n {\n return parent::elements();\n }", "title": "" }, { "docid": "b05114d709a775292563e9491a0639fc", "score": "0.5608046", "text": "public function testElements()\n {\n $neededElements = array(\n 'title',\n 'alias',\n 'content',\n 'language'\n );\n\n $form = new Default_Form_Page();\n\n foreach ($neededElements as $element) {\n $this->assertThat(\n $form->getElement($element),\n $this->isInstanceOf('Zend_Form_Element')\n );\n }\n\n }", "title": "" }, { "docid": "a43f6ef41079014035ab6add9d2026dc", "score": "0.56020176", "text": "public static function returnExtFormElements() {\n\n $mod_tpl = static::returnTpl();\n $class = __CLASS__;\n\n ##\n ## EXTFORM GALLERY\n ##\n /*\n ################################################\n ## Process gallery\n ################################################\n if (Allow::action('admin_galleries', 'edit')) {\n ExtForm::process('gallery', array(\n 'module' => self::$name,\n 'unit_id' => $id,\n 'gallery' => Input::get('gallery'),\n ));\n }\n ################################################\n */\n \tExtForm::add(\n ## Name of element\n \"gallery\",\n ## Closure for templates (html-code)\n function($name = 'gallery', $value = '', $params = null) use ($mod_tpl, $class) {\n ## default template\n $tpl = \"extform_gallery\";\n ## custom template\n if (@$params['tpl']) {\n $tpl = $params['tpl'];\n unset($params['tpl']);\n }\n\n #Helper::dd($value);\n #Helper::dd($params);\n\n if (!is_object($value))\n $gallery = NULL;\n\n if ( $value === false || $value === null ) {\n $val = Form::text($name);\n preg_match(\"~value=['\\\"]([^'\\\"]+?)['\\\"]~is\", $val, $matches);\n #Helper::d($matches);\n $val = (int)@$matches[1];\n #Helper::tad($val);\n if ( $val > 0 ) {\n $gallery = Gallery::where('id', $val)->with('photos')->first();\n #Helper::tad($gallery);\n }\n } elseif (is_numeric($value)) {\n $gallery = Gallery::where('id', $value)->with('photos')->first();\n }\n\n #Helper::tad($gallery);\n\n ## return view with form element\n return View::make($mod_tpl.$tpl, compact('name', 'value', 'gallery', 'params'))->render();\n \t },\n ## Processing results closure\n function($params) use ($mod_tpl, $class) {\n\n #dd($params);\n\n $module = isset($params['module']) ? $params['module'] : false;\n $unit_id = isset($params['unit_id']) ? $params['unit_id'] : false;\n $gallery = isset($params['gallery']) ? $params['gallery'] : false;\n\n $gallery_id = isset($gallery['gallery_id']) ? $gallery['gallery_id'] : 0;\n $uploaded_images = isset($gallery['uploaded_images']) ? $gallery['uploaded_images'] : array();\n $module = (string)trim($module);\n $unit_id = (string)trim($unit_id);\n\n if (@$params['single']) {\n\n $gallery_id = $class::moveImagesToGallery($uploaded_images, $gallery_id);\n if ($gallery_id)\n $class::renameGallery($gallery_id, $module . \" - \" . $unit_id);\n\n } else {\n\n ## Perform all actions for adding photos to the gallery & bind gallery to the unit_id of module\n $gallery_id = $class::imagesToUnit($uploaded_images, $module, $unit_id, $gallery_id);\n }\n\n #Helper::dd($gallery_id);\n\n return $gallery_id;\n }\n );\n\n ##\n ## EXTFORM IMAGE\n ##\n /*\n ################################################\n ## Process image\n ################################################\n if (Allow::action('admin_galleries', 'edit')) {\n $input['image_id'] = ExtForm::process('image', array(\n 'image' => Input::get('image'),\n 'return' => 'id',\n ));\n }\n ################################################\n */\n \tExtForm::add(\n ## Name of element\n \"image\",\n ## Closure for templates (html-code)\n function($name = 'image', $value = '', $params = null) use ($mod_tpl, $class) {\n ## default template\n $tpl = \"extform_image\";\n ## custom template\n if (@$params['tpl']) {\n $tpl = $params['tpl'];\n unset($params['tpl']);\n }\n\n #dd($value);\n #Helper::dd($params);\n\n if (!is_object($value))\n $photo = NULL;\n\n if ( $value === false || $value === null ) {\n $val = Form::text($name);\n preg_match(\"~value=['\\\"]([^'\\\"]+?)['\\\"]~is\", $val, $matches);\n #Helper::d($matches);\n $val = (int)@$matches[1];\n #Helper::tad($val);\n if ( $val > 0 ) {\n #$photo = Photo::firstOrNew(array('id' => $val));\n $photo = Photo::find($val);\n #Helper::tad($photo);\n }\n } elseif (is_numeric($value)) {\n $photo = Photo::find($value);\n }\n\n #Helper::tad($value);\n #Helper::tad($photo);\n\n ## return view with form element\n return View::make($mod_tpl.$tpl, compact('name', 'value', 'photo', 'params'));\n \t },\n ## Processing results closure\n function($params) use ($mod_tpl, $class) {\n\n #Helper::dd($params);\n\n ## Array with POST-data\n $image = @$params['image'] ?: false;\n ## Return format\n $return = @$params['return'] ?: false;\n ## ID of uploaded image\n #$uploaded_image = isset($image['uploaded_image']) ? (int)$image['uploaded_image'] : false;\n $uploaded_image = $image;\n\n #Helper::dd($uploaded_image);\n\n if (!$uploaded_image)\n return false;\n\n ## Find photo by ID\n $photo = Photo::where('id', $uploaded_image)->first();\n ## If photo don't exists - return false\n if (is_null($photo))\n return false;\n ## Mark photo as \"single used image\"\n $photo->gallery_id = 0;\n $photo->save();\n ## Return needable property or full object\n return $return ? @$photo->$return : $photo;\n }\n );\n\n }", "title": "" }, { "docid": "2b2f7f37dedee5a8d440c72127c03a7a", "score": "0.5596435", "text": "public static function form(): iterable\n {\n $user = auth('api')->user();\n return [\n 'employee_name' => $user->full_name,\n 'employee_id' => $user->staff_id,\n 'user_id' => $user->id,\n 'date_of_registration' => date('Y-m-d'),\n 'branch_id' => $user->branch_id,\n 'first_name' => '',\n 'middle_name' => '',\n 'last_name' => '',\n 'add_nbstop' => '',\n 'add_street' => '',\n 'area_address' => '',\n 'add_houseno' => '',\n 'add_addinfo_description' => '',\n 'city' => '',\n 'state' => '',\n 'telephone' => '',\n 'email' => '',\n 'gender' => '',\n 'date_of_birth' => '',\n 'civil_status' => '',\n 'year_together' => '',\n 'type_of_home' => '',\n 'no_of_rooms' => '',\n 'duration_of_residence' => '',\n 'people_in_household' => '',\n 'number_of_work' => '',\n 'depend_on_you' => '',\n 'number_of_children' => '',\n 'level_of_education' => '',\n 'visit_hour_from' => '',\n 'visit_hour_to' => '',\n 'loan_from_institution' => '',\n 'loan_amount' => '',\n 'did_you_pay_back' => '',\n 'employment_status' => '',\n 'occupation' => '',\n 'working_individual_Phone_number' => '',\n 'name_of_company_or_business' => '',\n 'cadd_nbstop' => '',\n 'cadd_addinfo' => '',\n 'company_city' => '',\n 'company_state' => '',\n 'company_telno' => '',\n 'receive_income_means' => '',\n 'post_in_company' => '',\n 'days_of_work' => ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],\n 'market_name' => '',\n 'monthly_gains' => '',\n 'years_of_existence_or_work_duration' => '',\n 'comp_street_name' => '',\n 'comp_house_no' => '',\n 'comp_area' => '',\n 'current_sal_or_business_income' => '',\n 'payment_period' => '',\n 'cvisit_hour_from' => '',\n 'cvisit_hour_to' => '',\n 'nextofkin_first_name' => '',\n 'nextofkin_middle_name' => '',\n 'nextofkin_last_name' => '',\n 'nextofkin_relationship' => '',\n 'nextofkin_gender' => '',\n 'nextofkin_telno' => '',\n 'nextofkin_work_duration' => '',\n 'work_guarantor_first_name' => '',\n 'work_guarantor_middle_name' => '',\n 'work_guarantor_last_name' => '',\n 'work_guarantor_relationship' => '',\n 'guaadd_nbstop' => '',\n 'guaadd_street' => '',\n 'guaadd_houseno' => '',\n 'guaadd_addinfo' => '',\n 'gua_area' => '',\n 'work_guarantor_city' => '',\n 'work_guarantor_state' => '',\n 'work_guarantor_gender' => '',\n 'work_guarantor_telno' => '',\n 'work_guarantor_work_duration' => '',\n 'personal_guarantor_first_name' => '',\n 'personal_guarantor_middle_name' => '',\n 'personal_guarantor_last_name' => '',\n 'personal_guarantor_relationship' => '',\n 'personal_guarantor_city' => '',\n 'personal_guarantor_state' => '',\n 'pguaadd_nbstop' => '',\n 'pguaadd_street' => '',\n 'pguaadd_houseno' => '',\n 'pguaadd_addinfo' => '',\n 'pgua_area' => '',\n 'personal_guarantor_gender' => '',\n 'personal_guarantor_telno' => '',\n 'personal_guarantor_work_duration' => '',\n 'what_product_do_you_need' => '',\n 'what_do_you_need_it_for' => ''\n ];\n }", "title": "" }, { "docid": "d0d77ace9d62b6efa5cb5861dfe5443b", "score": "0.5579903", "text": "public function get_form_fields() {\n\t\tif ( empty( $this->form_fields ) ) {\n\t\t\t$this->init_form_fields();\n\t\t}\n\n\t\treturn array_map( [ $this, 'set_defaults' ], $this->form_fields );\n\t}", "title": "" }, { "docid": "8a1395ea52a622ddda0ab432cb5d8e1c", "score": "0.5573043", "text": "public function render_form_elements($mform) {\n\n }", "title": "" }, { "docid": "1259e1b75aa786b1ac128d5e066a4eac", "score": "0.5572924", "text": "function get_form_tags($attrib)\n{\n global $CONTACTS, $EDIT_FORM, $CMAIL;\n\n $form_start = $form_end = '';\n \n if (empty($EDIT_FORM)) {\n $hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => get_input_value('_source', crystal_INPUT_GPC)));\n $hiddenfields->add(array('id' => 'contacttab', 'name' => '_tab', 'value' => get_input_value('_tab', crystal_INPUT_GPC)));\n $hiddenfields->add(array('name' => '_gid', 'value' => $CONTACTS->group_id));\n \n if (($result = $CONTACTS->get_result()) && ($record = $result->first()))\n $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID']));\n \n $form_start = $CMAIL->output->request_form(array('name' => \"form\", 'method' => \"post\", 'task' => $CMAIL->task, 'action' => 'save', 'request' => 'save.'.intval($record['ID']), 'noclose' => true) + $attrib, $hiddenfields->show());\n $form_end = !strlen($attrib['form']) ? '</form>' : '';\n\n $EDIT_FORM = !empty($attrib['form']) ? $attrib['form'] : 'form';\n $CMAIL->output->add_gui_object('editform', $EDIT_FORM);\n }\n\n return array($form_start, $form_end); \n}", "title": "" }, { "docid": "5c1068ba51e30009e575c9ec192b28de", "score": "0.5557918", "text": "public function get1xForms()\n {\n global $wpdb;\n\n $table = $wpdb->prefix . 'iphorm_forms';\n $forms = array();\n\n if ($wpdb->get_var($wpdb->prepare(\"SHOW TABLES LIKE '%s'\", $wpdb->esc_like($table))) == $table) {\n $results = $wpdb->get_results(\"SELECT * FROM \" . $table . \" ORDER BY id ASC\", ARRAY_A);\n\n foreach ($results as $result) {\n $form = maybe_unserialize($result['config']);\n\n if (is_array($form)) {\n $forms[] = $form;\n }\n }\n }\n\n return $forms;\n }", "title": "" }, { "docid": "df78b39bc6ed481d0cf621642ed7706d", "score": "0.5555099", "text": "public function getAll()\n\t\t{\n\t\t\t\tif (isset($_POST)) \n\t\t\t\t{\n\t\t\t\t\treturn $_POST;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "9f45c6f652c0dbc8ef6a2adca32cc9c3", "score": "0.55386686", "text": "public function prepare_form()\n {\n $this->form->set_action\n (\n midgardmvc_core::get_instance()->dispatcher->generate_url\n (\n 'rating_create', array\n (\n 'to' => $this->data['parent']->guid\n ),\n $this->request\n )\n );\n\n if ($this->request->is_subrequest())\n {\n // rating posting form is in a dynamic_load, set parent URL for redirects\n $root_request = midgardmvc_core::get_instance()->context->get_request(0);\n $field = $this->form->add_field('relocate', 'text', false);\n $field->set_value($root_request->get_path());\n $field->set_widget('hidden');\n }\n\n // Basic element information\n $field = $this->form->add_field('rating', 'integer');\n\n // Default rating is 0\n $field->set_value(0);\n\n if ($this->object->rating > 0)\n {\n $field->set_value($this->object->rating);\n }\n\n $widget = $field->set_widget('eu_urho_widgets_starrating');\n // @todo: get the rating options from configuration\n $widget->add_option('Very bad', 1);\n $widget->add_option('Poor', 2);\n $widget->add_option('Average', 3);\n $widget->add_option('Good', 4);\n $widget->add_option('Excellent', 5);\n\n $field = $this->form->add_field('comment', 'text');\n $field->set_value('');\n $widget = $field->set_widget('textarea');\n }", "title": "" }, { "docid": "cfe8e5ed193f58d4126ca9730b4eff6a", "score": "0.5533765", "text": "public function formFieldGetFormElementTypes()\n {\n return array('uploads_file' => Plugg_Form_Plugin::FORM_FIELD_NORMAL);\n }", "title": "" }, { "docid": "685d268ad9bfbfe0b5a0c714fa74969d", "score": "0.5531215", "text": "protected function loadForm(): void\n {\n // is the form submitted?\n if ($this->form->isSubmitted()) {\n $this->loadValuesOfDisabledFields();\n }\n\n // add page title elements into the form\n $this->form->addCheckbox(\n 'page_title_overwrite',\n isset($this->data['title_overwrite']) && $this->data['title_overwrite']\n );\n $this->form->addText('page_title', $this->data['title'] ?? null);\n\n // add meta description elements into the form\n $this->form->addCheckbox(\n 'meta_description_overwrite',\n isset($this->data['description_overwrite']) && $this->data['description_overwrite']\n );\n $this->form->addText(\n 'meta_description',\n $this->data['description'] ?? null\n );\n\n // add meta keywords elements into the form\n $this->form->addCheckbox(\n 'meta_keywords_overwrite',\n isset($this->data['keywords_overwrite']) && $this->data['keywords_overwrite']\n );\n $this->form->addText('meta_keywords', $this->data['keywords'] ?? null);\n\n // add URL elements into the form\n $this->form->addCheckbox(\n 'url_overwrite',\n isset($this->data['url_overwrite']) && $this->data['url_overwrite']\n );\n $this->form->addText('url', isset($this->data['url']) ? urldecode($this->data['url']) : null);\n\n // add canonical URL elements into the form\n $this->form->addCheckbox(\n 'canonical_url_overwrite',\n $this->getCanonicalUrlOverwrite()\n );\n $this->form->addText(\n 'canonical_url',\n $this->getCanonicalUrl()\n );\n\n // advanced SEO\n $indexValues = [\n ['value' => 'none', 'label' => BackendLanguage::getLabel('None')],\n ['value' => 'index', 'label' => 'index'],\n ['value' => 'noindex', 'label' => 'noindex'],\n ];\n $this->form->addRadiobutton(\n 'seo_index',\n $indexValues,\n $this->data['seo_index'] ?? 'none'\n );\n $followValues = [\n ['value' => 'none', 'label' => BackendLanguage::getLabel('None')],\n ['value' => 'follow', 'label' => 'follow'],\n ['value' => 'nofollow', 'label' => 'nofollow'],\n ];\n $this->form->addRadiobutton(\n 'seo_follow',\n $followValues,\n $this->data['seo_follow'] ?? 'none'\n );\n\n // should we add the meta-custom field\n if ($this->custom) {\n // add meta custom element into the form\n $this->form->addTextarea('meta_custom', $this->data['custom'] ?? null);\n }\n\n $this->form->addHidden('meta_id', $this->id);\n $this->form->addHidden('base_field_name', $this->baseFieldName);\n $this->form->addHidden('custom', $this->custom);\n $this->form->addHidden('class_name', $this->callback['class']);\n $this->form->addHidden('method_name', $this->callback['method']);\n $this->form->addHidden('parameters', \\SpoonFilter::htmlspecialchars(serialize($this->callback['parameters'])));\n }", "title": "" }, { "docid": "c19eb2c1da005630308c6aadeb9d03e6", "score": "0.5512443", "text": "public function fetchSerachForm(){\n $body=$this->fetch('body_searchPatient.tpl');\n return $body;\n }", "title": "" }, { "docid": "eca1386136a8ccf040c2222c4ff0ef4a", "score": "0.5503117", "text": "public function getFormHandles()\n {\n return craft()->webForm->getFormHandles();\n }", "title": "" }, { "docid": "6ef79cdde5f976aba48b1243d351e90e", "score": "0.55027616", "text": "function dynamicform_elements($fields){\r\n \r\n if(isset($fields)){\r\n foreach($fields as $fieldarray){ \r\n if(count($fieldarray)==1){\r\n $field=$fieldarray[0];\r\n ?>\r\n <?php if($field['type']==\"hidden\"){ ?> \r\n <input type=\"hidden\" class=\"<?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" />\r\n <?php }else { ?>\r\n <div class=\"form-group \">\r\n <label class=\"control-label col-sm-2\" for=\"<?php echo $field['name']; ?>\"><?php echo $field['label']; ?>&nbsp;</label>\r\n <div class=\"<?php if(isset($field['divclass']) && $field['divclass']!=\"\"){ echo $field['divclass']; } else { echo 'col-sm-10'; }?> <?php if (form_error($field['name'])) {echo ' has-error';}?>\">\r\n <?php if($field['type']==\"checkbox\"){ ?>\r\n <div class=\"checkbox\">\r\n <label><input class=\"<?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" type=\"checkbox\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?>><?php echo $field['label2']; ?></label>\r\n </div>\r\n <?php }else if($field['type']==\"select\"){ ?>\r\n <select id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> >\r\n <option data-hidden=\"true\" value=\"\">Choose an option</option>\r\n <?php foreach ($field['options'] as $keyvalue => $displayvalue) { ?>\r\n <option value=\"<?php echo $keyvalue ?>\" <?php if($field['value']==$keyvalue) {echo 'selected=\"selected\"';} ?> ><?php echo $displayvalue ?></option>\r\n <?php } ?>\r\n </select>\r\n <?php }else if($field['type']==\"date\"){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-calendar\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control datepicker <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> readonly=\"readonly\" />\r\n </div>\r\n <?php }else if($field['type']==\"time\"){ ?>\r\n <div class=\"bootstrap-timepicker\">\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-clock-o\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control timepicker <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n </div>\r\n <?php }else if($field['type']==\"phone\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-phone\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"mobile\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-mobile\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"fax\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-fax\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"email\"){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-envelope\"></i>\r\n </div>\r\n <input type=\"email\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div> \r\n <?php }else if($field['type']==\"textarea\"){ ?>\r\n <textarea class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> ><?php echo $field['value'];?></textarea>\t\r\n <?php }else if($field['type']==\"textboxwithsearchbtn\"){ ?>\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n <div class=\"input-group-addon \">\r\n <a href=\"javascript:void(0)\" id=\"btn_<?php echo $field['name']; ?>\"><i class=\"fa fa-eye\"></i></a>\r\n </div>\r\n \r\n </div><!-- /input-group -->\r\n <?php }else if($field['type']==\"button\"){ ?>\r\n <button type=\"button\" class=\"btn <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" id=\"<?php echo $field['name']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?>><?php echo $field['value'];?></button>\r\n \r\n <?php }else{ ?>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n <?php } ?>\r\n \r\n \r\n <?php echo form_error($field['name'], '<label class=\"help-block with-errors error\" for=\"name\" generated=\"true\">', '</label>'); ?>\r\n\t\t\t</div>\r\n </div>\r\n <?php } ?>\r\n <?php } else { ?>\r\n <div class=\"form-group \">\r\n <?php foreach($fieldarray as $field){ ?>\r\n <?php if($field['type']==\"hidden\"){ ?> \r\n <input type=\"hidden\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" />\r\n <?php }else { ?>\r\n \r\n <?php if($field['label'] != ''){?>\r\n <label class=\"control-label <?php if(isset($field['labelclass']) && $field['labelclass']!=\"\"){ echo $field['labelclass']; } else { echo 'col-sm-2'; }?>\" for=\"<?php echo $field['name']; ?>\"><?php echo $field['label']; ?>&nbsp;</label>\r\n <?php } ?>\r\n <div class=\"<?php if(isset($field['divclass']) && $field['divclass']!=\"\"){ echo $field['divclass']; } else { echo 'col-sm-10'; }?> <?php if (form_error($field['name'])) {echo ' has-error';}?>\">\r\n <?php if($field['type']==\"checkbox\"){ ?>\r\n <div class=\"checkbox\">\r\n <label><input class=\"<?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" type=\"checkbox\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?>><?php echo $field['label2']; ?></label>\r\n </div>\r\n <?php }else if($field['type']==\"select\"){ ?>\r\n <select id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> >\r\n <option data-hidden=\"true\" value=\"\">Choose an option</option>\r\n <?php foreach ($field['options'] as $keyvalue => $displayvalue) { ?>\r\n <option value=\"<?php echo $keyvalue ?>\" <?php if($field['value']==$keyvalue) {echo 'selected=\"selected\"';} ?> ><?php echo $displayvalue ?></option>\r\n <?php } ?>\r\n </select>\r\n <?php }else if($field['type']==\"date\"){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-calendar\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control datepicker <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> readonly=\"readonly\" />\r\n </div>\r\n <?php }else if($field['type']==\"time\"){ ?>\r\n <div class=\"bootstrap-timepicker\">\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-clock-o\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control timepicker <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n </div>\r\n <?php }else if($field['type']==\"phone\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-phone\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"mobile\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-mobile\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"fax\" ){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-fax\"></i>\r\n </div>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div>\r\n <?php }else if($field['type']==\"email\"){ ?>\r\n <div class=\"input-group\">\r\n <div class=\"input-group-addon\">\r\n <i class=\"fa fa-envelope\"></i>\r\n </div>\r\n <input type=\"email\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n </div> \r\n <?php }else if($field['type']==\"textarea\"){ ?>\r\n <textarea class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> ><?php echo $field['value'];?></textarea>\t\r\n \r\n <?php }else if($field['type']==\"button\"){ ?>\r\n <button type=\"button\" class=\"btn <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" id=\"<?php echo $field['name']; ?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?>><?php echo $field['value'];?></button>\r\n \r\n <?php }else{ ?>\r\n <input type=\"text\" class=\"form-control <?php if(isset($field['fieldclass']) && $field['fieldclass']!=\"\"){ echo $field['fieldclass']; } ?>\" placeholder=\"<?php echo $field['placeholder']; ?>\" id=\"<?php echo $field['name']; ?>\" name=\"<?php echo $field['name']; ?>\" value=\"<?php echo $field['value'];?>\" <?php if(isset($field['other']) && $field['other']!=\"\"){ echo $field['other']; } ?> />\r\n <?php } ?>\r\n <?php echo form_error($field['name'], '<label class=\"help-block with-errors error\" for=\"name\" generated=\"true\">', '</label>'); ?>\r\n\t\t\t</div>\r\n \r\n <?php } \r\n } ?>\r\n </div>\r\n <?php } \r\n } \r\n } \r\n\r\n}", "title": "" }, { "docid": "098604b9b96318fda65925d748ead196", "score": "0.550241", "text": "public function getElements();", "title": "" }, { "docid": "098604b9b96318fda65925d748ead196", "score": "0.550241", "text": "public function getElements();", "title": "" }, { "docid": "098604b9b96318fda65925d748ead196", "score": "0.550241", "text": "public function getElements();", "title": "" }, { "docid": "1062de156b91d3dcd3606b658b4f8e92", "score": "0.54986167", "text": "public function load_form()\n {\n $this->form = midgardmvc_helper_forms::create('com_meego_ratings_rating');\n $this->prepare_form();\n }", "title": "" }, { "docid": "e2153360f0931ece4b4d7766cb425019", "score": "0.5489956", "text": "public function getInputForm()\n {\n \treturn \\FluxFE\\Lead::getInstance();\n }", "title": "" }, { "docid": "a9817b05fd04e306b2a361f9dd9b4a4f", "score": "0.5484956", "text": "function _form()\n\t{\n\t\tif ( ! isset( $this->arr ) ) return '';\n\n\t\tif ( ! isset( $this->arr['tagdata'] ) OR $this->arr['tagdata'] == '' )\n\t\t{\n\t\t\t$tagdata\t=\tee()->TMPL->tagdata;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tagdata\t= $this->arr['tagdata'];\n\t\t\tunset( $this->arr['tagdata'] );\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tGenerate form\n\t\t//\t----------------------------------------\n\t\t$form_class = ( isset( $this->arr['form_class'] ) ) ? $this->arr['form_class'] : '';\n\n\t\t$r\t= ee()->functions->form_declaration(\n\t\t\tarray(\n\t\t\t\t'hidden_fields'\t=> $this->arr,\n\t\t\t\t'action'\t\t=> $this->arr['RET'],\n\t\t\t\t'name'\t\t\t=> $this->arr['form_name'],\n\t\t\t\t'id'\t\t\t=> $this->arr['form_id'],\n\t\t\t\t'class'\t\t\t=> $form_class,\n\t\t\t\t'enctype'\t\t=> ( $this->multipart ) ? 'multi': '',\n\t\t\t\t'onsubmit'\t\t=> ( ee()->TMPL->fetch_param('onsubmit') ) ?\n\t\t\t\t\t\t\t\t\t\tee()->TMPL->fetch_param('onsubmit') : ''\n\t\t\t)\n\t\t);\n\n\t\t$r\t.= stripslashes($tagdata);\n\n\t\t$r\t.= \"</form>\";\n\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "6d751bc9ed556b2165d2167cbf3d7827", "score": "0.5475098", "text": "public static function makeFields() {\n\t\t$vars = self::$varArray;\n\t\t$table_fields = '';\n\t\t$entry = '';\n\t\t$submitFieldName = '';\n\t\t$pwFieldName = '';\n\t\t$dateFieldName = '';\n\t\t$theUpfieldName = '';\n\t\t$upFieldName = array();\n\t\t$formFieldValue = array();\n\t\t$selectedValues = array();\n\t\t$postvar = array();\n\t\t$form_array = self::$inputArray;\n\t\t$s=$j=$l=$m=$r=$t=0;\n\t\twhile ($formArray = each($form_array)) {\n\t\t\t$fieldset = $formArray['key'];\n\t\t\t$j++;\n\t\t\t$s=0;\n//\t\t\tprint \"<p>j=$j fieldset \".$fieldset.\"</p>\";\n\t\t\twhile ($formConf = each($form_array[$fieldset])) {\n\t\t\t\t$l++;\n\t\t\t\t$label = $formConf['key'];\n//\t\t\t\tprint \"<p>l=$l label \".$label.\"</p>\";\n\t\t\t\twhile ($config = each($form_array[$fieldset][$label])) {\n\t\t\t\t\t$thetype = $config['key'];\n\t\t\t\t\t$thevalue = $config['value'];\n\t\t\t\t\t$s++;\n// \t\t\t\t\tprint \"<p>s=$s thetype/thevalue <pre>\";\n// \t\t\t\t\tprint_r($thetype);\n// \t\t\t\t\tprint \"</pre> / <pre>\";\n// \t\t\t\t\tprint_r($thevalue);\n// \t\t\t\t\tprint \"</pre></p>\";\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile ($type = each($form_array[$fieldset][$label][$thetype])) { // 4th while\n\t\t\t\t\t\t$inputKey = $selectKey = $textareKey = $typeKey = $nameKey = $dbkey = 0;\n\t\t\t\t\t\t$nameFields = $type['key'];\n\t\t\t\t\t\t$formFields = $type['value'];\n\t\t\t\t\t\t$m++;\n// \t\t\t\t\t\tprint \"<p>m=$m: type = <pre>\";\n// \t\t\t\t\t\tprint_r($type);\n// \t\t\t\t\t\tprint \"</pre></p>\";\n// \t\t\t\t\t\techo \"<p>namefields/formFields = \".$nameFields.\" / <pre>\";\n// \t\t\t\t\t\tprint_r($formFields);\n// \t\t\t\t\t\techo \"</pre></p>\";\n\t\t\t\t\t\t$inputKey = auxiliary::array_key_check($form_array[$fieldset][$label], 'input');\n\t\t\t\t\t\t$selectKey = auxiliary::array_key_check($form_array[$fieldset][$label], 'select');\n\t\t\t\t\t\t$textareaKey = auxiliary::array_key_check($form_array[$fieldset][$label], 'textarea');\n\t\t\t\t\t\t$typeKey = auxiliary::array_key_check($form_array[$fieldset][$label][$thetype], 'type');\n\t\t\t\t\t\t$nameKey = auxiliary::array_key_check($form_array[$fieldset][$label][$thetype], 'name');\n\t\t\t\t\t\t$dbkey = auxiliary::array_key_check($form_array[$fieldset][$label][$thetype], '@#db');\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// avoid 'undefined indexes' errors\n\t\t\t\t\t\t$checkPostVar = ((!$_POST) ? FALSE : TRUE);\n\t\t\t\t\t\t$checkFilesVar = ((!$_FILES) ? FALSE : TRUE);\n\t\t\t\t\t\tif ($inputKey AND $dbkey) { // <input ...\tkey 'submit' replace by variable\n\t\t\t\t\t\t\t$r++;\n//\t\t\t\t\t\t\techo \"<p>r = $r: </p>\";\n\t\t\t\t\t\t\tif ($typeKey) { // <input type ...\n\t\t\t\t\t\t\t\t$t++;\n//\t\t\t\t\t\t\t\techo \"<p>t = $t: </p>\";\n\t\t\t\t\t\t\t\tif ($formFields === 'submit') { // <input type=\"submit\" ...\n\t\t\t\t\t\t\t\t\t// get name of submit field\n\t\t\t\t\t\t\t\t\t$submitFieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t\t//echo \"<p>\".$submitFieldName.\"</p>\";\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'password') { // <input type=\"password\" ...\n\t\t\t\t\t\t\t\t\t// get name of password field\n\t\t\t\t\t\t\t\t\t$pwFieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'date' OR $formFields === 'time' OR $formFields === 'datetime' \n\t\t\t\t\t\t\t\t\t\t\tOR $formFields === 'datetime-local' OR $formFields === 'month' \n\t\t\t\t\t\t\t\t\t\t\t\tOR $formFields === 'week') { // <input type=\"date/datetime/...\" ...\n\t\t\t\t\t\t\t\t\t// get name of date field\n\t\t\t\t\t\t\t\t\t$dateFieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'file') { // <input type=\"file\" ...\n\t\t\t\t\t\t\t\t\t// get names of upload fields\n\t\t\t\t\t\t\t\t\t$theUpfieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t\t$upFieldName[$theUpfieldName] = $theUpfieldName;\n\t\t\t\t\t\t\t\t\t//echo \"<pre>\". print_r($upFieldName) .\"</pre>\";\n\t\t\t\t\t\t\t\t} elseif ($nameFields === 'name') { // <input type=\"text/radio/checkbox/number/range/date/time\" ... else?\n\t\t\t\t\t\t\t\t\t// get values from name fields only\n\t\t\t\t\t\t\t\t\tif ($form_array[$fieldset][$label][$thetype]['name'] === $pwFieldName){\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n//\t\t\t\t\t\t\t\t\t\techo \"<p>pwfield: \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$pwFieldName] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t\t$passwd = addslashes(htmlspecialchars($_POST[$formFields])); //$_POST[$pwFieldName];\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = crypt($passwd,$vars['salt']);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} elseif ($form_array[$fieldset][$label][$thetype]['name'] === $dateFieldName) {\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n//\t\t\t\t\t\t\t\t\t\techo \"<p>datefield: \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$dateFieldName] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t\t$dateTime = addslashes(htmlspecialchars($_POST[$formFields])); //$_POST[$datetFieldName];\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = strtotime($dateTime);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t } elseif ($form_array[$fieldset][$label][$thetype]['name'] === $theUpfieldName) {\n\t\t\t\t\t\t\t\t\t\t//echo \"<br>\".$formFields.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n//\t\t\t\t\t\t\t\t\t\techo \"<p>upfield: \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkFilesVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$theUpfieldName] = $_FILES[$theUpfieldName]['name'];\n\t\t\t\t\t\t\t\t\t\t\t//if (auxiliary::array_key_check($_POST, $formFields)) {\n\t\t\t\t\t\t\t\t\t\t\t$file = $_FILES[$theUpfieldName]['name'];\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($file));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} elseif ($form_array[$fieldset][$label][$thetype]['name'] === $submitFieldName) {\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \";\n\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = $submitFieldName;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \"; // create db table field\n//\t\t\t\t\t\t\t\t\t\techo \"<p>??: \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n//\t\t\t\t\t\t\t\t\techo \"<p>@#db \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n//\t\t\t\t\t\t\t\t\techo \"<p>else \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// if($typeKey)\n\t\t\t\t\t\t\t} \n// \t\t\t\t\t\t\telseif ($typeKey === 'file' AND $dbkey) { \n\t\t\t\t\t\t\t\t// needed or not? !$typeKey === 'file'\n// \t\t\t\t\t\t\t} else { // <input .... without any type declaration\n// \t\t\t\t\t\t\t\t// do nothing\n// \t\t\t\t\t\t\t\t$table_fields .= '';\n// \t\t\t\t\t\t\t\t$entry .= '';\n// \t\t\t\t\t\t\t}\n\t\t\t\t\t\t// if ($inputKey)\n\t\t\t\t\t\t} elseif ($textareaKey) { // <select ... OR <textarea ...\n\t\t\t\t\t\t\tif ($nameFields === 'name') {\n\t\t\t\t\t\t\t\t// get values from name fields only\n\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \"; // create db table field\n//\t\t\t\t\t\t\t\techo \"<p>textarea: \".$table_fields.\"</p>\";\n\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t$formFieldValue[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n//\t\t\t\t\t\t\t\techo \"<p>@#db textarea \".$formFields.\"</p>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n//\t\t\t\t\t\t\t\techo \"<p>else textarea\".$table_fields.\"</p>\";\n\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($selectKey) {\n\t\t\t\t\t\t\t$selectedVal = '';\n\t\t\t\t\t\t\tif ($nameFields === 'name') {\n\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n//\t\t\t\t\t\t\t\techo \"<p>select \".$table_fields.\"</p>\";\n\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \";\n\t\t\t\t\t\t\t\t// need to get the selected values from form fields like 'select' with optgroup\n\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\tif (is_array($_POST[$formFields])) { // i.e 'name' is an array\n\t\t\t\t\t\t\t\t\t\tforeach ($_POST[$formFields] as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\t$selectedVal .= auxiliary::secureit($value). self::$delimiter .\" \";\n\t\t\t\t\t\t\t\t\t\t\t$_POST[$formFields][$key] = auxiliary::secureit($value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$selectedVal = auxiliary::truncateReturn($selectedVal, 2);\n\t\t\t\t\t\t\t\t\t\t$selectedValues[$formFields][] = $selectedVal;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$selectedVal = auxiliary::secureit($formFields);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$formFieldValue[$formFields] = $_POST[$formFields];\n\t\t\t\t\t\t\t\t\t$postvar[$formFields] = $selectedVal;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n//\t\t\t\t\t\t\t\techo \"<p>@#db select \".$table_fields.\"</p>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end 4th while\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$tableInfo = array();\n\t\t$tableInfo[0] = $table_fields; // create table fields with type property\n\t\t$tableInfo[1] = $entry; // for queries of table like INSERT ... Values ($entry\n\t\t$tableInfo[2] = $formFieldValue; // to be put into value field of the form itself\n\t\t$tableInfo[3] = $selectedValues; // holds all selected values from 'checkbox' or 'select' fields, key is the name\n\t\t$tableInfo[4] = $postvar; // entire $_POST array where keys are the form field's names\n\t\t$tableInfo[5] = $upFieldName; // upload fields\n// \t\tprint (\"\\n<pre>tableInfo[] = \");\n// \t\tprint_r($tableInfo);\n// \t\tprint (\"</pre>\\n\");\n\t\treturn $tableInfo;\n\t}", "title": "" }, { "docid": "7193ca5b720ed1121eb6dfef8dade8be", "score": "0.5472856", "text": "public function renderForm() {\n $this->_getElements();\n $this->_populateCategory();\n $this->activo->setValue(\"checked\");\n\n }", "title": "" }, { "docid": "f1ac0287c9eb65f99f57448ecf2d8be2", "score": "0.5463502", "text": "function getElements() {\n\t return $this->elements;\n\t}", "title": "" }, { "docid": "a24e32d4be44728202577d7d7269d789", "score": "0.5462325", "text": "public function get_enqform_controls()\n\t{\n\t\t$this->set_enquiry_controls();\n\t\treturn $this->get_enquiry_controls();\n\t}", "title": "" }, { "docid": "dac8071a7a6ab259a780be0d41c82247", "score": "0.54613584", "text": "public function buildAllElements() {\n\t\t//$this->_wsItems = $this->getAllWelcomeScreenItems();\n\n\t\treturn array(\n\t\t\t'partnerBrandingImgUrl' => $this->buildPartnerBrandingImageUrl(),\n\t\t\t'companyLogoImgUrl'=> $this->buildCompanyLogoImageUrl(),\n\t\t\t'headerTagline' => $this->buildHeaderTagline(),\n\t\t\t'bgImgUrl'=>$this->buildBackgroundImageUrl(),\n\t\t\t'bgImg' => $this->buildBackgroundImage(),\n\t\t\t'carousel' => $this->buildCarousel(),\n\t\t\t'headline' => $this->buildHeadline(),\n\t\t\t'vip' => $this->buildAllVipElements(),\n\t\t\t'selfreg'=>$this->getSelfRegStatus()\n\t\t);\n\t}", "title": "" }, { "docid": "1e0bf739ec2eb6998ea991edd5f9c423", "score": "0.5450836", "text": "public function all()\n {\n return FormSubmission::all();\n }", "title": "" }, { "docid": "e31df5e2651b176bdbf23e21b8338e4c", "score": "0.54440075", "text": "public function getAll()\n {\n $values = [];\n foreach ($this->fields as $key => $value) {\n if ($value['type'] != 'submit') {\n $values[$key] = stripslashes($this->get($key));\n }\n }\n foreach ($this->hidden as $key => $value) {\n $values[$key] = $this->hidden[$key]['value'];\n }\n\n return $values;\n }", "title": "" } ]
2bb5c48b510e5040b77118c538b3998c
Funcion para recibir valores del form. Previene SQL injection
[ { "docid": "c6f387703ad89f6f4442ff5f6209d54d", "score": "0.0", "text": "function clean($str)\n\t{\n\t\t$str = @trim($str);\n\t\tif(get_magic_quotes_gpc())\n\t\t\t{\n\t\t\t$str = stripslashes($str);\n\t\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}", "title": "" } ]
[ { "docid": "c4c3d1c04e76f4320bedbb034a08315a", "score": "0.66636443", "text": "public function valiteForm();", "title": "" }, { "docid": "aff3ea6f538c0b5e6eb2d5f1c823af5c", "score": "0.6403371", "text": "function db_text($campo,$tamanho,$max,$db_nome=\"\",$dbh_nome=\"\",$validacao = 0) {\n?>\n <input name=\"db_<?=$campo?>\" onBlur=\"js_ValidaCamposText(this,<?=$validacao?>)\" id=\"db_<?=$campo?>\" <?=@$readonly?> value=\"<?=$db_nome?>\" type=\"text\" size=\"<?=$tamanho?>\" maxlength=\"<?=$max?>\" autocomplete=\"off\">\n <input name=\"dbh_<?=$campo?>\" type=\"hidden\" value=\"<?=$dbh_nome?>\">\n<?\n}", "title": "" }, { "docid": "536461362efa393bdcac1d6714510d96", "score": "0.6304432", "text": "function post_var_cegah_mySQLInjection($con, $variabel_post, $tipe_konstanta) {\n switch($tipe_konstanta){\n case 'string':\n $string__ = filter_input(INPUT_POST, $variabel_post, FILTER_SANITIZE_STRING);\n break;\n case 'number_int':\n $string__ = filter_input(INPUT_POST, $variabel_post, FILTER_SANITIZE_NUMBER_INT);\n break;\n case 'number_float':\n $string__ = filter_input(INPUT_POST, $variabel_post, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n break; \n default:\n $string__ = filter_input(INPUT_POST, $variabel_post, FILTER_SANITIZE_STRING);\n break;\n }\n // Mencegah MySQL injection\n $string_ = stripslashes($string__);\n $string = mysqli_real_escape_string($con, $string_);\n\n return $string;\n}", "title": "" }, { "docid": "67258fb7d976e36966f7e2206ff48356", "score": "0.6139815", "text": "function valideForm(){\n\t\n\tglobal $_formulaire, $minLen;\n\t$message = '';\n\t$sql_set = '';\n\t\n\tforeach ($_formulaire as $key => $info){\n\t\t\n\t\t$label = $info['label'];\n\t\t$valeur = (isset($info['valide']))? $info['valide'] : NULL;\n\t\t\n\t\tif('valide' != $key && !isset($info['obligatoire']))\n\t\t\tif (isset($info['maxlength']) && \n\t\t\t\t(strlen($valeur) < $minLen || strlen($valeur) > $info['maxlength']) &&\n\t\t\t\t$key != 'mdp')\n\t\t\t{\n\t\t\t\t$message.= '<p> Erreur sur le ' .$label. \n\t\t\t\t\t': doit avoir un nombre de caracter compris entre ' . $minLen . \n\t\t\t\t\t' et ' . $info['maxlength'] . ' </p>';\n\t\t\t}else{\n\n\t\t\t\tswitch($key){\n\t\t\t\t\t\n\t\t\t\t\tcase 'sexe':\n\t\t\t\t\t\tif(empty($valeur))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Vous devez choisire une option </p>';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'telephone':\n\t\t\t\t\t\tif(!preg_match('#[0-9.\\s.-]#', $valeur))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Il doit comptenir que des chiffres </p>';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'mdp':\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(strlen($valeur) < $minLen ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Il doit avoir un nombre de minimum ' . $minLen . ' caracteres </p>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Construction de la requettes\n\t\t\t\t// le mot de passe doit être traité differament\n\t\t\t\tif($key != 'mdp' || ($key == 'mdp' and !empty($valeur))) \n\t\t\t\t\t$sql_set .= ((!empty($sql_set))? \", \" : \"\") . \"$key = '$valeur'\";\n\t\t\t}\n\t}\n\t\n\t// si la variable $message est vide alors il n'y a pas d'erreurr !\n\tif(empty($message)) \n\t{\n\n\t\t$sql = 'UPDATE membre SET '.$sql_set.' WHERE id_membre = '.$_SESSION['utilisateur']['id'];\n\t\texecuteRequete ($sql);\n\t\t// ouverture d'une session\n\t\t$message = \"OK\";\n\t\t\n\t}else{ \n\t\t$message = '<div class=\"bg-danger message\">'.$message.'</div>';\n\t}\n\n\treturn $message;\n}", "title": "" }, { "docid": "45748ac549fe2470153495c755355b3e", "score": "0.6097741", "text": "public function getFormValue();", "title": "" }, { "docid": "218d030310400918524c6b7083b32f1d", "score": "0.6016456", "text": "function val_input($data){\n $data = trim($data);\n $data = str_replace(\"'\", \"\",$data);\n $data = str_replace(\"select\", \"\",$data);\n $data = str_replace(\"Select\", \"\",$data);\n $data = str_replace(\"SELECT\", \"\",$data);\n $data = str_replace(\"drop\", \"\",$data);\n $data = str_replace(\"Drop\", \"\",$data);\n $data = str_replace(\"DROP\", \"\",$data);\n $data = str_replace(\"delete\", \"\",$data);\n $data = str_replace(\"Delete\", \"\",$data);\n $data = str_replace(\"DELETE\", \"\",$data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "4bf87a34f7b69e8811a3470b6f0d4cda", "score": "0.5927836", "text": "function textboxValue($value){\n $textbox = mysqli_real_escape_string($GLOBALS['con'],trim($_POST[$value]));\n if(empty($textbox)){\n return false;\n }else{\n return $textbox;\n }\n}", "title": "" }, { "docid": "c8caeade980aeb9052b2319c45a39b21", "score": "0.5873354", "text": "function textboxValue($value) {\n $textbox = mysqli_real_escape_string($GLOBALS['con'],trim($_POST[$value]));\n\n if(empty($textbox)) {\n return false;\n }else {\n return $textbox;\n }\n}", "title": "" }, { "docid": "4146f4acdc49f77829df51b80d33a546", "score": "0.58544075", "text": "private function getFormInput($table) {\n\tif ($table == 'movies') {\n\t\t$params['title']\t\t= isset($_POST['title'])\t&& !empty($_POST['title'])\t\t&& ($_POST['title'] != '') \t\t? $_POST['title']\t\t: die ('Title must be set');\n\t\t$params['director']\t\t= isset($_POST['director'])\t&& !empty($_POST['director'])\t&& ($_POST['director'] != '')\t? $_POST['director']\t: null;\n\t\t$params['year']\t\t\t= isset($_POST['year'])\t\t&& !empty($_POST['year'])\t\t&& ($_POST['year'] != '')\t\t? $_POST['year']\t\t: 1990;\n\t\t$params['price']\t\t= isset($_POST['price'])\t&& !empty($_POST['price'])\t\t&& ($_POST['price'] != '')\t\t? $_POST['price']\t\t: 4; \n\t\t$params['img']\t\t\t= isset($_POST['img'])\t\t&& !empty($_POST['img'])\t\t&& ($_POST['img'] != '')\t\t? $_POST['img']\t\t\t: null;\n\t\t$params['imgfolder']\t= isset($_POST['imgfolder'])&& !empty($_POST['imgfolder'])\t&& ($_POST['imgfolder'] != '')\t? $_POST['imgfolder']\t: null;\n\t\t$params['info']\t\t\t= isset($_POST['info'])\t\t&& !empty($_POST['info'])\t\t&& ($_POST['info'] != '')\t\t? $_POST['info']\t\t: null;\n\t\t$params['link']\t\t\t= isset($_POST['link'])\t\t&& !empty($_POST['link'])\t\t&& ($_POST['link'] != '')\t\t? $_POST['link']\t\t: null;\n\t\t$params['trailer']\t\t= isset($_POST['trailer'])\t&& !empty($_POST['trailer'])\t&& ($_POST['trailer'] != '')\t? $_POST['trailer']\t\t: null; \n\n\t\tis_numeric($params['price']) or is_null($params['price']) or die ('Price must be numeric');\n\t\tis_numeric($params['year']) or is_null($params['year']) or die ('Year must be numeric');\n\t\t\n\t}\n\telseif ($table == 'posts') {\n\t\t$params['title']\t\t= isset($_POST['title'])\t\t? $_POST['title']\t\t: die ('Title must be set');\n\t\t$params['category']\t\t= isset($_POST['newcategory']) && ($_POST['newcategory'] != '')\t? $_POST['newcategory']\t: null;\n\t\t$params['data']\t\t\t= isset($_POST['data'])\t\t\t? $_POST['data']\t\t: null;\n\t\t$params['published']\t= isset($_POST['published'])\t? $_POST['published']\t: date(\"Y-m-d H:i:s\"); \n\t\t$params['created']\t\t= isset($_POST['created'])\t\t? $_POST['created']\t\t: null;\n\t\tif ($params['created'] == null) {\n\t\t\tunset($params['created']);\n\t\t}\n\t\tif ($params['category'] == null) {\n\t\t\t$params['category'] = isset($_POST['category']) ? $_POST['category'] : null;\n\t\t\tif ($params['category'] == null) { unset($params['category']); }\n\t\t}\n\t}\n\telseif ($table == 'page') {\n\t\t$params['title']\t\t= isset($_POST['title'])\t\t? $_POST['title']\t\t: die ('Title must be set');\n\t\t$params['data']\t\t\t= isset($_POST['data'])\t\t\t? $_POST['data']\t\t: null;\n\t\t$params['published']\t= isset($_POST['published'])\t? $_POST['published']\t: date(\"Y-m-d H:i:s\"); \n\t}\n\telseif ($table == 'users') {\n\t\t$params['name']\t\t\t= isset($_POST['name'])\t\t\t? $_POST['name']\t\t: die ('Name must be set');\n\t\t$params['acronym']\t\t= isset($_POST['acronym'])\t\t? $_POST['acronym']\t\t: die ('Acronym must be set');\n\t\t$params['password']\t\t= isset($_POST['password'])\t&& ($_POST['password'] != '')\t? $_POST['password']\t: die ('Password must be set');\n\t\t$params['info']\t\t\t= isset($_POST['info'])\t\t\t? $_POST['info']\t\t: null;\n\t\t$params['img']\t\t\t= isset($_POST['img'])\t\t\t? $_POST['img']\t\t\t: 'user1.png';\n\t\t$params['authority']\t= isset($_POST['authority'])\t? $_POST['authority']\t: null;\n\t\tif ($params['authority'] == null) {\n\t\t\tunset($params['authority']);\n\t\t}\n\t\t\n\t}\n\n\treturn $params;\n\n}", "title": "" }, { "docid": "bfeb12f2c7b69aba26891e67a66681ef", "score": "0.57276607", "text": "public function getParamsSave(){\n // z formularza edycji\n $this->form->id = getFromRequest('id');\n $this->form->author = getFromRequest('author');\n $this->form->email = getFromRequest('email');\n }", "title": "" }, { "docid": "7aec4aa78b0ae4dc5abdcd8cda5cbe95", "score": "0.56963056", "text": "function recogeDato($campo){ \r\n \t\t\t\treturn isset($_REQUEST[$campo])?$_REQUEST[$campo]:'';\r\n \t\t\t\t}", "title": "" }, { "docid": "54afd40eb11b0b486da105c888232ba8", "score": "0.565715", "text": "function encodeForSQLInjection($value);", "title": "" }, { "docid": "98e26a78345636cb1780159cc767e5df", "score": "0.56529945", "text": "private function recuperar_filtro()\n\t{\n\t\t$form = $this->get_form();\n\t\tif (!$form->procesar('GET')) {\n\t\t\tthrow new error_kernel_validacion(\"Error al validar el filtro\");\n\t\t}\n\t\t//si no se llega aca, aplican los valores default\n\t\t$this->datos_filtro = $form->get_datos();\n\t}", "title": "" }, { "docid": "2bf96a2496e94ddbb394ce3b967450ee", "score": "0.5651394", "text": "function get_post($conn, $var)\n{\n return sanitize($conn->real_escape_string($_POST[$var]));\n}", "title": "" }, { "docid": "1e1a8a982c81c15bb60861e2b5a6e98b", "score": "0.5618675", "text": "function soalInput($input) {\n global $koneksi;\n $soal = htmlspecialchars($input['soal']);\n $id = $_SESSION['id'];\n\n $query = \"INSERT INTO tb_soal VALUES ('$id', '$soal')\";\n mysqli_query($koneksi, $query);\n}", "title": "" }, { "docid": "d6e3f7d77a3adbbec8a9270876f3e45f", "score": "0.5598141", "text": "public function getFormSubmitValues();", "title": "" }, { "docid": "b8dc4cf61f855ad467a3ba5d73ce1950", "score": "0.55155516", "text": "function limpiarPostTexto($var){return filter_input(INPUT_POST, $var, FILTER_SANITIZE_STRING);}", "title": "" }, { "docid": "788e038fb7c63a5febc43e1c0b4cda5c", "score": "0.55125445", "text": "function val_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "e90d09d64113d5b1647924cab1341b75", "score": "0.5505167", "text": "function form_field($row, $m_form, $required_typecheck_result = 0 ) {\t\t// indien niet goed bewaard gebruik dan de form waarde\n\t\tif ( $required_typecheck_result == 0 ) {\n\t\t\t$veldwaarde = $this->get_form_value();\n\t\t} else {\n\t\t\t$veldwaarde = $row[$this->get_fieldname()];\n\n\t\t\t$onNewValue = $this->get_onNew($m_form[\"primarykey\"]);\n\n\t\t\tif ( $onNewValue != \"\" ) {\n\t\t\t\t$veldwaarde = $onNewValue;\n\t\t\t}\n\t\t}\n\n\t\t$inputfield = \"<input name=\\\"FORM_::FIELDNAME::\\\" type=\\\"text\\\" value=\\\"::VALUE::\\\" size=\\\"::SIZE::\\\" ::STYLE:: ::CLASS:: ::PLACEHOLDER:: autocomplete=\\\"off\\\">\";\n\n\t\tif ( $veldwaarde == '' ) {\n\t\t\t$inputfield = str_replace(\"::VALUE::\", '', $inputfield);\n\n\t\t} else {\n\t\t\t$inputfield = str_replace(\"::VALUE::\", class_datetime::ConvertTimeInMinutesToTimeInHoursAndMinutes($veldwaarde), $inputfield);\n\t\t}\n\n\t\t//\n\t\t$inputfield = $this->setInputFieldAttributes($inputfield);\n\t\t$inputfield = $this->cleanUpLabels($inputfield);\n\n\t\treturn $inputfield;\n\t}", "title": "" }, { "docid": "8b01bee96729ba4c85d76b4ac2f80675", "score": "0.54889876", "text": "function _GetFrm(){\n\t\t// Cargo desde el formulario\n\t\t$this->Registro['id_prenda'] = $_POST['id_prenda'];\n\t\t$this->Registro['id_categoria_prenda'] = $_POST['id_categoria_prenda'];\n\t\t$this->Registro['nombre_prenda'] = $_POST['nombre_prenda'];\n\t\t$this->Registro['descripcion'] = stripslashes($_POST['DESCRIPCION']);\n\t\t$this->Registro['info_tecnica'] = stripslashes($_POST['INFOTECNICA']);\n\t\t$this->Registro['precio'] = number2db($_POST['precio']);\n\t\t$this->Registro['visible'] = $_POST['visible'] ? 1 : 0;\n\t\t$this->Registro['destacada'] = $_POST['destacada'] ? 1 : 0;\n\t}", "title": "" }, { "docid": "949a2db5733d627d3bbf205df0d43791", "score": "0.5468374", "text": "function checkTextFormValues($session){\r\n\t\tif (isset($_POST[$session]) && is_string($_POST[$session]) && !preg_match( '/(galery_users|galery_photos|galery_superusers|DELETE|DROP|TABLE)/', $_POST[$session])) {\r\n\t\t\t$return = $_POST[$session];\r\n\t\t} else {\r\n\t\t\t$return = null;\r\n\t\t}\r\n\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "520059d2e17cbf388e00c7d541f10bad", "score": "0.54606473", "text": "function data_form($datasql) {\n\tif (!empty($datasql)){\n\t$p_dt = explode('-',$datasql);\n\t$data_br = $p_dt[2].'/'.$p_dt[1].'/'.$p_dt[0];\n\treturn $data_br;\n\t}\n}", "title": "" }, { "docid": "f683cfabc057b29769f468c1a0a980f1", "score": "0.5452505", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->codigo=$_POST['codigo'];\n\t}", "title": "" }, { "docid": "91889897af98cf41c06884d1a7a33fe6", "score": "0.54481894", "text": "function getInputValues($name){\n if(isset($_POST[$name])){\n echo $_POST[$name];\n }\n }", "title": "" }, { "docid": "ddda53363625aee47e14f0ae9a113220", "score": "0.5437821", "text": "function elije_input($tipo,$nombre,$id_num,$type=\"\",$value=\"\"){\n\n\t\t$placeholder = placeholder_cadena($nombre); /*placeholder de inputs del formulario*/\n\t\t$placeholder .= \":\";\n\n\t\tswitch ($tipo) {\n\t\t\tcase 'varchar':\n\t\t\t\tif ($type==\"pass\"){\n\t\t\t\t\t$instancia= new input(\"password\",$nombre,\"id_\".$id_num,$placeholder,\"^[a-zA-Z0-9]*$\",$value,1,1);\n\t\t\t\t\treturn $instancia;\n\t\t\t\t}else if ($type==\"mail\") {\n\t\t\t\t\t$instancia= new input(\"email\",$nombre,\"id_\".$id_num,$placeholder,\"^[a-zA-Z0-9]*$\",$value,2,1);\n\t\t\t\t\treturn $instancia;\n\t\t\t\t}else{\n\t\t\t\t\t$instancia= new input(\"text\",$nombre,\"id_\".$id_num,$placeholder,\"^[a-zA-Z0-9]*$\",$value,1,1);\n\t\t\t\t\treturn $instancia;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'int':\n\t\t\t\t$instancia= new input(\"text\",$nombre,\"id_\".$id_num,$placeholder,\"^[0-9]*$\",$value,1,1);\n\t\t\t\treturn $instancia;\n\t\t\tcase 'tinyint':\n\t\t\t\t$instancia= new input(\"text\",$nombre,\"id_\".$id_num,$placeholder,\"^[0-9]*$\",$value,1,1);\n\t\t\t\treturn $instancia;\n\t\t\t\tbreak;\n\t\t\tcase 'smallint':\n\t\t\t\t$instancia= new input(\"text\",$nombre,\"id_\".$id_num,\"$placeholder\",\"^[0-9]*$\",$value,1,1);\n\t\t\t\treturn $instancia;\n\t\t\t\tbreak;\n\t\t\tcase 'float':\n\t\t\t\t$instancia= new input(\"text\",$nombre,\"id_\".$id_num,\"$placeholder\",\"^[0-9]*$\",$value,1,1);\n\t\t\t\treturn $instancia;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "380e169e24a9966764a75bafe557e003", "score": "0.54377675", "text": "function iphorm_get_form($id, $uid = '', $values = '')\n{\n $config = iphorm_get_form_config($id);\n\n if ($config !== null) {\n if (strlen($uid)) {\n $config['uniq_id'] = preg_replace('/[^A-Za-z0-9]/', '', $uid);\n }\n\n $config['dynamic_values'] = $values;\n\n $form = new iPhorm($config);\n\n return $form;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "a27a123bbc8ef651fffbd8ec8d9c88a1", "score": "0.54367006", "text": "function parametros($orden,$id_) {\r\n\t$s_ = \"select super_admin, administrador from empleados where id='$_SESSION[IDEMP]'\";\r\n\t$r_ = mysql_query($s_); \r\n\t$d_ = mysql_fetch_array($r_);\r\n\tif($d_['super_admin']=='1') { $admin = 2; }\r\n\tif($d_['administrador']=='1') { $admin = 1; }\r\n\r\n$dis = 'disabled';\r\nif($id_!='') {\r\n\t$s_ = \"select * from configuracion where id='$id_'\";\r\n $r_ = mysql_query($s_);\r\n\t$d_ = mysql_fetch_array($r_); \r\n\t$dis = ''; } ?>\r\n<form action=\"?op=guardar\" method=\"post\" name=\"form1\">\r\n<input type=\"hidden\" name=\"id_\" value=\"<?php echo $id_;?>\">\r\n<input type=\"hidden\" name=\"variable\" value=\"<?php echo $d_['variable'];?>\">\r\n<table align=\"center\" class=\"tabla\">\r\n<tr height=\"20\" bgcolor=\"#F7F7F7\">\r\n <td align=\"left\" width=\"120\">&nbsp;&nbsp;<?php echo utf8_decode($d_['nombre']);?></td>\r\n <td align=\"center\"><input type=\"text\" name=\"valor\" value=\"<?php echo $d_['valor'];?>\" size=\"50\" class=\"texto\"></td>\r\n\t<td align=\"center\"><input type=\"submit\" value=\"Guardar\" class=\"submit\" <?php echo $dis;?>></td>\r\n</tr>\r\n</table>\r\n</form>\r\n\r\n<table align=\"center\" class=\"tabla\" width=\"850\">\r\n<caption>Parámetros Generales</caption>\r\n<thead>\r\n\t<tr bgcolor=\"#E6E6E6\" height=\"20\">\r\n\t\t<td width=\"150\" align=\"center\">Nombre</td>\r\n <td width=\"450\" align=\"center\">Descripción</td>\r\n\t\t<td width=\"200\" align=\"center\">Valor</td>\r\n\t\t<td width=\"40\" align=\"center\">Editar</td>\r\n\t</tr>\r\n</thead>\r\n<?php $s_1 = \"select * from configuracion where mostrar='1' and seccion='generales' order by nombre\";\r\n $r_1 = mysql_query($s_1);\r\n\twhile($d_1=mysql_fetch_array($r_1)) { ?> \r\n<tr onMouseOut=\"this.style.background='#F7F7F7'\" onMouseOver=\"this.style.background='#FFDD99'\" bgcolor=\"#F7F7F7\" height=\"20\">\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo $d_1['nombre'];?></td>\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo $d_1['descripcion'];?></td>\r\n <td align=\"left\">&nbsp;&nbsp;\r\n\t<?php if($d_1['variable']=='password') { \r\n\t\t\t$num = strlen($d_1['valor']); \r\n\t\t\tfor($i=0;$i<$num;$i++) { echo \"*\"; } }\r\n\t\t else { \r\n\t\t \tif(strlen($d_1['valor'])>80) { echo substr($d_1['valor'],0,60).\"...\"; } \r\n\t\t\telse { echo $d_1['valor']; } } ?></td>\r\n\t<td align=\"center\">\r\n \t<?php if($admin=='2' || $d_1['variable']=='bloqueado') { ?>\r\n <a href=\"?op=listado&id_=<?php echo $d_1['id'];?>\">\r\n\t\t<img src=\"../imagenes/pencil.gif\" alt=\"Editar\" border=\"0\"></a><?php } else { ?>\r\n <img src=\"../imagenes/pencil_gris.gif\" alt=\"No puede editar\" border=\"0\"><?php } ?></td>\r\n</tr>\r\n<?php } ?>\r\n</tbody>\r\n</table><br>\r\n\r\n\r\n<table align=\"center\" class=\"tabla\" width=\"850\">\r\n<caption>Archivos del Sistema</caption>\r\n<thead>\r\n\t<tr bgcolor=\"#E6E6E6\" height=\"20\">\r\n\t\t<td width=\"150\" align=\"center\">Nombre</td>\r\n <td width=\"450\" align=\"center\">Descripción</td>\r\n\t\t<td width=\"200\" align=\"center\">Valor</td>\r\n\t\t<td width=\"40\" align=\"center\">Editar</td>\r\n\t</tr>\r\n</thead>\r\n<?php $s_1 = \"select * from configuracion where mostrar='1' and seccion='archivos' order by nombre\";\r\n $r_1 = mysql_query($s_1);\r\n\twhile($d_1=mysql_fetch_array($r_1)) { ?> \r\n<tr onMouseOut=\"this.style.background='#F7F7F7'\" onMouseOver=\"this.style.background='#FFDD99'\" bgcolor=\"#F7F7F7\" height=\"20\">\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo utf8_decode($d_1['nombre']);?></td>\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo utf8_decode($d_1['descripcion']);?></td>\r\n <td align=\"center\">\r\n \t<?php if($d_1['valor']!='') { ?>\r\n <a href=\"<?php echo $d_1['valor'];?>\" target=\"_blank\">Ir al archivo</a><?php } else { echo \"&nbsp;\"; } ?></td>\r\n\t<td align=\"center\">\r\n \t<?php if($admin=='2') { ?>\r\n <a href=\"?op=listado&id_=<?php echo $d_1['id'];?>\">\r\n\t\t<img src=\"../imagenes/pencil.gif\" alt=\"Editar\" border=\"0\"></a><?php } else { ?>\r\n <img src=\"../imagenes/pencil_gris.gif\" alt=\"No puede editar\" border=\"0\"><?php } ?></td>\r\n</tr>\r\n<?php } ?>\r\n</tbody>\r\n</table><br>\r\n\r\n<table align=\"center\" class=\"tabla\" width=\"850\">\r\n<caption>Carpetas del Sistema</caption>\r\n<thead>\r\n\t<tr bgcolor=\"#E6E6E6\" height=\"20\">\r\n\t\t<td width=\"150\" align=\"center\">Nombre</td>\r\n <td width=\"350\" align=\"center\">Descripción</td>\r\n\t\t<td width=\"400\" align=\"center\">Valor</td>\r\n\t\t<td width=\"40\" align=\"center\">Editar</td>\r\n\t</tr>\r\n</thead>\r\n<?php $s_1 = \"select * from configuracion where mostrar='1' and seccion='carpetas' order by nombre\";\r\n $r_1 = mysql_query($s_1);\r\n\twhile($d_1=mysql_fetch_array($r_1)) { ?> \r\n<tr onMouseOut=\"this.style.background='#F7F7F7'\" onMouseOver=\"this.style.background='#FFDD99'\" bgcolor=\"#F7F7F7\" height=\"20\">\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo utf8_decode($d_1['nombre']);?></td>\r\n\t<td align=\"left\">&nbsp;&nbsp;<?php echo utf8_decode($d_1['descripcion']);?></td>\r\n <td align=\"left\">&nbsp;&nbsp;<?php echo $d_1['valor']; ?></td>\r\n\t<td align=\"center\">\r\n \t<?php if($admin=='2') { ?>\r\n <a href=\"?op=listado&id_=<?php echo $d_1['id'];?>\">\r\n\t\t<img src=\"../imagenes/pencil.gif\" alt=\"Editar\" border=\"0\"></a><?php } else { ?>\r\n <img src=\"../imagenes/pencil_gris.gif\" alt=\"No puede editar\" border=\"0\"><?php } ?></td>\r\n</tr>\r\n<?php } ?>\r\n</tbody>\r\n</table><br><br><br>\r\n<?php }", "title": "" }, { "docid": "db4fd23e5136bc5502dda857a16c7c1d", "score": "0.5432682", "text": "function persistirInput($campo){\r\n if(isset($_POST[$campo])){\r\n return $_POST[$campo];\r\n }\r\n}", "title": "" }, { "docid": "cea4740346143581ad82da98fa455ef0", "score": "0.5431684", "text": "function valideValHelper(){\n\t// This is used to prevent from having an extensive set of if conditions in index.php\n\treturn (isset($_POST['p']) && isset($_POST['q']) && !empty($_POST['p']) && !empty($_POST['q']) && !empty($_POST['eVal']) && !empty($_POST['eVal']) );\n}", "title": "" }, { "docid": "a96e967bc6bace0c63686fad1981235a", "score": "0.5428481", "text": "function userInput($input) {\n global $koneksi;\n $nama = htmlspecialchars($input['nama']);\n $umur = htmlspecialchars($input['umur']);\n $jk = htmlspecialchars($input['jk']);\n\n $query = \"INSERT INTO tb_user VALUES ('', '$nama', '$umur', '$jk')\";\n mysqli_query($koneksi, $query);\n}", "title": "" }, { "docid": "6de98bd994c9dbfac699ad23f73e70dd", "score": "0.5423556", "text": "public function queryField($sql, array $vars=array());", "title": "" }, { "docid": "df0783d88c7717fafb15769884db87d7", "score": "0.5418511", "text": "public function getParamsEdit(){\n // z widoku listy osób\n $this->form->id = getFromRequest('id');\n }", "title": "" }, { "docid": "3eac2822ed2e13b2cb6fb8cd15a567fd", "score": "0.5416095", "text": "public function llenarInputEmisor()\n\t\t\t {\n\t\t\t\t\t//Consulta el nombre de la dependencia en conjunto con los datos de \n\t\t\t\t\t//la dependencia \n\t\t\t \t$dependencia = $_POST[\"dependencia\"];\n\t\t\t \tif ($dependencia) \n\t\t\t \t{\n\t\t\t \t\t$informacion = $this->Modelo_recepcion->getInfoDependencias($dependencia);\n\n\t\t\t \t\tforeach ($informacion as $row)\n\t\t\t \t\t{\n\t\t\t \t\t\t$options=\"<input name='emisor' class='form-control' value='\".$row->titular.\"' required>\"; \n\t\t\t \t\t\techo $options; \n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }", "title": "" }, { "docid": "bcce0ed24c15e3cad2595dce0f1120c9", "score": "0.54051477", "text": "function verarbeite_formular( ) {\n print \"Hallo \". $_POST['mein_name'];\n}", "title": "" }, { "docid": "b613447a3baba349d5d2db427282cdfa", "score": "0.5400411", "text": "function _GetFrm(){\n\t\t// Cargo desde el formulario\n\t\t$id = $_POST['id_color'];\n\t\t$this->Registro['id_color'] = $id;\n\t\t$this->Registro['nombre_color'] = $_POST['nombre_color'];\n\t}", "title": "" }, { "docid": "33d561334b36578bbc233a2e9db5d831", "score": "0.53969353", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->url=$_POST['url'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "title": "" }, { "docid": "a500a2ae5c76ecde11042a24ee7c4905", "score": "0.539624", "text": "private function fillForm() {\n if(!empty($_POST)) {\n $this->setValuesByPost();\n }\n }", "title": "" }, { "docid": "6644845c489f70dcfca38ba8b7fa0ee5", "score": "0.539034", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->correo=$_POST['correo'];\n\t\t$this->nivel=$_POST['nivel'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->login=$_POST['login'];\n\t\t$this->clave=$_POST['clave'];\n\t\t$this->confirmar=$_POST['confirmar'];\n\t}", "title": "" }, { "docid": "30015bc3ea25891f2e29f9dce2440504", "score": "0.53866005", "text": "function e($val){\n global $conn;\n return mysqli_real_escape_string($conn, trim($val));\n}", "title": "" }, { "docid": "011c2af4ac3e960eb7f90bb9f2a021d4", "score": "0.5384673", "text": "function getInputValue($input){\r\n if (isset($_POST['$input'])) {\r\n echo $_POST['$input'];\r\n }\r\n }", "title": "" }, { "docid": "2cee3a4075203a7929b92dce6cd7ccf2", "score": "0.53809685", "text": "function obtenerParametros(){\n $qry = \"SELECT *\n FROM parametros\";\n \n $rs = $GLOBALS[\"db\"]->consulta($qry);\n return $rs[0];\n }", "title": "" }, { "docid": "a1a58671784242e748be21ae1adc4055", "score": "0.5368304", "text": "function filterfield($fieldname){\n\t $fieldname = str_replace(\"'\", \"\",$fieldname);\n if(get_magic_quotes_gpc()) // prevents duplicate backslashes\n {\n $fieldname = stripslashes($fieldname);\n\t\n }\n if (phpversion() >= '4.3.0')\n {\n $fieldname = mysql_real_escape_string($fieldname);\n }\n else\n {\n $fieldname = mysql_escape_string($fieldname);\n }\n \n return $fieldname;\n\n\n\t\n\t//return the filtered data\n // return $fieldname;\n \n}", "title": "" }, { "docid": "703f5aa42a4d7c6b1658845aeba388a9", "score": "0.53511274", "text": "function prevent_SQL_Injection_attack($parameters)\n{\n\n $parameters = htmlspecialchars($parameters);\n $parameters = stripslashes($parameters);\n $parameters = trim($parameters);\n return $parameters;\n}", "title": "" }, { "docid": "dbc8db2e2f095f3058199254c35dc760", "score": "0.5349614", "text": "function js_param($fld)\n\t\t{\n\t\t\tforeach($fld as $input => $title){\n\t\t\t$js_param[] = $input.\"=' + document.getElementById('\".$input.\"').value\";\n\t\t\t}\n\t\t\treturn \" ' \".implode(\" + '&\",$js_param);\n\t\t}", "title": "" }, { "docid": "48da130b744964cabb1dfc0a82b2511c", "score": "0.53458273", "text": "function get_regform_data($input) {\t\n\t$data = array();\n\t$db = new db();\n\t$db->connect();\n\t$coltypes = $db->get_column_types('students');\n\t$db->query(\"SELECT field_name FROM reg_form WHERE forder>=1 AND status='on' AND stored='y'\");\n\twhile ($db->getRows()) {\n\t\t$field_name = $db->row(\"field_name\");\n\t\t$field_value = isset($input[$field_name]) ? trim($input[$field_name]) : '';\t\t\n\t\tif ($field_name == 'fname' || $field_name == 'lname')\n\t\t\t$field_value = ucwords($field_value); // Upper case first and last name first character\n\t\telseif ($field_name == 'password')\n\t\t\tif (isset($input['password']) && isset($input['username']))\n\t\t\t\t$field_value = sha1($input['username'].$field_value); \t\t// Encrypt the password\n\t\t\telse {\n\t\t\t\tcontinue;\t\t\t\t\t\t\t// Cannot set password if username not specified\n\t\t\t}\n\t\t$len = strpos($coltypes[$field_name], '(');\n\t\t\n\t\tif ($len !== false)\n\t\t $ctype = substr($coltypes[$field_name], 0, $len);\n\t\telse\n\t\t\t$ctype = $coltypes[$field_name];\n\t\t\t\n\t\tswitch (strtolower($ctype)){\n\t\t\tcase 'char':\n\t\t\tcase 'varchar':\n\t\t\tcase 'binary':\n\t\t\tcase 'varbinary':\n\t\t\tcase 'text':\n\t\t\tcase 'enum':\n\t\t\t\t$field_value = \"'\".$db->escape_string(trim($field_value)).\"'\";\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\t\n\t\t\t\t$field_value = \"'\".$db->escape_string($field_value).\"'\";\n\t\t\tcase 'date':\n\t\t\tcase 'time':\n\t\t\tcase 'datetime':\n\t\t\tcase 'timestamp':\n\t\t\t\t$field_value = \"'\" . trim($field_value) . \"'\";\n\t\t\tdefault:\n\t\t}\n\t\t$data[\"`$field_name`\"] = $field_value;\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "724757d3e21a31bf14e0e5b7ad4f773b", "score": "0.5337802", "text": "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n $data = mysqli_real_escape_string($GLOBALS[\"db_connect\"], $data);\r\n return $data;\r\n }", "title": "" }, { "docid": "cfbaa2bd7e98d5a9f0fa85b4a456a4cf", "score": "0.5331658", "text": "function validateInput($conn, $data)\n{\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\t//okokok that's cool and all, but like, can y ou protect yoru database?\n\t$data = mysqli_real_escape_string($conn, $data);\n\t//ok cool thx\n\treturn $data;\n}", "title": "" }, { "docid": "a4c184d39d93840c51a88d8aff151b00", "score": "0.53227496", "text": "function preLoad($feild){\n \n $fr=$_SESSION[\"form_rec\"];\n \n /*DBG*/// if ($_SESSION[\"debug\"]==1) {echo \"<p>owner_name:\".$fr[\"owner_name\"];}\n \n if (isset($fr[$feild]) ){\n echo \"value='\".trim($fr[$feild]).\"' \"; \n } \n }", "title": "" }, { "docid": "87db53384304437732e8b8369518b499", "score": "0.5320452", "text": "function escapeInputValue($value)\r\n{\r\n return \"'\" . mysql_escape_string($value) . \"'\";\r\n}", "title": "" }, { "docid": "0f79b5edb914955c960d45b12195b79d", "score": "0.5309417", "text": "function select($id = null)\n\t{\n\t\t$myrow = select_PluSQL($this -> table, array($this -> id => strip($id)));\n\t\t$_POST['name'] = $myrow -> name;\n\t\t$_POST['description'] = $myrow -> description;\n\t\t$_POST['type'] = $myrow -> type;\n\t}", "title": "" }, { "docid": "ace35def49412177777b5b31fe77c2a0", "score": "0.53054845", "text": "function getInputValue($name){\r\n if (isset($_POST[$name])) {\r\n echo $_POST[$name];\r\n }\r\n }", "title": "" }, { "docid": "2e264d25e8f11c72c7308991d5115f98", "score": "0.52991676", "text": "function filtroEmpleados() {\r\n\tglobal $_APLICACION;\r\n\tglobal $maxlimit;\r\n\tglobal $fCodOrganismo;\r\n\tglobal $fCodDependencia;\r\n\tglobal $fCodCentroCosto;\r\n\tglobal $fCodTipoNom;\r\n\tglobal $fCodTipoTrabajador;\r\n\tglobal $fEdoReg;\r\n\tglobal $fSitTra;\r\n\tglobal $fFingresoD;\r\n\tglobal $fFingresoH;\r\n\tglobal $fBuscar;\r\n\tglobal $fOrderBy;\r\n\t?>\r\n <input type=\"hidden\" name=\"_APLICACION\" id=\"_APLICACION\" value=\"<?=$_APLICACION?>\" />\r\n <input type=\"hidden\" name=\"concepto\" id=\"concepto\" value=\"<?=$concepto?>\" />\r\n <input type=\"hidden\" name=\"maxlimit\" id=\"maxlimit\" value=\"<?=$maxlimit?>\" />\r\n <input type=\"hidden\" name=\"fCodOrganismo\" id=\"fCodOrganismo\" value=\"<?=$fCodOrganismo?>\" />\r\n <input type=\"hidden\" name=\"fCodDependencia\" id=\"fCodDependencia\" value=\"<?=$fCodDependencia?>\" />\r\n <input type=\"hidden\" name=\"fCodCentroCosto\" id=\"fCodCentroCosto\" value=\"<?=$fCodCentroCosto?>\" />\r\n <input type=\"hidden\" name=\"fCodTipoNom\" id=\"fCodTipoNom\" value=\"<?=$fCodTipoNom?>\" />\r\n <input type=\"hidden\" name=\"fCodTipoTrabajador\" id=\"fCodTipoTrabajador\" value=\"<?=$fCodTipoTrabajador?>\" />\r\n <input type=\"hidden\" name=\"fEdoReg\" id=\"fEdoReg\" value=\"<?=$fEdoReg?>\" />\r\n <input type=\"hidden\" name=\"fSitTra\" id=\"fSitTra\" value=\"<?=$fSitTra?>\" />\r\n <input type=\"hidden\" name=\"fFingresoD\" id=\"fFingresoD\" value=\"<?=$fFingresoD?>\" />\r\n <input type=\"hidden\" name=\"fFingresoH\" id=\"fFingresoH\" value=\"<?=$fFingresoH?>\" />\r\n <input type=\"hidden\" name=\"fBuscar\" id=\"fBuscar\" value=\"<?=$fBuscar?>\" />\r\n <input type=\"hidden\" name=\"fOrderBy\" id=\"fOrderBy\" value=\"<?=$fOrderBy?>\" />\r\n <?\r\n}", "title": "" }, { "docid": "864178dd872441522408d1787c80c949", "score": "0.5294305", "text": "function get_post($var) {\n return mysql_real_escape_string($_POST[$var]);\n}", "title": "" }, { "docid": "7e8e30372267501b015f687413c9743a", "score": "0.5293777", "text": "public function llenarInputCargo()\n\t\t\t {\n\t\t\t\t\t//la dependencia cargo dependencia\n\t\t\t \t$dependencia = $_POST[\"dependencia\"];\n\t\t\t \tif ($dependencia) \n\t\t\t \t{\n\t\t\t \t\t$informacion = $this->Modelo_recepcion->getInfoDependencias($dependencia);\n\n\t\t\t \t\tforeach ($informacion as $row)\n\t\t\t \t\t{\n\t\t\t \t\t\t$options=\"<input name='cargo' class='form-control' value='\".$row->cargo.\"' required>\"; \n\t\t\t \t\t\techo $options; \n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }", "title": "" }, { "docid": "15f8c6aa62cf38a9d169575d2805a498", "score": "0.52887726", "text": "function ObtenerValor($MySQL, $tabla, $indice, $campo, $id)\n{\n\t$Campos = explode(',',$campo);\n\tif (isset($id)) {\n\t\t$qry = sprintf(\"SELECT %s FROM %s WHERE %s = '%s'\", $campo, $tabla, $indice, $id);\n\t\t$rst = $MySQL->query($qry);\n\t\t$row = $rst->fetch_array();\n\t\t$Valor = \"\";\n\t\tfor ($i=0 ; $i<count($Campos); $i++) {\n\t\t\t$Valor.= ($i>0 ? \" \" : \"\").$row[trim($Campos[$i])]; \n\t\t}\n\t\t\n\t\treturn htmlspecialchars(utf8_encode($Valor)); \n\t\t$rst->free();\n\t} else {\n\t\treturn \"\";\n\t}\n}", "title": "" }, { "docid": "b00a68c680b41fe6f8fcef7ae9f19c1d", "score": "0.52869594", "text": "function sanitizeData() {\n global $connection;\n foreach ($_POST as $key => $value) {\n $sanitized[$key] = htmlspecialchars(mysqli_escape_string($connection, $value));\n }\n return $sanitized;\n }", "title": "" }, { "docid": "db4166321801f5a1579493c5f12bcc8e", "score": "0.52866954", "text": "function db_prepare_vars($value)\n{\n // Stripslashes\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n // Quote if not integer\n if (!is_numeric($value)) {\n $value = \"'\" . mysql_real_escape_string($value) . \"'\";\n }\n return $value;\n}", "title": "" }, { "docid": "437fc32762b26fc0025124de26974357", "score": "0.5271631", "text": "function mysql_prep( $valor ) {\r\n\t\t$magic_quotes_activo = get_magic_quotes_gpc();\r\n\t\t$nuevo_version_php = function_exists( \"mysql_real_escape_string\" ); // ej. PHP >= v4.3.0\r\n\t\tif( $nuevo_version_php ) { // PHP v4.3.0 o mayor\r\n\t\t\t// deshacer cualquier cambio de magic quote de manera que mysql_real_escape_string pueda hacer su funcion\r\n\t\t\tif( $magic_quotes_activo ) { $valor = stripslashes( $valor ); }\r\n\t\t\t$valor = mysql_real_escape_string( $valor );\r\n\t\t} else { // antes de PHP v4.3.0\r\n\t\t\t// si magic quotes no esta activo aun entonces agregar los slashes manualmente\r\n\t\t\tif( !$magic_quotes_activo ) { $valor = addslashes( $valor ); }\r\n\t\t\t// si magic quotes esta activo, entonces los slashes ya existen\r\n\t\t}\r\n\t\treturn $valor;\r\n\t}", "title": "" }, { "docid": "398c6bf5a4be13d5bc488d44dc74c44a", "score": "0.52699345", "text": "public function form_filled() {\r\n //then assign it the corresponding $key in properties\r\n foreach ($_REQUEST as $key => $value) {\r\n if (in_array($key, array_keys($this->properties)))\r\n //Sanitize user input!. No tags allowed, convert to html entities\r\n $this->$key = $this->sanitizeData($value, NULL, TRUE);\r\n //this must be a control field\r\n else\r\n $this->controlFields[$key] = $value;\r\n }\r\n }", "title": "" }, { "docid": "b9bfbd1a03226402a6488579ae734fae", "score": "0.52661365", "text": "function getInputValue($name){\n if(isset($_POST[$name])){\n echo $_POST[$name];\n }\n }", "title": "" }, { "docid": "b3d794b8e26d02c9f23326c27c38e056", "score": "0.52572596", "text": "function recuperaDados($tabela,$campo,$variavelCampo)\n{\n\t$con = bancoMysqli();\n\t$sql = \"SELECT * FROM $tabela WHERE \".$campo.\" = '$variavelCampo'\";\n\t$query = mysqli_query($con,$sql);\n\t$campo = mysqli_fetch_array($query);\n\treturn $campo;\n}", "title": "" }, { "docid": "3859cdab557acd788843d306a0cea66e", "score": "0.5255501", "text": "public function escaparQueryBDWeb($parametro){\n\t \n $conexion = $this->conexionWeb();\n \n $parametro = $conexion->real_escape_string($parametro);\n \n return $parametro;\n\t}", "title": "" }, { "docid": "892535b31e41d107e4fe2e7c25f10c60", "score": "0.5247856", "text": "function test_input($data) //this is to set the value porperly removing all the extra sapces and other things ... \n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "f1f2d7cd5c406d05ed551cc3625c0f61", "score": "0.52462757", "text": "private function tratarParametros() {\r\n\r\n\t $retorno = new stdClass();\r\n\r\n if (count($_POST) > 0) {\r\n foreach ($_POST as $key => $value) {\r\n\r\n if(is_array($value)) {\r\n foreach ($value as $chave => $valor) {\r\n $value[$chave] = trim($valor);\r\n }\r\n $retorno->$key = isset($_POST[$key]) ? $_POST[$key] : array();\r\n\r\n } else {\r\n $retorno->$key = isset($_POST[$key]) ? trim($value) : '';\r\n }\r\n }\r\n }\r\n\t\t\r\n return $retorno;\r\n }", "title": "" }, { "docid": "435ec2e424efe90e738b348d3aa465bf", "score": "0.5240514", "text": "public function loadQuery()\n {\n $this->filter = array();\n $this->filter['fieldName'] = isset($_POST['fField']) ? $_POST['fField'] : array();\n \n //adiciona um filtro vazio e visivel caso não haja nenhum\n if (count($this->filter['fieldName']) == 0) {\n $this->filter['fieldName'][0] = $this->field[0]['name'];\n $this->filter['operator'][0] = '';\n $this->filter['value'][0] = '';\n $this->filter['value2'][0] = '';\n $this->filter['visible'][0] = 'true';\n } else {\n $this->filter['operator'] = $_POST['fOperator'];\n $this->filter['value'] = $_POST['fValue'];\n $this->filter['value2'] = $_POST['fValue2'];\n $this->filter['visible'] = $_POST['fVisible'];\n }\n \n //conta filtros visíveis\n $this->countVisible = 0;\n for ($i = 0; $i < count($this->filter['visible']); $i++) {\n if ($this->filter['visible'][$i] != 'false' && $this->filter['visible'][$i] != false) {\n $this->countVisible++;\n }\n }\n \n //se não possui nenhum filtro visível adiciona\n if ($this->countVisible == 0) {\n $nextFilterIndex = count($this->filter['fieldName']);\n $this->filter['fieldName'][$nextFilterIndex] = $this->field[0]['name'];\n $this->filter['operator'][$nextFilterIndex] = '';\n $this->filter['value'][$nextFilterIndex] = '';\n $this->filter['value2'][$nextFilterIndex] = '';\n $this->filter['visible'][$nextFilterIndex] = true;\n }\n }", "title": "" }, { "docid": "9b0381f20c8c7103200c800b160e18ec", "score": "0.5239644", "text": "public function pesquisar($usuarioForm)\r\n\t {\r\n\r\n\t\t $sql = \" select codusuario, nome, usuario , senha from usuario \";\r\n\t\t $sql .= \" where 1 = 1 \";\r\n\t\t // Verificando criterios de selecao\r\n if ($usuarioForm->getCodusuario() != \"\"){\r\n\t\t\t$sql .= \" and codusuario in (\".$usuarioForm->getCodusuario().\") \";\r\n\t\t }\r\n\t\t if ($usuarioForm->getNome() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getNome().\"%') \";\r\n\t\t }\r\n\t\t\tif ($usuarioForm->getUsuario() != \"\"){\r\n\t\t\t$sql .= \" and usuario = '\".$usuarioForm->getUsuario().\"' \";\r\n\t\t }\r\n\t\t\tif ($usuarioForm->getSenha() != \"\"){\r\n\t\t\t$sql .= \" and senha = '\".$usuarioForm->getSenha().\"' \";\r\n\t\t }\r\n\t\t\t\r\n\t\t\tif ($usuarioForm->getCpf() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getCpf().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t\tif ($usuarioForm->getNomedamae() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getNomedamae().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t \tif ($usuarioForm->getNomedopai() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getNomedopai().\"%') \";\t \r\n\t\t\t} \t\t\t\t\r\n\t\t\t\tif ($usuarioForm->getEstado() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getEstado().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t\tif ($usuarioForm->getCidade() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getCidade().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t\tif ($usuarioForm->getBairro() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getBairro().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t\tif ($usuarioForm->getRua() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getRua().\"%') \";\t \r\n\t\t\t}\r\n\t\t\t\tif ($usuarioForm->getNdacasa() != \"\"){\r\n\t\t\t$sql .= \" and nome like upper('%\".$usuarioForm->getNdacasa().\"%') \";\t \r\n\t\t\t}\r\n\t\t $sql .= \" order by nome \";\r\n\t\t\t\r\n\t\t\treturn mysql_query(\"$sql\"); \r\n\r\n\t}", "title": "" }, { "docid": "0aa824b823447c8c48e17b293dc8be9e", "score": "0.52392447", "text": "private function campotext2()\n {\n\tif($this->subtipo == 1)\n\t {\n\t $sel_prot[$this->valores[0]['int']] = \" selected=\\\"selected\\\"\";\n\t $prot_arr = array(1 => \"http://\", \"https://\", \"ftp://\", \"gopher://\", \"mailto:\");\n\t //<option value=\\\"2\\\"{$sel_prot[2]}>https://</option><option value=\\\"3\\\"{$sel_prot[3]}>ftp://</option><option value=\\\"4\\\"{$sel_prot[4]}>gopher://</option><option value=\\\"5\\\"{$sel_prot[5]}>mailto:</option><!-- option value=\\\"6\\\">wais</option --></select>\n\t if($this->extra) eval('$prot = '.$this->extra.';');\n\t else $prot = array(1);\n\t $tot_prot = count($prot);\n\t if(!$tot_prot)\n\t {\n\t \t$prot = array(1);\n\t \t$tot_prot = 1;\n\t }\n\t if($tot_prot == 1)\n\t\t$prot_str = \"<input type=\\\"hidden\\\" name=\\\"prot[{$this->id}]\\\" value=\\\"{$prot_arr[current($prot)]}\\\" />\".$prot_arr[current($prot)];\n\t else\n\t {\n\t $prot_str = \"<select name=\\\"prot[{$this->id}]\\\">\";\n\t foreach($prot AS $prot_k => $prot_v) $prot_str .= \"<option value=\\\"${prot_k}\\\"{$sel_prot[$prot_k]}>${prot_arr[$prot_k]}</option>\";\n\t $prot_str .= \"</select>\";\n\t }\n\n\t $nombre_campo = $this->valores[0] ? \"[m][{$this->id}][{$this->valores[0]['id']}]\" : \"[n][{$this->id}][]\";\n\t return $this->label(0, $this->campo_id_pref.$this->indice).\"<td>{$prot_str} <input type=\\\"text\\\" name=\\\"{$this->campo_nombre_pref}{$nombre_campo}\\\" id=\\\"{$this->campo_id_pref}{$this->indice}\\\" value=\\\"\".htmlspecialchars($this->valores[0]['text']).\"\\\" size=\\\"45\\\" /> <a href=\\\"#\\\" target=\\\"_blank\\\" onclick=\\\"return abrirEnlace(this)\\\"><img src=\\\"/img/externo\\\" alt=\\\"Abrir enlace\\\" class=\\\"enlace_img\\\" /></a></td>\";// tabindex=\\\"2\\\"\n\t }\n\telse\n\t {\n\t $retorno = $this->label(1).\"<td><ul class=\\\"lista_idiomas\\\">\";\n\t $i = 1;\n\t $estilo = \" style=\\\"display:block;\\\"\";\n\t $seleccionado = \" seleccionado\";\n\t foreach($this->lenguajes AS $leng_id => $leng)\n\t {\n\t\t$nombre_campo = $this->valores[$leng_id] ? \"[m][{$this->id}][{$this->valores[$leng_id]['id']}]\" : \"[n][{$this->id}][${leng_id}][]\";\n\t\t$retorno .= \"<li><label id=\\\"p{$this->campo_id_pref}{$this->indice}_${i}\\\" for=\\\"{$this->campo_id_pref}{$this->indice}_${i}\\\" class=\\\"etiqueta_idioma${seleccionado}\\\" onclick=\\\"mostrarTxt('{$this->campo_id_pref}{$this->indice}_', ${i})\\\">{$leng[0]}</label><textarea name=\\\"{$this->campo_nombre_pref}{$nombre_campo}\\\" id=\\\"{$this->campo_id_pref}{$this->indice}_${i}\\\" class=\\\"areadetexto\\\" rows=\\\"20\\\" cols=\\\"55\\\"{$estilo} lang=\\\"{$leng[0]}\\\" xml:lang=\\\"{$leng[0]}\\\" dir=\\\"{$leng[1]}\\\">\".htmlspecialchars($this->valores[$leng_id]['text']).\"</textarea></li>\";\n\t\t$i++;\n\t\t$estilo = \" style=\\\"display:none;\\\"\";\n\t\t$seleccionado = \"\";\n\t }\n\t $retorno .= \"</ul>\n\t <script type=\\\"text/javascript\\\"> actual['{$this->campo_id_pref}{$this->indice}_'] = '{$this->campo_id_pref}{$this->indice}_1'; </script></td>\";// tabindex=\\\"2\\\"\n\t return $retorno;\n\t }\n\n\t//return $this->label(2).\"<td><textarea name=\\\"_{$this->campo_nombre_pref}{$this->v}\\\" id=\\\"{$this->campo_nombre_pref}{$this->indice}\\\" rows=\\\"20\\\" cols=\\\"55\\\">{$this->valor}</textarea></td>\";\n }", "title": "" }, { "docid": "bcc8fe3c0776ec541317323e1b0025d0", "score": "0.523788", "text": "public function getSubmitValue();", "title": "" }, { "docid": "b2557287ec848b040e77ae4b514f8421", "score": "0.523711", "text": "function form_val($name) {\n $form=&$this->form;\n if (! empty($form[$name])) {\n print $form[$name];\n }\n return(0);\n }", "title": "" }, { "docid": "b7de79ef6f1ab0e1fa23733f999ef3cb", "score": "0.5234621", "text": "public function escaparQueryBDAdmin($parametro){\n\t \n $conexion = $this->conexionAdmin();\n \n $parametro = $conexion->real_escape_string($parametro);\n \n return $parametro;\n\t}", "title": "" }, { "docid": "b40344cb8bb06ecd8e1c33355b079160", "score": "0.5234593", "text": "abstract function getForm();", "title": "" }, { "docid": "3b267623e415eb15b953d357f6d44526", "score": "0.5206529", "text": "function campoT($campo = \"\",$titulo = \"\",$valor=\"\",$requerido=false,$type=\"text\") {\n\t\t?>\n <div data-role=\"fieldcontain\"><label for=\"<?php echo $campo;?>\" class=\"ui-hidden-accessible\"><?php echo $titulo;?>:</label>\n             <input type=\"<?=$type?>\" name=\"<?php echo $campo;?>\" id=\"<?php echo $campo;?>\" value=\"<?php echo ($valor==\"\" ? \"\" : $valor)?>\" placeholder=\"<?php echo $titulo;?>\" data-theme=\"a\" <?php echo ($requerido ? \"required\" : \"\")?> class=\"form-control\" > \n </div>\n <?php\n\t}", "title": "" }, { "docid": "2042fa697fdc9908444616f099da3ca6", "score": "0.51963747", "text": "function input($id){\n $value = isset($_POST[$id]) ? $_POST[$id] : '';\n return \"<input type='text' class='form-control' id='$id' name='$id'\n value='$value'>\";\n}", "title": "" }, { "docid": "0b67748aee4c1e873a5828442a80fd62", "score": "0.5191733", "text": "function inputdatacuadro($val, $id, $data){\n $input='<input id=\"'.$id.'\" type=\"text\" data-idnota='.$data.' value=\"'.$val.'\" class=\" form-control datagrid\" />';\n return $input;\n}", "title": "" }, { "docid": "d6fb907b9675f285a887d6aeb1c9279b", "score": "0.5191618", "text": "function quoteHandler($postField) {\n ($_POST[$postField]==\"\" ? $myString='null' : $myString=\"'\".$_POST[$postField].\"'\");\n return $myString;\n}", "title": "" }, { "docid": "2eb5b4f8abe3db2c45e56ab5ce1b0a5b", "score": "0.518764", "text": "function validdValHelper(){\n\t// This is used to prevent from having an extensive set of if conditions in index.php\n\treturn (isset($_POST['pd']) && isset($_POST['qd']) && !empty($_POST['pd']) && !empty($_POST['qd']) && !empty($_POST['ed']) && !empty($_POST['ed']) && !empty($_POST['dVal']) && !empty($_POST['dVal']) );\n}", "title": "" }, { "docid": "d534ac452bc6869b92b8d9203a4454a7", "score": "0.5182247", "text": "protected function readFormParameters() {\n\t\tif (isset($_POST['avatarType'])) $this->avatarType = $_POST['avatarType'];\n\t\tif (!empty($_POST['disableAvatar'])) $this->disableAvatar = 1;\n\t\tif (isset($_POST['disableAvatarReason'])) $this->disableAvatarReason = StringUtil::trim($_POST['disableAvatarReason']);\n\t}", "title": "" }, { "docid": "9e2336c5975a4a4b63201a0a438d270a", "score": "0.5170986", "text": "function sql_crear_insert($post)\n{\n\n array_pop($post); // elimino el ultimo valor del array post , busco eliminar el valor del boton\n $password='password'; //como se llama el name input password\n $values = \"\"; \n $into = \"\";\n\n $sizeArray = count($post);\n $i = 0;\n //separo el post en su name y el valor\n foreach ($post as $campo => $valor) \n {\n if ($i == ($sizeArray)){break;} // aca pregunto si llegue al final del post, de ser asi SALGO sin hacer nada\n else\n {\n if ($i != 0) // aca consulto si NO es el primer valor del post, de ser asi agrego la coma\n {\n $values .=\",\";\n $into .=\",\";\n }\n }\n $i ++;\n if ($campo == $password){$valor = sha1($valor);} // aqui encripto en caso de que el campo osea el name del form es lo cargado arriba como password\n // cuando todo lo anterior alla sido filtrado voy creando las variables\n $values .= \"'\".$valor.\"'\";\n $into .= \"\".$campo.\"\";\n }\n return \"(\".$into.\") VALUES (\".$values.\");\"; // devuelvo el insert solo le falta la primer parte\n}", "title": "" }, { "docid": "aa06ecbbf6b03742d42ca22bdbf73d44", "score": "0.51688135", "text": "function affichetousvalidationom(){\r\n $bdd=bdd();\r\n if (isset($_POST[\"numpassp\"])) {\r\n $numpass=$_POST['numpas'];\r\n $connexion = $bdd->prepare(\"SELECT * FROM validationomra WHERE numpass LIKE '%$numpass%'\");\r\n $connexion->execute();\r\n \r\n \r\n $affichepers = $connexion->fetchAll(PDO::FETCH_OBJ);\r\n return $affichepers;\r\n \r\n }else{\r\n \r\n $connexion = $bdd->prepare(\"SELECT * FROM validationomra ORDER BY dated DESC \");\r\n $connexion->execute();\r\n $affichepers = $connexion->fetchAll(PDO::FETCH_OBJ);\r\n return $affichepers;\r\n }\r\n}", "title": "" }, { "docid": "769080f516d0884887fab33551ffd2fa", "score": "0.516448", "text": "function test_user_input($data) {\n\tGLOBAL $conn;\n\t$data = trim($data);\n\t$data= stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "title": "" }, { "docid": "7d611b16eb231e9ae027538d42418152", "score": "0.51644003", "text": "function form_hidden($name, $value) {\n return '<input type=\"hidden\" name=\"edit['. $name .']\" value=\"'. check_plain($value) .\"\\\" />\\n\";\n}", "title": "" }, { "docid": "7ba3b75d09a3cb81f41866132c9858d6", "score": "0.51572394", "text": "function get_parameter($param)\n{\n if (isset($_POST[$param])) {\n //if the phone field exists the value will always be returned\n if ($param === 'phone') {\n return $_POST[$param];\n }\n // if these fields exist they MUST have input (ie can't be empty)\n if (!empty($_POST[$param])) {\n return $_POST[$param];\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f911bf36de595f3963e799c5f0082c46", "score": "0.5156832", "text": "public function escapar( $valor ) {\n return mysqli_real_escape_string($this->con,$valor);\n }", "title": "" }, { "docid": "8a962ec6c750b710584f66e89796a08e", "score": "0.51493406", "text": "function line_form($value_description, $maxlength, $value, $value_orig) {\necho \"<td>$value_description &nbsp;</td>\n\t\t<td align=\\\"right\\\"><input type=\\\"text\\\" class=\\\"form_input\\\" name=\\\"$value\\\" value=\\\"$value_orig\\\" maxlength=\\\"$maxlength\\\"></td>\";\n}", "title": "" }, { "docid": "c6730c44839788cff3faf42535ce46f2", "score": "0.5149211", "text": "function makeField($field_name,$values)\n{\n\t\n\tif($field_name==\"password\" or $field_name==\"password_confirmation\")\n\t{\n\t\techo\"<INPUT TYPE='PASSWORD' NAME='$field_name' VALUE='$values' CLASS='input'>\";\n\t}\n\telse if($field_name==\"sex\")\n\t{\n\t\tinput_list(\"sex\",\"m,f\",0,$values,\"CLASS=input\");\n\t}\n\telse if($field_name==\"user_group\")\n\t{\n\t\t?>\n\t\t<SELECT NAME=\"user_group\" STYLE=\"FONT-SIZE:10;\">\t\n\t\t<?php\n\t\t$db = new db;\n\t\t$db->connect();\n\t\t$db->query(\"SELECT groups.name,subgroups.sub_name,subgroups.ID,subgroups.group_ID FROM groups,subgroups WHERE groups.ID=subgroups.group_ID ORDER by groups.name ASC\");\n\t\twhile($db->getRows())\n\t\t\t{ \n\t\t\t$name=$db->row(\"name\");\n\t\t\t$subname=$db->row(\"sub_name\");\n\t\t\t$subID=$db->row(\"ID\");\t\n\t\t\t$group_ID=$db->row(\"group_ID\");\n\t\t\t\n\t\t\t$select_test=$group_ID.\"_\".$subID;\n\t\t\t\n\t\t\tif($select_test==$values)\n\t\t\t{\n\t\t\t\t$ms=\"SELECTED\";\n\t\t\t}\n\t\t\t?>\n\t\t\t<OPTION VALUE=\"<?php echo $group_ID.\"_\".$subID;?>\" <?php echo $ms;?>><?php echo \"$name: $subname\";?></OPTION>\n\t\t\t<?php\t\n\t\t\t$ms=\"\"; \n\t\t\t}\t\n\t\t?>\n\t\t</SELECT>\t \n\t\t<?php \n\t}\n\telse\n\t{\n\t\techo\"<INPUT TYPE='TEXT' NAME='$field_name' VALUE='$values' CLASS='input'>\";\n\t}\n}", "title": "" }, { "docid": "bffe04caca3985982db70610744fcbc6", "score": "0.514816", "text": "private function consulta() {\r\n $campos = implode(', ', array_keys($this->dados));\r\n $valorInserido = ':'. implode(', :', array_keys($this->dados));\r\n $this->objInsercao = \"INSERT INTO {$this->tabela} ({$campos}) VALUES ({$valorInserido})\";\r\n }", "title": "" }, { "docid": "b0799193dd22d6dd3e09ba7b586e626f", "score": "0.51474637", "text": "protected function _getFormValues()\n {\n return null;\n }", "title": "" }, { "docid": "a0cbc192a202e0346f0dd163cf5b7926", "score": "0.5143697", "text": "function criaformEdicao($idDepartamento) {\n //ir no banco e buscar o registro completamente \n global $con;\n\n $qry_limitada = mysql_query('SELECT * from departamentos WHERE id=' . $idDepartamento);\n $linha = mysql_fetch_assoc($qry_limitada);\n //var_dump($linha);\n ?>\n <form name=\"formeditar\" id=\"formeditar\" action=\"cad_dep.php\" \n method=\"POST\" style=\"background-color: green\">\n <input type=\"hidden\" name=\"acao_post\" id=\"acao_post\" value=\"editar\" />\n Id: <?php echo $idDepartamento; ?><input type=\"hidden\" id=\"id\" name=\"id\" value=\"<?php echo $idDepartamento; ?>\" /><br>\n Descrição:<input type=\"text\" id=\"descricao\" name=\"descricao\" value=\"<?php echo $linha['descricao'] ?>\" /><br>\n <input type=\"submit\" value=\"Atualizar\" name=\"btnatualizar\" />\n </form> \n <?php\n}", "title": "" }, { "docid": "77dcaf2dd6232d4fbe8368c024813bc5", "score": "0.5138561", "text": "function insert_links() {\n global $connection;\n if (isset($_POST['submit'])) {\n $link_name = $_POST['link_name'];\n if($link_name == \"\" || empty($link_name)) {\n echo \"this filed shouldn't be empty\";\n }\n else {\n $query = \"INSERT INTO links (link_name)\";\n $query .= \"VALUE('{$link_name}')\";\n $create_link_query = mysqli_query($connection, $query);\n if(!$create_link_query) {\n die('Query Failed'. mysqli_error($connection));\n }\n }\n }\n}", "title": "" }, { "docid": "b64bfa6b0ad1e6b9f8a3ce138f10abbc", "score": "0.51344323", "text": "function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}", "title": "" }, { "docid": "b64bfa6b0ad1e6b9f8a3ce138f10abbc", "score": "0.51344323", "text": "function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}", "title": "" }, { "docid": "4648d9318c4cd007a11e4324bcbdf617", "score": "0.5131346", "text": "public function core_get_form_inputs($data = false){}", "title": "" }, { "docid": "44f9699a6b5f0ce3190f4ce89825aff7", "score": "0.5121863", "text": "function validate($data) { // Input fields validator to avoid XSS and SQL Injection\n $data = trim($data); // remove extra white space(s)\n $data = stripslashes($data); // remove forward and back slashes\n $data = htmlspecialchars($data); // remove special characters\n return $data;\n }", "title": "" }, { "docid": "465edff520fbc11b9b727a25156e07f8", "score": "0.51217514", "text": "function camposBD(){\n\t\t$fields = array();\n\t\t$fields[] = 'id_quincenas';\t\n\t\t$fields[] = 'empleado';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'desde';\t\n\t\t$fields[] = 'hasta';\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "ed8ae392a23632af7ed89fda35569d6e", "score": "0.5116834", "text": "public function prepareForm() {\n\n }", "title": "" }, { "docid": "86d871d3919bd5f711ecae532e7118f9", "score": "0.51155555", "text": "function get_data_form()\n\t{\n\t\t// Valores POST\n\t\t$dni = $_POST['dni'];\n\t\t$nombre = $_POST['nombre'];\n\t\t$apellidos = $_POST['apellidos'];\n\t\t$area = $_POST['area'];\n\t\t$departamento = $_POST['departamento'];\n\t\t$action = $_POST['action'];\n\t\t\n\t\t// Creación de la instancia PROFESOR\n\t\t$profesor = new PROFESOR_Model($dni,$nombre,$apellidos,$area,$departamento);\n\t\treturn $profesor;\n\t}", "title": "" }, { "docid": "d4d7f1bc67d542634ad82c4c29107775", "score": "0.511543", "text": "function affichetousvalidation(){\r\n $bdd=bdd();\r\n if (isset($_POST[\"numpassp\"])) {\r\n $numpass=$_POST['numpas'];\r\n $connexion = $bdd->prepare(\"SELECT * FROM validatio WHERE numpass LIKE '%$numpass%'\");\r\n $connexion->execute();\r\n \r\n \r\n $afficheper = $connexion->fetchAll(PDO::FETCH_OBJ);\r\n return $afficheper;\r\n \r\n }else{\r\n \r\n $connexion = $bdd->prepare(\"SELECT * FROM validatio ORDER BY dated DESC \");\r\n $connexion->execute();\r\n $afficheper = $connexion->fetchAll(PDO::FETCH_OBJ);\r\n return $afficheper;\r\n }\r\n}", "title": "" }, { "docid": "ff99b4eeed226bfcf32e6e8a22489fd0", "score": "0.51148474", "text": "function getInputValue($name){\n if(isset($_POST[$name])){\n echo $_POST[$name];\n }\n}", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.5112888", "text": "public function getParameter();", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.5112888", "text": "public function getParameter();", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.5112888", "text": "public function getParameter();", "title": "" } ]
74572b55c4ab2c3e16899436df055bc9
Bootstrap the application events.
[ { "docid": "75ce2bf5926ed542189891ad4c0afedf", "score": "0.0", "text": "public function boot()\n {\n // Handle config file\n // -- -- Get path\n $config_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';\n // -- -- Merge from config\n $this->mergeConfigFrom($config_file, 'potion');\n // -- -- Tell laravel that we publish this file\n $this->publishes([\n $config_file => config_path('potion.php')\n ], 'config');\n\n // Register blade extensions\n $this->registerBladeExtensions();\n\n }", "title": "" } ]
[ { "docid": "ff04231b2933f0fbf81a64bbc0cfaf9e", "score": "0.76113707", "text": "public function boot()\n {\n $this->bootstrap();\n }", "title": "" }, { "docid": "48c9ecac19c99bbf927aa1c3ab7d166e", "score": "0.7549851", "text": "public function boot()\n {\n parent::boot();\n\n if (config('app.debug', false)) {\n // app events depend on the eloquent trigger\n Event::listen('eloquent.*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'app');\n });\n\n // layout init events\n Event::listen('creating:*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'lay');\n });\n\n // layout compose events\n Event::listen('composing:*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'lay');\n });\n\n // all events tracking trail\n Event::listen([\n '*.*',\n 'creating:*',\n 'composing:*',\n 'bootstrapped:*'\n ], function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'event');\n });\n }\n }", "title": "" }, { "docid": "eec3ef7d9ea42e1cb16ccfa7da57630a", "score": "0.7464432", "text": "protected static function boot() {\n\t\tself::scanEvents();\n\t}", "title": "" }, { "docid": "9ab8abef57c63da6811d8775ed3a2d9a", "score": "0.73869884", "text": "public function boot()\n\t{\n\t\t$this->setupConfig();\n\t}", "title": "" }, { "docid": "9ab8abef57c63da6811d8775ed3a2d9a", "score": "0.73869884", "text": "public function boot()\n\t{\n\t\t$this->setupConfig();\n\t}", "title": "" }, { "docid": "f1d5e24b0f5658b649b6ba2fc80055e2", "score": "0.7364217", "text": "public function boot()\n {\n //\n //Registramos el paginador de bootstrap\n\n Paginator::useBootstrap();\n\n Route::resourceVerbs([\n 'create' => 'crear',\n 'edit' => 'editar',\n ]);\n\n Blog::observe(BlogObserver::class);\n Rutina::observe(RutinaObserver::class);\n Receta::observe(RecetaObserver::class);\n }", "title": "" }, { "docid": "e987272f2961d33b0bd9cff09ec3d66e", "score": "0.73628885", "text": "public function boot()\n {\n $events = app('events');\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "c0838f4af4913d9d46257543c79adc33", "score": "0.7346263", "text": "public function boot()\n\t{\n\t\t$this->publishAssets();\n\t}", "title": "" }, { "docid": "a7bdc4e7bc2d3258251db480d93ffd5a", "score": "0.7336124", "text": "public function bootEvents()\n {\n $events = app('events');\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n\n foreach ($this->subscribe as $subscriber) {\n $events->subscribe($subscriber);\n }\n }", "title": "" }, { "docid": "514fb6ea513dc41c837daccc329441d9", "score": "0.73350286", "text": "public function boot()\n {\n Book::observe(BookObserver::class);\n Series::observe(SeriesObserver::class);\n Periodic::observe(PeriodicObserver::class);\n Quote::observe(QuoteObserver::class);\n Amel::observe(AmelObserver::class);\n Publication::observe(PublicationObserver::class);\n Cover::observe(CoverObserver::class);\n File::observe(FileObserver::class);\n Image::observe(ImageObserver::class);\n \n view()->composer('*', HomeComposer::class);\n }", "title": "" }, { "docid": "3750fe37ff7428ebea4b0c91afc61a46", "score": "0.7328201", "text": "public function boot()\n\t{\n\t\tModel::setConnectionResolver($this->app['db']);\n\n\t\tModel::setEventDispatcher($this->app['events']);\n\t}", "title": "" }, { "docid": "10fc560c6f73e418a2fc2d6af7776daf", "score": "0.7325498", "text": "public function boot()\n\t{\n\t\t$this->package('lavary/laravel-menu');\n\n\t\t// Extending Blade engine\n\t\trequire_once('Extensions/BladeExtension.php');\n\t}", "title": "" }, { "docid": "e4f6e64f4542f60ba7fe309ba6d306f2", "score": "0.72931767", "text": "public function boot(): void\n {\n \n // Register configs, migrations, etc\n $this->registerDirectories();\n\n // COloquei no register pq nao tava reconhecendo as rotas para o adminlte\n $this->app->booted(function () {\n $this->routes();\n });\n\n //\n $this->app['events']->listen(\n 'eloquent.*',\n 'Gamer\\Observers\\ModelCallbacks'\n );\n $this->app['events']->listen(\n 'Illuminate\\Auth\\Events\\Login',\n 'Gamer\\Observers\\LoginObserver'\n );\n }", "title": "" }, { "docid": "4b7d22b5295d145cc398723ba3f99057", "score": "0.7286213", "text": "public function boot()\n {\n $this->setMenu();\n\n $this->setRoutes();\n\n $this->setRouterBind();\n\n $this->loadViews();\n\n $this->publish();\n }", "title": "" }, { "docid": "245683b1e161b274044a4ce2ca221ce6", "score": "0.7283052", "text": "public function boot()\n\t{\n\t\t$this->setUpConfig();\n\t}", "title": "" }, { "docid": "080ce7684ce02641487dfa7e6774cfa4", "score": "0.72732466", "text": "public function boot()\n {\n // Bootstrap handles\n $this->routeHandle();\n $this->configHandle();\n $this->langHandle();\n $this->viewHandle();\n $this->migrationHandle();\n }", "title": "" }, { "docid": "93a51613b3376bb70b51a46975761c05", "score": "0.72678834", "text": "public function boot()\n\t{\n\t\t$this->package('gufy/bootstrap');\n\t}", "title": "" }, { "docid": "71767107481dacd6ab90f645d4a6b451", "score": "0.7257221", "text": "public function boot()\n\t\t{\t\t\n\t\t\t\t/**\n\t\t\t\t* Verifica se a aplicaçao esta rodando em modo console (para rodar as seeds), \n\t\t\t\t* para evitar executar os eventos\n\t\t\t\t*/\n\t\t\t\tif ( app()->runningInConsole() ) {\n\t\t return;\n\t\t }\n\n\t\t\t\tProjectTask::created( function ( $task ) {\n\t\t\t\t\t\tEvent::fire( new TaskWasIncluded( $task ) );\n\t\t\t\t} );\n\n\t\t\t\tProjectTask::updated( function ( $task ) {\n\t\t\t\t\t\tEvent::fire( new TaskWasIncluded( $task ) );\n\t\t\t\t} );\n\t\t}", "title": "" }, { "docid": "5a3dbbc205b7f37070b65a94e75bf762", "score": "0.72513974", "text": "public function boot()\n {\n Events::observe(EventsObserver::class);\n EventTypes::observe(EventTypesObserver::class);\n Flows::observe(FlowsObserver::class);\n Templates::observe(TemplatesObserver::class);\n Customers::observe(CustomersObserver::class);\n Companies::observe(CompaniesObserver::class);\n Lists::observe(ListsObserver::class);\n User::observe(UserObserver::class);\n }", "title": "" }, { "docid": "ca2d77c3fe688ee595f8c5fc6340b713", "score": "0.72503054", "text": "public function boot()\n {\n // Bootstrap handles\n $this->routeHandle();\n $this->configHandle();\n $this->langHandle();\n $this->viewHandle();\n $this->assetHandle();\n $this->migrationHandle();\n }", "title": "" }, { "docid": "ee82826308d96221af9c1a98c0a04263", "score": "0.72381896", "text": "public function boot()\n {\n Reader::observe(ReaderObserver::class);\n Book::observe(BookObserver::class);\n }", "title": "" }, { "docid": "3131c579ef9ce15d43b6adb631938a1d", "score": "0.7233455", "text": "public function boot()\n {\n //\n $this->handleConfigs();\n }", "title": "" }, { "docid": "259479e5c486e4ffe78422cdd0c88e15", "score": "0.72225827", "text": "public function boot()\n {\n $this->registerDatabaseMacros();\n $this->addModuleEventListeners();\n }", "title": "" }, { "docid": "81ebd87d273d8bfb0516ea9bf5a07779", "score": "0.72160554", "text": "public function boot()\n {\n // podriamos utilizar una plantilla personalizada para el admin solamente si lo deseamos y no la de boostrap\n if (Request::segment(1) != 'admin'){\n LengthAwarePaginator::defaultView('partials/default-pagination');\n }\n\n // registramos las consutlas SQL que vamos a ejecutar\n DB::listen(function ($query){\n Log::info([\n 'sql' => $query->sql,\n 'bindings' => $query->bindings\n ]);\n });\n }", "title": "" }, { "docid": "ca74a1653692f22944dc45e042dd75b6", "score": "0.7211266", "text": "public function boot()\n {\n \tinclude(app_path('Lib'.DIRECTORY_SEPARATOR.'htmlMacro.php'));\n \t\n \t//include(app_path('Lib'.DIRECTORY_SEPARATOR.'Menu.php'));\n }", "title": "" }, { "docid": "341ff5d1957fa0580dd16c79b75d13c1", "score": "0.72107595", "text": "public function boot()\n { \n $this->app->booted(function($app) {\n \\Event::listen(OrderCompleted::class, Listeners\\OrderCompleted::class); \n\n $component = $app['site']->get('easy-license')->components()->first(function($component) {\n return $component->name() == 'checkout';\n });\n\n $component->config([\n 'layout' => 'phoenix'\n ]); \n \n \n $component = $app['site']->get('easy-license')->components()->first(function($component) {\n return $component->name() == 'credit';\n });\n\n $component->config([\n 'layout' => 'mdarman-license-order'\n ]);\n }); \n }", "title": "" }, { "docid": "31441a5a8404dcc13488f7e3eb774416", "score": "0.7210672", "text": "public function boot()\n {\n $this->views();\n $this->seeds();\n }", "title": "" }, { "docid": "6c2d7d6ff310dee83adbfbed3098628d", "score": "0.72051656", "text": "public function boot()\r\n {\r\n $this->setupConfig();\r\n }", "title": "" }, { "docid": "bd16e8c86d9a07f8df3a045334f2531b", "score": "0.7204072", "text": "public function boot()\n {\n $this->bootPublishes();\n $this->bootMiddlewares();\n $this->bootEventSubscriber();\n $this->bootLocale();\n }", "title": "" }, { "docid": "cd4f25cac403b8d563cdfd7447e51df7", "score": "0.72031605", "text": "public function boot()\n {\n Preorder::observe(PreorderObserver::class);\n }", "title": "" }, { "docid": "06fd772062a8ccdc2ea9919b5a43775c", "score": "0.72012585", "text": "public function boot()\n {\n $this->handleConfig();\n }", "title": "" }, { "docid": "c0edff57b901df99a2d3f8910559b27f", "score": "0.72001904", "text": "protected static function boot()\n {\n }", "title": "" }, { "docid": "099912c8eabd3e08fea553ce09a634b6", "score": "0.7197235", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n app('events')->listen(GuruEvent::class, GuruDispatcher::class);\n }", "title": "" }, { "docid": "23d6426d5ec81d4625491b0de5db1652", "score": "0.7196416", "text": "public function boot()\n {\n $this->handleRoutes();\n $this->handleViews();\n $this->handleCommands();\n\n \\AdminMenu::add('logviewer::partials.logviewer_menu', [], 10);\n }", "title": "" }, { "docid": "3f9a6dc972f3c390a78e569dde7b8620", "score": "0.71944445", "text": "protected function boot()\n {\n $this->configure();\n }", "title": "" }, { "docid": "3f9a6dc972f3c390a78e569dde7b8620", "score": "0.71944445", "text": "protected function boot()\n {\n $this->configure();\n }", "title": "" }, { "docid": "a347e593cc8b765b8d81091d7d0a63d6", "score": "0.71888435", "text": "public function boot()\n {\n // Teak default settings (PHP, Laravel, etc.)\n $this->changeDefaultSettings();\n\n // Add custom validation rules\n // @deprecated\n $this->addCustomValidationRules();\n\n // Just finish if the application is not set up\n if (!isInitiated()) {\n return;\n }\n\n // Load application's plugins\n // Disabled plugin may also register hooks\n $this->loadPlugins();\n }", "title": "" }, { "docid": "981617449861fb2f3411f213566c8638", "score": "0.7187403", "text": "public function boot()\n\t{\n\t\t$this->package('bonweb/laraffiliate');\n include_once __DIR__ . '/../../util/helpers.php';\n include_once __DIR__.'/../../events.php';\n include_once __DIR__.'/../../filters.php';\n include_once __DIR__.'/../../routes.php';\n $this->setConnection();\n\t}", "title": "" }, { "docid": "52b0a0928a6133632f85f0e111b975c3", "score": "0.718428", "text": "public function boot()\n {\n $this->loadViewsFrom(EASEL_BASE_PATH.'/resources/views', 'easel');\n // Load language files\n $this->loadTranslationsFrom(EASEL_BASE_PATH.'/resources/lang', 'easel');\n\n $this->defineRoutes();\n\n if ($this->app->runningInConsole()) {\n $this->defineResources();\n $this->defineMigrations();\n }\n }", "title": "" }, { "docid": "e45ad32d72acf20e4d2e8f2e265bcf64", "score": "0.7183561", "text": "public function bootstrap()\n\t{\n\t\t$this->fireBootingCallbacks();\n\t\t\n\t\trequire config('ghost.bootstrap', app_path('Http/Lib/bootstrap.php'));\n\t\t\n//\t\t$this->addAdminAssets();\n\t\t\n\t\t$this->fireBootedCallbacks();\n\t}", "title": "" }, { "docid": "bc5b51dad7eaea2d5d453f32fda75aa3", "score": "0.71832985", "text": "public function boot()\n {\n $this->listen();\n $this->subscribe();\n $this->logger();\n }", "title": "" }, { "docid": "bbd90bd8dbd678dd668e7511866f8ac7", "score": "0.7182013", "text": "public function boot()\n {\n (new SidebarMenuBuilder())->createStructure();\n }", "title": "" }, { "docid": "864015f4d0ea8d1ab130d85befe9fe59", "score": "0.71814126", "text": "public function boot()\n\t{\n\t\tif(class_exists('\\DealerLive\\Core\\Classes\\Package'))\n\t\t\t\\Event::fire('core.packages', array(new \\DealerLive\\Core\\Classes\\Package('Action Log', 'Vicimus/ActionLog')));\n\n\t\t$this->package('vicimus/actionlog');\n\n\t\tif(defined('\\ACTIONLOG_ROUTE_PREFIX'))\n\t\t\tActionLog::$route = \\ACTIONLOG_ROUTE_PREFIX.ActionLog::$route;\n\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t\\Event::listen('ActionLog.Log', function(){\n\t\t\tActionLog::Log();\n\t\t});\n\t}", "title": "" }, { "docid": "edb32c8f5e14a64c9d47f71d954625d6", "score": "0.7178454", "text": "public function boot()\n {\n \t//\n }", "title": "" }, { "docid": "31c6a16b3af736433af0c605bf21d7b5", "score": "0.7178017", "text": "public function boot()\n {\n $this->listenMenuModelEvents();\n }", "title": "" }, { "docid": "de2c50d3c73eac1536439b049bdab3d8", "score": "0.71774447", "text": "public function boot()\n {\n $this->modelEvents();\n }", "title": "" }, { "docid": "cd34040e22b2e81d0802f6edc915f71a", "score": "0.7171418", "text": "public function boot()\n {\n // Observers\n User::observe(UserObserver::class);\n AndroidApp::observe(AndroidAppObserver::class);\n Group::observe(GroupObserver::class);\n\n // Component aliases\n Blade::component('components.button', 'button');\n Blade::component('components.linkbutton', 'linkbutton');\n Blade::component('components.card', 'card');\n Blade::component('components.textfield', 'textfield');\n }", "title": "" }, { "docid": "0cc9f0bf98a036c5ebd0b64dbb8473e4", "score": "0.7169815", "text": "public function boot()\n {\n parent::boot();\n\n $modules = config('bifrost.modules', []);\n foreach ($modules as $moduleName => $moduleConfig)\n {\n $subscribers = data_get($moduleConfig, 'eventSubscribers', []);\n foreach ($subscribers as $subscriber) {\n Event::subscribe($subscriber);\n }\n }\n }", "title": "" }, { "docid": "65457bc889f1f80088a846b642414418", "score": "0.7169658", "text": "public function boot()\n\t{\n\t\t// \n\t}", "title": "" }, { "docid": "f08f312dc5a903afc76dabeac0023fb6", "score": "0.71649903", "text": "public function boot()\n {\n Home::observe(HomeObserver::class);\n Stock::observe(StockObserver::class);\n }", "title": "" }, { "docid": "719b032c6c9d4d19412265d9271b3c07", "score": "0.7162567", "text": "public static function boot()\n {\n\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162073", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.71609575", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.71609575", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "cd4e585f829a606dab0dc95bb62bc30c", "score": "0.7157336", "text": "public static function boot()\n {\n parent::boot();\n Software::observe(new \\App\\Observers\\UserActionsObserver);\n }", "title": "" }, { "docid": "eee0d3ea451c6479acb85a8eccfdeeed", "score": "0.7156325", "text": "private function bootEvents(): void\n {\n $dispatcher = $this->app[Dispatcher::class];\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $dispatcher->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "fbe555f1771bcbb95d2a8523fb03921b", "score": "0.7149375", "text": "public function boot()\n {\n\t\t//\n }", "title": "" }, { "docid": "0f69ac59f179aaa586ba53ed78d3c21c", "score": "0.7142746", "text": "public function boot(): void\n {\n Brand::observe(BrandObserver::class);\n User::observe(UserObserver::class);\n Style::observe(StyleObserver::class);\n }", "title": "" }, { "docid": "c5b79a3f53ca9923e22f29d34363a43d", "score": "0.71410066", "text": "public function boot()\n {\n $this->setupConfig();\n\n }", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7140645", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "6e1119b01b0635f9ebd70f87a38978b4", "score": "0.71400636", "text": "public function boot()\n {\n // コンポーネントのエイリアス設定\n Blade::component('component.aside', 'aside');\n Blade::component('component.main', 'main');\n Blade::component('component.message', 'message');\n Blade::component('component.letters-area-parts', 'lettersareaparts');\n Blade::component('component.section-title', 'sectiontitle');\n Blade::component('component.common-btn', 'commonbtn');\n Blade::component('component.syouhin-parts', 'syouhincontainer');\n }", "title": "" }, { "docid": "22a9a58b3eb0075249c964bf9dedab14", "score": "0.71372837", "text": "public function boot()\n\t{\n\t //\n\t}", "title": "" }, { "docid": "50f83b2140f607f3a18711c419345db9", "score": "0.7135899", "text": "public function boot()\n {\n $menu = Menu::make('main', function($menu) {\n $menu->add(trans('navbar.home'), array('route' => 'home'));\n $menu->add(trans('navbar.articles'), array('route' => 'article.index'));\n $menu->add(trans('navbar.post'), array('route' => 'article.create'));\n $menu->add('Donate', array('route' => 'donate'));\n $menu->add('Login w/ GitHub', array('url' => 'auth/github'));\n });\n }", "title": "" }, { "docid": "3ddf34a77c79dde184a597e372e60ba1", "score": "0.7135027", "text": "public function boot()\n\t{\n\t\t// Publish the config file\n\t\t$this->publishConfig();\n\n\t\t// Hook into the mailer\n\t\t$this->registerSwiftPlugin();\n\t}", "title": "" }, { "docid": "955b309ea7d8481176f1449bee82d641", "score": "0.7130912", "text": "public function boot()\n {\n $this->setMenu();\n\n $this->setRoutes();\n\n $this->loadViews();\n\n $this->loadMigrations();\n\n $this->publish();\n }", "title": "" }, { "docid": "955b309ea7d8481176f1449bee82d641", "score": "0.7130912", "text": "public function boot()\n {\n $this->setMenu();\n\n $this->setRoutes();\n\n $this->loadViews();\n\n $this->loadMigrations();\n\n $this->publish();\n }", "title": "" }, { "docid": "9cbda2574793559f4fc60520a28e076d", "score": "0.7129324", "text": "public function boot()\n {\n $this->app['events']->listen(\n 'PlayerScore.award',\n 'Fatpixel\\Scoreboard\\Handlers\\PlayerScoreEventHandler@handleAward'\n );\n }", "title": "" }, { "docid": "b93fe2edc197d57c01caee350f9dc22e", "score": "0.7128977", "text": "protected static function boot()\n\t{\n\t\tparent::boot();\n\t}", "title": "" }, { "docid": "67f6c700ca3cd599f16734912b372155", "score": "0.71238303", "text": "protected function boot(){\n }", "title": "" }, { "docid": "8afa452f3a901f32ca05f03275922f5a", "score": "0.7123176", "text": "public function boot()\n {\n Model::setConnectionResolver($this->app['db']);\n Model::setEventDispatcher($this->app['events']);\n }", "title": "" } ]
78f7f3464b711fd5619b95d6382f618e
brings in a variable that is in the global scope,
[ { "docid": "a6dcfe94f987a285b7cee73173df401a", "score": "0.0", "text": "function showAllData() {\n // but outside the function, into the scope of the function...\n global $connection;\n \n // set the db query as a string in a variable\n $query = \"SELECT * FROM users \";\n // \"mysqli_query\" is a prebuilt function that has parameters\n // \"connection\" and \"query\".\n $result = mysqli_query($connection, $query);\n\n if (!$result) {\n // prebuilt error handling in \"mysqli\"\n die(\"Query FAILED: \" . mysqli_error());\n }\n // \"mysqli_fetch_assoc\" outputs an associative array\n while($row = mysqli_fetch_assoc($result)) {\n $id = $row['id'];\n echo \"<option value='$id'>$id</option>\";\n }\n }", "title": "" } ]
[ { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.6654954", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "58ebca1fed0eada0f00a84931dddae4e", "score": "0.65513194", "text": "function local() {\n $a = 'I like dogs';\n echo '<br>value of $a is ' . $a;\n echo '<br>value of $a in the global space is ' . $GLOBALS['a'];\n }", "title": "" }, { "docid": "3e22007b63fd876147aafc417c751734", "score": "0.6527063", "text": "public function globals(){\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "aa22ed0d9b92665223e7710fab61cf7b", "score": "0.65017104", "text": "function sotb() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "aa22ed0d9b92665223e7710fab61cf7b", "score": "0.65017104", "text": "function sotb() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "9b10006107cd78fbc91f864751a27ecb", "score": "0.6393756", "text": "function Obj(){\r\n return $GLOBALS['NP'];\r\n}", "title": "" }, { "docid": "e0bf2dd98d594192bc4b503454a78054", "score": "0.63322705", "text": "function Obj(){\n return $GLOBALS['NP'];\n}", "title": "" }, { "docid": "cf211c095a1eaa33519aef653ea35073", "score": "0.6160905", "text": "public function getGlobals()\n {\n }", "title": "" }, { "docid": "0d475cdeb7766c08187cdb8c9b3d86d9", "score": "0.601559", "text": "function backupGlobals()\r\n {\r\n \t$this->joomla_globals = $GLOBALS;\r\n }", "title": "" }, { "docid": "e1eaba930e0f6b8c88b9a5762a067ed3", "score": "0.5989778", "text": "function function1($num)\r\n{\r\n $GLOBALS['num'] = $num;\r\n}", "title": "" }, { "docid": "76c2a0596c65b2cffa9e3eab8fa29d1f", "score": "0.5987836", "text": "function accessGlobal()\n {\n }", "title": "" }, { "docid": "74952f661c5a1fecc5f8116b5fdad0f9", "score": "0.59461737", "text": "function f(){\n global $a;\n $a = 123;\n}", "title": "" }, { "docid": "db2a26e12b1342167f776beb15af2f8c", "score": "0.59330505", "text": "function SETGLOBAL($pVar) { global $_G; $_G[]=\"$pVar\"; }", "title": "" }, { "docid": "1fed3c5571538e451ff40eb0919a20ca", "score": "0.58834803", "text": "static function preserveGlobal($name,$value){\n\t\tglobal $$name;\n\t\t//To not push null value . Ideally we should not push null value for any name\n\t\t//But current user null is dangerous so we are checking for only current user\n if(!empty($$name) || $name != 'current_user') {\n\t\t\tif(!is_array(VTWS_PreserveGlobal::$globalData[$name])){\n\t\t\t\tVTWS_PreserveGlobal::$globalData[$name] = array();\t\t\n\t\t\t}\n\t\t\t\n\t\t\tVTWS_PreserveGlobal::$globalData[$name][] = $$name;\n\t\t}\n\n\t\t$$name = $value;\n\t\treturn $$name;\n\t}", "title": "" }, { "docid": "37f14f9fbc20385c78c86e79a89cfce6", "score": "0.583158", "text": "function tep_get_global_value($name) {\n/* $value = null;\n if (isset($GLOBALS[$name])) { $value = $GLOBALS[$name]; }\n elseif (isset($_GET[$name])) { $value = $_GET[$name]; }\n elseif (isset($_POST[$name])) { $value = $_POST[$name]; }\n elseif (isset($_SESSION[$name])) { $value = $_SESSION[$name]; }\n elseif (isset($_COOKIE[$name])) { $value = $_COOKIE[$name]; }\n return $value;\n*/\n if ( ($value = $GLOBALS[$name]) || ($value = $_REQUEST[$name]) || ($value = $_SESSION[$name]) ) {\n return $value;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "444b0f19c9ee372d348911fa24014b18", "score": "0.5780439", "text": "function setLocalVariable(){\n $local = 123;\n }", "title": "" }, { "docid": "c162bff8b69c6eff7956496f10ee667e", "score": "0.5753736", "text": "function sayName(){\n global $name; // global keyword\n echo $name . PHP_EOL;\n\n echo $GLOBALS[\"name\"] . PHP_EOL; // default bawaan PHP\n}", "title": "" }, { "docid": "f956b44002f77a82907a8100042c5bae", "score": "0.5745853", "text": "function defineabc(){\n global $a;\n $a =\"ABC\";\n}", "title": "" }, { "docid": "ee3baa33a60a9258dcf61a15fdbbac49", "score": "0.5731103", "text": "public function setAsGlobal()\n {\n }", "title": "" }, { "docid": "09dc75603b1f5fea604393dfe4f68dc7", "score": "0.5722186", "text": "function bizlight_set_global() {\n /*Getting saved values start*/\n $GLOBALS['bizlight_customizer_all_values'] = bizlight_get_all_options(1);\n}", "title": "" }, { "docid": "4e6d24efe401be57da3821a8a8747f8a", "score": "0.56972575", "text": "function storeGlobals() {\n\t\tif (is_array($globals = sitemap::getGlobalOptionsAll())) {\n\t\t $this->currentMetaObject[\"globals\"] = $globals;\n } \n\t\treturn true;\n }", "title": "" }, { "docid": "65d651fb422f0665aa3b00df9a460472", "score": "0.5675571", "text": "function getEngLeng1()\n{\n global $eLeng1;\n return $eLeng1;\n}", "title": "" }, { "docid": "64930767e852f7321811ee235ba5e249", "score": "0.5651737", "text": "function site_get_config_main() {\r\n global $site_config_main;\r\n return $site_config_main;\r\n}", "title": "" }, { "docid": "af12be44c65e44dbce577f40395bf24e", "score": "0.5647613", "text": "function test() {\n global $rosa; //variable global\n echo $rosa;\n }", "title": "" }, { "docid": "d0594741f56a945c530f44ac28525f6b", "score": "0.5642504", "text": "function lobster_app_vars($vars)\n{\n global $lobster_app_name;\n foreach ($vars as $key => $value) {\n $GLOBALS[$lobster_app_name . '_' . $key] = $value;\n }\n}", "title": "" }, { "docid": "32a74b9f668347c10c8a847fc93f18c8", "score": "0.5634334", "text": "function getTelLeng1()\n{\n global $tLeng1;\n return $tLeng1;\n}", "title": "" }, { "docid": "5db949f1b82370a71c8b75a7129482b3", "score": "0.5624666", "text": "function useVariable()\r\n\t{\r\n\t\tif (!isset($this->usedVariables[$this->currentString]))\r\n\t\t{\r\n\t\t\t$this->usedVariables[$this->currentString] = array();\r\n\t\t}\r\n\t\t$this->usedVariables[$this->currentString][] = $this->lineNumber;\r\n\t}", "title": "" }, { "docid": "294d89351e6d961343f0b635cdb94a26", "score": "0.5602891", "text": "function getGlobal($name)\n\t{\n\t\t$value = \"\";\n\t\t$sql=\"SELECT glb_value FROM sys_global WHERE glb_name='\".WEB_OPK.\"_\".$name.\"'\";\n\t\t$rs = $this->db->query($sql);\n\n\t\tif($this->db->numrows($rs)) \n\t\t{\n\t\t\twhile($row = $this->db->fetchrow($rs)){\n\t\t\t\t$value = $row['glb_value'];\n\t\t\t}\n\t\t}\n\t\treturn $value ;\n\t}", "title": "" }, { "docid": "77c12f3490d6aa5efc0ca0cd5feea8a4", "score": "0.5579208", "text": "function restoreGlobals()\r\n {\r\n \tif(is_array($this->joomla_globals)) {\r\n \t\t$GLOBALS = $this->joomla_globals;\r\n \t\t$this->joomla_globals = \"\";\r\n \t}\r\n }", "title": "" }, { "docid": "92ce7e7a1c004764c607230b19639794", "score": "0.55568314", "text": "function getGlobals() {\n return [\n 'pl' => 'is awesome',\n ];\n }", "title": "" }, { "docid": "cf83ada9d72b26d69b41b0148f7ee29b", "score": "0.5556315", "text": "static function toSubprocessGlobals(Request $request)\n {\n $globalz = str_replace(\"'\", \"\\\\'\", serialize(InjectRequestGlobals::fromRequest($request)));\n\n return <<<EOF\ncall_user_func(function () { foreach (unserialize('$globalz') as \\$key => \\$value) { \\$GLOBALS[\\$key] = \\$value; } });\nEOF;\n }", "title": "" }, { "docid": "44459cdf2de96408207ae35153a5d67d", "score": "0.5538869", "text": "private function get_local( $key )\n {\n if(isset( $this->globalObjects[$key] ) ){\n return $this->globalObjects[$key];\n }\n return null; \n }", "title": "" }, { "docid": "82250300ea4dca107cd41fa6821bef3b", "score": "0.5537677", "text": "function Sum() {\n global $a, $b;\n $b = $a + $b;\n }", "title": "" }, { "docid": "efc95ef32a2c9dbca06baaf96795d9cb", "score": "0.55343664", "text": "function site()\n{\n global $site;\n return $site;\n}", "title": "" }, { "docid": "3ac57b107da32a4f994c0370ea96d852", "score": "0.5531796", "text": "function convertGlobal(&$element)\n {\n parent::convertGlobal($element, array('id' => $this->getId($element)));\n $docblock = $this->prepareDocBlock($element);\n $value = $this->getGlobalValue($element->getValue());\n $this->page_summary->append('globals',array('sdesc' => $docblock['sdesc'],\n 'desc' => $docblock['desc'],\n 'tags' => $docblock['tags'],\n 'name' => $element->getName(),\n 'link' => urlencode($element->getName()),\n 'value' => $value,\n 'type' => $element->getDataType($this),\n 'line_number' => $element->getLineNumber(),\n 'conflicts' => $this->getFormattedConflicts($element,\"global variables\"),\n 'id' => $this->getId($element)));\n }", "title": "" }, { "docid": "7fb285282512aced96ddeb81cc405de6", "score": "0.55192846", "text": "public function getGlobals()\n {\n return [ 'pooname' => 'bhupoo' ];\n throw \\Exception('shit');\n $data = Cachebust::getInstance()->cacheBustConfig->getCacheBustData();\n\n $globals['cacheBust'] = $data ?: [];\n\n return $globals;\n }", "title": "" }, { "docid": "11a11604123d6cf306779adc08356803", "score": "0.5509531", "text": "static function restore($name){\n\t\tglobal $$name;\n\t\t\n\t\tif(is_array(VTWS_PreserveGlobal::$globalData[$name]) && count(VTWS_PreserveGlobal::$globalData[$name]) > 0){\n\t\t\t$$name = array_pop(VTWS_PreserveGlobal::$globalData[$name]);\n\t\t}\n\t\t$$name;\n\t}", "title": "" }, { "docid": "ede5c9b84517c129504d7ba5d7d66edf", "score": "0.55088615", "text": "function the_item() {\r\n return $GLOBALS['item'];\r\n}", "title": "" }, { "docid": "02d229e9e54f0a264ee7fdbc958e50de", "score": "0.5500872", "text": "public function getAGlobal()\n {\n return $this->aGlobal;\n }", "title": "" }, { "docid": "a23bc75b56f88d1e66b73c2566e43704", "score": "0.5492868", "text": "function &CurrentPage()\n{\n return $GLOBALS[\"Page\"];\n}", "title": "" }, { "docid": "c38f922996362662389f8f75ad0857d5", "score": "0.5489616", "text": "public function registerVars()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4dbe435757eed02e937ca81bdcc9dcbc", "score": "0.54858476", "text": "function loadGlobals(){\n\t\tif (isset($this->currentMetaObject[\"globals\"] ) && $globals = $this->currentMetaObject[\"globals\"] ) {\n\t\t\tsitemap::setGlobalOptionsAll($globals);\n\t\t}\n return(true);\n }", "title": "" }, { "docid": "fea02a513ced0fa8aaf7f63010389046", "score": "0.54716444", "text": "function LoadSelectionFromSession($parm) {\n\t$GLOBALS[\"sel_$parm\"] = @$_SESSION[\"sel_pendingpo_$parm\"];\n\t$GLOBALS[\"rf_$parm\"] = @$_SESSION[\"rf_pendingpo_$parm\"];\n\t$GLOBALS[\"rt_$parm\"] = @$_SESSION[\"rt_pendingpo_$parm\"];\n}", "title": "" }, { "docid": "4963af9a56bb0793d96d3da055a005dd", "score": "0.5466885", "text": "function mkglobal2($str,$source='REQUEST') {\n $vars = explode(',',$str);\n $source = strtoupper($source);\n if (!in_array($source,array('REQUEST','GET','POST'))) {\n throw new Exception('Bad source');\n }\n $source = $GLOBALS['_'.$source];\n foreach($vars AS $var) {\n $comps = explode(':',$var);\n $var_name = array_shift($comps); // Shift an element off the beginning\n $cur_val = @$source[$var_name];\n foreach($comps AS $comp) {\n switch($comp) {\n case 'req':\n if (!isset($source[$var_name])) barkk(\"Parametrul $var_name este obligator\");\n break;\n case 'int':\n if (!isset($source[$var_name])) break;\n if (is_array($cur_val)) {\n foreach($cur_val AS $cur_val_val) {\n if (!ctype_digit($cur_val_val)) barkk(\"$var_name nu e numeric\");\n }\n } else\n if (!ctype_digit($cur_val)) barkk(\"$var_name nu e numeric\");\n break;\n }\n }\n $GLOBALS[$var_name] = $cur_val;\n }\n}", "title": "" }, { "docid": "d8ff9a5f4ffce85d26a1545f3c567395", "score": "0.54643756", "text": "function set_global($var){\n\tglobal $_POST, $_GET, $GLOBALS;\n\t\n\tif (isset($_POST[$var])) $GLOBALS[$var]=$_POST[$var];\n\telseif (isset($_GET[$var])) $GLOBALS[$var]=$_GET[$var];\n\telse $GLOBALS[$var]=null;\n}", "title": "" }, { "docid": "e772f5c3662f3eb2746036a3fddeeced", "score": "0.54592144", "text": "function dump_globalvar( &$local_var ) {\n global $global_var;\n echo \"\\n-- Value of local variable inside dump_globalvar() --\\n\";\n debug_zval_dump( $local_var );\n echo \"\\n-- Value of global variable inside dump_globalvar() --\\n\";\n debug_zval_dump( $global_var );\n}", "title": "" }, { "docid": "6e19448e403eb1e41e283fd177caac32", "score": "0.54575276", "text": "function configBinData($name) {\n return $GLOBALS['BINDATA'];\n}", "title": "" }, { "docid": "e4c1e366290018aafef96da163219e07", "score": "0.54528475", "text": "function gotravel_mikado_get_global_variables() {\n\n\t\t$global_variables = array();\n\t\t$element_appear_amount = -100;\n\n\t\t$global_variables['mkdfAddForAdminBar'] = is_admin_bar_showing() ? 32 : 0;\n\t\t$global_variables['mkdfElementAppearAmount'] = $element_appear_amount;\n\t\t$global_variables['mkdfFinishedMessage'] = esc_html__('No more posts', 'gotravel');\n\t\t$global_variables['mkdfMessage'] = esc_html__('Loading new posts...', 'gotravel');\n\n\t\t$global_variables = apply_filters('gotravel_mikado_js_global_variables', $global_variables);\n\n\t\twp_localize_script('gotravel_mikado_modules', 'mkdfGlobalVars', array(\n\t\t\t'vars' => $global_variables\n\t\t));\n\t}", "title": "" }, { "docid": "76b5709ebb1bfb412860debcb8eeddea", "score": "0.5426146", "text": "function g($global_variable_name, $default = false)\n{\n if (!$default or isset($GLOBALS[$global_variable_name]))\n return @$GLOBALS[$global_variable_name];\n\n return $default;\n}", "title": "" }, { "docid": "876ae017f482f29fe697b10235ac6255", "score": "0.5425219", "text": "function parametro_plantilla($variable){\n if (isset($GLOBALS[$variable])){\n echo $GLOBALS[$variable];\n }else{\n echo \"Sin datos cargados\",$variable;\n }\n}", "title": "" }, { "docid": "3f160696bfb595dff51f08a4ce26b9c7", "score": "0.54033446", "text": "public function scanProjectForGlabalVariables(){\n\t\tglobal $javaScriptObjects;\n\t\tfor($i = 0; $i < count($javaScriptObjects); $i++ ){\n\t\t\t$jsObj = $javaScriptObjects[$i];\t\t\t\n\t\t\t//echo \"count : \" . count($this->globalVarObjects).\", jsObj:count: \". $jsObj->getGVCount() . \"<BR>\";\n\t\t\tif( $jsObj->getGVCount() > 0 ){\t\t\t\n\t\t\t\t$globalVars = $jsObj->getGlobalVars();\n\t\t\t\tfor($j = 0; $j < count($globalVars); $j++){\n\t\t\t\t\t// echo \"CREATING GV OBJECT : \" . $globalVars[$j] . \", FILE: \" . $jsObj->getObjectFile() . \"<br>\";\n\t\t\t\t\t$this->globalVarObjects[$this->globVarCount] = new GlobalVariable($globalVars[$j], $jsObj->getObjectFile() );\t\n\t\t\t\t\t$this->globVarCount++;\t\t\t\t\n\t\t\t\t}// for\n\t\t\t}// if\n\t\t}// for\n\t\t// echo \"Scan for Global Variables complete!\";\n\t}", "title": "" }, { "docid": "5c30572fbb8143b341f1c75623cd675f", "score": "0.539679", "text": "function get_globals($msg=''){\r\n\tob_start();\r\n\t//snapshot of globals\r\n\t$a=$GLOBALS;\r\n\t//unset redundant nodes\r\n\tunset($a['HTTP_SERVER_VARS'], $a['HTTP_ENV_VARS'], $a['HTTP_GET_VARS'], $a['HTTP_COOKIE_VARS'], $a['HTTP_SESSION_VARS'], $a['HTTP_POST_FILES'], $a['GLOBALS']);\r\n\tprint_r($a);\r\n\tunset($a);\r\n\t$out=ob_get_contents();\r\n\tob_end_clean();\r\n\treturn $msg . \"\\n\\n\" . $out;\r\n}", "title": "" }, { "docid": "74b8f76fa4820c127866b93f498b1888", "score": "0.53929865", "text": "function topfit_mikado_get_global_variables() {\n\n\t\t$global_variables = array();\n\t\t$element_appear_amount = -150;\n\n\t\t$global_variables['mkdAddForAdminBar'] = is_admin_bar_showing() ? 32 : 0;\n\t\t$global_variables['mkdElementAppearAmount'] = topfit_mikado_options()->getOptionValue('element_appear_amount') !== '' ? topfit_mikado_options()->getOptionValue('element_appear_amount') : $element_appear_amount;\n\t\t$global_variables['mkdFinishedMessage'] = esc_html__('No more posts', 'topfit');\n\t\t$global_variables['mkdMessage'] = esc_html__('Loading new posts...', 'topfit');\n\t\t$global_variables['mkdPtfLoadMoreMessage'] = esc_html__('Loading...', 'topfit');\n\n\t\t$global_variables = apply_filters('topfit_mikado_js_global_variables', $global_variables);\n\n\t\twp_localize_script('topfit-mikado-modules', 'mkdGlobalVars', array(\n\t\t\t'vars' => $global_variables\n\t\t));\n\n\t}", "title": "" }, { "docid": "7575f7e169bd1a9358ffde8bd5ba93b9", "score": "0.53916585", "text": "protected function _bgin(){\n\t}", "title": "" }, { "docid": "1f3b238d875af36a471dc5d1941ce0d2", "score": "0.53282434", "text": "function &CurrentTable()\n{\n return $GLOBALS[\"Table\"];\n}", "title": "" }, { "docid": "5b8e8498110ee131da905502c89e46bc", "score": "0.5326886", "text": "function mkglobal($vars) {\n if (!is_array($vars))\n $vars = explode(\":\", $vars);\n foreach ($vars as $v) {\n if (isset($_GET[$v]))\n $GLOBALS[$v] = $_GET[$v];\n elseif (isset($_POST[$v]))\n $GLOBALS[$v] = $_POST[$v];\n else\n return 0;\n }\n return 1;\n}", "title": "" }, { "docid": "ddfa4577f46b519896a24d40aedc4297", "score": "0.5323477", "text": "function Response()\n{\n return $GLOBALS[\"Response\"];\n}", "title": "" }, { "docid": "1f326a72b1c3782cd0b02b2862dfbba6", "score": "0.5322153", "text": "function setGlobal($flag, $request_flag = 0)\n {\n }", "title": "" }, { "docid": "2237a7fa3e33d8c9f9f887e83798a705", "score": "0.53054535", "text": "function yy_r32(){\n\t$this->_retvalue = new AOWP_PHPDefineVariableStatementElement($this->yystack[$this->yyidx + -2]->minor, 'global', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "61cbd007e482361bd80957ecadb0ede6", "score": "0.5302512", "text": "function global_val($key) {\n $a = array();\n $a[\"servername\"] = \"localhost\"; //mysql servername\n $a[\"username\"] = \"root\"; //mysql username\n $a[\"password\"] = \"1234\"; //mysql password\n $a[\"databasename\"] = \"turtlebot\"; //mysql database\n if(!array_key_exists($key,$a)) {\n die(\"global value does not exist [$key]\");\n }\n return $a[$key];\n}", "title": "" }, { "docid": "223ea873fe476f1a697e7c220d14fdb6", "score": "0.5300401", "text": "public function getCurrentVariables();", "title": "" }, { "docid": "7ecb3e52de5ed61d9fa23943e9085616", "score": "0.52937734", "text": "function scr_bf_setting()\n{\n\tglobal $gw_scr;\n\tglobal $g_mode;\n\n\treturn;\n}", "title": "" }, { "docid": "1d6c9864dbbb416b458ed53e71a4f4bc", "score": "0.5290453", "text": "function discussion_get_global_variables() {\n\n $global_variables = array();\n $element_appear_amount = -150;\n\n $global_variables['mkdAddForAdminBar'] = is_admin_bar_showing() ? 32 : 0;\n $global_variables['mkdElementAppearAmount'] = discussion_options()->getOptionValue('element_appear_amount') !== '' ? discussion_options()->getOptionValue('element_appear_amount') : $element_appear_amount;\n $global_variables['mkdFinishedMessage'] = esc_html__('No more posts', 'discussionwp');\n $global_variables['mkdMessage'] = esc_html__('Loading new posts...', 'discussionwp');\n $global_variables['mkdAjaxUrl'] = admin_url('admin-ajax.php');\n\n $global_variables = apply_filters('discussion_js_global_variables', $global_variables);\n\n wp_localize_script('discussion_modules', 'mkdGlobalVars', array(\n 'vars' => $global_variables\n ));\n\n }", "title": "" }, { "docid": "612200fe80bdf1062704eafb7a81a137", "score": "0.5272306", "text": "function duplicar(){\r\n\t\t\t\tglobal $var1;// el termino global solo funciona dentro de funciones // si quiero que sea visto desde fuera debo hacerlo global desde dentro\r\n\t\t\t\tglobal $temp;//necesario para que de abajo\r\n\t\t\t\t$temp = $var1 * 2;//var aqui es local//se soluciona haciendolo global en lafuncion\r\n\t\t\t\techo \"resultado $temp \";//lo dedlara dentro de la funcion\r\n\t\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "24f7400b7df7aedf0374a3577ae1f597", "score": "0.52658767", "text": "function bp_var($key,$fallback_value=null) {\n if (!isset($GLOBALS['wp_blueprint'])) {\n $GLOBALS['wp_blueprint'] = array();\n }\n if (isset($GLOBALS['wp_blueprint'][$key])) {\n return $GLOBALS['wp_blueprint'][$key];\n } else {\n if ($fallback_value !== null) {return $fallback_value;}\n else {return null;}\n }\n}", "title": "" }, { "docid": "46a5bc53ef15b85365534076cfafc47e", "score": "0.526152", "text": "function LoadSelectionFromSession($parm) {\n\t$GLOBALS[\"sel_$parm\"] = @$_SESSION[\"sel_financialpostings_$parm\"];\n\t$GLOBALS[\"rf_$parm\"] = @$_SESSION[\"rf_financialpostings_$parm\"];\n\t$GLOBALS[\"rt_$parm\"] = @$_SESSION[\"rt_financialpostings_$parm\"];\n}", "title": "" }, { "docid": "7440fe157577b467206dac4c38a0ac4b", "score": "0.52508944", "text": "function pdc_local() {\n\t\n\treturn pdc()->local;\n\t\n}", "title": "" }, { "docid": "484cbc6c7eb181964daf8df752ab4dc0", "score": "0.5247298", "text": "private function setupGlobals_fn() \n\t\t{\n\t\t\t//---\n\t\t\t$this->_version \t= self::K_VERS;\n\t\t\tself::$gFile \t= __FILE__;\n\t\t\tself::$gDir \t\t= trailingslashit( dirname( self::$gFile ) );\n\t\n\t\t\tself::$gUrl\t\t\t\t= trailingslashit( get_site_url() ) . str_replace( ABSPATH, '', self::$gDir );\n\t\t\t//---\n\t\t\t$lName \t\t\t\t\t= basename( self::$gDir );\n\t\t\t$gBasename \t\t\t\t= explode( $lName, self::$gFile );\n\t\t\tself::$gBasename \t= $lName . $gBasename[ 1 ];\n\t\t\t//\n\t\t\t// Directories Hierarchy\n\t\t\t//\n\t\t\t//---\n\t\t\tself::$gSlug \t\t\t= sanitize_title( self::K_SLUG ) . 'Campaign';\n\t\t\t//---\n\t\t}", "title": "" }, { "docid": "f8b9b7f10501d710d0f7b74354faa963", "score": "0.5243916", "text": "function setvar() {\nglobal $sitevars;\nif(!is_array($sitevars)) {$sitevars=Array();}\n$argc = func_num_args(); //arguments count\n$argv = func_get_args(); //arguments value\nif($argc==1) {\n$sitevars=array_merge($sitevars,$argv[0]);\n} else {\n$k=$argv[0];\n$v=$argv[1];\n$sitevars[$k]=$v;\n}\nreturn;\n}", "title": "" }, { "docid": "8414f94ad672c912d7d83c30759daa27", "score": "0.5240442", "text": "public function getVariableName();", "title": "" }, { "docid": "d3029a68d211a29edcd507872c8bb0c0", "score": "0.52387476", "text": "function f_test_global_isset() {\r\n\tglobal $MyVariable;\r\n\treturn isset($MyVariable);\r\n}", "title": "" }, { "docid": "b8d9757dedaf1a51d289565576bfa910", "score": "0.5228864", "text": "public function getVariableName(): string;", "title": "" }, { "docid": "748156ededbece453e2cb25e49730749", "score": "0.52075887", "text": "function globalVariables()\n{\n return array(\n \"home\" => \"http://localhost/windesheim/KBS-groep-2/views/dashboard/index.php\",\n \"login\" => \"http://localhost/windesheim/KBS-groep-2/views/login/index.php\",\n );\n}", "title": "" }, { "docid": "a1e7d94c8bcfb051a394cf5182279913", "score": "0.5206178", "text": "function foo() {\n\tglobal $color;\n\tinclude 'vars.php';\n\techo \"A $color $fruit\";\n}", "title": "" }, { "docid": "c3f0b693d24dcf0583dd993422994194", "score": "0.52028906", "text": "function getAM_nombreConductor()\n{\n\treturn $GLOBALS['AM_nombreConductor']; \n}", "title": "" }, { "docid": "1b2f34b0f304e23e15128f15c75934e3", "score": "0.5187149", "text": "function request() : Request\n{\n global $request;\n\n return $request;\n}", "title": "" }, { "docid": "8ed0a39ab7474fb495132d27910a1721", "score": "0.5185792", "text": "function LoadSelectionFromSession($parm) {\n\n\t$GLOBALS[\"sel_$parm\"] = @$_SESSION[\"sel_purchasereport_$parm\"];\n\n\t$GLOBALS[\"rf_$parm\"] = @$_SESSION[\"rf_purchasereport_$parm\"];\n\n\t$GLOBALS[\"rt_$parm\"] = @$_SESSION[\"rt_purchasereport_$parm\"];\n\n}", "title": "" }, { "docid": "b492d67c6b7a0e851701d9b5fc8d856a", "score": "0.5166424", "text": "public static function getGlobalVar($name, $key='')\n\t{\n\t\tinclude_once dirname(__FILE__).'../config/global_vars.php';\n\t\tif(isset($arrGlobals[$name]) || isset($arrGlobals[$name[$key]])){\n\t\t\treturn empty($key) ? $arrGlobals[$name] : $arrGlobals[$name[$key]];\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "9c109886d080ec7d530e25daf4d9e184", "score": "0.51653665", "text": "function getPrisijungimas() {\n global $prisijungimas; // arba $GLOBALS['$prisijungimas'] = 99;\n\n return $prisijungimas;\n }", "title": "" }, { "docid": "670668b4540a424f9ba87296efc8d874", "score": "0.5165292", "text": "function calculateRest(){\n $GLOBALS[\"rest\"]=$GLOBALS[\"mySalary\"]-$GLOBALS[\"myTaxes\"];\n\n}", "title": "" }, { "docid": "d0f3b4f1f2a7a728ffd0f52eebf96532", "score": "0.5156671", "text": "public function dumpGlobals($globals)\n {\n }", "title": "" }, { "docid": "1f94470dbd7216a3b89e0356a04a28f9", "score": "0.51382285", "text": "function useMemberVar()\r\n\t{\r\n\t\tif (!isset($this->usedMemberVariables[$this->currentVar][$this->currentString]))\r\n\t\t{\r\n\t\t\t$this->usedMemberVariables[$this->currentVar][$this->currentString] = array();\r\n\t\t}\r\n\t\t$this->usedMemberVariables[$this->currentVar][$this->currentString][] = $this->lineNumber;\r\n\t\t$this->currentVar = false;\r\n\t\t$this->currentString = null;\r\n\t}", "title": "" }, { "docid": "db2e9d283b0c007f869546cb0bb8b5ad", "score": "0.5119943", "text": "function store_html_output($buffer){\r\n\tglobal $store_html_output;\r\n\t$store_html_output=$buffer;\r\n\treturn $buffer;\r\n}", "title": "" }, { "docid": "2af5d2d823823a1898374d19fcc5c64d", "score": "0.51005286", "text": "function getAM_montoEsquela()\n{\n\treturn $GLOBALS['AM_montoEsquela'];\n}", "title": "" }, { "docid": "156eec1416776749b0f2485ce3ea4053", "score": "0.5093475", "text": "function return_var_name($var)\n{\n foreach($GLOBALS as $key => $value)\n {\n if ($value === $var)\n {\n return $key;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "997571fa9529e50db067855efd8246a2", "score": "0.5092024", "text": "function clientStorage()\n{\n global $clients;\n return $clients;\n}", "title": "" }, { "docid": "a453379df820a5c959a3815e76c2b7f7", "score": "0.5073914", "text": "function setfield($f,$v)\r\n{\r\n\t//\techo \"setfield $f $v<br>\";\r\n\t$GLOBALS['field']=$f;\r\n\t$GLOBALS['value']=$v;\r\n\r\n}", "title": "" }, { "docid": "844b9b492f09a3a17220219a63ad7378", "score": "0.50685155", "text": "function getPageTitle() {\r\n global $current_page_title;\r\n\r\n return $current_page_title;\r\n}", "title": "" }, { "docid": "e4dd17475a62815c9ce06324b3d38e21", "score": "0.5065689", "text": "public function getGlobals()\n {\n return array();\n }", "title": "" }, { "docid": "28218fea19712bd6bf907de2cf0c75fc", "score": "0.50560755", "text": "public static function getSharedGlobals() : ThreadSafeArray{}", "title": "" }, { "docid": "a0db1082881da9f598e7031039cf1ef3", "score": "0.50541353", "text": "function gtm4wp_amp_gtmvariables() {\r\n\tglobal $gtm4wp_datalayer_json;\r\n\treturn '{\"vars\":' . $gtm4wp_datalayer_json . ' }';\r\n}", "title": "" }, { "docid": "06c6a462fca9350a9387b0bad6b4f660", "score": "0.50535434", "text": "function PageHelperFunction($globals, $full_path) {\n\tforeach ($globals as $var) {\n\t\tglobal ${$var};\n\t}\n\tunset($var);\n\t\n\tinclude $full_path;\n}", "title": "" } ]
c8ac89f62f862f9e310fd0d16cb995e8
USER DEFINED FUNCTION START Start SELECT Function
[ { "docid": "edb3868e577cab96b6cd429eda5a2082", "score": "0.0", "text": "function select()\r\n{\r\n\tglobal $a;\r\n \tglobal $showrecs;\r\n \tglobal $page;\r\n \tglobal $filter;\r\n \tglobal $filterfield;\r\n \tglobal $wholeonly;\r\n \tglobal $order;\r\n \tglobal $ordtype;\r\n\tglobal $pagerange;\r\n\tglobal $designId;\r\n \tif ($a == \"reset\") {\r\n \t$filter = \"\";\r\n \t$filterfield = \"\";\r\n \t$wholeonly = \"\";\r\n \t$order = \"\";\r\n \t$ordtype = \"\";\r\n\t\t\r\n \t}\r\n\r\n \t$checkstr = \"\";\r\n \tif ($wholeonly) $checkstr = \" checked\";\r\n \tif ($ordtype == \"asc\") { $ordtypestr = \"desc\"; } else { $ordtypestr = \"asc\"; }\r\n \t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tif ($count % $showrecs != 0) {\r\n \t$pagecount = intval($count / $showrecs) + 1;\r\n \t}\r\n \telse {\r\n \t$pagecount = intval($count / $showrecs);\r\n \t}\r\n \t$startrec = $showrecs * ($page - 1);\r\n \tif ($startrec < $count) {mysqli_data_seek($res, $startrec);}\r\n \t$reccount = min($showrecs * $page, $count);\r\n\t\r\n\t\r\n?>\r\n\t<form name=\"frmFilter\" action=\"\" method=\"post\">\r\n\t\t<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\" bgcolor=\"#EAEAEA\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"5\" align=\"left\"><b>Custom Filter</b>&nbsp;\r\n\t\t\t\t<input type=\"text\" name=\"filter\" class=\"uppercase\" value=\"<?php echo $filter ?>\">\r\n\t\t\t\t\r\n <select name=\"filter_field\">\r\n\t\t\t\t\t<option value=\"\">All Fields</option>\r\n <option value=\"<?php echo \"emp_code\" ?>\"<?php if ($filterfield == \"emp_code\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Code\")?>\r\n </option>\r\n\t\t\t\t\t<option value=\"<?php echo \"emp_fname\" ?>\"<?php if ($filterfield == \"emp_fname\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Name\")?>\r\n </option>\r\n <option value=\"<?php echo \"emp_dname\" ?>\"<?php if ($filterfield == \"emp_dname\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Short Name\")?>\r\n </option>\r\n <option value=\"<?php echo \"emp_gender\" ?>\"<?php if ($filterfield == \"emp_gender\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Gender\")?>\r\n </option>\r\n\t\t\t\t\t<option value=\"<?php echo \"design_name\" ?>\"<?php if ($filterfield == \"design_name\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Designation\") ?>\r\n </option>\r\n \r\n\t\t\t\t </select>\r\n \r\n\t\t\t\t<input type=\"button\" name=\"action\" value=\"Apply\" onClick=\"javascript:SearchData(this.form,'employee/employee.php?status=true&a=filter')\" >\r\n\t\t\t\t<input type=\"button\" name=\"action\" value=\"Reset\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=reset')\">\r\n </td>\r\n\t\t </tr>\r\n\t\t</table>\r\n\t</form>\r\n\t<hr size=\"1\" noshade>\r\n <form name=\"frmCategory\" id=\"frmCategory\" action=\"employee/employee.php?a=del\" method=\"post\">\r\n\t<table class=\"bd\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td align=\"left\">\r\n \t<input type=\"button\" name=\"action\" value=\"Add New Employee\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=add')\">\r\n \t<input type=\"button\" name=\"btnDelete\" value=\"Delete\" onClick=\"if(onDeletes()==true){ javascript:formget(this.form,'employee/processEmployee.php?'); javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true');javascript:printHeader('Employee Info');}\" >\r\n <input type=\"hidden\" name=\"action\" value=\"delete\">\r\n </td>\r\n <td align=\"right\">Rows Per Page\r\n \t <select name=\"pageperrecord\" onChange=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&pageId='+this.value)\">\r\n\t\t\t\t<option value=\"<?php echo $showrecs; ?>\"><?php echo $showrecs; ?></option>\r\n\t\t\t\t<option value=\"5\">5</option>\r\n <option value=\"10\">10</option>\r\n <option value=\"15\">15</option>\r\n <option value=\"20\">20</option>\r\n <option value=\"25\">25</option>\r\n </select>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t<table class=\"tbl\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\"width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td class=\"hr\"><input name=\"CheckAll\" type=\"checkbox\" id=\"CheckAll\" value=\"Y\" onClick=\"javascript:ClickCheckAll(this.form);\"></td>\r\n\t\t\t<td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_code\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Code\") ?>\r\n </a>\r\n </td>\r\n\t\t\t<td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_fname\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Name\") ?>\r\n </a>\r\n </td>\r\n <td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_dname\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Employee Short Name\") ?>\r\n </a>\r\n </td>\r\n <td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_gender\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Gender\") ?>\r\n </a>\r\n </td>\r\n\t\t\t<td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_doj\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Date of Join\") ?>\r\n </a>\r\n </td>\r\n <td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_dest\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Designation\") ?>\r\n </a>\r\n </td>\r\n <td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_email\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Email\") ?>\r\n </a>\r\n </td>\r\n <td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&order=<?php echo \"emp_mobno\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Mobile No\") ?>\r\n </a>\r\n </td>\r\n \r\n\t\t</tr>\r\n\t<?php\r\n \tfor ($i = $startrec; $i < $reccount; $i++)\r\n\r\n \t{\r\n \t$row = mysqli_fetch_assoc($res);\r\n \t$style = \"dr\";\r\n\t\t\r\n \tif ($i % 2 != 0) {\r\n \t\t$style = \"sr\";\r\n \t}\r\n\t\t$empID = $row[\"emp_id\"];\r\n\t\t$empField = \"emp_id\";\r\n\t?>\r\n\t<tr class=\"<?php echo $style ?>\" style=\"cursor:pointer\">\r\n \t<?php \r\n\t\t\tif($row[\"design_name\"] == \"ADMIN\" or $row[\"design_name\"] == \"WEBUSER\"){\r\n\t\t?>\r\n \t\t<td>&nbsp;\r\n \t\t\t\r\n \t\t</td>\r\n <?php\r\n\t\t\t}else{\r\n\t\t?>\t\t\r\n \t\t\t<td>\r\n \t\t\t<input name=\"userbox[]\" type=\"checkbox\" id=\"userbox<?php echo $i;?>\" value=\"<?php echo $row['emp_id']; ?>\">\r\n \t\t</td>\r\n <?php\r\n\t\t\t}\r\n\t\t?>\r\n\t\t<td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_code\"]) ?>\r\n </td>\r\n\t\t<td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_fname\"]) ?>\r\n </td>\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_dname\"]) ?>\r\n </td>\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_gender\"]) ?>\r\n </td>\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars(date(\"d-m-Y\",strtotime($row[\"emp_doj\"]))) ?>\r\n </td>\t\t\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"design_name\"]) ?>\r\n </td>\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_email\"]) ?>\r\n </td>\r\n <td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','employee/employee.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars($row[\"emp_mobno\"]) ?>\r\n </td>\r\n \r\n\t</tr>\r\n\t<?php\r\n \t}//for loop\r\n \tmysqli_free_result($res);\r\n\t?>\r\n <input type=\"hidden\" name=\"hdnCount\" id=\"hdnCount\" value=\"<?php echo $i; ?>\">\r\n\t</table>\r\n </form>\r\n\t<br><center>\r\n\t<?php \r\n\t\t//showpagenav($page, $pagecount); \r\n\t\tshowpagenav($page, $pagecount,$pagerange,'employee/employee.php?status=true'); \r\n}", "title": "" } ]
[ { "docid": "05180b82d240e29546e4526b24ff1d9f", "score": "0.72521263", "text": "public function Do_select_Example1(){\n\n\t}", "title": "" }, { "docid": "ce0ded1e5256da38a91fc592c7325e4c", "score": "0.7246708", "text": "public function select_db(){}", "title": "" }, { "docid": "930e26f4e01f0d972a7a528107749265", "score": "0.703101", "text": "public function select()\n {\n }", "title": "" }, { "docid": "4935a0354680da3ed45b2eb0885025b6", "score": "0.6958734", "text": "public function select()\n {\n }", "title": "" }, { "docid": "fb34fa786cecbbcd85dfc3ad36c0ac0b", "score": "0.6783881", "text": "public function _selectDB() {\r\n // Nothing to do here\r\n }", "title": "" }, { "docid": "0988fa03c6f7ac830514b13f779e3e4c", "score": "0.6669617", "text": "public function select(){\n }", "title": "" }, { "docid": "f51fc70e90d4b7e29b9633c022f107ed", "score": "0.6434223", "text": "public function Do_Allselect_Example1(){\n\n\t}", "title": "" }, { "docid": "c04b02f9fceb8422aa575d34a593b557", "score": "0.64282686", "text": "public function on_select(\\flames\\query\\event\\Select $event) \n {\n echo \"Running SQL \".$event->get_statement()->queryString;\n }", "title": "" }, { "docid": "24855003b3b9d7bc9bb2f7760c5ee26a", "score": "0.63238883", "text": "function callSelectQuery($query)\n{\n\n $result = runQuery($query);\n\n #return the result\n return $result;\n}", "title": "" }, { "docid": "59fa3b838614b0bc3cb8a1033b3777e9", "score": "0.62942976", "text": "public function selectEg1()\n {\n // call first method. connect\n \t$this->db->connect();\n \t\n \t//($table, $rows, $where, $order, $limit)\n\t if($this->db->select('City','*', 'name=\"Vancouver\"', null, 10) == true) { //SELECT a *(all) LIMIT 10 \n \t $result = $this->db->getResult();\n\t }\n\t $this->db->disconnect(); // disconnect from DB\n\t \n\t return $result; // return the results\n }", "title": "" }, { "docid": "aaabe805ebda099b2d9977823048153b", "score": "0.62838763", "text": "public function ddlQuery();", "title": "" }, { "docid": "93fe35cd254ed8a4cb3a83b1c7692661", "score": "0.6259836", "text": "public function show_list()\r\n {\r\n try\r\n {\r\n \r\n ////Put the select statement here\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n\t\t\tshow_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "7dcc6b0aa9b5080006996bce2d2352ae", "score": "0.6234874", "text": "public function select(){\n\t$sql=\"SELECT * FROM cliente WHERE estado='ACT'\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "b6c0921fdea8163a39942d132e03a53f", "score": "0.6162506", "text": "public function select(){\n\t$sql=\"SELECT * FROM tipo_vehiculo WHERE estado='ACT'\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "6d20221333469a54c3f66af7af63da1e", "score": "0.61554366", "text": "function querydb(){\n\t\t}", "title": "" }, { "docid": "749fa9d8532f8e992181a7816b19a08c", "score": "0.6155164", "text": "function query(){\n \t\n }", "title": "" }, { "docid": "b0269353dfe3bed92fcc7ef5fa1c82eb", "score": "0.6133321", "text": "public function selectAllTask(){\r\n $this->myQuery=\"SELECT * FROM $this->tableName\";\r\n return $this->myQuery;\r\n }", "title": "" }, { "docid": "3bb9ad34dd0e71d51626594dffd34ef4", "score": "0.6130182", "text": "abstract public function compile_select($database);", "title": "" }, { "docid": "c8d1d29872d9aaaf1fba79b8740d76c3", "score": "0.6123882", "text": "public function getUserForSelect()\n {\n //TODO HANDLER\n }", "title": "" }, { "docid": "314fcbd622e2d87a1b56de1e4ad35f46", "score": "0.6087151", "text": "function execute_select_query($query){\r\n\tglobal $link;\r\n\t$result = mysqli_query($link, $query);\r\n\t$rows=mysqli_fetch_array($result);\r\n\treturn $rows;\r\n}", "title": "" }, { "docid": "6c12ad9806ecae11c0c875e255e5db21", "score": "0.6084683", "text": "function db_supervisor_select($imei,$travel_id) {\n\n\t$param_arr=_init_db_params();\n\n\t$param_arr=_db_prepare_param($param_arr,\"s\",\"imei\",$imei,true);\n\t$param_arr=_db_prepare_param($param_arr,\"i\",\"travel_id\",$travel_id,true);\n\n\t\n\tLOG_MSG('INFO',\"db_tagsticker_select(: START { \n\t\t\t\t\t\t\timei=[$imei],\n\t\t\t\t\t\t\ttravel_id=[$travel_id]\t\t\t\t\t\t\t\\n}\");\n\n\t$resp=execSQL(\"SELECT \n\t\t\t\t\t\tis_active\n\t\t\t\t\tFROM \n\t\t\t\t\t\ttSupervisor\n\t\t\t\t\tWHERE\n\t\t\t\t\t\timei = ? AND \n\t\t\t\t\t\ttravel_id = ?\"\n\t\t\t\t\t,$param_arr['params'], \n\t\t\t\t\tfalse);\n\n\tLOG_MSG('INFO',\"db_supervisor_select(): END\");\n\treturn $resp;\n}", "title": "" }, { "docid": "47a11b58e95cd29736916eadec000185", "score": "0.6081668", "text": "function select_all($sql, $name = null) {\n\t\ttrigger_error(\"Select_all is an abstract method\", E_USER_ERROR);\t\t\n\t}", "title": "" }, { "docid": "9e01332178dd4eedfd76e8b8e8a3e508", "score": "0.6062657", "text": "public function select(){\n $sql=\"SELECT * FROM $this->tableName WHERE condicion=1\";\n return $this->conexion->getDataAll($sql); \n }", "title": "" }, { "docid": "167378a9cf96f495d072fb454fbae0e4", "score": "0.60560894", "text": "function ddl_query(){\n global $db_conn; \n $query = 'SELECT * \n FROM admin_prices';\n \n $ddl_data_query = mysqli_query($db_conn,$query);\n \n while ($record = mysqli_fetch_array($ddl_data_query)) {\n echo '<option value=\"' . $record['mat_selected'] . '\">' . $record['mat_selected'] . '</option>';\n } \n }", "title": "" }, { "docid": "9299829063e4ff02424cb9e37e1b6c8f", "score": "0.6052371", "text": "function select_db($dbname)\n {\n return;\n }", "title": "" }, { "docid": "8bb2312206af84695bf415ca1fb93b31", "score": "0.6008145", "text": "public function select(){\n\t$sql=\"SELECT * FROM configuracion\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "9fa6746f800999db11ee436bf2cd8b49", "score": "0.59953123", "text": "abstract public function select($sql);", "title": "" }, { "docid": "0285149c551526f94b29a9c23cf47aab", "score": "0.59862214", "text": "public function select()\r\n {\r\n $sql=\"SELECT * FROM ciudad\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "40607dc81fa915ef519cfb6f699d144f", "score": "0.5985359", "text": "public function select() {\n $args = func_get_args();\n if (empty($args)) {\n throw new SystemException('ERR_NO_QUERY', SystemException::ERR_DEVELOPER);\n }\n if (!strpos($args[0], ' ')) {\n //если в имени таблицы есть пробелы\n //будем считать что это просто SQL код\n $args = $this->buildSQL($args);\n }\n return call_user_func_array(array($this, 'selectRequest'), $args);\n }", "title": "" }, { "docid": "6e265aa2bc94af85d22b1fd554528bd5", "score": "0.5982959", "text": "function query()\n {\n }", "title": "" }, { "docid": "eaa1aa10b31b83874289a19619db1aa5", "score": "0.5979567", "text": "public function select()\n\t{\n\t\t$sql = \"SELECT * FROM seguimiento WHERE condicion_S='1'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "c7cc6ca3dd0b0a6078b1d3cf8d06f822", "score": "0.5971256", "text": "function Recordset_Selecting(&$filter) {\r\n\r\n\t\t// Enter your code here\t\r\n\t}", "title": "" }, { "docid": "168950aeab904e6f60e18451bb98940f", "score": "0.5967038", "text": "static public function selectgest(){\r\n\r\n\t\t$pdo = Database::connectDB()->prepare(\"SELECT * FROM gestion\");\r\n\t\t$pdo -> execute();\r\n\t\treturn $pdo -> fetchAll();\r\n\t\t$pdo -> close();\r\n\r\n\t}", "title": "" }, { "docid": "c59fb7c5601f4a7a8c4226c780be2d66", "score": "0.5959681", "text": "function select_query(){\r\n\t\t$this-> init(new User());\r\n\t\t$this->model->table_label = 'Query Console';\r\n\t\t$js=\"\r\n\t\t$( document ).ready(function() {\r\n\t\t\tconsole.log( 'document loaded' );\r\n\t\t\t$('#btn_execute').on('click', function(sql){ \r\n\t\t\t\tvar sql = document.getElementById('query_area').value;\r\n\t\t\t\tvar jqxhr = $.post( \\\"\".SERVER_DIR.strtolower(CoreUtils::get_controller_name($this)).\"/execute_query\\\",\r\n\t\t\t\t\t\t\t{sql:sql}, function(data, status) {\r\n\t\t\t\t\tif(data=='0' || data ==0){\r\n\t\t\t\t\t\tdocument.getElementById('alert_result').className='p-4 rounded bg-danger';\r\n\t\t\t\t\t\tdocument.getElementById('alert_result').innerText='No records for sql';\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdocument.getElementById('alert_result').className='p-4 border rounded bg-success';\r\n\t\t\t\t\t\tdocument.getElementById('alert_result').innerText='SQL SUCCESS!';\r\n\t\t\t\t\t\t$('#result_sql').html(data);\r\n\t\t\t\t\t\t/*document.getElementById('result_sql').innerHtml = data;*/\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t.fail(function() {\r\n\t\t\t\t\t\talert( \\\"Ha ocurrido un Error.\\\" );\r\n\t\t\t\t\t\tdocument.getElementById('alert_result').className='p-4 bg-gradient-success';\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t\t\";\r\n\t\t$this->view->add_script_js($js);\r\n\t\t$this->render(\"select_query\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "935891ebe89cd4184bfdbe62f8ad84fc", "score": "0.5955904", "text": "public function selectEg3()\n {\n // call first method. connect\n \t$this->db->connect();\n \t\n \t//($table, $rows, $where, $order, $limit)\n\t if($this->db->select('City','*', null, null, 10) == true) { //SELECT a *(all) LIMIT 10 \n \t $result = $this->db->getResult();\n\t }\n\t $this->db->disconnect(); // disconnect from DB\n\t \n\t return $result; // return the results\n }", "title": "" }, { "docid": "f32bc6fd735f117c7c0c635798bff58e", "score": "0.59550864", "text": "abstract function select($source);", "title": "" }, { "docid": "4edfb01c1af79c83f3c6e739fcd04b15", "score": "0.59483045", "text": "function Select($base,$sql)\r\n{\r\n\t$dbh = connect($base);\r\n\t$query = $dbh->query($sql);\r\n\r\n\tif ($query)\r\n\t{\r\n\t\treturn $query;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "df0d63fc77832ce70ff74a6beb9273bd", "score": "0.59384763", "text": "abstract public function select ($select);", "title": "" }, { "docid": "2020d11e8bd219886bb3f3828afba12f", "score": "0.5937785", "text": "abstract protected function getSelectStatement();", "title": "" }, { "docid": "5d95af190f7e01620bdc9b7452feedb2", "score": "0.5937662", "text": "function executeQuerySelect($query){\n $queryResult = null;\n\n $dbConnexion = openDBConnexion();//open database connexion\n if ($dbConnexion != null)\n {\n $statement = $dbConnexion->prepare($query);//prepare query\n $statement->execute();//execute query\n $queryResult = $statement->fetchAll();//prepare result for client\n }\n $dbConnexion = null;//close database connexion\n return $queryResult;\n}", "title": "" }, { "docid": "2527bbfa6ca80cf808e1d1c2224ffea5", "score": "0.5903632", "text": "function select()\r\n\t{\r\n\t\t$this->delim = \"'\";\r\n\t\t$final = array();\r\n\r\n\t\t$this->query = \"SELECT * FROM `\".$this->tableName.\"` \";\r\n\t\t\r\n\t\t$final_cond = \"\";\r\n\t\t\r\n\t\tif (is_array($this->condition))\r\n\t\t\t$final_cond = $this->makeCondition($this->condition);\r\n\t\telseif ($this->condition)\r\n\t\t\t$final_cond = \"WHERE \" . $this->condition;\r\n\r\n\t\t$this->query .= $final_cond;\r\n\t\t\r\n\t\t$this->order_func();\r\n\t\t\r\n\t\t$result = $this->db_query();\r\n\t\tif ($result)\r\n\t\t{\r\n\t\t\t$final = $this->parse_result($result);\r\n\t\t\t\r\n\t\t\tif ($this->format)\r\n\t\t\t\t$final = $this->format($final);\r\n\t\t\t\r\n\t\t\treturn $final;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "44d77ed52f4116ed38a3693e447cc6f1", "score": "0.5887092", "text": "function executeSelectStatment($sql,&$result){\n\n\t\tif($result = $this->conn->query($sql)) {\n \t\tif($result->num_rows > 0)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t} else {\n\n \t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "874969849dbc1adac6c790a3531842f5", "score": "0.588685", "text": "public function Select($sql){\n $this->connect();\n $this->result = $this->conn->query($sql);\n }", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.58838123", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.58838123", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.58838123", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "919140fd25a1b73fe56b78935fe2fc8d", "score": "0.5883487", "text": "public function oracleQuery()\n {\n }", "title": "" }, { "docid": "137ca7973b65da3045a455a793b97a8b", "score": "0.5870877", "text": "function db_select ($query)\n\t{\n\t\tglobal $_sitelib_db_conn;\n\t\tglobal $_sitelib_db_rs;\n\t\tglobal $_sitelib_db_num_rows;\n\t\t// Log statement as message\n\t\tlogm(\"SQL_SELECT: \" . $query); \n\t\t// Perform query on default connection\n\t\tif (is_null($_sitelib_db_conn)) {\n\t\t\t$_sitelib_db_rs = mysql_query($query);\n\t\t} else {\n\t\t\t$_sitelib_db_rs = mysql_query($query, $_sitelib_db_conn);\n\t\t} \n\t\tif ($_sitelib_db_rs === false) {\n\t\t\t// Raise Fatal Error if there was error while performing the query\n\t\t\tloge(\"SQL error \" . mysql_error($_sitelib_db_conn) . \" in: $query\");\n\t\t}\n\t\t// Get number of rows affected\n\t\t$_sitelib_db_num_rows = mysql_num_rows($_sitelib_db_rs);\n\t\tlogn(\"rows affected: \" . $_sitelib_db_num_rows);\n\t\treturn $_sitelib_db_rs;\n\t}", "title": "" }, { "docid": "4df88131b3164cf9e949a8dd29e636b0", "score": "0.58660316", "text": "function selectAll() {\r\n $sql = \"SELECT c.ID, c.CampaignId, c.ImportId, c.IDENTIFICACION, c.NOMBRES,\"\r\n . \"cc.LastAgent 'Agent', c.ResultLevel2 \"\r\n . \"FROM clientes c, cck.contactimportcontact cc \"\r\n . \"where c.Id = cc.id and cc.LastAgent = '$_SESSION[usu]' \"\r\n . \"and (cc.action = 'reciclar base' or cc.action = 'asignar base') and cc.action <> 'cancelar base' \";\r\n return ejecutarConsulta10($sql);\r\n }", "title": "" }, { "docid": "75357d9c5e03697b0ba98235dd3acbe8", "score": "0.5862561", "text": "function getSelectSQL($selection, $selected_typ, $selected_lev){\r\n\r\n\t$squery = '';\r\n\tif($selection == \"s01\") {\r\n\t\t//Bild query for country bar\r\n\t\t$squery = 'SELECT * FROM elektora.last_participation WHERE country_id > 0 ORDER BY country_id';\r\n\t\t\t\t\r\n\t} elseif($selection == \"s02\") {\r\n\t\t//Bild query for region bar\r\n\t\t$squery = 'SELECT * FROM elektora.last_participation WHERE country_id > 0 ORDER BY country_id';\r\n\t\t\r\n\t} elseif($selection == \"s03\") {\r\n\t\t//Bild query for reg participation chart\r\n\t\t$sql=\"SELECT Concat(participation.Country,(If(participation.Compulsory='Yes','*',''))) As Country \";\r\n\t\t$current_year = date(\"Y\");\r\n\t\tfor ($y = 1982; $y <= $current_year; $y++) {\r\n\t\t\t$sql .= \", max(IF(Year_Ele =\" . $y . \",Registered_Participation, NULL)) AS '\" . $y . \"'\";\r\n\t\t} \r\n\t\t$sql .= \" FROM elektora.participation \";\r\n\t\tif($selected_typ == \"PRE\" or $selected_typ == \"PAR\") { \r\n\t\t\tsql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\"; \r\n\t\t} \r\n\t\t$sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t\r\n\t\t$squery = $sql;\r\n\t\t\r\n\t} elseif($selection == \"s04\") {\r\n\t\t//Bild query for vap participation chart\r\n\t\t$sql=\"SELECT Concat(participation.Country,(If(participation.Compulsory='Yes','*',''))) As Country \";\r\n\t\t$current_year = date(\"Y\");\r\n\t\tfor ($y = 1982; $y <= $current_year; $y++) {\r\n\t\t\t$sql .= \", max(IF(Year_Ele =\" . $y . \",Voting_Age_Participation, NULL)) AS '\" . $y . \"'\";\r\n\t\t} \r\n\t\t$sql .= \" FROM elektora.participation \";\r\n\t\tif($selected_typ == \"PRE\" or $selected_typ == \"PAR\") { \r\n\t\t\tsql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\"; \r\n\t\t} \r\n\t\t$sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t\r\n\t\t$squery = $sql;\r\n\r\n\t} elseif($selection == \"s05\") {\r\n\t\t//Bild query for index inclusion chart\t\t\t\r\n\t\t$sql=\"SELECT Concat(participation.Country,(If(participation.Compulsory='Yes','*',''))) As Country \";\r\n\t\t$current_year = date(\"Y\");\r\n\t\tfor ($y = 1982; $y <= $current_year; $y++) {\r\n\t\t\t$sql .= \", max(IF(Year_Ele =\" . $y . \",Electoral_Inclusion_Index, NULL)) AS '\" . $y . \"'\";\r\n\t\t} \r\n\t\t$sql .= \" FROM elektora.participation \";\r\n\t\tif($selected_typ == \"PRE\" or $selected_typ == \"PAR\") { \r\n\t\t\tsql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\"; \r\n\t\t} \r\n\t\t$sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t\r\n\t\t$squery = $sql;\r\n\t\t\r\n\t} elseif($selection == \"s06\") {\r\n\t\t//Bild query for electoral map\t\t\t\t\r\n\t\t$reg_sql=\"SELECT Country, Siglas, upper(substr(participation.Type, 1, 3)) as Type, Country_Id \";\r\n\t\t$vap_sql=\"SELECT Country, Siglas, upper(substr(participation.Type, 1, 3)) as Type, Country_Id \";\r\n\t\t$idx_sql=\"SELECT Country, Siglas, upper(substr(participation.Type, 1, 3)) as Type, Country_Id \";\r\n\t\t$current_year = date(\"Y\");\r\n\t\tfor ($y = 1982; $y <= $current_year; $y++) {\r\n\t\t\t\t$reg_sql .= \", max(IF(Year_Ele =\" . $y . \",Registered_Participation, NULL)) AS '\" . $y . \"'\";\r\n\t\t\t\t$vap_sql .= \", max(IF(Year_Ele =\" . $y . \",Voting_Age_Participation, NULL)) AS '\" . $y . \"'\";\r\n\t\t\t\t$idx_sql .= \", max(IF(Year_Ele =\" . $y . \",Electoral_Inclusion_Index, NULL)) AS '\" . $y . \"'\";\r\n\t\t} \r\n\t\t$reg_sql .= \" FROM elektora.participation \";\r\n\t\t$vap_sql .= \" FROM elektora.participation \";\r\n\t\t$idx_sql .= \" FROM elektora.participation \";\r\n\t\t\t\r\n\t\tif($selected_typ == \"PRE\" or $selected_typ == \"PAR\") { \r\n\t\t\t$reg_sql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\"; \r\n\t\t\t$vap_sql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\";\r\n\t\t\t$idx_sql .= \" WHERE upper(substr(participation.Type, 1, 3)) = '\" . $selected_typ . \"'\";\r\n\t\t} \r\n\t\t$reg_sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t$vap_sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t$idx_sql .= \" GROUP BY Country_Id ORDER BY Country_Id, Year_ELE\";\r\n\t\t\t\r\n\t\t$squery = $reg_sql;\r\n\t\t\r\n\t} else {\r\n\t\t$squery = 'SELECT NOW() FROM DUAL'; }\r\n\t\r\n\treturn $squery;\r\n}", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.5857627", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.58568376", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.58568376", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.5852327", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.5852327", "text": "function query() {\n }", "title": "" }, { "docid": "8ac7689b9071c05f27195cafc32b112b", "score": "0.58369523", "text": "protected abstract function getSelectStatement();", "title": "" }, { "docid": "ccc0479c62d890fb16f6f20b7aac898a", "score": "0.5827328", "text": "function selectAllRec() {\r\n $sql = \"SELECT g.ID, g.CampaignId, g.ImportId, g.IDENTIFICACION, g.NOMBRES, \"\r\n . \"g.Agent 'Agent', g.ResultLevel2, g.managementresultcode \"\r\n . \"from gestionfinal g, cck.contactimportcontact c \"\r\n . \"where g.contactid = c.id and c.LastAgent = '$_SESSION[usu]' and \"\r\n . \"( c.LastManagementResult >= '18' and c.LastManagementResult <= '23') \"\r\n . \"and (c.action <> 'cancelar base' and c.ACTION = 'gestionado')\";\r\n return ejecutarConsulta10($sql);\r\n }", "title": "" }, { "docid": "c2e7fa99afb9e156197105de53d7fcf0", "score": "0.58264697", "text": "public function selectEg2()\n\t{\n\t // call first method. connect\n \t$this->db->connect();\n \t\n \t//($table, $rows, $where, $order, $limit)\n\t if($this->db->select('City','*', 'name=\"Vancouver\"', null, 10) == true) { //SELECT a *(all) LIMIT 10 \n \t $result = $this->db->getResult();\n\t }\n\t $this->db->disconnect(); // disconnect from DB\n\t \n\t return $result; // return the results\n\t}", "title": "" }, { "docid": "44f12798cbaea740fb25afb948599fb3", "score": "0.58258927", "text": "public function real_query(){}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.5824276", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.5824276", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.5824276", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "1f242ddb357ed140ce249ec75997fe17", "score": "0.58174264", "text": "function servicios()\n{\n $conex=conectar_bdd();\n $sql=\"SELECT * from servei\";\n $resultado= mysql_query($sql);\n while ($row= mysql_fetch_array($resultado))\n {\n echo \"<option value=\".$row['id_servei'].\">\".$row['nom_servei'].\"</option>\";\n }\n mysql_close();\n \n}", "title": "" }, { "docid": "a6dcfe94f987a285b7cee73173df401a", "score": "0.58129245", "text": "function showAllData() {\n // but outside the function, into the scope of the function...\n global $connection;\n \n // set the db query as a string in a variable\n $query = \"SELECT * FROM users \";\n // \"mysqli_query\" is a prebuilt function that has parameters\n // \"connection\" and \"query\".\n $result = mysqli_query($connection, $query);\n\n if (!$result) {\n // prebuilt error handling in \"mysqli\"\n die(\"Query FAILED: \" . mysqli_error());\n }\n // \"mysqli_fetch_assoc\" outputs an associative array\n while($row = mysqli_fetch_assoc($result)) {\n $id = $row['id'];\n echo \"<option value='$id'>$id</option>\";\n }\n }", "title": "" }, { "docid": "caa49f235355e96e980bf6c59387d78b", "score": "0.5807423", "text": "function dbSelect($dbConn){\n // setup SELECT query\n $selectQuery = \"SELECT * FROM monthsTable\";\n // execute the query to MySQL\n $result = $dbConn->query($selectQuery);\n $dbConn->close();\n return $result;\n}", "title": "" }, { "docid": "138923f0028d1eb7d0091c7c819f8f8a", "score": "0.57814795", "text": "function getSelectQuery()\n {\n return \"CALL selectDrivers($this->start,$this->count,'$this->orderByColumn',$this->isDesc,'$this->searchString');\";\n }", "title": "" }, { "docid": "c9e257d01fcd21196225906d8a1e2e30", "score": "0.57809716", "text": "public function select_db() {\n\t\t@mysql_select_db($this->dbname,self::$dblink) or die($this->error());\n\t}", "title": "" }, { "docid": "6a7cae39821bf1ee1cfec4cfa6bbc28e", "score": "0.5780779", "text": "public function runQuery()\n {\n }", "title": "" }, { "docid": "0dd1a9ed8315d3b4479ef28552f1192d", "score": "0.57750773", "text": "function listingclients () {\n\n $query_c= 'SELECT * FROM customers';\n return queryproducts($query_c);\n}", "title": "" }, { "docid": "5f91b351037f878df9296b7d94be31e8", "score": "0.5773213", "text": "function sqlSelect()\n {\n $cad=\"select pai_codigo,pai_descripcion from pais order by pai_codigo,pai_descripcion\";\n return($cad);\n }", "title": "" }, { "docid": "0404beb3ca0b685fd36177cf1b3265b8", "score": "0.57707274", "text": "public function select($tbl){\n\t $res = $this->sql(\"SELECT * FROM \".$tbl); \n\t return $res;\n }", "title": "" }, { "docid": "9f5d8f8d2b34f45c0ba9951e99954ea1", "score": "0.5766783", "text": "function tour_select_loaitour_1_all(){\n\t\t$sql = \"SELECT * FROM tour WHERE TypeTourID=1\";\n\t\treturn pdo_query($sql);\n\t}", "title": "" }, { "docid": "fdea4f0322b7f19d781670da69141454", "score": "0.5765728", "text": "public function queries();", "title": "" }, { "docid": "9a4897fbf84f9bf9466dc5e741aecad9", "score": "0.5755352", "text": "function getcallinguserlist(){\n $logged_distric_users=logged_distric_users();\n $district_user_id=$logged_distric_users['district_user_id'];\n $sql_calling=\"SELECT * FROM userslists WHERE district_id='$district_user_id' AND user_type='CALLING USER'\";\n $resutl_calling=execute_sql_query($sql_calling);\n while ($get_calling=execute_fetch($resutl_calling)) {\n ?>\n <option value=\"<?php echo $get_calling['userslist_id']?>\"><?php echo $get_calling['name'];?></option>\n <?php \n }\n }", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.575487", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "cb9c28d96c7092da258c2db807b50757", "score": "0.5750664", "text": "function select($id){\r\n\t\t$sql = \"SELECT SEQ_TIME_SHEET, SEQ_CHAMADO, NUM_MATRICULA, to_char(DTH_INICIO, 'dd/mm/yyyy hh24:mi:ss') as DTH_INICIO,\r\n\t\t\t\t DTH_INICIO as DTH_INICIO_DATA, to_char(DTH_FIM, 'dd/mm/yyyy hh24:mi:ss') as DTH_FIM, DTH_FIM as DTH_FIM_DATA,\r\n\t\t\t\t b.NOM_COLABORADOR, d.NOM_EQUIPE_TI, d.SEQ_EQUIPE_TI, d.COD_DEPENDENCIA\r\n\t\t\t\tFROM gestaoti.time_sheet a, gestaoti.viw_colaborador b, gestaoti.recurso_ti c, gestaoti.equipe_ti d\r\n\t\t\t\tWHERE a.NUM_MATRICULA = b.NUM_MATRICULA_COLABORADOR\r\n\t\t\t\tand a.NUM_MATRICULA = c.NUM_MATRICULA_RECURSO\r\n\t\t\t\tand c.SEQ_EQUIPE_TI = d.SEQ_EQUIPE_TI\r\n\t\t\t\tand a.SEQ_TIME_SHEET = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\t\t$row = pg_fetch_object($result, 0);\r\n\t\t$this->SEQ_TIME_SHEET = $row->SEQ_TIME_SHEET;\r\n\t\t$this->SEQ_CHAMADO = $row->SEQ_CHAMADO;\r\n\t\t$this->NUM_MATRICULA = $row->NUM_MATRICULA;\r\n\t\t$this->DTH_INICIO = $row->DTH_INICIO;\r\n\t\t$this->DTH_FIM = $row->DTH_FIM;\r\n\t\t$this->COD_DEPENDENCIA = $row->COD_DEPENDENCIA;\r\n\t\t$this->NOM_EQUIPE_TI = $row->NOM_EQUIPE_TI;\r\n\t\t$this->SEQ_EQUIPE_TI = $row->SEQ_EQUIPE_TI;\r\n\t\t$this->NOM_COLABORADOR = $row->NOM_COLABORADOR;\r\n\t}", "title": "" }, { "docid": "50fcfe2c49dda602adc818eb5444d45e", "score": "0.57496566", "text": "function select_db(){\n\t\t$this->connect_db();\n\t\tmysql_select_db($this->db,$this->conn);\n\t}", "title": "" }, { "docid": "0fea35106b3d92f176ef82daea2f574f", "score": "0.5742951", "text": "public function select()\r\n\t\t{\r\n\r\n\t\t\t$sql = $this->field.'\r\n\t\t\t\t\tfrom '.$this->table.'\r\n\t\t\t\t\t'.$this->where.'\r\n\t\t\t\t\t'.$this->group.'\r\n\t\t\t\t\t'.$this->having.'\r\n\t\t\t\t\t'.$this->order.' \r\n\t\t\t\t\t'.$this->limit;\r\n\t\t\t$this->sql = $sql;\r\n $this->initialization();\r\n\r\n\t\t\t$res = $this->db->query($sql);\r\n if (!$res) {\r\n throw new Exception('数据库查询语句出错:' . $this->sql, 10001);\r\n }\r\n\r\n\t\t\t$data = $res->fetchALL(PDO::FETCH_ASSOC);\r\n\t\t\treturn $data;\r\n\t\t}", "title": "" }, { "docid": "c316dcbcdb8016c9b08a5860944143e3", "score": "0.5742308", "text": "function Select_DW($SQLCommand){\n\tglobal $DB_DW;\n\n\tmysql_select_db($DB_DW);\n\t\n\t$Result = mysql_query($SQLCommand);\n\t\n\treturn $Result;\n}", "title": "" }, { "docid": "31e76049b06b93dcc5f397efe0e6a336", "score": "0.5723359", "text": "function select(){\r\n global $connection;\r\n if(!$connection){\r\n die (\"FAILED TO CONNECT\");\r\n }\r\n //getting value from search bar \r\n $search_bar = filter_input(INPUT_POST, 'searchLaber', FILTER_SANITIZE_SPECIAL_CHARS);\r\n //checking is search bar empty if is empty showing all from table if not showing only selected by firstname or surename or email\r\n if($search_bar == null){\r\n $sql=mysqli_query($connection,\"SELECT * FROM users_of_app \");\r\n }else{\r\n $sql=mysqli_query($connection,\"SELECT * FROM users_of_app WHERE (firstname = '\".$search_bar.\"') OR (surename = '\".$search_bar.\"') OR (email = '\".$search_bar.\"')\");\r\n }\r\n //using while loop to chatch all values and print them\r\n while($row = mysqli_fetch_array($sql)){\r\n if(!$row){\r\n die(\"QUERY FAILED\");\r\n }\r\n echo \"<tr>\";\r\n echo \"<td>{$row['firstname']}</td>\";\r\n echo \"<td>{$row['surename']}</td>\";\r\n echo \"<td>{$row['email']}</td>\";\r\n echo \"<td>{$row['password']}</td>\";\r\n echo \"</tr>\";\r\n }\r\n}", "title": "" }, { "docid": "a4a721dae2ed81763d498f60d1ae49f9", "score": "0.5721991", "text": "function MySQL(){\r\n }", "title": "" }, { "docid": "9214366fe3250f8cfb9c0912e01c7ba3", "score": "0.57174623", "text": "function select($sql) {//Read\n\t\t global $cfg;\n\n\t\t $mysqli = $this->getConnection(); \n\t\t $hRes = mysqli_query($mysqli,$sql);\n\t\t if(!$hRes) {\n\t\t $err = mysqli_error($mysqli);\n\t\t throw new Exception($err);\n\t\t }\n\n\t\t $arReturn = array();\n\t\t while(($row = mysqli_fetch_assoc($hRes)) ) {\n\t\t $arReturn[] = $row;\n\t\t }\n\t\t\tmysqli_free_result($hRes);\n\t\t\t\treturn $arReturn;\n\t\t\t\tmysqli_close($this->hConn);\n\n\t }", "title": "" }, { "docid": "86858c7a05c4f4dac77a48b29088e862", "score": "0.5715617", "text": "function Recordset_Selecting(&$filter) {\n\t\tif (CurrentPageID()==\"list\"){\n\t\t\tread_BC();\n\t\t}\n\t}", "title": "" }, { "docid": "3768a42862a19c2b0d6d4d1994478eae", "score": "0.57137764", "text": "function listingproducts () {\n\n $query_1= 'SELECT * FROM products';\n return queryproducts($query_1);\n}", "title": "" }, { "docid": "d2185bbcc7a8346466fbc1dabfb13a6d", "score": "0.5706391", "text": "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "title": "" }, { "docid": "d2185bbcc7a8346466fbc1dabfb13a6d", "score": "0.5706391", "text": "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "title": "" }, { "docid": "5df9b0f1ef25f94716bf337fbe1c5298", "score": "0.57052416", "text": "function communityselect() {\r\n return $this->db->query(\"select * from users\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7801dbda50e77eaa0952346ae7312008", "score": "0.57012606", "text": "function Select_PINN($SQLCommand){\n\tglobal $DB_PINN;\n\n\tmysql_select_db($DB_PINN);\n\t\n\t$Result = mysql_query($SQLCommand);\n\t\n\treturn $Result;\n}", "title": "" }, { "docid": "500979acac0928b663c110b2eeab891d", "score": "0.5687261", "text": "public function selectAllUserQuery(){\r\n $this->myQuery=\"SELECT * FROM $this->tableName\";\r\n return $this->myQuery;\r\n }", "title": "" }, { "docid": "fac83e79e4cea56cf4b0c317e837f887", "score": "0.56809425", "text": "function pgQuery( )\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "4da1a9b0dfb594c025d7080d39d33f23", "score": "0.56702673", "text": "protected function select(): array\n {\n }", "title": "" }, { "docid": "c076b0a0689627adecc53ddbf555f815", "score": "0.5670055", "text": "public function query()\n\t{\n\t\techo \"Running query on database conenction...<br />\\n\";\n\t}", "title": "" }, { "docid": "13da5f9489d7ee2ae2ab3d6ce7a92c1a", "score": "0.56613183", "text": "public function on_select () {\n //Session\n set_info('perso_id', $this->id);\n $this->set_flag(\"site.lastlogin\", $_SERVER['REQUEST_TIME']);\n define(\"PersoSelected\", true);\n }", "title": "" }, { "docid": "7a6fadf5b915e3db9c2f550ce13802cf", "score": "0.56588835", "text": "public function select_all_services(){\n $sql = \"SELECT * FROM services\";\n if(mysqli_query($this->link, $sql)) {\n $query_result = mysqli_query($this->link, $sql);\n return $query_result;\n } else {\n die('query problem' . mysqli_error($this->link));\n }\n }", "title": "" } ]
ac11bfef9bccffb08aa680dd27ff89b9
Gets the headers in an array suitable to be passed into CURL (nonassociative array)
[ { "docid": "192fc8b2773b965c515f69c363404d16", "score": "0.67968005", "text": "public function getHeadersAsPlainArray(){\n \n $plain_array = array();\n foreach( $this->headers as $key => $value ){\n $plain_array[] = \"$key: $value\";\n } \n return $plain_array;\n \n }", "title": "" } ]
[ { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.80059874", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.80059874", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.80059874", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "389662d3d7e47ba6a380fec1efa95ec1", "score": "0.7939643", "text": "public function getHeaders()\n\t{\n\t\treturn isset($this->options[CURLOPT_HTTPHEADER])\n\t\t\t? $this->options[CURLOPT_HTTPHEADER]\n\t\t\t: [];\n\t}", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.77851367", "text": "public function getHeaders();", "title": "" }, { "docid": "7248d680d127f2005a0ad94b498d373b", "score": "0.76656073", "text": "function getHeaders();", "title": "" }, { "docid": "2446055adec0270b1f16642a5f11bfed", "score": "0.76515156", "text": "public function get_headers();", "title": "" }, { "docid": "86f2ebc2700948147b2b932d43d0af77", "score": "0.75795335", "text": "public function httpHeaders(): array;", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.7547984", "text": "public function headers(): array;", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.7547984", "text": "public function headers(): array;", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.7547984", "text": "public function headers(): array;", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.7547984", "text": "public function headers(): array;", "title": "" }, { "docid": "4f76af13358252a66c5b41941f50e202", "score": "0.75054747", "text": "private function getHeaders() {\n $headers = array();\n $headerHash = array();\n\n // use custom headers if specified\n if (isset($this->settings['headers'])) {\n $headerHash = $this->settings['headers'];\n }\n\n // set Content-Length if 'data' is present and not uploading file\n if (isset($this->settings['data']) && !isset($this->settings['file'])) {\n $headerHash['Content-Length'] = strlen($this->settings['data']);\n }\n\n if (!isset($this->settings['dataType']) ||\n $this->settings['dataType'] === 'json') {\n $headerHash['Content-Type'] = 'application/json; charset=utf-8';\n }\n\n if (!isset($headerHash['Authorization'])) {\n $headerHash['Authorization'] = $this->authHeader();\n }\n \n $headerHash['Connection'] = \"close\";\n \n // collapse array keys with differing case\n $headerHash = array_change_key_case($headerHash);\n\n // return array of header strings\n foreach (array_keys($headerHash) as $header) {\n $headers[] = ucwords($header).': '.$headerHash[$header];\n }\n return $headers;\n }", "title": "" }, { "docid": "51f0e6059eee75c3d84ae908967f4e83", "score": "0.74706566", "text": "public function getHeaders() : array\n {\n return getallheaders();\n }", "title": "" }, { "docid": "35ddfd7d9846a5f8076f1c56296510eb", "score": "0.74637616", "text": "protected function _getHeaders() {\n $headers = array();\n foreach($this->http_headers as $k => $v) {\n $headers[] = $k . ': ' . $v;\n }\n return $headers;\n }", "title": "" }, { "docid": "0d9a21654fad4bbd06a386849673f37c", "score": "0.7437123", "text": "public function getAllHeaders(): array;", "title": "" }, { "docid": "0d6f7c715132c55842c0c17d89d8020a", "score": "0.7415539", "text": "public function getHeaders(): array\n {\n return array_merge(...array_values($this->headers));\n }", "title": "" }, { "docid": "2c91e71df48175ecbeb65669038f137a", "score": "0.7415526", "text": "public function getHeaders(): array {\r\n return $this->_response['headers'];\r\n }", "title": "" }, { "docid": "4b759604b22586361c219f603fb48d53", "score": "0.73966545", "text": "function curl_getheaders( $url ){\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_HEADER => true,\n CURLOPT_NOBODY => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => $url));\n $headers = array();\n foreach (explode(\"\\n\", curl_exec($curl)) as $key => $header) {\n if (!$key) {\n $headers[] = $header;\n } else {\n $header = explode(':', $header);\n $headers[trim($header[0])] = isset($header[1]) ? trim($header[1]) : '';\n }\n }\n curl_close($curl);\n return count($headers) < 2 ? false : $headers;\n}", "title": "" }, { "docid": "94d04ba52128b6e57f2846527fae1164", "score": "0.7375933", "text": "public function getHeaders()\n {\n return [];\n }", "title": "" }, { "docid": "e55faf8c229ca56643b99701c1192984", "score": "0.7341864", "text": "public function getResponseHeaders(): array {\n\t\t$text = file_get_contents ( stream_get_meta_data ( $this->response_headers_file_handle ) ['uri'] );\n\t\t// ...\n\t\treturn $this->splitHeaders ( $text );\n\t}", "title": "" }, { "docid": "4e1771057a6a120950b5b991ed05040f", "score": "0.7324124", "text": "protected function _getHeaders () {\n\t\t$headers = array();\n\t\tforeach ($this->_headers as $key => $value) {\n\t\t\tif ($value !== null) $headers[] = $key . \": \" . $value;\n\t\t}\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "64721b3270be5ac37d76e148ee2f1f24", "score": "0.73066175", "text": "public function getHeaders(): array\n\t{\n\t\t$headers = [];\n\n\t\t// Explicit list of headers that aren't prefixed with HTTP_\n\t\t$contentHeaders = ['CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE'];\n\n\t\tforeach ($this->all() as $key => $value)\n\t\t{\n\t\t\tif (strpos($key, 'HTTP_') === 0)\n\t\t\t{\n\t\t\t\t$headers[substr($key, 5)] = $value;\n\t\t\t}\n\t\t\telseif (in_array($key, $contentHeaders))\n\t\t\t{\n\t\t\t\t$headers[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Extract authentication based headers if able\n\t\tif ($this->exists('PHP_AUTH_USER'))\n\t\t{\n\t\t\t$headers['PHP_AUTH_USER'] = $this->get('PHP_AUTH_USER');\n\t\t\t$headers['PHP_AUTH_PW'] = $this->get('PHP_AUTH_PW', '');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$authorizationHeader = null;\n\n\t\t\tif ($this->exists('HTTP_AUTHORIZATION'))\n\t\t\t{\n\t\t\t\t$authorizationHeader = $this->get('HTTP_AUTHORIZATION');\n\t\t\t}\n\t\t\telseif ($this->exists('REDIRECT_HTTP_AUTHORIZATION'))\n\t\t\t{\n\t\t\t\t$authorizationHeader = $this->get('REDIRECT_HTTP_AUTHORIZATION');\n\t\t\t}\n\n\t\t\tif ($authorizationHeader !== null)\n\t\t\t{\n\t\t\t\tif (stripos($authorizationHeader, 'basic ') === 0)\n\t\t\t\t{\n\t\t\t\t\t// Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n\t\t\t\t\t$exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2);\n\n\t\t\t\t\tif (count($exploded) === 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tlist($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (empty($this->get('PHP_AUTH_DIGEST')) && stripos($authorizationHeader, 'digest ') === 0)\n\t\t\t\t{\n\t\t\t\t\t// In some circumstances PHP_AUTH_DIGEST needs to be set\n\t\t\t\t\t$headers['PHP_AUTH_DIGEST'] = $authorizationHeader;\n\t\t\t\t\t$this->set('PHP_AUTH_DIGEST', $authorizationHeader);\n\t\t\t\t}\n\t\t\t\telseif (stripos($authorizationHeader, 'bearer ') === 0)\n\t\t\t\t{\n\t\t\t\t\t// There is no standard \"PHP_AUTH_BEARER\" header so just set this value to the Authorization header\n\t\t\t\t\t$headers['AUTHORIZATION'] = $authorizationHeader;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($headers['AUTHORIZATION']))\n\t\t{\n\t\t\treturn $headers;\n\t\t}\n\n\t\t// PHP_AUTH_USER/PHP_AUTH_PW\n\t\tif (isset($headers['PHP_AUTH_USER']))\n\t\t{\n\t\t\t$headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);\n\t\t}\n\t\telseif (isset($headers['PHP_AUTH_DIGEST']))\n\t\t{\n\t\t\t$headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];\n\t\t}\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "0c5fb1cc6a301dda62e622812b0e1742", "score": "0.72830516", "text": "function getallheaders(): array\n {\n $headers = [];\n\n $copy_server = [\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n ];\n\n foreach ($_SERVER as $key => $value) {\n if ('HTTP_' === substr($key, 0, 5)) {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $basic_pass = $_SERVER['PHP_AUTH_PW'] ?? '';\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "d3efcbd65c202ccfe5ad734fc28f2033", "score": "0.7280353", "text": "public function getHeaders()\n\t{\n\t\tif (empty($this->headers)) {return false;}\n\t\t$ret = array();\n\n\t\tforeach ($this->headers as $header) {\n\t\t\t$h = array();\n\t\t\t$h['type_name'] = isset($this->headerNames[$header['type']])\n\t\t\t\t? $this->headerNames[$header['type']] : 'Unknown';\n\t\t\t$h += $header;\n\t\t\t$ret[] = $h;\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "8c4935752d3239256adf66e281b9e265", "score": "0.7277142", "text": "public function getHeaders()\n {\n $arrHeaders = array();\n foreach ($_SERVER as $key => $value) {\n if (strlen($key) > 5 && substr($key, 0, 5) == 'HTTP_') {\n $arrHeaders[$key] = $value;\n }\n }\n return $arrHeaders;\n }", "title": "" }, { "docid": "fadd59b44070ba79b823cefe467ddcab", "score": "0.7276075", "text": "public function getHeaders(): array\n {\n $result = [];\n\n $result['headers'] = [\n 'Content-Type' => static::CONTENT_TYPE,\n 'Accept' => static::ACCEPT,\n ];\n\n return $result;\n }", "title": "" }, { "docid": "e56d2f64a453aaaf5094d35a88dcf671", "score": "0.7275354", "text": "private function getHeaders(): array\n {\n $headers = [];\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) <> 'HTTP_') {\n continue;\n }\n\n $header = str_replace(\n ' ',\n '-',\n ucwords(str_replace('_', ' ', strtolower(substr($key, 5))))\n );\n\n $headers[$header] = $value;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "2735ce734fb27ee320ec6f04c93519e4", "score": "0.7263696", "text": "private static function getRequestHeaders()\n\t{\n\t\treturn getallheaders();\n\t}", "title": "" }, { "docid": "7028b5db95629fe2d6ab024eb15dc3bb", "score": "0.7257757", "text": "abstract public function getHeadersList();", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.7244144", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.7244144", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.7244144", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.7244144", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.7244144", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "5accf48144e1d6c1bd7f153c1a1d5b8a", "score": "0.7243812", "text": "public function getHeaders()\n {\n return array_map( function( $name, $value ) {\n return \"{$name}: {$value}\";\n }, array_keys( $this->headers ), array_values( $this->headers ) );\n }", "title": "" }, { "docid": "13aca8af3bfb445ccb0977409ac4b7cd", "score": "0.7219287", "text": "private function get_headers() {\n $headers = [];\n $headers[] = get_string('status');\n $headers[] = get_string('grade');\n $headers[] = get_string('attemptedon', 'report_embedquestion');\n return $headers;\n }", "title": "" }, { "docid": "2db8b507a88eb181fea0c0dabc3fe246", "score": "0.7213759", "text": "public function getResponseHeaders ();", "title": "" }, { "docid": "d675580dd6c71be769053666f7965b79", "score": "0.72057945", "text": "public function headers() : array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "80ff1bf23a74d72002d252bd31cf86af", "score": "0.71933764", "text": "public function getAllHeaders();", "title": "" }, { "docid": "1b33b8996b5316bdb49facd3b8647f8c", "score": "0.7139321", "text": "public function headers(){\n\t\t$headerArray = array();\n\t\tforeach ($this->propMap as $k=>$v){\n\t\t\tif(strpos($k, self::HEADER_PREFIX)===0){\n\t\t\t\t$k = substr($k, strlen(self::HEADER_PREFIX));\n\t\t\t\tif(!is_object($v)){ // ignore object header which may be used in SOAP\n\t\t\t\t\t$headerArray[]=$k.': '.$v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headerArray;\n\t}", "title": "" }, { "docid": "e920fa4dfca83e594b29c74558c8fdf7", "score": "0.71314883", "text": "public function getRequestHeaders(): array {\n\t\t$requestsHeaders = $this->getRequestsHeaders ();\n\t\t$requestCount = count ( $requestsHeaders );\n\t\tif ($requestCount === 0) {\n\t\t\treturn array ();\n\t\t}\n\t\treturn $requestsHeaders [$requestCount - 1];\n\t}", "title": "" }, { "docid": "7eca193ff978422ba7bcd3bcf7a6a034", "score": "0.71272904", "text": "public function getHeaders($header = null)\n {\n if (!is_null($header))\n $this->result['header'][$header];\n return $this->result['header'];\n }", "title": "" }, { "docid": "0b8b197aeac4f284899af7b22196e123", "score": "0.71149874", "text": "public function getHeaders()\n\t{\n\t\t$headers = [];\n\t\tforeach ($_SERVER as $key => $value) { \n\t\t\tif (substr($key, 0, 5) == 'HTTP_') { \n\t\t\t\t$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))))] = $value; \n\t\t\t}\n\t\t} \n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "a4eff02ee7d538107767fb55d9124f62", "score": "0.7108121", "text": "public function getHeaders()\n {\n if ($this->_headers === null) {\n $this->_headers = array();\n if (function_exists('getallheaders')) {\n foreach(getallheaders() as $key => $value) {\n $this->_headers[strtolower($key)] = $value;\n }\n }\n else {\n // php fpm doesn't yet implement getallheaders\n foreach($_SERVER as $name => $value) {\n if (substr($name, 0, 5) === 'HTTP_') {\n $this->_headers[str_replace('_', '-', strtolower(substr($name, 5)))] = $value;\n }\n }\n }\n }\n return $this->_headers;\n }", "title": "" }, { "docid": "5177500686a746aae5bc15f49ed6b9f1", "score": "0.71045583", "text": "private function getHeaders()\n {\n // Define a headers array\n $headers = array();\n foreach ($this->server as $key => $value) {\n // Does our server attribute have our header prefix?\n if (self::hasPrefix($key, self::$http_header_prefix)) {\n // Add our server attribute to our header array\n $headers[substr($key, strlen(self::$http_header_prefix))] = $value;\n } elseif (in_array($key, self::$http_nonprefixed_headers)) {\n // Add our server attribute to our header array\n $headers[$key] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "d9022e992ef480c17615326c8c7f5fb9", "score": "0.70958525", "text": "public function getRequestHeaders()\n {\n // getallheaders available, use that\n if (function_exists('getallheaders'))\n return getallheaders();\n\n // getallheaders not available: manually extract 'm\n $headers = [];\n foreach ($this->req->server as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace([' ', 'Http'], ['-', 'HTTP'], ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "f291118c1c5942146c9a195703198fcf", "score": "0.7091808", "text": "static function getHeaders(): array\n {\n $headers = [];\n\n foreach ($_SERVER as $key => $value) {\n if (strncmp($key, 'HTTP_', 5) === 0) {\n // HTTP_*\n $headers[self::normalizeHeaderName(substr($key, 5))] = $value;\n } elseif (strncmp($key, 'CONTENT_', 8) === 0) {\n // CONTENT_*\n $contentHeader = self::normalizeHeaderName($key);\n\n if (isset(self::CONTENT_HEADER_MAP[$contentHeader])) {\n $headers[$contentHeader] = $value;\n }\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "c00a4688693aa9e6152a30c141de9d86", "score": "0.7067222", "text": "public function getHeadersValuesArray() { return $this->headers; }", "title": "" }, { "docid": "03728ad524187564a3352cef043c2845", "score": "0.70659083", "text": "public function headers(): array\n {\n return $this->response->getHeaders();\n }", "title": "" }, { "docid": "7ad6c9da55433e0047a36c2fb9ad9add", "score": "0.70632017", "text": "protected function getPreparedHeaders() : array {\n $headers=[];\n foreach ($this->__headers as $name=>$value) {\n $headers[]= $name . self::HEADER_SEPARATOR . $value;\n }\n return $headers;\n }", "title": "" }, { "docid": "986e634a529a7b1fc4a0828fbdf81596", "score": "0.7058179", "text": "public static function getallheaders()\n {\n $contenTypes = [\"content-type\", \"content_type\", \"contenttype\"];\n $headers = [];\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n if (in_array(strtolower($name), $contenTypes)) {\n $headers[\"Content-Type\"] = $value;\n }\n if (strtolower($name) == \"authentication\") {\n $headers[\"Authentication\"] = $value;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "e8ab886b979b67c291e04ab982c1aea0", "score": "0.70414037", "text": "private static function get_all_headers() {\n if (!function_exists(\"getallheaders\")) { \n $headers = array();\n $copy_server = array(\n \"CONTENT_TYPE\" => \"Content-Type\",\n \"CONTENT_LENGTH\" => \"Content-Length\",\n \"CONTENT_MD5\" => \"Content-Md5\",\n );\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === \"HTTP_\") {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(\" \", \"-\", ucwords(strtolower(str_replace(\"_\", \" \", $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n if (!isset($headers[\"Authorization\"])) {\n if (isset($_SERVER[\"REDIRECT_HTTP_AUTHORIZATION\"])) {\n $headers[\"Authorization\"] = $_SERVER[\"REDIRECT_HTTP_AUTHORIZATION\"];\n } elseif (isset($_SERVER[\"PHP_AUTH_USER\"])) {\n $basic_pass = isset($_SERVER[\"PHP_AUTH_PW\"]) ? $_SERVER[\"PHP_AUTH_PW\"] : \"\";\n $headers[\"Authorization\"] = \"Basic \" . base64_encode($_SERVER[\"PHP_AUTH_USER\"] . \":\" . $basic_pass);\n } elseif (isset($_SERVER[\"PHP_AUTH_DIGEST\"])) {\n $headers[\"Authorization\"] = $_SERVER[\"PHP_AUTH_DIGEST\"];\n }\n }\n return $headers;\n } else {\n return getallheaders();\n }\n }", "title": "" }, { "docid": "b53808f3556612e7aede5c503d1fffc1", "score": "0.7040936", "text": "public function getHeaders()\n {\n $headers = [];\n foreach ($this->headers as $header) {\n $headers[$header['name']] = $header['values'];\n }\n\n return $headers;\n }", "title": "" }, { "docid": "cf8dc075ccc8d484bc8d44a0d209822a", "score": "0.70339936", "text": "protected function prepareHeaders($headers){\n\t\t\n\t\t$http_headers = array();\n\t\t\n\t\tforeach($headers as $name => $value)\n\t\t{\n\t\t\t$http_headers[] = $name.\": \".$value;\n\t\t}\n\t\t\n\t\treturn $http_headers;\n\t\t\n\t}", "title": "" }, { "docid": "ce758da9375ea3b73ad80ab34d63dea1", "score": "0.70305", "text": "private function getHeaders()\n {\n $headers = [\n 'Accept' => 'application/json',\n ];\n\n return $headers;\n }", "title": "" }, { "docid": "fab441aa52e8f669583a31517d5bf6c9", "score": "0.70250654", "text": "function _get_headers ($url) {\n\ttry {\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\tcurl_setopt($ch, CURLOPT_NOBODY, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t# Emulate a real request - if \"visited=1\" cookie value is not present, you'll get HTTP 500\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0');\n\t\tcurl_setopt($ch, CURLOPT_COOKIE, \"bblastvisit=\".time().\"; bblastactivity=0; visited=1; xda_adtest=0\");\n\t\t$headers = _http_parse_headers(curl_exec($ch));\n\t\tcurl_close($ch);\n\t\treturn $headers;\n\t} catch (Exception $e) {\n\t\ttry {curl_close($ch);} catch (Exception $e) {}\n\t}\n}", "title": "" }, { "docid": "b006b7c3a2f3471ac5ba58d842ff849d", "score": "0.7016484", "text": "public function getHeaders()\n {\n $headers = [];\n if (!empty($this->headers)) {\n foreach ($this->headers as $key => $value) {\n $headers[$value['original']] = $value['values'];\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "3625153f83eec331a09a173bae7f198a", "score": "0.7011738", "text": "protected final function getHeaders()\n {\n $AHeaders = [];\n $index = 0;\n foreach ($this->AHeader as $key => $header) {\n $index++;\n if ('charset' == strtolower($key)) {\n $AHeaders += [\n 'meta#' . $index => [\n 'attr' => [\n 'http-equiv' => 'content-type',\n 'content' => 'text/html',\n 'charset' => $header\n ]\n ]\n ];\n }\n else {\n $AHeaders += [\n 'meta#' . $index => [\n 'attr' => [\n 'name' => $key,\n 'content' => $header\n ]\n ]\n ];\n }\n }\n return $AHeaders;\n }", "title": "" }, { "docid": "4f7f9ba7d0c89e60a68be63d305485b1", "score": "0.6993814", "text": "private function GetHttpHeaders(){\n // return if already created...\n if (!is_null($this->_requestHttpHeaders))\n return $this->_requestHttpHeaders;\n \n // ...or initialize with default headers\n $this->_requestHttpHeaders = array();\n \n // content type\n array_push($this->_requestHttpHeaders, self::$_JSON_HEADER);\n \n // Authentication http header\n if ($this->_authRequired) {\n $authHlp = new AuthenticationHelper($this->_root);\n array_push($this->_requestHttpHeaders, $authHlp->GetHttpHeaderKey());\n } \n\n return $this->_requestHttpHeaders;\n }", "title": "" }, { "docid": "78b4cfe36e4a7ccefbf9011c8372ecd3", "score": "0.69916016", "text": "protected function prepareHeaders()\n {\n $headers = [];\n\n foreach ($this->headers as $key => $value) {\n $headers[] = \"$key: $value\";\n }\n\n return $headers;\n }", "title": "" }, { "docid": "a957bf943e5a7009a6f65be757627361", "score": "0.69873405", "text": "public function headers(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "7d0d0813b53563c9423cc47de625570e", "score": "0.6978541", "text": "private static function getAllHeaders()\n {\n if (function_exists('getallheaders')) {\n return getallheaders();\n } else {\n $headers = [];\n foreach ($_SERVER as $key => $value) {\n $words = explode('_', $key);\n if (array_shift($words) === 'HTTP') {\n array_walk($words, function (&$word) {\n $word = ucfirst(strtolower($word));\n });\n $headers[implode('-', $words)] = $value;\n }\n }\n return $headers;\n }\n }", "title": "" }, { "docid": "726b8ff4e283449572382e550be0ece2", "score": "0.6971364", "text": "function getHeaders(){\n \treturn $this->scan_headers;\n\t}", "title": "" }, { "docid": "8b1b19a861680a5f3277cdfd2ee6f1dd", "score": "0.69660425", "text": "public function getHeaders(): array\n {\n return [\n 'Authorization' => 'key='.$this->getServerKey(),\n 'Content-Type' => 'application/json',\n 'project_id' => $this->getSenderId(),\n ];\n }", "title": "" }, { "docid": "04601c1de1d1f68943a79fc452314cde", "score": "0.69583917", "text": "function getallheaders()\n {\n $headers = array();\n\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === 'HTTP_') {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "5806047965d16692d4a28f1e1a2a26fd", "score": "0.69214517", "text": "function getallheaders()\r\n {\r\n $headers = array();\r\n $copy_server = array(\r\n 'CONTENT_TYPE' => 'Content-Type',\r\n 'CONTENT_LENGTH' => 'Content-Length',\r\n 'CONTENT_MD5' => 'Content-Md5',\r\n );\r\n foreach ($_SERVER as $key => $value) {\r\n if (substr($key, 0, 5) === 'HTTP_') {\r\n $key = substr($key, 5);\r\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\r\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\r\n $headers[$key] = $value;\r\n }\r\n } elseif (isset($copy_server[$key])) {\r\n $headers[$copy_server[$key]] = $value;\r\n }\r\n }\r\n if (!isset($headers['Authorization'])) {\r\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\r\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\r\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\r\n $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\r\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\r\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\r\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\r\n }\r\n }\r\n return $headers;\r\n }", "title": "" }, { "docid": "5cfbaa5f517313a3d3c556d131553605", "score": "0.69200605", "text": "public function getHeaders(): array\n {\n $headers = [];\n\n /** @var Header $header */\n foreach ($this->headers as $header) {\n $headers[$header->getFieldName()] = $header->getValues();\n }\n\n return $headers;\n }", "title": "" }, { "docid": "07a274474a66fe7d119538e1862677ff", "score": "0.6911278", "text": "private function getHeaders(): array\n {\n return [\n 'APCA-API-KEY-ID' => $this->config->getKeyId(),\n 'APCA-API-SECRET-KEY' => $this->config->getSecretKey(),\n 'Content-Type' => 'application/json',\n ];\n }", "title": "" }, { "docid": "e6edc09db9482567498428ade4d3736b", "score": "0.6902191", "text": "public function getRequestHeaders()\n {\n return getallheaders();\n }", "title": "" }, { "docid": "7740ab5e023661d2bbe751a92713f127", "score": "0.6867763", "text": "function getallheaders() {\n\t\t$headers = array();\n\n\t\t$copy_server = array(\n\t\t\t'CONTENT_TYPE' => 'Content-Type',\n\t\t\t'CONTENT_LENGTH' => 'Content-Length',\n\t\t\t'CONTENT_MD5' => 'Content-Md5',\n\t\t);\n\n\t\tforeach ( $_SERVER as $key => $value ) {\n\t\t\tif ( substr( $key, 0, 5 ) === 'HTTP_' ) {\n\t\t\t\t$key = substr( $key, 5 );\n\t\t\t\tif ( ! isset( $copy_server[ $key ] ) || ! isset( $_SERVER[ $key ] ) ) {\n\t\t\t\t\t$key = str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', $key ) ) ) );\n\t\t\t\t\t$headers[ $key ] = $value;\n\t\t\t\t}\n\t\t\t} elseif ( isset( $copy_server[ $key ] ) ) {\n\t\t\t\t$headers[ $copy_server[ $key ] ] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset( $headers['Authorization'] ) ) {\n\t\t\tif ( isset( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) ) {\n\t\t\t\t$headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n\t\t\t} elseif ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {\n\t\t\t\t$basic_pass = isset( $_SERVER['PHP_AUTH_PW'] ) ? $_SERVER['PHP_AUTH_PW'] : '';\n\t\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass );\n\t\t\t} elseif ( isset( $_SERVER['PHP_AUTH_DIGEST'] ) ) {\n\t\t\t\t$headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n\t\t\t}\n\t\t}\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "d48341d95f1f2010f72e49b40cdfb1f7", "score": "0.6864035", "text": "private function getRequestHeaders()\n {\n $headers = array();\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_'\n && $name != 'HTTP_AUTHORIZATION'\n && $name != 'HTTP_COOKIE'\n && $name != 'HTTP_X_CSRF_TOKEN') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "ad85735997592a96f3db9d73cf1fca8a", "score": "0.685037", "text": "function getallheaders()\n\t{\n\t\tif(!is_array($_SERVER)) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$headers = array();\n\t\tforeach($_SERVER as $name => $value) {\n\t\t\tif(substr($name, 0, 5) == 'HTTP_') {\n\t\t\t\t$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "efab8a60c3459d4aac5f962cb67cddfd", "score": "0.685008", "text": "function getallheaders()\n {\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "3ca676e341e6f5ff3f41bf4b2eb02c9d", "score": "0.68477935", "text": "public function getHeaders()\n {\n return $this->headers->all();\n }", "title": "" }, { "docid": "fe53761b3cf3a96a792f8f8d32add989", "score": "0.68391085", "text": "function vscheck_fetch_headers($url)\n{\n\t$headers = array();\n\t$url = trim($url);\n\t\n\t$error = 0;\n\tif(function_exists('get_headers'))\n\t{\n\t\t$url = str_replace(' ', '%20', $url);\n\t\tif (strpos($url, 'http') !== 0 && strpos($url, '//') !== 0)\n\t\t{\n\t\t\t$url = 'http://' . $url;\n\t\t}\n\t\t$headers = get_headers($url, 0);\n\t\tif(!$headers)\n\t\t{\n\t\t\t$error = 1;\n\t\t}\n\t}\n\t\n\tif($error == 1 || function_exists('get_headers') === FALSE)\n\t{\n\t\t$error = 0;\n\n\t\tif(function_exists('curl_init'))\n\t\t{\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_NOBODY ,1);\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0');\n\t\t\t$data = curl_exec($ch);\n\t\t\t$errormsg = curl_error($ch);\n\t\t\tcurl_close($ch);\n\t\t\t\n\t\t\tif($errormsg != '')\n\t\t\t{\n\t\t\t\treturn array('error' => $errormsg);\n\t\t\t}\t\t\t\t\n\t\t\t$headers = explode(\"\\n\", $data);\n\t\t}\n\t\telse if(ini_get('allow_url_fopen') == 1)\n\t\t{\n\t\t\t$fp = @fopen($url, \"r\");\n\t\t\tif ( ! $fp)\n\t\t\t{\n\t\t\t\t$error = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(function_exists('stream_get_meta_data'))\n\t\t\t\t{\n\t\t\t\t\t$data = @stream_get_meta_data($fp);\n\t\t\t\t\t$headers = $data['wrapper_data'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$headers = $http_response_header;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@fclose($fp);\n\t\t}\n\t}\n\tif ($error)\n\t{\n\t\treturn array('error' => 'Failed to open stream.');\n\t}\n\treturn $headers;\n}", "title": "" }, { "docid": "51926eab98f14eaa3c624457b5049a86", "score": "0.68289894", "text": "function parseRequestHeaders() {\n $headers = array();\n foreach($_SERVER as $key => $value) {\n if (substr($key, 0, 5) <> 'HTTP_') {\n continue;\n }\n $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n $headers[$header] = $value;\n }\n return $headers;\n }", "title": "" }, { "docid": "6604abbeb21f49c9dea74f64db5d6e69", "score": "0.68253547", "text": "function getHeaders()\n {\n if (is_array($this->headers)) {\n $tmp_headers = array();\n foreach ($this->headers as $key => $value) {\n $tmp_headers[$key] = stripslashes($value);\n }\n return $tmp_headers;\n }\n return stripslashes($this->headers);\n }", "title": "" }, { "docid": "4501139e34e5f61da3a7303bcaa623e5", "score": "0.6813144", "text": "private function getHeaders()\n {\n\n if(!function_exists('getallheaders')) {\n foreach($_SERVER as $name => $value) {\n if(substr($name, 0, 5) == 'HTTP_') {\n $this->headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n } else {\n foreach (getallheaders() as $name => $value) {\n $this->headers[$name] = $value;\n }\n }\n\n return $this->headers;\n }", "title": "" }, { "docid": "f0db62a46774df89e19c30add012c73d", "score": "0.6812489", "text": "function getallheaders(){\n $headers = array();\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n\n foreach($_SERVER as $key => $value){\n if(substr($key, 0, 5) === 'HTTP_'){\n $key = substr($key, 5);\n if(!isset($copy_server[$key]) || !isset($_SERVER[$key])){\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n }\n elseif (isset($copy_server[$key])){\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if(!isset($headers['Authorization'])){\n if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])){\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n }\n elseif (isset($_SERVER['PHP_AUTH_USER'])){\n $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\n }\n elseif (isset($_SERVER['PHP_AUTH_DIGEST'])){\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "0c031a7c60f813d1e27d2a6d9b806f5d", "score": "0.6804195", "text": "protected function loadHttpHeaders() {\n $headers = array();\n foreach ( $_SERVER as $key => $value ) {\n $key = $this->convertHttpHeaderName($key);\n if ( strpos($key, 'http-') === 0 || in_array($key, $this->additionalHeaders) ) {\n $name = str_replace('http-', '', $key);\n $headers[$name] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "720481042c491e5d76b455d7993d7b8d", "score": "0.6803794", "text": "public function getHeaderNames() {\n return $this->headers;\n }", "title": "" }, { "docid": "f2cecf04c17a456966ab93831b3e7b6c", "score": "0.6800451", "text": "public function getHeaders(){\n \treturn $this->responseHeaders;\n }", "title": "" }, { "docid": "2964448b1d3f28165cc047866feb3f31", "score": "0.67967516", "text": "public function getHeaders()\n {\n return $this->header->getHeaders();\n }", "title": "" }, { "docid": "a2ee465a2a2213b4cb0070c9f9c8b894", "score": "0.679509", "text": "public function getHeaders()\n {\n return $this->plugin->getHeaders();\n }", "title": "" }, { "docid": "874b23d0a51ca0ca299adefdbdd4d015", "score": "0.6793699", "text": "public function getHeaders () {\n\n return $this->headers;\n\n }", "title": "" }, { "docid": "d95693723a43f293f772b34b0ee47921", "score": "0.6790584", "text": "private function getRedirectIndexedHeaders()\n {\n $headers = [];\n\n foreach ($this->getRedirectAssociativeHeaders() as $name => $value) {\n $headers[] = is_int($name) ? $value : $name.': '.$value;\n }\n\n return $headers;\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "8eebf425ce52b4bb228e70caffb79698", "score": "0.0", "text": "public function authorize()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "9fb39029db943b6c00f8b0416336e051", "score": "0.82638186", "text": "public function authorize()\n {\n return $this->session()->has('user');\n }", "title": "" }, { "docid": "31beff90f07fc0d7b251495f888cf277", "score": "0.82452554", "text": "public function authorize()\n {\n\t\treturn $this->user()->isUser();\n }", "title": "" }, { "docid": "0479d42b86e5cc69fe13f40dac477d18", "score": "0.82355756", "text": "public function authorize()\n {\n return ! empty($this->user());\n }", "title": "" }, { "docid": "863c6df1a64b6980d99e321f5f5e2d24", "score": "0.8212931", "text": "public function authorize()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "aafc12ff0512ce2fb4f697c308e5f661", "score": "0.81667596", "text": "public function authorize()\n {\n return $this->getUser()->isYou();\n }", "title": "" }, { "docid": "ec001bd38e23218816604180027e4b42", "score": "0.81441534", "text": "public function authorize()\n {\n return ($this->user = $this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "97ff65f09cf39bf2988dedb9c7c1f6e7", "score": "0.81404054", "text": "public function authorize()\n {\n return $this->user() === null;\n }", "title": "" }, { "docid": "d6ac25c880181d2c548e111a3ac86671", "score": "0.8104723", "text": "public function authorize()\n {\n return (bool)$this->user();\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.8100709", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "ca1bdb4f82e7d03f71573e2c1ecd59f3", "score": "0.80492145", "text": "public function isAuthorized()\n {\n if ($this->Auth->user('status') === 'admin') {\n return true;\n } \n if (in_array($this->request->getParam('action'), ['index','logout','login','rps','api'])) {\n return true;\n }\n\n }", "title": "" }, { "docid": "50a1858aaf4be32130881da51a4ba50e", "score": "0.80286133", "text": "public function is_user_authorized() {\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "9e03a611541dce0c22ee584309b77ab3", "score": "0.8013293", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n return true;\n break;\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n default:\n return false;\n break;\n }\n }", "title": "" }, { "docid": "02a3582aa8830bf5e50a9f6468365620", "score": "0.79871935", "text": "public function isAuthorised()\n {\n if( $this->getLocalHttpClient() instanceof Zend_Oauth_Client ) \n return true;\n \n return false;\n }", "title": "" }, { "docid": "8eb22930c13eab73be9b778a8382478f", "score": "0.79708314", "text": "public function authorize()\n {\n $method = strtoupper(request()->method());\n return request()->loggedin_role === ($method === 'PATCH' || $method === 'PUT' ? 1 : 0);\n }", "title": "" }, { "docid": "fca99c69a62646c9993bb1b5cad9f01e", "score": "0.7957011", "text": "public function authorize()\n {\n $statuse = $this->route('statuse');\n\n return $statuse->user_id == auth()->id();\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7931984", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "ef9e3c49b61ee70ff93893a1e68f8cd6", "score": "0.792302", "text": "public function isAuthorized() {\n if (empty($this->authorizedToken) && empty($this->accessToken)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.78689706", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "b9e686a9cac988a9a0e707383d1afae8", "score": "0.78671783", "text": "public function isUserAllowed() {\n return $this->requiresAuthorization == false || SessionManager::isUserLoggedIn();\n }", "title": "" }, { "docid": "327cd01f92f76b75d2229e7e8f47fe5e", "score": "0.7865309", "text": "public static function userIsAuthorized()\n {\n if (isset($_SESSION['user'])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d89fe5921e4fd9a2f1fd4ee09095a657", "score": "0.7828209", "text": "public function authorize()\n {\n return $this->isMethod('PATCH') ? $this->user() !== null : true;\n }", "title": "" }, { "docid": "4ec73613993002d512777b70d5e26322", "score": "0.7811772", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n\n if ($this->isPut()) {\n return false;\n }\n\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('order'));\n }\n\n return true;\n }", "title": "" }, { "docid": "73b7dce2fefe6e6d8604c3fe33ecbddb", "score": "0.7808308", "text": "public function authorized() : bool\n {\n return $this->guard->check() && $this->authorization()->checkImpersonator($this->getImpersonator());\n }", "title": "" }, { "docid": "2743358e871796a5c78deb89fa6ac709", "score": "0.77943146", "text": "public function authorize()\n {\n return request()->session()->has('storefront_key') || request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "e44b62f87dba8a7e1dfb82bc22a4649f", "score": "0.7792129", "text": "public function isAuthorized() {\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "49cab148f10aad996ebaf915db12267a", "score": "0.7787448", "text": "protected function _isAuthorized()\n {\n return true;\n }", "title": "" }, { "docid": "5e3e481a70f68b7298ec6f10369940d0", "score": "0.7785962", "text": "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7e018dd32eb997c8f95bceb67e866e35", "score": "0.7770936", "text": "public function hasAuthorizedUser()\n {\n return (bool) $this->getSfGuardUser()->getIsAuthorized();\n }", "title": "" }, { "docid": "a0fea693a7831a81b368c3b480b2f21b", "score": "0.7769159", "text": "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Hit::class);\n }\n\n return $this->user()->can('update', Hit::class);\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7762589", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "771449ccda0adb0569e1a5079730e8ba", "score": "0.7757918", "text": "public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5f91e98a58f6f773245b5ac81143eb4e", "score": "0.7748319", "text": "public function isAuthorized()\n {\n return $this->isAuthorized;\n }", "title": "" }, { "docid": "4a6b902d3aee0b742535a85aea0c0b8a", "score": "0.7739779", "text": "public function authorize()\n {\n $trip = $this->route()->parameter('trip');\n\n if ($trip->user_id === Auth::user()->id) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724327", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724327", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724327", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "5c528e677793952976076d3dd492467d", "score": "0.7721656", "text": "public function authorize(): bool\n {\n $game = $this->route('game');\n\n return $game->user_id === auth()->id();\n }", "title": "" }, { "docid": "14db1af2b2071d6c2ea1b5e78b1da6a2", "score": "0.7708239", "text": "public function authorize()\n {\n $this->user = $this->user('api');\n\n if ($this->route('job') !== null) {\n return $this->user->can('update', $this->route('job'));\n }\n\n return true;\n }", "title": "" }, { "docid": "e45cb38000c87c835bc1548b4be9d50b", "score": "0.76954406", "text": "public function authorize()\n {\n $article = Article::find($this->article_id);\n return $this->user()->id == $article->user->id;\n }", "title": "" }, { "docid": "b22054a627c56ee2013dbfd1144e23fb", "score": "0.7694611", "text": "public function authorize()\n {\n $user = Auth::user();\n if (1 === $user->user_type_id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "532c6c1036e7cfad132d50317ea265f2", "score": "0.7693919", "text": "function isAuthorized() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7832f71f834c25d9f63805254a90e749", "score": "0.7692529", "text": "function isAuthorized(){\n\t\treturn $this->__permitted($this->name,$this->action);\n\t}", "title": "" }, { "docid": "e4e4812d5edca7c6ea5a3ecbd3fc774a", "score": "0.7690911", "text": "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "title": "" }, { "docid": "eed0ee104e748302648f3eb88bb951d7", "score": "0.7682218", "text": "public function userAuthorized()\n {\n $result = false;\n $user = $this->grav['user'];\n\n if ($user->authorized) {\n $result = $user->authorize('site.editable') || $user->authorize('admin.super') || $user->authorize('admin.pages');\n }\n return $result;\n }", "title": "" }, { "docid": "e48df3a15c8c653e638c72b60bf35dbd", "score": "0.7676738", "text": "public function authorize()\n {\n $authenticated = false;\n if (Auth::check() || Auth::guard('ngo')->check()) {\n $authenticated = true;\n }\n return $authenticated;\n }", "title": "" }, { "docid": "7493ff038140e7ba0f73ea8447c19fc3", "score": "0.7674359", "text": "public function authorize() {\n return auth()->user()->can('user', $this->route('objUser'));\n }", "title": "" }, { "docid": "37976a5e0664f41e34be2e8efe3036aa", "score": "0.7669816", "text": "public function isAuthorized() {\n\t\t$authorized = true;\n\n\t\t// Restrict \"admin\" prefix routes to users with the role \"admin\".\n\t\tif (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {\n\t\t\t$authorized = $this->Auth->user('role') === 'admin';\n\t\t}\n\t\treturn $authorized;\n\t}", "title": "" }, { "docid": "49244cd1f602e42e9958d295c3378652", "score": "0.764691", "text": "public function authorize(): bool\n {\n if ($this->user()->isAdmin()) {\n return true;\n }\n\n return $this->get('subscribable_type') === 'user' && $this->get('subscribable_id') === $this->user()->id;\n }", "title": "" }, { "docid": "acd39263de7f8581d42809fa4fb0cc78", "score": "0.7646886", "text": "public function authorize()\n {\n $id = $this->route('id');\n $project_environment = ProjectEnvironment::query()->find($id);\n return $project_environment && $project_environment->isUserAuthorized(auth()->user()->id);\n }", "title": "" }, { "docid": "ca5a88163402aefc49609eaa3c705e81", "score": "0.7640721", "text": "public function authorize()\r\n {\r\n\r\n return (!\\Auth::check()) ? false : true;\r\n }", "title": "" }, { "docid": "a5ee51c13ce7b19c27772102a42ca3da", "score": "0.76317173", "text": "public function authorize()\n {\n $contact = Contact::find(request('contact_id'));\n\n if (! $contact) {\n return false;\n }\n\n return $contact->user_id === Auth::user()->id;\n }", "title": "" }, { "docid": "1620e920e650721bba18703186c82201", "score": "0.7624185", "text": "public function authorize()\n {\n $this->userRouteId = $this->route(\"user\");\n return true;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612397", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612397", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "44441de2b8bb958d7102b43285859291", "score": "0.760988", "text": "public function authorize()\n {\n return (bool) auth()->user();\n }", "title": "" }, { "docid": "c78e31ee952b9abb7f96de3c25225186", "score": "0.7609812", "text": "public function authorize()\n {\n if (Auth::check()) {\n if (Auth::user()->role_id == 1) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "d8cf48f23bcac99e7a4634f63c1b3826", "score": "0.76089203", "text": "public function authorize()\n {\n // if $user->id != $tweet->id\n // return false\n\n // policies\n return true;\n }", "title": "" }, { "docid": "054563d3bfdafc8d20246eb29d0ee33f", "score": "0.7605957", "text": "public function authorize()\n {\n return $this->user()->can('send application') || $this->user()->can('accept application');\n }", "title": "" }, { "docid": "9a106fe865928acb311133a944e2f523", "score": "0.76030916", "text": "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "title": "" }, { "docid": "e7103b0956700fca99d764e01b6e63e6", "score": "0.75918627", "text": "public function authorize()\n {\n $routePath = explode('/', $this->decodedPath());\n $authorize = false;\n\n switch ($this->method()) {\n case 'POST':\n $authorize = true;\n break;\n case 'PUT':\n $job = Job::find($routePath[2]);\n\n if ($job->user_id == auth()->id()) {\n $authorize = true;\n }\n break;\n }\n\n return $authorize;\n }", "title": "" }, { "docid": "d874e8d00c74a72170175676432fd1f0", "score": "0.7581979", "text": "public function authorize()\n {\n if ($this->path() == 'rgst/custom/add' || $this->path() == 'rgst/custom/edit') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "99318457b951c3326b52b869881516f0", "score": "0.75748646", "text": "public function authorize()\n {\n return (Auth::user() == NULL);\n }", "title": "" }, { "docid": "54c565a6e372b2e0f2bc66fef64e4e67", "score": "0.7573596", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4162b13edd3da988db0394dd164b7649", "score": "0.75640553", "text": "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') || $this->user->hasPermission('manage_pages') ) ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "80f9611cc7474a1a8232bfe2bad2767d", "score": "0.7562012", "text": "public function authorize()\n {\n $user = auth()->user();\n\n return $user->hasRole('employee') || ($user->hasRole('customer') && $user->id == $this->request->get('id'));\n\n }", "title": "" }, { "docid": "5090c03d5e3c1f0545aa32370c0d2c37", "score": "0.7549653", "text": "public function authorize()\n {\n return Auth::user()->id === $this->private_category->owner_id;\n }", "title": "" }, { "docid": "7450b44b718db968f30e3839cf4c0278", "score": "0.7545525", "text": "protected function isAuthorized()\n {\n return true;\n return $this->app->make('antares.acl')->make('antares/api')->can('can-use-api');\n }", "title": "" }, { "docid": "1e5bc4bbb7e375fd2e6207c90646128b", "score": "0.7542686", "text": "public function authorize()\n {\n return Auth::user() ? true : false;\n }", "title": "" }, { "docid": "57012fa7d21a8d6482f4b84293f5743f", "score": "0.75416017", "text": "public function authorize()\n {\n if(! Auth::user()->active)\n return true;\n \n return false;\n }", "title": "" }, { "docid": "9faacb6cf0c3b57abd2336d53e4fc648", "score": "0.75399774", "text": "function isAuthorized()\n {\n $session = true;\n include(GEO_BASE_DIR . 'get_common_vars.php');\n if ($session->getUserId() !== 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "16be1c2e01ca4b01d24569f5268bb3e8", "score": "0.75279766", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_pages') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d7ff45b4a6226d5137f2ee870c0d7519", "score": "0.75236726", "text": "public function authorize()\n {\n if (App::environment('testing')) {\n /* Example, deal with it in a middleware */\n return !Auth::guest() && (Auth::user()->id == $this->route->post->user_id);\n } else {\n return true;\n }\n \n }", "title": "" }, { "docid": "3594daafa944b6c0730db5d3ea25e5d1", "score": "0.7519608", "text": "public function authorize()\n {\n return $this->user()->is_admin;\n }", "title": "" }, { "docid": "a3356463f9788727db560744fe9198e3", "score": "0.75058883", "text": "public function authorize()\n {\n return $this->user()->can(\n 'edit', $this->route('user')\n );\n }", "title": "" }, { "docid": "b8c138dfbf0a96d5b19051c395e3e939", "score": "0.7501976", "text": "public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }", "title": "" }, { "docid": "12ec45746bcaed1634532b2424547923", "score": "0.7500724", "text": "public function authorized()\n {\n return true;\n }", "title": "" }, { "docid": "d32ff1413ce4cacbf2de6ef55ec899ee", "score": "0.7485451", "text": "public function authorize()\n {\n // $user = User::find($this->route('user'));\n\n // return $user && $user->can('update', $user);\n\n return true;\n }", "title": "" }, { "docid": "05a21538b18332e2a1193803e1be39df", "score": "0.7482984", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_seo_booster') ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ac7a1db84c95a405336f2ae0703ac714", "score": "0.7480042", "text": "public function authorize()\n {\n if($this->method() == 'DELETE' && ($this->route('user') == config('cms.DEFAULT_USER_ID') || auth()->id() == $this->route('user')) )\n return false;\n return true;\n }", "title": "" }, { "docid": "3ae2e4849befde1a04f41438d973326f", "score": "0.7471893", "text": "public function authorize()\n {\n // Set to true we will not do authentication here\n return true;\n }", "title": "" }, { "docid": "e382e69b62fc12f837b5f5aa867c89bb", "score": "0.7470407", "text": "public function isAuthorized() {\n\t\t$role = $this->Auth->user('role');\n\t\tif ($role === 'admin') return true;\n\t\tif (empty($this->_permissions[$this->action])) return false;\n\t\t$perms = $this->_permissions[$this->action];\n\t\tif (is_string($perms)) {\n\t\t\tif ($perms === '*') return true;\n\t\t\treturn (bool) call_user_func(array(&$this, $perms));\n\t\t}\n\t\tif ($role) return in_array($role, $perms);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a0c263182891c2e6a287e26ed64201f7", "score": "0.74659157", "text": "public function authorize()\n {\n /* request must have auth.id and auth.secret, and they must match our config */\n $auth = $this->post('auth');\n $id = $auth['id'] ?? false;\n $secret = $auth['secret'] ?? false;\n\n return ($id && $secret && $id === config('app.client_id') && $secret === config('app.client_secret'));\n }", "title": "" }, { "docid": "60a6050aa49198976abe4cf6aad32bbd", "score": "0.7464817", "text": "public function authorize()\n {\n return $this->user()->type === 'admin';\n }", "title": "" }, { "docid": "4da31466613c2e9da8bec1e82f21f108", "score": "0.745075", "text": "abstract protected function _isAuthorized();", "title": "" }, { "docid": "784e4dc5b747a63b7eb02fe96e885f68", "score": "0.7447874", "text": "public function authorize(Request $request)\n {\n return Auth::id() == $request->user_id;\n }", "title": "" }, { "docid": "803eb51e8df89ef3bc81e58be36297f8", "score": "0.74461496", "text": "public function authorize()\n {\n /** @var User|null $user */\n $user = $this->user();\n $isWorkshop = $user->roles()->where('name', User::USER_ROLE_SHOP);\n $isAdmin = $user->roles()->where('name', User::USER_ROLE_ADMIN);\n\n $this->user = $user;\n\n return null !== $user && ($isWorkshop || $isAdmin);\n }", "title": "" }, { "docid": "ee5c25dcb01bf3fb0810d94934968b57", "score": "0.74294895", "text": "public function authorize()\n {\n $user = auth()->user();\n return ($user->hasRole(3)&&$user->hasStatus(3));\n }", "title": "" }, { "docid": "0707b38a55ec6b7b4afe1caae8d23c78", "score": "0.74214023", "text": "public function authorize()\n {\n if(\\Auth::check()) {\n\n /* Check if user has permission */\n if(\\Auth::user()->hasRole('Creating/Designing/Editing/Removing of Forms'))\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "aec154c99202d5d8ff163aefea8ab474", "score": "0.74153316", "text": "public function authorize()\n {\n if($this->isMethod('get')){\n if(auth()->user()->canIndexPermissions()) return true;\n return false;\n }elseif($this->isMethod('post')){\n if(auth()->user()->canStorePermissions()) return true;\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "8475169486c92e03cf299d95b2673f70", "score": "0.7414442", "text": "public function authorize()\n {\n return auth()->user()->id ? true : false;\n }", "title": "" }, { "docid": "ab8c626bc07a5ea7eaae1c4d17fb6e41", "score": "0.7414061", "text": "public function authorize()\n {\n return $this->user()->hasRole('admin');\n }", "title": "" }, { "docid": "6f4551e441e27e01695753b04f3292d0", "score": "0.7401993", "text": "public function authorize()\n {\n return Auth::id() && $this->userOwnsWallets();\n }", "title": "" }, { "docid": "cab47d70a82dbc1ccbde6527f927a4e7", "score": "0.73992705", "text": "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "67111946b51e489606ae7759398c7326", "score": "0.73982483", "text": "public function authorize()\n {\n if(Auth::user()->user_type === 1)\n return true;\n return false;\n }", "title": "" }, { "docid": "a5ffedc84c87aa995195bffa59825b64", "score": "0.73977715", "text": "public function authorize()\n {\n return hasPermission('admin.user.permission');\n }", "title": "" }, { "docid": "3c412a98951830835550fbc0685dbb71", "score": "0.73941326", "text": "public function authorize()\n {\n /**\n * Para saber si el usuario que esta haciendo la peticion es un administrador\n */\n return ($this->user()->roles->name === 'SuperUsuario Estatal');\n }", "title": "" }, { "docid": "61ed9cbce2ea309049ee1a5d78bee45a", "score": "0.7384638", "text": "public function authorize()\r\n {\r\n if( ! \\Auth::check() ){\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3913dc0ea21f5beab08adb110b71cdd9", "score": "0.73788816", "text": "public function authorize()\n {\n \t$applicant = $this->route('applicant');\n \tif(!is_object($applicant)){\n \t\t$applicant=User::find($applicant);\n\t }\n\t if ($applicant){\n \t\treturn $applicant->status==User::STATUS_ON_APPROVAL || $applicant->status==User::STATUS_REJECTED;\n\t }\n return false;\n }", "title": "" }, { "docid": "bca3a815d4acc2513af6f111c6aaacb9", "score": "0.7365925", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->getResponse());\n }", "title": "" }, { "docid": "c7b6c1b120f0892042ccc26cb422ee9e", "score": "0.73572385", "text": "public function authorize()\n {\n return Auth::user()->hasRole('superadministrator|administrator|user');\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.7356511", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" } ]
68c06b62304fa9d5201549d0ff733853
Get an item from the cache, or execute the given Closure and store the result.
[ { "docid": "d8c8ac93161adc7302c054a94d3f8558", "score": "0.0", "text": "public function remember(string $key, int $ttl, Closure $callback)\n {\n $value = $this->get($key);\n\n if ($value !== null) {\n return $value;\n }\n\n $this->save($key, $value = $callback(), $ttl);\n\n return $value;\n }", "title": "" } ]
[ { "docid": "f63a0ed5e236fba34edfc7224d495c09", "score": "0.69258785", "text": "public function getCacheOr () {\n \n if (func_num_args() == 1) {\n $debile = true;\n $cb = func_get_arg(0);\n } elseif (func_num_args() == 2) {\n $debile = (bool) func_get_arg(0);\n $cb = func_get_arg(1);\n } else {\n throw new \\Exception('Bad parameters format');\n }\n\n if (!is_callable($cb)) {\n throw new \\Exception('The callback isn\\'t callable');\n }\n \n if ($cache = $this->getCache($debile)) {\n return $cache;\n } else {\n \n $this->setStatusSaving();\n \n try {\n $result = $cb($this);\n } catch (\\Exception $e){\n $this->cancel();\n throw $e;\n }\n \n $this->saveInCache($result);\n \n return $result;\n \n }\n \n }", "title": "" }, { "docid": "15454b02963787d6bde3d022620f1dd0", "score": "0.6666315", "text": "public function get($key, $default = null)\n\t{\n\t\t$value = $this->retrieveItem($key);\n\n\t\t// If the items are not present in the caches, we will return this default\n\t\t// value that was supplied. If it is a Closure we'll execute it so the\n\t\t// the execution of an intensive operation will get lazily executed.\n\t\tif (is_null($value))\n\t\t{\n\t\t\treturn value($default);\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "8c66c8f32ad8ffd70fd044cb98c200f4", "score": "0.6515327", "text": "function cache_get_or_add(string $key, callable $function, ?int $seconds = null)\n {\n $result = \\Cache::get($key, $function);\n \\Cache::add($key, $result, $seconds);\n return $result;\n }", "title": "" }, { "docid": "2a3571fa414f63e1a2db6cfe223f3de9", "score": "0.6310685", "text": "protected function cached(string $key, Closure $dataGetter)\n {\n if ($this->cacheRepository->has($key)) {\n return $this->cacheRepository->get($key);\n }\n $result = $dataGetter();\n $this->cacheRepository->put($key, $result, $this->cacheTimeout);\n return $result;\n }", "title": "" }, { "docid": "b38b85531b59830e6949f724a2da30f9", "score": "0.6125189", "text": "private function attemptGetFromCache($url) {\n\t\t$this->was_cached = false;\n\t\t$data = call_user_func($this->cache_handler, \"get\", $url);\n\t\tif ($data) {\n\t\t\t$this->was_cached = true;\n\t\t}\n\t\telse {\n\t\t\t$data = $this->download($url);\n\t\t\t$data and call_user_func($this->cache_handler, \"set\", $url, $data);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "09dbc4d15eaacba9d0ada57407fd4b3c", "score": "0.6121682", "text": "public function remember($key, $ttl, Closure $callback, $allowNull = true): mixed\n {\n if($allowNull) {\n if($this->store->exists($key)) {\n return $this->get($key);\n }\n } else {\n $value = $this->get($key);\n\n // If the item exists in the cache we will just return this immediately and if\n // not we will execute the given Closure and cache the result of that for a\n // given number of seconds so it's available for all subsequent requests.\n if (! is_null($value)) {\n return $value;\n }\n }\n \n $this->put($key, $value = $callback(), value($ttl));\n\n return $value;\n }", "title": "" }, { "docid": "95c3e563ae5c6f084c32c7e3224b4d29", "score": "0.6102729", "text": "function cache(string $key = null, $value = null, int $ttl = 600) {\n global $cache;\n\n if ($cache === null) {\n global $manix;\n $cache = $manix->program()->constructCacheGateway();\n }\n\n if (!$key) {\n return $cache;\n }\n\n $callable = is_callable($value);\n if ($value === null || $callable) {\n if ($callable) {\n return $cache->magic($key, $ttl, $value);\n }\n return $cache->retrieve($key);\n }\n\n return $cache->persist($key, $value, $ttl);\n}", "title": "" }, { "docid": "7bcd2c30787d38938d4b37f212f0fe86", "score": "0.6056739", "text": "function get( $key )\n\t{\n\t\t$found = false;\n if ( $this->isCacheKeyExists($key) ) {\n\t\t\t$found = true;\n $value = $this->cache[$key];\n } else {\n\t\t\t$found = true;\n\t\t\t$value = apc_fetch( $key);\n\t\t}\n\t\t\n\t\tif ( null === $value ) {\n\t\t\t$value = false;\n\t\t\t$found = false;\n\t\t}\n\t\tvar_dump($found); exit;\n\t\tif(true === $found) {\n\t\t\t$return = $this->cache[$key];\n\t\t} else {\n\t\t\t$return = false;\n\t\t}\n\t\t\n return $return;\n }", "title": "" }, { "docid": "8a934fc897aea70aa6abfb30146aee58", "score": "0.59761655", "text": "function poc_cache_fetch($key) {\r\n\tglobal $poc_cache;\r\n\treturn $poc_cache->fetch($key);\r\n}", "title": "" }, { "docid": "de259ca4194fb8b9e8a7e49359fef08f", "score": "0.59388965", "text": "public function getCached($callback, array $args = array(), $expireIn = 0, $cacheKeySuffix = null);", "title": "" }, { "docid": "875b58c83adb28a7e13785252061d149", "score": "0.59181595", "text": "public static function get(string $key, callable $callback)\n {\n if ($redis = Di::getDefault()->get('redis')) {\n $data = $redis->get($key);\n\n if (!is_callable($callback)) {\n throw new Exception(\"Key value '{$key}' not in cache and not available callback to populate cache\");\n }\n\n return !empty($data) ? $callback($data) : false;\n }\n\n return ;\n }", "title": "" }, { "docid": "59e4c097d5891252e11a49ac1f4575eb", "score": "0.5873799", "text": "private function fetch($key, $user_id = null)\n {\n $user_id = is_null($user_id) ? $this -> user_id : $user_id;\n\n if ($this -> cache -> has($key, $user_id)) {\n return $this -> cache -> get($key, null, $user_id);\n }\n\n $row = $this -> database -> table($this -> config['db_table'])\n -> where( function($query) use ($user_id) {\n if ( $user_id )\n {\n $query -> where('user_id', $user_id);\n }\n else {\n $query -> whereNull('user_id');\n }\n })\n -> where($this -> fields['key'], $key)\n -> first([$this -> fields['val']]);\n\n return (!is_null($row)) ? $this -> cache -> set($key, unserialize($row -> value), $user_id) : null;\n }", "title": "" }, { "docid": "96118ae3df07ae2ff2b93ca64a40a148", "score": "0.5856371", "text": "function cache_get($key) {\n\tglobal $phppgsql_mm;\n return $phppgsql_mm->get($key);\n}", "title": "" }, { "docid": "8b3ed3678def649afdc9f2d8aef659ed", "score": "0.5842778", "text": "public static function getWithSetCallback( string $key, int $duration, callable $callback ) {\n\t\t/** @var CacheItemPoolInterface $cache */\n\t\t$cache = Context::get()->getGlobalConfiguration()->object( 'cache' );\n\t\t$cacheItem = $cache->getItem( $key );\n\t\tif ( !$cacheItem->isHit() || self::shouldBeExpired( $cacheItem ) ) {\n\t\t\t$value = $callback();\n\t\t\t$cacheItem->set( [\n\t\t\t\t'value' => $value,\n\t\t\t\t'expiration' => time() + $duration\n\t\t\t] );\n\t\t\t$cacheItem->expiresAfter( $duration );\n\t\t\t$cache->save( $cacheItem );\n\t\t}\n\t\t$cached = $cacheItem->get();\n\t\treturn $cached['value'];\n\t}", "title": "" }, { "docid": "7de9e0fafd013b60035b47588cdaa4db", "score": "0.57855207", "text": "function cache($name, $key = null, $value = null)\n{\n if ($key === null) {\n return Cache::dispense($name);\n } else if ($value !== null) {\n return Cache::dispense($name)->set($key, $value);\n } else {\n return Cache::dispense($name)->get($key);\n }\n}", "title": "" }, { "docid": "1f990c7a4190e0a547a955486b938003", "score": "0.57409084", "text": "public static function get($key, Closure $closure)\n {\n $collection = static::collection();\n\n if (!$collection->has($key)) {\n $collection->put($key, $closure());\n }\n\n return $collection->get($key);\n\n }", "title": "" }, { "docid": "12cd53a7652f359ce38df519e6f8f608", "score": "0.57361215", "text": "public function cached($key, $callback, $params = array(), $ttl = false)\n {\n $cachedData = $this->getCache($key);\n\n if (!$cachedData) {\n $cachedData = $this->testCallback($callback, $params);\n $this->setCache($key, $cachedData, $ttl);\n }\n\n return $cachedData;\n }", "title": "" }, { "docid": "afc50a949a29dd965caa03ba6784f6db", "score": "0.5732598", "text": "function fetchAndCache( $query, $cacheTime, $cb = null ){\n global $gCache;\n $cacheKey = 'ED-' . md5( $query );\n $result = $gCache->get( $cacheKey );\n if ( $result === null ){\n $result = $this->endPoint->query($query);\n $result = $result[\"result\"][\"rows\"];\n if ( is_callable( $cb ) ){\n $result = $cb( $result );\n }\n $gCache->set( $cacheKey, $result, $cacheTime * 3600 ); //cache for cacheTime hours\n }\n return $result;\n }", "title": "" }, { "docid": "1d91362747ee5a9724c14b374967f1ca", "score": "0.5731088", "text": "public function fromCache(\n string $key,\n Closure $callback,\n DateInterval|int $lifetime = null,\n ): mixed;", "title": "" }, { "docid": "4b5ff2e78470d79fd4f0559352b812c7", "score": "0.5714314", "text": "public function rememberForever($key, Closure $callback)\n\t{\n\t\t// If the item exists in the cache, we will just return it immediately,\n\t\t// otherwise we will execute the given Closure and cache the result\n\t\t// of that execution for the given number of minutes. It's easy.\n\t\tif ($this->has($key))\n\t\t{\n\t\t\treturn $this->get($key);\n\t\t}\n\n\t\t$this->forever($key, $value = $callback());\n\n\t\treturn $value;\t\n\t}", "title": "" }, { "docid": "6b43867a85deb981f836ffecbd0cabc0", "score": "0.5705011", "text": "protected function cacheGet($var) {\r\n\t\treturn $this->cache->get($var);\r\n\t}", "title": "" }, { "docid": "ffd600d155bc19213571f9eb8a0123c0", "score": "0.5690501", "text": "public function findOneByKeyFromCache($key, $value) {\n\t\treturn parent::findOneByKeyFromCache($key, $value);\n\t}", "title": "" }, { "docid": "75ef85ecf063c7de261df240178f6e32", "score": "0.56835634", "text": "function fetchAndCache( $url, $cacheTime, $cb = null ){\n global $gCache;\n $cacheKey = 'ED-' . md5( $url );\n $result = $gCache->get( $cacheKey );\n if ( $result === null ){\n $json = file_get_contents( $url );\n $result = json_decode( $json, true );\n if ( is_callable( $cb ) ){\n $result = $cb( $result );\n }\n $gCache->set( $cacheKey, $result, $cacheTime * 3600 ); //cache for cacheTime hours\n }\n return $result;\n }", "title": "" }, { "docid": "b62995c13c42bbbe6bdcc80d88be6e25", "score": "0.5652632", "text": "public function do_get ( $key )\n\t{\n\t\t$return = $this->link->get( md5( $this->identifier . $key ) );\n\t\t$_log_message = \"Cache - Memcache - do_get(): \" . ( $return == FALSE ? \"Failed\" : \"Succeeded\" ) . \" to GET item '\" . $key . \"'.\";\n\t\t$this->Registry->logger__do_log( $_log_message , $return == FALSE ? \"WARNING\" : \"INFO\" );\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "263e9f170baa8509453b0f2666a3e0f3", "score": "0.5651974", "text": "public function get(CacheableInterface $item)\n {\n return $this->provider->fetch($item->getHashKey());\n }", "title": "" }, { "docid": "87d8b6eaf7ce749af518346715f69ba1", "score": "0.5650146", "text": "function dotgo_matches_get_cache($name, $cid, &$value) {\n $static_cache = &drupal_static($name);\n if (isset($static_cache[$cid])) {\n $value = $static_cache[$cid];\n return TRUE;\n }\n\n if ($cache = cache_get($cid)) {\n $static_cache[$cid] = $cache->data;\n $value = $cache->data;\n return TRUE;\n }\n return FALSE;\n}", "title": "" }, { "docid": "a518aee5f8d91bc2d7a4e4d2caf49e73", "score": "0.5647325", "text": "public function rememberForever($key, Closure $callback)\n\t{\n\t\t// If the item exists in the cache we will just return this immediately\n\t\t// otherwise we will execute the given Closure and cache the result\n\t\t// of that execution for the given number of minutes. It's easy.\n\t\tif ( ! is_null($value = $this->get($key))) return $value;\n\n\t\t$this->forever($key, $value = $callback());\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "9081fbd496ba24bfecc2ea428dc18c5c", "score": "0.56370777", "text": "function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {\n global $wp_object_cache;\n\n return $wp_object_cache->get( $key, $group, $force, $found );\n}", "title": "" }, { "docid": "cec8c27c1af7ca7877d68ac84477051b", "score": "0.5636041", "text": "public static function get($key,$callback=null,$cas_token=null){\r\n global $memcache;\r\n \r\n return $memcache->get($key,$callback);\r\n }", "title": "" }, { "docid": "20ff687645d18ad7a0241c6ddd88e571", "score": "0.5621267", "text": "public function cache( $name, $calculateCallback ) {\n\t\t\tif ( $this->isFresh( $name ) ) {\n\t\t\t\treturn $this->getVar( $name );\n\t\t\t} else {\n\t\t\t\t$result = call_user_func( $calculateCallback );\n\t\t\t\t$this->putVar( $name, $result );\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "96bb64991e33c0781de8ca7a6b9fd2cd", "score": "0.56193507", "text": "function wp_cache_get($key, string $group = '', bool $force = false, bool &$found = null)\n{\n return ObjectCache::get($key, $group, $found);\n}", "title": "" }, { "docid": "b92f1acf8fd0146ec650dc674286f5f3", "score": "0.5612294", "text": "public function cacheGet($type) {\n $cutoff = $this->cacheExpire($type);\n switch ($type) {\n case 'query':\n // Not supported currently, but this is certainly where we'd put it.\n return FALSE;\n\n case 'results':\n // Values to set: $view->result, $view->total_rows, $view->execute_time,\n // $view->current_page.\n if ($cache = \\Drupal::cache($this->resultsBin)->get($this->generateResultsKey())) {\n if (!$cutoff || $cache->created > $cutoff) {\n $this->view->result = $cache->data['result'];\n // Load entities for each result.\n $this->view->query->loadEntities($this->view->result);\n $this->view->total_rows = $cache->data['total_rows'];\n $this->view->setCurrentPage($cache->data['current_page'], TRUE);\n $this->view->execute_time = 0;\n return TRUE;\n }\n }\n return FALSE;\n }\n }", "title": "" }, { "docid": "b491ebfdb18e669f1d30e0a29cbdb475", "score": "0.56053996", "text": "public static function get($key) {\n if (!isset(self::$_contents[$key]) || empty(self::$_contents[$key])) {\n Log::debug('[CACHE] Fetching Key: ' . $key);\n self::$_contents[$key] = apc_fetch($key);\n }\n\n return self::$_contents[$key];\n }", "title": "" }, { "docid": "94b87a78770e6bb33577c8a437ad9324", "score": "0.55944186", "text": "protected function cache() : CacheItemPoolInterface {\n if(!is_null($this->getCachePool)){\n // return should be a full working PSR-6 Cache pool instance\n return ($this->getCachePool)();\n }else{\n // no Cache pool provided -> use default \"void\" Cache Pool\n // -> no storage at all! Dummy PSR-6\n return new VoidCachePool();\n }\n }", "title": "" }, { "docid": "669c293ba11901758d5eba350faef5be", "score": "0.55492806", "text": "function cache_get($key = '', $bin = 'default') {\n $cache_obj = _cache_obj( $key, $bin );\n if ( is_string( $cache_obj ) ) {\n if ( is_readable( $cache_obj ) ) {\n $data = unserialize( file_get_contents( $cache_obj ) );\n if ( $data['expire'] == 0 || $data['expire'] > time() ) {\n return $data['data'];\n }\n }\n cache_delete( $key, $bin );\n return FALSE;\n }\n elseif ( is_array( $cache_obj ) ) {\n return call_user_func_array( 'memcache_get', $cache_obj );\n }\n else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "0683dec13fd067b32aa6157206fa4197", "score": "0.55487865", "text": "public function remember($key, $options, Closure $callback)\n {\n if (is_callable($options)) {\n $callback = $options;\n $options = array();\n } elseif (!is_string($options) && !is_array($options)) {\n $options = array(\n xPDO::OPT_CACHE_EXPIRES => (int) $options\n );\n }\n $value = $this->get($key, $options);\n if (is_null($value)) {\n $this->set($key, $value = $callback(), $options);\n }\n\n return $value;\n }", "title": "" }, { "docid": "56534a1fbc17c9c615dc38555ac5afda", "score": "0.5547542", "text": "function getCache($id) {\n\t\t$result = $this->connection->get($this->getContext() . ':' . $this->getCacheId() . ':' . $id);\n\t\tif ($result === false) {\n\t\t\treturn $this->cacheMiss;\n\t\t}\n\t\tswitch (get_class($result)) {\n\t\t\tcase 'memcache_false':\n\t\t\t\t$result = false;\n\t\t\tcase 'memcache_null':\n\t\t\t\t$result = null;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a23d2d44e0046a9d2853fc9561cc6833", "score": "0.55457824", "text": "public function readCache($key)\n {\n if (apcu_exists($key)) {\n\n return apcu_fetch($key);\n\n } else {\n\n return null;\n\n }\n\n }", "title": "" }, { "docid": "a2b6822637ffa073df8edff731c25257", "score": "0.55367696", "text": "public function getByCriteria(CriteriaContract $criteria)\n {\n if (!$this->allowedCache(__FUNCTION__) || $this->isSkippedCache()) {\n return parent::getByCriteria($criteria);\n }\n\n $key = $this->getCacheKey(__FUNCTION__, func_get_args());\n $minutes = $this->getCacheMinutes(__FUNCTION__);\n $value = $this->getCacheRepository()->tags($this->getCacheTags())->remember($key, $minutes, function () use ($criteria) {\n return parent::getByCriteria($criteria);\n });\n\n return $value;\n }", "title": "" }, { "docid": "e70831770d35236ebc90a7913b18bf86", "score": "0.5534059", "text": "private static function getFromCache($key)\n {\n self::createCachePool();\n\n if (self::$cache->hasItem($key)) {\n return self::$cache->getItem($key)->get();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "80567eb396818301cc5702ecd2b7d169", "score": "0.5531811", "text": "public function getResultCache(): ?CacheInterface;", "title": "" }, { "docid": "c498b842b95da8955c27e675c8a577d5", "score": "0.55197847", "text": "function memoize(callable $callable = null, array $parameters = []): mixed\n {\n if ($callable === null) {\n return Cache::instance();\n }\n return (Cache::instance())->get(\n ReflectionResource::getSignature(ReflectionResource::getForFunction($callable)),\n $callable,\n $parameters\n );\n }", "title": "" }, { "docid": "a81c2ec7d863db901299604a909d3835", "score": "0.55141306", "text": "public function getItem($key)\n {\n Utility::validateKey($key);\n\n if (isset($this->_queue[$key])) {\n return $this->_queue[$key];\n }\n\n $value = null;\n $isHit = $this->_cache->isExisting($key);\n if ($isHit) {\n $value = $this->_cache->get($key);\n if ($value instanceof NullObject) {\n $value = null;\n }\n }\n\n $item = new CacheItem();\n $item->setKey($key);\n $item->set($value);\n $item->setIsHit($isHit);\n\n return $item;\n }", "title": "" }, { "docid": "93444424d0d23af01f1714e90ff8c5aa", "score": "0.55131924", "text": "public function get($key)\r\n {\r\n return $this->cache->get($key);\r\n }", "title": "" }, { "docid": "b943549d58607d754016dc98eca892c1", "score": "0.5508928", "text": "function alwaysGetCache($key,$fresh = 0) {\n global $db,$cache,$bcms,$afdebug,$caTimeout;\n\n $output = array();\n\n if($res = $cache->get($key) AND $fresh == 0) {\n //Awsome, we found it.. so lets store the var and return it.\n debug (\"cache hit on $key\",0);\n\n foreach ($res as $key => $value) {\n $output[$key] = $value;\n }\n debug($res['debug'],0);\n return $output;\n } else { //Obviously this object is not in cache.. :(\n if(!isset($bcms)){ //Load bcms if needed..\n $bcms = new bcms();\n debug ('force bcms',0);\n }\n if($bres = $bcms->getNodebyKey($key,$fresh)) {\n debug (\"db hit on $key\",0);\n //Since we loaded a good ol page, lets store it!\n $cache_data = array('html' => $bres['html'],'debug' => $afdebug);\n $cache->set($key,$cache_data,0,$caTimeout);\n return $bres;\n } else {\n debug (\"db miss on $key\",1);\n return FALSE;\n }\n }\n}", "title": "" }, { "docid": "ec85a522dc3ec9f99e33017413f6e88f", "score": "0.5502025", "text": "protected function retrieve($key)\n\t{\n\t\treturn ( ! is_null($cache = $this->apc->get(Config::get('cache.key').$key))) ? $cache : null;\n\t}", "title": "" }, { "docid": "521e8cf47d11d25a96c0f66a5860de0a", "score": "0.5501011", "text": "public function cacheGet($key){\n try {\n return $this->_cache->get($key);\n }\n catch (Exception $e) {\n Yii::log('Error in Iron Cache: ' . $e->getMessage(), 'error', 'ext.yiiron');\n throw new CException($e->getMessage());\n }\n }", "title": "" }, { "docid": "5c952106daff8e6900d5edd15973b5a9", "score": "0.54998285", "text": "public function get($key) {\n if(env(\"REDIS_CACHE\") == 1) {\n return Cache::get($key);\n }\n return null;\n }", "title": "" }, { "docid": "659a97df70fb9e2513721d52ffa01a87", "score": "0.54993474", "text": "function fetch($key) {\r\n\t\tif (!$this->active) return false;\r\n\t\tif (defined('POC_DEBUG')) error_log('POC_CACHE: '.__FUNCTION__);\r\n\t\tglobal $poc_table;\r\n\t\t$key = md5($key);\r\n\t\tif (isset($this->mcache[$key])) {\r\n\t\t\t$data = $this->mcache[$key];\r\n\t\t\tif ($this->stats) ++$this->hits;\r\n\t\t} else {\r\n\t\t\t$result = mysql_query(\"SELECT `data_value` FROM `$poc_table` WHERE key_name = '$key' LIMIT 1\", $this->dbh);\r\n\t\t\tif ($result && mysql_num_rows($result)) {\r\n\t\t\t\t$row = mysql_fetch_row($result);\r\n\t\t\t\t$data = $row[0];\r\n\t\t\t\t$this->mcache[$key] = $data;\r\n\t\t\t\tif ($this->stats) ++$this->hits;\r\n\t\t\t\tmysql_free_result($result);\r\n\t\t\t} else {\r\n\t\t\t\t$data = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "68cc4f6f8deef32eae3e4f725c9ca30d", "score": "0.5495464", "text": "public static function getItem($key)\n\t{\n\t\tif(!isset(self::$_instances[$key]))\n\t\t\tif($data=self::getFromCache($key))\n\t\t\t\treturn self::$_instances[$key]=$data;\n\t\treturn null;\n\t}", "title": "" }, { "docid": "aa04cf9501c8f080fdc33a621515e567", "score": "0.54693013", "text": "public function get($key)\n {\n $prefixed = $this->prefix.$key;\n\n $cache = $this->table()->where('key', '=', $prefixed)->first();\n\n // If we have a cache record we will check the expiration time against current\n // time on the system and see if the record has expired. If it has, we will\n // remove the records from the database table so it isn't returned again.\n if (is_null($cache)) {\n return;\n }\n\n $cache = is_array($cache) ? (object) $cache : $cache;\n\n // If this cache expiration date is past the current time, we will remove this\n // item from the cache. Then we will return a null value since the cache is\n // expired. We will use \"Carbon\" to make this comparison with the column.\n if ($this->currentTime() >= $cache->expiration) {\n $this->forget($key);\n\n return;\n }\n\n return $this->unserialize($cache->value);\n }", "title": "" }, { "docid": "4fde1379e6808b4acf0189169d98b978", "score": "0.5464684", "text": "public function cacheGetImage ()\n {\n $cacheDirImage = $this->cacheGetFilePath ();\n $cacheDirImageFile = $cacheDirImage . '/' . $this->cacheGetFileName ();\n if ($this->cacheIsFileStored ()) {\n return $this->getImage ($cacheDirImageFile);\n }\n return null;\n }", "title": "" }, { "docid": "02fe8eefebbe8de3052f74c6c43a46f9", "score": "0.54621667", "text": "public function read($key) {\n\t\t$model = $this->_model;\n\t\t$fields = $this->_fields;\n\t\t$locks = &$this->_locks;\n\n\t\treturn function($self, $params) use ($model, $fields, &$locks) {\n\t\t\t$key = $params['key'];\n\n\t\t\tif (!empty($locks[$key])) {\n\t\t\t\t$cache = $locks[$key];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$conditions = array($fields['key'] => $params['key']);\n\t\t\t\t$cache = $model::first(compact('conditions'));\n\t\t\t}\n\n\t\t\tif (!$cache || !isset($cache['data'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!empty($cache['expiry']) && $cache['expiry'] < time()) {\n\t\t\t\t$cache->delete();\n\t\t\t\tunset($locks[$key]);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$cache = $cache->to('array');\n\t\t\treturn $cache['data'];\n\t\t};\n\t}", "title": "" }, { "docid": "6db31d2a2a18c8634dea4591a049069c", "score": "0.5458515", "text": "public function get($key)\n {\n if (! $this->isEnabled()) { return null; }\n\n try {\n $result = $this->cache()->get($this->formatQualifiedCacheKey($key));\n return $result !== false ? $result : null; \n } catch (\\Exception $e) {\n $this->logWarning((string) $e);\n return null;\n } \n }", "title": "" }, { "docid": "4acfbdd37767a48c3bdf0aa0150700a4", "score": "0.54565895", "text": "public function GetCachedItem(string $propName, string $groupName, int $expiriesIn, $initFunc)\n {\n if (static::$DisableCache && $initFunc) {\n if (GnApi::$Debug) {\n GnLogger::Verbose(\"Cache is disable\");\n }\n return $initFunc();\n }\n\n // In case memcached is not available, use no cache\n if (!static::$CacheHandler && !$this->isMemcachedConnected() && $initFunc) {\n if (GnApi::$Debug) {\n GnLogger::Warning(\"No cache-handler configured and Memcached not available\");\n }\n return $initFunc();\n }\n\n $val = static::$CacheHandler ? static::$CacheHandler->get($propName) : $this->_memcached->get($propName);\n if (!$val && $initFunc) {\n $val = $initFunc();\n if (static::$CacheHandler) {\n static::$CacheHandler->set($propName, $groupName, $val, $expiriesIn);\n } else if ($this->isMemcachedConnected()) {\n $this->_memcached->set($propName, $val, time() + $expiriesIn);\n }\n } elseif (GnApi::$Debug) {\n GnLogger::Verbose(\"Found cache '{$propName}'\");\n }\n return $val;\n }", "title": "" }, { "docid": "72df0e9963ce58c59667e54c6045e7ee", "score": "0.5448072", "text": "private function fetchFromCache( RedBean_OODBBean $bean ) {\n\t\t$key = $this->generateKey($bean);\n\t\tif (isset($this->cache[$key])) {\n\t\t\treturn $this->cache[$key];\n\t\t}\n\t\telse {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "8b84b0970d3e5b008d907cec54a6f13d", "score": "0.5442982", "text": "public function getCache(string $key, ?string $group = null, bool $force = false, ?bool &$found = null): mixed\n {\n return wp_cache_get($key, $group ?? $this->getCacheGroup(), $force, $found);\n }", "title": "" }, { "docid": "85a978d7ef42443050bfa1ba84373503", "score": "0.54404324", "text": "public function read() {\n return isset($this->cache[$this->key()]) ? $this->cache[$this->key()] : null;\n }", "title": "" }, { "docid": "33dae89721133d072ad6c64c2fe755a6", "score": "0.5434173", "text": "public function cacheGet($_key)\n\t{\n\t\treturn $this->__cache->get($_key);\n\n\t}", "title": "" }, { "docid": "cbd06d6884af1eba6a4bedce3e75fd66", "score": "0.5432494", "text": "public function getOrElse($key, callable $default);", "title": "" }, { "docid": "85126be77054c459f64f4190ace7473f", "score": "0.54314625", "text": "public function getOrSet($key, $callable, $duration = 0)\n {\n $key = self::buildKey($key);\n\n $value = $this->getStorage()->getOrSet($key, $callable, $duration);\n\n return $value;\n }", "title": "" }, { "docid": "f71b5226040dfaca176d2a77c700e8f8", "score": "0.54215014", "text": "private function setAndGet(\n string $key,\n callable $callable,\n DateInterval|int|null $ttl,\n ?Dependency $dependency\n ): mixed {\n $ttl = $this->normalizeTtl($ttl);\n $ttl ??= $this->defaultTtl;\n /** @var mixed */\n $value = $callable($this->psr);\n\n if ($dependency !== null) {\n $dependency->evaluateDependency($this);\n }\n\n $item = new CacheItem($key, $ttl, $dependency);\n\n if (!$this->psr->set($key, [$value, $item], $ttl)) {\n throw new SetCacheException($key, $value, $item);\n }\n\n $this->items->set($item);\n return $value;\n }", "title": "" }, { "docid": "4ff426afe4a10c2bcd97d4996500d8d8", "score": "0.541851", "text": "public static function value($key, $value_or_callback = null)\n {\n $cached_values = Data::globals(\"cached_values\") ?: set();\n\n // Getting a value\n if (is_null($value_or_callback)) {\n return $cached_values[$key] ?? null;\n }\n\n if ($cached_values->hasKey($key)) {\n return $cached_values[$key];\n }\n\n // Saving a new value\n $cached_values[$key] = is_callable($value_or_callback) ? $value_or_callback() : $value_or_callback;\n Data::globals([\"cached_values\" => $cached_values]);\n\n return $cached_values[$key];\n }", "title": "" }, { "docid": "feaf27ae1866d92bd11fd07ccc179ab4", "score": "0.5413346", "text": "public function get($key, $default = FALSE)\n {\n $cache = apc_fetch($this->_sanitize($key), $success);\n return $success ? $cache : $default;\n }", "title": "" }, { "docid": "6710bc7c59c2291348db10f10edea59e", "score": "0.5410451", "text": "function cacheGet($key,$default = null){\r\n if (!isset($_GET[$key])) {\r\n $sessionValue = session(\"CacheGet_\".__FILE__.\"_$key\");\r\n if($sessionValue != null){\r\n return $sessionValue;\r\n }\r\n return $default;\r\n }else{\r\n $getValue = htmlspecialchars($_GET[$key]);\r\n $_SESSION[\"CacheGet_\".__FILE__.\"_$key\"] = $getValue;\r\n return $getValue;\r\n }\r\n}", "title": "" }, { "docid": "b67130fa6892e6c8a9808e1be8fbd8bb", "score": "0.5409398", "text": "function getOne() {\n\t\treturn current($this->cache[0]);\n\t}", "title": "" }, { "docid": "864eda2125200695b0a50472116940c0", "score": "0.54079485", "text": "function S($key,$value=false,$expire=false,$Default=''){\n $value = cache($key,$value,$expire);\n return null!==$value?$value:$Default;\n}", "title": "" }, { "docid": "cd1cb3d00a7b534615503f1968ae8c5a", "score": "0.53992254", "text": "public function cacheRead($key, $regenFunction, $ttl = null, $args = null)\n {\n if (null === $args) {\n $varArgs = array();\n } else {\n $varArgs = func_get_args();\n array_shift($varArgs); // pull off $key\n array_shift($varArgs); // pull off $regenFunction\n array_shift($varArgs); // pull off $ttl\n }\n\n $cachedContent = $this->read($key);\n\n // Check to see if the cache missed, which could mean that it either didn't exist or was stale.\n if ($cachedContent === false) {\n // Run the relatively expensive code.\n $cachedContent = call_user_func_array($regenFunction, $varArgs);\n\n // save result\n $this->write($key, $cachedContent, $ttl);\n }\n\n return $cachedContent;\n }", "title": "" }, { "docid": "3dfd1b835b9cb100955945e82a0fe1b7", "score": "0.5398374", "text": "public function cacheFetch($field='id', $key=null)\n {\n $cache = static::i()->_cache;\n if (empty($cache[$field])) return null;\n if (is_null($key)) return $cache[$field];\n if (!empty(static::$_cacheFlags[$field]['key_lower'])) $key = strtolower($key);\n return !empty($cache[$field][$key]) ? $cache[$field][$key] : null;\n }", "title": "" }, { "docid": "15d58cc4ee05d126a7afc2955d1bee35", "score": "0.53906286", "text": "public function cacheGetItem($cache, $key) {\n try {\n return $this->_cache->getItem($cache, $key);\n }\n catch (Exception $e) {\n Yii::log('Error in Iron Cache: ' . $e->getMessage(), 'error', 'ext.yiiron');\n throw new CException($e->getMessage());\n }\n }", "title": "" }, { "docid": "297f993eb3c6f7aefafdd86ce72e302c", "score": "0.5386195", "text": "function get( $cache_key, $max_age = null, $static = false )\n {\n if( $cache_key )\n {\n if( array_key_exists($cache_key, $this->sets) )\n {\n $value = $this->sets[$cache_key];\n if( !is_null($value) && $value !== 0 )\n {\n return unserialize($value);\n }\n }\n else\n {\n return $this->get_cache($cache_key, $static)->get($cache_key, $max_age);\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "6c950574345cc60efadf4675ac294fde", "score": "0.53826684", "text": "function memcached_get($key){\n if($key&&$memcached=memcached_connect()){\n $result = $memcached->get($key);\n }else{\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "87cabe66b6c90d8e79fa28d27bead6de", "score": "0.53789717", "text": "static public function get($key, $type = null) {\n\t\tglobal $config;\n\n\t\tif ($config->cache->enabled !== true || empty($key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$type = !is_null($type) ? $type : $config->cache->type;\n\t\t$retval = false;\n\n\t\tswitch ($type) {\n\t\t\tcase 'memcache':\n\t\t\t\t$cache = self::_connect();\n\t\t\t\t$retval = $cache->get($key);\n\t\t\t\tbreak;\n\n\t\t\tcase 'apc':\n\t\t\t\t$retval = apc_fetch($key);\n\t\t\t\tbreak;\n\n\t\t\tcase 'file':\n\t\t\t\tif (!isset($config->cache->filedir)) {\n\t\t\t\t\t$retval = false;\n\t\t\t\t} else {\n\t\t\t\t\t$subdir = substr($key, 0, 1);\n\t\t\t\t\tif (file_exists($config->cache->filedir . DS . $subdir . DS . $key)) {\n\t\t\t\t\t\t$retval = file_get_contents($config->cache->filedir . DS . $subdir . DS . $key);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retval = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "c254e0b7933bff390149ad8a652b672c", "score": "0.537652", "text": "public static function get($key, \\Closure $notFoundCallback = null, array $callbackParams = array())\n {\n if(isset(self::$store[$key])) {\n return self::$store[$key];\n }\n\n if(is_callable($notFoundCallback)) {\n return self::$store[$key] = call_user_func_array($notFoundCallback, $callbackParams);\n }\n\n return null;\n }", "title": "" }, { "docid": "55d4adf567b7f3820b659895a2365c24", "score": "0.5373838", "text": "public function getCache(HasIdentifierContract $object, $callback)\n {\n if (config('entity.useCache', false)) {\n $key = config('entity.cache-keys.layout').'.'.$object->identifier();\n return \\ArrayCache::rememberForever($key, $callback);\n }\n return $callback();\n }", "title": "" }, { "docid": "1856d03fe7873668d3fc2fd0e6ae043a", "score": "0.53495115", "text": "function wpcom_vip_cache_get( $key, $group = '' ) {\n\tif( ! class_exists( 'Stampedeless_Cache' ) )\n\t\treturn wp_cache_get( $key, $group );\n\n\t$sc = new Stampedeless_Cache( $key, $group );\n\n\treturn $sc->get();\n}", "title": "" }, { "docid": "ef71c4f671f727ed640cb2db8ddae167", "score": "0.53459865", "text": "public function getItem($key)\n {\n if ($this->bypass)\n return new CacheItem($key, true);\n\n $item = $this->driver->getItem($this->zoneId, $key);\n if (! $item instanceof CacheItem)\n return new CacheItem($key, false);\n if ($item->__getData(\"expires\") < time())\n return new CacheItem($key, false);\n $item->__setData(\"isHit\", true);\n return $item;\n }", "title": "" }, { "docid": "8deb04dd844abd79b1932a66782c1e3b", "score": "0.5344125", "text": "public function get( $key ) {\r\n\r\n//~ \t\tif( $t != 'string' && $t != 'integer' ) {\r\n//~ \t\t\tDebugLog::log( 1, 'Cache::get: Valor de tipo desconhecido: ' . $key . '(' . $t . ')' );\r\n//~ \t\t\tdebug_print_backtrace();\r\n//~ \t\t}\r\n\r\n\t\tif( ! isset( $key ) || ! isset( $this->cache ) || ( ! is_string( $key ) && ! is_int( $key ) && ! is_float( $key ) ) ||\r\n\t\t\t\t! array_key_exists( $key, $this->cache ) ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn $this->cache[ $key ];\r\n\t}", "title": "" }, { "docid": "74d8139f7f94fba4ba56f623a3319736", "score": "0.53426635", "text": "public function getCacheItem($key) {\n return $this->getCachePool()->getItem($key);\n }", "title": "" }, { "docid": "86e759110545b6371415ed7c362b30a4", "score": "0.5333618", "text": "public function GetCache();", "title": "" }, { "docid": "a8cb7f481dd5f844e79d9af1c52657ca", "score": "0.53320426", "text": "public function retrieve($key, $callback, $duration = 0, $dependency = null)\n {\n if (($data = $this->get($key)) === false) {\n $data = call_user_func($callback);\n $this->set($key, $data, $duration, $dependency);\n }\n return $data;\n }", "title": "" }, { "docid": "787be3c6126d37f2e94722dbd51bc8df", "score": "0.53305477", "text": "public function getCache($debile = true) {\n \n if ($this->getStatus() == self::S_USABLE) {\n $mb = $this->getMetadata();\n return $mb['data'];\n } elseif ($debile && ($this->getStatus() == self::S_UPDATE || $this->getStatus() == self::S_EXPIRED)) {\n $mb = $this->getMetadata();\n return $mb['data'];\n } elseif ($this->getStatus() == self::S_UPDATE || $this->getStatus() == self::S_CREATION) {\n \n $start = time();\n \n while ($start + $this->expireWaitingTime > time()) {\n \n usleep(300000); // 0.3 seconds | 0.3 segundos\n\n $status = $this->getStatus(true);\n \n if ($status == self::S_USABLE) {\n return $this->getCache($debile);\n } elseif ($status == self::S_CANCELED) {\n return null;\n }\n \n }\n \n return null;\n } else {\n return null;\n }\n \n }", "title": "" }, { "docid": "82ee2ef25909a6de505b5f50021df492", "score": "0.5324193", "text": "public function get($key) {\r\n $this->_key = $key;\r\n $cacheFile = $this->_getFilePath();\r\n $value = null;\r\n if(file_exists($cacheFile)) {\r\n $data = json_decode(file_get_contents($cacheFile), true);\r\n if(empty($data['expire']) || $data['expire'] < time()) {\r\n $value = $data['value'];\r\n } else {\r\n $this->_error = 'Cache data expired';\r\n }\r\n } else {\r\n $this->_error = 'Cache file does not exists';\r\n }\r\n return $value;\r\n }", "title": "" }, { "docid": "35b231e13642dbd2ecf2d2c7a21ed2e5", "score": "0.5318137", "text": "function get( $callback, $args, $id=false )\n\t{\n\t\t// Normalize callback\n\t\tif (is_array( $callback )) {\n\t\t\t// We have a standard php callback array -- do nothing\n\t\t} elseif (strstr( $callback, '::' )) {\n\t\t\t// This is shorthand for a static method callback classname::methodname\n\t\t\tlist( $class, $method ) = explode( '::', $callback );\n\t\t\t$callback = array( trim($class), trim($method) );\n\t\t} elseif (strstr( $callback, '->' )) {\n\t\t\t/*\n\t\t\t * This is a really not so smart way of doing this... we provide this for backward compatability but this\n\t\t\t * WILL!!! disappear in a future version. If you are using this syntax change your code to use the standard\n\t\t\t * PHP callback array syntax: <http://php.net/callback>\n\t\t\t *\n\t\t\t * We have to use some silly global notation to pull it off and this is very unreliable\n\t\t\t */\n\t\t\tlist( $object_123456789, $method ) = explode('->', $callback);\n\t\t\tglobal $$object_123456789;\n\t\t\t$callback = array( $$object_123456789, $method );\n\t\t} else {\n\t\t\t// We have just a standard function -- do nothing\n\t\t}\n\n\t\tif (!$id) {\n\t\t\t// Generate an ID\n\t\t\t$id = $this->_makeId($callback, $args);\n\t\t}\n\n\t\t// Get the storage handler and get callback cache data by id and group\n\t\t$data = parent::get($id);\n\t\tif ($data !== false) {\n\t\t\t$cached = unserialize( $data );\n\t\t\t$output = $cached['output'];\n\t\t\t$result = $cached['result'];\n\t\t} else {\n\t\t\tob_start();\n\t\t\tob_implicit_flush( false );\n\n\t\t\t$result = call_user_func_array($callback, $args);\n\t\t\t$output = ob_get_contents();\n\n\t\t\tob_end_clean();\n\n\t\t\t$cached = array();\n\t\t\t$cached['output'] = $output;\n\t\t\t$cached['result'] = $result;\n\t\t\t// Store the cache data\n\t\t\t$this->store(serialize($cached), $id);\n\t\t}\n\n\t\techo $output;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8d331ddb835a367e0c3392e61f7d7d49", "score": "0.5317427", "text": "public static function memoize($callback) {\n return function () use ($callback) {\n static $cached = NULL;\n\n if (empty($cached)) {\n $cached = call_user_func($callback);\n }\n\n return $cached;\n };\n }", "title": "" }, { "docid": "6902de99f24f59472ff405f956c50385", "score": "0.5313636", "text": "public function getCache(): ?CacheInterface;", "title": "" }, { "docid": "c6811b0349e7292ba562a9dd52a54718", "score": "0.53134215", "text": "protected static function getFromCache(string $key): mixed {\n $adapter = static::getCacheAdapter();\n $cacheUid = static::generateCacheUid($key);\n return $adapter->get($cacheUid);\n }", "title": "" }, { "docid": "edd6f10f07c1327858f141dda3ac182f", "score": "0.5292067", "text": "public function get($key) {\n\t\t$key\t= $this->getKey($key);\n\t\tif (array_key_exists($key, $this->cache)) {\n\t\t\treturn $this->cache[$key];\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "4c25cf6eaf68b49296a08114adcff1e6", "score": "0.52916014", "text": "function wp_cache_get($id, $flag = '')\n\t\t{\n\t\t\tglobal $wp_object_cache;\n\t\t\tif (empty($flag)) { $flag = 'default'; }\n\t\t\treturn $wp_object_cache->get($id, $flag);\n\t\t}", "title": "" }, { "docid": "1f83c955608e0fe10a7ac838bb404d7a", "score": "0.5290247", "text": "public function cacheQuery($queryClosure)\n {\n $this->constructCollector();\n\n // Make sure to reset the sub query tags already here\n // Otherwise we'll get into trouble if caching is disabled for main query but not for subquery\n $subQueryTags = $this->subQueryTags;\n $this->subQueryTags = [];\n\n /* @var Reflector $reflector */\n $reflector = new Reflector($this->builder);\n\n /* @var Manager $manager */\n $manager = new Manager($reflector);\n\n // If cache is disabled, abort already here to save time\n if (!$manager->shouldCache()) {\n return $queryClosure();\n }\n\n /* @var Hasher $hasher */\n $hasher = new Hasher($reflector);\n\n /* @var Tagger $tagger */\n $tagger = new Tagger($reflector);\n\n $result = null;\n $key = $hasher->getHash();\n $tags = array_unique(array_merge($tagger->getTags(), $subQueryTags));\n\n // Check if a cached version is available\n if ($this->cache->has($key)) {\n $result = $this->cache->get($key);\n }\n\n $action = ($result === null) ? 'Miss' : 'Hit';\n\n // If not, execute the query closure and cache the result\n if ($result === null) {\n $result = $queryClosure();\n $this->cache->set($key, $tags, $result);\n }\n\n $this->destructCollector($reflector, $tags, $key, $action);\n\n return $result;\n }", "title": "" }, { "docid": "98c2c3885cba13d0e04f8c6b23a952a7", "score": "0.5288404", "text": "private function cacheHandler()\n {\n if ($this->doCache) {\n $result_dir = $_SERVER['HOME'] . '/.ah';\n @mkdir($result_dir, 0777, true);\n\n $key = sha1(json_encode(['aht', $this->arguments]));\n $result_file = $result_dir . '/ah_' . $key;\n\n if ($this->doCacheClear) {\n @unlink($result_file);\n $this->debugMsg(\"<info>removed cache:</info> {$result_file}\");\n }\n\n if (file_exists($result_file) && filemtime($result_file) < (time() + 86400)) {\n $this->debugMsg(\"<info>returning result from cache:</info> {$result_file}\");\n echo file_get_contents($result_file);\n exit;\n }\n }\n }", "title": "" }, { "docid": "86cf05ba223e067506ff4ff9f7e9239a", "score": "0.528508", "text": "public function get($key, $cache_cb = null, &$cas_token = null) {\n $startTime = microtime(true);\n\n $ret = call_user_func_array(array('parent', __FUNCTION__), func_get_args());\n\n if ($this->metricsEnabled) {\n $this->metrics['requests'][] = array(\n 'method' => __FUNCTION__,\n 'args' => func_get_args(),\n 'timeout' => $timeout = microtime(true) - $startTime,\n );\n\n $this->metrics['timeout']+=$timeout;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "249cf1bad0702b1eed308df328c06b1d", "score": "0.5284906", "text": "abstract public function fetch($key);", "title": "" }, { "docid": "562c2ef78382a10b2aa5cf212b9f4a0b", "score": "0.5281624", "text": "public function retrieve($cacheToLoad) {\r\n\t\t// not a vaild key\r\n\t\tif (!in_array($cacheToLoad,$this->VALID_WIDGET)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if a cache file already exists, as well it has not expired\r\n\t\tif($this->_config['cacheReader']->load($this->_config['cacheName'])) {\r\n\t\t\t$savedCache = $this->_config['cacheReader']->load($this->_config['cacheName']);\r\n\t\t\treturn $savedCache[$cacheToLoad];\r\n\t\t} \r\n\t\t// site is up and active\r\n\t\telse {\t\r\n\t\t\t$date = date(\"Y-M-d H:i:s\",time());\t\r\n\t\t\t\r\n\t\t\t$rss = $this->_config['rssReader']->getRss();\r\n\t\t\t\r\n\t\t\t$image = self::getRandomImage($this->_config['sideimageDir']);\r\n\t\t\t\r\n\t\t\t// save the cache\r\n\t\t\t$this->_config['cacheReader']->save(array('cachedDate'=>$date,'cachedRss'=>$rss,'cachedImage'=>$image),$this->_config['cacheName']);\r\n\t\t\t\r\n\t\t\t// return the cache\r\n\t\t\t$savedCache = $this->_config['cacheReader']->load($this->_config['cacheName']);\r\n\t\t\treturn $savedCache[$cacheToLoad];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\t// empty return value\r\n\t}", "title": "" }, { "docid": "0f3aa7be6a5fdeb0d6f857c78539c8b4", "score": "0.5278655", "text": "public function getItem($key, & $success = null, & $casToken = null)\n {\n $options = $this->getOptions();\n if ($options->getReadable() && $options->getClearStatCache()) {\n clearstatcache();\n }\n\n $argn = func_num_args();\n if ($argn > 2) {\n return parent::getItem($key, $success, $casToken);\n } elseif ($argn > 1) {\n return parent::getItem($key, $success);\n }\n\n return parent::getItem($key);\n }", "title": "" }, { "docid": "cb7399dfe759df4f28c6d1608a9f42b7", "score": "0.5277996", "text": "function getCache($id) {\n\t\t$key = INDEX_FILE_LOCATION . ':'. $this->getContext() . ':' . $this->getCacheId() . ':' . $id;\n\t\t$returner = unserialize(apc_fetch($key));\n\t\tif ($returner === false) return $this->cacheMiss;\n\t\tif (get_class($returner) === 'apc_false') $returner = false;\n\t\treturn $returner;\n\t}", "title": "" }, { "docid": "cf6533887ff477dc980657cd3e1e23dd", "score": "0.52765137", "text": "public function fetch($key) {}", "title": "" }, { "docid": "31c61ed5074e948f6d06f3fcf66e9616", "score": "0.52747995", "text": "public function get($key)\n\t{\n\t\treturn xcache_get($key);\n\t}", "title": "" }, { "docid": "f35ddf486da2401355e314a0a310a649", "score": "0.5273186", "text": "public function read() {\n // get the Memcache instance\n $memcache = $this->engine->get_memcache($this->options);\n if (!$memcache)\n return null;\n \n // get the value\n $val = $memcache->get($this->key());\n \n return (($val === false) ? null : $val);\n }", "title": "" }, { "docid": "1b38ed14dba5fb8218f52492d49fce64", "score": "0.52711713", "text": "abstract public function fetch( $key );", "title": "" }, { "docid": "248909676b205739c76ea6209727cbe4", "score": "0.52704823", "text": "protected function use_cache($cle) {\n\n\t\t$cache = $this->cache_get($cle);\n\n\t\t// Time to live\n\t\tif (isset($this->command['datacache'])) {\n\t\t\t$ttl = intval($this->command['datacache']);\n\t\t}\n\n\t\tif (\n\t\t\t$cache\n\t\t\tAND ($cache['time'] + (isset($ttl) ? $ttl : $cache['ttl']) > time())\n\t\t\tAND !prestashop_ws_cache_update()\n\t\t) {\n\t\t\treturn $cache['data'];\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "925235c1ea3822d33f22f13a759fff64", "score": "0.0", "text": "public function show(Cliente $cliente, ClienteTelefone $telefone)\n {\n return view('cliente.telefone.show', compact('cliente', 'telefone'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Rack ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e5939a87acf690823adb611bf7466da", "score": "0.0", "text": "public function destroy($id)\n {\n $note = Note::find($id);\n if ($note) {\n $note->delete();\n $data = [\"status\" => 200, 'message' => \"Deleted 'successfully\"];\n return response()->json($data);\n } else {\n return response()->json([\n \"message\" => \"Failed to Delete\",\n \"status\" => 404,\n ], Response::HTTP_NOT_FOUND);\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": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "3ea8cf24f8e5ddd1b8d2537b39da7c4c", "score": "0.0", "text": "public function destroy(Pkkmb $pkkmb)\n {\n //\n }", "title": "" } ]
[ { "docid": "f1aaf41a7156fa1ddfcdb965f9ec5b59", "score": "0.77682966", "text": "public function remove($resource)\n {\n if($this->exist($resource)){\n unset($this->resources[$resource]);\n }\n }", "title": "" }, { "docid": "8b628383b34d63dd0eb00f58ca93193b", "score": "0.703237", "text": "public static function deleteResource($resource)\n {\n $resourceKey = self::getResourceKey($resource);\n unset(self::$resource_registry[$resourceKey]);\n }", "title": "" }, { "docid": "4227c47fa6415b99ac7ad79261ad7226", "score": "0.6690498", "text": "public function removeResource(AbstractResourceFile $resource) {\n if (parent::offsetExists($resource->getMemberId())) {\n parent::offsetUnset($resource->getMemberId());\n }\n }", "title": "" }, { "docid": "cba9c3b5928674c49645b80c060a27ee", "score": "0.66900694", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "503409da4f5b9a20ee18f568cabc837e", "score": "0.6578654", "text": "protected function deleteResource($resource) {\n $translator = $this->i18n->getTranslator($resource['locale']);\n $translator->setTranslation($resource['key'], null);\n }", "title": "" }, { "docid": "104d6984e581161b647cdf9206aaa4be", "score": "0.65266734", "text": "public function delete($storage_name);", "title": "" }, { "docid": "e8e36bc4035715e1553386a49c3dd64a", "score": "0.64323646", "text": "final protected function remove($resource)\n {\n // Initilize the request as post\n $this->init('delete', $resource);\n\n // Make the request using guzzle\n return $this->call();\n }", "title": "" }, { "docid": "fa011b24954b422bb6ebfc09cdafce74", "score": "0.64162064", "text": "public function unpublishResource(PersistentResource $resource)\n {\n try {\n $objectName = $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource);\n $this->getCurrentBucket()->object($objectName)->delete();\n $this->systemLogger->log(sprintf('Successfully unpublished resource as object \"%s\" (MD5: %s) from bucket \"%s\"', $objectName, $resource->getMd5() ?: 'unknown', $this->bucketName), LOG_DEBUG);\n } catch (NotFoundException $e) {\n }\n }", "title": "" }, { "docid": "628a4d244227d2089465337bd866ab72", "score": "0.634412", "text": "public function delete() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::delete(): Attempt to delete an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM resource WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "2e3daccb9b7f61db1ba5db127ae75245", "score": "0.63187486", "text": "private static function deleteResourceAndUsage( $resource ) {\n $dbw = wfGetDB( DB_PRIMARY );\n $dbw -> delete('edusharing_resource', array( 'EDUSHARING_RESOURCE_ID = ' . $resource->EDUSHARING_RESOURCE_ID ), $fname = 'Database::delete');\n\n $postData = new stdClass ();\n $postData->nodeId = str_replace(\"ccrep://local/\",\"\",$resource->EDUSHARING_RESOURCE_OBJECT_URL);\n $postData->usageId = $resource->EDUSHARING_RESOURCE_USAGE;\n\n // delete usage from repo\n $eduService = new EduSharingService();\n $eduService -> deleteUsage( $postData );\n }", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "4266f43d7f511bcf14d6ed4a63e0608f", "score": "0.6230025", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = $this->_path . '/api/v2' . $resource;\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\tself::http_parse_headers($headers);\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "174b3cc2502c8f8c88a91296ed95d437", "score": "0.61883366", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = 'https://api.bigcommerce.com/stores/' . $this->_hash . '/v2/' . $resource;\n\t\t\n\t\tcurl_setopt($this->_curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($this->_curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\t$headersArray = self::http_parse_headers($headers);\n\t\tif (! $this->rate_limit($headersArray) && $this->retries < self::RETRY_ATTEMPTS) {\n\t\t\t$this->retries = $this->retries + 1;\n\t\t\treturn $this->delete($resource);\n\t\t}\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "04ec0c72a529ea888ebec978b8312735", "score": "0.6156356", "text": "public function deleteFromStorage()\n {\n //Original\n if(file_exists(public_path($this->url))){\n File::delete(public_path($this->url));\n }\n\n //Thumbnail\n if(file_exists(public_path($this->thumb_url))){\n File::delete(public_path($this->thumb_url));\n }\n }", "title": "" }, { "docid": "2f47947186448448aa034e3f635016f3", "score": "0.61315197", "text": "public function removeApiResource($resource)\n {\n $index = array_search($resource, $this->apiResources);\n if ($index !== false) {\n unset($this->apiResources[$index]);\n // reindex this array to be sequential zero-based.\n $this->apiResources = array_values($this->apiResources);\n }\n }", "title": "" }, { "docid": "e0c513c82c944008d275fc6f457afb42", "score": "0.6123187", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "347ab67e3e18ac392ded1095e453fdae", "score": "0.61123997", "text": "public function removeResource(string $resource): ?bool {\r\n\r\n //Check if resource exists\r\n if(true === isset($this -> resources[$resource])) {\r\n\r\n unset($this -> resources[$resource]);\r\n return true;\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "f1df46e2c5dfa855b0aae2241e47a742", "score": "0.60987437", "text": "public function destroy($id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->delete();\n\n return redirect('/storages');\n }", "title": "" }, { "docid": "7caa54c56a26f9c25867bf3b317a8b05", "score": "0.6078726", "text": "public function removeResource($key) {\r\n\t\tif (isset($this->resources[$key]))\r\n\t\t\tunset($this->resources[$key]);\r\n\t}", "title": "" }, { "docid": "4ee6a6c61b47a02140107fbd844ed2bb", "score": "0.6063936", "text": "public function removeResource($resource)\n\t{\n\t\t$this->needResource($resource);\n\n\t\t$parent = $this->resources[$resource]['parent'];\n\t\tif ($parent !== NULL) {\n\t\t\tunset($this->resources[$parent]['children'][$resource]);\n\t\t}\n\n\t\t$removed = array($resource);\n\t\tforeach ($this->resources[$resource]['children'] as $child => $foo) {\n\t\t\t$this->removeResource($child);\n\t\t\t$removed[] = $child;\n\t\t}\n\n\t\tforeach ($removed as $resourceRemoved) {\n\t\t\tforeach ($this->rules['byResource'] as $resourceCurrent => $rules) {\n\t\t\t\tif ($resourceRemoved === $resourceCurrent) {\n\t\t\t\t\tunset($this->rules['byResource'][$resourceCurrent]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tunset($this->resources[$resource]);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "6916dd8c1d60603bcf3ae4bd18d41a83", "score": "0.5977718", "text": "public function removeResource($resource)\n {\n $acl = $this->_getAcl();\n $acl->remove($resource);\n $this->_setAcl($acl);\n\n return $this;\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "ef4a1685667d21fcb638df892463f9c8", "score": "0.59317005", "text": "public function destroy($id)\n {\n $supplier = Supplier::where('id',$id)->first();\n $photo = $supplier->image;\n if($photo){\n unlink($photo);\n $supplier->delete();\n }else{\n $supplier->delete();\n }\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "d9a8a2179bed321de0122e8cff40c63a", "score": "0.5906186", "text": "public function remove($storageKey)\n {\n $path = $this->getImagePath((string) $storageKey);\n @unlink($path);\n }", "title": "" }, { "docid": "39b14dd177c56742d793fa231de87204", "score": "0.5899593", "text": "public function remove()\n {\n unlink($this->uploadDir . $this->nomenovo);\n\n parent::remove();\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": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "aad5350294ac8f905383132f720b1be8", "score": "0.588305", "text": "public function delete($resource, $arOptions);", "title": "" }, { "docid": "d6fae5ff4be2ba960f6582fc42fd3676", "score": "0.5868486", "text": "public function remove() {\n if (file_exists($this->location))\n unlink($this->location);\n parent::remove();\n }", "title": "" }, { "docid": "77eb36c589be56f3f633dc84debdce8a", "score": "0.5864072", "text": "public function clearStorage(): void;", "title": "" }, { "docid": "7e7b93a0bfbbefcf0448e892241c5a20", "score": "0.585261", "text": "public function remove($name)\n {\n if (isset($this->storage[$name])) {\n unset($this->storage[$name]);\n }\n }", "title": "" }, { "docid": "3ca22b7764fa3b3a6a94edbeb0b0d64f", "score": "0.585028", "text": "public function clear()\n {\n if (file_exists($this->storageFile)) {\n unlink($this->storageFile);\n }\n }", "title": "" }, { "docid": "41603163cf71ae1b28de95896f8297c6", "score": "0.58502716", "text": "public function destroy($id)\n {\n $this->authorize('delete', $this->resource->getModel()->find($id));\n\n if (in_array($this->module->getName(), config('resource_lock'))) {\n\t $this->unlock($id);\n\t }\n\n $this->resource->delete($id);\n }", "title": "" }, { "docid": "1486c0df76f6bc31a817da2f80eb3546", "score": "0.5835488", "text": "public function deleteResourceById($id)\n {\n $resource = $this->getRecordById($id);\n\n if (isset($resource->id)) {\n //Delete record from id\n $this->delete(array('id = ?' => $id));\n\n //Delete files\n if (!empty($this->uploadedFiles)) {\n foreach ($this->uploadedFiles as $colName => $location) {\n if (!empty($resource->$colName)) {\n $fileName = $location . $resource->$colName;\n\n if (is_file($fileName)) {\n unlink($fileName);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "5446b650450a069ded319874becfacf8", "score": "0.5749654", "text": "public function destroy($id)\n {\n $prestamo = Prestamo::where('id', $id)->first();\n $photo = $prestamo->image;\n if ($photo) {\n unlink($photo);\n $prestamo->delete();\n } else {\n $prestamo->delete();\n }\n }", "title": "" }, { "docid": "80dea14a08ed690bb6c0e40f9adf7b93", "score": "0.5730856", "text": "public function destroy($id)\n {\n $item=Item::find($id);\n //delete related file from storage\n $item->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "223830251a63efdf7921b31d2cb714b9", "score": "0.57265943", "text": "public function remove(string $path): void;", "title": "" }, { "docid": "afcc6695c26fa480351516ff52f20881", "score": "0.5723434", "text": "public function destroy($id)\n {\n $photo = Photo::find($id);\n if(file_exists(basename($photo->thumpnail_url))){\n unlink(\"storage/thumbnail/\". basename($photo->thumbnail_url));\n }\n if(file_exists(basename($photo->photo_url))){\n unlink(\"storage/slider/\". basename($photo->photo_url));\n } \n $photo->delete(); \n\n return redirect('/admin/photo/show');\n }", "title": "" }, { "docid": "e1196ae52794e4b5c86db7a7fa85b63b", "score": "0.5721902", "text": "public function destroy($id)\n {\n $image = Image::where('name','like','%'.$id.'%')->first();\n Storage::disk('spaces')->delete($image->location);\n $image->delete();\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "e8717e0d91da860445a846b6f0ff4c6e", "score": "0.5717918", "text": "public function delete($uri) {\n return $this->filesystem->unlink($uri);\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "d88570650ee0cd02f602031e7809a9e1", "score": "0.569391", "text": "public function destroy(ResourceCreator $listener, $resourceId);", "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": "e5d47a80a17edd9d97460e8002cc40a1", "score": "0.56822425", "text": "public function destroy($id)\n {\n try {\n $req = Req::find($id);\n\n foreach (json_decode($req->images) as $img){\n @unlink('storage/' . $img);\n }\n\n $req->delete();\n return response()->json([\n 'success' => 'Record deleted successfully!'\n ]);\n } catch (\\Exception $e) {\n return redirect()->back()->with('error', 'Error Try Again !!');\n }\n }", "title": "" }, { "docid": "69eb53cf8ca11222913b106ef117d68e", "score": "0.5679363", "text": "public function delete() {\n\t\t$this->checkWritePermission(true);\n\t\t$file = \\GO\\Files\\Model\\File::model()->findByPath($this->relpath);\n\t\t$file->delete();\n\t}", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "f62dc86d2fbee3e234695c789eabb485", "score": "0.5661866", "text": "public function destroy($id)\n {\n $student = Student::find($id);\n\n/* if($student->avatar)\n {\n unlink($student->avatar);\n }*/\n $student->delete();\n\n return redirect('students/')->with('success' , 'Data has been deleted');\n }", "title": "" }, { "docid": "c063d4508937e69e31d325da727fad68", "score": "0.56615514", "text": "public function unlink($filename) {\n $filename = $this->normalizePath($filename, NULL, FALSE);\n $filename_write = $this->toWritePath($filename);\n $this->writeOps->unlink($filename_write);\n if ($this->readOps instanceof ClearStatCacheInterface) {\n $this->readOps->clearstatcache($filename);\n }\n }", "title": "" }, { "docid": "7603d1c91a07e1809908a024215c7ff9", "score": "0.5659815", "text": "public function destroy($id)\n {\n $model= Model::findOrFail($id);\n $model->delete();\n\n $name = $model->image;\n File::delete(public_path().'/storage/'.$name);\n File::delete(public_path().'/storage/'.'thumb_'.$name);\n\n Alert::success('Model ' . $model->name . ' fue eliminada');\n return redirect()->route('models.index');\n }", "title": "" }, { "docid": "16edf2c6b79eca832eb0c092ab2f3f24", "score": "0.5649448", "text": "public function removeUpload()\r\n{\r\n if ($file = $this->getAbsolutePath()) {\r\n unlink($file); \r\n }\r\n}", "title": "" }, { "docid": "ca16d50e4d4e2ae00c79d72d63ee1f86", "score": "0.56463283", "text": "public function destroy($id)\n {\n\n $product = Product::findOrFail($id);\n if($product->photo){\n unlink( public_path() . $product->photo->path);\n }\n $product->delete();\n return redirect('productmodule/product')->with('message' ,\"Product Deleted Successfully\");\n\n// if ($product->delete()){\n// return new ProductResource($product);\n// }\n }", "title": "" }, { "docid": "a3a38b27322f5033d7e5049f50adbc03", "score": "0.5645099", "text": "public function unlink($uri, $context = NULL);", "title": "" }, { "docid": "0bc5c9101341c52f6ddc40571b9f9b66", "score": "0.5642073", "text": "public static function delete($image){\n if(!empty($image)){\n $image = str_replace('storage/', 'public/', $image);\n Storage::delete($image);\n }\n }", "title": "" }, { "docid": "be8b1d58278cafac500d99e1d8bf4e7c", "score": "0.56408733", "text": "public function delete()\n {\n self::getPersistenceDriver()->deleteOne($this->data);\n }", "title": "" }, { "docid": "2827a1d4696a95ab9b5d963d5f620b35", "score": "0.56362814", "text": "public function delete() {\n if (!isset($this->currentUser)) {\n throw new Exception(\"Not in session. Editing users requires login\");\n }\n if ($this->currentUser->getUser_type()!=usertype::Administrator){\n throw new Exception(\"Not valid user. Editing resource requires Administrator\");\n }\n\n // Get the user object from the database\n $idresource = $_REQUEST[\"idresource\"];\n $resource = $this->resourceMapper->findById($idresource);\n\n // Does the user exist?\n if ($resource == NULL) {\n throw new Exception(\"no such resource with id: \".$idresource);\n }\n\n // Delete the user object from the database\n $this->resourceMapper->delete($resource);\n\n\n $this->view->setFlash(sprintf(i18n(\"Resource successfully deleted.\"),$resource->getIdresource()));\n\n $this->view->redirect(\"resources\", \"index\");\n\n }", "title": "" }, { "docid": "5109ebc26960086f990edb39768f4e00", "score": "0.5635025", "text": "public function destroy($id)\n {\n unlink('.'.item::find($id)->img);\n item::destroy($id);\n Session::flash('warning','Item Removido!');\n return redirect()->route('home');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "d29811d1577ed7443199fc1b4276bdd0", "score": "0.56324077", "text": "public function remove($id) {\r\n if ($this->has($id, $this->namespace, self::SCOPE_MEMORY)) {\r\n unset($this->$cache[$this->generateAccessKey($id)]);\r\n }\r\n elseif ($this->has($id, $namespace, self::SCOPE_FILE)) {\r\n \t$filepath = $this->getFilename($this->generateAccessKey($id));\r\n \t@unlink($filepath);\r\n }\r\n }", "title": "" }, { "docid": "62ec0dff73832f5d98bdecee5d10241e", "score": "0.5628287", "text": "public function destroy($ourResource)\n {\n $ourResource= OurResource::Find($ourResource)->firstOrFail();\n $ourResource->delete();\n return redirect(route('ourresource.index'));\n\n }", "title": "" }, { "docid": "e69195d4a9a40721a876716ff49334cc", "score": "0.5625231", "text": "public function destroy($id)\n {\n\n $post = $this->globalvar['model']::find($id);\n $resourceimage = $this->imageresource;\n File::delete($this->globalvar['uploadpath'].'/'.$post->$resourceimage);\n $post->delete();\n\n Session::flash('Success', $this->globalvar['deletionsuccess']);\n return redirect()->route($this->globalvar['routeindex']);\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "3662a98e9c39b3ce43a9446f372faaea", "score": "0.56112725", "text": "public function destroyById($id);", "title": "" }, { "docid": "d19f0dd6eed7e8a8da6c207b4e430532", "score": "0.560789", "text": "public function serverDeleteVideo($resource, $email)\n {\n $resource2 = $resource;\n $path = base_path() . \"\\\\resources\\\\videos\\\\\";\n $path = $path . $email . \"\\\\\";\n\n $dir = @dir($path) or die(\"getFileList: Error abriendo el directorio $path para leerlo\");\n while(($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n /*if(is_dir($path . $archivo)) {\n // var_dump($archivo[0]);\n }*/ else if (is_readable($path . $archivo)) {\n \n $file = basename($path . $archivo); \n //echo $file;\n if($file == $resource2){\n unlink($path . $archivo);\n //echo $file;\n $contents = \"Deleted\";\n $response = Response::make($contents, 204);\n $response->header('Content-Type', 'application/json');\n return var_dump($response);\n }\n }\n }\n \n }", "title": "" }, { "docid": "be1aaccbcdec9ba85c660767bd3c39d7", "score": "0.5604081", "text": "public function destroy($id)\n {\n Resource::deleteResource($id);\n }", "title": "" }, { "docid": "b51f394c05cd4f2c03b66fb420214bf9", "score": "0.5596357", "text": "private function removeStoragePath($image)\n {\n $path_attr = $this->path_attr;\n\n Storage::delete($image->$path_attr);\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "61fba936475c878e54c2ccdf6070fb37", "score": "0.5589317", "text": "public function destroy($id)\n {\n //\n $record = Record::findOrFail($id);\n if($record->photo_id){ \n unlink(public_path() . $record->photo->file);\n }\n $record->delete();\n Session::flash('deleted_record','The record has been deleted');\n return redirect('admin/records');\n }", "title": "" }, { "docid": "e8dc5b1c3960ebd872e6313cb6c5d0a3", "score": "0.55856156", "text": "public function destroy($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->delete();\n }\n\t}", "title": "" }, { "docid": "727ad3584e68e2fbd7f4240087aca6cc", "score": "0.5571009", "text": "public function destroy($id)\n {\n $data = Supplier::findOrFail($id);\n $file_path = public_path() . $data->photo;\n if (file_exists($file_path)) {\n try {\n unlink($file_path);\n } catch (Exception $e) {\n // Do Nothing on Exception\n }\n }\n if ($data->delete()) {\n return back()->with([\"success\" => \"Data deleted successfully\"]);\n } else {\n return back()->with([\"error\" => \"Delete process failed\"]);\n }\n }", "title": "" }, { "docid": "5ee1747f20cb5d4c363843da3cc571d2", "score": "0.55688524", "text": "public function destroy($id)\n {\n try {\n \n $photo=Supplier::find($id);\n $location=base_path().'/public/img/supplier/' .$photo->Picture;\n $cc = unlink($location);\n \n Supplier::find($id)->delete(); \n return redirect('/supplier')->with('Data supplier successfully removed .');\n }\n catch(Exception $e) {\n return redirect('/supplier')->with('pesan_gagal', $e->getMessage());\n }\n }", "title": "" }, { "docid": "c70b89412cfa3204082621e98738cb27", "score": "0.5562218", "text": "public function delete()\n\t{\n\t\t$resource_contents = $this->client->query('DELETE', $this->url);\n\t\t$this->initialize_from_resource_contents($resource_contents);\n\t}", "title": "" }, { "docid": "21b9068d98d337440a28121b19231757", "score": "0.5560739", "text": "public function destroy($id)\n {\n $pic = Pic::find($id);\n $path = public_path('/storage/').$pic['name'];\n if(file_exists($path)){\n unlink($path);\n $pic->delete();\n return redirect('pics')->with('success', 'Picture has been successfully deleted');\n }\n else{\n return redirect('pics')->with('failure', 'Picture was not deleted');\n }\n }", "title": "" }, { "docid": "16a6c0a8baa71c1d7233b60b2b1c76f7", "score": "0.5559715", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n $product->delete();\n// Storage::disk('uploads')->delete($product->image_path);\n\n// unlink(public_path('uploads/' . $product->image_path)); //Native php\n return redirect()->route('products.index')->with([\n 'success' => 'product ' . $product->name . ' deleted to trash Successfully'\n ]);\n }", "title": "" }, { "docid": "944f0f53f717617ff54aba9fd9e47542", "score": "0.5556541", "text": "public function destroy($id){\n\n $image = Slider::find($id);\n\n if(unlink(public_path('/images/slider/'.$image->image))){\n $image->delete();\n return back()->with('success', 'Slider Image Deleted');\n }\n }", "title": "" }, { "docid": "120960a561ec9e0438e25d9279c7d899", "score": "0.55498356", "text": "public function destroy($id)\n {\n $deleteSingle = Menu::find($id);\n \nunlink(public_path() . '/menu/' . $deleteSingle->image);\n \n $deleteSingle->delete();\n return redirect('/admin/menu');\n }", "title": "" }, { "docid": "640b23a5dcf07677851e9c4a1dcdabf1", "score": "0.55474347", "text": "public function remove($assetFile);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "2f14aec89d53e310ca8947cee2091f8e", "score": "0.5540011", "text": "public function deleteFromResourceIndices(&$resource) {\n\n if ($this->connector != null) {\n $params = [\n 'index' => \\snac\\Config::$ELASTIC_SEARCH_RESOURCE_INDEX,\n 'id' => $resource->getID()\n ];\n\n $this->logger->addDebug(\"Updated elastic search to remove resource\");\n }\n\n }", "title": "" }, { "docid": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "d0252df7b40416387e377fa297935229", "score": "0.5537589", "text": "public function persistRemove()\n {\n $old = $this->determineName(false);\n if (!isset($old)) return;\n \n $old = new File($this->getPath() . '/' .$old);\n if (file_exists($old)) {\n if ((string)$old != (string)$this->replacement) unlink($old);\n foreach (glob($old->getPath() . '/*.' . $old->getBasename()) as $file) unlink($file);\n }\n }", "title": "" }, { "docid": "d74232efdaa63e7c24cc94cdb786b212", "score": "0.55310154", "text": "public function removeImage(){\r\n\t\t$id = Input::get('id');\r\n\t\t$image = ProductImage::where('id', $id)->pluck('image');\r\n @unlink(PRODUCTS_IMAGE_ROOT_PATH . $image);\r\n\t\tDB::table('product_images')->where('id', '=', $id)->delete();\r\n\t\tdie;\r\n\t}", "title": "" }, { "docid": "05455e5116f6ce487eddc1f096db4ea6", "score": "0.55273694", "text": "public function delete() : Resource {\n try{\n \n $this->method = 'DELETE';\n return $this;\n \n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\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": "" } ]
be53ff06d1814349f3df79a8923f5a81
Performs a cleanup of the field values before they're passed into the preview
[ { "docid": "06beb0ac5ea68a0cc31dfbdddaff75d9", "score": "0.0", "text": "protected function preparePreviewData($str, $max = NULL, $stripTags = TRUE) {\n\t\t//Enable to omit that parameter\n\t\tif ($max === NULL) {\n\t\t\tif (isset($this->parentObj->modTSconfig['properties']['previewDataMaxLen'])) {\n\t\t\t\t$max = (int)$this->parentObj->modTSconfig['properties']['previewDataMaxLen'];\n\t\t\t} else {\n\t\t\t\t$max = 2000;\n\t\t\t}\n\t\t}\n\t\tif ($stripTags) {\n\t\t\t//remove tags but avoid that the output is concatinated without spaces (#8375)\n\t\t\t$newStr = strip_tags(preg_replace('/(\\S)<\\//', '\\1 </', $str));\n\t\t} else {\n\t\t\t$newStr = $str;\n\t\t}\n\n\t\tif (isset($this->parentObj->modTSconfig['properties']['previewDataMaxWordLen'])) {\n\t\t\t$wordLen = (int)$this->parentObj->modTSconfig['properties']['previewDataMaxWordLen'];\n\t\t} else {\n\t\t\t$wordLen = 75;\n\t\t}\n\n\t\tif ($wordLen) {\n\t\t\t$newStr = preg_replace('/(\\S{' . $wordLen . '})/', '\\1 ', $newStr);\n\t\t}\n\n\t\treturn htmlspecialchars(GeneralUtility::fixed_lgd_cs(trim($newStr), $max));\n\t}", "title": "" } ]
[ { "docid": "eca60ccbfe7181c2fd8a39800a8a8f96", "score": "0.6543966", "text": "protected function clean()\n {\n unset($this->input);\n $this->index = 0;\n $this->a = $this->b = '';\n unset($this->c);\n unset($this->options);\n }", "title": "" }, { "docid": "3f3425240e8b7de0df566efc69c4b6dc", "score": "0.64887536", "text": "public function cleanFields() {\n // Remove any fields that were created.\n foreach ($this->fields as $field) {\n $this->drushContext->assertDrushCommandWithArgument(\"field-delete\", \"$field --y\");\n }\n $this->fields = array();\n }", "title": "" }, { "docid": "d45e57e243015f18cbc65dad515df0ae", "score": "0.64302874", "text": "public function cleanValues() {\r\n if (isset($this->allValues) && is_array($this->allValues)) {\r\n // Cleanup array\r\n unset($this->allValues);\r\n }\r\n }", "title": "" }, { "docid": "ee0acefa7cd0a04e0e37672727cd51e4", "score": "0.63727707", "text": "public function clearValues() {\n\t\t\t$fields = get_object_vars($this);\n\t\t\tforeach ($fields as $field => $value)\n\t\t\t\tif(substr($field, 0, 1) != '_')\n\t\t\t\t\t$this->$field = null;\n\t\t}", "title": "" }, { "docid": "b2f7d3a48537251d679a5fb63e82161b", "score": "0.6235719", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('digitaldownload.component_controller_admincp_fields_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "9021f249cdc31a0b7dce5425a9fd9346", "score": "0.6232787", "text": "public function clearStoredValues()\n {\n $this->store_fields = array();\n }", "title": "" }, { "docid": "24e7a6deeb1d4cc6f34a484bebf85d13", "score": "0.6169594", "text": "public function clean()\n\t{\n\t\t$this->data = array();\n\t}", "title": "" }, { "docid": "89216d2a0feabdec91ce0ae9cef764b0", "score": "0.6129996", "text": "public function clean() {\n\t\t$this->data = array();\n\t}", "title": "" }, { "docid": "d745ae52efe1b8b6bd0edd7ac125aafe", "score": "0.6043695", "text": "public function cleanup() {\n $this->object->removeLock();\n $this->clearCache();\n\n $returnArray = $this->object->get(array_diff(array_keys($this->object->_fields), ['content','ta','introtext','description','link_attributes','pagetitle','longtitle','menutitle','articles_container_settings','properties']));\n foreach ($returnArray as $k => $v) {\n if (strpos($k,'tv') === 0) {\n unset($returnArray[$k]);\n }\n if (strpos($k,'setting_') === 0) {\n unset($returnArray[$k]);\n }\n }\n $returnArray['class_key'] = $this->object->get('class_key');\n $this->workingContext->prepare(true);\n $returnArray['preview_url'] = $this->modx->makeUrl($this->object->get('id'), $this->object->get('context_key'), '', 'full');\n return $this->success('',$returnArray);\n }", "title": "" }, { "docid": "34e55717d815bf41bb47e7491442fbeb", "score": "0.6025605", "text": "public function cleanVars()\n {\n $this->nama_cabang = null;\n $this->kode_cabang = null;\n }", "title": "" }, { "docid": "0592df90a719c3a605a43d3d4a6b3ee0", "score": "0.602239", "text": "public function clear_preview() {}", "title": "" }, { "docid": "c44b3722a5037c9b1fe235f67cb5ba45", "score": "0.5961964", "text": "public function clean() {\r\n\t\t$this->image = null;\r\n\t\t$this->width = 0;\r\n\t\t$this->height = 0;\r\n\t\t$this->extension = '';\r\n\t\t$this->imageResized = null;\r\n\t\t$this->imageInfo = array();\r\n\t\t$this->scale = array();\r\n\t}", "title": "" }, { "docid": "a83c18a2c6487e35f0c2b0a5e58a1260", "score": "0.5953706", "text": "public function clear(){\r\n\t\t$this->fieldValues = array();\r\n\t\t$this->filteredFieldValues = array();\r\n\t}", "title": "" }, { "docid": "f45d4796570410f85764e3401fd3a73c", "score": "0.5941699", "text": "private function resetInputFields(){\n $this->denomination='';\n $this->nom_commercial='';\n $this->sigle='';\n $this->rcm='';\n $this->ncc='';\n $this->adresse='';\n $this->forme_juridique='';\n $this->capital='';\n $this->image='';\n $this->actif='';\n $this->entreprise_id='';\n }", "title": "" }, { "docid": "6efc0c7dc265c898aa8cb5dbe4316642", "score": "0.58994955", "text": "public function prepareForSaving()\n\t{\n\t\t$fields = self::TRANS_FIELDS;\n\t\tforeach ($fields as $field){\n\t\t\tif ($field !== 'content'){\n\t\t\t\t$this->{$field} = strip_tags($this->{$field});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6efc0c7dc265c898aa8cb5dbe4316642", "score": "0.58994955", "text": "public function prepareForSaving()\n\t{\n\t\t$fields = self::TRANS_FIELDS;\n\t\tforeach ($fields as $field){\n\t\t\tif ($field !== 'content'){\n\t\t\t\t$this->{$field} = strip_tags($this->{$field});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6e0bd1b945b8ed043a06158be32e1428", "score": "0.58985347", "text": "public function reset() {\n\t\t\tforeach ($this->_fields as $field => $req) {\n\t\t\t\t$this->_meta[$field] = array('value' => NULL, 'raw' => false);\n\t\t\t\t$this->$field = NULL;\n\t\t\t}\n\t\t\t$this->clearErrors();\n\t\t\t$this->clearErrorFields();\n\t\t}", "title": "" }, { "docid": "ba8820f6ce1e4f4ba89d4ba8b2c0a5f2", "score": "0.58654886", "text": "protected function runAfterValidate()\n {\n $this->replace($this->fields->modifyInputAfterValidation($this->all()));\n }", "title": "" }, { "docid": "b0742f70dd1631b261d2a0eab7ff1909", "score": "0.5850497", "text": "public function reset()\n\t{\n\t\t$this->_fields=array();\n\t\t$this->_font=null;\n\t\t$this->_class=null;\n\t\t$this->_customStyle=null;\n\t}", "title": "" }, { "docid": "a6fb3d87d511a01e7788502edec2d2de", "score": "0.58296216", "text": "function drop_fields(){\n\t\t$this->fields=array();\n\t}", "title": "" }, { "docid": "ecde348bb5bc6f1620e4775cf9442c00", "score": "0.58030987", "text": "public function updateOriginalValues() {\n if (!$this->fields) {\n return;\n }\n foreach ($this->getFieldDefinitions() as $name => $definition) {\n if (!$definition->isComputed() && !empty($this->fields[$name])) {\n foreach ($this->fields[$name] as $langcode => $item) {\n $item->filterEmptyItems();\n $this->values[$name][$langcode] = $item->getValue();\n }\n }\n }\n }", "title": "" }, { "docid": "63ae0228921dc16f86ceadaff4abf520", "score": "0.57900655", "text": "private function clearFields()\r\n {\r\n $this->join = '';\r\n }", "title": "" }, { "docid": "ddf7adb40492a32c0f7d5b3afd67b2f1", "score": "0.577134", "text": "public function reset()\n {\n $this->values[self::_WORLDCUP_QUERY] = null;\n $this->values[self::_WORLDCUP_SUBMIT] = null;\n }", "title": "" }, { "docid": "1e6d912089d05e6c05e01c4e41ac059f", "score": "0.5757232", "text": "public function clean() {\n unset($_POST);\n }", "title": "" }, { "docid": "45a221a72b6b810fa0d64680979f933b", "score": "0.57435614", "text": "public function reset()\n\n\t{\n\n\t\t$this->fields = array();\n\n\t}", "title": "" }, { "docid": "3c909f912aebcb456db4c201ad535a23", "score": "0.5701048", "text": "private function _cleanup()\n\t{\n\t\t// reset the chain using default values\n\t\t$this->active_template = 'main';\n\t\t$this->assets = array();\n\t\t$this->data = array();\t\t\n\t}", "title": "" }, { "docid": "72fd1515822b4df39597550892d7f4bf", "score": "0.5698317", "text": "private function resetInputFields(){\n $this->package_title = '';\n $this->status = '';\n $this->pricing = '';\n $this->recurring_period = '';\n }", "title": "" }, { "docid": "b9eccdc887ae58c88656313a5880449e", "score": "0.5689634", "text": "function fieldFilter() {\n foreach ( $this->aFields as $field => $arr ) {\n\n\t\t\tswitch ($field) {\n\t\t\t\tcase 'body':\n\t\t\t\t\t// allowed tags\n\t\t\t\t\t$allow_tags = \"<h1><h2><h3><h4><h5><h6><a><strong><em><ul><li><ol><span><p><br><img><table><tr><td><hr><object><embed><div><blockquote>\";\n\t\t\t\t\t$this->aFields[$field][0] = strip_tags($arr[0], $allow_tags);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'permalink':\n\t\t\t\t\tLiber::loadHelper('Url');\n\t\t\t\t\tif ( empty($arr[0]) ) {\n\t\t\t\t\t\t$this->field($field, rawurlencode( url_clean_($this->aFields['title'][0], true) ));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->field($field, rawurlencode( url_clean_(strip_tags($arr[0]),true) ) ) ;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif ( empty($arr[0]) ) { continue; }\n\t\t\t\t\t$this->aFields[$field][0] = strip_tags($arr[0]);\n\t\t\t}\n\n }\n }", "title": "" }, { "docid": "d95be899ea2810942177711a1c1b9b84", "score": "0.5685353", "text": "protected function removeFormFieldNamesFromViewHelperVariableContainer() {}", "title": "" }, { "docid": "acfaf72aa6a681a2cc0cc7a0be666316", "score": "0.56828207", "text": "public function clearDirtyFields() {\n\t\tforeach ($this->dirty as $fieldname=>$isdirty) {\n\t\t\t$this->dirty[$fieldname] = false;\n\t\t}\n\t}", "title": "" }, { "docid": "27f0209127f17c9bb141e34906bb8322", "score": "0.56809103", "text": "public function cleanupData()\n {\n // Free sql query space\n if (is_resource($this->sqlRes)) {\n $GLOBALS['TYPO3_DB']->sql_free_result($this->sqlRes);\n }\n\n // Restore localization options\n $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'] = $this->pof;\n\n // Reset things\n $this->options = null;\n $foo = $this->deleteList;\n $this->deleteList = array();\n\n return $foo;\n }", "title": "" }, { "docid": "616f7b25fefe4e3181ec075d1a2274b5", "score": "0.56794304", "text": "private function resetInputFields()\n {\n $this->account_name = '';\n $this->description = '';\n $this->account_type_id = '';\n $this->is_active = 0;\n }", "title": "" }, { "docid": "2805a67d24faa73bca7ff40b9878606b", "score": "0.56661445", "text": "public function postProcess() {\r\n\t\t// Use it to store the value of text fields in the database\r\n\t\t\r\n\t\tparent::postProcess();\r\n\t}", "title": "" }, { "docid": "01431a39cdf3d183bea5d6c0fadba763", "score": "0.56431323", "text": "private function resetValuesToNull()\n {\n $this->custom_table_name = null;\n $this->custom_controller = null;\n $this->singular = null;\n }", "title": "" }, { "docid": "987e0717b4594fa026e9830532b29220", "score": "0.5629626", "text": "public function sanitize()\n {\n // extract input request data\n $inputs = $this->all();\n\n // format\n ucfirst(trim($inputs['title']));\n trim($inputs['year']);\n trim($inputs['details']);\n\n // sanitize\n $inputs['title'] = filter_var($inputs['title'], FILTER_SANITIZE_STRING);\n $inputs['year'] = filter_var($inputs['year'], FILTER_SANITIZE_NUMBER_INT);\n\n $this->replace($inputs);\n }", "title": "" }, { "docid": "39e9f9c1f7562e51cdc0d909c9197953", "score": "0.56183594", "text": "private function getCleanTables() {\n\t\t$this->_csvi_template_fields->reset();\n\t\t$this->reset();\n\t}", "title": "" }, { "docid": "535510205ce3328dba91ed832ea1af9b", "score": "0.56165737", "text": "function cleanVars(&$object)\r\n {\r\n $ts =& MyTextSanitizer::getInstance();\r\n $errors = array();\r\n \r\n $vars = $object->getVars();\r\n $object->cleanVars = array();\r\n foreach ($vars as $k => $v) {\r\n if(!$v[\"changed\"]) {\r\n continue;\r\n }\r\n $cleanv = $v['value'];\r\n switch ($v[\"data_type\"]) {\r\n case XOBJ_DTYPE_TXTBOX:\r\n if ($v['required'] && $cleanv != '0' && $cleanv == '') {\r\n $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k );\r\n continue;\r\n }\r\n if (isset($v['maxlength']) && strlen($cleanv) > intval($v['maxlength'])) {\r\n $errors[] = sprintf( _XOBJ_ERR_SHORTERTHAN, $k, intval( $v['maxlength'] ) );\r\n continue;\r\n }\r\n if (!$v['not_gpc']) {\r\n $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv));\r\n } else {\r\n $cleanv = $ts->censorString($cleanv);\r\n }\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_TXTAREA:\r\n if ($v['required'] && $cleanv != '0' && $cleanv == '') {\r\n $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k );\r\n continue;\r\n }\r\n if (!$v['not_gpc']) {\r\n if ( !empty($vars['dohtml']['value']) ) {\r\n $cleanv = $ts->textFilter($cleanv);\r\n }\r\n $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv));\r\n } else {\r\n $cleanv = $ts->censorString($cleanv);\r\n }\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_SOURCE:\r\n $cleanv = trim($cleanv);\r\n if (!$v['not_gpc']) {\r\n $cleanv = $ts->stripSlashesGPC($cleanv);\r\n } else {\r\n $cleanv = $cleanv;\r\n }\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_EMAIL:\r\n $cleanv = trim($cleanv);\r\n if ($v['required'] && $cleanv == '') {\r\n $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k );\r\n continue;\r\n }\r\n if ($cleanv != '' && !preg_match(\"/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+([\\.][a-z0-9-]+)+$/i\",$cleanv)) {\r\n $errors[] = \"Invalid Email\";\r\n continue;\r\n }\r\n if (!$v['not_gpc']) {\r\n $cleanv = $ts->stripSlashesGPC($cleanv);\r\n }\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_URL:\r\n $cleanv = trim($cleanv);\r\n if ($v['required'] && $cleanv == '') {\r\n $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k );\r\n continue;\r\n }\r\n if ($cleanv != '' && !preg_match(\"/^http[s]*:\\/\\//i\", $cleanv)) {\r\n $cleanv = 'http://' . $cleanv;\r\n }\r\n if (!$v['not_gpc']) {\r\n $cleanv = $ts->stripSlashesGPC($cleanv);\r\n }\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_OTHER:\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_INT:\r\n $cleanv = intval($cleanv);\r\n break;\r\n \r\n case XOBJ_DTYPE_ARRAY:\r\n if ( !$v['not_gpc'] ){\r\n $cleanv = array_map(array(&$ts, \"stripSlashesGPC\"), $cleanv);\r\n }\r\n foreach (array_keys($cleanv) as $key) {\r\n $cleanv[$key] = str_replace('\\\\\"','\"', addslashes($cleanv[$key]));\r\n }\r\n \r\n // TODO: Not encoding safe, should try base64_encode -- phppp\r\n $cleanv = \"'\" . serialize($cleanv) . \"'\";\r\n break;\r\n \r\n case XOBJ_DTYPE_STIME:\r\n case XOBJ_DTYPE_MTIME:\r\n case XOBJ_DTYPE_LTIME:\r\n $cleanv = !is_string($cleanv) ? intval($cleanv) : strtotime($cleanv);\r\n break;\r\n \r\n default:\r\n $cleanv = $this->handler->db->quote($cleanv);\r\n break;\r\n }\r\n $object->cleanVars[$k] = $cleanv;\r\n }\r\n if (!empty($errors)) {\r\n $object->setErrors($errors);\r\n }\r\n $object->unsetDirty();\r\n\r\n return empty($errors) ? true : false;\r\n }", "title": "" }, { "docid": "58c10a681042d133cbc8cbeb065b7eb8", "score": "0.56115943", "text": "public function clearFieldsModified()\n {\n $this->fieldsModified = array();\n }", "title": "" }, { "docid": "a3df4d4cd00f145c139466bb7ab0de8a", "score": "0.5601265", "text": "public function removeEmptyChecks()\n {\n foreach($this->getWidgetSchema()->getFields() as $key => $value) {\n if ( ($value instanceof sfWidgetFormFilterInput) || \n ($value instanceof sfWidgetFormFilterDate) ) {\n $this->widgetSchema[$key]->setOption('with_empty', false);\n }\n }\n }", "title": "" }, { "docid": "b76c4d63643548a4de624c95be4a0db8", "score": "0.5582052", "text": "function sanitize_inputs()\n\t{\n\t\tif(isset($this->checked)) {\n\t\t\t$checked = get_object_vars($this->checked);\n\t\t\tforeach($checked as $key =>$value) {\n\t\t\t\tif (!is_array($checked[$key]) AND $key != \"faq_answer\") {\n\t\t\t\t\t$this->checked->$key = trim($this->inputfilter->process($value));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9dc9ed96ef47c51c46ecd981b889299", "score": "0.55801654", "text": "public function clean()\n\t{\n\t\t$this->_dirty = [];\n\t}", "title": "" }, { "docid": "c3284eecca47b8c0872cd01172f49ce7", "score": "0.55710566", "text": "public function sanitize_fields( $fields ){\n foreach ( $fields as $field_key => $field ) {\n\n if( 'background' == $field['type'] ){\n $child_fields = $this->get_background_child_fields( $field );\n unset( $fields[ $field_key ] );\n $fields = array_merge( $fields, $child_fields );\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "c65698714db548d7c1a7b4ced12d7558", "score": "0.554402", "text": "function sumfields_deinitialize_custom_data() {\n sumfields_delete_custom_fields_and_table();\n}", "title": "" }, { "docid": "b40e95df6c3f6f06be0211de25a23d59", "score": "0.552761", "text": "private function _clean_up_data() {\n if (isset($this->_collected_data[self::RECORD_TYPE_FULL])) {\n foreach ($this->_collected_data[self::RECORD_TYPE_FULL] as $post_id) {\n if (isset($this->_collected_data[self::RECORD_TYPE_INCLUSION]) && ($key = array_search($post_id, $this->_collected_data[self::RECORD_TYPE_INCLUSION])) !== false) {\n unset($this->_collected_data[self::RECORD_TYPE_INCLUSION][$key]);\n }\n }\n }\n }", "title": "" }, { "docid": "6a21d1df2fb8988d7193cfdfd0b16741", "score": "0.55257976", "text": "public function post_convert_field() {\n\t\tparent::post_convert_field();\n\n\t\t// Ensure the choices property is not an array to prevent issues with some features such as the conditional logic reset to default.\n\t\t$this->choices = null;\n\t}", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.5518202", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.5518202", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.5518202", "text": "public function clean();", "title": "" }, { "docid": "b4265d5155c8023652961f785d139def", "score": "0.5506771", "text": "protected function removeFormObjectFromViewHelperVariableContainer() {}", "title": "" }, { "docid": "698824ac88a06d2c6aea1a4dadd9da53", "score": "0.5503516", "text": "function _cleanUpFields()\n {\n\n foreach( $this->controllerClass->{$this->modelKey}->_tableInfo as $table )\n {\n foreach ($table as $field)\n {\n if('date' == $field['type'] && isset($this->controllerClass->params['data'][$this->modelKey][$field['name'].'_year']))\n {\n $newDate = $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_year'].'-';\n $newDate .= $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_month'].'-';\n $newDate .= $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_day'].' ';\n $this->controllerClass->params['data'][$this->modelKey][$field['name']] = $newDate;\n }\n else if( 'datetime' == $field['type'] && isset($this->controllerClass->params['data'][$this->modelKey][$field['name'].'_year'] ) )\n {\n $hour = $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_hour'];\n if( $hour != 12 && 'pm' == $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_meridian'] )\n {\n $hour = $hour + 12;\n }\n $newDate = $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_year'].'-';\n $newDate .= $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_month'].'-';\n $newDate .= $this->controllerClass->params['data'][$this->modelKey][$field['name'].'_day'].' ';\n $newDate .= $hour.':'.$this->controllerClass->params['data'][$this->modelKey][$field['name'].'_min'].':00';\n $this->controllerClass->params['data'][$this->modelKey][$field['name']] = $newDate;\n }\n else if( 'tinyint(1)' == $field['type'] )\n {\n if( isset( $this->controllerClass->params['data'][$this->modelKey][$field['name']]) &&\n \"on\" == $this->controllerClass->params['data'][$this->modelKey][$field['name']] )\n {\n $this->controllerClass->params['data'][$this->modelKey][$field['name']] = true;\n }\n else\n {\n $this->controllerClass->params['data'][$this->modelKey][$field['name']] = false;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "14d9b530ae47253c90dfaaf145907105", "score": "0.54988927", "text": "public function clean()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "1380d37ce13f86196f0c9cd9ff031b56", "score": "0.5460655", "text": "public function cleanPost( )\n {\n\n $this->request->removeData( 'my_user_profile' ); //def my_user_profile\n $this->request->removeData( 'core_person' );\n\n\n // still running? fine :-)\n return true;\n\n }", "title": "" }, { "docid": "4901c891ce6a3f2d47885c82e61ddb57", "score": "0.54598665", "text": "public function clean() {}", "title": "" }, { "docid": "6b21e8220f4c994283e4a5d4f3a4492e", "score": "0.5450611", "text": "protected function removeCheckboxFieldNamesFromViewHelperVariableContainer() {}", "title": "" }, { "docid": "4f02420d274ad174f7d6de94727a3128", "score": "0.5450144", "text": "public function reset(){\n $this->fields = array();\n}", "title": "" }, { "docid": "9f055ca993ed846e98b0313894aee7b2", "score": "0.54424155", "text": "public static function clean_input()\n {\n }", "title": "" }, { "docid": "dd17e7627e856d3ebcb93e8f4c2a536d", "score": "0.5433643", "text": "public function clean()\r\n {\r\n $this->current = '';\r\n }", "title": "" }, { "docid": "8ec82bfdf6f87553aefba6b3be3179e2", "score": "0.5429368", "text": "public function clearTransformation()\n {\n $this->data = [];\n $this->sequence = [];\n $this->trans = '';\n }", "title": "" }, { "docid": "6f71195a4cfdc791449b2e60e44a9362", "score": "0.54233104", "text": "protected function processFields()\n {\n foreach ($this->content->fieldset()->fieldtypes() as $field) {\n if (! in_array($field->getName(), array_keys($this->fields))) {\n continue;\n }\n\n $this->fields[$field->getName()] = $field->process($this->fields[$field->getName()]);\n }\n\n // Get rid of null fields\n $this->fields = array_filter($this->fields);\n }", "title": "" }, { "docid": "e7c1bd2b278a43cbc66cd3d28628da5e", "score": "0.5420128", "text": "function clean(){\n\t\t$this->plantilla='';\n\t\t$this->to='';\n\t\t$this->asunto='';\n\t\t$this->encabezado='';\n\t}", "title": "" }, { "docid": "563b778ea56dd9c0b56906a2c76f5a25", "score": "0.5419106", "text": "public function clean()\n {\n foreach ($this->types as $type) {\n $type->clean();\n }\n $this->scopeCodeResolver->clean();\n }", "title": "" }, { "docid": "563b778ea56dd9c0b56906a2c76f5a25", "score": "0.5419106", "text": "public function clean()\n {\n foreach ($this->types as $type) {\n $type->clean();\n }\n $this->scopeCodeResolver->clean();\n }", "title": "" }, { "docid": "eddc54855447452bd93c7378a30e0540", "score": "0.5415297", "text": "public function sanitize()\n {\n $attributes = $this->all();\n $attributes = $this->filterEditRoles($attributes);\n\n $this->replace($attributes);\n }", "title": "" }, { "docid": "e86ce959d27c3e4bfc0170ca6d653cf7", "score": "0.5405883", "text": "private function _clearSensitiveData()\n {\n $this->_oPaymentInfo->oxuserpayments__oxvalue->value = null;\n $this->_oPaymentInfo->_aDynValues = null;\n $this->_oPaymentInfo->save();\n }", "title": "" }, { "docid": "e15a5493d690b63c6ac04594516cff90", "score": "0.5403883", "text": "function full_clean()\n\t{\n\t\t$this->errors = array();\n\t\tif (!$this->is_bound) {\n\t\t\treturn;\n\t\t}\n\t\t$this->cleaned_data = array();\n\t\t// pro kazde policko formulare zavolame clean metody\n\t\tforeach (array_keys($this->fields) as $name) {\n\t\t\t$field = &$this->fields[$name];\n\t\t\t// pokud je toto policko disablovane, bude v cleaned_data vracena initial hodnota\n\t\t\t// podle nebude validovano...\n\t\t\tif($field->disabled){\n\t\t\t\t$this->cleaned_data[$name] = $this->get_initial($name);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$value = $field->widget->value_from_datadict(\n\t\t\t\t$this->data, \n\t\t\t\t$this->add_prefix($name)\n\t\t\t);\n\n\t\t\tlist($error, $value) = $field->clean($value);\n\t\t\tif(is_array($error) && sizeof($error)==0){ $error = null; }\n\t\t\tif (is_null($error)) {\n\t\t\t\t$this->cleaned_data[$name] = $value;\n\t\t\t\tif (method_exists($this, 'clean_'.$name)) {\n\t\t\t\t\tlist($error, $value) = call_user_func(array($this, 'clean_'.$name));\n\t\t\t\t\tif (is_null($error)) {\n\t\t\t\t\t\t$this->cleaned_data[$name] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!is_null($error)) {\n\t\t\t\tif(!isset($this->errors[$name])){ $this->errors[$name] = array(); }\n\t\t\t\tif(is_array($error)){\n\t\t\t\t\tforeach($error as $e){ $this->errors[$name][] = (string)$e; }\n\t\t\t\t}else{\n\t\t\t\t\t$this->errors[$name][] = (string)$error;\n\t\t\t\t}\n\t\t\t\tif (isset($this->cleaned_data[$name])) {\n\t\t\t\t\tunset($this->cleaned_data[$name]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// globalni clean pro cely formular\n\t\tlist($error, $this->cleaned_data) = $this->clean();\n\t\tif (!is_null($error)) {\n\t\t\tif (isset($this->errors[NON_FIELD_ERRORS])) {\n\t\t\t\t$this->errors[NON_FIELD_ERRORS][] = $error;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->errors[NON_FIELD_ERRORS] = array($error);\n\t\t\t}\n\t\t}\n\t\t// pokud se vyskytla nejaka chyba, pak musime dat pryc cele pole cleaned_data\n\t\tif (count($this->errors) > 0) {\n\t\t\tunset($this->cleaned_data);\n\t\t}\n\t}", "title": "" }, { "docid": "6087303a4f136c487b178610e458477e", "score": "0.53882545", "text": "function loop_clean(&$data)\n {\n foreach ($data as $key => $value)\n {\n if (!is_array($value))\n {\n // Well formatted string; PHP4 requires \"stripslashes\" on all input fields\n $data[$key] = trim(htmlspecialchars(strip_tags(stripslashes($value)), ENT_QUOTES, 'UTF-8'));\n }\n else\n {\n $this->loop_clean($value);\n $data[$key] = $value;\n }\n }\n }", "title": "" }, { "docid": "bc19e7fafb6e8b218ba28d53a885ef23", "score": "0.5385178", "text": "protected function prepareForSave()\n\t{\n\t parent::prepareForSave();\n\t \n\t // if ($this->getEntity()->getpageId())\n\t // {\n\t // $qbRemoveValues=$this->getDefaultEntityManager()->createQueryBuilder();\n\t\n // $qbRemoveValues->delete('DynamicListModule\\Entity\\DynamicListModulePagesItemFields', 'dlmif')\n // ->where('dlmif.item = :item')\n // ->setParameter('item', $this->getEntity());\n\n // $qbRemoveValues->getQuery()->execute();\n\t\t// }\n\n //Remove the old values\n if ($this->getEntity()->getId()) {\n $qbRemoveValues = $this->getDefaultEntityManager()->createQueryBuilder();\n\n $qbRemoveValues->delete('DynamicListModule\\Entity\\DynamicListModuleItemFields', 'dlmif')\n ->where('dlmif.item = :item')\n ->setParameter('item', $this->getEntity());\n\n $qbRemoveValues->getQuery()->execute();\n } \n }", "title": "" }, { "docid": "dfbe6a12d453629f8f1dc61965c42b14", "score": "0.5383176", "text": "public function clean() {\n unset($this->_dataRequest);\n }", "title": "" }, { "docid": "9e65a42ecae2a30601438498430d024f", "score": "0.537737", "text": "public function sanitize() \n {\n $data = $this->all();\n\n $data['name'] = str_replace('-', ' ', $data['name']);\n\n $this->replace($data);\n }", "title": "" }, { "docid": "a5bd6c33776ec281c986c05e69921fd7", "score": "0.53738546", "text": "public function reset()\n {\n $this->values[self::province_name] = null;\n $this->values[self::province_code] = null;\n $this->values[self::city_name] = null;\n $this->values[self::city_code] = null;\n }", "title": "" }, { "docid": "8dbf379b2ff4ca0c7d9ee1186f82a7e3", "score": "0.5367484", "text": "protected function _afterLoad()\n {\n $value = $this->getValue();\n $value = $this->makeArrayFieldValue($value);\n $this->setValue($value);\n }", "title": "" }, { "docid": "1f14978c340551a5c437f5a04394a2ca", "score": "0.5360591", "text": "abstract protected function clean($value);", "title": "" }, { "docid": "d2e7a1d36e7cd574b5d60c455a5649b3", "score": "0.534784", "text": "private function resetEntryValueGenerator()\n\t{\n\t\t$this->entryValueGenerator->resetQuery();\n\t}", "title": "" }, { "docid": "9e76672cf58653027f91cf26ce62ece5", "score": "0.5337199", "text": "public function clean()\n {\n (($sPlugin = Phpfox_Plugin::get('musicsharing.component_controller_edit_clean')) ? eval($sPlugin) : false);\n }", "title": "" }, { "docid": "f6191692deeb94f74964ca2a1349b00a", "score": "0.53289485", "text": "public function clearData()\n {\n $this->cpf = preg_replace('/[^0-9]/', '', $this->cpf);\n }", "title": "" }, { "docid": "49cbf3f5732941940df508aa8f2652ab", "score": "0.5328727", "text": "private function processDeletion() {\n\t\t// no need for a front-end editor if there is nothing to delete\n\t\tif ($this->piVars['delete'] == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For testing, the FE editor's FORMidable object must not be created.\n\t\t$frontEndEditor = t3lib_div::makeInstance(\n\t\t\t'tx_realty_frontEndEditor', $this->conf, $this->cObj,\n\t\t\t$this->piVars['delete'], 'pi1/tx_realty_frontEndEditor.xml',\n\t\t\t$this->isTestMode\n\t\t);\n\t\t$frontEndEditor->deleteRecord();\n\t}", "title": "" }, { "docid": "2890ca46d968f42a5743df95c42b2afc", "score": "0.5328495", "text": "abstract public function clean();", "title": "" }, { "docid": "e38b5a77794e3732ef635b5de240ccea", "score": "0.5326324", "text": "public static function refresh_field_preview() {\r\n\t\trequire_once( GFCommon::get_base_path() . '/form_detail.php' );\r\n\t\tGFFormDetail::refresh_field_preview();\r\n\t}", "title": "" }, { "docid": "b118aa1e5c25bd15c9dbc3f01e3cb12b", "score": "0.53197175", "text": "private function clearVars(){\n\t\t\n\t\t$this->error = \"\";\n\t\t$this->tablename = \"\";\n\t\t$this->className = \"\";\n\t\t$this->filename = \"\";\n\t\t$this->arrayFieldNames = array();\n\t\t$this->primaryKey = \"\";\n\t\t$this->primaryKeyType = \"\";\n\t\t\n\t\t$this->classFile = \"\";\n\t\t$this->txt = \"\";\n\t\t$this->listOfCommaSeparatedFieldNames = \"\";\n\t\t\n\t\t$this->listOfFieldNames = \"\";\n\t\t$this->listOfSETFieldNames = \"\";\n\t\t$this->placeholders = \"\";\n\t\t$this->s = \"\";\n\n\t}", "title": "" }, { "docid": "0a20c301b34b70fc13b5daf9288cd8e8", "score": "0.5317504", "text": "function cleanParam()\n\t{\n\n\t\tif (!empty($this->ref)) $this->ref = trim($this->ref);\n\t\tif (!empty($this->nom)) $this->nom = trim($this->nom);\n\t\tif (!empty($this->soc1)) $this->soc1 = trim($this->soc1);\n\t\tif (!empty($this->soc2)) $this->soc2 = trim($this->soc2);\n\t\tif (!empty($this->tarif)) $this->tarif = trim($this->tarif);\n\t\tif (!empty($this->date)) $this->date = trim($this->date);\n\t\tif (!empty($this->terrain)) $this->terrain = trim($this->terrain);\n\t\tif (!empty($this->categ)) $this->categ = trim($this->categ);\n\n\t}", "title": "" }, { "docid": "3221e96d8a903bba0254a7f97a08cb56", "score": "0.5313859", "text": "protected function removeFieldNamePrefixFromViewHelperVariableContainer() {}", "title": "" }, { "docid": "27ee27f8686d181980ec167b077952f3", "score": "0.5309363", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('page.component_controller_view_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "920b562526c0d6c9ce758e0e5fdffdbb", "score": "0.53068495", "text": "public function _memorizeCleanState() {\n\t\t$this->isModified = FALSE;\n\t}", "title": "" }, { "docid": "63b37b0cc7a420edd04da2efafe0c8cf", "score": "0.52988607", "text": "protected function _afterLoad()\n {\n $value = $this->getValue();\n $value = Mage::helper('factfinder/backend')->unserializeFieldValue($value);\n $this->setValue($value);\n }", "title": "" }, { "docid": "b186736b6c9b5df086bde89c974db061", "score": "0.5295571", "text": "public function _replyToDeleteFieldErrors() {\n $this->oUtil->deleteTransient( \"apf_field_erros_\" . get_current_user_id() );\n }", "title": "" }, { "docid": "b7f44372267a53bfb6bd1f6b0f7b6140", "score": "0.5283662", "text": "public function reset(){\n parent::reset();\n $this->_authorsArray = null;\n $this->_areas = null;\n }", "title": "" }, { "docid": "5f6b96c09b387d9d63446a64c598c0b8", "score": "0.5270507", "text": "public function deleteFieldValuesData($data);", "title": "" }, { "docid": "f676bb5c0fb085cd8b6b5a3cb5120db1", "score": "0.5269524", "text": "final public function _clear_aggregated_multidimensional_preview_applied_flag() {\n\t\tunset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['preview_applied_instances'][ $this->id ] );\n\t}", "title": "" }, { "docid": "54da3efd0774e1b680010e9318420a36", "score": "0.5267127", "text": "protected function reset()\n {\n $this->item = $this->itemFactory->item();\n $this->fields = new stdClass();\n }", "title": "" }, { "docid": "c7e27aecfed7911a40b7b4f13a92adf5", "score": "0.526319", "text": "public function cleanupData($skipFields)\n {\n if ($skipFields && is_array($skipFields)) {\n $this->_skipFields = $skipFields;\n }\n $this->setOriginalData($this->_cleanupData($this->getOriginalData()));\n $this->setResultData($this->_cleanupData($this->getResultData()));\n }", "title": "" }, { "docid": "a49d79d6f80ca98cfd74941201e3936c", "score": "0.5261943", "text": "public function clearQueryFields() {\n $this->_query_fields = array();\n }", "title": "" }, { "docid": "7833449014d203c97355ace86f574222", "score": "0.52602714", "text": "private function cleanProperties(): void\n {\n $this->services = null;\n $this->configCache = null;\n $this->container = null;\n $this->dumper = null;\n }", "title": "" }, { "docid": "989c2d1dfce0d990521f8d883c58e55d", "score": "0.525769", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('group.component_controller_view_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "a1dd5969a7ba46a1898b6fbb3ab045f1", "score": "0.52570975", "text": "public function cleanCurrent() {}", "title": "" }, { "docid": "ba600b6a0731d9dae683788ba738ac52", "score": "0.525202", "text": "function _clean_fields($table, &$data)\n\t{\n\t\tglobal $DB;\n\t\t\n\t\t$query = $DB->query(\"SHOW COLUMNS FROM \".$DB->escape_str($table));\n\t\t\n\t\t$fields = array();\n\t\t\n\t\tforeach ($query->result as $row)\n\t\t{\n\t\t\t$fields[] = $row['Field'];\n\t\t}\n\t\t\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif ( ! in_array($key, $fields))\n\t\t\t{\n\t\t\t\tunset($data[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "adfc01fb02fb77bf986b6df09b9732c2", "score": "0.5246935", "text": "function free()\n {\n unset($this->tags);\n unset($this->page);\n unset($this->private_content_tags);\n $this->open_forms = array();\n $this->complete_forms = array();\n $this->frameset = false;\n $this->loading_frames = array();\n $this->frameset_nesting_level = 0;\n $this->left_over_labels = array();\n }", "title": "" }, { "docid": "7ac45f9e9c082d40eae3c506e1a7b757", "score": "0.52455246", "text": "public function reset() {\n\t\t$this->value = \"\";\n\t\t$this->classes_input = array();\n\t\t$this->classes_outer = array();\n\t\t$this->message = false;\n\t}", "title": "" }, { "docid": "83e1dc66cb7415f3cb6a4fdaf817d572", "score": "0.52408123", "text": "function dt_f_benefits_att_fields($fields, $post) {\r\n\tif( 'dt_benefits' == get_post_type($post->post_parent) ) {\r\n unset($fields['align']);\r\n unset($fields['image-size']);\r\n unset($fields['post_content']);\r\n unset($fields['image_alt']);\r\n unset($fields['url']);\r\n\t}\r\n\treturn $fields;\r\n}", "title": "" }, { "docid": "49e2b5abbbc51dfa742f0cdd55e1261f", "score": "0.52393204", "text": "public function clean() {\n }", "title": "" }, { "docid": "40787bebc94f9c40695f8c7bfeb985b2", "score": "0.52393144", "text": "public function clear()\n {\n foreach ( $this->properties as $name => $value )\n {\n if ( !in_array( $name, array( 'name', 'namespace', 'errors', 'hasError' ), true ) )\n {\n $this->properties[$name] = null;\n }\n }\n }", "title": "" }, { "docid": "5342ff3f4e0e452559be1cc8897b4547", "score": "0.5238525", "text": "public function destroy(FieldsOtherValue $fieldsOtherValue)\n {\n //\n }", "title": "" } ]
bfcf7d2e2437f503e7ae4911c416acf7
Facebook login handler, show login href called from router and shows login link
[ { "docid": "d313d29a73ef52028de7e4f84566d2a3", "score": "0.745218", "text": "public function login() {\r\n if (isset($this->app_id)) {\r\n $helper = $this->fb->getRedirectLoginHelper();\r\n $loginUrl = $helper->getLoginUrl($this->facebook_callback, static::PERMISSIONS);\r\n\r\n /**\r\n * Show Login Button \r\n */\r\n // echo '<a href=\"' . $loginUrl . '\">Log in with Facebook!</a>';\r\n\r\n /**\r\n * Automatic Redirect \r\n */\r\n echo \"<script>window.location = '\".$loginUrl.\"'</script>\";\r\n } else {\r\n echo \"Login: Add Facebook App Id and App Secret to Plugin\";\r\n }\r\n }", "title": "" } ]
[ { "docid": "f7580c486c73b60d8e478f48f384b0ee", "score": "0.76277405", "text": "public function loginFacebook() {\n // TODO \n\t}", "title": "" }, { "docid": "f002b240b0df1cf269d4b3562261b174", "score": "0.72802114", "text": "public function loginAction() {\n\t\t//figure out where the user came from\n\t\t$session = Mage::getSingleton('customer/session');\n\t\tif (!$session->getData('fbc_refer') && isset($_SERVER['HTTP_REFERER'])) {\n\t\t\t$session->setData('fbc_refer', $_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t//get SSL aware attributes\n\t\tif ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')) {\n\t\t\t$forceSecure = TRUE;\n\t\t} else {\n\t\t\t$forceSecure = FALSE;\n\t\t}\n\t\t$locale = Mage::getStoreConfig('general/locale/code');\n\t\t$urlParams = array();\n\t\t$urlParts = array();\n\t\t$urlParams['return_session'] = 1;\n\t\t$urlParams['fbconnect'] = 1;\n\t\t$urlParams['extern'] = 2;\n\t\t$urlParams['display'] = 'popup';\n\t\t$urlParams['api_key'] = urlencode(Mage::getStoreConfig('metrof_fbc/fbconnect/apikey'));\n\t\t$urlParams['next'] = urlencode(Mage::getUrl('fbc/index/xdreceiver', array('_forced_secure'=>$forceSecure)));\n\t\t$urlParams['cancel_url'] = urlencode(Mage::getUrl('*'));\n\t\t$urlParams['fname'] = '_opener';\n\t\t$urlParams['locale'] = $locale;\n\t\t$urlParams['channel_url'] = urlencode(Mage::getUrl('fbc/index/xdreceiver', array('_forced_secure'=>$forceSecure)));\n\t\t$url = 'http://www.facebook.com/login.php?';\n\n\t\tforeach ($urlParams as $_k => $_v) {\n\t\t\t$urlParts[] = $_k.'='.$_v;\n\t\t}\n\t\t$url .= implode('&', $urlParts);\n\t\theader('Location: '.$url);\n\t\texit();\n\n\t}", "title": "" }, { "docid": "61e7ecf5fc1dc8ba855d8ab69e330d3e", "score": "0.717431", "text": "public function login()\n {\n $login_url = $this->fb->getLoginUrl(['email', 'publish_actions']);\n // print_r($login_url);\n // die();\n return $login_url;\n // Obviously you'd do this in blade :)\n //echo '<a href=\"' . $login_url . '\">Login with Facebook</a>';\n }", "title": "" }, { "docid": "23b7f71c61cf27efb8544ffb6a99a33d", "score": "0.70936614", "text": "public function iLogInToFacebook()\n {\n $session = $this->getSession();\n $page = $session->getPage();\n $usern = $this->params['Facebook']['user'];\n $passw = $this->params['Facebook']['pass'];\n $page->fillField(\"email\", $usern);\n $page->fillField(\"pass\", $passw);\n #$page->clickLink(\"Log In\");\n $page->pressButton(\"loginbutton\");\n }", "title": "" }, { "docid": "346bd6be890de29f5bfe50a8b5cf9a26", "score": "0.7050936", "text": "public function loginCallback() {\r\n $helper = $this->fb->getRedirectLoginHelper();\r\n try {\r\n $accessToken = $helper->getAccessToken();\r\n } catch (FacebookResponseException $e) {\r\n // When Graph returns an error\r\n echo 'Graph returned an error: ' . $e->getMessage();\r\n exit;\r\n } catch (FacebookSDKException $e) {\r\n // When validation fails or other local issues\r\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\r\n exit;\r\n }\r\n if (isset($accessToken)) {\r\n $permanentAccessToken = $this->getPermananetAccessToken((string)$accessToken);\r\n Settings::set('access_token', (string)$permanentAccessToken);\r\n echo \"<script>window.location = '\".$this->backend_url.\"'</script>\";\r\n } else {\r\n $error = $helper->getError();\r\n if ($error) {\r\n echo \"FacebookSDK error: \" . $error;\r\n exit;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d141c450978c1df54f42827b98e3636f", "score": "0.6886884", "text": "function init(){\n global $fb;\n $helper = $fb->getRedirectLoginHelper();\n\n $permissions = ['email']; // Optional permissions\n $loginUrl = $helper->getLoginUrl(HOST . '/fb-callback.php', $permissions);\n\n echo '<a href=\"' . htmlspecialchars($loginUrl) . '\">Iniciar sesion con facebook</a>';\n}", "title": "" }, { "docid": "9adc5772fa1d79ff2b3b8597445c889b", "score": "0.686942", "text": "public function login()\n\t{\n\t\t$fbPermissions = 'email'; //Required facebook permissions\n\n\t\t//$fbuser = null;\n\t\t$loginUrl = $this->facebook->getLoginUrl(array('redirect_uri'=>site_url('').'/','scope'=>$fbPermissions));\n\t\theader(\"Location:{$loginUrl}\"); \t\t\n\t\t\n\t}", "title": "" }, { "docid": "54f023a1724e6e26ab754c2502b77ff7", "score": "0.682644", "text": "public function fb_login(){\n\n // echo env('FACEBOOK_REDIRECT_URL');\n $login = $this->fb->getRedirectLoginHelper()\n ->getLoginUrl(app('url')->to('facebook/callback'), ['email']);\n\n return redirect($login);\n }", "title": "" }, { "docid": "c7a795315114f53bfed24ecde09019f7", "score": "0.6794968", "text": "public function onAuthenticateWithFacebook(){}", "title": "" }, { "docid": "477d035a0bf128d1d8e8bd769db5d3f5", "score": "0.67894644", "text": "public function getFacebookLogin()\n {\n return Socialize::with('facebook')->redirect();\n }", "title": "" }, { "docid": "7cdf288ed63f748e2a6577d26f62fe2e", "score": "0.6758012", "text": "function action_fb_login() {\r\n // Facebook login must be enabled in config/useradmin.php\r\n if(!Kohana::config('useradmin')->facebook) {\r\n Message::add('error', 'Facebook login is not enabled. Please register below.');\r\n Request::instance()->redirect('user/register');\r\n }\r\n include Kohana::find_file('vendor', 'facebook/src/facebook');\r\n // Create our Facebook SDK instance.\r\n $facebook = new Facebook(\r\n array(\r\n 'appId' => Kohana::config('facebook')->app_id,\r\n 'secret' => Kohana::config('facebook')->secret,\r\n 'cookie' => true, // enable optional cookie support\r\n )\r\n );\r\n $me = null;\r\n // Session based API call.\r\n if ($facebook->getSession()) {\r\n try {\r\n $uid = $facebook->getUser();\r\n // read user info as array from Graph API\r\n $me = $facebook->api('/me');\r\n } catch (FacebookApiException $e) {\r\n // do nothing\r\n }\r\n }\r\n // check if user is logged in\r\n $user = ORM::factory('user')->where('facebook_user_id', '=', $facebook->getUser())->find();\r\n if(is_numeric($user->id) && ($user->id != '0')) {\r\n // found, log user in\r\n Auth_ORM::instance()->force_login($user);\r\n // redirect to the user account\r\n Request::instance()->redirect('user/profile');\r\n return;\r\n }\r\n // associated user not found; register the user\r\n // retrieve user email from Facebook\r\n if($me != NULL && Validate::email($me['email'], TRUE)) {\r\n // search for existing user using email\r\n $user = ORM::factory('user')->where('email', '=', $me['email'])->find();\r\n if(is_numeric($user->id) && ($user->id != '0')) {\r\n // Note: there is minor security issue here - we trust the email supplied by Facebook\r\n // They do perform a verification check for email addresses... and the data is signed.\r\n // Hence this is not really a problem; I bet most of the implementations do trust Facebook.\r\n // If you want, you can ask the user to enter their password to confirm, but it's\r\n // a bit clunky - and adds more special cases like what if they don't remember the password?\r\n // Then you have to allow them to reset the password using their email ....\r\n Message::add('success', __('We found an existing account using your email address.'));\r\n // found: \"merge\" with the existing user\r\n $user->facebook_user_id = $facebook->getUser();\r\n $user->save();\r\n // force login\r\n Auth_ORM::instance()->force_login($user);\r\n // redirect to the user account\r\n Request::instance()->redirect('user/profile');\r\n return;\r\n }\r\n }\r\n\r\n // not found: create a new user for real\r\n if($me != NULL) {\r\n // Instantiate a new user\r\n $user = ORM::factory('user');\r\n // fill in values\r\n // generate long random password (maximum that passes validation is 42 characters)\r\n $password = $user->generate_password(42);\r\n $values = array(\r\n // get a unused username like firstname.surname or firstname.surname2 ...\r\n 'username' => $user->generate_username($me['first_name'].'.'.$me['last_name']),\r\n 'facebook_user_id' => $facebook->getUser(),\r\n 'password' => $password,\r\n 'password_confirm' => $password,\r\n );\r\n if(Validate::email($me['email'], TRUE)) {\r\n $values['email'] = $me['email'];\r\n }\r\n $user->values($values);\r\n // If the post data validates using the rules setup in the user model\r\n if ($user->check()) {\r\n // create the account\r\n $user->save();\r\n // Add the login role to the user (add a row to the db)\r\n $login_role = new Model_Role(array('name' =>'login'));\r\n $user->add('roles', $login_role);\r\n // sign the user in\r\n Auth::instance()->login($values['username'], $password);\r\n // redirect to the user account\r\n Request::instance()->redirect('user/profile');\r\n } else {\r\n // in case the data for some reason fails, the user will still see something sensible:\r\n // the normal registration form.\r\n // Load the view\r\n $view = View::factory('user/register');\r\n // Note how the first param is the path to the message file (e.g. /messages/register.php)\r\n $view->errors = $user->validate()->errors('register');\r\n // Pass on the old form values\r\n $values['password'] = $values['password_confirm'] = '';\r\n $view->set('defaults', $values);\r\n $this->template->content = $view;\r\n }\r\n } else {\r\n Message::add('error', 'Retrieving information from Facebook failed. Please register below.');\r\n Request::instance()->redirect('user/register');\r\n }\r\n }", "title": "" }, { "docid": "8fb592b2af597354b44f5a6b6b6d10d2", "score": "0.6725011", "text": "public function actionLogin() {\n\t\t\n\t\ttry {\n\t\t\t//if(isset(Yii::app()->session['login']))\n\t\t\tif (!isset(Yii::app()->session['hybridauth-ref'])) {\n\t\t\t\tYii::app()->session['hybridauth-ref'] = Yii::app()->request->urlReferrer;\n\t\t\t}\n\t\t\t$this->_doLogin();\n\t\t} catch (Exception $e) {\n\t\t\tYii::app()->user->setFlash('hybridauth-error', \"Something went wrong, did you cancel?\");\n\t\t\t$this->redirect(Yii::app()->session['hybridauth-ref'], true);\n\t\t}\n\t}", "title": "" }, { "docid": "c476392749de4b0344baf6e026a954d3", "score": "0.6719965", "text": "function index()\n {\n $sessionCheck=session::isUserLoggedIn();\n\n if($sessionCheck)\n util::redirect(baseUrl);\n\n FacebookSession::setDefaultApplication(FacebookAppId,FacebookAppSecret);\n $helper = new FacebookRedirectLoginHelper(baseUrl.'login/success/');\n\n /*** set a template variable ***/\n $this->registry->template->loginUrl = $helper->getLoginUrl(array('email','user_friends','public_profile'));\n /*** load the index template ***/\n $this->registry->template->show('login');\n\n }", "title": "" }, { "docid": "03f0bcb6d7912f1c92aecf0f156f4160", "score": "0.67153895", "text": "public function fblogin()\n {\n Session::forget('message');\n\n $facebook = new Facebook(config('facebook.app_secret'));\n $params = array(\n 'redirect_uri' => url('/auth/fb/callback'),\n 'scope' => 'public_profile, email, user_birthday, user_hometown, user_location',\n );\n\n return redirect($facebook->getLoginUrl($params));\n }", "title": "" }, { "docid": "68a524ed09a7f5c6d258a2224b64624a", "score": "0.671354", "text": "public function facebook_connect()\n {\n \treturn redirect(\n $this->fb->getLoginUrl($this->permission)\n \t);\n }", "title": "" }, { "docid": "f0a2e11d7df4f7ec3d1bf953ce735493", "score": "0.669313", "text": "public function actionLogin()\n {\n \t$this->subPageTitle = 'Đăng nhập bằng Facebook';\n $facebook = new ClsFacebook();\n $params = $facebook->connectToFacebook(true);\n if($params['facebookConnected']){\n \t$checkLoginByFB = User::model()->loginByFacebook($params['userData']);\n \tif(!$checkLoginByFB){\n \t\t$user = User::model()->createUserByGoogleFB($params['userData'], 'facebook');\n \t\t$checkLoggedIn = User::model()->UserApiIdentity($user->id);\n \t}\n $like = $facebook->fb->api('/me/likes/'.$facebook->pageId);\n \tif($like && $like['data']){//If like page\n $this->redirect(array('index'));\n }else{\n $this->render('like');\n }\n }else{//If not connected\n\t \t$this->render('login',array('appId'=>$facebook->appId));\n }\n }", "title": "" }, { "docid": "eaf974a6466a461403d6f8df157adc46", "score": "0.6670544", "text": "public function LoginPage(){\n \\Hybrid_Auth::logoutAllProviders(); \n $loginPage = $this->getconfig('loginPage');\n if( $loginPage !== null){\n \\Hybrid_Auth::redirect($loginPage,\"PHP\");\n }\n //!TODO Make an alternative with loginList\n $this->loginList();\n exit;\n }", "title": "" }, { "docid": "f6b00e7fbf8f9de9d3a9bc8992c6594d", "score": "0.66605544", "text": "public function facebookAuth(){\n\t\t\tif($this->getUser()===null){//認証失敗\n\t\t\t\tAppConfig::includeModel(array(\"Facebook_user\"));\n\t\t\t\t$this->runAuthLogin(Facebook_user::runAuth());\n\t\t\t}\n\t\t\t$this->redirector();\n\t\t}", "title": "" }, { "docid": "3af0e86d016b629db5448f05518a8f8a", "score": "0.66595954", "text": "public function init() {\n \tif (facebook_connect_allow_sign_on_with_facebook()) {\n \t\telgg_extend_view('core/account/login_box', 'facebook_connect/login_btn');\n \t\telgg_extend_view('login/sidebar/login', 'facebook_connect/login_btn');\n \t}\n }", "title": "" }, { "docid": "0f10d32d578e4481bb8ac0e403d7db21", "score": "0.6635478", "text": "public static function login($redirect) {\n $app_id = AppInfo::appID();\n $app_secret = AppInfo::appSecret();\n $home = AppInfo::getHome();\n $canvas_page = AppInfo::canvasPage();\n // Scope defines what permissions that we are asking the user to grant.\n // In this example, we are asking for the ability to publish stories\n // about using the app, access to what the user likes, and to be able\n // to use their pictures. You should rewrite this scope with whatever\n // permissions your app needs.\n // See https://developers.facebook.com/docs/reference/api/permissions/\n // for a full list of permissions\n $scope = 'user_likes,user_photos,user_photo_video_tags';\n session_start();\n\n // A signed_request is passed to Apps on Facebook.com when they are loaded\n // into the Facebook environment\n $signed_request = $_REQUEST['signed_request'];\n\n if (!empty($signed_request)){\n\n // we are on a canvas app\n $auth_url = 'https://www.facebook.com/dialog/oauth?client_id='.$app_id.\n '&redirect_uri='.urlencode($canvas_page).'&scope='.$scope;\n\n list($encoded_sig, $payload) = explode('.', $signed_request, 2);\n\n $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);\n\n if (empty($data['user_id'])) {\n echo(\"<script> top.location.href='\" . $auth_url . \"'</script>\");\n }\n\n $response = self::parse_signed_request($_REQUEST['signed_request'],\n $app_secret);\n return $response['oauth_token'];\n\n } else {\n\n // we are on an external website\n $code = $_REQUEST['code'];\n // If we don't have a code returned from Facebook, the first step is to get\n // that code\n if (empty($code)) {\n // CSRF protection - for more information, look at 'Security Considerations'\n // at 'https://developers.facebook.com/docs/authentication/'\n $state = md5(uniqid(rand(), TRUE));\n setcookie(\n AppInfo::appID() . '-fb-app',\n $state,\n $expires = 0,\n $path = '',\n $domain = '',\n $secure = '',\n $httponly = true);\n // Now form the login URL that you will use to authorize your app\n $authorize_url = 'https://www.facebook.com/dialog/oauth?client_id='.\n $app_id.'&redirect_uri='.$home.'&state='.$state.'&scope='.$scope;\n // Now we redirect the user to the login page\n echo(\"<script> top.location.href='\" . $authorize_url . \"'</script>\");\n return false;\n // Once we have that code, we can now request an access-token. We check to\n // ensure that the state has remained the same.\n } else if ($_REQUEST['state'] === $_COOKIE[AppInfo::appID() . '-fb-app']) {\n $ch = curl_init('https://graph.facebook.com/oauth/access_token');\n curl_setopt($ch, CURLOPT_POSTFIELDS,\n 'client_id='.$app_id.'&redirect_uri='.$home.'&client_secret='.\n $app_secret.'&code='.$code.'&scope='.$scope);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $response = curl_exec($ch);\n // Once we get a response, we then parse it to extract the access token\n parse_str($response, $params);\n $token = $params['access_token'];\n return $token;\n // In the event that the two states do not match, we return false to signify\n // that something has gone wrong during authentication\n } else {\n echo('States do not match. CSRF?');\n return false;\n }\n }\n }", "title": "" }, { "docid": "ab1000641bef27e8e0d529a3a2f0ad2b", "score": "0.66119015", "text": "function afterFacebookLogin(){\n $this->redirect('/');\n }", "title": "" }, { "docid": "8336bcd186ebf1477cd395cc23071a00", "score": "0.6602387", "text": "function cp_facebook_login_button() {\n\tif ( 'no' == get_option( 'cp_enable_fb', 'yes' ) )\n\t\treturn;\n\n if ( !is_user_logged_in())\n\t\techo '<p class=\"facebook\"><fb:login-button scope=\"email\">'. __(\"Login with Facebook\", \"appthemes\") .'</fb:login-button></p>';\n}", "title": "" }, { "docid": "96b27687f7678fbec64dacfe0abf9a31", "score": "0.6581014", "text": "function login() {\n\t\techo <<<EOD\n\t\t\t<script src=\"http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php\" type=\"text/javascript\"></script>\n <a href=\"JavaScript:facebook_dologin();\">Login with Facebook</a>\nEOD;\n\n\t}", "title": "" }, { "docid": "7de62e40fa5ceb9b7a4650b0b189d126", "score": "0.6580903", "text": "function indexController() {\r\n// if (!isset($_SESSION['id']) && @strstr($_SERVER['HTTP_REFERER'], 'facebook.com')) redirection ('/fblogin'); \r\n }", "title": "" }, { "docid": "f824008f8dc9589d07a9d5889bbbaa94", "score": "0.6576542", "text": "public function fblogin(){\r\n $_REQUEST += $_GET; \r\n $user = $this->facebook->getUser();\r\n if ($user) {\r\n try {\r\n $data['user_profile'] = $this->facebook->api('/me?fields=id,name,link,email,gender');\r\n } catch (FacebookApiException $e) {\r\n $user = null;\r\n }\r\n }else {\r\n // Solves first time login issue. (Issue: #10)\r\n //$this->facebook->destroySession();\r\n }\r\n\r\n if ($user) {\r\n\r\n $data['logout_url'] = site_url('welcome/logout'); // Logs off application\r\n // OR \r\n // Logs off FB!\r\n // $data['logout_url'] = $this->facebook->getLogoutUrl();\r\n\r\n } else {\r\n $data['login_url'] = $this->facebook->getLoginUrl(\r\n array(\r\n 'redirect_uri' => site_url('welcome/login'), \r\n 'scope' => array(\"email\") // permissions here\r\n ));\r\n }\r\n $this->load->view('login',$data);\r\n\r\n }", "title": "" }, { "docid": "0bbe716ac57e8576e2f9481095e275d8", "score": "0.65717864", "text": "public function login()\n {\n return $this->facebook->redirectToLogin();\n }", "title": "" }, { "docid": "f5f5aca82e1cbe1aab236c659fa4b91b", "score": "0.6527751", "text": "public function facebook() {\n try {\n $user = \\Socialite::with('facebook')->user();\n $user = $this->accountService->postLogin($user, 'facebook');\n return \\Redirect::to('exhibits/scanOrCode');\n } catch (\\Exception $e) {\n dd($e);\n }\n }", "title": "" }, { "docid": "823977f5456ac07e2a69c4026d42215c", "score": "0.6525024", "text": "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "title": "" }, { "docid": "77ddfcb8abfca2fc57ed2e74d45783ec", "score": "0.65223587", "text": "public function facebook() {\r\n\r\n\r\n $fb = new Facebook\\Facebook([\r\n 'app_id' => '1671043223201499',\r\n 'app_secret' => 'badedf304de0ab738cc3d7b8c1901614',\r\n 'default_graph_version' => 'v2.9'\r\n ]);\r\n\r\n\r\n $helper = $fb->getRedirectLoginHelper();\r\n\r\n\r\n //var_dump(site_url('welcome/callback'));\r\n\r\n $permissions = ['email']; // Optional permissions for more permission you need to send your application for review\r\n $loginUrl = $helper->getLoginUrl(site_url('welcome/callback'), $permissions);\r\n redirect($loginUrl);\r\n }", "title": "" }, { "docid": "298e3be8c0e3756f6a90bc885e210116", "score": "0.6499042", "text": "public function beforeFilter(){\n\t\t// \t$appId='842599362476564', \n\t\t// \t$secret='9b60e0c53c2a83d6c0f11704bf69f0d5'\n\t\t// );\n\t\t$this->Facebook = new \\Facebook\\FacebookRedirectLoginHelper(Router::url('/', true),\n $appId='842599362476564', \n\t\t \t$secret='9b60e0c53c2a83d6c0f11704bf69f0d5'\n );\n $this->Auth->allow('login','index','config','connectfacebook');\n\t}", "title": "" }, { "docid": "9e408038da44f5ed1645ee73b9b55940", "score": "0.648604", "text": "public function goToLogin() {\n $loginValues = [\"formHeader\" => \"Login\", \"formAction\" => \"tryToLogin\"];\n require('view/frontend/loginForm.php');\n }", "title": "" }, { "docid": "6aa6f5467de235b2212b321bee0621c4", "score": "0.6474391", "text": "function get_login_url(){\n\t\t$this->ci->load->helper('url');\n\t\t$helper = $this->fb->getRedirectLoginHelper();\n\t\treturn $helper->getLoginUrl(site_url().'/user/login/login_facebook', ['email', 'user_photos']);\n\t}", "title": "" }, { "docid": "1c0ab295ae927496e329239617abaf66", "score": "0.6473734", "text": "public static function login() {\n session_start();\n\n $platform = Platform::where('name', '=', 'facebook')->first();\n $secretkey = $platform->client_secret;\n $api_infos = json_decode($platform->api_infos);\n $redirectUrl = $api_infos->redirect_url;\n $appkey = $api_infos->appkey;\n $scope = $api_infos->scope;\n FacebookSession::setDefaultApplication($appkey, $secretkey);\n\n $helper = new FacebookRedirectLoginHelper($redirectUrl);\n\n Session::set('facebookHelper', $helper);\n $loginUrl = $helper->getLoginUrl($scope);\n return Redirect::to($loginUrl);\n }", "title": "" }, { "docid": "e4ff5c1f1ed6fa722062b886c0172018", "score": "0.64501107", "text": "public function loginAction()\n {\n $this->view->render('front/auth', 'login');\n }", "title": "" }, { "docid": "4bd6da91257e3c89b725a76d517e19c4", "score": "0.6446399", "text": "public function handleLogin()\n {\n $this->userModel->validateLoginForm();\n //redirect to the login page\n $view = new Login_Doc($this->userModel);\n //check if data is valid after validation step\n if($this->userModel->valid)\n {\n $this->userModel->authenticateUser();\n if($this->userModel->valid)\n {\n $this->userModel->name=Database_Model::findUserByEmail($this->userModel->email)['name'];\n Session_Model::login($this->userModel->name);\n $view = new Home_Doc($this->userModel);\n $this->userModel->generateMenu();\n }\n }\n $view->show();\n }", "title": "" }, { "docid": "115f754c56b4a634620f34a4eb6f0ca4", "score": "0.64382523", "text": "public function actionLogin()\n {\n $form = new AuthLoginSmall();\n\n if ($this->request->isMethod('post') && $form->isValid($this->request->getParams())) {\n\n $data = $form->getData();\n\n $driver = 'default';\n\n $params = [\n 'identity' => $data['email'],\n 'credential' => $data['password'],\n 'remember' => isset($data['remember']) ? $data['remember'] : false\n ];\n\n $result = app()->auth()->login($driver, $params);\n\n\n if ($result->isValid()) {\n\n app()->auth()->store($result->getUser(), null, false);\n\n // try location redirect then exists\n return $this->request->redirect('home');\n }\n\n switch (true) {\n case $result->isInvalidIdentity():\n exit('invalid identity');\n case $result->isInvalidCredentical():\n exit('invalid credentical');\n case $result->isValid():\n break;\n case $result->isEmptyIdentity():\n exit('isEmptyIdentity');\n case $result->isEmptyCredentical():\n exit('isEmptyCredentical');\n case $result->isBlocked():\n exit('isBlocked');\n case $result->isDisabled():\n exit('isDisabled');\n case $result->isUnapproved():\n exit('isUnapproved');\n case $result->isUnverfied():\n exit('isUnverfied');\n default:\n exit('what happend');\n break;\n }\n } else {\n // do no thing\n }\n\n $enableSocialAuth = app()->setting('login', 'social_auth');\n\n $social = app()->socialService()->getListAuth();\n\n $lp = app()->layouts()\n ->getContentLayoutParams();\n\n\n $this->view\n ->setScript($lp)\n ->assign([\n 'form' => $form,\n 'social' => $social,\n 'enableSocialAuth' => $enableSocialAuth,\n ]);\n }", "title": "" }, { "docid": "d25a21ef81b40c9033d163012e8ccf30", "score": "0.64316595", "text": "public function login()\n\t{\n\t\t// Apply 'empty' layout.\n\t\t\n\t\t$this->layout = 'empty';\n\t\t\n\t\t\n\t\t// Indicates if was executed successfully.\n\t\t\n\t\t$success = true;\n\t\t\n\t\t\n\t\t// Sets the Facebook login URL.\n\t\t\n\t\tif (!empty($this->request->query['source']))\n\t\t{\n\t\t\t$source = $this->request->query['source'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$source = '/';\n\t\t}\n\t\t\n\t\t$this->set('fb_login_url', $this->FB->getLoginUrl(array('scope' => Configure::read('Facebook.Permissions'), 'redirect_uri' => Configure::read('Facebook.redirect') . $source)));\t\n\t\t\n\t\t\n\t\t$this->set(compact('success'));\n\t\t$this->set('_serialize', array('success'));\n\t\t\n\t\t$this->Session->delete('loginRedirect');\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "81df1594770083b90998e4f2c6d1c8d0", "score": "0.6401073", "text": "public function login(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"login\");\n\t}", "title": "" }, { "docid": "c95703aa6bb36692e330e8b517822119", "score": "0.63865566", "text": "public function callback()\n {\n $user = $service->createOrGetUser(Socialite::driver('facebook')->user());\n auth()->login($user);\n Session::flash('success', 'You\\re now logged in using your facebook account');\n return redirect()->route('dashboard');\n }", "title": "" }, { "docid": "68c738af58eaeaf27c4687e5354df52d", "score": "0.6386256", "text": "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n $data = ['name'=>$user->name,'email'=>$user->email,'password'=>$user->token];\n\t\t$userDB= \\App\\User::where('email',$user->email)->first();\n\t\tif(!is_null($userDB)){\n\t\t\tAuth::login($userDB);\n\t\t}\n\t\telse{\n\t\tAuth::login($this->create($data));\n\t\t}\n\t\treturn redirect('/');\n }", "title": "" }, { "docid": "895d21d1b2e1efe16fca26de7329a7ee", "score": "0.63832104", "text": "function login($url = NULL) {\n\t\t$this->set(\"title_for_layout\",\"User Login\");\n\t\t$this->layout = \"frontend\";\n\t\t$this->Connect->user();\n\t\tif (!empty($url)) {\n\t\t\t$url = implode(\"/\",$this->params['pass']);\n\t\t}\n\t\t/*if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == SITE_LINK) {\n\t\t\t$this->Session->write(\"login\",1);\n\t\t}*/\n\t\tif($this->Session->read(\"Auth.User.id\")) {\n\t\t\t//$this->redirect(\"/dashboard\");\n\t\t} else {\n\t\t\tif ((isset($this->data) && !empty($this->data)) || $this->Session->read(\"FB.Me.id\")){\n\t\t\t\t$this->__login($url);\n\t\t\t} elseif ($this->Cookie->read('Auth.User')) {\n\t\t\t\t$user = $this->Session->read(\"Auth.User.id\");\n\t\t\t\tif (empty($user)) {\n\t\t\t\t\t$this->__login($url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8e66c09df8c5213d1377652522814357", "score": "0.63816553", "text": "public function indexAction()\n {\n if( Engine_Api::_()->user()->getViewer()->getIdentity() )\n {\n $this->setNoRender();\n return;\n }\n \n // Display form\n $form = $this->view->form = new User_Form_Login();;\n $form->setTitle(null)->setDescription(null);\n $form->removeElement('forgot');\n\n // Facebook login\n if ('none' == Engine_Api::_()->getApi('settings', 'core')->core_facebook_enable) {\n $form->removeElement('facebook');\n } else {\n if ($form->getElement('facebook')) {\n $content = $form->getElement('facebook')->getContent();\n $content = str_replace('FB.Event.subscribe',\n 'FB.Event.subscribe(\\'fb.log\\', function(response) {\n window.location.reload();\n });\n FB.Event.subscribe',\n $content);\n $content = str_replace('window.location.reload();',\n sprintf('window.location.href = \"%s\";', Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login')),\n $content);\n $form->getElement('facebook')->setContent($content);\n }\n \n $facebook = User_Model_DbTable_Facebook::getFBInstance();\n if ($facebook->getSession()) {\n try {\n $me = $facebook->api('/me');\n $uid = Engine_Api::_()->getDbtable('Facebook', 'User')->fetchRow(array('facebook_uid = ?'=>$facebook->getUser()));\n if ($uid)\n $uid = $uid->user_id;\n if ($uid) {\n // already integrated user account; sign in\n Engine_Api::_()->user()->getAuth()->getStorage()->write($uid);\n } else {\n $form->removeElement('facebook');\n //$form->setAction($this->view->url(array('controller'=>'settings','action'=>'general'), 'user_extended'));\n $form->addNotice($this->view->translate('USER_FORM_AUTH_FACEBOOK_NOACCOUNT',\n $this->view->url(array(), 'user_signup'),\n $this->view->url(array('controller'=>'settings','action'=>'general'), 'user_extended')));\n }\n } catch (Facebook_Exception $e) {}\n }\n }\n \n }", "title": "" }, { "docid": "a0a5b63e1847e242460808b28c5eef95", "score": "0.63771373", "text": "public function loginPage()\n {\n $this->render( 'auth.login' );\n }", "title": "" }, { "docid": "f59180b2ef417671acad9f441415340f", "score": "0.6373258", "text": "public function showLoginAction()\n {\n $user = App_User_Factory::getSessionUser();\n\n $this->view->isLoggedIn = $user !== null;\n if ($user !== null) {\n $this->view->login = $user->getLogin();\n } else {\n \t$form = new App_Form_Auth_Login($this->_helper->url('login', 'auth'));\n $this->view->form = $form;\n }\n }", "title": "" }, { "docid": "452c1f87d0716ddd559284e1c196430e", "score": "0.6372123", "text": "public function actionHybridLogin()\r\n\t{\r\n\t\tif (!isset($_GET['provider']))\r\n\t\t{\r\n\t\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$haComp = new HybridAuthIdentity();\r\n\t\t\tif (!$haComp->validateProviderName($_GET['provider']))\r\n\t\t\t\tthrow new CHttpException ('500', 'Invalid Action. Please try again.');\t\r\n\t\t\t\r\n\t\t\t$haComp->adapter = $haComp->hybridAuth->authenticate($_GET['provider']);\r\n\t\t\t$haComp->userProfile = $haComp->adapter->getUserProfile();\r\n\r\n\t\t\t$userData = array();\r\n\t\t\t$userData['username'] = $haComp->userProfile->displayName;\r\n\t\t\t$userData['email'] = $haComp->userProfile->email;\r\n\t\t\t$userData['password'] = $haComp->userProfile->email;\r\n\r\n\t\t\t$this->processHybridLogin($userData); //further action based on successful login or re-direct user to the required url\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\t\t\t\r\n\t\t\t//process error message as required or as mentioned in the HybridAuth 'Simple Sign-in script' documentation\r\n\t\t\tYii::app()->user->setFlash('error', $e->getMessage());\r\n\t\t\t$model = new UserLoginForm;\r\n\t\t\t$this->render('form_login', array('model' => $model));\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2cfa49c7cbdcae8b522dec1f9f5c6e27", "score": "0.6364261", "text": "public function login()\n {\n redirect($this->get_loginURL());\n }", "title": "" }, { "docid": "6816af6357592eca1b1f1c666c4e8358", "score": "0.6362616", "text": "public function handleFacebookCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user();\n } catch (Exception $e) {\n // In case of an error, have the user try again\n return Redirect::to('auth/facebook');\n }\n\n // Check if the user is new or existing\n $authUser = $this->findOrCreateUser($user, 'Facebook');\n\n // Log the user into our system\n Auth::login($authUser, true);\n\n return Redirect::to('/profile');\n }", "title": "" }, { "docid": "21b218ae87b0dfcd50627c3419c4a2c8", "score": "0.63546985", "text": "public function getContent(){\n\n $permissions = ['email', 'user_likes','user_posts']; // wee need to request these permissions from the user\n $loginUrl = $this->helper->getLoginUrl('http://thezachcave.com/lingotek/FacebookRedirect.php', $permissions);\n\n //return our html\n return '<a href=\"' . $loginUrl . '\">Log in with Facebook!</a>';\n\n }", "title": "" }, { "docid": "816c843a9295fd53888f8987886c8bbe", "score": "0.6349106", "text": "function auth_redirectToLogin(){\n $app = \\Slim\\Slim::getInstance();\n $rootUri = $app->request()->getRootUri();\n $redir = $rootUri . $app->request()->getResourceUri();\n $app->flash('errors', ['Login required']);\n $app->redirect($rootUri . '/login?continue=' . $redir);\n}", "title": "" }, { "docid": "a4992c1a7427392faf42391c975b6507", "score": "0.63416344", "text": "public function login()\n {\n url::site('auth/login', Kohana::config('auth.proto'));\n\n $this->sensitivePageHTTPSorRedirectAndDie('/auth/login');\n\t $this->_setReferrerButIgnore('auth/login');\n\t if (Auth::instance()->logged_in()) {\n\t client::messageSend(Kohana::lang('auth_already_logged_in'), E_USER_WARNING);\n\t url::redirect($this->_getReferrerOrUse('home/dashboard'));\n\t } else {\n\t // LDAP driver will prompt for username, password. remember feature isn't supported\n\t if (Auth::instance()->login('not_used','not_used')) {\n\t\t client::messageSend(Kohana::lang('auth.auth_login_success'), E_USER_NOTICE);\n\t\t url::redirect($this->_getReferrerOrUse('home/dashboard'));\n\t }\n\t }\n }", "title": "" }, { "docid": "f1296724129ed1b9544511c7fc7221d5", "score": "0.63304204", "text": "public function afterFacebookLogin() {\r\n $this->redirect($this->here);\r\n }", "title": "" }, { "docid": "7975cc73c228986a05ab872e7fe9dca7", "score": "0.6329664", "text": "public function handleFacebookCallback()\n{\n $fb_user = Socialite::driver('facebook')->user();\n\n $user = User::where('email', $fb_user->getEmail())->firstOrFail();\n\n Auth::login($user);\n return redirect('/dashboard');\n}", "title": "" }, { "docid": "61368f2d54428372de99dfd56c2cdf3c", "score": "0.6327575", "text": "public function login(){\r\n\t\t//Before creating template must be created inside template/users/login.ctp -fb\r\n\t\t//test to see if from is submitted -fb\r\n\t\tif($this->request->is('post')){ //check for post method -fb\r\n\t\t\t$user = $this->Auth->identify();\r\n\t\t\tif($user){ //check for user\r\n\t\t\t\t$this->Auth->setUser($user);\r\n\t\t\t\treturn $this->redirect(['controller' => 'posts']);\r\n\t\t\t}\r\n\t\t\t//Bad login the send a message -fb\r\n\t\t\t$this->Flash->error('Incorrect Login.');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "80798f89b0fb26cd70e9a920f5e7ed73", "score": "0.63117653", "text": "public function authRedirectToFacebook()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "b5c31ba7db884b0b145b3cb2ed93d62a", "score": "0.6300657", "text": "function afterFacebookLogin(){\n\t\t$this->redirect($this->Auth->redirect());\n\t}", "title": "" }, { "docid": "18fbe9db757a881e4cf1d7ad5d0e12c9", "score": "0.62980604", "text": "public function login()\n {\n $fb = new Facebook([\n 'app_id' => env('FB_APP_ID'),\n 'app_secret' => env('FB_APP_SECRET'),\n 'default_graph_version' => 'v2.10',\n ]);\n\n $helper = $fb->getJavaScriptHelper();\n try {\n $accessToken = $helper->getAccessToken();\n } catch(FacebookSDKException $e) {\n // Validation fails\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\n exit;\n }\n\n if (!isset($accessToken)) {\n return redirect(\"/\");\n }\n\n $fb->setDefaultAccessToken($accessToken);\n\n try {\n $response = $fb->get('/me?fields=name,email');\n $userNode = $response->getGraphUser();\n } catch(FacebookSDKException $e) {\n // Graph fails\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\n exit;\n }\n $userData = [\n 'social_id' => $userNode->getId(),\n 'name' => $userNode->getName(),\n 'email' => $userNode->getEmail(),\n ];\n\n $user = User::getOrCreate($userData, 'facebook');\n\n Auth::loginUsingId($user->getId());\n\n return redirect(\"/stocks\");\n\n }", "title": "" }, { "docid": "486e566c633ccaefa35ecdbe8cd7c0f2", "score": "0.6293634", "text": "public function actionLogin()\n {\n\t\t//var_dump(1);die();\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n \n return $this->render('signin.twig', []);\n }", "title": "" }, { "docid": "41c2b6daaee665afd7a1e90c7dc201b4", "score": "0.6273738", "text": "function fb_login(){\n\n // Start a session (cookie)\n session_start();\n\n // Load facebook classes\n require_once __DIR__ . '/facebook-php-sdk-v4-5.0.0/src/Facebook/autoload.php';\n\n // Create an instance of facebook\n $fb = new Facebook\\Facebook([\n 'app_id' => 'app_id_goes_here',\n 'app_secret' => 'app_secret_goes_here',\n 'default_graph_version' => 'v2.4',\n ]);\n\n $permissions = ['email']; // optional\n $helper = $fb->getRedirectLoginHelper();\n\n try {\n if (isset($_SESSION['facebook_access_token'])) {\n $accessToken = $_SESSION['facebook_access_token'];\n } \n else {\n\n $accessToken = $helper->getAccessToken();\n }\n\n } \n catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\n // When Graph returns an error\n echo 'Graph returned an error: ' . $e->getMessage();\n exit;\n } \n catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\n // When validation fails or other local issues\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\n exit;\n }\n\n\n if (isset($accessToken)) {\n\n if (isset($_SESSION['facebook_access_token'])) {\n\n $fb->setDefaultAccessToken($_SESSION['facebook_access_token']);\n } \n else {\n \n // getting short-lived access token\n $_SESSION['facebook_access_token'] = (string) $accessToken;\n\n // OAuth 2.0 client handler\n $oAuth2Client = $fb->getOAuth2Client();\n\n // Exchanges a short-lived access token for a long-lived one\n $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($_SESSION['facebook_access_token']);\n\n $_SESSION['facebook_access_token'] = (string) $longLivedAccessToken;\n\n // setting default access token to be used in script\n $fb->setDefaultAccessToken($_SESSION['facebook_access_token']);\n }\n\n // redirect the user back to the same page if it has \"code\" GET variable\n if (isset($_GET['code'])) {\n\n header('Location: http://tweety.midnightjabber.com');\n }\n\n // getting basic info about user\n try {\n\n $profile_request = $fb->get('/me?fields=name,first_name,last_name,email,gender,link,location,picture');\n $profile = $profile_request->getGraphNode()->asArray();\n\n } catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n // When Graph returns an error\n echo 'Graph returned an error: ' . $e->getMessage();\n session_destroy();\n // redirecting user back to app login page\n header(\"Location: http://www.tweety.midnightjabber.com\");\n exit;\n } catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n // When validation fails or other local issues\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\n exit;\n }\n \n $response = array();\n $response['loggedIn'] = true;\n $response['fullname'] = $profile['name'];\n $response['location'] = 'undefined';\n $response['player_id'] = $profile['id'];\n $response['profile_pic'] = 'http://graph.facebook.com/' . $response['player_id'] .'/picture?type=large';\n $response['gender'] = $profile['gender'];\n $response['link'] = $profile['link'];\n $response['social_media'] = \"Facebook\";\n $response['logout_url'] = \"http://tweety.midnightjabber.com/php/facebook-login.php?query=fb_logout\";\n\n // printing $profile array on the screen which holds the basic info about user\n //print_r($profile);\n\n return json_encode($response, JSON_FORCE_OBJECT);\n\n // Now you can redirect to another page and use the access token from $_SESSION['facebook_access_token']\n } \n\n // If facebook is not set\n else {\n // replace your website URL same as added in the developers.facebook.com/apps e.g. if you used http instead of https and you used non-www version or www version of your website then you must add the same here\n $loginUrl = $helper->getLoginUrl('http://tweety.midnightjabber.com/php/facebook-login.php?query=fb_login', $permissions);\n\n $response = array();\n $helper = $fb->getRedirectLoginHelper();\n $response['loggedIn'] = false;\n $response['loginUrl'] = $loginUrl;\n\n return json_encode($response);\n }\n\n\n}", "title": "" }, { "docid": "0ecdaeb25badf94a8117263291d34270", "score": "0.6273228", "text": "public function showLogin()\n {\n if (App::loggedIn()) {\n App::redirect(URL_BASE.'community');\n }\n $app = App::getInstance();\n\n $app->template->addValidation();\n $app->template->addRequiredJs('pages/account/login.js');\n $app->template->render('Account/Login.php');\n }", "title": "" }, { "docid": "10bc375bcc0e5a5ec1c447082a6c112c", "score": "0.6265284", "text": "public function callback()\n {\n try {\n $token = $this->fb->getAccessTokenFromRedirect();\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n\n // Access token will be null if the user denied the request\n // or if someone just hit this URL outside of the OAuth flow.\n if (! $token) {\n // Get the redirect helper\n $helper = $this->fb->getRedirectLoginHelper();\n\n if (! $helper->getError()) {\n abort(403, 'Unauthorized action.');\n }\n\n // User denied the request\n dd(\n $helper->getError(),\n $helper->getErrorCode(),\n $helper->getErrorReason(),\n $helper->getErrorDescription()\n );\n }\n\n if (! $token->isLongLived()) {\n // OAuth 2.0 client handler\n $oauth_client = $this->fb->getOAuth2Client();\n\n // Extend the access token.\n try {\n $token = $oauth_client->getLongLivedAccessToken($token);\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n }\n\n $this->fb->setDefaultAccessToken($token);\n\n // Save for later\n Session::put('fb_user_access_token', (string) $token);\n\n $activePageName = $this->getPageToken();\n\n // Spara användarens namn i sessionen\n Session::put('fb_user_name', $activePageName);\n\n return redirect(route('fbLogin'))->with('message', 'Loggade in på Facebook som ' . $activePageName . '!');\n }", "title": "" }, { "docid": "f5e91e208a97aff6b5cd1b49323a5945", "score": "0.62642086", "text": "public function outputLoginUrl()\n\t{\n\t\techo App::e($this->app->uri->getLogin());\n\t}", "title": "" }, { "docid": "c316737765161f63257a22f5dc210fb4", "score": "0.6262469", "text": "function facebook_sign_in($params){\n\t\t$params['db']->facebook_sign_in($params['user_data']['uid'], $params['facebook_uid']);\n\t}", "title": "" }, { "docid": "cd13098fe413a518fd03318c160d022e", "score": "0.62580395", "text": "public function login()\n\t{\n\t\t$data['title'] = 'Inloggen';\n\t\t$relLinks = Types::where('name', 'Link')->first();\n\t\t$data['links'] = Actions::where('type_id', $relLinks->id)->get();\n\t\t$this->blade->render('auth/login', $data);\n\t}", "title": "" }, { "docid": "15c774b785cae8dbd84bd56cd241d241", "score": "0.6254433", "text": "public function handleFacebookCallback()\n {\n try {\n $user = $this->createOrGetUser(Socialite::driver('facebook')->fields([\n 'name', 'email', 'birthday','gender','location','hometown','age_range','friends','link',\n 'photos','posts','tagged_places','videos','likes',\n ])->user());\n auth()->login($user);\n\n // $userModel = new User;\n // $createdUser = $userModel->addNew($create);\n // Auth::loginUsingId($createdUser->id);\n\n\n return redirect()->route('home');\n\n\n } catch (Exception $e) {\n\n\n return redirect('/');\n\n\n }\n }", "title": "" }, { "docid": "0d16128e021e7697578b06efe008e372", "score": "0.62531793", "text": "public function set_fblogin(){\n\n\t\t$this->load->library('fbconnect');\n\t\t$this->load->model('users');\n\t\t\n\t\t$fb_user = $this->fbconnect->user;\n\t\t//if($this->fbconnect->user){ // if data exist\n\t\t//\techo \"<pre>\";\n\t\t//\tprint_r($this->fbconnect->user);\n\t\t////\techo \"</pre>\";\n\t\t//}\n\n\t\t// if user is a fb user\n\t\tif($this->fbconnect->user){\n\t\t\tif($this->users->is_member($fb_user)){\n\t\t\t\t$this->users->log_in($fb_user);\n\t\t\t\t$this->members();\n\t\t\t} else {\n\t\t\t// if not signup from facebook and login\t\n\t\t\t\t$this->users->sign_up_fb($fb_user);\n\t\t\t\t$this->users->log_in($fb_user);\n\t\t\t\t$this->members();\n\t\t\t}\n\t\t} else {\n\t\t\t//echo \"could not login!\";\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($this->fbconnect->user);\n\t\t\techo \"</pre>\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "aa3b34025153a1b59e103f61fa5dcae9", "score": "0.62524134", "text": "public function login()\r\n {\r\n $helper = new FacebookRedirectLoginHelper(URL.\"app/loginf/login\" );\r\n try {\r\n $session = $helper->getSessionFromRedirect();\r\n } catch( FacebookRequestException $ex ) {\r\n // When Facebook returns an error\r\n } catch( Exception $ex ) {\r\n\r\n }\r\n // see if we have a session\r\n if ( isset( $session ) ) {\r\n // graph api request for user data\r\n $request = new FacebookRequest( $session, 'GET', '/me?scope=email' );\r\n $response = $request->execute();\r\n\r\n Session::set('fb_token',\"\".$session->getAccessToken());\r\n// Session::set('logout_link',\"http://www.facebook.com/logout.php?next=http://localhost/src/app/loginf/logout/&access_token=\".Session::get('fb_token'));\r\n $user_f = $response->getGraphObject()->asArray();\r\n Session::set('fb_ID',$user_f['id']);\r\n Session::set('lastname',$user_f['last_name']);\r\n Session::set('firstname',$user_f['first_name']);\r\n\r\n if(isset($user_f['last_name'])) {\r\n Session::set('lastname', $user_f['last_name']);\r\n }\r\n if(isset($user_f['first_name'])) {\r\n Session::set('firstname', $user_f['first_name']);\r\n }\r\n if(isset($user_f['email'])){\r\n Session::set('email',$user_f['email']);\r\n }\r\n else{\r\n Session::set('email',NULL);\r\n }\r\n\r\n $this->checkUser();\r\n exit;\r\n\r\n } else {\r\n $loginUrl = $helper->getLoginUrl(array(\r\n 'scope' => 'email'\r\n ));\r\n header(\"Location: \".$loginUrl);\r\n }\r\n }", "title": "" }, { "docid": "85f1b5da5c279d25ae6ba932a582c1ba", "score": "0.6238736", "text": "public function actionSocialLogin()\r\n\t{\r\n\t\tYii::import('application.components.HybridAuthIdentity');\r\n\t\t$path = Yii::getPathOfAlias('vendors.HybridAuth');\r\n\t\trequire_once $path . '/hybridauth-' . HybridAuthIdentity::VERSION . '/hybridauth/index.php';\r\n\t}", "title": "" }, { "docid": "8d7504256626568bc8f7fe8063b0fcbc", "score": "0.62242705", "text": "public function handleProviderCallback()\n {\n $facebookUser = Socialite::driver('facebook')->user();\n\n $user = User::where('email', $facebookUser->getEmail())->first();\n\n if($user) { // User found, logging in\n\n Auth::Login($user);\n\n } else { // There is no such user, creating:\n\n $user = new User();\n\n $email = $facebookUser->getEmail();\n\n $user->name = explode('@', $email)[0];\n $user->email = $email;\n $user->active = 1;\n $user->avatar = $user->generateRandomAvatar();\n $user->save();\n\n Auth::Login($user);\n }\n\n return view('home');\n }", "title": "" }, { "docid": "40277a007a5d9e942d81c516cf214baf", "score": "0.6223283", "text": "public function fbCallBack(){\n try {\n $accessToken = $this->fbRedirectLoginHelper->getAccessToken();\n } catch(facebookExceptions\\FacebookResponseException $e) {\n // When Graph returns an error\n $this->error = 'Graph returned an error: ' . $e->getMessage();\n return view('login',['error'=>$this->error]);\n exit;\n } catch(facebookExceptions\\FacebookSDKException $e) {\n // When validation fails or other local issues\n $this->error = 'Facebook SDK returned an error: ' . $e->getMessage();\n return view('login',['error'=>$this->error]);\n exit;\n }\n $accessToken = $this->validateAccessToken($accessToken);\n $this->longLivingAccessToken = $this->getLongLivingToken($accessToken);\n $_SESSION['fb_long_living_access_token'] = $this->longLivingAccessToken;\n $this->loggedIn = true;\n return redirect('user');\n }", "title": "" }, { "docid": "d88df5e5676a8544b9404ceb091fe905", "score": "0.62219447", "text": "public function getLogin()\n\t{\n\t\tSession::put('fb_prev_url', '/auth/login');\n\t\t$message = Session::get('message');\n\t\t$mail_message = Session::pull('mail_message');\n\t\t$mail_resend_message = trans('message.register.mail_resend');\n\t\tif (Session::has('message') && !empty($message)) {\n\t\t\t$data['message'] = Session::get('message');\n\t\t\tSession::forget('message');\n\t\t\treturn view('auth.login', $data);\n\t\t} else {\n\t\t\t$data['mail_message'] = $mail_message;\n\t\t\t$data['mail_resend_message'] = $mail_resend_message;\n return view('auth.login', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "d0c2bf2d404c1d16346a0ebfc8b00773", "score": "0.6214266", "text": "public function login(){\r\n\t\t$returnTo = $this->input->get('returnTo');\r\n\t\t$re = !$returnTo ? site_url() . \"/page/overview\" : $returnTo;\r\n\r\n\t\t//SSO starts here\r\n\r\n\t\t$this->auth->login($re);\r\n\t}", "title": "" }, { "docid": "5d758b81c719960f509dfbffc8d71c42", "score": "0.6214221", "text": "public function login()\n {\n $this->show('user/login');\n }", "title": "" }, { "docid": "5a187bc69cbe642352c026b7da82f5fa", "score": "0.6211098", "text": "public function handleProviderCallback()\n {\n $user = $this->findOrCreateFacebookUser(\n Socialite::driver('facebook')->user()\n );\n\n auth()->login($user);\n\n return redirect('/');\n }", "title": "" }, { "docid": "439302b822fc3057ebff7c971be3b357", "score": "0.6209308", "text": "function login_button( $atts, $content ){\n\n\t\tif( is_user_logged_in() && empty( $atts['show_if_logged'] ) )\n\t\t\treturn;\n\n\t\tob_start();\n\t\tif( ! empty ( $atts['redirect'] ) )\n\t\t\tadd_filter( 'flp/redirect_url' , function() use ( $atts ) { return $atts['redirect']; } );\n\n\t\tdo_action('facebook_login_button');\n\t\t/*$html = ob_get_contents();\n\t\tob_clean();*/\n\n\t\t//return $html;\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "16d13a79ff3305c497c10a0fabdbf76b", "score": "0.6202046", "text": "public function callback()\n {\n $userData = $this->facebook->getUserData(request('code'));\n if (is_null($userData)) {\n return redirect()->to('/users/login');\n }\n $user = $this->facebook->buildUserObject($userData);\n\n auth()->login($user);\n\n return redirect('/users/dashboard');\n }", "title": "" }, { "docid": "902d34427d1a7dd305e9f5297e6f38c4", "score": "0.62008625", "text": "public function loginWithFacebook() {\n\n // get data from input\n $code = Input::get( 'code' );\n\n // get fb service\n $fb = OAuth::consumer( 'Facebook','http://localhost:8000/login-fb');\n\n // check if code is valid\n\n // if code is provided get user data and sign in\n if ( !empty( $code ) ) {\n\n // This was a callback request from facebook, get the token\n $token = $fb->requestAccessToken( $code );\n\n // Send a request with it\n $result = json_decode( $fb->request( '/me' ), true );\n\n /*$message = 'Your unique facebook user id is: ' . $result['id'] . ' and your name is ' . $result['name'];\n echo $message. \"<br/>\";\n\n //Var_dump\n //display whole array().\n dd($result);*/\n $user_details = array();\n $user_details['id'] = $result['id'];\n $user_details['name'] = $result['name'];\n $user_details['picture'] = 'http://graph.facebook.com/'.$result['id'].'/picture?type=large';\n\n return View::make('portal') -> with(array('user_details'=>$user_details));\n }\n // if not ask for permission first\n else {\n // get fb authorization\n $url = $fb->getAuthorizationUri();\n\n // return to facebook login url\n return Redirect::to( (string)$url );\n }\n }", "title": "" }, { "docid": "95e20f6bda8938ef5a74b3c7c58754bb", "score": "0.61976457", "text": "public function login()\n {\n $controller = new Controller();\n\n if ($controller->getSession('app_id_user')) {\n $controller->response() -> redirect('home');\n } else {\n $controller->loadTemplate('Auth\\login', null);\n }\n }", "title": "" }, { "docid": "3e4fd7bdffbe30adf37016c73f95e989", "score": "0.61954165", "text": "public function getLoginUrl()\n\t{\n\t\t$scope = implode(\",\", $this->permArray);\n\t\t$loginUrl = 'https://www.facebook.com/dialog/oauth/?scope='.$scope.'&client_id='.$this->appID.'&redirect_uri='.$this->appPage;\n\t\theader('Location: '.$loginUrl);\n\t}", "title": "" }, { "docid": "a2cbedc1bb51ca88233ed7236ea14ce7", "score": "0.6184331", "text": "public function handleProviderCallback()\n {\n $iurl = Session::get('urlintented');\n $hasurl=Session::has('urlintented');\n $purl = Session::get('prevurl');\n\n $user = Socialite::driver('facebook')->user();\n $authUser = $this->findOrCreateUser($user, 'facebook');\n Auth::login($authUser, true);\n\n\n\n if($hasurl){\n Log::info(\"Logging one variable: \" . $iurl);\n return redirect( $iurl);\n }else{\n return redirect($purl);\n }\n\n }", "title": "" }, { "docid": "0a3c9cd184871ec0922ef8f3e1e3ce5d", "score": "0.6173403", "text": "function handleProviderCallback()\n {\n $userSocial = Socialite::driver('facebook')->user();\n $findUser = User::where('email', $userSocial->email)->first();\n\n if ($findUser) {\n Auth::login($findUser);\n\n return Redirect('home');\n } else {\n\n $user = new User;\n $user->name = $userSocial->name;\n $user->email = $userSocial->email;\n $user->password = bcrypt(123456);\n $user->avatar = $userSocial->avatar;\n $user->save();\n Auth::login($user);\n return Redirect('home');\n }\n\n }", "title": "" }, { "docid": "6e24ea24314fe8a161fa7caf3ddc46c3", "score": "0.616926", "text": "public function getFbLoginUrl() {\n $login_helper = $this->facebook->getRedirectLoginHelper();\n\n // Define the URL where Facebook should return the user.\n $return_url = $this->urlGenerator->generateFromRoute(\n 'social_auth_facebook.return_from_fb', array(), array('absolute' => TRUE));\n\n // Define the initial array of Facebook permissions.\n $scope = array('public_profile', 'email');\n\n // Dispatch an event so that other modules can modify the permission scope.\n // Set the scope twice on the event: as the main subject but also in the\n // list of arguments.\n $e = new GenericEvent($scope, ['scope' => $scope]);\n $event = $this->eventDispatcher->dispatch('social_auth_facebook.scope', $e);\n $final_scope = $event->getArgument('scope');\n\n // Generate and return the URL where we should redirect the user.\n return $login_helper->getLoginUrl($return_url, $final_scope);\n }", "title": "" }, { "docid": "1747fbae0707f3270b88a7102b7027e0", "score": "0.6168653", "text": "public function index(){\n\t\t\tif($this->facebook->logged_in()){\n\t\t\t// user is logged in.\n\t\t\t\n\t\t\t\t$this->load->view('user/profile');\n\n\t\t\t}else{\n\t\t\t\t// not logged in.\n\t\t\t\t$data = $this->facebook->loginUrl();\n\t\t\t\t$this->load->view('login/index', $data);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d30707811ad88aa0b4f555383feaa51e", "score": "0.61667955", "text": "public function loginWithFacebook() {\n\n\t // get data from input\n\t $code = Input::get( 'code' );\n\n\t // get fb service\n\t $fb = OAuth::consumer( 'Facebook' );\n\n\t // check if code is valid\n\n\t // if code is provided get user data and sign in\n\t if ( !empty( $code ) ) {\n\n\t // This was a callback request from facebook, get the token\n\t $token = $fb->requestAccessToken( $code );\n\n\t // Send a request with it\n\t $result = json_decode( $fb->request( '/me' ), true );\n\n\t $message = 'Your unique facebook user id is: ' . $result['id'] . ' and your name is ' . $result['name'];\n\t echo $message. \"<br/>\";\n\n\t //Var_dump\n\t //display whole array().\n\t dd($result);\n\n\t }\n\t // if not ask for permission first\n\t else {\n\t // get fb authorization\n\t $url = $fb->getAuthorizationUri();\n\n\t // return to facebook login url\n\t return Redirect::to( (string)$url );\n\t }\n\n\t}", "title": "" }, { "docid": "b5445a53e1fb7160c6bbb34353a25eda", "score": "0.6162995", "text": "public function actionLogin()\n\t{\n if (Yii::app()->request->isAjaxRequest)\n {\n $model=new LoginForm;\n $model->attributes=$_POST['LoginForm'];\n $model->rememberMe = $_POST['rememberMe'];\n if($model->validate() && $model->login())\n {\n echo 1;\n }\n else\n {\n throw new CHttpException(400, CJavaScript::jsonEncode($model->getErrors()));\n }\n Yii::app()->end();\n }\n else\n {\n $model = PagesAR::model()->findByUrl(\"login\");\n $this->layout = $model->structure; \n $this->page = $model;\n $params = array();\n foreach($this->page->getWidgets() as $widget)\n {\n $position = $widget['spot'];\n $widget = $widget['widgets'];\n $params[$position][] = $widget;\n }\n $this->render(\"//structures/\".$this->page->structure, array('page'=>$model, 'widgets' => $params));\n }\n\t}", "title": "" }, { "docid": "79ef6991f6fb9355dd07d2fde98e878b", "score": "0.61603075", "text": "function loginFacebook()\n\t\t{\t\t\n\t\t\tglobal $CFG,$objSmarty;\t\t\n\t\t\t$num_customer = $this->getNumValues($CFG['table']['register'],\"email = '\".$this->filterInput($this->logemail).\"' AND log_status ='2' \");\n\t\t\n\t\t\tif($num_customer > 0)\n\t\t\t\t{\n\t\t\t\t\t$customerId = $this->getValue(\"user_id\",$CFG['table']['register'],\"email = '\".$this->filterInput($this->logemail).\"' \");\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['user_id'] = $customerId;\n\t\t\t\t\t$_SESSION['userLogin'] = 'FB';\n\t\t\t\t\t\n\t\t\t\t\techo \"loginSuccess\";\t\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->customerpassword = rand();\n\t\t\t\t\t$ins_cus = \"INSERT INTO \n\t\t\t\t\t\t\t\t\t\t\".$CFG['table']['register'].\"\n\t\t\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t\t \tusername \t\t\t= '\".$this->filterInput($this->customername).\"',\n\t\t\t\t\t\t\t\t \temail \t\t\t\t= '\".$this->filterInput($this->logemail).\"',\n\t\t\t\t\t\t\t\t \tpassword \t\t\t= '\".$this->filterInput($this->customerpassword).\"',\n\t\t\t\t\t\t\t\t \tlog_status\t\t\t= '2',\n\t\t\t\t\t\t\t\t \taddeddate \t\t\t= now()\";\n\t\t\t\t\t$res_cus = $this->ExecuteQuery($ins_cus,'insert');\n\t\t\t\t\t$_SESSION['user_id'] = $res_cus;\n\t\t\t\t\t$_SESSION['userLogin'] = 'FB';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t$fromname = $CFG['site']['adminname'];\n\t\t\t\t\t$fromemail = $CFG['site']['adminemail'];\n\t\t\t\t\t$toemail = $this->logemail;\n\t\t\t\t\n\t\t\t\tif($res_cus){\n\t\t\t\t\tif($CFG['site']['userfriendly'] == 'Y'){\n\t\t\t\t\t\t$path = $CFG['site']['base_url'].\"/index.php\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//$path = $CFG['site']['base_url'].'/main.php?user_id='.base64_encode($res_ins);\n\t\t\t\t\t\t$path = $CFG['site']['base_url'].'/index.php';\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t$url_first\t\t\t\t=$path;\t\t\n\t\t\t\t\t$url\t\t=\t$url_first;\n\t\t\t\t\t$mailsubject = $CFG['site']['sitename'].\" Registration Details \";\n\t\t\t\t\t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailLoginThrFacebook.tpl\");\n\t\t\t\t\t$mail_content = str_replace('{SITE_URL}',$CFG['site']['base_url'],$mail_content);\n\t\t\t $mail_content = str_replace('{STATUS}','Hi '.$this->customername. ',',$mail_content);\n\t\t\t $mail_content = str_replace('{INFO}','You have been successfully registered in our site,',$mail_content);\n\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_content);\n\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\n\t\t\t $mail_content = str_replace('{INVITE_URL}',$CFG['site']['base_url'].'/images/inviitemail.png',$mail_content);\n\t\t\t $mail_content = str_replace('{USERNAME}',$this->customername,$mail_content);\n\t\t\t $mail_content = str_replace('{EMAIL}',$this->logemail,$mail_content);\n\t\t\t $mail_content = str_replace('{PASSWORD}',$this->customerpassword,$mail_content);\n\t\t\t $mail_content = str_replace('{DETAILS}','Your Details Below',$mail_content);\n\t\t\t $mail_content = str_replace('{ADMIN}','Admin',$mail_content); \n $mail_content = str_replace('{SITE_MAIN_DOMAIN}','SITE_MAIN_DOMAIN',$mail_content); \n\t\t\t\t\t$ok=$this->sendMail($fromname,$fromemail,$toemail,$mailsubject,$mail_content);\n if($ok)\n {\n $mail_body = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailLoginThrFacebookToAdmin.tpl\");\n \t\t\t\t\t$mail_body = str_replace('{SITE_URL}',$CFG['site']['base_url'],$mail_body);\n \t\t\t $mail_body = str_replace('{STATUS}','Hi Admin, ',$mail_body);\n \t\t\t $mail_body = str_replace('{INFO}',' have been successfully registered in your site,',$mail_body);\n \t\t\t $mail_body = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_body);\n \t\t\t $mail_body = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_body);\n \t\t\t $mail_body = str_replace('{INVITE_URL}',$CFG['site']['base_url'].'/images/inviitemail.png',$mail_body);\n \t\t\t $mail_body = str_replace('{USERNAME}',$this->customername,$mail_body);\n \t\t\t $mail_body = str_replace('{EMAIL}',$this->logemail,$mail_body);\n \t\t\t $mail_body = str_replace('{PASSWORD}',$this->customerpassword,$mail_body);\n \t\t\t $mail_body = str_replace('{DETAILS}','User Details Below',$mail_body);\n \t\t\t $mail_body = str_replace('{ADMIN}','Admin',$mail_body); \n $ok=$this->sendMail($CFG['site']['sitename'],$toemail,$fromemail,$mailsubject,$mail_body);\n }\n\t\t\t\t\techo \"signupSuccess\";\n\t\t\t\t}\n\t\t\t}\n\t}", "title": "" }, { "docid": "071ac5f74978d556b4ec9f3680c53bf1", "score": "0.6157463", "text": "public function doLogin()\n {\n return view('auth.login_page');\n }", "title": "" }, { "docid": "9afcde737d8e7908d1ba65629806e2fd", "score": "0.6148245", "text": "public function doLogin()\n\t{\n\t\t$env = $this->getEnvironment();\n\t\tif($env->getInputValue('form_id') == 'security_login')\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$user = \\security\\Authenticator::authorizeUser($env->getInputValue('username'), $env->getInputValue('password'), ($env->getInputValue('remember_me') == 'true')? 0 : 1);\n\t\t\t\t$env->setValue('SecurityHTMLController_sessionkey', $user->getSessionKey());\n\n\t\t\t\t$redirect = $env->getInputValue('redirect');\n\t\t\t\tif($redirect)\n\t\t\t\t\treturn $redirect;\n\t\t\t\telse\n\t\t\t\t\treturn '/';\n\n\t\t\t}\n\t\t\tcatch(\\security\\AuthenticationException $e)\n\t\t\t{\n\t\t\t\t$view = new \\miu\\view\\HTMLView(new \\view\\security\\LoginFormView('rejected', $env->getInputValue('redirect')));\n\t\t\t\techo $view;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$view = new \\miu\\view\\HTMLView(new \\view\\security\\LoginFormView($env->getInputValue('reason'), $env->getInputValue('redirect')));\n\t\t\techo $view;\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "2fbd618f0803e15a4a90dc3048430354", "score": "0.6147276", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user();\n } catch (\\Exception $e) {\n return redirect()->route('home');\n }\n\n $authUser = User::findOrCreate($user);\n\n Auth::login($authUser, true);\n\n return redirect()->route('home');\n }", "title": "" }, { "docid": "042b170c65ad7c83fdc34f0e0c262892", "score": "0.6143302", "text": "abstract public static function onLogin($params);", "title": "" }, { "docid": "d70962fad6d2af77b18b56c1862d7aaa", "score": "0.6141932", "text": "public function linkedInLoginAction() {\n $config = \\FYP\\APP::getDI()['config'];\n\n $linkedInConfig = $config->get('linkedin');\n $linkedInConfig['callback_url'] = 'http://' . $this->request()->getHost() . '/api/' . 'social/linked_in_login';\n\n $linkedin = new LinkedIn($linkedInConfig);\n\n $code = $this->request()->get('code');\n\n //stage 1 -> redirect to linkedin to authenticate\n if (empty($code)) {\n $redirectUrl = $linkedin->getLoginUrl(array(\n LinkedIn::SCOPE_BASIC_PROFILE\n ));\n\n $this->redirect($redirectUrl);\n } else { //we have the code, get the token\n $token = $linkedin->getAccessToken($code);\n\n echo $token;\n }\n\n }", "title": "" }, { "docid": "16a3316b31a0f65d5f4d676ff24d866f", "score": "0.61377186", "text": "public function handleFBProviderCallback()\n {\n $facebookUser = Socialite::driver('facebook')->user();\n $findUser = User::where('email', $facebookUser->email)->first();\n\n if ($findUser) {\n Auth::login($findUser);\n return redirect('/')->with('success', 'Logged in successfully [FB]');\n } else {\n $user = new User;\n $user->name = $facebookUser->name;\n $user->email = $facebookUser->email;\n $user->password = bcrypt(123456);\n $user->save();\n Auth::login($user);\n return redirect('/')->with('success', 'User was created successfully [FB]');\n }\n }", "title": "" }, { "docid": "3aa5d5c7b554c09658831e559ddf1d3f", "score": "0.613515", "text": "public function index(){\n\t\t$facebook = new Facebook(array(\n\t\t 'appId' => $this->config->item('App_ID'),\n\t\t 'secret' => $this->config->item('App_Secret'),\n\t\t 'cookie' => true\n\t\t));\n\t\t\n\t\tif(isset($_GET['logout'])) \n\t\t{\n\t\t\t$url = 'https://www.facebook.com/logout.php?next=' . urlencode('http://demo.phpgang.com/facebook_login_graph_api/') .\n\t\t\t '&access_token='.$_GET['tocken'];\n\t\t\tsession_destroy();\n\t\t\theader('Location: '.$url);\n\t\t}\n\t\tif(isset($_GET['fbTrue']))\n\t\t{\n\t\t\t$token_url = \"https://graph.facebook.com/oauth/access_token?\"\n\t\t\t . \"client_id=\".$this->config->item('App_ID').\"&redirect_uri=\" . urlencode($this->config->item('callback_url'))\n\t\t\t . \"&client_secret=\".$this->config->item('App_Secret').\"&code=\" . $_GET['code']; \n\t\t\n\t\t\t $response = file_get_contents($token_url);\n\t\t\t $params = null;\n\t\t\t parse_str($response, $params);\n\t\t\n\t\t\t $graph_url = \"https://graph.facebook.com/me?access_token=\" \n\t\t\t . $params['access_token'];\n\t\t\n\t\t\t $user = json_decode(file_get_contents($graph_url));\n\t\t\t $extra = \"<a href='index.php?logout=1&tocken=\".$params['access_token'].\"'>Logout</a><br>\"; \n\t\t\t $content = $user;\n\t\t\t// debug($user);die;\n\t\t\t /*$data[\"fb_data\"] = $user;\n\t\t\t $data[\"item\"] = \"Fb login\";\n\t\t\t $data[\"master_title\"] = \"Fb login | \".$this->config->item('sitename');\n\t\t\t $data[\"master_body\"] = \"register\";\n\t\t\t $this->load->theme('home_layout',$data);*/\n\t\t\t// redirect(base_url().\"logins/register\");\n\t\t\t $this->load->view(\"logins/register\",$user);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$content = '<a href=\"https://www.facebook.com/dialog/oauth?client_id='.$this->config->item('App_ID').'&redirect_uri='.$this->config->item('callback_url').'&scope=email,user_likes,publish_stream\"><img src=\"./images/login-button.png\" alt=\"Sign in with Facebook\"/></a>';\n\t\t}\n\t\t\n\t\t\n\t\t//include('html.inc');\n\t}", "title": "" }, { "docid": "1ae5c2e69355866b37f02ef008b0190b", "score": "0.6134739", "text": "function myRedirect()\n {\n // $facebook = ModUtil::apiFunc('FConnect', 'Facebook', 'facebook');\n // $facebook->destroySession();\n require_once 'modules/FConnect/lib/vendor/Facebook/facebook.php';\n $settings = ModUtil::getVar('FConnect');\n $facebook = new Facebook(array(\n 'appId' => $settings ['appid'],\n 'secret' => $settings ['secretkey']\n ));\n $facebook->destroySession();\n // echo $facebook->getAppId(); exit;\n setcookie('fbsr_'.$facebook->getAppId(), '', time() - 604800, '/',\n '.'.$_SERVER ['SERVER_NAME']);\n setcookie('fbsr_'.$facebook->getAppId(), '', time() - 604800, '/');\n session_destroy();\n $loginUrl = ModUtil::url('Users', 'user', 'main');\n $this->redirect($loginUrl);\n }", "title": "" }, { "docid": "aa9c7bdb4c16f1ed44d6ee4c2a8ad1da", "score": "0.61337024", "text": "public function get_social_login_links()\n\t{\n\t\t//$fbPermissions = 'email';\n\t\t$facebook = new Facebook(array(\n\t\t 'appId' => appId,\n\t\t 'secret' => appSecret\n\t\t\n\t\t));\n\t\t$fbuser = $facebook->getUser();\n\t\t$this->CI->session->set_userdata('facebook',$facebook);\n\t\t$this->CI->session->set_userdata('fbuser',$fbuser);\n\t\t$data['facebook_loginUrl'] = $facebook->getLoginUrl(array('redirect_uri'=>redirectUrl,'scope'=>fbPermissions));\t\n\t\t$this->CI->session->set_userdata('facebook_loginUrl',$data['facebook_loginUrl']);\t\n\t\t$this->CI->session->set_userdata('googleplus_loginUrl', $this->CI->googleplus->loginURL());\t\n\t\n\t\t\n\t\t//$contents['googleplus_loginUrl'] = $this->googleplus->loginURL();\n\t\t//$this->CI->load->view('welcome_message',$contents);\n\t}", "title": "" }, { "docid": "3108648fab88ad8fff3fb591912793e4", "score": "0.612898", "text": "function custom_login_permalink() {\n\t\t$login_url = get_theme_mod('capstone_auth_login_page') ? get_permalink(get_theme_mod('capstone_auth_login_page')) . '?redirect_to=' . get_permalink() : wp_login_url( get_permalink() );\n\t\techo sprintf( __( 'You must <a href=\"%s\">sign in</a> to apply for this position.', 'capstone' ), $login_url );\n\t}", "title": "" }, { "docid": "3d5f0b523767993bd691d87dcb25ff38", "score": "0.61288923", "text": "public function loginAction()\n {\n $pageTitle = 'Login';\n $loginLinkStyle = 'current_page';\n\n require_once __DIR__ . '/../templates/login.php';\n }", "title": "" }, { "docid": "7efe579d1f91de39a866271a6abd867c", "score": "0.61258733", "text": "public function onLogin()\r\n\t{\r\n\t}", "title": "" }, { "docid": "5c3bd0b8133c3b67ea05f5aea78cdc1a", "score": "0.6121933", "text": "public function social_login()\n\t{\n\t\t$username_or_email_address = '';\n\n\t\tif( ! empty( $username_or_email_address ) )\n\t\t{\n\t\t\t$auth_model = $this->authentication->auth_model;\n\n\t\t\t// Get normal authentication data using username or email address\n\t\t\tif( $auth_data = $this->{$auth_model}->get_auth_data( $username_or_email_address ) )\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * If redirect param exists, user redirected there.\n\t\t\t\t * This is entirely optional, and can be removed if \n\t\t\t\t * no redirect is desired.\n\t\t\t\t */\n\t\t\t\t$this->authentication->redirect_after_login();\n\n\t\t\t\t// Set auth related session / cookies\n\t\t\t\t$this->authentication->maintain_state( $auth_data );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Example requires that you set a username or email address.';\n\t\t}\n\t}", "title": "" }, { "docid": "2490c944404c240e4232a1da889d4f92", "score": "0.61194056", "text": "public function afterLoginSuccessPath();", "title": "" }, { "docid": "6f9c4133b5228f4346a0187fd67927c5", "score": "0.6114569", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user();\n } catch (Exception $e) {\n return redirect('laser/public/callback');\n }\n \n $authUser = $this->findOrCreateUser($user);\n \n Auth::login($authUser, true);\n \n return redirect('/');\n }", "title": "" } ]
d76d9a405148b17606773589b271325a
Get the HTTP headers as an array of headername => headervalue pairs. The "Link" header is parsed into an associative array based on the rel names it contains. The original value is available under the "_raw" key.
[ { "docid": "7acecd8546d372f8979e29ac7f7d0ac0", "score": "0.6535937", "text": "private function getHeadersAsArray($headersAsString)\n {\n $headers = array();\n \n foreach (explode(\"\\r\\n\", $headersAsString) as $i => $line) {\n if ($i === 0) { // HTTP code\n continue;\n }\n \n $line = trim($line);\n if (empty($line)) {\n continue;\n }\n \n list($key, $value) = explode(': ', $line);\n \n if ($key == 'Link') {\n $value = array_merge(\n array('_raw' => $value),\n $this->getLinkHeaderAsArray($value)\n );\n }\n \n $headers[$key] = $value;\n }\n\n return $headers;\n }", "title": "" } ]
[ { "docid": "150ffb7e1ddf69a7cfdafd85ae5a71f1", "score": "0.70472866", "text": "public function getHeaders()\n {\n $headers = [];\n $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true];\n foreach ($this->parameters as $key => $value) {\n if (0 === strpos($key, 'HTTP_')) {\n $headers[substr($key, 5)] = $value;\n }\n // CONTENT_* are not prefixed with HTTP_\n elseif (isset($contentHeaders[$key])) {\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "6c2ad4434fdeebdafbf2f95a8c29ae31", "score": "0.7012743", "text": "public function parsed() {\n\t\t$parsed = array();\n\n\t\tforeach ( $this->headers as $header => $value ) {\n\t\t\t$hstring = $header;\n\n\t\t\tif ( null !== $value ) {\n\t\t\t\t$hstring .= ': ' . $value;\n\t\t\t}\n\n\t\t\t$parsed[] = $hstring;\n\t\t}\n\n\t\treturn $parsed;\n\t}", "title": "" }, { "docid": "b55aa2864e4dd271f56cfb981f8703ab", "score": "0.6949822", "text": "protected static function getAllHeaders() {\n $headers= array();\n if (function_exists('getallheaders')) {\n // this will work only for mod_php\n $headers= getallheaders();\n } else {\n foreach($_SERVER as $header=>$value) {\n if(ereg('HTTP_(.+)',$header,$hp)) {\n $headers[ucfirst(strtolower($hp[1]))] = $value;\n }\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "c1fd78b0cf45bbcf96ef1c00d111a265", "score": "0.68984187", "text": "public function getHeaders()\n {\n $headers_list = $this->headersList();\n foreach ($headers_list as $index => $headValue) {\n @list($key, $value) = explode(\": \", $headValue);\n\n if (!is_null($key) && !is_null($value)) {\n $headers_list[$key] = $value;\n unset($headers_list[$index]);\n }\n }\n\n if (!function_exists('apache_request_headers')) {\n $apacheRequestHeaders = $this->apacheRequestHeaders();\n } else {\n $apacheRequestHeaders = apache_request_headers();\n }\n\n if (is_null($apacheRequestHeaders) || empty($apacheRequestHeaders)) {\n return [];\n }\n\n $apache_headers = array_merge($headers_list, $apacheRequestHeaders);\n\n $headers = array();\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) != 'HTTP_') {\n continue;\n }\n $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n $headers[$header] = $value;\n }\n\n return array_merge($headers, $apache_headers);\n }", "title": "" }, { "docid": "0711a3f4a0fbde1045691e09a12cabdf", "score": "0.6876252", "text": "public function getAllHeaders(){\n $headers = [];\n foreach($_SERVER as $key=>$value){\n if(substr($key, 0, 5)==='HTTP_'){\n $key = substr($key, 5);\n $key = str_replace('_', ' ', $key);\n $key = str_replace(' ', '-', $key);\n $key = strtolower($key);\n $headers[$key] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "3b222a7c7927abff2f003b1c8920ec43", "score": "0.68728924", "text": "function headers () {\n\treturn _parseRequestHeaders();\n}", "title": "" }, { "docid": "6ddefc574127021f696d5e41c131fb0e", "score": "0.6870602", "text": "protected function parseHeaders($head_raw) {\n $rex_header = '@^(?P<name>.*?):\\s*(?P<value>.*)$@';\n\n $headers = array();\n\n if (!$head_raw) {\n return $headers;\n }\n\n $headers_raw = preg_split(\"/\\r?\\n/\", $head_raw);\n foreach ($headers_raw as $header) {\n $m = null;\n if (preg_match($rex_header, $header, $m)) {\n $headers[] = array($m['name'], $m['value']);\n } else {\n $headers[] = array($header, null);\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "22f0272b7cdd10e5030703e9fb46ca2c", "score": "0.6852498", "text": "public static function all(): array\n {\n if (!self::$headers) {\n $headers = Arrays::filterByKeys($_SERVER, Functions::startsWith('HTTP_'));\n self::$headers = Arrays::mapKeys($headers, function ($key) {\n return str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))));\n });\n }\n return self::$headers;\n }", "title": "" }, { "docid": "d9a24595f4bef6231a7e17a72af18a81", "score": "0.6812565", "text": "protected function getRequestHeaders()\n\t{\n\t\t$headers = [];\n\n\t\tforeach ($this->psrRequest->getHeaders() as $header => $values) {\n\t\t\tif (strtoupper(substr($header, 0, 5)) === 'HTTP_') {\n\t\t\t\t$header = substr($header, 5);\n\t\t\t}\n\n\t\t\t$header = str_replace('_', ' ', $header);\n\t\t\t$header = ucwords(strtolower($header));\n\t\t\t$header = str_replace(' ', '-', $header);\n\n\t\t\t$headers[$header] = $values;\n\t\t}\n\n\t\tksort($headers);\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "2010f8e1788cc49f7c612f1ade0cbb85", "score": "0.68058205", "text": "protected static function getAllHeaders() {\n $headers= array();\n if (function_exists('getallheaders')) {\n // this will work only for mod_php!\n $headers= getallheaders();\n } else {\n foreach($_SERVER as $header=>$value) {\n if(preg_match('/HTTP_(.+)/',$header,$hp)) {\n $h= preg_replace_callback(\n '/(^|_)(.)/', \n create_function( \n '$matches', \n 'return $matches[1] ? \"-\".ucfirst( $matches[2] ) : ucfirst( $matches[2] );'), \n strtolower($hp[1]));\n $headers[$h] = $value;\n }\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "8d01116f7e3dd26fa35ed7bbeb9d010c", "score": "0.679973", "text": "function get_headers(): array {\n $headers = [];\n foreach ($_SERVER as $key => $value) {\n if (\\strncmp($key, 'HTTP_', 5) !== 0) {\n continue;\n }\n $name = \\implode('-', \\array_map('mb_strtolower', \\explode('_', $key)));\n $headers[$name] = $value;\n }\n return $headers;\n}", "title": "" }, { "docid": "0cdfb3038f6bf73f6273e2244b7bb3b2", "score": "0.6782776", "text": "private static function http_parse_headers($rawHeaders)\n {\n $headers = array();\n $key = ''; // [+]\n\n foreach (explode(\"\\n\", $rawHeaders) as $i => $h) {\n $h = explode(':', $h, 2);\n\n if (isset($h[1])) {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n } elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));\n } else {\n $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));\n }\n\n $key = $h[0];\n } else {\n if (substr($h[0], 0, 1) == \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\" . trim($h[0]);\n } elseif (!$key) {\n $headers[0] = trim($h[0]);\n }\n trim($h[0]);\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "0e3aefdf0f55d1fa47313964d0593f74", "score": "0.6782251", "text": "public function getHeaders() : array\n {\n if (null !== static::$headers) {\n\n return static::$headers;\n }\n\n $headers = [];\n\n foreach ($_SERVER as $key => $value) {\n\n $key = mb_strtoupper($key);\n\n if ('HTTP_' !== substr($key, 0, 5)) {\n continue;\n }\n\n $key = str_replace('_', '-',\n substr($key, 5)\n );\n\n if ('false' === mb_strtolower($value)) {\n $value = false;\n }\n\n if ('true' === mb_strtolower($value)) {\n $value = true;\n }\n\n $headers[$key] = $value;\n }\n\n return static::$headers = $headers;\n }", "title": "" }, { "docid": "1079d10fe651db4e59ea4369851bd595", "score": "0.6772723", "text": "function getallheaders()\n {\n $server = new Server();\n\n $data = $server->all();\n\n if (!empty($data)) {\n return [];\n }\n\n $headers = [];\n\n foreach ($data as $key => $value) {\n if (substr($key, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))))] = $value;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "d0df999512d62d541e2b1cfe1ebe2e98", "score": "0.6756523", "text": "public function parseLinkHeader($linkHeader)\n {\n preg_match('/<([^>]+)>;\\s*rel=[\\'\"]([a-z]*)[\\'\"]/', $linkHeader, $matches);\n $resourceParts = explode('/', $matches[1]);\n return [\n 'fullResource' => $matches[1],\n 'resourceName' => $resourceParts[count($resourceParts) - 2],\n 'resourceId' => (int) $resourceParts[count($resourceParts) - 1],\n 'rel' => $matches[2]\n ];\n }", "title": "" }, { "docid": "49be28371c1992b829c46038b5a4e195", "score": "0.67423147", "text": "private function headers()\n {\n // the return value\n $result = array();\n\n // because the internal storage is not an assoc array, we need to do a conversion\n foreach ($this->headers as $header)\n {\n // convert to assoc array\n $result[$header[0]] = $header[1];\n }\n\n // done\n return $result;\n }", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.67386556", "text": "public function getHeaders();", "title": "" }, { "docid": "5638403b8ae7bcc44442462ac76ccabe", "score": "0.67303455", "text": "public function links() {\n if ($this->status < 200 || $this->status >= 300) throw new UnexpectedStatus($this);\n\n $r= [];\n foreach (Links::in($this->header('Link'))->all() as $link) {\n $r[$link->param('rel')]= $this->resolve($link->uri());\n }\n return $r;\n }", "title": "" }, { "docid": "9f5f0d79ec2412c504967b1c3ccd1a29", "score": "0.6730089", "text": "function getRawHeaders();", "title": "" }, { "docid": "9e99c155ca9d1c5f5310c9ea5e68ea37", "score": "0.6709515", "text": "function httpParseHeaders($raw_headers)\n{\n $headers = [];\n $key = '';\n foreach (explode(\"\\n\", $raw_headers) as $h) {\n $h = explode(':', $h, 2);\n if (isset($h[1])) {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n } elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], [trim($h[1])]);\n } else {\n $headers[$h[0]] = array_merge([$headers[$h[0]]], [trim($h[1])]);\n }\n $key = $h[0];\n } else {\n if (substr($h[0], 0, 1) === \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\".trim($h[0]);\n } elseif (!$key) {\n $headers[0] = trim($h[0]);\n }\n trim($h[0]);\n }\n }\n return $headers;\n}", "title": "" }, { "docid": "5113cad15aec5167fad4ade36b6ace68", "score": "0.6703599", "text": "public function getRawHeaders();", "title": "" }, { "docid": "11bd651b45fddb0a40555cfcd5fad756", "score": "0.6693346", "text": "public function getHttpHeaders();", "title": "" }, { "docid": "a2b18cde8e5cf859b3ef22699f7c8206", "score": "0.66757476", "text": "private function getHeadersAsArray($headersAsString) {\n $headers = array();\n \n foreach (explode(\"\\r\\n\", $headersAsString) as $i => $line) {\n if ($i === 0) { // HTTP code\n continue;\n }\n \n $line = trim($line);\n if (empty($line)) {\n continue;\n }\n \n list($key, $value) = explode(': ', $line);\n \n if ($key == 'Link') {\n $value = array_merge(\n array('_raw' => $value),\n $this->getLinkHeaderAsArray($value)\n );\n }\n \n $headers[$key] = $value;\n }\n return $headers;\n }", "title": "" }, { "docid": "3a13afa6ee5332095aa747d95e9181ef", "score": "0.66746664", "text": "public static function headers() { return getallheaders(); }", "title": "" }, { "docid": "39cf188a279ec3bccc102b409ca4da7b", "score": "0.66602623", "text": "public function getHeaders(): array\n {\n return $this->items->map(function ($media) {\n return $media instanceof MediaOnNetwork ? $media->getHeaders() : [];\n })->all();\n }", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.66437304", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.66437304", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.66437304", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "25300cc180d15e43e8d33d0e1fed8ea7", "score": "0.66382533", "text": "function getHeaders(array $headers);", "title": "" }, { "docid": "e417e0c2b6fef52db9da6bcfacbbcf41", "score": "0.66309386", "text": "public static function extract_headers($raw_headers) {\n $headers = array();\n if ($raw_headers) {\n foreach (explode(PHP_EOL,$raw_headers) as $line) {\n $header = explode(\":\",$line);\n if (count($header) == 2) {\n if (strtolower($header[0]) == \"content-type\") {\n $header[0] = \"Content-Type\"; /* Fix up case if necessary */\n }\n $headers[$header[0]] = trim($header[1]);\n }\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "a9f6e913aba240c864ec0e39a0f0777a", "score": "0.6626732", "text": "function parse_http_headers($headers) {\n $parsed = [];\n\n foreach (preg_split('/\\r?\\n/', $headers) as $field) {\n $field_split = explode(':', $field, 2);\n if (count($field_split) == 2) {\n $parsed[trim($field_split[0])] = trim($field_split[1]);\n }\n }\n\n return $parsed;\n}", "title": "" }, { "docid": "d0a90b048ece115b59b9bce095fb668d", "score": "0.6620535", "text": "protected function prepareHeaders(): array\n {\n $headers = Yii::$app->response->getHeaders();\n $respHeaders = [];\n\n if ($headers->count > 0) {\n $startsWith = 'x-';\n foreach ($headers->toArray() as $name => $value) {\n if (strtolower(substr($name, 0, strlen($startsWith))) !== $startsWith) {\n $respHeaders[$name] = is_array($value)\n && count(array_keys($value)) === 1\n && ($value[0] ?? null) !== null ? $value[0] : $value;\n }\n }\n }\n\n return $respHeaders;\n }", "title": "" }, { "docid": "f39d19cc2beaac57920f8ec3147f244d", "score": "0.6618665", "text": "public static function get_headers()\n\t{\n\t\tif (function_exists('apache_request_headers')) {\n\t\t\t\n\t\t\t$headers = apache_request_headers();\n\t\t\t\n\t\t\t$out = [];\n\t\t\tforeach ($headers as $key => $value) {\n\t\t\t\t$key = str_replace(\n\t\t\t\t\t\t' ',\n\t\t\t\t\t\t'-',\n\t\t\t\t\t\tucwords(strtolower(str_replace('-', ' ', $key)))\n\t\t\t\t\t);\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\t\t} else {\n\t\t\t\n \n\t\t\t$out = [];\n\t\t\tif (isset($_SERVER['CONTENT_TYPE'])) {\n\t\t\t\t$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\t\t\t}\n\t\t\tif (isset($_ENV['CONTENT_TYPE'])) {\n\t\t\t\t$out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\t\t\t}\n\t\t\tforeach ($_SERVER as $key => $value) {\n\t\t\t\tif (substr($key, 0, 5) == 'HTTP_') {\n\t\t\t\t\t$key = str_replace(\n\t\t\t\t\t\t' ',\n\t\t\t\t\t\t'-',\n\t\t\t\t\t\tucwords(strtolower(str_replace('_', ' ', substr($key, 5))))\n\t\t\t\t\t);\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "4bc22a3fe015771ce17bed5c9669645f", "score": "0.6614417", "text": "public function preparedHeaders()\n {\n $headers = $this->headers;\n\n $preparedHeaders = [];\n\n // Make sure the host header is the very first header.\n if (isset($headers['Host'])) {\n $preparedHeaders[] = sprintf('Host: %s', $headers['Host']);\n unset($headers['Host']);\n } else {\n $preparedHeaders[] = sprintf('Host: %s', parse_url($this->url, PHP_URL_HOST));\n }\n\n if (!isset($headers['User-Agent'])) {\n $preparedHeaders[] = sprintf('User-agent: %s', $this->userAgent);\n }\n\n if (!isset($headers['Content-Type']) && $this->payload instanceof Payload) {\n $preparedHeaders[] = sprintf('Content-Type: %s', $this->payload->contentType());\n }\n\n /** @var string $name, @var string $header */\n foreach ($headers as $name => $header) {\n $preparedHeaders[] = sprintf('%s: %s', $name, $header);\n }\n\n return $preparedHeaders;\n }", "title": "" }, { "docid": "f77e491e87d3e3cf1437a3281d731a32", "score": "0.6613255", "text": "public function getFormattedHeaders()\n {\n $res = array();\n if ($this->headers != null)\n {\n foreach ($this->headers as $header => $value)\n {\n $res[] = $header . ': ' . $value;\n }\n }\n return $res;\n }", "title": "" }, { "docid": "39941f432a7ea0522bdf5b4c7d1bddc2", "score": "0.6563667", "text": "public function getallheaders() \n { \n $headers = []; \n foreach ($_SERVER as $name => $value) \n { \n if (substr($name, 0, 5) == 'HTTP_') \n { \n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; \n } \n } \n return $headers; \n }", "title": "" }, { "docid": "580bfdf1b357278db78287d927a4e65d", "score": "0.655395", "text": "public static function http_parse_headers($header) {\n\t $retVal = array();\n\t $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n\t foreach ($fields as $field) {\n\n\t // Do not process empty cubrid_num_fields(result)\n\t if (empty($field)) {\n\t continue;\n\t }\n\n\t\t if (preg_match('/([^:]+): (.+)/m', $field, $match)) {\n\t\t $match[1] = preg_replace('/(?<=^|[\\x09\\x20\\x2D])./e', 'strtoupper(\"\\0\")', strtolower(trim($match[1])));\n\t\t if( isset($retVal[$match[1]]) ) {\n\t\t if (!is_array($retVal[$match[1]])) {\n\t\t $retVal[$match[1]] = array($retVal[$match[1]]);\n\t\t }\n\t\t $retVal[$match[1]][] = $match[2];\n\t\t }\n\t\t else {\n\t\t $retVal[$match[1]] = trim($match[2]);\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (preg_match('/HTTP\\//', $field)) {\n\t\t // Following HTTP standards which are space-separated\n\t\t preg_match('/(.*?) (.*?) (.*)/', $field, $matches);\n\t\t $retVal['HTTP']['version'] = $matches[1];\n\t\t $retVal['HTTP']['code'] = $matches[2];\n\t\t $retVal['HTTP']['reason'] = $matches[3];\n\t\t }\n\t\t else {\n\t\t $retVal['Content'][] = $field;\n\t\t }\n\t\t }\n\t\t }\n\t\t return $retVal;\n\t \t}", "title": "" }, { "docid": "85e45962f217933c1076f15b5cb85fad", "score": "0.6541594", "text": "private function getLinkHeaderAsArray($linkHeaderAsString) {\n $urls = array();\n \n if (preg_match_all('/<(.*?)>\\s*;\\s*rel=\"(.*?)\"\\s*/', $linkHeaderAsString, $matches)) {\n foreach ($matches[2] as $i => $relName) {\n $urls[$relName] = $matches[1][$i];\n }\n }\n \n return $urls;\n }", "title": "" }, { "docid": "27a18f83db9e389ae8ec74b95786f888", "score": "0.6537883", "text": "public function getHeaders () {}", "title": "" }, { "docid": "27a18f83db9e389ae8ec74b95786f888", "score": "0.6537883", "text": "public function getHeaders () {}", "title": "" }, { "docid": "790edb77482876e28f04f1e4987b6482", "score": "0.6533911", "text": "protected function parseHeaders($head)\n {\n $expr =\n '!\n ^\n ([^()<>@,;:\\\\\"/[\\]?={} \\t]+) # Header name\n [ \\t]*:[ \\t]*\n (\n (?:\n (?: # First line of value\n (?:\"(?:[^\"\\\\\\\\]|\\\\\\\\.)*\"|\\S+) # Quoted string or unquoted token\n [ \\t]* # LWS\n )*\n (?: # Folded lines\n \\r?\\n\n [ \\t]+ # ...must begin with LWS\n (?:\n (?:\"(?:[^\"\\\\\\\\]|\\\\\\\\.)*\"|\\S+) # ...followed by quoted string or unquoted tokens\n [ \\t]* # ...and maybe some more LWS\n )*\n )*\n )?\n )\n \\r?$\n !smx';\n preg_match_all($expr, $head, $matches);\n\n $headers = array();\n for ($i = 0; isset($matches[0][$i]); $i++) {\n $name = strtolower($matches[1][$i]);\n if (!isset($headers[$name])) {\n $headers[$name] = array();\n }\n\n $value = preg_replace('/\\s+(\"(?:[^\"\\\\\\\\]|\\\\\\\\.)*\"|\\S+)/s', ' $1', trim($matches[2][$i]));\n\n $headers[$name][] = $this->headerFactory->create($name, $value);\n }\n\n foreach ($headers as $name => $header) {\n $headers[$name] = $this->headerCollectionFactory->create($headers[$name], $name);\n }\n\n return $headers;\n }", "title": "" }, { "docid": "56aaf354d051df67337c1ab8ca19698e", "score": "0.65260565", "text": "protected function getallheaders() {\n foreach ($_SERVER as $name => $value)\n { \n if (substr($name, 0, 5) == 'HTTP_') \n { \n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; \n } \n }\n return $headers;\n }", "title": "" }, { "docid": "9e193a9269db6242a7d97104c7466fd8", "score": "0.65163094", "text": "private function transform_headers() : array {\n\t\t$result = [];\n\t\tforeach ($this->headers as $key=>$value) {\n\t\t\t$result = array_merge($result, [$key . ': ' . $value]);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "81949a7bc24b3f1cde8b0ba75722a1b2", "score": "0.6507837", "text": "public function headerArray()\n\t{\n\t\t$headers = [];\n\t\tforeach(array_merge($this->headers, $this->header_changed) as $key => $header)\n\t\t{\n\t\t\t$headerString = implode($this->sep, $header);\n\t\t\t$headers[] = \"{$key}: {$headerString}\";\n\t\t}\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "7b33e9116ffa7c5c731025896952d1d6", "score": "0.64919966", "text": "public function getMultipleHeaders();", "title": "" }, { "docid": "2c5e564f412164b9f57ff18e6848416b", "score": "0.6481806", "text": "public function getHeaders(): array {\r\n return false === isset($this -> headers['custom']) ? [] : $this -> headers['custom'];\r\n }", "title": "" }, { "docid": "ed444b80e6257bf93c0e26e667a3ddb5", "score": "0.64785725", "text": "protected function getResponseHeaders(): array\n {\n return Arr::get([\n 'xml' => ['Content-Type' => 'application/xml'],\n 'rss' => ['Content-Type' => 'application/rss+xml'],\n 'txt' => ['Content-Type' => 'text/plain'],\n ], $this->format, []);\n }", "title": "" }, { "docid": "5fdc6acbe953ccd8c9d00e2aad22a495", "score": "0.64756805", "text": "private function getHeaders(): array\n {\n return [];\n }", "title": "" }, { "docid": "6addf51e54de92d6aa167fffaf56b245", "score": "0.64652246", "text": "final public function getHeaders(): array\n {\n return $this->headers->getHeaders();\n }", "title": "" }, { "docid": "7248d680d127f2005a0ad94b498d373b", "score": "0.6460298", "text": "function getHeaders();", "title": "" }, { "docid": "3fef22f7423e22018bbf21d9582cdf18", "score": "0.6457991", "text": "private function getLinkHeaderAsArray($linkHeaderAsString)\n {\n $urls = array();\n \n if (preg_match_all('/<(.*?)>\\s*;\\s*rel=\"(.*?)\"\\s*/', $linkHeaderAsString, $matches)) {\n foreach ($matches[2] as $i => $relName) {\n $urls[$relName] = $matches[1][$i];\n }\n }\n \n return $urls;\n }", "title": "" }, { "docid": "ae7f47b9d6e63497510030f0555ebedd", "score": "0.6455063", "text": "protected function getHttpHeaders()\n {\n $headers = array();\n if (!is_null($this->_maxage)) {\n $headers['Cache-Control'] = 'max-age=' . $this->_maxage;\n }\n if ($this->_gzipped) {\n $headers['Content-Encoding'] = 'gzip';\n }\n return $headers;\n }", "title": "" }, { "docid": "eccac7f6f6664d1baee21dd7ba878b30", "score": "0.645071", "text": "public function getHeaders() {}", "title": "" }, { "docid": "7740ab5e023661d2bbe751a92713f127", "score": "0.64467794", "text": "function getallheaders() {\n\t\t$headers = array();\n\n\t\t$copy_server = array(\n\t\t\t'CONTENT_TYPE' => 'Content-Type',\n\t\t\t'CONTENT_LENGTH' => 'Content-Length',\n\t\t\t'CONTENT_MD5' => 'Content-Md5',\n\t\t);\n\n\t\tforeach ( $_SERVER as $key => $value ) {\n\t\t\tif ( substr( $key, 0, 5 ) === 'HTTP_' ) {\n\t\t\t\t$key = substr( $key, 5 );\n\t\t\t\tif ( ! isset( $copy_server[ $key ] ) || ! isset( $_SERVER[ $key ] ) ) {\n\t\t\t\t\t$key = str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', $key ) ) ) );\n\t\t\t\t\t$headers[ $key ] = $value;\n\t\t\t\t}\n\t\t\t} elseif ( isset( $copy_server[ $key ] ) ) {\n\t\t\t\t$headers[ $copy_server[ $key ] ] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset( $headers['Authorization'] ) ) {\n\t\t\tif ( isset( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) ) {\n\t\t\t\t$headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n\t\t\t} elseif ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {\n\t\t\t\t$basic_pass = isset( $_SERVER['PHP_AUTH_PW'] ) ? $_SERVER['PHP_AUTH_PW'] : '';\n\t\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass );\n\t\t\t} elseif ( isset( $_SERVER['PHP_AUTH_DIGEST'] ) ) {\n\t\t\t\t$headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n\t\t\t}\n\t\t}\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "a0f49858f15d0bc9992bef2934c74ca4", "score": "0.6434309", "text": "function sf_headers()\n {\n $headers = [];\n foreach ($_SERVER as $k => $v) {\n if (substr($k, 0, 5) == 'HTTP_') {\n $headers[\n str_replace(\n '-',\n '_',\n str_replace(\n ' ',\n '_',\n strtolower(\n substr($k, 5)\n )\n )\n )\n ] = $v;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "552e315f36d8fa3a6dd108799c1cb423", "score": "0.6430104", "text": "private function get_headers() {\n $headers = array();\n\n $copy_server = array(\n\t\t\t'CONTENT_TYPE' => 'Content-Type',\n\t\t\t'CONTENT_LENGTH' => 'Content-Length',\n\t\t\t'CONTENT_MD5' => 'Content-Md5',\n\t\t\t'HTTP_X_WP_NONCE' => 'HTTP_X_WP_NONCE'\n );\n\n foreach ( $_SERVER as $key => $value ) {\n if ( substr( $key, 0, 5 ) === 'HTTP_' ) {\n $key = substr( $key, 5 );\n\n if ( !isset( $copy_server[$key] ) || !isset( $_SERVER[$key] ) ) {\n $key = str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', $key ) ) ) );\n $headers[$key] = $value;\n }\n } elseif ( isset( $copy_server[$key] ) ) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if ( !isset( $headers['Authorization'] ) ) {\n if ( isset( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) ) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {\n $basic_pass = isset( $_SERVER['PHP_AUTH_PW'] ) ? $_SERVER['PHP_AUTH_PW'] : '';\n $headers['Authorization'] = 'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass );\n } elseif ( isset( $_SERVER['PHP_AUTH_DIGEST'] ) ) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "d506e9a11a11e11669eabca31d744c61", "score": "0.64299643", "text": "final public function get_headers() : array {\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "b6bb34f140307cc1132f4d531766b7cd", "score": "0.64245963", "text": "protected function getHeadersList(): array\n {\n $headers = [];\n\n foreach ($this->headers as $key => $value) {\n $headers[] = \"{$key}: {$value}\";\n }\n\n return $headers;\n }", "title": "" }, { "docid": "0d93c40c18c3a193e09d3e76f1f9dab3", "score": "0.6416978", "text": "function _parseRequestHeaders() {\n $headers = array();\n foreach($_SERVER as $key => $value) {\n if (substr($key, 0, 5) <> 'HTTP_') {\n continue;\n }\n $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n $headers[$header] = $value;\n }\n return $headers;\n}", "title": "" }, { "docid": "5249f198c2fdb64d18472b4ac807073f", "score": "0.6414232", "text": "public function headers() {\n if (count($args = func_get_args())) {\n $this->headerRaw($args[0]);\n }\n\n return self::parseHeaders($this->_s('headerRaw'));\n }", "title": "" }, { "docid": "81bb2ae286fee82f0f290ce7a2452675", "score": "0.64130825", "text": "public function getHeaders()\n {\n $headers = $this->headers;\n\n if ($this->content_type) {\n $headers['Content-Type'] = $this->headerValue($this->content_type);\n }\n\n if ($this->cache === false) {\n $headers['Pragma'] = 'no-cache';\n $headers['Cache-Control'] = [\n 'no-store, no-cache, must-revalidate',\n 'post-check=0, pre-check=0',\n ];\n $headers['Expires'] = '1';\n }\n\n if ($this->redirect) {\n $headers['Location'] = $this->headerValue($this->redirect);\n }\n\n return $headers;\n }", "title": "" }, { "docid": "8358147d770676280a714bc32670227f", "score": "0.64072907", "text": "function getHeaders()\n {\n $headers = array();\n foreach ($_SERVER as $k => $v)\n {\n if (substr($k, 0, 5) == \"HTTP_\")\n {\n $k = str_replace('_', ' ', substr($k, 5));\n $k = str_replace(' ', '-', ucwords(strtolower($k)));\n $headers[$k] = $v;\n }\n }\n return $headers; \n }", "title": "" }, { "docid": "d30e39e2d16df5e2023afecd1b977634", "score": "0.6391548", "text": "protected static function parse_headers_from_php() {\n\t\t$headers = array();\n\n\t\tforeach($_SERVER as $key => $value) {\n\t\t\tif(substr($key, 0, 5) == 'HTTP_') {\n\t\t\t\t$key = substr($key, 5);\n\t\t\t\t$key = strtolower(str_replace('_', ' ', $key));\n\t\t\t\t$key = str_replace(' ', '-', ucwords($key));\n\t\t\t\t$headers[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif(isset($_SERVER['CONTENT_TYPE'])) $headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\t\tif(isset($_SERVER['CONTENT_LENGTH'])) $headers['Content-Length'] = $_SERVER['CONTENT_LENGTH'];\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "e125e73026fb2879ac8d548c2a95d0fd", "score": "0.63899595", "text": "private function prepareHeadersForRequest()\n {\n //$host = parse_url($this->url, PHP_URL_HOST);\n\n $headers = [];\n $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8';\n $headers[] = 'Accept-Encoding: gzip, deflate';\n $headers[] = 'Accept-Language: '.$this->language;\n $headers[] = 'Connection: keep-alive';\n\n //if ($host) {\n //$headers[] = 'Host: '.$host;\n //}\n // Referer\n\n $headers[] = 'Upgrade-Insecure-Requests: 1';\n $headers[] = 'User-Agent: '.$this->userAgent;\n\n return $headers;\n }", "title": "" }, { "docid": "50aa7fbe1fb2da354f897166996027e1", "score": "0.6388588", "text": "function request_headers(array $server) : array\n{\n // https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.2\n if (!isset($server['HTTP_CONTENT_LENGTH']) && isset($server['CONTENT_LENGTH'])) {\n $server['HTTP_CONTENT_LENGTH'] = $server['CONTENT_LENGTH'];\n }\n\n // https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.3\n if (!isset($server['HTTP_CONTENT_TYPE']) && isset($server['CONTENT_TYPE'])) {\n $server['HTTP_CONTENT_TYPE'] = $server['CONTENT_TYPE'];\n }\n\n $result = [];\n foreach ($server as $key => $value) {\n if (0 <> strncmp('HTTP_', $key, 5)) {\n continue;\n }\n\n $name = strtr(substr($key, 5), '_', '-');\n $name = ucwords(strtolower($name), '-');\n\n $result[$name] = $value;\n }\n\n return $result;\n}", "title": "" }, { "docid": "879ed74e7dc410fbc6ea76683a35068f", "score": "0.6384413", "text": "public function getHeaders(): array\n {\n $headers = [];\n foreach ($this->_environment as $key => $value) {\n $name = null;\n if (str_starts_with($key, 'HTTP_')) {\n $name = substr($key, 5);\n }\n if (str_starts_with($key, 'CONTENT_')) {\n $name = $key;\n }\n if ($name !== null) {\n $name = str_replace('_', ' ', strtolower($name));\n $name = str_replace(' ', '-', ucwords($name));\n $headers[$name] = (array)$value;\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "66651220caa7a8b4091cc5a70f1ab93b", "score": "0.6364725", "text": "public function get(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "279d124447c39fb734df000cb9047b10", "score": "0.6358007", "text": "protected function getHeaders(): array\n\t{\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "0856bbb03e3460f16e4e54be25925d7e", "score": "0.63573295", "text": "public function getHttpHeaders() {\n return @$this->attributes['http_headers'];\n }", "title": "" }, { "docid": "605c3ed4c7e60bfe1c9f27b57595b915", "score": "0.63401115", "text": "protected function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "5d7d29b1348e34967ab0db1421d9cc57", "score": "0.63366735", "text": "public function apacheRequestHeaders()\n {\n $arh = array();\n $rx_http = '/\\AHTTP_/';\n\n foreach ($_SERVER as $key => $val) {\n if (preg_match($rx_http, $key)) {\n $arh_key = preg_replace($rx_http, '', $key);\n $rx_matches = explode('_', $arh_key);\n if (count($rx_matches) > 0 and strlen($arh_key) > 2) {\n foreach ($rx_matches as $ak_key => $ak_val) {\n $rx_matches[$ak_key] = ucfirst($ak_val);\n }\n\n $arh_key = implode('-', $rx_matches);\n }\n $arh[$arh_key] = $val;\n }\n }\n return ($arh);\n }", "title": "" }, { "docid": "71a72224db70810f6df6539e64e34605", "score": "0.632137", "text": "public function getListHeaders();", "title": "" }, { "docid": "62c2a205ee43da4ffec5724d33dcb578", "score": "0.63210416", "text": "private function getHeaderInformation($header = array()) {\n $result = array();\n foreach ($header as $key => $value) {\n $found = strpos($key, 'HTTP_');\n if ($found !== false) {\n $result[$key] = $value;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "82e68bd26001c57bc629225fb53fe9e3", "score": "0.63100404", "text": "public function headers(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "f9e6aca39c5fa2b5367ddd586dfd062b", "score": "0.6303516", "text": "public function getHeaders() {\t\t\n\t\t\n\t\tif(!function_exists('apache_request_headers'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\t\t\n\t\tif (!isset($this->headers)) {\n\t\t\t$this->_headers = array_change_key_case(apache_request_headers(),CASE_LOWER);\t\t\t\n\t\t}\n\t\treturn $this->_headers;\n\t}", "title": "" }, { "docid": "a876079317d34b38549abcd1cf92dd2e", "score": "0.62895644", "text": "public function getRawHeaders() {\n\t\treturn $this->httpRawHeaders;\n\t}", "title": "" }, { "docid": "2620e7bba7a63a1923733a46533c8ceb", "score": "0.6284341", "text": "public function allHeaders()\n {\n $headers = $this->headers;\n $headersMD5toCache = md5($headers);\n static $allHeaders;\n\n if ($this->cacheHeaders && $headersMD5toCache == $this->cacheHeaders) {\n return $allHeaders;\n }\n\n $allHeaders = explode(\"\\r\\n\\r\\n\", $headers);\n array_pop($allHeaders);\n $allHeadersCount = count($allHeaders);\n\n\n for ($currentHeaderIndex = 0; $currentHeaderIndex < $allHeadersCount; $currentHeaderIndex++) {\n $explodedHeaderNode = explode(\"\\r\\n\", $allHeaders[$currentHeaderIndex]);\n $explodedHeaderNodeCount = count($explodedHeaderNode);\n $allParsedHeader = [];\n for ($i = 0; $i < $explodedHeaderNodeCount; $i++) {\n if ($i === 0) {\n $statusLine = $explodedHeaderNode[$i];\n $explodedStatusLine = explode(' ', $statusLine);\n $allParsedHeader = [\n 'http-version' => $explodedStatusLine[0],\n 'status-code' => $explodedStatusLine[1],\n 'status-text' => $explodedStatusLine[2]\n ];\n continue;\n }\n\n $headerLine = $explodedHeaderNode[$i];\n $firstColonPosition = strpos($headerLine, ':');\n\n if ($firstColonPosition === false)\n continue;\n\n $key = substr($headerLine, 0, $firstColonPosition);\n $key = trim(strtolower($key));\n $value = trim(substr($headerLine, $firstColonPosition + 1));\n\n if ($key === 'set-cookie')\n $allParsedHeader[$key][] = new Cookie($value);\n else\n $allParsedHeader[$key] = $value;\n\n }\n $allHeaders[$currentHeaderIndex] = $allParsedHeader;\n\n }\n $this->cacheHeaders = $headersMD5toCache;\n return $allHeaders;\n }", "title": "" }, { "docid": "e17c369d6127045af877926ffa368020", "score": "0.62809575", "text": "public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach ($headers AS $key => $value) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }", "title": "" }, { "docid": "db7ff19b9fe4c324bc1879e339c68fef", "score": "0.62768763", "text": "public function getHeaders()\n {\n if (empty($this->options['CURLOPT_HEADER'])) {\n throw new InfoException('Required option CURLOPT_HEADER was not true or 1', $this->options);\n }\n $lines = explode(\"\\n\", trim(substr($this->getContent(), 0, $this->header_size)));\n $headers = [];\n $last = count($lines) - 1;\n for ($i = 0; $i <= $last; ++$i) {\n $line = $lines[$i];\n $dividerPos = strpos($line, ':');\n if ($dividerPos !== false) {\n $headers[substr($line, 0, $dividerPos)] = trim(substr($line, $dividerPos + 1));\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "d0a357977f16b754be5f60170f6bcf50", "score": "0.6269238", "text": "public function getAllHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "689eeecc3db7fb0cba0bb459ef0372b8", "score": "0.6260284", "text": "function http_parse_headers ($header) {}", "title": "" }, { "docid": "eb6d69ae19f1630cde24a77bae06d716", "score": "0.6242504", "text": "public function arrangeHeaders() {\n\t\t$headers = array();\n\t\t$sizeOfHeaders = sizeof($this->headers);\n\t\t$i = 1;\n\t\tforeach ( $this->headers as $k => $v ) {\n\t\t\tif ( $i == $sizeOfHeaders ) {\n\t\t\t\t$headers = array($k => $v) + $headers;\n\t\t\t} else {\n\t\t\t\t$headers[$k] = $v;\t\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $headers;\t\n\t}", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "68fd749ef17c065dbeb75243067752d9", "score": "0.6237227", "text": "public function getHeaders(): array\n {\n return $this->headers;\n }", "title": "" }, { "docid": "5c712964ccc1c0aa98be5d96d6a15c3e", "score": "0.62244755", "text": "public function getHeaders()\r\n\t{\r\n\t\tif(function_exists(\"apache_request_headers\"))\r\n\t\t{\r\n\t\t\treturn apache_request_headers();\r\n\t\t}\r\n\t\t\r\n\t\t$aReturn = array();\r\n\t\t\r\n\t\tforeach($_SERVER as $sKey => $sValue)\r\n\t\t{\r\n\t\t\tif(substr($sKey, 0, 5) == \"HTTP_\")\r\n\t\t\t{\r\n\t\t\t\t# this is just ugly.\r\n\t\t\t\t$sKey = str_replace(\"- \", \"-\", ucwords(str_replace(\"_\", \"- \", strtolower(substr($sKey, 5)))));\r\n\t\t\t\t$aReturn[$sKey] = $sValue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $aReturn;\r\n\t}", "title": "" }, { "docid": "04f56dccbf4f43e9f85b4e25d421cbfa", "score": "0.6217914", "text": "public static function get_headers() { \r\n if (function_exists('apache_request_headers')) { \r\n // we need this to get the actual Authorization: header \r\n // because apache tends to tell us it doesn't exist \r\n return apache_request_headers(); \r\n } \r\n // otherwise we don't have apache and are just going to have to hope \r\n // that $_SERVER actually contains what we need \r\n $out = array(); \r\n foreach ($_SERVER as $key => $value) { \r\n if (substr($key, 0, 5) == \"HTTP_\") { \r\n // this is chaos, basically it is just there to capitalize the first \r\n // letter of every word that is not an initial HTTP and strip HTTP \r\n // code from przemek \r\n $key = str_replace( \r\n \" \", \r\n \"-\", \r\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5)))) \r\n ); \r\n $out[$key] = $value; \r\n } \r\n } \r\n return $out; \r\n }", "title": "" }, { "docid": "8a4a24b22a9bf6d5f4527a82aeae7512", "score": "0.6214431", "text": "public function list() : array\n {\n return headers_list();\n }", "title": "" } ]
baf6206516ce7f7832e14505d8c2c006
Magic method to get the 'tags_as_string' property.
[ { "docid": "a252c75e67da4c72fb31647bdf7cba79", "score": "0.86317706", "text": "public function __getTagsAsString()\n {\n // populate for the first time\n if (empty($this->_data['tags_as_string'])) {\n // $this->tags forces the __get() call to the related object,\n // then only proceeds if there are tags there.\n if ($this->tags) {\n $this->_data['tags_as_string'] = $this->tags->getNamesAsString();\n }\n }\n \n return $this->_data['tags_as_string'];\n }", "title": "" } ]
[ { "docid": "03d3224e70672d46ec1ba797cfadc425", "score": "0.69778985", "text": "function __toString() {\n\t\treturn $this->getTag();\n\t}", "title": "" }, { "docid": "18799af10527d21ae6c371a4171de987", "score": "0.6922096", "text": "public function getTagSlugStringAttribute()\n {\n return $this->tags()->pluck('slug')->implode(',');\n }", "title": "" }, { "docid": "f125f12c698b54287d7ef0d0fda84a35", "score": "0.6765491", "text": "public function getString() : string\n {\n $value = $this->value;\n if ( in_array($this->getType(), ['array', 'object']) )\n $value = serialize($value);\n\n return (string)$value;\n }", "title": "" }, { "docid": "c9c75e78e63067cd02512ec763d04208", "score": "0.6710557", "text": "public function getTags() {\n // Support passing the tags as string, but force it to be an array.\n if (!is_array($this->tags)) {\n $this->tags = [$this->tags];\n }\n return $this->tags;\n }", "title": "" }, { "docid": "cd7e12345ccf2b967a16aab32a05892a", "score": "0.6552146", "text": "public function getString() {\n return $this->convertType('string');\n }", "title": "" }, { "docid": "a376d61ed7afa3abc1108d139de48928", "score": "0.6520567", "text": "public function getTag(): string {\n return $this->tag;\n }", "title": "" }, { "docid": "e997ed87ac6a0b61467c02c9053d94f5", "score": "0.6479872", "text": "public function getTag() : string\n {\n return $this->tag;\n }", "title": "" }, { "docid": "c65561d168f488f2052027c2b7b64949", "score": "0.64437217", "text": "public function getTag(): string;", "title": "" }, { "docid": "8f4aa18db84ed8ed524406d43b7756e1", "score": "0.64224344", "text": "public function getTag(): string\n {\n return $this->tag;\n }", "title": "" }, { "docid": "06aaf9045e2d3d86149a83e48cba5efb", "score": "0.63300455", "text": "public function __toString() {\n\t\t\tif ( is_array( $this->value ) ) {\n\t\t\t\treturn wp_json_encode( $this->value );\n\t\t\t}\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "437dff4160a492d8e46e0739031694ef", "score": "0.6327946", "text": "protected function _getEncodedTagProperties() {\n\t\t$encoded_properties = array();\n\t\tforeach ($this->_tag_properties as $property => $value) {\n\t\t\tif (is_object($value) || is_array($value)) {\n\t\t\t\t$value = Loader::helper('json')->encode($value);\n\t\t\t} else {\n\t\t\t\t$value = (string) $value;\n\t\t\t}\n\t\t\t$encoded_properties[$property] = $value;\n\t\t}\n\t\treturn $encoded_properties;\n\t}", "title": "" }, { "docid": "3dbbc4e7297955142a604a2935e41823", "score": "0.6282976", "text": "public function getTag() : string\n\t{\n\t\treturn $this->_tag;\n\t}", "title": "" }, { "docid": "cdad97bd08797999093cf6a69df1b06e", "score": "0.6266673", "text": "public static function getTagsWithTypes()\n {\n return self::$tags;\n }", "title": "" }, { "docid": "13679f1871de2fb04a2a21b4730349cc", "score": "0.6264923", "text": "public function getTags() { return $this->tags; }", "title": "" }, { "docid": "266550c13c9f5832aa8f79ad560c8fca", "score": "0.6243228", "text": "public function getTags()\n {\n return $this->data['fields']['tags'];\n }", "title": "" }, { "docid": "ef822b9e2e70aa8c230117c2377a3a87", "score": "0.62042344", "text": "public function __toString() {\n return (string) $this->getValue();\n }", "title": "" }, { "docid": "de90db832af0a5901a7d493f618f9ba2", "score": "0.6193957", "text": "public function getTagsAttribute($value){\n\t\t$rows=$this->relatedType($this->type.'_x_tag')->get();\n\n\t\treturn $rows->implode('title', ',');//pluck('title');\n\t}", "title": "" }, { "docid": "aeaf4d0b4a1760b0bd148b14c049be4f", "score": "0.61696553", "text": "public function getTags() {\n return $this->tags;\n }", "title": "" }, { "docid": "f2222856144ab7fc2021e87d8f5092f7", "score": "0.6151157", "text": "public function getStrings()\n {\n return $this->get(Properties::STRINGS);\n }", "title": "" }, { "docid": "281975a80fee9cb5bfcc066a30dc398a", "score": "0.61384517", "text": "public function getToString()\n {\n return $this->toString();\n }", "title": "" }, { "docid": "315eadb7168ec874c8a3240165b891db", "score": "0.61345303", "text": "public function __toString()\n {\n return (string) $this->value;\n }", "title": "" }, { "docid": "fe4ff4933f48a46ed5cab9085a6eb285", "score": "0.61311275", "text": "public function __toString()\n {\n return (string)$this->resource->getValue();\n }", "title": "" }, { "docid": "c1b6e2ba435f32f7db75d1723c5f3ae5", "score": "0.6107814", "text": "public function __toString()\n {\n return (string)$this->getValue();\n }", "title": "" }, { "docid": "86cef6927d58ce2876628ab915f394f9", "score": "0.61065215", "text": "public function __toString()\n {\n return (string) $this->value;\n }", "title": "" }, { "docid": "86cef6927d58ce2876628ab915f394f9", "score": "0.61065215", "text": "public function __toString()\n {\n return (string) $this->value;\n }", "title": "" }, { "docid": "0519edd9cb8fa571d825280b2b2cc282", "score": "0.60936946", "text": "public function getString(): string {\n return (string) $this->value;\n }", "title": "" }, { "docid": "d76338908f522699a38bac7b769bd275", "score": "0.60788685", "text": "public function tags($returnsArray=false)\n {\n $tags = $this->getValue('tags');\n if ($returnsArray) {\n if (empty($tags)) {\n return array();\n }\n return $tags;\n }\n\n if (empty($tags)) {\n return '';\n }\n // Return string with tags separated by comma.\n return implode(',', $tags);\n }", "title": "" }, { "docid": "9f392a8a73e91464bd8feac44e4f08d3", "score": "0.6067894", "text": "public function getTagDescriptionAttribute()\n {\n return $this->tags->pluck('description');\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.60655004", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "dd856c8cf4309f7d3fec2ad28cc7826e", "score": "0.60520464", "text": "public function __toString()\n {\n return (string)$this->value;\n }", "title": "" }, { "docid": "be66ee48af1b858bb09907451086ea42", "score": "0.6025554", "text": "public function __toString()\n {\n $eventManager = $this->getEventManager();\n $args = $eventManager->prepareArgs([\n 'string' => $this->dataType->toString($this),\n ]);\n $eventManager->trigger('rep.value.string', $this, $args);\n return $args['string'];\n }", "title": "" }, { "docid": "212657690cae1eac2dd81f278a8fd3e5", "score": "0.60213184", "text": "public function __toString()\n\t{\n\t\treturn (string) $this->get(FALSE);\n\t}", "title": "" }, { "docid": "44fe1127c845f94b7ff657039a26ae1b", "score": "0.6020712", "text": "public function __toString(): string\n {\n return (string) $this->value;\n }", "title": "" }, { "docid": "64d1f15c26b10e40ff2112837c59aeb6", "score": "0.60204476", "text": "public function get() {\n\t\treturn Prefix::tags($this->output);\n\t}", "title": "" }, { "docid": "28992636f9b642e9936678d202b5c5d5", "score": "0.6008509", "text": "public function getTags()\n {\n return $this->_tags;\n }", "title": "" }, { "docid": "605c543d9643abda98b9091351b143f9", "score": "0.6007211", "text": "public function __toString() {\n\t\treturn (string) $this->string;\n\t}", "title": "" }, { "docid": "f22860923b644d4ee6be01996f5c57f7", "score": "0.5997925", "text": "public function getTags() {\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "f22860923b644d4ee6be01996f5c57f7", "score": "0.5997925", "text": "public function getTags() {\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "057f6caed9a1c9b5f4ea24637689c1b6", "score": "0.59923273", "text": "public function get()\n {\n return $this->string;\n }", "title": "" }, { "docid": "02ea1a04420bf4fb9e97149875b05f95", "score": "0.59787947", "text": "public function asString();", "title": "" }, { "docid": "02ea1a04420bf4fb9e97149875b05f95", "score": "0.59787947", "text": "public function asString();", "title": "" }, { "docid": "5cc5e4f9cf13e7ec777bd1580247d51e", "score": "0.5962398", "text": "public function __toString()\n\t{\n\t\t$result = wp_json_encode($this->getData());\n\n\t\tif(!is_string($result))\n\t\t{\n\t\t\t$result = '';\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4d465a1ee5c45ad5801506a16b16e68e", "score": "0.5959004", "text": "public function getTagNameValue(): string\n\t{\n\t\t/** @noinspection PhpMultipleClassDeclarationsInspection */\n\t\t$name = parent::getTagNameValue();\n\t\t\n\t\tif( !str_ends_with( $name, ']' ) ) {\n\t\t\t$name .= '[]';\n\t\t}\n\t\t\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "6e40e6653d15e1a9fe5264b4e0b9239d", "score": "0.59547335", "text": "public function getTags() {\n return $this->definition['tags'];\n }", "title": "" }, { "docid": "2033b9f2ddd384b5d15878194798ed79", "score": "0.5934056", "text": "public function __toString()\n {\n return $this->string;\n }", "title": "" }, { "docid": "1509c59f05bac1b03ffbad7b6b15065f", "score": "0.59335893", "text": "public function __toString(): string\n {\n return (string)$this->value;\n }", "title": "" }, { "docid": "346d1610dead33eca6e31d9a8852428f", "score": "0.59328526", "text": "public function getNomeTagsAttribute()\n {\n $tags = implode(', ', $this->tags->pluck('name')->all());\n return $tags;\n }", "title": "" }, { "docid": "74b34bbcabc97b4aaeefbff878549040", "score": "0.5930994", "text": "public function getString()\n\t{\n\t\treturn new String($this->toString());\n\t}", "title": "" }, { "docid": "7f794fc5d9189ea46fe64ce3db78bb54", "score": "0.59304345", "text": "public function getTag() {\n\t\t$this->validate();\n\t\tif ($this->isError()) {\n\t\t\treturn $this->getError();\n\t\t} else {\n\t\t\tob_start();\n\t\t\t\t@Loader::element($this->getElementPath(), $this->getAllProperties());\n\t\t\t\t$tag = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn ($tag) ? $tag : $this->getLegacyTag();\n\t\t}\n\t}", "title": "" }, { "docid": "9a38cfdaaa83033d71851e3381beac40", "score": "0.59267086", "text": "protected function getTags() : array\n {\n $tags = $this->{static::$tagsField};\n \n\t\treturn Strings::explode($tags);\n }", "title": "" }, { "docid": "b9f6813464ed553b4a4f53f3a6adb4c2", "score": "0.5925254", "text": "public function __toString()\n {\n switch ($this->status) {\n case 'start':\n $text = FormTagHelper::start_form_tag($this->start_tag_attributes);\n break;\n case 'end':\n $text = FormTagHelper::end_form_tag();\n break;\n default:\n $text = '';\n break;\n }\n\n $this->status = null;\n\n return $text;\n }", "title": "" }, { "docid": "9659c5047ea6eecbc9c23e70af82d9d0", "score": "0.59203273", "text": "function serializeToString (){\t\t\r\n\t\treturn implode(\"#\",$this->properties);\r\n\t}", "title": "" }, { "docid": "dfb8cf97724aadd50b89e8c8fe0567b7", "score": "0.5909222", "text": "public function __toString(): string\n\t{\n\t\treturn $this->content->map(function ($item) {\n\t\t\tif (is_object($item) && $item->has('filename')) {\n\t\t\t\treturn $item->filename;\n\t\t\t}\n\t\t})->filter()->implode(',');\n\t}", "title": "" }, { "docid": "82426a283a96fbdb8be8f3ac1fa5bcbb", "score": "0.5905715", "text": "public function __toString(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "82426a283a96fbdb8be8f3ac1fa5bcbb", "score": "0.5905715", "text": "public function __toString(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "82426a283a96fbdb8be8f3ac1fa5bcbb", "score": "0.5905715", "text": "public function __toString(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f768d8249193cfb442e9b54da3104c7f", "score": "0.5891129", "text": "public function getTags(){\n $tags[]=$this->tag;\n $parent=$this->getParent();\n while($parent){\n $tags[]=$parent->getTag();\n $parent=$parent->getParent();\n \n }\n return implode('.',array_reverse($tags));\n }", "title": "" }, { "docid": "f846d89259444f6369865229f21b589d", "score": "0.5890473", "text": "protected function _getString() {\n\t\treturn json_encode($this->_getArray());\n\t}", "title": "" }, { "docid": "79a8273e0b9321ba35ff6f68399ba671", "score": "0.5880045", "text": "public function serialize()\n {\n return serialize([$this->tags, $this->versions, $this->cacheName]);\n }", "title": "" }, { "docid": "42dfc7367cac4889cecc954793004606", "score": "0.5878375", "text": "public function __toString()\n\t{\n\t\treturn $this->stringValue();\n\t}", "title": "" }, { "docid": "5cfeeed1858dff2cb3e79f9ffc980494", "score": "0.5872473", "text": "public function tags()\n {\n return ['single', $this->model_type.':'.$this->model_id];\n }", "title": "" }, { "docid": "4280d5f39dbdd1e1356e701ae6001c22", "score": "0.5868833", "text": "public function __toString(): string\n\t{\n\t\treturn $this->asRaw();\n\t}", "title": "" }, { "docid": "b293b1f9e9af6902edb867c4e7b9fc3c", "score": "0.586142", "text": "public function toString(): string\n\t{\n\t\treturn $this->meta;\n\t}", "title": "" }, { "docid": "acab48e26b6cbd84a87f9b3bb5da257d", "score": "0.58520573", "text": "public function __toString()\n {\n return (string) $this->slug;\n }", "title": "" }, { "docid": "96a9225691136236f403709af4aee6ca", "score": "0.58501965", "text": "public function __toString()\n\t{\n\t\treturn json_encode($this->value);\n\t}", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" }, { "docid": "fc0d5c6239a8ad686573ed643a5964b6", "score": "0.5849546", "text": "public function __toString()\n {\n return strval($this->__value);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "38566c3e9d2d97ebe739a96181717eb7", "score": "0.0", "text": "public function index()\n {\n $workers = Worker::all();\n $topWorkers = DB::select('CALL top_10_workers()');\n return View::make('worker.all', ['workers' => $workers,'topWorkers'=>$topWorkers,'category'=>2]);\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.73454344", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "2ecb35785c4b9e881de2de7a961178df", "score": "0.7216204", "text": "public function action_list(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "dad0a13a73bcf8293bb4d9e710796f56", "score": "0.7157767", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.71494645", "text": "function listAction()\n {\n $pageTitle = 'Golf listings';\n $listLinkStyle = 'current_page';\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n $golfRepository = new GolfRepository();\n $golfs = $golfRepository->getAll();\n\n require_once __DIR__ . '/../templates/list.php';\n }", "title": "" }, { "docid": "bd3a7b4e07a2548dae8d575849df412a", "score": "0.7130363", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.710266", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.70930976", "text": "public function index()\n {\n $className = $this->modelClass;\n $model = $className::orderby('created_at', 'desc')->paginate(10);\n \n return view('admin.listing')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('columns', $this->columns)\n ->with('urlName', $this->urlName)\n ->with('model', $model);\n }", "title": "" }, { "docid": "3e6e80d5cb774ecfe48382a53469b26e", "score": "0.70829386", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getContents();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tGlobals::doPaging($result, $page, $this->view); \n\t\t\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "4033d77018807de6b615c3ca97da7bef", "score": "0.70523685", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.7010042", "text": "public function index()\n {\n //get shows\n $shows = ShowsModel::paginate(10);\n\n return ShowsResource::collection($shows);\n }", "title": "" }, { "docid": "22e061b6e387c7871a6d54e088305a74", "score": "0.69801855", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966139", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6948928", "text": "public function list()\n {\n $flash = '';\n\n if(!empty($_SESSION['flash'])){\n $flash = $_SESSION['flash'];\n $_SESSION['flash'] = '';\n }\n\n # it will be populated\n $data = [];\n\n $bookInstance = new Book();\n $books = $bookInstance->select()->get();\n\n # fill data\n $data['flash'] = $flash;\n $data['books'] = $books;\n $data['loggedUser'] = $this->loggedUser;\n $data['url'] = Request::getUrl();\n\n $this->render('library', $data);\n }", "title": "" }, { "docid": "a74b64d14d05fcd4b8d8543c548d39b6", "score": "0.69425523", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.6905698", "text": "public function _index()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "836499ad8af32deefc4b356617470307", "score": "0.6899619", "text": "public function index()\n {\n return view('laramanager::entries.index.index')\n ->with('resource', $this->resource)\n ->with('entries', $this->entriesRepository->getList($this->resource));\n }", "title": "" }, { "docid": "378b941376864b0adca2a47f6d9cbc14", "score": "0.6898765", "text": "public function action_index(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "a657a499da3c1e94405a12a48a398286", "score": "0.6889014", "text": "public function action_list()\n\t{\n\t\t$recordings = Model_Recording::factory()\n\t\t\t->with('Quotes')\n\t\t\t->find_all();\n\n\t\t// Generate and output the view\n\t\t$content = View::factory('recording/list')\n\t\t\t\t ->set('recordings', $recordings);\n\t\t$template = View::factory('templates/default')\n\t\t\t\t\t->set('title', 'All recordings')\n\t\t\t\t\t->set('content', $content->render());\n\n\t\t$this->response->body($template->render());\n\t}", "title": "" }, { "docid": "b41517724d4cdbc80c63a80b966a7b01", "score": "0.68746614", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68608236", "text": "public function listAction() {\n $this->model->updateStatus();\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagecontrol.phtml');\n\n $where = '1 = 1';\n\n $filter = $this->_request->getParam('search');\n $this->view->filter = $filter;\n\n if ($filter == 'active') {\n $where = 'status = 0';\n } else if ($filter == 'disabled') {\n $where = 'status = 2';\n } else if ($filter == 'expired') {\n $where = 'status = 1';\n }\n\n $sort = $this->_request->getParam('sort');\n if (!$sort) {\n $sort = 'description';\n }\n\n if (!isset($this->session_sorting->sort)) {\n $this->session_sorting->sort = 0;\n }\n\n if ($this->session_sorting->sort == 0) {\n $this->session_sorting->sort = 1;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' desc'));\n } else {\n $this->session_sorting->sort = 0;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' asc'));\n }\n\n $paginator = Zend_Paginator::factory($data);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n $paginator->setItemCountPerPage(10);\n\n $this->view->page = $this->_getParam('page');\n $this->view->discounts = $paginator;\n }", "title": "" }, { "docid": "8ef49cf3a3eb21ff0a74662ea3579be6", "score": "0.68547213", "text": "public function index()\n {\n // Get cards\n $cards = Card::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of cards as a resource\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "6e9ab9b623d3bae20d9be7b36335891d", "score": "0.68502206", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68407434", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.6833471", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.68256605", "text": "public function list()\n {\n $shelves = Bookshelf::visible();\n\n return $this->apiListingResponse($shelves, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "755da2e01052312a756038c9d166d9cb", "score": "0.6794544", "text": "public function listAction() {\n $this->view->headTitle($this->view->translate('List of templates'), 'PREPEND');\n $templateModel = new Unisender_Model_UnisenderTemplate();\n $this->view->template_list = $templateModel->getAll();\n }", "title": "" }, { "docid": "d05cc4d736f09bef3c6bdf24844ac8c6", "score": "0.67895305", "text": "public function index()\n\t{\n\t\t$artists = Artist::paginate(100);\n\n\t\treturn $this->respond([\n\t\t\t'data' => $this->artistTransformer->transformCollection($artists->all())\n\t\t]);\n\t}", "title": "" }, { "docid": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.6786343", "text": "public function actionIndex()\n {\n $this->layout = '@backend/views/layouts/list';\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews()\n ]);\n }", "title": "" }, { "docid": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.67860115", "text": "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'itemscanner',\n 'datatable' => new ItemScannerDatatable(),\n 'title' => mtrans('itemscanner', 'itemscanner_list'),\n ]);\n }", "title": "" }, { "docid": "487c93a93f48c83d96a649e03fdb104d", "score": "0.6774347", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6763496", "text": "public function __list()\r\n {\r\n $current = SamsonLocale::current();\r\n\r\n $default = 'ru';\r\n\r\n if (defined('DEFAULT_LOCALE')){\r\n $default = DEFAULT_LOCALE;\r\n }\r\n\r\n // Render all available locales\r\n $html = '';\r\n foreach (SamsonLocale::get() as $locale) {\r\n if ($current != $default) {\r\n $urlText = substr(url()->text,strlen($current)+1);\r\n } else {\r\n $urlText = url()->text;\r\n }\r\n if ($locale == $default) {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$urlText;\r\n } else {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$locale.'/'.$urlText;\r\n }\r\n\t $localeName = '';\r\n\t if ($this->isLocaleLinkText) {\r\n\t\t $localeName = $this->translate($locale, $current);\r\n\t }\r\n $html .= $this->view('list/item')\r\n ->css(self::CSS_PREFIX)\r\n ->locale($locale == SamsonLocale::DEF && SamsonLocale::DEF == ''? 'def' : $locale)\r\n ->active($locale == $current ? self::CSS_PREFIX.'active':'')\r\n ->url($url)\r\n\t ->name($localeName)\r\n ->output();\r\n }\r\n\r\n // Set locale list view\r\n $this->view('list/index')->locale($current)->css(self::CSS_PREFIX)->items($html);\r\n }", "title": "" }, { "docid": "9574508ae15a68d9552788d66f6069d4", "score": "0.67439693", "text": "public function all()\n\t{\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\t\n\t\t\n\t\t$this->template->recipes = $recipes;\n\t\t$this->template->display('list.html.php');\n\t}", "title": "" }, { "docid": "e1224469d7f8380d5b96958c49bfc327", "score": "0.67368996", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.6728091", "text": "public function index()\n {\n $user = $this->userContract->findWith(request()->user()->id, ['profile']);\n $resources = $this->resourceContract->getResourcesOrdered();\n $trashed = $this->resourceContract->getTrashedResourcesOrdered();\n\n return view('backend.resources.index', compact('user', 'resources', 'trashed'));\n }", "title": "" }, { "docid": "2422a439354b2d9d0c8e13222d75b791", "score": "0.67135084", "text": "public function indexAction()\r\n {\r\n \t$this->openApi->getItems();\r\n $this->view->data = $this->openApi->getDataResponse();\r\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": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.669245", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Reviews list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the reviews.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/reviews/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Reviews::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "a90256f37c65707c557ad75ce4efde1a", "score": "0.66915387", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.66879165", "text": "public function listAction(){\n\t\t//Passes values from the Todo Mysql table into the $todos value\n\t\t$todos = $this->getDoctrine()\n\t\t\t\t\t ->getRepository('AppBundle:Todo')\n\t\t\t\t\t ->findAll();\n\t\t//Loading the todo view in here...\n return $this->render('todo/index.html.twig', array(\n\t\t\t'todos' => $todos\n\t\t));\n }", "title": "" }, { "docid": "1a9cb6255c77fe1bff8fb9d77615f930", "score": "0.66870624", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.6683523", "text": "public function action_list() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n try {\n $resp = $this->listStuff($params, $user);\n } catch (Exception $exc) {\n return $this->_error_response($exc->getMessage());\n }\n \n // Set the output\n $data = array('data' => array('offers' => $resp[\"all_offers\"]), 'meta' => $resp[\"meta\"]);\n $this->response($data);\n\t}", "title": "" }, { "docid": "5a18d2c52cb259d958c945d4d6a9ea33", "score": "0.6676733", "text": "public function listAction()\n {\n $task = new Task($this->config);\n $tasks = $task->getAll();\n $amountOfTasks = $task->getAmountTasks();\n \n // load views.\n $this->view('task/list', [\n 'tasks' => $tasks,\n 'amountOfTasks' => $amountOfTasks\n ]);\n }", "title": "" }, { "docid": "fb257c74bec9eb0cfbe648823975e645", "score": "0.6653098", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.66470236", "text": "public function listAction()\n {\n try {\n $cd = $this->currentFolder();\n return new ViewModel(array(\n 'currentFolder' => $cd,\n 'seperator' => $this->seperator,\n 'entries' => $this->directoryContent($this->getEntity(), $cd)\n ));\n } catch (\\Exception $e) {\n echo Json::encode(array(\n 'error' => $e->getCode()\n ));\n exit();\n }\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.66406596", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.6639121", "text": "public function index()\n {\n if ($ref = \\Request::get('getRef')) {\n return $this->getRef($ref);\n }\n\n $per_page = \\Request::get('perPage');\n $data = $this->repository->paginate($per_page);\n\n return $this->sendSuccess($data, __('api.success_list', ['name' => $this->name]));\n }", "title": "" }, { "docid": "aa0d5690d16cbfb9dc97e701071da2f2", "score": "0.6637484", "text": "public function listAction() {\n $imageService = $this->container->get(\"dft_foapi.image\");\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $imageService->fetchAll(\n $this->getAuthenticatedUserIdAndSubAccountIds()\n )\n )\n );\n }", "title": "" }, { "docid": "479fb582c4dbcbc65e4bb28c2bb3a697", "score": "0.66345435", "text": "public function list()\n {\n // and this sorting and paging logics must be in separate components\n // but for our case ... ))\n $sortTypes = ['author', 'email', 'done', 'author DESC', 'email DESC', 'done DESC'];\n $sort = input('sort', null);\n if ($sort && in_array($sort, $sortTypes)) {\n $sortSql = \" ORDER BY {$sort} \";\n } else {\n $sortSql = '';\n }\n $offset = (int) input('offset', 0);\n $offsetSql = \" LIMIT {$offset}, \" . static::PER_PAGE;\n $sql = '1 ' . $sortSql . $offsetSql;\n $todos = R::findAll('todo', $sql);\n $total = R::count('todo');\n\n //paging\n $next = false;\n $prev = false;\n\n if ($total > $offset + static::PER_PAGE) {\n $next = $offset + static::PER_PAGE;\n }\n\n if ($offset !== 0) {\n $prev = $offset - static::PER_PAGE;\n }\n\n //sorting\n $sortings = [];\n foreach (['author', 'email', 'done'] as $sortAttribute) {\n if (strpos($sort, $sortAttribute) !== false && $sort === $sortAttribute) {\n $sortings[$sortAttribute] = \"{$sortAttribute} DESC\";\n } else {\n $sortings[$sortAttribute] = $sortAttribute;\n }\n }\n\n return $this->render('list', compact('todos', 'next', 'prev', 'sortings', 'total'));\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.662934", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.6628069", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.6623293", "text": "public function index()\n {\n $listings = $this->listing->latest()->paginate(50);\n\n return view('admin.listings.index', compact('listings'));\n }", "title": "" }, { "docid": "7c0e8a5f42c42d1c4f18968bb494ad0e", "score": "0.6621373", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6619698", "text": "public function listings() {\r\n $data = $this->model->getData();\r\n $this->template->data = $data;\r\n $this->set('general/list');\r\n }", "title": "" }, { "docid": "3e2ce9e0dce5419c500b0a60774b7605", "score": "0.6616485", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.6612557", "text": "public function actionIndex()\n {\n $searchModel = new ListingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "67562fbc2bb858bc588d4a91237cb673", "score": "0.6603778", "text": "function index() {\r\n\t\t// Getting the whole list\r\n\t\t$itemList = $this->model->find('all');\r\n\r\n\t\t$this->set('itemList', $itemList);\r\n\t}", "title": "" }, { "docid": "8ec8da14e071283716d59393a382ab24", "score": "0.65982807", "text": "public function listAction()\n {\n\t\t$identity = Zend_Auth::getInstance()->getIdentity();\n\t\n\t\t// if identity and user aren't the same identity, add an entry to the identityBoard (menu )\n\t\tif( $identity->id != $this->_user->id ){\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/documents/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'userDocumentList' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin entry-selected'\n\t\t\t));\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/gexf/entities/user/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'gexf' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin'\n\t\t\t));\n\n\t\t}\n\t\t$this->view->dock = new Application_Model_Ui_Docks_Dock();\n\t\t\n\t\t$this->view->dock->addCraft( new Application_Model_Ui_Crafts_Cargo( 'documents', I18n_Json::get( 'documentsList' ).\": \".$this->_user->username ) );\n\t\t\n\t\t$totalDocuments = Application_Model_DocumentsMapper::getNumberOfDocuments( $this->_user ); \n\t\t\n\t\t// no documents? send directly to upload, with a link, and stop this script\n\t\tif( $totalDocuments == 0 ){\n\t\t\t\n\t\t\t// draw nice upload link \"start uploading file!\" and welcome message as well\n\t\t\t$this->view->dock->documents->setHeader( new Ui_Crafts_Headers_Welcome( $this->_user ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// remove menu items\n\t\t\tUi_Board::getInstance( \"Documents\", array( 'user' => $this->_user ) )->removeItem(\n\t\t\t\t\"documents.import-tags\", \n\t\t\t\t\"documents.export-tags\",\n\t\t\t\t\"api.reset\"\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->render( 'index');\n\t\t}\n\t\t\n\t\t// start listening to request filter, or default vars here\n\t\t// values and their validators\n\t\tDnst_Filter::start( array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"limit\" => 100,\n\t\t\t\t\"order\" => array( \"mimetype DESC\" ),\n\t\t\t\t\"tags\"\t => array(),\n\t\t\t\t\"query\" => \"\",\n\t\t\t\t\"date_start\"=>\"\",\n\t\t\t\t\"date_end\" =>\"\"\n\t\t\t), array (\n\t\t\t\t\"order\" => new Dnst_Filter_Validator_Array( array(\n\t\t\t\t\t\"id_document DESC\", \"id_document ASC\",\n\t\t\t\t\t\"title ASC\", \"title DESC\", \"date ASC\", \"date DESC\",\"`ignore` DESC\", \"`ignore` ASC\",\n\t\t\t\t\t\"status ASC\", \"status DESC\",\n\t\t\t\t\t\"language ASC\", \"language DESC\", \"mimetype ASC\", \"mimetype DESC\",\n\t\t\t\t)),\n\t\t\t\t\"offset\" => new Dnst_Filter_Validator_Range( 0, 10000000 ),\n\t\t\t\t\"limit\" => new Dnst_Filter_Validator_Range( 1, 500 ),\n\t\t\t\t\"query\" => new Dnst_Filter_Validator_Pattern( 0, 100 )\n\t\t\t)\n\t\t);\n\t\t\n\t\tif( !Dnst_Filter::isValid() ){\n\t\t\t// if you set the filters properly, then these variables MUST be in place\n\t\t\tAnta_Core::setError(\"uhm..not valid string..\".Dnst_Filter::getErrors() );\n\t\t\treturn $this->render( 'index' );\n\t\t}\n\t\t// print_r( Dnst_Filter::read() );\n\t\t// get all the documents\n\t\t$documents = Application_Model_DocumentsMapper::select(\n\t\t\t$this->_user,\n\t\t\tDnst_Filter::read()\n\t\t);\n\t\t// send some variables to the view\n\t\t$this->view->totalItems = $documents->totalItems;\n\t\t$this->view->loadedItems = count( $documents->results );\n\t\t\n\t\t// query to group documents by month according to number of groups\n\t\t$stmt = Anta_Core::mysqli()->query(\"\n\t\t\tSELECT COUNT(*) as countable, DATE_FORMAT(date,'%d.%m.%Y') as simple_date FROM anta_{$this->_user->username}.`documents` GROUP BY (`simple_date`)\"\n\t\t);\n\t\t$timestamps = array();\n\t\twhile ( $row = $stmt->fetchObject() ){\n\t\t\t$timestamps[] =\tnew Ui_D3_Timeline_Point( \n\t\t\t\t$row->simple_date, \n\t\t\t\tarray( \n\t\t\t\t\t\"y\" => $row->countable,\n\t\t\t\t\t\"title\" => $row->simple_date .\" (\".$row->countable.\")\",\n\t\t\t\t\t\"href\" => $_SERVER['REFERRER_URI'].'?'.Dnst_Filter::setProperty( 'date_start', $row->simple_date )\n\t\t\t\t) \n\t\t\t);\t\n\t\t}\n\t\t\n\t\t// prepare headers\n\t\t$header = new Anta_Ui_Header_Documents();\n\t\t$header->user = $this->_user;\n\t\t$header->loadedItems = count( $documents->results );\n\t\t$header->totalItems = $documents->totalItems;\n\t\t$header->offset = Dnst_Filter::getProperty( \"offset\" );\n\t\t$header->limit = Dnst_Filter::getProperty( \"limit\" );\n\t\t$header->searchQuery = Dnst_Filter::getProperty( \"query\" );\n\t\t$header->setTimeline( new Ui_D3_Timeline( \n\t\t\t$timestamps, \"dd.mm.yy\", \n\t\t\tarray( \"width\"=>832, \"height\"=>40)\n\t\t));\n\t\t\n\t\t$this->view->dock->documents->setHeader( \n\t\t\t$header\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tforeach (array_keys( $documents->results ) as $k ){\n\t\t\t$this->view->dock->documents->addItem( new Anta_Ui_Item_Document( $documents->results[ $k ] ) );\n\t\t}\n\t\t\n\t\t$this->render( 'index' );\n\t\t\n }", "title": "" }, { "docid": "51ab41ffa64c6b6b7fbb813516203da1", "score": "0.6593938", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.659177", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin')){\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find()->where(['size'=>0]),\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n else{\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find(),\n ]);\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ccecdc5f92158721af216deee02beaf2", "score": "0.65850216", "text": "public function action_index() \n\t{\n\t\t$this->rest_output(array(\n\t\t\t'GET example!', \n\t\t));\n\t}", "title": "" }, { "docid": "c971fcbed7a0406b3764b8ecdb481920", "score": "0.6572927", "text": "protected function listAction()\r\n {\r\n $contentUid = $this->configurationManager->getContentObject()->data['uid'];\r\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\r\n if (!isset($configuration['view']['pluginNamespace'])) {\r\n $configuration['view']['pluginNamespace'] = 'tx_ameosfilemanager_fe_filemanager';\r\n }\r\n\r\n $this->settings['columnsTable'] = explode(',', $this->settings['columnsTable']);\r\n $this->settings['actionDetail'] = explode(',', $this->settings['actionDetail']);\r\n $this->view->assign('settings', $this->settings);\r\n\r\n $args = $this->request->getArguments();\r\n $t = $this->fileRepository->findBySearchCriterias($args, $this->settings['startFolder'], $configuration['view']['pluginNamespace'], $this->settings['recursion']);\r\n $this->view->assign('files', $t);\r\n $this->view->assign('value', $args); \r\n $this->view->assign('content_uid', $contentUid);\r\n\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'\r\n && $contentUid == GeneralUtility::_POST('ameos_filemanager_content')) {\r\n header('Content-Type: text/json; charset=utf8;');\r\n echo json_encode(['html' => $this->view->render()]);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "ef4fec830260d9dfb3f1e7e325eac9e0", "score": "0.6572855", "text": "public function actionList()\n {\n $products = new ActiveDataProvider([\n 'query' => Product::find(),\n 'pagination' => [\n 'pageSize' => 10\n ]\n ]);\n return $this->render('list', ['products' => $products]);\n }", "title": "" }, { "docid": "9500e1733deedb51878d2d909f31751a", "score": "0.65667915", "text": "public function actionList()\r\n {\r\n $objectClassId = $this->_input->filterSingle('object_class_id', XenForo_Input::STRING);\r\n $class = $this->_getClassOrError($objectClassId);\r\n\r\n $objectModel = $this->_getObjectModel();\r\n\r\n $objects = $objectModel->getObjects(array(\r\n 'object_class_id' => $objectClassId\r\n ));\r\n\r\n $viewParams = array(\r\n 'class' => $class,\r\n 'objects' => $objects\r\n );\r\n\r\n return $this->responseView('ThemeHouse_Objects_ViewAdmin_Object_List', 'object_list', $viewParams);\r\n }", "title": "" }, { "docid": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.6566177", "text": "public function index(Request $request)\n {\n $this->checkRole();\n\n //\tGet all records of the model and set default ordering\n $builder = $this->model('orderBy', $request->orderby ?: ((property_exists($this, 'list_order_by')) ? $this->list_order_by : 'name'), $request->order ?: ((property_exists($this, 'list_order')) ? $this->list_order : 'desc'));\n\n //\tRetrieve the fields which will be used in records table\n $fields = new RenderList($this->getFieldsForList());\n\n // Handle list search\n if ($request->has('s')) {\n $builder->where($this->list_search_on, 'LIKE', '%' . $request->s . '%');\n }\n\n // Handle list filtering\n if ($request->has('filter') && $request->has('set')) {\n $builder->where($request->filter, $request->set);\n }\n\n // Move $builder to $records with default paging of 40 p/p\n $records = $builder->paginate(40);\n\n //\tLoad the view\n return view('crud::templates.index', $this->parseViewData(compact('records', 'fields')));\n }", "title": "" }, { "docid": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.65648544", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_FilmMapper();\n $film = new Application_Model_Film();\n $film = $mapper->obtenirAllFilms();\n\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($film);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "ea842597a9d8fad1df58d74c6b12ab97", "score": "0.6560148", "text": "public function index()\n {\n $statuses = Status::all();\n $statuses->transformer = StatusCollection::class;\n return $this->showAll($statuses);\n }", "title": "" }, { "docid": "9854a8a0b5996147689b1cfb93901fba", "score": "0.65570813", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.6532946", "text": "public function index()\n {\n $this->initialiseRequest();\n $items = $this->queryRepository->all();\n if (!$items) {\n return $this->apiManager->respondNotFound('Items do not exist.');\n }\n $itemsResource = new Collection($items, $this->transformer);\n $processedItems = $this->fractalManager->createData($itemsResource)->toArray();\n return $this->apiManager->respond($processedItems);\n }", "title": "" }, { "docid": "47bc2129e22deb7b10f9cd1b3ca97140", "score": "0.65329", "text": "public function index()\n {\n\n if ($this->model->count() <> 0) {\n return $this->resource::collection($this->model);\n }\n return Response::json([\n 'error' => 'Record not found'\n ], 404);\n\n }", "title": "" }, { "docid": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6529856", "text": "public function index()\n {\n $questions = Question::pimp()->paginate();\n\n QuestionResource::collection($questions);\n\n return $this->sendResponse(compact('questions'));\n }", "title": "" }, { "docid": "289c02bb55888cea68db6bb293329f8b", "score": "0.65295684", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n /** @var \\Symfony\\Component\\HttpFoundation\\Request $request */\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n /** @var \\Sonata\\MediaBundle\\Provider\\Pool $mediaPool */\n $mediaPool = $this->container->get('sonata.media.pool');\n\n $contexts = $mediaPool->getContexts();\n\n reset($contexts);\n $contextName = key($contexts);\n $datagrid = $this->admin->getDatagrid($request->get('context', $contextName));\n $datagrid->setValue('context', null, $this->admin->getPersistentParameter('context'));\n\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n return $this->render(\n $this->admin->getTemplate('list'),\n array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n )\n );\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "cc3607ce8a88164b64b1133094816f12", "score": "0.6522748", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->name . ' --> ' : '') . $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": "cdc6c11bca5c8d643c1f6a1a0d80d23d", "score": "0.65212315", "text": "public function indexAction()\r\n {\r\n $this->parseRequestForPager();\r\n\r\n $pager = $this->getPager();\r\n $form = $this->getFilterForm()->createView();\r\n\r\n $result = array(\r\n 'list' => $this->getList($pager),\r\n 'pager' => $this->getPagination($pager),\r\n 'filters' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.65188295", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "3f1eb8293a667a2878f4d80d96280084", "score": "0.6518673", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.65124106", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.6507357", "text": "public function index()\n {\n\n // Get articles\n $chairs = Chair::paginate(15);\n\n // Return collection of articles as a resource\n return ChairResource::collection($chairs);\n\n }", "title": "" }, { "docid": "22fb95b3636c2f407abebe88d13d8888", "score": "0.6505021", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.64993095", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.64936584", "text": "public function listAction()\n\t{\n\t\t$asResponse = array();\n\t\t$client = new Zend_Http_Client($this->ssUri.'/list');\n\t\t$client->setParameterGet(array('bIsRest' => true));\n\t\t$client->setConfig(array('timeout' => 30));\n\t\t$ssResponse = $client->request('GET');\n\t\t\n\t\tif($ssResponse->isSuccessful())\n\t\t{\n\t\t\t$ssResponseBody = $ssResponse->getBody();\n\t\t\t$asResponse = Zend_Json_Decoder::decode($ssResponseBody,Zend_Json::TYPE_ARRAY);\n\t\t}\n\t\t$this->view->users = $asResponse;\n\t}", "title": "" }, { "docid": "516498e2faf9e3833f4a0c0889c0d1a6", "score": "0.64926285", "text": "public function index()\n {\n $this->authorize('index', Category::class);\n\n return CategoryResource::collection(Category::paginate(15));\n }", "title": "" }, { "docid": "baeb75c01b41d5a02e946acdd0870ae9", "score": "0.6491589", "text": "public function showBooksAction()\n {\n $result = $this->model->getBooks();\n // Get params of books and pagination\n $data = $result[0];\n $pagination_params = $result[1];\n\n $this->view->render('List of books', $data, $pagination_params);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.648616", "text": "public function actionIndex()\r\n {\r\n $dataProvider = $this->getIndex('api/books', 'app\\models\\Book');\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider\r\n ]);\r\n }", "title": "" }, { "docid": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.64843917", "text": "public function index()\n {\n $data = GuestResource::collection(\n $this->guest->paginate(request()->per_page)\n );\n\n if (! $data) {\n return response()->json([\n 'message' => 'Failed to retrieve resource'\n ], 400);\n }\n\n return $data;\n }", "title": "" }, { "docid": "64c5cb71d29bff854bd1d4c026363eb2", "score": "0.6484192", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6481522", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.648076", "text": "public function index()\n {\n // Get articles\n $trackings = Tracking::paginate(10);\n\n // Return\n return BackendResource::collection($trackings);\n }", "title": "" }, { "docid": "90f607a4b7e80fdd2bcd6f3ce3d9959e", "score": "0.6477766", "text": "public function index()\n {\n $perPage = request('perPage', 10);\n $products = Product::paginate($perPage);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "59002099eafa8643a05ba19fcbd9fedd", "score": "0.6477562", "text": "public function index()\n {\n //\n $items = Item::orderBy('id')->paginate(10);\n \n return view('manage.item.items_list', compact('items'));\n \n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6474707", "text": "public function index()\n {\n $people = QueryBuilder::for(Person::class)\n ->defaultSort('created_at')\n ->allowedSorts([\n 'created_at'\n ])\n ->paginate(10)\n ->appends(request()->query());\n\n return PersonResource::collection($people);\n }", "title": "" }, { "docid": "974e723cf42c91c850116aa22b80f587", "score": "0.6472995", "text": "public function index()\n {\n //\n $parent_details = \\App\\ParentDetail::orderBy('id', 'desc')->paginate(10);\n return ParentDetailResource::collection($parent_details);\n }", "title": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.64697886", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->_getResponseFormatter()->get($datas);\n\t}", "title": "" }, { "docid": "85336711eddcf6c317cce3da86408817", "score": "0.6469765", "text": "public function actionList()\n {\n $users = User::find()\n ->orderBy('id')\n ->all();\n if (count($users)) {\n $separator = sprintf(self::LIST_FORMAT_SEP.PHP_EOL, str_repeat('-', 10), str_repeat('-', 22), str_repeat('-', 9), str_repeat('-', 32), str_repeat('-', 42));\n echo $separator;\n printf(self::LIST_FORMAT_HEADER.PHP_EOL, 'id', 'username', 'status', 'fullname', 'email');\n echo $separator;\n foreach ($users as $user) {\n printf(self::LIST_FORMAT_LINE.PHP_EOL, $user->id, $user->username, $this->statusMap[$user->status], $user->fullname, $user->email);\n }\n echo $separator;\n }\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" }, { "docid": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.64675385", "text": "public function index(Request $request)\n {\n $this->authorize('listing', [$this->authorizedModel]);\n\n return response(\n $this->obj->getAll(\n ($request->has('limit') ? $request->input('limit') : 0),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "18f743355343ec551730ab1963a2c90e", "score": "0.0", "text": "public function update(SizesRequest $request, $size)\n {\n $file = $request->file('images');\n $inputs = $request->all();\n $size=Sizes::find($size);\n\n if($file) {\n $inputs['images'] = $this->uploadImages($request->file('images'),'size',[\"920-380\" , \"600\" , \"920\"]);\n } else {\n $inputs['images'] = $size->images;\n }\n $inputs[\"title\"]=MyProvider::_insert_text($inputs,'title');\n $inputs[\"body\"]=MyProvider::_insert_text($inputs,'body');\n\n $size->update($inputs);\n\n return redirect(route('size.index',['SID' => '204']));\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7658553", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "d6a508508d13bb02f2a247e9bf196f78", "score": "0.71877676", "text": "function update ( $id, $resource ) {\r\n\r\n }", "title": "" }, { "docid": "8466495927f3bd478b5fd2d917f45f08", "score": "0.7099208", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9a55d4f96f94897978c13d34337c1901", "score": "0.6808637", "text": "public function update(StoreResource $request, $id)\n {\n $input = $request->all();\n \n $resource = Resource::find($id);\n \n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n return redirect('resources');\n }", "title": "" }, { "docid": "cce47cfb911f4e7678d10bb61eec6271", "score": "0.6523108", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n \n $resource->update($request->except(['_method', '_token']));\n \n flash('El recurso fue actualizado');\n \n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "1414dc19f0f4ccb3b9d9b0c2f9754c1a", "score": "0.64248925", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $storage->update($request->all());\n\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "8b641f5e241101e64f479c764289bfd7", "score": "0.64144814", "text": "public function update(Request $request, Resource $resource)\n {\n\n try {\n $this->validate($request, [\n 'name' => 'required|string|unique:resources,name,' . $resource->id,\n 'group' => 'required|exists:groups,id',\n \"description\" => \"nullable|string\"\n ]);\n $resource->name = $request->name;\n $resource->group_id = $request->group;\n $resource->description = $request->description;\n $resource->save();\n session()->flash('flash_success', 'Updated Successfully.');\n return Redirect::route('resources.index');\n } catch (ValidationException $exception) {\n return Redirect::back()->withErrors($exception->errors())->withInput();\n } catch (Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return $e->getMessage();\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "d131fb800138c5d8889803afda8ecf7b", "score": "0.62923384", "text": "public function updateResource(){\n\t\t$this->setTitle('Update resource');\n $this->name = $_POST['name'];\n $this->id = $_POST['resource_id'];\n $this->rate = $_POST['rate'];\n $this->description = $_POST['description'];\n $this->type = $_POST['type'];\n $this->loadModel('resource');\n\t\t$this->added_resource = $this->model->updateResources($this->id,$this->name,$this->rate,$this->description,$this->type);\n $this->render('resource/_bewerkt.tpl');\n\t}", "title": "" }, { "docid": "6644414d1c8deb86d17216b9f77e38da", "score": "0.62589455", "text": "public function updateStream($path, $resource, $config = null);", "title": "" }, { "docid": "35958bbf8b0dca0d5dcadddf00962ef1", "score": "0.6193939", "text": "public function update() {\n \t\t//Does the Resource object have an id?\n if ( is_null( $this->id ) ) trigger_error (\"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n\t\t//Update the Resource\n $conn = new mysqli( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME );\n $sql = \"UPDATE resources SET title=:?, summary=?, url=?, content=?, category=?, is_free=?, is_featured=?, is_favorite=?, date_created=? WHERE id = ?\";\n $st = $conn->prepare ( $sql );\n $st->bind_param( 'sssssiiisi', $this->title, $this->summary, $this->url, $this->content, $this->category, $this->is_free, $this->is_featured, $this->is_favorite, date(\"Y-m-d H:i:s\"), $this->id );\n\n $st->execute();\n $conn = null;\n}", "title": "" }, { "docid": "27fdfad09c0210d824e7b3fabe4e253e", "score": "0.6178334", "text": "public function update(Request $request, $id)\n {\n // if(Auth::user()->admin){\n $storage = Storage::findOrFail($id);\n $storage->name = $request->name;\n $storage->address = $request->address;\n $storage->save();\n Session::flash('success','You successfully updated storage!');\n// }\n// else{\n// Session::flash('error','You do not have enough permission!');\n// }\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "a25688f30a6b62a181559b84d042105c", "score": "0.6148197", "text": "public function update(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $resource->load($this->with);\n\n $this->form()->setModel($resource)->save(function($data,$form) use (&$resource){\n $general = $data->pull('general'); \n $relations = $data->get('relations');\n\n $admin = \\Auth::guard('admin')->user();\n \n $resource->forceFill($general->toArray()); \n\n $this->event('updating', $resource); \n\n $resource->save(); \n\n $this->syncRelations($relations, $resource); \n\n $this->event('updated', $resource); \n\n return $resource;\n }); \n\n $this->checkOwner($resource);\n\n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "9a5dcd97258a1dde56734d3bfd713b95", "score": "0.6116463", "text": "public function updateResource(Request $request, $id)\n {\n $validatedData = $request->validate(\n [\n 'title' => 'required',\n 'description' => 'required',\n 'uploadedfile' => 'mimes:flv,mp4,avi,wmv,3gp,mov,mkv,vob'\n ],\n [\n 'title.required' => 'Please enter video title.',\n 'description.required' => 'Please enter description.',\n 'uploadedfile.mimes' => 'Video format not supported.'\n ]\n );\n\n if($file = $request->hasFile('uploadedfile')) {\n \n $file = $request->file('uploadedfile') ; \n $fileName = $file->getClientOriginalName() ;\n $destinationPath = public_path().'/storage/resource' ;\n $file->move($destinationPath,$fileName);\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description,\n 'url' => $fileName\n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n \n } else {\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description \n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n\n }\n\n }", "title": "" }, { "docid": "7bfce29a195f384d1bcc21b603c792d2", "score": "0.6033452", "text": "public function update(Request $request, $id){\n\n $this->validate($request, $this->getValidationRules($request), $this->getValidationMessages($request));\n \n if($request->file('image')){\n $rules = [\n 'image' => 'image|mimes:jpg,jpeg,png'\n ];\n\n $this->validate($request, $rules);\n }\n\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $this->setResource($resource, $request);\n \n $resource->spaces()->detach();\n $resource->spaces()->attach($request->spaces);\n\n return redirect()->route('resources.index')\n ->with('session_msg', '¡El recurso, se ha editado correctamente!');\n }", "title": "" }, { "docid": "88d2a1e76ebbaa8bd165532adff21092", "score": "0.6013595", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $resource = Resource::where('product_id', $id)->first();\n\n $this->validate(request(), [\n 'category_id' => 'required',\n 'name' => 'required',\n 'short_name' => 'required',\n// 'article' => 'required',\n 'price' => 'required',\n 'collection_id' => 'required',\n 'atribut_id' => 'required',\n ]);\n\n $product->category_id = $request->get('category_id');\n $product->name = $request->get('name');\n $product->short_name = $request->get('short_name');\n// $product->article = $request->get('article');\n $product->price = $request->get('price');\n $product->collection_id = $request->get('collection_id');\n $product->atribut_id = $request->get('atribut_id');\n\n $method = __METHOD__;\n LogFile::ProductLog($product, $method);\n $product->save(); //Сохраняем изменения продукта\n\n return redirect('admin/products')->with('update', 'Продукт обновлен');\n }", "title": "" }, { "docid": "9349dc7f33c6326d0383abd536af6ce3", "score": "0.596908", "text": "public function updated(\n $resource = null,\n array $links = [],\n $meta = null,\n array $headers = []\n ): Response {\n return $this->getResourceResponse($resource, $links, $meta, $headers);\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.59593076", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "215d42ed153b26bc9b49ae5c5951d499", "score": "0.5955367", "text": "public function update(StoragesUpdateRequest $request, $id)\n {\n $now = \\Carbon\\Carbon::now();\n $storage = Storage::find($id);\n $by_id = Auth::user()->id;\n\n $storage->fill([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'deleted_at' => $request->deleted_at === \"1\" ? $now : null,\n 'reason' => $request->reason,\n 'updated_by' => $by_id,\n ])\n ->save();\n\n return redirect()->route('storages.show', $storage->id)->with('information', 'レコードを更新しました。');\n }", "title": "" }, { "docid": "da49ecf5dc35b8e5edb8b21644469290", "score": "0.5939757", "text": "public function update(RespondentStoreRequest $request, $id)\n {}", "title": "" }, { "docid": "b96bbe109f16f366cfd72892d0d0be64", "score": "0.5903822", "text": "public function update(Request $Request, Resource $Resource)\n {\n\t\t\t$Actions = ($Request->actions)?:[1];\n\t\t\t$Action = \"0.\" . implode(\"\",array_replace(array_fill(1,max($Actions),0),array_fill_keys($Actions,1)));\n\t\t\t$Request->action = $Action;\n\t\t\t$UpdateArray = []; $Rules = Resource::ValidationRules(); $MyRules = [];\n\t\t\tforeach($Resource->FillableFields() as $Field){\n\t\t\t\tif($Field == \"code\") continue;\n\t\t\t\tif($Request->$Field != $Resource->$Field){\n\t\t\t\t\t$Resource->$Field = $UpdateArray[$Field] = $Request->$Field;\n\t\t\t\t\tif(isset($Rules[$Field])) $MyRules[$Field] = $Rules[$Field];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($UpdateArray)) return redirect()->back()->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"No fields to update.\"]);\n\t\t\t$Validator = Validator::make($UpdateArray,$MyRules,Resource::ValidationMessages());\n\t\t\tif($Validator->fails()) return redirect()->back()->withErrors($Validator);\n\t\t\tif($Resource->status == \"ACTIVE\" && $Resource->save()) return redirect()->route('resource.index')->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"The Resource: \" . $Resource->displayname . \", updated successfully\"]);\n\t\t\treturn view(\"resource.error\");\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f78906153226222ee5bdfc9d13a06d23", "score": "0.58857", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->collection->update(array('public_id' => $resource['public_id']), $resource, array('upsert' => TRUE));\n }\n }", "title": "" }, { "docid": "99960e81f0d443f90e5e0aa954abd481", "score": "0.5885372", "text": "public function update($id, Request $request) {\n $this->validate($request, isset($this->model->rules_update) ? $this->model->rules_update : $this->model->rules);\n\n ${$this->resource} = $this->model->findOrFail($id);\n\n $fillable_data = array_only($request->all(), $this->model->getFillable());\n\n App::setLocale(Helpers::getLang());\n\n ${$this->resource}->update($fillable_data);\n\n Admin::handleFileUpload('image', ${$this->resource}, 'image');\n\n return Redirect::route($this->view_path . '.index')->with('success', 'yeah');\n }", "title": "" }, { "docid": "a516665e3766b23c94ab33c5940aab8d", "score": "0.5874832", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n try {\n\n tap($product)->update($data);\n\n if ($request->hasFile('image')) {\n @unlink('products' . $product->image);\n $product->image = time() . '-' . $product->description . '.' . $request->file('image')\n ->getClientOriginalExtension();\n $request->file('image')->move('products', $product->image);\n }\n\n $product->save();\n\n $productResource = new ProductResource($product);\n\n DB::commit();\n return $this->responseSuccess([\n 'message' => trans('response.ProductController.update.success'),\n 'data' => $productResource,\n ]);\n } catch (\\Exception $exception) {\n DB::rollBack();\n return $this->responseError([\n 'message' => trans('response.ProductController.update.error'),\n 'errors' => $exception->getMessage(),\n ], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "dbe374356cb114ab5e44b198d87b232f", "score": "0.58492017", "text": "public function put($resource, $data){\n $client = new Client([\n 'base_uri' => $this->baseUri\n ]);\n\n //Trim left slashes\n $resource = ltrim($resource,'/');\n\n //Cache miss call to API\n $res = $client->request('PUT', $resource, [\n 'json' => $data,\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->accessToken,\n 'User-Agent' => env('BASECAMP_AGENT')\n ]\n ]);\n\n //Get JSON payload\n $json = $res->getBody()->getContents();\n\n return json_decode($json);\n }", "title": "" }, { "docid": "0bb389e7c0c131b01dec97c33ec501e0", "score": "0.579422", "text": "public function update(Request $request, $id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($resource->user->id == $request->user()->id || $request->user()->hasRole('Admin')) {\n $request->merge(['module_id' => $request->get('module_id')]);\n $request->validate(['title' => 'required|string', 'description' => 'nullable|string', 'google_drive' => 'nullable|url|max:255', 'publish_year' => 'required|numeric|digits:4|between:2008,' . date('Y'), 'module_id' => 'required|integer|exists:modules,id']);\n $resource->update($request->all());\n\n return redirect()->route('resources.index')\n ->with('success', 'Resource updated successfully');\n }\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n return abort('404', 'User not found!');\n }", "title": "" }, { "docid": "7dec035d65557a5fa957575b344e390d", "score": "0.5787175", "text": "protected function saveResource(&$resource) {\n $this->getConfig()->set($resource['key'], $resource['value']);\n\n $resource['id'] = $resource['key'];\n }", "title": "" }, { "docid": "231bf07a63b0a16b02c083ef86c176fd", "score": "0.57833594", "text": "public function update(Request $request, $id)\n {\n $input=$request->file_path;\n if(isset($input)) {\n $File = $this->fileUpload($input);\n }\n else{\n $File = \"course_resource/default.jpg\";\n }\n\n\n $course_resources = CourseResource::whereId($id)->firstOrFail();\n $course_resources->course_id = $request->get('course_id');\n $course_resources->title = $request->get('title');\n $course_resources->description = $request->get('description');\n $course_resources->file_path = $File;\n\n\n $course_resources->save();\n return redirect(action('CourseResourcesController@edit', $course_resources->id))->with('status', 'The file has been updated!');\n }", "title": "" }, { "docid": "611dd800c7185eb18c8f75c9a8595a6c", "score": "0.57606536", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->rock = $request->rock;\n $product->weight = $request->weight;\n $product->carat = $request->carat;\n $product->stock = $request->stock;\n $product->price = $request->price;\n $product->color = $request->color;\n $product->category_id =Category::find($request->category_id)->id;\n\n if($request->hasFile(\"image\")){\n //delete old image and save new image\n unlink(storage_path('app/public/productImages/'. $product->src));\n $product->src=$request->image->hashName();\n $request->image->store(\"productImages\",\"public\");\n }\n \n if($product->save()){\n return redirect()->route('products.index');\n }else{\n return view(\"partials.error\");\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "ab7c78237c36ea0911a0a7aba52fe065", "score": "0.5722473", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $body = json_encode($json);\n $request = new Request('PUT', '/entities', [], $body);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "94a50f00a1fdfc16d75925e06f8f3ece", "score": "0.5718023", "text": "public function update($resource, $id, array $data = [], array $fileData = [],\n array $options = []\n ) {\n $request = new Request(Request::UPDATE, $resource);\n $request->setId($id)\n ->setContent($data)\n ->setFileData($fileData)\n ->setOption($options);\n return $this->execute($request);\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "dd89d251e44d4f4288498c4f3fcdbd27", "score": "0.5669232", "text": "public function update(StoreQuestionRequest $request, Question $question)\n {\n $question->update($request->all());\n return (new QuestionResource($question))->response()->setStatusCode(Response::HTTP_OK);\n }", "title": "" }, { "docid": "07d0f77b1ff351c39ea339ec0c30336e", "score": "0.5668569", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $photo=$product->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/products');\n \\Storage::delete($product->photo);\n \n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->subcategory_id=$request->subcategory;\n $product->description=$request->description;\n $product->photo=$photo;\n $product->price=$request->price;\n $product->quantity=10;\n $product->update();\n notify()->success('Product Update Successfully!');\n return redirect('/product');\n }", "title": "" }, { "docid": "50feec899487537246234315718a4677", "score": "0.56560737", "text": "public function updated(Octocat $resource)\n {\n session()->flash('title', $resource->name);\n session()->flash('message', \"Octocat successfully updated\");\n session()->flash('type', 'success');\n }", "title": "" }, { "docid": "6310b8a0a92465d8b22379c86deeecd7", "score": "0.564211", "text": "public function put($resource, array $parameters = [], $headers = [])\n {\n return $this->request('PUT', $resource, [\n 'form_params' => $parameters,\n 'headers' => $headers,\n ]);\n }", "title": "" }, { "docid": "d31fe3056f944a65fa9ec19317300e44", "score": "0.5622648", "text": "public function update(Request $request)\n {\n \t$validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'id' => 'required',\n 'url' => 'required'\n ]);\n if ($validator->fails()) {\n return redirect(route('manage-contractor-resources-edit', $request->id))\n ->withErrors($validator)\n ->withInput();\n }\n\n $info['title'] = $request->title;\n $info['url'] = $request->url;\n $info['chapter'] = $request->chapter;\n $info['description'] = $request->description;\n $id = $info['id'] =$request->id;\n if(!$id){ \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n if((new ContractorResource)->updateContractorResource($info)) {\n $request->session()->flash('success', \"Contractor Resource Updated Successfully.\");\n return redirect(route('manage-contractor-resources'));\n } else { \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n }", "title": "" }, { "docid": "45805699e2ef60790309007e165386e9", "score": "0.5617589", "text": "public function update(Request $request, $id)\n {\n if(count($request->all()) == 0)\n {\n return redirect()->route('home');\n }\n $item = Item::where('id', $id)->first();\n \n if($item)\n { $this->validate($request, [\n 'itemDescription' => ['required']\n ]); \n $item->itemDescription = $request->get('itemDescription');\n $item->inventoryID = $request->get('inventoryID');\n if($request->file('select_file'))\n { \n $this->validate($request, ['select_file' => 'image|mimes:jpeg,png,jpg,gif|max:2048']);\n $image = $request->file('select_file');\n $path = $image->store('stock', 's3');\n\n $item->photoUploadLink = $path;\n }\n $item->save();\n return redirect()->route('stock')->with('success','Stock was successfully updated.');\n }\n else{\n return redirect()->route('stock')->with('error','Unfortunately an error has occurred.');\n }\n }", "title": "" }, { "docid": "0ca7ba7cd4456dc2a52499c097eb460d", "score": "0.5611832", "text": "public function update(Request $request, Memory $memory)\n {\n \n }", "title": "" }, { "docid": "28ac32d59483ead96eb99c3920d2d977", "score": "0.56017566", "text": "public function update( Request $request, $id ) {\n if ( $request->hasFile( 'newphoto' ) ) {\n\n $file = $request->file( 'newphoto' );\n $file_name = time() . '.' . $file->extension();\n $file->move( public_path( 'backend/supplier/' ), $file_name );\n\n $supplier = Supplier::find( $id );\n\n $oldPhoto = $supplier->photo;\n\n if ( $oldPhoto ) {\n $photo_url = $oldPhoto;\n $part = explode( '/', $photo_url );\n $slicedArr = array_slice( $part, 3 );\n $photoStr = implode( '/', $slicedArr );\n unlink( $photoStr );\n }\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = asset( \"backend/supplier/{$file_name}\" );\n $supplier->save();\n return $request;\n } else {\n $supplier = Supplier::find( $id );\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $request->photo;\n $supplier->save();\n return $request;\n }\n }", "title": "" }, { "docid": "a9e48624384796f4304eebd40f4ae1bc", "score": "0.5599046", "text": "public function update()\n {\n $id = Input::get('id');\n $obj = Product::find($id);\n if ($obj == null) {\n return view('404');\n }\n $obj->name = Input::get('name');\n $obj->images = Input::get('images');\n $obj->description = Input::get('description');\n $obj->price = Input::get('price');\n $obj->save();\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "5583a1a1065b5e63099c0ebbfcc38083", "score": "0.55854446", "text": "public function modifyResource($uri,\n $sparql = \"\",\n $headers = [],\n $transaction = \"\") {\n $options = [];\n\n // Set content.\n $options['body'] = $sparql;\n\n // Set headers.\n $options['headers'] = $headers;\n $options['headers']['Content-Type'] = 'application/sparql-update';\n\n // Ensure uri takes transaction into account.\n $uri = $this->prepareUri($uri, $transaction);\n\n $response = $this->client->request(\n 'PATCH',\n $uri,\n $options\n );\n\n return null;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "15b871253c843a97a53c3d5984ec74b9", "score": "0.5576059", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'image_url' => 'image|nullable|max:1999'\n ]);\n\n $product = Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->groups = $request->input('groups');\n $product->stocks = $request->input('stocks');\n $product->description = $request->input('description');\n //to handle file in updload this way if no new image added the image \n //wont be updated.\n if ($request->hasFile('image_url')){\n //to get the filename with ext\n $file = $request->file('image_url')->getClientOriginalName();\n //get file name\n $filename = pathinfo($file, PATHINFO_FILENAME);\n //get extensiopn\n $ext = $request->file('image_url')->getClientOriginalExtension();\n //new filename\n $fileNameToStore = $filename.'_'.time().'.'.$ext;\n #upload\n $path = $request->file('image_url')->storeAs('public/images', $fileNameToStore);\n }else{\n $fileNameToStore = $product->image_url;\n }\n $product->image_url= $fileNameToStore;\n $product->save();\n\n return redirect('/');\n }", "title": "" }, { "docid": "d30de7511ec7de74e32f94e01d31fafe", "score": "0.5566411", "text": "public function update(Request $r, $id){\n $prk = Portkey::find($id);\n $prk->name = $r->name;\n \n if(isset($r->image)){\n Storage::disk('portkeyMap')->delete($prk->image);\n $path = $r->file('image')->store('', 'portkeyMap');\n $prk->image = $path;\n }\n $prk->save();\n return redirect()->route('portkey.index');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "8f8dacf3ca2fb2c9044973cfcebc7c92", "score": "0.555745", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if(!empty($request->input('tags'))){\n $product->tags()->sync($request->input('tags'));\n }else {\n $product->tags()->detach();\n }\n\n //gestion sup image\n if($request->input('delete_picture')=='true'){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n }\n\n //gestion de la modification image\n if(!is_null($request->file('thumbnail'))){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n\n $im = $request->file('thumbnail');\n $ext = $im->getClientOriginalExtension();\n $uri = str_random(12).'.'.$ext;\n $picture = Picture::create([\n 'uri' => $uri,\n 'type' => $ext,\n 'size' => $im->getClientSize(),\n 'product_id' => $product->id\n ]);\n\n $request->file('thumbnail')->move(env('UPLOAD_PATH','./uploads'), $picture->uri);\n\n }\n\n $product->update($request->all());\n return redirect('product')->with(['message'=>'success']);\n }", "title": "" }, { "docid": "603c333c3d11c6ec2de9c240d7fa4363", "score": "0.55474466", "text": "public function update(Request $request, $id)\n {\n $image = $request->file('image')->store('product', 'public');\n $product = Product::find($id);\n\n $product->nombre = $request->input('nombre');\n $product->descripcion = $request->input('descripcion');\n $product->precio = $request->input('precio');\n $product->stock = $request->input('stock');\n $product->category_id = $request->input('category_id');\n $product->image = $image;\n \n $product->save();\n\n return redirect(\"/$product->id/showProduct\"); \n }", "title": "" }, { "docid": "7412cf8d4f3cd118bf4c8ef71352185b", "score": "0.5544467", "text": "public function update(Request $request, Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.55334014", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "45a4f9a4a649b70b7c4d70ad32264661", "score": "0.5530422", "text": "public function update(Request $request,$id)\n { \n $slider = Slider::find($id);\n //start image upload\n if($request->file('image') != \"\"){\n $_IMAGE = $request->file('image');\n $name = time().$_IMAGE->getClientOriginalName();\n $uploadPath = 'public/frontend/images/main-slider/';\n $_IMAGE->move($uploadPath,$name);\n $_imageUrl = $uploadPath.$name;\n\n //delete previous image\n if(!empty($slider->image)){\n try{\n unlink(\"$slider->image\");\n }\n catch(\\Exception $e){\n\n }\n finally{\n $flag = true; \n }\n }\n //store updated image\n $slider->image = $_imageUrl;\n\n }\n //end image upload\n $slider->type = $request->type;\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->redirect_link = $request->redirect_link;\n $slider->active = $request->active;\n $slider->slider_order = $request->slider_order;\n $slider->save();\n\n return redirect('/admin/sliders')->with('success',' Data Updated');\n }", "title": "" }, { "docid": "0b10222182779f95692d101f822f75b6", "score": "0.55273986", "text": "public function update(Request $request, $id)\n {\n\n $slider=Slider::findorfail($id);\n $this->validate($request,[\n \"title\"=>\"required|max:100\",\n \"image\"=>\"nullable|image\"\n ]);\n\n $slider->name=$request->get(\"title\");\n if($request->hasFile(\"image\")){\n $old_location=public_path(\"images/slider/\".$slider->image_url);\n if(file_exists($old_location))\n unlink($old_location);\n\n $dblocation=uniqid(true).'.png';\n $location=public_path('images/slider/'.$dblocation);\n $file=$request->file(\"image\");\n Image::make($file)->encode(\"png\")->save($location);\n $slider->image_url=$dblocation;\n }\n\n $slider->save();\n Session::flash(\"success\",\"Slider has been updated\");\n\n return redirect()->back();\n\n\n }", "title": "" }, { "docid": "122628d1e06ea888611a75c166b89b4c", "score": "0.552677", "text": "public function patch($data) {\n if (isset($data['id']) && !is_numeric($data['id'])) {\n // Throw an error....\n return new ResourceResponse(\n [\n 'error' => t('You must provide an valid ID when updating a resource.'),\n ],\n ResourceResponse::HTTP_BAD_REQUEST\n );\n }\n $file_system_access_entity = entity_load('file_system_access', $data['id']);\n if (empty($file_system_access_entity)) {\n return new ResourceResponse(\n [\n 'error' => t('Resource not found.'),\n ],\n 404\n );\n }\n if (isset($data['entity_id']) && is_numeric($data['entity_id'])) {\n $file_system_access_entity->set('entity_id', $data['entity_id']);\n }\n if (isset($data['entity_type'])) {\n $file_system_access_entity->set('entity_type', $data['entity_type']);\n }\n if (isset($data['can_view']) && in_array($data['can_view'], [0, 1])) {\n $file_system_access_entity->set('can_view', $data['can_view']);\n }\n if (isset($data['can_write']) && in_array($data['can_write'], [0, 1])) {\n $file_system_access_entity->set('can_write', $data['can_write']);\n }\n if (isset($data['notify_of_upload']) && in_array($data['notify_of_upload'], [0, 1])) {\n $file_system_access_entity->set('notify_of_upload', $data['notify_of_upload']);\n }\n if (isset($data['user_id'])) {\n $file_system_access_entity->set('user_id', ['target_id' => $data['user_id']]);\n }\n // Save the FileSystemAccess Entity.\n $file_system_access_entity->save();\n // Return reponse.\n return new ModifiedResourceResponse(NULL, 202);\n }", "title": "" }, { "docid": "a82e18d865c6a0f13355d38c12c144b4", "score": "0.5523652", "text": "public function updateFilepath(){\n if(!empty($this->originalResource)){\n $this->setFilepath($this->getOriginalResource()->getIdentifier());\n }\n }", "title": "" }, { "docid": "c2ba30e945f68db8e69ec9299a2bf860", "score": "0.55200166", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "66fbae8975fea1c3ac6a3142735e3664", "score": "0.55114806", "text": "public function update(Request $request, $id)\n {\n $lens = Lens::find($id);\n\n File::delete(str_replace('public','storage',$lens->image));\n\n $lens->delete();\n\n $path = $request->file('image')->store('public');\n\n $lens = Lens::create($request->all());\n\n $lens->image = $path;\n $lens->update();\n\n return redirect()->route('lens.index');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "70d4983ca950042ec52182066262a01f", "score": "0.55057055", "text": "public function update(Request $request, Product $product)\n {\n \n $product->name = $request->name;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->featured = $request->featured;\n $product->image = $request->image;\n $product->category_id = $request->category_id;\n $product->brand_id = $request->brand_id;\n\n $product->save();\n\n return response([\n 'data' => new ProductResource($product)\n ],Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "a1981e95d8e1e839e57300bff0e83269", "score": "0.5500746", "text": "abstract public function update_storage_site();", "title": "" }, { "docid": "012a18ea3549362ce2727f6242b46f5a", "score": "0.5497882", "text": "public function update(UpdateProductRequest $request, $id)\n {\n $products = Product::find($id);\n $path = null;\n $requestData = $request->all();\n if ($request->file('image')) {\n $path = $request->file('image')->store('public');\n @unlink('storage/'. $products->image);\n }\n if($request->hasFile('image')) {\n //\\File::delete($events->image);\n $requestData['image'] = $path;\n// $requestData['image'] = IdomNotification::uploadAndResize($request->file('image'));\n }\n\n\n\n\n// dd($data);\n $products->update($requestData);\n// $idoms->update($requestData);\n\n return redirect('/admin/products')->with('success','Item update successfully!');\n }", "title": "" }, { "docid": "631ec05d06376fc3d4e4c009809fbc97", "score": "0.54973245", "text": "public function update(SliderRequestUpdate $request, $id)\n {\n $slider=Slider::find($id);;\n $slider->TituloSlider=$request->TituloSlider;\n $slider->DescripcionSlider=$request->DescripcionSlider;\n $slider->EstadoSlider=$request->EstadoSlider;\n\n if ($request->file('file')) {\n \n Storage::disk('s3')->delete('sliders/'.$slider->file_name);\n\n $nameFile = $request->file('file');\n \n $newName = time().rand().'.'.$nameFile->getClientOriginalExtension();\n #Amazon\n\n $path = $nameFile->storeAs('sliders', $newName,'s3');\n Storage::disk('s3')->setVisibility($path, 'public');\n \n $slider->file_url=Storage::disk('s3')->url($path);\n $slider->file=$nameFile->getClientOriginalName();\n $slider->file_name=$newName;\n $slider->file_type=$nameFile->getClientOriginalExtension();\n\n }\n\n \n # $slider->file_url\n $slider->update();\n\n return $slider;\n }", "title": "" }, { "docid": "5ec7d4d96d210f32e09b80058c55a490", "score": "0.5496931", "text": "public function update(Request $request, $id){\n $product = Product::find($id);\n // dd($product);\n if($product){\n if($request->description){\n $product->description = $request->description;\n }\n if($request->name){\n $product->name = $request->name;\n }\n if($request->qty){\n $product->qty = $request->qty;\n }\n if($request->price){\n $product->price = $request->price;\n }\n if ($request->hasFile('image')) {\n $img_src = $request->file('image')->store('public/images');\n $product->image_src = $img_src;\n }\n\n return $product->save() ? 'product updated!' : 'could not update the product';\n }else{\n return 'product not found';\n }\n \n }", "title": "" }, { "docid": "ba09590827a6c41287d661376548ea80", "score": "0.5494963", "text": "public function update(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\t\t\t// 'metadata' => ['array'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->metadata = $request->input('metadata', []);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "96e3e53de207d1c0165b2f8d9b2e8bd8", "score": "0.5492371", "text": "public function update(Request $request, $id)\n {\n $book = Book::findOrFail($id);\n $path = Storage::putfile('public',$request->file('image'));\n $url = Storage::url($path);\n\n $book->title = $request->title;\n $book->price = $request->price;\n $book->image = $url;\n $book->subject = $request->subject;\n $book->author = $request->author;\n $book->pub_house = $request->pub_house;\n $book->description = $request->description;\n $book->update();\n\n return redirect()->route('land_page');\n }", "title": "" }, { "docid": "f34e0cee27ed61fcc8d340527f1d9673", "score": "0.5490983", "text": "#[Put('/{slug}', middleware: ['auth', 'can:update,slug'])]\n #[Operation(tags: ['Articles'], security: 'BearerToken')]\n #[RequestBody(factory: UpdateArticleRequestBody::class)]\n #[Response(factory: SingleArticleResponse::class, statusCode: 200)]\n #[Response(factory: ErrorValidationResponse::class, statusCode: 422)]\n public function update(Article $slug, UpdateArticleRequest $request): SingleArticleResource\n {\n $slug->update($request->input('article'));\n\n return new SingleArticleResource($slug->loadCount('favoritedBy'));\n }", "title": "" }, { "docid": "4d408504ca6fc63ae1c9b25f108a04b1", "score": "0.5490762", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n $item->fill($request->all())->save();\n\n //file upload\n if($request->file('image_img')){\n $path = Storage::disk('public')->put('images/photos' , $request->file('image_img'));\n $item->fill(['image_img' => asset($path)])->save();\n }\n\n //tags\n $item->tags()->sync($request->get('tags'));\n\n return redirect()->route('item.index')->with('flash','Article actualizado correctamente.');\n }", "title": "" }, { "docid": "2f3b20927c08bdb57df533acda52a1fe", "score": "0.5490345", "text": "public function update(Request $request) {\n $this->validateItemInput($request);\n \n $item = Db::get()\n ->find(\n $this->classCall, $request->attributes->get('id')\n );\n if (!($item instanceof $this->classCall)) {\n $response = new Response('Trying to update non existing item.');\n $response->setStatusCode(400);\n return $response;\n }\n $oldPath = $item->path;\n $item->update($request->request->all());\n if ($oldPath !== $item->path) {\n $item->path = $this->getUniquePath($item->path);\n }\n Db::get()->persist($item);\n return $item;\n }", "title": "" }, { "docid": "eb69ca57c3bde9f06755b1a82e717baa", "score": "0.54793954", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n \n $currentPhoto = $item->photo;\n if ($request->photo != $currentPhoto) {\n $name = time().'.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n\n \\Image::make($request->photo)->save(public_path('/img/item/').$name);\n $request->merge(['photo' => $name]);\n\n $itemPhoto = public_path('/img/item/').$currentPhoto;\n if (file_exists($itemPhoto)) {\n @unlink($itemPhoto);\n }\n }\n $item->update($request->all());\n \n return ['message' => 'Updated Success'];\n }", "title": "" }, { "docid": "ceac6ee3c36ec0367a2b9490feebe7a9", "score": "0.5478989", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n $imagePaths = [];\n\n if ($request->hasFile('path')) {\n for ( $index = 0; $index < sizeof( $requestData['path']); $index++) {\n $imagePath = 'storage/' . $request->file('path')[$index]\n ->store('uploads', 'public');\n array_push($imagePaths, $imagePath);\n }\n }\n $image = Image::findOrFail($id);\n\n if (sizeof($imagePaths) === 0) {\n $requestData['path'] = $image->path;\n $image->update($requestData);\n }\n else {\n $oldImagePath = $image->path;\n $oldImagePath = str_replace(\"storage/\",storage_path('') . '/app/public/' , $oldImagePath);\n\n foreach ($imagePaths as $imagePath){\n\n $requestData['path'] = $imagePath;\n $image->update($requestData);\n }\n\n if(File::exists($oldImagePath)){\n File::delete($oldImagePath);\n }\n }\n\n\n\n return redirect('images/' . $request->get('post_id'))->with('flash_message', 'Image updated!');\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "2840f4acb2ccb4170d4557d937e25de4", "score": "0.5465156", "text": "public function update(Request $request, $id)\n {\n $data = Image::find($id);\n $all = $request->all();\n if(is_null($data))\n return response()->json(['error' => 'Resource introuvable'], 404);\n else\n {\n if(isset($all['url']))\n {\n $name = File::image($all['url']);\n if($name)\n {\n $all['url'] = $name;\n }else $all['url'] = $data->url;\n }\n\n $data->update($all);\n $data->categories()->sync($request->categories);\n $data->tags()->sync($request->tags);\n\n return response()->json(new ImageResource($data), 200);\n }\n }", "title": "" }, { "docid": "9080726c97000b95123e3a3548679cb5", "score": "0.5464735", "text": "public function update(Request $request, $id)\n {\n $this->slider = $this->slider->find($id);\n $rule =$this->slider->getRules('update');\n $request->validate($rule);\n $data = $request->except('image');\n\n if($request->image){\n $image_name = uploadImage($request->image,'slider','500x300');\n if($image_name){\n $data['image'] = $image_name;\n if($this->slider->image!= ''){\n deleteImage($this->slider->image,'slider');\n };\n }\n }\n $update = $this->slider->update($data);\n if($update){\n request()->session()->flash('success','Product has been updated');\n }else {\n request()->session()->flash('error','Product has not Been updated');\n\n }\n return redirect()->route('slider.index');\n\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "536db9f9519d6601d2b49cdcde95f013", "score": "0.5458005", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request,[\n 'id_manufacture' => 'required',\n 'asset_tag' => 'required',\n 'id_category' => 'required',\n 'order_number' => 'required',\n 'qty' => 'required',\n 'min_qty' => 'required',\n 'id_location' => 'required'\n ]);\n $input = $request->all();\n $asset = Assets::find($id);\n if(!empty($input['image'])){\n Storage::delete(public_path('storage'),$asset->image);\n $input['image'] = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('storage/assets/'), $input['image']);\n }else {\n $input = array_except($input, array('image'));\n }\n $input['created_by'] = Auth::user()->name;\n $asset->update($input);\n return redirect()->route('assets.index')->with(['success' => 'Asset updated successfully', 'class' => 'close']);\n }", "title": "" }, { "docid": "db3837780a308513dc99c922897e898e", "score": "0.54579574", "text": "public function update()\n {\n $this->delete();\n $this->save();\n }", "title": "" }, { "docid": "5f36cdc3217c7c251089de9b1597e8a0", "score": "0.54572374", "text": "public static function put(string $resource, array $body = []) {\r\n $response = self::getClient()->request(\r\n \"PUT\",\r\n self::createUrl($resource),\r\n self::createHeaders(!empty($body)),\r\n NullStripper::strip($body)\r\n );\r\n\r\n if (!self::isSuccessful($response)) {\r\n self::handleFailure($response);\r\n }\r\n return self::handleSuccess($response);\r\n }", "title": "" }, { "docid": "8f4a12a4a3962d1da8617ab2c1add338", "score": "0.5455601", "text": "public function update(Request $request, Product $product)\n {\n if($request->image != NULL) {\n #Image uploading\n $storedPath = $request->file('image')->store('public/products'); \n }\n \n \n #Update the current product\n $product->update([\n 'title' => $request->title,\n 'body' => $request->body,\n 'price' => auth()->user()->id == $product->user_id ? $request->price : $product->price,\n 'category' => $request->category,\n 'image_path' => $request->image != NULL ? $storedPath : $product->image_path,\n 'status' => $request->status\n ]);\n\n #Return back to list page\n return redirect('/products');\n }", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.54551905", "text": "public function update($obj) {\n }", "title": "" }, { "docid": "236d64bd92646776ec0d62483983f6b1", "score": "0.5442009", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($id, $data);\n\n $query = \"UPDATE guest.student SET name = :name, surname = :surname, indexno = :indexno, address = :address WHERE id = :id\";\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindParam(\":id\", $id);\n $stmt->bindParam(\":name\", $putValues[\"name\"]);\n $stmt->bindParam(\":surname\", $putValues[\"surname\"]);\n $stmt->bindParam(\":indexno\", $putValues[\"indexno\"]);\n $stmt->bindParam(\":address\", $putValues[\"address\"]);\n\n $stmt->execute();\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "a098fb5d396525d0b997679afe399e81", "score": "0.54363286", "text": "public function update(Request $request, $id)\n {\n\n $product = $this->productRepo->getById($id);\n $request_data = $request->except(['_method', '_token', 'photo', 'product_cats', 'ar', 'en']);\n\n $locale = $request->only('ar', 'en');\n $cats = $request->product_cats;\n\n\n if ($request->hasFile('photo')) {\n /*delete old photo*/\n $oldPath = public_path('/images/products/' . $product->photo);\n $oldThumbPPath = public_path('/images/products/thumb/' . $product->photo);\n File::delete($oldPath, $oldThumbPPath);\n\n $image = $this->upload($request->photo, 'products', true);\n $request_data['photo'] = $image;\n\n }\n\n $this->productRepo->updateData($id, $request_data, $locale, $cats);\n\n return redirect()->route('products.index')->with('update', 'data updated successfully');\n\n\n }", "title": "" }, { "docid": "78c9828cfb522a8b15c9e25aecac3a44", "score": "0.54266506", "text": "public function update(Request $request, $id)\n {\n $order = Order::findOrFail($id);\n $previous_qty = $order->quantity;\n $order->user_id = auth()->id();\n $order->product_id = $request['product_id'];\n $order->quantity = $request['quantity'];\n\n if ($order->save()) {\n Inventory::where('product_id', $order->product_id)->decrement('quantity', $order->quantity);\n Inventory::where('product_id', $order->product_id)->increment('quantity', $previous_qty);\n return new OrderResource($order);\n }\n }", "title": "" }, { "docid": "ecf201c555a1f2a407beb441493f659d", "score": "0.5425398", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'point' => 'required',\n 'category' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n $new_name = \"\";\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $new_name = time() . '.' . $image->getClientOriginalExtension();\n Image::make($image)->resize(450, 400)->save(public_path('picture/product/' . $new_name));\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n $oldpruductname = $out_of_stock->picture;\n $out_of_stock->picture = $new_name;\n Storage::delete('product/'.$oldpruductname);\n } else {\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n }\n\n $out_of_stock->save();\n return back()->with('success', 'Edit data success');\n }", "title": "" }, { "docid": "4da53910fe95b40fc7708d69a5bc4caf", "score": "0.54252774", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'required|mimes:jpeg,bmp,png'\n ]);\n $slider = Slider::find($id);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $filename = time(). '.' . $filename;\n $path = 'upload/slider/'.$filename;\n $storage = Storage::disk('s3');\n $storage->put($path, fopen($image, 'r+'), 'public');\n\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->image = $path;\n $slider->save();\n Toastr::success('Slider Successefully Updated!', 'Success', [\"positionClass\" =>\"toast-top-right\"]);\n return redirect()->route('slider.index');\n }", "title": "" }, { "docid": "a4ae1c30e150f5cf694572b68551bd23", "score": "0.5425028", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'title'=>'required',\n 'content'=>'required',\n 'date'=>'required',\n 'image'=>'required|image',\n ]);\n $product = Product::find($id);\n $product->edit($request->all());\n $product -> uploadImage($request->file('image'));\n $product->setCategory($request->get('category_id'));\n $product->toggleStock($request->get('in_stock'));\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "f08541062169cb53c21e52b58cdb2dcd", "score": "0.5424735", "text": "public function update(Request $request, $id)\n {\n //\n $id = $request->id;\n $store_edit = Store::find($id);\n $store_edit->store_name = $request->store_name;\n $store_edit->store_tel = $request->store_tel;\n $store_edit->store_type_id = $request->store_type;\n $store_edit->store_lineid = $request->store_line;\n $store_edit->store_contact = $request->store_contact;\n $store_edit->store_address = $request->store_address;\n $store_edit->store_detail = $request->store_detail;\n $store_edit->store_status = $request->store_status;\n $store_edit->store_tax_contact = $request->store_tax_contact;\n $store_edit->store_tax_name = $request->store_tax_name;\n $store_edit->store_tax_id = $request->store_tax_id;\n $store_edit->confirm = $request->confirm;\n $store_edit->store_lat = $request->store_lat;\n $store_edit->store_lng = $request->store_lng;\n $tmp = '';\n if($request->check_list){\n foreach($request->check_list as $key => $item){\n if($key == 0){\n $tmp = $item;\n }\n else{\n $tmp = $item.','.$tmp;\n } \n }\n }\n $store_edit->store_promotion = $tmp;\n $store_edit->store_status = $request->store_status;\n\n\n if($request->hasFile('storeimage')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_image); \n $newFileName = uniqid().'.'.$request->storeimage->extension();//gen name\n $imageStore = $request->file('storeimage');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStore), 'public');\n $store_edit->store_image = $newFileName;\n }\n if($request->hasFile('storeimageline')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_lineid_image);\n $newFileName = uniqid().'.'.$request->storeimageline->extension();//gen name\n $imageStoreLine = $request->file('storeimageline');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreLine), 'public');\n $store_edit->store_lineid_image = $newFileName;\n }\n if($request->hasFile('storeimagetax')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_tax_image);\n $newFileName = uniqid().'.'.$request->storeimagetax->extension();//gen name\n $imageStoreTax = $request->file('storeimagetax');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreTax), 'public');\n $store_edit->store_tax_image = $newFileName;\n }\n $store_edit->save();\n return redirect()->route('store.index')->with('feedback' ,'แก้ไขข้อมูลเรียบร้อยแล้ว');\n }", "title": "" }, { "docid": "2ed05e577c404795cab2b1dde733d75c", "score": "0.5418497", "text": "public function update(Request $request, $id)\n {\n $datos = $request->except('_token','_method');\n\n if ($request->hasFile('foto')) {\n $artista = Artista::findOrfail($id);\n Storage::delete('public/uploads/'.$artista->id.'/'. $artista->foto);\n $datos['foto'] = $request->file('foto')->getClientOriginalName();\n $request->file('foto')->storeAs('public/uploads/'.$artista->id, $datos['foto']);\n }\n\n Artista::where('id','=',$id)->update($datos);\n return redirect('artista');\n }", "title": "" }, { "docid": "da9aacaea3d57116c579322deaba3198", "score": "0.5416959", "text": "public function update(Request $request, $id)\n {\n try {\n $result = $this->model->find($id);\n\n if ($result) {\n $inputs = $request->except('_token');\n\n if ($request->hasFile('image')) {\n $fileName = time() . '.' . $request->image->getClientOriginalExtension();\n $file = $request->file('image');\n\n Storage::put($this->dishImageStoragePath . $fileName, file_get_contents($file), 'public');\n\n $inputs['image'] = $fileName;\n\n if (isset($result->image) && $result->image) {\n if (Storage::exists($this->dishImageStoragePath . $result->image)) {\n Storage::delete($this->dishImageStoragePath . $result->image);\n }\n }\n }\n\n $isSaved = $result->update($inputs);\n\n if ($isSaved) {\n return redirect($this->moduleRoute)->with(\"success\", __($this->moduleName . \" updated!\"));\n }\n }\n return redirect($this->moduleRoute)->with(\"error\", __(\"Something went wrong, please try again later.\"));\n } catch (\\Exception $e) {\n return redirect($this->moduleRoute)->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "9909c434dfa1fa2de013b52dc098057a", "score": "0.54166603", "text": "public function updateProduct();", "title": "" }, { "docid": "83fd3d73dd82fcaecb92e078c534bdfe", "score": "0.54161036", "text": "public function update(Request $request, $id)\n {\n $data = array();\n $data['status'] = $request->status;\n \n \n $image = $request->newphoto;\n\n if ($image) {\n $position = strpos($image, ';');\n $sub = substr($image, 0, $position);\n $ext = explode('/', $sub)[1];\n\n $name = time().\".\".$ext;\n $img = Image::make($image)->resize(240,200);\n $upload_path = 'backend/supplier/';\n $image_url = $upload_path.$name;\n $success = $img->save($image_url);\n \n if ($success) {\n $data['photo'] = $image_url;\n $img = DB::table('patients')->where('id',$id)->first();\n $image_path = $img->photo;\n $done = unlink($image_path);\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n \n }else{\n $oldphoto = $request->photo;\n $data['photo'] = $oldphoto;\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "cc834cb0ddf4d709f9b0966aeba0c395", "score": "0.5407511", "text": "public function update(Request $request, Product $product)\n {\n\n if (Auth::id()==$product->user_id) {\n $product->update($request->all());\n\n return response([\n 'data'=>new ProductResource($product)\n ],Response::HTTP_CREATED); \n }\n\n \nelse {\n return response([\n 'error'=>'product doesnt belong to current user'\n ],Response::HTTP_NOT_FOUND); \n}\n // return response()->json(new ProductResource($product), 200); \n\n \n\n \n }", "title": "" } ]
b2085fd458a358c61f04bee85ec2ab19
This method displays the module on the page.
[ { "docid": "45d6d82726d9e277b82451ac3091a26c", "score": "0.0", "text": "function render(array $params) : string\r\n {\r\n $template = file_get_contents(\"modules/headerModule/templates/header.html\");\r\n parent::InsertReplacements($template, $params);\r\n\r\n return $template;\r\n }", "title": "" } ]
[ { "docid": "c9231d5b5ecd8010030cec3885590e10", "score": "0.7414347", "text": "public function display()\n {\n $this->component->display();\n\n }", "title": "" }, { "docid": "7fdacbccf062bb3dc38160a3ece981cd", "score": "0.7390401", "text": "function display() \n\t{\n global $current_user, $app_strings;\n\n $smarty = new Dotb_Smarty();\n $smarty->assign('mod', $GLOBALS['mod_strings']);\n $smarty->assign(\"token\", session_id());\n $smarty->assign(\"siteURL\", $GLOBALS['dotb_config']['site_url']);\n\n //Loading label\n $smarty->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);\n\n $theme = new LumiaTheme();\n $smarty->assign(\"css_url\", $theme->getCSSURL());\n\n\n $ajax = new AjaxCompose();\n $ajax->addCrumb(translate('LBL_DOTBPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main(\"dotbportal\")');\n $ajax->addCrumb(ucwords(translate('LBL_PORTAL_THEME')), '');\n $ajax->addSection('center', translate('LBL_DOTBPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portaltheme.tpl'));\n echo $ajax->getJavascript();\n\t}", "title": "" }, { "docid": "4463bac9a8fae753ca9fa2ac9abcd95d", "score": "0.736885", "text": "function display() \n\t{\n global $current_user, $app_strings;\n\n $smarty = new Sugar_Smarty();\n $smarty->assign('mod', $GLOBALS['mod_strings']);\n $smarty->assign(\"token\", session_id());\n $smarty->assign(\"siteURL\", $GLOBALS['sugar_config']['site_url']);\n\n //Loading label\n $smarty->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);\n\n $theme = new SidecarTheme();\n $smarty->assign(\"css_url\", $theme->getCSSURL());\n\n\n $ajax = new AjaxCompose();\n $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main(\"sugarportal\")');\n $ajax->addCrumb(ucwords(translate('LBL_PORTAL_THEME')), '');\n $ajax->addSection('center', translate('LBL_SUGARPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portaltheme.tpl'));\n echo $ajax->getJavascript();\n\t}", "title": "" }, { "docid": "0734722d684368a1a7d1931af4e97397", "score": "0.73156095", "text": "public function display() {\n\t\tinclude $this->get_view( 'main' );\n\t}", "title": "" }, { "docid": "c497044900215b04f87abaea6fdd6dac", "score": "0.72165096", "text": "public function rendermodule()\n\t{\n\t\t$native = JRequest::getString('native');\n\t\t$id = JRequest::getString('extension_id');\n\t\t$params = JRequest::getVar('params', array(), 'post', 'array');\n\t\t$title = JRequest::getString('title');\n\t\t$showTitle = JRequest::getString('showtitle');\n\n\t\t$modules = MigurModuleHelper::getSupported(array(\n\t\t\t'extension_id' => $id,\n\t\t\t'native' => $native\n\t\t));\n\n\t\t$module = $modules[0];\n\n\t\t// Override needed data\n\t\t$module->params = json_encode((object)$params);\n\t\t$module->title = $title;\n\t\t$module->showtitle = $showTitle;\n\n\t\t$content = MigurModuleHelper::renderModule($modules[0]);\n\n\t\techo $content; die();\n\t}", "title": "" }, { "docid": "a101fb044674f8f3ed8ccf9086bced42", "score": "0.71614844", "text": "public function display() {\n\n\t\techo $this->get_display();\n\n\t}", "title": "" }, { "docid": "9053f47dbbd91fc43257226fd93e813c", "score": "0.7150371", "text": "public function display_page() {\n\t\trequire_once \\eoxia\\Config_Util::$init['digirisk_dashboard']->core->path . 'view/main-page.view.php';\n\t}", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.71452534", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "ee58db635cbf1e6af1758d1422c03ca3", "score": "0.71346635", "text": "public function display()\n {\n\n //set the template of the content\n\n $this->contentView->setContentTemplate('details');\n $this->contentView->assign('modBreadcrumb', $this->model->showModBreadcrumb($this->module));\n //assign the content-output to the content of global Template\n $this->globalView->assign('nav', $this->model->viewPageMenu());\n\n $this->globalView->assign('content', $this->contentView->render());\n //render the templates \n return $this->globalView->render($global = true);\n }", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.7118267", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "3f9410fea06bd7d21cc7e5dcfc8ddcdc", "score": "0.71105224", "text": "function display() {\n if ( ! $this->enabled ) { return; }\n echo $this->get_html();\n }", "title": "" }, { "docid": "f3ac6662fa056038f78a2aba70bb06bc", "score": "0.70077264", "text": "function display() {\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "d462cdbad83ff6e745daf9fad3fb9d4c", "score": "0.6964727", "text": "public function showPage()\n\t{\n\t\techo $this->HTML;\n\t}", "title": "" }, { "docid": "50024ab49f96d9ee0246bd42e159d9f1", "score": "0.69100684", "text": "public function display() {\n echo sprintf(\n $this->template,\n $this->page_header,\n $this->page_contents\n );\n }", "title": "" }, { "docid": "f576d0bb1f776b9ac6aca660a9ee1735", "score": "0.68374854", "text": "function show() {\n\t\tglobal $style, $mysql, $prefix;\n\t\t// Modul anzeigen\n\t\t$mysql->id_select('*', $prefix.'modul', sql($this->request['id']));\n\t\t$mod = $mysql->fetchRow();\n\t\t\n\t\t$list = new liste('Modul: '.$mod['mod_name']);\n\t\t$list->add_columns(array('' => '50%', ' ' => ''));\n\t\t$list->add_row(array(liste_title('ID'), $mod['id']));\n\t\t$list->add_row(array(liste_title('Modulname'), $mod['mod_name']));\n\t\t$list->add_row(array(liste_title('Modulkategorie'), $this->get_modul_cat_name($mod['mod_cat'])));\n\t\t// navigationskategorie noch machen<=========================================================\n\t\t$list->add_row(array(liste_title('Schlüssel'), $mod['mod_key']));\n\t\t$list->add_row(array(liste_title('Linkparameter'), $mod['mod_link']));\n\t\t$list->add_row(array(liste_title('Paket'), $mod['mod_archive']));\n\t\t$list->add_row(array(liste_title('Version'), $mod['mod_version']));\n\t\t$list->add_row(array(liste_title('Autor'), $mod['mod_author']));\n\t\t$list->add_row(array(liste_title('Copyright'), $mod['mod_copyright']));\n\t\t$list->add_row(array(liste_title('Veröffentlichungsdatum'), date('d.m.Y', $mod['mod_date'])));\n\t\t$list->add_row(array(liste_title('Changelog'), $mod['mod_changelog']));\n\t\t$list->add_row(array(liste_title('Beschreibung'), $mod['mod_description']));\n\t\t$style->add($list->get());\n\t\t\n\t\t// Bearbeiten Button\n\t\t$form = new form();\n\t\t$form->button('Zurück', INDEX);\n\t\t$style->add($form->get());\n\t}", "title": "" }, { "docid": "89f13c5e5c14f16a4d7fda0e5c82e7de", "score": "0.683694", "text": "function display ()\n\t{\n\t\t$menuItems = array ();\n\t\tinclude('framework/configuration/menuItems.php');\n\t\tglobal $menu;\n\n\t\t$this->renderEngine->assign('title', $this->getTitle ());\n\t\t$this->renderEngine->assign('menuItems', $menuItems);\n\t\t$this->renderEngine->assign('menu', $menu);\n\t\t$this->renderEngine->assign('dictionary',\n\t\t\t$this->getDictionary ());\n\n\t\t$this->renderEngine->assign('parameters', $this->getParameters ());\n\t\t$this->renderEngine->assign('action', $this->getAction ());\n\t\t$this->renderEngine->assign('renderObjects', $this->getRenderObjects ());\n\t\t$this->renderEngine->assign('renderActions', $this->getActions ());\n\n\t\t$this->renderEngine->assign ('pluginName', $this->pluginName);\n\t\t$this->renderEngine->assign ('renderer', $this->getTemplateFile ());\n\t\tif (isset ($_GET['debug']) ||\n\t\t\t(isset ($_SESSION['debug']) && $_SESSION['debug']=='true'))\n\t\t{\n\t\t\terror_reporting(E_ALL);\n\t\t\t$this->renderEngine->display('templates/'.\n\t\t\t\t$this->getTemplate().'/template.tpl.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror_reporting(E_ERROR);\n\t\t\t@$this->renderEngine->display('templates/'.\n\t\t\t\t$this->getTemplate().'/template.tpl.php');\n\t\t}\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6832228", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6832228", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8c29283f68dc94080492764eaaf65591", "score": "0.68183666", "text": "public function moduleConfig(){\n $this->display();\n }", "title": "" }, { "docid": "54596bfdf374a75ceafe5c6b5c5485db", "score": "0.6811645", "text": "public function Show() {\n echo $this->GetHtml();\n }", "title": "" }, { "docid": "681d7c631bdaa3968996b3b2bf9a618d", "score": "0.6802333", "text": "function display(){\n\t\tJHTML::_('behavior.caption');\n\t\t\t\t\n\t\t// Set a default view if none exists\n\t\tif ( ! JRequest::getCmd( 'view' ) ) {\t\t\t\n\t\t\tJRequest::setVar('view', 'mass' );\n\t\t}\n\t\t$viewName\t= JRequest::getVar('view' );\n\t\t$model \t\t= $this->getModel('mass');\t\t\n\t\t$view \t\t= $this->getView($viewName, 'html');\n\t\t$view->setModel($model, true);//set the default model\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$mrp_id\t\t\t= JRequest::getVar('mrp_id', 0);\n\n\t\t\n\t\t//generate a random number to ensure code files do not load from cache.\n\t\t$rand\t\t\t= JRequest::getVar('rand', '');\n\t\n\n\n\t\t$view->display();\t\t\n\t}", "title": "" }, { "docid": "3cfaee8556ef0e0b53ee25dbaefa1ac7", "score": "0.6780307", "text": "public function display()\n {\n $this->mode->display();\n }", "title": "" }, { "docid": "3d5173aeb7a6a36523482d712ced841a", "score": "0.67779505", "text": "public function show() {\n\t\t$user_role = Session::get('role');\n\n\t\tif ($user_role == 'Administrator') {\n\t\t\t$modules = self::modules_config();\n\t\t}\n\t\telse {\n\t\t\t$modules = PermController::modules_config_based_on_roles($user_role, \"Read\");\n\t\t}\n\n\t\tif ($modules) {\n\t\t\treturn view('layouts.app.modules')->with(['data' => $modules]);\n\t\t}\n\t}", "title": "" }, { "docid": "03646a0eff2cb95472bddeb9c867385c", "score": "0.6769207", "text": "public function display(){\n //$this->setLayout(\"page\");\n \n //To get a previously set property;\n //echo $this->get(\"user2\");\n\n //To set the pate title use\n $this->output->setPageTitle(\"Welcome to diddat\");\n \n //to add some js file\n $this->output->addScript(\"some.js\");\n \n //to add some js file\n $this->output->addStyle(\"some.css\");\n \n //to output just the layout use\n //$this->output->raw();\n \n //to output just the xml use\n //$this->output->xml();\n \n //to output as json use\n //$this->output->json();\n \n //parse Layout Demo;\n //$sidebar = $this->output->layout( \"index_sidebar\" );\n $dashboard = $this->output->layout( \"dashboard\" );\n $sidebar = $this->output->layout( \"sidebar\" );\n \n $this->output->addToPosition(\"side\", $sidebar);\n $this->output->addToPosition(\"body\", $dashboard);\n \n }", "title": "" }, { "docid": "127dfa176205b68fd110d594a76a137b", "score": "0.6764156", "text": "public function show()\r\n{\r\n\t$this->parseLang();\r\n\t$this->parseModule();\r\n\treturn $this->header.$this->content.$this->footer;\r\n}", "title": "" }, { "docid": "b20d8a15ecd9c2b3ff3953d7edba45d9", "score": "0.6750425", "text": "public function display() {\n }", "title": "" }, { "docid": "a72554267b0fa66fd60358e2691e0731", "score": "0.67423856", "text": "public function show()\n\t{\n \n \n\t}", "title": "" }, { "docid": "d56523903af509d8db2fb4be5e9cab6f", "score": "0.6737782", "text": "public function displayAction() {\n\n $this->title = 'Display your account';\n $row = $this->_memberModel->getMember($this->_idMember);\n $this->view->item = $row;\n }", "title": "" }, { "docid": "24a666d3f1b84ad00b777d015b85971b", "score": "0.6736351", "text": "public function display() {\n\t\t$current_action = bp_action_variable( 0 );\n\t\t\n\t\tif( $current_action == 'create' ) {\n\t\t\t$this->view_create();\n\t\t\t\n\t\t} elseif ( bcg_is_single_post() ) {\n\t\t\t$this->view_single();\n\t\t}else {\n\t\t\t$this->view_blog();\n\t\t}\n\t\t//just load the plugins template, above functions will attach the content generators\n\t\tbp_core_load_template( 'groups/single/plugins' );\n\t}", "title": "" }, { "docid": "bf8545b2ee454147347b5149cb33a6c8", "score": "0.67346364", "text": "public function show(){\n\t\trequire_once( $this->getCurrentTemplatePath() . 'index.php' );\n\t}", "title": "" }, { "docid": "648e24902e7904caa790059ab18f561b", "score": "0.67148006", "text": "public function display()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "804d7a13de498905e3cedafe12f59d5b", "score": "0.6707299", "text": "function Render() {\n\t\t// allows us to keep the login simple but still use module concepts\n\t\tif($this->Module!=\"authorisation\"){\n\t\t\t$output = $this->getSystemHeader();\n\t\t\tif ($this->UsesModule)\n\t\t\t{\n\t\t\t\t$output .= $this->getModuleHeader();\n\t\t\t\t$output .= $this->Content;\n\t\t\t\t$output .= $this->getModuleFooter();\n\t\t\t}\n\t\t\telse\n\t\t\t\t$output .= $this->Content;\n\t\t\t$output .= $this->getSystemFooter();\n\t\t} else {\n\t\t\t$output .= $this->Content;\n\t\t}\n\t\techo $output;\n\t}", "title": "" }, { "docid": "154b62117f24d3c70d7703f34aed6ddc", "score": "0.6703133", "text": "public function contentAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "60d75839e7155fc08d6777d2cece0974", "score": "0.6677204", "text": "protected function display()\n {\n if(!$this->isAjax())\n {\n if($this->hasTemplate)\n include 'skeleton/' . Settings::get('skeleton') . '/index.php';\n else\n $this->getView();\n }\n\n }", "title": "" }, { "docid": "51541b68b236fe212817175f079fa271", "score": "0.6676249", "text": "public function display()\n {\n parent::output();\n }", "title": "" }, { "docid": "51035ab4fcd394a0e3b07734733f45cf", "score": "0.66704416", "text": "protected function show() {\n }", "title": "" }, { "docid": "99b218fc24b7b2f5af255b9c67a95e26", "score": "0.665163", "text": "public function display() {\n\t\tglobal $theme;\n\t\t$theme->view( $this->template, array( 'layout' => $this ) );\n\t}", "title": "" }, { "docid": "fa8779f6431b84477adcead7c3882393", "score": "0.6645537", "text": "public function display()\n {\n $action = (isset($_GET['act'])) ? $_GET['act'] : '';\n\n switch ($action)\n {\n case 'view':\n default:\n $this->viewPresentation();\n break;\n }\n }", "title": "" }, { "docid": "383334df2ab4cc74a0d43b10dd2b3386", "score": "0.6622869", "text": "public function indexAction() {\n \n $modulesList = IgestisModulesList::getInstance();\n $this->context->render(\"pages/modulesList.twig\", array(\n 'modules_list' => $modulesList->get())\n );\n }", "title": "" }, { "docid": "16b2563abaea0aa32db9bb80141776e6", "score": "0.6615379", "text": "function run()\r\n {\r\n // if (! AdminRights :: is_allowed(AdminRights :: RIGHT_VIEW))\r\n // {\r\n // $this->display_header();\r\n // $this->display_error_message(Translation :: get('NotAllowed', array(), Utilities :: COMMON_LIBRARIES));\r\n // $this->display_footer();\r\n // exit();\r\n // }\r\n\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n $table = new LocalPackageBrowser($this);\r\n\r\n $this->display_header();\r\n echo $this->action_bar->as_html();\r\n echo '<div class=\"clear\"></div>';\r\n echo $table->to_html();\r\n $this->display_footer();\r\n }", "title": "" }, { "docid": "363f8004877011d392036ab97d23047a", "score": "0.66137064", "text": "public function show()\n {\n echo $this->factory->yieldSection();\n }", "title": "" }, { "docid": "b2b6ca42aecea858c003289eff71f40a", "score": "0.6604857", "text": "public function show()\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "b2b6ca42aecea858c003289eff71f40a", "score": "0.6604857", "text": "public function show()\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "1732d27896c96df5253c81fc9f5de236", "score": "0.6586862", "text": "public function showContent() {\n\t\tinclude SampiCMS\\ADMIN_ROOT . '/panels/' . $this->filename . '.php';\n\t}", "title": "" }, { "docid": "24be6e5b53e27860162db9cc99ec832e", "score": "0.658177", "text": "public function display()\n\t{\n\n\t\t//echo \"works!\";\n\t}", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.6581209", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.6581209", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "2164053523742391f53cc18fee815f39", "score": "0.6573338", "text": "public function show() {\r\n\r\n }", "title": "" }, { "docid": "dff0dcc24c7c3548b8b4a5a22e521f60", "score": "0.6553506", "text": "function display()\r\n\t{\r\n\t\t$model = & $this->getModel('evento'); \r\n\t\t$view = JRequest::getString('view');\r\n\t\tif (empty($view)){\r\n\t\t\t$view = 'Mensile';\r\n\t\t}\r\n\t\t$view = & $this->getView($view, 'html');\r\n\t\t$view->setModel( $model );\r\n\t\t$view->display();\r\n\t}", "title": "" }, { "docid": "de74319839526dfa9d107498162e7d19", "score": "0.6547214", "text": "public function show()\n {\n require_once('../view/home.php');\n }", "title": "" }, { "docid": "6c8ffe5011b4a9ca6ffcb6b9c29bf109", "score": "0.65282", "text": "public function display() {\n\n global $CFG, $OUTPUT;\n\n $this->_display_header();\n\n // Other outputs\n if (!empty($this->outputs)) {\n echo $this->outputs;\n }\n\n // Form\n if ($this->moodleform) {\n $this->moodleform->display();\n }\n\n // Footer\n echo $OUTPUT->footer();\n }", "title": "" }, { "docid": "3e5fccb251a5ff362bb1826a1ccec195", "score": "0.6521328", "text": "function display()\n {\n \t$this->addToolbar();\n\t\tparent::display();\n }", "title": "" }, { "docid": "26dd5df8af9e1588202070fb6337e521", "score": "0.651924", "text": "public function run()\n {\n $this->context = Request::get(self::PARAM_CONTEXT);\n $this->registration = \\Chamilo\\Configuration\\Configuration::registration($this->context);\n \n BreadcrumbTrail::getInstance()->add(\n new Breadcrumb(\n null, \n Translation::get(\n 'ViewingPackage', \n array('PACKAGE' => Translation::get('TypeName', null, $this->context)))));\n $this->buttonToolbarRenderer = $this->getButtonToolbarRenderer();\n \n $display = new PackageDisplay($this);\n \n $html = array();\n \n $html[] = $this->render_header();\n $html[] = $this->buttonToolbarRenderer->render();\n $html[] = $display->render();\n $html[] = $this->render_footer();\n \n return implode(PHP_EOL, $html);\n }", "title": "" }, { "docid": "8c325320b7846dd767fcec0d7df981e6", "score": "0.65070343", "text": "function index()\n\t{\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "92553277d4e01e8145785117f5785afa", "score": "0.64956874", "text": "public function index(){\n $this->display();\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.6493694", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.6493694", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.6493694", "text": "public function show()\n {\n }", "title": "" }, { "docid": "9f78e9740d7dff5a2729bbd5f1806c4e", "score": "0.64932585", "text": "public function show()\n {\n echo $this->content;\n }", "title": "" }, { "docid": "a4cfc1a84759c0d8e11883b98eb477f8", "score": "0.6488631", "text": "public function display(){\n\t\techo $this->get();\n\t}", "title": "" }, { "docid": "1ce5325f44f3d6e081199c5004790452", "score": "0.64831555", "text": "protected function index(){\n $this->display();\n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.64811176", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.64811176", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "717e6c0fb41eac046e866a45b1654185", "score": "0.6478495", "text": "protected function displayPage()\n {\n $this->page .= file_get_contents('template/footer.html');\n // include 'template/footer.html';\n echo $this->page;\n }", "title": "" }, { "docid": "b925029afab06b94adc77f65fcb3823b", "score": "0.64733714", "text": "public function displayView() {\n\t\tView::initTwig();\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.64667535", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "e6557732627eb13b39056fe59f230556", "score": "0.64656717", "text": "public function index()\n {\n // it the view file you want to load\n $this->load->module_library(\n FUEL_FOLDER,\n 'fuel_page',\n array('location' => 'hello')\n );\n $this->fuel_page->render();\n \n }", "title": "" }, { "docid": "2a1b188e67b4166b209ca21c8b01b95b", "score": "0.64645267", "text": "public function display(): void {\n\t\t\tif ( $this->is_signed_on() && $this->is_user_allowed() ) {\n\t\t\t\t?>\n\t\t\t<div id=\"app\" class=\"learndash-hub\">\n\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\trequire_once $this->view_path . 'access_denied.php';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.64523244", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.64523244", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.64523244", "text": "public function show();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.6450068", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.6450068", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.6450068", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.6450068", "text": "public function display();", "title": "" }, { "docid": "5c32f7a045f26f6f4e520f05d2f2469b", "score": "0.644369", "text": "public function display()\n\t{\n\t\t// print \"Hello from JoomoogalleryControllerimages::display()<br />\\n\";\n\t\t// $this->printTask();\n\n\t\t$model =& $this->getModel( $this->getModelName() ); // instantiates model class\n\t\t$view =& $this->getView( 'Joomoogalleryimages', 'html' ); // 'html': use view.html.php (not view.php)\n\t\t$view->setModel( $model, true ); // true: this is the default model\n\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "8112d35af58ed28dcd9c3a3c7656bb04", "score": "0.64413124", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "afdd268f6a883120f1e02bd4d09d5b9e", "score": "0.6441205", "text": "public function index()\n\t{\n $this->load->helper(\"form\");\n $array_module = $this->module_model->get();\n $this->load->view(\n 'admin/module/admin_module',\n array(\n\t\t\t\t\"array_module\" => $array_module,\n\t\t\t\t\"page\" => \"module\"\n )\n );\n }", "title": "" }, { "docid": "1e3acc81a0d5a37963dbccccf4e892d8", "score": "0.6437076", "text": "public function display(){\n\t // Auf Aktionen reagieren\n switch($this->action)\n {\n case \"movies\": $this->view->showMovies();\n break;\n case \"info\": $this->view->showInfo();\n break;\n case \"killname\": $this->killSession();\n $this->view->showWelcome();\n break;\n // Fügen Sie hier weitere Inhalte ein!\n default:\n $this->view->showWelcome();\n }\n\t}", "title": "" }, { "docid": "ee014aee73afd3ecaa209f43efc4205a", "score": "0.641428", "text": "function display()\n\t{\n\t\t$app =& JFactory::getApplication();\n\t\t$db =& JFactory::getDBO();\n\t\t// get the total number of records\n\t\t$db->setQuery(\"SELECT count(*) FROM #__fabrik_packages\");\n\t\t$total = $db->loadResult();\n\t\t$context\t\t= 'com_fabrik.package.list.';\n\t\t$limit\t\t\t= $app->getUserStateFromRequest( $context.'limit', 'limit', $app->getCfg('list_limit'), 'int');\n\t\t$limitstart = $app->getUserStateFromRequest( $context.'limitstart', 'limitstart', 0, 'int');\n\t\t$sql = \"SELECT * FROM #__fabrik_packages\";\n\t\t$db->setQuery($sql, $limitstart, $limit);\n\t\tjimport('joomla.html.pagination');\n\t\t$pageNav = new JPagination($total, $limitstart, $limit);\n\t\t$rows = $db->loadObjectList();\n\t\trequire_once(JPATH_COMPONENT.DS.'views'.DS.'package.php');\n\t\tFabrikViewPackage::show($rows, $pageNav);\n\t}", "title": "" }, { "docid": "def7901c9d6116d778fcdd6d7cdb2a53", "score": "0.6411966", "text": "public function display()\n\t{\n\t\t?>\n\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h2><?php echo self::$pageName;?></h2>\n\t\t\t\t<form method=\"post\" action=\"options.php\">\n\n\t\t\t\t\t<?php\n\t\t\t\t\tsettings_fields('company-options');\n\t\t\t\t\tdo_settings_sections('company-options');\n\t\t\t\t\t?>\n\n\t\t\t\t\t<?php submit_button();?>\n\t\t\t\t</form>\n\t\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "b6d07f04a7421c39e1ac5f6128c273c1", "score": "0.63976115", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "f86d79ea898adb1f47eb1b631d8d526c", "score": "0.6380346", "text": "public function display(){\n\t\t\n\t\t$this->eventM->sendEvent('Didplay_Prepare@OWeb\\manage\\Headers');\n\t\t\t\t\n\t\techo \"\\n<!--OWEB displays all CSS includes-->\\n\";\n\t\t//DIsplaying all Css Headers\n\t\tforeach ($this->css_headers as $id => $h){\n\t\t\techo $h->getCode($id);\n\t\t}\n\t\t\n\t\techo \"\\n<!--OWEB displays all JS includes and codes-->\\n\";\n\t\t\n\t\t//Displaying Javascript Headers\n\t\tforeach ($this->js_headers as $id => $h){\n\t\t\techo $h->getCode($id);\n\t\t}\n\t\t\n\t\techo \"\\n<!--OWEB displays personalized header codes-->\\n\";\n\t\t//Displaying all other headers\n\t\tforeach ($this->other_headers as $id => $h){\n\t\t\techo $h->getCode($id);\n\t\t}\n\t\t\n\t\t$this->eventM->sendEvent('Didplay_Done@OWeb\\manage\\Headers');\n\t}", "title": "" }, { "docid": "dd3238aa64178027443926fb708bac7f", "score": "0.63797235", "text": "public function show() {\r\n\t\t\techo $this->parse();\r\n\t\t}", "title": "" }, { "docid": "80c747c389676793a782ad9b3d73eb19", "score": "0.63693994", "text": "protected function display() {\n\t\t//Generate a list of valid expiry dates to populate the add new card form - 10 years into the future\n\t\t$yrs = array();\n\t\tfor($i=0;$i<10;$i++) $yrs[] = (int)date(\"Y\")+$i;\n\n\t\t//Invoke the theme and display the opening page.\n\t\t$theme = $this->getTheme();\n\t\t$theme->assign(\"yrs\",$yrs);\n\t\t$theme->display(DIR_FS_TPL.\"home/home.tpl\");\n\t}", "title": "" }, { "docid": "ea48456a235dc70de1a05ada6b7eec7f", "score": "0.636886", "text": "public function display()\n {\n \n \n \n \n \n $template ='connect.phtml';\n require 'views/layout.phtml';\n \n \n \n \n \n }", "title": "" }, { "docid": "0152e3762a03a72f2e4ec4165a3440e3", "score": "0.6355613", "text": "public function show()\n\t{ \n\t\treturn view();\n\t}", "title": "" }, { "docid": "2d015701dd9e9c87840b1d4ec5ee2e37", "score": "0.63494277", "text": "protected abstract function display();", "title": "" }, { "docid": "68322e9f9855f7aef61391a98f653f3d", "score": "0.6342843", "text": "public function display() {\n\t\t?><!DOCTYPE html>\n<html>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n<?php\n\t\t\n\t\t/* optional meta information */\n\t\tif (($m = $this->description) != \"\") {\n\t\t\techo \"\\t<meta name=\\\"description\\\" content=\\\"\", escape($m), \"\\\">\\n\";\n\t\t}\n\t\tif (($m = $this->keywords) != \"\") {\n\t\t\techo \"\\t<meta name=\\\"keywords\\\" content=\\\"\", escape($m), \"\\\">\\n\";\n\t\t}\n\t\tif (($m = $this->author) != \"\") {\n\t\t\techo \"\\t<meta name=\\\"author\\\" content=\\\"\", escape($m), \"\\\">\\n\";\n\t\t}\n\t\tif (($m = $this->robots) != \"\") {\n\t\t\techo \"\\t<meta name=\\\"robots\\\" content=\\\"\", escape($m), \"\\\">\\n\";\n\t\t}\n\t\t\n\t\t/* CSS & JS files */\n\t\tforeach ($this->getModules() as $module) {\n\t\t\tforeach ($module->resources() as $file => $res) {\n\t\t\t\t// $path = Lonely::model()->configScript.$file;\n\t\t\t\t$location = path(array_merge(array($this->assetsDir), unwebpath($file)));\n\t\t\t\t$path = webpath(array($this->assetsPath, $file));\n\t\t\t\t\n\t\t\t\t/* write the file to assets directory and let the web server handle requests */\n\t\t\t\tif ((!is_file($location) || filemtime($location) < $res->whenModified()) && touch_mkdir($location)) {\n\t\t\t\t\tfile_put_contents($location, $res->getContent());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($res instanceof CSSFile) {\n\t\t\t\t\techo \"\\t<link type=\\\"text/css\\\" rel=\\\"stylesheet\\\" href=\\\"\", escape($path), \"\\\"\", ($res->media != '' ? \" media=\\\"\".escape($res->media).\"\\\"\" : \"\"), \">\\n\";\n\t\t\t\t} else if ($res instanceof JSFile) {\n\t\t\t\t\techo \"\\t<script type=\\\"text/javascript\\\" src=\\\"\", escape($path), \"\\\"></script>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* page title */\n\t\techo \"\\t<title>\", escape($this->HTMLTitle ?: $this->title), \"</title>\\n\";\n\t\t\n\t\tif (isset($this->HTMLHead)) {\n\t\t\techo strtr($this->HTMLHead, array(\"\\n\" => \"\\n\\t\"));\n\t\t}\n\t\n\t?></head>\n<body>\n\t\n\t<h1>\n\t\t<a href=\"<?php echo escape($this->rootScriptClean); ?>\"><?php echo escape($this->title); ?></a>\n\t</h1>\n\n\t<div id=\"content\">\n\n\t\t<?php if (isset($this->HTMLContent)) {\n\t\t\techo strtr($this->HTMLContent, array(\"\\n\" => \"\\n\\t\\t\"));\n\t\t} ?>\n\t\n\t</div>\n\t\n\t<?php echo $this->footer.\"\\n\"; ?>\n\t\n<!-- execution: <?php echo round((microtime(true) - $this->startTime) * 1000, 3); ?> ms -->\n</body>\n</html><?php\n\t\t\n\t}", "title": "" }, { "docid": "4827ce52ab090a653032deefbb27f428", "score": "0.6339592", "text": "public function display_admin_page(){\n\t\ttry{\n\t\t\tif(!in_array($this->view, $this->allowed_views)){\n\t\t\t\t$this->throw_error(__('Bad Request', 'revslider'));\n\t\t\t}\n\n\t\t\tswitch ($this->view){\n\t\t\t//switch URLs to corresponding php files\n\t\t\tcase 'slide':\n\t\t\t\t$view = 'builder';\n\t\t\t\tbreak;\n\t\t\tcase 'sliders':\n\t\t\tdefault:\n\t\t\t\t$view = 'overview';\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->validate_filepath($this->path_views . $view . '.php', 'View');\n\n\t\t\trequire $this->path_views . 'header.php';\n\t\t\trequire $this->path_views . $view . '.php';\n\t\t\trequire $this->path_views . 'footer.php';\n\n\t\t}catch(Exception $e){\n\t\t\t$this->show_error($this->view, $e->getMessage());\n\t\t}\n\t}", "title": "" } ]
ae44b030206a7a369c2db22ded664967
menampilkan data transaksi yang sedang melakukan proses berdasarkan session id pelanggan dan status order = 1 serta id transaksi
[ { "docid": "9fab92efd54a4178fcc4473c8443cc73", "score": "0.0", "text": "public function diproses()\n\t{\n\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_transaksi');\n\t\t$this->db->where(\n\t\t\t'id_pelanggan',\n\t\t\t$this->session->userdata('id_pelanggan'),\n\t\t);\n\t\t$this->db->where('status_order=1');\n\n\n\t\t$this->db->order_by('id_transaksi', 'desc');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" } ]
[ { "docid": "30e56309239eaab2ba8780b8f1c8da21", "score": "0.64188313", "text": "function checkoutTransaksiBaru(){\n $idUser = $this->input->post('id_user');\n $idStatus = $this->input->post('id_status_transaksi');\n $orderDetail = $this->input->post('order_detail');\n \n\n $sqlUpdate = \"Update tb_keranjang SET id_status_transaksi = 2 WHERE id_user = $idUser AND id_status_transaksi = 1 AND detail_order = $orderDetail\";\n\n $saveQuery = $this->db->query($sqlUpdate);\n\n if($saveQuery){\n $data['status'] = 200;\n $data['message'] = \"Successfully Update Product\";\n\n }\n else{\n $data['status'] = 404;\n $data['message'] =\"Failed Update Product\";\n }\n echo json_encode($data);\n\n }", "title": "" }, { "docid": "74f643ce0d2d3eb4cb7a5020e8f5f6c4", "score": "0.6418643", "text": "public function ubah_status_pros()\n {\n $st = $this->uri->segment(3);\n $id_pros = $this->uri->segment(4);\n\n $data = ['status' => $st];\n\n $this->M_prospektus->proses_ubah_status_pros($data, array('id_prospektus' => $id_pros));\n\n // ubah keterangan pada tabel blok menjadi null\n $hasil_id_blok = $this->M_prospektus->ambil_id_blok($id_pros)->row_array();\n\n if ($st == 1) {\n\n $data2 = ['keterangan' => null];\n\n $this->M_prospektus->proses_ubah_ket_blok($data2, $hasil_id_blok['id_blok']);\n\n } elseif ($st == 2) {\n\n $data2 = ['keterangan' => 'kontributor'];\n\n $this->M_prospektus->proses_ubah_ket_blok($data2, $hasil_id_blok['id_blok']);\n }\n\n redirect('prospektus/approve_pros');\n }", "title": "" }, { "docid": "e945a374eef1034e839f803d640f6171", "score": "0.6404535", "text": "public function actionOrderSuccess($payid, $tid, $amt) {\n if (isset(Yii::app()->session['orderid']) && Yii::app()->session['user']['id'] != '') {\n $order = Order::model()->findByPk(Yii::app()->session['orderid']);\n $userdetails = UserDetails::model()->findByPk(Yii::app()->session['user']['id']);\n $check_product_option = OrderProducts::model()->findAllByAttributes(array('order_id' => $order->id, 'status' => 1));\n\n $wallet_history = WalletHistory::model()->findByAttributes(array('user_id' => Yii::app()->session['user']['id'], 'type_id' => 4, 'ids' => Yii::app()->session['orderid']));\n if (!empty($order) && !empty($userdetails)) {\n if ($order->payment_mode == 1 || $order->payment_mode == 4) {\n $userdetails->wallet_amt = $userdetails->wallet_amt - $order->wallet;\n $userdetails->save();\n $wallet_history->field1 = 1;\n $wallet_history->save(FALSE);\n }\n\n $order->payment_status = 1;\n $order->status = 1;\n $order->transaction_id = $payid;\n if ($order->save()) {\n\n $this->SuccessMail();\n $this->OrderHistory($order->id, 8, 'Order Placed');\n\n Yii::app()->session['user'] = $userdetails;\n $this->render('payment_success', ['payid' => $payid, 'tid' => $tid, 'amt' => $amt]);\n }\n } else {\n $this->redirect(array('OrderFailed'));\n }\n } else {\n //echo Yii::app()->session['orderid'] . ' ' . Yii::app()->session['user']['id'];\n // exit;\n $this->redirect(array('site/error'));\n }\n }", "title": "" }, { "docid": "7da286f30ea724eaac99f516c789b56b", "score": "0.6365981", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n \n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/');\n\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n \n if ($result->getState() == 'approved') {\n\n#-------------------SE ALMACENA LA COMPRA--------------------#\n #$this->saveOrder();\n #$usuario = Auth::id();\n #$cliente = 16;#NO TENGO CLARO DE DONDE OBTENGO EL SESSION DEL CLIENTE\n\n $cliente = 16;\n $usuario = Auth::id();#NO TENGO CLARO DE DONDE OBTENGO EL SESSION DEL CLIENTE\n\n $total = Cart::total();\n \n DB::beginTransaction();\n try {//db transaccion \n $id = DB::table('Ventas')->insertGetId( ['total' => $total,'id_user' => $usuario, 'id_cliente' => $cliente]);\n\n #--- ALMACENANDO DETALLE_PAGO\n $id_tipo_pago=1; # Por el momento 1 por paypal, solamente funcionando, una vez se coloque otro tipo de pago debe hacerce un casopara almacenar cada tipo de pago\n\n # $cliente = 3; #Por el momento se coloca cliente de manera manual\n\n DB::table('ventas_detalle_pago')->insert( ['id_venta' => $id, 'id_tipo_pago' => $id_tipo_pago,'id_user' => $usuario,'id_cliente' => $cliente,'referencia' => $payment_id]);\n\n \n foreach (Cart::content() as $item) { \n\n #----Buscando el precio en la tabla curso\n if($item->model->id_categoria == 1){\n\n $product = DB::table('products AS P')\n ->join('Cursos AS C', 'C.id_curso', '=', 'P.id_curso') \n #id_p tiene el id delcurso paquete o promocion segun sea el caso\n ->select('C.id_curso AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first();\n\n \n #---Buscando el precio en la tabla promociones\n } if($item->model->id_categoria == 3){\n\n $product = DB::table('products AS P')\n ->join('Promociones AS C', 'C.id_promocion', '=', 'P.id_promocion') \n \n ->select('C.id_promocion AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first(); \n \n\n\n #---Buscando el precio en la tabla paquetes\n } if($item->model->id_categoria == 2){\n\n $product = DB::table('products AS P')\n ->join('Paquetes AS C', 'C.id_paquete', '=', 'P.id_paquete') \n \n ->select('C.id_paquete AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first(); \n } \n #---- ALMACENADO VENTAS_DETALLE\n $id_venta_d=DB::table('Ventas_Detalle')->insertGetId(['id_venta' => $id, 'id_producto' => $item->id, 'precio_venta' => $product->precio]);\n\n\n\n #--- ALMACENANDO VENTAS_SUBDETALLE - UNA SENTENCIA SEGUN SEA LA CATEGORIA\n\n if($item->model->id_categoria == 1){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_curso' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO ( CURSO ) \n\n } elseif($item->model->id_categoria == 3){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_promocion' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO PROMOCION) \n\n\n } elseif($item->model->id_categoria == 2){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_paquete' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO (PAQUETE) \n\n }\n\n\n \n /*\n DB::table('Ventas_Detalle')->insert(\n ['id_producto' => $item->id, 'precio_venta' => $product->precio]); */\n \n } //foreach\n DB::commit(); // todo ok\n\n }catch(Exception $e){\n \n DB::rollback();\n\n } // catch\n\n\n\n\n \n#------------------------------------------------------------#\n\n\n\n \\Session::put('success', 'Payment success');\n \\Session::forget('cart');# inicializando carrito\n return redirect()->route('cart.index')->withSuccessMessage('Su pago ha sido recibido de forma exitosa bajo el #'. $payment_id); \n\n\n }\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/');\n\n }", "title": "" }, { "docid": "a01db12f9d9a076528269dae7e4a4dce", "score": "0.633627", "text": "function getDataOrder(){\n $idCheckout = $this->input->post('id_checkout');\n $orderStatus = $this->input->post('order_status');\n\n $this->db->select(\"*\");\n $this->db->from(\"tb_order\");\n $this->db->where(\"order_status\", $orderStatus);\n $this->db->where(\"id_checkout\", $idCheckout);\n $this->db->join(\"tb_konsumen\", \"tb_konsumen.id_konsumen = tb_order.id_user\");\n $this->db->join(\"tb_payment\", \"tb_payment.id_payment = tb_order.id_payment\");\n $this->db->join(\"tb_status_transaksi\", \"tb_status_transaksi.id_status_transaksi = tb_order.order_status\");\n $this->db->order_by(\"tb_order.tanggal_order\",\"DESC\");\n\n $query = $this->db->get();\n if($query -> num_rows() >0)\n {\n $data['message'] = \"Successfully Get Data Order\";\n $data['status'] = 200;\n $data['dataOrder'] = $query->result();\n }\n else\n {\n $data['message'] = \"Failed Get Data Order\";\n $data['status'] = 400;\n }\n\n echo json_encode($data);\n }", "title": "" }, { "docid": "fb59a006b7d21563258d1136bf9d00cb", "score": "0.63096577", "text": "function transaksi_post() {\n \t$response['post'] = $this->post();\n \ttry {\n\t\t\t$tglJam = $this->post('tgl_jam');\n\t $dispenser = $this->post('dispenser');\n\t $nozle = $this->post('nozle');\n\t $bbm = $this->post('bbm');\n\t $liter = $this->post('liter');\n\t $harga = $this->post('harga');\n\t $totalHarga = $this->post('total_harga');\n\t $idKartu = $this->post('id_kartu');\n\t $idRing = $this->post('id_ring');\n\t $odometer = $this->post('odometer');\n\t $ctr = $this->post('ctr');\n\t $idSpbu = $this->post('idspbu');\n\t $konsumenIdJenis = $this->post('konsumen_id_jenis');\n\t $bayarIdJenis = $this->post('bayar_id_jenis');\n\t $totalizer = $this->post('totalizer');\n\t $type_procedure = $this->post('type_procedure');\n\t \n\t $existinDb = $this->get_model->getTTransaksi($idSpbu, strval(strtotime($tglJam)));\n\t if ($existinDb == NULL || $existinDb[0] == NULL){\n\t\t\t\t$response['insert_result'] = $this->insert_model->insertTTransaksi($tglJam, $dispenser, $nozle, $bbm, $liter, $harga, $totalHarga, \n\t\t\t\t\t$idKartu, $idRing, $odometer, $ctr, $idSpbu, $konsumenIdJenis, $bayarIdJenis, $totalizer, $type_procedure);\n\t\t\t\t\n\t\t\t\tif ($response['insert_result'] == 1){\n\t\t\t\t\t// transaksi sudah tercatat di database\n\t\t\t\t\t$ring = $this->get_model->getMRing($idRing);\n\t\t\t\t\tif ($ring != NULL){\n\t\t\t\t\t\t$this->update_model->updateKuotaRing($idRing, $ring[0]['sisa_quota'] - $liter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"ERROR INSERT :: Record with the same spbu and datetime already existed\" ), 406);\n\t\t\t}\n\t\t} catch (Exception $ex) {\n\t\t\t$this->response(array( 'status' => \"Caught in exception :: \" . $ex->getMessage() ), 406);\n\t\t}\n }", "title": "" }, { "docid": "8bd098003d92f848d30967e887533137", "score": "0.62946534", "text": "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n \t$key = $_REQUEST['id'];\r\n \t//$key = 2;\r\n \t$condition['id'] = $key;\r\n \t$form = M(\"orderinfo\");\r\n \t$data = $form->where($condition)->find();\r\n \t//echo $data;\r\n \tif ($data['status'] == \"下单成功\") $data['status'] = \"烹饪中\";\r\n \telse if ($data['status'] == \"烹饪中\") $data['status'] = \"送餐途中\"; \r\n \telse if ($data['status'] == \"送餐途中\") $data['status'] = \"餐已收到\";\r\n \t$form->save($data);\r\n \t//$this->display();\r\n }", "title": "" }, { "docid": "cbd41af6f5937c36eda4289a49b9751c", "score": "0.62886024", "text": "function transactionApproved(){ //order transaction check if it is an approved\n $UserId=$_SESSION['user_session'];\n $ustatus =0;\n $status=\"1\";\n $stmt = $db_con->prepare(\"SELECT * FROM transaction WHERE user_id=:userId AND status=:ustatus \");\n $stmt->execute(array(\":userId\"=>$UserId,\":ustatus\"=>$ustatus ));\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC))\n {\n // get chef details\n $transactionOrder= $row['transaction_id']; //dish id\n \n echo $transactionOrder;\n \n \n }\n }", "title": "" }, { "docid": "ba744ea9bdd622f4ffb92147a98cdda4", "score": "0.62347966", "text": "public function cetak($id)\n\t{\n\t\t$data['admin'] = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$data['penyewa'] = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\n\t\t/*untuk dipakai controller, cek email ada atau tidak dalam database */\n\t\t$admin = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$penyewa = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\n\t\t$transaksi\t=\t$this->M_transaksi;\n\n\t\t$data['content'] = $transaksi->getTransaksi2($id);\n\n\t\t$data['id_sewa']\t=\t$id;\n\n\t\t/* menghitung total dari id sewa*/\n\t\t$data['total'] = $transaksi->getTotal2($id);\n\t\t$data['totalDP'] = $transaksi->getTotalDPbyId($id);\n\n\n\n\t\t/* cek keberadaan email didalam database jika ada masuk*/\n\t\tif ($penyewa == true || $admin == true) {\n\n\n\t\t\t/*$ses_id_sewa = $this->session->userdata('id_sewa');\t*/\n\t\t\t/* Cek id sewa dari session*/\n\t\t\t/*if ($ses_id_sewa) {*/\n\t\t\t\t\n\t\t\t\t$this->load->view('user/transaksi/selesai',$data);\n\n\t\t\t\t$this->session->unset_userdata('id_sewa');\n\t\t\t\t$this->session->unset_userdata('payment');\n\n\n\n/*\n\t\t\t} else {\n\n\t\t\t\t$this->session->set_flashdata('pesan','<div class=\"alert alert-danger\">\n\t\t\t\t\tTidak menemukan Kode Sewa.\n\t\t\t\t</div>');\n\t\t\t\tredirect('');\n\t\t\t}*/\n\t\t\n\n\t\t\t/*jika email tidak terdaftar, di destroy dan ke halaman utama*/\n\t\t} else {\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('');\n\t\t}\n\t}", "title": "" }, { "docid": "a51a4ecf4c5ca2ac83f849f0f83dbb5c", "score": "0.6184889", "text": "function order($dataOrder){\n\tglobal $conn;\n\n\t$id_user = htmlspecialchars($dataOrder[\"id_user\"]);\n\n\t$nama = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"nama\"])))))))));\n\n\t$no_telp = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"no_telp\"])))))))));\n\n\t$alamat = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"alamat\"])))))))));\n\n\t$jenis = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jenis\"])))))))));\n\n\t$jumlah_unit = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jumlah_unit\"])))))))));\n\n\t$tgl_pakai = htmlspecialchars($dataOrder[\"tgl_pakai\"]);\n\n\t$jangka_waktu = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jangka_waktu\"])))))))));\n\n\t$total = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"total\"])))))))));\n\n\t$status = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"status\"])))))))));\n\n\t$tgl_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"tgl_transaksi\"])))))))));\n\n\t$bln_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"bln_transaksi\"])))))))));\n\n\t$thn_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"thn_transaksi\"])))))))));\n\n\n\t// check empty tgl_transaksi\n\tif( empty($tgl_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check empty bln_transaksi\n\tif( empty($bln_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check empty thn_transaksi\n\tif( empty($thn_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode tgl_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($tgl_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode bln_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($bln_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode thn_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($thn_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\n\n\n\n\t// check encode nama\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($nama)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nama tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty nama\n\tif( empty($nama) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nama tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode no_telp\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($no_telp)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nomor telepon tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty no_telp\n\tif( empty($no_telp) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nomor telepon tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode alamat\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($alamat)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Alamat tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty alamat\n\tif( empty($alamat) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Alamat tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t\t// check encode jenis\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jenis)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jenis\n\tif( empty($jenis) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode jumlah_unit\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jumlah_unit)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jumlah tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jumlah_unit\n\tif( empty($jumlah_unit) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jumlah tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode jangka_waktu\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jangka_waktu)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jangka waktu tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jangka_waktu\n\tif( empty($jangka_waktu) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jangka waktu tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode total\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($total)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Total tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty total\n\tif( empty($total) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Total tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t\n\n\t// query_order\n\t$query_order = \"INSERT INTO tb_order VALUES(null, '$id_user', '$nama', '$no_telp', '$alamat', '$jenis', '$jumlah_unit', '$tgl_pakai', '$jangka_waktu', '$total', '$status', '$tgl_transaksi', '$bln_transaksi', '$thn_transaksi') \";\n\tmysqli_query($conn, $query_order);\n\n\t// query_laporan\n\t$query_laporan = \"INSERT INTO tb_laporan VALUES(null, '$id_user', '$nama', '$no_telp', '$alamat', '$jenis', '$jumlah_unit', '$tgl_pakai', '$jangka_waktu', '$total', '$status', '$tgl_transaksi', '$bln_transaksi', '$thn_transaksi') \";\n\tmysqli_query($conn, $query_laporan);\n\treturn mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "f511417ab1ae6fde83b0698f7ac206ce", "score": "0.617459", "text": "function getOrder(){\n $idUser = $this->input->post(\"id_user\");\n $orderStatus = $this->input->post(\"order_status\");\n\n $this->db->select(\"*\");\n $this->db->from(\"tb_order\");\n $this->db->where(\"tb_order.id_user\", $idUser);\n $this->db->where(\"tb_order.order_status\", $orderStatus);\n\n $this->db->join(\"tb_konsumen\", \"tb_konsumen.id_konsumen = tb_order.id_user\");\n\n $this->db->join(\"tb_payment\", \"tb_payment.id_payment = tb_order.id_payment\");\n\n $this->db->join(\"tb_status_transaksi\", \"tb_status_transaksi.id_status_transaksi = tb_order.order_status\");\n \n $this->db->order_by(\"tb_order.tanggal_order\",\"DESC\");\n\n $query = $this->db->get();\n if($query -> num_rows() >0)\n {\n $data['message'] = \"Successfully Get Data Order\";\n $data['status'] = 200;\n $data['dataOrder'] = $query->result();\n }\n else\n {\n $data['message'] = \"Failed Get Data Order\";\n $data['status'] = 400;\n }\n\n echo json_encode($data);\n }", "title": "" }, { "docid": "e91e19c87fe1168338644b74639e8e4c", "score": "0.6116717", "text": "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "title": "" }, { "docid": "4b23b31698bab29ff46059061fdc16a3", "score": "0.6111837", "text": "function payment_success()\n {\n\t\t\t/*log_message('INFO', 'Inside order2/payment_success');\n\t\t\t$this->morder->equateProductsQuantities();\n\t\t\tlog_message('INFO', 'end equateProductsQuantities()______________________________________________________');*/\n\t\t\t/* END ADDED BY SHAMMI SHAILAJ */\n\t\t\t\n //print \"<p>inside payments success</p>\";\n include('header_include.php');\n $data['email'] = $this->session->userdata('email');\n $this->session->unset_userdata('email');\n $txnid= $this->session->userdata('e_txn_id');\n $data['transID'] = $txnid;\n //print \"<p>transID = \".$txnid.\"</p>\";\n if(is_null($this->session->userdata('e_txn_id')) || strcmp($this->session->userdata('e_txn_id'), \"\") === 0)\n {\n $data['transID'] = NULL;\n }\n $this->session->unset_userdata('e_txn_id');\n \n //purchase email\n $this->load->model('vc_orders');\n /* following code added by shammi to generate data for sokrati and ecommerce tracking */\n if(!is_null($data['transID']))\n {\n $transDataDB = $this->vc_orders->orderDetails($data['transID']);\n //print \"<pre>\";print_r($transDataDB);print \"</pre>\";\n //exit();\n if($transDataDB !== FALSE)\n {\n $data['prodsCount'] = count($transDataDB);\n $data ['buyerFName'] = $transDataDB[0]->shipping_fname;\n $data ['buyerLName'] = $transDataDB[0]->shipping_lname;\n $data['buyerAddress'] = $transDataDB[0]->shipping_address;\n $data['buyerCity'] = $transDataDB[0]->shipping_city;\n $data['buyerPinCode'] = $transDataDB[0]->shipping_pincode;\n $data['buyerState'] = $transDataDB[0]->shipping_state;\n $data['buyerCountry'] = $transDataDB[0]->shipping_country;\n $data['buyerUserID'] = $transDataDB[0]->user_id;\n $data['tax'] = 0;\n $grandTotal = 0;\n $products = array();\n if(is_array($products))\n {\n for($j=0;$j < $data['prodsCount']; $j++)\n {\n $product = new productInfo;\n $product->storeID = $transDataDB[$j]->store_id;\n $product->storeName = $transDataDB[$j]->store_name;\n $order_no = $transDataDB[$j]->order_id;\n $product->orderID = $transDataDB[$j]->order_id;\n $product->productName = $transDataDB[$j]->product_name;\n $product->vSize = $transDataDB[$j]->vsize;\n $product->vColor = $transDataDB[$j]->vcolor;\n $product->unitPrice = $transDataDB[$j]->amt_paid;\n $product->quantity = $transDataDB[$j]->quantity;\n $grandTotal += $transDataDB[$j]->amt_paid * $transDataDB[$j]->quantity;\n $product->productID = $transDataDB[$j]->product_id; \n $product->cid = $transDataDB[$j]->couponid;\n $products[$j] = $product;\n /* ADDED BY SHAMMI SHAILAJ to keep quantities in the new and old products table EQUAL (NEW METHOD)*/\n\t\t\t\t\t\t\t//log_message('INFO', 'Inside order2/payment_success');\n\t\t\t\t\t\t\t$this->load->model('slog');\n\t\t\t\t\t\t\t$this->slog->write(array('level' => 1, 'msg' => 'Inside order2/payment_success'));\n\t\t\t\t\t\t\t$this->morder->equateProductsQuantities2($product->productID);\n\t\t\t\t\t\t\t//log_message('INFO', 'end equateProductsQuantities2()______________________________________________________');\n\t\t\t\t\t\t\t$this->load->model('slog');\n\t\t\t\t\t\t\t$this->slog->write(array('level' =>1, 'msg' => 'end equateProductsQuantities2()______________________________________________________'));\n /* END ADDED BY SHAMMI SHAILAJ */\n }\n }\n else\n {\n $product = new productInfo;\n $product->storeID = $transDataDB->store_id;\n $product->storeName = $transDataDB->store_name;\n $order_no = $transDataDB->order_id;\n $product->orderID = $transDataDB->order_id;\n $product->productName = $transDataDB->product_name;\n $product->vSize = $transDataDB->vsize;\n $product->vColor = $transDataDB->vcolor;\n $product->unitPrice = $transDataDB->amt_paid;\n $product->quantity = $transDataDB->quantity;\n $product->productID = $transDataDB->product_id;\n $product->cid = $transDataDB->couponid;\n $grandTotal += $transDataDB->amt_paid * $transDataDB->quantity;\n $products[] = $product;\n }\n $data['grandTotal'] = $grandTotal;\n $data['products'] = $products;\n }\n //print \"<pre>\";print_r($transDataDB);print \"</pre>\";\n }\n /* end code added by shammi to generate data for sokrati and ecommerce tracking */\n $base_url = base_url();\n $ip_address = (string)$this->input->ip_address();\n //log_message('Info',\"Ipaddress = $ip_address\");\n $this->load->model('slog');\n $this->slog->write(array('level' => 1, 'msg' => \"Ipaddress = $ip_address\"));\n if($ip_address!='127.0.0.1')\n {\n //log_message('Info',\"Allow mail as the Ip is not 127.0.0.1\");\n $this->load->model('slog');\n $this->slog->write(array('level' =>1, 'msg' => \"Allow mail as the Ip is not 127.0.0.1\"));\n $mail_info = $this->vc_orders->purchaseMailDetails($txnid);\n $this->slog->write(array('level' =>1 ,'msg' => \"mail_info FROM ORDERS2/PAYMENT_SUCCESS_____\".print_r($mail_info, TRUE)));\n if($mail_info!=0)\n {\n $count_prod = count($mail_info);\n $buyer_name = $mail_info[0]['shipping_fname'].' '.$mail_info[0]['shipping_lname'];\n $shipping_address = $mail_info[0]['shipping_address'];\n $shipping_city = $mail_info[0]['shipping_city'];\n $pin_code = $mail_info[0]['shipping_pincode'];\n $couponcode = $mail_info[0]['couponid'];\n $payment_mode = $mail_info[0]['pg_type'];\n if ($payment_mode=='COD')\n {\n $payment_mode = 'Cash on Delivery';\n }\n elseif ($payment_mode=='CC')\n {\n $payment_mode = 'Credit Card';\n }\n elseif ($payment_mode=='DC')\n {\n $payment_mode = 'Debit Card';\n }\n elseif ($payment_mode=='NB')\n {\n $payment_mode = 'Net Banking';\n }\n \n for($j=0;$j<$count_prod;$j++)\n {\n $order_no = $mail_info[$j]['order_id'];\n $product_name = $mail_info[$j]['product_name'];\n $variant_size = \"Size: \".$mail_info[$j]['variant_size'];\n $variant_color = \"Color: \".$mail_info[$j]['variant_color'];\n $variant_details = \"\";\n $this->slog->write(array('level' => 1,'msg' => \"INDEX MAIL VALUE\".print_r($mail_info[$j]['sent_email_id'],TRUE)));\n if ($mail_info[$j]['variant_size']==\"0\" and $mail_info[$j]['variant_color']==\"0\")\n {\n $variant_details = \"\";\n }\n elseif ($mail_info[$j]['variant_size']!=\"0\" and $mail_info[$j]['variant_color']==\"0\")\n {\n $variant_details = \" - (\".$variant_size.\")\";\n }\n elseif ($mail_info[$j]['variant_size']==\"0\" and $mail_info[$j]['variant_color']!=\"0\")\n {\n $variant_details = \" - (\".$variant_color.\")\";\n }\n elseif ($mail_info[$j]['variant_size']!=\"0\" and $mail_info[$j]['variant_color']!=\"0\")\n {\n $variant_details = \" - (\".$variant_size.\",\".$variant_color.\")\";\n }\n $process_days = (int)$mail_info[$j]['process_days'];\n $productImagePath = './assets/images/stores/'.$mail_info[$j]['store_id'].'/'.$mail_info[$j]['product_id'].'/';\n if(file_exists($productImagePath.'fancy3.jpg'))\n {\n $productImage = $productImagePath.'fancy3.jpg';\n }\n elseif(file_exists($productImagePath.'fancy3.JPG'))\n {\n $productImage = $productImagePath.'fancy3.JPG';\n }\n else\n {\n $productImage = '';\n }\n //log_message('INFO', 'NOW queueing buyer EMAIL '.$mail_info[$j]['sent_email_id'].' for order no '.$mail_info[$j]['order_id']);\n $this->load->model('slog');\n $this->slog->write(array('level' => 1 , 'msg' => 'NOW queueing buyer EMAIL '.$mail_info[$j]['sent_email_id'].' for order no '.$mail_info[$j]['order_id']));\n include 'mail_4.php';\n //Buyer Purchase Email\n $this->load->model('automate_model');\n\t\t\t\t\t\t\t$jobType = 1; // an email job\n\t\t\t\t\t\t\t$jobCommand = \"/usr/bin/php5 \".__DIR__.\"/../../index.php automate email\";\n\t\t\t\t\t\t\t/* $jobScheduledTime = mktime(20, 37, 00, 10, 21, 2013); // 4:35:00 pm 12th October 2013 */\n\t\t\t\t\t\t\t$jobScheduledTime = (time() + 66); // current time + 1 minute 6 seconds\n\t\t\t\t\t\t\t$jobDetails = array\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t'to' => $mail_info[$j]['sent_email_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t'bcc' => '[email protected],[email protected]',\n\t\t\t\t\t\t\t\t\t\t\t\t'subject' => \"Your order with BuynBrag.com for order ID \".$order_no,\n\t\t\t\t\t\t\t\t\t\t\t\t'msg' => $purchase_message\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->automate_model->createJob($jobType, $jobCommand, $jobScheduledTime, $jobDetails);\n\t\t\t\t\t\t\t$this->slog->write( array('level' => 1, 'msg' => \"<p>An Email job has been created and will be executed on or after \".date('l, F jS, Y', $jobScheduledTime).\" at \".date('g:i:s A (P)', $jobScheduledTime).\" </p>\" ) );\n\n\t\t\t\t\t\t\t$smsMsg = \"Dear \".$mail_info[$j]['shipping_fname'].' '.$mail_info[$j]['shipping_lname'].\", \\r\\n Thank you for placing an order with us. Your order ID \".$mail_info[$j]['order_id'];\n\t\t\t\t\t\t\t$smsMsg .= \" will be dispatched by \".date( \"d-M-Y\", ( strtotime($mail_info[$j]['date_of_pickup']) ) ).\". Once dispatched, it will reach you in 1-5 working days. Contact us on +91-8130878822 or [email protected] \\r\\n Team BuynBrag\";\n\n\t\t\t\t\t\t\t$smsNo = $mail_info[$j]['shipping_phoneno'];\n\t\t\t\t\t\t\tif($smsNo == '' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$smsNo = NULL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->load->model('smsc');\n\t\t\t\t\t\t\t$this->smsc->sendSMS($smsNo, $smsMsg);\n\t\t\t\t\t\t\t$this->slog->write( array( 'level' => 1, 'msg' => 'Just sent an SMS to '.json_encode($smsNo).'. The msg sent is <p>'.$smsMsg.'</p>' ) );\n\n\t\t\t\t\t\t\t// now set an email job to be executed only after 24 hours if the seller has not sent the mail\n\t\t\t\t\t\t\t$orderEmail11Data = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$orderEmail11Data['storeOwnerName'] = $mail_info[$j]['owner_name'];\n\t\t\t\t\t\t\t$orderEmail11Data['orderID'] = $mail_info[$j]['order_id'];\n\t\t\t\t\t\t\t$orderEmail11Data['dispatchDate'] = $mail_info[$j]['date_of_pickup'];\n\t\t\t\t\t\t\t$orderEmail11Data['storeOwnerEmail'] = $mail_info[$j]['contact_email'];\n\t\t\t\t\t\t\t$orderEmail11Data['storeName'] = $mail_info[$j]['store_name'];\n\t\t\t\t\t\t\t$orderEmail11Data['productName'] = $mail_info[$j]['product_name'];\n\t\t\t\t\t\t\t$orderEmail11Data['productID'] = $mail_info[$j]['product_id'];\n\t\t\t\t\t\t\t$orderEmail11Data['bnbProductCode'] = $mail_info[$j]['bnb_product_code'];\n\t\t\t\t\t\t\t$orderEmail11Data['amountPaid'] = $mail_info[$j]['amt_paid'] * $mail_info[$j]['quantity'];\n\t\t\t\t\t\t\t$orderEmail11Data['paymentType'] = $mail_info[$j]['pg_type'];\n\t\t\t\t\t\t\t$orderEmail11Data['buyerName'] = $mail_info[$j]['shipping_fname'].\" \".$mail_info[$j]['shipping_lname'];\n\t\t\t\t\t\t\t$orderEmail11Data['buyerAddress'] = $mail_info[$j]['shipping_address'].\"<br/>\".$mail_info[$j]['shipping_city'].\"<br/>\".$mail_info[$j]['shipping_pincode'];\n\t\t\t\t\t\t\t$orderEmail11Data['buyerContactNumber'] = $mail_info[$j]['shipping_phoneno'];\n\t\t\t\t\t\t\t$orderEmail11Data['processingTime'] = $mail_info[$j]['process_days'];\n\n\t\t\t\t\t\t\t$orderEmail11 = $this->load->view('emailers/orderEmail11', $orderEmail11Data, TRUE);\n\n\t\t\t\t\t\t\t$jobType = 4; // a check and then send email job depending upon the result of the check\n\t\t\t\t\t\t\t$jobCommand = \"/usr/bin/php5 \".__DIR__.\"/../../index.php automate index\";\n\t\t\t\t\t\t\t/* $jobScheduledTime = mktime(20, 37, 00, 10, 21, 2013); // 4:35:00 pm 12th October 2013 */\n\t\t\t\t\t\t\t$jobScheduledTime = (time() + 86460); // current time + 1 day (24 hrs 1 minute)\n\t\t\t\t\t\t\t$jobDetails = array\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t'orderID' => $order_no,\n\t\t\t\t\t\t\t\t\t\t\t\t'to' => ( (empty($mail_info[$j]['contact_email']) )? $mail_info[$j]['contact_email'] : '[email protected]'),\n\t\t\t\t\t\t\t\t\t\t\t\t'bcc' => '[email protected],[email protected],[email protected]',\n\t\t\t\t\t\t\t\t\t\t\t\t'subject' => \"Your order with BuynBrag.com for order ID \".$order_no,\n\t\t\t\t\t\t\t\t\t\t\t\t'msg' => $orderEmail11\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->automate_model->createJob($jobType, $jobCommand, $jobScheduledTime, $jobDetails);\n\t\t\t\t\t\t\t$this->slog->write( array('level' => 1, 'msg' => \"<p>A check and then email job has been created and will be executed on or after \".date('l, F jS, Y', $jobScheduledTime).\" at \".date('g:i:s A T (P)', $jobScheduledTime).\" </p>\" ) );\n\t\t\t\t\t\t\t/* OLD EMAIL SENDING CODE\n $this->load->library('email');\n $mailArraylog = array();\n $this->email->from('[email protected]','BuynBrag');\n $this->email->to($mail_info[$j]['sent_email_id']);\n $this->email->bcc('[email protected],[email protected]');\n $this->email->subject(\"BuynBrag: Order Success,Order Id:$order_no\");\n\n $this->email->message($purchase_message);\n $this->email->set_newline(\"\\r\\n\");\n if($this->email->send())\n {\n log_message('Info', 'SUCCESSFULLY SENT EMAIL to buyer '.$mail_info[$j]['sent_email_id'].' for order no '.$mail_info[$j]['order_id']);\n $mailArraylog = array('level' => 1, 'send status' => 1,'to' => $mail_info[$j]['sent_email_id'],'bcc' =>'[email protected],[email protected]','From' => '[email protected]','mail content' => $purchase_message);\n $this->load->model('slog');\n $this->slog->write($mailArraylog);\n }\n else\n {\n log_message('Info', 'FAILED SENDING EMAIL to buyer '.$mail_info[$j]['sent_email_id'].' for order no '.$mail_info[$j]['order_id']);\n }*/\n\n //////////////////////////////\n $owner_name = $mail_info[$j]['owner_name'];\n $owner_email = $mail_info[$j]['contact_email'];\n $total_amount = $mail_info[$j]['amt_paid'] * $mail_info[$j]['quantity'];\n include 'mail_7.php';\n\n $sellerSMSMsg = \"Dear \".$mail_info[$j]['owner_name'].\", \\r\\n You have recieved a new order for \".$mail_info[$j]['product_name'].\". The order ID is \".$mail_info[$j]['order_id'];\n\t\t\t\t\t\t\t$sellerSMSMsg .= \" and the quantity ordered is \".$mail_info[$j]['quantity'].\". Please make sure that the product is dispatched by \".date( \"d-M-Y\", ( ( strtotime($mail_info[$j]['date_of_pickup']) ) - 86400) ).\". Contact us on +91-8130878822 or [email protected] \\r\\n Team BuynBrag\";\n\n\t\t\t\t\t\t\t$sellerSMSNo = $mail_info[$j]['contact_number'];\n\t\t\t\t\t\t\tif($sellerSMSNo == '' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sellerSMSNo = NULL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->smsc->sendSMS($sellerSMSNo, $sellerSMSMsg);\n\t\t\t\t\t\t\t$this->slog->write( array( 'level' => 1, 'msg' => 'Just sent seller SMS to '.json_encode($sellerSMSNo).'. The msg sent is <p>'.$sellerSMSMsg.'</p>' ) );\n\n //Seller New Order Email\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*$config['protocol'] = 'smtp';\n\t\t\t\t\t\t\t$config['smtp_host'] = 'ssl://smtp.googlemail.com';\n\t\t\t\t\t\t\t$config['smtp_port'] = 465;\n\t\t\t\t\t\t\t$config['smtp_user'] = '[email protected]';\n\t\t\t\t\t\t\t$config['smtp_pass'] = '';*/\n\n $this->load->library('email');\n $mailArraylog2 = array();\n $this->email->clear(TRUE);\n $this->email->from('[email protected]','BuynBrag');\n if(empty($owner_email))\n {\n \t//log_message('INFO', 'Seller email ('.$mail_info[$j]['contact_email'].') is empty. Sellers EMAIL will be sent to [email protected]');\n \t$this->load->model('slog');\n \t$this->slog->write(array('level' => 1 , 'msg' => 'Seller email ('.$mail_info[$j]['contact_email'].') is empty. Sellers EMAIL will be sent to [email protected]'));\n $owner_email = '[email protected]';\n }\n\n $this->email->to($owner_email);\n $this->email->bcc('[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]');\n $this->email->subject(\"New Order from BuynBrag,Order Id:\".$order_no);\n $this->email->message($new_order_message);\n $this->email->attach('./invoice/'.$txnid.'/buyer_invoice_order_'.$order_no.'.pdf');\n \n if(!empty($productImage))\n {\n $this->email->attach($productImage);\n }\n\n $this->email->set_newline(\"\\r\\n\");\n \n if($this->email->send())\n {\n //log_message('Info',\"Seller eMail sent to $owner_email for order no: $order_no\");\n $this->load->model('slog');\n $this->slog->write(array('level' => 1 , 'msg' => \"Seller eMail sent to $owner_email for order no: $order_no\" ));\n $mailArraylog2 = array('level' => 1, 'send status' => 1,'to' => $owner_email,'bcc' =>'[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]','From' => '[email protected]','emsg' => $new_order_message);\n $this->load->model('slog');\n $this->slog->write($mailArraylog2);\n if($j==($count_prod-1))\n {\n $this->vc_orders->purchase_mail_success($txnid);\n }\n }\n else\n {\n //log_message('Info',\"ERROR occurred while sending Seller email to $owner_email order no: $order_no\");\n $this->load->model('slog');\n $this->slog->write( array('level' => 1, 'msg' => \"ERROR occurred while sending Seller email to $owner_email order no: \".$order_no, 'debug' => $this->email->print_debugger() ) );\n $mailArraylog2 = array('level' => 1, 'send status' => 0,'to' => $owner_email,'bcc' =>'[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]','From' => '[email protected]','emsg' => $new_order_message);\n $this->load->model('slog');\n $this->slog->write($mailArraylog2);\n \n }\n $this->email->clear(TRUE);\n //end email send\n }//end for\n \n }//end if mail_info !=0\n }\n else\n {\n log_message('Info',\"Don't Allow mail as the Ip is 127.0.0.1\");\n $this->load->model('slog');\n $this->slog->write(array('level' => 1, 'msg' => \"Don't Allow mail as the Ip is 127.0.0.1\"));\n }\n $this->load->view('order_success',$data);\n }", "title": "" }, { "docid": "455a66c5433d03688125b679e4e2facc", "score": "0.60955477", "text": "public function updateStatus($id_envio)\r\n {\r\n $sql = 'SELECT `id_envio_order`, `num_albaran`'\r\n . 'FROM `' . _DB_PREFIX_ . 'tipsa_envios`'\r\n . 'WHERE `id_envio` = ' . (int) $id_envio;\r\n $envioObj = Db::getInstance()->getRow($sql);\r\n\r\n $albaran = $envioObj['num_albaran'];\r\n $id_order = $envioObj['id_envio_order'];\r\n\r\n if (Configuration::get('TIPSA_MODE') == 1) {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE');\r\n } else {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE_TEST');\r\n }\r\n\r\n $urlws = $this->getUrlConfiguration('WS');\r\n\r\n $note = $this->loginTipsaUser();\r\n\r\n foreach ($note as $value) {\r\n $details = $value->getElementsByTagName(\"strSesion\");\r\n $idsesion = $details->item(0)->nodeValue;\r\n }\r\n\r\n $note = webservicetipsa::wsConsEnvEstado($idsesion, $tipsaCodigoAgencia, $tipsaCodigoAgencia, $albaran, $urlws);\r\n\r\n foreach ($note as $value) {\r\n $estado = $value->getElementsByTagName(\"strEnvEstados\")->item(0)->nodeValue;\r\n $error = (isset($value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue)) ? $value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue : null;\r\n }\r\n\r\n if (isset($error) && $error != null) {\r\n PrestaShopLogger::addLog('ErrorObtainingthestatesfromWebservice : ' . $error);\r\n }\r\n\r\n $estenv = explode('V_COD_TIPO_EST', $estado);\r\n $elements = count($estenv);\r\n $estado = explode('\"', $estenv[$elements - 1]);\r\n $estado = (int) $estado[1];\r\n\r\n //assing for the states in with information of dinapaq\r\n switch ($estado) {\r\n // $estado = 1 --> TRANSITO\r\n case 1:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 2 --> REPARTO\r\n case 2:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 3 --> ENTREGADO\r\n case 3:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_ENTREGADO'), $id_order);\r\n break;\r\n // $estado = 4 --> INCIDENCIA\r\n case 4:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_INCIDENCIA'), $id_order);\r\n break;\r\n default:\r\n PrestaShopLogger::addLog('Order State not exists in PrestaShop or not found. ID: ' . $estado);\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "ddb827b756f2ad078058e83091df3ca8", "score": "0.60839605", "text": "public function createStatus()\n {\n $name = [\n 'en' => 'Pending payment PaySto',\n 'ru' => 'В ожидании оплаты PaySto'\n ];\n \n $order_state = new OrderState();\n foreach (ToolsModulePPM::getLanguages(false) as $l) {\n $order_state->name[$l['id_lang']] = (\n isset($name[$l['iso_code']])\n ? $name[$l['iso_code']]\n : $name['en']\n );\n }\n \n $order_state->template = '';\n $order_state->send_email = 0;\n $order_state->module_name = $this->name;\n $order_state->invoice = 0;\n $order_state->color = '#4169E1';\n $order_state->unremovable = 0;\n $order_state->logable = 0;\n $order_state->delivery = 0;\n $order_state->hidden = 0;\n $order_state->shipped = 0;\n $order_state->paid = 0;\n $order_state->pdf_invoice = 0;\n $order_state->pdf_delivery = 0;\n $order_state->deleted = 0;\n $result = $order_state->save();\n ConfPPM::setConf('status_paysto', $order_state->id);\n return $result;\n }", "title": "" }, { "docid": "3bb25ef7b49943783ace1d8ac3070c8d", "score": "0.60816383", "text": "function status_order($paramId){\n $init =& get_instance();\n $init->db->where('order_id', $paramId);\n $query = $init->db->get('order');\n \n $view = $query->row()->status_order_id;\n $payment = $query->row()->payment_status;\n\n $first = ($view >= 1) ? 'se-progress-step-icon' : 'se-progress-step-icon-disable';\n $firstIcon = ($view >= 2) ? 'iconx' : '';\n $firstStatus = ($view >= 2) ? 'Sudah dibayar' : 'Proses Pembayaran';\n\n $Second = ($view >= 3) ? 'se-progress-step-icon' : 'se-progress-step-icon-disable';\n $SecondIcon = ($view >= 4) ? 'iconx' : '';\n $SecondStatus = ($view >= 4) ? 'Sudah Dikirim' : 'Proses Pengiriman';\n\n $Three = ($view >= 5) ? 'se-progress-step-icon' : 'se-progress-step-icon-disable';\n $ThreeIcon = ($view >= 6) ? 'iconx' : '';\n $ThreeStatus = ($view >= 6) ? 'Komplain' : 'Diterima';\n\n $Fours = ($view >= 7) ? 'se-progress-step-icon' : 'se-progress-step-icon-disable';\n $FoursIcon = ($view >= 8) ? 'iconx' : '';\n $FoursStatus = ($view >= 8) ? 'Selesai' : 'Proses Review';\n\n echo '<div class=\"se-progress se-progress-steps-6\">\n <!-- Proses Pembayaran -->\n <div class=\"se-progress-step\" data-tooltip=\"'.$firstStatus.'\">\n <div class=\"'.$first.'\">\n <i class=\"'.$firstIcon.' icon-e-47\"></i>\n </div>\n </div>\n <!-- Proses Pembayaran -->\n\n <!-- Proses Pengiriman -->\n <div class=\"se-progress-step\" data-tooltip=\"'. $SecondStatus . '\">\n <div class=\"'.$Second.'\">\n <i class=\"'.$SecondIcon.' icon-f-48\"></i>\n </div>\n </div>\n <!-- Proses Pengiriman -->\n <!-- Proses Pengiriman -->\n <div class=\"se-progress-step\" data-tooltip=\"'. $ThreeStatus . '\">\n <div class=\"'.$Three.'\">\n <i class=\"'.$ThreeIcon.' icon-f-43\"></i>\n </div>\n </div>\n <!-- Proses Pengiriman -->\n <!-- Selesai -->\n <div class=\"se-progress-step\" data-tooltip=\"'. $FoursStatus . '\">\n <div class=\"'.$Fours.'\">\n <i class=\"'.$FoursIcon.' icon-e-46\"></i>\n </div>\n </div>\n <!-- Selesai -->\n <!-- spacer -->\n <span class=\"se-progress-spacer\"></span>\n <!-- spacer -->\n \n <!-- bar -->\n <div class=\"se-progress-bar\"></div>\n <!-- bar -->\n</div>';\n\n\n}", "title": "" }, { "docid": "2c73f9cb458dbc29ff0a23674089b016", "score": "0.6035609", "text": "public function selesai()\n\t{\n\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_transaksi');\n\t\t$this->db->where(\n\t\t\t'id_pelanggan',\n\t\t\t$this->session->userdata('id_pelanggan'),\n\t\t);\n\t\t$this->db->where('status_order=3');\n\n\n\t\t$this->db->order_by('id_transaksi', 'desc');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" }, { "docid": "c01ab4228421b97ab5765736cb8800f7", "score": "0.6011732", "text": "function selected_order(){\nglobal $db_connect;\nif (isset($_POST['check_order']))\n\n\t{ ////////////////check order is exist means button is clicked ////////////\n\n\n\n\t$pro_code = $_POST['check_order'];\n\n\t//echo \"***\".$pro_code;\n\n\n\n\t$query_one_order = \"SELECT pro_name,pro_img,pro_o_price,pro_m_price,pro_quantity,pro_amount,pro_pro_type FROM ord_product WHERE ord_uuid = '$pro_code'\";\n\t$query_one_order = mysqli_query($db_connect,$query_one_order);\n\n\t$order_basic_info = \"SELECT ord_address,ord_amount,ord_postcode,ord_user,ord_shipping_fee,ord_status,ord_shipping_method,ord_email FROM ord_record WHERE ord_uuid ='$pro_code' \";\n\t$order_basic_info = mysqli_query($db_connect,$order_basic_info);\n\t$order_basic_info = mysqli_fetch_assoc($order_basic_info);\n\n\t$current_user_email = $order_basic_info['ord_email'];\n\t$order_user_info = \"SELECT user_phone from user_extra_info where user_email = '$current_user_email' \";\n\t$order_user_info = mysqli_query($db_connect,$order_user_info);\n\t$order_user_info = mysqli_fetch_assoc($order_user_info);\n\t\n\n\n\n\techo \"<input name = 'ord_id' type='hidden' value = '$pro_code'>\";\n\n\techo \"<div class='text-danger text-center'><h4>订单编号: \".$pro_code.\"</h4></div>\";\n\techo \"<div class='col-lg-8'>\";\n\n\techo \"<div class='progress active' style='height:40px'>\n \t\t<div class='progress-bar progress-bar-success' style='width:25%;padding:10px'>\n \t\t<span class='glyphicon glyphicon-info-sign' style='font-size:15px'>订单提交</span> \n \t\t</div>\";\n\n\n ///////////////////////////////// here under are the order status volume bar suit /////////////////\t\n \tif (($order_basic_info['ord_status'] == 'paid') \n \t\tor ($order_basic_info['ord_status'] == 'shipping') \n \t\tor ($order_basic_info['ord_status'] == 'close'))\n \t{\n \t\techo \"<div class='progress-bar progress-bar-success' style='width:25%;padding:10px'>\";\n \t\t\techo \"<span class='glyphicon glyphicon-ok-sign' style='font-size:15px'>确认付款</span> \";\n \t\t\techo \"</div>\";\n \t}\n \telse{\n \t\techo \"\t<div class='progress-bar progress-bar-warning progress-bar-striped' role='progressbar' style='width: 25%;padding:10px'>\";\n \t\techo \"确认付款\";\n \t\techo \"</div>\";\n \t}\n\n\n \tif (($order_basic_info['ord_status'] == 'shipping') or ($order_basic_info['ord_status'] == 'close'))\n \t{\n \t\techo \"<div class='progress-bar progress-bar-success' style='width:25%;padding:10px'>\";\n \t\t\techo \"<span class='glyphicon glyphicon-gift' style='font-size:15px'>货物已发</span> \";\n \t\t\techo \"</div>\";\n\n \t}\n \telse{\n \t\techo \"<div class='progress-bar progress-bar-warning progress-bar-striped' role='progressbar' style='width: 25%;padding:10px'>\";\n \t\techo \"货物已发\";\n \t\t\techo \"</div>\";\n\n \t}\n \tif ($order_basic_info['ord_status'] == 'close'){\n \t\techo \"<div class='progress-bar progress-bar-success' style='width:25%;padding:10px'>\";\n \t\t\techo \"<span class='glyphicon glyphicon-off' style='font-size:15px'>订单关闭</span> \";\n \t\t\techo \"</div>\";\n\n \t}\n \telse{\n\t\t\techo \"<div class='progress-bar progress-bar-warning progress-bar-striped' role='progressbar' style='width: 25%;padding:10px'>\";\n \t\techo \"订单关闭\";\n \t\t\techo \"</div>\";\n\n \t}\n\n\n//////////////////////////////// order volume bar end ///////////////////////////////\n\n \t\n \t\n \t\t\n \t\t\n\n\techo \"</div>\";\n\techo \"</div>\";\n\techo \"<table class='table table-bordered table-hover table-condensed' >\";\n\n\techo \"<thead><tr style='width:30px;'><th>产品图片</th>\";\n\techo \"<th>产品名称</th>\";\n\techo \"<th>产品单价</th>\";\n\techo \"<th>产品数量</th>\";\n\techo \"<th>产品总价</th>\";\n\techo \"</tr></thead>\";\n\n\tforeach ($query_one_order as $single_product) {\n\t\t\n\t\techo \"<tr>\";\n\t\t\techo \"<td>\";//产品图片列\n\t\t\t\techo\" <img src='../$single_product[pro_img]' height=100 width=100/>\";\n\t\t\techo \"</td>\";\n\t\t\techo \"<td>\";//产品名称列\n\t\t\t\techo $single_product['pro_name'];\n\t\t\techo \"</td>\";\n\t\t\techo \"<td>\";//产品单价列\n\t\t\tif ($single_product['pro_pro_type'] == '1'){\n\t\t\t\t\n\t\t\t\techo \"<del>$\".$single_product['pro_o_price'].\"</del>\";\n\t\t\t\techo \"<br/>\";\n\t\t\t\techo \"$\".$single_product['pro_m_price'];\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"$\".$single_product['pro_o_price'];\n\n\t\t\t}\n\t\t\techo \"</td>\";\n\t\t\techo \"<td>\";//购买数量列\n\t\t\t\t#echo $single_product['pro_code'];\n\t\t\t\techo $single_product['pro_quantity'];\n\t\t\techo \"</td>\";\n\t\t\techo \"<td>\";//产品总价\n\t\t\t\t\n\t\t\t\techo $single_product['pro_amount'];\n\t\t\techo \"</td>\";\n\n\t\t\t\n\t\t\t\n\n\t\techo \"</tr>\";\n\n\t\t# code...\n\t}\n\t////////////product list end //////\n\techo \"<tr><td>邮费:</td><td>$\".$order_basic_info['ord_shipping_fee'].\"</td>\";\n\techo \"<td>订单总价:</td><td colspan=2>$\".$order_basic_info['ord_amount'].\"</td></tr>\";\n\n\techo \"<tr><td>邮寄地址:</td><td colspan=3>\".$order_basic_info['ord_address'].\"</td>\";\n\techo \"<td>邮寄方式: \".$order_basic_info['ord_shipping_method'].\"</td></tr>\";\n\n\techo \"<tr><td>邮编:</td><td>\".$order_basic_info['ord_postcode'].\"</td>\";\n\techo \"<td>收件人:</td><td colspan=2>\".$order_basic_info['ord_user'].\"</td>\";\n\n\techo \"<tr><td>电子邮件:</td><td>\".$order_basic_info['ord_email'].\"</td>\";\n\n\techo \"<td>联系电话:</td><td colspan=2>\".$order_user_info['user_phone'].\"</td></tr>\";\n\n\techo \"</table>\";\n\techo \"<div class='text-center'>\";\n\t//////////////////////////////////////////// order status modification start /////////////////////\n\techo \"<div class='col-lg-2'>\";\n\t\n\tif ($order_basic_info['ord_status'] != 'close'){\n\t\techo \"选择要修改的订单状态:\";\n\t\techo \"<select name = 'ord_status_select' class='form-control'>\";\n\t\techo \"<option value = '$order_basic_info[ord_status]'>$order_basic_info[ord_status]</option>\";\n\t\techo \"<option value = 'new'>New</option>\";\n\t\techo \"<option value = 'paid'>paid</option>\";\n\t\techo \"<option value = 'shipping'>shipping</option>\";\n\t\techo \"<option value = 'close'>close</option>\";\n\t\techo \"</select>\";\n\t\techo \"<br/><input name = 'order_operate' type='submit' class='btn btn-success' value='提交修改'>&nbsp;&nbsp;\";\n\t\techo \"<a href='order_mgmt.php' role='button' class='btn btn-primary'>返回列表</a>\";\n\n\t}\n\telseif($order_basic_info['ord_status'] = 'close'){\n\t\techo \"<br/><input name = 'order_operate'type='submit' class='btn btn-success' value='删除订单'>&nbsp;&nbsp;\";\n\t\techo \"<a href='order_mgmt.php' role='button' class='btn btn-primary'>返回列表</a>\";\n\t}\n\techo \"</div><br/>\";\n\n\n\n\n\t\n\n\n\techo \"</div>\";\n\t}\nelse{\n\n\techo \"<div class='text-center'><h3>选择要查询订单状态标签或者输入关键字查询</h3></div>\";\n\n}\n/*\nelseif (isset($_POST['search_order'])){\n\t$search_condition = $_POST['search_condition'];\n\n\t$search_order = \"SELECT ord_uuid,ord_datetime,ord_amount,ord_status,ord_user FROM ord_record where CONCAT(ord_uuid,ord_user) like '%$search_condition%' order by id desc\";\n\t$search_order = mysqli_query($db_connect,$search_order);\n\tprint_r($search_order);\n}\n*/\n}", "title": "" }, { "docid": "75746e41130c87c6d36b00f4dc69e5e2", "score": "0.60110325", "text": "function proses(){\n\t\t$id_spl_ord_cart_det = $this->input->post('id');\n\t\t$data = $this->input->post('data');\t\t\n\t\tif (empty($data)){\n\t\t\techo json_encode(array('error'=>1,'msg'=>'Bahan belum dipilih'));\n\t\t}else{\t\n\t\t\t//update order cart detail\t\t\n\t\t\tforeach ($id_spl_ord_cart_det as $id){\n\t\t\t\t$datax = $data[$id];\t\n\t\t\t\t$qty_roll = $datax['qty_roll'];\n\t\t\t\t$lebar = $datax['lebar'];\n\t\t\t\t$input['deskripsi'] = $datax['deskripsi'];\n\t\t\t\t$input['lebar'] = \t$lebar;\n\t\t\t\t$input['tinggi'] = $datax['tinggi'];\n\t\t\t\t$input['qty_roll'] = $qty_roll;\n\t\t\t\t$input['type'] = $datax['type'];\n\t\t\t\t$input['keterangan'] = $datax['keterangan'];\n\t\t\t\t$input['qty_mp'] = $qty_roll * $lebar;//hitung meter persegi\n\t\t\t\t$res = $this->m_master->updatedata('tb_spl_ord_cart_det',$input,array('id_spl_ord_cart_det'=>$id));\n\t\t\t}\t\n\t\t\t\n\t\t\t//tb_spl_order_cart\t\t\t\n\t\t\t$cart['id_supplier'] = isset($_POST['supplier']) ? $_POST['supplier'] : '';\t\t\t\n\t\t\t$cart['id_karyawan_by'] = $this->id_karyawan_by;\t\t\t\t\t\n\t\t\t$cart['po_number'] = isset($_POST['po']) ? $_POST['po'] : '';\n\t\t\t$cart['po_date'] = $this->input->post('podate');\n\t\t\t$cart['id_courier'] = $this->input->post('courier');\n\t\t\t$cart['keterangan'] = isset($_POST['desc']) ? $_POST['desc'] : '';\n\t\t\t$cart['add_by'] = $this->addby;\n\t\t\t$cart['date_add'] = $this->datenow;\n\t\t\t\t\n\t\t\t//cek tb_product_cart\n\t\t\t$cek = $this->m_master->get_table_column(array('id_cart_spl'),'tb_spl_ord_cart',array('id_cart_spl'=>$this->id_cart_spl));\n\t\t\tif (count($cek) > 0){\t\t\t\t\n\t\t\t\t$res = $this->m_master->updatedata('tb_spl_ord_cart',$cart,array('id_cart_spl'=>$this->id_cart_spl));\n\t\t\t}else{\n\t\t\t\t$cart['id_cart_spl'] = $this->id_cart_spl;\n\t\t\t\t/*\n\t\t\t\t * insert new tb_order_cart\n\t\t\t\t*/\n\t\t\t\t$res = $this->m_master->insertdata('tb_spl_ord_cart',$cart);\n\t\t\t}\t\t\t\t\n\t\t\tif ($res){\n\t\t\t\t//show modal summary\n\t\t\t\techo json_encode(array('error'=>0,'msg'=>'Create summary berhasil','modal'=>$this->m_content->modal_summary_spl_ord()));\n\t\t\t}\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "9c6a073dfe13d23a66e51a0838f2af66", "score": "0.6000743", "text": "public function selesai($id_rawat){\n\t\t$no_pasien = $this->input->post('no_pasien');\n\t\t$tanggal = date(\"d-m-Y\");\n\t\t$waktu = date(\"H:i:s\");\n\t\t$data = array(\n\t\t\t'status' => 'finished',\n\t\t\t'jam_keluar' => $waktu, \n\t\t);\n\t\t$id_transaksi = '';\n\t\t$biaya_daftar = '';\n\t\t$id_periksa = '';\n\t\t$this->RawatModel->updateStatus($id_rawat, $data);\n\n\t\t#menambahkan item ke transaksi\n\t $where_trx = array(\n\t \t'no_rawat_jalan' => $id_rawat, \n\t );\n\t $transaksi = $this->TransaksiModel->viewTrx($where_trx);\n\t foreach ($transaksi as $trx) {\n\t \t$id_transaksi = $trx->id_transaksi;\n \t}\n\n \t$where_poli = array(\n\t\t\t'nama_poli' => 'Umum', \n\t\t);\n\n\t\t$poli = $this->PoliklinikModel->viewPoliWhere($where_poli);\n\t\tforeach ($poli as $p) {\n\t\t\t$nama_poli = $p->nama_poli;\n\t\t\t$biaya_daftar = $p->biaya_pendaftaran;\n\t\t}\n\n\t\t$transaksi_item = array(\n\t\t\t'id_transaksi' => $trx->id_transaksi,\n\t\t\t'jenis_transaksi' => 'Pemeriksaan',\n\t\t\t'nama_transaksi' => $p->nama_poli,\n\t\t\t'jumlah' => '1',\n\t\t\t'harga' => '20000', \n\t\t);\n\t\t$this->ItemTransaksiModel->tambahItem($transaksi_item);\n\n\t\t#update status antrian\n\t\t$whereAntrian = array('id' => $id_transaksi, );\n\t\t$dataAntrian = array('status' => 'Selesai', );\n\t\t$this->AntrianModel->updateStatus($whereAntrian,$dataAntrian);\n\n\n\t\techo json_encode(array('status' => true));\n\t}", "title": "" }, { "docid": "613ad31ae301a646a92f55735b10ed49", "score": "0.5954047", "text": "public function status()\n {\n if (!$this->config->get('onego_status') || !$this->user->hasPermission('modify', 'sale/order')) {\n $this->response->setOutput('');\n return;\n }\n \n $this->language->load('total/onego');\n \n $orderId = (int) $this->request->get['order_id'];\n $operations = OneGoTransactionsLog::getListForOrder($orderId);\n foreach ($operations as $row) {\n if ($row['success'] && empty($statusSuccess)) {\n $statusSuccess = $row;\n break;\n } else if (!$row['success'] && empty($statusFailure)) {\n $statusFailure = $row;\n }\n }\n if (!empty($statusSuccess)) {\n if ($statusSuccess['operation'] == OneGoSDK_DTO_TransactionEndDto::STATUS_DELAY) {\n // delayed transaction\n $expiresOn = strtotime($statusSuccess['inserted_on']) + $statusSuccess['expires_in'];\n if ($expiresOn <= time()) {\n // transaction expired\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_expired'), date('Y-m-d H:i:s', $expiresOn));\n } else {\n // transaction delayed\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_delayed'), \n date('Y-m-d H:i', strtotime($statusSuccess['inserted_on'])),\n date('Y-m-d H:i:s', $expiresOn));\n \n // enable transaction completion actions\n $this->data['onego_allow_status_change'] = true;\n $confirmStatuses = OneGoConfig::getArray('confirmOnOrderStatus');\n $cancelStatuses = OneGoConfig::getArray('cancelOnOrderStatus');\n $this->data['confirm_statuses'] = $confirmStatuses;\n $this->data['cancel_statuses'] = $cancelStatuses;\n $this->data['onego_btn_confirm'] = $this->language->get('button_confirm_transaction');\n $this->data['onego_btn_cancel'] = $this->language->get('button_cancel_transaction');\n $this->data['onego_btn_delay'] = $this->language->get('button_delay_transaction');\n\n }\n } else {\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_'.strtolower($statusSuccess['operation'])),\n date('Y-m-d H:i', strtotime($statusSuccess['inserted_on'])));\n }\n } \n if (!empty($statusFailure)) {\n $this->data['onego_status_failure'] = sprintf(\n $this->language->get('transaction_operation_failed'),\n date('Y-m-d H:i', strtotime($statusFailure['inserted_on'])),\n $statusFailure['operation'],\n $statusFailure['error_message']);\n } else if (empty($statusSuccess)) {\n $this->data['onego_status_undefined'] = $this->language->get('transaction_status_undefined');\n }\n $this->data['onego_status'] = $this->language->get('onego_status');\n $this->data['order_id'] = $orderId;\n $this->data['token'] = $this->session->data['token'];\n\n $this->data['confirm_confirm'] = $this->language->get('confirm_transaction_confirm');\n $this->data['confirm_cancel'] = $this->language->get('confirm_transaction_cancel');\n $this->data['delay_periods'] = $this->language->get('delay_period');\n $this->data['delay_for_period'] = $this->language->get('delay_for_period');\n $this->data['confirm_delay'] = $this->language->get('confirm_transaction_delay');\n $this->data['status_will_confirm'] = $this->language->get('transaction_will_confirm');\n $this->data['status_will_cancel'] = $this->language->get('transaction_will_cancel');\n \n $this->template = 'total/onego_status.tpl';\n $this->response->setOutput($this->render());\n }", "title": "" }, { "docid": "6e126ca5e0c7970d4e3bc30ef8b99ffa", "score": "0.59505814", "text": "private function _orderStatusCache($msg){\n$table_name = \"paynow\";\n$condition = array('reference' => $msg[\"reference\"]);\n$data = array(\n'status' =>$msg[\"status\"],\n'pollurl' => $msg[\"pollurl\"],\n'paynowreference' => $msg[\"paynowreference\"],\n'amount' => $msg[\"amount\"],\n'date_of_payment' => get_time()\n);\n$this->app_model->update($table_name, $data, $condition);\n//$this->_notifyCustomerViaEmail($this->session->userdata('transaction'));\n//$this->cart->destroy();\n//--$this->session->userdata('transaction') = \"\";\n//$this->session->unset_userdata('transaction');\n//$this->load->view('paynow/thankyou');\n}", "title": "" }, { "docid": "e4dbb102d075c4300e77e4f13a55c8fa", "score": "0.5948073", "text": "public function akta($status,$id_akta,$tname,$regis){\n $ctrl = substr($id_akta,0,2);\n $re = base_url().'approval/index/'.$ctrl;\n\n $verified = $this->Approval_model->get_progres($id_akta);\n if ($verified->progres==NULL) {\n $this->session->set_flashdata('message', \"\n <div class='alert alert-danger alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-remove'></i> $verified->no_regis !!</h4>\n Anda Tidak Diperkenankan Mengubah Staus \\\"JADI\\\", Sebelum Melakukan Verifikasi !\n </div>\n \");\n redirect($re);\n }\n\n if($ctrl=='AM'){\n $dt_jenazah = $this->Data_jenazah_model->get_by_am($id_akta);\n $NIKJENAZAH = $dt_jenazah->nik;\n $data = array('status' => 'meninggal' );\n $this->Dps_model->update($NIKJENAZAH,$data);\n\n\n }\n\n $data['progres'] = $status;\n if ($status==\"diambil\") {//set field yang diisi apabila status adalah diambil\n $data['tgl_ambil'] = date(\"Y-m-d\");\n $data['oleh_ambil'] = $this->session->userdata('nama_user');\n }\n $this->Approval_model->update($id_akta, $data);\n if ($status=='jadi') {//jika jadi, maka akan juga mengirim SMS\n $dt_akta = $this->Approval_model->get_data_akta($tname,$regis);\n $item = array( 'no_pendaftaran' => $dt_akta->no_registrasi, \n );\n $sms = array(\n 'TextDecoded' => sms_jadi($item),\n 'DestinationNumber' => $dt_akta->no_hp, \n );\n $this->Outbox_model->insert($sms);\n }\n\n\n $this->session->set_flashdata('message', \"\n <div class='alert alert-success alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-ok'></i> Berhasil!</h4>\n Status Akta Telah Berhasil Diperbaharui => Berkas $status !\n </div>\n \");\n $keyword = substr($id_akta, 0, 2);\n redirect(site_url('approval/index/'.$keyword));\n \n }", "title": "" }, { "docid": "67b745c23e1e035b22302e968be50895", "score": "0.5942997", "text": "public function index()\n {\n if (session('login')) {\n $login = session('email');\n $user = User::where('email', $login)\n ->first();\n $transaksi = DB::table('transactions')->join('packages', 'transactions.package_id', '=', 'packages.id')\n ->join('users', 'transactions.users_id', '=', 'users.id')\n ->join('details', 'transactions.details_id', '=', 'details.id')\n ->select(\n 'transactions.id',\n 'users.username',\n 'users.name',\n 'users.KTP',\n 'users.no_phone',\n 'users.location',\n 'users.email',\n 'packages.name_pack',\n 'transactions.date',\n 'transactions.status',\n 'details.location',\n 'details.price_transportation',\n 'transactions.dp',\n 'transactions.total'\n\n )\n ->where('users.id', $user->id)\n ->get();\n $arr = [];\n\n foreach ($transaksi as $key => $value) {\n if ($value->status != 1) {\n # code...\n session(['status' => 0]);\n array_push($arr, $value->name_pack);\n }\n }\n\n $data['users'] = $user;\n $data['transactions'] = $transaksi;\n $data['status'] = $arr;\n\n return view('pages.checkout', $data);\n } else {\n return redirect(\"/login\");\n }\n }", "title": "" }, { "docid": "c831206992b677ee44c96fe7987364e9", "score": "0.59361714", "text": "function jx_mark_delivered_status_for_courier_traspost()\r\n\t{\r\n\t\t$user=$this->erpm->auth();\r\n\t\t\r\n\t\tif(!$_POST)\r\n\t\t\tdie();\r\n\t\t\r\n\t\t$send_log_id=$this->input->post('send_log_id');\r\n\t\t$invoices_list=$this->input->post('delivered');\r\n\t\t$received_by=$this->input->post('received_by');\r\n\t\t$received_on=$this->input->post('received_on');\r\n\t\t$contact_no=$this->input->post('contact_no');\r\n\t\t\r\n\t\tif($invoices_list)\r\n\t\t{\r\n\t\t\tforeach($invoices_list as $i=>$incoice)\r\n\t\t\t{\r\n\t\t\t\t$param=array();\r\n\t\t\t\t$param['sent_log_id']=$send_log_id;\r\n\t\t\t\t$param['invoice_no']=$incoice;\r\n\t\t\t\t$param['status']=3;\r\n\t\t\t\t$param['received_by']=$received_by[$i];\r\n\t\t\t\t$param['received_on']=$received_on[$i];\r\n\t\t\t\t$param['contact_no']=$contact_no[$i];\r\n\t\t\t\t$param['logged_on']=cur_datetime();\r\n\t\t\t\t$param['logged_by']=$user['userid'];\r\n\t\t\t\t\r\n\t\t\t\t$already=$this->db->query(\"select count(*) as ttl from pnh_invoice_transit_log where invoice_no=? and status=3\",array($incoice))->row()->ttl;\r\n\t\t\t\tif(!$already)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->insert('pnh_invoice_transit_log',$param);\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status to be updated\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status already updated\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}", "title": "" }, { "docid": "c47ed2c1bb8ef962d05793b21787b8de", "score": "0.5928411", "text": "function after_process() {\n\t\t $requestParamList = array(\"MID\" => MODULE_PAYMENT_PAYTM_MERCHANT_ID , \"ORDERID\" => $_POST['ORDERID']);\n\n\t\t $paytmParamsStatus = array();\n /* body parameters */\n $paytmParamsStatus[\"body\"] = array(\n /* Find your MID in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys */\n \"mid\" => $requestParamList['MID'],\n /* Enter your order id which needs to be check status for */\n \"orderId\" => $requestParamList['ORDERID'],\n );\n $checksumStatus = PaytmChecksum::generateSignature(json_encode($paytmParamsStatus[\"body\"], JSON_UNESCAPED_SLASHES), MODULE_PAYMENT_PAYTM_MERCHANT_KEY);\n /* head parameters */\n $paytmParamsStatus[\"head\"] = array(\n /* put generated checksum value here */\n \"signature\" => $checksumStatus\n );\n /* prepare JSON string for request */\n $post_data_status = json_encode($paytmParamsStatus, JSON_UNESCAPED_SLASHES);\n $paytstsusmurl = $this->paytmurl.PaytmConstants::ORDER_STATUS_URL; \n $ch = curl_init($paytstsusmurl);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data_status);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n $responseJson = curl_exec($ch);\n $responseStatusArray = json_decode($responseJson, true);\n\t\t if($responseStatusArray['body']['resultInfo']['resultStatus']=='TXN_SUCCESS' && $responseStatusArray['body']['txnAmount']==$_POST['TXNAMOUNT'])\n\t\t {\n\t\t \tglobal $insert_id;\n\t\t\t $status_comment=array();\n\t\t\t if(isset($_POST)){\n\t\t\t\t if(isset($_POST['ORDERID'])){\n\t\t\t\t \t$status_comment[]=\"Order Id: \" . $_POST['ORDERID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t if(isset($_POST['TXNID'])){\n\t\t\t\t\t $status_comment[]=\"Paytm TXNID: \" . $_POST['TXNID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sql_data_array = array('orders_id' => $insert_id,\n 'orders_status_id' => MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID,\n 'date_added' => 'now()',\n 'customer_notified' => '0',\n 'comments' => implode(\"\\n\", $status_comment));\n\n\t\t\tzen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\n\t\t}\n\t\telse{\n\t\t\tzen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(\"It seems some issue in server to server communication. Kindly connect with administrator.\"), 'SSL', true, false));\n\t\t}\n }", "title": "" }, { "docid": "789b9a06d879a69a7993c502c88311bc", "score": "0.59203625", "text": "public function checkout()\n {\n if (!isset($this->id_user)) {\n $this->session->set_flashdata('error', 'Akses checkout ditolak!');\n redirect(base_url('home'));\n }\n\n // Cek apakah user memiliki barang keluar yang pending di keranjang\n $outputCartCount = $this->cartout->where('id_user', $this->id_user)->count();\n \n if (!$outputCartCount) {\n $this->session->set_flashdata('warning', 'Tidak ada barang yang akan dikeluarkan!');\n redirect(base_url('cartout'));\n }\n\n if (!$this->cartout->validateStock()) { // Valdasi stok\n return $this->index();\n }\n\n // Menyiapkan insert table barang_keluar\n $data['id_user'] = $this->id_user;\n $this->cartout->table = 'barang_keluar';\n\n // Jika insert barang_keluar berhasil, siapkan insert lagi ke dalam barang_keluar_detail\n if ($id_barang_keluar = $this->cartout->create($data)) { \n // Ambil list keranjang user\n $cart = $this->db->where('id_user', $this->id_user) \n ->get('keranjang_keluar')\n ->result_array();\n\n // Modifikasi tiap cart\n foreach ($cart as $row) {\n $row['id_barang_keluar'] = $id_barang_keluar;\n unset($row['id'], $row['id_user']); // Hapus kolom tidak penting\n $this->db->insert('barang_keluar_detail', $row); // Insert ke tabel barang_keluar_detail\n }\n\n $this->db->delete('keranjang_keluar', ['id_user' => $this->id_user]); // Hapus cart user sekarang\n\n $this->session->set_flashdata('success', 'Pengeluaran barang berhasil');\n\n $data['title'] = 'Checkout';\n $data['breadcrumb_title'] = \"Checkout\";\n $data['breadcrumb_path'] = 'Barang Keluar / Keranjang Keluar / Checkout';\n $data['page'] = 'pages/cartout/checkout';\n\n // Ambil data pengeluaran barang untuk ditampilkan di halaman checkout\n $this->table = 'barang_keluar';\n $data['barang_keluar'] = $this->cartout->select([\n 'user.id AS id_user', 'user.nama',\n 'barang_keluar.id AS id_barang_keluar', 'barang_keluar.waktu'\n ])\n ->join('user')\n ->where('barang_keluar.id', $id_barang_keluar)\n ->where('barang_keluar.id_user', $this->id_user)\n ->first();\n\n $this->cartout->table = 'barang_keluar_detail';\n $data['list_barang'] = $this->cartout->select([\n 'barang_keluar_detail.qty',\n 'barang.id_satuan', 'barang.nama',\n ])\n ->join('barang')\n ->where('barang_keluar_detail.id_barang_keluar', $id_barang_keluar)\n ->get();\n\n $this->view($data);\n } else {\n $this->session->set_flashdata('error', 'Oops! Terjadi kesalahan');\n $this->index();\n }\n }", "title": "" }, { "docid": "186a61d1b7874d8fe49ba6d72caf9dae", "score": "0.5890878", "text": "function success()\r\n\t{\r\n $paypalInfo = $this->input->get(); \r\n\t\t $tx = $paypalInfo[\"tx\"];\t\r\n\t\t if(isset($tx))\r\n\t\t {\t\r\n\t\t $paypalURL = $this->paypal_lib->paypal_url; \r\n\t $result = $this->paypal_lib->PDT($paypalURL,$tx);\r\n\t if(!empty($result))\r\n\t {\t \r\n\t\t $data['txn_id'] = $result[\"txn_id\"];\r\n\t\t $data['payment_amt'] = $result[\"payment_gross\"];\r\n\t\t $data['currency_code'] = $result[\"mc_currency\"];\r\n\t\t $data['status'] = $result[\"payment_status\"]; \r\n\t\t $order_id=$result['custom']; \r\n\t\t \r\n\t\t //sending order details on email\r\n\t\t\t\t$order=$this->Order_model->get_order_details($order_id);\t\t\r\n\t\t\t\t$subtotal=0;\r\n\t\t\t\tforeach ($order as $order)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Emaildata =array(\r\n\t\t\t\t\t\t\t 'logo' => base_url().'upload/site/original/'.get_logo(),\r\n\t\t\t\t\t 'name'=>ucfirst($order->FName).' '.ucfirst($order->LName),\r\n\t\t\t\t\t\t\t 'order_id'=>$order->Order_number,\r\n\t\t\t\t\t 'bill_add'=> $order->Address,\r\n\t\t\t\t\t 'bill_city' => $order->City,\r\n\t\t\t\t\t\t\t 'bill_state' =>$order->State,\r\n\t\t\t\t\t\t\t 'bill_zip'=> $order->Zip_code,\r\n\t\t\t\t\t\t\t 'bill_country'=>$order->Country,\r\n\t\t\t\t\t\t\t 'email' => $order->EmailId,\r\n\t\t\t\t\t\t\t 'bill_phone' => $order->Phone\r\n\t\t\t\t\t );\r\n\t\t\t\t\t \r\n\t\t\t\t\t if(!empty($order->Shipping_FName))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \t$Emaildata['ship_name']=ucfirst($order->Shipping_FName).' '.ucfirst($order->Shipping_LName);\r\n\t\t\t\t\t\t\t $Emaildata['ship_add'] = $order->Shipping_Address;\r\n\t\t\t\t\t $Emaildata['ship_city'] = $order->Shipping_City;\r\n\t\t\t\t\t\t\t $Emaildata['ship_state'] =$order->Shipping_State;\r\n\t\t\t\t\t\t\t $Emaildata['ship_zip']= $order->Shipping_ZipCode;\r\n\t\t\t\t\t\t\t $Emaildata['ship_country'] =$order->Shipping_Country;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else \r\n\t\t\t\t\t {\r\n\t\t\t\t\t \t$Emaildata['ship_name']=ucfirst($order->FName).' '.ucfirst($order->LName);\r\n\t\t\t\t\t\t\t $Emaildata['ship_add'] =$order->Address;\r\n\t\t\t\t\t $Emaildata['ship_city'] =$order->City;\r\n\t\t\t\t\t\t\t $Emaildata['ship_state'] =$order->State;\r\n\t\t\t\t\t\t\t $Emaildata['ship_zip']= $order->Zip_code;\r\n\t\t\t\t\t\t\t $Emaildata['ship_country'] =$order->Country;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t foreach ($order->products as $product)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \t$options=unserialize($product->Option);\r\n\t\t\t\t\t $option='';\t\t\t\t\t \r\n\t\t\t\t\t $i=1;\r\n\t\t\t\t\t if(!empty($options))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \t$count=count($options);\r\n\t\t\t\t\t\t\t\t foreach ($options as $key=>$value)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t \tif($i == $count)\r\n\t\t\t\t\t\t\t\t \t\t$option .= $value;\r\n\t\t\t\t\t\t\t\t \telse\r\n\t\t\t\t\t\t\t\t \t\t$option .= $value.\",\";\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t $sku='';\r\n\t\t\t\t\t if(!empty($product->SKU))\r\n\t\t\t\t\t $sku=$product->SKU;\r\n\t\t\t\t\t else\r\n\t\t\t\t\t $sku='-';\r\n\t\t\t\t\t \r\n\t\t\t\t\t \t$Emaildata['products'][]=array('sku'=>$sku,'pname'=>$product->Product_name,'option'=>$option,'price'=>price($product->Price),'quantity'=>$product->Quantity,'total'=>price($product->Total));\r\n\t\t\t\t\t \t$subtotal +=$product->Total;\r\n\t\t\t\t\t }\t\t\t \t\t\t \t\r\n\t\t\t\t}\r\n\t\t\t\t$Emaildata['subtotal']=price($subtotal);\r\n\t\t\t\t$Emaildata['ship_charg']=0;\r\n\t\t\t\t$Emaildata['total_price']=price($Emaildata['ship_charg']+$subtotal);\r\n\t\t\t\t$Emaildata['base_url']=base_url();\r\n\t\t\t\t\r\n\t\t\t\t$content = $this->Email_template_model->get_temp_by_id(6);\r\n\t\t\t\t$this->load->library('parser');\t\t\r\n\t\t\t\t$subject = $content[0]->template_title;\r\n\t\t\t\t$content = $content[0]->content;\r\n\t\t\t\t$from = '[email protected]';\r\n\t\t\t\t$site_settings=$this->Member_model->get_site_settings();\t\t\r\n\t\t\t\t$EmailId=array($Emaildata['email'],$site_settings[0]->super_admin_email_id);\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->Email_template_model->sendmail_template($from,$EmailId,$subject,$content,$subject,$Emaildata);\r\n\t\t\t\tredirect('paypal/received_order/'.$order_id);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"transcation id \".$tx.\" does not exists,Please contact to admin\";\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\techo \"something went wrong.Please contact to admin\";\t\r\n\t\t\t}\t\r\n \r\n }", "title": "" }, { "docid": "15a3092e1ecbf1d24ae16ccbfd5cbb72", "score": "0.58778614", "text": "public function proses()\n {\n $getparam = explode(\";\",$_GET['param']);\n $getso = $this->Detailsalesorder_model->get_where_in('no_so',$getparam,'trans_so_header');\n\n $and = \" proses_do IS NULL \";\n $getitemso = $this->Detailsalesorder_model->get_where_in_and('no_so',$getparam,$and,'trans_so_detail');\n $driver = $this->Deliveryorder_model->pilih_driver()->result();\n\t\t$Arr_Driver\t= array();\n\t\tif($driver){\n\t\t\tforeach($driver as $keyD=>$valD){\n\t\t\t\t$Kode_Driver\t\t= $valD->id_karyawan;\n\t\t\t\t$Name_Driver\t\t= $valD->nama_karyawan;\n\t\t\t\t$Arr_Driver[$Kode_Driver]\t= $Name_Driver;\n\t\t\t}\n\t\t\tunset($driver);\n\t\t}\n $kendaraan = $this->Deliveryorder_model->pilih_kendaraan()->result();\n $Arr_Kendaraan = array();\n if($kendaraan){\n foreach($kendaraan as $keyK=>$valK){\n $Id_kendaraan = $valK->id_kendaraan;\n $Nama_kendaraan = $valK->nm_kendaraan;\n $Arr_Kendaraan[$Id_kendaraan] = $Nama_kendaraan;\n }\n unset($kendaraan);\n }\n $this->template->set('param',$getparam);\n $this->template->set('headerso',$getso);\n $this->template->set('getitemso',$getitemso);\n $this->template->set('arr_driver',$Arr_Driver);\n $this->template->set('kendaraan',$Arr_Kendaraan);\n $this->template->title('Input Delivery Order');\n $this->template->render('deliveryorder_form');\n }", "title": "" }, { "docid": "9b65fc0f48419fddd81fdfd067dc8271", "score": "0.5853224", "text": "public function paymentstatus($id)\n {\n\n $paytmChecksum \t= \"\";\n $paramList \t\t= array();\n $isValidChecksum= \"FALSE\";\n\n $paramList = $_POST;\n $paytmChecksum = isset($_POST[\"CHECKSUMHASH\"]) ? $_POST[\"CHECKSUMHASH\"] : \"\"; //Sent by Paytm pg\n\n header(\"Pragma: no-cache\");\n header(\"Cache-Control: no-cache\");\n header(\"Expires: 0\");\n\n //Verify all parameters received from Paytm pg to your application. Like MID received from paytm pg is same as your application’s MID, TXN_AMOUNT and ORDER_ID are same as what was sent by you to Paytm PG for initiating transaction etc.\n $isValidChecksum = verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum); //will return TRUE or FALSE string.\n\n\n if($isValidChecksum == \"TRUE\") {\n echo \"<b>Checksum matched and following are the transaction details:</b>\" . \"<br/>\";\n\n // echo \"<pre>\";\n // print_r($_POST);\n // echo \"<pre>\";\n\n if ($_POST[\"STATUS\"] == \"TXN_SUCCESS\") {\n // echo \"<b>Transaction status is success</b>\" . \"<br/>\";\n //Process your transaction here as success transaction.\n //Verify amount & order id received from Payment gateway with your application's order id and amount.\n $save['transaction_id'] = $_POST[\"ORDERID\"];\n $save['payment_status'] = $_POST[\"STATUS\"];\n $save['transaction_date'] = $_POST[\"TXNDATE\"];\n\n if(!empty($id)){\n $this->common->update(\"delapp_deliveries\",$save,['id'=>$id]);\n // print_r($save);die;\n redirect('chloonline/PaytmSucessResponse/'. $id);\n }\n }\n else {\n // echo \"<b>Transaction status is failure</b>\" . \"<br/>\";\n $save['payment_status'] =$_POST[\"STATUS\"];\n $save['transaction_date'] =$_POST[\"TXNDATE\"];\n $save['transaction_id'] =$_POST[\"ORDER_ID\"];\n if(!empty($id)){\n $this->common->update(\"delapp_deliveries\",$save,['id'=>$id]);\n redirect('chloonline/PaytmFailResponse/'. $id);\n }\n }\n\n\n\n }\n else {\n echo \"<b>Checksum mismatched.</b>\";\n //Process transaction as suspicious.\n }\n\n }", "title": "" }, { "docid": "b28581045eede871bb8f050ec2dabdaf", "score": "0.5843715", "text": "public function getPaymentStatus(Request $request){\n\n\t\t$purchase_id = ($request->session()->has('purchase_id'))? $request->session()->get('purchase_id') : 0;\n\t\t$_tienda='';\n\t\t$purchase= Purchase::find($purchase_id);\n\t\tif($purchase->shop_id == 1)$_tienda='eagletekmexico';\n\t\tif($purchase->shop_id == 2)$_tienda='ziotrobotik';\n\n\t\t// Get the payment ID before session clear\n\t\t$payment_id = Session::get('paypal_payment_id');\n\n\t\t// clear the session payment ID\n\t\tSession::forget('paypal_payment_id');\n\n\t\tif (empty($request->input('PayerID')) || empty($request->input('token'))) {\n\t\t\tif($purchase_id){\n\t\t\t\t$purchase->status=4;\n\t \t\t$purchase->save();\n\t\t\t}\n\t\t\tSession::flash('alert', 'Proceso de pago no completado.');\n\t\t\tSession::flash('alert-class', 'alert-danger');\n\t\t\treturn redirect('/shopping-cart');\n\t\t}\n\n\t\t$payment = Payment::get($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($request->input('PayerID'));\n\n\t\t//Execute the payment\n\t\t$result = $payment->execute($execution, $this->_api_context);\n\n\t\tif ($result->getState() == 'approved') { // payment made\n\t\t \t// Payment is successful do your business logic here\n\t\t\tif($purchase_id){\n \t\t$purchase->status=3;\n \t\t$purchase->save();\n\t\t\t}\n\t\t\tCart::destroy();\n\t\t\tSession::forget('session_discount_code');\n \tSession::forget('session_type_discount');\n \tSession::forget('session_discount');\n\t\t \tSession::flash('alert', 'Pago procesado correctamente!');\n\t\t \tSession::flash('alert-class', 'alert-success');\n\t\t return redirect('/shopping-cart/payment-success');\n\t\t}\n\n\t\t$purchase->status = 4;\n\t\t$purchase->save();\n\n\t\tSession::flash('alert', 'Ocurrió un error inesperado y el proceso de pago ha fallado.');\n\t\tSession::flash('alert-class', 'alert-danger');\n\t\treturn redirect('/shopping-cart');\n\t}", "title": "" }, { "docid": "2bc1ba859f27cc185075eca2b053faee", "score": "0.5841064", "text": "public function cetakOrdernya()\n\t{\n\t\t\t// --------------------------------------\n\t\t$result = array(); \n\t\t$key1 = \"c67536e59042f4f7049d441a3a5f71e1\";\n\t\t$key2 = \"cd187b9bff4a84415908698f9793098d\";\n\t\t$tgl=date('Ymd') ;\n\t\t$password=\"05144f4e12aaa402aeb51ef2c7dde527\";//MD5($key1 + $tgl + \"201\" + \"3171030101710005\" + $key2);\n\t\t$username=\"ecom\";\n\t\t$gab=base64_encode($username.$password);\n\t\t//-----------------------------------------------------------------------------------\t\n\t\t//$kodepossip=$_POST['kodepossip'];\n\t\t$messtype=\"301\";//\"201\";\t\n\t\t$userid=\"dede123\";\n\t\t//$param1=$_POST['IdOrder'];//\"3171030101710005\";\n\t\t$param1=$idordernya;//\"3171030101710005\";\n\t\t//$param1=$_POST['idorder'];//\"3171030101710005\";\n\t\t\n\t\t//$param1=\"3171030101710005\";\n\t\t$param2=\"\";\n\t\t$param3=\"\";\n\t\t$param4=\"\";\n\t\t$param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t// $messtype=\"202\";\t\n\t\t// $userid=\"dede123\";\n\t\t// $param1=\"0000000158\";\n\t\t// $param2=\"\";\n\t\t// $param3=\"\";\n\t\t// $param4=\"\";\n\t\t// $param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t$hash=strtolower (MD5($key1.$tgl.$messtype.$param1.$key2));\n\t\t\t$data_string = '{\n\t\t\t\t\"messtype\":\"'.$messtype.'\",\n\t\t\t\t\"param1\":\"'.$param1.'\",\n\t\t\t\t\"userid\":\"'.$userid.'\",\n\t\t\t\t\"param2\":\"'.$param2.'\",\n\t\t\t\t\"param3\":\"'.$param3.'\",\n\t\t\t\t\"param4\":\"'.$param4.'\",\n\t\t\t\t\"param5\":\"'.$param5.'\",\n\t\t\t\t\"hashing\":\"'.$hash.'\"}';\n\t\t\t\n\t\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://magenpos.posindonesia.co.id:6466/a767e8eec95442bda80c4e35e0660dbb\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); \n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); \n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \n\t\t\t\t\t'Accept: application/json',\n\t\t\t\t\t'Content-Type: application/x-www-form-urlencoded') \n\t\t\t\t);\n\t\n\t\t\n\t\t$response1 = curl_exec($ch);\n\t\t$err1 = curl_error($ch);\n\t\t//print_r(\"<br>\".$response1.\"<br>\");\n\t\t\n\t\t\n\t\tcurl_close($ch);\n\t\t//$response1=htmlspecialchars($response1,ENT_QUOTES);\n\t\t$response = json_decode($response1, true);\n\t\t//print_r($response);\n\t\t$code = $response['rc_mess']; \n//\t\t$code =$response['rc_mess'];\n\t\t//print_r(\"<br>Hasil\".$code);\n//\t\tprint_r(\"<br>\".$hash);\n\t\t//print_r(\"<br>\".$data_string);\n\t\t\n\t\tif ($response =='') {\n\t\t\t$result[\"success\"] = false;\n\t\t\t$result[\"errors\"][\"iderror\"] = \"801\";\n\t\t\t$result[\"errors\"][\"error\"] = \"Data tidak ditemukan\";\n\t\t} \n\t\telse{\n\t\t\t\n\t\t\tif($code<>'00') {\n\t\t\t\t$result[\"success\"] = false;\n\t\t\t\t// $result[\"errors\"][\"iderror\"] = $code;\n\t\t\t\t// $result[\"errors\"][\"error\"] = $response['desk_mess'] ; \n\t\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess']\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$result[\"success\"] = true;\n\t\t\t\t//240|QOB1221717741|-|200|16831.68|1090.91|168.32|109.09|-|500000|-|-\n\t\t\t\t$par2= $response['response_data2'];\n\t\t\t\t$par3= $response['response_data3'];\n\t\t\t\t$par4= $response['response_data4'];\n\t\t\t\t//response_data2\":\"447|QOB1405072375|-|3400|71287.13|2000.0|712.87|200.0|-|900000|-|-\n\t\t\t\t$datakiriman=explode(\"|\",$response['response_data2']);\n\t\t\t\t$produk=$datakiriman[0].\"-\".\"QCOMM\";\n\t\t\t\t$pelanggan=$datakiriman[1];\n\t\t\t\t$backsheet=$datakiriman[2];\n\t\t\t\t$berat=$datakiriman[3];\n\t\t\t\t$beadasar=$datakiriman[4];\n\t\t\t\t$htnb=$datakiriman[5];\n\t\t\t\t\n\t\t\t\t$ppn=$datakiriman[6];\n\t\t\t\t$ppnhtnb=$datakiriman[7];\n\t\t\t\t$isikiriman=$datakiriman[8];\n\t\t\t\t$nilaibarang=$datakiriman[9];\n\t\t\t\t$total=number_format($beadasar+$htnb+$ppn+$ppnhtnb,0, ',', '.');\n\t\t\t\t//kurniawan|rt 03 rw 04 rt 03 rw 04 - Kel. Kebagusan Kec. Pasar Minggu KOTA ADM. JAKARTA SELATAN DKI JAKARTA 12520|-|-|-|-|-|12520|081231214|[email protected]\n\t\t\t\t\n\t\t\t\t$datasip=explode(\"|\",$response['response_data3']);\n\t\t\t\t$nmsip=$datasip[0];\n\t\t\t\t$almsip=$datasip[1];\n\t\t\t\t$kdposip=$datasip[7];\n\t\t\t\t$tlpsip=$datasip[8];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t//-||rw 04 rt 01 rw 04 rt 01 - Kel. Pulau Harapan Kec. Kepulauan Seribu Utara KAB. ADM. KEP. SERIBU DKI JAKARTA 14550|-|-|-|-|-|14550|\n\t\t\t\t\n\t\t\t\t$datasial=explode(\"|\",$response['response_data4']);\n\t\t\t\t$nmsial=$datasial[1];\n\t\t\t\t$almsial=$datasial[2];\n\t\t\t\t$kdposial=$datasial[8];\n\t\t\t\t$tlpsial=$datasial[9];\n\t\t\t\t\n\t\t\t\t$datalain=explode(\"|\",$response['response_data5']);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//number_format(round($ppnhtnb), 0, ',', '.')\n\t\t\t\t$datatarif=\"Bea Dasar :\".number_format($beadasar,0, ',', '.').\"\\n\".\n\t\t\t\t\t \"htnb : \".number_format($htnb,0, ',', '.').\"\\n\".\n\t\t\t\t\t\t \"ppn :\".number_format($ppn,0, ',', '.').\"\\n\".\t\n\t\t\t\t\t\t \"ppnhtnb :\".number_format($ppnhtnb,0, ',', '.');\n\t\t\t\t\n\t\t\t\t$datapengirim=\"Nama :\".$nmsip.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsip.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsip.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposip;\n\t\t\t\t$datapenerima=\"Nama :\".$nmsial.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsial.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsial.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposial;\n\t\t\t\t\n\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess'],\n\t\t\t\t 'userid'=> $response['userid'],'response_data1'=>$response['response_data1'],\n\t\t\t\t\t\t\t\t'response_data2'=> $response['response_data2'],'response_data3'=> $response['response_data3'],\n\t\t\t\t\t\t\t\t'response_data4'=> $response['response_data4']);\n\t\t\t\t\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t//echo json_encode($result);\n\t\treturn json_encode($result);\n\t\t//echo json_encode($response);\n\t\t//return $response1;\n\t}", "title": "" }, { "docid": "8e6a9590e0c6c987b93443b90daa130a", "score": "0.58308625", "text": "public function approve($id)\n {\n $kondisi = $this->input->post('id_kondisi');\n $sql = $this->db->query(\"SELECT tanggal FROM ticket WHERE id_ticket = '$id'\")->row();\n $sql2 = $this->db->query(\"SELECT nama_kondisi FROM kondisi WHERE id_kondisi = '$kondisi'\")->row();\n //Data\n $prio = $sql2->nama_kondisi;\n $date = $sql->tanggal;\n $date2 = $this->input->post('waktu_respon');\n //Mengambil session admin\n $id_user = $this->session->userdata('id_user');\n\n //Melakukan update data ticket dengan mengubah status ticket menjadi 2, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'id_kondisi' => $kondisi,\n 'deadline' => date('Y-m-d H:i:s', strtotime($date. ' + '.$date2.' days')),\n 'status' => 3,\n 'last_update'=> date(\"Y-m-d H:i:s\"),\n 'teknisi' => $this->input->post('id_teknisi')\n );\n\n //Melakukan insert data tracking ticket bahwa ticket di-approve oleh admin, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => date(\"Y-m-d H:i:s\"),\n 'status' => \"Ticket Received\",\n 'deskripsi' => \"Priority of the ticket is set to \".$prio.\" and assigned to technician.\",\n 'id_user' => $id_user\n );\n\n //Query untuk melakukan update data ticket sesuai dengan array '$data' ke tabel ticket\n $this->db->where('id_ticket', $id);\n $this->db->update('ticket', $data);\n\n //Query untuk melakukan insert data tracking ticket sesuai dengan array '$datatracking' ke tabel tracking\n $this->db->insert('tracking', $datatracking);\n }", "title": "" }, { "docid": "620ba8562ff16803d565e7f031f816f9", "score": "0.5829209", "text": "public function retornoTeste()\r\n {\r\n $orderId = Mage::getSingleton(\"core/session\")->getPayOrderId();\r\n $this->log('orderId: '.$orderId);\r\n //$this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderId);\r\n $this->_order = Mage::getModel('sales/order')->load($orderId);\r\n \r\n //$this->log('_order_: '. var_dump($this->_order));\r\n $this->processEvo(Mage::getSingleton(\"core/session\")->getPayEvoOrderId());\r\n }", "title": "" }, { "docid": "39c5ba7ae4de43900e6e583fceba48f0", "score": "0.5816836", "text": "public function orders_datatable()\n\t\t{\n\t\t\t\n\t\t\t$list = $this->Orders->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $order) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t//$row[] = '<input type=\"checkbox\" name=\"cb[]\" id=\"cb\" onclick=\"enableButton(this)\" value=\"'.$order->id.'\">';\n\t\t\t\t\n\t\t\t\t$url = 'admin/order_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$order->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:40%; margin-right:40%;\"><a data-toggle=\"modal\" href=\"#\" data-target=\"#viewOrderModal\" class=\"link\" onclick=\"viewOrder('.$order->id.',\\''.$url.'\\');\" title=\"View\">'.$order->reference.'</a></div>';\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($order->total_price, 0);\n\t\t\t\t$row[] = $order->num_of_items;\n\t\t\t\t\n\t\t\t\t$user_array = $this->Users->get_user($order->customer_email);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($user_array){\n\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t$fullname = $user->first_name.' '.$user->last_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$row[] = $fullname .' ('.$order->customer_email.')';\n\t\t\t\t\n\t\t\t\t//GET PAYMENT STATUS FROM TRANSACTION DB\n\t\t\t\t$transaction_array = $this->Transactions->get_transaction($order->reference);\n\t\t\t\t$payment_status = '';\n\t\t\t\tif($transaction_array){\n\t\t\t\t\tforeach($transaction_array as $transaction){\n\t\t\t\t\t\t$payment_status = $transaction->status;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($payment_status == '1'){\n\t\t\t\t\t$payment_status = '<span class=\"badge bg-green\">Paid</span>';\n\t\t\t\t}else{\n\t\t\t\t\t$payment_status = '<span class=\"badge bg-yellow\">Pending</span>';\n\t\t\t\t}\n\t\t\t\t$row[] = $payment_status;\n\t\t\t\t\n\t\t\t\t//GET SHIPPING STATUS FROM DB\n\t\t\t\t$shipping_array = $this->Shipping->get_shipping($order->reference);\n\t\t\t\t$shipping_status = '';\n\t\t\t\tif($shipping_array){\n\t\t\t\t\tforeach($shipping_array as $shipping){\n\t\t\t\t\t\t$shipping_status = $shipping->status;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($shipping_status == '1'){\n\t\t\t\t\t$shipping_status = '<span class=\"badge bg-green\">Shipped</span>';\n\t\t\t\t}else{\n\t\t\t\t\t$shipping_status = '<span class=\"badge bg-yellow\">Pending</span>';\n\t\t\t\t}\n\t\t\t\t$row[] = $shipping_status;\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y\", strtotime($order->order_date));\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y, g:i a\", strtotime($order->last_updated));\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#editModal\" class=\"btn btn-info btn-xs\" onclick=\"editOrder('.$order->id.',\\''.$url.'\\');\" title=\"Edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//$row[] = $type->details;\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Orders->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Orders->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "title": "" }, { "docid": "fdd8d0cd8e2d3b70d5d03ac2a4dc273a", "score": "0.5815649", "text": "public function checkoutAction()\r\n\t{\r\n\r\n\t\t$this->_view->hienthi = false;\r\n\t\t$this->_view->_title = 'Thông tin đặt hàng';\r\n\t\t$this->_view->motoInCart = $this->_model->listItem($this->_arrParam, ['task' => 'motos_in_cart']);\r\n\t\t// $this->_view->user = $this->_model->infoItem($this->_arrParam, ['task' => 'info_user']);\r\n\r\n\t\tif (isset($this->_arrParam['form']['token'])) {\t\t //khi nhan nut xac nhan\t\r\n\t\t\t$this->_validate->validateInfoOrder($this->_arrParam['form_user']);\r\n\t\t\t$this->_arrParam['form_user'] = $this->_validate->getResult();\r\n\t\t\tif (!$this->_validate->isValid()) {\r\n\t\t\t\t$this->_view->user = $this->_model->infoItem($this->_arrParam, ['task' => 'info_user']);\r\n\t\t\t\t$this->_view->hienthi = true;\r\n\t\t\t\t$this->_view->errors = $this->_validate->showErrorsPublic();\r\n\t\t\t} else {// khong co loi\r\n\r\n\t\t\t\t$this->_model->save($this->_arrParam, ['task' => 'submit_cart']);\r\n\t\t\t\t// URL::redirect('frontend', 'index', 'notice', ['type' => 'dat_hang_thanh_cong']);\r\n\t\t\t}\r\n\t\t} else { // moi vao trang\r\n\t\t\t$this->_view->hienthi = true;\r\n\t\t\t$this->_view->user = $this->_model->infoItem($this->_arrParam, ['task' => 'info_user']);\r\n\t\t}\r\n\t\t$this->_view->render($this->_arrParam['controller'] . '/checkout');\r\n\t}", "title": "" }, { "docid": "47d31a4c3d5679d879978d0a26b4aa84", "score": "0.5790034", "text": "function pay_success() {\n \n \n $data = [];\n $pos_data = [];\n $data1 = [];\n //\n $data['page_title'] = 'POS - Select Payment Option';\n $data['search_url'] = base_url().'/shows/search';\n $date['delete_url'] = base_url().'/delete_cart';\n \n $data['categories'] = $this->model->get_categories();\n $data['current'] = 'payment_success';\n if($this->request->getVar()) {\n $pos_data['name'] = $this->request->getVar('fname'). \" \".@$this->request->getVar('lname');\n $pos_data['email'] = $this->request->getVar('email');\n $pos_data['phone'] = $this->request->getVar('phone');\n \n if(!empty($this->request->getVar('capture_pay'))) {\n $cap_pay = @$this->request->getVar('capture_pay');\n $pay_det = json_decode(@$this->request->getVar('capture_pay'));\n $card_data = [\n 'method' => $pay_det->charges->data[0]->payment_method_details->card_present->brand.\"**\".$pay_det->charges->data[0]->payment_method_details->card_present->last4,\n 'status' => $pay_det->charges->data[0]->outcome->type,\n 'message' =>$pay_det->charges->data[0]->outcome->seller_message\n ];\n $pos_data['content'] = $cap_pay;\n }\n\n \n if(!empty($this->request->getVar('payment_type'))) {\n $pos_data['type'] = @$this->request->getVar('payment_type');\n } else {\n $pos_data['type'] = \"Voucher\"; \n }\n \n }\n \n \n if($this->request->getVar('payment_type') == 'Free'){\n $_SESSION['cart']['itotal'] = number_format(0,2);\n $_SESSION['cart']['total'] = number_format(0,2);\n $_SESSION['cart']['salestax'] = number_format(0,2);\n $_SESSION['cart']['processingfees'] = number_format(0,2);\n }\n $pos_data['booked_data'] = json_encode($_SESSION['cart']);\n $data1 = $_SESSION['cart'];\n //echo \"<pre>\"; print_r($data1); \"</pre>\"; die;\n $data1['pcount'] = count($data1['item']);\n $random = mt_rand(100000000, 999999999);\n $pos_data['randid'] = \"BSTD\".$random;\n if($this->request->getVar('payment_type') == 'Free'){\n $pos_data['amount'] = number_format(0,2);\n }else{\n $pos_data['amount'] = number_format($data1['total'],2);\n }\n $pos_data['timestamp'] = date('Y-m-d h:i:a');\n $pos_data['seat_status'] = 1;\n //echo \"<pre>\"; print_r($pos_data); \"</pre>\"; die;\n $success = $this->transaction_model->insert($pos_data);\n //print_r($success); die;\n if(!empty($_SESSION['cart_details']['seat_arr'])) {\n $update_seats = $this->model->update_individual_seats_booked($_SESSION['cart_details']['content'],$_SESSION['cart_details']['venue'],$_SESSION['cart_details']['date'],$_SESSION['cart_details']['time'],$_SESSION['cart_details']['section'],$_SESSION['cart_details']['seat_arr'],$success);\n }\n \n //print_r($success); die;\n //Qrcode Path For Server\n $filepath = $_SERVER['DOCUMENT_ROOT'].'/public/images/qrcode/';\n\n //Qrcode Path For Local\n //$filepath = $_SERVER['DOCUMENT_ROOT'].'/pos/public/images/qrcode/';\n //Qrcode Image name\n $filename = \"qrcode_\".$random.\".png\";\n //echo $filepath; die;\n if($success) \n { \n //Qrcode Creation for Ticket transaction\n $result = Builder::create()\n ->writer(new PngWriter())\n ->writerOptions([])\n ->data($pos_data['randid'])\n ->encoding(new Encoding('UTF-8'))\n ->errorCorrectionLevel(new ErrorCorrectionLevelHigh())\n ->size(300)\n ->margin(10)\n ->roundBlockSizeMode(new RoundBlockSizeModeMargin())\n //->logoPath($_SERVER['DOCUMENT_ROOT'].'/pos/vendor/endroid/qr-code/tests/assets/symphony.png')\n ->labelText('')\n ->labelFont(new NotoSans(20))\n ->labelAlignment(new LabelAlignmentCenter())\n ->build();\n\n //Save Qrcode path\n $result->saveToFile($filepath.$filename);\n \n //Send Email For transaction\n $msg = new \\stdClass();\n //required settings\n $msg->subject = \"Tickets Booked\"; //SUBJECT\n //$msg->textbody = \"My text-only message\"; //TEXT MSG, NULL IF sending HTML\n //$msg->htmlbody = NULL; //HTML MSG, NULL if sending TEXT\n $body = \"<!DOCTYPE html>\";\n $body .= \"<head><meta charset='utf-8'>\";\n $body .= \"<meta name='viewport' content='width=device-width'>\";\n $body .=\"<link rel='stylesheet' id='font-awesome-css' href='https://use.fontawesome.com/releases/v5.8.1/css/all.css?ver=5.3.2' media='all' />\";\n $body .=\"<link href='https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap' rel='stylesheet'></head>\";\n $body .=\" <body width='100%' style='margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #fff;'>\n <center style='width: 100%; background-color: #ccc;'> \";\n //$body .=\" <div style='display: none; font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: 'Source Sans Pro', sans-serif;'> (Optional) This text will appear in the inbox preview, but not the email body. It can be used to supplement the email subject line or even summarize the email's contents. Extended text preheaders (~490 characters) seems like a better UX for anyone using a screenreader or voice-command apps like Siri to dictate the contents of an email. If this text is not included, email clients will automatically populate it using the text (including image alt text) at the start of the email's body. </div>\";\n //$body .= \"<div style='display: none; font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: 'Source Sans Pro', sans-serif;'> &zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp; </div>\";\n $body .=\" <table align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='650' style='margin: auto;' class='email-container' style='background: #fff;'>\";\n $body .= \"<tr><td style='background-color: #f5f5f5;'>\";\n $body .=\"<table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>\";\n $body .= \"<tr><td style='padding:15px; font-family: 'Source Sans Pro', sans-serif; line-height: 25px; color: #555555;' class='thank'> \";\n $body .= \"<h2 style='margin: 0 0; word-break: break-all; margin-bottom:0px;font-size: 35px; text-align:center; font-weight:500;padding:0;\n color: #000;'>Your Receipt</h2></td> \";\n $body .= \"</tr></table></td></tr>\";\n $body .= \"<tr><td style='padding:20px 0;background-color: #fff;'>\n <img src='\".base_url().'/images/qrcode/'.$filename.\"' width='600' height='' alt='alt_text' border='0' style='width: 225px;\n max-width: 600px;margin:0 auto;display:block;' class='g-img'>\n </td>\n </tr> \";\n $body .= \"<tr>\n <td style='padding: 15px;background-color: #fff;'>\n <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'> \";\n $body .= \"<tr>\n <th valign='top' width='100%' class='stack-column-center'> \";\n $body .=\"<table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>\";\n $body .=\"<tr>\n <td style='font-family: ' Source Sans Pro', sans-serif;' class='center-on-narrow'>\n <h2\n style='font-size: 25px;font-style: normal;font-weight: normal;line-height: 35px;letter-spacing: normal;text-align: left; margin:0 0 5px;color: #000;'>\n Transaction Id #BSTD\".$random.\" Details\n </h2>\";\n $body .=\"<h4\n style='font-size: 20px;font-style: normal;font-weight: normal;line-height: 35px;letter-spacing: normal;text-align: left; margin:0 0 5px;color: #000;'>\n Customer Info\n </h4>\";\n $body .=\"<table style='width:100%;'>\n <tr>\";\n $body .=\"<td style='text-align:left; padding:5px;'>\n <p\n style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>\n <i style='display:block;font-weight:normal; font-style:normal;'>Name:</i>\n <b>\".$pos_data['name'].\"</b>\n </p>\n </td>\";\n $body .=\"<td style='text-align:left; padding:5px;'>\n <p\n style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>\n <i style='display:block;font-weight:normal; font-style:normal;'>Email:</i>\n <b>\".$pos_data['email'].\"</b>\n </p>\n </td>\";\n \n $body .=\"</tr><tr>\";\n $body .=\"<td style='text-align:left; padding:5px;'>\n <p\n style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>\n <i style='display:block;font-weight:normal; font-style:normal;'>Phone:</i>\n <b>\".$pos_data['phone'].\"</b>\n </p>\n </td>\n <td style='text-align:left; padding:5px;'>\n <p\n style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>\n <i style='display:block;font-weight:normal; font-style:normal;'>Ticket Status:</i>\n <b>Issued</b>\n </p>\n </td></tr>\n </table>\";\n $body .=\"<h4\n style='font-size: 20px;font-style: normal;font-weight: normal;line-height: 35px;letter-spacing: normal;text-align: left; margin:0 0 5px;color: #000;'>\n Item Purchased\n </h4>\";\n $body .=\" <table style='width:100%; border:1px solid #ccc;border-collapse: collapse;'>\n <tr>\n <th style='text-align:left; padding:10px 5px;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>Item</b>\n </p>\n </th>\n <th style='text-align:left; padding:10px 5px;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>Qty</b>\n </p>\n </th>\n <th style='text-align:left; padding:10px 5px;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>Price</b>\n </p>\n </th>\n </tr>\";\n //$body .= \"\";\n \n for($i =1; $i<=$data1['pcount']; $i++) {\n if($data1['item'][$i]['qty'] > 0) {\n $body .= \"<tr><td\n style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n \".strtoupper(@$data1['content'][0]->title).\" - \".date('M d, Y',strtotime($data1['item'][$i]['date'])).\", \".date('h:i a',strtotime($data1['item'][$i]['time'])).\"\";\n $body .= \" <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\".$data1['item'][$i]['venue'].\" - \".$data1['item'][$i]['location'].\"</p>\n </p>\";\n if(strpos($data1['item'][$i]['name'], 'Family') !== false) {\n $body .= \" <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\".$data1['item'][$i]['name'].\" [\".@$data1['family_seats'].\"] - Preferred </p>\n </p>\";\n } else {\n $body .= \" <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\".$data1['item'][$i]['name'].\" - Preferred </p>\n </p>\";\n }\n if($this->request->getVar('payment_type') != 'Free'){\n $body .= \"</td>\n <td\n style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n \".$data1['item'][$i]['qty'].\"\n </p>\n </td>\n <td\n style='text-align:right; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n $\".number_format($data1['item'][$i]['price'],2).\"\n </p>\n </td></tr> \";\n }else{\n $body .= \"</td>\n <td\n style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n \".$data1['item'][$i]['qty'].\"\n </p>\n </td>\n <td\n style='text-align:right; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n $\".number_format(0,2).\"\n </p>\n </td></tr> \";\n }\n } } //}\n if(!empty($_SESSION['cart']['seats_selected'])) {\n $seat_no = implode(\",\",@$_SESSION['cart']['seats_selected']); \n $body .=\"<tr><td\n style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc; font-size:16px;'>Seats Selected:- \".$seat_no.\"</td><td style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'></td><td style='text-align:left; padding:10px;background-color: #eee;border-bottom:1px solid #ccc;'></td></tr>\";\n }\n //if(@$_SESSION['ccodeinfo']->type != 2) { \n if($this->request->getVar('payment_type') != 'Free'){\n $body .=\"<tr>\n <td\n style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>Tax</i>\n </p>\n </td>\n <td\n style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n &nbsp\n </p>\n </td>\n <td\n style='text-align:right; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>$\".getenv('salestax').\"</i>\n </p>\n </td>\n </tr> \";\n $body .= \" <tr>\n <td\n style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>Processing Fees</i>\n </p>\n </td>\n <td\n style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n &nbsp\n </p>\n </td>\n <td\n style='text-align:right; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>$\".getenv('processingfees').\"</i>\n </p>\n </td>\n </tr>\";\n //}\n if(isset($_SESSION['ccodeinfo']) && !empty($_SESSION['ccodeinfo'])) {\n $body .= \" <tr>\";\n \n $body .= \"<td style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>Coupon Applied - \".$_SESSION['ccodeinfo']->code.\"(\".$_SESSION['ccodeinfo']->discount.\")</i>\n </p>\n </td>\";\n \n $body .= \"<td\n style='text-align:left; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n &nbsp\n </p>\n </td>\n <td\n style='text-align:right; padding:10px;background-color: #fff;border-bottom:1px solid #ccc;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;font-weight:normal;'>\n <i>$\".number_format(@$data1['ptotal'],2).\"</i>\n </p>\n </td>\"; \n \n $body .= \" </tr>\";\n }\n }\n if($this->request->getVar('payment_type') != 'Free'){\n $body .= \" <tr>\n <td style='text-align:left; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>Total</b>\n </p>\n </td>\n <td style='text-align:left; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n &nbsp\n </p>\n </td>\n <td style='text-align:right; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>$\".number_format($data1['total'],2).\"</b>\n </p>\n </td>\n </tr>\";\n }else{\n $body .= \" <tr>\n <td style='text-align:left; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>Total</b>\n </p>\n </td>\n <td style='text-align:left; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n &nbsp\n </p>\n </td>\n <td style='text-align:right; padding:10px;background-color: #fff;'>\n <p\n style='color: #333; font-size:16px !important; line-height:18px; margin:0;'>\n <b>$\".number_format(0,2).\"</b>\n </p>\n </td>\n </tr>\";\n }\n $body .= \"\n </table>\n </td>\n </tr>\n </table>\n </th>\n </tr>\n </table>\";\n if($pos_data['type'] == 'Stripe') {\n $body .=\" <h4\n style='font-size: 20px;font-style: normal;font-weight: normal;line-height: 35px;letter-spacing: normal;text-align: left; margin:10px 0 5px;color: #000;'>\n Payment Details\n </h4>\";\n $body .= \" <table role='presentation' cellspacing='0' cellpadding='0' border='0'\n style='margin: auto;width: 100%;'>\n <tr>\n <td width='50%' class='stack-column-center'>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>Amount:</p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'><b>$\".number_format($data1['total'],2).\"</b>\n </p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>Status:</p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>\n <b>\".$card_data['status'].\"</b></p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>Timestamp:</p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'><b>\".date('Y-m-d h:i:s').\"</b></p>\n </td>\n <td width='50%' class='stack-column-center'>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>Method:</p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'><b>\".$card_data['method'].\"</b></p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'>Message:</p>\n <p style='font-size: 16px;line-height: 25px;text-align: left; margin:0;color: #000;'><b>\".$card_data['message'].\"</b></p>\n </td>\n </tr>\n </table>\";\n }\n $body .=\"\n </td>\n </tr>\";\n $body .= \" <footer style='background:#fff;'>\n \n <table align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='650'\n style='margin: auto;' class='email-container' style='background:#fff;'>\n <tr>\n <td width='100%' style='border-top:1px solid #eee;background:#fff; text-align:center; padding:10px 0 15px;'>\n <p\n style='margin:0;color:#0D2030; padding:5px 0; font-weight:normal;font-size: 14px; text-transform:uppercase;'>\n Copyright © 2021 POS</p>\n </td>\n </tr>\n </table>\n \n </footer> \";\n $body .=\"</center>\n </body>\n \n </html>\";\n //echo $body; die;\n //Unset Cart Items\n \n $msg->htmlbody = $body;\n $msg->to = array($pos_data['email'],$pos_data['name']); //TO\n $msg->from = array(getenv('fromaddress'),getenv('fromname')); //FROM\n \n //optional settings\n //$msg->reply_to = array('[email protected]','XYZ Company'); //REPLY TO\n //$msg->cc = array('[email protected]','Someone'); //CC\n //$msg->bcc = array('[email protected]','Somebody Else'); //BCC\n $msg->track_clicks = TRUE; //TRACK CLICKS, TRUE by default\n $msg->track_opens = TRUE; //TRACK OPENS, TRUE by default\n $msg->client_reference = NULL; //CLIENT ID (string)\n $msg->mime_headers = NULL; //ADDITIONAL MIME HEADERS (array)\n $msg->attachments = NULL; //ATTACHMENTS (array)\n $msg->inline_images = NULL; //INLINE IMAGES (array)\n \n //instantiate library and pass info\n $tmail = new \\Transmail\\TransmailClient($msg,getenv('transmailkey'),\n getenv('transbounceaddr'), TRUE);\n \n //send the message\n $response = $tmail->send();\n if(!empty($success)) {\n $trans_data = $this->transaction_model->get_transaction_details($success);\n }\n //For Admin Mail \n $msg1 = new \\stdClass();\n //required settings\n $msg1->subject = \"Tickets Booked\"; //SUBJECT\n //$mpdf = new \\Mpdf\\Mpdf();\n $html_data = view('pdf_view',['trans_data' => $trans_data]);\n //echo $html_data; die;\n //$mpdf->WriteHTML($html);\n $msg1->htmlbody = $html_data;\n $msg1->to = array('[email protected]','Tester'); //TO\n $msg1->from = array(getenv('fromaddress'),getenv('fromname')); //FROM\n $msg1->track_clicks = TRUE; //TRACK CLICKS, TRUE by default\n $msg1->track_opens = TRUE; //TRACK OPENS, TRUE by default\n $msg1->client_reference = NULL; //CLIENT ID (string)\n $msg1->mime_headers = NULL; //ADDITIONAL MIME HEADERS (array)\n $msg1->attachments = NULL; //ATTACHMENTS (array)\n $msg1->inline_images = NULL; //INLINE IMAGES (array)\n $tmail1 = new \\Transmail\\TransmailClient($msg1,getenv('transmailkey'),\n getenv('transbounceaddr'), TRUE);\n \n //send the message\n $response1 = $tmail1->send();\n //Admin Mail END\n\n if(!empty($_SESSION['cart'])) {\n unset($_SESSION['cart']);\n unset($_SESSION['cart_details']); \n unset($_SESSION['quantity_details']); \n unset($_SESSION['ccodeinfo']);\n unset($_SESSION['ccode']);\n }\n //print_r($success); die;\n $url = base_url().'/transactions/update_transaction/'.$success;\n if($pos_data['type'] == 'Cash') {\n $this->session->setFlashdata('msg', \"Ticket Booked Successfully! you will receive a mail shortly. Total Price is $\".$pos_data['amount'].\" <a href='\".$url.\"'>Check-in</a>\");\n } else {\n $this->session->setFlashdata('msg', \"Ticket Booked Successfully! you will receive a mail shortly. <a href='\".$url.\"'>Check-in</a>\");\n }\n \n return redirect()->to('/shows');\n }\n else\n {\n $this->session->setFlashdata('msg', \"Can't able to book ticket!!! Please check again.\");\n return redirect()->to('/shows');\n }\n \n }", "title": "" }, { "docid": "af623819984413b97a44902d7ef496f6", "score": "0.5780854", "text": "public function list_transaksi_selesai(){ \n if($this->session->userdata('id_level') =='1'){\n \n $data['pengguna'] = $this->db->get_where('pengguna', ['email' => $this->session->userdata('email')])->row_array();\n $data['transaksi'] = $this->m_admin->get_transaksi_selesai();\n\n $data_title['title'] = 'List Data Transaksi Selesai';\n\n $this->load->view('dashboard/header/header', $data_title);\n $this->load->view('dashboard/admin/index',$data);\n $this->load->view('dashboard/admin/list_transaksi_selesai',$data);\n $this->load->view('dashboard/footer/footer');\n\t\n } else{\n echo \"Anda tidak berhak mengakses halaman ini\";\n }\n }", "title": "" }, { "docid": "4cc9ecde735188d3a8ed5e27ac8c8eb8", "score": "0.5776979", "text": "public function aksi_acc_transaksi($id_transaksi){ \n if($this->session->userdata('id_level') =='1'){\n \n if($this->input->is_ajax_request()==true){\n \n $tgl_aktif = date(\"Y-m-d H:i:s\");\n\n $this->m_admin->acc_transaksi($id_transaksi,$tgl_aktif);\n\n $msg = [\n 'sukses' => 'Transaksi telah disetujui dan pelatihan sudah aktif'\n ];\n echo json_encode($msg);\n \n } else {\n echo \"tidak ada request\";\n }\n\t\n } else{\n echo \"Anda tidak berhak mengakses halaman ini\";\n }\n }", "title": "" }, { "docid": "b13a0d8de72ffa1a3b540ba8f0200d74", "score": "0.577696", "text": "public function ubah_status_pros_con()\n {\n $id_pros = $this->uri->segment(3);\n\n $data = ['status' => 3];\n\n $this->M_prospektus->proses_ubah_status_con($data, array('id_prospektus' => $id_pros));\n\n $this->session->set_flashdata('pesan', '<div class=\"alert alert-inv alert-inv-info alert-wth-icon alert-dismissible fade show\" role=\"alert\"><span class=\"alert-icon-wrap\"><i class=\"fa fa-check\" style=\"margin-top: -10px\"></i></span>\n Data Sukses Dikirim\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>');\n\n\n redirect(\"prospektus/detail/$id_pros/x\");\n }", "title": "" }, { "docid": "26c894bbf4a4f3c68399ac52f5f229d9", "score": "0.5767176", "text": "public function index($status='pending') {\n //Si el usuario solicito recordar entonces verifica a cookie\n if (!empty($_COOKIE['tokenCookie'])){\n $user = Account::where('token', $_COOKIE['tokenCookie'])->first();\n if (!empty($user))\n session(['user'=>$user]);\n }\n\n //Si la session esta vacia devuelve la pantalla a login\n if (empty(session('user')))\n return redirect('account/login');\n \n $user = session('user');\n $orders = array(); \n \n switch ($status) {\n case 'pending':\n $subtitle = 'Paquetes pendientes por entregar';\n $statusName='<p style=\"color: orange; margin:0;\">Paquetes pendientes</p>'; \n $queryFormer = \"SELECT * FROM orders WHERE id_user=\".$user->id.\" and (status LIKE 'pending' or status LIKE 'received' or status LIKE 'invoiced') \"\n . \"ORDER BY `orders`.`status` DESC, `orders`.`created_at` DESC\";\n $orders = DB::select($queryFormer);\n //$status = \"Paquete pendiente\";\n break;\n case 'received':\n $subtitle = 'Paquetes recibidos en nuestro almacen';\n $statusName='<p style=\"color: orange; margin:0;\">Paquetes recibidos</p>'; \n //$status = \"Paquete listo para la entrega\";\n break;\n case 'closed':\n $subtitle = 'Paquetes entregados al cliente';\n $statusName='<p style=\"color: orange; margin:0;\">Paquetes entregados</p>'; \n $queryFormer = \"SELECT * FROM orders WHERE id_user=\".$user->id.\" and status LIKE 'closed' ORDER BY `orders`.`updated_at` DESC\";\n $orders = DB::select($queryFormer); \n //$status = \"Paquete entregado\";\n break;\n } \n return view('order.index', ['user'=>$user, 'status'=>$status, 'statusName'=>$statusName, 'orders'=>$orders, 'subtitle'=>$subtitle]);\n }", "title": "" }, { "docid": "63992ef86f054f6790c3bd5c09b204d7", "score": "0.57633185", "text": "function successpayment()\n {\n\n /* Check for allowed IP */\n if ($this->config['allow_ip']) {\n $allowed_ip = explode(',', $this->config['allow_ip']);\n $valid_ip = in_array($_SERVER['REMOTE_ADDR'], $allowed_ip);\n if (!$valid_ip) {\n // TODO log\n return false;\n }\n }\n\n $response['orderId'] = $_POST['orderId'];\n $response['serviceName'] = $_POST['serviceName'];\n $response['eshopAccount'] = $_POST['eshopAccount'];\n $response['paymentStatus'] = $_POST['paymentStatus'];\n $response['userName'] = $_POST['userName'];\n $response['userEmail'] = $_POST['userEmail'];\n $response['paymentData'] = $_POST['paymentData'];\n $response['hash'] = $_POST['hash'];\n\n if (!empty($response['hash'])) {\n\n $order = uc_order_load($response['orderId']);\n if (!count($order))\n trigger_error('RBK Money : Полученный orderId (' . $response['orderId'] . ') не найден в базе', E_USER_WARNING);\n\n $string = $this->config['eshopId'] . '::' . $response['orderId'] . '::' . $response['serviceName'] . '::' . $response['eshopAccount'] . '::' . number_format($order->order_total, 2, '.', '') . '::' . $this->config['recipientCurrency'] . '::' . $response['paymentStatus'] . '::' . $response['userName'] . '::' . $response['userEmail'] . '::' . $response['paymentData'] . '::' . $this->config['secretKey'];\n $crc = md5($string);\n\n if ($response['hash'] == $crc) {\n list($dataBill) = $this->qs('*', array('id' => $response['orderId']));\n switch ($response['paymentStatus']) {\n case self::STATUS_PROCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_order_update_status($response['orderId'], 'processing');\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment processing'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n case self::STATUS_SUCCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_payment_enter($response['orderId'], 'RBK Money', $order->order_total, $order->uid, NULL, NULL);\n uc_cart_complete_sale($order);\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n }\n } elseif ($response['hash'] !== $crc) {\n /*uc_order_update_status($response['orderId'], 'canceled');\n uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, possible fraud. Order canceled'), $type = 'admin', $status = 1, $notify = FALSE);\n watchdog('uc_rbkmoney', 'MD5 checksum fail, possible fraud. Order canceled');*/\n trigger_error('RBK Money : Полученный hash не верный', E_USER_WARNING);\n }\n }\n }", "title": "" }, { "docid": "352fe26d2b6cc0c8889a339205256b8f", "score": "0.5761414", "text": "public function ambil($id)\n {\n $user_id = $this->session->userdata('id');\n $user = $this->user_model->user_detail($user_id);\n $transaksi = $this->transaksi_model->detail($id);\n $nomor_resi = $transaksi->nomor_resi;\n\n $status = 'Paket sedang dikirim oleh Kurir ';\n $provinsi_id = $user->provinsi_id;\n\n if ($transaksi->kurir == $user_id && $transaksi->stage == 7) {\n\n $data = [\n 'id' => $id,\n 'status' => $status,\n 'user_stage' => $this->session->userdata('id'),\n 'kurir_id' => $this->session->userdata('id'),\n 'stage' => 8,\n 'date_updated' => date('Y-m-d H:i:s')\n ];\n $this->transaksi_model->update($data);\n //Update Status Lacak\n $this->update_lacak($id, $status, $provinsi_id, $user, $nomor_resi);\n $this->session->set_flashdata('message', 'Data telah ditambahkan ');\n redirect(base_url('kurir/transaksi'), 'refresh');\n } else {\n redirect(base_url('kurir/404'));\n }\n }", "title": "" }, { "docid": "d8ea6bd97b12c04f33819a865be87caf", "score": "0.5759469", "text": "public function aktifPaket()\n {\n $user = $this->session->userdata('IdPerusahaan');\n\n $this->db->select('*');\n $this->db->from('tb_perusahaan as tph');\n $this->db->join('tb_paket as tp', 'tp.IdPaket = tph.IdPaket');\n $this->db->join('tb_aktivasi as ta', 'ta.IdPerusahaan = tph.IdPerusahaan');\n $this->db->where('tph.IdPerusahaan', $user);\n $this->db->order_by('ta.IdAktivasi', 'DESC');\n\n $query = $this->db->get();\n return $query;\n }", "title": "" }, { "docid": "d932ba602e62d5952fc80695663e4f7a", "score": "0.5759038", "text": "public function confirm() {\n if($this->request->server['REQUEST_METHOD'] == 'POST')\n {\n $order_id = $this->request->post['order_id'];\n\t\t\t\t\n\t\t\t\t$this->load->language('payment/paynow');\n\n $this->load->model('payment/paynow');\n $paynowInfo = $this->model_payment_paynow->getPaynowInfo($order_id);\n\n if($paynowInfo)\n {\n \t\n\t\t\t\t\t//close connection\n $msg = $this->request->post;\n\n $MerchantKey = $this->config->get('paynow_config_merchant_key');\n $validateHash = $this->CreateHash($msg, $MerchantKey);\n if($validateHash != $msg[\"hash\"]){\n $data['text_message'] = \"Paynow reply hashes do not match : \" . $validateHash . \" - \" . $msg[\"hash\"];\n }\n else\n {\n $this->model_payment_paynow->update($order_id\n , $paynowInfo['resulturl']\n , $msg[\"pollurl\"]\n , $msg[\"paynowreference\"]\n , $msg[\"amount\"]\n , $msg[\"status\"]\n );\n $this->load->model('checkout/order');\n\n if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_created_but_not_paid')){\n //$data['text_message'] = \"Transaction has not yet been paid on Paynow.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_cancelled')){\n //$data['text_message'] = \"Transaction was cancelled by the user. You will be redirected back to the checkout page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&amp;', '&', $this->url->link('checkout/checkout'));\n $order = $this->model_checkout_order->getOrder($order_id);\n if($order[\"order_status_id\"] != 7){\n $this->model_checkout_order->confirm($order_id, 7, \"Cancelled by user.\", true);\n }\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_failed')){\n //$data['text_message'] = \"Transaction payment has failed on Paynow. You can still resume the payment.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_paid') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_awaiting_delivery') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_delivered')){\n //$data['text_message'] = \"Transaction Paid Successfully. You will be redirected to a confirmation page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&amp;', '&', $this->url->link('checkout/success'));\n $order = $this->model_checkout_order->getOrder($order_id);\n\t\t\t\t\t\t\t$this->setClassData();\n\n if($order[\"order_status_id\"] != $this->final_order_status){\n $this->model_checkout_order->confirm($order_id, $this->final_order_status, \"Paynow ID: \" . $msg[\"PaynowReference\"], true);\n }\n }\n else {\n //$data['text_message'] = \"Invalid status in from Paynow, cannot continue.\";\n }\n }\n }\n else\n {\n //$data['text_message'] = \"Could not update order info from Paynow.\";\n }\n }\n else\n {\n //$data['text_message'] = \"paynow order info not found.\";\n }\n\t}", "title": "" }, { "docid": "510ed9ba14eb20da4a3e9a9e9ad97373", "score": "0.5754459", "text": "public function list_transaksi_masuk(){ \n if($this->session->userdata('id_level') =='1'){\n \n $data['pengguna'] = $this->db->get_where('pengguna', ['email' => $this->session->userdata('email')])->row_array();\n $data['transaksi'] = $this->m_admin->get_transaksi_masuk();\n\n $data_title['title'] = 'List Data Transaksi Masuk';\n\n $this->load->view('dashboard/header/header', $data_title);\n $this->load->view('dashboard/admin/index',$data);\n $this->load->view('dashboard/admin/list_transaksi_masuk',$data);\n $this->load->view('dashboard/footer/footer');\n\t\n } else{\n echo \"Anda tidak berhak mengakses halaman ini\";\n }\n }", "title": "" }, { "docid": "8226c90930f824336e311848890ed7fa", "score": "0.5733151", "text": "public function update_order_status(){\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n } else {\n $order_id = $this->input->post('order_id');\n $order_dtls_id = $this->input->post('order_dtls_id');\n $order_status = $this->input->post('order_status');\n \n if($order_id && $order_dtls_id && $order_status){\n $status_update = $this->cm->update('user_order_details', ['order_id'=> $order_id, 'id'=> $order_dtls_id], [\n 'status' => $order_status\n ]);\n if($status_update){\n $this->cm->insert('user_order_logs', [\n 'order_id' => $order_id,\n 'order_details_id' => $order_dtls_id,\n 'status' => $order_status\n ]);\n \n /*\n SELECT o.order_no,p.name,ps.name size,pc.name color,od.quantity,od.sell_price,od.discount_percentage,od.discount_price,od.remarks,od.status\n FROM user_order_details od\n join user_orders o on od.order_id = o.id\n join products p on od.product_id = p.id\n join product_variations pv on p.id = pv.product_id\n join product_sizes ps on pv.size_id = ps.id\n join product_colors pc on pv.color_id = pc.id\n WHERE od.id = 1 and od.order_id = 1\n */\n /*\n Order details\n */\n $oJoin[] = ['table' => 'user_orders o', 'on' => 'od.order_id = o.id', 'type' => 'inner'];\n $oJoin[] = ['table' => 'products p', 'on' => 'od.product_id = p.id', 'type' => 'inner'];\n $oJoin[] = ['table' => 'product_variations pv', 'on' => 'p.id = pv.product_id', 'type' => 'inner'];\n $oJoin[] = ['table' => 'product_sizes ps', 'on' => 'pv.size_id = ps.id', 'type' => 'inner'];\n $oJoin[] = ['table' => 'product_colors pc', 'on' => 'pv.color_id = pc.id', 'type' => 'inner'];\n $oJoin[] = ['table' => 'users u', 'on' => 'o.user_id = u.id', 'type' => 'inner'];\n $order_details = $this->cm->select_row('user_order_details od', ['od.id'=> $order_dtls_id, 'od.order_id'=> $order_id], 'o.order_no,p.name,ps.name size,pc.name color,od.quantity,od.sell_price,od.discount_percentage,od.discount_price,od.status,u.name user_name,u.email user_email', $oJoin);\n //Order status dropdown option\n $order_status_option = '<option value=\"\">Update status</option>';\n if($order_status == 1){\n //order confirm mail sent to user\n if($order_details){\n if($order_details['discount_percentage'] > 0){ \n $discount_price = $order_details['sell_price']- (($order_details['sell_price'] * $order_details['discount_percentage']) / 100); \n } else {\n $discount_price = $order_details['sell_price'];\n }\n \n $mail_subject = 'Your order for '.$order_details['name'].' has been successfully receive';\n $message = '<p>Hi <b>'.$order_details['user_name'].'</b></p>';\n $message .= \"<p>Your order has been successfully receive</p>\";\n $message .= \"<p></p><p>Order ID: <b>\".$order_details['order_no'].\"</b></p>\";\n $message .= \"<p></p><p>Item: \".$order_details['name'].\"</p>\"; \n $message .= \"<p>Size: \".$order_details['size'].\"</p>\"; \n $message .= \"<p>Color: \".$order_details['color'].\"</p>\"; \n $message .= \"<p>Qty: \".$order_details['quantity'].\"</p>\"; \n $message .= \"<p>Amount payable on delivery: <b>£\".number_format($discount_price, 2).\"</b></p>\"; \n $message .= \"<p></p><p>Thank you for shopping with Shorolafashion</p>\"; \n $this->cm->send_email($order_details['user_email'], siteSettingsData()['site_sender_email'],'','', $mail_subject, $message,'','','');\n } \n //dropdown option\n $order_status_option .= '<option value=\"2\">Out for delivery</option>';\n $order_status_option .= '<option value=\"4\">Order Cancel</option>';\n }elseif($order_status == 2){\n //order out for delivery mail sent to user\n if($order_details){\n if($order_details['discount_percentage'] > 0){ \n $discount_price = $order_details['sell_price']- (($order_details['sell_price'] * $order_details['discount_percentage']) / 100); \n } else {\n $discount_price = $order_details['sell_price'];\n }\n \n $mail_subject = 'Out for Delivery '.$order_details['name'].' with Order ID '.$order_details['order_no'];\n $message = '<p>Hi <b>'.$order_details['user_name'].'</b></p>';\n $message .= \"<p></p><p>Item: \".$order_details['name'].\"</p>\"; \n $message .= \"<p>Size: \".$order_details['size'].\"</p>\"; \n $message .= \"<p>Color: \".$order_details['color'].\"</p>\"; \n $message .= \"<p>Qty: \".$order_details['quantity'].\"</p>\"; \n $message .= \"<p>Amount payable on delivery: <b>£\".number_format($discount_price, 2).\"</b></p>\"; \n $this->cm->send_email($order_details['user_email'], siteSettingsData()['site_sender_email'],'','', $mail_subject, $message,'','','');\n } \n //dropdown option\n $order_status_option .= '<option value=\"3\">Order Delivered</option>';\n $order_status_option .= '<option value=\"4\">Order Cancel</option>';\n } elseif($order_status == 3){\n //order delivered mail sent to user\n if($order_details){\n if($order_details['discount_percentage'] > 0){ \n $discount_price = $order_details['sell_price']- (($order_details['sell_price'] * $order_details['discount_percentage']) / 100); \n } else {\n $discount_price = $order_details['sell_price'];\n }\n \n $mail_subject = 'Delivered '.$order_details['name'].' with Order ID '.$order_details['order_no'];\n $message = '<p>Hi <b>'.$order_details['user_name'].'</b></p>';\n $message .= \"<p></p><p>Item: \".$order_details['name'].\"</p>\"; \n $message .= \"<p>Size: \".$order_details['size'].\"</p>\"; \n $message .= \"<p>Color: \".$order_details['color'].\"</p>\"; \n $this->cm->send_email($order_details['user_email'], siteSettingsData()['site_sender_email'],'','', $mail_subject, $message,'','','');\n } \n //dropdown option\n $order_status_option .= '<option value=\"7\">Closed</option>';\n } elseif($order_status == 6){\n $order_status_option .= '<option value=\"7\">Closed</option>';\n }\n \n echo json_encode(['success'=> true, 'message'=> 'Successfully Change Order Status', 'html'=> $order_status_option]);\n }\n }\n }\n }", "title": "" }, { "docid": "6e01e62aa86deeb5182af33e53cfd907", "score": "0.5731598", "text": "public function approve_tiket($id)\n {\n //Mengambil session teknisi\n $id_user = $this->session->userdata('id_user');\n\n //Melakukan update data ticket dengan mengubah status ticket menjadi 4 dan memasukkan tanggal tiket mulai diproses, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'status' => 4,\n 'tanggal_proses' => date(\"Y-m-d H:i:s\"),\n 'last_update' => date(\"Y-m-d H:i:s\")\n );\n\n //Melakukan insert data tracking ticket sedang dikerjakan oleh teknisi, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => date(\"Y-m-d H:i:s\"),\n 'status' => \"On Process\",\n 'deskripsi' => \"\",\n 'id_user' => $id_user\n );\n\n //Query untuk melakukan update data ticket sesuai dengan array '$data' ke tabel ticket\n $this->db->where('id_ticket', $id);\n $this->db->update('ticket', $data);\n\n //Query untuk melakukan insert data tracking ticket sesuai dengan array '$datatracking' ke tabel tracking\n $this->db->insert('tracking', $datatracking);\n }", "title": "" }, { "docid": "e089d5d3717e6e0843074e9b5a6f9a51", "score": "0.57263935", "text": "public function jurnal_update_tanggal_transaksi()\n\t{\n\t\t$trx_gl_id = $this->input->post('trx_gl_id');\n\t\t$trx_date = $this->input->post('trx_date');\n\t\t$voucher_date = $this->input->post('voucher_date');\n\t\t$jurnal_trx_type = $this->input->post('jurnal_trx_type');\n\t\t$jurnal_trx_id = $this->input->post('jurnal_trx_id');\n\n\t\t// converting date from fromat id(dd/mm/yyyy) to en(yyyy-mm-dd)\n\t\t$trx_date = $this->datepicker_convert(true,$trx_date,'/');\n\t\t$voucher_date = $this->datepicker_convert(true,$voucher_date,'/');\n\n\t\t/*\n\t\t| get trx detail id di tabungan by jurnal trx id\n\t\t| get trx detail id di pembiayaan by jurnal trx id\n\t\t\n\t\tif($jurnal_trx_type=='1'){\n\t\t\t$trx_detail_id=$this->model_transaction->get_trx_detail_id_di_tabungan_by_jurnal_trx_id($jurnal_trx_id);\n\t\t}\n\t\tif($jurnal_trx_type=='3'){\n\t\t\t$trx_detail_id=$this->model_transaction->get_trx_detail_id_di_pembiayaan_by_jurnal_trx_id($jurnal_trx_id);\n\t\t}\n\t\t*/\n\t\t\n\t\t$data = array('trx_date'=>$trx_date,'voucher_date'=>$voucher_date);\n\t\t$param = array('trx_gl_id'=>$trx_gl_id);\n\n\t\t/*\n\t\t$data_tabungan = array('trx_date'=>$voucher_date);\n\t\t$param_tabungan = array('trx_account_saving_id'=>$jurnal_trx_id);\n\n\t\t$data_pembiayaan = array('trx_date'=>$voucher_date);\n\t\t$param_pembiayaan = array('trx_account_financing_id'=>$jurnal_trx_id);\n\n\t\t$data_trx_detail = array('trx_date'=>$voucher_date);\n\t\t$param_trx_detail = array('trx_detail_id'=>$trx_detail_id);\n\t\t*/\n\n\t\t$this->db->trans_begin();\n\t\t$this->model_transaction->update_trx_gl($data,$param);\n\t\t/*\n\t\t| execute update tabungan\n\t\t| execute update pembiayaan\n\t\t\n\t\tif($jurnal_trx_type=='1') {\n\t\t\t$this->model_transaction->update_trx_account_saving($data_tabungan,$param_tabungan);\n\t\t\tif($trx_detail_id!=false){\n\t\t\t\t$this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail);\n\t\t\t}\n\t\t}\n\t\telse if($jurnal_trx_type=='3') {\n\t\t\t$this->model_transaction->update_trx_account_financing($data_pembiayaan,$param_pembiayaan); //pembiayaan\n\t\t\tif($trx_detail_id!=false){\n\t\t\t\t$this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tif($this->db->trans_status()===true){\n\t\t\t$this->db->trans_commit();\n\t\t\t$return = array('success'=>true);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\t\techo json_encode($return);\n\t}", "title": "" }, { "docid": "e4535e43bdc692e6d32ccc1457035859", "score": "0.57206434", "text": "public function viewPesanStatus()\n\t{\n\t\t$id=$this->uri->segment(3);\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$ambil_informasi = $this->Wali_Kelas_model->ambil_informasi($id);\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status,\n\t\t\t'info' => $ambil_informasi\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['listPesan'] = $this->Wali_Kelas_model->getAllPesan();\n\t\t$this->load->view('W_PesanOrtuTerbaca',$data);\n\t}", "title": "" }, { "docid": "3e702f72e313941ff152e0d6738d7e63", "score": "0.57166255", "text": "public function bsuccessAction() {\n\t\t\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t\n\t\t\n\t\t$typeData = $session->getTypeData();\n\t\t\n\t\t$privateId = $session->getBusinessPrivateId();\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t//echo \"<pre>business \";print_r($orderData);die;\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['businessCustomer']['email'];\n\t\t\t$mobile = $orderDetails['businessCustomer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$lastName = $orderDetails['businessCustomer']['referencePerson'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['invoiceAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['invoiceAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['invoiceAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['invoiceAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['invoiceAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['deliveryAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\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\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\t\t\t//die;\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->unsBusinessPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "title": "" }, { "docid": "724e3ae15ca7aee664b36ab50b3e5ddd", "score": "0.5706668", "text": "public function cetakLapKartuStok()\r\n\t{\r\n\t\t//{\r\n\t\t\t$session=new THttpSession;\r\n\t\t\t$session->open();\r\n\t\t\t$session['cetakLapUmurHutangTbsSql'] = $this->getViewState('sql');\r\n\t\t\r\n\t\t\t$this->Response->redirect($this->Service->constructUrl('Keuangan.cetakLapUmurHutangTbsPdf'));\r\n\t\t/*}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->getPage()->getClientScript()->registerEndScript\r\n\t\t\t\t\t('','\r\n\t\t\t\t\ttoastr.error(\"Pilih Bulan Dan Tahun !\");\r\n\t\t\t\t\t');\r\n\t\t}*/\r\n\t}", "title": "" }, { "docid": "6f191e0d2b00002cd1ef83924a9fda22", "score": "0.5706403", "text": "public function order_plase(Request $request)\n {\n $payment_gatway=$request->payment_method;\n\n // insert data payment table..........\n $pdata=array();\n $pdata['payment_method']=$payment_gatway;\n $pdata['payment_status']='panding';\n\n $pament_info=DB::table('payment')\n ->insertGetId($pdata);\n \n // insert data Order table..........\n \n $odata=array();\n $odata['customer_id']=Session::get('customer_id');\n $odata['ship_id']=Session::get('ship_id');\n $odata['payment_id']=Session::get('payment_id');\n $odata['order_total']=Cart::gettotal();\n $odata['order_status']='panding';\n \n $order_info=DB::table('order')\n ->insertGetId($odata);\n \n // using Cart session data..........\n $contents=Cart::getContent();\n $oddata=array();\n\n foreach ($contents as $v_content) \n {\n $oddata['order_id']=$v_content->order_id;\n $oddata['product_id']=$v_content->id;\n $oddata['product_name']=$v_content->name;\n $oddata['product_price']=$v_content->price;\n $oddata['product_sales_quentity']=$v_content->qty;\n\n DB::table('order_details')\n ->insert($oddata);\n\n }\n\n if($payment_gatway=='handcash')\n {\n Cart::isEmpty();\n return view('pages.handcash');\n \n }\n elseif($payment_gatway=='card')\n {\n echo \"card data\";\n }\n elseif($payment_gatway=='bkash')\n {\n echo \"bkash data\";\n }\n else{\n echo \"not selected\";\n }\n\n\n }", "title": "" }, { "docid": "4df70bbabd255652ce93e4ab6a1defca", "score": "0.5705611", "text": "public function actionOrder()\n {\n // Получаем номер заказа из $_GET\n $orderId = intval(Yii::app()->request->getQuery('id'));\n\n // Инициализируем модель по номеру заказа\n $order = Orders::model()->find('id=:id AND status=:status', array(':id'=>$orderId,':status'=>'NEW'));\n\n // Если не найдено, выводим ошибку\n if ($order === null)\n {\n Yii::app()->user->setFlash('error', \"<strong>Ошибка!</strong> Заказ с таким номером не найден или у него изменен статус! Для решения проблемы оформите пожалуйста новый заказ!\");\n }\n else\n {\n // Пытаемся найти транзакцию в логах по номеру заказа\n $payment = Logpayment::model()->find('order_id=:order_id',array(':order_id'=>$orderId));\n\n // Если не нашли транзакцию, создаем новый лог\n if ($payment === null)\n {\n $payment = new Logpayment;\n $payment->user_id = $order->user_id;\n $payment->order_id = $order->id;\n $payment->amount = $order['price'];\n $payment->currency = $order['currency'];\n $payment->in_out = 'IN';\n $payment->pay_system = 'YAM';\n $payment->payed_type = 'AUTO';\n $payment->state = 'I';\n $payment->timestamp = new CDbExpression('NOW()');\n $payment->save();\n }\n else\n {\n if(in_array($payment->state,array(\"S\")))\n {\n Yii::app()->user->setFlash('error', \"<strong>Ошибка!</strong> Этот счет уже оплачен. Обратитесь к администратору сайта для решения проблемы (раздел Контакты).\");\n }\n }\n }\n \n // Параметры платежной системы\n $userModel = User::model()->findByPk($order->user_id);\n $uid = '410012058541159'; // Кошелек продавца\n $comment = urlencode ('Оплата заказа #'.$order->id.' от пользователя '.$userModel->email.' в интернет-магазине Gifm.ru'); // Комментарий\n\n $this->render('create',array('order'=>$order,'uid'=>$uid,'comment'=>$comment));\n }", "title": "" }, { "docid": "5df2a173ea309e6af8e1a4817e01d9f3", "score": "0.5698357", "text": "public function kirimbarang(){\n\t\t$no_order \t= $this->input->post('no_order');\n\t\t$ket \t= $this->input->post('ket');\n\t\tif ($ket == 'Modifikasi') {\n\t\t\t$get = $this->M_monitoringorder->getdatamodif(\"where no_order = '$no_order'\");\n\t\t}elseif ($ket == 'Baru') {\n\t\t\t$get = $this->M_monitoringorder->getdatabaru(\"where no_order = '$no_order'\");\n\t\t}else {\n\t\t\t$get = $this->M_monitoringorder->getdatarekondisi(\"where no_order = '$no_order'\");\n\t\t}\n\t\t// echo \"<pre>\";print_r($get);exit();\n\t\t$cek \t\t= $this->M_monitoringorder->cekaction($no_order, \"and person = 10\"); // status 10 = barang sudah selesai / akan kirim ke seksi pengorder\n\t\tif (empty($cek)) {\n\t\t\t$this->M_monitoringorder->saveaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}else {\n\t\t\t$this->M_monitoringorder->updateaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}\n\t\tif (stripos($get[0]['jenis'], 'FIXTURE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,7);\n\t\t}elseif (stripos($get[0]['jenis'], 'MASTER') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,6);\n\t\t}elseif (stripos($get[0]['jenis'], 'GAUGE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,5);\n\t\t}elseif (stripos($get[0]['jenis'], 'ALAT LAIN') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,9);\n\t\t}else {\n\t\t\t$jenis = $get[0]['jenis'];\n\t\t}\n\t\t$this->send_email_kirim($get[0]['pengorder'], $get[0]['no_order'], $get[0]['seksi'], $jenis);\n\t\tredirect(base_url('OrderToolMakingAdminPPC/MonitoringOrder/'));\n\t}", "title": "" }, { "docid": "6adcdf246bc04b0bcfd00c739d4e9078", "score": "0.5696754", "text": "function evt__procesar(){\n $m = $this->dep('datos')->tabla('mesa')->get();\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Ingreso con perfil junta_electoral\n $m['estado'] = 3;//Cambia el estado de la mesa a Confirmado\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);\n if($p !== false){//Ingreso con perfil secretaria\n $m['estado'] = 4;//Cambia el estado de la mesa a Definitivo\n }\n else{\n $p = array_search('autoridad_mesa', $this->s__perfil); \n if($p !== false){//Ingreso con perfil autoridad de mesa\n $m['estado'] = 1;//Cambia el estado de la mesa a Cargado\n }\n }\n }\n $this->dep('datos')->tabla('mesa')->set($m);\n// print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n $this->dep('datos')->tabla('mesa')->resetear();\n \n \n if(isset($this->s__retorno)){//debe retornar a confirmar\n if($this->s__retorno_estado=='')\n $dato = true;\n else\n $dato['f'] = $this->s__retorno_estado;\n toba::vinculador()->navegar_a(\"\",$this->s__retorno,$dato); \n $this->s__retorno = null; \n $this->s__id_mesa = null;\n $this->s__retorno_estado = null;\n }\n }", "title": "" }, { "docid": "8eafd3d871614638c41301152c31c71b", "score": "0.5690738", "text": "public function konfirmasi(Request $request)\n {\n if ($request -> status == 'Selesai') {\n $aktivitas = DB::table('aktivitas')\n ->where('id_aktivitas', $request -> id_aktivitas)\n ->update([\n 'confirm' => $request -> confirm,\n 'confirm_progress' => $request -> confirm,\n 'progress' => 100,\n 'updated_at' => DB::raw('CURRENT_TIMESTAMP')\n ]);\n } else if ($request -> status == 'Dikerjakan'){\n $aktivitas = DB::table('aktivitas')\n ->where('id_aktivitas', $request -> id_aktivitas)\n ->update([\n 'confirm_progress' => $request -> confirm\n ]);\n } else if ($request -> status == 'Ditunda') {\n $aktivitas = DB::table('aktivitas')\n ->where('id_aktivitas', $request -> id_aktivitas)\n ->update([\n 'confirm' => $request -> confirm,\n 'confirm_progress' => $request -> confirm,\n 'due_date' => null\n ]);\n }\n\n $currentact = DB::table('aktivitas')\n ->leftJoin('pembagian_tugas', 'pembagian_tugas.id_pembagian', '=', 'aktivitas.id_pembagian')\n ->leftJoin('sub_tugas', 'pembagian_tugas.id_subtugas', '=', 'sub_tugas.id_subtugas')\n ->leftJoin('tugas', 'sub_tugas.id_tugas', 'tugas.id_tugas')\n ->where('id_aktivitas', $request -> id_aktivitas)\n ->first();\n $pembagian = PembagianTugas::find($currentact -> id_pembagian);\n $id_project = $currentact -> id_project;\n $pembagians = Anggota::find($pembagian -> id_PJ1);\n $pembagians->setAttribute('nama_subtugas', $currentact -> nama_subtugas);\n $pembagians->setAttribute('id_project', $id_project);\n $jenis = 'konfirmasi';\n\n $this->notifikasi($id_project, $pembagians, $pembagian -> id_PJ1, $jenis);\n // return $id_project;\n }", "title": "" }, { "docid": "77cd33d186b04bd16bcc8dc479cd8d2b", "score": "0.5688048", "text": "public function successAction() {\n\t\t\n\t\t//echo \"in b2b\";die;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t$privateId = $session->getPrivateId();\n\t\t\n\t\t\n\t\t\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['customer']['email'];\n\t\t\t$mobile = $orderDetails['customer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['customer']['deliveryAddress']['firstName'];\n\t\t\t$lastName = $orderDetails['customer']['deliveryAddress']['lastName'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['customer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['customer']['billingAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['billingAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['billingAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['billingAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['billingAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['billingAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['deliveryAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\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\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t//$paymentMethod = 'collectorpay';\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t$session->unsPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t//Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "title": "" }, { "docid": "a3a2237c97e81d1f9aa55e4bccbceb4f", "score": "0.5685957", "text": "public function change_order_status_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['order_id'];\n $status = $data['status'];\n $user_id = $data['user_id'];\n // $this->response($user_id);\n $data = array(\n 'status' => $status\n );\n \n $where = array(\n 'id' => $id\n );\n $this->model->update('orders', $data, $where);\n $message = \"Your Order is $status\";\n \n $resp = array('rccode' => 200,'message' => $message);\n $this->response($resp);\n //}\n \n \n }", "title": "" }, { "docid": "ffd540cf259d49a10c6e5013688f1d38", "score": "0.5682557", "text": "function redsys_ok($id_reserva,$pagar,$order_id){\n // $orden = $redsys->getParameter(\"DS_MERCHANT_ORDER\");\n // var_dump($id_reserva);\n $id_usuario = $this->session->userdata('id_usuario');\n if($pagar==1){\n\n\n\n\n $datos = array\n (\n 'primer_pago' =>1,\n 'recibo_primer_pago' =>$order_id,\n\n );\n\n\n\n\n $this->load->library(\"email\");\n\n\n$reserva_pago=$this->M_cama->listar_usuarios_pago_web($id_reserva,$id_usuario);\n\n$qry_usu = $this->M_Usuario->obtener_usuario($id_usuario);\n\n$totaldeuda=$reserva_pago->row()->monto_total-$reserva_pago->row()->monto_senal;\n\n $titulo = 'Primer pago realizado';\n $mensaje = \"<div align='center' style='background-color: #f4f4f4; padding-top: 20px; padding-bottom: 20px; border-top: 5px solid #167d78;'>\n <center><img style='padding-bottom: 15px;' src='\".base_url().\"assets/componentes/images/logo_planenjoy.png'></center>\n <div style='background-color: #ffffff;width: 600px; box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8);padding: 10px 10px 10px;color: black;'><table class='m_5549614554202543165m_5058279827257242077MsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='557' style='width:334.15pt;background:white'><tbody><tr style='height:33.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:33.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:28.5pt'><span><b><span style='font-size:26.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>¡Hola \".$qry_usu->row()->nombre.\"! <u></u><u></u></span></b></span></p></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Hemos recibido correctamente el primer pago del viaje \".$reserva_pago->row()->nombre.\".<u></u><u></u></span></span></p><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Para que tus amigos se unan a tu habitación, tienes que enviarles el siguiente código de reserva:<u></u><u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Código grupo \".$reserva_pago->row()->nombre_grupo.\":\".$reserva_pago->row()->codigo_reserva.\"<u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:10.8pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:10.8pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Aquí tienes tu resumen de viajes:<u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Primer pago realizado: \".$reserva_pago->row()->monto_senal.\"€ <u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Segundo pago por realizar: \".$totaldeuda.\"€<u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Nº de recibo:\".$order_id.\"<u></u><u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><u></u>&nbsp;<u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>También puedes consultar todos los detalles de <span>&nbsp;</span>viaje en tu perfil de </span></span><a href='https://www.planenjoy.com/PerfilDetalle' target='_blank' data-saferedirecturl='https://www.google.com/url?hl=es&amp;q=https://www.planenjoy.com/PerfilDetalle&amp;source=gmail&amp;ust=1537440840271000&amp;usg=AFQjCNHHDdaprMx43VIR-VjJEpqMbTqDaw'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif'>Planenjoy.com/<span class='m_5549614554202543165m_5058279827257242077SpellE'>PerfilDetalle</span></span></span><span></span></a><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>.<u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:10.8pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:10.8pt'><span></span></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' align='center' style='margin-bottom:6.0pt;text-align:center;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Un saludo,<br>El equipo de Planenjoy. <u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr></tbody></table></div><p class='MsoNormal'style='margin-bottom:6.0pt;padding-top:20px;line-height:15.0pt'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>¿Te echamos una mano? Puedes escribirnos a </span></span><span></span><a href='mailto:[email protected]' target='_blank'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif'>[email protected]</span></span><span></span></a><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>, mandarnos un WhatsApp con </span></span><span></span><a href='https://api.whatsapp.com/send?phone=34642847567' target='_blank' data-saferedirecturl='https://www.google.com/url?hl=es&amp;q=https://api.whatsapp.com/send?phone%3D34642847567&amp;source=gmail&amp;ust=1537291422373000&amp;usg=AFQjCNEnCtlR2FUHoMsn6ZYpVo1ou1BzZA'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#00b4e6;text-decoration:none'>este enlace</span></span><span></span></a><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>, o llamarnos al teléfono +34 642 84 75.<u></u><u></u></span></span></p></div>\";\n //correo\n $configMail = array(\n 'protocol' => 'smtp',\n 'smtp_host' => 'smtp.mailgun.org',\n 'smtp_port' => 587,\n 'smtp_crypto' => 'tls',\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'Correo-2017@',\n 'smtp_timeout' => 7,\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'newline' => \"\\r\\n\"\n );\n\n $message = $mensaje;\n //cargamos la configuración para enviar con smtp\n // $this->email->initialize($configMail)\n // ->from('[email protected]', $titulo)\n // ->to($qry_usu->row()->correo)\n // ->cc(CORREO)\n // ->subject($titulo)\n // ->message($message)\n // ->send();\n\n\n}else{\n \n\n $datos = array\n (\n 'primer_pago' =>1,\n 'segundo_pago' =>1,\n 'fecha_segundo_pago' =>date(\"Y-m-d\"),\n 'recibo_primer_pago' =>$order_id,\n 'recibo_segundo_pago' =>$order_id,\n\n );\n\n\n\n $this->load->library(\"email\");\n\n\n$reserva_pago=$this->M_cama->listar_usuarios_pago_web($id_reserva,$id_usuario);\n\n$qry_usu = $this->M_Usuario->obtener_usuario($id_usuario);\n$totaldeuda=$reserva_pago->row()->monto_total-$reserva_pago->row()->monto_senal;\n\n $titulo = 'Pago completo realizado';\n $mensaje = \"<center><img src='\".base_url().\"assets/componentes/images/logo_planenjoy.png'></center><div align='center' style='background-color: #f4f4f4; padding-top: 20px; padding-bottom: 20px; border-top: 5px solid #167d78;'><div style='background-color: #ffffff;width: 600px; box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8);padding: 10px 10px 10px;color: black;'><table class='m_5549614554202543165m_5058279827257242077MsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='557' style='width:334.15pt;background:white'><tbody><tr style='height:33.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:33.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:28.5pt'><span><b><span style='font-size:26.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>¡Hola \".$qry_usu->row()->nombre.\"! <u></u><u></u></span></b></span></p></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Hemos recibido correctamente el pago completo del viaje \".$reserva_pago->row()->nombre.\".<u></u><u></u></span></span></p><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Para que tus amigos se unan a tu habitación, tienes que enviarles el siguiente código de reserva:<u></u><u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Código grupo \".$reserva_pago->row()->nombre_grupo.\":\".$reserva_pago->row()->codigo_reserva.\"<u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:10.8pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:10.8pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Aquí tienes tu resumen de viajes:<u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Primer pago realizado: \".$reserva_pago->row()->monto_senal.\"€ <u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Segundo pago realizado: \".$totaldeuda.\"€<u></u><u></u></span></span></p><p class='m_5549614554202543165m_5058279827257242077MsoListParagraph' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><span>-<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><u></u><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Nº de recibo:\".$order_id.\"<u></u><u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'><u></u>&nbsp;<u></u></span></span></p><p class='MsoNormal' style='margin-bottom:6.0pt;text-align:justify;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>También puedes consultar todos los detalles de <span>&nbsp;</span>viaje en tu perfil de </span></span><a href='https://www.planenjoy.com/PerfilDetalle' target='_blank' data-saferedirecturl='https://www.google.com/url?hl=es&amp;q=https://www.planenjoy.com/PerfilDetalle&amp;source=gmail&amp;ust=1537440840271000&amp;usg=AFQjCNHHDdaprMx43VIR-VjJEpqMbTqDaw'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif'>Planenjoy.com/<span class='m_5549614554202543165m_5058279827257242077SpellE'>PerfilDetalle</span></span></span><span></span></a><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>.<u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:10.8pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:10.8pt'><span></span></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr><tr><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm'><p class='MsoNormal' align='center' style='margin-bottom:6.0pt;text-align:center;line-height:18.0pt'><span><span style='font-size:14.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#4b4b4b'>Un saludo,<br>El equipo de Planenjoy. <u></u><u></u></span></span></p></td><td><span></span></td></tr><tr style='height:21.6pt'><td width='557' style='width:334.15pt;padding:0cm 0cm 0cm 0cm;height:21.6pt'><span></span></td><td><span></span></td></tr></tbody></table></div><p class='MsoNormal'style='margin-bottom:6.0pt;padding-top:20px;line-height:15.0pt'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>¿Te echamos una mano? Puedes escribirnos a </span></span><span></span><a href='mailto:[email protected]' target='_blank'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif'>[email protected]</span></span><span></span></a><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>, mandarnos un WhatsApp con </span></span><span></span><a href='https://api.whatsapp.com/send?phone=34642847567' target='_blank' data-saferedirecturl='https://www.google.com/url?hl=es&amp;q=https://api.whatsapp.com/send?phone%3D34642847567&amp;source=gmail&amp;ust=1537291422373000&amp;usg=AFQjCNEnCtlR2FUHoMsn6ZYpVo1ou1BzZA'><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#00b4e6;text-decoration:none'>este enlace</span></span><span></span></a><span><span style='font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#6d6d6d'>, o llamarnos al teléfono +34 642 84 75.<u></u><u></u></span></span></p></div>\";\n //correo\n $configMail = array(\n 'protocol' => 'smtp',\n 'smtp_host' => 'smtp.mailgun.org',\n 'smtp_port' => 587,\n 'smtp_crypto' => 'tls',\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'Correo-2017@',\n 'smtp_timeout' => 7,\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'newline' => \"\\r\\n\"\n );\n\n $message = $mensaje;\n //cargamos la configuración para enviar con smtp\n // $this->email->initialize($configMail)\n // ->from('[email protected]', $titulo)\n // ->to($qry_usu->row()->correo)\n // ->cc(CORREO)\n // ->subject($titulo)\n // ->message($message)\n // ->send();\n\n \n}\n\n\n$this->M_cama->actualizar_cama_cambio($id_usuario, $id_reserva, $datos);\n $fecha_actual = date('Y-m-d');\n $terminoss = $this->M_terminos->listar_terminos()->row();\n $num_filas = $this->M_terminos->contar_terminos();\n $this->data['terminos'] = $terminoss;\n //$this->data['modulo'] = BUS;\n $this->data['CI'] =& get_instance(); // nucleo del framework\n $bannerad = $this->M_banner->listar_banner()->result();\n \n $this->data['banner'] = $bannerad;\n $foto_instagramad = $this->M_foto_instagram->listar_foto_instagram()->result();\n $this->data['foto_instagram'] = $foto_instagramad;\n\n $id_usuario = $this->session->userdata('id_usuario');\n\n $qry_contador= $this->M_cama->obtener_contador($id_usuario, $fecha_actual)->row();\n $this->data['horas']= $qry_contador;\n $this->data['modulo'] = ADM;\n $this->load->view('home_web/cabecera', $this->data);\n // $this->load->view('plantilla/left-menu', $this->data);\n $this->load->view('home_web/gracias', $this->data);\n $this->load->view('home_web/pie', $this->data);\n// var_dump($id_usuario.\"aquiseparo\".$id_reserva);\n// $this->data['modulo'] = ADM;\n// $this->data['CI'] =& get_instance(); \n// $this->load->view('home_web/cabecera', $this->data);\n// $this->load->view('home_web/gracias', $this->data);\n// $this->load->view('home_web/pie', $this->data);\n$extras_data = $this->input->post('extra');\n // redirect('PerfilDetalle');\n // var_dump($extras_data);\n }", "title": "" }, { "docid": "6f08020a72b09d5d95281ec5db1cc174", "score": "0.5681469", "text": "function addUpdateTransaksi(){\n $idUser = $this->input->post('id_user');\n $detailOrder = $this->input->post('detail_order');\n $idProduk = $this->input->post('id_produk');\n $jumlahProduk = $this->input->post('jumlah_produk');\n $hargaProduk = $this->input->post('harga_produk');\n\n $this->db->where('tb_keranjang.id_produk', $idProduk);\n $this->db->where('tb_keranjang.id_user', $idUser);\n $this->db->where('tb_keranjang.detail_order', $detailOrder);\n $this->db->where('tb_keranjang.id_status_transaksi', \"1\");\n\n $q = $this->db->get('tb_keranjang');\n\n if($q -> num_rows() > 0){\n $sql = \"Update tb_keranjang \n INNER JOIN tb_produk ON tb_keranjang.id_produk = tb_produk.id_produk SET tb_keranjang.jumlah_produk = tb_keranjang.jumlah_produk + 1, tb_keranjang.total_harga_produk = tb_produk.harga_produk * tb_keranjang.jumlah_produk + tb_produk.harga_produk WHERE tb_keranjang.id_produk = $idProduk AND tb_keranjang.id_user = $idUser\";\n\n $query = $this->db->query($sql);\n\n if($query){\n $data['status'] = 200;\n $data['message'] = 'Successfully Update Data Produk';\n } \n else{\n $data['status'] = 404;\n $data['message'] = 'Failed Update Data Produk';\n } \n } else {\n $save['id_user'] = $idUser;\n $save['detail_order'] = $detailOrder;\n $save['id_produk'] = $idProduk;\n $save['jumlah_produk'] = $jumlahProduk;\n $save['total_harga_produk'] = $hargaProduk;\n\n $querySaved = $this->db->insert('tb_keranjang', $save);\n\n if($querySaved){\n $data['status'] = 200;\n $data['message'] = 'Successfully Add Produk';\n } else {\n $data['status'] = 404;\n $data['message'] = 'Failed Add Produk';\n }\n }\n echo json_encode($data);\n //Decode : dari Json ke Object\n //encode : dari object ke Json\n }", "title": "" }, { "docid": "af5713a183cc21a329f6f2b96bd02d07", "score": "0.56784934", "text": "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "title": "" }, { "docid": "95ab5fb7fc57b233c5a7a58ffad9a715", "score": "0.5676645", "text": "public function setStokOut($No = NULL, $gudang = NULL)\n { \n $this->db2 = $this->load->database('pusat', TRUE); \n if ($this->db2->conn_id == TRUE) {\n $produk = $this->db2->query(\"select * from trs_delivery_order_detail where NoDokumen = '\".$No.\"'\")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->HrgBeli;\n if (!empty($product1)) {\n $prod = $this->db2->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal where Kode_Produk = '\".$product1.\"'\")->row();\n foreach ($produk as $key => $value) {\n $product2 = $produk[$key]->Produk;\n if ($product1 == $product2) {\n $summary = $summary + $produk[$key]->Qty+$produk[$key]->Bonus;\n $valuestok = $produk[$key]->Gross;\n }\n }\n $invsum = $this->db2->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='Pusat' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok - $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db2->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='Pusat' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db2->query(\"insert into trs_invsum (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', 'Pusat', '\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod2 = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty+$produk[$key]->Bonus;\n\n $this->db2->query(\"insert into trs_invhis (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', 'Pusat','\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // update inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $det = $this->db2->query(\"select * from trs_invdet where cabang = 'Pusat' and KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and BatchNo = '\".$produk[$key]->BatchNo.\"' and Tahun = '\".date('Y').\"' and NoDokumen='\".$No.\"' limit 1\")->row(); \n $unitcogs = $det->UnitCOGS; \n $qtystok = $det->UnitStok - ($produk[$key]->Qty+$produk[$key]->Bonus);\n $valuestok = $qtystok * $unitcogs;\n $this->db2->set(\"UnitStok\", $qtystok);\n $this->db2->set(\"ValueStok\", $valuestok);\n $this->db2->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db2->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db2->where(\"Tahun\", date('Y'));\n $this->db2->where(\"Cabang\", 'Pusat');\n $this->db2->where(\"KodeProduk\", $kodeproduk);\n $this->db2->where(\"NoDokumen\", $No);\n $this->db2->where(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db2->where(\"Gudang\", $gudang);\n $valid = $this->db2->update('trs_invdet');\n\n $invdet = $this->db2->query(\"select KodeProduk,sum(ifnull(ValueStok,0)) as 'sumval',sum(ifnull(UnitStok,0)) as 'sumunit'\n from trs_invdet where KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and Tahun = '\".date('Y').\"' and UnitStok != 0 and Cabang='Pusat'\n group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db2->set(\"ValueStok\", 0);;\n $this->db2->where(\"KodeProduk\", $kodeproduk);\n $this->db2->where(\"Gudang\", $gudang);\n $this->db2->where(\"Tahun\", date('Y'));\n $this->db2->where(\"Cabang\",'Pusat');\n $valid = $this->db2->update('trs_invsum');\n\n }else{\n $invdet = $invdet->row();\n $this->db2->set(\"ValueStok\", $invdet->sumval);\n $this->db2->set(\"UnitCOGS\", ($invdet->sumval/$invdet->sumunit));\n $this->db2->where(\"KodeProduk\", $kodeproduk);\n $this->db2->where(\"Gudang\", $gudang);\n $this->db2->where(\"Tahun\", date('Y'));\n $this->db2->where(\"Cabang\",'Pusat');\n $valid = $this->db2->update('trs_invsum');\n }\n }\n }\n\n }\n }", "title": "" }, { "docid": "4c4d30a7ea155d10499c7700367854a0", "score": "0.5676257", "text": "function select_payment($idpaket){\n $cek = $this->model_payment->fetch_paket_by_id($idpaket);\n if($cek == null){\n redirect(\"payment/pilih_tagihan\");\n }\n $idsiswa = $this->session->userdata(\"id_siswa\");\n\n //set billing (id_paket di dalam tabel siswa)\n $setbill = $this->model_payment->edit_paket_siswa($idsiswa, $idpaket);\n\n if($setbill){\n redirect(\"payment/tagihan\");\n }\n}", "title": "" }, { "docid": "dff9a08526014811f894886fc11ff2cd", "score": "0.5668043", "text": "public function setStokCabangOutReloPusat($No = NULL, $gudang = NULL)\n { \n \n $produk = $this->db->query(\"select * from trs_relokasi_kirim_detail where No_Relokasi = '\".$No.\"'\")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->Harga;\n if (!empty($product1)) {\n $prod = $this->db->query(\"select Pabrik, Produk from mst_produk where Kode_Produk = '\".$product1.\"'\")->row();\n // foreach ($produk as $key => $value) {\n // $product2 = $produk[$key]->Produk;\n // if ($product1 == $product2) {\n $summary = $summary + $produk[$kunci]->Qty + $produk[$kunci]->Bonus;\n $valuestok = $produk[$kunci]->Gross;\n // }\n // }\n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='\".$this->cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok - $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='\".$this->cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db->query(\"insert into trs_invsum (Tahun, Cabang, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', '\".$this->cabang.\"', '\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk;\n $BatchDoc = $produk[$key]->BatchDoc; \n if (!empty($kodeproduk)) {\n $prod = $this->db->query(\"select Pabrik, Produk from mst_produk where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty + $produk[$key]->Bonus;\n\n $this->db->query(\"insert into trs_invhis (Tahun, Cabang, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', '\".$this->cabang.\"', '\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // update inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n $BatchDoc = $produk[$key]->BatchDoc; \n if (!empty($kodeproduk)) {\n $det = $this->db->query(\"select * from trs_invdet where cabang = '\".$this->cabang.\"' and KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and BatchNo = '\".$produk[$key]->BatchNo.\"' and Tahun = '\".date('Y').\"' and NoDokumen = '\".$BatchDoc.\"' limit 1\")->row(); \n\n $unitcogs = $det->UnitCOGS; \n $qtystok = $det->UnitStok - ($produk[$key]->Qty + $produk[$key]->Bonus);\n $valuestok = $qtystok * $unitcogs; \n $this->db->set(\"UnitStok\", $qtystok);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\", $this->cabang);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"NoDokumen\", $BatchDoc);\n $this->db->where(\"BatchNo\", $produk[$key]->BatchNo);\n // $this->db->where(\"ExpDate\", $produk[$key]->ExpDate);\n $this->db->where(\"Gudang\", $gudang);\n $valid = $this->db->update('trs_invdet');\n $invdet = $this->db->query(\"select KodeProduk,sum(ifnull(ValueStok,0)) as 'sumval',sum(ifnull(UnitStok,0)) as 'sumunit'\n from trs_invdet where KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and Tahun = '\".date('Y').\"' and UnitStok != 0 and cabang = '\".$this->cabang.\"'\n group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db->set(\"ValueStok\", 0);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n }else{\n $invdet = $invdet->row();\n $this->db->set(\"ValueStok\", $invdet->sumval);\n $this->db->set(\"UnitCOGS\", ($invdet->sumval/$invdet->sumunit));\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n\n }\n\n }\n } \n }", "title": "" }, { "docid": "033f1dc659edc35ff319cf26fe6e4dc8", "score": "0.5666981", "text": "public function transaction_datatable()\n\t\t{\n\t\t\t\n\t\t\t$list = $this->Transactions->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $transaction) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$url = 'admin/transaction_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$transaction->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:40%; margin-right:40%;\"><a data-toggle=\"modal\" href=\"#\" data-target=\"#viewTransactionModal\" class=\"link\" onclick=\"viewTransaction('.$transaction->id.',\\''.$url.'\\');\" title=\"View\">'.$transaction->order_reference.'</a></div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $no;\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->order_amount, 2);\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->shipping_and_handling_costs, 2);\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->total_amount, 2);\n\t\t\t\t\n\t\t\t\t$user_array = $this->Users->get_user($transaction->email);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($user_array){\n\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t$fullname = $user->first_name.' '.$user->last_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//CUSTOMER\n\t\t\t\t$row[] = $fullname;\n\t\t\t\t\n\t\t\t\t$status = '';\n\t\t\t\tif($transaction->status == '0'){\n\t\t\t\t\t$status = 'Pending';\n\t\t\t\t}else{\n\t\t\t\t\t$status = 'Paid';\n\t\t\t\t}\n\t\t\t\t//STATUS\n\t\t\t\t$row[] = $status;\n\t\t\t\t\t\n\t\t\t\t$transaction_date = $transaction->created;\n\t\t\t\t\n\t\t\t\tif($transaction_date == '0000-00-00 00:00:00'){\n\t\t\t\t\t$transaction_date = 'Not Paid';\n\t\t\t\t}else{\n\t\t\t\t\t$transaction_date = date('l, F j, Y g:i a', strtotime($transaction_date));\n\t\t\t\t}\n\t\t\t\t$row[] = $transaction_date;\n\t\t\t\t\n\t\t\t\t//$row[] = '<a data-toggle=\"modal\" data-target=\"#editModal\" class=\"btn btn-info btn-xs\" onclick=\"editTransaction('.$transaction->id.');\" id=\"'.$transaction->id.'\" title=\"Edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Transactions->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Transactions->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "title": "" }, { "docid": "21e7899b074231163f5cbe17ccb716a0", "score": "0.56498027", "text": "function _process($data)\n {\t\t\n\t\t$post = JFactory::getApplication()->input->get($_POST);\n \t\n \t$orderpayment_id = @$data['ssl_invoice_number'];\n \t\n \t$errors = array();\n \t$send_email = false;\n \t\n \t// load the orderpayment record and set some values\n JTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n $orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n $orderpayment->load( $orderpayment_id );\n if (empty($orderpayment_id) || empty($orderpayment->orderpayment_id))\n {\n $errors[] = JText::_('VIRTUALMERCHANT MESSAGE INVALID ORDERPAYMENTID');\n return count($errors) ? implode(\"\\n\", $errors) : '';\n }\n $orderpayment->transaction_details = $data['ssl_result_message'];\n $orderpayment->transaction_id = $data['ssl_txn_id'];\n $orderpayment->transaction_status = $data['ssl_result'];\n \n // check the stored amount against the payment amount \n \tTienda::load( 'TiendaHelperBase', 'helpers._base' );\n $stored_amount = TiendaHelperBase::number( $orderpayment->get('orderpayment_amount'), array( 'thousands'=>'' ) );\n $respond_amount = TiendaHelperBase::number( $data['ssl_amount'], array( 'thousands'=>'' ) );\n if ($stored_amount != $respond_amount ) {\n \t$errors[] = JText::_('VIRTUALMERCHANT MESSAGE AMOUNT INVALID');\n \t$errors[] = $stored_amount . \" != \" . $respond_amount;\n }\n \n // set the order's new status and update quantities if necessary\n Tienda::load( 'TiendaHelperOrder', 'helpers.order' );\n Tienda::load( 'TiendaHelperCarts', 'helpers.carts' );\n $order = JTable::getInstance('Orders', 'TiendaTable');\n $order->load( $orderpayment->order_id );\n if (count($errors)) \n {\n // if an error occurred \n $order->order_state_id = $this->params->get('failed_order_state', '10'); // FAILED\n }\n\t\telse\n {\n $order->order_state_id = $this->params->get('payment_received_order_state', '17');; // PAYMENT RECEIVED\n\n // do post payment actions\n $setOrderPaymentReceived = true;\n \n // send email\n $send_email = true;\n }\n\n // save the order\n if (!$order->save())\n {\n \t$errors[] = $order->getError();\n }\n \n // save the orderpayment\n if (!$orderpayment->save())\n {\n \t$errors[] = $orderpayment->getError(); \n }\n \n if (!empty($setOrderPaymentReceived))\n {\n $this->setOrderPaymentReceived( $orderpayment->order_id );\n }\n \n if ($send_email)\n {\n // send notice of new order\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\n $helper = TiendaHelperBase::getInstance('Email');\n $model = Tienda::getClass(\"TiendaModelOrders\", \"models.orders\");\n $model->setId( $orderpayment->order_id );\n $order = $model->getItem();\n $helper->sendEmailNotices($order, 'new_order');\n }\n\n return count($errors) ? implode(\"\\n\", $errors) : ''; \n\n \treturn true;\n }", "title": "" }, { "docid": "242292bd5156d59be85ecb1262b3d8ea", "score": "0.5649011", "text": "function paypal_success(){\n\t\t//$paypalInfouser = $this->input->get();\n\t\t$paypalInfo = $this->input->get();\n\t\t//$paypalInfo = $this->input->get();\n $user_pay_id = $this->input->get('Ad');\n $message=''; \n\t\t/*$data['item_number'] = $paypalInfo['item_number']; \n\t\t$data['txn_id'] = $paypalInfo[\"tx\"];\n\t\t$data['payment_amt'] = $paypalInfo[\"amt\"];\n\t\t$data['currency_code'] = $paypalInfo[\"cc\"];\n\t\t$data['status'] = $paypalInfo[\"st\"];*/\n\n\t\t//print_r($user_pay_id); \t\t\n\t\t//exit;\n $order_id= $paypalInfo['tx']; \n\t $table_data['paypal_uid'] = $paypalInfo['tx'];\n\t $table_data['seller_status'] = 1;\n\t $uid = $paypalInfo['item_number']; \n\t\t//pass the transaction data to view\n //$this->load->view('paypal/success', $data);\n\t }", "title": "" }, { "docid": "7a52ae7d961b5803c37a1a19a5b7d3f2", "score": "0.56463027", "text": "function pay_status()\n {\n include('header_include.php');\n include('forminput.php');\n $this->config->load('payu',TRUE);\n $config = $this->config->item('payu');\n $address2 = $this->input->post('address2');\n $this->session->unset_userdata('userArr');\n if(!empty($address2)) {\n $data['address1'] = $data['address1'].','.$address2;\n }\n $data['address1'] = str_replace(' ',', ',trim($data['address1']));\n $mihpayid = $this->input->post('mihpayid');\n $mode = $this->input->post('mode');\n $status = $this->input->post('status');\n $key = $this->input->post('key');\n $productinfo = $this->input->post('productinfo');\n $txnid = $this->input->post('txnid');\n $offer = $this->input->post('offer');\n $error = $this->input->post('error');\n $pg_type = $this->input->post('pg_type');\n $bank_ref_num = $this->input->post('bank_ref_num');\n $hash = $this->input->post('hash');\n $salt=$config['salt'];\n $udf1 = $this->input->post('udf1');\n $udf2 = $this->input->post('udf2');\n $udf3 = $this->input->post('udf3');\n $udf4 = $this->input->post('udf4');\n $data['couponValue'] = 0.00;\n $data['totalAmount'] = 0.00;\n\n $input = array('mihpayid' => $mihpayid,\n 'mode' => $mode,\n 'status' => $status,\n 'key' => $key,\n 'productinfo' => $productinfo,\n 'txnid' => $txnid,\n 'offer' => $offer,\n 'error' => $error,\n 'pg_type' => $pg_type,\n 'bank_ref_num' => $bank_ref_num,\n 'udf1'=>$udf1,\n 'udf2'=>$udf2,\n 'udf3' => $udf3,\n 'udf4' => $udf4,\n 'hash' =>$hash);\n $data = array_merge($data,$input);\n $text = \"$salt|$status|||||||$udf4|$udf3|$udf2|$udf1|$email|$firstname|$productinfo|$amount|$txnid|$key\";\n $output = hash(\"sha512\", $text);\n $data['couponId'] = $this->session->userdata('couponid');\n $data['redeemedPrice'] = $this->session->userdata('redeemedprice');\n //Lee Finished <--\n $cartinfo = $this->cartdb->mycartforuser($udf1);\n $cartCount = count($cartinfo);\n $this->cartdb->saveAfterCheckoutData($txnid, array( 'post' => $_POST, 'cartState' => $cartinfo ) ); // save all the data from payu and the state of cart\n if($status == \"SUCCESS\" || $status == \"success\" && $output == $hash)\n {\n\t\t\t\t //log_message('Info','Order Succeeded for the user with userid: '.$this->session->userdata('id').' and ip address: '.$this->input->ip_address());\n\t\t\t\t $this->load->model('slog');\n\t\t\t\t $this->slog->write(array('level' => 1, 'msg' => 'Order Succeeded for the user with userid: '.$this->session->userdata('id').' and ip address: '.$this->input->ip_address()));\n //log_message('Info','Order Details are userid: '.$this->session->userdata('id').' and ip: '.$this->input->ip_address());\n $this->slog->write(array('level' => 1, 'msg' => 'Order Details are userid: '.$this->session->userdata('id').' and ip: '.$this->input->ip_address()));\n \n $postName = array(0=>'PG_TYPE',1=>'address1',2=>'address2',3=>'amount',4=>'bank_ref_num',5=>'bankcode',6=>'cardhash',7=>'cardnum',8=>'city',9=>'country',10=>'discount',11=>'email',12=>'error',13=>'field1',14=>'field2',15=>'field3',16=>'field4',17=>'field5',18=>'field6',19=>'field7',20=>'field8',21=>'firstname',22=>'hash',23=>'key',24=>'lastname',25=>'mihpayid',26=>'mode',27=>'phone',28=>'productinfo',29=>'state',30=>'status',31=>'txnid',32=>'udf1',33=>'udf10',34=>'udf2',35=>'udf3',36=>'udf4',37=>'udf5',38=>'udf6',39=>'udf7',40=>'udf8',41=>'udf9',42=>'unmappedstatus',43=>'zipcode');\n \n foreach($postName as $key=>$name)\n {\n $sno = $key+1;\n //log_message('Info',$sno.'.'.$name.': '.$this->input->post($name));\n $this->load->model('slog');\n $this->slog->write(array('level' => 1, 'msg' => $sno.'.'.$name.': '.$this->input->post($name)));\n }\n\n \n \tfor ($i=0; $i < $cartCount ; $i++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$data['totalAmount'] += ($cartinfo[$i]->is_on_discount == 1)? ($cartinfo[$i]->selling_price - $cartinfo[$i]->discount) : $cartinfo[$i]->selling_price;\n\t\t\t\t\t\tlog_message(\"INFO\", \"DATA BEING RETURNED FROM(\\$data['totalAmount']) ORDER2/pay_status IS_____\".print_r($data['totalAmount'], TRUE));\n\t\t\t\t\t}\n \n for($i=0;$i< $cartCount;$i++)\n {\n $data['invoice'] = $this->vc_orders->invoice_no( $cartinfo[$i]->store_id, $cartinfo[$i]->bnb_product_code );\n if($mode == 'COD')\n {\n $data['payment_status'] = 2;\n }\n else\n {\n $data['payment_status'] = 1;\n }\n $data['shippng_cost']=0.00;\n $data['shippng_part']=1;\n \n if($this->session->userdata('couponid') !== FALSE && $this->session->userdata('redeemedprice') !== FALSE && $this->session->userdata('couponRedeemSuccessBeforePayU') === TRUE )\n {\n $data['couponId'] = $this->session->userdata('couponid');\n $data['redeemedPrice'] = $this->session->userdata('redeemedprice');\n $data['couponDetails'] = $couponDetails = $this->cartdb->checkCouponId($data['couponId']);\n if($couponDetails != 0)\n $this->cartdb->redeemCouponId($couponDetails);\n $this->session->unset_userdata('couponid');\n $this->session->unset_userdata('redeemedprice');\n }\n /*$this->load->model('contestdb');\n if($this->contestdb->is_christmas_prod($cartinfo[$i]->product_id) == 1 && $this->contestdb->is_christmas_winner() == 1)\n $cartinfo[$i]->discount = $cartinfo[$i]->selling_price / 2 ;\n */\n\n /* NEW COUPON FIX SECTION BY SHAMMI */\n\n if( $this->session->userdata('couponRedeemSuccessBeforePayU') === TRUE )\n {\n \t$this->load->model('cartdb');\n\n\t\t\t\t\t\t\t$couponId = $this->session->userdata('couponid');\n\t\t\t\t\t\t\t$totalPurchaseAmount = $this->cartdb->getTotalPurchaseAmount( $this->session->userdata( 'id' ) );\n\t\t\t\t\t\t\t$data['amountComputed'] = $totalPurchaseAmount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$id = $sess_userid;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$isLoggedIN = $sess_logged_in;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$isValid = $this->cartdb->checkCouponId($couponId);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlog_message('INFO', \"\\$this->cartdb->checkCouponId(\".$couponId.\") = \".print_r($isValid, TRUE));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$couponCheckData = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$couponCheckData['isValidCoupon'] = FALSE;\n\t\t\t\t\t\t\t$couponCheckData['isValidUser'] = FALSE;\n\t\t\t\t\t\t\t$couponCheckData['isValidAmount'] = FALSE;\n\t\t\t\t\t\t\t$couponCheckData['discounttype'] = NULL;\n\t\t\t\t\t\t\t$couponCheckData['sessionSet'] = FALSE;\n\t\t\t\t\t\t\t$couponCheckData['redeemedPrice'] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($isValid !== 0 && $isLoggedIN === TRUE) // proceed only when the coupon exists and a user is logged-in\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlog_message('Info', 'Validating redeem bnb coupon code: ' . $couponId . ' entered by User with userid: ' . $id);\n\t\t\t\t\t\t\t\t$couponDetails = $isValid;\n\t\t\t\t\t\t\t\t$redeemedPrice = 0.0;\n\n\t\t\t\t\t\t\t\t$couponCheckData['isValidCoupon'] = TRUE;\n\t\t\t\t\t\t\t\t$couponCheckData['discounttype'] = $isValid['discounttype'];\n\n\t\t\t\t\t\t\t\tif ($couponDetails['discounttype'] == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Discount in terms of %\n\t\t\t\t\t\t\t\t\tif($couponDetails['userID'] == $id || $couponDetails['userID'] == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidUser'] = TRUE;\n\t\t\t\t\t\t\t\t\t\tif($totalPurchaseAmount >= $couponDetails['minPurchaseAmount'])\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidAmount'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = (intval($couponDetails['percentoff']) / 100);\n\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = $redeemedPrice * $totalPurchaseAmount;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Discount in terms of Rs.\n\t\t\t\t\t\t\t\t\tif($couponDetails['userID'] == $id || $couponDetails['userID'] == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidUser'] = TRUE;\n\t\t\t\t\t\t\t\t\t\tif($totalPurchaseAmount >= $couponDetails['minPurchaseAmount'])\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidAmount'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = floatval($couponDetails['percentoff']);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 2){ /* discount on a store % */ }\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 3){ /* discount on a store Rs */ }\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 4){ /* discount on a category % */ }\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 5)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t // discount on a category Rs\n\t\t\t\t\t\t\t\t\tif($couponDetails['userID'] == $id || $couponDetails['userID'] == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidUser'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t// check if the current cart has products of the category \n\t\t\t\t\t\t\t\t\t\tif($totalPurchaseAmount >= $couponDetails['minPurchaseAmount'])\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidAmount'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = floatval($couponDetails['percentoff']);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 6){ /* discount on a product % */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 7){ /* discount on a product Rs */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 8)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t // discount on a store %\n\t\t\t\t\t\t\t\t if($couponDetails['userID'] == $id || $couponDetails['userID'] == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidUser'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t// check if the current cart has products of the store specified in param1\n\t\t\t\t\t\t\t\t\t\t$hasStoreProducts = $this->cartdb->cartHasCouponProducts( $couponDetails['discounttype'], $couponDetails['param1'] );\n\t\t\t\t\t\t\t\t\t\tif($hasStoreProducts['result'] === TRUE)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif($hasStoreProducts['totalPurchaseAmount'] >= $couponDetails['minPurchaseAmount'])\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$couponCheckData['isValidAmount'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = (intval($couponDetails['percentoff']) / 100);\n\t\t\t\t\t\t\t\t\t\t\t\t$couponCheckData['finalDiscountAmount'] = $hasStoreProducts['totalPurchaseAmount'] * $redeemedPrice;\n\t\t\t\t\t\t\t\t\t\t\t\t$redeemedPrice = $couponCheckData['finalDiscountAmount']; // hack to send the discounted value instead of percentage(which was being used as a multiplication factor in the shopping_cart view)\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}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 9){/* discount on a store Rs */}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 10){ /* discount on a store % */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 11){ /* discount on a store Rs */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 12){/* discount on a store % */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 13){ /* discount on a store Rs */}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 14){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 15){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 16){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 17){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 18){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 19){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 20){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 21){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 22){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 23){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 24){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 25){}\n\t\t\t\t\t\t\t\telseif($couponDetails['discounttype'] == 26){ /* discount voucher redeemable that can be used as credit balance by a user */ }\n\n\t\t\t\t\t\t\t\t$couponCheckData['redeemedPrice'] = $redeemedPrice;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($couponCheckData['isValidAmount'] && $couponCheckData['isValidUser'] === TRUE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->session->set_userdata('couponid', $couponDetails['couponid']);\n\t\t\t\t\t\t\t\t\t$this->session->set_userdata('redeemedprice', $redeemedPrice);\n\t\t\t\t\t\t\t\t\t$couponRedeemSuccess = $this->session->set_userdata('couponRedeemSuccessBeforePayU', TRUE );\n\n\t\t\t\t\t\t\t\t\t$data['amountComputed'] = $data['amountComputed'] - $redeemedPrice;\n\t\t\t\t\t\t\t\t\t$data['couponValue'] = floor( $redeemedPrice / $cartCount );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->session->unset_userdata( 'couponid' );\n\t\t\t\t\t\t\t\t\t$this->session->unset_userdata( 'redeemedprice' );\n\t\t\t\t\t\t\t\t\t$data['couponValue'] = 0.00;\n\t\t\t\t\t\t\t\t}\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\tlog_message('Info', 'User with userid: ' . $id . ' has entered Invalid couponId!');\n\t\t\t\t\t\t\t}\n }\n\n /* __END_SECTION__ NEW COUPON FIX BY SHAMMI */\n\t\t\t\t\t\t$pass = $this->vc_orders->place_order($cartinfo[$i], $data);\n if($pass)\n {\n $this->vc_orders->deletecart($cartinfo[$i]);\n }\n }\n $this->session->set_userdata('email',$email);\n $this->session->set_userdata('e_txn_id',$txnid);\n /* old code [used redirection] */\n\t\t\t\t/*$sucess_url = base_url(\"index.php/invoice_controller/redirecting_to_bnb/\".$txnid);\n\t\t\t\tredirect($sucess_url,'refresh');*/\n\t\t\t\t/* END old code [used redirection] */\n\t\t\t\t/* new code by Shammi Shailaj [direct function call] */\n\t\t\t\t$this->redirecting_to_bnb($txnid);\n\t\t\t\t/* END new code by Shammi Shailaj [direct function call] */\n }\n else\n {\n //log_message('Info','Order Failed for the user with userid: '.$this->session->userdata('id').' and ip address: '.$this->input->ip_address());\n $this->load->model('slog');\n $this->slog->write(array('level' => 1, 'msg' => 'Order Failed for the user with userid: '.$this->session->userdata('id').' and ip address: '.$this->input->ip_address()));\n //log_message('Info','Reason for Order Failed for userid: '.$this->session->userdata('id').' and ip: '.$this->input->ip_address());\n $this->load->model('slog');\n $this->slog->write( array ( 'level' => 1, 'msg' => 'Reason for Order Failed for userid: '.$this->session->userdata('id').' and ip: '.$this->input->ip_address() ) );\n $postName=array(0=>'PG_TYPE',1=>'address1',2=>'address2',3=>'amount',4=>'bank_ref_num',5=>'bankcode',6=>'cardhash',7=>'cardnum',8=>'city',9=>'country',10=>'discount',11=>'email',12=>'error',13=>'field1',14=>'field2',15=>'field3',16=>'field4',17=>'field5',18=>'field6',19=>'field7',20=>'field8',21=>'firstname',22=>'hash',23=>'key',24=>'lastname',25=>'mihpayid',26=>'mode',27=>'phone',28=>'productinfo',29=>'state',30=>'status',31=>'txnid',32=>'udf1',33=>'udf10',34=>'udf2',35=>'udf3',36=>'udf4',37=>'udf5',38=>'udf6',39=>'udf7',40=>'udf8',41=>'udf9',42=>'unmappedstatus',43=>'zipcode');\n foreach($postName as $key=>$name)\n {\n $sno = $key+1;\n //log_message('Info',$sno.'.'.$name.': '.$this->input->post($name));\n $this->load->model('slog');\n $this->slog->write(array('level' => 1, 'msg' => $sno.'.'.$name.': '.$this->input->post($name)));\n }\n $this->load->view('order_failed',$data);\n }\n }", "title": "" }, { "docid": "a5a254f2f2023bc5f07e0653d48863fc", "score": "0.5643769", "text": "public function verifikasi($id,$no) \n {\n $this->_access();\n $keyword = substr($id, 0, 2);\n $re = base_url().'approval/index/'.$keyword;\n $ID_USER = $this->session->userdata('id_user');\n $iam = $this->session->userdata('status');\n $y = $this->session->userdata('under');\n $you = 'by_'.$y;\n\n $on_trans = $this->Approval_model->cek_on_trans($id);\n $C = $on_trans->on_trans!=NULL;\n\n if ($C = $on_trans->on_trans!=NULL) {\n echo \"<script language=\\\"Javascript\\\">\\n\";\n echo \"window.alert('Maaf, Data Pendaftaran Akta Sedang Dilakukan Verifikasi, Silahkan Tunggu')\";\n header(\"refresh:0; $re\");\n echo \"</script>\";\n }\n if($C!=1){\n $this->Approval_model->make_on_trans($id,$ID_USER);\n }\n\n //print_r($on_trans);exit();\n\n if(($on_trans->progres=='jadi')OR($on_trans->progres=='diambil')){\n $this->session->set_flashdata('message', \"\n <div class='alert alert-warning alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-remove'></i> $no TIDAK DAPAT DIVERIFIKASI!!</h4>\n Pengajuan Akta Telah Selesai, Anda Tidak Diperkenankan Untuk Melakukan verifikasi ulang.\n </div>\n \");\n redirect('approval/index/'.$keyword);\n }\n elseif ($iam!='RW' AND (($on_trans->$you==NULL) OR ($on_trans->$you=='revisi'))) {\n $this->session->set_flashdata('message', \"\n <div class='alert alert-danger alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-remove'></i> $no TIDAK DAPAT DIVERIFIKASI!!</h4>\n Anda Tidak Diperkenankan Melakukan Verifikasi Pengajuan Akta Tersebut, dikarenakan $y\n belum melakukan Verifikasi terhadap pengajuan akta tersebut. !\n </div>\n \");\n redirect('approval/index/'.$keyword);\n }else{//boleh dilakukan, masuk paling bawah \n \n if ($keyword=='AL') {\n $akta = $this->Akta_kelahiran_model->get_by_al($id);\n $bayi = $this->Data_bayi_model->get_by_al($id);\n $IBU = $this->Ortu_bayi_model->get_by_bayi($bayi->id_bayi,\"IBU\");\n $AYAH = $this->Ortu_bayi_model->get_by_bayi($bayi->id_bayi,\"AYAH\");\n $S1 = $this->Data_saksi_model->get_by_al($id,1);\n $S2 = $this->Data_saksi_model->get_by_al($id,2);\n $PELAPOR = $this->Data_pelapor_model->get_by_al($id,2);\n $BERKAS = $this->Berkas_lahir_model->get_by_al($id);\n\n $data = array(\n 'bayi_data' => $bayi,\n 'ibu_data' => $IBU,\n 'ayah_data' => $AYAH,\n 'pelapor_data' => $PELAPOR,\n 'saksi1_data' => $S1,\n 'saksi2_data' => $S2,\n 'berkas_data' => $BERKAS,\n 'no_registrasi' => $no,\n 'no_hp' => $akta->no_hp,\n 'z1' => 'active',\n 'conten' => 'backend/admin/Approval/verifikasi_form',\n );\n\n }elseif ($keyword=='AM') {\n $akta = $this->Akta_kematian_model->get_by_am($id);\n $jenazah = $this->Data_jenazah_model->get_by_am($id);\n $IBU = $this->Ortu_jenazah_model->get_by_jenazah($jenazah->id_jenazah,\"IBU\");\n $AYAH = $this->Ortu_jenazah_model->get_by_jenazah($jenazah->id_jenazah,\"AYAH\");\n $S1 = $this->Data_saksi_model->get_by_al($id,1);\n $S2 = $this->Data_saksi_model->get_by_al($id,2);\n $PELAPOR = $this->Data_pelapor_model->get_by_al($id,2);\n $BERKAS = $this->Berkas_kematian_model->get_by_al($id);\n\n $data = array(\n 'jenazah_data' => $jenazah,\n 'ibu_data' => $IBU,\n 'ayah_data' => $AYAH,\n 'pelapor_data' => $PELAPOR,\n 'saksi1_data' => $S1,\n 'saksi2_data' => $S2,\n 'berkas_data' => $BERKAS,\n 'no_registrasi' => $no,\n 'no_hp' => $akta->no_hp,\n 'z2' => 'active',\n 'conten' => 'backend/admin/Approval/verifikasi_form_j',\n );\n\n }elseif ($keyword=='AP') {\n $akta = $this->Akta_perkawinan_model->get_by_al($id);\n $SUAMI = $this->mempelai->get_by_al($id,'SUAMI');\n $IBU_S = $this->ortu_m->get_by_mempelai($SUAMI->id_mempelai,\"IBU\");\n $AYAH_S = $this->ortu_m->get_by_mempelai($SUAMI->id_mempelai,\"AYAH\");\n\n $ISTRI = $this->mempelai->get_by_al($id,'ISTRI');\n $IBU_I = $this->ortu_m->get_by_mempelai($ISTRI->id_mempelai,\"IBU\");\n $AYAH_I = $this->ortu_m->get_by_mempelai($ISTRI->id_mempelai,\"AYAH\");\n\n $S1 = $this->Data_saksi_model->get_by_al($id,1);\n $S2 = $this->Data_saksi_model->get_by_al($id,2);\n $PERKAWINAN = $this->perkawinan->get_by_al($id);\n $ANAK = $this->anak->get_by_al($PERKAWINAN->id_dataper);\n $BERKAS = $this->berkas->get_by_al($id);\n\n $data = array(\n 'suami_data' => $SUAMI,\n 'ibu_data_s' => $IBU_S,\n 'ayah_data_s' => $AYAH_S,\n 'istri_data' => $ISTRI,\n 'ibu_data_i' => $IBU_I,\n 'ayah_data_i' => $AYAH_I,\n 'perkawinan' => $PERKAWINAN,\n 'saksi1_data' => $S1,\n 'saksi2_data' => $S2,\n 'berkas_data' => $BERKAS,\n 'anak_data' => $ANAK,\n 'no_registrasi' => $no,\n 'no_hp' => $akta->no_hp,\n 'z3' => 'active',\n 'conten' => 'backend/admin/Approval/verifikasi_form_p',\n );\n }elseif ($keyword=='AC') {\n $akta = $this->Akta_perceraian_model->get_by_al($id);\n $SUAMI = $this->bercerai->get_by_al($id,'SUAMI');\n\n $ISTRI = $this->bercerai->get_by_al($id,'ISTRI');\n\n $PERCERAIAN = $this->perceraian->get_by_al($id);\n $BERKAS = $this->berkas_c->get_by_al($id);\n\n $data = array(\n 'suami_data' => $SUAMI,\n 'istri_data' => $ISTRI,\n 'perceraian' => $PERCERAIAN,\n 'berkas_data' => $BERKAS,\n 'no_registrasi' => $no,\n 'no_hp' => $akta->no_hp,\n 'z4' => 'active',\n 'conten' => 'backend/admin/Approval/verifikasi_form_c',\n );\n }\n\n \n $data['z'] = 'active';\n $data['nama_user'] = $this->session->userdata('nama_user');\n $data['status'] = $this->session->userdata('status');\n $data['action'] = site_url('approval/update_action');\n $this->load->view('backend/dashboard/index', $data);\n }\n\n }", "title": "" }, { "docid": "1cd67ca3a481573ab402874fd84fcbbe", "score": "0.5643459", "text": "public function submit_order()\r\n\t{\r\n\t\t$orderdata = $this->input->post('order');\r\n\r\n\t\t$params = array();\r\n\t\t$notification = array();\r\n\t\t// print_r($orderdata); die();\r\n\r\n\t\t$updateUser['name'] = $orderdata['fname'];\r\n\t\t$updateUser['lname'] = $orderdata['lname'];\r\n\t\t$updateUser['email'] = $orderdata['email'];\r\n\t\t$updateUser['mobile'] = $orderdata['mobile'];\r\n\t\t$this->load->library('zyk/UserLib', 'userlib');\r\n\t\t$this->userlib->updateUser( $updateUser );\r\n\t\t\r\n\t\t$params['name'] = $orderdata['fname'].\" \".$orderdata['lname'];\r\n\t\t$params['email'] = $orderdata['email'];\r\n\t\t$params['mobile'] = $orderdata['mobile'];\r\n\t\t$params['address_id'] = $orderdata['address_id'];\r\n\t\t$params['slot'] = $orderdata['slottime'];\r\n\t\t$params['vehicle_id'] = $orderdata['vehicle_id'];\r\n\t\t$params['brand_id'] = $orderdata['brand_id'];\r\n\t\t$params['vehicle_model'] = $orderdata['model_id'];\r\n\t\t$params['vendor_id'] = $orderdata['vendor_id'];\r\n\t\t$params['userid'] = $orderdata['user_id'];\r\n\r\n\t\tif(!empty($orderdata['slotdate']))\r\n\t\t{\r\n\t\t\t$params['pickup_date'] = $orderdata['slotdate'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$params['pickup_date'] = date('Y-m-d');\r\n\t\t}\r\n\t\t\r\n\t\t$params['delivery_date'] = date('Y-m-d',strtotime('+72 hours',strtotime($params['pickup_date'])));\r\n\t\t$params['service_group_id'] = $orderdata['servicegroup_id'];\r\n\t\t$params['assign_vendor_id'] = $orderdata['vendor_id'];\r\n\t\t$params['status'] = 0;\r\n\t\t$params['ordered_on'] = date('Y-m-d H:i:s');\r\n\t\t$params['source'] = 2;\r\n\t\t$params['old_price'] = 0;\r\n\t\t$params['category_id'] = 9;\r\n\t\t$params['subcategory_id'] = $orderdata['st']; // its pick n'drop or breakdown id (st:service type)\r\n\t\t$params['applied_ride_charge'] = $_SESSION['stData']['price'];\r\n\t\t$params['ride_payment_mode'] = $orderdata['paymode'];\r\n\t\t$params['coupon_code'] = $orderdata['ccode'];\r\n\t\t$params['is_ride_paid'] = 0;\r\n\r\n\t\t$orderid = $this->orderlib->addOrder($params);\r\n\r\n $oupdate = array();\r\n\t\t$oupdate['orderid'] = $orderid;\r\n\t\t$oupdate['ordercode'] = strtoupper(base_convert(strtotime(date('Y-m-d H:i:s')), 10, 36)).strtoupper(base_convert($orderid, 10, 36));\r\n\t\t$_SESSION['order_code'] = $oupdate['ordercode'];\r\n \t\tif($orderid > 0) {\r\n\t\t\t$params['orderid'] = $orderid;\r\n\r\n\t\t\t$params['ordercode'] = $oupdate['ordercode'];\r\n $this->orderlib->updateOrder($oupdate);\r\n\r\n\t\t\t$this->orderlib->sendBookingEmail($params);\r\n\t\t\t$this->orderlib->sendBookingSMS($params);\r\n\t\t\t$this->load->library ( 'zyk/NotificationLib', 'notificationlib' );\r\n\t\t\t$this->notificationlib->sendBookingNotification($params['userid']);\r\n\t\t\t$response['orderid'] = $orderid;\r\n\t\t\t$response['ordercode'] = $oupdate['ordercode'];\r\n\t\t\t$response['status'] = 1;\r\n\t\t\t$response['msg'] = \"Order punched in system\";\r\n\t\t\t// $_SESSION['orderid']=$orderid ;\r\n\r\n\t\t\t$logs = array();\r\n\t\t\t$logs['orderid'] = $orderid;\r\n\t\t\t$logs['comment'] = 'Booking Request Sent';\r\n\t\t\t$logs['created_date'] = date('Y-m-d H:i:s');\r\n\t\t\t$logs['order_status'] = 0;\r\n\t\t\t$logs['created_by'] = 0;\r\n\r\n\t\t\t$this->orderlib->addOrderLogs($logs);\r\n\t\t\t$this->session->unset_userdata('vendor_id');\r\n\t\t\t$this->session->unset_userdata('slottime');\r\n\t\t\t$this->session->unset_userdata('slotdate');\r\n\t\t\t$this->session->unset_userdata('categories');\r\n\t\t\t$this->session->unset_userdata('back_url');\r\n\t\t\t$this->session->unset_userdata('referrer_url');\r\n\t\t\t$this->session->unset_userdata('stData');\r\n\t\t\t$this->session->unset_userdata('serviceType');\r\n\t\t\t$this->session->unset_userdata('filterbrand');\r\n\t\t\t$this->session->unset_userdata('filterstar');\r\n\t\t\t$this->session->unset_userdata('filtermodel');\r\n\r\n\t\t\tif ($orderdata['paymode'] == 1) {\r\n\t\t\t\t$response['url'] = \"order-details/\".$response['ordercode'];\r\n\t\t\t} else if ($orderdata['paymode'] == 2) {\r\n\t\t\t\t$response['url'] = \"ride_payment\";\r\n\t\t\t}\r\n\t\t\t$response['status'] = 1;\r\n\t\t\t$response['msg'] = \"Order punched in system\";\r\n\t\t} else {\r\n\t\t\t$response['status'] = 0;\r\n\t\t\t$response['msg'] = \"Failed to add order\";\r\n\t\t}\r\n\t\techo json_encode($response);\r\n\t}", "title": "" }, { "docid": "178f0930f14840bd2032b5ff33ff2577", "score": "0.5642769", "text": "function alta_transferencia(){\n\t\t$u= new Cl_pedido();\n\t\t$u->empresas_id=$GLOBALS['empresa_id'];\n\t\t$u->cclientes_id=$GLOBALS['empresa_id'];\n\t\t$u->fecha_alta=date(\"Y-m-d H:i:s\");\n\t\t//Sincronizar con fecha de salida&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$u->ccl_estatus_pedido_id=2;\n\t\t$u->corigen_pedido_id=3;\n\t\t$u->ccl_tipo_pedido_id=2;\n\t\t// save with the related objects\n\t\tif($_POST['id']>0){\n\t\t\t$u->get_by_id($_POST['id']);\n\t\t\t$insert_traspaso_salida=0;\n\t\t} else {\n\t\t\t$insert_traspaso_salida=1;\n\t\t}\n\t\t$u->trans_begin();\n\t\tif($u->save()) {\n\t\t\t$cl_pedido_id=$u->id;\n\t\t\tif($insert_traspaso_salida==1) {\n\t\t\t\t//Dar de alta el traspaso\n\t\t\t\t$t= new Traspaso();\n\t\t\t\t$t->cl_pedido_id=$cl_pedido_id;\n\t\t\t\t$t->traspaso_estatus=1;\n\t\t\t\t$t->ubicacion_entrada_id=$_POST['ubicacion_entrada_id'];\n\t\t\t\t$t->ubicacion_salida_id=$_POST['ubicacion_salida_id'];\n\t\t\t\t$t->trans_begin();\n\t\t\t\t$t->save();\n\t\t\t\tif ($t->trans_status() === FALSE) {\n\t\t\t\t\t// Transaction failed, rollback\n\t\t\t\t\t$t->trans_rollback();\n\t\t\t\t\t$u->trans_rollback();\n\t\t\t\t\t// Add error message\n\t\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\t\techo '<button type=\"submit\" style=\"display:none;\" id=\"boton1\">Intentar de nuevo</button><br/>';\n\t\t\t\t\techo \"El alta del traspaso no pudo registrarse, intente de nuevo\";\n\t\t\t\t} else {\n\t\t\t\t\t// Transaction successful, commit\n\t\t\t\t\t$u->trans_commit();\n\t\t\t\t\t$t->trans_commit();\n\t\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\t\techo '<p id=\"response\">Capturar los detalles del pedido</p><button type=\"submit\" id=\"boton1\" style=\"display:none;\" id=\"boton1\">';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Actualisar unicamente la tabla de los detalles\n\t\t\t\t$u->trans_commit();\n\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\techo '<p id=\"response\">Capturar los detalles del pedido</p><button type=\"submit\" id=\"boton1\" style=\"display:none;\" id=\"boton1\">';\n\t\t\t}\n\t\t} else {\n\t\t\t$u->trans_rollback();\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "title": "" }, { "docid": "f7c51098d47f41a509e4c14da1cb66e1", "score": "0.56384504", "text": "public function callback() {\r\n\t\t//1 pending,2 processing,3 shipped,4 \"\",5 complete,6 \"\",7 canceled,8 denied,9 Canceled Reversal,10 Failed,11 Refunded,12 Reversed,13 Chargeback,14 Expired,15 Processed,16 Voided,17 \"\",\r\n\t\t$this->load->model('checkout/order');\r\n\r\n\t\t\tif (isset($this->request->get['Ds_Order'])) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// Recogemos la clave del comercio para autenticar\r\n\t\t\t\t$clave = $this->config->get('redsys_clave');\t\r\n\t\t\t\t// Recogemos datos de respuesta\r\n\t\t\t\t$total = $_GET[\"Ds_Amount\"];\r\n\t\t\t\t$pedido = $_GET[\"Ds_Order\"];\r\n\t\t\t\t$codigo = $_GET[\"Ds_MerchantCode\"];\r\n\t\t\t\t$moneda = $_GET[\"Ds_Currency\"];\r\n\t\t\t\t$respuesta = $_GET[\"Ds_Response\"];\r\n\t\t\t\t$firma_remota = $_GET[\"Ds_Signature\"];\r\n\t\t\t\t$fecha= $_GET[\"Ds_Date\"];\r\n\t\t\t\t$hora= $_GET[\"Ds_Hour\"];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t// Cálculo del SHA1\r\n\t\t\t\t$mensaje = $total . $pedido . $codigo . $moneda . $respuesta . $clave;\r\n\t\t\t\t$firma_local = strtoupper(sha1($mensaje));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif ($firma_local == $firma_remota){\r\n\t\t\t\t\t\t\t// Formatear variables\r\n\t\t\t\t\t\t\t$respuesta = intval($respuesta);\r\n\r\n\t\t\t\t\t\t\tif ($respuesta < 101){\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 5);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/success'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\t\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}// if (firma_local=firma_remota)\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} \r\n\t\t\telse if (isset($this->request->post['Ds_Order'])){\r\n\t\t\t\t\r\n\t\t\t\t//Recuperamos Id_pedido\r\n\t\t\t\t$idPedido=$this->request->post['Ds_Order'];\r\n\t\t\t\t$idPedido=substr($idPedido,0,8);\r\n\t\t\t\t$idPedido=ltrim($idPedido,\"0\");\r\n\t\t\t\t$order = $this->model_checkout_order->getOrder($idPedido);\r\n\t\t\t\t\r\n\t\t\t\t// Recogemos la clave del comercio para autenticar\r\n\t\t\t\t$clave = $this->config->get('redsys_clave');\t\r\n\t\t\t\t// Recogemos datos de respuesta\r\n\t\t\t\t$total = $_POST[\"Ds_Amount\"];\r\n\t\t\t\t$pedido = $_POST[\"Ds_Order\"];\r\n\t\t\t\t$codigo = $_POST[\"Ds_MerchantCode\"];\r\n\t\t\t\t$moneda = $_POST[\"Ds_Currency\"];\r\n\t\t\t\t$respuesta = $_POST[\"Ds_Response\"];\r\n\t\t\t\t$firma_remota = $_POST[\"Ds_Signature\"];\r\n\t\t\t\t$fecha= $_POST[\"Ds_Date\"];\r\n\t\t\t\t$hora= $_POST[\"Ds_Hour\"];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t// Cálculo del SHA1\r\n\t\t\t\t$mensaje = $total . $pedido . $codigo . $moneda . $respuesta . $clave;\r\n\t\t\t\t$firma_local = strtoupper(sha1($mensaje));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif ($firma_local == $firma_remota){\r\n\t\t\t\t\t\t\t// Formatear variables\r\n\t\t\t\t\t\t\t$respuesta = intval($respuesta);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($respuesta < 101){\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 5);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/success'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}// if (firma_local=firma_remota)\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo (\"No hay respuesta del TPV\");\r\n\t\t\t}\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5e264aebba58df940f021c4609f51b48", "score": "0.56256396", "text": "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "title": "" }, { "docid": "97e080d952dc82428fbc5c9a95a0de23", "score": "0.5615801", "text": "public function get_data_pros_con()\n {\n \t$this->db->select('p.add_time, n.nama_pengguna, p.id_prospektus, p.status');\n \t$this->db->from('prospektus as p');\n \t$this->db->join('pengguna as n', 'n.id_pengguna = p.id_pengguna', 'inner');\n \t$this->db->where('p.status !=', null);\n \t$this->db->order_by('p.add_time', 'desc');\n\n \treturn $this->db->get();\n }", "title": "" }, { "docid": "5f672fc1c4107882ba45ff3d77a1350e", "score": "0.561444", "text": "function confirm($id=\"\"){\r\n \t\t\t//$bitcoin_isvalid = $bitcoin->listtransactions();\r\n\r\n \t\t\t/*$bal=$bitcoin->getbalance();*/\r\n\r\n \r\n\r\n\t\t$id=insep_decode($id);\r\n\t\t$condition=array(\"transactionId\"=>$id,\"status\"=>\"Pending\");\r\n\t\t$transdata=$this->CommonModel->getTableData(\"tansation\",$condition);\r\n\t\tif($transdata->num_rows() >0){\t\t\r\n\r\n\r\n if($this->input->post(\"witdraw_submit\")){ \r\n\r\n\r\n \t\t$currecncy=$transdata->row()->currency;\r\n \t \t$currency=$transdata->row()->currency;\r\n \r\n\r\n \tif($currency==\"BTC\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BTC\",$transdata);\r\n\r\n\r\n \t}else if($currency==\"LTC\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"LTC\",$transdata);\r\n\r\n \t}else if($currency==\"DGB\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"DGB\",$transdata);\r\n\r\n \t}else if($currency==\"DASH\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"DASH\",$transdata);\r\n\r\n \t}else if($currency==\"ETH\"){\r\n \t\t$txn_id=$this->transfer_eth(\"ETH\",$transdata);\r\n\r\n \t}else if($currency==\"XRP\"){\r\n\r\n \t\t$txn_id=$this->transfer_xrp($transdata);\r\n\r\n \t} else if($currency==\"BTG\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BTG\",$transdata);\r\n\r\n \t}\r\n\t\telse if($currency==\"BCH\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BCH\",$transdata);\r\n\r\n \t}\r\n\t\telse if($currency==\"ETC\"){\r\n\r\n \t\t$txn_id=$this->transfer_etc(\"ETC\",$transdata);\r\n\r\n \t}else if($currency==\"XMR\"){\r\n\r\n \t \t$txn_id=$this->transfer_xmr($transdata);\r\n\r\n \t}\r\n\t\t \t\r\n \t\t$status=\"Success\";\r\n\r\n \t\tif($status==\"Success\"){\r\n\r\n\t\t\t\t$transdata=$transdata->row();\r\n\t\t\t\t$currecncy=$transdata->currency;\r\n\t\t\t\t$amount=$transdata->total_amount;\r\n\t\t\t\t$update[\"status\"]=\"Completed\";\r\n\t\t\t\t$update[\"transation_hash\"]=$txn_id;\r\n\t\t\t\t$this->CommonModel->updateTableData(\"tansation\",$update,$condition);\r\n\t\t\t\t$email_data=getEmailTeamplete(10);\r\n\t\t\t\t$subject=$email_data->subject;\r\n\t\t\t\t$template=$email_data->template;\r\n\t\t\t\t$site_data=site_settings();\r\n\t\t\t\t$sitename=$site_data->site_name;\r\n\t\t\t\t$trans_data=$transdata;\r\n\t\t \t $trans_data->total_amount;\t\t\t\t\t\r\n\t\t\t\t\t$data=array(\r\n\t\t\t\t\t\t\"###TRANSID###\"=>$trans_data->transactionId,\t\t\t\r\n\t\t\t\t\t\t\"###AMOUNT###\"=>$trans_data->total_amount.$trans_data->currency,\r\n\t\t\t\t\t\t\"###LOGOIMG###\"=> base_url().\"assets/frontend/images/mail_logo.png\",\r\n\t\t\t\t\t\t\"###FBIMG###\"=> base_url().\"assets/frontend/images/facebook.png\",\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\"###STATUS###\"=> \"Completed\",\t\t\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$data[\"###LOGOIMG###\"]=getSiteLogo();\r\n\t\t\t\t\t$data[\"###EMAILIMG###\"]= base_url().\"assets/frontend/images/email_send.png\";\r\n\t\t\t\t\t$data[\"###FBIMG###\"]= base_url().\"assets/frontend/images/facebook.png\";\t\t\t\r\n\t\t\t\t\t$data[\"###TWIMG###\"]= base_url().\"assets/frontend/images/twitter.png\";\r\n\t\t\t\t\t$data[\"###GPIMG###\"]= base_url().\"assets/frontend/images/gplus.png\";\r\n\t\t\t\t\t$data[\"###LEIMG###\"]= base_url().\"assets/frontend/images/linkedin.png\";\t\r\n\t\t\t\t\t$data[\"###HDIMG###\"]= base_url().\"assets/frontend/images/email.png\";\r\n\t\t\t\t\t$data[\"###FBLINK###\"]= $site_data->facebooklink;\t\t\t\t\r\n\t\t\t\t\t$data[\"###TWLINK###\"]= $site_data->twitterlink;\t\r\n\t\t\t\t\t$data[\"###GPLINK###\"]= $site_data->googlelink;\r\n\t\t\t\t\t$data[\"###LELINK###\"]= $site_data->linkedinlink;\r\n\t\t\t\t$email=get_user_email($trans_data->user_id);\r\n\t\t\t\t $message=strtr($template,$data);\t\t\r\n\t\t\t\tsend_mail($email,$subject,$message);\r\n\t\t\t\t$this->session->set_flashdata(\"success\",\"Withdraw request Completed successfully\");\t\t\r\n\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t\t}else{\r\n\r\n\r\n\t\t\t\t$this->session->set_flashdata(\"error\",\"Withdraw request error, Tray again after some time\");\t\t\r\n\r\n\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$transdata=$transdata->row();\r\n\t\t\t$user_id=$transdata->user_id;\r\n\t\t\t$condition=array(\"user_id\"=>$user_id);\r\n\t\t\t$userdata=$this->CommonModel->getTableData(\"userdetails\",$condition)->row();\t\r\n\t\t\t$data['withdraw']=$transdata;\t\r\n\r\n\t\t\t $data['user_name']=$userdata->username;\t\t\r\n\t\t\t\r\n\t\t\t$this->load->view(\"admin/transation/withdaw_request_details\",$data);\t\r\n\r\n\t\t}\r\n\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$this->session->set_flashdata(\"error\",\"Invalid link or already used link\");\t\t\r\n\t\r\n\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "9de4e8b93f219a48ddd8475cc3c49778", "score": "0.5613327", "text": "function getPesanan(){\n $idCheckout = $this->input->post('id_checkout');\n\n $this->db->select('*');\n $this->db->from('tb_keranjang');\n $this->db->where('tb_keranjang.detail_order', \"$idCheckout\");\n $this->db->join(\"tb_produk\", \"tb_keranjang.id_produk = tb_produk.id_produk\" );\n $this->db->group_by(\"tb_keranjang.id_produk\");\n /*$this->db->order_by(\"tb_keranjang.created_at\", \"DESC\");*/\n\n $query = $this->db->get();\n if($query -> num_rows() > 0){\n $data['message'] = \"Successfully Get Data Pesanan\";\n $data['status'] = 200;\n $data['DataKeranjang'] = $query->result();\n }else{\n $data['message'] = \"Failed Get Data Pesanan\";\n $data['status'] = 400;\n }\n \n echo json_encode($data);\n }", "title": "" }, { "docid": "c1b60881cd7ab5a846a6ed9eb3e843fe", "score": "0.561147", "text": "public function setStokCabangIn_ByReject($No = NULL,$gudang = NULL)\n { \n $produk = $this->db->query(\"select * from trs_relokasi_kirim_detail where No_Relokasi = '\".$No.\"' \")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->Harga;\n if (!empty($product1)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$product1.\"'\")->row();\n // foreach ($produk as $key => $value) {\n // $product2 = $produk[$key]->Produk;\n // if ($product1 == $product2) {\n $summary = $summary + $produk[$kunci]->Qty + $produk[$kunci]->Bonus;\n $valuestok = $produk[$kunci]->Value;\n // }\n // }\n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='\".$this->cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok + $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='\".$this->cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db->query(\"insert into trs_invsum (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', '\".$this->cabang.\"', '\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty + $produk[$key]->Bonus;\n\n $this->db->query(\"insert into trs_invhis (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', '\".$this->cabang.\"','\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // save inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n $BatchDoc = $produk[$key]->BatchDoc; \n if (!empty($kodeproduk)) {\n $prod_det = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row(); \n $det = $this->db->query(\"select * from trs_invdet where cabang = '\".$this->cabang.\"' and KodeProduk = '\".$kodeproduk.\"' and Gudang = 'Baik' and BatchNo = '\".$produk[$key]->BatchNo.\"' and Tahun = '\".date('Y').\"' and NoDokumen = '\".$BatchDoc.\"' limit 1\")->row(); \n $relo = $this->db->query(\"select * from trs_invdet where cabang = '\".$this->cabang.\"' and KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and BatchNo = '\".$produk[$key]->BatchNo.\"' and Tahun = '\".date('Y').\"' and NoDokumen = '\".$No.\"' limit 1\"); \n\n // if ($relo->num_rows() <= 0) {\n $UnitStok = $produk[$key]->Qty + $produk[$key]->Bonus;\n $valuestok = ($produk[$key]->Qty + $produk[$key]->Bonus) * $det->UnitCOGS; \n $unitcogs = $det->UnitCOGS; \n $this->db->set(\"Tahun\", date('Y'));\n $this->db->set(\"Cabang\", $this->cabang);\n $this->db->set(\"KodePrinsipal\", $prod_det->Kode);\n $this->db->set(\"NamaPrinsipal\",$prod_det->Prinsipal);\n $this->db->set(\"Pabrik\", $prod_det->Pabrik);\n $this->db->set(\"KodeProduk\", $kodeproduk);\n $this->db->set(\"NamaProduk\", $produk[$key]->NamaProduk);\n $this->db->set(\"UnitStok\", $UnitStok);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"UnitCOGS\", $unitcogs);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->set(\"NoDokumen\", $No);\n $this->db->set(\"TanggalDokumen\", date('Y-m-d H:i:s'));\n $this->db->set(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db->set(\"ExpDate\", $produk[$key]->ExpDate);\n $this->db->set(\"Gudang\", $gudang);\n $valid = $this->db->insert('trs_invdet');\n /* }else{\n $unitrelo = $relo->row(); \n $UnitStok = $unitrelo->UnitStok + ($produk[$key]->Qty + $produk[$key]->Bonus);\n $valuestok = $UnitStok * $det->UnitCOGS; \n $unitcogs = $det->UnitCOGS; \n $this->db->set(\"UnitStok\", $UnitStok);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"UnitCOGS\", $unitcogs);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"NoDokumen\", $No);\n $this->db->where(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $valid = $this->db->insert('trs_invdet');\n }*/\n\n $invdet = $this->db->query(\"select KodeProduk,sum(ifnull(ValueStok,0)) as 'sumval',sum(ifnull(UnitStok,0)) as 'sumunit'\n from trs_invdet where KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and Tahun = '\".date('Y').\"' and UnitStok != 0 and cabang = '\".$this->cabang.\"'\n group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db->set(\"ValueStok\", 0);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n }else{\n $invdet = $invdet->row();\n $this->db->set(\"ValueStok\", $invdet->sumval);\n $this->db->set(\"UnitCOGS\", ($invdet->sumval/$invdet->sumunit));\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n\n }\n // }\n }\n }\n\n }", "title": "" }, { "docid": "3d1bc2b5340a377f0015db0c95b78922", "score": "0.561057", "text": "public function kembalikan_status($id_log)\n\t{\n\t\t$log = $this->db->where('id', $id_log)->get('log_penduduk')->row();\n\t\t$data['status_dasar'] = 1; // status dasar hidup\n\t\t$data['updated_at'] = date('Y-m-d H:i:s');\n\t\t$data['updated_by'] = $this->session->user;\n\t\tif (!$this->db->where('id',$log->id_pend)->update('tweb_penduduk', $data))\n\t\t\t$_SESSION['success'] = - 1;\n\t\t// Hapus log penduduk\n\t\tif (!$this->db->where('id', $id_log)->delete('log_penduduk'))\n\t\t\t$_SESSION['success'] = - 1;\n\t}", "title": "" }, { "docid": "48249028c60cb347d81ecfe3c88b5a42", "score": "0.5605244", "text": "public function setStokCabangOut($No = NULL, $gudang = NULL)\n { \n \n $produk = $this->db->query(\"select * from trs_relokasi_kirim_detail where No_Relokasi = '\".$No.\"'\")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->Harga;\n if (!empty($product1)) {\n $prod = $this->db->query(\"select Pabrik, Produk from mst_produk where Kode_Produk = '\".$product1.\"'\")->row();\n // foreach ($produk as $key => $value) {\n // $product2 = $produk[$key]->Produk;\n // if ($product1 == $product2) {\n $summary = $summary + $produk[$kunci]->Qty + $produk[$kunci]->Bonus;\n $valuestok = $produk[$kunci]->Gross;\n // }\n // }\n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok - $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db->query(\"insert into trs_invsum (Tahun, Cabang, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', '\".$produk[$kunci]->Cabang.\"', '\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk;\n $BatchDoc = $produk[$key]->BatchDoc; \n if (!empty($kodeproduk)) {\n $prod = $this->db->query(\"select Pabrik, Produk from mst_produk where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty + $produk[$key]->Bonus;\n\n $this->db->query(\"insert into trs_invhis (Tahun, Cabang, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', '\".$produk[$key]->Cabang.\"', '\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // update inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n $BatchDoc = $produk[$key]->BatchDoc; \n if (!empty($kodeproduk)) {\n $det = $this->db->query(\"select * from trs_invdet where cabang = '\".$produk[$key]->Cabang.\"' and KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and BatchNo = '\".$produk[$key]->BatchNo.\"' and Tahun = '\".date('Y').\"' and NoDokumen = '\".$BatchDoc.\"' limit 1\")->row(); \n\n $unitcogs = $det->UnitCOGS; \n $qtystok = $det->UnitStok - ($produk[$key]->Qty + $produk[$key]->Bonus);\n $valuestok = $qtystok * $unitcogs; \n $this->db->set(\"UnitStok\", $qtystok);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\", $produk[$key]->Cabang);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"NoDokumen\", $BatchDoc);\n $this->db->where(\"BatchNo\", $produk[$key]->BatchNo);\n // $this->db->where(\"ExpDate\", $produk[$key]->ExpDate);\n $this->db->where(\"Gudang\", $gudang);\n $valid = $this->db->update('trs_invdet');\n $invdet = $this->db->query(\"select KodeProduk,sum(ifnull(ValueStok,0)) as 'sumval',sum(ifnull(UnitStok,0)) as 'sumunit'\n from trs_invdet where KodeProduk = '\".$kodeproduk.\"' and Gudang = '\".$gudang.\"' and Tahun = '\".date('Y').\"' and UnitStok != 0 and cabang = '\".$this->cabang.\"'\n group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db->set(\"ValueStok\", 0);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n }else{\n $invdet = $invdet->row();\n $this->db->set(\"ValueStok\", $invdet->sumval);\n $this->db->set(\"UnitCOGS\", ($invdet->sumval/$invdet->sumunit));\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", $gudang);\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$this->cabang);\n $valid = $this->db->update('trs_invsum');\n\n }\n\n }\n } \n }", "title": "" }, { "docid": "493f0f30773efffb429b93c8d22a0859", "score": "0.55984724", "text": "public function confirm()\n {\n\n\n $this->load->model('checkout/order');\n\n if (!isset($this->session->data['order_id'])) {\n $this->response->redirect($this->url->link('checkout/cart'));\n return;\n }\n $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);\n if (false === $order_info) {\n $this->response->redirect($this->url->link('checkout/cart'));\n return;\n }\n\n $orderID = $this->session->data['order_id'];\n $order_total = $order_info['total'];\n $order_total = round($order_total, 2);\n $currency_code = $order_info['currency_code'];\n $redirect_url = $this->config->get($this->code.'_redirect_url');\n\n $AccountID = $this->config->get($this->code.'_payment_api_accountID');\n $AccountPrivateKey = $this->config->get($this->code.'_payment_api_privateKey');\n if (isset($this->session->data['meth'])) {\n $data['meth'] = $this->session->data['meth'];\n }\n $payinput = \"knet\";\n if(!empty($data['meth'])){\n \t$payinput = $data['meth'];\n }else{\n \t$payinput = 'knet';\n }\n \n\n $this->redirect_post($AccountID,$AccountPrivateKey,$redirect_url,$order_total,$payinput);\n }", "title": "" }, { "docid": "a2f7bf105c0681ac7a0cf3abfa8fc173", "score": "0.55954266", "text": "public function approvePayment($id)\n\t{\n \n // return $data2;\n $slip = BankSlip::find($id);\n // $userid = DB::table('bank_slips')\n // ->join('client_details','client_details.pk_id','=','bank_slips.user_id')\n // ->where('bank_slips.status','pending')\n\t\t// ->select('bank_slips.*','client_details.pk_id as userID')\n // ->get();\n // $user_id= DB::select(\"select user_id from bank_slips where id='$id' \");\n // $user_id = DB::Table('bank_slips')->select('user_id')->where('id',$id)->get(); \n // $data = DB::select(\"select* from bank_slips where status='pending' and id='$id'\")->pluck('user_id');\n// return $slip;\n $dataa =DB::table('bank_slips')\n ->where('id', $id)\n ->first()\n ->user_id;\n // return $dataa;\n \n $slip->status = 'approved';\n $data = $slip->update();\n\n \n $sessions = DB::select(\"select* from bank_slips where id='$id' \");\n $session= $sessions[0]->amount;\n if($session=='20000')\n {\n$value = \"4\";\n// return \"hello\";\nDB::update(\"update client_details set payment_status = '$value' where pk_id= '$dataa' \");\n\n\n\n// $result[0]->{'name'}\n $email= $sessions[0]->{'email'};\n$name= $sessions[0]->{'name'};\n// return $email;\n\n\n Mail::send('email_payment_approved', $sessions, function ($message) use ($name, $email)\n {\n\n \n $message->from('[email protected]','The Food Pharmacy' );\n\n $message->to($email)->subject('Dear ' . $name . ' Your payment approved');\n\n });\n// $email= $sessions[0]->email;\n// $name= $sessions[0]->name;\n// Mail::send('email_payment_approved', $data, function ($message) use ($name)\n// {\n\n// $message->from('[email protected]','The Food Pharmacy' );\n// $message->to($email)->subject('Your payment approved');\n// });\n }\n elseif($session=='25000')\n {\n$value == \"5\";\n// return \"hello3\";\nDB::update(\"update client_details set payment_status = '$value' where pk_id= '$dataa' \");\n $email= $sessions[0]->email;\n$name= $sessions[0]->name;\n Mail::send('email_payment_approved', $sessions, function ($message) use ($name, $email)\n {\n\n \n $message->from('[email protected]','The Food Pharmacy' );\n\n $message->to($email)->subject('Dear ' . $name . ' Your payment approved');\n\n });\n }\n else\n \n$value = \"1\";\nDB::update(\"update client_details set payment_status = '$value' where pk_id= '$dataa' \");\n\n\n\n $email= $sessions[0]->email;\n$name= $sessions[0]->name;\n Mail::send('email_payment_approved', $sessions, function ($message) use ($name, $email)\n {\n\n \n $message->from('[email protected]','The Food Pharmacy' );\n\n $message->to($email)->subject('Dear ' . $name . ' Your payment approved');\n\n });\n\n \n \treturn redirect()->back()->with('success','Slip Approved Successfully');\n\t\n\t}", "title": "" }, { "docid": "04a257fd8466db9064e2936a85ec5e23", "score": "0.5590699", "text": "public function index(){\n $transaksi = Transaction::whereMonth('created_at','=', date('m'))->whereYear('created_at','=', date('Y'))->get();\n $status = ['unverified' => 0,'expired' => 0, 'canceled' => 0, 'verified' => 0, 'delivered' => 0, 'success' => 0, 'harga' => 0, 'total' => $transaksi->count()];\n $status['unverified'] = $this->findCountStatus('unverified',1);\n $status['expired'] = $this->findCountStatus('expired',1);\n $status['canceled'] = $this->findCountStatus('canceled',1);\n $status['verified'] = $this->findCountStatus('verified',1);\n $status['delivered'] = $this->findCountStatus('delivered',1);\n $status['success'] = $this->findCountStatus('success',1);\n\n foreach($transaksi as $item){\n if($item->status == 'verified' || $item->status == 'delivered' || $item->status == 'success'){\n $status['harga'] = $status['harga'] + $item->total;\n }\n }\n\n $transaksi_tahun = Transaction::whereYear('created_at','=', date('Y'))->get();\n $status_tahun = ['unverified' => 0,'expired' => 0, 'canceled' => 0, 'verified' => 0, 'delivered' => 0, 'success' => 0, 'harga' => 0];\n $status_tahun['unverified'] = $this->findCountStatus('unverified',2);\n $status_tahun['expired'] = $this->findCountStatus('expired',2);\n $status_tahun['canceled'] = $this->findCountStatus('canceled',2);\n $status_tahun['verified'] = $this->findCountStatus('verified',2);\n $status_tahun['delivered'] = $this->findCountStatus('delivered',2);\n $status_tahum['success'] = $this->findCountStatus('success',2);\n\n foreach($transaksi_tahun as $item){\n if($item->status == 'verified' || $item->status == 'delivered' || $item->status == 'success'){\n $status_tahun['harga'] = $status_tahun['harga'] + $item->total;\n }\n }\n\n for($i = 1;$i<=12;$i++){\n $bulan[$i] = $transaksi = Transaction::whereMonth('created_at','=', $i)->whereYear('created_at','=', date('Y'))->count();\n }\n return view('admin', ['transaksi' => $transaksi, 'status' => $status,'transaksi_tahun' => $transaksi_tahun, 'status_tahun'=>$status_tahun, 'bulan' => $bulan]);\n }", "title": "" }, { "docid": "8547985938a508056526ad53b970df06", "score": "0.55873847", "text": "public function tabel_pengantaran(){\r\n $result = $this->darat->get_tabel_transaksi();\r\n $data = array();\r\n $no = 1;\r\n\r\n if (is_array($result) || is_object($result)){\r\n foreach ($result as $row){\r\n $aksi = \"\";\r\n \r\n if($row->waktu_mulai_pengantaran == NULL){\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-info glyphicon glyphicon-road\" href=\"javascript:void(0)\" title=\"Pengantaran\" onclick=\"pengantaran('.\"'\".$row->id_transaksi.\"'\".');\"></a>';\r\n }else if($row->waktu_selesai_pengantaran != NULL){\r\n $aksi = \"\";\r\n }else{\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-primary glyphicon glyphicon-ok\" href=\"javascript:void(0)\" title=\"Realisasi\" onclick=\"realisasi('.\"'\".$row->id_transaksi.\"'\".')\"></a>';\r\n }\r\n $format_tgl = date('d-m-Y H:i', strtotime($row->tgl_transaksi ));\r\n $format_tgl_pengantaran = date('d-m-Y H:i', strtotime($row->tgl_perm_pengantaran ));\r\n \r\n if($row->status_delivery == 1){\r\n $status_pengantaran = \"Sudah Diantar\";\r\n }else if($row->waktu_mulai_pengantaran != NULL){\r\n $status_pengantaran = \"Sedang Dalam Pengantaran\";\r\n }else{\r\n $status_pengantaran = \"Belum Diantar\";\r\n }\r\n \r\n if(($row->status_pembayaran == 1 || $row->status_invoice == 1) && $row->status_delivery == 0 && $row->batal_nota == 0 && $row->batal_kwitansi == 0){\r\n $data[] = array(\r\n 'no' => $no,\r\n 'nama' => $row->nama_pemohon,\r\n 'alamat' => $row->alamat,\r\n 'no_telp' => $row->no_telp,\r\n 'tanggal' => $format_tgl,\r\n 'tanggal_permintaan' => $format_tgl_pengantaran,\r\n 'total_pengisian' => $row->total_permintaan,\r\n 'status_pengantaran' => $status_pengantaran,\r\n 'aksi' => $aksi\r\n );\r\n $no++;\r\n }\r\n }\r\n }\r\n \r\n echo json_encode($data);\r\n }", "title": "" }, { "docid": "64f69033d02061bb2a60a990c388a62c", "score": "0.55865556", "text": "public function makepayment($id){\n if(Session::get('memberid')){\n $memberid=Session::get('memberid');\n $row=DB::table('sum_orders')\n ->join('ms_members','ms_members.member_id','=','sum_orders.member_id')\n ->where('sum_orders.member_id','=',$memberid)\n ->where('payment_service','=',2)\n ->where('payment_status','!=',2)\n ->where('sum_orders.order_id','=',$id)\n ->first();\n\n if(count($row) >0){\n Session::set('orderid1',$row->order_id);\n return Redirect()->to('vtweb')->with('midtrans','midtrans');\n }else{\n return Redirect()->back();\n }\n }else {\n Session::flash('error_must_login','You must Login');\n return Redirect('user/login');\n }\n }", "title": "" }, { "docid": "5217f504d099fa321d17f19712aea649", "score": "0.5585693", "text": "public function hookPayment($params){\n\t\tglobal $smarty, $cookie, $cart;\n\t\t\t\t\t\n\t // Valor de compra\t\t\t\t\n\t\t$id_currency = intval(Configuration::get('PS_CURRENCY_DEFAULT'));\t\t\t\n\t\t$currency = new Currency(intval($id_currency));\t\t\t\n\t\t$cantidad = number_format(Tools::convertPrice($params['cart']->getOrderTotal(true, 3), $currency), 2, '.', '');\n\t\t$cantidad = str_replace('.','',$cantidad); \n\t\t\t\t\t\n\t\t// El número de pedido es los 8 ultimos digitos del ID del carrito + el tiempo MMSS.\n\t\t$numpedido = str_pad($params['cart']->id, 8, \"0\", STR_PAD_LEFT) . date(is);\n\t\t\n\t\t\t\t\n\t\t$codigo = Tools::getValue('codigo', $this->codigo);\t\t\t\t\t\t\t\t\t\n\t\t$moneda = Tools::getValue('moneda', $this->moneda);\t\t\n\t\t$trans = Tools::getValue('trans', $this->trans);\n\t\t\n\t\t$ssl = Tools::getValue('ssl', $this->ssl);\n\t\tif ($ssl=='no')\n\t\t$urltienda = 'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/servired/respuesta_tpv.php';\n\t\telseif($ssl=='si')\n\t\t$urltienda = 'https://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/servired/respuesta_tpv.php';\n\t\telse \n\t\t$urltienda = 'ninguna';\n\t\t\n\t\t$clave = Tools::getValue('clave', $this->clave);\t\t\t\t\t\t\t\t\n\t\t\n\t\t// Cálculo del SHA1\t\t\n\t\t$mensaje = $cantidad . $numpedido . $codigo . $moneda . $trans . $urltienda . $clave;\n\t\t$firma = strtoupper(sha1($mensaje));\t\t\n\t\t\n\t\t$products = $params['cart']->getProducts();\n\t\t$productos = '';\n\t\t$id_cart = intval($params['cart']->id);\n\t\t\n\t\t//Activación de los idiomas del TPV\n\t\t$idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t\tif ($idiomas_estado==si){\n\t\t\t$ps_language = new Language(intval($cookie->id_lang));\n\t\t\t$idioma_web = $ps_language->iso_code; \n\t\t\tswitch ($idioma_web) {\n\t\t\t\tcase 'es':\n\t\t\t\t$idioma_tpv='001';\n\t\t\t\tbreak;\n\t\t\t\tcase 'en':\n\t\t\t\t$idioma_tpv='002';\n\t\t\t\tbreak;\n\t\t\t\tcase 'ca':\n\t\t\t\t$idioma_tpv='003';\n\t\t\t\tbreak;\n\t\t\t\tcase 'fr':\n\t\t\t\t$idioma_tpv='004';\n\t\t\t\tbreak;\n\t\t\t\tcase 'de':\n\t\t\t\t$idioma_tpv='005';\n\t\t\t\tbreak;\n\t\t\t\tcase 'nl':\n\t\t\t\t$idioma_tpv='006';\n\t\t\t\tbreak;\n\t\t\t\tcase 'it':\n\t\t\t\t$idioma_tpv='007';\n\t\t\t\tbreak;\n\t\t\t\tcase 'sv':\n\t\t\t\t$idioma_tpv='008';\n\t\t\t\tbreak;\n\t\t\t\tcase 'pt':\n\t\t\t\t$idioma_tpv='009';\n\t\t\t\tbreak;\n\t\t\t\tcase 'pl':\n\t\t\t\t$idioma_tpv='011';\n\t\t\t\tbreak;\n\t\t\t\tcase 'gl':\n\t\t\t\t$idioma_tpv='012';\n\t\t\t\tbreak;\n\t\t\t\tcase 'eu':\n\t\t\t\t$idioma_tpv='013';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t$idioma_tpv='002';\n\t\t\t} \n\t\t}\n\t\telse{\n\t\t\t$idioma_tpv = '0';\n\t\t}\n\t\t\n\t\t\n\t\tforeach ($products as $product) {\n\t\t\t$productos .= $product['quantity'].' '.$product['name'].\"<br>\";\n\t\t}\n\n\t\t$smarty->assign(array(\n\t\t\t'urltpv' => Tools::getValue('urltpv', $this->urltpv),\n\t\t\t'cantidad' => $cantidad,\n\t\t\t'moneda' => $moneda,\n\t\t\t'pedido' => $numpedido,\n\t\t\t'codigo' => $codigo,\n\t\t\t'terminal' => Tools::getValue('terminal', $this->terminal),\n\t\t\t'trans' => $trans,\n\t\t\t'titular' => ($cookie->logged ? $cookie->customer_firstname.' '.$cookie->customer_lastname : false),\n 'nombre' => Tools::getValue('nombre', $this->nombre),\t\t\t\n\t\t\t'urltienda' => $urltienda, \n\t\t\t'productos' => $productos,\n\t\t\t'UrlOk' => 'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/servired/pago_correcto.php',\n\t\t\t'UrlKO' => 'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/servired/pago_error.php',\n\t\t\t'firma' => $firma,\n\t\t\t'idioma_tpv' => $idioma_tpv,\t\t\t\t\t\n\t\t\t'this_path' => $this->_path\n\t\t));\n\t\treturn $this->display(__FILE__, 'servired.tpl');\n }", "title": "" }, { "docid": "9afb3ff06d943b67388332ce0065e346", "score": "0.55834365", "text": "public function proses()\n\t{\n\t\t$bulan = $this->input->post('bulan'); //menangkap hasil inputan\n\t\t$data['bln'] = $bulan; //deklarasi bulan\n\t\t$query = $this->db->where( \"DATE_FORMAT(tgl,'%m')\", $bulan); //filter berdasarkan bulan yang diinputkan\n $query = $this->db->where( \"status\", 'selesai'); //filter berdasarkan status selesai\n $query = $this->db->select('id_invoice,no_invoice,sum(DISTINCT total) as total,tgl'); //load database\n $query = $this->db->from('tb_invoice'); //nama tabel\n $query = $this->db->get();\n $data['laporan'] = $query->row();\n $data['title'] = 'Data Laporan Pemasukan';\n // fun view\n $this->load->view('admin/temp-header',$data);\n\t\t$this->load->view('admin/v_laporan-bulan',$data);\n\t\t$this->load->view('admin/temp-footer');\n\t}", "title": "" }, { "docid": "8c6d20d1bb302a2b61373acaa5a73274", "score": "0.558026", "text": "public function successResponseAction()\n {\n\n\t\t$orderid = $_REQUEST['orderid'];\n\n if (!$orderid) {\n $this->_redirect('');\n return ;\n }\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($orderid);\n\t\tif (!$order->getId()) {\n return false;\n }\t\t\n\n\t\t$payment =$order->getPayment();\n\t\t$criptopay_status = $payment->getAdditionalInformation('criptopay_status');\t\n\t\t$transaction_id = $payment->getAdditionalInformation('transaction_id');\t\t\t\t\t\t\t\t\t\n\n\t\t\n\t\t$statusStr = __('Pending');\n\t\t\t\t\n\t\tif ($criptopay_status == '30') $statusStr = __('Success');\n\t\t\n\t $session = Mage::getSingleton('checkout/session');\n\t\t\n \t$session->setQuoteId();\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n $success_msg = __('<b>Order No: <b>').$orderid;\n\t\t$success_msg .= __('<br><b>Transcation ID: <b>').$transaction_id;\t\t\t\n//\t\t$success_msg .= __('<br><b>Payment Status: <b>').$statusStr;\t\t\t\t\t\t\n// $success_msg .= __('<br><b>Wait about 5 hours for crypto-pay to process the payment<b>');\n $session->setErrorMessage($success_msg);\t\t\t \n\t $this->_redirect('criptopay/standard/success');\t\t\t\t \n//\t\t$this->_redirect('checkout/onepage/success');\t\t\t \n }", "title": "" }, { "docid": "5b11f90c9e8486a5d3ce09dd898fae39", "score": "0.55764663", "text": "public function ajax_active_proses()\r\n\t{\r\n\t\t//$this->_validate();\r\n\t\t\r\n\t\t$id = $this->input->post('id');\r\n\t\t$data = array(\r\n\t\t\t\t'gsm_activated_date' => $this->input->post('gsm_activated_date'),\r\n\t\t\t\t'gsm_activated_by' => $this->input->post('gsm_activated_by'),\r\n\t\t\t\t'status' => 'Activated',\r\n\t\t\t\t'gsm_update' => date('Y-m-d H:i:s'),\r\n\t\t\t\t'gsm_user' => $_SESSION['name']\r\n\t\t\t);\r\n\t\t\r\n\t\t$this->db->where('gsm_id', $id);\r\n\t\t$this->db->update('gsm', $data);\r\n\t\t\r\n\t\t//echo json_encode(array(\"status\" => TRUE));\r\n\r\n\t\tif ($this->db->affected_rows()) \r\n\t\t{\r\n\t\t\t$this->session->set_flashdata('info', '<div class=\"alert alert-success\"><strong>GSM Sudah Berhasil Diaktifasi!</strong><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button></div>');\r\n\t\t\tredirect('gsm/gsm_active_list');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->session->set_flashdata('info', '<div class=\"alert alert-success\"><strong>GSM Gagal Diaktifasi</strong><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button></div>');\r\n\t\t\tredirect('gsm/gsm_list');\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "993f678308d91d3bc4e429519bc2bf1c", "score": "0.55752933", "text": "public function cancelOrder($data){\r\n $this->db->set('soft_delete', 1 );\r\n $this->db->where('id_transaksi',$data['id']);\r\n $this->db->update('transaksi_laut');\r\n \r\n //input log\r\n $id_trans = $data['id'];\r\n $log = \"Cancel Nota Air Kapal Dengan ID Transaksi \".$id_trans;\r\n $this->insertLog($log);\r\n\r\n if($this->db->affected_rows() > 0)\r\n return TRUE;\r\n }", "title": "" }, { "docid": "018b846529cac1f26b8b0ab0c606d6c4", "score": "0.5574837", "text": "public function pending_tugas($id)\n {\n //Mengambil session teknisi\n $id_user = $this->session->userdata('id_user');\n\n //Melakukan update data ticket dengan mengubah status ticket menjadi 5, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'status' => 5,\n 'last_update'=> date(\"Y-m-d H:i:s\")\n );\n\n //Melakukan insert data tracking ticket di-pending oleh teknisi, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => date(\"Y-m-d H:i:s\"),\n 'status' => \"Pending\",\n 'deskripsi' => \"\",\n 'id_user' => $id_user\n );\n\n //Query untuk melakukan update data ticket sesuai dengan array '$data' ke tabel ticket\n $this->db->where('id_ticket', $id);\n $this->db->update('ticket', $data);\n\n //Query untuk melakukan insert data tracking ticket sesuai dengan array '$datatracking' ke tabel tracking\n $this->db->insert('tracking', $datatracking);\n }", "title": "" }, { "docid": "c3f6fae3bfff5b25c579337bcca505c4", "score": "0.55713975", "text": "function plgVmConfirmedOrder(VirtueMartCart $cart, $order) {\r\n\r\n\t\tif (!($this->_currentMethod = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {\r\n\t\t\treturn NULL; // Another method was selected, do nothing\r\n\t\t}\r\n\t\tif (!$this->selectedThisElement($this->_currentMethod->payment_element)) {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$session = JFactory::getSession();\r\n\t\t$return_context = $session->getId();\r\n\t\t//$this->_debug = $method->debug;\r\n\t\tif (!class_exists('VirtueMartModelOrders'))\r\n\t\trequire( VMPATH_ADMIN . DS . 'models' . DS . 'orders.php' );\r\n\t\tif (!class_exists('VirtueMartModelCurrency'))\r\n\t\trequire(VMPATH_ADMIN . DS . 'models' . DS . 'currency.php');\r\n\r\n\t\t$new_status = '';\r\n\r\n\t\t$usrBT = $order['details']['BT'];\r\n\t\t$address = ((isset($order['details']['ST'])) ? $order['details']['ST'] : $order['details']['BT']);\r\n\r\n\r\n\t\tif (!class_exists('TableVendors'))\r\n\t\trequire(VMPATH_ADMIN . DS . 'table' . DS . 'vendors.php');\r\n\t\t$vendorModel = VmModel::getModel('Vendor');\r\n\t\t$vendorModel->setId(1);\r\n\t\t$vendor = $vendorModel->getVendor();\r\n\t\t$vendorModel->addImages($vendor, 1);\r\n\t\t$this->getPaymentCurrency($this->_currentMethod);\r\n\t\t$q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`=\"' . $this->_currentMethod->payment_currency . '\" ';\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$db->setQuery($q);\r\n\t\t$currency_code_3 = $db->loadResult();\r\n\r\n\t\t$paymentCurrency = CurrencyDisplay::getInstance($this->_currentMethod->payment_currency);\r\n\t\t$totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($this->_currentMethod->payment_currency, $order['details']['BT']->order_total, false), 2);\r\n\t\t$cd = CurrencyDisplay::getInstance($cart->pricesCurrency);\r\n\r\n\t\t$merchant_id = $this->_getMerchantId($this->_currentMethod);\r\n\t\tif (empty($merchant_id)) {\r\n\t\t\tvmInfo(vmText::_('VMPAYMENT_HELLASPAY_MERCHANT_ID_NOT_SET'));\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$merchant_pass = $this->_getMerchantPass($this->_currentMethod);\r\n\t\tif (empty($merchant_pass)) {\r\n\t\t\tvmInfo(vmText::_('VMPAYMENT_HELLASPAY_MERCHANT_PASS_NOT_SET'));\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$merchant_ref = \"REF\".substr(md5(uniqid(rand(), true)), 0, 9);\r\n\t\t$TmSecureKey = 'd2ViaXQuYnovbGljZW5zZS50eHQ='; // for extra encryption options\r\n\t\t$hellaspay_amount = number_format($totalInPaymentCurrency, 2, '.', '') * 100;\r\n\t\t\r\n\t\t$lang = JFactory::getLanguage();\r\n\t\t$this->lang_tag = $lang->getTag();\r\n\t\tif(strtolower($this->lang_tag) == 'el-gr'){\r\n\t\t$hellaspay_lang = 'el-GR';\r\n\t\t} else {\r\n\t\t$hellaspay_lang = 'en-US';\r\n\t\t}\r\n\t\t\r\n\t\t$this->_getHellaspayIntoSession();\r\n\t\tif($this->_vivinstalments > 1){\r\n\t\t$hellaspay_period = $this->_vivinstalments;\r\n\t\t$hellaspay_period_note = '- Instalments: ' . $this->_vivinstalments;\r\n\t\t} else {\r\n\t\t$hellaspay_period = '0';\r\n\t\t$hellaspay_period_note = '';\r\n\t\t}\r\n\t\t\r\n\t\t if($hellaspay_period > 0){\r\n\t\t $Installments = (int)$hellaspay_period;\r\n\t\t } else {\r\n\t\t $Installments = '1';\r\n\t\t }\r\n\t \r\n\t\t$postargs = 'Amount='.urlencode($hellaspay_amount).'&RequestLang='.urlencode($hellaspay_lang).'&Email='.urlencode($order['details']['BT']->email).'&MaxInstallments='.urlencode($Installments).'&MerchantTrns='.urlencode($order['details']['BT']->order_number).'&SourceCode='.urlencode($this->_currentMethod->hellaspay_source).'&PaymentTimeOut=300';\r\n\t\r\n\t\tif($this->_currentMethod->hellaspay_production=='1'){\r\n\t\t$curl = curl_init(\"http://demo.vivapayments.com/api/orders\");\r\n\t\t} else {\r\n\t\t$curl = curl_init(\"https://www.vivapayments.com/api/orders\");\r\n\t\tcurl_setopt($curl, CURLOPT_PORT, 443);\r\n\t\t}\r\n\t\t\r\n\t\tcurl_setopt($curl, CURLOPT_POST, true);\r\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $postargs);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_USERPWD, $this->_currentMethod->hellaspay_merchant_id.':'.html_entity_decode($this->_currentMethod->hellaspay_merchant_pass));\r\n\t\t$curlversion = curl_version();\r\n\t\tif(!preg_match(\"/NSS/\" , $curlversion['ssl_version'])){\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_CIPHER_LIST, \"TLSv1\");\r\n\t\t}\r\n\t\t\r\n\t\t// execute curl\r\n\t\t$response = curl_exec($curl);\r\n\t\t\r\n\t\tif(curl_error($curl)){\r\n\t\tcurl_setopt($curl, CURLOPT_PORT, 443);\r\n\t\tcurl_setopt($curl, CURLOPT_POST, true);\r\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $postargs);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_USERPWD, $this->_currentMethod->hellaspay_merchant_id.':'.html_entity_decode($this->_currentMethod->hellaspay_merchant_pass));\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t}\r\n\t\r\n\t\tcurl_close($curl);\r\n\t\t\r\n\t\ttry {\r\n\t\tif (version_compare(PHP_VERSION, '5.3.99', '>=')) {\r\n\t\t$resultObj=json_decode($response, false, 512, JSON_BIGINT_AS_STRING);\r\n\t\t} else {\r\n\t\t$response = preg_replace('/:\\s*(\\-?\\d+(\\.\\d+)?([e|E][\\-|\\+]\\d+)?)/', ': \"$1\"', $response, 1);\r\n\t\t$resultObj = json_decode($response);\r\n\t\t}\r\n\t\t} catch( Exception $e ) {\r\n\t\t\tthrow new Exception(\"Result is not a json object (\" . $e->getMessage() . \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif ($resultObj->ErrorCode==0){\t//success when ErrorCode = 0\r\n\t\t$OrderCode = $resultObj->OrderCode;\r\n\t\t$ErrorCode = $resultObj->ErrorCode;\r\n\t\t$ErrorText = $resultObj->ErrorText;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Unable to create order code (\" . $resultObj->ErrorText . \")\");\r\n\t\t}\r\n\t\t\r\n\t\t// Prepare data that should be stored in the database\r\n\t\t$dbValues['order_number'] = $order['details']['BT']->order_number;\r\n\t\t$dbValues['payment_name'] = parent::renderPluginName($this->_currentMethod);\r\n\t\t$dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;\r\n\t\t$dbValues['hellaspay_custom'] = $return_context;\r\n\t\t$dbValues['hellaspay_instalments'] = $Installments;\r\n\t\t$dbValues['hellaspay_OrderCode'] = \"$OrderCode\";\r\n\t\t$dbValues['hellaspay_ErrorCode'] = \"$ErrorCode\";\r\n\t\t$dbValues['hellaspay_ErrorText'] = \"$ErrorText\";\r\n\t\t$dbValues['cost_per_transaction'] = $this->_currentMethod->cost_per_transaction;\r\n\t\t$dbValues['cost_percent_total'] = $this->_currentMethod->cost_percent_total;\r\n\t\t$dbValues['payment_currency'] = '978';\r\n\t\t$dbValues['payment_order_total'] = $totalInPaymentCurrency;\r\n\t\t$dbValues['tax_id'] = $this->_currentMethod->tax_id;\r\n\t\t$this->storePSPluginInternalData($dbValues);\r\n\t\t\r\n\t\t$post_variables = Array(\r\n\t\t'Ref' => $OrderCode);\r\n\r\n\t\tif($this->_currentMethod->hellaspay_production=='1'){\r\n\t\t$url = \"http://demo.vivapayments.com/web/newtransaction.aspx\";\r\n\t\t} else {\r\n\t\t$url = \"https://www.vivapayments.com/web/newtransaction.aspx\";\r\n\t\t}\r\n\r\n\t\t$html = '<html><head><title>Redirection</title></head><body><div style=\"margin: auto; text-align: center;\">';\r\n\t\t$html .= '<form action=\"' . $url . '\" method=\"get\" name=\"vm_hellaspay_form\" >';\r\n\t\t$html.= '<input type=\"submit\" value=\"' . vmText::_('VMPAYMENT_HELLASPAY_REDIRECT_MESSAGE') . '\" />';\r\n\t\tforeach ($post_variables as $name => $value) {\r\n\t\t\t$html.= '<input type=\"hidden\" name=\"' . $name . '\" value=\"' . htmlspecialchars($value) . '\" />';\r\n\t\t}\r\n\t\t$html.= '</form></div>';\r\n\t\t$html.= ' <script type=\"text/javascript\">';\r\n\t\t$html.= ' document.vm_hellaspay_form.submit();';\r\n\t\t$html.= ' </script></body></html>';\r\n\r\n\t\treturn $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $dbValues['payment_name'], $new_status);\r\n\r\n\t}", "title": "" }, { "docid": "cc9281cc2f7c17076ef13ce82582df1c", "score": "0.5570061", "text": "public function setStokbaik($No = NULL,$gudang = NULL)\n { \n $produk = $this->db->query(\"select * from trs_relokasi_terima_detail where No_Terima = '\".$No.\"'\")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->Harga;\n if (!empty($product1)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$product1.\"'\")->row();\n // foreach ($produk as $key => $value) {\n // $product2 = $produk[$key]->Produk;\n // if ($product1 == $product2) {\n $summary = $summary + $produk[$kunci]->Qty + $produk[$kunci]->Bonus;\n $valuestok = $produk[$kunci]->Gross;\n // }\n // }\n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok + $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db->query(\"insert into trs_invsum (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', '\".$produk[$kunci]->Cabang.\"', '\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty + $produk[$key]->Bonus;\n\n $this->db->query(\"insert into trs_invhis (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', '\".$produk[$kunci]->Cabang.\"','\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // save inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod_det = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $cek = $this->db->query(\"select * from trs_invdet where KodeProduk ='\".$kodeproduk.\"' and BatchNo ='\".$produk[$key]->BatchNo.\"' and NoDokumen='\".$No.\"' and gudang='\".$gudang.\"' and Tahun='\".date('Y').\"'\")->num_rows();\n if($cek == 0){\n $UnitStok = $produk[$key]->Qty+$produk[$key]->Bonus;\n $valuestok = $produk[$key]->Value; \n $unitcogs = $valuestok / $UnitStok;\n $this->db->set(\"Tahun\", date('Y'));\n $this->db->set(\"Cabang\", $produk[$key]->Cabang);\n $this->db->set(\"KodePrinsipal\", $prod_det->Kode);\n $this->db->set(\"NamaPrinsipal\",$prod_det->Prinsipal);\n $this->db->set(\"Pabrik\", $prod_det->Pabrik);\n $this->db->set(\"KodeProduk\", $kodeproduk);\n $this->db->set(\"NamaProduk\", $produk[$key]->NamaProduk);\n $this->db->set(\"UnitStok\", $UnitStok);\n $this->db->set(\"UnitCOGS\", $unitcogs);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->set(\"NoDokumen\", $No);\n $this->db->set(\"TanggalDokumen\", date('Y-m-d H:i:s'));\n $this->db->set(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db->set(\"ExpDate\", $produk[$key]->ExpDate);\n $this->db->set(\"Gudang\", $gudang);\n $valid = $this->db->insert('trs_invdet');\n }else{\n $cek2 = $this->db->query(\"select * from trs_invdet where KodeProduk ='\".$kodeproduk.\"' and BatchNo ='\".$produk[$key]->BatchNo.\"' and NoDokumen='\".$No.\"' and gudang='\".$gudang.\"' and Tahun='\".date('Y').\"'\")->row();\n $UnitStok = $cek2->UnitStok + $produk[$key]->Qty+$produk[$key]->Bonus;\n $valuestok = $cek2->UnitCOGS * $UnitStok; \n // $unitcogs = $valuestok / $UnitStok;\n $this->db->set(\"UnitStok\", $UnitStok);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\", $produk[$key]->Cabang);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"NoDokumen\", $No);\n $this->db->where(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db->where(\"Gudang\", $gudang);\n $valid = $this->db->update('trs_invdet');\n } \n \n \n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' limit 1\")->row();\n $invdet = $this->db->query(\"select KodeProduk,sum(ValueStok) as 'valuestok',sum(unitstok) as 'sumunit' from trs_invdet where KodeProduk ='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' and UnitStok != 0 group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db->set(\"ValueStok\", 0);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", 'Baik');\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$produk[$key]->Cabang);\n $valid = $this->db->update('trs_invsum');\n }else{\n $invdet = $invdet->row();\n $ValueStok = $invdet->valuestok;\n $unitcogs = $ValueStok / $invdet->sumunit;\n $this->db->query(\"update trs_invsum set ValueStok = \".$valuestok.\", UnitCOGS = '\".$unitcogs.\"' where KodeProduk='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' limit 1\");\n }\n }\n }\n\n }", "title": "" }, { "docid": "aa8e3510ba0a91646c19da864502951a", "score": "0.55678684", "text": "public function saveOrden( $datos_orden , $productos){\n date_default_timezone_set('America/El_Salvador');\n\n // obtener la secuencia de la secursal\n $date = date(\"Y-m-d\");\n $fecha_secuencia;\n $valor_secuencia;\n\n $this->db->select('*');\n $this->db->from(self::sys_secuencia.' AS s');\n $this->db->where('s.id_sucursal', $datos_orden['sucursalActiva'] );\n $query = $this->db->get();\n\n if($query->num_rows() > 0 )\n {\n $info = $query->result();\n foreach ($info as $value) {\n $fecha_secuencia = strtotime($value->fecha_secuencia,time());\n $fecha_actual = strtotime($date,time());\n $numero = $value->valor_secuencia;\n $numero++;\n if($fecha_secuencia==$fecha_actual){\n $valor_secuencia = str_pad($numero,4,\"0\",STR_PAD_LEFT) ;\n $this->UpdateSecuencia( $datos_orden['sucursalActiva'] ,$valor_secuencia);\n }\n else\n {\n $valor_secuencia = \"0001\";\n $this->UpdateSecuencia( $datos_orden['sucursalActiva'] ,$valor_secuencia);\n }\n }\n }\n\n //session_start();\n $date = date(\"Y-m-d H:i:s\");\n $fecha_entrega = $datos_orden['fecha_entrega'];\n $entrega_en_espera = 0;\n $estado_pedido = 7;\n if( date(\"Y-m-d\") == $fecha_entrega ){\n $entrega_en_espera = 1;\n $estado_pedido = 1;\n }\n $data = array(\n 'secuencia_orden' => $valor_secuencia,\n 'id_sucursal' => $datos_orden['sucursalActiva'], \n 'id_usuario' => $_SESSION['idUser'],\n 'id_mesero' => $datos_orden['tipo'], \n 'numero_mesa' => $datos_orden['costo_envio'], \n 'elaborado' => 0,\n 'flag_cancelado' => $datos_orden['pagado'],\n 'fechahora_pedido' => $date,\n 'fechahora_elaborado'=>$datos_orden['fecha_elaboracion'],\n 'flag_elaborado' => 1,\n 'flag_despachado' => 0,\n 'flag_pausa' => 0,\n 'prioridad' => $entrega_en_espera,\n 'estado' => 1,\n 'cliente' => $datos_orden['cliente'],\n 'email' => $datos_orden['email'],\n 'telefono' => $datos_orden['telefono'],\n 'celular' => $datos_orden['celular'],\n 'de' => $datos_orden['de'],\n 'para' => $datos_orden['para'],\n 'direccion' => $datos_orden['direccion'],\n 'dedicatoria' => $datos_orden['texto'],\n 'fecha_sugerida_entrega'=>$datos_orden['fecha_entrega'],\n 'tarjeta' => $datos_orden['tarjeta'],\n 'cvs' => $datos_orden['cvs'],\n 'nota_interna' => $datos_orden['nota_interna'],\n );\n $this->db->insert(self::sys_pedido,$data);\n\n //Insertando pedido Detalle\n $id_orden = $this->db->insert_id();\n $this->InsertPedidoDetalle( $id_orden , $datos_orden['sucursalActiva'] , $productos, $datos_orden['nota_interna'], $estado_pedido );\n\n return $id_orden;\n }", "title": "" }, { "docid": "2e6333b89b07c91a08da20c3b48baa8c", "score": "0.5564737", "text": "public function setStokIn($No = NULL, $gudang = NULL)\n { \n $produk = $this->db->query(\"select * from trs_relokasi_terima_detail where No_Terima = '\".$No.\"' where Status ='terima' \")->result();\n foreach ($produk as $kunci => $nilai) {\n $summary = 0;\n $product1 = $produk[$kunci]->Produk;\n $harga = $produk[$kunci]->Harga;\n if (!empty($product1)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$product1.\"'\")->row();\n foreach ($produk as $key => $value) {\n $product2 = $produk[$key]->Produk;\n if ($product1 == $product2) {\n $summary = $summary + $produk[$key]->Qty+$produk[$key]->Bonus;\n $valuestok = $produk[$key]->Gross;\n }\n }\n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n\n if ($invsum->num_rows() > 0) {\n $invsum = $invsum->row(); \n $UnitStok = $invsum->UnitStok + $summary;\n $valuestok = $UnitStok * $invsum->UnitCOGS;\n $this->db->query(\"update trs_invsum set UnitStok = \".$UnitStok.\", ValueStok = \".$valuestok.\" where KodeProduk='\".$product1.\"' and Cabang='\".$produk[$kunci]->Cabang.\"' and Gudang='\".$gudang.\"' and Tahun = '\".date('Y').\"' limit 1\");\n }\n else{\n $this->db->query(\"insert into trs_invsum (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, Gudang, indeks, UnitCOGS, HNA) values ('\".date('Y').\"', '\".$produk[$kunci]->Cabang.\"', '\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$product1.\"', '\".addslashes($prod->Produk).\"', '\".$summary.\"', '\".$valuestok.\"', '\".$gudang.\"', '0.000', '\".$harga.\"', '0.000')\"); \n }\n }\n }\n\n // save inventori history\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $valuestok = $produk[$key]->Gross;\n $UnitStok = $produk[$key]->Qty+$produk[$key]->Bonus;\n\n $this->db->query(\"insert into trs_invhis (Tahun, Cabang, KodePrinsipal,NamaPrinsipal, Pabrik, KodeProduk, NamaProduk, UnitStok, ValueStok, BatchNo, ExpDate, Gudang, Tipe, NoDokumen, Keterangan) values ('\".date('Y').\"', '\".$produk[$kunci]->Cabang.\"','\".$prod->Kode.\"','\".$prod->Prinsipal.\"','\".$prod->Pabrik.\"', '\".$kodeproduk.\"', '\".addslashes($prod->Produk).\"', '\".$UnitStok.\"', '\".$valuestok.\"', '\".$produk[$key]->BatchNo.\"', '\".$produk[$key]->ExpDate.\"', '\".$gudang.\"', 'Relokasi', '\".$No.\"', '-')\");\n }\n }\n\n // save inventori detail\n foreach ($produk as $key => $value) { \n $kodeproduk = $produk[$key]->Produk; \n if (!empty($kodeproduk)) {\n $prod_det = $this->db->query(\"SELECT Pabrik, Produk,mst_prinsipal.Kode,mst_produk.Prinsipal FROM mst_produk left join mst_prinsipal ON mst_prinsipal.Prinsipal = mst_produk.Prinsipal \n where Kode_Produk = '\".$kodeproduk.\"'\")->row();\n $UnitStok = $produk[$key]->Qty+$produk[$key]->Bonus;\n $valuestok = $UnitStok * $produk[$key]->Value; \n $unitcogs = $valuestok / $UnitStok;\n // log_message(\"error\",print_r($unitcogs,true));\n $this->db->set(\"Tahun\", date('Y'));\n $this->db->set(\"Cabang\", $produk[$key]->Cabang);\n $this->db->set(\"KodePrinsipal\", $prod_det->Kode);\n $this->db->set(\"NamaPrinsipal\",$prod_det->Prinsipal);\n $this->db->set(\"Pabrik\", $prod_det->Pabrik);\n $this->db->set(\"KodeProduk\", $kodeproduk);\n $this->db->set(\"NamaProduk\", $produk[$key]->NamaProduk);\n $this->db->set(\"UnitStok\", $UnitStok);\n // $this->db->set(\"UnitCOGS\", $unitcogs);\n $this->db->set(\"ValueStok\", $valuestok);\n $this->db->set(\"ModifiedTime\", date('Y-m-d H:i:s')); \n $this->db->set(\"ModifiedUser\", $this->session->userdata('username'));\n $this->db->set(\"NoDokumen\", $No);\n $this->db->set(\"TanggalDokumen\", date('Y-m-d H:i:s'));\n $this->db->set(\"BatchNo\", $produk[$key]->BatchNo);\n $this->db->set(\"ExpDate\", $produk[$key]->ExpDate);\n $this->db->set(\"Gudang\", $gudang);\n $valid = $this->db->insert('trs_invdet');\n \n $invsum = $this->db->query(\"select * from trs_invsum where KodeProduk='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' limit 1\")->row();\n $invdet = $this->db->query(\"select KodeProduk,sum(ValueStok) as 'valuestok' from trs_invdet where KodeProduk ='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' and UnitStok != 0 group by KodeProduk limit 1\");\n if($invdet->num_rows() <= 0){\n $this->db->set(\"ValueStok\", 0);\n $this->db->where(\"KodeProduk\", $kodeproduk);\n $this->db->where(\"Gudang\", 'Baik');\n $this->db->where(\"Tahun\", date('Y'));\n $this->db->where(\"Cabang\",$produk[$key]->Cabang);\n $valid = $this->db->update('trs_invsum');\n }else{\n $invdet = $invdet->row();\n $ValueStok = $invdet->valuestok;\n $unitcogs = $ValueStok / $invsum->UnitStok;\n $this->db->query(\"update trs_invsum set ValueStok = \".$valuestok.\", UnitCOGS = '\".$unitcogs.\"' where KodeProduk='\".$kodeproduk.\"' and Cabang='\".$produk[$key]->Cabang.\"' and Gudang='Baik' and Tahun = '\".date('Y').\"' limit 1\");\n } \n }\n }\n\n }", "title": "" }, { "docid": "e41c5e8ce0d7963b210b34dd21e26809", "score": "0.55635923", "text": "public function payment()\n {\n if ($this->session->userdata('role_id') == 2) {\n $data = [\n 'payment' => $this->db->get('payment')->result_array(),\n 'jasa' => $this->db->get('jasa')->result_array(),\n 'notif_pesanan' => $this->db->get_where('pesanan', ['is_active' => 1, 'is_acc' => 0])->result_array(),\n 'pesanan' => $this->db->get_where('pesanan', ['is_active' => 1, 'is_acc' => 0])->num_rows(),\n ];\n $this->load->view('admin/header');\n $this->load->view('admin/topbar', $data);\n $this->load->view('admin/payment_v', $data);\n $this->load->view('admin/footer');\n } elseif ($this->session->userdata('role_id') == 1) {\n redirect('cp_admin/s_admin');\n } else {\n redirect('cp_admin/');\n }\n }", "title": "" }, { "docid": "ca96ec88a6905ad4d8f70f757e1e5d95", "score": "0.5561715", "text": "public function actionStatus()\n {\n \n $merchant_pass = $GLOBALS['env']['fch_merch_pass']; //укажите Ваш пароль мерчанта\n\n $post_hash = $_POST['verificate_hash'];\n unset($_POST['verificate_hash']);\n \n $my_hash = \"\";\n foreach ($_POST AS $key_post=>$one_post) if ($my_hash==\"\") {$my_hash = $one_post;}\n else $my_hash = $my_hash.\"::\".$one_post;\n \n $my_hash = $my_hash.\"::\".$merchant_pass;\n $my_hash = hash ( \"sha256\", $my_hash);\n \n if ($my_hash==$post_hash){\n $date = date(\"Y-m-d\");\n $dtime = date(\"Y-m-d H:i:s\");\n $id = $_POST['user_id'];\n $sum = $_POST['amount'];\n $cur = 'usd';\n if(Journal::checkBatch($id, $post_hash)){\n Log::add($id.' '.$_POST['payed_paysys'].\" fchange batch error \".$sum);\n exit('fchange batch error');\n }\n\n $wallet_types=['balance', 'gridPay'];\n $wallet_type = (isset($_POST['wallet_type'])&&\n in_array($_POST['wallet_type'],$wallet_types))? $_POST['wallet_type']:'balance' ;\n \n User::addVal($id,$sum,$wallet_type);\n if($wallet_type == 'gridPay'){\n Journal::addFromArray(['type'=>'gridpay_add_fchange',\n 'user'=>$id,\n 'sum'=>$sum,\n 'date'=>$dtime,\n 'cur'=>$cur,\n //'rate'=>$stage['price'],\n 'name'=>'GridPay addition',\n 'detail'=>$post_hash,\n 'adr'=>'fchange',\n ]);\n }else{\n Journal::add('add',$id,$sum,$dtime,\"Addition\",0,\"complete\",1, $cur,$post_hash, 'fchange'); \n } \n //Log::add($id.' '. $dtime.' '.$cur.\" fchange payment is complete\".' '.$sum);\n echo \"*ok*\";\n }else{\n Log::add($id.' '.$_POST['payed_paysys'].\" fchange hash error \".$sum);\n exit('fchange hash error');\n }\n exit;\n }", "title": "" }, { "docid": "615092d2a9c546b8622100e1068477af", "score": "0.55572027", "text": "public function transactServicePro__()\n {\n //var_dump($this->paramGET); die();\n $param = [\n \"button\" => [\n \"modal\" => [\n [\"reporting/detailTransactServModal\", \"reporting/detailTransactServModal\", \"fa fa-search\"],\n ],\n \"default\" => [\n ]\n ],\n \"tooltip\" => [\n \"modal\" => [\"Détail\"]\n ],\n \"classCss\" => [\n \"modal\" => [],\n \"default\" => [\"confirm\"]\n ],\n \"attribut\" => [],\n \"args\" => $this->paramGET,\n \"dataVal\" => [\n ],\n \"fonction\" => [\"date_transaction\"=>\"getDateFR\",\"montant\"=>\"getFormatMoney\",\"commission\"=>\"getFormatMoney\"]\n ];\n $this->processing($this->reportingModels, 'getAllTransactionService', $param);\n }", "title": "" }, { "docid": "11f9721fe4428a8fa2544ef522e7aa84", "score": "0.5554577", "text": "public function buy(){\n\n $id=89025555; //id di connessione\n $password=\"test\"; //password di connessione\n\n //è necessario foramttare il totale in NNNNNN.NN\n $importo= number_format(StadiumCart::total(),2,'.','');//importo da pagare\n\n $trackid=\"STDRX\".time(); //id transazione\n\n $urlpositivo=\"http://stadium.reexon.net/cart/receipt\";\n $urlnegativo=\"http://stadium.reexon.net/cart/error\";\n $codicemoneta=\"978\"; //euro\n //prelevo i dati inseriti durante la fase acquisto\n $user = (object)Session::get('user');\n\n $data=\"id=$id\n &password=$password\n &action=4\n &langid=ITA\n &currencycode=$codicemoneta\n &amt=$importo\n &responseURL=$urlpositivo\n &errorURL=$urlnegativo\n &trackid=$trackid\n &udf1=\".$user->email.\"\n &udf2=\".$user->mobile.\"\n &udf3=\".$user->firstname.\"\n &udf4=\".$user->lastname.\"\n &udf5=EE\";\n $curl_handle=curl_init();\n //curl_setopt($curl_handle,CURLOPT_URL,'https://www.constriv.com:443/cg/servlet/PaymentInitHTTPServlet');\n curl_setopt($curl_handle,CURLOPT_URL,'https://test4.constriv.com/cg301/servlet/PaymentInitHTTPServlet');\n curl_setopt($curl_handle, CURLOPT_VERBOSE, true);\n curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,5);\n curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl_handle, CURLOPT_POST, 1);\n curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);\n $buffer = curl_exec($curl_handle);\n\n if (empty($buffer))\n {\n return curl_error($curl_handle);\n }\n else\n {\n //print $buffer;\n $url=explode(\":\",$buffer);\n $transaction_id=$url[0];\n curl_close($curl_handle);\n //prepara il link per il pagamento\n if(strlen($transaction_id)>0){\n $redirectURL = $url[1].\":\".$url[2].\"?PaymentID=$transaction_id\";\n echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=$redirectURL\\\">\";\n }\n }\n\n }", "title": "" }, { "docid": "30968f00cdad300bedcdefa25ce9e689", "score": "0.5548887", "text": "function confirm()\n\t{\n\t\t$orderdetail = $this->Order_mdl->orderdetail();\n\t\t$voucher = $orderdetail['orderdetails_voucherno'];\n\t\t//---------------------------------\n\n\t\t// Second - Get session userid\n\t\t$sessiondata = $this->session->userdata('logged_in');\n\t\t$sessionid = $sessiondata['id'];\n\t\t//---------------------------------\n\n\t\t$data['orders'] = $this->Order_mdl->orderconfirm($voucher, $sessionid);\n\t\t\n\n\t\t$data['total'] = $orderdetail['orderdetails_total'];\n\t\t$data['voucher'] = $voucher;\n\n\n\t\t$data['session'] = $this->session->userdata('logged_in');\n\t\t$data['authors'] = $this->Author_mdl->list();\n\t\t$data['genres'] = $this->Genre_mdl->list();\n\n\t\t$data['innerdata'] = 'frontend/confirm';\n\n\t\t$this->load->view('include/frontendtemplate',$data);\n\n\n\t}", "title": "" }, { "docid": "07d0a6b445d407a166b82e3bd430d2a7", "score": "0.55473197", "text": "public function get_order_id()\n {\n $order_id = $this->input->get_post('ext');\n // $sign = $this->input->get('sign');\n // || !$sign\n if (!$order_id) {\n return;\n }\n\n $orderid = $this->input->get_post('order_id');\n $out_transaction_id = $this->input->get_post('out_transaction_id');\n $pay_type = $this->input->get_post('pay_type');\n $uid= $this->input->get_post('uid');\n $product_id = $this->input->get_post('product_id');\n $my_money = $this->input->get_post('money');\n\n $role_id = $this->input->get_post('role_id');\n $server_id = $this->input->get_post('server_id');\n $partner_id = $this->input->get_post('partner_id');\n $ext = $this->input->get_post('ext');\n $pf = $this->input->get_post('pf');\n $time= $this->input->get_post('time');\n $sign= $this->input->get_post('sign');\n $condition = array('u_order_id' => $order_id);\n $this->load->model('Game_order_model');\n\n $game_order = $this->Game_order_model->get_one_by_condition($condition);\n $db_money = $game_order->money;\n if ($db_money!=intval($my_money * 100)) {\n return;\n }\n $key = $this->Game_model->get_key($game_order->game_id, 'key');\n $src = $orderid.$uid.$product_id.$my_money.$role_id.$server_id.$partner_id.$ext.$time.$key;\n $my_sign = md5($src);\n if ($my_sign==$sign) {\n // $this->load->model('Cp_game_order_model');\n // $pay_back_check = $this->Cp_game_order_model->get_one_by_condition($condition);\n // if (!$pay_back_check) {\n // $cp_order_info = array(\n // 'game_id'=>$game_order->game_id,\n // 'money'=>$my_money*100,\n // 'game_father_id'=>$game_order->game_father_id,\n // 'create_Date'=>$time,\n // 'role_id'=>$role_id,\n // 'cp_user_id'=>$uid,\n // 'u_order_id'=>$order_id,\n // 'cp_order_id'=>$orderid,\n // 'user_id'=>$game_order->user_id,\n // 'platform'=>$game_order->platform,\n // 'server_id'=>$game_order->ext,\n // 'ext'=>$pf,\n // );\n // $pay_back_response = $this->Cp_game_order_model->add($cp_order_info);\n // if (!$pay_back_response) {\n // log_message('error', $this->platform.' pay back check is failed');\n // }\n // }\n return $order_id;\n } else {\n return false;\n }\n return false;\n }", "title": "" } ]
2a44cae6e801c26a6169c22d7c01f4b6
Retrieves the manager registry for an entity / classs.
[ { "docid": "f6b98cd52f487c61fe6b12df10b48698", "score": "0.6155369", "text": "protected function getManager(): \\Doctrine\\ORM\\EntityManager\n {\n return $this->managerRegistry\n ->getManagerForClass($this->class);\n }", "title": "" } ]
[ { "docid": "9fb3b8bc823bd96b91bbc91ed6811c4c", "score": "0.67618835", "text": "private function getManagerForClass($entity)\n {\n return $this\n ->get('elcodi.provider.manager')\n ->getManagerByEntityNamespace(get_class($entity));\n }", "title": "" }, { "docid": "35697753d51f8962540dcd1f9a7ed799", "score": "0.63957566", "text": "public function getManager();", "title": "" }, { "docid": "35697753d51f8962540dcd1f9a7ed799", "score": "0.63957566", "text": "public function getManager();", "title": "" }, { "docid": "a5a64daa185e4bd634ca9917ca2fafe3", "score": "0.6358195", "text": "protected function getEntityManager()\n {\n return $this->managerRegistry->getManager($this->getEntityManagerName());\n }", "title": "" }, { "docid": "8e7b8946751403766bb9132f57c4d336", "score": "0.6289487", "text": "public function getRegistry();", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.62508166", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "fe8e3243e6d5403c77e45210fc2d9add", "score": "0.6231301", "text": "protected function getRegistry()\n {\n return $this->getHelper()->getRegistry();\n }", "title": "" }, { "docid": "45a4be577da8764e25592c526f6bfb6f", "score": "0.6230937", "text": "public function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "6f6a10357267b6969032a3f07bf6139e", "score": "0.6217421", "text": "protected function getRegistry()\n {\n return self::getInstance()->_registry;\n }", "title": "" }, { "docid": "8750ad697a634fa303a2bd587f268fb2", "score": "0.61404103", "text": "public function getManagerOf($entity)\n {\n if (!isset($this->managers[$entity])) {\n $manager = '\\\\App\\\\Model\\\\Manager\\\\'.$entity.'Manager'.$this->api;\n \n $this->managers[$entity] = new $manager($this->dao);\n }\n\n return $this->managers[$entity];\n }", "title": "" }, { "docid": "c3984bcff72acba4bf314eba9a22dece", "score": "0.6054293", "text": "abstract public static function getManager();", "title": "" }, { "docid": "d9f8f6f8701e73889777dcc4be64896b", "score": "0.60189503", "text": "private function getManager()\n {\n return $this->get('kac_site.manager.product');\n }", "title": "" }, { "docid": "54a6e25d6c6ddb4b2a3898f7459b451f", "score": "0.60139054", "text": "public function managers()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Manager', 'gidNumber');\n\t}", "title": "" }, { "docid": "fbf732ec3bfff3986db7b327acac0e79", "score": "0.60119605", "text": "protected function manager()\n {\n return $this->application->getManager();\n }", "title": "" }, { "docid": "dcc38056147887abf5ff3c48ed7f4bba", "score": "0.59495467", "text": "public function getAllRegistered() {\r\n\t\treturn $this->_registry;\r\n\t}", "title": "" }, { "docid": "8e4043030ce9404b9d7fe5d2cd872fc4", "score": "0.59089506", "text": "protected function getRegistry()\n {\n return Registry\\Registry::getInstance();\n }", "title": "" }, { "docid": "fd7fd8bcc70af8fb4b0ba36430f4bd40", "score": "0.58893096", "text": "public function getRegistry()\r\n\t{\r\n\t\treturn $this->registry;\r\n\t}", "title": "" }, { "docid": "03109b3879408c8695e9c4e852632210", "score": "0.58835983", "text": "public static function em()\n {\n \t/* Initialize action controller here */\n \t$registry = Zend_Registry::getInstance();\n \treturn $registry->entitymanager;\n }", "title": "" }, { "docid": "ed312c8e558b96ce50e7ea7a05f4bf94", "score": "0.58799887", "text": "public function getRegistry()\n {\n return $this->registry;\n }", "title": "" }, { "docid": "1ee1c327d47b312d4be7f383f4d428da", "score": "0.584593", "text": "public function getRegistry() {\n return self::$registry;\n }", "title": "" }, { "docid": "567754d287908c32146ab2d10b5652a6", "score": "0.5835569", "text": "public function getRegistry()\n {\n }", "title": "" }, { "docid": "2dee4fb771654f1124dffb7624c12d96", "score": "0.57773596", "text": "public function getResolverRegistry();", "title": "" }, { "docid": "3e7c8b15ad6ac39c034733c04b0646ee", "score": "0.5768906", "text": "protected function getRegistry() { return $this->registry; }", "title": "" }, { "docid": "877ca0681d6fa4122d970b789942f4a4", "score": "0.5745599", "text": "public function getEntityManager()\n\t{\n\t\treturn $this->getDxService()->getEntityManager();\n\t}", "title": "" }, { "docid": "3aeb543cd3e4f1b0ce9a759549415bed", "score": "0.5741079", "text": "protected function getEm(){\n return $this->getEntityManager();\n }", "title": "" }, { "docid": "ce1459549e8e979ddc3cc64d18ca60a5", "score": "0.5734002", "text": "public function getEntityManager();", "title": "" }, { "docid": "ce1459549e8e979ddc3cc64d18ca60a5", "score": "0.5734002", "text": "public function getEntityManager();", "title": "" }, { "docid": "2d13472ad0aa225e3266ec54b2d20f71", "score": "0.5697122", "text": "public function getRegistry(): array;", "title": "" }, { "docid": "1fae0b344de6fb2d2cacefbe45e45483", "score": "0.5683954", "text": "public function getEntityManager ();", "title": "" }, { "docid": "4e8c7b3b0512d70589af9177cfca5fb3", "score": "0.5651128", "text": "public function getEntityManager(): EntityManagerInterface\n {\n return $this->registry->getEntityManager();\n }", "title": "" }, { "docid": "a4bd2301e401bffaae10238237d4bfbe", "score": "0.5641441", "text": "protected function entityTypeManager() {\n if (!isset($this->entityTypeManager)) {\n $this->entityTypeManager = $this->container()->get('entity_type.manager');\n }\n return $this->entityTypeManager;\n }", "title": "" }, { "docid": "82e8f88dd0e1f59e821b19f284f11c8c", "score": "0.5639748", "text": "public static function getRegistry() {\n global $registry;\n return $registry;\n }", "title": "" }, { "docid": "102abdcf80939f1adfa15cb755abed02", "score": "0.56297666", "text": "public function Manager(){\n\t\t\n\t\t$this->Boss_type = 1;\n\t\treturn $this->getManager();\n\t}", "title": "" }, { "docid": "a216169e49d1eb8cb9d90e04684858ce", "score": "0.56175315", "text": "protected function entityTypeManager() {\n return $this->entityTypeManager;\n }", "title": "" }, { "docid": "2c73401f328fcfe4e6a1d692da4b11cd", "score": "0.5615759", "text": "public function Manager(){\n\t\t\n\t\t$this->Boss_type = 3;\n\t\treturn $this->getManager();\n\t}", "title": "" }, { "docid": "9d32e2ca4544b31cfff441e0a12bdd49", "score": "0.5615334", "text": "public static function get() {\n if (empty($class->manager)) {\n $class->manager = new self();\n }\n\n return $class->manager;\n }", "title": "" }, { "docid": "b124080a5d59505c80c8871b320780c6", "score": "0.5612971", "text": "protected static function getManagerClass()\r\n {\r\n return static::class . 'Manager';\r\n }", "title": "" }, { "docid": "3a8df6ca18dc4805db36ae89a2d47c35", "score": "0.55954003", "text": "public static function getEntityManager()\n {\n return self::$entityManager;\n }", "title": "" }, { "docid": "1df97678c106b447a4a8da1f223813c6", "score": "0.55951023", "text": "protected function getEntityManager()\n {\n return Yii::app()->doctrine->getEntityManager();\n\n }", "title": "" }, { "docid": "6069b9ccb9ab0687dea6b60137f28320", "score": "0.55889815", "text": "private function getManager()\n {\n return $this->get('example_news.manager');\n }", "title": "" }, { "docid": "75315ef42f80fb93bc19e6fa032d8707", "score": "0.557688", "text": "public function Manager(){\n\t\t\n\t\t$this->Boss_type = 2;\n\t\treturn $this->getManager();\n\t}", "title": "" }, { "docid": "b3955878baef8fb9f06991903b28b4e5", "score": "0.55526954", "text": "public static function getRepository() {\r\n\t\t/* @var $entities Doctrine\\ORM\\EntityManager */\r\n\t\tglobal $entities;\r\n\t\t\r\n\t\t$entities = $entities ?: EntityManagerFactory::get();\r\n\t\t\r\n\t\treturn $entities->getRepository(get_called_class());\r\n\t}", "title": "" }, { "docid": "570b4ff3af90cc676a8120e80a2ce398", "score": "0.5508955", "text": "protected function getManagerServices()\n {\n return $this->getServiceRepository()\n ->findServicesForManager($this->getUser())\n ->getQuery()\n ->getResult();\n }", "title": "" }, { "docid": "88503ddeb16260a4afa42b7e8835dace", "score": "0.5505569", "text": "public function Manager(){\n\t \t\n return $this->getManagerByFolio();\n \t\t\n\t}", "title": "" }, { "docid": "5efcba126db0f05827d024f47318d685", "score": "0.55028003", "text": "protected function getProductManager()\n {\n return $this->get('sulu_product.product_manager');\n }", "title": "" }, { "docid": "9c90aa914f2a762b6cc3ae48e0df0393", "score": "0.5495828", "text": "public function getEntityManager()\n {\n return $this->entity_manager;\n }", "title": "" }, { "docid": "d79a423954a4594a5d6606f01b6da7b3", "score": "0.5479279", "text": "public function getRegistry(): AbstractRegistry\n {\n return $this->registry;\n }", "title": "" }, { "docid": "2c873dcadb766ef12a3ab3884bd9d43d", "score": "0.54690605", "text": "private function getImageManager()\n {\n return $this->get('kac_site.manager.image');\n }", "title": "" }, { "docid": "5468abe508892873aec851b0ebb3d1bf", "score": "0.5461377", "text": "public function getManager()\n {\n return Yii::app()->getComponent($this->managerID);\n }", "title": "" }, { "docid": "ae4fa3f6f01d619b30faa38561ef6ddd", "score": "0.54587823", "text": "protected function getEm()\n {\n return $this->getDoctrine()->getManager();\n }", "title": "" }, { "docid": "08e104b1dffa3b0056fd1ed8ba5bdcde", "score": "0.5449288", "text": "public function getManagerClass()\n {\n return $this->managerClass;\n }", "title": "" }, { "docid": "4b42ac8b8061a7a824e8b0b016b4fadb", "score": "0.54400045", "text": "protected function getRegistry() {\n\t\treturn PPI_Helper::getRegistry();\n\t}", "title": "" }, { "docid": "343e0411a12860ccbffb9e05ee19225f", "score": "0.5430359", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "f609fb9c48fdbf3c885602eae53391b8", "score": "0.54302657", "text": "public function getManager()\r\n {\r\n return $this->manager;\r\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.5420056", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.5420056", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "c661bfce48836e1fb7522a1ba1c1c4f0", "score": "0.5412955", "text": "public function registry()\n {\n return new Registry($this);\n }", "title": "" }, { "docid": "70c23fabcf19be3a1545b4e6b33ad8ce", "score": "0.5392593", "text": "public function getMyManager(): ManagerModel\n {\n return $this->getManager('me');\n }", "title": "" }, { "docid": "b3dbae755aa2e0e161ef4828e5d8d861", "score": "0.5391053", "text": "protected function getManager()\n {\n return $this->get('user.userManager');\n }", "title": "" }, { "docid": "157b5171d652cadddc33b1d63b8faa88", "score": "0.53830135", "text": "private function getEntityManager()\n {\n return $this\n ->getServiceLocator()\n ->get('Doctrine\\ORM\\EntityManager');\n }", "title": "" }, { "docid": "29150a0eb66afd1e68fb8d907f6fa021", "score": "0.53783023", "text": "public function listRegisteredObjects() : array\n {\n $registry = $this->registry;\n \n\t\t$reg = array_map( function( $registry ) {\n\t\t\treturn get_class($registry);\n\t\t}, $registry );\n\n return $reg;\n\n }", "title": "" }, { "docid": "aeef1e670672a58d2dd47f01d047a6a0", "score": "0.5351464", "text": "public function getEntityManager(){\n return $this->getDoctrine()->getManager();\n }", "title": "" }, { "docid": "342e77f0097b53cfaf81c8b893f27a92", "score": "0.5348321", "text": "public function all() {\n $entityClasses = array();\n foreach($this->application->getModules() as $module) {\n $entityClasses = array_merge($entityClasses, $this->findInModule($module));\n }\n\n return $entityClasses;\n }", "title": "" }, { "docid": "e5691537698b9e48eb17ea016fa76263", "score": "0.5345804", "text": "function &getManager() {\n return $this->oManager;\n }", "title": "" }, { "docid": "27f80aefa45b5754ecd5655e28f63b38", "score": "0.5341874", "text": "protected function getManager()\n {\n return $this->get('sulu_product.product_media_manager');\n }", "title": "" }, { "docid": "bb87e711f214caa0db3585fe33c52703", "score": "0.53378475", "text": "public function getManager($object)\n {\n return $this->get($this->getManagerKey($object));\n }", "title": "" }, { "docid": "f3d6424155d00f597ae39184a0dcd6dc", "score": "0.533417", "text": "abstract protected function getObjectManager($managerName = null);", "title": "" }, { "docid": "cd699c4dbe60cc8f1b3f3f8e4c31b20d", "score": "0.53190047", "text": "protected function registry() : DataRegistry\n {\n return $this->app()->registry();\n }", "title": "" }, { "docid": "efe5da2f5a7a1dd0bb2897f0728b93b0", "score": "0.53064835", "text": "public function register_manager_types() {\n\n\t\t\t$this->register_manager_type( 'default', 'ButterBean_Manager' );\n\t\t}", "title": "" }, { "docid": "1e4d7ca5698a66dbc67e76f412177152", "score": "0.53024364", "text": "public static function getApplicationRegistry() {\n\t\t\t$registry = array(\"list\" => array( \n \"../candidatesapp/candidatelistactionhandler.php\", \n \"ephedra\\candidatesapp\\CandidateListActionHandler\"), \n\t\t\t\t\"add\" => array( \n \"../candidatesapp/candidateaddactionhandler.php\", \n \"ephedra\\candidatesapp\\CandidateAddActionHandler\"), \n\t\t\t\t\"delete\" => array( \n \"../candidatesapp/candidatedeleteactionhandler.php\", \n \"ephedra\\candidatesapp\\CandidateDeleteActionHandler\"));;\n\t\t\treturn $registry;\n\t\t}", "title": "" }, { "docid": "e1b16a6db94190292a8ebf7f1f2472b9", "score": "0.52923816", "text": "public function registry() {\n\t if(!$this->registry){\n\t $this->registry = new StackRegistry();\n }\n\t\treturn $this->registry;\n\t}", "title": "" }, { "docid": "ef41df8790a63370546f7db000875f97", "score": "0.5275454", "text": "public function getEntities() : array\n {\n return [\n 'driver' => [\n 'orm_default' => [\n 'drivers' => [\n 'Queue\\Entity' => 'queue_entity'\n ]\n ],\n 'queue_entity' => [\n 'class' => AnnotationDriver::class,\n 'cache' => 'array',\n 'paths' => __DIR__ . '/Entity'\n ]\n ]\n ];\n }", "title": "" }, { "docid": "00baafe2f56706ba9288fd918147217a", "score": "0.5258546", "text": "protected function _getRoleRegistry() {\n if ( null === $this->_roleRegistry ) {\n $this->_roleRegistry = new K_Acl_Role_Registry();\n }\n return $this->_roleRegistry;\n }", "title": "" }, { "docid": "9e3103b80a3caa3c95fe94dcf3bae8a6", "score": "0.52561605", "text": "public function getObjectManager() {\n\t\treturn $this->objectManager;\n\t}", "title": "" }, { "docid": "e5fbe78be2550e3a81cba807848538a7", "score": "0.5236621", "text": "private function getManager()\n {\n if ($this->manager === null) {\n $this->manager = Shopware()->Models();\n }\n\n return $this->manager;\n }", "title": "" }, { "docid": "9ad8d23b9e29f3fb81b800ff9cb63fe1", "score": "0.5222946", "text": "private function getManager() {\n return $this->get('pickle_blog.manager');\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.5222688", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.5222688", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "ca8575db2ad4dc09854ba2d6763e82e4", "score": "0.52202517", "text": "public function getObjectManager()\n {\n if (!$this->objectManager instanceof ObjectManager) {\n $this->setObjectManager($this->getServiceManager()->get('doctrine.entitymanager.orm_default'));\n }\n return $this->objectManager;\n }", "title": "" }, { "docid": "3b3d94ef6c30cce820b99f0a39ec2cb0", "score": "0.5220152", "text": "private function getRoomTypeManager()\n {\n return $this->roomTypeManager;\n }", "title": "" }, { "docid": "dbd9b25bb01f87e16a50fe32a4a0210f", "score": "0.5217014", "text": "public static function getEntityManager()\n {\n return self::getServiceManager()->get('Doctrine\\ORM\\EntityManager');\n }", "title": "" }, { "docid": "083988613df26eda236030bd8e4794ce", "score": "0.5208201", "text": "protected function getArticlesManager()\n {\n return $this->module->get('articleManager');\n }", "title": "" }, { "docid": "5407af969644ad63536431ea820637a5", "score": "0.52064407", "text": "public function getObjectManager(){\n return $this->objectManager;\n }", "title": "" }, { "docid": "974be231b84cd5cd1c39cb1cd688245e", "score": "0.5160489", "text": "protected function getEntity()\n {\n return $this->getInstance(EntityManager::class, [$this->entityClass]);\n }", "title": "" }, { "docid": "218412d48e58cdf81dd899a81a004713", "score": "0.51506", "text": "public function getTypeRegistry();", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.5144957", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.5144957", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.5144957", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.5144957", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "cfb580a8bf0c0338674aa380e892e0f1", "score": "0.5132944", "text": "public function getEntityManager()\n {\n return $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }", "title": "" }, { "docid": "b4ec9da44c77f7e061f40603f0f37f79", "score": "0.5129749", "text": "public static function get()\n {\n // Create a simple \"default\" Doctrine ORM configuration for Annotations\n $isDevMode = true;\n $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__ . \"/src\"), $isDevMode);\n\n // database configuration parameters\n $conn = array(\n 'driver' => 'pdo_mysql',\n 'dbname' => 'adserver',\n 'user' => 'root',\n 'password' => '',\n 'host' => '127.0.0.1',\n );\n\n // obtaining the entity manager\n return EntityManager::create($conn, $config);\n }", "title": "" }, { "docid": "27d1ed3f9ac1087468a7090ea5b6f806", "score": "0.51237684", "text": "public function getTypeManager(): TypeManager;", "title": "" }, { "docid": "adee49b5fad3c3eefa321caa18dcfe89", "score": "0.5120928", "text": "function getLocator()\n{\n // if using the InMemoryLocator, you must instantiate each of the handlers here\n $commandPairs = [\n RentMovieHandler::class => RentMovieCommand::class,\n BuyMovieHandler::class => BuyMovieCommand::class,\n ];\n\n $locator = new LazyLoadingLocator();\n\n foreach ($commandPairs as $handler => $command) {\n $locator->addHandler($handler, $command);\n }\n\n return $locator;\n}", "title": "" }, { "docid": "1f362e5e1bb5e546903098c0ec0c49f7", "score": "0.5109379", "text": "private function getManager()\n {\n return self::getDocker();\n }", "title": "" }, { "docid": "71cc19707f693b10f5dc0d7344a8474e", "score": "0.51093215", "text": "protected function getObjectManager()\n {\n if (null == $this->objectManager) {\n $area = FrontNameResolver::AREA_CODE;\n $params = $_SERVER;\n $params[StoreManager::PARAM_RUN_CODE] = 'admin';\n $params[StoreManager::PARAM_RUN_TYPE] = 'store';\n $this->objectManager = $this->objectManagerFactory->create($params);\n\n /** @var \\Magento\\Framework\\App\\State $appState */\n $appState = $this->objectManager->get('Magento\\Framework\\App\\State');\n\n $appState->setAreaCode($area);\n $configLoader = $this->objectManager->get('Magento\\Framework\\ObjectManager\\ConfigLoaderInterface');\n $this->objectManager->configure($configLoader->load($area));\n\n /** @var \\Magento\\Framework\\App\\AreaList $areaList */\n $areaList = $this->objectManager->get('Magento\\Framework\\App\\AreaList');\n\n /** @var \\Magento\\Framework\\App\\Area $area */\n $area = $areaList->getArea($appState->getAreaCode());\n\n $area->load(Area::PART_TRANSLATE);\n }\n\n return $this->objectManager;\n }", "title": "" }, { "docid": "557da8535b001fe3184e4f8d42e53311", "score": "0.5103433", "text": "public static function manager() {\n if (!isset(self::$bunnyman)) {\n self::$bunnyman = new BundleManager();\n }\n \n return self::$bunnyman;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.5099548", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.5099548", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.5099548", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.5099548", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" } ]
cd7b8fde2072b6951130543a5c8158cc
Cleaning the variables, so they don't interfere with execution of new code
[ { "docid": "1f2bbd9d96674bb3d7b2b9186cf897af", "score": "0.7382701", "text": "private function clean(){\n\t\t$this->error = NULL;\n\t\t$this->commands = NULL;\n\t\t$this->arguments = NULL;\n\t\t$this->lines = NULL;\n\t}", "title": "" } ]
[ { "docid": "8f0ac8b5cd4b1c4f6654f09c317e6354", "score": "0.7144028", "text": "public function clearVars(){ }", "title": "" }, { "docid": "098073a7875ecfba8ce3ddb1643911cd", "score": "0.6990036", "text": "protected function _clean()\n\t{\n\t\tif(get_magic_quotes_gpc()) {\n\t\t\t$this->_data = $this->_stripSlashes($this->_data);\n\t\t\t$this->_post = $this->_stripSlashes($this->_post);\n\t\t\t$this->_get = $this->_stripSlashes($this->_get);\n\t\t}\n\t}", "title": "" }, { "docid": "f37caa461864e025cee4ac4931f59fd6", "score": "0.6873093", "text": "function clean()\n\t{\n\t}", "title": "" }, { "docid": "359da9a2148863d4d00ce00b99dc2eeb", "score": "0.6846984", "text": "function clean_up_data()\n\t{\n\t\tif ($this->subject_cleanup_rgx) {\n\t\t\t$this->subject = trim(preg_replace($this->subject_cleanup_rgx, $this->subject_cleanup_rep, $this->subject));\n\t\t}\n\t\tif ($this->body_cleanup_rgx) {\n\t\t\t$this->body = trim(preg_replace($this->body_cleanup_rgx, $this->body_cleanup_rep, $this->body));\n\t\t}\n\t}", "title": "" }, { "docid": "fc7af97eab411b985fc260e910f81a22", "score": "0.673821", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('webinar.component_controller_index_clean')) ? eval($sPlugin) : false);\n\t\t\n\t\t// Remove template vars from memory\n\t\t$this->template()->clean(array(\n\t\t\t\t'aComments',\n\t\t\t\t'iShoutboxRefresh',\n\t\t\t\t'iShoutoutWordWrap'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "b9f3102522df6dc0fea81d0cb9bb8964", "score": "0.66946965", "text": "public function clearVars(){\n $this->_vars = array();\n }", "title": "" }, { "docid": "5c857bbcc365b0be6ea44776020d34c6", "score": "0.66849446", "text": "public static function clearvars()\n {\n \tself::$_vars = array();\n }", "title": "" }, { "docid": "0b7dadd050bebb594c8febf6f3955737", "score": "0.66220456", "text": "public function cleanUp(): void\n {\n $this->setting = null;\n $this->value = null;\n $this->user = null;\n }", "title": "" }, { "docid": "31c0a40a75e0acb8350ba6c275298f93", "score": "0.64681894", "text": "protected function _cleanEnvironment () {\n $this->_cleanServer();\n $_REQUEST = $this->_cleanArray($_REQUEST);\n }", "title": "" }, { "docid": "e20f7ab40e6c08ddb40e37cec02a712f", "score": "0.6438414", "text": "private function cleanState() {\n\t\t$this->errors = $this->headers = $this->amz_headers = array();\n\t}", "title": "" }, { "docid": "9f7e497e88fd1e58933930121968c771", "score": "0.64253914", "text": "public function clean() {\r\n $this->loadUnminifiedData();\r\n \r\n /*\r\n The following code was adapted from this page:\r\n http://www.php.net/manual/en/function.php-strip-whitespace.php#74899\r\n */\r\n $replace = array(\r\n \"#/\\*.*?\\*/#s\" => \"\", //Strip C style comments.\r\n \"#\\s\\s+#\" => \" \" //Strip excess whitespace.\r\n );\r\n \r\n $search = array_keys($replace);\r\n $this->minified_data = preg_replace($search, $replace, $this->unminified_data);\r\n \r\n $replace = array(\r\n \": \" => \":\",\r\n \"; \" => \";\",\r\n \" {\" => \"{\",\r\n \" }\" => \"}\",\r\n \", \" => \",\",\r\n \"{ \" => \"{\",\r\n \";}\" => \"}\", //Strip optional semicolons.\r\n \",\\n\" => \",\", //Don't wrap multiple selectors.\r\n \"\\n}\" => \"}\", //Don't wrap closing braces.\r\n \"\\t\" => \"\", //Put all of the text on the same line\r\n \"\\n\" => \"\", //Put all of the text on the same line\r\n \"\\r\" => \"\" //Put all of the text on the same line\r\n );\r\n \r\n $search = array_keys($replace);\r\n $this->minified_data = trim(str_replace($search, $replace, $this->minified_data));\r\n }", "title": "" }, { "docid": "24b24fe768835b47db3d7c7b28b91f6c", "score": "0.6416486", "text": "function _sanitize_globals()\n\t{\n\t\t$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST', '_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',\n\t\t'system_folder', 'application_folder', 'BM', 'EXT', 'CFG', 'URI', 'RTR', 'OUT', 'IN');\n\t\t\n\t\tforeach(array($_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_ENV, (isset($_SESSION) && is_array($_SESSION)) ? $_SESSION : array()) as $global)\n\t\t{\n\t\t\tif(!is_array($global))\n\t\t\t{\n\t\t\t\tif(!in_array($global, $protected))\n\t\t\t\t{\n\t\t\t\t\tunset($GLOBALS[$global]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($global as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif(!in_array($key, $protected))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($GLOBALS[$key]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(is_array($val))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($val as $k => $v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!in_array($k, $protected))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tunset($GLOBALS[$k]);\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\n\t\tif($this->allow_get_array == FALSE) $_GET = array();\n\t\telse $_GET = $this->_clean_input_data($_GET);\n\n\t\t$_POST = $this->_clean_input_data($_POST);\n\t\tunset($_COOKIE['$Version']);\n\t\tunset($_COOKIE['$Path']);\n\t\tunset($_COOKIE['$Domain']);\n\t\t$_COOKIE = $this->_clean_input_data($_COOKIE);\n\n\t\tlog_message('debug', \"Global POST and COOKIE data sanitized\");\n\t}", "title": "" }, { "docid": "258bdf88f2c6ba2d2738b0e7c608bfca", "score": "0.64143443", "text": "function CleanData()\n{\n}", "title": "" }, { "docid": "a038f27570bca81b498ff0c645e2b690", "score": "0.63791186", "text": "function _sanitize_globals()\n\t{\n\t\t// It would be \"wrong\" to unset any of these GLOBALS.\n\t\t$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',\n\t\t\t\t\t\t\t'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',\n\t\t\t\t\t\t\t'system_folder', 'application_folder', 'BM', 'EXT',\n\t\t\t\t\t\t\t'CFG', 'URI', 'RTR', 'OUT', 'IN');\n\n\t\t// Unset globals for securiy.\n\t\t// This is effectively the same as register_globals = off\n\t\tforeach (array($_GET, $_POST, $_COOKIE) as $global)\n\t\t{\n\t\t\tif ( ! is_array($global))\n\t\t\t{\n\t\t\t\tif ( ! in_array($global, $protected))\n\t\t\t\t{\n\t\t\t\t\tglobal $$global;\n\t\t\t\t\t$$global = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($global as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif ( ! in_array($key, $protected))\n\t\t\t\t\t{\n\t\t\t\t\t\tglobal $$key;\n\t\t\t\t\t\t$$key = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Is $_GET data allowed? If not we'll set the $_GET to an empty array\n\t\tif ($this->_allow_get_array == FALSE)\n\t\t{\n\t\t\t$_GET = array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_array($_GET) AND count($_GET) > 0)\n\t\t\t{\n\t\t\t\tforeach ($_GET as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Clean $_POST Data\n\t\tif (is_array($_POST) AND count($_POST) > 0)\n\t\t{\n\t\t\tforeach ($_POST as $key => $val)\n\t\t\t{\n\t\t\t\t$_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n\t\t\t}\n\t\t}\n\n\t\t// Clean $_COOKIE Data\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0)\n\t\t{\n\t\t\t// Also get rid of specially treated cookies that might be set by a server\n\t\t\t// or silly application, that are of no use to a CI application anyway\n\t\t\t// but that when present will trip our 'Disallowed Key Characters' alarm\n\t\t\t// http://www.ietf.org/rfc/rfc2109.txt\n\t\t\t// note that the key names below are single quoted strings, and are not PHP variables\n\t\t\tunset($_COOKIE['$Version']);\n\t\t\tunset($_COOKIE['$Path']);\n\t\t\tunset($_COOKIE['$Domain']);\n\n\t\t\tforeach ($_COOKIE as $key => $val)\n\t\t\t{\n\t\t\t\t$_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n\t\t\t}\n\t\t}\n\n\t\t// Sanitize PHP_SELF\n\t\t$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);\n\n\n\t\t/*// CSRF Protection check on HTTP requests\n\t\tif ($this->_enable_csrf == TRUE && ! $this->is_cli_request())\n\t\t{\n\t\t\t$this->security->csrf_verify();\n\t\t}\n\t\t*/\n\t\t//log_message('debug', \"Global POST and COOKIE data sanitized\");\n\t}", "title": "" }, { "docid": "2b74ac2e4b0272e7824740b8daf6ea67", "score": "0.63697225", "text": "protected function _cleanup() {}", "title": "" }, { "docid": "41d9e3fc3061e1bf048027abe72b2a26", "score": "0.6353422", "text": "private function clean()\n {\n $this->permissionsForChecking = array();\n $this->userId = null;\n }", "title": "" }, { "docid": "02ae5aaa71f134a4c92dc16813b88475", "score": "0.63506126", "text": "private function clean()\n {\n $this->clean_chk('opt');\n $this->clean_chk('petla');\n $this->_DISPLAY = preg_replace(\n '#'.$this->_contentTags.'#',\n '',\n $this->_DISPLAY\n );\n }", "title": "" }, { "docid": "4d6cbe17bd931db8cabf93ef3b36522c", "score": "0.6323512", "text": "private function _remove_spaces() {\n\t\t$this->contentMinify = str_replace([' {', '{ '], '{', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' }', '} '], '}', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' ;', '; '], ';', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' (', '( '], '(', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' )', ') '], ')', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' ,', ', '], ',', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' :', ': '], ':', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' =', '= '], '=', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' ==', '== '], '==', $this->contentMinify);\n\t\t$this->contentMinify = str_replace([' ===', '=== '], '===', $this->contentMinify);\n\t}", "title": "" }, { "docid": "4b16a3badbc2cf68d94d2c4d87fcf1df", "score": "0.63051134", "text": "function clear_unassigned_tags() {\n\t\t\n\t\tpreg_match_all(\"/{([A-Z0-9_]*)}/e\", $this->FINAL, $tags);\n\t\tforeach ($tags[0] as $tag) {\n\t\t\t$this->FINAL = str_replace($tag, \"\", $this->FINAL);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e6f7f47b4410ae52e5d77bc68e20b4c4", "score": "0.62872803", "text": "function clear_all_assign()\r\n {\r\n $this->_tpl_vars = array();\r\n }", "title": "" }, { "docid": "658f10138ad64b446488fcee62abdf09", "score": "0.62748647", "text": "function emptyVars() {\r\n\t\t$_SESSION[$this->prefix] = array();\r\n\t\tunset($_SESSION[$this->prefix]);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8499d04d60c2b83583f7870fb6e21f4c", "score": "0.6272318", "text": "public function clearAssignedVars(){\n $this->smarty->clearAllAssign();\n }", "title": "" }, { "docid": "7306cc0573ffb039122c4ec27292adb4", "score": "0.62631494", "text": "private static function _cleanup(){\n\n }", "title": "" }, { "docid": "17e4eca84801bafff3c0a61bae66a9d6", "score": "0.6262244", "text": "private function reset() : void\n {\n $this->userVariableNames = [];\n $this->justCreatedVariableNames = [];\n }", "title": "" }, { "docid": "69981d11aa3a9161528b3e7006d52da3", "score": "0.6260384", "text": "private static function cleanRequest()\n {\n self::processingString($_POST['book']);\n self::processingString($_POST['year']);\n self::processingString($_POST['about']);\n foreach ($_POST['authors'] as &$author) {\n self::processingString($author);\n }\n }", "title": "" }, { "docid": "86acf14773e842e1bacb7218fe419cd3", "score": "0.62387854", "text": "public function restore_variables()\n {\n $this->stack = array();\n $this->end_stack = 0;\n $this->grammar_parent = array();\n $this->grammar_child = array();\n $this->diterima = 0;\n $this->max_loop = 500000;\n $this->key_token = 0;\n $this->end_result = 0;\n $this->list_token = array();\n $this->result = array();\n $this->max_token_success = 0;\n $this->max_count_success = 0;\n }", "title": "" }, { "docid": "5e5be661ce27d3fcd1ee5ca78399cc8b", "score": "0.62014604", "text": "function cleanUpCorseSelection () {\n unset($formVars);\n unset($_SESSION['formVars']);\n unset($_POST);\n}", "title": "" }, { "docid": "4e88ef87b8868f9a961dd35d1d3c4785", "score": "0.6195506", "text": "public static function clean_up()\n {\n }", "title": "" }, { "docid": "a48f228d87406dc4bd970a08977c2faa", "score": "0.6191389", "text": "protected function _cleanup()\n {\n }", "title": "" }, { "docid": "b06c260a0642fbdd7e8bda3c2e80da53", "score": "0.6156991", "text": "private function reset()\n {\n $this->userWords = null;\n $this->userPatterns = null;\n $this->languages = null;\n $this->psm = null;\n }", "title": "" }, { "docid": "2890ca46d968f42a5743df95c42b2afc", "score": "0.61330026", "text": "abstract public function clean();", "title": "" }, { "docid": "2890ca46d968f42a5743df95c42b2afc", "score": "0.61330026", "text": "abstract public function clean();", "title": "" }, { "docid": "1dc195405d24684c89426afba1db1451", "score": "0.60980487", "text": "protected function resetPreVariables()\n\t{\n\t\t$this->nuked = false;\n\t\t$this->OldPre = array();\n\t\t$this->CurPre =\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'md5' => '',\n\t\t\t\t'sha1' => '',\n\t\t\t\t'size' => '',\n\t\t\t\t'predate' => '',\n\t\t\t\t'category' => '',\n\t\t\t\t'source' => '',\n\t\t\t\t'groupid' => '',\n\t\t\t\t'reqid' => '',\n\t\t\t\t'nuked' => '',\n\t\t\t\t'reason' => '',\n\t\t\t\t'files' => ''\n\t\t\t);\n\t}", "title": "" }, { "docid": "0c1b3c2f8eee35fbf40a10ea2837a98a", "score": "0.60955703", "text": "private function unsetMagicConstants()\n {\n unset($this->myReplace['__FILE__']);\n unset($this->myReplace['__ROUTINE__']);\n unset($this->myReplace['__DIR__']);\n unset($this->myReplace['__LINE__']);\n }", "title": "" }, { "docid": "41244d763ea9d732d32e7f2c31adf298", "score": "0.6083911", "text": "private static function resetValues() {\n\n\t\tself::$NAME = null;\n\t\tself::$TITLE = null;\n\t\tself::$NAVIGATIONCAPTION = null;\n\t\tself::$SHORTDESCRIPTION = null;\n\t\tself::$DESCRIPTION = null;\n\t\tself::$COMPANY = null;\n\t\tself::$CONTACTPERSON = null;\n\t\tself::$CONTACTPERSONJOBTITLE = null;\n\t\tself::$ADDRESS = null;\n\t\tself::$PHONE = null;\n\t\tself::$EMAIL = null;\n\t}", "title": "" }, { "docid": "d3971a3884010011e1bd160e4f2506ce", "score": "0.60770315", "text": "protected function _sanitize()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "8c40cb26bd76ce5feebf606637d9aad6", "score": "0.6074775", "text": "public function clean_request_vars() \r\n\t{\r\n\t\tif (!empty($_POST))\r\n\t\t{\r\n\t\t\tforeach($_POST as $k=>$v)\r\n\t\t\t{\r\n\t\t\t\tif(is_array($v))\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($v as $k1=>$v1)\r\n\t\t\t\t {\r\n\t\t\t\t \t$_POST[$k][$k1] = $v1 ? $this->_clean($v1) : null;\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t $_POST[$k] = $v ? $this->_clean($v) : null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!empty($_GET))\r\n\t\t{\r\n\t\t\tforeach($_GET as $k=>$v)\r\n\t\t\t{\r\n\t\t\t\tif($_GET[$k] == '')\r\n\t\t\t\t{\r\n\t\t\t\t\tunset($_GET[$k]);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(is_array($v))\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($v as $k1=>$v1)\r\n\t\t\t\t {\r\n\t\t\t\t \t $_GET[$k][$k1] = $this->_clean($v1);\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t$_GET[$k] = $this->_clean($v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e4dfadec00dff284a0ce8369f406aa08", "score": "0.60615474", "text": "protected function sanitizeGlobals()\n {\n $this->inputArray['get'] = ($this->webConfig->get('allow_get_input') ? $_GET : []);\n $this->inputArray['post'] = $_POST;\n $this->inputArray['cookie'] = $_COOKIE;\n $this->inputArray['server'] = $_SERVER;\n\n // If required to, empty the global arrays\n if ($this->webConfig->get('empty_global_arrays'))\n unset($_GET, $_POST, $_COOKIE, $_SERVER);\n\n // Clean GET\n foreach ($this->inputArray['get'] as $key => $val)\n $this->inputArray[$this->cleanInputKeys($key)] = $this->cleanInputData($val);\n\n // Clean POST\n foreach ($this->inputArray['post'] as $key => $val)\n $this->inputArray[$this->cleanInputKeys($key)] = $this->cleanInputData($val);\n\n // Clean COOKIE\n if (!empty($this->inputArray['cookie']))\n {\n // Get rid of conflicting cookies\n unset(\n $this->inputArray['cookie']['$Version'],\n $this->inputArray['cookie']['$Path'],\n $this->inputArray['cookie']['$Domain']\n );\n\n foreach ($this->inputArray['cookie'] as $key => $val)\n {\n if (($cookie_key = $this->cleanInputKeys($key)) !== false)\n $this->inputArray['cookie'][$cookie_key] = $this->cleanInputData($val);\n else\n unset($this->inputArray['cookie'][$key]);\n }\n }\n\n // Sanitize PHP_SELF\n $this->inputArray['server']['PHP_SELF'] = strip_tags($this->inputArray['server']['PHP_SELF']);\n Logger::logInfo(\"Global variables sanitized\");\n }", "title": "" }, { "docid": "5a54eb568bce711645f66e38edd1b069", "score": "0.6054533", "text": "public static function _SanitizeGlobals() {\n\t\t// It would be \"wrong\" to unset any of these GLOBALS.\n\t\t$arProtected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',\n\t\t\t\t\t\t\t'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',\n\t\t\t\t\t\t\t'system_folder', 'application_folder', 'BM', 'EXT',\n\t\t\t\t\t\t\t'CFG', 'URI', 'RTR', 'OUT', 'IN');\n\n\t\t// Unset globals for securiy.\n\t\t// This is effectively the same as register_globals = off\n\t\tforeach (array($_GET, $_POST, $_COOKIE) as $vGlobal) {\n\t\t\tif (!is_array($vGlobal)) {\n\t\t\t\tif (!in_array($vGlobal, $arProtected)) {\n\t\t\t\t\tglobal $vGlobal;\n\t\t\t\t\t$vGlobal = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($vGlobal as $sKey => $vVal) {\n\t\t\t\t\tif (!in_array($sKey, $arProtected)) {\n\t\t\t\t\t\tglobal $$sKey;\n\t\t\t\t\t\t$$sKey = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Is $_GET data allowed? If not we'll set the $_GET to an empty array\n\t\tif (self::$_AllowGetArray== false) {\n\t\t\t$_GET = array();\n\t\t} else {\n\t\t\tif (is_array($_GET) && count($_GET) > 0) {\n\t\t\t\tforeach ($_GET as $sKey => $vVal) {\n\t\t\t\t\t$_GET[self::_CleanInputKeys($sKey)] = self::_CleanInputData($vVal);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Clean $_POST Data\n\t\tif (is_array($_POST) && count($_POST) > 0) {\n\t\t\tforeach ($_POST as $sKey => $vVal) {\n\t\t\t\t$_POST[self::_CleanInputKeys($sKey)] = self::_CleanInputData($vVal);\n\t\t\t}\n\t\t}\n\n\t\t// Clean $_COOKIE Data\n\t\tif (is_array($_COOKIE) && count($_COOKIE) > 0) {\n\t\t\t// Also get rid of specially treated cookies that might be set by a server\n\t\t\t// or silly application, that are of no use to a CI application anyway\n\t\t\t// but that when present will trip our 'Disallowed Key Characters' alarm\n\t\t\t// http://www.ietf.org/rfc/rfc2109.txt\n\t\t\t// note that the key names below are single quoted strings, and are not PHP variables\n\t\t\tunset($_COOKIE['$Version']);\n\t\t\tunset($_COOKIE['$Path']);\n\t\t\tunset($_COOKIE['$Domain']);\n\n\t\t\tforeach ($_COOKIE as $sKey => $vVal) {\n\t\t\t\t$_COOKIE[self::_CleanInputKeys($sKey)] = self::_CleanInputData($vVal);\n\t\t\t}\n\t\t}\n\n\t\t// Sanitize PHP_SELF\n\t\t$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);\n\n\n\t\t// CSRF Protection check on HTTP requests\n\t\tif (self::$_EnableCSRF == true && !self::IsCliRequest()) {\n CSecurity::CSRFVerify();\n\t\t}\n\n\t\tlog_message('debug', \"Global POST and COOKIE data sanitized\");\n\t}", "title": "" }, { "docid": "02a4da030b4a54296c2fdfaf4011417f", "score": "0.6044114", "text": "public static function clean_cached_data()\n {\n }", "title": "" }, { "docid": "5975a4a7af980549aff345fc5007df75", "score": "0.6038995", "text": "protected function cleanerHook(&$values) {\n $values[4] = $values[4] ?: null; // password\n $values[5] = trim(html_entity_decode($this->purifier->purify($values[5]))); // title\n $values[8] = Markdown::toFormattedMarkdown($values[8]); // description\n $values[10] = $values[10] ?: null; // waypoint\n $values[11] = $values[11] ?: null; // target_lat\n $values[12] = $values[12] ?: null; // target_lon\n $values[13] = $values[13] ?: null; // target_dist\n $values[14] = $values[14] ?: null; // target_caches\n $values[] = $values[1]; // updated_on_datetime\n }", "title": "" }, { "docid": "00d70f3e9ee4f7466f17e359cd56e95f", "score": "0.60263336", "text": "public function clear()\n {\n $this->variables = array();\n }", "title": "" }, { "docid": "3469e3ecbf2cfec0ce3b226eac9cb156", "score": "0.6012532", "text": "public static function globalXssClean()\n\t{\n\t // Recursive cleaning for array [] inputs, not just strings.\n\t $sanitized = static::arrayStripTags(Input::get());\n\t Input::merge($sanitized);\n\t}", "title": "" }, { "docid": "c2d8ef14a491453907c0ec9686e04e6d", "score": "0.6003127", "text": "public static function strip_all()\n\t{\n\t\t$_GET = self::strip($_GET);\n\t\t$_POST = self::strip($_POST);\n\t\t$_COOKIE = self::strip($_COOKIE);\n\t\t$_REQUEST = self::strip($_REQUEST);\n\t}", "title": "" }, { "docid": "87e42eeaf8276eb2fcfc29bc86d77d96", "score": "0.6002504", "text": "private function Cleanup(&$data)\r\n\t{\r\n\t\t#$data['score'] = $this->GetScore($data);\r\n\t}", "title": "" }, { "docid": "25164739873952e84580b866986dfb7d", "score": "0.59705544", "text": "public static function globalXssClean() {\n $sanitized = static::arrayStripTags(\\Input::get());\n \\Input::merge($sanitized);\n }", "title": "" }, { "docid": "c67f9d838eacd45387ebe7b8d42616de", "score": "0.5964587", "text": "public function cleanup(){\n $this->oModInstance = null;\n $this->aCategories = null;\n }", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.595878", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.595878", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.595878", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.595878", "text": "public function clean();", "title": "" }, { "docid": "1252aa22fa47b2125cc615953c23c639", "score": "0.5957076", "text": "public static function clean()\n {\n self::$_js = array();\n }", "title": "" }, { "docid": "827bdef7bd43608453ffd040fda3e55c", "score": "0.5933061", "text": "public function endClean();", "title": "" }, { "docid": "bd76f1d79d78a113ed8648d0db842784", "score": "0.5932182", "text": "public function reset_cleanup()\n {\n }", "title": "" }, { "docid": "9e680f1b2a17774eb305ad83e6915fc2", "score": "0.59266967", "text": "function bum_reset_vars( $vars ) {\n\tfor ( $i=0; $i<count( $vars ); $i += 1 ) {\n\t\t$var = $vars[$i];\n\t\tglobal $$var;\n\n\t\tif ( empty( $_POST[$var] ) ) {\n\t\t\tif ( empty( $_GET[$var] ) )\n\t\t\t\t$$var = '';\n\t\t\telse\n\t\t\t\t$$var = $_GET[$var];\n\t\t} else {\n\t\t\t$$var = $_POST[$var];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ba78251e8376bddf5dcf00acd9e615e7", "score": "0.5909465", "text": "function _clear(){\n\n\t\t\t$this->anti_type = '';\n\t\t\t$this->anti_failed_attempts = 0;\n\t\t\t$this->anti_jail_time = 0;\n\t\t\t$this->recaptcha = '';\n\t\n\t\t}", "title": "" }, { "docid": "3fd9f9de919a1e07a8698a1b534e2f6b", "score": "0.5907122", "text": "public function clearVar();", "title": "" }, { "docid": "59528fd7920d9472f40c74d004e68cb5", "score": "0.58933634", "text": "public function xssCleanAllData()\n\t\t{\n\t\t\tif( is_array($this->data) )\n\t\t\t{\n\t\t\t\tforeach($this->data as $key => $val )\n\t\t\t\t{\n\t\t\t\t\t$val = filter_var(trim($val), FILTER_SANITIZE_STRING);\n\t\t\t\t\t$val = strip_tags($val);\n\t\t\t\t\t$val = htmlspecialchars($val, ENT_QUOTES, 'UTF-8');\n\t\t\t\t\t$val = preg_replace('/\\s\\s+/u', chr(32), $val);\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->xssClean();\n\t\t\t}\n }", "title": "" }, { "docid": "0caa2ec568b1ec42ebb0daf07361ed78", "score": "0.5892458", "text": "private function _reset()\r\n {\r\n $this->_fromLang = '';\r\n $this->_toLang = '';\r\n $this->_text = '';\r\n $this->_translatedText = '';\r\n $this->_postFields = '';\r\n $this->_serviceError = '';\r\n $this->_chunks = 0;\r\n $this->_currentChunk = 0;\r\n $this->_totalChunks = 0;\r\n $this->_detectedSourceLanguage = \"\";\r\n }", "title": "" }, { "docid": "636d62ed0873b0488afe332b4810ffe1", "score": "0.58920395", "text": "function clean_vars($value){\n if(is_array($value)){\n foreach($value as $key => $val) {\n $value[$key] = clean_vars($val);\n }\n }\n else{\n $value= filter_simple_xss($value);\n }\n return $value;\n }", "title": "" }, { "docid": "4247ed923650a47f82765aa29aa59b8b", "score": "0.5881208", "text": "private function makeDataSafe(){\n $this->_username = preg_replace('/[^\\w]+/', '', $this->_username);\n $this->_username = strtolower($this->_username);\n $this->_email = strtolower($this->_email);\n }", "title": "" }, { "docid": "3e56131e7228f71031b2a1a6697790a6", "score": "0.58794326", "text": "public function cleanCache()\n {\n $types = ['layout','block_html','full_page'];\n foreach ($types as $type) {\n $this->cacheTypeList->cleanType($type);\n }\n }", "title": "" }, { "docid": "d6daf33c0eb6c2de1b64871027182bf2", "score": "0.587436", "text": "function clean() {\n\t\t$this->log( \"clean.\" );\n\t}", "title": "" }, { "docid": "0ca43343cb8d7d3ae963c012e277f9bf", "score": "0.58575374", "text": "private function get_replace_vars()\n {\n }", "title": "" }, { "docid": "0ca43343cb8d7d3ae963c012e277f9bf", "score": "0.58575374", "text": "private function get_replace_vars()\n {\n }", "title": "" }, { "docid": "66a5e50f1ffbdf156700397eb5e9fc1b", "score": "0.58557683", "text": "function clean_up_var($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.5852094", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.5852094", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.5852094", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.58518296", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.58518296", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.58518296", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.58518296", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "511af1a3c42a7dd5ae1185475fab3c70", "score": "0.58518296", "text": "protected function cleanup()\n {\n }", "title": "" }, { "docid": "58c05b6a9374a37fc743e689bbee26a0", "score": "0.58507764", "text": "private function cleanup(): void\n {\n $this->effectiveColumnWidths = [];\n unset($this->numberOfColumns);\n }", "title": "" }, { "docid": "95de560ea770e333a09f2271f6ba7755", "score": "0.58504754", "text": "protected static function _reset()\n\t{\n\t\tself::$type='';\n\t\tself::$name='';\n\t\tself::$nameSpace='';\n\t\tself::$value='';\t\t\t\n\t\tself::$attributes=array();\n\t\tself::$innerHtml='';\n\t\tself::$options=array();\n\t\tself::$hasAttributes = false;\n\t\tself::$hasInnerHtml = false;\n\t\tself::$isSelect = false;\n\t\tself::$isCheckboxMulti = false;\n\t\tself::$isDisabled = false;\n\t}", "title": "" }, { "docid": "5ffcfa5c9da2edf7e3f704f17b679e53", "score": "0.5834403", "text": "function clean () {\n\t\treturn $this->engine_instance->clean();\n\t}", "title": "" }, { "docid": "c3344a4a5f7c623dc26104472db45c1a", "score": "0.58343476", "text": "public function cleanUp()\n {\n $this->_context = null;\n $this->_elements = [];\n $this->_objFactory = null;\n }", "title": "" }, { "docid": "012aabbf9be77c0d44ea5ffa1f19c3fd", "score": "0.58334553", "text": "function removeAll()\r\n {\r\n foreach($this->_getObjectVars() as $name => $var)\r\n $this->remove($name);\r\n }", "title": "" }, { "docid": "d745ae52efe1b8b6bd0edd7ac125aafe", "score": "0.5820324", "text": "public function cleanup() {\n $this->object->removeLock();\n $this->clearCache();\n\n $returnArray = $this->object->get(array_diff(array_keys($this->object->_fields), ['content','ta','introtext','description','link_attributes','pagetitle','longtitle','menutitle','articles_container_settings','properties']));\n foreach ($returnArray as $k => $v) {\n if (strpos($k,'tv') === 0) {\n unset($returnArray[$k]);\n }\n if (strpos($k,'setting_') === 0) {\n unset($returnArray[$k]);\n }\n }\n $returnArray['class_key'] = $this->object->get('class_key');\n $this->workingContext->prepare(true);\n $returnArray['preview_url'] = $this->modx->makeUrl($this->object->get('id'), $this->object->get('context_key'), '', 'full');\n return $this->success('',$returnArray);\n }", "title": "" }, { "docid": "a6ee7e94250275bd073bdf15863903e0", "score": "0.58153313", "text": "public function __resetObjVars()\n\t{\n\t\t$this->_tableName\t\t\t\t= \t'';\n\t\t$this->_arrWhereClouseColumns\t=\t[];\n\t\t$this->_getWhereClauseParam\t\t=\t'';\n\t\t$this->_limitParams\t\t\t\t=\t'';\n\t\t$this->_offsetParams\t\t\t=\t'';\n\t\t$this->_arrLimitOffsetData\t\t= \t[];\n\t\t$this->_tablesBinding \t\t\t=\t'';\n\t\t$this->_selectCoumns\t\t\t=\t'*';\n\t\t$this->_arrSetColumns\t\t\t=\t[];\n\t\t$this->_arrSetRowData\t\t\t=\t[];\n\t\t$this->_orderBy\t\t\t\t\t=\t'';\n\t\t$this->_groupBy\t\t\t\t\t=\t'';\n\t\t$this->_having\t\t\t\t\t=\t'';\n\t}", "title": "" }, { "docid": "4325698c182505e2398b94372f0ad8e1", "score": "0.5810027", "text": "function &clean_array_gpc($source, $variables)\n\t{\n\t\t$sg =& $GLOBALS[$this->superglobal_lookup[\"$source\"]];\n\n\t\tforeach ($variables AS $varname => $vartype)\n\t\t{\n\t\t\tif (!isset($this->registry->GPC[\"$varname\"])) // limit variable to only being \"cleaned\" once to avoid potential corruption\n\t\t\t{\n\t\t\t\t$this->registry->GPC_exists[\"$varname\"] = isset($sg[\"$varname\"]);\n\t\t\t\t$this->registry->GPC[\"$varname\"] =& $this->clean(\n\t\t\t\t\t$sg[\"$varname\"],\n\t\t\t\t\t$vartype,\n\t\t\t\t\tisset($sg[\"$varname\"])\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "07becebf8ad8f93a398114d5da0e7ba3", "score": "0.58094054", "text": "function CleanPostAndGet(){\n\t\tforeach($_POST as $key => $val){\n\t\t\tif( !is_array($val) ){\n\t\t\t\t$_POST[$key] = stripslashes(strip_tags(htmlspecialchars($val, ENT_QUOTES)));\n\t\t\t\t$$key = stripslashes(strip_tags(htmlspecialchars($val, ENT_QUOTES)));\n\t\t\t}\n\t\t}\n\t\tforeach($_GET as $key => $val){\n\t\t\t$_GET[$key] = stripslashes(strip_tags(htmlspecialchars($val, ENT_QUOTES)));\n\t\t\t$$key = stripslashes(strip_tags(htmlspecialchars($val, ENT_QUOTES)));\n\t\t}\n\t}", "title": "" }, { "docid": "9a20e0f3c305a31157386287b003bcdf", "score": "0.5803921", "text": "public function cleanForm()\n {\n $_POST['name'] = NULL;\n $_POST['email'] = NULL;\n $_POST['subject'] = NULL;\n $_POST['textarea'] = NULL;\n $_POST['form-captcha-eco'] = NULL;\n }", "title": "" }, { "docid": "cc3f70a30b02b29137f0d222d2d0fcd7", "score": "0.58038783", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('book', 'author', 'saga', 'storage', 'loan');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "a7205199a073fd5d60913111c83bb962", "score": "0.5802358", "text": "public function clean_data(){\n // iterate all attributes wich are set and clean them\n foreach ($this as $key => $value) {\n if(empty($value)){\n continue;\n }\n $this->$key = htmlspecialchars($value); //convert special chars into corresponding HTML codes\n }\n }", "title": "" }, { "docid": "eae629a627464eb2795aa8cb34fa5ca1", "score": "0.58003837", "text": "protected function prepareVariable()\n {\n /** Init cache key */\n $this->cached_configuration_name = strtolower(str_replace('{ACTION}', $this->action, str_replace('{MODULE}', $this->getModuleName(), $this->cached_configuration_name)));\n $this->cached_filter_form_object_name = strtolower(str_replace('{ACTION}', $this->action, str_replace('{MODULE}', $this->getModuleName(), $this->cached_filter_form_object_name)));\n }", "title": "" }, { "docid": "cc3a9829e1b3c5e749cae4bf404df7b2", "score": "0.57923394", "text": "public function fixedVariables() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "76e09bf140afea14ca539e25f3bfcce0", "score": "0.5791984", "text": "abstract protected function cleanData() : void;", "title": "" }, { "docid": "4106af2a044ac18fb76fbe84faeecdc3", "score": "0.57919145", "text": "protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\t// loop through properties to pull out keys and values\n\t\tforeach ($this->properties() as $key => $value) {\n\t\t\t$clean_properties[$key] = $database->escape_string($value);\n\t\t}\n\t\treturn $clean_properties;\n\t}", "title": "" }, { "docid": "32af14ec19efd3edcad1dc5c30fe6e88", "score": "0.57910717", "text": "private function clear_values() {\n\t\t\n\t\t// pull post values\n\t\t$this->certificate_amount_id = '';\n\t\t$this->quantity = '';\n\t\t$this->certificate_id = '';\n\t\t$this->action = '';\n\t\t\n\t\t// set cart variables\n\t\t$this->count_cart_contents();\n\t\t$this->cart_sub_total();\n\t\t$this->cart_savings_total();\n\t\t$_SESSION['cart_contents'] = $this->contents;\n\t}", "title": "" }, { "docid": "0737931e001db3c0cd01c9583c9f4fca", "score": "0.5788416", "text": "public function reset()\n {\n ini_set('display_errors', '0');\n error_reporting(E_ALL);\n\n ini_set('zend.assertions', '1');\n ini_set('assert.exception', '1');\n\n $this->patchGlobals($this->prepareGlobalForRetrieval($this->globals));\n $_ENV = $this->prepareGlobalForRetrieval($this->env);\n $_GET = $this->prepareGlobalForRetrieval($this->get);\n $_POST = $this->prepareGlobalForRetrieval($this->post);\n $_COOKIE = $this->prepareGlobalForRetrieval($this->cookie);\n $_SERVER = $this->prepareGlobalForRetrieval($this->server);\n $_SESSION = $this->prepareGlobalForRetrieval($this->session);\n $_FILES = $this->prepareGlobalForRetrieval($this->files);\n $_REQUEST = $this->prepareGlobalForRetrieval($this->request);\n }", "title": "" }, { "docid": "f6c901c985852072a34ff2408d5008fc", "score": "0.5785642", "text": "private function clearSolution()\n\t{\n\t\t$this->RXValue = array();\n\t\t$this->RYValue = array();\n\t}", "title": "" }, { "docid": "9a3fac10dcb853f4c26718e40e9855a2", "score": "0.57780826", "text": "private function reset()\r\n\t\t\t {\r\n\t\t\t $this->varDefaultValue = false;\r\n\t\t\t $this->varSwitch = false;\r\n\t\t\t }", "title": "" }, { "docid": "06393f3b74f92a7fb60cbb5b919b4730", "score": "0.5774975", "text": "function _unsetData() {\n\t\tunset($this->title);\n\t\tunset($this->creators);\n\t\tunset($this->subjects);\n\t\tunset($this->abstract);\n\t\tunset($this->publisher);\n\t\tunset($this->contributors);\n\t\tunset($this->datePublished);\n\t\tunset($this->types);\n\t\tunset($this->formats);\n\t\tunset($this->identifier);\n\t\tunset($this->sources);\n\t\tunset($this->language);\n\t\tunset($this->relations);\n\t\tunset($this->galleyURLs);\n\t\tunset($this->suppFileURLs);\n\t\tunset($this->copyright);\n\t}", "title": "" }, { "docid": "e242d760464888877647ae97f5fcc5ce", "score": "0.5774612", "text": "private function remove_junk() : void {\n\t\t$filter_func = function ( string $item ) : bool {\n\t\t\treturn preg_match( '/^(?:um[-_]|learndash|sfwd|select2)/', $item );\n\t\t};\n\t\twp_dequeue_style( array_filter( wp_styles()->queue, $filter_func ) );\n\t\twp_dequeue_script( array_filter( wp_scripts()->queue, $filter_func ) );\n\t}", "title": "" }, { "docid": "dc31283f7b7148273c701e49456f5252", "score": "0.5773038", "text": "private static function canonicalize()\r\n {\r\n $allow = [\r\n '_GET' => 1, '_POST' => 1, '_FILES' => 1, '_COOKIE' => 1,\r\n '_SERVER' => 1, '_SESSION' => 1, '_REQUEST' => 1,\r\n 'GLOBALS' => 1, '_ENV' => 1,\r\n ];\r\n\r\n foreach ($GLOBALS as $key => $val) {\r\n if (!isset($allow[$key]))\r\n unset($GLOBALS[$key]);\r\n }\r\n\r\n $trim = function (& $gpc) use (& $trim) {\r\n foreach ($gpc as & $r)\r\n is_array($r) ? $trim($r) : ($r = trim($r));\r\n };\r\n\r\n foreach ($GLOBALS as $key => $val) {\r\n if ('_GET' == $key || '_POST' == $key || '_COOKIE' == $key || '_REQUEST' == $key)\r\n $trim($GLOBALS[$key]);\r\n }\r\n }", "title": "" }, { "docid": "6b9850212767fd24470d0c9acdb43f38", "score": "0.57668877", "text": "function liberatid_cleanup() {\n\t$store =& liberatid_getStore();\n\t$store->cleanupNonces();\n\t$store->cleanupAssociations();\n}", "title": "" }, { "docid": "ef414c1bc9083e86f0e5bb445d8efff5", "score": "0.57650983", "text": "public function cleanup()\n {\n // Remove old parts without binaries \n $this->removePartsWithoutBinary();\n \n // Remove parts where the binary is missing\n $this->removePartsWithMissingBinary();\n }", "title": "" }, { "docid": "9fc4cb54ecc3c2648dac99ac29f66625", "score": "0.5764023", "text": "function _post_clean() {\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "5c872caf293032ea85f3bea483836ea4", "score": "0.0", "text": "public function index()\n {\n $coches = $this->repository->all(['marca']);\n return view('coche.index')->with('coches', $coches);\n }", "title": "" } ]
[ { "docid": "1d35b0b22ac44c3da96756e129561d1e", "score": "0.7596873", "text": "protected function listAction()\n {\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n return $this->render('@EasyAdmin/list.html.twig', array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'view' => 'list',\n ));\n }", "title": "" }, { "docid": "0da19d65b0ae22a9a9aea8c7d8f9691e", "score": "0.74184996", "text": "public function listAction()\n { $resources = $this->fetchResourcesAndIiifUrls();\n if (!count($resources)) {\n return $this->jsonError(new NotFoundException, \\Laminas\\Http\\Response::STATUS_CODE_404);\n }\n\n $query = $this->params()->fromQuery();\n $version = $this->requestedVersion();\n $currentUrl = $this->url()->fromRoute(null, [], ['query' => $query, 'force_canonical' => true], true);\n\n $iiifCollectionList = $this->viewHelpers()->get('iiifCollectionList');\n try {\n $manifest = $iiifCollectionList($resources, $version, $currentUrl);\n } catch (\\IiifServer\\Iiif\\Exception\\RuntimeException $e) {\n return $this->jsonError($e, \\Laminas\\Http\\Response::STATUS_CODE_400);\n }\n\n return $this->iiifJsonLd($manifest, $version);\n }", "title": "" }, { "docid": "7f885ee63d7fde5e395eeff7eff36f82", "score": "0.7408405", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "5312faff5fa7125f9c939e21e4cc3413", "score": "0.72905934", "text": "public function listAction() {\n // Handle saving of a create/edit first, so it will reflect in the list\n $this->handleSave();\n\n // Process list now\n $this->headings = $this->getListHeadings();\n\n $rows = array();\n if ($this->module) {\n $res = $this->_getApi()->getList($this->module);\n $rows = $this->getListRows($res);\n }\n\n $this->rows = $rows;\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.71218187", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "da70bb19a6c8e0562a0e54373a840197", "score": "0.7119305", "text": "public function index()\n {\n $list = $this->resouce->listResource();\n $tree = Helper::menuTree($list, true);\n $list = Helper::multiArrayToOne($tree);\n $this->setResponse($list);\n return $this->response();\n }", "title": "" }, { "docid": "3ebc7b4fb8651186fc87d5fb5cb8b455", "score": "0.7118158", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VMBResourceBundle:Resource')->findAllByDate();\n\n return $this->render('VMBResourceBundle:Resource:index.html.twig', array(\n 'mainTitle' => $this->get('translator')->trans('resource.browse'),\n\t\t\t'addButtonUrl' => $this->generateUrl('resource_new'),\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "405b6604e6bba890cbf7539c671390f5", "score": "0.70995116", "text": "public function list() {\n return $this->render(\"/sandwich/list.html.twig\");\n }", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.7087527", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "abe6de6ae60572e5912b850a19d1d680", "score": "0.7037733", "text": "public function actionIndex()\r\n {\r\n $searchModel = new ResourceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "6151a50f557e88b87eb8f70be8393002", "score": "0.7028584", "text": "public function index()\n\t{\n\t\t$resources = Resource::latest()->get();\n\t\treturn view('admin.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "6ebebdc63fae4da7ebeb3b9b7f417cd2", "score": "0.7014356", "text": "public function list()\n\t\t{\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM cars\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "title": "" }, { "docid": "f92d52acde121c57bdf5619d33199871", "score": "0.69987994", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "613162e5b8bb35685ca245a33b184f09", "score": "0.6918154", "text": "public function index()\n {\n $is_paginated = $this->request->query(\\Config::get('resource.type','resource-type'),'paginated') != 'collection';\n $result = $is_paginated ? $this->_indexPaginate() : $this->_indexCollection() ;\n\n $meta = $this->getMeta($this->resource,$result);\n\n return response()->resource($result,$this->getTransformer(),[ 'message' => $this->getMessage('index'), 'meta' => $meta ]);\n }", "title": "" }, { "docid": "79739617940af1c1c53e8d6ecec053f2", "score": "0.69099164", "text": "public function listAction()\n {\n $this->view->pageTitle = \"Document List\";\n \n $service = new App_Service_DocumentService();\n $this->view->docs = $service->getDocuments();\n \n $this->setPartial();\n }", "title": "" }, { "docid": "adb2cfce1206f7acf8cb4580fd08df71", "score": "0.6909121", "text": "public function index()\n {\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "ce9698986cea138f641a36279605e7e0", "score": "0.6898258", "text": "public function index()\n {\n return InfoResource::collection(Resource::paginate(30));\n }", "title": "" }, { "docid": "35b022b0a4b421fcb5624635dcd9fe8f", "score": "0.6869782", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oDocModel = new model_doc();\n\t\t$tDocs = $oDocModel->findAll();\n\n\t\t$oView = new _view('docs::list');\n\t\t$oView->tDocs = $tDocs;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "30eced964887c2aef75a368b0de6cca4", "score": "0.683872", "text": "public function index()\n\t{\n // Set the sistema locale configuration.\n $this->set_locale();\n \n\t\t$this->_template(\"{$this->_controller}/list\", $this->_get_assets('list', $this->data));\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a050363540859438f2bfba3e253e49b6", "score": "0.6825998", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "2e1081176934c84955413f91a6d6b5aa", "score": "0.6822386", "text": "public function index()\n\t{\n\t\t$listings = $this->listing->all();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "e39e490f9dd6d2633e939500f416862a", "score": "0.68211234", "text": "protected function listAction()\n {\n return $this->renderForm('list');\n }", "title": "" }, { "docid": "06d2b70f0a929084bcd3d1ce8021741e", "score": "0.6812034", "text": "public function index()\n {\n $resource = Resource::leftjoin('categories', 'resources.resource_category_id', '=', 'categories.category_id')\n ->leftjoin('sub_categories', 'resources.resource_sub_category_id', '=', 'sub_categories.sub_category_id')\n ->leftjoin('sources', 'resources.resource_source_id', '=', 'sources.source_id')\n ->leftjoin('authors', 'resources.resource_author_id', '=', 'authors.author_id')\n ->orderBy('resources.created_at', 'desc')->get();\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.index', $view_data);\n }", "title": "" }, { "docid": "a07e724e196f9b0fd9d1230bd447f5bf", "score": "0.68106884", "text": "public function index()\n {\n return view('backend.resource.index');\n }", "title": "" }, { "docid": "620b35ada66373ffe1f703e36235dc33", "score": "0.68044376", "text": "public function listAction() {\n\t\t$all = $this->users->findAll();\n\t\t$this->views->add('users/list-all', [\n\t\t\t\t'users' => $all, \n\t\t\t\t'title' => \"Visa alla användare\"\n\t\t\t]);\n\t}", "title": "" }, { "docid": "aa8d3c35a6d3df3c02417b793ad19e32", "score": "0.6799941", "text": "public function actionList() {\r\n\t\t$model = $this->model;\r\n\t\t$items = $model->doList($this->paramsArray);\r\n\t\t$fields = true;\r\n\t\tif (isset($this->paramsArray['fields'])) {\r\n\t\t\t$fields = $this->paramsArray['fields'];\r\n\t\t}\r\n\t\t$itemsAr = ActiveRecord::makeArray($items, $fields);\r\n\t\t$this->respond(200, array(\"result\"=>$itemsAr, \"timestamp\"=>time()));\r\n\t}", "title": "" }, { "docid": "796201f21ca0c2d35a132ef98fbfa143", "score": "0.6793618", "text": "public function listAction()\n {\n $this->init(); // TODO: create a controller listener to call it automatically\n\n $polls = $this->pollEntityRepository->findBy(\n array('published' => true, 'closed' => false),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('PrismPollBundle:Frontend\\Poll:list.html.twig', array(\n 'polls' => $polls\n ));\n }", "title": "" }, { "docid": "09027ea66bbe9d5f56484038f519de35", "score": "0.6787082", "text": "public function index()\n {\n return view('visitor.resources.index', [\n 'resources' => $this->resourceService->all()\n ]);\n }", "title": "" }, { "docid": "1b9b93c758b801d7f44b3b35dcb70a84", "score": "0.67787373", "text": "public function index()\n {\n return RedResponse::success(Todo::getListWithPage($this->requestObj));\n }", "title": "" }, { "docid": "06886aeb949a8582132f62e7cd3ac34f", "score": "0.677748", "text": "public function actionList()\n {\n $data=array();\n $looks = new Looks('search');\n $looks->unsetAttributes();\n if ( isset($_GET['Looks']) ) {\n $looks->attributes = $_GET['Looks'];\n }\n \n \t\t$users_all = Users::model()->findAll(\"status=:status\", array(':status'=>Users::STATUS_PUBLISH));\n \t\t$data['users'] = CHtml::listData($users_all, 'id', 'fullNameWithId');\n\n \n $this->render('list', array(\n 'model' => $looks,\n 'data'=>$data,\n )); \n }", "title": "" }, { "docid": "f8555ba3dc23008cd0a0c16a4559a6f8", "score": "0.67767936", "text": "public function showAll() {\n echo json_encode([\"MSG\" => $this->rest->showAll(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "989e888f453ad4e6aca439789fa4e466", "score": "0.6764753", "text": "public function actionList()\n {\n\t\t//$client->connect();\n\t\t\n\t $request = Yii::$app->request;\n\n\t $page = (!empty($request->get('page'))) ? $request->get('page') : 1;\n\n\t $blogService = new BlogService();\n\t $result = $blogService->getList($page);\n\n\t $pages = new Pagination(['totalCount' => $result['total']]);\n\n return $this->render('list', [\n 'models' => $result['blogs'],\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "39872964f7d5564e8285c3a9fe12f919", "score": "0.67504454", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $per_page = 10;\n $page = $this->getPaginationPage();\n \n if (!$this->active_category->isNew()) {\n list($files, $pagination) = Files::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($files, $pagination) = Files::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'files' => $files,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'files', 'files'),\n 'pagination_url' => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "92aaa491ca5099382123536e546b9aa3", "score": "0.67480475", "text": "public function listAction()\n {\n $article_manager = $this->getDI()->get(\n 'core_article_manager'\n );\n \n // Sisipkan hasil query/find ke dalam variabel articles\n // Secara default, view yang dipanggil adalah Views/Default/article/list.volt\n $this->view->articles = $article_manager->find();\n }", "title": "" }, { "docid": "782e995121f434d308103646571fa51f", "score": "0.6743787", "text": "public function index()\n {\n return Resource::with('location')\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "b9bc7c6f98f5ba96d276b3ad631acd74", "score": "0.67292553", "text": "public function index()\n {\n $statuses = Status::paginate(10);\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "244a81dd1c2b337ec541d21216bf2674", "score": "0.67227656", "text": "public function index(Request $request)\n {\n $this->authorize('list', $this->resourceType);\n\n $search = $request->get('q');\n $order = $request->get('order');\n\n $resources = $this->getRepository()->index($search, $order);\n\n return $this->view('index')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('resources', $resources);\n }", "title": "" }, { "docid": "df0d6207611fb7003570319e39a4393e", "score": "0.67204595", "text": "public function index()\n {\n $data = Product::paginate(10);\n\t\treturn ProductResource::Collection($data);\n }", "title": "" }, { "docid": "0d8a9aedf606052ab1459ef7661d1186", "score": "0.6716726", "text": "public function index()\n {\n return ItemResource::collection($this->item->list());\n }", "title": "" }, { "docid": "0d159b9b5426dcb31868b3e360075031", "score": "0.6715198", "text": "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\t$title = $this->getInput('title');\n\t\t$status = intval($this->getInput('status'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($title) {\n\t\t\t$search['title'] = $title;\n\t\t\t$params['title'] = array('LIKE', $title);\n\t\t}\n\t\tif($status) {\n\t\t\t$search['status'] = $status;\n\t\t\t$params['status'] = $status - 1;\n\t\t}\n\t\t$params['ad_type'] = $this->ad_type;\n\t list($total, $ads) = Client_Service_Ad::getCanUseAds($page, $perpage, $params);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('ads', $ads);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign(\"total\", $total);\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": "1c447ea38f47ee196c9862f06d62be13", "score": "0.66989833", "text": "public function index() {\n // Get all records\n $inventories = Inventory::all();\n // Return a list of inventories as a resource\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "8232f091751d390d26007fa44c243d15", "score": "0.66985327", "text": "public function ListView()\r\n\t{\r\n\t\t$this->Render();\r\n\t}", "title": "" }, { "docid": "b4a4bae274dd96e096b8b4dd55f07244", "score": "0.6691387", "text": "public function index()\n {\n $listInventory = DB::table('inventory')\n ->join('loker', function ($join) {\n $join->on('inventory.id', '=', 'loker.inventory_id')\n ->where('inventory.status_id', 1);\n })->select('*')->get();\n\n // $listInventory = Inventory::all();\n\n return $this->sendResponse(InventoryResource::collection($listInventory), 'List inventory retrieved successfully.');\n\n // return response(['listInventory' => InventoryResource::collection($listInventory), 'message' => 'Retrieved successfully'], 200);\n\n // return response()->json([\n // 'success' => true,\n // 'message' => 'Inventory List',\n // 'data' => $listInventory\n // ]);\n }", "title": "" }, { "docid": "d22f89e9d6b27f65524503cb66269ec3", "score": "0.6684074", "text": "public function index()\n {\n return StudentResource::collection(Student::paginate());\n }", "title": "" }, { "docid": "d6319a190b91d60006c656ee0a40d758", "score": "0.66839117", "text": "public function index()\n {\n $recipes = Recipe::all();\n return RecipeResource::collection($recipes);\n }", "title": "" }, { "docid": "8c7eaa14947e3fc2a24fd3541c974e98", "score": "0.6681884", "text": "function Index()\r\n\t\t{\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data[num_rows] = $parameters[num_rows];\r\n\t\t}", "title": "" }, { "docid": "dc37386e4ee63037decda6f08247fdd5", "score": "0.6672321", "text": "public function listAction() {\n $id = $this->_getParam('id', null);\n \n $this->view->listname = $id;\n $this->view->tasks = $this->service->getTasksFromList($id);\n }", "title": "" }, { "docid": "145c8599914d7576e7404163ccf8b519", "score": "0.66572666", "text": "public function index()\n {\n $this->data['action_name'] = 'List';\n $this->data['rows'] = $this->crud_model::all();\n return view($this->crud_view . '.index', $this->data);\n }", "title": "" }, { "docid": "0fb116b141476b8f916bb11b2f5f58d7", "score": "0.6649448", "text": "public function index()\n {\n $items = Item::paginate();\n\n return $this->sendResponse(new ItemsCollection($items), 'Items retrieved successfully.');\n }", "title": "" }, { "docid": "e3a22916f65a2ec228b5e3965c154843", "score": "0.6648183", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(20));\n }", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.6647199", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "22d91bbe1074dab71958a7841af08295", "score": "0.6643972", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Sparepart - '.APP_NAME;\n $this->global['pageMenu'] = 'List Sparepart';\n $this->global['contentHeader'] = 'List Sparepart';\n $this->global['contentTitle'] = 'List Sparepart';\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": "076caa2f864fc2268b0d4d47a19486ab", "score": "0.66425085", "text": "public function index()\n {\n return ProductResource::collection(\n Product::paginate(10)\n );\n }", "title": "" }, { "docid": "de506437ae33a70184040846dd276c78", "score": "0.66416246", "text": "public function index(Request $request)\n {\n $this->authorize('viewList', $this->getResourceModel());\n\n $paginatorData = [];\n $perPage = (int) $request->input('per_page', '');\n $perPage = (is_numeric($perPage) && $perPage > 0 && $perPage <= 100) ? $perPage : 15;\n if ($perPage != 15) {\n $paginatorData['per_page'] = $perPage;\n }\n $search = trim($request->input('search', ''));\n if (! empty($search)) {\n $paginatorData['search'] = $search;\n }\n $records = $this->getSearchRecords($request, $perPage, $search);\n $records->appends($paginatorData);\n\n return view($this->filterIndexView('_resources.index'), $this->filterSearchViewData($request, [\n 'records' => $records,\n 'search' => $search,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n 'perPage' => $perPage,\n ]));\n }", "title": "" }, { "docid": "30e45406c5ee243e6ad94d1aa4cbe67f", "score": "0.66305417", "text": "public function listAction()\n {\n $this->_helper->viewRenderer->setViewSuffix('txt');\n\n $model = new Default_Model_Action();\n $this->view->actions = $model->getAll();\n }", "title": "" }, { "docid": "d0295a3d33fcd89a347becc0a34dbe5c", "score": "0.6626129", "text": "public function index()\n {\n $specializations = Specialization::latest()->paginate(25);\n\n return SpecializationResource::collection($specializations);\n }", "title": "" }, { "docid": "25325ea5baf58fda0bdae7e51324bdd3", "score": "0.6625245", "text": "public function index()\n {\n //get tasks\n $tasks = Task::orderBy('id', 'asc')->paginate(100);\n\n //return the collection of tasks as a resource\n return TaskResource::collection($tasks);\n\n }", "title": "" }, { "docid": "0b40c32743cbb461753992a4b05fa545", "score": "0.662055", "text": "public function showlist()\n \t{\n \t\t$items = Item::all();\n \t\treturn view('item.list',array('items'=>$items,'page'=>'list'));\n \t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.66002595", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "5071a61b8379d3dbc27c9379480e9a8c", "score": "0.6599687", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int)$this->param($this->view->translate('page'), 1);\n $propertyId = (int)$this->param($this->view->translate('propertyId'));\n $properties =$this->service\n ->retrieveAllPicturesByPropertyId($propertyId, $page);\n $this->view->pictures = $properties;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->propertyId = $propertyId;\n }", "title": "" }, { "docid": "8aabf1b98b72ec9ef7738f5deae5172d", "score": "0.65963185", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n //return AnswersResource::collection(Answer::all());\n }", "title": "" }, { "docid": "726d3e7e355e4d0b3bbadd1f2237a742", "score": "0.65945095", "text": "public function overviewAction()\n\t{\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_Vacancy_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "110b54105de1a0ec45cec206dbc35c67", "score": "0.65845126", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return TaskListResource::collection(Task::all());\n }", "title": "" }, { "docid": "8668ccc17814e06acdd730ecc3fa0dd2", "score": "0.65773076", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Activity_Service_Fanli::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "b81dd94e271b0c84cd548a81ec7d984f", "score": "0.6575219", "text": "public function listAction()\n {\n if ($this->settings['listtype'] === 'x') {\n $projects = $this->projectRepostitory->findAll();\n } else {\n $projects = $this->projectRepostitory->findByStatus($this->settings['listtype']);\n }\n\n $this->view->assign('projects', $projects);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "bf0537679d083764e7d496b7e9f333b7", "score": "0.6550873", "text": "public function index(): View\n {\n $items = QueryBuilder::for(Resource::class)\n ->allowedFilters([\n 'name',\n 'is_facility',\n 'categories.id',\n 'groups.id',\n AllowedFilter::scope('flags', 'currentStatus'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n $filterCategories = Category::orderBy('name')->pluck('name', 'id');\n $filterGroups = Group::orderBy('name')->pluck('name', 'id');\n $filterFlags = Flag::pluck('name', 'abbr');\n\n return view('resources.index')->with(compact([\n 'items',\n 'filterCategories',\n 'filterGroups',\n 'filterFlags',\n ]));\n }", "title": "" }, { "docid": "3cf2644fce763701f59cab74b93915e2", "score": "0.6540747", "text": "public function indexAction() {\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\n\t\t$list = new List8D_Model_List;\n\t\t$list = $list->getById(1);\n\t\t\n\t\t$acl = new List8D_ACL;\n\t\t$this->view->list = $list;\n\t\t$this->view->aclresult = $acl->checkListACL($list);\n\n\t}", "title": "" }, { "docid": "ed961c9f0fcb9ad07a48b882d9df24ad", "score": "0.65403396", "text": "public function index()\n\t{\n\t\t$subResourceDetailLikes = $this->subResourceDetailLikeRepository->paginate(10);\n\n\t\treturn view('subResourceDetailLikes.index')\n\t\t\t->with('subResourceDetailLikes', $subResourceDetailLikes);\n\t}", "title": "" }, { "docid": "f1ecf3ea6ca691d8230bfd5de1a0c2bc", "score": "0.6537993", "text": "public function index()\n\t{\n\t\t$view = $this->start_view($this->section_url.'/be/list');\n\t\t\n\t\t// Type\n\t\tif($this->input->get('type') !== false && array_key_exists($this->input->get('type'),Kohana::config('example_3.types'))){\n\t\t\t$type = $this->input->get('type');\n\t\t} else {\n\t\t\t$type = 1;\n\t\t}\n\t\t\n\t\tlist($pagination, $data) = $this->list_data($type);\n\t\t\n\t\t$view->set_global('data', $data);\n\t\t$view->set_global('pagination', $pagination);\n\t\t\n\t\t// Set general info\n\t\t$view->set_global($this->section_details());\n\t\t\n\t\t// Type tab override\n\t\t$view->set_global('active_tab',$type);\n\t\t\n\t\t// Set Breadcrumb items\n\t\t$view->breadcrumbs = array(\n\t\t\t$this->section_url => $this->section_name,\n\t\t\t'' => 'Listing'\n\t\t);\n\t\t\n\t\t$this->render_view($view);\n\t}", "title": "" }, { "docid": "14cbe87d366063edc7062faf79058bc0", "score": "0.6533205", "text": "public function index()\n {\n return $this->response->paginator(Viewer::orderBy('id', 'desc')->paginate(10), new ViewerTransformer);\n }", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.6532911", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f1673a17c984cf24b6d574aa7a325e35", "score": "0.65327483", "text": "public function index()\n {\n return FlightResource::collection(Flight::paginate(15));\n }", "title": "" }, { "docid": "eb4bc3428c5096a035b8d71351d4f9c3", "score": "0.6529615", "text": "public function index()\n {\n //\n $units = Unit::paginate(10);\n return UnitResource::collection($units);\n }", "title": "" }, { "docid": "1e991a3059ff8a7aa8b4543e6d5ec071", "score": "0.652604", "text": "public function index()\n {\n $data['resources'] = CarModel::paginate($this->paginate_by);\n return view($this->base_view_path.'index', $data);\n }", "title": "" }, { "docid": "0aefb1879ed86536b4b0301bdcb431fb", "score": "0.65217865", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif ($ad_type) $search['ad_type'] = $ad_type;\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "title": "" }, { "docid": "f504aa8b0d4e26dbe40f10d29efd07da", "score": "0.6520624", "text": "public function index()\n {\n return $this->collection(\n $this->repository->all()\n );\n }", "title": "" }, { "docid": "84219766af32e7ff206e88dffca57430", "score": "0.65162116", "text": "public function index()\n {\n try {\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($this->categoryService->getAll()));\n } catch (Throwable $th) {\n Log::info($th);\n return $this->resp->guessResponse(eRespCode::_500_INTERNAL_ERROR);\n }\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.65154237", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "e1183ebde99a8d3c589ddd34164e88f0", "score": "0.65118366", "text": "public function index() {\n\t\t$this->all();\n\t}", "title": "" }, { "docid": "93a7ba35330c263ce449589f25157263", "score": "0.65116036", "text": "public function index()\n {\n $todos = Todo::latest()->get();\n return (new TodoResourceCollection($todos));\n }", "title": "" }, { "docid": "2277c0665c4148cb55e2e8ca37774962", "score": "0.6510777", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(20));\n }", "title": "" }, { "docid": "b04a0cb3fd073d7067244a0fe69ce396", "score": "0.65095365", "text": "public function index()\n {\n //get movies\n $movies = MoviesModel::paginate(10);\n\n //return collection of article as a resource\n return MoviesResource::collection($movies);\n }", "title": "" }, { "docid": "021eb06ebdab9fb37e6b65a67751a381", "score": "0.64975077", "text": "public function listData()\n {\n $catalog = DB::table($this->screen)->where('IsActive', '1')->paginate(15);\n\n $data['catalog'] = $catalog;\n return view('catalog.index', $data);\n }", "title": "" }, { "docid": "cbfc279e9e82aba8cb2814815737b9eb", "score": "0.64964104", "text": "public function listAction() {\n $users = $this->userRepository->findAll();\n $this->view->assign('users', $users);\n $this->view->render();\n }", "title": "" }, { "docid": "c0ac6b16fca466eabec5fae9f571583e", "score": "0.64929396", "text": "public function actionList() {\n\t\t$id = isset($_GET['id'])? $_GET['id'] : 'all';\n\n\t\tif(is_numeric($id))\n\t\t\t$list = CActiveRecord::model('X2List')->findByPk($id);\n\t\t\t\n\t\tif(isset($list)) {\n\t\t\t$model = new Contacts('search');\n\t\t\t$model->setRememberScenario('contacts-list-'.$id);\n\t\t\t//set this as the list we are viewing, for use by vcr controls\n\t\t\tYii::app()->user->setState('contacts-list', $id);\n\t\t\t$dataProvider = $model->searchList($id);\n\t\t\t$list->count = $dataProvider->totalItemCount;\n\t\t\t$list->save();\n\t\t\t\n\t\t\t$this->render('list',array(\n\t\t\t\t'listModel'=>$list,\n\t\t\t\t// 'listName'=>$list->name,\n\t\t\t\t// 'listId'=>$id,\n\t\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t\t'model'=>$model,\n\t\t\t));\n\t\t\t\n\t\t} else {\n\t\t\tif($id == 'my')\n\t\t\t\t$this->redirect(array('/contacts/myContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telseif($id == 'new')\n\t\t\t\t$this->redirect(array('/contacts/newContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telse\n\t\t\t\t$this->redirect(array('/contacts/allContacts'));\n\t\t}\n\t}", "title": "" }, { "docid": "005629388e14797f6fdbc0ea8785e7ac", "score": "0.64864695", "text": "public function index()\n {\n $Products = products::orderby('created_at','desc')->paginate(40);\n return ProductsResource::collection($Products);\n }", "title": "" }, { "docid": "3e2e5ecfe76abe9cd2482096fab1fab6", "score": "0.64849615", "text": "public function index()\n {\n //\n $response = $this->rest->all();\n return $this->response(\n \"Menus Successfully Fetched.\",\n $response,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "837955b2fe169580b5216e269f283ee3", "score": "0.64833194", "text": "public function listAction()\n {\n $data = $this->getDm()->getRepository('AcmeDemoBundle:Widget')->findAll();\n $widgets = array();\n foreach($data as $v) {\n $widgets[] = $v;\n }\n\n $view = View::create(array('vendors' => $widgets));\n $view->setTemplate('AcmeDemoBundle:Widgets:list.html.twig');\n $view->setData(array('widgets' => $widgets));\n\n return $this->get('fos_rest.view_handler')->handle($view); \n }", "title": "" } ]
44952f481d55be982486fd0bb715dd1d
Checks if emails have similar characters based on percentage of similarity in this case 97%
[ { "docid": "c167a3a82e77e0e6a3e3ebec71c65acd", "score": "0.63738513", "text": "function compares($sub, $unSub){\r\n\r\n\tsimilar_text($unSub, $sub, $percent);\r\n\r\n\tif($percent < 97){\r\n\t\treturn 1;\r\n\t}\r\n\telse {\r\n\t\treturn 0;\t\r\n\t}\r\n}", "title": "" } ]
[ { "docid": "825b2a7675877d6732a1b7ee0b8bf646", "score": "0.610799", "text": "public static function similarity($str1, $str2)\n { \n\t \t\t \n $lenStr1 = strlen($str1);\n $lenStr2 = strlen($str2);\n \n if ($lenStr1 == 0 && $lenStr2 == 0)\n return 100;\n \n $distance = self::distance($str1, $str2);\n $similarity = 100 - (int)round(200 * $distance / ($lenStr1 + $lenStr2));\n return $similarity >= 100 ? 100 : $similarity;\n }", "title": "" }, { "docid": "144cf3837c43c22fa70a35d56881c034", "score": "0.6102614", "text": "function similarEmails($email)\n{\n $email = normalizarEmail($email); \n //checar se o que foi digitado é um email\n $email_sanatized = filter_var($email, FILTER_SANITIZE_EMAIL);\n if (!filter_var($email_sanatized, FILTER_VALIDATE_EMAIL)) { \n $dados = array(\n 'error_mx' => false,\n 'email_digitado' => $email,\n 'email_valido' => false,\n 'email_sugerido' => false \n );\n return json_encode($dados);\n exit;\n } \n //pegar o servidor do email\n $explode_email = explode('@',$email);\n $servidor_email = strtolower($explode_email[1]); \n\n $listar_servers_emails = serverLists();\n $valid = true;\n\n if(!(in_array($servidor_email,$listar_servers_emails)))\n {\n $valid = false;\n //checar similaridade de termos\n $forcar_array = [];\n foreach($listar_servers_emails as $server){\n $similaridade = similar_text($servidor_email,$server);\n $forcar_array2 = array(\n 'error_mx' => false,\n 'email_informado' => $servidor_email,\n 'servidor' => $server,\n 'similaridade' => $similaridade\n ); \n array_push($forcar_array,$forcar_array2); \n }\n\n $numero_similaridade = ''; \n $servidor_sugerido = '';\n foreach($forcar_array as $dados){\n $numero_similaridade .= $dados['similaridade'].','; \n $servidor_sugerido .= strtolower($dados['servidor']).',';\n }\n\n $numero_similaridade = explode(',',substr($numero_similaridade,0,-1)); \n $servidor_sugerido = explode(',',substr($servidor_sugerido,0,-1));\n\n $provavel_servidor = max($numero_similaridade); \n $key = array_search($provavel_servidor,$numero_similaridade);\n $servidor_sugerido[$key];\n\n //validação extra com mx\n validarMx($servidor_sugerido[$key]);\n\n $dados = array(\n 'error_mx' => false,\n 'email_digitado' => $email,\n 'email_valido' => $valid,\n 'email_sugerido' => $explode_email[0].'@'.$servidor_sugerido[$key] \n );\n return json_encode($dados); \n\n }else{\n $dados = array(\n 'error_mx' => false,\n 'email_digitado' => $email,\n 'email_valido' => $valid,\n 'email_sugerido' => false \n );\n return json_encode($dados); \n }\n\n \n\n}", "title": "" }, { "docid": "89ddd707d85fe0e545acca8d41eeebb1", "score": "0.6102454", "text": "function findCinemaSimilarity($user1Details, $user2Details){\n\t\n\t$text = $user1Details[2];\n\t$text = strtolower($text);\n\t\n\t$othertext = $user2Details[2];\n\t$othertext = strtolower($othertext);\n\t\n\tif(strcmp($text, $othertext) == 0){\n\t\treturn 1;\n\t}else{\n\t\treturn 0;\n\t}\n\t\n}", "title": "" }, { "docid": "f7976d812dddc1e19db082485f9c32dd", "score": "0.5953831", "text": "function getDistanceByCommonUniqueChars($word1,$word2)\n{\n\t$word1Arr = preg_split('//u', $word1, -1, PREG_SPLIT_NO_EMPTY);\n $word2Arr = preg_split('//u', $word2, -1, PREG_SPLIT_NO_EMPTY);\n\n \n $uniqueCommonChars = array_unique(array_intersect($word1Arr, $word2Arr));\n \n $commonChars = implode($uniqueCommonChars);\n \n $extraPoints = 0;\n \n\n //echoN(\"$word1,$word2 $commonChars\");\n // if tword 1 mtches word2 in both first and last character then add more similarity score\n if ( current($uniqueCommonChars)==current($word2Arr) )\n {\n \n \t$extraPoints = $extraPoints+1;\n }\n \n if ( end($uniqueCommonChars)==end($word2Arr) )\n {\n \n \t$extraPoints = $extraPoints+1;\n }\n \n \n \n\n \n return (mb_strlen($commonChars)+$extraPoints);\n}", "title": "" }, { "docid": "87d17041ae0a689d2ab34535c32ebc28", "score": "0.5915328", "text": "private function isSimilar($text1, $text2) {\n\t\t//$text2 = preg_replace('/^(^[\\w\\d\\s]*)/', '$1', $text2);\n\t\tsimilar_text($text1, $text2, $percentage);\n\t\treturn ($percentage > 30);\n\t}", "title": "" }, { "docid": "a67b246fcb003d0dc78d1a1a25d44305", "score": "0.56440485", "text": "function findMovieSimilarity($user1Details, $user2Details){\n\t\n\t$user1Movies = explode('#', $user1Details[3]);\n\t$user2Movies = explode('#', $user2Details[3]);\n\t\n\t$user1LikedMovies = count($user1Movies);\n\t\n\t$total = 0;\n\t\n\tforeach($user1Movies as $user1Movie){\n\t\tforeach($user2Movies as $user2Movie){\n\t\t\t\n\t\t\tif(strcmp($user1Movie, $user2Movie) == 0){\t\t\t\t\n\t\t\t\t$total++;\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t}\n\t\n\n\t$total /= $user1LikedMovies;\n\t\n\t\n\treturn $total;\n\n}", "title": "" }, { "docid": "ca8e831dc470137dbd97ef1a01d9df1d", "score": "0.5548777", "text": "private function pctEncoded()\n {\n return (new Hexpress())->has('%')->limit(function ($hex) { $hex->matching(function ($hex) { $hex->number()->upper(); }); }, 2);\n }", "title": "" }, { "docid": "a307b1df5e1367412632b7abb9537f4e", "score": "0.5499489", "text": "function _check_for_scum_words ($message = \"\") {\n\t\tglobal $SCUM_WORDS;\n\t\t// By default think that email is correct and good\n\t\t$IS_BAD_EMAIL = false;\n\t\tif (empty($SCUM_WORDS)) return $IS_BAD_EMAIL;\n\t\t// Try to find something bad\n\t\t$found_scums = 0;\n\t\tforeach ((array)$SCUM_WORDS as $cur_scum_word)\t{\n\t\t\tif (preg_match(\"#\".$cur_scum_word.\"#i\", $message)) {\n\t\t\t\t$found_scums++;\n\t\t\t}\n\t\t}\n\t\tif ($found_scums >= 5) {\n\t\t\t$IS_BAD_EMAIL = true;\n\t\t}\n\t\tif ($IS_BAD_EMAIL) {\n\t\t\t_re(\"Error sending mail!\");\n\t\t\t// Do ban user if found something bad\n\t\t\t$NEW_ADMIN_COMMENTS = \"\\r\\nAuto-banned on \"._format_date(time()).\" (found scum words in email)\";\n\t\t\tdb()->query(\"UPDATE \".db('user').\" SET ban_email = '1', admin_comments=CONCAT(admin_comments, '\"._es($NEW_ADMIN_COMMENTS).\"') WHERE id=\".intval(main()->USER_ID));\n\t\t}\n\t\treturn $IS_BAD_EMAIL;\n\t}", "title": "" }, { "docid": "d88990363591543e7446fa9f8511d849", "score": "0.5488191", "text": "function anagramsCheck($str1, $str2) {\n assert(is_string($str1));\n assert(is_string($str2));\n\n $len1 = strlen($str1);\n $len2 = strlen($str2);\n\n if ($len1 != $len2) {\n return false;\n }\n\n $uniqueChar = array();\n $noOfUniqueChar = 0;\n $completeChar = 0;\n for ($start = 0; $start < $len1; $start++) {\n $char = $str1[$start];\n if (!isset($uniqueChar[$char])) {\n $uniqueChar[$char] = 0;\n $noOfUniqueChar++;\n }\n\n $uniqueChar[$char]++;\n }\n\n \n for ($start = 0; $start < $len2; $start++) {\n \n $char = $str2[$start];\n \n if (!isset($uniqueChar[$char])) {\n return false;\n }\n $uniqueChar[$char]--;\n\n if ($uniqueChar[$char] == 0) {\n $completeChar ++;\n if($completeChar == $noOfUniqueChar ) { \n return ($start == strlen($str2) - 1 ) ; \n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "a2836b6651c4f24315188eb666ff0163", "score": "0.5480732", "text": "function get_email_addr( $payee, $email_arr )\n{\n\n\t// Mr Bhuva is an exception ...\n\tif ( $payee == \"BHUVANEDRAM BHUVANAK\" )\n\t\treturn '[email protected]';\n\n\n\t$best_match = 0;\t// for percentage.\n\t$needles = split( ' ', $payee );\t// words to search for\n\t$email_address = \"\";\n\n\tfor( $iii = 0; $iii < count( $email_arr ); $iii++ )\n\t{\n\t\t$haystack = $email_arr[ $iii ][ NAME ]; // name where the needles are searched for\n\t\t// each needle will be matched aginst the name to calculate the \"percentage of satisfaction\".\n\n\t\t$attempts = $success = 0;\n\t\tfor( $jjj = 0; $jjj < count( $needles ); $jjj++, $attempts++ )\n\t\t{\n\t\t\tif ( preg_match( \"/{$needles[ $jjj ]}/i\", $haystack ) )\n\t\t\t\t$success++;\n\n\t\t}\n\t\t$match = intval( $success / $attempts * 100);\n\n\t\tif ( $match > $best_match )\n\t\t{\n\t\t\t$best_match = $match;\n\t\t\t$email_address = $email_arr[ $iii ][ EMAIL_ADDR ];\n\t\t}\n\t}\n\n\treturn ( $best_match >= 60 ) ? $email_address : \"\";\n\n}", "title": "" }, { "docid": "4ea1ab45500fe95fea38dcbd89a762c0", "score": "0.5412038", "text": "public function similarity($text1, $text2) \n {\n if($this->useCache && !isset($this->cache[$text2])) {\n $this->cache[$text2] = Text::getAllSubStrings($text2);\n }\n \n $intersection = array_intersect( Text::getAllSubStrings($text1), ($this->useCache) ? $this->cache[$text2] : Text::getAllSubStrings($text2));\n $max = 0;\n $lcs = '';\n foreach($intersection as $substr)\n {\n $strlen = mb_strlen($substr);\n if( $strlen > $max) {\n $max = $strlen;\n $lcs = $substr;\n }\n }\n return $lcs;\n }", "title": "" }, { "docid": "1a1c7a7e8a8b01c0b9a4bcba0e8abaaa", "score": "0.5341096", "text": "function compareName($name1, $name2) {\n $gelars = array ('S.IP', 'S.Sos', 'S.Psi', 'S.Ked', 'S.KM', 'S.KG', 'S.TP', 'S.Pt', 'S.Pi', 'S.Hut', 'S.KH', 'S.Si', 'S.Kom', 'S.Sn', 'S.Pd', 'S.Ag', 'S.S', 'S.H', 'S.E', 'S.P', 'S.T', 'M.Hum', 'M.Si', 'M.Kes', 'M.Kom', 'M.Sn', 'M.Pd', 'M.Ag', 'M.M', 'M.P', 'M.T', 'SS', 'SH', 'SE', 'SP', 'ST', 'MM', 'MP', 'MT', 'Prof.', 'DR.', 'Drs.', 'Dra', 'dr.', 'drg.', 'PhD', 'Ph.D', 'H.', 'Hj.');\n //$name1 = str_replace($gelars, \"\", $name1);\n //$name2 = str_replace($gelars, \"\", $name2);\n $name1 = stripDegree($name1);\n $name2 = stripDegree($name2);\n return (soundex($name1) == soundex($name2)); \n}", "title": "" }, { "docid": "db83a5c173348e9a030fe56b2f2fd3ae", "score": "0.5308802", "text": "function allNamesTest(){\n $arrayToStrip = array(',','.');\n $nameOneJustSpace = str_replace($arrayToStrip,\" \",$this->nameOne);\n $nameTwoJustSpace = str_replace($arrayToStrip,\" \",$this->nameTwo);\n\n //second, we expload each name by the spaces to turn them to arrays\n $nameOneExploded = explode(\" \",$nameOneJustSpace);\n $nameTwoExploded = explode(\" \",$nameTwoJustSpace);\n\n //check of length of each array is one, in which case, we just check if both single elements\n //which are the names are equal\n if(count($nameOneExploded) && count($nameTwoExploded) == 1){\n //now if the names are just single words, do a simple check and return true\n if(strcasecmp($nameOneJustSpace,$nameTwoJustSpace) == 0){\n echo \"true\";\n return true;\n }\n }\n \n //if lenght each array is more than one, meaning name with multiple\n if(count($nameOneExploded) && count($nameTwoExploded) > 1){\n \n $intersectsOfNames = array_intersect($nameOneExploded,$nameTwoExploded);\n //the above function finds the common value pairs or names in each name passed\n\n\n $allowanceRatio = 0.66; //66% allowance ratio\n $allowedNumber = (count($nameOneExploded)) * $allowanceRatio;\n //the calculation above calculates the allowed name ratio by using the\n //specified allowanceRatio give, either the first or second name can be\n //used to compute the allowed number\n\n if(count($intersectsOfNames) > $allowedNumber){\n echo \"true\";\n return true;\n }\n\n\n if(count($intersectsOfNames) == 0){\n //if there are no matches in the names\n echo \"no matches in names\";\n return false;\n }\n\n }\n\n //if lenght each array is more than 4, i.e not allowed\n if(count($nameOneExploded) && count($nameTwoExploded) > 3){\n echo \"names too long\";\n return;\n }\n }", "title": "" }, { "docid": "28451e731de13ff78466228fbb1d1619", "score": "0.52688295", "text": "public function levenshteinMethod($s1, $s2)\n {\n $charMap = array();\n $s1 = $this->utf8_to_extended_ascii($s1, $charMap);\n $s2 = $this->utf8_to_extended_ascii($s2, $charMap);\n $strlen = strlen($s1)+strlen($s2);\n\n\n return number_format((1-(levenshtein($s1, $s2)/$strlen))*100,2);\n }", "title": "" }, { "docid": "34642397e1fd959620c13a076df375d5", "score": "0.5257506", "text": "public function compare(): bool\n {\n $this->fullName1 = $this->clearNotLetters($this->fullName1);\n $this->fullName2 = $this->clearNotLetters($this->fullName2);\n $fullName1Words = str_word_count(strtoupper($this->fullName1), 1);\n $fullName2Words = str_word_count(strtoupper($this->fullName2), 1);\n return (\n $fullName1Words === array_intersect($fullName1Words, $fullName2Words)\n || $fullName2Words === array_intersect($fullName2Words, $fullName1Words)\n );\n }", "title": "" }, { "docid": "1257151428598ac0679192246c7e7f06", "score": "0.5181626", "text": "function findGenreSimilarity($user1Details, $user2Details){\n\t$length = count($user1Details) -1;\n\t$skipEntries = 4;\n\n\t$similarity = 0;\n\t\n\tfor($i=$skipEntries; $i<$length; $i++){\n\t\t\n\t\t$user1Like = (int)$user1Details[$i][0];\n\t\t$user2Like = (int)$user2Details[$i][0];\n\n\t\t$difference = abs($user1Like - $user2Like);\n\t\t$difference *= 0.2;\n\t\t$difference = 1-$difference;\n\t\t\n\t\t$similarity+= $difference;\n\n\t}\n\t\n\t$similarity /= $length - $skipEntries;\n\n\treturn $similarity;\n}", "title": "" }, { "docid": "cf4ff0e545e4f3da7baa250b7c1f70ad", "score": "0.5144816", "text": "function comprobarCorreo($correo) {\n $correoCorrecto = 0;\n if ((strlen($correo) >= 6) && (substr_count($correo, '@') == 1) && (substr($correo, 0, 1) != '@') && (substr($correo, strlen($correo) - 1, 1) != '@')) {\n if ((!strstr($correo, \"'\")) && (!strstr($correo, \"\\\"\")) && (!strstr($correo, \"\\\\\")) && (!strstr($correo, \"\\$\")) && (!strstr($correo, \" \"))) {\n if (substr_count($correo, \".\") >= 1) {\n $term_dom = substr(strrchr($correo, '.'), 1);\n if (strlen($term_dom) > 1 && strlen($term_dom) < 5 && (!strstr($term_dom, '@'))) {\n $antes_dom = substr($correo, 0, strlen($correo) - strlen($term_dom) - 1);\n $caracter_ult = substr($antes_dom, strlen($antes_dom) - 1, 1);\n if ($caracter_ult != '@' && $caracter_ult != '.') {\n $correoCorrecto = 1;\n }\n }\n }\n }\n }\n if ($correoCorrecto) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "f88a89807461df85c63e0eac5f109386", "score": "0.51261246", "text": "public function weightedRatio($s1, $s2, $forceAscii = true)\n {\n $p1 = Utils::fullProcess($s1, $forceAscii);\n $p2 = Utils::fullProcess($s2, $forceAscii);\n\n if (! Utils::validateString($p1)) {\n return 0;\n }\n if (! Utils::validateString($p2)) {\n return 0;\n }\n\n # should we look at partials?\n $try_partial = true;\n $unbase_scale = .95;\n $partial_scale = .90;\n\n $base = $this->ratio($p1, $p2);\n $len_ratio = (float)((max(strlen($p1), strlen($p2))) / min(strlen($p1), strlen($p2)));\n\n # if strings are similar length, don't use partials\n if ($len_ratio < 1.5) {\n $try_partial = false;\n }\n\n # if one string is much much shorter than the other\n if ($len_ratio > 8) {\n $partial_scale = .6;\n }\n\n if ($try_partial) {\n $partial = $this->partialRatio($p1, $p2) * $partial_scale;\n $ptsor = $this->tokenSortPartialRatio($p1, $p2, $forceAscii) * $unbase_scale * $partial_scale;\n $ptser = $this->tokenSetPartialRatio($p1, $p2, $forceAscii) * $unbase_scale * $partial_scale;\n\n return (int) max($base, $partial, $ptsor, $ptser);\n }\n\n $tsor = $this->tokenSortRatio($p1, $p2, $forceAscii) * $unbase_scale;\n $tser = $this->tokenSetRatio($p1, $p2, $forceAscii) * $unbase_scale;\n\n return (int) max($base, $tsor, $tser);\n }", "title": "" }, { "docid": "0391a843255fc0225498eab8a4c1d066", "score": "0.5122957", "text": "function anagram($nSting, $aString)\n{\n//asort is an php inbuild function which returns the array with and asort is for sorting the array\nif(asort(count_chars($nSting,1))==asort(count_chars($aString,1)))\nreturn \"Yes ($nSting) is matching as a anagram string\";\nelse\nreturn \"No ($nSting) is not matching as a anagram string\";\n}", "title": "" }, { "docid": "01178c17c39df0ca172197faa9e9513b", "score": "0.5105559", "text": "function phpbb_check_username_collisions()\r\n{\r\n\tglobal $db, $src_db, $convert, $table_prefix, $user, $lang;\r\n\r\n\t// now find the clean version of the usernames that collide\r\n\t$sql = 'SELECT username_clean\r\n\t\tFROM ' . USERCONV_TABLE .'\r\n\t\tGROUP BY username_clean\r\n\t\tHAVING COUNT(user_id) > 1';\r\n\t$result = $db->sql_query($sql);\r\n\r\n\t$colliding_names = array();\r\n\twhile ($row = $db->sql_fetchrow($result))\r\n\t{\r\n\t\t$colliding_names[] = $row['username_clean'];\r\n\t}\r\n\t$db->sql_freeresult($result);\r\n\r\n\t// there was at least one collision, the admin will have to solve it before conversion can continue\r\n\tif (sizeof($colliding_names))\r\n\t{\r\n\t\t$sql = 'SELECT user_id, username_clean\r\n\t\t\tFROM ' . USERCONV_TABLE . '\r\n\t\t\tWHERE ' . $db->sql_in_set('username_clean', $colliding_names);\r\n\t\t$result = $db->sql_query($sql);\r\n\t\tunset($colliding_names);\r\n\r\n\t\t$colliding_user_ids = array();\r\n\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t{\r\n\t\t\t$colliding_user_ids[(int) $row['user_id']] = $row['username_clean'];\r\n\t\t}\r\n\t\t$db->sql_freeresult($result);\r\n\r\n\t\t$sql = 'SELECT username, user_id, user_posts\r\n\t\t\tFROM ' . $convert->src_table_prefix . 'users\r\n\t\t\tWHERE ' . $src_db->sql_in_set('user_id', array_keys($colliding_user_ids));\r\n\t\t$result = $src_db->sql_query($sql);\r\n\r\n\t\t$colliding_users = array();\r\n\t\twhile ($row = $src_db->sql_fetchrow($result))\r\n\t\t{\r\n\t\t\t$row['user_id'] = (int) $row['user_id'];\r\n\t\t\tif (isset($colliding_user_ids[$row['user_id']]))\r\n\t\t\t{\r\n\t\t\t\t$colliding_users[$colliding_user_ids[$row['user_id']]][] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$src_db->sql_freeresult($result);\r\n\t\tunset($colliding_user_ids);\r\n\r\n\t\t$list = '';\r\n\t\tforeach ($colliding_users as $username_clean => $users)\r\n\t\t{\r\n\t\t\t$list .= sprintf($user->lang['COLLIDING_CLEAN_USERNAME'], $username_clean) . \"<br />\\n\";\r\n\t\t\tforeach ($users as $i => $row)\r\n\t\t\t{\r\n\t\t\t\t$list .= sprintf($user->lang['COLLIDING_USER'], $row['user_id'], $row['username'], $row['user_posts']) . \"<br />\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$lang['INST_ERR_FATAL'] = $user->lang['CONV_ERR_FATAL'];\r\n\t\t$convert->p_master->error('<span style=\"color:red\">' . $user->lang['COLLIDING_USERNAMES_FOUND'] . '</span></b><br /><br />' . $list . '<b>', __LINE__, __FILE__);\r\n\t}\r\n\r\n\t$drop_sql = 'DROP TABLE ' . USERCONV_TABLE;\r\n\t$db->sql_query($drop_sql);\r\n}", "title": "" }, { "docid": "ede037cc417777a71e4392875fa4ce44", "score": "0.5101847", "text": "function is_phrase_correct($chaine){\r\n $chaine=\"Souvenez-vous de moi,\";\r\n if ((preg_match(\"#^[A-Z]#\", $chaine)) and (preg_match(\"#[.!?]$#\", $chaine )) and ($chaine<=200)){\r\n return true;\r\n }return false;\r\n \r\n}", "title": "" }, { "docid": "5665c5dd1b6ed3254ecdcddac6881a9a", "score": "0.5054728", "text": "function count_atSigns( $email ){\n $count = 0;\n for( $i=0; $i<strlen($email); $i++ ){\n if( $email[$i] == '@' ){\n $count++;\n }\n }\n return $count;\n}", "title": "" }, { "docid": "edf3b1636ab4992f5d99f71f4b8d90a3", "score": "0.5053902", "text": "function pwdMath($signup_pwd, $signup_confirm_pwd){\r\n\t$result;\r\n\t/*Check the e-mail is validate first, then check whether have the same data inside the database*/\r\n\tif ($signup_pwd !== $signup_confirm_pwd){\r\n\t\t$result = true;\r\n\r\n\t}else{\r\n\t\t$result = false;\r\n\t}\r\n\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "f3e3a3eb1c49675113effb8d2b6210e0", "score": "0.5053734", "text": "public function testObfuscateEmail(): void\n\t{\n\t\t$email = '[email protected]';\n\n\t\t$this->assertEquals('example&#64;example.com', StringUtil::obfuscateEmail($email));\n\t\t$this->assertEquals('example&#64;<!---->example.com', StringUtil::obfuscateEmail($email, true));\n\t}", "title": "" }, { "docid": "ba3a4a6eeb151a0b4c5b3a3cd9756124", "score": "0.5045373", "text": "public function _check_words_length($text, $length = 0, $do_encode_email = false)\n {\n if (empty($length)) {\n $length = 60;\n if (SITE_MAX_WORD_LENGTH != 'SITE_MAX_WORD_LENGTH' && SITE_MAX_WORD_LENGTH != '') {\n $length = SITE_MAX_WORD_LENGTH;\n }\n }\n $source_length = strlen($text);\n if ($source_length < $length) {\n return $text;\n }\n $email_pairs = [];\n // Fast check that we do not have emails inside text\n if (false !== strpos($text, '@')) {\n // Do extract emails from text\n if (preg_match_all('/[\\w-]+(\\.[\\w-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,5})/ims', $text, $m)) {\n foreach ((array) $m[0] as $_cur_email) {\n $cur_pair_key = '%%' . (++$_cur_number) . '%%';\n $email_pairs[$_cur_email] = ' ' . $cur_pair_key . ' ';\n $reverted_pairs[$cur_pair_key] = ' ' . ($do_encode_email ? common()->encode_email($_cur_email) : $_cur_email) . ' ';\n }\n krsort($email_pairs);\n krsort($reverted_pairs);\n }\n }\n // Now we allow URLs in text\n if (preg_match_all('/(http|https|ftp|ftps):\\/\\/[a-z0-9%&\\?_\\-\\=\\.\\/]+/ims', $text, $m)) {\n foreach ((array) $m[0] as $_cur_url) {\n $cur_pair_key = '%%' . (++$_cur_number) . '%%';\n $url_pairs[$_cur_url] = ' ' . $cur_pair_key . ' ';\n $reverted_pairs[$cur_pair_key] = ' ' . $_cur_url . ' ';\n }\n krsort($url_pairs);\n krsort($reverted_pairs);\n }\n if ( ! empty($email_pairs)) {\n $text = str_replace(array_keys($email_pairs), array_values($email_pairs), $text);\n }\n if ( ! empty($url_pairs)) {\n $text = str_replace(array_keys($url_pairs), array_values($url_pairs), $text);\n }\n $text = wordwrap($text, (int) $length, ' ', 1);\n if ( ! empty($reverted_pairs)) {\n $text = str_replace(array_keys($reverted_pairs), array_values($reverted_pairs), $text);\n }\n return $text;\n }", "title": "" }, { "docid": "48da8c02f1deabda29b0fedaf55f7f67", "score": "0.5016833", "text": "function normalize_matches($query_string,$match_array)\n{\n foreach($match_array as $match => $score )\n {\n $score = $score/(1+levenshtein ( $query_string, $match));\n $match_array[$match] = $score;\n }\n arsort($match_array);\n return $match_array;\n}", "title": "" }, { "docid": "8dcca32f4f9cec7096a468f7c1929fb4", "score": "0.4993671", "text": "protected function detectHtml()\n {\n // HTML tags (only the most used ones are here)\n $score = preg_match_all('/<\\/?(?:html|div|p|div|script|link|span|u|ul|li|ol|a)+\\s*\\/?>/i', $this->data) * 1.5;\n\n // Links\n $score += preg_match_all('/\\b(?:(?:https?|udp):\\/\\/|www\\.)[-A-Z0-9+&@#\\/%=~_|$?!:,.]*[A-Z0-9+&@#\\/%=~_|$]/i', $this->data) * 0.5;\n\n // Links containing an md5 hash\n $score += preg_match_all('/(?:(?:https?|udp):\\/\\/|www\\.)[-A-Z0-9+&@#\\/%=~_|$?!:,.]*[A-Z0-9+&@#\\/%=~_|$]=[a-f0-9]{32}/i', $this->data);\n\n return $score / $this->lines;\n }", "title": "" }, { "docid": "35f585a2729c3093a35d59dbf467b2bb", "score": "0.49810374", "text": "function _checkAnswer($answer, $correct)\n\t{\n\t\t$answer = explode(' ', strtolower(urldecode($answer)));\n\t\t$correct = explode(' ', strtolower(urldecode($correct)));\n\t\t\n\t\t$particles = array('the', 'and', 'for', 'nor', 'but', 'yet', 'prompt', 'accept');\n\t\t\n\t\tforeach ($correct as $word){\n\t\t\tif (strlen($word) < 3){\n\t\t\t\tarray_push($particles, $word);\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach ($answer as $word){\n\t\t\tif (strlen($word) < 3){\n\t\t\t\tarray_push($particles, $word);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$correct = array_diff($correct, $particles);\n\t\t$answer = array_diff($answer, $particles);\n\t\t\n\t\t//Yeah, O(N^2) Time.\n\t\t//UMADBRO?\n\t\tforeach ($correct as $cword){\n\t\t\tforeach ($answer as $aword){\n\t\t\t\t//Calculate Levenshtein Distance\n\t\t\t\tif (levenshtein($aword, $cword) <= intval(round(.4*strlen($cword)))){\n\t\t\t\t\treturn True;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn False;\n\t}", "title": "" }, { "docid": "1131a7a3e5aa6b467f212fd7e5c89a83", "score": "0.49794582", "text": "function benzerlik($s1, $s2) {\n if (strlen($s1)==0 || strlen($s2)==0) {\n return 0;\n }\n\n //replace none alphanumeric charactors\n //i left - in case its used to combine words\n $s1clean = preg_replace(\"/[^A-Za-z0-9-]/\", ' ', $s1);\n $s2clean = preg_replace(\"/[^A-Za-z0-9-]/\", ' ', $s2);\n\n //remove double spaces\n while (strpos($s1clean, \" \")!==false) {\n $s1clean = str_replace(\" \", \" \", $s1clean);\n }\n while (strpos($s2clean, \" \")!==false) {\n $s2clean = str_replace(\" \", \" \", $s2clean);\n }\n\n //create arrays\n $ar1 = explode(\" \",$s1clean);\n $ar2 = explode(\" \",$s2clean);\n $l1 = count($ar1);\n $l2 = count($ar2);\n\n //flip the arrays if needed so ar1 is always largest.\n if ($l2>$l1) {\n $t = $ar2;\n $ar2 = $ar1;\n $ar1 = $t;\n }\n\n //flip array 2, to make the words the keys\n $ar2 = array_flip($ar2);\n\n\n $maxwords = max($l1, $l2);\n $matches = 0;\n\n //find matching words\n foreach($ar1 as $word) {\n if (array_key_exists($word, $ar2))\n $matches++;\n }\n\n return ($matches / $maxwords) * 100; \n}", "title": "" }, { "docid": "dab2c772eb222ebe4b1ff44fadc49e10", "score": "0.4977405", "text": "public function checkpercent() {\n global $db;\n\n //Get all Rejections, Approvals, Dontknow's\n $query = $db->query(\"select * from suggest_approved where suggest_id=\" . $this->id);\n $row2 = $db->get('select count(*) as totaluser from member where username!=\"\" and password!=\"\"');\n $total = (float) $row2['totaluser'];\n $noapproved = 0.0;\n $norejected = 0.0;\n $nodontknow = 0.0;\n\n //Count the no of approvals/Rejections\n while ($row = $db->fetch($query)) {\n switch (intval($row['action'])) {\n case 0:$norejected++;\n break;\n case 1:$noapproved++;\n break;\n case 2:$nodontknow++;\n break;\n default:\n break;\n }\n }\n $noapproved = (float) ($noapproved / $total) * 100;\n $nodontknow = (float) ($nodontknow / $total) * 100;\n $norejected = (float) ($norejected / $total) * 100;\n\n //If approved>50 then accept the suggestion\n //if rejected>50 then reject the suggestion\n //if donknow>50 then even i don't know what to do\n\n return array($noapproved, $norejected, $nodontknow);\n }", "title": "" }, { "docid": "0cebbfbd668a765ad8fd5d676d084aba", "score": "0.49529985", "text": "function mailcheckEqual($emailadresse,$emailadresse2) {\n\t\tif($emailadresse!=$emailadresse2) {\n\t\t\treturn 'Ihre Emailadressen stimmen nicht überein<br>';\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "10d196595c0de38f801852308f25f643", "score": "0.49453944", "text": "private function getSimilarityScore($parts, $transformationFunction){\n $transformedLength = 0;\n $distance = 0;\n foreach($parts as $partIndex => $part){\n $partText = str_replace('-', '', $part['parsed'] . $part['notParsed']);\n $originalPartText = $this->domainOriginalParts[$partIndex]['notParsed'];\n $parsedTransformedText = $transformationFunction($partText);\n $originalTransformedText = $transformationFunction($originalPartText);\n $distance += levenshtein($parsedTransformedText, $originalTransformedText);\n $transformedLength += strlen($originalTransformedText);\n }\n \n return (($transformedLength - $distance) / $transformedLength);\n }", "title": "" }, { "docid": "ea12f15288da90cf2acb74dbac6c112e", "score": "0.4925484", "text": "function isSimilar($color, $fuzz){}", "title": "" }, { "docid": "20f8ee8206c61e836a08950ca612254a", "score": "0.4922354", "text": "public function _spam_protection($str)\n\t{\n\t\t// we will assume the user is lazy with their caps lock\n\t\t$word = $this->session->userdata('captchaWord');\n\t\tif(strcmp(strtoupper($str),strtoupper($word)) == 0)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('_spam_protection', 'کد امنیتی صحیح نیست');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "716d0a7db63f53b5f38cbd8eb3874fb9", "score": "0.49209088", "text": "public static function similarityi($str1, $str2)\n {\n return self::similarity(strtolower($str1), strtolower($str2));\n }", "title": "" }, { "docid": "b9b3e62132108f6f50ad857fe0769df8", "score": "0.4912158", "text": "function compareWords($a, $b){\n return strlen($b) - strlen($a);\n}", "title": "" }, { "docid": "fafbfea543c46b58fe19fc1ee746f50d", "score": "0.48951793", "text": "public function testTextLengthCheck()\n {\n $this->assertEquals(884, $this->TextStatistics->letterCount($this->strText));\n }", "title": "" }, { "docid": "9802e5083580c1efd69ae19802914460", "score": "0.48928493", "text": "function comp($str1, $str2)\n {\n $l1 = strlen($str1);\n $l2 = strlen($str2);\n \n if ($l1 !== $l2) return false;\n for ($i = 0, $j = strpos($str2, $str1[0]); $i < $l1 && $j < $l2; $i++, $j = (($j+1)%$l2)) {\n if ($str1[$i] !== $str2[$j]) return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "0dbabfb173111f70b91c85c463cda2b0", "score": "0.48848718", "text": "function secureCompare( $internal, $external ) {\n\t$internal .= chr( 0 );\n\t$external .= chr( 0 );\n\t$intLen = strlen( $internal );\n\t$extLen = strlen( $external );\n\n\t$match = $intLen - $extLen;\n\n\tfor ( $i = 0; $i < $extLen; $i++ ) {\n\t\t$match |= ( ord( $internal[$i % $intLen] ) ^ ord( $external[$i] ) );\n\t}\n\n\treturn $match === 0;\n}", "title": "" }, { "docid": "461aefef6208062607854fff7a48920f", "score": "0.48758313", "text": "function compare_strings($str1,$str2) {\n $tmp1=preg_replace('/ +/',' ',$str1);\n $tmp2=preg_replace('/ +/',' ',$str2);\n if($tmp1==$tmp2) return true;\n\n $pattern='/\\W/';\n $arr1=array_unique(preg_split($pattern,$str1));\n $arr2=array_unique(preg_split($pattern,$str2));\n $intersect=array_intersect($arr1,$arr2);\n if($arr1==$intersect && $arr2=$intersect) return true;\n return false;\n }", "title": "" }, { "docid": "1cdb16483b17254276901d9707387d76", "score": "0.48686084", "text": "function reduce(&$str)\n{\n $match = false;\n\n for ($i = strlen($str) - 2; $i >= 0; $i--) {\n\n if ($i >= strlen($str) - 2) {\n continue; // I think this happens when we remove two right at the end\n }\n\n $a = $str[$i];\n $b = $str[$i + 1];\n\n // if (0 == strcasecmp($a, $b) && ((ctype_upper($a) && ctype_lower($b)) || (ctype_lower($a) && ctype_upper($b)))) {\n if (abs(ord($a) - ord($b)) == 32) {\n $str = substr($str, 0, $i) . substr($str, $i + 2);\n $match = true;\n }\n }\n\n return $match;\n}", "title": "" }, { "docid": "7438300fc6996ec270f8e7da3298509d", "score": "0.48679405", "text": "function checkMessageContent($message) {\n $ret = new \\stdClass();\n $ret->count=0;\n $ret->words=0;\n $ret->ok=false;\n if ($message==null || strlen($message)<10) {\n return $ret;\n }\n\t$msg = \" \".mb_strtolower(strip_tags($message)).\" \";\n\t$rr = array(\"/\",\"=\",\"-\",\":\",\",\",\".\",\"(\",\")\",\"?\",\"!\",\" \");\n\t$msg = str_replace($rr, \" \", $msg);\n\t$whiteList = array(\t\"lessz \", \" volt \",\" van \",\" rossz \",\" hogy \",\" az \",\" ez \",\" azt \",\" ezt \",\" ezzel \",\" azzal \",\" ahoz \",\" itt \", \" ott \",\" de \",\" is \",\" és \",\n\t\t\t\t\t\t\" igen \",\" nem \", \"akkor \", \" csak \", \"szia \",\"sziasztok \", \" puszi \", \"kellemes \",\"nagyon \",\"puszilok \", \"szép\",\n\t\t\t\t\t\t\"legyek\", \" aki \", \"mikor\", \"honlap\", \"oldal\",\"vagyok\",\"leszek\",\" vagy \",\" minden \",\n\t\t\t\t\t\t\" én \",\" te \", \" brassai \",\"köszön\",\"köszi\", \"üdvöz\",\"kedves\", \"iskola\",\n\t\t\t\t\t\t\"ünnep\", \"boldog \", \"karácsony\", \"húsvét\", \"egy \",\"minden\",\"senki\",\"neked\",\"fénykép\",\n \" református \", \" jzsuk \", \" apácai \", \" unitárius \", \" tanár\", );\n\tforeach ($whiteList as $s) {\n\t\t$ret->count += substr_count($msg, $s);\n\t}\n\t$ret->words=sizeof(explode(\" \",trim($msg)));\n\t$ret->ok = $ret->count >= $ret->words/20 && $ret->words>4;\n\treturn $ret;\n}", "title": "" }, { "docid": "2bfa430824d23b858c7807fbe3f290d6", "score": "0.48511526", "text": "function overlap( $words1, $words2 ) {\n\t\t$words1 = array_unique( $words1, SORT_STRING );\n\t\t$words2 = array_unique( $words2, SORT_STRING );\n\t\t$len1 = count($words1);\n\t\t$len2 = count($words2);\n\t\t$overlap = 0;\n\t\tfor ( $i1=0, $i2=0; $i1<$len1 && $i2<$len2; ) {\n\t\t\t$cmp = strcmp( $words1[$i1], $words2[$i2] );\n\t\t\tif ( $cmp == 0 ) {\n\t\t\t\t$i1++; $i2++; $overlap++;\n\t\t\t} elseif ( $cmp < 0 ) { // word 1 < word 2\n\t\t\t\t$i1++;\n\t\t\t} else { // ( $cmp > 0 ) word 1 > word 2\n\t\t\t\t$i2++;\n\t\t\t}\n\t\t}\n\t\treturn ( 100 * ( $overlap + $overlap/($len2+1) ) ) /($len1+1); \n\t\t\t// always better to match more, but larger targets less impressive when matched\n\t\t\t// range 0-100, including fractional values\n\t}", "title": "" }, { "docid": "3226b2affaa80cba26abbaab0156f992", "score": "0.48341534", "text": "public static function VerifierAdresseMail($adresse){\n if (strlen($adresse) > 254) {\n return '0';\n }\n\n //Caractères non-ASCII autorisés dans un nom de domaine .eu :\n\n $nonASCII = 'ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII .= 'ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII .= 'ũūŭůűųŵŷźżztșțΐάέήίΰαβγδεζηθικλμνξοπρςστυφ';\n $nonASCII .= 'χψωϊϋόύώабвгдежзийклмнопрстуфхцчшщъыьэюяt';\n $nonASCII .= 'ἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔ';\n $nonASCII .= 'ὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗ';\n $nonASCII .= 'ᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷ';\n // note : 1 caractète non-ASCII vos 2 octets en UTF-8\n\n $syntaxe = \"#^[[:alnum:][:punct:]]{1,64}@[[:alnum:]-.$nonASCII]{2,253}\\.[[:alpha:].]{2,6}$#\";\n\n if (preg_match($syntaxe, $adresse)) {\n //C'est bon\n return '1';\n } else {\n return '2';\n }\n }", "title": "" }, { "docid": "40012eaeb77ab08b2e5726fcbfaf144b", "score": "0.48338225", "text": "function check($file) {\n //$html = file_get_contents('C:\\Users\\Swapnil\\Downloads\\CS221\\Report.HTM');\n $inerhtml = \"\";\n $html = file_get_contents($file);\n $doc = new DOMDocument();\n $doc->loadHTML($html);\n $sxml = simplexml_import_dom($doc);\n //print_r($sxml);\n $match = 0;\n $total = 0;\n foreach ($sxml->body->div->center->table->tr as $row) {\n //print_r($row);\n $t1 = $row->td[1]->children();\n $t2 = $row->td[2]->children();\n if (array_key_exists('font', $t1) and array_key_exists('font', $t2)) {\n //$match+=str_word_count($t1->font->b->font);\n //$total+=str_word_count($t1->font->b->font);\n //$match+=str_word_count($t2->font->b->font);\n $total+=str_word_count($t2->font->b->font);\n } else {\n //$match+=str_word_count($row->td[1]);\n //$total+=str_word_count($row->td[1]);\n $match+=str_word_count($row->td[2]);\n $total+=str_word_count($row->td[2]);\n }\n }\n if ($total == 0)\n $inerhtml = $inerhtml . '100';\n else\n $inerhtml = $inerhtml . round(($match / $total) * 100, 2);\n\n\n return $inerhtml;\n}", "title": "" }, { "docid": "1c56da4c1f3270b7703e305b63c91859", "score": "0.48203552", "text": "function comparingTwoStrings($str1,$str2,$length='all')\n{\n if ($length==='all')\n {\n $length1=mb_strlen($str1);\n $length2=mb_strlen($str2);\n\n $length=$length1 > $length2 ? $length1 : $length2;\n }\n\n //等于0 - 两个字符串相等\n //小于0 - str1 长度小于 str2\n //大于0 - str1 长度大于 str2\n return strncasecmp($str1,$str2,$length);\n}", "title": "" }, { "docid": "f34be251a07428e31c8be2afe9f9cee1", "score": "0.48066187", "text": "function similarity_distance($matrix,$person1,$person2) // check similarity between two users by seeing if same gifts exist in the other persons array\r\n{\r\n $similar=array(); //an array to store the similarity score of the current 2 users that are being compared\r\n $sum=0;\r\n\r\n foreach($matrix[$person1] as $key=>$value) //foreach loops through each value in array\r\n {\r\n if(array_key_exists($key,$matrix[$person2])) //if the same item exists in both persons array list, there is a similarity\r\n {\r\n $similar[$key]=1; //adds new element to the array\r\n }\r\n\r\n }\r\n\r\n if($similar==0) //else if no similarity between the two users, no intelligent recommendation can be made\r\n {\r\n return 0;\r\n }\r\n\r\n\r\n foreach($matrix[$person1] as $key=>$value) //for users found to have similarities\r\n {\r\n if(array_key_exists($key,$matrix[$person2]))\r\n {\r\n $sum=$sum+pow($value-$matrix[$person2][$key],2); //calculate Euclidean distance between users\r\n }\r\n }\r\n\r\n return 1/(1+sqrt($sum)); //Returns a distance-based similarity score for person1 and person2\r\n\r\n}", "title": "" }, { "docid": "9294c3edaaba69695b952acf8f16a145", "score": "0.48047724", "text": "function slow_equals($a, $b)\n {\n $diff = strlen($a) ^ strlen($b);\n for ($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0;\n }", "title": "" }, { "docid": "53b0f94dafdee861a2bd026a046092fb", "score": "0.47855505", "text": "function anagrams1(string $a, string $b): bool {\n\t$mapA = convertStringToCharMap($a);\n\t$mapB = convertStringToCharMap($b);\n\n\tif (count(array_keys($mapA)) !== count(array_keys($mapB))) {\n\t\treturn false;\t\t\n\t}\n\n\tforeach ($mapA as $letter => $count) {\n\t\tif (!isset($mapB[$letter])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($count !== $mapB[$letter]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "be4c317bfe71670bf785196c46129e21", "score": "0.47804537", "text": "function detectUniqueWord($dataSet) {\n}", "title": "" }, { "docid": "87c2f62f3fccfd09d3d7fb33c6a59a34", "score": "0.47774076", "text": "function analyse($name, $content) {\n //$stats = $this->stats($name);\n $stats = $this->stats($content);\n\n $length_threshold = 3;\n $relative_threshold = 0.1;\n if( $stats['length_miss'] > $length_threshold ) {\n return array(\"status\" => 0, \"error\" => \"Wrong word length\");\n } else if ( $stats['relative_miss'] > $relative_threshold ) {\n return array(\"status\" => 0, \"error\" => \"Too many non-ascii character\");\n } else {\n return array(\"status\" => 1);\n } \n\n }", "title": "" }, { "docid": "b0f1309297408131b0983130f0bf0e82", "score": "0.4773788", "text": "function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1): int {}", "title": "" }, { "docid": "72c485aa8275159ded28c71cc69e220e", "score": "0.47736531", "text": "public function minDiffChars()\n {\n $this->passwordFilter->minDiffChars(5);\n $this->assertEquals(5, $this->passwordFilter->getMinDiffChars());\n $this->assertEquals('abcde', $this->passwordFilter->execute(array('abcde', 'abcde')));\n }", "title": "" }, { "docid": "7360443a1abf68649cbabe3c3cb9b014", "score": "0.477228", "text": "function pro_email($email) {\n\t\t\n\t\t$unallowed = array(\n\t\t'yahoo.',\n\t\t'msn.',\n\t\t'gmail.',\n\t\t'live.',\n\t\t'rocketmail.',\n\t\t'hotmail.',\n\t\t'aim.',\n\t\t'outlook.',\n\t\t'mail.',\n\t\t'aol.',\n\t\t'facebook.com'\n\t\t);\n\t\t\n\t\tforeach($unallowed as $k => $string) {\n\t\t if(stripos($email, $string) !== FALSE) {\n\t\t return false;\n\t\t }\n\t\t}\n\n\t\treturn true;\n\n \t}", "title": "" }, { "docid": "f403cf587d5c472302c674381118f37d", "score": "0.47622013", "text": "function slowEquals($a, $b)\r\n{\r\n $diff = strlen($a) ^ strlen($b);\r\n for ($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\r\n $diff |= ord($a[$i]) ^ ord($b[$i]);\r\n }\r\n return $diff === 0;\r\n}", "title": "" }, { "docid": "914638edf75d428d369adefe2addd014", "score": "0.47606075", "text": "function notInLargerMatchingGroup($str) {\n $countChars = count_chars($str);\n return array_search(2, $countChars, true) !== false;\n}", "title": "" }, { "docid": "effa4e1758f4db3a737d64900e6cd255", "score": "0.4755058", "text": "function good_email($email) {\n\t// First check that there's one @ symbol, and that the lengths are good\n\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\t// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n\t\treturn false;\n\t}\n\n\t// Split it into sections\n\t$email_array = explode(\"@\", $email);\n\t$local_array = explode(\".\", $email_array[0]);\n\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\tif (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name\n\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\tif (sizeof($domain_array) < 2) {\n\t\t\treturn false; // Not enough parts to domain\n\t\t}\n\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\tif (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "35ace6af08f9916c82b358c8cbb2fa3d", "score": "0.47521985", "text": "private function checkCharDiversity($password, $isAssociate) {\n if ($isAssociate || $this->controller->is_staff) {\n\t return $this->charGroups($password) >= \n\t $this->minCharGroups($isAssociate);\n } else {\n\t // if not a staff, must have a letter and a number\n\t return ($this->hasLowercase($password) || \n\t $this->hasUpperCase($password)) &&\n\t $this->hasDigit($password);\n\t}\n }", "title": "" }, { "docid": "5808983bf9956fd0bc8b3fa735b47209", "score": "0.47515184", "text": "private function sentences_intersection($sent1, $sent2) {\n\n\t\t$s1 = explode(\" \",strtolower(substr(rtrim($sent1),0,-1)));\n\t\t$s2 = explode(\" \",strtolower(substr(rtrim($sent2),0,-1)));\n\t\t$cs1 = count($s1);\n\t\t$cs2 = count($s2);\n\t\tif (($cs1 + $cs2) == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn 2 * count(array_intersect($s1,$s2)) / ($cs1+$cs2);\n\t}", "title": "" }, { "docid": "9dc104e1478be4ddd06c9e2eefdea324", "score": "0.47453827", "text": "public static function getStringMatchesAndOtherDetails($string){\n\n $chars = str_split($string);\n var_dump(strlen($string));\n var_dump(strlen($string)%2);\n\n $halfTheStringSize = (strlen($string)-strlen($string)%2)/2;\n var_dump($halfTheStringSize);\n //\n $matchesDataArray = array();\n\n for($z=1;$z<=$halfTheStringSize;$z++){\n\n for($i=0;$i<strlen($string);$i++){\n\n $currentChar = substr($string,$i,$z);\n $matchFound = false;\n //echo $currentChar;\n\n for($q=0;$q<strlen($string);$q++){\n $currentCharQ = substr($string,$q,$z);\n //echo $currentChar.\" -- \".$currentCharQ.$i.\" \".$q.\"\\n\";\n if($i==$q){}else{\n if($currentChar==$currentCharQ){\n $matchFound = true;\n //echo $currentChar.\" : \".$i.\" \".$q.\" \";\n //$matches = array($currentChar=>[$i,$q]);//[$currentChar=>[$i,$q]];\n //var_dump($matches);\n $matches = [$currentChar,$i,$q];\n //$matchesDataArray[$currentChar] = [$i,$q];\n array_push($matchesDataArray,$matches);\n }\n }\n }\n\n // if($matchFound){\n // echo \"\\n\";\n // }\n\n }\n }\n\n $wordPresentTimes = 0;\n //now the unlinking of objects from the collection of matches\n foreach($matchesDataArray as $key => $value){\n\n $currentChar = $value[0];\n $wordPresentTimes = 0;\n //var_dump($value);\n foreach($matchesDataArray as $key_in => $value_in){\n $currentCharIn = $value_in[0];\n //var_dump($value_in[0][0]);\n //echo $currentCharIn;\n if(strlen($currentChar)>strlen($currentCharIn)){\n $strinFound = strpos($currentChar,$currentCharIn);\n if(strlen($strinFound)>=1){\n //echo \"unsetting - \".$key_in.\"\\n\";\n unset($matchesDataArray[$key_in]);\n\n }\n }\n\n }\n\n }\n\n $key_array = array();\n //final loop to count the number of occurences\n foreach($matchesDataArray as $key=>$value){\n\n\n if(isset($key_array[$value[0]])){\n //echo $value[1].\"\\n\";\n $key_array[$value[0]][\"total_occurence\"] = $key_array[$value[0]][\"total_occurence\"]+1;\n\n if(in_array($value[1],$key_array[$value[0]][\"places\"])){}else{\n array_push( $key_array[$value[0]][\"places\"],$value[1]);\n }\n\n\n }else{\n echo \"The value - \".$value[1];\n $key_array[$value[0]] = [\"total_occurence\"=>1,\"places\"=>[$value[1]]];\n\n }\n\n }\n\n return $key_array;\n }", "title": "" }, { "docid": "18d08b90a65ffe86474cca56b8e38deb", "score": "0.4743156", "text": "function getSimilarity($records) {\n\tglobal $DB;\n\t$simhash = new \\Tga\\SimHash\\SimHash();\n\t$extractor = new \\Tga\\SimHash\\Extractor\\SimpleTextExtractor();\n\t$comparator = new Tga\\SimHash\\Comparator\\GaussianComparator(3);\n\t$i = 0;\n\tforeach($records as $record) {\n\t\t$max = 0;\n\t\t$index = 0;\n\t\t$hash1 = new Fingerprint(sizeof($record->simhash),$record->simhash);\n\t\t$checkrecord = $DB->get_record('files', array('pathnamehash' => $record->identifier, 'component' => 'assignsubmission_file'));\n\t\tif(!$checkrecord) {\n\t\t\t$DB->delete_records('plagiarism_plagcheck', array('identifier' => $record->identifier));\n\t\t\tcontinue;\n\t\t}\n\t\tforeach($records as $recordinner){\n\t\t\tif($recordinner->id != $record->id && $recordinner->userid != $record->userid){\n\t\t\t\t$hash2 = new Fingerprint(sizeof($recordinner->simhash),$recordinner->simhash);\n\t\t\t\t$plag = $comparator->compare($hash1,$hash2);\n\t\t\t\tif($plag > $max){\n\t\t\t\t\t$max = $plag;\n\t\t\t\t\t$index = $recordinner->identifier;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$record->similarityscore = $max;\n\t\t$record->copyfilename = $index;\n\t\tinsertIntoTable($record);\n\t\t$i++;\n\t}\n\treturn;\n}", "title": "" }, { "docid": "af7b18cba84ccbdd8a2fda9894ebd07f", "score": "0.47428042", "text": "public static function string_compare($str_a, $str_b)\n {\n $length = strlen($str_a);\n $length_b = strlen($str_b);\n\n $i = 0;\n $segmentcount = 0;\n $segmentsinfo = array();\n $segment = '';\n\n while ($i < $length)\n {\n $char = substr($str_a, $i, 1);\n if (strpos($str_b, $char) !== FALSE)\n {\n $segment = $segment.$char;\n if (strpos($str_b, $segment) !== FALSE)\n {\n $segmentpos_a = $i - strlen($segment) + 1;\n $segmentpos_b = strpos($str_b, $segment);\n $positiondiff = abs($segmentpos_a - $segmentpos_b);\n $posfactor = ($length - $positiondiff) / $length_b; // <-- ?\n $lengthfactor = strlen($segment)/$length;\n $segmentsinfo[$segmentcount] = array( 'segment' => $segment, 'score' => ($posfactor * $lengthfactor));\n }\n else\n {\n $segment = '';\n $i--;\n $segmentcount++;\n }\n }\n else\n {\n $segment = '';\n $segmentcount++;\n }\n $i++;\n }\n\n // PHP 5.3 lambda in array_map\n $totalscore = array_sum(array_map(function($v) { return $v['score']; }, $segmentsinfo));\n return $totalscore;\n }", "title": "" }, { "docid": "ace54d48f4bf420fd670626e840fa6ab", "score": "0.47427613", "text": "function adno_check($s_and_w, $original_sentence){\r\r\n\t\r\r\n\t$pattern = \"(?<=\\S)((ㄴㅡ)?ㄴ|(ㅇㅡ)?ㄹ|ㄷㅓㄴ|ㄱㅗㄴ)\\s\";\t\r\r\n\r\r\n\t//use this variable so that we don't match anything more than once.\r\r\n\t$last_match = 0;\r\r\n\t\t\r\r\n\t//initalize the search\r\r\n\tmb_ereg_search_init($s_and_w->shifted_sentence, $pattern);\r\r\n\t\r\r\n// \techo \"<br />shifted_sentence : \".$s_and_w->shifted_sentence. \"<br/>\";\r\r\n\t\r\r\n\t//finding location of work and store decleared information\r\r\n\twhile ($pos = mb_ereg_search_pos()) {\r\r\n\t\t$byte_start = $pos[0];\r\r\n\t\t$byte_length = $pos[1];\r\r\n\t\t\r\r\n\t\t$mb_start = mb_strlen(substr($s_and_w->shifted_sentence, 0, $byte_start));\r\r\n\t\t$mb_length = mb_strlen(substr($s_and_w->shifted_sentence, $byte_start, $byte_length));\r\r\n\t\t$mb_pos[] = array($mb_start, $mb_length);\r\r\n\t\t\r\r\n\t\t$result = mb_substr($s_and_w->decomp_sentence, $mb_start, $mb_length);\r\r\n\t\tutf_normalizer::nfc($result);\r\r\n\r\r\n\t}\r\r\n\t//no adnominals found, return\r\r\n\tif(!$mb_pos) return;\r\r\n\t$mb_pos = array_reverse($mb_pos);\r\r\n\tforeach ($mb_pos as $value) {\r\r\n\t\t$mb_start = $value[0];\r\r\n\t\t$mb_length = $value[1];\r\r\n\t\t$possible_adnominal_particle = mb_substr($s_and_w->decomp_sentence, $mb_start, $mb_length);\r\r\n\t\tutf_normalizer::nfc($possible_adnominal_particle);\r\r\n\t\t$result = mb_substr($s_and_w->decomp_sentence, 0, $mb_start + $mb_length);\r\r\n\t\tutf_normalizer::nfc($result);\r\r\n\t\t$array_result[]= $result;\r\r\n\t\t\r\r\n\t}\r\r\n\t//count how many search results are exist\r\r\n\t$num_of_array=count($array_result);\r\r\n\t$array_result = array_reverse($array_result);\r\r\n\t$adnominal_array=array();\r\r\n\r\r\n\t$offest = 0;\r\r\n\tfor ($iii=0; $iii<$num_of_array; $iii++){\r\r\n\t\t$s_and_w = new sentence_and_words($array_result[$iii]);\r\r\n\t\t//set result_adno value from handle_verb_adnominal function it will return \r\r\n\t\t$result_adno = handle_verb_adnominal ($s_and_w->sentence, $s_and_w->words, $s_and_w->decomp_words, $s_and_w->shifted_words, $original_sentence, $offest);\r\r\n\t\t//if result_adno is setted english value it means handle_verb_adnominal found word from dictionary, so increase the offset\r\r\n\t\tif(\tisset($result_adno[0]->english)){\r\r\n\t\t\t$offest = $result_adno[0]-> my_m_verb_offset;\r\r\n\t\t}\r\r\n\t\t//if result_adno is set, merged array with existing array\r\r\n\t\tif(isset($result_adno))$adnominal_array = array_merge($adnominal_array, $result_adno);\r\r\n\t}\r\r\n\t\r\r\n $adnominal_array_length = count( $adnominal_array );\r\r\n\r\r\n\tfor ($j = 0; $j< $adnominal_array_length; $j++) {\r\r\n\t \r\r\n\t\t//check english value for decleare it is usable information or not\r\r\n\t \r\r\n\t\tif(!$adnominal_array[$j]->english) {\r\r\n\t\t\tunset($adnominal_array[$j]);\r\r\n\t \t} elseif ($adnominal_array[$j]->tense == 'present') {\r\r\n\t\t \t$adnominal_array[$j]->tense = 'ing';\r\r\n\t \t}\r\r\n\t}\r\r\n\treturn array_values($adnominal_array);\r\r\n}", "title": "" }, { "docid": "4a644a035b8d3caa78a448ae2d17ef30", "score": "0.4740623", "text": "public function diffString($str1_, $str2_, $minimum_similarity_score)\n {\n // Compare the strings and get the similarity score\n $similarity_score = StringHelper::string_compare($str1_, $str2_);\n\n // Analyse the similarity score\n if ($similarity_score >= $minimum_similarity_score) {\n // The strings can be considered equivalent\n return true;\n } else {\n // The strings cannot be considered equivalent\n return false;\n }\n }", "title": "" }, { "docid": "3cdbb27549d1984e380c36b0085183d4", "score": "0.4731611", "text": "function is_spam($data){\n //if (preg_match('/[a-z][A-Z]/', $data, $matches) > 0) return true;\n $value = strtolower($data);\n foreach($this->spam_words as $word){\n if (strpos($value,$word) !== false) return true;\n }\n return false;\n }", "title": "" }, { "docid": "c45e80af52ce6bc6b64a47e124cddb95", "score": "0.47193637", "text": "public function Find_Similar_Tokens($for_token)\n\t\t{\n\t\t\t$retval = array();\n\t\t\t$matching_percentage = 70.0;\n\n\t\t\t// strip out the delimiters\n\t\t\t$for_token = preg_replace('/%/', '', $for_token);\n\n\t\t\tforeach ($this->tokens as $token)\n\t\t\t{\n\t\t\t\t$match_chars = similar_text(\n\t\t\t\t\tstrtolower($for_token),\n\t\t\t\t\tstrtolower(preg_replace('/%/', '', $token->token)),\n\t\t\t\t\t$percent\n\t\t\t\t);\n\n\t\t\t\t// find the percentage of matching characters\n\t\t\t\t$len = strlen($for_token);\n\t\t\t\t$pec = ceil(($match_chars / $len) * 100);\n\n\t\t\t\tif (($percent >= (int) $matching_percent)\n\t\t\t\t\t&& ($pec >= $matching_percentage))\n\t\t\t\t{\n\t\t\t\t\t$retval[] = $token;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $retval;\n\t\t}", "title": "" }, { "docid": "ea514f947800adc77c1702d9787a227c", "score": "0.4718544", "text": "private function hashEmail(): string\n {\n return md5(strtolower(trim($this->email)));\n }", "title": "" }, { "docid": "ceef771e875046e42d124011e4c42e2d", "score": "0.4717974", "text": "function best_match($pages, $name, $threshold = 2)\n{\n\t$candidates = array();\n\t\n\t$best_score = strlen($name);\n\t\n\tforeach ($pages as $p)\n\t{\n\t\t$text = bhl_fetch_ocr_text($p);\n\t\t$text = bhl_unescape_newlines ($text);\n\t\t\n\t\t\n\t\t\n\t\t//$text = preg_replace('/,\\s+/', ' ', $text);\n\t\t//echo $text;\n\t\t\n\t\t$filename = dirname(__FILE__) . '/tmp/' . $p . '.txt';\n\t\t$file = fopen($filename, \"w\");\n\t\tfwrite($file, $text);\n\t\tfclose($file);\n\t\t\n\t\t$lines = array();\n\t\t$matches = array();\n\t\n\t\tagrep($filename, $name, $lines, $matches);\n\t\t\n\t\t//print_r($matches);\n\t\t\n\t\tforeach ($matches as $m)\n\t\t{\n\t\t\t$words = preg_split(\"/\\s+/\", $m);\n\t\t\t\n\t\t\t//print_r($words);\n\t\t\tforeach ($words as $word)\n\t\t\t{\n\t\t\t\t$w = preg_replace('/[^a-zA-Z0-9-\\s]/', '', $word);\n\t\t\t\t$score = levenshtein(strtolower($name), strtolower($w));\n\t\t\t\tif ($score <= $threshold)\n\t\t\t\t{\n\t\t\t\t\t$match = new stdclass;\n\t\t\t\t\t\n\t\t\t\t\t$match->score = $score;\n\t\t\t\t\t$match->string = $w;\n\t\t\t\t\t$match->ubio = false;\n\t\t\t\t\n\t\t\t\t\tif ($score < $best_score)\n\t\t\t\t\t{\n\t\t\t\t\t\t$candidates = array();\n\t\t\t\t\t\t$best_score = $score;\n\t\t\t\t\t}\n\t\t\t\t\t$candidates[$p] = $match;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}\n\t\n\treturn $candidates;\n}", "title": "" }, { "docid": "ccb3d84eae7d11c69b987bdf609c3290", "score": "0.47169822", "text": "function isIsogram(string $string): bool\n{\n if (empty($string)) {\n return true;\n }\n\n $letters = str_split(strtolower($string));\n\n return !(count($letters) > count(array_unique($letters)));\n}", "title": "" }, { "docid": "47fac182506d222060a51a8104177f1a", "score": "0.47115856", "text": "function isPixelSimilar($color, $fuzz){}", "title": "" }, { "docid": "f2a57ead71cc66e6686887d8c50e2275", "score": "0.4704381", "text": "function email_obfuscator($string) {\n $output = '';\n if($string) {\n $emails_matched = ($string) ? extract_all_emails($string) : '';\n if($emails_matched) {\n foreach($emails_matched as $em) {\n $encrypted = antispambot($em,1);\n $replace = 'mailto:'.$em;\n $new_mailto = 'mailto:'.$encrypted;\n $string = str_replace($replace, $new_mailto, $string);\n $rep2 = $em.'';\n $new2 = antispambot($em).'';\n $string = str_replace($rep2, $new2, $string);\n }\n }\n $output = apply_filters('the_content',$string);\n }\n return $output;\n}", "title": "" }, { "docid": "95c58cde858d805663969e9fad108c75", "score": "0.46897143", "text": "function anagram($str1,$str2){\n //if length of strings are not equal\n if(strlen($str1)!=strlen($str2)){\n echo \"Strings are not Anagram\\n\";\n }\n //if length of strings are equal\n else{\n //convert strings into an array\n $str_1=str_split($str1);\n $str_2=str_split($str2); \n //sort both the strings \n sort($str_1);\n sort($str_2);\n //convert back into string\n $new_str1=implode($str_1);\n $new_str2=implode($str_2);\n //now if both strings are equal\n if($new_str1==$new_str2){\n echo \"Strings are Anagram to each other\\n\";\n }\n //if strings not equal\n else{\n echo \"Strings are not an Anagram\\n\";\n }\n }\n }", "title": "" }, { "docid": "9aba0a1d73cddabe69b0f9ed04db51b3", "score": "0.4678833", "text": "public function searchMd5(&$irc,$msg,$channel,$matches,$who) \n\t{\t\t\n\t\t$matches[1] = strtolower($matches[1]);\n\t\tif ($html = file_get_contents('http://www.tobtu.com/md5.php?h=' . $matches[1])) {\n\t\t\tif (preg_match('@' . $matches[1] . '\\:([^\\:]+)[\\:|\\n](.*)$@m', $html, $password)){\n\t\t\t\tif(strpos($password[1], '&lt;notfound&gt;') === false){\n\t\t\t\t\t$irc->sayToChannel($who . ': ' . $matches[1] . ' -> ' . html_entity_decode($password[2]), $channel);\n\t\t\t\t}else{\n\t\t\t\t\t$irc->sayToChannel($who . ': ' . $matches[1] . ' -> not found', $channel);\n\t\t\t\t\tif($irc->debug) echo $html; \n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$irc->sayToChannel($who . ': rate limit exceeded at tobtu.com', $channel);\n\t\t\t\tif($irc->debug) echo $html; \n\t\t\t}\n\t\t}else{\n\t\t\tif($irc->debug) echo \"Problems contacting tobtu.com\\n\"; \n\t\t}\n\t}", "title": "" }, { "docid": "c4dca5c9b2ec0c3a4702803d50de1de9", "score": "0.46761754", "text": "public function passwordsMatch(){\r\n $pass1 = $_POST['firstPassword'];\r\n $pass2 = $_POST['secondPassword'];\r\n if($this->isSameLen){\r\n if($pass1 == $pass2){\r\n return $this->isSamePass = TRUE;\r\n }else{\r\n return $this->message = \"Password characters do not match\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ca29c542f4c13d550bcd049aa20eb88c", "score": "0.46675673", "text": "function matchEmail ($email){\r\n\r\n if (!$this->allowSubdomain){\r\n \r\n $er = $this->defaultEr;\r\n \r\n }else{\r\n \r\n /**\r\n * checking fot @ and returning everyting after it\r\n * we will use it to check for \".\" occurences\r\n */\r\n if ( !($em = strstr ($email, \"@\")) )\r\n return false;\r\n \r\n /**\r\n * if $em is empty we return false and we match the \".\" (dots)\r\n */\r\n if ( !empty ($em) )\r\n preg_match_all (\"'\\.'is\", $em, $matches);\r\n else\r\n return false;\r\n \r\n /**\r\n * if less than 2 \".\" we use the defaultEr cause its the same\r\n * of having no subdomain\r\n */ \r\n if ( count ($matches[0]) > 1 ){\r\n \r\n $er = \"([a-z])+([a-z0-9])+([\\._-]?[a-z0-9])*\"\r\n .\"@\"\r\n .\"(([a-z0-9])+(-?[a-z0-9]+)*){1}\"\r\n .\"((\\.[a-z0-9])+(-?[a-z0-9]+)*)*\"\r\n .\"(\\.([a-z0-9]){2,4}){1,2}\";\r\n }else\r\n \r\n \t$er = $this->defaultEr;\r\n \r\n }\r\n \r\n $this->res = preg_match (\"'^$er$'is\", $email, $matches);\r\n \r\n if ($this->lengthLimit)\r\n $this->res = $this->res && ($matches[0]<=$this->lengthLimit);\r\n \r\n return $this->res; \r\n\r\n }", "title": "" }, { "docid": "f327b6796aa1d950e0e621d774d97b69", "score": "0.4666401", "text": "function checkAccChars($wordText) {\n\t// make sure the check the english-only consonant clusters first\n\t// that way we avoid matching english loan-words from spanish or whatever\n\n\tif (preg_match(\"/(ā|á|ă|à|ē|é|ĕ|è|ī|í|ĭ|ì|ō|ó|ŏ|ò|ü|ǘ|ǚ|ǜ|ū|ú|ŭ|ù)/i\", $wordText)) {\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "0fa4c337e65cc4ecb27f7ec08dc6d4c5", "score": "0.46618038", "text": "public static function foldable(string $subject)\n {\n return mb_convert_case($subject, MB_CASE_LOWER) !== mb_convert_case($subject, MB_CASE_UPPER);\n }", "title": "" }, { "docid": "e7d772734c23930fe7746ed04337a81e", "score": "0.46607736", "text": "public function allLettersGuessed()\n {\n return strpos($this->getWordMask(), GameConstants::SPACER) === false;\n }", "title": "" }, { "docid": "59664dccdf85445f8e82d27352c268de", "score": "0.46600452", "text": "function cisin($subject, $chars) {\n\t$s2 = str_split($chars);\n\tforeach($s2 as &$c) {\n\t\tif(strrpos($subject, $c) === FALSE)\n\t\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}", "title": "" }, { "docid": "4228929b7d13ef607fe5c2e729520cac", "score": "0.46559417", "text": "public function similarity($file)\n {\n return (double) 1 - ($this->compare($file) / strlen($this->bin));\n }", "title": "" }, { "docid": "c3216753491fba45f5223e18b0f51320", "score": "0.46548408", "text": "function checkPasswordStrength($val) {\n//$val string to be evaluated\n\tif (preg_match_all('$\\S*(?=\\S{6,})(?=\\S*[a-z])(?=\\S*[A-Z])(?=\\S*[\\d])\\S*$', $val)) {\n\t\t//if string contains at least 6 characters, 1 uppercase, and 1 lower case:\n\t\tif (!preg_match('$(?=\\S*[\\W])$', $val)) {\n\t\t\t//..and if string DOES NOT contain any special characters (underscores accepted),\n\t\t\tif (strlen($val) <= 25) {\n\t\t\t\t//....and if the string is 25 characters or less,\n\t\t\t\tif ($val != $_POST['username']) {\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\t//else if string does not match the above criteria, \n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "227d692f8cb8db261e363558e9106bc1", "score": "0.46547455", "text": "function translate_does_it_match_language($test) {\n global $squirrelmail_language;\n $true = 1;\n $false = 0;\n $index = 0;\n $smindex = 0;\n\n if (! $test || ! $squirrelmail_language) {\n return $false;\n }\n\n if ($test[$index] == '!') {\n $index ++;\n $true = 0;\n $false = 1;\n }\n\n if (($index == 0) && ($test == $squirrelmail_language)) {\n return $true;\n }\n\n while (isset($test[$index]) && $test[$index]) {\n if ($test[$index] == '*') {\n return $true;\n }\n if ($test[$index] != $squirrelmail_language[$smindex]) {\n return $false;\n }\n $index ++;\n $smindex ++;\n }\n\n return $false;\n}", "title": "" }, { "docid": "5ea053437e054e2b6e6fbdff55a2b68e", "score": "0.465281", "text": "public function testEmail() {\n $valid_email_1 = \"[email protected]\";\n $valid_email_2 = \"[email protected]\";\n $valid_email_3 = \"[email protected]\";\n $valid_email_4 = \"r<htm>@class.php\";\n $in_valid_email_1 = \"13330255000\";\n $in_valid_email_2 = \"<iframe>@<source.com>\";\n $this->assertTrue(checkSanityEmail($valid_email_1) == true);\n $this->assertTrue(checkSanityEmail($valid_email_2) == true);\n $this->assertTrue(checkSanityEmail($valid_email_3) == true);\n $this->assertTrue(checkSanityEmail($valid_email_4) == false);\n $this->assertTrue(checkSanityEmail($in_valid_email_2) == false);\n $this->assertTrue(checkSanityEmail($in_valid_email_2) == false);\n }", "title": "" }, { "docid": "54e259343897deba164d3f3cf4f5b752", "score": "0.4646163", "text": "public function isCorrectlySpelled();", "title": "" }, { "docid": "3ad84b4bb3959d9440c0ba5cf40dc212", "score": "0.46437362", "text": "function designerPdfViewer($h, $word) {\n $letterVal = $max = $j = 0;\n for($j=0;$j<strlen($word);$j++){\n for($i=97;$i<124;$i++){\n if(chr($i) == $word[$j]){\n break;\n }\n $letterVal++;\n }\n if($h[$letterVal] > $max){\n $max = $h[$letterVal];\n }\n $letterVal = 0;\n }\n \n return strlen($word)*$max;\n\n}", "title": "" }, { "docid": "9c4d949000c19b318e40904c44dbb5b8", "score": "0.4640209", "text": "public static function strength($RawPassword)\n {\n $score = 0;\n\n //initial score is the entropy of the password\n $entropy = self::Entropy($RawPassword);\n $score += $entropy/4; //maximum entropy is 8\n\n //check for common patters\n $ordered = self::hasOrderedCharacters($RawPassword, strlen($RawPassword)/2);\n $fullyOrdered = self::hasOrderedCharacters($RawPassword, strlen($RawPassword));\n $hasKeyboardOrder = self::hasKeyboardOrderedCharacters($RawPassword,strlen($RawPassword)/2);\n $keyboardOrdered = self::hasKeyboardOrderedCharacters($RawPassword,strlen($RawPassword));\n\n //If the whole password is ordered\n if ($fullyOrdered)\n $score*=.1;\n\n //If half the password is ordered\n elseif ($ordered)\n $score*=.5;\n\n //If the whole password is keyboard ordered\n if ($keyboardOrdered)\n $score*=.15;\n\n //If half the password is keyboard ordered\n elseif ($hasKeyboardOrder)\n $score*=.5;\n\n //If the whole password is a date\n if (self::isDate( $RawPassword))\n $score*=.2;\n\n //If the password contains a date\n elseif (self::containsDate( $RawPassword))\n $score*=.5;\n\n //If the whole password is a phone number\n if (self::isPhoneNumber( $RawPassword))\n $score*=.5;\n\n //If the password contains a phone number\n elseif (self::containsPhoneNumber( $RawPassword))\n $score*=.9;\n\n //If the password contains a double word\n if (self::containDoubledWords( $RawPassword))\n $score*=.3;\n\n //check for variety of character types\n preg_match_all (\"/\\d/i\", $RawPassword, $matches); //password contains digits\n $numbers = count($matches[0]) >= 1;\n\n preg_match_all (\"/[a-z]/\", $RawPassword, $matches); //password contains lowercase alphabets\n $lowers = count($matches[0]) >= 1;\n\n preg_match_all (\"/[A-Z]/\", $RawPassword, $matches); //password contains uppercase alphabets\n $uppers = count($matches[0]) >= 1;\n\n preg_match_all (\"/[^A-z0-9]/\", $RawPassword, $matches); //password contains special characters\n $others = count($matches[0]) >= 1;\n\n //calculate score of the password after checking type of characters present\n $setMultiplier = ($others + $uppers + $lowers + $numbers)/4;\n\n //calculate score of the password after checking the type of characters present and the type of patterns present\n $score = $score/2 + $score/2*$setMultiplier;\n\n return min(1, max(0, $score)); //return the final score\n\n }", "title": "" }, { "docid": "dff79d2ca55c3baff00089936de9b00a", "score": "0.46357918", "text": "function captcha_check($str){\n\t\t$sql='SELECT COUNT(*) AS count FROM captcha WHERE word=? AND ip_address=? AND captcha_time>?';\n\t\t$binds=array($str,$this->input->ip_address(),$this->expiration);\n\t\t$query=$this->db->query($sql,$binds);\n\t\t$row=$query->row();\n\t\tif($row->count==0){\n\t\t\t$this->form_validation->set_message('captcha_check', 'Submit the word appearing on the image');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "6c9e2b8f016315382e0328914a3aab64", "score": "0.46350217", "text": "function P_Mail_Paldio_Check( $Mail )\n{\n $Array = array(\n \"P\",\n \"^@em\\\\.nttpnet\\\\.ne\\\\.jp\\$\",\n \"^@[a-z0-9]+\\\\.em\\\\.nttpnet\\\\.ne\\\\.jp\\$\",\n FALSE\n );\n\n return P_Mail_Carrier_Match( $Mail, $Array );\n}", "title": "" }, { "docid": "254f5887b1b2ad18d0e8abdc97f879cc", "score": "0.46342748", "text": "public static function ssPhraseComp(string $needle, string $haystack, int $minCharPerWord = 3): bool\n {\n $needleArr = explode(' ', $needle);\n $matchFailed = false;\n //Before we do the complex check, try do a ssComp of the strings\n if (ssComp($needle, $haystack)) {\n $matched = true;\n } else {\n for ($i=0;$i<count($needleArr);$i++) {\n //Skip any words under the $minCharPerWord\n if (strlen($needleArr[$i]) >= $minCharPerWord) {\n //logIt('Checking for needle ('.sStrip($needleArr[$i]).') within haystack ('.$haystack.')');\n if (strpos(self::sStrip($haystack), self::sStrip($needleArr[$i])) !== false) {\n //logIt('needle found');\n $matched = true;\n } else {\n $matchFailed = true;\n }\n }\n }\n }\n if ($matched && !$matchFailed) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "dad892b89c1e0ab75b4208851c0da4d3", "score": "0.46254632", "text": "function checkSpam($email,$phone,$comments,$dealer=\"\", $notifyAddress=\"\",$mode=\"warning\", $threshold=2){\n\t\t$maybeSpam = array();\n\t// set the hours to send e-mails (so we don't get a shit-ton overnight and on weekends)\n\t\tif( date(\"w\") > 0 && date(\"w\") < 6 && date(\"H\") >=9 && date(\"H\") < 17 )\n\t\t\t$isDuringBizHours = true;\n\t// check against known suspicious domains\n\t\t$spamEmails = array(\"\\.ru\",\"\\.yandex\",\"\\.cn\",\"\\.talkwithcustomer\\.com\");\n\t\tif(preg_match('/('.implode('|', $spamEmails).')$/i', $r_email)){\n\t\t\t$maybeSpam[]=\"E-mail domain is suspicious.\";\n\t\t}\n\t/*** This section is remmed out until we can look into issues with the API timing out.\n\t// Check this e-mail address's reputation (see dox at https://emailrep.io/ )\n\t\t// To test a bad e-mail use: [email protected]\n\t\t$ts1=time();\n\t\t$url = \"http://emailrep.io/$email\";\n\t\t$options = array( 'http' => array(\n\t\t 'max_redirects' => 1,\n\t\t 'timeout' => 5,\n\t\t ) );\n\t\t$context = stream_context_create( $options );\n\t\t$content = file_get_contents( $url, false, $context );\n\t\t$emailReputation = json_decode($content,true);\n\t\t//$emailReputation = json_decode(file_get_contents(\"http://emailrep.io/$email\"),true);\n\t\t$ts2=time();\n\t\tif($content !== false) {\n\t\t\tif($emailReputation['suspicious'] == true) {\n\t\t\t\t$maybeSpam[] = \"EmailRep.io identified this email as suspicious.\";\n\t\t\t\tif($emailReputation['details'][\"blacklisted\"] != false) { $maybeSpam[]=\"Email has been blacklisted.\"; }\n\t\t\t\tif($emailReputation['details'][\"malicious_activity\"] != false) { $maybeSpam[]=\"Email known for malicious activity.\"; }\n\t\t\t\tif($emailReputation['details'][\"malicious_activity_recent\"] != false) { $maybeSpam[]=\"Email has recent history of malicious activity.\"; }\n\t\t\t\tif($emailReputation['details'][\"credentials_leaked\"] != false) { $maybeSpam[]=\"Credentials leaked for this email.\"; }\n\t\t\t\tif($emailReputation['details'][\"data_breach\"] != false) { $maybeSpam[]=\"Email was data breached.\"; }\n\t\t\t\tif($emailReputation['details'][\"domain_exists\"] != true) { $maybeSpam[]=\"Email domain is not valid.\"; }\n\t\t\t\tif($emailReputation['details'][\"suspicious_tld\"] != false) { $maybeSpam[]=\"Email domain is suspicious.\"; }\n\t\t\t\tif($emailReputation['details'][\"spam\"] != false) { $maybeSpam[]=\"Email is known for Spammy behavior.\"; }\n\t\t\t\tif($emailReputation['details'][\"free_provider\"] != false) { $maybeSpam[]=\"Email uses a free provider.\"; }\n\t\t\t\tif($emailReputation['details'][\"disposable\"] != false) { $maybeSpam[]=\"Email is a disposable address.\"; }\n\t\t\t\tif($emailReputation['details'][\"deliverable\"] != true) { $maybeSpam[]=\"Email is not deliverable.\"; }\n\t\t\t\tif($emailReputation['details'][\"valid_mx\"] != true) { $maybeSpam[]=\"Email does not have a valid MX record\"; }\n\t\t\t\tif($emailReputation['details'][\"spoofable\"] == true) { $maybeSpam[]=\"Email can be spoofed (e.g. not a strict SPF policy or DMARC is not enforced\";}\n\t\t\t\tif(empty($emailReputation['details'][\"profiles\"])) { $maybeSpem[] = \"Email has no known profiles on major social media networks.\";}\n\t\t\t} // if suspicious\n\t\t}// if !empty emailReputation\n\t\telse { // if emailReputation was false, that means the API request timed out.\n\t\t\tmail(\"<EMAIL ADDRESS HERE>\",\"emailRep API timed out\",\"checkSpamFunction aborted the EmailRep.io API call because it took too long. (\".($ts2-$ts1).\" seconds).\\n\\n Location: \".$_SERVER['SCRIPT_FILENAME'].\" at line \". __LINE__ .\". \\n\\n POST: \".print_r($_POST,true));\n\t\t}\n\t\t/** End email reputation code **/\n\t\t//not all forms require phone numbers (e.g. tellfriend), so skip this part if there is no $phone\n\t\tif($phone >''){\n\t\t\t// Because most of our clients are brick-and-morter storefronts who don't do international business, \n\t\t\t// this will flag any phone number that doesn't look like a valid U.S./Can/Mex phone number.\n\t\t\t// Test for more then 5 repeated digits in the phone number\n\t\t\t$phoneRegex = \"(\\d)(\\1){4,}\";\n\t\t\tif(preg_match(\"/$phoneRegex/\",preg_replace(\"/^D/\",\"\",$phone))){\n\t\t\t\t$maybeSpam[] = \"Phone number contains 5 or more repeated digits.\";\n\t\t\t\techo \"Phone number $phone <br>\";\n\t\t\t\techo 'preg_match(\"/'.$phoneRegex.'/\",preg_replace(\"/^D/\",\"\",'.$phone.')) <br>';\n\t\t\t\techo preg_replace(\"/^D/\",\"\",$phone);\n\t\t\t}\n\t\t\t// Test to see if number is a valid U.S. phone number\n\t\t\t$phoneNumberRegex = \"^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$\";\n\t\t\tif(!preg_match(\"/$phoneNumberRegex/\",$phone)) {\n\t\t\t\t$maybeSpam[] = \"Phone number not a valid U.S. number.\";\n\t\t\t}\n\t\t}\n\t\tif($email >\"\") { // test to see if e-mail is a valid address\n\t\t\t$regex=\"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$\";\n\t\t\tif(!preg_match(\"/$regex/\",$email)){\n\t\t\t\t$maybeSpam[] = \"Email does not seem valid.\";\n\t\t\t}\n\t\t}\n\t\tif($comments > \"\") { // to prevent false positives if there are no comments\n\t\t\t// Test to see if more than 20% of the content contains foriegn or extended non-ASCII characters.\n\t\t\t\t$extCharactersRegex = \"([^\\sA-Za-z0-9';.,!\\$%&()’“”])\";\n\t\t\t\tpreg_match_all(\"/$extCharactersRegex/\",$comments,$extMatches);\n\t\t\t\t$numExtChars = sizeof($extMatches[0]);\n\t\t\t\t$lengthComments = strlen($comments);\n\t\t\t\t$ratio = $numExtChars / $lengthComments;\n\t\t\t\tif($ratio > 0.20){\n\t\t\t\t\t$maybeSpam[] = \"Large amount of foriegn or non-letter characters. Ratio of ext. chars ($numExtChars) to total chars ($lengthComments) is \".number_format($ratio,2).\" Threshold is .20\";\n\t\t\t\t}\n\t\t\t// Test to see if the comments contains a link\n\t\t\t\t$urlRegex=\"/(http|ftp|https):\\/\\/([\\w_-]+(?:(?:\\.[\\w_-]+)+))([\\w.,@?^=%&:\\/~+#-]*[\\w@?^=%&\\/~+#-])?/i\";\n\t\t\t\tif(preg_match(\"$urlRegex\",$comments)){\n\t\t\t\t\t$maybeSpam[] = \"Comments contains a URL\";\n\t\t\t\t}\n\t\t\t// Test to see if comments contain pre-determined \"Bad text\"\n\t\t\t\t$badText = array ( \"FeedbackFormEU\", \"FeedbackForm2019\", \"make-success.com\",\"formblasting\", \"@FeedbackMessages\", \"[email protected]\", \"TERMINATION OF DOMAIN\" );\n\t\t\t\tforeach($badText as $badword){\n\t\t\t\t\t$find = preg_match(\"/$badword/\",$comments);\n\t\t\t\t\tif($find > 0){\n\t\t\t\t\t\t$maybeSpam[]=\"Text contains spammy word: '$badword'\";\n\t\t\t\t\t\t$mode=\"enforce\";\n\t\t\t\t\t\t$kill = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// See If comments contains an e-mail AND that e-mail is different than the given e-mail address.\n\t\t}\n\t\t// Build the warning message\n\t\tif(sizeof($maybeSpam)>0) {\n\t\t\t$spamWarning = \"This message was flagged based on the following criteria:<p>\";\n\t\t\tforeach($maybeSpam as $reason){\n\t\t\t\t$spamWarning .= \"- $reason \\r\\n\";\n\t\t\t}\n\t\t\t$spamWarning .= \"</P>From IP: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t//// Log this spam to the database.\n\t\t\t\tinclude \"<< DATABASE CONNECTION INCLUDE HERE >>\";\n\t\t\t\tpreg_match(\"/^.*(@\\w+\\.\\w+)/\",$email,$tld);\n\t\t\t\tif($kill==true) $status = \"red\";\n\t\t\t\telse $status=\"grey\";\n\t\t\t\t$addSql = \"INSERT INTO `SpamTracker` (`IP`, `Email`, `LastSeen`, `CameFrom`, `TLD`, `Dealer`, `SpamScore`, `SpamReasons`,`SpamContent`,`FullPost`,`FromPage`,`Status`) VALUES ('\".$_SERVER['REMOTE_ADDR'] . \"', '$email', CURRENT_TIMESTAMP, '\".$_SERVER['SCRIPT_FILENAME'].\"', '\".$tld[1].\"', '$dealer', '\".sizeof($maybeSpam).\"', '\" . mysqli_real_escape_string($conn00, json_encode($maybeSpam)).\"','\". mysqli_real_escape_string($conn00,$comments).\"', '\" . mysqli_real_escape_string($conn00, json_encode($_POST)) . \" ', '\" . $_SERVER['SCRIPT_FILENAME'] . \"','$status');\";\n\t\t\t\t$addQry = mysqli_query($conn00,$addSql);\n\t\t\t\tif(!$addQry || mysqli_error($conn00)) mail(\"<<EMAIL ADDRESS HERE>>\",\"ERROR: checkspam error Mysql \",mysqli_error($conn00).\" \\n \".mysqli_connect_error().\"\\n$addSql \\n checkSpamFunction\".__LINE__);\n\t\t\t\t$spamID = mysqli_insert_id($conn00);\n\t\t\t\tmysqli_close($conn00);\n\t\t\t//// Send email notification\n\t\t\t$mailTo = \"<< EMAIL ADDRESS HERE >>\";\n\t\t\t$mailHeaders = \"MIME-Version: 1.0\\nContent-type: text/html; charset=UTF-8\\n\";\n\t\t\t$mailStyle = \" * {font-face:arial}\n\t\t\t.red {background-color:red;}\n\t\t\t.green {background-color:#080;}\n\t\t\t.btn { border:none; border-radius:8px; padding:4px;}\n\t\t\ta.btn { color:#fff; text-decoration:none; font-weight: bold;}\n\t\t\t\";\n\t\t\t$mailBody = \"<html><head><style>$mailStyle</style></head><body>\";\n\t\t\t$mailBody .= \"Dealer $dealer received a lead that may be spam.\";\n\t\t\tif($kill) {\n\t\t\t\t$mailBody .= '<P class=\"red\"> THIS MESSAGE WAS BLOCKED and STATUS AUTO-SET to \"CONFIRMED SPAM\".</p>';\n\t\t\t} else {\n\t\t\t\t$mailBody .= '<P><a href = \"<< DOMAIN >> spamtracker.php?updateid='.$spamID.'&status=red\" class=\"btn red\">CONFIRM SPAM</a>';\n\t\t\t\t$mailBody .= '<a href = \"<< DOMAIN >> /spamtracker.php?updateid='.$spamID.'&status=green\" class=\"btn green\"> This is not Spam</a> </p> ';\n\t\t\t}\n\t\t\t$mailBody .= '<P> <a href=\"<< DOMAIN >>spamtracker.php?id='.$spamID.'\">Manage/Edit this listing</a> </P>';\n\t\t\t$mailBody .= \"<p> \". str_replace(\"\\r\\n\",\"<br>\",$spamWarning) .\" </P> checkSpam function received: <BR> email: $email<BR>Phone: $phone<BR>Comments: $comments<BR>Dealer: $dealer<BR>notifyAddress:$notifyAddress<BR> mode: $mode<BR>Threshold: $threshold </P>\n\t\t\t\tFULL POST:<pre>\".print_r($_POST,true).\"</pre> <P> generated by \".$_SERVER['SCRIPT_FILENAME'].\". </body></html>\";\n\t\t\tif($notifyAddress>'') $mailto.=\",$notifyAddress\";\n\t\t\tif(!$debug && $isDuringBizHours) {\n\t\t\t\tmail($mailTo,\"Possible spam from website lead\",$mailBody,$mailHeaders);\n\t\t\t}\n\t\t\t// if mode==\"enforce\" block the mail from sending if sizeof($maybeSpam) > threshold\n\t\t\tif(($mode=='enforce' && sizeof($maybeSpam) >= $threshold) || $kill == true) {\n\t\t\t\tarray_unshift($maybeSpam,\"BLOCK\");\n\t\t\t\tdie(\"Thank You. Your message was sent. <a href=/>Back to site</a>\");\n\t\t\t}\n\t\t\treturn $maybeSpam;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e05a2a86b47c2adba535101736650396", "score": "0.4621173", "text": "private function count_specialChars()\n {\n // RETURN : no special chars\n if ( empty( $this->indexBrowserTab[ 'initials' ][ 'specialChars' ] ) )\n {\n return;\n }\n // RETURN : no special chars\n // Get a row with the SQL length for each special char\n $arrSpecialChars = explode( ',', $this->indexBrowserTab[ 'initials' ][ 'specialChars' ] );\n $arr_return = $this->zz_getSqlLengthAsRow( $arrSpecialChars );\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n return $arr_return;\n }\n $row = $arr_return[ 'data' ][ 'row' ];\n unset( $arr_return );\n // Get a row with the SQL length for each special char\n // Get the sum for each special char initial\n $arr_return = $this->count_specialChars_addSum( $row );\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n return $arr_return;\n }\n // Get the sum for each special char initial\n }", "title": "" }, { "docid": "1a97c6cb404795f7822172464bfd044e", "score": "0.46162218", "text": "function isEmail($email) {\n\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n}", "title": "" }, { "docid": "c9fbca8fad762b773f5801b26e55bd6d", "score": "0.4615142", "text": "function bonMail($adresse)\n{\n\tif(strlen($adresse)>254)\n\t{\n\t\treturn false;\n\t}\n\n\n //Caractères non-ASCII autorisés dans un nom de domaine .eu :\n\n $nonASCII='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ũūŭůűųŵŷźżztșțΐάέήίΰαβγδεζηθικλμνξοπρςστυφ';\n $nonASCII.='χψωϊϋόύώабвгдежзийклмнопрстуфхцчшщъыьэюяt';\n $nonASCII.='ἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔ';\n $nonASCII.='ὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗ';\n $nonASCII.='ᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷ';\n // note : 1 caractète non-ASCII vos 2 octets en UTF-8\n\n\n\t$syntaxe=\"#^[[:alnum:][:punct:]]{1,64}@[[:alnum:]-.$nonASCII]{2,253}\\.[[:alpha:].]{2,6}$#\";\n\n\tif(preg_match($syntaxe,$adresse))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "299dc0f13d0b95dd2fec631948874004", "score": "0.46091062", "text": "public function similarNames($name, $country){}", "title": "" }, { "docid": "a7adc15d680c2c9f397bea7d06d70e50", "score": "0.46053904", "text": "function ProcentVoorkomst2($argument)\n\t{\n\t\tstatic $md5HashKey = \"d1fa402db91a7a93c4f414b8278ce073\";\n\t\t$hashKeyConverted = str_split($md5HashKey, 1);\n\n\t\t$parameter2 = \"8\";\n\n\t\tstatic $teller = 0;\n\n\t\tfor($j = 0; $j < strlen($md5HashKey); $j++)\n\t\t{\n\t\t\tif($hashKeyConverted[$j] == $parameter2)\n\t\t\t{\n\t\t\t\t$teller++;\n\t\t\t}\n\t\t}\n\n\t\treturn $teller / strlen($md5HashKey) * 100;\n\t}", "title": "" }, { "docid": "5324d18c0ccb9d68d96fd6b4b70b850a", "score": "0.45992815", "text": "function evalContainScore($match, $str1, $str2) {\n\t$score = 0;\n\t$patterns = preg_split(\"/\\s+/\", $match);\n\tforeach ($patterns as $p) {\n\t\tprint $p.\"\\t\".$str1.\" \".preg_match(\"/\".$p.\"/i\",$str1).\"\\n\\t\".$str2.\" \".preg_match(\"/\".$p.\"/i\",$str2).\"\\n\";\n\t\t$score+=preg_match(\"/\".$p.\"/i\",$str1);\n\t\t$score+=preg_match(\"/\".$p.\"/i\",$str2);\n\t}\n\treturn intval($score,10);\n}", "title": "" }, { "docid": "1573235d0f4e807ab19539ac729c152f", "score": "0.45992756", "text": "function frequencyOfCharacters(string $text) {\n $text = mb_strtoupper($text);\n $unique = [];\n\n $lines_arr = preg_split('/\\r\\n/', $text);\n $num_newlines = count($lines_arr) - 1;\n if ($num_newlines) {\n $unique['paragraph'] = $num_newlines;\n }\n\n $text = str_replace(\"\\r\\n\", \"\", $text);\n\n for ($i = 0; $i < mb_strlen($text); $i++) {\n $char = mb_substr($text, $i, 1);\n if (!array_key_exists($char, $unique)) {\n $unique[$char] = 0;\n }\n $unique[$char]++;\n }\n\n arsort($unique);\n $max_value = $unique ? max($unique) : null;\n\n $result = '<table>';\n $result .= '<tr><td>Character</td><td>Frequency</td><td>Percentage</td></tr>';\n foreach ($unique as $character => $number) {\n $percentage = round($number / $max_value * 100, 1);\n $character = str_replace(\" \", 'space', $character);\n $result .= '<tr><td>' . $character . '</td><td>' . $number . '</td><td>' . $percentage . '</td></tr>';\n }\n $result .= '</table>';\n\n return $result;\n}", "title": "" }, { "docid": "a2868fa23ff6588735edff5c84f37498", "score": "0.459411", "text": "function is_md5($string, $caseInsensitive = false)\n{\n if (!is_string($string)) {\n return false;\n }\n $regex = '/[0-9a-f]{32}/';\n $caseInsensitive && $regex .= 'i';\n return (bool) preg_match($regex, $string);\n}", "title": "" }, { "docid": "7ec4d4ded3bf7f92d2159ecc8c7ac4a5", "score": "0.4588267", "text": "function doubleEmail($email, $b) {\n\t\twhile($emailaddr = mysqli_fetch_array($b)){\n\t\t\tif($emailaddr['email'] == $email){\n\t\t\t\treturn 'Diese EMail Adresse wird bereits benutzt</br>';\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "bb53a6eac0fc3640810643800b98cefd", "score": "0.45831332", "text": "function generateCaptchaTextMarkovClean($length) {\n\tdo {\n\t\t$cleanText = generateCaptchaTextMarkov($length);\n\t} while (\n\t\t// http://en.wikipedia.org/wiki/List_of_profane_words\n\t\t(preg_match('/anal/', $c) > 0) ||\n\t\t(preg_match('/anus/', $c) > 0) ||\n\t\t(preg_match('/arse/', $c) > 0) ||\n\t\t(preg_match('/bitch/', $c) > 0) ||\n\t\t(preg_match('/blow/', $c) > 0) ||\n\t\t(preg_match('/boner/', $c) > 0) ||\n\t\t(preg_match('/boob/', $c) > 0) ||\n\t\t(preg_match('/butt/', $c) > 0) ||\n\t\t(preg_match('/clit/', $c) > 0) ||\n\t\t(preg_match('/cock/', $c) > 0) ||\n\t\t(preg_match('/crap/', $c) > 0) ||\n\t\t(preg_match('/cum/', $c) > 0) ||\n\t\t(preg_match('/cunt/', $c) > 0) ||\n\t\t(preg_match('/dick/', $c) > 0) ||\n\t\t(preg_match('/dildo/', $c) > 0) ||\n\t\t(preg_match('/edema/', $c) > 0) ||\n\t\t(preg_match('/erect/', $c) > 0) ||\n\t\t(preg_match('/fag/', $c) > 0) ||\n\t\t(preg_match('/fart/', $c) > 0) ||\n\t\t(preg_match('/fuck/', $c) > 0) ||\n\t\t(preg_match('/hell/', $c) > 0) ||\n\t\t(preg_match('/hore/', $c) > 0) ||\n\t\t(preg_match('/jack/', $c) > 0) ||\n\t\t(preg_match('/jerk/', $c) > 0) ||\n\t\t(preg_match('/niger/', $c) > 0) ||\n\t\t(preg_match('/penis/', $c) > 0) ||\n\t\t(preg_match('/piss/', $c) > 0) ||\n\t\t(preg_match('/porn/', $c) > 0) ||\n\t\t(preg_match('/prick/', $c) > 0) ||\n\t\t(preg_match('/piss/', $c) > 0) ||\n\t\t(preg_match('/pubi/', $c) > 0) ||\n\t\t(preg_match('/pussy/', $c) > 0) ||\n\t\t(preg_match('/semen/', $c) > 0) ||\n\t\t(preg_match('/sex/', $c) > 0) ||\n\t\t(preg_match('/shag/', $c) > 0) ||\n\t\t(preg_match('/shit/', $c) > 0) ||\n\t\t(preg_match('/slut/', $c) > 0) ||\n\t\t(preg_match('/sperm/', $c) > 0) ||\n\t\t(preg_match('/suck/', $c) > 0) ||\n\t\t(preg_match('/tit/', $c) > 0) ||\n\t\t(preg_match('/wank/', $c) > 0) ||\n\t\t(preg_match('/whore/', $c) > 0)\n\t\t);\n\n\treturn $cleanText;\n}", "title": "" } ]
a546d7f16b2d45d31e2ec228e4137b3d
setJmlJambanPTg() Set the value of [jml_jamban_lp_g] column.
[ { "docid": "3346c01e64155c632ff51cd6b5b2424a", "score": "0.77635574", "text": "public function setJmlJambanLpG($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_lp_g !== $v) {\n $this->jml_jamban_lp_g = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_LP_G;\n }\n\n\n return $this;\n }", "title": "" } ]
[ { "docid": "852d2bd4df68e94c883b20dd9246d791", "score": "0.7805854", "text": "public function setJmlJambanPTg($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_p_tg !== $v) {\n $this->jml_jamban_p_tg = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_P_TG;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "86ac6e81d6ac6e1fb26fa65f0cad450b", "score": "0.7652098", "text": "public function setJmlJambanPG($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_p_g !== $v) {\n $this->jml_jamban_p_g = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_P_G;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "47d3fe3de3556e7abf0767d2a33ac1ea", "score": "0.75352883", "text": "public function getJmlJambanPG()\n {\n return $this->jml_jamban_p_g;\n }", "title": "" }, { "docid": "e471f545ab3e3feffe6bb9f83ef24f4c", "score": "0.7519827", "text": "public function getJmlJambanLpG()\n {\n return $this->jml_jamban_lp_g;\n }", "title": "" }, { "docid": "82b89768225e49bfa67f426c315e6ffd", "score": "0.745858", "text": "public function getJmlJambanPTg()\n {\n return $this->jml_jamban_p_tg;\n }", "title": "" }, { "docid": "e757d54d52fc5d106939775977b93057", "score": "0.72781384", "text": "public function setJmlJambanLpTg($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_lp_tg !== $v) {\n $this->jml_jamban_lp_tg = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_LP_TG;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "3441b055b981c6d7fb676987a3859eac", "score": "0.7130983", "text": "public function setJmlJambanLG($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_l_g !== $v) {\n $this->jml_jamban_l_g = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_L_G;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "106e53567978f7965094c8b1c7db379a", "score": "0.70296943", "text": "public function getJmlJambanLG()\n {\n return $this->jml_jamban_l_g;\n }", "title": "" }, { "docid": "2ce7c8a5e79619594fb6000b0c147ebd", "score": "0.6988561", "text": "public function getJmlJambanLpTg()\n {\n return $this->jml_jamban_lp_tg;\n }", "title": "" }, { "docid": "00ca1198416a0dd64fe2aaa9ac6bf005", "score": "0.6828395", "text": "public function getJmlJambanLTg()\n {\n return $this->jml_jamban_l_tg;\n }", "title": "" }, { "docid": "c1af6d818207de7051e7b530a7727c3c", "score": "0.670935", "text": "public function setJmlJambanLTg($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jml_jamban_l_tg !== $v) {\n $this->jml_jamban_l_tg = $v;\n $this->modifiedColumns[] = SanitasiPeer::JML_JAMBAN_L_TG;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "8b584dce8e30732af9276b6df61c85a5", "score": "0.5435645", "text": "public function testSetPlafondGmp() {\n\n $obj = new Employes();\n\n $obj->setPlafondGmp(10.092018);\n $this->assertEquals(10.092018, $obj->getPlafondGmp());\n }", "title": "" }, { "docid": "e440e4041f3118f97c51e651f0cb58cf", "score": "0.530167", "text": "public function setPanjang($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (double) $v;\n }\n\n if ($this->panjang !== $v) {\n $this->panjang = $v;\n $this->modifiedColumns[] = BangunanPeer::PANJANG;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "904c7b0829efc6d049fd60c5f4e3245e", "score": "0.51465374", "text": "public function getACerminJambanP()\n {\n return $this->a_cermin_jamban_p;\n }", "title": "" }, { "docid": "a77559972c036a0202d89d79cea61e15", "score": "0.51072127", "text": "public function getJambanDifabel()\n {\n return $this->jamban_difabel;\n }", "title": "" }, { "docid": "a56d7a355b68ef5512596b05766baa71", "score": "0.5027122", "text": "public function setPanjRengM($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->panj_reng_m !== $v) {\n $this->panj_reng_m = $v;\n $this->modifiedColumns[] = BangunanPeer::PANJ_RENG_M;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "72af7c3f43a298451638b2a6109f3b39", "score": "0.5024473", "text": "public function setACerminJambanP($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->a_cermin_jamban_p !== $v) {\n $this->a_cermin_jamban_p = $v;\n $this->modifiedColumns[] = SanitasiPeer::A_CERMIN_JAMBAN_P;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "b0334e469920187f58aaf87e4bd6ae72", "score": "0.5016351", "text": "public function setTipeJamban($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->tipe_jamban !== $v) {\n $this->tipe_jamban = $v;\n $this->modifiedColumns[] = SanitasiPeer::TIPE_JAMBAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "456449bf525ec1befde2e197a7916131", "score": "0.50153697", "text": "public function setPanjKasoM($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->panj_kaso_m !== $v) {\n $this->panj_kaso_m = $v;\n $this->modifiedColumns[] = BangunanPeer::PANJ_KASO_M;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "22fd8a9092b47a0a2d2c905728426b63", "score": "0.49851057", "text": "protected function checkJMBG()\n {\n if ($this->jmbg === NULL) {\n throw new JMBGException('JMBG is not set. Use $jmbg->setJMBG(); to set one.');\n }\n }", "title": "" }, { "docid": "91404c0901b0bf699c9bf8c8453d9eb8", "score": "0.4935892", "text": "function set_luaspersegipanjang($p, $l){\n \t\t$this->panjang = $p;\n \t\t$this->lebar = $l;\n \t}", "title": "" }, { "docid": "6911dfef990a62234ed89f298749e28a", "score": "0.49123496", "text": "public function setMataPelajaran($mata_pelajaran);", "title": "" }, { "docid": "5d92e03bbe2d60be92934bfa26a1d7f9", "score": "0.4882169", "text": "public function getPanjang()\n {\n return $this->panjang;\n }", "title": "" }, { "docid": "fa55f8983ae5473856b3378723ecbbba", "score": "0.48581177", "text": "public function getLembagaPengangkatId()\n {\n return $this->lembaga_pengangkat_id;\n }", "title": "" }, { "docid": "9b5029d4e024a688fffd9c2b7d470a98", "score": "0.48081324", "text": "public function setJadwalDimulai($jadwal_dimulai);", "title": "" }, { "docid": "0ebca684b37546ea615cd12e0e38ac0a", "score": "0.46911985", "text": "public function getTipeJamban()\n {\n return $this->tipe_jamban;\n }", "title": "" }, { "docid": "f83de47941de749c3d23bd837b116adc", "score": "0.46763325", "text": "public function setNamaPelajaran($nama_pelajaran);", "title": "" }, { "docid": "cde066f43f592d7a47f776a5435171f3", "score": "0.46653292", "text": "public function actionSetPermintaanKePenunjang(){\n\t\tif(Yii::app()->request->isAjaxRequest) {\n\t\t\t$format = new MyFormatter();\n\t\t\t$rows = \"\";\n\t\t\t$modPermintaans = ROPermintaanKePenunjangT::model()->findAllByAttributes(array('pasienkirimkeunitlain_id'=>$_POST['pasienkirimkeunitlain_id']));\n\t\t\tif(count($modPermintaans) > 0){\n\t\t\t\tforeach($modPermintaans AS $i => $modPermintaan){\n\t\t\t\t\t$modPemeriksaan = PemeriksaanradM::model()->findByAttributes(array('pemeriksaanrad_id'=>$modPermintaan->pemeriksaanrad_id));\n\t\t\t\t\tif(isset($modPemeriksaan->daftartindakan_id)){\n\t\t\t\t\t\t$modPermintaan->daftartindakan_id = $modPemeriksaan->daftartindakan_id;\n\t\t\t\t\t\t$rows .= $this->renderPartial($this->path_view.\"_rowPermintaanKePenunjang\",array('i'=>0,'modPermintaan'=>$modPermintaan), true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo CJSON::encode(array(\n\t\t\t\t\t'rows'=>$rows));\n\t\t}\n\t\tYii::app()->end();\n\t}", "title": "" }, { "docid": "0fd8826f750b044c3db55007565fffd4", "score": "0.4658792", "text": "public function setLembagaPengangkat(LembagaPengangkat $v = null)\n {\n if ($v === null) {\n $this->setLembagaPengangkatId(NULL);\n } else {\n $this->setLembagaPengangkatId($v->getLembagaPengangkatId());\n }\n\n $this->aLembagaPengangkat = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the LembagaPengangkat object, it will not be re-added.\n if ($v !== null) {\n $v->addSekolahPaud($this);\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "250a7fdcac96ab81b6e9957018676179", "score": "0.46555468", "text": "public function getKieGuruKeamananPangan()\n {\n return $this->kie_guru_keamanan_pangan;\n }", "title": "" }, { "docid": "7bf68a1d6032272de77aea535c5d93eb", "score": "0.4646191", "text": "public function getPanjKasoM()\n {\n return $this->panj_kaso_m;\n }", "title": "" }, { "docid": "95039daeb6d1cc50b60a59f913c1d788", "score": "0.46268696", "text": "public function fixJMBG()\n {\n $this->checkJMBG();\n\n if ($this->isValid()) return $this->getJMBG();\n\n $arr = @$this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $checksum = 11 - (7 * ($A + $G) + 6 * ($B + $H) + 5 * ($C + $I) + 4 * ($D + $J) + 3 * ($E + $K) + 2 * ($F + $L)) % 11;\n\n return \"$A$B$C$D$E$F$G$H$I$J$K$L$checksum\";\n }", "title": "" }, { "docid": "ebdca7c7d9be1025f74b2e0fbbff66f5", "score": "0.46259135", "text": "public function testSetCumPlafondGmp() {\n\n $obj = new Employes();\n\n $obj->setCumPlafondGmp(10.092018);\n $this->assertEquals(10.092018, $obj->getCumPlafondGmp());\n }", "title": "" }, { "docid": "8230940f4e22e1e99ea2df57f5ae63fd", "score": "0.46066144", "text": "private function _isiPengelola($jumlah)\n\t{\n\t\t$this->_isiUser($jumlah, 'pengelola');\n\n\t\techo PHP_EOL;\n\t}", "title": "" }, { "docid": "25f32e542ac423120aac4a354387baea", "score": "0.4593158", "text": "public function jumlah_ampu_bimbingan($bidang){\n\t\t$query=\"SELECT dosen.nama AS dos_bing, dosen.niy AS niy ,COUNT(mahasiswa_metopen.dosen) \n\t\t\t\tAS jumlah_ampu FROM dosen JOIN mahasiswa_metopen WHERE dosen.niy = mahasiswa_metopen.dosen \n\t\t\t\tAND mahasiswa_metopen.bidang_minat = '$bidang' GROUP BY dosen.niy ORDER BY jumlah_ampu ASC\"; \n\t\t\t\t// Query yang berfungsi untuk menghitung jumlah mahasiswa bimbingan dari tiap tiap dosen pembimbing\n\t\t\t\t// dengan pengelompokkan dosen berdasrakan bidang minat mahasiswa\n\n\t\t$this->eksekusi($query); //mengeksekusi query diatas\n\t\treturn $this->result; //untuk hasil query diatas\n\t}", "title": "" }, { "docid": "2dbfdf6abf6e5ad2c0251baf73433436", "score": "0.45910195", "text": "public function setJadwalPmtas($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jadwal_pmtas !== $v) {\n $this->jadwal_pmtas = $v;\n $this->modifiedColumns[] = SekolahPaudPeer::JADWAL_PMTAS;\n }\n\n if ($this->aJadwalPaudRelatedByJadwalPmtas !== null && $this->aJadwalPaudRelatedByJadwalPmtas->getJadwalId() !== $v) {\n $this->aJadwalPaudRelatedByJadwalPmtas = null;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "53df34bc31483cb55226112d847e0bdb", "score": "0.45777476", "text": "public function getGpml() {\n\t\treturn $this->gpml;\n\t}", "title": "" }, { "docid": "84d2c013bb779ddcf7afaa32d525d572", "score": "0.45554203", "text": "public function setKieGuruKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_guru_keamanan_pangan !== $v) {\n $this->kie_guru_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_GURU_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "09bac5727e03ec9e396f39efe92d0665", "score": "0.45543045", "text": "function pembagiankalori($tb, $g){\n\n\t$kbp = jumlahkalori($tb, $g, $av, $u) * 0.2;\n\t$kbr1 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\t$kbs = jumlahkalori($tb, $g, $av, $u) * 0.25;\n\t$kbr2 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\t$kbm = jumlahkalori($tb, $g, $av, $u) * 0.25;\n\t$kbr3 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\n\treturn array($kbp, $kbr1, $kbs, $kbr2, $kbm, $kbr3);\n}", "title": "" }, { "docid": "2f96c9eeebb337bcb0da1eed15c6d1c0", "score": "0.45496267", "text": "public function getPanjRengM()\n {\n return $this->panj_reng_m;\n }", "title": "" }, { "docid": "63d5fa74009d87a8576c8374d096b054", "score": "0.45487377", "text": "function get_jml_mhs_dpa(){\n\t\t\t$mahasiswa = $this->api->get_api_json(URL_API_SIA.'sia_mahasiswa/data_search', 'POST', \n\t\t\t\t\t\tarray('api_kode'=>28000, 'api_subkode' => 6, \n\t\t\t\t\t\t'api_search' => array('A', $this->session->userdata('id_user'))));\n\n\t\t\t$bimbingan_pa = array();\n\t\t\tforeach ($mahasiswa as $mhs) {\n\t\t\t\tif(isset($bimbingan_pa[strtoupper($mhs['NM_JENJANG'])])){\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JUMLAH']++;\n\t\t\t\t}else{\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JENJANG'] = strtoupper($mhs['NM_JENJANG']);\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['NM_PRODI'] = $mhs['NM_PRODI'];\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JUMLAH'] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $bimbingan_pa;\n\t\t}", "title": "" }, { "docid": "5175d852bd1a126a604b1469c36989bd", "score": "0.45399284", "text": "public function set_dataGraf(){\n\n }", "title": "" }, { "docid": "9292d9b2d604d75814ff279fb1cfb9d0", "score": "0.45352057", "text": "public function setJambanDifabel($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->jamban_difabel !== $v) {\n $this->jamban_difabel = $v;\n $this->modifiedColumns[] = SanitasiPeer::JAMBAN_DIFABEL;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "1980f3f0b8b9804f614b8e4c7e354d4f", "score": "0.45336783", "text": "public function testSetPrimeJfNormal() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrimeJfNormal(10.092018);\n $this->assertEquals(10.092018, $obj->getPrimeJfNormal());\n }", "title": "" }, { "docid": "f9f20d7c015a82f7ce3789e8fbb9fac9", "score": "0.45271617", "text": "public function getJadwalPerkembangan($tgl_lahir){\n //rumus = rentang_akhir - usia bayi dalam bulan\n $balita = new BalitaService();\n $usia_dalam_bulan = $balita->getSelisihBulan($tgl_lahir);\n $tgl_pemeriksaan = Carbon::now();\n $rentang = $balita->getRentangBulan($tgl_lahir); \n $rentang_akhir = substr($rentang, strrpos($rentang, '-' )+1);\n $bulan_berikutnya = $rentang_akhir-$usia_dalam_bulan;\n $jadwal_perkembangan = $tgl_pemeriksaan->addMonths($bulan_berikutnya)->format('d-m-Y');\n // $rumus = 'tgl_lahir = '.$tgl_lahir.', usia = '.$usia_dalam_bulan.' bulan, rentang = '. $rentang. ', maka = '.$rentang_akhir.'-'.$usia_dalam_bulan.'= '.$bulan_berikutnya.' bulan, '. $jadwal_perkembangan;\n return $jadwal_perkembangan;\n \n }", "title": "" }, { "docid": "4601aedc05273327038e677628a1b1bf", "score": "0.45155257", "text": "public function useJenjangKepengawasanQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinJenjangKepengawasan($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'JenjangKepengawasan', '\\DataDikdas\\Model\\JenjangKepengawasanQuery');\n }", "title": "" }, { "docid": "3f4a189846f6f74971085711628205b5", "score": "0.45010358", "text": "public function setKieKelasKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_kelas_keamanan_pangan !== $v) {\n $this->kie_kelas_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_KELAS_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "d8578c58c9843dff4b86d18ea078b628", "score": "0.44965774", "text": "private function _serapan($proposal, $lpj, $tahun)\n {\n $lembaga = $this->db->get_where('lembaga', ['id_lembaga !=' => 0])->result_array();\n if ($proposal == null) {\n foreach ($lembaga as $l) {\n $proposal[$l['id_lembaga']] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n }\n if ($lpj == null) {\n foreach ($lembaga as $l) {\n $lpj[$l['id_lembaga']] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n }\n // inisialisasi data lpj\n $data_lpj = [];\n $index1 = 0;\n foreach ($proposal as $p) {\n $data_lpj[$index1++] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $p['id_lembaga'],\n 'nama_lembaga' => $p['nama_lembaga']\n ];\n }\n // mengisikan nilai array LPJ\n $index2 = 0;\n foreach ($lpj as $l) {\n $data_lpj[$index2++] = [\n 'bulan' => $l['bulan'],\n 'dana' => $l['dana'],\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n $lpj = $data_lpj;\n $data = [];\n foreach ($lembaga as $l) {\n for ($j = 1; $j < 13; $j++) {\n $data[$l['id_lembaga']][$j] = 0;\n }\n $data[$l['id_lembaga']]['nama_lembaga'] = $l['nama_lembaga'];\n $dana = $this->db->select('anggaran_kemahasiswaan')->get_where('rekapan_kegiatan_lembaga', ['id_lembaga' => $l['id_lembaga'], 'tahun_pengajuan' => $tahun])->row_array();\n\n if ($dana['anggaran_kemahasiswaan'] == null) {\n $data[$l['id_lembaga']]['dana_pagu'] = 0;\n } else {\n $data[$l['id_lembaga']]['dana_pagu'] = $dana['anggaran_kemahasiswaan'];\n }\n $data[$l['id_lembaga']]['dana_terserap'] = 0;\n }\n foreach ($proposal as $p) {\n if ($p['bulan'] == \"1\") {\n $data[$p['id_lembaga']][1] += $p['dana'];\n } elseif ($p['bulan'] == \"2\") {\n $data[$p['id_lembaga']][2] += $p['dana'];\n } elseif ($p['bulan'] == \"3\") {\n $data[$p['id_lembaga']][3] += $p['dana'];\n } elseif ($p['bulan'] == \"4\") {\n $data[$p['id_lembaga']][4] += $p['dana'];\n } elseif ($p['bulan'] == \"5\") {\n $data[$p['id_lembaga']][5] += $p['dana'];\n } elseif ($p['bulan'] == \"6\") {\n $data[$p['id_lembaga']][6] += $p['dana'];\n } elseif ($p['bulan'] == \"7\") {\n $data[$p['id_lembaga']][7] += $p['dana'];\n } elseif ($p['bulan'] == \"8\") {\n $data[$p['id_lembaga']][8] += $p['dana'];\n } elseif ($p['bulan'] == \"9\") {\n $data[$p['id_lembaga']][9] += $p['dana'];\n } elseif ($p['bulan'] == \"10\") {\n $data[$p['id_lembaga']][10] += $p['dana'];\n } elseif ($p['bulan'] == \"11\") {\n $data[$p['id_lembaga']][11] += $p['dana'];\n } elseif ($p['bulan'] == \"12\") {\n $data[$p['id_lembaga']][12] += $p['dana'];\n }\n }\n foreach ($lpj as $l) {\n if ($l['bulan'] == \"1\") {\n $data[$l['id_lembaga']][1] += $l['dana'];\n } elseif ($l['bulan'] == \"2\") {\n $data[$l['id_lembaga']][2] += $l['dana'];\n } elseif ($l['bulan'] == \"3\") {\n $data[$l['id_lembaga']][3] += $l['dana'];\n } elseif ($l['bulan'] == \"4\") {\n $data[$l['id_lembaga']][4] += $l['dana'];\n } elseif ($l['bulan'] == \"5\") {\n $data[$l['id_lembaga']][5] += $l['dana'];\n } elseif ($l['bulan'] == \"6\") {\n $data[$l['id_lembaga']][6] += $l['dana'];\n } elseif ($l['bulan'] == \"7\") {\n $data[$l['id_lembaga']][7] += $l['dana'];\n } elseif ($l['bulan'] == \"8\") {\n $data[$l['id_lembaga']][8] += $l['dana'];\n } elseif ($l['bulan'] == \"9\") {\n $data[$l['id_lembaga']][9] += $l['dana'];\n } elseif ($l['bulan'] == \"10\") {\n $data[$l['id_lembaga']][10] += $l['dana'];\n } elseif ($l['bulan'] == \"11\") {\n $data[$l['id_lembaga']][11] += $l['dana'];\n } elseif ($l['bulan'] == \"12\") {\n $data[$l['id_lembaga']][12] += $l['dana'];\n }\n }\n foreach ($lembaga as $l) {\n for ($j = 1; $j < 13; $j++) {\n $data[$l['id_lembaga']]['dana_terserap'] += $data[$l['id_lembaga']][$j];\n }\n if ($data[$l['id_lembaga']]['dana_pagu'] == 0) {\n $data[$l['id_lembaga']]['terserap_persen'] = 0;\n } else {\n $data[$l['id_lembaga']]['terserap_persen'] = $data[$l['id_lembaga']]['dana_terserap'] / $data[$l['id_lembaga']]['dana_pagu'] * 100;\n }\n $data[$l['id_lembaga']]['dana_sisa'] = $data[$l['id_lembaga']]['dana_pagu'] - $data[$l['id_lembaga']]['dana_terserap'];\n if ($data[$l['id_lembaga']]['dana_pagu'] == 0) {\n $data[$l['id_lembaga']]['sisa_terserap'] = 0;\n } else {\n $data[$l['id_lembaga']]['sisa_terserap'] = $data[$l['id_lembaga']]['dana_sisa'] / $data[$l['id_lembaga']]['dana_pagu'] * 100;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "e3b5f036e9b37e8ac2dd689125012d7a", "score": "0.44875643", "text": "public function setKieKantinKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_kantin_keamanan_pangan !== $v) {\n $this->kie_kantin_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_KANTIN_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "ab1acf9b9043d1c29481ae87b00ee25e", "score": "0.44807085", "text": "public function getJadwalPmtas()\n {\n return $this->jadwal_pmtas;\n }", "title": "" }, { "docid": "d283277fe82ce1ea14d8594d2860c6cd", "score": "0.44133195", "text": "public function setKetBangunan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->ket_bangunan !== $v) {\n $this->ket_bangunan = $v;\n $this->modifiedColumns[] = BangunanPeer::KET_BANGUNAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "e8c91b4ae0ca35f9f4da09b51ae480e5", "score": "0.44011325", "text": "public function testSetGestionMajJf() {\n\n $obj = new Employes();\n\n $obj->setGestionMajJf(\"gestionMajJf\");\n $this->assertEquals(\"gestionMajJf\", $obj->getGestionMajJf());\n }", "title": "" }, { "docid": "84cc1b97e29aef079ca6a3f61272a075", "score": "0.43971437", "text": "public function setPanjKudakudaM($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->panj_kudakuda_m !== $v) {\n $this->panj_kudakuda_m = $v;\n $this->modifiedColumns[] = BangunanPeer::PANJ_KUDAKUDA_M;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "ca79565e232fa57fb656244479931254", "score": "0.4388915", "text": "public function setKieUksKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_uks_keamanan_pangan !== $v) {\n $this->kie_uks_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_UKS_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "9a959ca0577d417c4a0401af493c642f", "score": "0.43701276", "text": "function changejpmonth($month)\n{\n\n $jpmonth=\"\";\n switch($month) {\n case \"jan\":\n $jpmonth=\"1月 JAN\";\n break;\n\n case \"feb\":\n $jpmonth=\"2月 FEB\";\n break;\n\n case \"mar\":\n $jpmonth=\"3月 MAR\";\n break;\n\n case \"apr\":\n $jpmonth=\"4月 APR\";\n break;\n\n case \"may\":\n $jpmonth=\"5月 MAY\";\n break;\n\n case \"jun\":\n $jpmonth=\"6月 JUN\";\n break;\n\n case \"jul\":\n $jpmonth=\"7月 JUL\";\n break;\n\n case \"aug\":\n $jpmonth=\"8月 AUG\";\n break;\n\n case \"sep\":\n $jpmonth=\"9月 SEP\";\n break;\n\n case \"oct\":\n $jpmonth=\"10月 OCT\";\n break;\n\n case \"nov\":\n $jpmonth=\"11月 NOV\";\n break;\n\n case \"dec\":\n $jpmonth=\"12月 DEC\";\n break;\n }\n return $jpmonth;\n}", "title": "" }, { "docid": "2dbcda40028c3d0351b7eaf618aa1b87", "score": "0.43699706", "text": "public function setLembagaPengangkatId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->lembaga_pengangkat_id !== $v) {\n $this->lembaga_pengangkat_id = $v;\n $this->modifiedColumns[] = SekolahPaudPeer::LEMBAGA_PENGANGKAT_ID;\n }\n\n if ($this->aLembagaPengangkat !== null && $this->aLembagaPengangkat->getLembagaPengangkatId() !== $v) {\n $this->aLembagaPengangkat = null;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "852e30badd6d99cc754b3ac32b4556b5", "score": "0.4356744", "text": "public function changeFormat() {\r\n\t\tif($this->get_vl_jogo() != 0.0) {\r\n\t\t\treturn 'R$ '. number_format($this->get_vl_jogo(), 2, ',', '.');\r\n\t\t}\r\n\t\treturn 'Gratuito';\r\n\t\t\t\t\r\n\t}", "title": "" }, { "docid": "ed60cafa9b02c9dfd1e971c7b948f02a", "score": "0.43562642", "text": "public function maxPengambilan($id_ajar, $kelas, $semester)\n\t{\n\t\t$ambil = 0;\n\t\t$this->db->select_max('nilai_lain.pengambilan')->from('nilai_lain');\n\t\t$this->db->join('mahasiswa','nilai_lain.nim = mahasiswa.nim');\n\t\t$this->db->where('mahasiswa.kelas', $kelas);\n\t\t$this->db->where('mahasiswa.semester', $semester);\n\t\t$this->db->where('nilai_lain.id_ajar', $id_ajar);\n\t\t$this->db->group_by('nilai_lain.pengambilan');\n\t\t$pengambilan = $this->db->get();\n\t\tforeach ($pengambilan->result() as $hasil){\n\t\t\t$ambil = $hasil->pengambilan;\n\t\t}\n\t\treturn $ambil;\n\t}", "title": "" }, { "docid": "9e177238b1a58d2a1cb6b52946bf3121", "score": "0.4333764", "text": "public function setBp($bp)\n {\n $this->bp = $bp;\n \n return $this;\n }", "title": "" }, { "docid": "ba3b1d3accf41ea92532372a04759f3c", "score": "0.43316764", "text": "public function getKieKelasKeamananPangan()\n {\n return $this->kie_kelas_keamanan_pangan;\n }", "title": "" }, { "docid": "a4f2d11663a703233ea57dc7e5db520a", "score": "0.43259746", "text": "public function getPanjKudakudaM()\n {\n return $this->panj_kudakuda_m;\n }", "title": "" }, { "docid": "e8e1f3b85951e77a16e24f2ee0cc77e1", "score": "0.43115753", "text": "public function getIdgrupo_sanguineo(){\n return $this->idgrupo_sanguineo;\n }", "title": "" }, { "docid": "0ffad71c483d4b4ac6ffdf87f746b7aa", "score": "0.43094918", "text": "public function jml_laporan()\n {\n $this->db->select('id_pengaduan, COUNT(id_pengaduan) as total_laporan');\n $this->db->from('aduan_layanan');\n $this->db->where('id_kepala', null);\n\n $hasil = $this->db->get();\n return $hasil;\n }", "title": "" }, { "docid": "8200c8b1ea2f5a4386cbd9cb0a9931d5", "score": "0.43062997", "text": "public function getKieKantinKeamananPangan()\n {\n return $this->kie_kantin_keamanan_pangan;\n }", "title": "" }, { "docid": "215f4471fa1e416fa56859ee525b145f", "score": "0.4303681", "text": "public function gregorian_to_jalali($gy, $gm, $gd, $mod = '')\n {\n list($gy, $gm, $gd) = explode('_', tr_num($gy . '_' . $gm . '_' . $gd));/* <= Extra :اين سطر ، جزء تابع اصلي نيست */\n $g_d_m = array(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334);\n if ($gy > 1600) {\n $jy = 979;\n $gy -= 1600;\n } else {\n $jy = 0;\n $gy -= 621;\n }\n $gy2 = ($gm > 2) ? ($gy + 1) : $gy;\n $days = (365 * $gy) + ((int)(($gy2 + 3) / 4)) - ((int)(($gy2 + 99) / 100)) + ((int)(($gy2 + 399) / 400)) - 80 + $gd + $g_d_m[$gm - 1];\n $jy += 33 * ((int)($days / 12053));\n $days %= 12053;\n $jy += 4 * ((int)($days / 1461));\n $days %= 1461;\n $jy += (int)(($days - 1) / 365);\n if ($days > 365) $days = ($days - 1) % 365;\n if ($days < 186) {\n $jm = 1 + (int)($days / 31);\n $jd = 1 + ($days % 31);\n } else {\n $jm = 7 + (int)(($days - 186) / 30);\n $jd = 1 + (($days - 186) % 30);\n }\n return ($mod === '') ? array($jy, $jm, $jd) : $jy . $mod . $jm . $mod . $jd;\n }", "title": "" }, { "docid": "ce04548fe6753c979ab9de658eb73c56", "score": "0.43030596", "text": "public function setTanggalPenetapanPnf($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->tanggal_penetapan_pnf !== null || $dt !== null) {\n $currentDateAsString = ($this->tanggal_penetapan_pnf !== null && $tmpDt = new DateTime($this->tanggal_penetapan_pnf)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->tanggal_penetapan_pnf = $newDateAsString;\n $this->modifiedColumns[] = SekolahPaudPeer::TANGGAL_PENETAPAN_PNF;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "6f0a943d74d044342363dbf5482a8551", "score": "0.43002456", "text": "function GrMonth( $month ) {\n switch ( $month ) {\n case 1:\n return 'Ιαν';\n case 2:\n return 'Φεβ';\n case 3:\n return 'Μάρ';\n case 4:\n return 'Απρ';\n case 5:\n return 'Μάη';\n case 6:\n return 'Ιουν';\n case 7:\n return 'Ιούλ';\n case 8:\n return 'Αύγ';\n case 9:\n return 'Σεπ';\n case 10:\n return 'Οκτ';\n case 11:\n return 'Νοε';\n case 12:\n return 'Δεκ';\n }\n }", "title": "" }, { "docid": "833bc860913b1dc35067b80853ec612c", "score": "0.42975125", "text": "public function getPothglpd()\n {\n return $this->pothglpd;\n }", "title": "" }, { "docid": "b8a1077fc75f887767d6530fab7747a2", "score": "0.4294812", "text": "function bobot_tanggungan(){\n $this->db->query(\"UPDATE tb_klasifikasi_penduduk kp JOIN tb_bobot_penduduk bp SET kp.bobot_tanggungan=kp.jumlah_tanggungan*bp.persen WHERE bp.id=2\");\n }", "title": "" }, { "docid": "34fc7005a41f5cef7ad4a15c145db8a0", "score": "0.42833644", "text": "public function set_id_pg($id=0){\n\t\t\t$id = (int) $id;\n\t\t\tif($id!=0){\n\t\t\t\t$this->ipg_id=$id;\n\t\t\t}else{\n\t\t\t\t$this->ipg_id=0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "13e02773683e1fee9f5e4d77bbbb4206", "score": "0.42827323", "text": "public function getKetBangunan()\n {\n return $this->ket_bangunan;\n }", "title": "" }, { "docid": "fe2c34cef16dbb647910a11ed7aa967e", "score": "0.4276207", "text": "function cariDataBarang_pr1($nmbarang=\"\") {\n\t\t$grid = new GridConnector($this->db->conn_id);\n $grid->render_sql(\"select a.id,a.idgroup_barang,a.nmbarang,b.nmjenis from v_master_barang_detail a left join ref_jenis_barang b on a.idjns_item = b.idjenis where a.is_active = '1' and a.sts_jual = '1' and a.nmbarang like '%\".$nmbarang.\"%' group by a.idgroup_barang\",\"id\",\"idgroup_barang,nmbarang,nmjenis\");\n\t}", "title": "" }, { "docid": "0bf331087acc0bd014fe314b9e5d596b", "score": "0.42733797", "text": "public function hapus_peminjaman($id_peminjaman)\n\t{\n\t\tadmin_logged_in();\n\n\t\t$this->admin->hapus_peminjaman_by_id($id_peminjaman);\n\t}", "title": "" }, { "docid": "8db2973ab8e5e80d09dd0d7991b86d78", "score": "0.42680782", "text": "public function setKieSelasarKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_selasar_keamanan_pangan !== $v) {\n $this->kie_selasar_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_SELASAR_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "43c6de3713f2914c030fa66411b67e0a", "score": "0.4257553", "text": "public function testSetPrimeHComplMaj() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrimeHComplMaj(10.092018);\n $this->assertEquals(10.092018, $obj->getPrimeHComplMaj());\n }", "title": "" }, { "docid": "0c89f4837dc3c6d413aec408cb7ae90a", "score": "0.42513317", "text": "public function isPengunjung()\n {\n return $this->role === Role::PENGUNJUNG;\n }", "title": "" }, { "docid": "5fb064e7ea5f8e0097dc373b5043e101", "score": "0.425038", "text": "public static function formatJabatan($jabatan)\n {\n $jabatan_name = '';\n switch ($jabatan) {\n case self::KEPSEK_ROLE:\n $jabatan_name = 'Kepala Sekolah';\n break;\n case self::TIM_PKG_ROLE:\n $jabatan_name = 'Tim PKG';\n break;\n default:\n $jabatan_name = $jabatan;\n break;\n }\n return $jabatan_name;\n }", "title": "" }, { "docid": "d47222e374e7bcda27a4c5097eb84bec", "score": "0.4245199", "text": "function getPG()\n {\n $query = $this->db->query('SELECT `poin_gejala` FROM `tmp_hasil`\n `tb_gejala` as where `kd_gejala` = `kd_gejala`.`poin_gejala`= `0` ');\n return $query->result();\n }", "title": "" }, { "docid": "761326d22a4c2644e76c7d0a8c59f41e", "score": "0.4243033", "text": "public function setPembelajaranRelatedByBelKe01(Pembelajaran $v = null)\n {\n if ($v === null) {\n $this->setBelKe01(NULL);\n } else {\n $this->setBelKe01($v->getPembelajaranId());\n }\n\n $this->aPembelajaranRelatedByBelKe01 = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the Pembelajaran object, it will not be re-added.\n if ($v !== null) {\n $v->addJadwalRelatedByBelKe01($this);\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "09ce7d0ba3bfdc070c2339a31416b726", "score": "0.42408547", "text": "public function gregorian_to_jalali( $gy, $gm, $gd, $mod = '' ) {\n\t\t$g_d_m = array( 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 );\n\t\tif ( $gy > 1600 ) {\n\t\t\t$jy = 979;\n\t\t\t$gy -= 1600;\n\t\t} else {\n\t\t\t$jy = 0;\n\t\t\t$gy -= 621;\n\t\t}\n\t\t$gy2 = ( $gm > 2 ) ? ( $gy + 1 ) : $gy;\n\t\t$days = ( 365 * $gy ) + ( (int) ( ( $gy2 + 3 ) / 4 ) ) - ( (int) ( ( $gy2 + 99 ) / 100 ) ) + ( (int) ( ( $gy2 + 399 ) / 400 ) ) - 80 + $gd + $g_d_m[ $gm - 1 ];\n\t\t$jy += 33 * ( (int) ( $days / 12053 ) );\n\t\t$days %= 12053;\n\t\t$jy += 4 * ( (int) ( $days / 1461 ) );\n\t\t$days %= 1461;\n\t\tif ( $days > 365 ) {\n\t\t\t$jy += (int) ( ( $days - 1 ) / 365 );\n\t\t\t$days = ( $days - 1 ) % 365;\n\t\t}\n\t\t$jm = ( $days < 186 ) ? 1 + (int) ( $days / 31 ) : 7 + (int) ( ( $days - 186 ) / 30 );\n\t\t$jd = 1 + ( ( $days < 186 ) ? ( $days % 31 ) : ( ( $days - 186 ) % 30 ) );\n\n\t\treturn ( $mod == '' ) ? array( $jy, $jm, $jd ) : $jy . $mod . $jm . $mod . $jd;\n\t}", "title": "" }, { "docid": "56107d0a568a3c66250d7e723c19795e", "score": "0.42381328", "text": "public function rupiah($angka)\n {\n return number_format($angka, 0, ',', '.');\n }", "title": "" }, { "docid": "33e5f3a8d8337231ad02808e2c21d519", "score": "0.42316246", "text": "public function jml_permohonan_prosesKasubag()\n {\n $this->db->select('id_permohonan_ptsp, COUNT(id_permohonan_ptsp) as permohonan_prosesKasubag');\n $this->db->from('permohonan_ptsp');\n $this->db->where(\n 'status',\n 'Proses Kasubag'\n );\n $this->db->where('status_delete', 0);\n\n $hasil = $this->db->get();\n return $hasil;\n }", "title": "" }, { "docid": "360a27030f50f9642636941e4654a32a", "score": "0.42278984", "text": "public function aksi_tambah_pengikut_suket014()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t}", "title": "" }, { "docid": "01bdc17a148f32ac4667d07225dffedd", "score": "0.42205822", "text": "public function getKieUksKeamananPangan()\n {\n return $this->kie_uks_keamanan_pangan;\n }", "title": "" }, { "docid": "3d33be14d2902947881d55c1742d98ea", "score": "0.4215136", "text": "public function setLng($value)\n {\n $this->lng = $value;\n }", "title": "" }, { "docid": "cffec91232c514dff59e46353c60f189", "score": "0.42047018", "text": "public function setGesamtmietebrutto($gesamtmietebrutto)\n {\n $this->gesamtmietebrutto = $gesamtmietebrutto;\n return $this;\n }", "title": "" }, { "docid": "249f5c1e723ea09aa5568b1cedb3c6aa", "score": "0.42046568", "text": "public function getPembuanganAirLimbah()\n {\n return $this->pembuangan_air_limbah;\n }", "title": "" }, { "docid": "d5c7480b4ef45e742dfe2ec98d05f6e5", "score": "0.41963887", "text": "function isNaikGaji($conn,$idpegawai,$tglkgb){\n\t\t\t$tglkgb = Cstr::formatDate($tglkgb);\n\t\t\t$bln = substr($tglkgb,5,2);\n\t\t\t$isnaik = true;\n\t\t\t//cek apakah pegawai sudah diproses naik pangkat\n\t\t\t$kgb = $conn->GetOne(\"select idpegawai from \".self::table('pe_kgb').\" \n\t\t\t\t\twhere idpegawai = $idpegawai and datepart(month,tglkgb)='$bln'\");\n\t\t\t\t\t\n\t\t\n\t\t\tif(!empty($kgb))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t//mendapatkan next pangkat\n\t\t\t$rown = mKenaikan::getNaikGaji($conn,$idpegawai,$tglkgb);\n\t\t\t\n\t\t\t//cek untuk status pegawai yang naik pangkat\n\t\t\t$sql = \"select p.idpegawai,coalesce(p.nik+' - ','')+\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as pegawai,\n\t\t\t\t\tu.kodeunit+' - '+u.namaunit as namaunit,pl.golongan as golonganlama,p.tmtpangkat as tmtpangkatlama,cast(p.masakerjathngol as varchar)+' tahun '+cast(p.masakerjablngol as varchar)+' bulan' as mklama,\n\t\t\t\t\t'\".$rown['idpangkat'].\"' as pangkatbaru,'\".$rown['tmtpangkat'].\"' as tmtpangkat,substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),1,2) as mkthn, substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),3,2) as mkbln\n\t\t\t\t\tfrom \".self::table('ms_pegawai').\" p\n\t\t\t\t\tleft join \".self::table('ms_unit').\" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pl on pl.idpangkat=p.idpangkat\n\t\t\t\t\tleft join \".self::table('pe_kgb').\" k on k.idpegawai=p.idpegawai and k.tglkgb = '$tglkgb'\n\t\t\t\t\twhere p.idpegawai = $idpegawai and p.idstatusaktif = 'AA'\";\n\t\t\t$row = $conn->GetRow($sql);\t\n\t\t\t\t\t\t\n\t\t\tif(empty($row))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t$a_data = array('kgb' => $kgb, 'row' => $rown, 'isnaik' => $isnaik, 'sql' => $sql);\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "title": "" }, { "docid": "592c7942ed5771f7ccff38646f8225c9", "score": "0.41952792", "text": "public function testSetPrimeJf2Normal() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrimeJf2Normal(10.092018);\n $this->assertEquals(10.092018, $obj->getPrimeJf2Normal());\n }", "title": "" }, { "docid": "c1015256bb8ee1e69730321cc27ce24f", "score": "0.4193099", "text": "public function testSetJacp() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setJacp(10);\n $this->assertEquals(10, $obj->getJacp());\n }", "title": "" }, { "docid": "f756fc054a49d982a7874f94c53d1711", "score": "0.4191081", "text": "function mc_gregorian_to_jalali($gy,$gm,$gd,$mod=''){\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}", "title": "" }, { "docid": "d1045595a9f1421b8edebc4d7938a102", "score": "0.41884515", "text": "public function setJadwalBerakhir($jadwal_berakhir);", "title": "" }, { "docid": "c20cd876ef140db7c6e964b08452007f", "score": "0.41839734", "text": "public function useJenjangPendidikanQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinJenjangPendidikan($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'JenjangPendidikan', '\\DataDikdas\\Model\\JenjangPendidikanQuery');\n }", "title": "" }, { "docid": "c20cd876ef140db7c6e964b08452007f", "score": "0.41839734", "text": "public function useJenjangPendidikanQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinJenjangPendidikan($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'JenjangPendidikan', '\\DataDikdas\\Model\\JenjangPendidikanQuery');\n }", "title": "" }, { "docid": "93fb4183d2baf20c9a79fbec198836b8", "score": "0.41792575", "text": "public function getPengambilan($id_ajar, $kelas, $semester)\n\t{\n\t\t$this->db->select('nilai_lain.pengambilan')->from('nilai_lain');\n\t\t$this->db->join('mahasiswa','nilai_lain.nim = mahasiswa.nim');\n\t\t$this->db->where('mahasiswa.kelas', $kelas);\n\t\t$this->db->where('mahasiswa.semester', $semester);\n\t\t$this->db->where('nilai_lain.id_ajar', $id_ajar);\n\t\t$this->db->group_by('nilai_lain.pengambilan');\n\t\t$pengambilan = $this->db->get();\n\t\treturn $pengambilan->result();\n\t}", "title": "" }, { "docid": "00eaaab876d4d2257fa296b1513cba08", "score": "0.4176867", "text": "public function jml_permohonan_prosesBO()\n {\n $this->db->select('id_permohonan_ptsp, COUNT(id_permohonan_ptsp) as permohonan_prosesBO');\n $this->db->from('permohonan_ptsp');\n $this->db->where(\n 'status',\n 'Proses BO'\n );\n $this->db->where('status_delete', 0);\n\n $hasil = $this->db->get();\n return $hasil;\n }", "title": "" }, { "docid": "ecae99f561d908ab1ad920deb4736a1a", "score": "0.41613415", "text": "public function setKieToiletKeamananPangan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kie_toilet_keamanan_pangan !== $v) {\n $this->kie_toilet_keamanan_pangan = $v;\n $this->modifiedColumns[] = SanitasiPeer::KIE_TOILET_KEAMANAN_PANGAN;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "c7dc31afe1db8078c1a45a46045e2342", "score": "0.41584873", "text": "public function aksi_hapus_pengikut_suket014($id_pengikut, $id_permohonan_surat)\n\t{\n\t\t$this->m_warga->aksi_hapus_pengikut($id_pengikut, 'pengikut');\n\n\t\t$this->session->set_flashdata('success', 'dihapus');\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan_surat);\n\t}", "title": "" }, { "docid": "d7720240806afe58db862ef519e2bc5c", "score": "0.4158432", "text": "public function getKieSelasarKeamananPangan()\n {\n return $this->kie_selasar_keamanan_pangan;\n }", "title": "" }, { "docid": "d501f0528391f6766692f79d4a661d55", "score": "0.41494384", "text": "function cariDataBarang_md41($nmbarang=\"\") {\n\t\t$grid = new GridConnector($this->db->conn_id);\n $grid->render_sql(\"select id,idgroup_barang,concat(nmbarang, ' ',nmwarna) as nmbarang,idsatuan from v_master_barang_detail where is_active = '1' and sts_jual = '1' and nmbarang like '%\".$nmbarang.\"%' group by idgroup_barang\",\"id\",\"idgroup_barang,nmbarang,idsatuan\");\n\t}", "title": "" } ]
934bdc97854c994dbc73cd092246e401
Add orocrm_dm_address_book foreign keys.
[ { "docid": "2920bee1eeda54e41099409cd728609a", "score": "0.6287501", "text": "private function addOroDotmailerAddressBookForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_address_book');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['owner_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_marketing_list'),\n ['marketing_list_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n }", "title": "" } ]
[ { "docid": "eb5f2b4cb9c62338ac08dfc13b5508c9", "score": "0.5493687", "text": "private function addOrocrmDmAbContactForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_ab_contact');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onDelete' => 'SET NULL', 'onUpdate' => null]\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_contact'),\n ['contact_id'],\n ['id'],\n ['onDelete' => 'CASCADE', 'onUpdate' => null]\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_address_book'),\n ['address_book_id'],\n ['id'],\n ['onDelete' => 'CASCADE', 'onUpdate' => null]\n );\n }", "title": "" }, { "docid": "6b9852670d20db62f7f50d4de81ac834", "score": "0.5472597", "text": "protected function addForeignKeyConstraints()\n {\n $sBookingTableName = $this->tablePrefix .'bm_booking';\n \n $this->table->addForeignKeyConstraint($sBookingTableName, ['booking_id'], ['booking_id'], [\"onDelete\" => \"CASCADE\"], null);\n \n $sStatusTableName = $this->tablePrefix .'bm_appointment_status';\n \n $this->table->addForeignKeyConstraint($sStatusTableName, ['status_code'], ['status_code'], [], null);\n \n $sCustomerTableName = $this->tablePrefix .'bm_customer';\n \n $this->table->addForeignKeyConstraint($sCustomerTableName, ['customer_id'], ['customer_id'], [\"onDelete\" => \"CASCADE\"], null);\n }", "title": "" }, { "docid": "11afdba0337538438629e70a92ba6852", "score": "0.52129614", "text": "public function addresses()\n {\n return $this->hasMany('App\\Address');\n }", "title": "" }, { "docid": "70d66d5c22069274ec5d0360bf6c40aa", "score": "0.51784045", "text": "protected function addForeignKeys()\n {\n // notification_notificationrecord table\n $this->addForeignKey(\n 'ServerlogForeignKey',\n '{{%notification_server_logs}}',\n 'server_id',\n '{{%notification_server_record}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "ae077d495a0431859af942a09cde913f", "score": "0.5134858", "text": "protected function dtgAddresses_Create() {\n\t\t$this->dtgAddresses = new AddressList($this);\n\t\t$this->dtgAddresses_CreateColumns();\n\t\t$this->dtgAddresses_MakeEditable();\n\t\t$this->dtgAddresses->RowParamsCallback = [$this, \"dtgAddresses_GetRowParams\"];\n\t\t\t$this->dtgAddresses->LinkedNode = QQN::Address();\n\t}", "title": "" }, { "docid": "f21e64b661138c1442b245bd1440eea7", "score": "0.51304734", "text": "public function addresses()\n {\n return $this->hasMany('App\\Address');\n }", "title": "" }, { "docid": "acfe969afa81234cddff8c38bb3f963c", "score": "0.5125226", "text": "protected function dtgAddresses_CreateColumns() {\n\t\t$this->dtgAddresses->CreateColumns();\n\t}", "title": "" }, { "docid": "6d1c0b77fe5983573d2da6abb94582b3", "score": "0.5061475", "text": "public function Address()\n {\n return $this->hasMany('FSS\\Models\\Address');\n }", "title": "" }, { "docid": "f51f60b74b891b83743b1433f344846f", "score": "0.5060805", "text": "public function addForeignKey($key, $assoc_name)\n\t{\n\t\t$this->_foreign_keys[$key] = $assoc_name;\n\t}", "title": "" }, { "docid": "defd6c43a010055328c3776aab717e77", "score": "0.50518435", "text": "private function addOroDotmailerCampaignToABForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_campaign_to_ab');\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_address_book'),\n ['address_book_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_campaign'),\n ['campaign_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n }", "title": "" }, { "docid": "0302330cb77b0d459755c6fdfa831ec2", "score": "0.49495015", "text": "function addAddress( &$address )\r\n {\r\n $ret = false;\r\n $db =& eZDB::globalDatabase();\r\n if ( is_a( $address, \"eZAddress\" ) )\r\n {\r\n $addressID = $address->id();\r\n $db->begin();\r\n\r\n $res[] = $db->query( \"INSERT INTO eZContact_CompanyAddressDict\r\n (CompanyID, AddressID)\r\n VALUES\r\n ('$this->ID', '$addressID')\" );\r\n eZDB::finish( $res, $db );\r\n\r\n $ret = true;\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "f6e9e8063b18fa472e92acbd5bf26e43", "score": "0.4917713", "text": "private function addOrocrmDmDfMappingForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_df_mapping');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['owner_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n }", "title": "" }, { "docid": "757d4557881c5ccb5ffb0567b128af42", "score": "0.49078524", "text": "public function useraddress(){\n return $this->hasMany('App\\Address');\n }", "title": "" }, { "docid": "c4e3e88c34f2a62e398730e9c5252616", "score": "0.48867145", "text": "public function address()\n {\n return $this->has_many('Address');\n }", "title": "" }, { "docid": "0ede4af142245049d2de83f70cbf9e8e", "score": "0.48572096", "text": "private function addOrocrmDmDfMappingConfigForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_df_mapping_config');\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_df_mapping'),\n ['mapping_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_data_field'),\n ['datafield_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n }", "title": "" }, { "docid": "77d7da90cdb80260b7f593b951a27a94", "score": "0.48507625", "text": "private function addOrocrmDmAbCntExportForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_ab_cnt_export');\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_address_book'),\n ['address_book_id'],\n ['id'],\n ['onDelete' => 'SET NULL', 'onUpdate' => null]\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onDelete' => 'SET NULL', 'onUpdate' => null]\n );\n }", "title": "" }, { "docid": "6f6d2d25088eb7fd11c35dca64d1f965", "score": "0.48271927", "text": "public function rooms_address()\n {\n return $this->belongsToMany('App\\Models\\RoomsAddress');\n }", "title": "" }, { "docid": "1426f5030817d417b3a78154e3981ae8", "score": "0.48222926", "text": "public function addAddress($addressAttributes)\n {\n return $this->addresses()->create($addressAttributes);\n }", "title": "" }, { "docid": "ff749293c08686a3a626c8cbb0f4ba26", "score": "0.48163784", "text": "function adb_add_address($data)\n {\n if (file_exists($this->DB['file_adb_adr']) && is_readable($this->DB['file_adb_adr'])) {\n $ini = parse_ini_file($this->DB['file_adb_adr'], 1);\n $next_index = max(array_keys($ini)) + 1;\n } else {\n $next_index = 1;\n }\n $add = array();\n foreach (array('nick', 'firstname', 'lastname', 'company', 'address', 'email1', 'email2'\n ,'tel_private', 'tel_business','cellular', 'fax', 'www', 'birthday', 'comments'\n ,'free1', 'free2', 'gid') as $k) {\n if (isset($data[$k])) $add[$next_index][$k] = urlencode($data[$k]);\n }\n if (!empty($add)) {\n return $this->_write_file($this->DB['file_adb_adr'], $add, TRUE);\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "4612f4df74ba2e945edd4c6666401236", "score": "0.48161015", "text": "public function initialize()\n {\n $this->hasMany('id', 'CustomerAddresses', 'district_id', NULL);\n }", "title": "" }, { "docid": "1e9011b1107f9b358e536ef02e340479", "score": "0.47947595", "text": "private function addForeignConstraint($segments)\n {\n $string = sprintf(\n \"%s:foreign:references('id'):on('%s')\",\n $segments['name'],\n $this->getTableNameFromForeignKey($segments['name'])\n );\n\n $this->addField($this->parseSegments($string));\n }", "title": "" }, { "docid": "825d93a9c4132091f1de0740064faf28", "score": "0.47831202", "text": "public function add() {\n\t\tif (!empty($this->request->data)) {\n\t\t\tif ($this->{$this->modelClass}->save($this->request->data)) {\n\t\t\t\t$this->notice(__d('shop', 'Address saved'), array(\n\t\t\t\t\t'redirect' => ''\n\t\t\t\t));\n\t\t\t}\n\t\t\t$this->notice('not_saved', array(\n\t\t\t\t'redirect' => true\n\t\t\t));\n\t\t}\n\n\t\t$this->saveRedirectMarker();\n\t}", "title": "" }, { "docid": "8f1853dfe918661ea3f74d9ee2944c44", "score": "0.47800332", "text": "public function dispatch_actions($address_book){\n\n add_action(\"admin_init\",[$address_book,'from_handler']);\n add_action(\"admin_post_wedevs_delete_address\",[$address_book,'delete_address']);\n }", "title": "" }, { "docid": "69033d08fb9e6a3cd6e09953878fd581", "score": "0.47791037", "text": "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "title": "" }, { "docid": "69033d08fb9e6a3cd6e09953878fd581", "score": "0.47791037", "text": "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "title": "" }, { "docid": "69033d08fb9e6a3cd6e09953878fd581", "score": "0.47791037", "text": "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "title": "" }, { "docid": "7021d918b5bdcb9d7d2a1c7fbeddee0f", "score": "0.47367102", "text": "public function initialize()\n {\n // attributes\n $this->setName('phoneadr');\n $this->setPhpName('PhoneBook');\n $this->setIdentifierQuoting(false);\n $this->setClassName('\\\\PhoneBook');\n $this->setPackage('');\n $this->setUseIdGenerator(false);\n // columns\n $this->addPrimaryKey('PhadType', 'Phadtype', 'VARCHAR', true, 2, '');\n $this->addPrimaryKey('PhadId', 'Phadid', 'VARCHAR', true, 6, '');\n $this->addPrimaryKey('PhadSubId', 'Phadsubid', 'VARCHAR', true, 6, '');\n $this->addPrimaryKey('PhadSubIdSeq', 'Phadsubidseq', 'INTEGER', true, 1, 0);\n $this->addPrimaryKey('PhadCont', 'Phadcont', 'VARCHAR', true, 20, '');\n $this->addColumn('PhadIntl', 'Phadintl', 'VARCHAR', false, 1, null);\n $this->addColumn('PhadTeleNbr', 'Phadtelenbr', 'VARCHAR', false, 10, null);\n $this->addColumn('PhadTeleExt', 'Phadteleext', 'VARCHAR', false, 7, null);\n $this->addColumn('PhadIntlNbr', 'Phadintlnbr', 'VARCHAR', false, 22, null);\n $this->addColumn('PhadIntlExt', 'Phadintlext', 'VARCHAR', false, 7, null);\n $this->addColumn('PhadFaxNbr', 'Phadfaxnbr', 'VARCHAR', false, 10, null);\n $this->addColumn('PhadIfaxNbr', 'Phadifaxnbr', 'VARCHAR', false, 22, null);\n $this->addColumn('PhadCellNbr', 'Phadcellnbr', 'VARCHAR', false, 10, null);\n $this->addColumn('PhadIcellNbr', 'Phadicellnbr', 'VARCHAR', false, 22, null);\n $this->addColumn('PhadHomeNbr', 'Phadhomenbr', 'VARCHAR', false, 10, null);\n $this->addColumn('PhadIhomeNbr', 'Phadihomenbr', 'VARCHAR', false, 22, null);\n $this->addColumn('PhadWebAddr', 'Phadwebaddr', 'VARCHAR', false, 50, null);\n $this->addColumn('PhadEmailAddr', 'Phademailaddr', 'VARCHAR', false, 50, null);\n $this->addColumn('PhadName', 'Phadname', 'VARCHAR', false, 30, null);\n $this->addColumn('PhadContName', 'Phadcontname', 'VARCHAR', false, 20, null);\n $this->addColumn('DateUpdtd', 'Dateupdtd', 'VARCHAR', false, 8, null);\n $this->addColumn('TimeUpdtd', 'Timeupdtd', 'VARCHAR', false, 8, null);\n $this->addColumn('dummy', 'Dummy', 'VARCHAR', false, 1, null);\n }", "title": "" }, { "docid": "4d323078f990dbf07fca6c0887e1945e", "score": "0.47203594", "text": "public function addresses()\n {\n return $this->belongsTo(Address::class);\n }", "title": "" }, { "docid": "199b4285ad019959d8e17821d7590a57", "score": "0.46786964", "text": "public function onAddBookOwner(AddBookOwnerEvent $event)\n {\n }", "title": "" }, { "docid": "351acd39db79cd798134ab82243b82f4", "score": "0.46773288", "text": "public function onAddBook(AddBookEvent $event)\n {\n }", "title": "" }, { "docid": "e7b0ad620f29a9a81c340fa27a25df1c", "score": "0.46667305", "text": "private function addOroDotmailerContactForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_contact');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['owner_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n }", "title": "" }, { "docid": "8e76ecba5780b5eccad58891303aabff", "score": "0.46623868", "text": "public function addAddress() {\n $this->layout = false;\n $this->loadModel('DeliveryAddress');\n $userId = AuthComponent::User('id'); // Customer Id\n $roleId = AuthComponent::User('role_id');\n $storeId = $this->Session->read('store_id');\n $merchantId = $this->Session->read('merchant_id');\n $checkaddress = $this->DeliveryAddress->checkAllAddress($userId, $roleId, $storeId, $merchantId); // It will call the function in the model to check the address either exist or not\n $label1 = 0;\n $label2 = 0;\n $label3 = 0;\n $label4 = 0;\n $label5 = 0;\n if (!empty($checkaddress)) {\n foreach ($checkaddress as $address) {\n if ($address['DeliveryAddress']['label'] == 1) {\n $label1 = 1;\n } elseif ($address['DeliveryAddress']['label'] == 2) {\n $label2 = 1;\n } elseif ($address['DeliveryAddress']['label'] == 3) {\n $label3 = 1;\n } elseif ($address['DeliveryAddress']['label'] == 4) {\n $label4 = 1;\n } elseif ($address['DeliveryAddress']['label'] == 5) {\n $label5 = 1;\n }\n }\n }\n $this->loadModel('CountryCode');\n $countryCode = $this->CountryCode->fetchAllCountryCode();\n $this->set(compact('label1', 'label2', 'label3', 'label4', 'label5', 'countryCode'));\n }", "title": "" }, { "docid": "f1e525ea17587369cb51948ab312cb2c", "score": "0.4637872", "text": "public function addForeignKey(string $fromTable, string $toTable, array $options = []) : void\n {\n if (! $this->tableExists($fromTable) and ! in_array($fromTable, $this->pendingTables)) {\n throw new Exception(\"{$fromTable} does not exist\");\n }\n\n if (! $this->tableExists($toTable) and ! in_array($toTable, $this->pendingTables)) {\n throw new Exception(\"{$toTable} does not exist\");\n }\n\n $options += [\n 'column' => strtolower(Inflector::singular($toTable)).'_id',\n 'primaryKey' => 'id',\n 'name' => null,\n 'update' => null,\n 'delete' => null,\n ];\n \n // Get column name first\n if ($options['name'] === null) {\n $options['name'] = 'fk_origin_' . $this->getForeignKeyIdentifier($fromTable, $options['column']);\n }\n //string $fromTable, string $name, string $column, string $toTable, string $primaryKey\n $this->statements[] = $this->adapter()->addForeignKey($fromTable, $options['name'], $options['column'], $toTable, $options['primaryKey'], $options['update'], $options['delete']);\n if ($this->calledBy() === 'change') {\n $this->reverseStatements[] = $this->adapter()->removeForeignKey($fromTable, $options['name']);\n }\n }", "title": "" }, { "docid": "206062cf528661487519b8cb1081a6b8", "score": "0.46210846", "text": "public function addresses()\n\t{\n\t\treturn $this->morphMany(Address::class, 'addressable');\n\t}", "title": "" }, { "docid": "f371ea28315efd1ff98ea28326bbf984", "score": "0.45857304", "text": "public function addresses()\n {\n return $this->morphMany('App\\Address', 'addressable');\n }", "title": "" }, { "docid": "4db6517e4eff7b2fc1ad0217851c2c36", "score": "0.45795327", "text": "public function addForeignKey($symbol, $indexColName, $refTableName, $refIndexColName, $refOptions = array()) {\n\n // mysql\n $sql = 'ALTER TABLE `'. $this->_table .'`\n ADD CONSTRAINT `'. $symbol .'`\n FOREIGN KEY (`'. $indexColName .'`) REFERENCES `'. $refTableName .'` (`'. $refIndexColName .'`)\n '. implode(' ', $refOptions) .';';\n\n $this->_db->execute('SET foreign_key_checks = 0');\n $this->_db->execute($sql);\n $this->_db->execute('SET foreign_key_checks = 1');\n\n $this->_foreignKeyList[$symbol] = true;\n $this->_jqueryAjaxResponse = 'FOREIGN_KEY_ADDED_TO_TABLE';\n }", "title": "" }, { "docid": "2cfd4f8df2182c0a4a7940aeae3ab187", "score": "0.45743588", "text": "public function add() {\n\t\t$this->set('states',$this->Address->State->find('list', array('fields' => array('State.id','State.short_name'))));\n\t\tif($this->request->is('post')) {\n\t\t\t$this->Address->create();\n\t\t\tif($this->Address->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The address has been saved'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->Session->setFlash(__('The address could not be saved, please try again'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6881c01a8d96c7f08bcace56f2d452b6", "score": "0.45406273", "text": "private function addOrocrmDmDataFieldForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_data_field');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['owner_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n }", "title": "" }, { "docid": "5c1f7b16f0879d313e8e71cf4257c6c2", "score": "0.45079342", "text": "public function createAddress(){\n\t\t$this->parseAddress();\n\t\t$model = $this->fetchModel('addresses');\n\t\t$model['address']['household']['@id'] = $this->id['household'];\n \t$model['address']['addressType']['@id'] = \"1\"; //Primary;\n\t\t$model['address']['address1'] = $this->person['address'];\n\t\t$model['address']['city'] = $this->person['city'];\n\t\t$model['address']['postalCode'] = $this->person['zip'];\n\t\t$model['address']['stProvince'] = $this->person['state'];\n \t$model['address']['addressDate'] = $this->timestamp;\n $model['address']['addressComment'] = \"Formstack Event Registration\";\n\n try {\n \t$address = self::$f1->addresses($this->id['household'])->create($model);\n \t} catch(\\webhook\\Exception $e){\n \t\t$this->errorLog($e);\n \t} \t\n\t}", "title": "" }, { "docid": "6785c1a8a4417190a94f85cb72141697", "score": "0.45067286", "text": "function AddAddress($address, $name = \"\")\n {\n $cur = count($this->to);\n $this->to[$cur][0] = trim($address);\n $this->to[$cur][1] = $name;\n }", "title": "" }, { "docid": "f6f4defa0d17b10f9fda5e0108e32db1", "score": "0.4499765", "text": "protected function loadAddressBook()\r\n {\r\n $this->addressBook = $this->settingsService->getAddressBookInstance();\r\n \\OCP\\Contacts::clear();\r\n \\OCP\\Contacts::registerAddressBook(\r\n $this->addressBook->getSearchProvider()\r\n );\r\n }", "title": "" }, { "docid": "4c3faedba59beb458f438abe7d16d416", "score": "0.4475597", "text": "function AddAddress($address, $name = \"\") {\r\n $cur = count($this->to);\r\n $this->to[$cur][0] = trim($address);\r\n $this->to[$cur][1] = $name;\r\n }", "title": "" }, { "docid": "825c34aa27057bfc9e285c12d1fea37f", "score": "0.4468578", "text": "private function processAdditions($bean,$ownAdditions) {\n\t\t$myFieldLink = $bean->getMeta('type').'_id';\n\t\tif ($bean && count($ownAdditions)>0) {\n\t\t\t$first = reset($ownAdditions);\n\t\t\tif ($first instanceof RedBean_OODBBean) {\n\t\t\t\t$alias = $bean->getMeta('sys.alias.'.$first->getMeta('type'));\n\t\t\t\tif ($alias) $myFieldLink = $alias.'_id';\n\t\t\t}\n\t\t}\n\t\tforeach($ownAdditions as $addition) {\n\t\t\tif ($addition instanceof RedBean_OODBBean) { \n\t\t\t\t$addition->$myFieldLink = $bean->id;\n\t\t\t\t$addition->setMeta('cast.'.$myFieldLink,'id');\n\t\t\t\t$this->store($addition);\n\t\t\t\t\n\t\t\t\tif (!$this->isFrozen) {\n\t\t\t\t\t$this->writer->addIndex($addition->getMeta('type'),\n\t\t\t\t\t\t'index_foreignkey_'.$addition->getMeta('type').'_'.$bean->getMeta('type'),\n\t\t\t\t\t\t $myFieldLink);\n\t\t\t\t\t$isDep = $this->isDependentOn($addition->getMeta('type'),$bean->getMeta('type'));\n\t\t\t\t\t$this->writer->addFK($addition->getMeta('type'),$bean->getMeta('type'),$myFieldLink,'id',$isDep);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RedBean_Exception_Security('Array may only contain RedBean_OODBBeans');\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ad98236f670c8130a48b76bbcfeda019", "score": "0.4463263", "text": "public function initialize()\n {\n // attributes\n $this->setName('addresses');\n $this->setPhpName('Addresses');\n $this->setClassname('Hanzo\\\\Model\\\\Addresses');\n $this->setPackage('src.Hanzo.Model');\n $this->setUseIdGenerator(false);\n // columns\n $this->addForeignPrimaryKey('customers_id', 'CustomersId', 'INTEGER' , 'customers', 'id', true, null, null);\n $this->addPrimaryKey('type', 'Type', 'VARCHAR', true, 32, 'payment');\n $this->addColumn('title', 'Title', 'VARCHAR', false, 12, null);\n $this->addColumn('first_name', 'FirstName', 'VARCHAR', true, 128, null);\n $this->addColumn('last_name', 'LastName', 'VARCHAR', true, 128, null);\n $this->addColumn('address_line_1', 'AddressLine1', 'VARCHAR', true, 255, null);\n $this->addColumn('address_line_2', 'AddressLine2', 'VARCHAR', false, 255, null);\n $this->addColumn('postal_code', 'PostalCode', 'VARCHAR', true, 12, null);\n $this->addColumn('city', 'City', 'VARCHAR', true, 64, null);\n $this->addColumn('country', 'Country', 'VARCHAR', true, 128, null);\n $this->addForeignKey('countries_id', 'CountriesId', 'INTEGER', 'countries', 'id', true, null, null);\n $this->addColumn('state_province', 'StateProvince', 'VARCHAR', false, 64, null);\n $this->addColumn('company_name', 'CompanyName', 'VARCHAR', false, 128, null);\n $this->addColumn('external_address_id', 'ExternalAddressId', 'VARCHAR', false, 128, null);\n $this->addColumn('latitude', 'Latitude', 'DOUBLE', false, null, null);\n $this->addColumn('longitude', 'Longitude', 'DOUBLE', false, null, null);\n $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);\n $this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);\n // validators\n }", "title": "" }, { "docid": "4758421fa474070556e6f383aedea227", "score": "0.44631284", "text": "function AddBCC($address, $name = \"\") {\r\n $cur = count($this->bcc);\r\n $this->bcc[$cur][0] = trim($address);\r\n $this->bcc[$cur][1] = $name;\r\n }", "title": "" }, { "docid": "b35fa9f1c1828d84e3eef08e10183074", "score": "0.44569638", "text": "public function up()\n {\n Schema::create('user_addresses', function (Blueprint $table) \n {\n $table->increments('id')\n ->comment = 'Primary key.';\n \n $table->integer('user_id')\n ->unsigned()\n ->index()\n ->comment = 'Foreign key linking back to a given user in the Users table.';\n\n $table->foreign('user_id')\n ->references('id')\n ->on('users')\n ->onDelete('cascade')\n ->comment = 'Foreign key constraint linking back to the users table.';\n \n $table->string('address1',100)\n ->comment = 'Users address.';\n \n $table->string('address2',100)\n ->comment = 'Continuation of users address (if needed).';\n \n $table->string('city',25)\n ->index()\n ->comment = 'City where the residence is located.';\n \n $table->integer('state_id')\n ->unsigned()\n ->index()\n ->comment = 'Foreign key linking back to the states table.';\n \n $table->foreign('state_id')\n ->references('id')\n ->on('states')\n ->comment = 'Foreign key constraint linking back to the states table.';\n\n $table->integer('country_id')\n ->unsigned()\n ->index()\n ->comment = 'Foreign key linking back to the countries table.';\n\n $table->foreign('country_id')\n ->references('id')\n ->on('countries')\n ->comment = 'Foreign key constraint linking back to the countries table.';\n\n $table->string('zipcode',10)\n ->comment = 'Zip code where the residence is located.';\n\n $table->string('comment',255)\n ->nullable()\n ->comment = 'Brief comment about the given user address entry.';\n\n $table->boolean('is_primary')\n ->default(false)\n ->comment = 'Determines if the entry is the primary address for a given user.';\n\n //==========================================================================================================\n //See Considerations section above regarding timestamps and softDeletes\n //==========================================================================================================\n $table->timestamps();\n $table->softDeletes();\n });\n }", "title": "" }, { "docid": "d4d0c069a81373d65bb756cc53a6e8d5", "score": "0.44481426", "text": "function AddBCC($address, $name = \"\")\n {\n $cur = count($this->bcc);\n $this->bcc[$cur][0] = trim($address);\n $this->bcc[$cur][1] = $name;\n }", "title": "" }, { "docid": "7fe27005bf894175b6e446b7b153dc0a", "score": "0.44266707", "text": "public function addAddress(string $address): void\n {\n $this->receivers .= $address;\n }", "title": "" }, { "docid": "99c5dff0eda2cf458af4023c4e06fcbd", "score": "0.4422596", "text": "function AddAddress($address,$title=false)\n\t{\n\t\t$this->_addresses[] = $title?array('address'=>$address,'title'=>$title):$address;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7466dd982f5fddbcd644918978e7e17b", "score": "0.4412328", "text": "public function addRelation($from, $to, array $through = NULL) {\n\t\t\n\t\t// add the relationship\n\t\t$how = !empty($through) ? self::INDIRECT : self::DIRECT;\n\t\t$is_indirect = $how === self::INDIRECT;\n\t\t\n\t\t// add in the relationships\n\t\t$this->relations[$from][$to] = array($how, $through);\n\t\t$this->relations[$to][$from] = array(\n\t\t\t$how, \n\t\t\t$is_indirect ? array_reverse($through) : NULL\n\t\t);\n\t\t\n\t\t// if we're going through other models, then this table is\n\t\t// directly related to the first model in the $through array.\n\t\t// we assume the same type of relationship.\n\t\tif($is_indirect) {\n\t\t\t\n\t\t\t// the first item in the $through might actually be indirect. if\n\t\t\t// it's already in the relations then we just won't set it. if it\n\t\t\t// isn't then we'll assume direct\n\t\t\tif(!isset($this->relations[$from][$through[0]])) {\n\t\t\t\t$this->relations[$from][$through[0]] = array(\n\t\t\t\t\tself::DIRECT, \n\t\t\t\t\tNULL\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e06caee802da02569bff346ef4e0e1e5", "score": "0.44090006", "text": "public function addReferencedByForeignKey(\\wcf\\data\\project\\database\\ProjectDatabaseForeignKey $foreignKey) {\r\n\t\t$this->referencedByForeignKeys[$foreignKey->getName()] = $foreignKey;\r\n\t}", "title": "" }, { "docid": "7b02474a8846b5c4be81556b22eabee0", "score": "0.44043356", "text": "private function addAddress(User $user): void\n {\n $contact = $user->getContact();\n\n $address = new Address();\n $address->setPrimaryAddress(true);\n $address->setNote('');\n /** @var AddressType $addressType */\n $addressType = $this->getEntityManager()->getReference(AddressType::class, 1);\n $address->setAddressType($addressType);\n $contactAddress = new ContactAddress();\n $contactAddress->setMain(true);\n $contactAddress->setAddress($address);\n $contactAddress->setContact($contact);\n\n $contact->addContactAddress($contactAddress);\n }", "title": "" }, { "docid": "51fb15c59d0c86a57d140cfa05b58417", "score": "0.44027555", "text": "private function addOroDotmailerOAuthForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_oauth');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_user'),\n ['user_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'CASCADE']\n );\n }", "title": "" }, { "docid": "afe98cd9c7f940c90d374a7861426eb5", "score": "0.4394303", "text": "protected function registerDoctrineMappings($config)\n\t{\n\t\t//die();\n\t\t\n\n $collector = DoctrineCollector::getInstance();\n\n $collector->addAssociation($config['admin']['customer']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'office_address',\n 'targetEntity' => $config['admin']['customer_address']['entity'],\n 'cascade' => array(\n 'all',\n ),\n 'mappedBy' => null,\n 'inversedBy' => null,\n ));\n \n $collector->addAssociation($config['admin']['customer']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'delivery_address',\n 'targetEntity' => $config['admin']['customer_address']['entity'],\n 'cascade' => array(\n 'all',\n ),\n 'mappedBy' => null,\n 'inversedBy' => null,\n ));\n \n\t\t// Adding Contact's mapping\n $collector->addAssociation($config['admin']['contact']['entity'], 'mapOneToMany', array(\n 'fieldName' => 'customer_has_contacts',\n 'targetEntity' => $config['admin']['customer_has_contacts']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => 'contact',\n 'orphanRemoval' => false,\n ));\n \n $collector->addAssociation($config['admin']['customer_has_contacts']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'customer',\n 'targetEntity' => $config['admin']['customer']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => NULL,\n 'inversedBy' => 'customer_has_contacts',\n 'joinColumns' => array(\n array(\n 'name' => 'customer_id',\n 'referencedColumnName' => 'id',\n ),\n ),\n 'orphanRemoval' => false,\n ));\n\n $collector->addAssociation($config['admin']['customer_has_contacts']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'contact',\n 'targetEntity' => $config['admin']['contact']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => NULL,\n 'inversedBy' => 'customer_has_contacts',\n 'joinColumns' => array(\n array(\n 'name' => 'contact_id',\n 'referencedColumnName' => 'id',\n ),\n ),\n 'orphanRemoval' => false,\n ));\n\n \n $collector->addAssociation($config['admin']['customer']['entity'], 'mapOneToMany', array(\n 'fieldName' => 'customer_has_contacts',\n 'targetEntity' => $config['admin']['customer_has_contacts']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => 'customer',\n 'orphanRemoval' => true,\n 'orderBy' => array(\n 'position' => 'ASC',\n ),\n ));\n \n $collector->addAssociation($config['admin']['customer']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'customer_type',\n 'targetEntity' => $config['admin']['customer_type']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => NULL,\n 'inversedBy' => NULL,\n 'joinColumns' => array(\n array(\n 'name' => 'customer_id',\n 'referencedColumnName' => 'id',\n ),\n ),\n 'orphanRemoval' => false,\n ));\n \n // Add Contact mappings\n $collector->addAssociation($config['admin']['contact']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'address',\n 'targetEntity' => $config['admin']['customer_address']['entity'],\n 'cascade' => array(\n 'persist',\n ),\n 'mappedBy' => NULL,\n 'inversedBy' => NULL,\n 'joinColumns' => array(\n array(\n 'name' => 'contact_id',\n 'referencedColumnName' => 'id',\n ),\n ),\n 'orphanRemoval' => false,\n ));\n \n $collector->addAssociation($config['admin']['customer']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'created_from',\n 'targetEntity' => $config['class']['systemuser'],\n 'cascade' => array(\n 'all',\n ),\n 'mappedBy' => null,\n 'inversedBy' => null,\n ));\n \n $collector->addAssociation($config['admin']['customer']['entity'], 'mapManyToOne', array(\n 'fieldName' => 'updated_from',\n 'targetEntity' => $config['class']['systemuser'],\n 'cascade' => array(\n 'all',\n ),\n 'mappedBy' => null,\n 'inversedBy' => null,\n ));\n\t}", "title": "" }, { "docid": "cd510de361737f66feea7cab5c3477fd", "score": "0.43922743", "text": "public function address()\n {\n return $this->belongsTo('App\\Models\\Address','address_id');\n }", "title": "" }, { "docid": "2df82683e7cbea3082419cc5ebb1f8ce", "score": "0.43851155", "text": "public function userAddresses()\n {\n return $this->hasMany(UserAddress::class);\n }", "title": "" }, { "docid": "4e0d55a1a0f5098f9a6e2750542ade40", "score": "0.43758973", "text": "function event_location_add_address_field() {\n\t\twp_nonce_field( basename( __FILE__ ), 'event_location_address_nonce' );\n\t\t?>\n\t\t<div class=\"form-field\">\n\t\t\t<label for=\"be-event-location-address\"><?php esc_html_e( 'Address', 'be-events-calendar' ); ?></label>\n\t\t\t<textarea name=\"be_event_location_address\" class=\"be-event-location-address\" id=\"be-event-location-address\" rows=\"4\"></textarea>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "4d2bfde24634406782885ff3b69d3971", "score": "0.4375581", "text": "public function Addresses() {\n return $this->hasone('App\\Address','id','address_id');\n\n }", "title": "" }, { "docid": "c46c222bd85a0034fa417b2a62c89b23", "score": "0.4373306", "text": "public function addTo($address, $name=null)\n {\n $this->add($address, $name, \"to\");\n }", "title": "" }, { "docid": "108a7aceef682b43f1754015e30479ad", "score": "0.43566227", "text": "private function updateAddressRecord ()\n {\n $this->newAddressRecord = new Address();\n $columns = Utility::getColumns('utl_address_details', ['id']);\n\n foreach ( $columns as $column ) {\n $this->newAddressRecord->$column = $this->request[ $column ] ?? $this->oldAddressRecord->$column;\n }\n\n $this->newAddressRecord->parent_id = $this->oldAddressRecord->id;\n $this->newAddressRecord->save();\n }", "title": "" }, { "docid": "d6f55dfb333fe86b922b4925e17f3dfe", "score": "0.43548715", "text": "function addForeignKey($table, $pkname, $tables)\n\t{\n\t\tif ( is_string($tables) )\n\t\t\t$tables = array($tables);\n\t\t\t\n\t\t\n\t\t$this->_foreignKeys[$table] = array(\n\t\t\t\t\t'primaryKey' => $pkname,\n\t\t\t\t\t'tables' => $tables\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "3db0c7f225074bf13e092cdc31e5db31", "score": "0.43449554", "text": "public function buildRelations()\n {\n $this->addRelation('Owner', '\\\\Owner', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':paid_by',\n 1 => ':owner_id',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "c13bc4be2e1a5347ab821f6074785ab9", "score": "0.4318756", "text": "protected function addAddresses(Email $notification, \\Swift_Message $email): void\n {\n foreach ($notification->getTo() as $to) {\n $this->addAddress($email, 'to', $to);\n }\n\n foreach ($notification->getCc() as $cc) {\n $this->addAddress($email, 'cc', $cc);\n }\n\n foreach ($notification->getBcc() as $bcc) {\n $this->addAddress($email, 'bcc', $bcc);\n }\n\n foreach ($notification->getFrom() as $from) {\n $this->addAddress($email, 'from', $from);\n }\n }", "title": "" }, { "docid": "aa6e9b130b7c8b9d014f484db3fa9293", "score": "0.43134752", "text": "public function address()\n {\n return $this->belongsTo('App\\Address');\n }", "title": "" }, { "docid": "adde8a9c6d5bf857d0e642f7a641250a", "score": "0.43128377", "text": "private function createRecord ()\n {\n $this->newAddressRecord = new Address();\n\n foreach ( $this->request as $key => $value )\n $this->newAddressRecord->setAttribute($key, $value);\n\n $this->newAddressRecord->save();\n }", "title": "" }, { "docid": "c148e9772bea57a764ffa9bb2f276147", "score": "0.4293692", "text": "public function up()\n{\n\n//\n// NOTE -- address\n// --------------------------------------------------\n \nSchema::create('address', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('customercustomer_id');\n $table->string('art', 50);\n $table->string('gender', 255);\n $table->string('first_name', 255);\n $table->string('last_name', 255);\n $table->string('street', 255);\n $table->string('city', 255);\n $table->string('country', 255);\n $table->string('stateprovince', 255);\n $table->('zip');\n $table->string('housenumber', 100);\n $table->string('stairway_number', 100);\n $table->string('floor', 100);\n $table->string('appartement_number', 100);\n $table->text('deliveryinformation');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published');\n $table->string('slug', 255)->nullable();\n });\n\n\n//\n// NOTE -- aktuellerezepte\n// --------------------------------------------------\n \nSchema::create('aktuellerezepte', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- articles\n// --------------------------------------------------\n \nSchema::create('articles', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->unsignedInteger('category_id');\n $table->string('meta_keywords', 255)->nullable();\n $table->text('meta_description')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n });\n\n\n//\n// NOTE -- articles_tags\n// --------------------------------------------------\n \nSchema::create('articles_tags', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('article_id')->unsigned();\n $table->unsignedInteger('tag_id')->unsigned();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- beispielbox\n// --------------------------------------------------\n \nSchema::create('beispielbox', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- calendar\n// --------------------------------------------------\n \nSchema::create('calendar', function($table) {\n $table->increments('id');\n $table->timestamp('timestamp')->default(\"CURRENT_TIMESTAMP\");\n $table->date('start')->nullable();\n $table->date('end')->nullable();\n $table->string('title', 255);\n $table->mediumtext('hinweis');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- calendarweek\n// --------------------------------------------------\n \nSchema::create('calendarweek', function($table) {\n $table->increments('packetid');\n $table->string('calendarweek', 255);\n $table->mediumtext('year');\n $table->string('type', 100);\n $table->('recipeflyerur');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('is_published');\n });\n\n\n//\n// NOTE -- calendarweekrecipestruktur\n// --------------------------------------------------\n \nSchema::create('calendarweekrecipestruktur', function($table) {\n $table->increments('packetid');\n $table->('recipeid');\n $table->unsignedInteger('sorting');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('is_published');\n });\n\n\n//\n// NOTE -- categories\n// --------------------------------------------------\n \nSchema::create('categories', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n });\n\n\n//\n// NOTE -- customers_groups\n// --------------------------------------------------\n \nSchema::create('customers_groups', function($table) {\n $table->increments('customers_groups_id')->unsigned();\n $table->text('groupname')->nullable();\n $table->boolean('default');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- delivery_date\n// --------------------------------------------------\n \nSchema::create('delivery_date', function($table) {\n $table->unsignedInteger('delivery_date_id');\n $table->date('date')->default(\"0000-00-00\");\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- deliveryarea\n// --------------------------------------------------\n \nSchema::create('deliveryarea', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id')->unsigned();\n $table->string('address_delivery_bill', 255);\n $table->string('prefix', 255);\n $table->string('gender', 255);\n $table->string('first_name', 255);\n $table->string('last_name', 255);\n $table->string('suffix', 255);\n $table->string('company', 255);\n $table->string('street', 255);\n $table->string('city', 255);\n $table->string('country', 255);\n $table->string('stateprovince', 255);\n $table->('zip');\n $table->('telephone');\n $table->('fax');\n $table->text('email');\n $table->string('latitude', 255);\n $table->string('longitude', 255);\n $table->text('deliveryinformation');\n $table->string('dateofbirth', 255);\n $table->('mobile');\n $table->text('permissions')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('users_id');\n $table->boolean('is_published');\n $table->string('slug', 255)->nullable();\n $table->string('gender_delivery', 255);\n $table->string('city_delivery', 255);\n $table->string('company_delivery', 255);\n $table->string('country_delivery', 255);\n $table->string('dateofbirth_delivery', 255);\n $table->string('deliveryinformation_delivery', 255);\n $table->('fax_delivery');\n $table->string('email_delivery', 255);\n $table->string('first_name_delivery', 255);\n $table->string('last_name_delivery', 255);\n $table->string('stateprovince_delivery', 255);\n $table->string('street_delivery', 255);\n $table->('telephone_delivery');\n $table->('zip_delivery');\n });\n\n\n//\n// NOTE -- deliveryassign\n// --------------------------------------------------\n \nSchema::create('deliveryassign', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id')->unsigned();\n $table->string('address_delivery_bill', 255);\n $table->string('prefix', 255);\n $table->string('gender', 255);\n $table->string('first_name', 255);\n $table->string('last_name', 255);\n $table->string('suffix', 255);\n $table->string('company', 255);\n $table->string('street', 255);\n $table->string('city', 255);\n $table->string('country', 255);\n $table->string('stateprovince', 255);\n $table->('zip');\n $table->('telephone');\n $table->('fax');\n $table->text('email');\n $table->string('latitude', 255);\n $table->string('longitude', 255);\n $table->text('deliveryinformation');\n $table->string('dateofbirth', 255);\n $table->('mobile');\n $table->text('permissions')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('users_id');\n $table->boolean('is_published');\n $table->string('slug', 255)->nullable();\n $table->string('gender_delivery', 255);\n $table->string('city_delivery', 255);\n $table->string('company_delivery', 255);\n $table->string('country_delivery', 255);\n $table->string('dateofbirth_delivery', 255);\n $table->string('deliveryinformation_delivery', 255);\n $table->('fax_delivery');\n $table->string('email_delivery', 255);\n $table->string('first_name_delivery', 255);\n $table->string('last_name_delivery', 255);\n $table->string('stateprovince_delivery', 255);\n $table->string('street_delivery', 255);\n $table->('telephone_delivery');\n $table->('zip_delivery');\n });\n\n\n//\n// NOTE -- deliverytimes\n// --------------------------------------------------\n \nSchema::create('deliverytimes', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id')->unsigned();\n $table->string('name', 255);\n $table->string('delivery_time_from', 255);\n $table->string('delivery_time_to', 255);\n $table->string('nightjump', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->text('is_published');\n });\n\n\n//\n// NOTE -- deliveryzipcode\n// --------------------------------------------------\n \nSchema::create('deliveryzipcode', function($table) {\n $table->increments('id');\n $table->unsignedInteger('user_id');\n $table->('zip');\n $table->boolean('is_published');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- fbf_newsletter_signups\n// --------------------------------------------------\n \nSchema::create('fbf_newsletter_signups', function($table) {\n $table->increments('id')->unsigned();\n $table->string('email', 255)->unique();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('deleted_at')->nullable();\n });\n\n\n//\n// NOTE -- footers\n// --------------------------------------------------\n \nSchema::create('footers', function($table) {\n $table->increments('id')->unsigned();\n $table->string('hl_ueberuns', 255);\n $table->text('ct_ueberuns');\n $table->text('hl_rezepte');\n $table->string('slug', 255)->nullable();\n $table->date('datetime')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('ct_rezepte');\n $table->text('hl_contact');\n $table->text('ct_contact');\n });\n\n\n//\n// NOTE -- form_posts\n// --------------------------------------------------\n \nSchema::create('form_posts', function($table) {\n $table->increments('id')->unsigned();\n $table->string('sender_name_surname', 255);\n $table->string('sender_email', 255);\n $table->string('sender_phone_number', 255);\n $table->string('subject', 255);\n $table->text('message');\n $table->string('created_ip', 15);\n $table->boolean('is_answered');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- g1\n// --------------------------------------------------\n \nSchema::create('g1', function($table) {\n $table->increments('id')->unsigned();\n $table->string('name', 255)->nullable();\n $table->unsignedInteger('size')->nullable();\n $table->string('type', 255)->nullable();\n $table->string('url', 255)->nullable();\n $table->string('title', 255)->nullable();\n $table->text('description')->nullable();\n $table->text('ordner')->nullable();\n $table->text('contributor');\n $table->text('uploadedOn');\n });\n\n\n//\n// NOTE -- g2\n// --------------------------------------------------\n \nSchema::create('g2', function($table) {\n $table->increments('id')->unsigned();\n $table->string('name', 255)->nullable();\n $table->unsignedInteger('size')->nullable();\n $table->string('type', 255)->nullable();\n $table->string('url', 255)->nullable();\n $table->string('title', 255)->nullable();\n $table->text('description')->nullable();\n $table->text('ordner')->nullable();\n $table->text('contributor');\n $table->text('uploadedOn');\n });\n\n\n//\n// NOTE -- g3\n// --------------------------------------------------\n \nSchema::create('g3', function($table) {\n $table->increments('id')->unsigned();\n $table->string('name', 255)->nullable();\n $table->unsignedInteger('size')->nullable();\n $table->string('type', 255)->nullable();\n $table->string('url', 255)->nullable();\n $table->string('title', 255)->nullable();\n $table->text('description')->nullable();\n $table->text('ordner')->nullable();\n $table->text('contributor');\n $table->text('uploadedOn');\n });\n\n\n//\n// NOTE -- groups\n// --------------------------------------------------\n \nSchema::create('groups', function($table) {\n $table->increments('id')->unsigned();\n $table->string('name', 255)->unique();\n $table->text('permissions')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- gutschein\n// --------------------------------------------------\n \nSchema::create('gutschein', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- ingredients\n// --------------------------------------------------\n \nSchema::create('ingredients', function($table) {\n $table->increments('id');\n $table->string('name', 255);\n $table->mediumtext('description');\n $table->string('kcal100g', 255);\n $table->unsignedInteger('defaultunit');\n $table->('imagex');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('is_published');\n });\n\n\n//\n// NOTE -- kochabobox\n// --------------------------------------------------\n \nSchema::create('kochabobox', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- list_abotyp\n// --------------------------------------------------\n \nSchema::create('list_abotyp', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_bundesland\n// --------------------------------------------------\n \nSchema::create('list_bundesland', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_country\n// --------------------------------------------------\n \nSchema::create('list_country', function($table) {\n $table->increments('code', 2);\n $table->string('en', 50);\n $table->string('de', 50);\n });\n\n\n//\n// NOTE -- list_currency\n// --------------------------------------------------\n \nSchema::create('list_currency', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_day\n// --------------------------------------------------\n \nSchema::create('list_day', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_einheit\n// --------------------------------------------------\n \nSchema::create('list_einheit', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_gender\n// --------------------------------------------------\n \nSchema::create('list_gender', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_gruppe\n// --------------------------------------------------\n \nSchema::create('list_gruppe', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_janein\n// --------------------------------------------------\n \nSchema::create('list_janein', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->('wert');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_month\n// --------------------------------------------------\n \nSchema::create('list_month', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_recipe_type\n// --------------------------------------------------\n \nSchema::create('list_recipe_type', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_status\n// --------------------------------------------------\n \nSchema::create('list_status', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_type\n// --------------------------------------------------\n \nSchema::create('list_type', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- list_ust\n// --------------------------------------------------\n \nSchema::create('list_ust', function($table) {\n $table->increments('id');\n $table->string('bezeichnung', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- login\n// --------------------------------------------------\n \nSchema::create('login', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- logisticianmanager\n// --------------------------------------------------\n \nSchema::create('logisticianmanager', function($table) {\n $table->increments('id')->unsigned();\n $table->string('street', 255);\n $table->string('streetno', 255);\n $table->string('city', 255);\n $table->string('stateprovince', 255);\n $table->unsignedInteger('zip');\n $table->string('country_id', 255);\n $table->string('contactPerson', 255);\n $table->string('email', 255);\n $table->string('phone', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published');\n $table->string('name', 255);\n });\n\n\n//\n// NOTE -- menus\n// --------------------------------------------------\n \nSchema::create('menus', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->string('url', 255);\n $table->unsignedInteger('order');\n $table->unsignedInteger('parent_id');\n $table->string('type', 10);\n $table->string('option', 255)->nullable();\n $table->boolean('is_published')->default(\"1\");\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- news\n// --------------------------------------------------\n \nSchema::create('news', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime')->nullable();\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- newsletters\n// --------------------------------------------------\n \nSchema::create('newsletters', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id');\n $table->string('email', 255)->nullable();\n $table->string('first_name', 255)->nullable();\n $table->string('last_name', 255)->nullable();\n $table->timestamp('created_at')->default(\"CURRENT_TIMESTAMP\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->('aktiviert');\n $table->string('code', 255)->unique();\n });\n\n\n//\n// NOTE -- obstbox\n// --------------------------------------------------\n \nSchema::create('obstbox', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- offers\n// --------------------------------------------------\n \nSchema::create('offers', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- order\n// --------------------------------------------------\n \nSchema::create('order', function($table) {\n $table->increments('order_id');\n $table->date('delivery_date');\n $table->unsignedInteger('order_increment_id');\n $table->unsignedInteger('deliverable');\n $table->unsignedInteger('customercustomer_id');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- order_address\n// --------------------------------------------------\n \nSchema::create('order_address', function($table) {\n $table->increments('address_id')->unsigned();\n $table->unsignedInteger('orderorder_id');\n $table->string('address_type', 20);\n $table->string('gender', 255);\n $table->string('first_name', 255);\n $table->string('last_name', 255);\n $table->string('street', 255);\n $table->string('city', 255);\n $table->string('country', 255);\n $table->string('stateprovince', 255);\n $table->('zip');\n $table->string('housenumber', 100);\n $table->string('stairway_number', 100);\n $table->string('floor', 100);\n $table->string('appartement_number', 100);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->string('delivery_information', 255)->nullable();\n });\n\n\n//\n// NOTE -- order_items\n// --------------------------------------------------\n \nSchema::create('order_items', function($table) {\n $table->increments('order_items_id');\n $table->unsignedInteger('orderorder_id');\n $table->unsignedInteger('product_id');\n $table->string('product_sku', 100);\n $table->string('product_name', 100);\n $table->decimal('original_price_net', 10,2);\n $table->decimal('ust', 10,2);\n $table->decimal('discount', 10,2);\n $table->decimal('affilate_discount', 10,2);\n $table->decimal('affilate_credit', 10,2);\n $table->decimal('giftvoucher_credit', 10,2);\n $table->string('coupon_code', 100);\n $table->string('giftvoucher_code', 100);\n $table->string('affilate_code', 100);\n $table->unsignedInteger('quantity');\n $table->timestamp('timestamp')->default(\"CURRENT_TIMESTAMP\");\n $table->date('created_at')->default(\"0000-00-00\");\n $table->date('updated_at')->default(\"0000-00-00\");\n });\n\n\n//\n// NOTE -- order_status_history\n// --------------------------------------------------\n \nSchema::create('order_status_history', function($table) {\n $table->increments('order_status_history_id');\n $table->unsignedInteger('orderorder_id');\n $table->string('status', 100);\n $table->string('channel', 100);\n $table->string('operator', 100);\n $table->timestamp('timestamp')->default(\"CURRENT_TIMESTAMP\");\n $table->date('created_at')->default(\"0000-00-00\");\n $table->date('updated_at')->default(\"0000-00-00\");\n });\n\n\n//\n// NOTE -- pages\n// --------------------------------------------------\n \nSchema::create('pages', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n });\n\n\n//\n// NOTE -- photo_galleries\n// --------------------------------------------------\n \nSchema::create('photo_galleries', function($table) {\n $table->increments('id')->unsigned();\n $table->string('products_id', 255);\n $table->string('title', 255);\n $table->text('content');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n });\n\n\n//\n// NOTE -- photos\n// --------------------------------------------------\n \nSchema::create('photos', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id');\n $table->string('file_name', 255);\n $table->string('title', 255);\n $table->string('pathto', 255);\n $table->unsignedInteger('file_size');\n $table->string('type', 20);\n $table->unsignedInteger('relationship_id')->unsigned();\n $table->text('path');\n });\n\n\n//\n// NOTE -- product_subscription\n// --------------------------------------------------\n \nSchema::create('product_subscription', function($table) {\n $table->unsignedInteger('product_product_id');\n $table->unsignedInteger('subscription_subscription_id');\n $table->unsignedInteger('quantity');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- products\n// --------------------------------------------------\n \nSchema::create('products', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id');\n $table->unsignedInteger('photo_galleries_id');\n $table->mediumtext('product_name');\n $table->('description');\n $table->('imagex');\n $table->string('type', 255);\n $table->unsignedInteger('nr_of_recipes')->unsigned();\n $table->unsignedInteger('nr_of_persons');\n $table->decimal('price', 10,2);\n $table->mediumtext('productlink');\n $table->string('currency', 100);\n $table->('ust');\n $table->string('recipetype', 255);\n $table->unsignedInteger('recipetypenummer');\n $table->string('sku', 100);\n $table->unsignedInteger('standalone');\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->string('is_published', 255);\n });\n\n\n//\n// NOTE -- profile\n// --------------------------------------------------\n \nSchema::create('profile', function($table) {\n $table->increments('id')->unsigned();\n $table->('user_id')->unique();\n $table->string('username', 255);\n $table->string('firstname', 255);\n $table->string('lastname', 255);\n $table->string('gender', 255);\n $table->string('language', 255);\n $table->string('age', 255);\n $table->string('birthday', 255);\n $table->string('birthmonth', 255);\n $table->string('birthyear', 255);\n $table->string('phone', 255);\n $table->string('address', 255);\n $table->string('country', 255);\n $table->string('region', 255);\n $table->string('city', 255);\n $table->string('zip', 255);\n $table->string('email', 255);\n $table->string('identifier', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- ranking\n// --------------------------------------------------\n \nSchema::create('ranking', function($table) {\n $table->increments('ranking_id')->unsigned();\n $table->('entry_id')->unsigned();\n $table->boolean('ranking_value');\n $table->boolean('ranking_column')->unsigned();\n $table->boolean('judge_id');\n $table->('contest_id')->unsigned();\n $table->timestamp('timestamp')->default(\"CURRENT_TIMESTAMP\");\n $table->string('ip_address', 15);\n $table->text('text');\n });\n\n\n//\n// NOTE -- recipe\n// --------------------------------------------------\n \nSchema::create('recipe', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('kochabo_id');\n $table->string('slug', 255);\n $table->string('title', 255);\n $table->string('duration', 100);\n $table->string('cooking_time', 100);\n $table->mediumtext('tip');\n $table->mediumtext('athome');\n $table->('description');\n $table->('imagesmall');\n $table->('imagemiddle');\n $table->('imagebig');\n $table->('nutrition_carbs');\n $table->('nutrition_fat');\n $table->('nutrition_protein');\n $table->('nutrition_kcal');\n $table->mediumtext('step_1');\n $table->mediumtext('step_2');\n $table->mediumtext('step_3');\n $table->mediumtext('step_4');\n $table->mediumtext('step_5');\n $table->mediumtext('step_6');\n $table->mediumtext('step_7');\n $table->boolean('gluten_free');\n $table->boolean('lactose_free');\n $table->boolean('vegan');\n $table->boolean('vegetarien');\n $table->boolean('meat');\n $table->boolean('fish');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('is_published');\n });\n\n\n//\n// NOTE -- recipe_ingredient\n// --------------------------------------------------\n \nSchema::create('recipe_ingredient', function($table) {\n $table->increments('id');\n $table->unsignedInteger('ingredient_id');\n $table->unsignedInteger('recipe_id');\n $table->unsignedInteger('delivery');\n $table->unsignedInteger('amount_2_persons');\n $table->unsignedInteger('amount_4_persons');\n $table->unsignedInteger('amount_6_persons');\n $table->string('einheit', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->unsignedInteger('is_published');\n });\n\n\n//\n// NOTE -- settings\n// --------------------------------------------------\n \nSchema::create('settings', function($table) {\n $table->increments('id')->unsigned();\n $table->string('site_title', 255);\n $table->string('ga_code', 255);\n $table->string('meta_keywords', 255);\n $table->string('meta_description', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- sliders\n// --------------------------------------------------\n \nSchema::create('sliders', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->('type');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- sofunktioniertes\n// --------------------------------------------------\n \nSchema::create('sofunktioniertes', function($table) {\n $table->increments('id')->unsigned();\n $table->string('title', 255);\n $table->text('content');\n $table->string('slug', 255)->nullable();\n $table->date('datetime');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published')->default(\"1\");\n $table->text('bild1');\n });\n\n\n//\n// NOTE -- subscription\n// --------------------------------------------------\n \nSchema::create('subscription', function($table) {\n $table->unsignedInteger('subscription_id');\n $table->unsignedInteger('customercustomer_id');\n $table->date('start_date')->default(\"0000-00-00\");\n $table->date('end_date')->default(\"0000-00-00\");\n $table->unsignedInteger('interval_type');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- tags\n// --------------------------------------------------\n \nSchema::create('tags', function($table) {\n $table->increments('id')->unsigned();\n $table->string('name', 255);\n $table->string('slug', 255);\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n//\n// NOTE -- throttle\n// --------------------------------------------------\n \nSchema::create('throttle', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('user_id')->unsigned();\n $table->string('ip_address', 255)->nullable();\n $table->unsignedInteger('attempts');\n $table->boolean('suspended');\n $table->boolean('banned');\n $table->timestamp('last_attempt_at')->nullable();\n $table->timestamp('suspended_at')->nullable();\n $table->timestamp('banned_at')->nullable();\n });\n\n\n//\n// NOTE -- users\n// --------------------------------------------------\n \nSchema::create('users', function($table) {\n $table->increments('id')->unsigned();\n $table->unsignedInteger('customers_groups_id');\n $table->string('email', 255)->unique();\n $table->string('email_aktuell', 255);\n $table->string('password', 255);\n $table->string('passwordhardcode', 255);\n $table->text('permissions')->nullable();\n $table->boolean('activated');\n $table->string('activation_code', 255)->nullable();\n $table->timestamp('activated_at')->nullable();\n $table->timestamp('last_login')->nullable();\n $table->string('persist_code', 255)->nullable();\n $table->string('reset_password_code', 255)->nullable();\n $table->text('first_name')->nullable();\n $table->date('date_of_birth')->nullable()->default(\"0000-00-00\");\n $table->string('telephone', 255);\n $table->string('gender', 100);\n $table->unsignedInteger('default_billing_address');\n $table->unsignedInteger('default_shipping_address');\n $table->text('last_name')->nullable();\n $table->string('birthday', 2);\n $table->string('birthmonth', 2);\n $table->string('birthyear', 4);\n $table->('status');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n $table->boolean('is_published');\n });\n\n\n//\n// NOTE -- users_groups\n// --------------------------------------------------\n \nSchema::create('users_groups', function($table) {\n $table->increments('user_id')->unsigned();\n $table->increments('group_id')->unsigned();\n });\n\n\n//\n// NOTE -- veto\n// --------------------------------------------------\n \nSchema::create('veto', function($table) {\n $table->increments('veto_id');\n $table->unsignedInteger('delivery_datedelivery_date_id');\n $table->unsignedInteger('customercustomer_id');\n $table->timestamp('created_at')->default(\"0000-00-00 00:00:00\");\n $table->timestamp('updated_at')->default(\"0000-00-00 00:00:00\");\n });\n\n\n\n}", "title": "" }, { "docid": "e9bc6923fb6b4c213aea98d5db1ae501", "score": "0.42860833", "text": "public function address(){\n return $this->hasOne('App\\gateready\\Address');\n }", "title": "" }, { "docid": "ec2ff574fea34de83d52fada8d9333d7", "score": "0.42650932", "text": "public function testAddingForeignKey()\n\t{\n\t\tR::nuke();\n\t\t$database = R::getCell('SELECT current_database()');\n\t\t$sql = 'CREATE TABLE book (\n\t\t\tid SERIAL PRIMARY KEY\n\t\t)';\n\t\tR::exec( $sql );\n\t\t$sql = 'CREATE TABLE page (\n\t\t\tid SERIAL PRIMARY KEY,\n\t\t\tbook_id INTEGER\n\t\t)';\n\t\tR::exec( $sql );\n\t\t$writer = R::getWriter();\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 0 );\n\t\t$writer->addFK('page', 'page', 'book_id', 'id', TRUE);\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 1 );\n\t\t//dont add twice\n\t\t$writer->addFK('page', 'page', 'book_id', 'id', TRUE);\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 1 );\n\t\t//even if it is different\n\t\t$writer->addFK('page', 'page', 'book_id', 'id', FALSE);\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 1 );\n\t\tR::nuke();\n\t\t$sql = 'CREATE TABLE book (\n\t\t\tid SERIAL PRIMARY KEY\n\t\t)';\n\t\tR::exec( $sql );\n\t\t$sql = 'CREATE TABLE page (\n\t\t\tid SERIAL PRIMARY KEY,\n\t\t\tbook_id INTEGER\n\t\t)';\n\t\tR::exec( $sql );\n\t\t$writer = R::getWriter();\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 0 );\n\t\t$writer->addFK('page', 'page', 'book_id', 'id', FALSE);\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM information_schema.key_column_usage AS k\n\t\t\tLEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name\n\t\t\tWHERE k.table_catalog = '$database'\n\t\t\t\tAND k.table_schema = 'public'\n\t\t\t\tAND k.table_name = 'page'\n\t\t\t\tAND c.constraint_type = 'FOREIGN KEY'\";\n\t\t$numFKS = R::getCell( $sql );\n\t\tasrt( (int) $numFKS, 1 );\n\t}", "title": "" }, { "docid": "ad76365ea590cd52fbe00e13cc914d0f", "score": "0.4239577", "text": "protected function addOrderBaseAddressData( \\Aimeos\\MShop\\Common\\Manager\\Iface $manager,\n\t\tarray $bases, array $testdata )\n\t{\n\t\t$orderAddr = $manager->createItem();\n\n\t\tforeach( $testdata['order/base/address'] as $dataset )\n\t\t{\n\t\t\tif( !isset( $bases['ids'][$dataset['baseid']] ) ) {\n\t\t\t\tthrow new \\Aimeos\\MW\\Setup\\Exception( sprintf( 'No base ID found for \"%1$s\"', $dataset['baseid'] ) );\n\t\t\t}\n\n\t\t\t$orderAddr->setId( null );\n\t\t\t$orderAddr->setBaseId( $bases['ids'][$dataset['baseid']] );\n\t\t\t$orderAddr->setAddressId( ( isset( $dataset['addrid'] ) ? $dataset['addrid'] : '' ) );\n\t\t\t$orderAddr->setType( $dataset['type'] );\n\t\t\t$orderAddr->setCompany( $dataset['company'] );\n\t\t\t$orderAddr->setVatID( ( isset( $dataset['vatid'] ) ? $dataset['vatid'] : '' ) );\n\t\t\t$orderAddr->setSalutation( $dataset['salutation'] );\n\t\t\t$orderAddr->setTitle( $dataset['title'] );\n\t\t\t$orderAddr->setFirstname( $dataset['firstname'] );\n\t\t\t$orderAddr->setLastname( $dataset['lastname'] );\n\t\t\t$orderAddr->setAddress1( $dataset['address1'] );\n\t\t\t$orderAddr->setAddress2( $dataset['address2'] );\n\t\t\t$orderAddr->setAddress3( $dataset['address3'] );\n\t\t\t$orderAddr->setPostal( $dataset['postal'] );\n\t\t\t$orderAddr->setCity( $dataset['city'] );\n\t\t\t$orderAddr->setState( $dataset['state'] );\n\t\t\t$orderAddr->setCountryId( $dataset['countryid'] );\n\t\t\t$orderAddr->setTelephone( $dataset['telephone'] );\n\t\t\t$orderAddr->setEmail( $dataset['email'] );\n\t\t\t$orderAddr->setTelefax( $dataset['telefax'] );\n\t\t\t$orderAddr->setWebsite( $dataset['website'] );\n\t\t\t$orderAddr->setLanguageId( $dataset['langid'] );\n\t\t\t$orderAddr->setLatitude( $dataset['latitude'] );\n\t\t\t$orderAddr->setLongitude( $dataset['longitude'] );\n\t\t\t$orderAddr->setFlag( $dataset['flag'] );\n\n\t\t\t$manager->saveItem( $orderAddr, false );\n\t\t}\n\t}", "title": "" }, { "docid": "b82e92b805953681c37dc3a4592e73f4", "score": "0.4236849", "text": "public function testSetNewBillingAddressWithSaveInAddressBook()\n {\n $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');\n $query = <<<QUERY\nmutation {\n setBillingAddressOnCart(\n input: {\n cart_id: \"$maskedQuoteId\"\n billing_address: {\n address: {\n firstname: \"test firstname\"\n lastname: \"test lastname\"\n company: \"test company\"\n street: [\"test street 1\", \"test street 2\"]\n city: \"test city\"\n region: \"AZ\"\n postcode: \"887766\"\n country_code: \"US\"\n telephone: \"88776655\"\n save_in_address_book: true\n }\n }\n }\n ) {\n cart {\n billing_address {\n firstname\n lastname\n company\n street\n city\n postcode\n telephone\n country {\n code\n label\n }\n __typename\n }\n }\n }\n}\nQUERY;\n $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap());\n $customer = $this->customerRepository->get('[email protected]');\n $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create();\n $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems();\n\n self::assertCount(0, $addresses);\n self::assertArrayHasKey('cart', $response['setBillingAddressOnCart']);\n\n $cartResponse = $response['setBillingAddressOnCart']['cart'];\n self::assertArrayHasKey('billing_address', $cartResponse);\n $billingAddressResponse = $cartResponse['billing_address'];\n $this->assertNewAddressFields($billingAddressResponse);\n\n foreach ($addresses as $address) {\n $this->customerAddressRepository->delete($address);\n }\n }", "title": "" }, { "docid": "d5c851b1cc53858803982efd24006c5d", "score": "0.4231483", "text": "public function checkAddressBook()\n\t{\n\t\t$this->loadDataContainer($this->ab_table);\n\t\t\n\t\tif($this->Input->get('act') == \"edit\" && isset($GLOBALS['TL_DCA'][$this->ab_table]))\n\t\t{\n\t\t\t$GLOBALS['TL_DCA']['tl_map_locations']['palettes']['default'] = str_replace('addImage;','addImage;{address_legend},linkAddress;',$GLOBALS['TL_DCA']['tl_map_locations']['palettes']['default']);\n\t\t}\n\t}", "title": "" }, { "docid": "7a9363ec80f7f89994b8ff489e5c7659", "score": "0.4222761", "text": "function _cmd_addressBook(&$input, &$output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n $aRoles = $this->da->getRoles($excludeAdmin = true);\n $output->groups = SGL_Output::generateCheckboxList($output->roleList,\n $input->groups, 'frmGroups[]');\n foreach ($aRoles as $roleId => $roleName) {\n $aAllEmailsByRole[$roleName] = $this->da->getEmailsByRole($roleId);\n\n // remove groups with no members\n if ($aAllEmailsByRole[$roleName] == null) {\n unset($aAllEmailsByRole[$roleName]);\n }\n }\n $output->groupList = $aAllEmailsByRole;\n $output->wysiwyg = false;\n $output->masterTemplate = 'masterBlank.html';\n $output->template='newletterAddressBook.html';\n }", "title": "" }, { "docid": "f1225f4550616a1cfb503be03df968e3", "score": "0.4214627", "text": "private function prepareAddresses($addresses, Message $message) \n {\n //Check the Mail class\n if(!isset($addresses['to'])) {\n throw new MailException('You need to provide at least one destinatary.');\n }\n \n if(!is_array($addresses['to'])) {\n $addresses['to'] = array($addresses['to']);\n } \n \n foreach($addresses['to'] as $email) {\n $message->addTo($email);\n }\n\n if(isset($addresses['cc'])) {\n $message->setBccAddress($addresses['cc']);\n }\n\n //Set Reply-To\n if(isset($addresses['Reply-To'])) {\n $message->addHeader('Reply-To', $addresses['Reply-To']);\n }\n \n }", "title": "" }, { "docid": "47c43023a38b5252568265fa36e54187", "score": "0.42110112", "text": "private function processBillingAddressRelocation()\n {\n if ($this->checkoutConfig->getBillingAddressDisplayOn() == self::BILLING_ADDRESS_POSITION) {\n $billingAddress = $this->walker->getValue('{PAYMENT}.>>.afterMethods.>>.billing-address-form');\n $this->walker->setValue('{SHIPPING_ADDRESS}.>>.billing-address-form', $billingAddress);\n\n $afterMethodsChilds = $this->walker->getValue('{PAYMENT}.>>.afterMethods.>>');\n unset($afterMethodsChilds['billing-address-form']);\n $this->walker->setValue('{PAYMENT}.>>.afterMethods.>>', $afterMethodsChilds);\n }\n }", "title": "" }, { "docid": "c7ed24683039770c9af09ee82e530f45", "score": "0.4205736", "text": "private function addAddressTwo(){\n\t\t$element = 'addressTwo';\n\t\t$this->addElement('text', $element, array (\n\t\t\t'label' => $element,\n\t\t\t'required' => false,\n\t\t\t'filters' => array ('StringTrim'),\n\t\t\t'validators' => array (array ('validator' => 'StringLength','options' => array (1,50)))));\t\n\t\t$this->addDecoratorAndGroup( $element );\n\t}", "title": "" }, { "docid": "d15ff1c613149a8ef043669a1d152eb3", "score": "0.4204462", "text": "function admin_add_relation() {\n\t\t//\n\t}", "title": "" }, { "docid": "d759a37db8a356abdf384cc5358f4ede", "score": "0.42007172", "text": "protected function add(PdfIndirectReference $contents) {\n put(PdfName::$CONTENTS, $contents);\n }", "title": "" }, { "docid": "ad9e64e5619e7f3a6f44ba311b098931", "score": "0.41866532", "text": "function affwp_save_affiliate_address_2( $affiliate_id, $status, $args ) {\n\n\t$address_2 = sanitize_text_field( $_POST['affwp_address_2'] );\n\n\tif ( ! empty( $address_2 ) ) {\n\t\taffwp_add_affiliate_meta( $affiliate_id, 'address_2', $address_2 );\n\t}\n\n}", "title": "" }, { "docid": "0c06da7a8dff5b7183ce062754ed30c5", "score": "0.4185767", "text": "private function addOroDotmailerCampaignForeignKeys(Schema $schema): void\n {\n $table = $schema->getTable('orocrm_dm_campaign');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['owner_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_integration_channel'),\n ['channel_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_campaign_email'),\n ['email_campaign_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('orocrm_dm_campaign_summary'),\n ['campaign_summary_id'],\n ['id'],\n ['onUpdate' => null, 'onDelete' => 'SET NULL']\n );\n }", "title": "" }, { "docid": "0e704652be3f56193873a87c0d930592", "score": "0.41737035", "text": "public function buildRelations()\n {\n $this->addRelation('Advert', '\\\\Common\\\\DbBundle\\\\Model\\\\Advert', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id',\n 1 => ':id',\n ),\n), 'CASCADE', null, null, false);\n }", "title": "" }, { "docid": "9df5fe0fa4d462baa664b43b60e4d600", "score": "0.4169086", "text": "public function address()\n {\n return $this->belongsTo('App\\Address', 'address_id');\n }", "title": "" }, { "docid": "9df5fe0fa4d462baa664b43b60e4d600", "score": "0.4169086", "text": "public function address()\n {\n return $this->belongsTo('App\\Address', 'address_id');\n }", "title": "" }, { "docid": "9df5fe0fa4d462baa664b43b60e4d600", "score": "0.4169086", "text": "public function address()\n {\n return $this->belongsTo('App\\Address', 'address_id');\n }", "title": "" }, { "docid": "c8f8f1c604c7e72a8a936f008b3c6212", "score": "0.41687533", "text": "public function addForeignKey($table, $field, $foreign_table, $foreign_field, $name, $ondelete, $onupdate)\n {\n $sql_name = $name !== null ? $this->getCompiledQuery(' CONSTRAINT ?F', $name) : '';\n $sql_ondelete = $ondelete !== null ? 'ON DELETE '.$ondelete : '';\n $sql_onupdate = $onupdate !== null ? 'ON UPDATE '.$onupdate : '';\n\n return $this->query('ALTER TABLE ?F ADD?N FOREIGN KEY (?F) REFERENCES ?F (?F) ?N ?N', $table, $sql_name, $field, $foreign_table, $foreign_field, $sql_ondelete, $sql_onupdate);\n }", "title": "" }, { "docid": "ce844467c26d55bea375cede43eb01bd", "score": "0.41587973", "text": "public function addAddresses($index, $address) {\n\t\t$this->cart['ADDRESS'][$index] = $address;\n\t\t$this->_updateSession();\n\t}", "title": "" }, { "docid": "4463b3742043ea4b9cfeec456b330b17", "score": "0.41374722", "text": "protected function associate(RedBean_DomainObject $other) {\n\t\t$this->associationManager->associate($this->bean, $other->bean);\n\t}", "title": "" }, { "docid": "f7f096822a6464344eac53dd18bd4e58", "score": "0.41344434", "text": "public function addForeignKeyConstraint(\n string $columnName,\n string $referenceTableName,\n string $referenceColumnName,\n string $onDelete = Table::RESTRICT,\n string $onUpdate = Table::RESTRICT,\n ?string $constraintName = null\n ) {\n $query = 'ALTER TABLE `' . $this->name . '` ADD CONSTRAINT ';\n if ($constraintName != null) {\n $query .= '`' . $constraintName . '` ';\n }\n $query .= 'FOREIGN KEY (`' . $columnName . '`) REFERENCES `' . $referenceTableName . '`(`' . $referenceColumnName . '`) ON DELETE ' . $onDelete . ' ON UPDATE ' . $onUpdate;\n\n $this->Database->query($query);\n }", "title": "" }, { "docid": "90be3774e32f5ff29db725b384d94332", "score": "0.41269687", "text": "public function addFrom($address, $name = null)\n {\n $this->from[$address] = ($name ? $name : $address);\n\n return $this;\n }", "title": "" }, { "docid": "26761c2c48e2011672098fc0603f3a8d", "score": "0.41210753", "text": "public function address() {\r\n\t\treturn $this->belongsTo('Address');\r\n\t}", "title": "" }, { "docid": "46684c6d7cbe07a204848c32d8fe91cf", "score": "0.4110553", "text": "function addBookmark()\n {\n global $CONSTS_FILE_T2B;\n\n $url = getStringParam(\"url\");\n $name = getStringParam(\"name\");\n $tags = getStringParam(\"tags\");\n\n // Associate the bookmark to the correct tags\n include $CONSTS_FILE_T2B;\n\n $bid = $nextbid++;\n $tags = explode(\",\", $tags);\n\n foreach($tags as $tid)\n $t2b[(int)$tid][] = $bid;\n\n db_saveT2B($nextbid, $t2b);\n\n // Create the bookmark file\n db_saveBookmark($bid, $url, $name, $tags);\n }", "title": "" }, { "docid": "78e9c79db2f12e0de642d8a5bd6d2117", "score": "0.4110059", "text": "public function setDropoffAddress($dropoffAddress);", "title": "" }, { "docid": "6d8143a4cbd602c9883aa84114ee71ba", "score": "0.4106425", "text": "private function autoloadAddresses(DataStructures\\Module $module)\n {\n // Routes is not available on cli\n if (is_cli()) {\n return;\n }\n\n if (is_file(\n $filePath = $module->getRealPath() . 'Config' . DIRECTORY_SEPARATOR . ucfirst(\n strtolower(ENVIRONMENT)\n ) . DIRECTORY_SEPARATOR . 'Addresses.php'\n )) {\n include($filePath);\n } elseif (is_file($filePath = $module->getRealPath() . 'Config' . DIRECTORY_SEPARATOR . 'Addresses.php')) {\n include($filePath);\n }\n\n if (isset($addresses) AND $addresses instanceof Addresses) {\n config()->addItem('addresses', $addresses);\n\n unset($addresses);\n }\n }", "title": "" }, { "docid": "c1cd052d6a6e00f3803b8a929ff0b2a3", "score": "0.41045532", "text": "public function addRecordReferenceColumn($columnName, $recordTableNames)\n {\n $columnConfiguration = [\n 'label' => $this->getColumnLabel($columnName),\n 'config' => [\n 'allowed' => $recordTableNames,\n 'type' => 'group',\n 'internal_type' => 'db',\n 'maxitems' => 1,\n 'minitems' => 0,\n 'size' => 1\n ],\n ];\n\n $this->{self::$ITEM_TYPE_COLUMN_PROPERTY}[$columnName] = $columnConfiguration;\n $this->lastAddedItemIdentifier = $columnName;\n $this->lastAddedItemProperty = self::$ITEM_TYPE_COLUMN_PROPERTY;\n\n return $this;\n }", "title": "" }, { "docid": "484e85cc4ff3562aa1ecfb219afd25d6", "score": "0.41002697", "text": "public function addObjectToManyToManytRelationship($object, $joinTable, $foreignKey){\n \n \tif(!$this->objectFromInManyToManyRelationship($object, $joinTable, $foreignKey)){\n \t\t$newObject = BLGenericRecord::newRecordOfType($joinTable);\n \t\t$newObject->vars[\"recipeID\"] = $this->vars[\"id\"];\n \t\t$newObject->vars[$foreignKey] = $object->vars[\"id\"];\n \n \t\t$newObject->save();\n \t}\n }", "title": "" }, { "docid": "f5baa098375b853b4f5b386e1827031c", "score": "0.4095264", "text": "private function addAddress($trans, $options)\n {\n if ($address = $options['billing_address'] ?: $options['address']) {\n $avs = $trans->addChild('AVS');\n $avs->addChild('Address', $address['address1']);\n $avs->addChild('zip', $address['zip']);\n }\n }", "title": "" }, { "docid": "6d297bdb1d5ec13179c2748231361d4f", "score": "0.40741023", "text": "function create_post_type_address() {\n\n\t\t\t// Labels\n\t\t\t$labels = array(\n\t\t\t\t'name'\t\t\t\t\t=> __('Address', 'address'),\n\t\t\t\t'singular_name'\t\t\t=> __('Address', 'address'),\n\t\t\t\t'add_new'\t\t\t\t=> __('Add New Address', 'address'),\n\t\t\t\t'add_new_item'\t\t\t=> __('Add New Address', 'address'),\n\t\t\t\t'edit'\t\t\t\t\t=> __('Edit', 'address'),\n\t\t\t\t'edit_item'\t\t\t\t=> __('Edit Address', 'address'),\n\t\t\t\t'new_item'\t\t\t\t=> __('New Address', 'address'),\n\t\t\t\t'view'\t\t\t\t\t=> __('View Address', 'address'),\n\t\t\t\t'view_item'\t\t\t\t=> __('View Address', 'address'),\n\t\t\t\t'search_items'\t\t\t=> __('Search Addresses', 'address'),\n\t\t\t\t'not_found'\t\t\t\t=> __('No Addresses found', 'address'),\n\t\t\t\t'not_found_in_trash'\t=> __('No Addresses found in Trash', 'address')\n\t\t\t);\n\n\t\t\t// Create Address post type\n\t\t\t$args = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'public' => false,\n\t\t\t\t'publicly_queryable' => false,\n\t\t\t\t'show_in_menu' => false,\n\t\t\t\t'show_in_nav_menus'\t => false,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'exclude_from_search'=> true,\n\t\t\t 'supports'\t\t\t => array( 'author' ),\n\t\t\t\t'rewrite'\t\t\t => array(\n\t\t\t\t\t'slug'\t=> 'address'\n\t\t\t\t)\n\t\t\t);\n\t\t\tregister_post_type( 'address', $args ); // We could make the post type a setting that could be changed/filtered?\n\n\t\t}", "title": "" }, { "docid": "03427568df06617aafa17651656ee436", "score": "0.40706196", "text": "function addAddress($employeeId,$street,$houseNum,$city,$province,$postalCode){\n\t\t$strQuery=\"insert into address set EMPLOYEE_ID=$employeeId, STREET='$street', HOUSE_NO=$houseNum,CITY='$city',\n\t\tPROVINCE='$province',POSTAL_CODE='$postalCode'\";\n\t\treturn $this->query($strQuery);\n\t}", "title": "" }, { "docid": "c0f060d2be39c4d254843765fe544fa8", "score": "0.40630716", "text": "public function createAddressBook($principalUri, $url, array $properties) {\n\n $values = array(\n 'displayname' => null,\n 'description' => null,\n 'principaluri' => $principalUri,\n 'uri' => $url,\n );\n\n foreach($properties as $property=>$newValue) {\n\n switch($property) {\n case '{DAV:}displayname' :\n $values['displayname'] = $newValue;\n break;\n case '{' . CardDAV\\Plugin::NS_CARDDAV . '}addressbook-description' :\n $values['description'] = $newValue;\n break;\n default :\n throw new DAV\\Exception\\BadRequest('Unknown property: ' . $property);\n }\n\n }\n\n $query = 'INSERT INTO ' . $this->addressBooksTableName . ' (uri, displayname, description, principaluri, ctag) VALUES (:uri, :displayname, :description, :principaluri, 1)';\n $stmt = $this->pdo->prepare($query);\n $stmt->execute($values);\n\n }", "title": "" }, { "docid": "210f3d161a113cf099e30a421a47496f", "score": "0.4062801", "text": "function tripal_associate_dbxref($basetable, $record_id, $dbxref, $options = array()) {\n $linking_table = $basetable . '_dbxref';\n $foreignkey_name = $basetable . '_id';\n\n // Default Values\n $options['insert_dbxref'] = (isset($options['insert_dbxref'])) ? $options['insert_dbxref'] : TRUE;\n\n // If the dbxref_id is set then we know it already exists\n // Otherwise, select to check\n if (!isset($dbxref['dbxref_id'])) {\n $values = array(\n 'accession' => $dbxref['accession'],\n );\n if (isset($dbxref['db_id'])) {\n $values['db_id'] = $dbxref['db_id'];\n } elseif (isset($dbxref['db_name'])) {\n $values['db_id'] = array(\n 'name' => $dbxref['db_name']\n );\n }\n else {\n tripal_report_error(\n 'tripal_db_api',\n TRIPAL_WARNING,\n \"tripal_associate_dbxref: The dbxref needs to have either the db_name or db_id\n supplied. You were trying to associate a dbxref with the %base %record_id\n and supplied the dbxref values: %dbxref.\",\n array('%base' => $basetable, '%record_id' => $record_id, '%dbxref' => print_r($dbxref,TRUE))\n );\n return FALSE;\n }\n $select = chado_select_record('dbxref',array('*'), $values);\n if ($select) {\n $dbxref['dbxref_id'] = $select[0]->dbxref_id;\n }\n elseif ($options['insert_dbxref']) {\n // Insert the dbxref\n $insert = tripal_insert_dbxref($values);\n if (isset($insert->dbxref_id)) {\n $dbxref['dbxref_id'] = $insert->dbxref_id;\n }\n else {\n tripal_report_error(\n 'tripal_db_api',\n TRIPAL_WARNING,\n \"tripal_associate_dbxref: Unable to insert the dbxref using the dbxref values: %dbxref.\",\n array('%dbxref' => print_r($dbxref,TRUE))\n );\n return FALSE;\n }\n }\n else {\n tripal_report_error(\n 'tripal_api',\n TRIPAL_WARNING,\n \"tripal_associate_dbxref: The dbxref doesn't already exist. You supplied the dbxref values: %dbxref.\",\n array('%dbxref' => print_r($dbxref,TRUE))\n );\n return FALSE;\n }\n }\n\n // Now add the link between the record & dbxref\n if ($dbxref['dbxref_id'] > 0) {\n $values = array(\n 'dbxref_id' => $dbxref['dbxref_id'],\n $foreignkey_name => $record_id\n );\n\n $result = chado_select_record($linking_table, array('*'), $values);\n\n // if it doesn't already exist then add it\n if (!$result) {\n $success = chado_insert_record($linking_table, $values);\n if (!$success) {\n tripal_report_error(\n 'tripal_api',\n TRIPAL_WARNING,\n \"Failed to insert the %base record %accession\",\n array('%base' => $linking_table, '%accession' => $dbxref['accession'])\n );\n return FALSE;\n }\n $result = chado_select_record($linking_table, array('*'), $values);\n }\n\n if (isset($result[0])) {\n return $result[0];\n }\n else {\n return FALSE;\n }\n }\n\n return FALSE;\n}", "title": "" }, { "docid": "4d68d118e12bb59d80f46f7edcf3da38", "score": "0.40597364", "text": "public function defineRelations()\n {\n return array(\n 'navigations' => array(static::BELONGS_TO, 'NavigationBuilder_NavigationRecord', 'onDelete' => static::SET_NULL),\n // 'navigations' => array(static::HAS_MANY, 'NavigationBuilder_NavigationRecord', 'navigationId'),\n );\n }", "title": "" } ]
7cce322ff5f6d9ce63925ad910e2cbb5
Get capsEntity objects from the database and return them in an array.
[ { "docid": "e7363e81e888044ed77e593a879a5433", "score": "0.0", "text": "function GetEmployeeByPosition($position) {\n require 'Credentials.php';\n\n // Open connection and Select database\n $connection = mysqli_connect($host, $user, $password, $database) or die(mysql_error());\n $query = \"SELECT * FROM caps WHERE position LIKE '$position'\";\n $result = mysqli_query($connection , $query) or die(mysql_error());\n $employeeArray = array();\n \n // Get data from database.\n while ($row = mysqli_fetch_array($result)) {\n $name = $row[1];\n $position = $row[2];\n $number = $row[3];\n $description = $row[4];\n $image = $row[5];\n\n // Create position objects and store them in an array.\n $employee = new CapsEntity(-1, $name, $position, $number, $description, $image);\n array_push($employeeArray, $employee);\n }\n // Close connection and return result\n mysqli_close($connection);\n return $employeeArray;\n }", "title": "" } ]
[ { "docid": "2596a0e843f4f0a8f965ed7bb9a81320", "score": "0.64930904", "text": "public function getEntities(): array;", "title": "" }, { "docid": "2596a0e843f4f0a8f965ed7bb9a81320", "score": "0.64930904", "text": "public function getEntities(): array;", "title": "" }, { "docid": "8cb9fc6bdefa9cb2eb77f62bc3b7281d", "score": "0.64900017", "text": "public function getEntities() {\n $entities = array();\n\n $result = $this->queryAll(\"SELECT * FROM entity\");\n foreach ($result as $entity)\n $entities[] = new Entity(); // add in the constructor the values get by the entity array\n\n return $entities;\n }", "title": "" }, { "docid": "b77735ad46fe36c7703267a37802902c", "score": "0.63773453", "text": "public function getEntities();", "title": "" }, { "docid": "b77735ad46fe36c7703267a37802902c", "score": "0.63773453", "text": "public function getEntities();", "title": "" }, { "docid": "57aa43d4f940bd16a69f2ccd210078ea", "score": "0.63490766", "text": "public function get_all() {\n $entities = $this->db->get($this->table)\n ->result();\n\n if (method_exists($this, 'prepare_entity')) {\n array_walk($entities, array($this, 'prepare_entity'));\n }\n\n if ($this->result_key) {\n $result = array();\n foreach ($entities as $entity) {\n $result[$entity->{$this->result_key}] = $entity;\n }\n $this->result_key = NULL;\n return $result;\n }\n else {\n return $entities;\n }\n }", "title": "" }, { "docid": "e38924043bcaecb12b4c7d7ce3f4a5de", "score": "0.6037173", "text": "abstract protected function getEntities();", "title": "" }, { "docid": "0775f30f9e8729931d43516303c7dfae", "score": "0.6032814", "text": "public function all()\n {\n // Reading from cache first\n $cacheKey = $this->_cacheKey->getAll();\n if ($this->_cache->has($cacheKey)) {\n return $this->_cache->get($cacheKey);\n }\n \n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` ORDER BY `id` DESC\";\n $bindings = [];\n \n $entityList = $this->_retrieveEntityList($prepSql, $bindings);\n \n // Now that we have retrieved the Entity, let's add it to the cache\n $this->_cache->set($cacheKey, $entityList);\n \n return $entityList;\n }", "title": "" }, { "docid": "a8dabb64ed28e8ad52ec0c5cfdf4619c", "score": "0.5969368", "text": "public function toArray() {\r\n return $this->_orm->getData()->toArray();\r\n }", "title": "" }, { "docid": "2b70346b2f0540d96cea7e7da9689229", "score": "0.59378636", "text": "public function obtain()\n {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "0ebfb56a21cf3900c7d2dcf241be8825", "score": "0.59328336", "text": "public function returnAdverts()\n {\n $sqlQuery = $this->db->prepare(\"SELECT * FROM Adverts\");\n $sqlQuery->execute();\n $results = $sqlQuery->fetchAll(PDO::FETCH_OBJ);\n return $results;\n }", "title": "" }, { "docid": "e5b22b034c3bb02bce4681fb8b7257ec", "score": "0.5907483", "text": "public function fetchAll() {\n \n $arr = array();\n \n foreach ($this as $v) {\n $arr[] = $v;\n }\n \n return $arr; \n \n }", "title": "" }, { "docid": "8e5ad126e6f965ff150dd6a25fc39fbe", "score": "0.58818054", "text": "public function fetchAll() {\n\n $rs = $this->getDbTable()->fetchAll();\n $entries = array();\n\n foreach( $rs as $row ) {\n $entry = new Application_Model_Entry();\n\n $entry->setId($row->id)\n ->setDescription($row->desc)\n ->setDrivetime($row->drive_time)\n ->setMiles($row->miles)\n ->setCost($row->cost)\n ->setMpg($row->mpg);\n\n $entries[] = $entry;\n }\n\n return $entries;\n }", "title": "" }, { "docid": "e861f6a01aa5a15f610e03acd1ebd836", "score": "0.58654624", "text": "private function fetch($entity)\n {\n $factory = new EntityFactory($entity);\n\n $entities = [];\n while ($set = $this->statement->fetch(PDO::FETCH_ASSOC)) {\n $entities[] = $factory->create($set);\n }\n\n return $entities;\n }", "title": "" }, { "docid": "2572269567753d10c2b3425057961160", "score": "0.58327913", "text": "function getPlayers() {\n\t$objs = array();\n\t$h = DB::getInstance()->prepare(\"SELECT * FROM Player\");\n\t$h->setFetchMode(PDO::FETCH_CLASS,\"Player\");\n\t$h->execute();\n\t$objs = $h->fetchAll();\n\treturn $objs;\n}", "title": "" }, { "docid": "ed9d3b88060210a49270cefa3b63849e", "score": "0.5819043", "text": "public static function LoadAll(){\n\n //ziska objekt pro pripojeni k DB\n self::$Conn = Database::getInstance();\n\n //pole pro objekty\n $arrObjects = array();\n\n $stmt = self::$Conn->query('SELECT * FROM contact');\n $stmt->setFetchMode(PDO::FETCH_CLASS, 'Contact');\n\n while($Contact = $stmt->fetch()){\n\n array_push($arrObjects, $Contact);\n }\n\n return $arrObjects;\n }", "title": "" }, { "docid": "9edf73a793c2bd523133bca4ea84b8ac", "score": "0.5792352", "text": "public function getEntities(): array\n {\n return $this->entities;\n }", "title": "" }, { "docid": "d6eb3aee85f83e225103c2a830ff4808", "score": "0.57805943", "text": "function getAllVenues(){\n try{\n include_once(\"./classes/Venue.class.php\");\n\n $data = array();\n $query = \"SELECT * FROM venue\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n\n $stmt->setFetchMode(PDO::FETCH_CLASS, \"Venue\");\n $data = $stmt->fetchAll();\n\n return $data;\n }\n catch(PDOException $e){\n die(\"There was a problem getting all venues!\");\n } \n }", "title": "" }, { "docid": "d5560a60ee407e107ba5514e3ac731d8", "score": "0.57784855", "text": "public function getAll(){\n $query=\"select * from clientes\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "ae6b91347e2f93a572df5f19fb25d7e2", "score": "0.57645345", "text": "public function getAll()\n\t\t{\n\t\t\t$this->execute();\n\t\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_OBJ);\n\t\t}", "title": "" }, { "docid": "007cb3015f697fd79bea84289aab8610", "score": "0.5737136", "text": "public static function get():array{\n $consulta=\"SELECT * FROM mascotas\"; //prepara la consulta\n return DB::selectAll($consulta, self::class);\n }", "title": "" }, { "docid": "d6a3ba7d8c4ad2bef209168c3b8c0e29", "score": "0.5733072", "text": "public static function all()\n {\n $connection = Connection::getConnection();\n $sql = \"SELECT * FROM assentos\";\n $query = $connection->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }", "title": "" }, { "docid": "d0aabee119d23f7868463aec2b3ac9a2", "score": "0.5723948", "text": "public function getAll()\n {\n $query = $this->db->query(\"SELECT * FROM \".$this->getTable());\n return $query->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "d8bf557a064fba4c2defe6dda57a1f6e", "score": "0.571902", "text": "public function getEntityList(){\n\t$list=array();\n\t$data=array(\n\t\t'KEY'=>'8BA2A7D26EF31B12AA697E7466970B66'\n\t\t);\n\t$dataentity=$this->getData($data,'DataEntity.asmx/GetAllEntityDatainXML','Entity');\n\tforeach($dataentity as $a){\n\t\t$list[$a['entityID']]=$a['entityDesc'];\n\t}\n\treturn $list;\n}", "title": "" }, { "docid": "9221dcfee4220af37e0c81592d26631b", "score": "0.57165545", "text": "public function fetchAll()\n {\n $sql = new Sql($this->adapter);\n $select = $sql->select()\n ->from($this->table);\n \n $statement = $sql->prepareStatementForSqlObject($select);\n $result = $statement->execute();\n \n $users = array();\n foreach($result as $row){\n //add roles to user\n $roles = $this->getRoles($row['id']);\n $row['user_roles'] = $roles;\n //create user object to return\n $user = new User();\n $user->exchangeArray($row);\n $users[] = $user;\n \n }\n return $users;\n }", "title": "" }, { "docid": "598f42dd3dc099de0521b6fadbcecbf2", "score": "0.56909084", "text": "public static function get():array{\n $consulta=\"SELECT * FROM fotos\"; //preparar la consulta\n return DB::selectAll($consulta, self::class);\n }", "title": "" }, { "docid": "b0035d6d278430cf6f0ab27d6a69bbcc", "score": "0.5686994", "text": "public function fetchList(){\n\t\t\n\t\t$cursor = self::$collection->find();\n\t\t\n\t\t$container = array();\n\t\tforeach($cursor as $key => $item){\n\t\t\t$teamsContainer[] = $team;\n\t\t}\n\t\t\n\t\treturn $container;\n\t}", "title": "" }, { "docid": "3d98ff09ca783d8aa87bc0f149560a96", "score": "0.5685934", "text": "public function fetchObjects();", "title": "" }, { "docid": "c2ddafda44b3add933bc033a244b048c", "score": "0.56859046", "text": "public function allItemsArrayAction()\n {\n $Query = Doctrine_Query::create()->from('Zf1_Model_Item');\n if($items = $Query->fetchArray())\n {\n echo $Query->getSqlQuery();\n var_dump($items);\n }\n exit;\n }", "title": "" }, { "docid": "2df6a3a46b358a62c93947339037eb22", "score": "0.5680796", "text": "public function findall_club() {\n $connexion = get_connexion();\n $sql = \"SELECT * FROM club\";\n\n try {\n $sth = $connexion->prepare($sql);\n $sth->execute();\n $rows = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n } \n catch (PDOException $e) {\n throw new Exception( \"<p>Erreur lors de la requête SQL : \" . $e->getMessage() . \"</p>\");\n }\n $array = array();\n foreach ($rows as $row) {\n $array[] = new DAO_Club($row);\n }\n return $array;\n\n\n }", "title": "" }, { "docid": "694662e5d6b6e1ff1a5d97c3a9c2ff02", "score": "0.5679596", "text": "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM IOTData';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theClient = new IOTData($row);\n array_push($arr, $theClient);\n }\n return $arr;\n }", "title": "" }, { "docid": "769fe86be2059cb29b5b5dea4433ced2", "score": "0.567062", "text": "public function toEntityArray($resultset) {\n $animes = array();\n\n foreach ($resultset as $anime) {\n $animes[] = $this->toEntity($anime);\n }\n\n return $animes;\n }", "title": "" }, { "docid": "129e7e45d6787b7af8b4e4033ca0c171", "score": "0.56606406", "text": "function getAll(): array {\n return $this->db->getModelArray(ChannelRestriction::class, 'select * from channel_restriction order by name');\n }", "title": "" }, { "docid": "48401809bd2b02c9f6bccb453511f464", "score": "0.56511617", "text": "public function getAll()\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $objects = $this->executeQueryForClassArray($sql, $this->Class);\n return $objects;\n }", "title": "" }, { "docid": "52d797513460bd633a43b756920a8187", "score": "0.5649462", "text": "public static function getAll()\n {\n $class_name = get_called_class();\n\n $db = SQLite::getInstance();\n\n $sql = 'SELECT * FROM ' . static::$table_name . ' ORDER BY ' . static::$primary_key . ' ASC';\n\n $sth = $db->prepare($sql);\n $sth->execute();\n\n $results = array();\n\n while ($result = $sth->fetch())\n {\n $results[] = new $class_name($result);\n }\n\n return $results;\n }", "title": "" }, { "docid": "d391323f87cf9f097347e81138ab4582", "score": "0.56486255", "text": "public function all()\n {\n $query = \"SELECT * FROM $this->table ORDER BY id ASC\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $accounts = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $accounts;\n }", "title": "" }, { "docid": "995ab0d29dfcba414adf42c08ffd9fd4", "score": "0.5646738", "text": "public function get(){\n $this->run();\n $arr = [];\n $metadata = $this->_prepare->result_metadata();\n while($meta = $metadata->fetch_field()){\n echo var_dump($meta);\n $arr[] = $meta;\n }\n // $result = $this->_prepare->get_result();\n // return $result->fetch_all(MYSQLI_ASSOC);\n }", "title": "" }, { "docid": "0c39fe2493e928a56b04191ccea3b430", "score": "0.56428087", "text": "function getAll(): array {\n return $this->db->getModelArray(Genre::class, 'select * from genre');\n }", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.56353956", "text": "public function getObjects();", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.56353956", "text": "public function getObjects();", "title": "" }, { "docid": "b845532ae19c20fd4dd45e417d879176", "score": "0.561728", "text": "public function getAssets(){\n\n $assetFactory = new AssetFactory();\n $assetFactory->setFilter(AssetFactory::$tokenJoinVerb,$this);\n $assetFactory->populateLocal();\n\n return $assetFactory->getEntities();\n\n }", "title": "" }, { "docid": "e2b59535add018835b2f8f931cd0fa6f", "score": "0.5604459", "text": "public static function all(){\n\t\t\t$class_name = get_called_class();\n\t\t\t$response = self::fetch_all_rows($class_name);\n\t\t\t$objects = array();\n\n\t\t\twhile($row = $response->fetch()){\n\t\t\t\t$instance = new $class_name;\n\t\t\t\tforeach($row as $attribute => $value){\n\t\t\t\t\t$instance->{$attribute} = $value;\n\t\t\t\t}\n\t\t\t\tarray_push($objects, $instance);\n\t\t\t}\n\n\t\t\treturn $objects;\n\t\t}", "title": "" }, { "docid": "eb2a88d2767a1ad601ab1a961e9d5f98", "score": "0.55984336", "text": "public function toArray() {\n\t\t\n\t\t$result = array();\n\t\t$getPrefix = 'get';\n\n\t\tforeach ( get_object_vars( $this ) as $key => $noUse ){\n\t\t\t\n\t\t\t$getter = $getPrefix . Inflector::classify( $key );\n\t\t\tif( method_exists( $this, $getter ) ) {\n\t\t\t\t\n\t\t\t\t$value = $this->{$getter}();\n\t\t\t\tif( $value instanceof Entities ) {\n\t\t\t\t\t\n\t\t\t\t\tif( method_exists( $value, \"toArray\" ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$value = $value->toArray();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result[$key] = $value;\n\t\t\t}\n\t\t}\n\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a4168fc9f1338db6f5e4f16514048aa2", "score": "0.5597658", "text": "public static function all()\n {\n return self::objects()->fetch();\n }", "title": "" }, { "docid": "6bdb11c0f16b75f4490c6fc2d2b6d1b4", "score": "0.5594071", "text": "public function toArray()\n {\n $collection = array();\n\n foreach ($this->collection as $item) {\n if ($item instanceof EntityAbstract) {\n $collection[] = $item->toArray();\n } else {\n $collection[] = $item;\n }\n }\n\n return $collection;\n }", "title": "" }, { "docid": "dd5157df11ff193e0eab90218bcaa70d", "score": "0.5590828", "text": "public function buscar() {\r\n $sql = 'SELECT * FROM ' . $this->entidade . ' LIMIT ' . $this->limite;\r\n $query = mysql_query($sql);\r\n $arrayObjeto = array();\r\n $qtde = mysql_affected_rows();\r\n if ($qtde > 0) {\r\n\t while ($rows = mysql_fetch_object($query)) {\r\n\t\t\t\teval('$objetoVo = new '.ucfirst($this->entidade).'Vo();');\r\n\t\t\t\teval('$objetoVo -> set'. ucfirst($this->entidade).'Id(\"$rows->'.$this->entidade.'Id\");');\r\n\t\t\t\teval('$objetoVo -> set'. ucfirst($this->entidade).'Nome(\"$rows->'.$this->entidade.'Nome\");');\r\n\t\t\t\t$arrayObjeto[] = $objetoVo;\t\t\t\r\n\t }\r\n }\t\t\r\n\t\treturn $arrayObjeto;\r\n }", "title": "" }, { "docid": "5c31b880c2e5f1453073c0bc174156c3", "score": "0.5588061", "text": "public function getEntities()\n {\n return $this->entities;\n }", "title": "" }, { "docid": "40d93d320827915e1d69158641127c5e", "score": "0.5579877", "text": "public function getObjects() {\n \n return $this->getMapper()->fetchObjects();\n }", "title": "" }, { "docid": "deb571ef479f8f465767c33e5d806035", "score": "0.5579804", "text": "public function getAllEntries(){\n $sql = \"SELECT * FROM entries\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "title": "" }, { "docid": "9b6a4d3a365444ab4fc99fc966059a3e", "score": "0.55787873", "text": "public function getAll()\r\n {\r\n if($this->returnAs === ResultSet::AS_ARRAY){\r\n return $this->statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n }\r\n //casting to a particular class\r\n $data = array();\r\n while( $row = $this->getRow() ){\r\n $data[] = $row;\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "d228be25da045c98188acedaddc3f89f", "score": "0.5572956", "text": "public function getzealfireEntities();", "title": "" }, { "docid": "fd8a69f4a2caf92dae26c6e0ab475d7c", "score": "0.557045", "text": "public function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n\n // 2. Prepare the query\n $sql = 'SELECT * FROM products';\n $statement = $db->prepare($sql);\n\n // 3. Run the query\n $success = $statement->execute(\n\n );\n\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\n // 4.a. For each row, make a new work php object\n $productsItem = new Orders($row);\n array_push($arr, $productsItem);\n\n }\n\n // 4.b. return the array of work objects\n return $arr;\n }", "title": "" }, { "docid": "31979ab1b74656ca100c6689da8e0d7f", "score": "0.5569114", "text": "public function fetchList() : array\n {\n return ArrayUtils::arrayList($this->fetchAll(), 'id', 'name');\n }", "title": "" }, { "docid": "a94863d6d8220717b511f8d53adf1ff2", "score": "0.5562192", "text": "public static function all()\n {\n $model = new static;\n $sql = 'SELECT * FROM ' . $model->table;\n $statement = static::$pdo->prepare($sql);\n $statement->execute();\n return $statement->fetchAll(\\PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "5f0659e34ef5fcf8b17233b4319e0959", "score": "0.5557278", "text": "public function getAll() {\r\r\n $all = array();\r\r\n $dbh = dba_open($this->location, 'rl');\r\r\n if ($the_key = dba_firstkey($dbh)) do {\r\r\n //$all[$the_key] = unserialize(dba_fetch($the_key, $dbh)); This way an index is added and the return object is not formatted as array\r\r\n $all[] = unserialize(dba_fetch($the_key, $dbh));\r\r\n } while ($the_key = dba_nextkey($dbh));\r\r\n dba_close($dbh);\r\r\n return $all;\r\r\n }", "title": "" }, { "docid": "c75612fde38f6e0ad4ef12b9a5fbe55c", "score": "0.5543783", "text": "public function getAll()\n {\n return $this->statement->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "2443ace535e4d241f2ac303e9484b1ee", "score": "0.5537204", "text": "public function fetchArray()\n {\n return $this->execute( self::HYDRATE_ARRAY );\n }", "title": "" }, { "docid": "e4310c623e1c48f6e3bc99256e2fc241", "score": "0.5535555", "text": "public function getEntities()\n {\n return $this->_entities;\n }", "title": "" }, { "docid": "e23ad5c9dc7acc0e77a7fd586f6429a5", "score": "0.5534473", "text": "public function readAll(){\n $res = array();\n try{\n $req=\"SELECT id,year FROM Promotion ORDER BY year\";\n $prep = $this->co->prepare($req);\n $prep->execute();\n $rows = $prep->fetchAll(\\PDO::FETCH_OBJ);\n foreach ($rows as $row){\n $res[] = new Promotion($row->id, $row->year);\n }\n }\n catch(PDOException $e){\n echo \"Erreur lors de l'éxécution de la requète : \" +$e;\n }\n return $res;\n }", "title": "" }, { "docid": "00311b81e8e73633c86e7fd6a4416d44", "score": "0.55307335", "text": "public static function GetPaidCases()\r\n {\r\n $queryUser = Doctrine_Query::create()\r\n ->select('c.Id, c.CaseNo, c.Description , c.FirstTitle, c.LastTitle')\r\n ->from('Cases c')\r\n ->where('c.Stage = ?', sfConfig::get('app_CaseStage_Paid'))\r\n ->andWhere('c.Status = ?',sfConfig::get('app_CaseStatus_Active'))\r\n ->orderBy('c.CreateDateTime');\r\n\r\n #clsCommon::pr($queryUser->getSqlQuery());\r\n $result = $queryUser->fetchArray();\r\n $queryUser->free();\r\n $caseArr = array();\r\n if(!empty($result)) {\r\n for($i= 0 ; $i<count($result); $i++) {\r\n $caseArr[$result[$i]['Id']] = $result[$i]['CaseNo'].' - '.$result[$i]['FirstTitle'].' '.$result[$i]['LastTitle'];\r\n } // End of For\r\n\r\n } // End of If\r\n /*clsCommon::pr($result);\r\n clsCommon::pr($caseArr);\r\n die;*/\r\n return $caseArr;\r\n }", "title": "" }, { "docid": "820a8190e96603300f8bc8cb7dfea4ce", "score": "0.5529671", "text": "public function getAll()\n {\n $rows = $this->ds->createQueryBuilder()\n ->select('el.*')\n ->from($this->meta_data['table'], 'el')\n ->execute()\n ->fetchAll($this->meta_data['fetchMode']);\n\n return $this->assocToEntities($rows);\n }", "title": "" }, { "docid": "577bcca836a04729407a3dddeb021ebd", "score": "0.5525773", "text": "public static function get_all() {\n $schema = static::schema();\n return cy\\DB::select()->from($schema->table_name)\n ->exec($schema->database)->rows($schema->class);\n }", "title": "" }, { "docid": "fdffb7c9302a22df30f48791adae950c", "score": "0.55208945", "text": "public function getAll()\n {\n $items = array();\n $query = \"SELECT * FROM {$this->TableName}\";\n $result = $this->db_connection->query($query);\n\n error_log(\"Generated Query is: $query\");\n \n if (!$result) {\n throw new Exception(\"Database error: {$this->db_connection->error}\", 500);\n }\n \n while ($item = $result->fetch_object($this->ModelName)) {\n $items[] = $item;\n }\n\n return $items;\n }", "title": "" }, { "docid": "8913c73815ae48bc70d1414d86869a64", "score": "0.5516375", "text": "protected function fetchAll() {\n return $this->_model->all()->toArray();\n }", "title": "" }, { "docid": "0f6d4780ce3b6d6cd6237b6e51c58e36", "score": "0.5513947", "text": "public function fetchToArray() : array;", "title": "" }, { "docid": "c33d9ca50204421468db3fb415e5da06", "score": "0.5513921", "text": "function getVehicles(){\n\t$db = phpmotorsConnect();\n\t$sql = 'SELECT invId, invMake, invModel FROM inventory';\n\t$stmt = $db->prepare($sql);\n\t$stmt->execute();\n\t$invInfo = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t$stmt->closeCursor();\n\treturn $invInfo;\n}", "title": "" }, { "docid": "b02ddec07df3fa4c80432fe287bda8f9", "score": "0.5511275", "text": "public static function fetchAll( )\n {\n $objects = eZPersistentObject::fetchObjectList(\n self::definition()\n );\n \n return $objects;\n }", "title": "" }, { "docid": "f64818f60a501bab95b4ce22b0cf099e", "score": "0.5503276", "text": "public function fetchAll() {\n $db = DB::getFactory()->getConnection();\n $query = $this->getQuery();\n $return = array();\n\n foreach ($db->query($query) as $row) {\n $return[] = $row;\n }\n\n return $return;\n }", "title": "" }, { "docid": "2e392fcbd78567eb2e9b47f9f0fdd118", "score": "0.5502534", "text": "public function fetchObjAll() {\n return $this->resultado->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "4d7c1eda74129735630a80361cbbd3d3", "score": "0.5501919", "text": "public function fetchAll(): array\n\t{\n\t\treturn $this->findAll();\n\t}", "title": "" }, { "docid": "2bb3d0ecc845b983b77044ec71f76128", "score": "0.549743", "text": "public static function listOfObjects() {\n\t\t$query = 'SELECT * FROM '.system::getConfig()->getDatabase('wurfl').'.capabilityGroups';\n\t\t\n\t\t$list = array();\n\t\ttry {\n\t\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t\tif ( $oStmt->execute() ) {\n\t\t\t\tforeach ( $oStmt as $row ) {\n\t\t\t\t\t$oObject = new wurflCapabilityGroup();\n\t\t\t\t\t$oObject->loadFromArray($row);\n\t\t\t\t\t$list[] = $oObject;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$oStmt->closeCursor();\n\t\t} catch ( Exception $e ) {\n\t\t\tsystemLog::error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "b1bd9d87aa23aefad258f0002bda6698", "score": "0.5496333", "text": "public function toArray()\r\n {\r\n $data = array();\r\n\r\n foreach($this->results as $result)\r\n {\r\n if($result instanceof Objectify)\r\n {\r\n $data[] = $result->toArray();\r\n }\r\n else\r\n {\r\n $data[] = $result;\r\n }\r\n }\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "472c740ad231acd6585e441a6786cdd8", "score": "0.5493818", "text": "function getIncidents()\r\n {\r\n /* SELECT QUERY WITH FETCHALL (gets multiple rows) */\r\n\r\n //Define the query\r\n $sql = \"SELECT * FROM incidents ORDER BY submissionTime\";\r\n\r\n //Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //Execute the statement\r\n $statement->execute();\r\n\r\n //Process the result\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "fc7393b20b047af17710fa61bcb2c8d4", "score": "0.54887", "text": "public function getall()\r\n {\r\n $memberships = array();\r\n $count = 0;\r\n \r\n foreach($this->all() as $membership)\r\n {\r\n $membership = (array)$membership;\r\n \r\n $memberships[] = array('id' => $membership['id'], 'name' => $membership['name'],\r\n 'caption' => $membership['caption'], 'description' => $membership['description'],\r\n 'price' => $membership['price'],\r\n 'image1' => $membership['image1'], 'image2' => $membership['image2'],\r\n 'image3' => $membership['image3'], 'image4' => $membership['image4']);\r\n $count++;\r\n \r\n }\r\n \r\n if ($count > 0)\r\n {\r\n return $memberships;\r\n }\r\n else\r\n {\r\n return null;\r\n } \r\n }", "title": "" }, { "docid": "693bc8ed6aa51ebb048ffd0f6ee33e1d", "score": "0.5481931", "text": "public function fetchAll(): array;", "title": "" }, { "docid": "693bc8ed6aa51ebb048ffd0f6ee33e1d", "score": "0.5481931", "text": "public function fetchAll(): array;", "title": "" }, { "docid": "cbdd33e32d22df126fc0ebaf1339f3bc", "score": "0.5478499", "text": "public function getEntityAttributeCollection()\n {\n return $this->_getEntityAdapter()->getAttributeCollection();\n }", "title": "" }, { "docid": "6a337b176018a3ca2e0d39a0e7a0231d", "score": "0.5478244", "text": "public function queryArrayFetchAll() {\n $q = $this->conn->query('SELECT * from deputes;');\n $q->setFetchMode(PDO::FETCH_ASSOC);\n return $q;\n }", "title": "" }, { "docid": "07fea4f996da9d64d4680645f3c2b4a2", "score": "0.5476499", "text": "public function fetchOneAsArray();", "title": "" }, { "docid": "acd52b17cf61032b126137e7c4bcc253", "score": "0.54744047", "text": "public function get() : array\n {\n $this->setAutoEagerLoadings();\n\n // cache will be made according to your model.\n // this will make your queries very performance.\n return $this->additionalResourceHandler($this->useCache(function(){\n\n // a resource class will be valid,\n // where you can manipulate all the returned result set values one by one.\n return $this->resource(function(){\n return $this->graphQl();\n });\n }));\n }", "title": "" }, { "docid": "0e957f74500c47a9ae977460d271d3d1", "score": "0.5473534", "text": "public function fetchAll() {\n\t\t$db1 = Zend_Registry::get('db1');\n\t\t$select = $db1->select();\n\t\t$select->from('_AB_ASSORTIMENTENVIEW');\n\t\t\n\t\t$rows = $db1->fetchAll($select);\n\t\t\n\t\t$assortments = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$assortment = new Site_Model_SQLWooodAssortimentenView();\n\t\t\t$assortment->setAss($row['ASS']);\n\t\t\t$assortment->setCode($row['CODE']);\n\t\t\t$assortment->setOmschrijving($row['OMSCHRIJVING']);\n\t\t\t\n\t\t\t$assortments[] = $assortment;\n\t\t}\n\t\t\n\t\treturn $assortments;\n\t}", "title": "" }, { "docid": "6b60f7bd8d03ea734298840a00c3929d", "score": "0.5467647", "text": "public function getDepartments() {\n $sql = \"SELECT * FROM Department\";\n $stmt = $this->db->query($sql);\n $results = [];\n while($row = $stmt->fetch()) {\n $results[] = new DepartmentEntity($row);\n }\n return $results;\n }", "title": "" }, { "docid": "1722ade9d5432c91a2543eadaedf1103", "score": "0.5467346", "text": "public static function populateObjects(PDOStatement $stmt)\n\t{\n\t\t$results = array();\n\t\n\t\t// set the class once to avoid overhead in the loop\n\t\t$cls = TbofertaPeer::getOMClass(false);\n\t\t// populate the object(s)\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$key = TbofertaPeer::getPrimaryKeyHashFromRow($row, 0);\n\t\t\tif (null !== ($obj = TbofertaPeer::getInstanceFromPool($key))) {\n\t\t\t\t// We no longer rehydrate the object, since this can cause data loss.\n\t\t\t\t// See http://propel.phpdb.org/trac/ticket/509\n\t\t\t\t// $obj->hydrate($row, 0, true); // rehydrate\n\t\t\t\t$results[] = $obj;\n\t\t\t} else {\n\t\t\t\t$obj = new $cls();\n\t\t\t\t$obj->hydrate($row);\n\t\t\t\t$results[] = $obj;\n\t\t\t\tTbofertaPeer::addInstanceToPool($obj, $key);\n\t\t\t} // if key exists\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "008bdb8f520407fe0a7f8b1b1a33704e", "score": "0.54664695", "text": "public function getEntities()\n {\n return $this->makeRequest('GET', 'entities');\n }", "title": "" }, { "docid": "dc4bc6d2a509015d05e97f182ddaaa76", "score": "0.5465716", "text": "public static function get():array{\n $consulta=\"SELECT * FROM comments\"; //preparar la consulta\n return DB::selectAll($consulta, self::class);\n }", "title": "" }, { "docid": "508d8a55c7abe01e316600d9594ab3bc", "score": "0.5458673", "text": "public function getAll()\n\t{\t\t\n\t\t$select = $this->select()\n \t->from($this, array('*'));\n\n $result = $this->fetchAll($select)->toArray();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "996d5449ecae54291a71786593b516fc", "score": "0.5458182", "text": "public function get_desc_media_entities() : array\n{\n $this->checkAndThrow();\n\n return $this->desc_media_entities;\n\n}", "title": "" }, { "docid": "f7bde9b619c165c5eace92e37ddd28cc", "score": "0.5456467", "text": "public function getAll()\n {\n $data = array();\n $rs = parent::findAll(array(\"name\" => \"Client\"));\n foreach ($rs as $k => $v) {\n foreach ($v as $vi) {\n $data[$k] = new Client($v['CLIENTID'],$v['NOM'],$v['EMAIL'],$v['MOTPASSE']);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "94e57ab467addaa5dcd033b047db4917", "score": "0.54554236", "text": "public static function getAll()\n {\n $class = get_called_class();\n $dbObjects = self::$db->query(\"SELECT * FROM `\".$class::$tableName.\"`\", \\PDO::FETCH_ASSOC);\n\n foreach($dbObjects AS $object) {\n $objects[] = new $class($object);\n }\n\n return $objects;\n }", "title": "" }, { "docid": "b242a46d5b08cc75313184d7d418d145", "score": "0.54383105", "text": "public function all() \n {\n return Conn::getConn()->query(\"SELECT * FROM Adocoes\")->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "8adfdeba835c98be09cd35e5d0a964a8", "score": "0.543819", "text": "public function resultSet(){\n $this->execute(); // object function execute\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "4a60935b9dcfcb3979fd87f67279ed53", "score": "0.54378814", "text": "public function get(){\n $data = [];\n try{\n $query = $this->db->connect()->query(\"SELECT*FROM customer\");\n while($row = $query->fetch()){\n $item = new Customer();\n $item->code = $row['CUST_CODE'];\n $item->name = $row['CUST_NAME'];\n $item->city = $row['CUST_CITY'];\n $item->agent_code = $row['AGENT_CODE'];\n array_push($data, $item);\n }\n return $data;\n }catch(PDOException $e){\n return [];\n }\n }", "title": "" }, { "docid": "879b34462d6c71949f90aaac3da13906", "score": "0.54354846", "text": "public function execute(): array\n {\n $query = $this->buildQuery();\n\n $result = [];\n foreach ($query->all() as $entity) {\n $result[] = $this->fetchByIDs(\n explode(',', $entity->get($this->table->getPrimaryKey()))\n );\n }\n\n return $result;\n }", "title": "" }, { "docid": "6691e83e3196f8ef60c13ffe8f52f65a", "score": "0.5429427", "text": "static function all(){\n $dishes = array();\n\n $results = pg_query(\"SELECT * FROM dishes\"); //getting the information from the database for all applications\n $row_object = pg_fetch_object($results);\n\n while($row_object){ //while there's a result object...\n $new_dish = new Dish(\n intval($row_object->id),\n $row_object->dish_name,\n $row_object->restaurant_id,\n );\n $dishes[] = $new_dish;\n $row_object = pg_fetch_object($results);\n }\n return $dishes;\n }", "title": "" }, { "docid": "11e41ba6030d67c4a719c7cfbbe97f2f", "score": "0.5429098", "text": "function getAllFeatureProducts(){\n $sql = self::$connection->prepare(\" SELECT * \n FROM products AS pd\n WHERE pd.feature = 0\");\n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }", "title": "" }, { "docid": "87ea8091ef5706d5a745c4be0f0efecb", "score": "0.54221904", "text": "public function toApiArray()\n {\n $entity = $this->toArray();\n foreach ($entity as $name => &$value) {\n if (null === $value) {\n unset($entity[$name]);\n } elseif ($value instanceof Entity) {\n $value = $value->toArray();\n }\n }\n return $entity;\n }", "title": "" }, { "docid": "faa98bfd2b548b88eb3a7351519689fd", "score": "0.5415618", "text": "public static function getAllCards() {\r\n\t\t$dbAccess = new DatabaseAccess(\"localhost\", \"JosipMarasDB\", \"Josip.Maras\", \"Josip.Maras1\");\r\n\t\t\r\n\t\t$rows = $dbAccess->executeQuery(\"SELECT * FROM `Cards`\");\r\n\t\t$cards = array();\r\n\t\t\r\n\t\tforeach($rows as $row) {\r\n\t\t\t$cards[] = new Card($row[0], $row[1], $row[2], $row[3]);\r\n\t\t}\r\n\t\t\r\n\t\treturn $cards;\r\n\t}", "title": "" }, { "docid": "8e25654c983710f6fa0519dbebc40879", "score": "0.54069805", "text": "function listAll()\n {\n $this->dao->select($this->getFields());\n $this->dao->from($this->getTableName());\n $result = $this->dao->get();\n\n if($result == false) {\n return array();\n }\n\n return $result->result();\n }", "title": "" }, { "docid": "38d61710588c443566b586cdeafce72a", "score": "0.54033476", "text": "function findAll()\n {\n $table = $this->getDefaultTable();\n $db = $this->getPearDb(PASTA_DB_QUERY_READ);\n if (!$db) {\n return array();\n }\n\n $objects = array();\n $sql = $this->getSelectSql(false);\n if ($this->_limit) {\n $rs = $db->limitQuery($sql, $this->_limit[0], $this->_limit[1]);\n } else {\n $rs = $db->query($sql);\n }\n if (DB::isError($rs)) {\n return array();\n }\n $tableInfo = $db->tableInfo($rs, self::TABLEINFO_MODE);\n if (DB::isError($tableInfo)) {\n throw new Pasta_Exception('Could not get table info.');\n }\n $this->initializeFromTableInfo($tableInfo);\n while ($row = $rs->fetchRow()) {\n $class = $this->getClassNameByRow($row);\n if (!class_exists($class) || !is_subclass_of($class, __CLASS__)) {\n trigger_error(\"$class is not a subclass of \" . __CLASS__);\n continue;\n }\n $object = new $class();\n $object->setRow($row, false);\n $object->setExists(true);\n $object->updateCache(true);\n $objects[] = $object;\n }\n $rs->free();\n return $objects;\n }", "title": "" }, { "docid": "786c599ac63910a8353942517bdfa1e3", "score": "0.5401972", "text": "public function getAll(){\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM genres\n\t\t\tORDER BY genre ASC\n\t\t\";\n\n\t\t$statement = static::$pdo->prepare($sql);\n\t\t$statement->execute();\n\t\t$genreList = $statement->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $genreList;\n\t}", "title": "" }, { "docid": "786c599ac63910a8353942517bdfa1e3", "score": "0.5401972", "text": "public function getAll(){\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM genres\n\t\t\tORDER BY genre ASC\n\t\t\";\n\n\t\t$statement = static::$pdo->prepare($sql);\n\t\t$statement->execute();\n\t\t$genreList = $statement->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $genreList;\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "6bead4bf88e68595ad4d85276bbd36f1", "score": "0.0", "text": "public function show(Store $store)\n {\n admin_authorize_store($store->id);\n\n $earnings = [\n 'total_earnings' => (clone $store->user->earnings)->sum('amount'),\n 'unpaid_earnings' => (clone $store->user->earnings)->where('paid', 0)->sum('amount')\n ];\n return view('admin.stores.show', ['store' => $store, 'earnings' => $earnings]);\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": "" } ]
cb96c4ed31300f5f440f0163c925e164
TODO needed? Constructs the module class loader.
[ { "docid": "df870c6ff3f3982a84e4c246338c33ef", "score": "0.0", "text": "public function __construct($moduleName, $rootPath, $configRootPath = null) {\n $this->moduleName = $moduleName;\n $this->rootPath = $rootPath;\n \n // By default the configuration files are located under the classes root path.\n // If desired, you can re-map the path to whatever you intend to structure your\n // project folder structure.\n if ($configRootPath === null) {\n $configRootPath = $rootPath;\n }\n\n $this->configRootPath = $configRootPath;\n }", "title": "" } ]
[ { "docid": "75fcc6487f29b12beeeeca1f91f68f6f", "score": "0.6793121", "text": "private function _initClassLoader()\n {\n spl_autoload_register(array($this, \"loadClass\"));\n }", "title": "" }, { "docid": "b41e6035fa3cd5dfc6608a069f38bda5", "score": "0.6729739", "text": "public function getModuleLoader() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Vidi\\Module\\ModuleLoader');\n\t}", "title": "" }, { "docid": "343f1c3218669083c90a3c46d76b7c15", "score": "0.6713323", "text": "function init() {\n $loader = new ClassLoader();\n\n $map = require __DIR__.'/autoload_namespaces.php';\n\n foreach ($map as $namespace => $path) {\n $loader->add($namespace, $path);\n }\n\n $loader->register();\n\n return $loader;\n}", "title": "" }, { "docid": "892d3dca5fda70c3419b822c9e52c200", "score": "0.66741216", "text": "protected function getModuleLoader()\n {\n return GeneralUtility::makeInstance('Fab\\Vidi\\Module\\ModuleLoader');\n }", "title": "" }, { "docid": "11691d1281da5a535de5ba84a8f2a575", "score": "0.6650891", "text": "public function getClassLoader();", "title": "" }, { "docid": "4f8966816b18a1ad3438d12fc78c8021", "score": "0.6569549", "text": "public static function factory()\n {\n\n // initialize the storage for the class map and the include path\n $classMap = new GenericStackable();\n $includePath = array();\n\n // initialize and return the SPL class loader instance\n return new SplClassLoader($classMap, $includePath);\n }", "title": "" }, { "docid": "18439c13a4b7b8ac7ef5a704c403e255", "score": "0.6350297", "text": "private function loadClass() {\n $this->loadSystem('core/Loader.php');\n \\system\\core\\Loader::autoload();\n }", "title": "" }, { "docid": "e1ae66a085836c608b6fa5da618742d3", "score": "0.6340839", "text": "function loader()\n{\n $instance = Loader::instance( __FILE__ , '1.0' );\n\n return $instance;\n}", "title": "" }, { "docid": "0e4385785cccda2aa2d71827dd6e88b4", "score": "0.633163", "text": "public function __construct(){\n spl_autoload_register(function($className){\n include dirname(__FILE__) . '/' . str_replace('\\\\', '/', $className) . '.class.php';\n }); \n }", "title": "" }, { "docid": "d33873314bbfd1782eff351fd20dacbc", "score": "0.62922776", "text": "public function classLoader()\n\t{\n\t\tif(!isset($this->_classLoader))\n\t\t{\n\t\t\t$this->_classLoader = new ClassLoader();\n\t\t}\n\n\t\treturn $this->_classLoader;\n\t}", "title": "" }, { "docid": "bcd5aab7ff40ccff7a07b5415c342f55", "score": "0.6274055", "text": "public static function Load() {\n spl_autoload_register(function (string $_className) {\n $class_map = self::GetLoader()->map;\n //var_dump($class_map);\n //$class_map = $class_map->$map;\n\n if (isset($class_map[$_className])) {\n $Class_dir = $class_map[$_className];\n if (file_exists($Class_dir)) {\n require_once($Class_dir);\n }\n }\n else {\n self::GetLoader()->LoadUnmappedClass($_className);\n }\n\n // $Class_dir = $class_map[$_className];\n\n // if ($Class_dir !== null) {\n // include($Class_dir);\n // }\n });\n }", "title": "" }, { "docid": "ccaf4bccd8ffa6c07eb2a7d323f535a9", "score": "0.6186251", "text": "private function __construct()\n {\n spl_autoload_register(array(__CLASS__, '_load'));\n }", "title": "" }, { "docid": "bee5f7d86593851519cb2d1387d0ad58", "score": "0.6182743", "text": "public function __construct() {\n $this->_model_directory_path = MPATH;\n $this->_library_directory_path = LPATH;\n $this->_controller_directory_path = CPATH;\n $this->_service_directory_path = SPATH;\n# $this->_view_directory_path = VPATH;\n\n $this->_model_extension = '.Model.php';\n $this->_library_extension = '.Library.php';\n $this->_controller_extension = '.Controller.php';\n $this->_service_extension = '.Service.php';\n# $this->_view_extension = '.php';\n\n spl_autoload_register([$this, 'loadModel']);\n spl_autoload_register([$this, 'loadLibrary']);\n spl_autoload_register([$this, 'loadController']);\n spl_autoload_register([$this, 'loadService']);\n }", "title": "" }, { "docid": "af3e8b4affcf9ebf0fa86d4cbf95e562", "score": "0.6169024", "text": "public static function load()\n {\n\n self::$_app_path = self::_get_dir();\n spl_autoload_register('self::_loader');\n }", "title": "" }, { "docid": "d2057ad07576226f9254bc4cb3796603", "score": "0.6138039", "text": "public function __construct()\n\t{\n\t\tspl_autoload_register(array($this, 'load'));\n\t}", "title": "" }, { "docid": "1c5ffb5129eb1b33bca49209627ee159", "score": "0.6130417", "text": "public function __construct() {\n ExtensionLoader::init();\n }", "title": "" }, { "docid": "19aeb143004f385620d1476bbcde0367", "score": "0.6126602", "text": "function my_class_loader ($class) {\n include 'classes' . DIRECTORY_SEPARATOR . $class . '.class.php';\n}", "title": "" }, { "docid": "729dc632b862c8b46fa8aa9c11624345", "score": "0.61250335", "text": "function xklid101WprecordsLoader() {\n static $plugin;\n\n if (is_null($plugin) ) {\n $plugin = new Loader(\n new Container([\n 'baseSrcDir' => __DIR__ . '/src'\n ]),\n );\n }\n\n return $plugin;\n}", "title": "" }, { "docid": "f6bbc7b8e1d20d06da25a99903ab2839", "score": "0.6098159", "text": "static private function LoaderInit()\r\n {\r\n Yii::import('application.vendors.Zend.Loader.*');\r\n\r\n require_once 'StandardAutoloader.php';\r\n $loader = new Zend\\Loader\\StandardAutoloader(array(\r\n 'autoregister_zf' => true,\r\n 'namespaces' => array(\r\n 'Ydin' => Yii::getPathOfAlias('application.vendors.Ydin'),\r\n ),\r\n ));\r\n $loader->register();\r\n }", "title": "" }, { "docid": "9c9e0dde4761e76c680773dfb95078d0", "score": "0.609025", "text": "public static function module_loader( $class_name ) {\n\t\t$module_name = str_replace( '_', '-', strtolower( str_replace( '_OBFX_Module', '', $class_name ) ) );\n\t\tif ( static::$plugins_path !== '' ) {\n\t\t\t$directories = glob( static::$plugins_path . '*' . DIRECTORY_SEPARATOR . 'obfx_modules' . DIRECTORY_SEPARATOR . $module_name, GLOB_ONLYDIR );\n\t\t\tforeach ( $directories as $directory ) {\n\t\t\t\t$filename = $directory . DIRECTORY_SEPARATOR . 'init.php';\n\t\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\t\trequire( $filename );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0d1e4b4e683667652594fa27229378a8", "score": "0.60855633", "text": "function class_loader($class) {\n require($_SERVER[\"DOCUMENT_ROOT\"] . '/classes/' . $class . '.php');\n}", "title": "" }, { "docid": "588faa4c526e6baa7aceb7e1523751a1", "score": "0.6069699", "text": "static public function run()\n\t{\n\t\tself::$path = $path = root_path('modules').'/';\n\n\t\tspl_autoload_register(array(\n\t\t\t__CLASS__,\n\t\t\t'autoload',\n\t\t));\n\n\t\tforeach(glob($path.'*') as $module) {\n\t\t\t$file = $module.'/Module.php';\n\t\t\tif(file_exists($file)) {\n\t\t\t\trequire $file;\n\t\t\t\t$class = ucfirst(str_ireplace($path, '', $module)).'\\Module';\n\t\t\t\tif(class_exists($class)) {\n\t\t\t\t\t(new $class())->init();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "226001cdb14331c50e0654804f2be945", "score": "0.60319024", "text": "protected function _initDefaultModuleAutoloader()\n {\n $this->_resourceLoader = new Zend_Application_Module_Autoloader(array(\n 'namespace' => 'Power',\n 'basePath' => APPLICATION_PATH . '/modules/power',\n ));\n }", "title": "" }, { "docid": "da838d0360c35f5e25b0e2e9e8e8a14d", "score": "0.60099727", "text": "public static function getLoader()\n {\n if (null !== self::$loader) {\n return self::$loader;\n }\n\n spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);\n self::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();\n spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader'));\n\n /*\n\t\t$includePaths = require __DIR__ . '/include_paths.php';\n array_push($includePaths, get_include_path());\n set_include_path(join(PATH_SEPARATOR, $includePaths));\n\t\t*/\n\n $map = require __DIR__ . '/autoload_namespaces.php';\n foreach ($map as $namespace => $path) {\n $loader->set($namespace, $path);\n }\n\n /**\n\t\t$map = require __DIR__ . '/autoload_psr4.php';\n foreach ($map as $namespace => $path) {\n $loader->setPsr4($namespace, $path);\n }\n\t\t*/\n\n $classMap = require __DIR__ . '/autoload_classmap.php';\n if ($classMap) {\n $loader->addClassMap($classMap);\n }\n\n $loader->register(true);\n\n return $loader;\n }", "title": "" }, { "docid": "23a704235279bd3b430d8b31124e38a2", "score": "0.6005351", "text": "protected function _initAutoload()\n {\n $moduleLoader = new Zend_Application_Module_Autoloader(array(\n 'namespace' => 'Default_',\n 'basePath' => APPLICATION_PATH . '/modules/default'));\n return $moduleLoader;\n }", "title": "" }, { "docid": "efbdf800ec57e5951e23d482b3f8f01a", "score": "0.6005258", "text": "function loader($className) {\n require $className.'/'.$className.'.php';\n}", "title": "" }, { "docid": "7200cf7cbbc58f7bf4a536bf01f1b488", "score": "0.5999091", "text": "function __construct()\n\t{\n\t\t/**\n\t\t* Registering the method for autoload process\n\t\t*/\n\t\tspl_autoload_register( array( '\\Tipui\\Builtin\\Autoloader', 'Init' ) );\n\t}", "title": "" }, { "docid": "6f61f3bca63574af9710f3b7e4b2ca8a", "score": "0.59877855", "text": "function classLoader($className) {\n\t\trequire_once dirname(__FILE__) .\"/Classes/\". $className . '.php';\n\t}", "title": "" }, { "docid": "6f61f3bca63574af9710f3b7e4b2ca8a", "score": "0.59877855", "text": "function classLoader($className) {\n\t\trequire_once dirname(__FILE__) .\"/Classes/\". $className . '.php';\n\t}", "title": "" }, { "docid": "c3345c9f981fadcdf2704bef0c5af2fe", "score": "0.5981125", "text": "private function __loadmodule($location) {\n\t\t\treturn new $this->class($location, $this);\n\t\t}", "title": "" }, { "docid": "e7361aab91c788192ebc828a40f6919e", "score": "0.5978834", "text": "public function initModules()\n {\n $moduleInstances = $this->moduleInstances;\n $app = $this->app;\n $container = $app->getContainer();\n\n // $this->initClassLoader($classLoader);\n $this->initModuleConfig();\n $this->initDependencies($container);\n $this->initMiddleware($app);\n $this->initRoutes($app);\n\n }", "title": "" }, { "docid": "d3f42bb79c4646d63053ba4ac4baf2b0", "score": "0.5974482", "text": "private function __construct()\n {\n $libDirectory = dirname(__FILE__);\n \n $this->classDirectories = array(\n realpath(dirname(__FILE__) . '/../engines')\n );\n \n // add all sub-directories of the current directory to the auto-load array\n foreach (scandir(dirname(__FILE__)) as $file)\n {\n if ($file == '..')\n {\n continue;\n }\n \n $dir = realpath($libDirectory . DIRECTORY_SEPARATOR . $file);\n \n if (is_dir($dir))\n {\n $this->classDirectories[] = $dir;\n }\n }\n \n }", "title": "" }, { "docid": "3033c4eb9d8e5c198350b42252a06166", "score": "0.5971495", "text": "public function __construct()\n {\n // Get all models across all modules\n $front = Zend_Controller_Front::getInstance();\n $curModule = $front->getRequest()->getModuleName();\n\n // Get all module names, move default and current module to\n // back of the list so their models get precedence\n $modules = array_diff(\n array_keys($front->getDispatcher()->getControllerDirectory()),\n array('default', $curModule)\n );\n $modules[] = 'default';\n if ($curModule != 'default') {\n $modules[] = $curModule;\n }\n\n // Generate namespaces and paths for plugin loader\n $pluginPaths = array();\n foreach($modules as $module) {\n $pluginPaths[ucwords($module)] = $front->getModuleDirectory($module) . '/models';\n }\n\n // Load paths\n $this->_loader = new Zend_Loader_PluginLoader($pluginPaths);\n }", "title": "" }, { "docid": "39f12c2c4308775289f9828864cfbbb9", "score": "0.5970453", "text": "public function getLoader() {\n\t\tif ($this->loader === null) {\n\t\t\t$this->loader = new Loader($this->getCompileDir());\n\t\t}\n\n\t\treturn $this->loader;\n\t}", "title": "" }, { "docid": "422bf3ff0d950f414bc313737d7de7ac", "score": "0.59616244", "text": "protected function _initModuleAutoload()\n {\n $autoloader = new Zend_Application_Module_Autoloader(array(\n 'namespace' => 'Default',\n 'basePath' => APPLICATION_PATH . '/modules/default',\n ));\n\n $this->getContainer()->{'defaultAutoloader'} = $autoloader;\n }", "title": "" }, { "docid": "5959198e9239bf82e5dadd36e5cd2805", "score": "0.59470785", "text": "protected function _createPluginLoader()\n {\n /**\n * @see Zend_Loader_PluginLoader\n */\n require_once 'Zend/Loader/PluginLoader.php';\n return new Zend_Loader_PluginLoader(\n array(\n 'Zend_Validate' => ZEND_PATH . '/Validate',\n 'FaZend_Validate' => FAZEND_PATH . '/Validate',\n 'Validator' => APPLICATION_PATH . '/validators',\n )\n );\n }", "title": "" }, { "docid": "90f989c7db8ec7cf6e158c9d2e9612f8", "score": "0.59467715", "text": "public function module() {\n\t\t$cls = $this->getModuleClass();\n\t\t\n\t\treturn new $cls;\n\t}", "title": "" }, { "docid": "40ad683ab5a240bbf87dfd92260f7604", "score": "0.5942586", "text": "public function registerAutoloader(){\n\t\tspl_autoload_register(array($this, 'loader'));\n\t}", "title": "" }, { "docid": "e153360afc0541cc7f04cd069297b82e", "score": "0.5940651", "text": "protected function _initModules(){\n\t\t$this->bootstrap('autoloader');\n\t\t$modules = (array)$this->getResource('modules');\n\t\tarray_map(\n\t\t\tarray(\n\t\t\t\t$this->getApplication()->getAutoLoader(),\n\t\t\t\t'registerNamespace'\n\t\t\t),\n\t\t\t$modules\n\t\t);\n\t}", "title": "" }, { "docid": "9e7420983e03d86e8817ac0ea0aed70d", "score": "0.5932061", "text": "protected function init(): void\n {\n // Default modules\n $this->modules_to_load = [\n 'Arrays',\n 'AppStorage',\n 'Storage' => '\\\\Charm\\\\Storage\\\\Storage',\n 'Server',\n 'Event' => '\\\\Charm\\\\Events\\\\EventProvider',\n 'App' => '\\\\App\\\\Engine',\n 'Config',\n 'Logging',\n 'Debug',\n 'DebugBar' => '\\\\Charm\\\\DebugBar\\\\DebugBar',\n 'Session',\n 'Redis',\n 'Database' => '\\\\Charm\\\\Database\\\\Database',\n 'Request',\n 'Formatter',\n 'Cache' => '\\\\Charm\\\\Cache\\\\Cache',\n 'Router' => '\\\\Charm\\\\Vivid\\\\Router\\\\Router',\n 'Token' => '\\\\Charm\\\\Guard\\\\Token',\n 'Guard' => '\\\\Charm\\\\Guard\\\\Guard',\n 'Bob' => '\\\\Charm\\\\Bob\\\\Bob',\n 'CharmCreator' => '\\\\Charm\\\\CharmCreator\\\\CharmCreator',\n 'Mailman' => '\\\\Charm\\\\Mailman\\\\Mailman',\n ];\n\n $this->modules_blacklist = [];\n }", "title": "" }, { "docid": "5b450d6f810559005fb23fa0177cabbe", "score": "0.59246475", "text": "public function loadModGenerator()\n {\n $generatorName = $this->config->getCodeGeneratorName(); \n $classSufix = GenitHelper::generatorNameToClassSufix($generatorName); \n $modGeneratorClassName = Genit::getModGeneratorClass($classSufix);\n $modGeneratorFIle = $this->getGeneratorPath()\n . DIRECTORY_SEPARATOR . $modGeneratorClassName . '.php';\n include_once $modGeneratorFIle;\n $this->modGen = new $modGeneratorClassName($this);\n }", "title": "" }, { "docid": "921f2c42c787f3ce0a70cace78ede191", "score": "0.59186757", "text": "public function makeAutoloader()\n {\n if (!$this->autoloader) {\n \n spl_autoload_register(array($this, 'create'), true, true);\n $this->autoloader = true;\n\n }\n\n return $this;\n }", "title": "" }, { "docid": "62f021fac699a7bcdbad588fb8a91955", "score": "0.590699", "text": "function __autoload( $class ) { Loader::__autoload($class); }", "title": "" }, { "docid": "401cfdb45b07e26e7028571c6a41fe37", "score": "0.5900442", "text": "protected function __construct()\n {\n static::$perfectLoaders = array($this);\n\n if (false === static::seen('__include_path')) {\n\n $paths = explode(PATH_SEPARATOR, get_include_path());\n $slash = DIRECTORY_SEPARATOR;\n $dir = dirname(__DIR__);\n $source_dir = dirname($dir);\n $dir = dirname($source_dir);\n\n foreach (\n array(\n array($source_dir),\n array($dir, '..', '..', 'composer'),\n array($dir, 'vendor', 'composer'),\n array($dir, '..', '..', '..', 'php'),\n array($dir, 'vendor', 'php'))\n as $includePath)\n if (false !== $path = stream_resolve_include_path(\n implode($slash, $includePath)\n ))\n if ('composer' == end($includePath)) {\n static::seen(static::loadFile(\n \"$path{$slash}autoload_classmap.php\"\n ));\n $paths = array_merge(\n $paths,\n array_values(static::loadFile(\n \"$path{$slash}autoload_namespaces.php\"\n ))\n );\n } else\n $paths[] = $path;\n\n $paths = array_filter(array_map(\n function ($path) {\n if (false == $realPath = @realpath($path))\n return null;\n return $realPath . DIRECTORY_SEPARATOR;\n },\n $paths\n ));\n natsort($paths);\n static::seen(\n '__include_path',\n implode(PATH_SEPARATOR, array_unique($paths))\n );\n }\n\n set_include_path(static::seen('__include_path'));\n }", "title": "" }, { "docid": "04f8a5591d98332ca84ddb277aa258c8", "score": "0.58886045", "text": "public static function run(){\n\t spl_autoload_register( array( new self, 'load_class' ) );\n\t}", "title": "" }, { "docid": "efb45568a6a55da44497ed25025e040d", "score": "0.5888152", "text": "function MicroBuilder_Module_Factory () {}", "title": "" }, { "docid": "51c2228df85b838965a40102de73f5dd", "score": "0.587951", "text": "function __autoload($class_name) {\r\n include '../modules/module_' . $class_name . '.php';\r\n}", "title": "" }, { "docid": "0a00c0a130c221524349ae766c2fb36a", "score": "0.58742756", "text": "public function __construct()\r\n {\r\n $this->pluginLoader = new Zend_Loader_PluginLoader();\r\n }", "title": "" }, { "docid": "df2b15279638aa9c6e1a2edaf0ab8a4f", "score": "0.5864778", "text": "public function get_loader() {\n return $this->loader;\n }", "title": "" }, { "docid": "62cc82e54534887ac826b2d98d504cf3", "score": "0.58582616", "text": "function __construct()\n\t{\n\t\tCmsProfiler::get_instance()->mark('loading: ' . get_class($this) . \" module\");\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "c7a63f4af3a39a69dd14655420f0f626", "score": "0.5856931", "text": "public function getLoader()\n {\n if($this->loader === NULL) {\n $this->loader = new Loader($this->io,$this->oAutoloader);\n \n }\n\n return $this->loader;\n }", "title": "" }, { "docid": "cd360299a984a0ad7c70e2c0614f3cae", "score": "0.58259165", "text": "protected function _initAutoload()\r\n {\r\n $moduleLoader = new Zend_Application_Module_Autoloader(array(\r\n 'namespace' => '', \r\n 'basePath' => APPLICATION_PATH));\r\n\t\t\t\r\n\t\t\t$fc = Zend_Controller_Front::getInstance();\r\n\t\t\t$fc->registerPlugin(new Plugin_AccessCheck);\r\n\t\t\t\r\n return $moduleLoader;\r\n }", "title": "" }, { "docid": "3efc7d8324733c6236c1ebf21f35c0e7", "score": "0.58248997", "text": "private function getLoader(): LoaderInterface\n {\n if (null !== $this->loader) {\n return $this->loader;\n }\n\n if (null !== $this->localFile) {\n $this->loader = new Local($this->localFile);\n\n return $this->loader;\n }\n\n if (extension_loaded('curl')) {\n $this->loader = new Curl($this);\n\n return $this->loader;\n }\n\n $streamHelper = new StreamCreator($this);\n\n if (ini_get('allow_url_fopen')) {\n $this->loader = new FopenLoader($this, $streamHelper);\n\n return $this->loader;\n }\n\n $this->loader = new SocketLoader($this, $streamHelper);\n\n return $this->loader;\n }", "title": "" }, { "docid": "e51c14ca259724bba39f843deba609a6", "score": "0.5824631", "text": "public function __construct()\n {\n $this->pluginLoader = new Zend_Loader_PluginLoader();\n }", "title": "" }, { "docid": "ded046de5d9df733ae000d108330d349", "score": "0.58104354", "text": "protected function _initAutoload ()\r\n {\r\n $autoLoader = Zend_Loader_Autoloader::getInstance();\r\n $resourceLoader = new Zend_Loader_Autoloader_Resource(\r\n array('basePath' => APPLICATION_PATH, 'namespace' => '', \r\n 'resourceTypes' => array(\r\n 'form' => array('path' => 'forms/', \r\n 'namespace' => 'Form_'), \r\n 'page' => array(\r\n 'path' => '../library/CMS/Content/Item/', \r\n 'namespace' => 'CMS_Content_Item_'), \r\n 'acl' => array(\r\n 'path' => '../library/CMS/Controller/Plugin/', \r\n 'namespace' => 'CMS_Controller_Plugin_'), \r\n 'Model_nested' => array(\r\n 'path' => '../library/VNN/Model/', \r\n 'namespace' => 'VNN_Model_'), \r\n \r\n 'nested' => array('path' => '../library/VNN/', \r\n 'namespace' => 'VNN_'), \r\n \r\n 'cp_block' => array('path' => 'modules/cp/blocks/', \r\n 'namespace' => 'Cp_Block_'), \r\n \r\n 'cp_model' => array(\r\n 'path' => 'modules/cp/models/', \r\n 'namespace' => 'Cp_Model_'))));\r\n \r\n return $autoLoader;\r\n }", "title": "" }, { "docid": "22504bf30d676b4e6cadb3b15691de63", "score": "0.5810133", "text": "public function __construct()\n {\n if (config('app')['use_vendors'])\n require app_path('vendor', 'autoload.php');\n\n spl_autoload_register([$this, 'loader']);\n }", "title": "" }, { "docid": "22d5144f10efb8b1cff8f4ac599465a7", "score": "0.5808086", "text": "private function __buildLoader(): AnnotationDirectoryLoader\n {\n $locator = new FileLocator(SRC . 'Controller');\n $annotationReader = new AnnotationReader();\n $classLoader = new AnnotatedRouteControllerLoader($annotationReader);\n return new AnnotationDirectoryLoader($locator, $classLoader);\n }", "title": "" }, { "docid": "d7f169fe0b8cc943e63cc3f949077fba", "score": "0.5806984", "text": "public function __construct()\n\t{\n\t\t// Loader config\n\t require_once PATH_SYSTEM . '/core/loader/Config_Loader.php';\n\t $this->config = new Config_Loader();\n\t $this->config->load('config');\n\n\t // Loader Library\n\t require_once PATH_SYSTEM . '/core/loader/Library_Loader.php';\n\t $this->library = new Library_Loader();\n\n\t // Load Helper\n\t require_once PATH_SYSTEM . '/core/loader/Helper_Loader.php';\n\t $this->helper = new Helper_Loader();\n\n\t // Load View\n\t\trequire_once PATH_SYSTEM . '/core/loader/View_Loader.php';\n\t\t$this->view = new View_Loader();\n\t}", "title": "" }, { "docid": "34716a1c698d6b3a5e0ca611187bf081", "score": "0.5801432", "text": "public static function initializeModule()\n\t{\n\t}", "title": "" }, { "docid": "7020d631479623c3024364771c4bf54d", "score": "0.5797754", "text": "public function __construct($classLoader)\n {\n $this->checkEnvironmentOrDie();\n $this->defineLegacyConstants();\n $this->bootstrap = Bootstrap::getInstance()\n ->initializeClassLoader($classLoader)\n ->setRequestType(TYPO3_REQUESTTYPE_CLI)\n ->baseSetup($this->entryPointLevel);\n\n foreach ($this->availableRequestHandlers as $requestHandler) {\n $this->bootstrap->registerRequestHandlerImplementation($requestHandler);\n }\n\n $this->bootstrap->configure();\n }", "title": "" }, { "docid": "36ffdcfa1d3044c9e88cd59fd6b86746", "score": "0.5793576", "text": "protected function _initAutoloader()\n {\n \t$loader = function($className) {\n \t\t$className = str_replace('\\\\', '_', $className);\n \t\tZend_Loader_Autoloader::autoload($className);\n \t};\n \n \t$autoloader = Zend_Loader_Autoloader::getInstance();\n \t$autoloader->pushAutoloader($loader, 'Application\\\\');\n }", "title": "" }, { "docid": "537c0ba08c0c952d605ecc164266bc0c", "score": "0.5792497", "text": "public static function initialise() {\n spl_autoload_register(array('\\Core\\AutoLoader', 'autoload'));\n }", "title": "" }, { "docid": "32ee3808202d5f408849364cfce1de49", "score": "0.5788075", "text": "public static function _init()\n\t{\n\t\t\\Module::load('admin');\n\t\t\\Module::load('documentation');\n\t\t\\Module::load('users');\n\t}", "title": "" }, { "docid": "46b7d0a6d129c13250322f3346e7b1d7", "score": "0.5785559", "text": "private function load_dependencies()\n {\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-cpi-page-module-loader.php';\t\t \n \n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-cpi-page-module-admin.php';\t\t\n\n\t\t$this->loader = new CPI_Page_Module_Loader();\n }", "title": "" }, { "docid": "d2d987c156138895cf8b3ab8a8dd4a7d", "score": "0.5773278", "text": "public function start() {\n \n if(is_null($this->root)) raise('Please specify a root directory for the autoloader');\n if(is_null($this->namespace)) raise('Please specify a namespace for the autoloader');\n if(!is_array($this->aliases)) raise('Aliases for the autloader must be defined as associative array');\n\n $autoloader = $this;\n\n spl_autoload_register(function($class) use ($autoloader) {\n\n // check for existing aliases\n if(array_key_exists(strtolower($class), $autoloader->aliases)) {\n // create an alias for that class \n class_alias($autoloader->aliases[strtolower($class)], $class);\n $class = $autoloader->aliases[strtolower($class)];\n \n // check if the class has already been loaded\n if(class_exists($class)) return true;\n\n } \n\n // prepare the path to the class file\n $replace = array($autoloader->namespace . '\\\\', '\\\\');\n $with = array('', DS);\n\n // create the path to the class file. \n $path = strtolower(str_replace($replace, $with, $class));\n \n foreach((array)$autoloader->root as $root) {\n $file = ($autoloader->classfolder) ? $root . DS . $path . DS . basename($path) . '.php' : $root . DS . $path . '.php';\n \n if(file_exists($file)) {\n require_once($file);\n break;\n }\n }\n\n });\n\n }", "title": "" }, { "docid": "98d2dbcb2a7ff76b3d91c58933eafa02", "score": "0.57716304", "text": "static public function classLoader($className) {\n\t\t$path = self::buildPath($className);\n\t\t\n\t\tif (file_exists($path) && is_readable($path)) {\n\t\t\tinclude $path;\n\t\t} else {\n\t\t\t//trigger_error('Cannot location class name \"'.$className.'\" at location \"'.$path.'\"');\n\t\t}\n\t}", "title": "" }, { "docid": "8f7557f0a32c6619f930f34976e8d938", "score": "0.5758976", "text": "private function load_modules() {\n\t\t$factory = new Factory( $this->customizer_modules );\n\t\t$factory->load_modules();\n\t}", "title": "" }, { "docid": "de5dddb54405232954adcf1f6e63bf7c", "score": "0.57571805", "text": "public function get_loader()\n {\n return $this->loader;\n }", "title": "" }, { "docid": "c7c267d95c771aecd6ded5c97be4d8cc", "score": "0.5751454", "text": "public function createPhpFileLoader(): PhpFileLoader\n {\n return new PhpFileLoader($this->container, $this->locator);\n }", "title": "" }, { "docid": "21f0a27f271dd0170de38b49270a13e4", "score": "0.5749728", "text": "private function loader($className)\n {\n $file = PATH_ROOT . Core::classRoute($className) . '.php';\n\n if (is_file($file))\n require_once($file);\n }", "title": "" }, { "docid": "b2b842fe6c8ff727198382492e361daf", "score": "0.5747903", "text": "public function loadmodule() {\n\t\t\t// initialize\n\t\t\t$result = false;\n\t\t\t// create filename\n\t\t\t$fn = sprintf(\"%s/%s\", dirname($this->location), MANAGER_BACKSCRIPT);\n\t\t\t// validate filename\n\t\t\tif(file_exists($fn)) {\n\t\t\t\ttry {\n\t\t\t\t\t// load library\n\t\t\t\t\trequire_once($fn);\n\t\t\t\t\t// create module name\n\t\t\t\t\t$name = sprintf(\"%s%s\", MANAGER_CLASS, ucfirst($this->name));\n\t\t\t\t\t// try to create module\n\t\t\t\t\t$this->script = new $name($this);\n\t\t\t\t\t// set result\n\t\t\t\t\t$result = true;\n\n\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\t$this->script = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// return\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "e791efe7e96afbbf7296321b29582d88", "score": "0.5747353", "text": "public static function loadModuleClass(string $name) : \\App\\Classes\\DModule\\DModule\n {\n try {\n $module_namespace = '\\\\Modules\\\\' . $name;\n $Module = new $module_namespace();\n return $Module;\n }catch(\\Error $err){\n throw new \\App\\Classes\\System\\SystemError('Could not load class');\n }catch(\\Exception $err){\n throw new \\App\\Classes\\System\\SystemException('Could not load class');\n }\n }", "title": "" }, { "docid": "32f7bac275b82e3440bcdd4cf67ff712", "score": "0.5743371", "text": "private function __construct()\r\n {\r\n //override protection\r\n spl_autoload_register(array(__CLASS__, 'LoadFile'));\r\n }", "title": "" }, { "docid": "b8b32deff7b8cfcda0d07202f3129301", "score": "0.57432675", "text": "function classLoader($class)\n{\n $path = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n $file = __DIR__ . '/' . $path . '.php';\n\n if (file_exists($file)) {\n require_once $file;\n }\n}", "title": "" }, { "docid": "83688669fa3b717bcc85ce83fc4d56d6", "score": "0.57341135", "text": "function class_autoloader($class) {\r\n require make_url(\"class/$class.php\");\r\n}", "title": "" }, { "docid": "7346c964e7d804cb2d366a8adc00d964", "score": "0.572382", "text": "private static function GetLoader() {\n if (self::$autoLoaderObject !== null) {\n return self::$autoLoaderObject;\n }\n\n self::$autoLoaderObject = new self();\n return self::$autoLoaderObject;\n }", "title": "" }, { "docid": "ce50752b0419051e5ae59062875556cb", "score": "0.57221633", "text": "protected function _initAutoload() {\n $moduleLoader = new Zend_Application_Module_Autoloader(array(\n 'namespace' => 'Xls_',\n 'basePath' => APPLICATION_PATH . '/modules/xls'));\n\n $moduleLoader->addResourceType('controllerhelper',\n 'controllers/helpers', 'Controller_Helper');\n\n return $moduleLoader;\n }", "title": "" }, { "docid": "6adba1d49dd9ba905f89f687c77541bb", "score": "0.57060206", "text": "private function makeLoader(): \\Twig_LoaderInterface\n {\n $modifiers = [];\n foreach ($this->modifiers as $modifier) {\n if (!is_object($modifier) || $modifier instanceof Autowire) {\n $modifiers[] = $this->container->get($modifier);\n } else {\n $modifiers[] = $modifier;\n }\n }\n\n return new LoaderBridge($this->environment, $this->loader, $modifiers);\n }", "title": "" }, { "docid": "a9154373dbc86d80ed8d3bbc286365ee", "score": "0.57039374", "text": "public function testConstructorAccessors() {\n\n\t\t$classLoader = new IncludePathClassLoader();\n\t\t$autoLoader = new ClassAutoloader($classLoader);\n\n\t\t$this->assertSame($classLoader, $autoLoader->getClassLoader());\n\t}", "title": "" }, { "docid": "30e59aa93df57c87c1a3fc5ad8b00a90", "score": "0.57012457", "text": "protected function _initAutoload(){\n\t $loader = new Zend_Application_Module_Autoloader(array(\n\t 'namespace' => '',\n\t 'basePath' => APPLICATION_PATH));\n\t\n\t return $loader;\n\t }", "title": "" }, { "docid": "f15324a376f4930be9f1904b33aac4a9", "score": "0.5698233", "text": "public function __construct() {\n spl_autoload_register(array($this, 'loadWigwamClass'));\n }", "title": "" }, { "docid": "1285eb69af03c7f4605e7a57d324490c", "score": "0.56977063", "text": "public static function load()\n {\n require ROOT . '/app/Autoloader.php';\n App\\Autoloader::register();\n require ROOT . '/core/Autoloader.php';\n Core\\Autoloader::register();\n }", "title": "" }, { "docid": "cf742b9f6cc378603118e80644d16460", "score": "0.569615", "text": "public function getClassLoader()\n {\n return $this->classLoader;\n }", "title": "" }, { "docid": "0ea76addc1a37738011b9e7a15982ce7", "score": "0.569089", "text": "public static function create() {\n self::$checkMethodLoader = new CheckMethodLoader(self::DEFAULT_FOLDER);\n self::$checkMethodLoader->loadCheckMethods();\n }", "title": "" }, { "docid": "c98c18300e28ae7959019a41ee4986d6", "score": "0.5688296", "text": "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n }", "title": "" }, { "docid": "ef61c7fd8f770f7cb3db68cc8ee7608a", "score": "0.56852823", "text": "public function initModuleConfiguration()\n {\n $finder = new Finder();\n\n $finder\n ->files()\n ->ignoreUnreadableDirs()\n ->followLinks()\n ->name('module.yaml')\n ->depth('> 2')\n ->in(BP);\n\n if ($this->isCacheEnabled() && $this->getCacheInstance()->exists('module_collection')) {\n Application::register('module_collection', unserialize($this->getCacheInstance()->get('module_collection')));\n Application::register('frontnames', unserialize($this->getCacheInstance()->get('frontnames')));\n } else {\n $moduleCollection = Application::getClass('\\Jcode\\DataObject\\Collection');\n $frontnames = Application::getClass('\\Jcode\\DataObject');\n\n foreach ($finder as $moduleFile) {\n $cacheKey = 'moduleConfig:' . md5($moduleFile->getPathname());\n\n $module = null;\n\n if ($this->isCacheEnabled()) {\n if ($this->getCacheInstance()->exists($cacheKey)) {\n $module = unserialize($this->getCacheInstance()->get($cacheKey));\n } else {\n $module = $this->loadModuleConfiguration($moduleFile->getPathname());\n\n $this->getCacheInstance()->set($cacheKey, serialize($module));\n }\n } else {\n $module = $this->loadModuleConfiguration($moduleFile->getPathname());\n }\n\n if ($module instanceof Module) {\n $moduleCollection->addItem($module, $module->getName());\n\n if ($module->getRouter() && $module->getRouter()->getFrontname()) {\n $key = self::convertStringToMethod($module->getRouter()->getFrontname());\n\n $frontnames->$key($module->getName());\n }\n\n $this->initUrlRewrites($module);\n }\n }\n\n Application::register('module_collection', $moduleCollection);\n Application::register('frontnames', $frontnames);\n\n if ($this->isCacheEnabled() && !$this->getCacheInstance()->exists('module_collection')) {\n $this->getCacheInstance()->set('module_collection', serialize($moduleCollection));\n $this->getCacheInstance()->set('frontnames', serialize($frontnames));\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "b987174c410a57f2572c1e17778c78fa", "score": "0.5678828", "text": "function my_autoloader($class_name) \n {\n include 'classes/' . $class_name . '.class.php';\n }", "title": "" }, { "docid": "577a62b85c81aab4e70bf0427ebb6957", "score": "0.56730336", "text": "public static function init() {\n // Load the user-defined test configuration file, if it exists; otherwise, load.\n if (is_readable(__DIR__ . '/TestConfig.php')) {\n $testConfig = include __DIR__ . '/TestConfig.php';\n } else {\n $testConfig = include __DIR__ . '/TestConfig.php.dist';\n }\n\n $zfModulePaths = array();\n\n if (isset($testConfig['module_listener_options']['module_paths'])) {\n $modulePaths = $testConfig['module_listener_options']['module_paths'];\n foreach ($modulePaths as $modulePath) {\n if (($path = static::findParentPath($modulePath))) {\n $zfModulePaths[] = $path;\n }\n }\n }\n\n $zfModulePaths = implode(PATH_SEPARATOR, $zfModulePaths) . PATH_SEPARATOR;\n if (getenv('ZF2_MODULES_TEST_PATHS')) {\n $zfModulePaths .= getenv('ZF2_MODULES_TEST_PATHS');\n } else if (defined('ZF2_MODULES_TEST_PATHS')) {\n $zfModulePaths .= ZF2_MODULES_TEST_PATHS;\n }\n \n static::initAutoloader();\n\n // Use ModuleManager to load this module and it's dependencies.\n $baseConfig = array(\n 'module_listener_options' => array(\n 'module_paths' => explode(PATH_SEPARATOR, $zfModulePaths),\n ),\n );\n\n $config = ArrayUtils::merge($baseConfig, $testConfig);\n\n $serviceManager = new ServiceManager(new ServiceManagerConfig());\n $serviceManager->setService('ApplicationConfig', $config);\n $serviceManager->get('ModuleManager')->loadModules();\n\n static::$_serviceManager = $serviceManager;\n static::$_config = $config;\n }", "title": "" }, { "docid": "ff599d16385e915da5f5c8ef57fb86d8", "score": "0.567197", "text": "public function loader();", "title": "" }, { "docid": "dae7297698ae6fa3ba0e67b982b9b7ca", "score": "0.56686985", "text": "public function __construct(string $base_dir = null)\n {\n $this->base_dir = ($base_dir ? $base_dir : get_include_path());\n spl_autoload_register(array($this, 'load'));\n }", "title": "" }, { "docid": "40f67050c0e37cb611fc2337e86d1048", "score": "0.5656708", "text": "protected function _load_base()\n\t{\n\t\t// Load Benchmark and start timer\n\t\t$this->load_core_class('Benchmark');\n\t\t$this->benchmark->mark('total_execution_time_start');\n\t\t$this->benchmark->mark('loading_time:_base_classes_start');\n\n\t\t// Get Config\n\t\t$this->load_core_class('Config');\n\n\t\t// Load the hooks class and call pre_system (depends on Config)\n\t\t$this->load_core_class('Hooks');\n\t\t$this->hooks->call_hook('pre_system');\n\n\t\t// Load Loader as 'load' (depends on Config)\n\t\t$this->load_core_class('Loader', 'load');\n\t}", "title": "" }, { "docid": "a565fe17b4c0f9679ebbca65d28e0a65", "score": "0.56494385", "text": "public function __construct($module_name) { \n $framework = Framework::getInstance();\n \n $this->directory_path = $framework->getInstallationPath();\n \n if($module_name != 'framework') {\n $this->directory_path .= \"/modules/{$module_name}\";\n }\n \n $this->directory_path .= '/cache';\n \n $this->framework_version = $framework->getConfiguration()->version;\n }", "title": "" }, { "docid": "fa8e2fe5926265d244113fca0c74532a", "score": "0.5645606", "text": "public function createLoader($baseDir='')\n\t{\n\t\treturn new ClassMapLoader($this->map->getArrayCopy());\n\t}", "title": "" }, { "docid": "d950a6dfcbd13638f3214e3876c3b056", "score": "0.5642477", "text": "public function getClassLoader() {\n\n\t\treturn $this->classLoader;\n\t}", "title": "" }, { "docid": "97a6ffa976cdf59585e9f16679fdf40c", "score": "0.56406695", "text": "private function initAdmingeneratorClassLoader($cacheDir)\n {\n if ($this->classLoaderInitialized) {\n return;\n }\n\n $this->classLoaderInitialized = true;\n\n $admingeneratedClassLoader = new AdmingeneratedClassLoader();\n $admingeneratedClassLoader->setBasePath($cacheDir);\n $admingeneratedClassLoader->register();\n }", "title": "" }, { "docid": "8b72e9922896aa31173ee1caf8cf9a50", "score": "0.5638039", "text": "function classLoader($class)\n{\n $path = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n $file = __DIR__ . '/src/' . $path . '.php';\n\n if (file_exists($file)) {\n require_once $file;\n\n }\n}", "title": "" }, { "docid": "edf8276e76a73dc10015725edcf4a6f3", "score": "0.56378764", "text": "public function register_modules() {\n\n\t\tif( !class_exists( 'FLBuilder' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$modules = glob( $this->path( 'flbuilder/*' ), GLOB_ONLYDIR );\n\n\t\tforeach( $modules as $module ) {\n\n\t\t\t$module = basename( $module );\n\n\t\t\t// include $this->path( 'flbuilder/' . $module . '/' . $module . '.php' );\n\n\t\t\t$module = __NAMESPACE__ . '\\\\flbuilder\\\\' . $module . '\\\\' . $module;\n\n\t\t\t$instance = new $module();\n\n\t\t\t$instance->register();\n\t\t}\n\t}", "title": "" }, { "docid": "f59ad5a7b1e0a170f73ecfb2dc8232a0", "score": "0.563375", "text": "function loader($class)\n{\n $class = explode('\\\\', $class);\n $class = array_pop($class);\n\n $file = sprintf(\n '%s%s..%s%s.php',\n __DIR__,\n DIRECTORY_SEPARATOR,\n DIRECTORY_SEPARATOR,\n $class\n );\n if (file_exists($file)) {\n include $file;\n }\n}", "title": "" }, { "docid": "cb4466e23ed8d3c84704675aed7bc475", "score": "0.5621844", "text": "protected function getLoaderService()\n {\n $this->services['Yoast\\\\WP\\\\Local\\\\Loader'] = $instance = new \\Yoast\\WP\\Local\\Loader($this);\n\n $instance->register_integration('Yoast\\\\WP\\\\Local\\\\Integrations\\\\Front_End_Integration');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\PostType\\\\PostType');\n $instance->register_integration('Yoast\\\\WP\\\\Local\\\\PostType\\\\PostType');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\Repositories\\\\Api_Keys_Repository');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\Repositories\\\\Locations_Repository');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\Repositories\\\\Timezone_Repository');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\Tools\\\\Export');\n $instance->register_integration('Yoast\\\\WP\\\\Local\\\\Tools\\\\Export');\n $instance->register_integration('Yoast\\\\WP\\\\Local\\\\Tools\\\\Import_Export_Admin');\n $instance->register_initializer('Yoast\\\\WP\\\\Local\\\\Tools\\\\Import');\n $instance->register_integration('Yoast\\\\WP\\\\Local\\\\Tools\\\\Import');\n\n return $instance;\n }", "title": "" }, { "docid": "3e92da26973d5cfedd1437b786c34fa5", "score": "0.56167406", "text": "public function Autoloader()\n {\n\n\t\t/**\n\t\t* Subfolder and name of Autoloader file.\n\t\t*/\n\t\t$file = self::ENV_FOLDER_BUILTIN . DIRECTORY_SEPARATOR . 'Autoloader' . TIPUI_CORE_ENV_FILE_EXTENSION;\n\n\t\t/**\n\t\t* Path of override file.\n\t\t*/\n\t\t$path = TIPUI_APP_PATH . TIPUI_FOLDER_OVERRIDE . DIRECTORY_SEPARATOR . $file;\n\n\t\t/**\n\t\t* Check if override path exists.\n\t\t*/\n\t\tif( file_exists( $path ) )\n\t\t{\n\t\t\trequire_once( $path );\n\t\t}else{\n\t\t\t/**\n\t\t\t* Use default builtin class.\n\t\t\t*/\n\t\t\trequire_once( TIPUI_PATH . $file );\n\t\t}\n\n\t\t/**\n\t\t* Instantiates Autoloader class.\n\t\t*/\n\t\t$a = new Builtin\\Autoloader();\n\n\t\t/**\n\t\t* Clear used variables.\n\t\t*/\n\t\tunset( $a, $path, $file );\n\n\t\treturn null;\n\n\t}", "title": "" }, { "docid": "676bf3a67e781a2a71ed2dae7ed66f9a", "score": "0.5616451", "text": "public function get_loader() {\n\t\t\treturn $this->loader;\n\t\t}", "title": "" } ]
6065ac53f9422e9b6c4fe9c87302c05b
Select an item via the load balancer.
[ { "docid": "6348c099cb78fe62af6e51bc4bbc7df7", "score": "0.50030905", "text": "public function select(array ...$parameters): Node\n {\n if (empty($this->nodes)) {\n throw new \\RuntimeException('Cannot select any node from load balancer.');\n }\n $key = array_rand($this->nodes);\n return $this->nodes[$key];\n }", "title": "" } ]
[ { "docid": "721cfda7d20c2acd795f982ec3225596", "score": "0.56383544", "text": "private function selectFirstItem() : void\n {\n if (null === $this->selectedItem) {\n foreach ($this->items as $key => $item) {\n if ($item->canSelect()) {\n $this->selectedItem = $key;\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "80ed091c0cd20612b439304d39a6c505", "score": "0.52872044", "text": "public function select( $name ) {\n\t\tJSpaceLog::add(\"JSpaceCacheManager::select: <$name>\", JLog::DEBUG, JSpaceLog::CAT_INIT);\n\t\tif( isset( $this->_drivers[ $name ] ) ) {\n\t\t\t$this->_selected = $name;\n\t\t}\n\t\telse {\n\t\t\t$msg = \"JSpaceCacheManager::select: Driver <$name> not found.\";\n\t\t\tJSpaceLog::add($msg, JLog::CRITICAL, JSpaceLog::CAT_INIT);\n\t\t\tthrow new Exception( $msg );\n\t\t}\n\t}", "title": "" }, { "docid": "833c411723e107f05509407bc8858242", "score": "0.5270102", "text": "public function select()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "1bcc30ea8616e6f86fc675819c161e09", "score": "0.5254982", "text": "public function load_item($item) {\n echo PHP_EOL;\n\n $this->action(\"beginning to load an item\");\n\n //if gate is not down yet, tell us that and then lower it\n if (!$this->gate_down) {\n $this->action(\"gate not down yet! Lowering\", FALSE);\n $this->lower_gate();\n }\n\n $this->action(\"loading item: $item onto truck\");\n $this->load[] = $item;\n $this->action(\"$item loaded onto truck\");\n }", "title": "" }, { "docid": "6922ba4ff43c10797de352adc33cf2f7", "score": "0.5206622", "text": "public function selected();", "title": "" }, { "docid": "bd1d4d88e7cb9f48af863de5c5beba95", "score": "0.5130682", "text": "private function select_instance()\n {\n $this->selected = 0;\n foreach ($this->instance_url as $key => $value) {\n if (!is_null($value) && strpos(APP_PATH_WEBROOT_FULL, $value) !== false) {\n\n $this->instance = $key;\n $this->display_text = ucfirst($key);\n $this->selected = 1;\n if ($key === 'other') {\n $this->display_text = $this->other_text;\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "e39eb0a6db5997648ba76d2a855ed3a3", "score": "0.50927186", "text": "public function select($selector){}", "title": "" }, { "docid": "e39eb0a6db5997648ba76d2a855ed3a3", "score": "0.50927186", "text": "public function select($selector){}", "title": "" }, { "docid": "9c1a545f6a1a176917a2790af54ed30d", "score": "0.49812153", "text": "public function select() {\n }", "title": "" }, { "docid": "02429d44437cc4afaf6e2ffaf8aaa6c6", "score": "0.49551073", "text": "public function executeSelect(sfWebRequest $request)\n {\n $item = $this->getRoute()->getObject();\n $bill = Doctrine::getTable('Bill')->findOneById($request->getParameter('bill_id'));\n $bill->addMenuItem($item);\n\n if ($request->isXmlHttpRequest())\n {\n return $this->renderPartial('bill/show', array('bill' => $bill));\n }\n $this->redirect('desk_show', $bill->getDesk());\n }", "title": "" }, { "docid": "812e31804a6b95584a69ac843ca01f35", "score": "0.49209407", "text": "public function onSelect($param)\n {\n // get the selected objects from session \n $selected_objects = TSession::getValue(__CLASS__.'_selected_objects');\n \n TTransaction::open('sicad');\n $object = new servidor_tag($param['key']); // load the object\n if (isset($selected_objects[$object->id]))\n {\n unset($selected_objects[$object->id]);\n }\n else\n {\n $selected_objects[$object->id] = $object->toArray(); // add the object inside the array\n }\n TSession::setValue(__CLASS__.'_selected_objects', $selected_objects); // put the array back to the session\n TTransaction::close();\n \n // reload datagrids\n $this->onReload( func_get_arg(0) );\n }", "title": "" }, { "docid": "dad21bbad56543b2de84ab7ed1ebc738", "score": "0.49088937", "text": "abstract protected function RetSelect();", "title": "" }, { "docid": "40e6ddf89f2aa688c2a27e893d5f7645", "score": "0.48969156", "text": "public function selectItem ($id)\n\t{\t\n\t\t$tags = \"\";\t\n\t\t$item = $this->db->query(\"select item.*, chaos.name as chaosname from item left join chaos on chaos.id=item.idchaos where item.id=\" . $id);\n\t\t$tag = $this->db->query(\"SELECT tag.id, tag.tag FROM item_tag inner join (tag) on (item_tag.idtag=tag.id) WHERE iditem=\".$id);\n\n\t\tforeach ($tag as $t) {\n\t\t\t$tags .= $t[\"tag\"].\", \";\n\t\t}\n\t\t\n\t\t$tags = rtrim($tags,\",\");\n\n\t\t$this->current = $item[0];\n\t\t$this->current[\"tags\"] = $tags;\n\t\treturn $item[0];\n\t}", "title": "" }, { "docid": "673d69693f11940313564f90f89a8951", "score": "0.48801926", "text": "public function db_selected ();", "title": "" }, { "docid": "320a12b5500391f6aa67c4992ed7ed9c", "score": "0.48254248", "text": "public function get($_itemName) {\r\n try {\r\n $this->selectItem($_itemName);\r\n return $this->getSelectedItem();\r\n } catch (Exception $exc) {\r\n throw $exc;\r\n }\r\n }", "title": "" }, { "docid": "b44253cffbfbe00b06584b73fa2e22e9", "score": "0.48088768", "text": "protected function _select()\n {\n return Mage::getResourceModel('ecomdev_urlrewrite/select', array($this->_getIndexAdapter()));\n }", "title": "" }, { "docid": "24f2db6dd23fead46cbb16cf92a55de8", "score": "0.48080924", "text": "private function getSelectedItem() {\n if($this->rubricsSeled !== null) {\n return $this->rubricsSeled;\n }\n\n $rubricSelected = null;\n\n $urlPage = \\Yii::$app->request->url;\n if(preg_match(\"~^\\/post~\", $urlPage)) {\n foreach($this->rubrics as $rubric) {\n if($rubric->url == $urlPage) {\n $rubricSelected = $rubric;\n }\n\n if(!$rubricSelected\n && ($post = Post::findByUrlPage($urlPage))\n ) {\n $rubricSelected = $post->getRubric()->one();\n }\n }\n } elseif(preg_match(\"~^\\/publish~\", $urlPage)) {\n foreach($this->rubrics as $rubric) {\n if($rubric->url == \"/publishes\") {\n $rubricSelected = $rubric;\n }\n }\n } else {\n foreach($this->rubrics as $rubric) {\n if($rubric->isActiveByUrl($urlPage)) {\n $rubricSelected = $rubric;\n }\n }\n }\n\n return $this->rubricsSeled = $rubricSelected;\n }", "title": "" }, { "docid": "b4c4c261f87c0970872b2eada58c0060", "score": "0.4807964", "text": "public function select($dbindex): void\r\n {\r\n try {\r\n $this->service->select($dbindex);\r\n } catch (Exception $e) {\r\n throw new RuntimeException(\"Error in CacheOne selecting database $dbindex, message:\" . $e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "0fea0905282c66ff4a189057f86dc8c4", "score": "0.47692275", "text": "public function select($totalProxies = 1)\n\t{ \t\t \t\n\t\t// Checkout keywords\n\t\t$this->checkOut($totalProxies);\t\n\n\t \t// Add proxies back in with new use time (score)\n\t \t$this->update($this->checkedOut);\t\t\n\n\t\t// Select the credentials for each of the proxies checked out\n\t\t$this->credentials();\n\t}", "title": "" }, { "docid": "c16213fc9cff21c348c870fb8c60e5a9", "score": "0.4760107", "text": "public function selectItem( $itemName, $select = true )\n\t{\n\t\treturn $this->setItem( $itemName, null, null, null, !!$select );\n\t}", "title": "" }, { "docid": "c820994dc715510265c6e92f66c6e196", "score": "0.4738173", "text": "public function Select($Arg)\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "8465b16d5139d35e0d7a315e5c916fbc", "score": "0.47236252", "text": "public function selection(){}", "title": "" }, { "docid": "4034779319b51ee32311e5a859791f3d", "score": "0.4682063", "text": "public static function select($id)\n {\n }", "title": "" }, { "docid": "d998c6abe727659aa63ef46b976f673e", "score": "0.46702713", "text": "private function selectStay(){\n $c = new ManagementController();\n if($this->model = $c->getStay($_GET['id'])){\n require_once 'view/stay.php';\n }\n else {\n $this->error(\"Errore\");\n }\n }", "title": "" }, { "docid": "f553c592fa35555f8532347e1d2f1350", "score": "0.4657786", "text": "public function load($item, $layer);", "title": "" }, { "docid": "633b22f2ba8026846d9f65c0cdaa8c72", "score": "0.4651335", "text": "public function select($dbIndex) {}", "title": "" }, { "docid": "3c2d512523f801e39f3f0370f697af5b", "score": "0.46297523", "text": "public function &getItem()\n\t{\n\t\tif (!isset($this->_item))\n\t\t{\n\t\t\t$cache = JFactory::getCache('com_banners', '');\n\n\t\t\t$id = $this->getState('banner.id');\n\n\t\t\t$this->_item = $cache->get($id);\n\n\t\t\tif ($this->_item === false)\n\t\t\t{\n\t\t\t\t// redirect to banner url\n\t\t\t\t$db = $this->getDbo();\n\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select(\n\t\t\t\t\t\t'a.clickurl as clickurl,' .\n\t\t\t\t\t\t\t'a.cid as cid,' .\n\t\t\t\t\t\t\t'a.track_clicks as track_clicks'\n\t\t\t\t\t)\n\t\t\t\t\t->from('#__banners as a')\n\t\t\t\t\t->where('a.id = ' . (int) $id)\n\n\t\t\t\t\t->join('LEFT', '#__banner_clients AS cl ON cl.id = a.cid')\n\t\t\t\t\t->select('cl.track_clicks as client_track_clicks');\n\n\t\t\t\t$db->setQuery($query);\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$db->execute();\n\t\t\t\t}\n\t\t\t\tcatch (RuntimeException $e)\n\t\t\t\t{\n\t\t\t\t\tJError::raiseError(500, $e->getMessage());\n\t\t\t\t}\n\n\t\t\t\t$this->_item = $db->loadObject();\n\t\t\t\t$cache->store($this->_item, $id);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_item;\n\t}", "title": "" }, { "docid": "a45ec5c8e7a73cf890675d7ee6cae439", "score": "0.459769", "text": "public static function select() {\n \t\treturn self::instance(self::TYPE_SELECT);\n \t}", "title": "" }, { "docid": "c937c09900f1c547f85b3dab18cf7e3b", "score": "0.45933574", "text": "public function selectBYID($id);", "title": "" }, { "docid": "660039dc5a72653f87a2c773e620073a", "score": "0.4581807", "text": "abstract protected function select();", "title": "" }, { "docid": "8d3f3d5228d55a40c3b0958f2b0e2dcd", "score": "0.4546187", "text": "abstract public function selectGear($gear);", "title": "" }, { "docid": "29db85b98bf864f0199b6fd9fe066fad", "score": "0.4545788", "text": "public function selectbatchwithselectedvalue($id){\n $mysql = new Mysql();\n $mysql-> execute(\"SELECT * FROM batch\");\n $this->select(\"form-control\",\"batchid\");\n $batch = new Batch();\n $batch->setid($id); $batch->execute();\n $this->options($batch->getid(),$batch->gettitle());\n while ($row = $mysql->fetch_array()){\n $this->options($row['batchid'],$row['batchtitle']);\n \n }\n $this->closeselect();\n }", "title": "" }, { "docid": "b17fad60e37f6ef2fe8088a48f97b634", "score": "0.45368308", "text": "public function setSelectedItem(FeedItem $selected)\n\t{\n\t\t$this->selectedItem = $selected;\n\t}", "title": "" }, { "docid": "11b28f274a0dc01e890b044cfeac4cd7", "score": "0.45109963", "text": "public function select($getSelItem, $getConds) {\n $this -> selItem = $getSelItem;\n $this -> condition = $getConds;\n\n try {\n $dbh = new PDO(\n 'mysql:dbname='.$this -> db.';host='.$this -> url.';port='.$this -> port,\n $this -> user,\n $this -> pwd,\n array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\'')\n ); \n\n $cmd = \"SELECT \".$this -> selItemCmds().\" FROM \".$this -> table;\n\n $bindParams = array();\n if(count(array_keys($this -> condition)) > 0) {\n $wheCmd = $this -> whereCmds();\n $cmd = $cmd.\" \".$wheCmd[\"cmd\"].\";\";\n $bindParams = $wheCmd[\"data\"];\n }\n \n $sth = $dbh -> prepare($cmd);\n\n if($sth->execute($bindParams)) {\n $this -> retStatus(\"success\", \"complete\", $sth -> fetchAll(PDO::FETCH_ASSOC));\n } else {\n $this -> retStatus(\"failure\", \"execution error\", array());\n }\n \n } catch (Exception $e) {\n $this -> retStatus(\"failure\", $e -> getMessage(), array());\n }\n\n return $this -> status;\n }", "title": "" }, { "docid": "4e228a1472ed493ecb1eedc8e4d528d1", "score": "0.45101076", "text": "function ItemLookup($item_id, $options = array())\n {\n $params = $options;\n $params['Operation'] = 'ItemLookup';\n if (is_array($item_id)) {\n $item_id = implode(',', $item_id);\n }\n $params['ItemId'] = $item_id;\n return $this->_sendRequest($params);\n }", "title": "" }, { "docid": "93f4268517f0189df6890888997850ef", "score": "0.4502796", "text": "function makeSelection() {\n\n\t\tKLog::start('99 total for ConfigboxControllerConfiguratorpage:makeSelection');\n\n\t\tKLog::start('01 prepare');\n\n\t\t// Set input variables\n\n\t\t// The element that gets a new selection\n\t\t$questionId = KRequest::getInt('questionId', false);\n\t\t$selection = KRequest::getString('selection', false);\n\t\t$pageId = KRequest::getInt('pageId', 0);\n\t\t$gotConfirmation = (KRequest::getInt('confirmed', 0) != 0);\n\n\t\t// We do this because the standalone CB does not deal with en-GB, en-US and alike yet\n\t\t$languageTag = KRequest::getString('languageTag');\n\t\tKText::setLanguage($languageTag);\n\n\t\t// Process input and prepare the response\n\t\t$response = ConfigboxConfiguratorHelper::getMakeSelectionResponse($questionId, $selection, $pageId, $gotConfirmation);\n\n\t\t// Finally send the response\n\t\t$this->sendResponse($response);\n\n\t}", "title": "" }, { "docid": "39d90f4ebcdf117eb7fae50ccf4254bb", "score": "0.449012", "text": "public function select($dbIndex) { }", "title": "" }, { "docid": "0edc2fe7ce71de713932ce549a703ab2", "score": "0.44835654", "text": "protected function executeCurrentItem() : void\n {\n $item = $this->getSelectedItem();\n\n if ($item->canSelect()) {\n $callable = $item->getSelectAction();\n if ($callable) {\n $callable($this);\n }\n }\n }", "title": "" }, { "docid": "6d15536d7e1b8bbcbb5f9bc882ce1164", "score": "0.44822457", "text": "function load_url($url)\n{\n\t// Ensure item is in the queue \n\tenqueue($url);\n\t// simulate the result of a CouchDB query\n\t$item = new stdclass;\n\t$item->value = $url;\n\t// fetch the item\n\tfetch($item);\n}", "title": "" }, { "docid": "464798f1b26249266faf75e18fb1938a", "score": "0.44745746", "text": "function getSelectedItem(&$vars, $input, $options) {\n\n\t\t//$scs = explode(',', $bdata['builder_sections']);\n\t\t//$scs = array_combine($scs, $scs);\n\t\t//$scs = array_intersect_key($bsection_module->moduleData['id'], $scs);\n\n\t\treturn (isset($input['band_layout'])?intval($input['band_layout'], 10):$this->getDefaultItem($vars, $input, $options));\n\t\t//tpt_dump($items);\n\t\t//tpt_dump($stdstyle);\n\t\t//tpt_dump($sitem);\n\n\t}", "title": "" }, { "docid": "ab210ac824a4782c8ae731fcf0095d48", "score": "0.44711253", "text": "public function selectById($id)\r\n {\r\n return parent::selectById($id);\r\n }", "title": "" }, { "docid": "1a4a4b9a8d405bc9ee285e8ed970272d", "score": "0.44297996", "text": "public function select()\r\n\t{\r\n\t\t$this->load->view('selectpage');\r\n\t}", "title": "" }, { "docid": "2a713442eb5534aff2c977f30bdf7958", "score": "0.4420703", "text": "function selectOption(){\n\t\t\n\t\tif($this->test_name == NULL){\n\t\t\t$this->errors[] = 'test_name not defined';\n\t\t}\n\t\t\n\t\t// This section selects an option at random given the weights provided\n\t\t// 1. Get the sum of the options' weights\n\t\tforeach($this->options as $val){\n\t\t\t$sum += $val;\n\t\t}\n\t\t// 2. Get a float between 0 and the sum of the options' weights\n\t\t$random = mt_rand(0, $sum * 100) / 100;\n\t\t// 3. Iterate through the weights concatenating them until the current value is greater than the random number\n\t\tforeach($this->options as $key => $val){\n\t\t\t$currentValue += $val;\n\t\t\tif($currentValue >= $random){\n\t\t\t\t$selected_option = $this->selected_option = $key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->option_key = md5($this->test_name.'|'.$this->selected_option);\n\t\t\n\t\t// We picked an option so add an impression if the option exists in the db or create a new row for it\n\t\t$mysqli = $this->db_connect();\n\t\t\n\t\t$sql = 'INSERT INTO '.$this->db_table.' ( test_key, test_name, `option`, weight, impressions ) VALUES ( \"'\n\t\t\t\t\t\t.$this->option_key.'\", \"'.$this->test_name.'\", \"'.$this->selected_option.'\", \"'.$this->options->$selected_option.'\", 1 )'\n\t\t\t\t\t\t.' ON DUPLICATE KEY UPDATE impressions = impressions + 1, weight = \"'.$this->options->$selected_option.'\"';\n\t\t$this->success = $mysqli->query($sql);\n\t\t$mysqli->close();\n\t\treturn $this->selected_option;\n\t}", "title": "" }, { "docid": "5d0ebe5b4a22b15ba436794483abba74", "score": "0.44080335", "text": "public function select()\n {\n Application::executeJavaScript(sprintf('qc.getW(\"%s\").select();', $this->strControlId));\n }", "title": "" }, { "docid": "f5c01c3bb3c73f4f794734585f9d2a6f", "score": "0.43966797", "text": "function setCurrentItem($item) \r\n {\r\n $this->paginate[$this->id]['current_item'] = $item;\r\n }", "title": "" }, { "docid": "1206e166b12a3452f1332bbf4e526d9b", "score": "0.4386054", "text": "function getAgentWithComputerid($items_id) {\n\n $agent = $this->find(\"`items_id`='\".$items_id.\"'\");\n\n if ($agent) {\n $data = current($agent);\n return $data['id'];\n }\n return false;\n }", "title": "" }, { "docid": "150d98d74f78f1151720bcc470eefa35", "score": "0.43817", "text": "public function selectItem($n, $browser_id = NULL) {\n if ($browser_id) {\n $selector = 'form#media-browser-' . drupal_clean_css_identifier($browser_id) . '-form';\n }\n else {\n $selector = 'form[data-media-browser-uuid]';\n }\n\n /** @var \\Behat\\Mink\\Element\\NodeElement[] $items */\n $items = $this\n ->assertSession()\n ->elementExists('css', $selector)\n ->findAll('css', '[data-selectable]');\n\n $items[$n - 1]->click();\n }", "title": "" }, { "docid": "206bfcd3881d2510475c01f0cf63e5f4", "score": "0.43756154", "text": "function Page_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5b7ad70ce07193a310ff589d8557b559", "score": "0.4362954", "text": "public static function select(\\Scrivo\\Context $context) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(null), 0);\n\n\t\t// Try to retieve form cache\n\t\t$obj = null;\n\t\tif (isset($context->cache[\"LABELS\"])) {\n\t\t\t// Set the page from cache and set the context.\n\t\t\t$obj = $context->cache[\"LABELS\"];\n\t\t} else {\n\t\t\t// Load the page and set it in the cache.\n\t\t\t$obj = new \\Scrivo\\IdLabel($context);\n\t\t\t$context->cache[\"LABELS\"] = $obj;\n\t\t}\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "c52a2364be42a0f07a1a0c311c02d9fa", "score": "0.4362077", "text": "public function chooseAction() {\n $this->_handlePublicAction();\n $this->view->assign('omekaLoginUrl', $this->view->url('/harvard-key/users/login'));\n $this->view->assign('harvardKeyLoginUrl', $this->_getHarvardKeyAuthServiceUrl());\n }", "title": "" }, { "docid": "9bbab858a79c3a5a417c7cfa86b66bca", "score": "0.43598574", "text": "function selectSubscriber($args) {\n\t\tif (isset($args) && !empty($args)) {\n\t\t\tif ($args[0] == 'individual') {\n\t\t\t\t$institutional = false;\n\t\t\t\t$redirect = 'individual';\n\t\t\t} else {\n\t\t\t\t$institutional = true;\n\t\t\t\t$redirect = 'institutional';\n\t\t\t}\n\t\t} else {\n\t\t\tRequest::redirect(null, 'manager');\n\t\t}\n\n\t\t$this->validate();\n\t\t$this->setupTemplate(true, $institutional);\n\n\t\tarray_shift($args);\n\t\timport('classes.subscription.SubscriptionAction');\n\t\tSubscriptionAction::selectSubscriber($args, $institutional);\n\t}", "title": "" }, { "docid": "00d6dd72eddc908551e19c8e71659797", "score": "0.43546444", "text": "public function test_GET_item_succeeds()\n {\n $iri = $this->findIriBy(Driver::class, ['name'=>'Jack']);\n $this->client->request('GET', $iri);\n $this->assertResponseIsSuccessful();\n $this->assertJsonContains([\n 'name' => 'Jack',\n 'marketPrice' => 1000,\n ]);\n }", "title": "" }, { "docid": "c9909e14fab6f21f2cbc56d1b7f91499", "score": "0.4353185", "text": "function Page_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "c9909e14fab6f21f2cbc56d1b7f91499", "score": "0.4353185", "text": "function Page_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "c9909e14fab6f21f2cbc56d1b7f91499", "score": "0.4353185", "text": "function Page_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "a4a659d6bd94198da893fc76ed4964e2", "score": "0.4330311", "text": "public function getOneItemById($id)\n {\n global $conn;\n $query = 'select * from item_in_menu where id = ' .$id.'';\n $res = $conn->query($query);\n return $res->fetch_assoc();\n }", "title": "" }, { "docid": "88e7337fdee510ce98fa0bfbbc46649b", "score": "0.43275934", "text": "abstract public function findOne(string $selector);", "title": "" }, { "docid": "45faecb41327c694cfe7b8d9521e2b92", "score": "0.4324268", "text": "public function selectQueue($entity, $action);", "title": "" }, { "docid": "87300ac25b97977bb963cd229e17d43b", "score": "0.43123415", "text": "public function select($lecturaevotranspiracion);", "title": "" }, { "docid": "0d17707db19b8ac3618573364ce18389", "score": "0.43121102", "text": "private function _getItemSelect()\n {\n $items = '';\n $ippArray = $this->itemSelect;\n foreach($ippArray as $ippOpt){\n $items .= ($ippOpt == $this->itemsPerPage) ? \"<option selected value=\\\"$ippOpt\\\">$ippOpt</option>\\n\":\"<option value=\\\"$ippOpt\\\">$ippOpt</option>\\n\";\n }\n return \"<span class=\\\"paginate\\\">\".$this->_navigation['ipp'].\"</span>\n\t \t<select class=\\\"paginate\\\" onchange=\\\"window.location='$this->_link?current=1&item='+this[this.selectedIndex].value;return false\\\">$items</select>\\n\";\n }", "title": "" }, { "docid": "53b2cbb2496ce0e3bcca2d89d59a389e", "score": "0.43076837", "text": "function setSelect(){\n\t\t\n\t}", "title": "" }, { "docid": "54a0522de4d3977e34eb59b3415db071", "score": "0.42961273", "text": "public function findItem($id);", "title": "" }, { "docid": "3c55c094541a97d68cfc0751d7f3f24b", "score": "0.42837766", "text": "private function fetchData() {\n $resp = $this->sendRequest($this->getSierraPath());\n\n $data = json_decode($resp);\n\n if (!$data || !isset($data->bibIds) || !$data->bibIds) throw new APIException('Received invalid response fetching item ' . $this->item_id);\n\n $this->bib_id = current($data->bibIds);\n }", "title": "" }, { "docid": "47bc57b915b86a31d2b43620b3f876d5", "score": "0.42824337", "text": "public function selecionarAction() {}", "title": "" }, { "docid": "3b0d60d66149d70201c6b623bae57990", "score": "0.42804086", "text": "public function loadItem($item_id)\n {\n $query = $this->database->select('queue', 'q')\n ->fields('q', ['item_id', 'name', 'data', 'expire', 'created', 'tries'])\n ->condition('q.item_id', $item_id)\n ->range(0, 1); // item id should be unique\n\n return $query->execute()->fetchObject();\n }", "title": "" }, { "docid": "aa99abb5d91bbc4c756ee4b8270b1678", "score": "0.42461643", "text": "function loadItem($index=0)\n\t{\n\t\t$item =& $this->items[$index];\n\t\t$item->index\t= $index;\n/*\t\t$item->img\t\t= $item->enabled ? 'tick.png' : 'publish_x.png';\n\t\t$item->task \t= $item->enabled ? 'disable' : 'enable';\n\t\t$item->alt \t\t= $item->enabled ? JText::_( 'Enabled' ) : JText::_( 'Disabled' );\n\t\t$item->action\t= $item->enabled ? JText::_( 'disable' ) : JText::_( 'enable' );\n*/\n\t\tif ($item->libraryname == 'joomla') {\n\t\t\t$item->cbd\t\t= 'disabled';\n\t\t\t$item->style\t= 'style=\"color:#999999;\"';\n\t\t} else {\n\t\t\t$item->cbd\t\t= null;\n\t\t\t$item->style\t= null;\n\t\t}\n\t\t$item->author_info = @$item->authorEmail .'<br />'. @$item->authorUrl;\n\n\t\t$this->assignRef('item', $item);\n\t}", "title": "" }, { "docid": "96e48ab5c8d7dc9940449f6fb4c55883", "score": "0.42456514", "text": "function select() {\n\t\t$response = $this->response;\n\t\t$form = $response->get_form($this->actions_name, 'select');\n\t\t$response->form = $form;\n\n\t\t$head['state']['title'] = $this->lang['lang_state'];\n\t\t$head['state']['sortable'] = false;\n\n\t\t$head['image_id']['title'] = $this->lang['cloud_private_image_id'];\n\t\t$head['image_id']['hidden'] = true;\n\n\t\t$head['image_name']['title'] = $this->lang['cloud_private_image_name'];\n\t\t$head['image_name']['hidden'] = true;\n\n\t\t$head['image_version']['title'] = $this->lang['cloud_private_image_version'];\n\t\t$head['image_version']['hidden'] = true;\n\n\t\t$head['image_type']['title'] = $this->lang['cloud_private_image_type'];\n\t\t$head['image_type']['hidden'] = true;\n\n\t\t$head['image_rootdevice']['title'] = $this->lang['cloud_private_image_root'];\n\t\t$head['image_rootdevice']['hidden'] = true;\n\n\t\t$head['data']['title'] = '&#160;';\n\t\t$head['data']['sortable'] = false;\n\n\t\t$head['image_comment']['title'] = '&#160;';\n\t\t$head['image_comment']['sortable'] = false;\n\n\t\t$head['image_assigned']['title'] = $this->lang['cloud_private_image_assigned'];\n\t\t$head['image_assigned']['sortable'] = false;\n\n\t\t$head['is_private']['title'] = $this->lang['lang_private'];\n\t\t$head['is_private']['sortable'] = false;\n\n\t\t$head['image_actions']['title'] = '&#160;';\n\t\t$head['image_actions']['sortable'] = false;\n\n\t\t$table = $response->html->tablebuilder( 'cloud_private_image_table', $this->response->get_array($this->actions_name, 'select'));\n\t\t$table->css = 'htmlobject_table';\n\t\t$table->border = 0;\n\t\t$table->limit = 10;\n\t\t$table->id = 'cloud_private_image_table';\n\t\t$table->head = $head;\n\t\t$table->sort = 'image_id';\n\t\t$table->autosort = true;\n\t\t$table->max = $this->image->get_count()-2;\n\t\t$table->form_action = $this->response->html->thisfile;\n\t\t$table->sort_link = false;\n\t\t$table->limit_select = array(\n\t\t\tarray(\"value\" => 10, \"text\" => 10),\n\t\t\tarray(\"value\" => 20, \"text\" => 20),\n\t\t\tarray(\"value\" => 30, \"text\" => 30),\n\t\t\tarray(\"value\" => 40, \"text\" => 40),\n\t\t\tarray(\"value\" => 50, \"text\" => 50),\n\t\t\tarray(\"value\" => 100, \"text\" => 100),\n\t\t);\n\t\t$table->init();\n\n\t\t$cloud_private_image_array = $this->image->display_overview($table->offset, $table->limit, $table->sort, $table->order);\n\t\t$ta = '';\n\t\tforeach ($cloud_private_image_array as $index => $cz) {\n\n\t\t\t// update action\n\t\t\t$a = $this->response->html->a();\n\t\t\t$a->title = $this->lang['cloud_private_image_update'];\n\t\t\t$a->label = $this->lang['cloud_private_image_update'];\n\t\t\t$a->css = 'edit';\n\t\t\t$a->href = $this->response->get_url($this->actions_name, \"update\").'&cloud_private_image_id='.$cz[\"image_id\"];\n\t\t\tif (!strlen($cz[\"image_version\"])) {\n\t\t\t\t$cz[\"image_version\"] = '&#160;';\n\t\t\t}\n\t\t\tif (!strlen($cz[\"image_comment\"])) {\n\t\t\t\t$cz[\"image_comment\"] = '&#160;';\n\t\t\t}\n\n\t\t\t// private image config existing\n\t\t\t$assigned_to = '';\n\t\t\tif ($this->cloudprivateimage->exists_by_image_id($cz[\"image_id\"])) {\n\t\t\t\t$this->cloudprivateimage->get_instance_by_image_id($cz[\"image_id\"]);\n\t\t\t\tif ($this->cloudprivateimage->cu_id > 0) {\n\t\t\t\t\t$this->cloud_user->get_instance_by_id($this->cloudprivateimage->cu_id);\n\t\t\t\t\t$assigned_to = $this->cloud_user->name;\n\t\t\t\t} else if ($this->cloudprivateimage->cu_id == 0) {\n\t\t\t\t\t// 0 == all\n\t\t\t\t\t$assigned_to = $this->lang['cloud_private_image_everybody'];\n\t\t\t\t} else if ($this->cloudprivateimage->cu_id < 0) {\n\t\t\t\t\t$assigned_to = $this->lang['cloud_private_image_nobody'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$assigned_to = $this->lang['cloud_private_image_nobody'];\n\t\t\t}\n\n\t\t\t// check private\n\t\t\t$is_private = '&#160;';\n\t\t\tif($this->cloudprivateimage->exists_by_image_id($cz[\"image_id\"]) === true) {\n\t\t\t\t$is_private = 'x';\n\t\t\t}\n\n\t\t\t// set the active icon\n\t\t\t$isactive_icon = '<div class=\"appnamer panel-heading\"><h3 class=\"panel-title\">'.$cz[\"image_name\"].'</h3><span class=\"pill inactive\">'.$this->lang['lang_inactive'].'</span></div>';\n\t\t\tif ($cz[\"image_isactive\"] == 1) {\n\t\t\t\t$isactive_icon = '<div class=\"appnamer panel-heading\"><h3 class=\"panel-title\">'.$cz[\"image_name\"].'</h3><span class=\"pill active\">'.$this->lang['lang_active'].'</span></div>';\n\t\t\t}\n\n\t\t\t$data = '<b>'.$this->lang['cloud_private_image_id'].':</b> '.$cz[\"image_id\"].'<br>';\n\t\t\t$data .= '<b>'.$this->lang['cloud_private_image_name'].':</b> '.$cz[\"image_name\"].'<br>';\n\t\t\t//$data .= '<b>'.$this->lang['cloud_private_image_version'].':</b> '.$cz[\"image_version\"].'<br>';\n\t\t\t$data .= '<b>'.$this->lang['cloud_private_image_type'].':</b> '.$cz[\"image_type\"].'<br>';\n\t\t\t$data .= '<b>'.$this->lang['cloud_private_image_root'].':</b> '.str_replace('/'.$cz[\"image_name\"],'',$cz[\"image_rootdevice\"]);\n\n\t\t\tif (!preg_match('@resource1@', $cz[\"image_name\"])) {\n\t\t\t\t$ta[] = array(\n\t\t\t\t\t'state' => $isactive_icon,\n\t\t\t\t\t'image_id' => $cz[\"image_id\"],\n\t\t\t\t\t'image_name' => $cz[\"image_name\"],\n\t\t\t\t\t'image_version' => $cz[\"image_version\"],\n\t\t\t\t\t'image_type' => $cz[\"image_type\"],\n\t\t\t\t\t'image_rootdevice' => $cz[\"image_rootdevice\"],\n\t\t\t\t\t'data' => $data,\n\t\t\t\t\t'image_comment' => $cz[\"image_comment\"],\n\t\t\t\t\t'image_assigned' => $assigned_to,\n\t\t\t\t\t'is_private' => $is_private,\n\t\t\t\t\t'image_actions' => $a->get_string(),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$table->body = $ta;\n\n\t\t$response->table = $table;\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "718d5a926d86b45689b8bebf671418c4", "score": "0.42410672", "text": "function selectClient(){\n\n global $connection;\n\n echo\"\n <div class='dropdown'>\n <button class='btn btn-default' id='dLabel' type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>\n Select Client\n <span class='caret'></span>\n </button>\n <ul class='dropdown-menu' aria-labelledby='dLabel'>\n <li>\";\n\n $query = \"SELECT * FROM clients\";\n $select_all_client = mysqli_query($connection, $query);\n while($row = mysqli_fetch_array($select_all_client)){\n $client_id = $row['client_id'];\n $client_nom = $row['nom'];\n $client_prenom = $row['prenom'];\n\n echo \"<a href='factures_client.php?source=add_facture_client&client_id=$client_id'><i class='fa fa-plus-circle' aria-hidden='true'></i> \".$client_nom.\" \".$client_prenom.\"</a>\";\n }\n echo \"</li>\n </ul>\n </div>\";\n\n }", "title": "" }, { "docid": "8f69c2f3e30256ea7e2594835e19c314", "score": "0.4236012", "text": "public function getSelectAction();", "title": "" }, { "docid": "c179c38b04465f601624f12aa81270d3", "score": "0.42357308", "text": "public function select($connections);", "title": "" }, { "docid": "506300aced1b8e2a544469d46f6ac1bd", "score": "0.42347133", "text": "function Select();", "title": "" }, { "docid": "692f722c6ac09ea65c0f28acf8d06919", "score": "0.42255828", "text": "function account_select( ) {\n\t\t//get account list, catch exceptions\n\t\ttry { \n\t\t\t$account_list = $this->c_admin->Admin_Get_Accounts();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\treturn $e->getMessage();\n\t\t}\n\t\t//to hold API keys\n\t\t$apikey_array = array();\n\t\t//start html output\n\t\t$apikey_list_output = '<select id=\"wp_contactology_admin_client_to_activate\" name=\"wp_contactology_admin_client_to_activate\">';\n\t\t$apikey_list_output .= '<option value=\"0\">Select a Client</option>';\n\t\t//go through each account\n\t\tforeach( $account_list as $clientID => $clientName ) {\n\t\t\t$apikey_list_output .= \"<option value='{$clientID}'>{$clientName}</option>\";\n\t\t}\n\t\t//end output\n\t\t$apikey_list_output .= '</select>';\n\t\t//return html output\n\t\treturn $apikey_list_output;\n\t}", "title": "" }, { "docid": "84a5b06736cb435617688e4b4c65ffe6", "score": "0.42144227", "text": "public function pick($sku)\n {\n return $this->basket->products()->get($sku);\n }", "title": "" }, { "docid": "38c146d889cf420d9a5bf8361279cf10", "score": "0.42104986", "text": "public static function loadBasketItemById(mysqli $connection, $id, $itemCount=0) {\n \n $q = \"SELECT * FROM Products WHERE id ='$id' \";\n $result = $connection->query($q);\n \n if ($result == TRUE && $result->num_rows != 0) {\n \n $row = $result->fetch_assoc();\n \n $oProduct = new BasketItem();\n $oProduct->cena = $row['cena'];\n $oProduct->id = $row['id'];\n $oProduct->dataPremiery = $row['data_premiery'];\n $oProduct->edycja = $row['edycja'];\n $oProduct->gatunek = $row['gatunek'];\n $oProduct->jezyk = $row['jezyk'];\n $oProduct->kategoriaWiekowa = $row['kategoria_wiekowa'];\n $oProduct->opis = $row['opis'];\n $oProduct->platforma = $row['platforma'];\n $oProduct->promocja = $row['promocja'];\n $oProduct->tytul = $row['tytul'];\n $oProduct->wydawca = $row['wydawca'];\n $oProduct->itemCount = $itemCount;\n return $oProduct;\n\n }\n echo \"Brak gry w naszym sklepie\";\n return NULL; \n }", "title": "" }, { "docid": "a243b076126806887d07e9340e4afe06", "score": "0.42072862", "text": "function get_item() {\n if ( ! isset($_GET[\"id\"]) || empty($_GET[\"id\"])) {\n return false;\n };\n\n global $database;\n\n $item = $database->get(\"items\", \"text\", [\n 'id' => $_GET['id']\n ]);\n\n if ( ! $item ) {\n return false;\n }\n\n return $item;\n}", "title": "" }, { "docid": "068ff7904b9839df12e39f732ce8583a", "score": "0.4203783", "text": "public function lookup($name)\n\t{\n\t\treturn $this->items->whereName($name)->first();\n\t}", "title": "" }, { "docid": "9d2928edf7ae6fed534bb761dbaba574", "score": "0.42006525", "text": "public function loadCurrentPage(){\n for($i = $this->start; $i < ($this->start + $this->limit); $i++){\n if(isset($this->aRaw[$i])){\n $this->aData[$i] =\n AMI::getResourceModel(\n $this->getModId() . '/table/model/item',\n array($this->oIterator, $this->aRaw[$i])\n );\n }\n }\n }", "title": "" }, { "docid": "285bb385bd9be8444461f5082f07df9f", "score": "0.41995868", "text": "public function select($select = null);", "title": "" }, { "docid": "064d5973bb3f498eec8e30ca91a92b94", "score": "0.41863334", "text": "public function select($key)\r\n {\r\n $operation = new Xi_Array_Operation_Select($key);\r\n return new self($operation->execute($this));\r\n }", "title": "" }, { "docid": "e35270c001b374a9b4ac867093c4c3cc", "score": "0.41855782", "text": "function select() {\n\t\t\t\t// DARI MODEL\n\t\t\t\t// MENGARAH KE METHOD DI CLASS MODEL PENDUDUK\n\t\t\t\t$data\t\t\t= $this->sistem->dataHome();\n\t\t\t\t$data_user\t\t\t= $this->user->dataUser();\n\t\t\t\t\n\t\t\t\t// DARI 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": "690a2791d2459b3046dfaef5329cb9a5", "score": "0.4183325", "text": "function scrape_item($param) {\r\n\t\t// base url\r\n\t\t$base_url = preg_replace('/.com\\/.+$/i', '.com', $param['link']);\r\n\t\t\r\n\t\t// set to localhost\r\n\t\t// $param['link'] = 'http://localhost/amazon/trunk/item.txt';\r\n\t\t\r\n\t\t// get page\r\n\t\t$curl = new curl();\r\n\t\t$page = ($this->use_curl) ? $curl->get($param['link']) : file_get_contents($param['link']);\r\n\t\t$page_clean = $this->clean_item($page);\r\n\t\t\r\n\t\t$result['code'] = $this->get_code_item($param['link']);\r\n\t\t$result['name'] = $this->get_name_item($page_clean);\r\n\t\t$result['brand_name'] = $this->get_brand_item($page_clean);\r\n\t\t$result['desc'] = $this->get_desc_item($page_clean);\r\n\t\t$result['image'] = $this->get_image_item($page_clean);\r\n\t\t$result['status_stock'] = $this->get_status_stock_item($page_clean);\r\n\t\t$result['desc_show'] = 1;\r\n\t\t\r\n\t\t// get price\r\n\t\t$price = $this->get_price_item($page_clean);\r\n\t\t$result = array_merge($result, $price);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "6fc7c74904ac37d5dc99491b9c03d14a", "score": "0.4181671", "text": "function cmb2_remote_img_sel() {\n\treturn CMB2_Remote_Image_Select::get_instance();\n}", "title": "" }, { "docid": "451fb4e9bc5d068532c7fedd54aa8120", "score": "0.41800496", "text": "public function load(): void {\n $data = $this->getSilverPop()->selectRecipientData($this->getGroupIdentifier(), [], []);\n }", "title": "" }, { "docid": "7baf478d9bb2036094bfc10fd84c9b57", "score": "0.41617155", "text": "public function testSelectCategoryAsign()\n {\n $restaurant = Restaurant::factory()\n ->has(Category::factory()->count(1))\n ->create();\n\n $this->browse(function (Browser $browser) use ($restaurant) {\n $browser->visit(new RestaurantsPage)\n ->assertSee($restaurant->name)\n ->click('#category-1')\n ->assertSee($restaurant->name)\n ->clickLink('Reiniciar')\n ->assertSee($restaurant->name);\n });\n }", "title": "" }, { "docid": "cd15c0017218505767c532ba61a05d9a", "score": "0.41616854", "text": "function getItem($item_id) {\n $db = Database::instance()->db();\n $stmt = $db->prepare('SELECT * FROM item WHERE item_id = ?');\n $stmt->execute(array($item_id));\n return $stmt->fetch();\n }", "title": "" }, { "docid": "74492a970ac19f728725a60db7d7e2fd", "score": "0.4160461", "text": "function getSelectedIndex() {\n return $this->selectedIndex;\n }", "title": "" }, { "docid": "00f86da59c84321bd53c5ac1f750b7dc", "score": "0.4158825", "text": "public function ajax_load_available_items() {}", "title": "" }, { "docid": "8e48a85239dbd91777ef52509576fd96", "score": "0.4155544", "text": "function readOne()\n {\n // prepare query statement\n $stmt = p_Bid_sel_id($this->conn, $this->ID);\n\n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->ItemID = $row['ItemID'];\n $this->BidAmount = $row['BidAmount'];\n $this->UserID = $row['UserID'];\n $this->CreatedAt = $row['CreatedAt'];\n }", "title": "" }, { "docid": "45217b5cea6cace9d7e6c323623bf672", "score": "0.41486797", "text": "public function getPrimaryItem();", "title": "" }, { "docid": "a035cdba3dffd3908d599ed272d884ac", "score": "0.4148552", "text": "function selectMenu($view_param){\t\n\t\tswitch($view_param){\n\t\t\tcase('frontend'):\n\t\t\t\t$this->mysqli->prepare(\"SELECT * FROM {$this->dbTable} WHERE menu_visible = '1' ORDER BY menu_position\");\n\t\t\tbreak;\t\n\t\t\tcase('backend'):\n\t\t\t\t$this->mysqli->prepare(\"SELECT * FROM {$this->dbTable} ORDER BY menu_position\");\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\t$this->mysqli->query(); // eseguimo la query\n\t\treturn $this->mysqli->fetch('all_assoc'); // formattiamo tutti i dati in un array associativo\n\t}", "title": "" }, { "docid": "c256bbfe5c5f77218bb13949f3ebd125", "score": "0.41459444", "text": "public function simple_list_select($id) {\n $select = \"SELECT * FROM Lists WHERE id = '$id'\";\n\n // search the database for this list\n $result = $this->select($select);\n\n if (!$result) {\n\n // if no connection made, let someone know\n return \"Could not access list via simple select\";\n\n } else {\n\n // else save the associative array of the result\n $row = mysqli_fetch_assoc($result);\n\n // and return it\n return $row;\n }\n\n }", "title": "" }, { "docid": "630492498036b5225d1749b0c38d195e", "score": "0.41410917", "text": "public function _selIn(\n MicrobeModelMetadata $model,\n $in,\n $pk,\n $forceFetch = false,\n $forceThrow = false\n );", "title": "" }, { "docid": "095b76209054760913dcac024af5e956", "score": "0.41308782", "text": "public function setSelector($value) {\n\t\treturn $this->setParam(\"selector\", $value);\n\t}", "title": "" }, { "docid": "45defbb1d705760dec7cc58c674b957d", "score": "0.41307506", "text": "private function selectAction(Request $req)\n {\n if (!$this->userHasAccess($this->app)) {\n return false;\n }\n\n $status = true;\n\n if ($req->get('delete') !== null) {\n $status = false;\n }\n\n $mapper = $this->app['spot']->mapper('OpenCFP\\Domain\\Entity\\Talk');\n $talk = $mapper->get($req->get('id'));\n $talk->selected = $status;\n $mapper->save($talk);\n\n return true;\n }", "title": "" }, { "docid": "cb5339f674abbfe13acf9d5a3759184e", "score": "0.41302145", "text": "public function testSelectsTheFirstUrlInTheSetWhenGeneratingAStatusUrlInstance() {\n $hosts = array(\n 'http://imbo1',\n 'http://imbo2',\n 'http://imbo3',\n );\n $client = new Client($hosts, $this->publicKey, $this->privateKey);\n $url = $client->getStatusUrl();\n $this->assertStringStartsWith('http://imbo1', $url->getUrl());\n\n }", "title": "" }, { "docid": "b37f54a78d3a252c19833d8c696f31b5", "score": "0.41286308", "text": "public function pick($criteria);", "title": "" }, { "docid": "fb72f1b43d5e2327ac3f047b9ee893be", "score": "0.41274473", "text": "public function PickingLoadingSelect ($pallet_id_int, $member_id) {\n DB::update(DB::raw(\n \"UPDATE Pallets\n SET\n status_id = 7\n WHERE\n id = $pallet_id_int \n \"));\n\n $temp = DB::select(DB::raw(\n \"SELECT id as order_id\n FROM OrderData\n WHERE\n member_id = $member_id\n AND status_id = 2\n \"));\n\n $order_id = $temp[0]->order_id;\n\n $temp = DB::select(DB::raw(\n \"SELECT\n type_id,\n production_date\n FROM Pallets\n WHERE\n id = $pallet_id_int\n \"));\n\n $type_id = $temp[0]->type_id;\n $production_date = '\"' . $temp[0]->production_date . '\"';\n\n DB::insert(DB::raw(\n \"INSERT INTO DeliveryDetails (\n order_id,\n pallet_id,\n type_id,\n production_date,\n picking_line\n ) VALUES (\n $order_id,\n $pallet_id_int,\n $type_id,\n $production_date,\n $member_id\n )\n \"));\n\n echo \"Loading pallet {$pallet_id_int}.\";\n return ComponentCheck::CurrentTime();\n }", "title": "" }, { "docid": "694da843c553c917da6c49b8bb0a620f", "score": "0.41188246", "text": "abstract public function item($index);", "title": "" }, { "docid": "25829f3585bdc2e2afc96ac197d1e7d4", "score": "0.41186845", "text": "public function setItem($item){\n\t\t$this->item = $item;\n\t}", "title": "" } ]
7b0a2c7e23e8a2e1f85915d8ad55a38b
////////////////////////////////////////////////// Convierte fecha de normal a mysql //////////////////////////////////////////////////
[ { "docid": "a11c508e7f1aa5094d74600f9e8a3c0b", "score": "0.6733959", "text": "function cambiaf_a_mysql($date){\n\t# ================================================== ========\n\t# ==== Recibe una fecha con formato dd-mm-aa ====\n\t# ==== Devuelve una fecha con formato aaaa-mm-dd hh:mm:ss ====\n\t# ================================================== ========\n\t\n\t$day=substr($date,0,2);\n\t$month=substr($date,3,2);\n\t$year=substr($date,6,4);\n\t$date=$year.\"-\".$month.\"-\".$day;\n\treturn ($date);\n\t}", "title": "" } ]
[ { "docid": "c88da043c4e4ae583d783fdd5b4fed39", "score": "0.7262648", "text": "function cambiaf_mysql($fecha){\r\n \r\n $fecha= str_replace('/', '-', $fecha);\r\n return date('Y-m-d', strtotime($fecha));\r\n }", "title": "" }, { "docid": "3b587a9a5bef2ec0878414d7e24b81ca", "score": "0.7180793", "text": "function mysql_fecha($fech)\n{\n$fech1= explode(\"/\",$fech);\n\tif(strlen(trim($fech1[1]))==1)\n\t{\n\t\t$fech1[1]=\"0\".$fech1[1];\n\t}\n\tif(strlen(trim($fech1[0]))==1)\n\t{\n\t\t$fech1[0]=\"0\".$fech1[0];\n\t}\nreturn trim($fech1[2]).\"/\".trim($fech1[1]).\"/\".trim($fech1[0]);\n}", "title": "" }, { "docid": "86f650d1bce56235d11eba4f1f3a1115", "score": "0.7098798", "text": "function fecha_db($fecha,$ini=false,$trunca=false)\n {\n $fecha1 = explode(\"/\",$fecha);\n if($ini) $hora = \" 00:00:00\"; else $hora = \" 23:59:59\";\n if($trunca)$hora = '';\n\n if($this->formato==\"d/m/Y\"){\n\n $final = $fecha1[2].'-'.$fecha1[1].'-'.$fecha1[0].$hora;\n\n }else{\n\n $final = $fecha1[2].'-'.$fecha1[0].'-'.$fecha1[1].$hora;\n\n }\n\n return $final;\n }", "title": "" }, { "docid": "0ba279481d7af4e0a2b6bd81d7ca8ec8", "score": "0.7046743", "text": "function to_mysql_date($date) {\n if($date == \"\") return;\n\n $php_date = new DateTime($date);\n return $php_date->format('Y-m-d');\n}", "title": "" }, { "docid": "6be75755546f150583ee1e7e81a8844a", "score": "0.6852482", "text": "public static function todayToMysql()\r\n {\r\n $date = new DateTime();\r\n return $date->format('Y-m-d');\r\n }", "title": "" }, { "docid": "622bbb07102a78f316bf5553e954b816", "score": "0.6845375", "text": "function transform_mysql_date_to_date($date_origine)\r\n{\r\n\t$tmpdate = explode( \"-\", $date_origine); \r\n\t\t\r\n\t// on surf le tableau dans l'ordre inverse en admetant que l'année est toujours au début\r\n for($i=(count($tmpdate)-1);$i>=0;$i--) \r\n { \r\n\t\t// si la valeur est d'un seul chiffre ça rajoute un 0 devant (utile pour les mois ou les jours d'un chiffre)\r\n\t\t if(strlen($tmpdate[$i])<2) \r\n $tmpdate[$i] = \"0\".$tmpdate[$i]; \r\n\t\t// on met tout ca dans $tmp_final_date \r\n $tmp_final_date .= $tmpdate[$i]; \r\n\t\t// si on passe un rang on place les séparateurs '-' cher à MySQL \r\n\t\t// mais pas au dernier rang (0) \r\n\t\t if($i>0) \r\n\t\t $tmp_final_date .= \"/\"; \r\n } \r\n\t// enfin retourner le résultat \r\n\treturn $tmp_final_date; \r\n}", "title": "" }, { "docid": "d2fde7181adea77fcafb0e516e9e5b2e", "score": "0.67366207", "text": "function mysql_date() : string {\n return date(\"Y-m-d h:i:s\", time());\n}", "title": "" }, { "docid": "df92df6a61666e42abc603c689fa277e", "score": "0.6652005", "text": "function mysql_date() {\n\treturn date('Y-m-d H:i:s');\n}", "title": "" }, { "docid": "df67001089be8b63b68410ee07943558", "score": "0.6642287", "text": "static function mysql($s) { // can just use strtotime on mysql dates\n\t\treturn static::timestamp(strtotime($s));\n\t}", "title": "" }, { "docid": "b67f2604a7fcfdffacb82905e527e457", "score": "0.6626716", "text": "function tableDateToMySQL($v)\n\t{\n\t\t$params = $this->getParams();\n\t\t$store_as_local = (int)$params->get('date_store_as_local', 0);\n\t\t$format = $params->get('date_table_format', '%Y-%m-%d');\n\t\t$b = FabrikWorker::strToDateTime($v, $format);\n\t\tif (!is_array($b)) {\n\t\t\treturn false;\n\t\t}\n\t\t//3.0 can't use timestamp as that gets offset as its taken as numeric by FabDate\n\t\t//$orig = new FabDate($datebits['timestamp'], 2);\n\t\t$bstr = $b['year'].'-'.$b['mon'].'-'.$b['day'].' '.$b['hour'].':'.$b['min'].':'.$b['sec'];\n\t\t$date = JFactory::getDate($bstr);\n\t\tif (in_array($v, $this->getNullDates()) || $v === $date->toMySQL()) {\n\t\t\treturn $v;\n\t\t}\n\n\t\tif ($store_as_local) {\n\t\t\t$this->_resetToGMT = false;\n\t\t}\n\t\t$retval = $this->toMySQLGMT($date);\n\t\t$this->_resetToGMT = true;\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "158084ff964fd88ae44636285c4382cf", "score": "0.65695107", "text": "function unix_date_to_db( $date ) {\n\treturn strftime( '%Y-%m-%d %H:%M:%S', $date );\n}", "title": "" }, { "docid": "bdaf04ac8e0616bbcb64111318a3201a", "score": "0.65416914", "text": "public static function nowToMysql()\r\n {\r\n $date = new DateTime();\r\n return $date->format('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "df6ab2843a3e1942d051b01040f6988b", "score": "0.65183914", "text": "function Fecha_Mysql($fecha){\r\n\t$separado = explode(\"-\",$fecha);\r\n\treturn $separado[2].\"-\".$separado[1].\"-\".$separado[0];\r\n}", "title": "" }, { "docid": "5f114e18ccffd98ac382d3b61f90b2f0", "score": "0.6493277", "text": "public static function convert_date_conviviale($date_sql) {\n\t\tif (($date_sql != \"0000-00-00\")&& ($date_sql != \"\")) {\n\t\t\t$cut_text = substr($date_sql,0,10);\n\t\t\t$date = self::DateConviviale ($cut_text);\n\t\t}\n\t\telse {\n\t\t\t$date=\"undefined\";\n\t\t}\n\t return ($date);\n\t}", "title": "" }, { "docid": "94bd9c5fb5c7df743942a47a56d8f002", "score": "0.64855456", "text": "function to_database_format($date_to_be_converted) {\n if ($date_to_be_converted == '') {\n return '0000-00-00';\n }\n return date(PHP_DATEFORMAT_MYSQL, strtotime($date_to_be_converted));\n}", "title": "" }, { "docid": "b150cda8c03bfcc7781f40d0a79b51c7", "score": "0.639723", "text": "public static function mysqlDate($_date)\n {\n\t\tif(strlen($_date) < 8){\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$date = date( \"Y-m-d H:i:s\", strtotime( str_replace('-', '/', $_date)));\n\t\treturn $date;\n\t\t//\n\t\t//date()\n }", "title": "" }, { "docid": "11b8f1a27c0fa9d52cf9efa85cb19c08", "score": "0.6392706", "text": "function convertDateToSql($date) {\n $timestamp = strtotime($date);\n $day = date('d', $timestamp);\n $month = date('M', $timestamp);\n $year = date('Y', $timestamp);\n $returnSqlTime = $day . \"/\" . strtoupper($month) . \"/\" . $year;\n printToConsole(\"Converted: \" . $timestamp . \" -> \" . $dreturnSqlTime);\n return $returnSqlTime;\n }", "title": "" }, { "docid": "ce8a0d4eb8a08031a983d8350228b50f", "score": "0.63690454", "text": "function orr_date_sql($date_entree){\n list($date,$heures) = explode(' ' , $date_entree);\n list($jour,$mois,$annee) = explode('/' , $date);\n// list($heure,$minute,$seconde) = explode(':' , $heures);\n $date_sortie = $annee.'-'.$mois.'-'.$jour.' '.$heures;\n return $date_sortie;\n}", "title": "" }, { "docid": "143c3337c32023059ff68201c315efb7", "score": "0.63595295", "text": "function toSQL($fecha) {\r\n\t\t$separator = \"-\";\r\n\t\t$temp = explode ( $separator, $fecha );\r\n\t\t\r\n\t\t$temp [0] = ( int ) $temp [0];\r\n\t\t$temp [1] = ( int ) $temp [1];\r\n\t\t$temp [2] = ( int ) $temp [2];\r\n\t\t\r\n\t\treturn $temp [2] . $separator . $temp [1] . $separator . $temp [0];\r\n\t}", "title": "" }, { "docid": "3d6768f8f9ad0911b4c1dc9b2563bd1e", "score": "0.6327142", "text": "function dateMysql($value)\n{\n return date('Y-m-d', strtotime(str_replace('/', '-', $value)));\n}", "title": "" }, { "docid": "d3be4ba61401980c15b3c716f69e9407", "score": "0.63095284", "text": "public function fechasperiodoactual(){\n $sql=\"SELECT Finalizado,ConvocatoriaFecha AS inicio,CierreConvocatoria AS fin,ProrrogaInicio AS PrInicio,ProrrogaFin AS PrFin FROM CONVOCATORIAS WHERE Activo=1\";\n //la consulta arrojara el numero mayor de la tabla y se sumara 1\n //ejemplo consulta=17 , 17+1=18, 18 es el nuevo id que se agregara(**())\n $this->resultados=$this->conexion->query($sql);\n $row=$this->resultados->fetch_array();\n //$convocatoria=$row[\"ClaveConvocatoria\"];\n //$usuario->setId_Usuario($id_usuario);\n return $row;\n }", "title": "" }, { "docid": "65b71446e5dc9b0aae46a960e588f7ec", "score": "0.63094485", "text": "function date_to_mysql($date) {\n $bits = array();\n $month = -1;\n $result = NULL;\n if (preg_match('/^([0123]?\\d)[-\\/]([012]?\\d)[-\\/]([12]\\d{3})$/', $date, $bits)) {\n $day = $bits[1];\n $month = $bits[2];\n $year = $bits[3];\n }\n else if (preg_match('/^([0123]?\\d)[-\\/]([012]?\\d)[-\\/](\\d{2})$/', $date, $bits)) {\n $day = $bits[1];\n $month = $bits[2];\n $year = $bits[3] >= 40 ? 1900 + $bits[3] : 2000 + $bits[3];\n }\n else if (preg_match('/^([0123]?\\d)[-\\/](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[-\\/]([12]\\d{3})$/i', $date, $bits)) {\n $day = $bits[1];\n $month = month_to_number($bits[2]);\n $year = $bits[3];\n }\n else if (preg_match('/^([0123]?\\d)[-\\/](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[-\\/](\\d{2})$/i', $date, $bits)) {\n $day = $bits[1];\n $month = month_to_number($bits[2]);\n $year = $bits[3] >= 40 ? 1900 + $bits[3] : 2000 + $bits[3];\n }\n if ($month > 0 && $month <= 12) {\n $isLeap = ($year % 4) == 0;\n $daysInMonth = array(0, 31, 28 + ($isLeap ? 1 : 0), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n if ($day > 0 && $day <= $daysInMonth[(int)$month]) {\n $result = \"$year-$month-$day\";\n }\n }\n return $result;\n}", "title": "" }, { "docid": "3ea85291ea77bc8fa2d45e0d47e691f8", "score": "0.6306304", "text": "public static function mysqlCurrent() \n {\n $datetimeFormat = \"Y-m-d H:i:s\"; // this fix mysql timestamp format\n return date($datetimeFormat);\n \n }", "title": "" }, { "docid": "75bf4c19fe441e50b9121878f8f70cf4", "score": "0.63024426", "text": "public function fecha_actual(){\n $sql=\"select date_format( now() , '%d/%m/%Y %H:%i:%s' ) as ahora, now() as today\";\n $db = \\Config\\Database::connect();\n $query = $this->db->query($sql);\n return $query->getRow();\n }", "title": "" }, { "docid": "454c0bce0e84ac9fcb48609096adab2d", "score": "0.62629247", "text": "public static function convert_date($date_sql) {\n\t $cut_text = substr($date_sql,0,10);\n\t\tif ($cut_text != \"0000-00-00\") {\n\t\t\t$date = self::PrettyDate ($cut_text);\n\t\t}\n\t\telse {\n\t\t\t$date =\"undefined\";\n\t\t}\n\t return ($date);\n\t}", "title": "" }, { "docid": "dd933299557e7e073a08b46a52b340b0", "score": "0.6248846", "text": "function e3g_format_data_to_mysql( $miadata )\n{\n if ( $miadata == '')\n $miadata = str_replace( \"-\", \"/\", date (\"d-m-y\") );\n \n $pos1 = strpos ( $miadata, '/' );\n $pos2 = strpos ( $miadata, '/', $pos1 + 1 );\n \n $year = substr ( $miadata, $pos2 + 1, strlen($miadata) - $pos2 - 1 );\n $month = substr ( $miadata, $pos1 + 1, $pos2 - $pos1 - 1 );\n $day = substr ( $miadata, 0, $pos1 );\n\n return $year . \"-\" . $month . \"-\" . $day;\n}", "title": "" }, { "docid": "da18b95ebcae8151268fdaf9625f3b26", "score": "0.624163", "text": "static public function mysql_date($date) {\n if (OmegaTest::int_non_neg($date)) {\n return date(\"Y-m-d H:i:s\", $date);\n } else if (OmegaTest::datetime($date)) {\n return $date;\n } else {\n $ts = strtotime($date);\n if ($ts === -1 || $ts === false) {\n throw new Exception(\"Unrecognized date: '$date'. Please provide a validate epoch, date, etc.\");\n }\n return date(\"Y-m-d H:i:s\", $ts);\n }\n }", "title": "" }, { "docid": "a48626ebfd2ce4e532c5f9f8e98506d3", "score": "0.6239291", "text": "function mysql_cvdate($s) \n { \n //take a user-entered date value and express it in MySQL's date format \n // ***Use this to parse date input from a form into a MySQL database. \n return timestamp_to_mysql_date(cvdate($s)); \n }", "title": "" }, { "docid": "df6dd8b674abb4211e3fd8e4db2bd8eb", "score": "0.6238074", "text": "function cambia_fecha_a_db($fecha)\r\n{\r\n if(!empty($fecha)){\r\n\t\t\t $mifecha = explode('-',str_replace('/','-',$fecha));\r\n alert(\"paso a fecha\"+$mifecha);\r\n\t\t\treturn $mifecha[2].'-'.$mifecha[1].'-'.$mifecha[0];\r\n\t\t }\r\n}", "title": "" }, { "docid": "282b0d54006ee99930185c8f07515b77", "score": "0.6207442", "text": "function convertDateToFrench($dateMysql)\n{\n$unix = strtotime($dateMysql);\n$frenchDate = date(\"d-m-Y H:i:s\", $unix);\nreturn $frenchDate;\n}", "title": "" }, { "docid": "c1f435f5693294d141d8f2f06bce532a", "score": "0.6192268", "text": "function fecha_mysql($fecha)\n{\n ereg( \"([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})\", $fecha, $mifecha);\n $lafecha=$mifecha[3].\"-\".$mifecha[1].\"-\".$mifecha[2];\n return $lafecha;\n}", "title": "" }, { "docid": "876f2e6dc627c9861d95411ad4f29ec3", "score": "0.6161726", "text": "function verificarfecha($archivo,$sucursal){\r\n\t\r\n\t$result=manejadordb::consultar(\"SELECT * FROM tbl_envios where archivo='$archivo' and sucursal=$sucursal;\");\r\n\r\n\tif(mysql_num_rows($result)>0){\r\n\t\r\n\t$row=mysql_fetch_assoc($result);\r\n\t$this->fecha=$row['fecha_envio'];\r\n\t\r\n\t}else{\r\n\t$this->fecha=manejadordb::getfechamysql();\r\n\tmanejadordb::query(\"insert into tbl_envios (sucursal,archivo,fecha_envio)values($sucursal,'$archivo','\".$this->fecha.\"');\");\r\n\t}\r\n\t\r\n\treturn $this->fecha;\r\n\r\n\t}", "title": "" }, { "docid": "3c070435f49dea00bde360929ba28613", "score": "0.6132868", "text": "public function get_fecha_actual_amd(){\n //GUARDAR EN LA BASE DE DATOS EN ESTE CASO LA TABLA detalle_correspondencia\n //CAMPO fecha QUE ES DATETIME\n date_default_timezone_set('America/Bogota');\n $fecharegistro=date('Y-m-d'); //FORMA PARA XP\n //$fecharegistro = date('Y-m-d g:i');\n return $fecharegistro;\n }", "title": "" }, { "docid": "6715b2f16f320933a9f633862cec8eb6", "score": "0.61322236", "text": "function make_sql_date($date){\r\n\t\tif(is_null ($date)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(!is_int ($date)){\r\n\t\t\ttrigger_error (\"Invalid date ($date) passed to make_sql_date\", E_USER_ERROR);\r\n\t\t\treturn false;\r\n\t\t} return date (\"Y-m-d H:i:s\", $date);\r\n\t}", "title": "" }, { "docid": "8e6c99f49824b691605c72184116607a", "score": "0.6127659", "text": "function reformDatetoDB($date) {\r\n return (new DateTime($date))->format('Y-m-d');\r\n}", "title": "" }, { "docid": "a270ff736fb9765e6162858aa04f0e85", "score": "0.6106091", "text": "function fecha_comprobante(){\n\t\n global $conn,$odbc;\n\nif($odbc==\"odbc_mssql\"){\n\t$sql=\"select top(1) (convert(varchar,b.fec_ini,103)+' - '+ convert(varchar,b.fec_fin,103)) as FECHA \n from totales_pago a \n inner join periodos b on a.tip_pag=b.tip_per\n where b.ano='$this->ano'\n and b.cod_per='$this->per_ini' \n and b.tip_per='$this->tip_pag' \n and a.cod_epl = '$this->codigo'\";\n\n}elseif($odbc==\"oci8\"){\n \n $sql=\"\n select (TO_CHAR(b.fec_ini,'DD-MM-YYYY') ||' - '|| TO_CHAR(b.fec_fin,'DD-MM-YYYY')) as FECHA\nfrom totales_pago a, empleados_basic e, periodos b\nwhere a.cod_epl ='$this->codigo' and\na.cod_epl = e.cod_epl and\ne.tip_pago = b.tip_per and\na.ano_ini = b.ano and\na.per_ini = b.cod_per and\nb.ano = '$this->ano' and\nb.cod_per = '$this->per_ini'\";\n\n \n}\n\t \n\t $array=null;\n\t $rs=$conn->Execute($sql);\n\t if($rs){\n\t$fila=@$rs->FetchRow();\n\t\n\t\n\t $array=$fila[\"FECHA\"];\n\t\n\t\n\t}else{\n\t \n\t $array=null;\n\t}\n\treturn $array;\n }", "title": "" }, { "docid": "2f3cca802f9b34eb61b14d08d87ce785", "score": "0.609234", "text": "function sql_data($campo) {\n\treturn \"DATE_FORMAT(\" . $campo . \",'%d/%m/%Y')\";\n}", "title": "" }, { "docid": "7fff61c0a93df14f6771a77dc66040e2", "score": "0.6086286", "text": "function e3g_format_mysql_data( $miadata )\n{\n\tif ( $miadata == '' )\n\t\t$miadata = str_replace( \"/\", \"-\", date (\"d-m-y\") ); \n\n\t$pos1 = strpos( $miadata, '-' );\n\t$pos2 = strpos( $miadata, '-', $pos1 + 1 );\n\n\t$year = substr( $miadata, 0, $pos1 );\n\t$month = substr( $miadata, $pos1 + 1, $pos2 - $pos1 - 1 );\n\t$day = substr( $miadata, $pos2 + 1, strlen($miadata) - $pos2 - 1 );\n\n\treturn \"$day/$month/$year\";\n}", "title": "" }, { "docid": "a3df3e6dd030464d3c53bad237bae7dc", "score": "0.608165", "text": "public function mysqlSysDate()\n {\n return date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "9c08383108ea475efdbb613e6ef9d99f", "score": "0.6081256", "text": "function zbase_date_from_db($time)\r\n{\r\n\treturn zbase_date_from_format(DATE_FORMAT_DB, $time);\r\n}", "title": "" }, { "docid": "0fa90715dc9e9c24e5845e0ddbd4664d", "score": "0.6064116", "text": "public function get_fecha_actual(){\n //GUARDAR EN LA BASE DE DATOS EN ESTE CASO LA TABLA detalle_correspondencia\n //CAMPO fecha QUE ES DATETIME\n date_default_timezone_set('America/Bogota');\n $fecharegistro=date('Y-m-d g:ia'); //FORMA PARA XP\n //$fecharegistro = date('Y-m-d g:i');\n return $fecharegistro;\n }", "title": "" }, { "docid": "4a18fc7cb2bcf93357e1abfdfcaeeba8", "score": "0.6057111", "text": "function date_db($tanggal='')\n\t\t{\n\t\t\t$data = false;\n\t\t\tif($tanggal==''){\n\t\t\t\t$data = false;\n\t\t\t}else{\n\n\t\t\t\t$temp = array(\n\t\t\t\t\t'JANUARI' => '01',\n\t\t\t\t\t'FEBRUARI' => '02',\n\t\t\t\t\t'MARET' => '03',\n\t\t\t\t\t'APRIL' => '04',\n\t\t\t\t\t'MEI' => '05',\n\t\t\t\t\t'JUNI' => '06',\n\t\t\t\t\t'JULI' => '07',\n\t\t\t\t\t'AGUSTUS' => '08',\n\t\t\t\t\t'SEPTEMBER' => '09',\n\t\t\t\t\t'OKTOBER' => '10',\n\t\t\t\t\t'NOVEMBER' => '11',\n\t\t\t\t\t'DESEMBER' => '12',\n\t\t\t\t);\n\n\t\t\t\t$tgl = explode(' ', $tanggal);\n\t\t\t\t$tgl[1] = $temp[strtoupper($tgl[1])];\n\n\t\t\t\t$tgl = $tgl[1].'/'.$tgl[0].'/'.$tgl[2];\n\n\t\t\t\t$data = date('Y-m-d', strtotime($tgl));\n\t\t\t}\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "e74245045a88cfa0e82a008a0bb9c789", "score": "0.60546815", "text": "function hrm_date2mysql( $date, $gmt = 0 ) {\r\n if ( empty( $date ) ) {\r\n return;\r\n }\r\n\r\n $time = strtotime( $date );\r\n return ( $gmt ) ? gmdate( 'Y-m-d H:i:s', $time ) : gmdate( 'Y-m-d H:i:s', ( $time + ( get_option( 'timezone_string' ) * 3600 ) ) );\r\n}", "title": "" }, { "docid": "7b3ef0bc03e136f8b193438c59a76961", "score": "0.60495484", "text": "function time_php2sql($unixtime){\n return gmstrftime(\"%G-%m-%d %H:%M:%S\", $unixtime);\n}", "title": "" }, { "docid": "d938c10a0b4eed59375a5e6e132099c8", "score": "0.60345376", "text": "function mysql_date_format($dt=\"\"){\n $mysql_date=strftime(\"%Y-%m-%d\", $dt);\n return $mysql_date;\n}", "title": "" }, { "docid": "0dd5e6aa5766a78e8f76174dd0e054f9", "score": "0.60318077", "text": "function convertSearchDateForMySQL($date){\n\t$date = explode('/', $date); /*Split the string into an array with dd mm yyyy*/\n\treturn $newdate = $date[2] . '-' . $date[1] . '-' . $date[0]; /*Compose the string as yyyy-mm-dd format*/\n}", "title": "" }, { "docid": "898e244bc24d51fc56db7bcf6eacf1de", "score": "0.6023866", "text": "protected function toMysqlDate($date)\n {\n $birthday = explode('.', $date);\n return $birthday[2].'-'.$birthday[0].'-'.$birthday[1];\n }", "title": "" }, { "docid": "fafa8687ccbcefe338fed9048d9a7495", "score": "0.6019533", "text": "function sql_to_datetime($data) {\r\n $data = explode(\" \", $data);\r\n return implode(\"/\", array_reverse(explode(\"-\", $data[0]))) . \" \" . $data[1];\r\n}", "title": "" }, { "docid": "f73bed6bb9623154d9b7c217f473b5e9", "score": "0.60014147", "text": "function aw_date_to_mysql_string( $date ) {\n\tif ( $date = aw_normalize_date( $date ) ) {\n\t\treturn $date->to_mysql_string();\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "026886e93379fcb4a59a23acd4ec3c57", "score": "0.59976995", "text": "function changeDateFromPageToMySQLFormat($pagedate) {\n\tif ($pagedate == \"NULL\") {\n\t\treturn NULL;\n\t}\n\tif (isEmptyString($pagedate)) {\n\t\treturn NULL;\n\t} else {\n\t\treturn date(\"Y-m-d H:i:s\", strtotime($pagedate));\n\t}\n}", "title": "" }, { "docid": "14de92cc247e56f979313d6887bb723c", "score": "0.5989463", "text": "function condatosref($idhistorial, $lugar, $fechadatosfijos) {\r\n $con = new ConexionBD;\r\n if ($con->conectar() == true) {\r\n $query = \"select (date('$fechadatosfijos') - date (fecha_nacimiento)) as dias, id_sexo\r\nfrom mnt_dato_referencia shc\r\njoin mnt_expediente_referido mex on (mex.id = shc.id_expediente_referido)\r\njoin mnt_paciente_referido mpa on (mpa.id = mex.id_referido)\r\nwhere shc.id=$idhistorial\r\nand shc.id_establecimiento=$lugar\";\r\n //echo $query;\r\n $result = pg_query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3a6b5d6332e64401ac6ae9dfffa4bd58", "score": "0.5985976", "text": "function mysql_date_to_human($dt) \n {\n if ($dt==\"0000-00-00\") return \"\"; \n\n $yr=strval(substr($dt,0,4)); \n $mo=strval(substr($dt,4,2)); \n $da=strval(substr($dt,6,2)); \n\n return date(\"m/d/Y\", mktime (0,0,0,$mo,$da,$yr)); \n }", "title": "" }, { "docid": "aefa21ef15264bc2d34b63a047f3021c", "score": "0.597995", "text": "public static function toMysql($date): string\n\t{\n\t\tif(is_int($date))\n\t\t{\n\t\t\t$timestamp = $date;\n\t\t}\n\t\telse if($date instanceof \\DateTime)\n\t\t{\n\t\t\t$timestamp = $date->getTimestamp();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$timestamp = strtotime($date);\n\t\t}\n\n\t\treturn date(\"Y-m-d H:i:s\", $timestamp);\n\t}", "title": "" }, { "docid": "bdfedfa15203e162543255b230cc6ce6", "score": "0.5957923", "text": "static function JqueryDateFormatToMySQLDateFormat($jquery_date){\n try{\n $new_date = (string)$jquery_date;\n\n $new_date = $new_date.\"/\";\n\n $mm = strtok($new_date,\"/\");\n $dd = strtok(\"/\");\n $yyyy = strtok(\"/\"); \n }\n catch(Exception $ex){\n throw $ex->getMessage();\n }\n return $yyyy.\"-\".$mm.\"-\".$dd;\n }", "title": "" }, { "docid": "067349481e9349236a87738b996fb25a", "score": "0.5921059", "text": "static function GetCurrentDateTimeMySQLFormat(){\n try{\n return idate(Y).\"-\".idate(m).\"-\".idate(d).\" \".idate(H).\":\".idate(i).\":\".idate(s);\n }\n catch(Exception $ex){\n throw $ex->getMessage();\n }\n }", "title": "" }, { "docid": "c87be61310a36dba06770b26c26d32c0", "score": "0.59035665", "text": "function getEncuestasFecha()//$fecha\n\t{\n\t\t//var_dump($fecha);\n\t\treturn $this->db->encuesta->find();\n\t}", "title": "" }, { "docid": "4a1905881fd8e9b84dceca088d8d9dfd", "score": "0.5901223", "text": "public function dbToDate($date) \n\t{\n\t\treturn preg_replace('/(\\d{2,4})-(\\d{1,2})-(\\d{1,2})/', '\\\\2/\\\\3/\\\\1', $date);\n\t}", "title": "" }, { "docid": "b7f387b013cb1e1088e4a12c617de998", "score": "0.58958036", "text": "public static function sqlToDate($date)\r\n\t{\r\n\t\tif($date != \"\" && $date != NULL && $date != 0)\r\n\t\t\treturn substr($date,8,2) . \"/\" . substr($date,5,2) . \"/\" . substr($date,0,4);\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "f22002afc7302a5b50795b05527c4fc2", "score": "0.5895675", "text": "function getMySQLUTC()\n\t{\n\t\treturn gmdate('Y-m-d', $this->time);\n\t}", "title": "" }, { "docid": "cff3120132ae9a6bf7032e7f4728637b", "score": "0.58644146", "text": "function convertDBToDate($dt)\n\t{\n\t\tif (empty($dt)) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\t$tgl = explode('-', $dt);\n\t\t\t$tanggal = $tgl[2].'/'.$tgl[1].'/'.$tgl[0];\n\t\t\treturn $tanggal;\n\t\t}\n\t}", "title": "" }, { "docid": "48e8edf768f190ac6616923d57bc1977", "score": "0.58594584", "text": "function cambiaf_a_mysql($fecha){\r\n ereg( \"([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})\", $fecha, $mifecha);\r\n $lafecha=$mifecha[3].\"-\".$mifecha[2].\"-\".$mifecha[1];\r\n return $lafecha;\r\n}", "title": "" }, { "docid": "dd4214defc3a80b7bb22d362746a6179", "score": "0.5857617", "text": "function convert_date ($sql_date, $mode = '0', $days = 0)\n{\n\tglobal $config, $lang;\n\tif (($sql_date == '0000-00-00') && ($mode != 'int' && $mode != 'unix')) return 'Invalid Date';\n\tif (($sql_date == '0000-00-00') && ($mode == 'int' || $mode == 'unix')) return false;\n\tif (empty ($sql_date)) return false;\n\tif (($sql_date == 'today') || ($sql_date == 'now')) $sql_date = date ('Y-m-d');\n\t$thn = substr($sql_date, 0, 4);\n\t$bln = substr($sql_date, 5, 2);\n\t$tgl = substr($sql_date, 8, 2);\n\t$tglbener = mktime(0, 0, 0, $bln, $tgl, $thn);\n\tif (!checkdate ($bln, $tgl, $thn)) return false;\n\tif ($days != 0) { $tglbener = $tglbener + ($days * 24 * 3600); }\n\n\tswitch ((string) $mode)\n\t{\n\t\tcase '0':\n\t\tcase 'short':\n\t\t $tanggal = date ($lang['l_short_date_format'], $tglbener);\n\t\tbreak;\n\n\t\tcase '1':\n\t\tcase 'long':\n\t\t $tanggal = date ($lang['l_long_date_format'], $tglbener);\n\t\tbreak;\n\n\t\tcase '2':\n\t\tcase 'mini':\n\t\t $tanggal = date ('d/m', $tglbener);\n\t\tbreak;\n\n\t\tcase '3':\n\t\tcase 'form':\n\t\t $tanggal = date ($lang['l_form_date_format'], $tglbener);\n\t\tbreak;\n\n\t\tcase 'sql':\n\t\t $tanggal = date ('Y-m-d', $tglbener);\n\t\t return $tanggal;\n\t\tbreak;\n\n\t\tcase 'int':\n\t\tcase 'unix':\n\t\t return $tglbener;\n\t\tbreak;\n\n\t\tdefault:\n\t\t $tanggal = date ($mode, $tglbener);\n\t\tbreak;\n\t}\n\n\t// translate (if configured)\n\tif ($config['multi_lang'])\n\t{\n\t\t$search = array_keys ($lang['datetime']);\n\t\t$replace = array_values ($lang['datetime']);\n\t\treturn strtr ($tanggal, array_combine ($search, $replace));\n\t\t// return str_replace ($search, $replace, $tanggal);\n\t}\n\telse\n\t{\n\t\treturn $tanggal;\n\t}\n\n}", "title": "" }, { "docid": "ae03a9a6256e6c1ad3589fa80db39cd8", "score": "0.5837236", "text": "public static function mysqlDate($datetime) {\r\n global $Debug;\r\n if(empty($datetime)){\r\n return false;\r\n }else{\r\n $datetime = self::convertToDateTime($datetime);\r\n return $datetime->format('Y-m-d');\r\n }\r\n }", "title": "" }, { "docid": "c557cdf160eda91d52b2abdf65b76cc9", "score": "0.58321786", "text": "function DBDate($input)\r\n {\r\n return($input);\r\n }", "title": "" }, { "docid": "03dd1559bcfc2857d5f7efa2fde48f0a", "score": "0.58300364", "text": "public function newUtcMysqlDateString() {\n return self::dateTimeToMysqlDateString(self::newUtcDateTime());\n }", "title": "" }, { "docid": "b5ba582a6658e76718ebb6a4ed4e8cd2", "score": "0.58288205", "text": "function cargo_dt () {\n\n\t$car_dt = new DBRecord (\"eclesiastico\",$_SESSION[\"rol\"],\"rol\");\n\t\tif ($car_dt->pastor()>\"0000-00-00\") {\n\t\t\t$cargo_dt = $car_dt->pastor();\n\t\t}elseif ($car_dt->evangelista()>\"0000-00-00\") {\n\t\t\t$cargo_dt = $car_dt->evangelista();\n\t\t}elseif ($car_dt->presbitero()>\"0000-00-00\") {\n\t\t\t$cargo_dt = $car_dt->presbitero();\n\t\t}elseif ($car_dt->diaconato()>\"0000-00-00\") {\n\t\t\t$cargo_dt = $car_dt->diaconato();\n\t\t}elseif ($car_dt->auxiliar()>\"0000-00-00\") {\n\t\t\t$cargo_dt = $car_dt->auxiliar();\n\t\t}elseif ($car_dt->dat_aclam()<>\"0000-00-00\") {\n\t\t\t\t$cargo_dt = $car_dt->dat_aclam();\n\t\t\t}\n\treturn $cargo_dt;\n}", "title": "" }, { "docid": "154f030101d350fd6b740e0e04d6f638", "score": "0.58168787", "text": "function pasintludtago($tago,$monato,$jaro) {\n\t$t = mktime(12,00,00,$monato,$tago-1,$jaro);\n\t$query = \"select * from sam_vortoj where tago='\".date('d',$t).\"' and monato='\".date('m',$t).\"' and jaro='\".date('Y',$t).\"'\";\n\tmysql_select_db(\"sam\");\n\t$result = mysql_query($query) or die (\"INSERT : Invalid query :\".$query);\n\tif (mysql_num_rows($result)!=0) {\n\t\treturn $t;\n\t} else {\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "a3a776d89aa3e9df51b41caa9006470b", "score": "0.58042955", "text": "public function changeDateToSql($date){\n $date = str_replace('/', '-', $date);\n return date('Y-m-d', strtotime($date));\n }", "title": "" }, { "docid": "c5879b0850287b7c02775e97061d26b9", "score": "0.5794558", "text": "function db_null_date() {\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "34bbe3ff1896c287533f841b9518274c", "score": "0.5790814", "text": "function datetime_db($dateUI)\n{\n if(strlen($dateUI) > 11) {\n $dateUI = explode(' ', $dateUI);\n $date = $dateUI[0];\n $time = $dateUI[1];\n\n $data = explode('/', $date);\n $dia = explode(':', $time);\n\n return $data[2].'-'.$data[1].'-'.$data[0].' '.$dia[0].':'.$dia[1].':'.$dia[2];\n } else {\n $date = explode('/', $dateUI);\n return $date[2].'-'.$data[1].'-'.$data[0];\n }\n}", "title": "" }, { "docid": "194bcd6746a157697e75cbada92d879d", "score": "0.5783959", "text": "function mysql_convert_date($d)\n\t{\n\t\tif (!preg_match(\"/^[0-3]?[0-9]\\.[0-1]?[0-9].[0-2][0-9]{3}$/u\", $d))\n\t\t\treturn null;\n\t\telse\n\t\t\treturn preg_replace(\"/^([0-3]?[0-9])\\.([0-1]?[0-9]).([0-2][0-9]{3})$/u\",\"\\\\3-\\\\2-\\\\1\", $d);\n\t}", "title": "" }, { "docid": "6a87dc1480b53ba5175a2196052627c9", "score": "0.5770995", "text": "function timestamp_para_mysql_datetime($ts) {\r\n\t$d=getdate($ts);\r\n\t$yr=$d[\"year\"];\r\n\t$mo=$d[\"mon\"];\r\n\t$da=$d[\"mday\"];\r\n\t$hr=$d[\"hours\"];\r\n\t$mi=$d[\"minutes\"];\r\n\t$se=$d[\"seconds\"];\r\n\treturn sprintf(\"%04d-%02d-%02d %02d:%02d:%02d\",$yr,$mo,$da,$hr,$mi,$se);\r\n}", "title": "" }, { "docid": "dc8202219a49bc5779c866e849471d2d", "score": "0.57622176", "text": "function converteDataTimeFromMysql($data)\n{\n\tif(strlen($data)==19)\n\t\t$dataF = substr($data,8,2).\"/\".substr($data,5,2).\"/\".substr($data,0,4).\" às \".substr($data, 11,8);\n\telse\n\t\t$dataF = false;\n\treturn $dataF;\n}", "title": "" }, { "docid": "f560812e6536fbb53ea492a2ba8993ab", "score": "0.5761256", "text": "function datetimeMYSQtoFH($dato){\n\t//\tprint_r($dato);\n\t\tlist($fecha, $hora)=explode(\" \",$dato);\n\t\tlist($anio,$mes, $dia)=explode(\"-\",$fecha);\n\t\t$devuelve[fecha] = $dia .\"/\".$mes .\"/\".$anio;\n\t\t$devuelve[hora] = $hora;\n\t\treturn($devuelve);\n\t}", "title": "" }, { "docid": "243569e6bc4084453539da085aadfa68", "score": "0.5760572", "text": "function convert_date_to_unix($thisdate)\n {\n $date_in_unix=exec_query(\"SELECT UNIX_TIMESTAMP('$thisdate') as dateinunix\",1);\n return $date_in_unix[dateinunix];\n }", "title": "" }, { "docid": "ded430dd651efcf6b61c2c3110b0d690", "score": "0.57498956", "text": "function toDBDate($date){ \n $data = explode('/',$date);\n $value = '';\n $lenght = count($data)-1;\n if (!empty($data)) { \n for($i=$lenght;$i>=0;$i--) { \n if($i != 0){\n $value .= $data[$i].'-';\n } else {\n $value .= $data[$i];\n }\n }\n } \n return $value;\n }", "title": "" }, { "docid": "07a145585c45865e5f38daec59706bcc", "score": "0.57461643", "text": "function mostrar_fecha($fecha_sql, $tipof=1, $sinUTC=false) {\n $marca = sacar_fecha_sql($fecha_sql, $sinUTC);\n $dias = array(\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sabado\");\n $meses = array(\"\",\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n $hora=date(\"h\",$marca);\n $minutos=date(\"i\",$marca);\n $segundos=date(\"s\",$marca);\n $mes=date(\"m\",$marca);\n $mes_nombre=$meses[intval(date(\"m\",$marca))];\n $dia=date(\"d\",$marca);\n $dia_nombre=$dias[intval(date(\"w\",$marca))];\n $ano=date(\"Y\",$marca);\n $pm=date(\"A\",$marca);\n $mismodia = $dia==date(\"d\");\n $mismomes = $mes==date(\"m\");\n $mismoano = $ano==date(\"Y\");\n if ($tipof==1) return $dia_nombre.\" \".$dia.\" de \".$mes_nombre;\t\t\t\t\t\t\t\t// Lunes 12 de Enero\n if ($tipof==2) return $dia.\"/\".$mes_nombre.\"/\".$ano;\t\t\t\t\t\t\t\t\t\t// 12/Enero/2010\n if ($tipof==3) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Enero 12[, 2010]\n if ($mismoano) return $mes_nombre.\" \".$dia;\n else return $mes_nombre.\" \".$dia.\", \".$ano;\n }\n if ($tipof==4) return $dia.\"/\".$mes_nombre.\"/\".$ano.\" \".$hora.\":\".$minutos.\" \".$pm;\t\t\t// 12/Enero/2010 01:45 PM\n if ($tipof==5) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Ene 12[, 2010]\n if ($mismoano) return substr($mes_nombre,0,3).\" \".$dia;\n else return substr($mes_nombre,0,3).\" \".$dia.\", \".$ano;\n }\n if ($tipof==6) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// [Ene 12, ][2010 ]01:45 PM\n $temp = \"\";\n if (!$mismodia) $temp .= substr($mes_nombre,0,3).\" \".$dia.\", \";\n if (!$mismoano) $temp .= $ano.\" \";\n $temp .= $hora.\":\".$minutos.\" \".$pm;\n return $temp;\n }\n if ($tipof==7) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 01:45 PM\n return $hora.\":\".$minutos.\" \".$pm;\n }\n if ($tipof==8) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Dom 01:45 PM\n return substr($dia_nombre,0,3).\" \".$hora.\":\".$minutos.\" \".$pm;\n }\n if ($tipof==9) return $dia.\" de \".$mes_nombre.\" \".$ano; // 12 de Enero 2010\n if ($tipof==10) return $dia.\" de \".$mes_nombre.\" \".$ano.\" \".$hora.\":\".$minutos.\" \".$pm;\n}", "title": "" }, { "docid": "55b3f3398e36773e9fbcd269690b3ced", "score": "0.5736608", "text": "function converteDataHoraFromMysql($dataHora)\n{\n\tif(strlen($dataHora)!=10)\n\t\t$dataF = substr($dataHora,8,2) . \"/\" .substr($dataHora,5,2) . \"/\" . substr($dataHora,0,4) .\" \". substr($dataHora,11,8);\n\telse\n\t\t$dataF = false;\n\tif($dataF==\"// \") $dataF=\"\";\n\treturn $dataF;\n}", "title": "" }, { "docid": "2fc190c49c7ceadae6ec2db717b0c418", "score": "0.57316273", "text": "function ObtenerFechaResultado($idsolicitud, $idarea, $lugar) {\r\n $con = new ConexionBD;\r\n if ($con->conectar() == true) {\r\n $query = \"SELECT DATE_FORMAT(FechaHoraReg,'%d/%m/%Y %H:%i:%s') AS FechaResultado\r\n\t\t\t\tFROM lab_resultados where IdSolicitudEstudio=$idsolicitud AND IdEstablecimiento=$lugar\r\n\t\t\t\tAND IdExamen like '$idarea%'\";\r\n $result = @pg_query($query);\r\n if (!$result)\r\n return false;\r\n else\r\n return $result;\r\n }\r\n }", "title": "" }, { "docid": "bd171462ed8b04857aeedf9036c47819", "score": "0.5717688", "text": "function pp_date_to_db( $date ) {\n\t$ftime = strptime( $date, '%H:%M:%S %b %d, %Y %Z' ); #09:02:47 Apr 05, 2007 PDT\n\tif ( $ftime ) {\n\t\t$unxTimestamp = mktime( $ftime['tm_hour'], $ftime['tm_min'], $ftime['tm_sec'], 1, $ftime['tm_yday'] + 1, $ftime['tm_year'] + 1900 );\n\t\treturn date( 'c', $unxTimestamp );\n\t}\n\treturn $date;\n}", "title": "" }, { "docid": "6744cd603d303d09b4b65a9649d116f8", "score": "0.5716758", "text": "function fk_convert_to_timestamp($fecha){\r\n\r\n\t//defino fecha 1\r\n\t$fecha_xpl = explode(' ',$fecha);\r\n\t$fecha_tmp = $fecha_xpl[0];\r\n\t$hora_tmp = $fecha_xpl[1];\r\n\t$fecha_1 = explode('-',$fecha_tmp);\r\n\t$hora_1 = explode(':',$hora_tmp);\r\n\t$ano1 = $fecha_1[0];\r\n\t$mes1 = $fecha_1[1];\r\n\t$dia1 = $fecha_1[2];\r\n\t$hor1 = $hora_1[0];\r\n\t$min1 = $hora_1[1];\r\n\t$sec1 = $hora_1[2];\r\n\r\n\t$timestamp = mktime($hor1,$min1,$sec1,$mes1,$dia1,$ano1);\r\n\r\n\treturn $timestamp;\r\n\r\n}", "title": "" }, { "docid": "352f2f0cc447c3b16c68a47b8eee83df", "score": "0.5710366", "text": "public function formatSchedulingDateAsMySQLDateOnly() {\n\n $datetime = DateTimeHelper::convertUnixTimestampToDatetime($this->getRelevantDate());\n\n return $datetime->format(DateTimeHelper::$formatMYSQLDateOnly);\n }", "title": "" }, { "docid": "4ae5a59123619baab323d24d51b9b3cc", "score": "0.5700073", "text": "function venontludtago($tago,$monato,$jaro) {\n\t$t = mktime(12,00,00,$monato,$tago+1,$jaro);\n\t$query = \"select * from sam_vortoj where tago='\".date('d',$t).\"' and monato='\".date('m',$t).\"' and jaro='\".date('Y',$t).\"'\";\n\tmysql_select_db(\"sam\");\n\t$result = mysql_query($query) or die (\"INSERT : Invalid query :\".$query);\n\t// affiche le jour prochain s'il y a des propositions de faites et que ce n'est pas aujourd'hui\n\tif (mysql_num_rows($result)!=0) {\n\t\treturn $t;\n\t} else {\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "c18dda09bf4ac342b2ed90820d5241d6", "score": "0.56923383", "text": "function get_info_commt_date($date){\n\tglobal $bd;\n\t$table = 'commentaires';\n\t\n\t$req = \"SELECT * FROM $table WHERE date = '$date'\";\n\t$fait = readData($db, $q);\n\t\n\treturn ($fait);\n}", "title": "" }, { "docid": "ea59d7e3deb9400f810c2a205eb7f35c", "score": "0.5689239", "text": "public function testFechas1(){\r\n\t\t// y convertirlo a integer\r\n\t\t$uno = strtotime('1985/02/09'); \r\n\t\t// var_dump( $uno );\r\n\t\t\r\n\t\t// obtener formato para mostrar\r\n\t\t$dos = date( \"d-m-Y\", $uno );\r\n\t\t\r\n\t\t$this->assertEquals( $dos , \"09-02-1985\", \"conversion time a string\" );\r\n\t\t\r\n\t\t// formato para sql\r\n\t\t$asql = date( \"Ymd\", $uno );\r\n\t\t$this->assertEquals( $asql , \"19850209\", \"converison time a string sql\" );\r\n\t\t\r\n\t\t// $this->assertEquals( 0, date_create_from_format(\"\",\"\"), \"date_create_from_format() vacio\" );\r\n\t\t\r\n\t\t// date_create_from_format \r\n\t}", "title": "" }, { "docid": "d6e596eef0dceaa01d78d471c34b83b7", "score": "0.5676761", "text": "static function dbDateNow() {\n return self::date(\"Y-m-d\");\n }", "title": "" }, { "docid": "99c94d4211b4222b76e0546c21f8685e", "score": "0.5675667", "text": "function changeDateFormatToDB($date){\r\n\t$date = preg_replace('#(\\d{2})/(\\d{2})/(\\d{4})#', '$3-$1-$2', $date);\r\n\treturn $date;\r\n}", "title": "" }, { "docid": "5df5bd57beed12137499152cf97536e1", "score": "0.56744134", "text": "function get_livre($id_livre)\r\n{\r\nglobal $db;\r\n$statement=$db->prepare(\"SELECT id,titre, auteur,resume,note,lu,DAY(date_ajout) AS jour, \r\nMONTH(date_ajout) AS mois, YEAR(date_ajout) AS annee,id_user,id_cat FROM sbk_book WHERE id= :id_livre\");\r\n$statement->bindParam(':id_livre', $id_livre, PDO::PARAM_INT);\r\n$statement->execute();\r\nreturn $statement;\r\n}", "title": "" }, { "docid": "8140501e13cc43a55b0d6506e4ce79d4", "score": "0.5666084", "text": "function uiToDb($uiDate){\n\n $dt = DateTime::createFromFormat('l d F Y', $uiDate);\n return $dbDate = $dt->format('Y-m-d');\n}", "title": "" }, { "docid": "81909516ef520715e476e6062e0d67b8", "score": "0.56623733", "text": "function SQLDate($fmt, $col=false) {\n\t\tif (!$col) {\n\t\t\t$col = $this->sysDate;\n\t\t}\n\t\treturn $col; // child class implement\n\t}", "title": "" }, { "docid": "f467f50bd7acc6bc1c816e4529112ab4", "score": "0.56621736", "text": "function guardarFecha($fecha,$id_periodo,$tipo) {\n\t\n\t\t$query1=\"\tINSERT INTO evaluacion (fecha_evaluacion,id_periodo,tipo_evaluacion) \n\t\t\t\t\tVALUES ('$fecha','$id_periodo','$tipo')\";\n\t\t\t\n\t\texecuteQuery($query1); // ejecuta la consulta para guardar el registro \n\t\t\t\n\t\t$query2 =\"\tSELECT MAX(id_evaluacion) as max FROM evaluacion \";\n\t\t$result = executeQuery($query2); // ejecuta la consulta para obtener el id del registro nuevo\n\t\t$row = mysqli_fetch_array($result);\n\n\t\treturn $row['max'];\n\t}", "title": "" }, { "docid": "d0531d115c94668a39e4bcc104c65063", "score": "0.5661345", "text": "function hentDato($link){\n\n $sql = \"SELECT CONVERT(varchar, Dato, 103) AS Dato FROM MailPurring ORDER BY ID DESC\";\n $stmt = sqlsrv_query($link, $sql);\n if( $stmt === false) {\n die( print_r( sqlsrv_errors(), true) );\n }\n $row_count = sqlsrv_num_fields( $stmt );\n if ($row_count === false)\n echo \"Error in retrieveing row count.\";\n else\n sqlsrv_fetch($stmt);\n $date = sqlsrv_get_field( $stmt, 0, SQLSRV_PHPTYPE_STRING(\"UTF-8\"));\n// $sistMailDato = trim($date->format('d-m-Y'));\nreturn $date;\n }", "title": "" }, { "docid": "5e933b33504c344e3f3a815d188708cd", "score": "0.5654028", "text": "function DateStringToDb($date){\r\n $tab = explode('-', $date);\r\n return $tab[0].$tab[1].$tab[2];\r\n}", "title": "" }, { "docid": "bdc2aea0845b7e812dbfced2e9b23bed", "score": "0.5650921", "text": "function dbdate($indate)\r\n{\r\n\t$outdate = substr($indate, 6, 4).'-'.substr($indate, 3, 2).'-'.substr($indate, 0, 2);\r\n\treturn($outdate);\r\n}", "title": "" }, { "docid": "39193df42b5b247810b60e83adf865d3", "score": "0.56443316", "text": "public function dateToDb($date)\n\t{\n\t\treturn preg_replace('/(\\d{1,2})\\/(\\d{1,2})\\/(\\d{2,4})/', '\\\\3-\\\\1-\\\\2', $date);\n\t}", "title": "" }, { "docid": "70f0b202a0bbcfacb7697a285b1d5f31", "score": "0.5643908", "text": "function obten_fechahora() {//Función que devuelve la fecha y hora\n\t$fecha = date('Y-m-d H:i:s');\n\treturn $fecha;\n}", "title": "" }, { "docid": "25222b81772dd6f7ed59658a82c9d2ee", "score": "0.56375104", "text": "function TimestampMySQLRetornar($DATA)\n{\n\t\n\t$ANO = 0000;\n\t$MES = 00;\n\t$DIA = 00;\n\t$HORA = \"00:00:00\";\n\t$data_array = split(\"[- ]\",$DATA);\n\tif ($DATA <> \"\")\n\t{\n\t\t$ANO = $data_array[0];\n\t\t$MES = $data_array[1];\n\t\t$DIA = $data_array[2];\n\t\t$HORA = $data_array[3];\n\t\treturn $DIA.\"/\".$MES.\"/\".$ANO. \" - \" . $HORA;\n\t}\n\t\n\telse \n\t\n\t{\n \n\t\t$ANO = 0000;\n\t\t$MES = 00;\n\t\t$DIA = 00;\n\t\treturn $DIA.\"/\".$MES.\"/\".$ANO;\n\t\n\t}\n\n}", "title": "" }, { "docid": "5a4027d2479e408f69a207bc3cb5323f", "score": "0.56333536", "text": "function reactiepost(){\n print($_POST['inhoud']);\n print($_POST['reactienummer']);\n\n date_default_timezone_set('Europe/Amsterdam');\n $date = date('Y/m/d h:i:s a');\n\n $null = null;\n\n try{\n $conf = new PDO('mysql:host=localhost;dbname=portfolio;',\"root\");\n $Rsteer = $conf->prepare('INSERT INTO reacties (idReacties,inhoud,datum,Gebruikers_idGebruikers,Blog_idBlog) VALUES (null , :naam,:username,11,1)');\n $Rsteer->bindParam(':naam',$_POST['inhoud'] , PDO::PARAM_STR);\n $Rsteer->bindParam(':username',$date);\n\n $Rsteer->execute();\n\n $Rsteer->execute();\n\n\n }catch (PDOException $e){\n echo \"er klopt niks van\";\n die;\n }\n print($date);\n\n}", "title": "" }, { "docid": "41299cda70d99d8e046cd7ed4286fb6a", "score": "0.5632085", "text": "function format_date_fromdb($date) {\r\n // echo \"dob is $date\";\r\n $ds = explode('/', $date); // stored in db iso format YYYY-MM-DD (DD/MM/YYYY)\r\n // echo $ds[1].'-'.$ds[2].'-'.$ds[0];\r\n // echo \"<br> after: \".$ds[1].'/'.$ds[0].'/'.$ds[2];\r\n return $ds[1].'/'.$ds[0].'/'.$ds[2];\r\n}", "title": "" }, { "docid": "d8809fd8f582ca25819b0541ff7c44af", "score": "0.5630328", "text": "function pasintadmintago($tago,$monato,$jaro) {\n\t$t = mktime(12,00,00,$monato,$tago-1,$jaro);\n\t$query = \"select * from sam_vortoj where tago='\".date('d',$t).\"' and monato='\".date('m',$t).\"' and jaro='\".date('Y',$t).\"'\";\n\tmysql_select_db(\"sam\");\n\t$result = mysql_query($query) or die (\"INSERT : Invalid query :\".$query);\n\tif (mysql_num_rows($result)!=0) {\n\t\treturn $t;\n\t} else {\n\t\treturn null;\n\t}\t\n}", "title": "" } ]
87a7a515b867a82b43356b1f9e635192
get currenty payment status from gateway
[ { "docid": "3d8c310203f21f5473939d959f17b402", "score": "0.69547206", "text": "public function getPaymentStatus($parameters)\n\t{\n\t\t\n\t}", "title": "" } ]
[ { "docid": "d978863c976efa3c18cf1f21da80c7bf", "score": "0.7244372", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n \n // clear the session payment ID\n Session::forget('paypal_payment_id');\n \n if(Input::get('PayerID')==\"\" || Input::get('token')==\"\") {\n return Redirect::to('/hotel/payment/sms/history')\n ->with('error', 'Payment failed');\n }\n \n $payment = pay::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 your 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 if ($result->getState() == 'approved') { // payment made\n $name = $result->transactions[0]->item_list->items[0]->name;\n $plan = PlanSms::where('name', $name)->first();\n $user_id = Sentry::getUser()->id;\n\n $userpayment = new UserPaymentSms;\n $userpayment->sms = $plan->sms;\n $userpayment->user_id = $user_id;\n $userpayment->plan_id = $plan->id;\n $userpayment->price = $plan->price;\n $userpayment->save();\n\n return Redirect::to('/hotel/payment/sms/history')->with('success', 'Payment success');\n }\n return Redirect::to('/hotel/payment/sms/history')\n ->with('error', 'Payment failed');\n }", "title": "" }, { "docid": "83fed1c34f10ae03b744e7759a743471", "score": "0.68906564", "text": "public function getMerchantServiceStatus()\n {\n return $this->get(self::URL_ACTIVATE);\n }", "title": "" }, { "docid": "174e5728a4dea8a259c2833a01819f74", "score": "0.67930937", "text": "public function getPaymentStatus(Request $request)\n {\n //$payment_id = Session::get('paypal_payment_id');\n $payment_id= $request->paymentId;\n //return $payment_id;\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty($request->PayerID) || empty($request->token)) {\n \\Session::put('error','Payment failed');\n return Redirect::route('client.all');\n }\n $payment = Payment::get($payment_id, $this->_api_context);\n /** PaymentExecution object includes information necessary **/\n /** to execute a PayPal account payment. **/\n /** The payer_id is added to the request query parameters **/\n /** when the user is redirected from paypal back to your site **/\n $execution = new PaymentExecution();\n $execution->setPayerId($request->PayerID);\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n /** dd($result);exit; /** DEBUG RESULT, remove it later **/\n if ($result->getState() == 'approved') {\n\n /** 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 Redirect::route('client.home');\n }\n \\Session::put('error','Payment failed');\n\n\t\treturn Redirect::route('payment.process');\n }", "title": "" }, { "docid": "793b581eaebf258b26cb7e204a8d1317", "score": "0.6722118", "text": "static function ApiStatus(){\n return array(\"success\"=>\"1\");\n //return array(\"success\"=>\"0\",\"error_message\"=>Lang::get(\"messages.paymentGateWayDeactive\"));\n }", "title": "" }, { "docid": "cea90313a089c053335bd872ed2e9e44", "score": "0.6651999", "text": "function testPaymentStatus() {\n\t\t$init = $this->getDonorTestData( 'BR' );\n\t\t$session['Donor']['order_id'] = '123456789';\n\t\t$this->setUpRequest( $init, $session );\n\t\t$gateway = new TestingAstroPayAdapter();\n\n\t\t$gateway->do_transaction( 'PaymentStatus' );\n\n\t\t// from the test response\n\t\t$expected = [\n\t\t\t'result' => '9',\n\t\t\t'x_amount' => '100.00',\n\t\t\t'x_iduser' => '08feb2d12771bbcfeb86',\n\t\t\t'x_invoice' => '123456789',\n\t\t\t'PT' => '1',\n\t\t\t'x_control' => '0656B92DF44B814D48D84FED2F444CCA1E991A24A365FBEECCCA15B73CC08C2A',\n\t\t\t'x_document' => '987654321',\n\t\t\t'x_bank' => 'TE',\n\t\t\t'x_payment_type' => '03',\n\t\t\t'x_bank_name' => 'GNB',\n\t\t\t'x_currency' => 'BRL',\n\t\t];\n\t\t$results = $gateway->getTransactionData();\n\t\t$this->assertEquals( $expected, $results,\n\t\t\t'PaymentStatus response not interpreted correctly' );\n\t\t// Should not throw exception\n\t\t$gateway->verifyStatusSignature( $results );\n\t}", "title": "" }, { "docid": "c6f52717d4345d96d1032bc1fa44fc8e", "score": "0.6649736", "text": "function payment_active($payment)\n\t{\n\t\tif (!$payment) return FALSE;\n\t\t\n\t\t$CI\t=& get_instance();\n\t\t\n\t\t// Kiem tra payment da duoc cai dat hay chua\n\t\tif (!payment_installed($payment))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Kiem tra trang thai\n\t\t$status = $CI->payment_model->get_setting($payment, 'status');\n\t\tif ($status == config('status_off', 'main'))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "d4a7adcda3a064eb45d0c937b5bcb32b", "score": "0.66461176", "text": "public function getPaymentStatus(Request $request) {\n\t\t$payment_id = Session::get('paypal_payment_id');\n\n\t\t// clear the session payment ID\n\t\tSession::forget('paypal_payment_id');\n\n\t\tif (!empty($request->PayerID) || !empty($request->token)) {\n\t\t\treturn Redirect('/')\n\t\t\t\t->with('error', 'Payment failed');\n\t\t}\n\n\t\t$payment = Payment::get($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($request->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;\n\t\t//\n\t\t// // DEBUG RESULT, remove it later\n\n\t\tif ($result->getState() == 'approved') {\n\t\t\t// payment made\n\t\t\t$userCart = Sentinel::getUser()->cart;\n\t\t\t$total = 0;\n\t\t\tforeach ($userCart as $item) {\n\t\t\t\t$total += ($item->product->price) * ($item->amount);\n\t\t\t}\n\t\t\tif (Session::has('coupon')) {\n\t\t\t\t$total = $total - (($total * Session::get('coupon.discount')) / 100);\n\t\t\t}\n\t\t\t$order = Order::create([\n\t\t\t\t'user_id' => Sentinel::getUser()->id,\n\t\t\t\t'amount' => $total,\n\t\t\t\t'status' => 'Processing',\n\t\t\t\t'firstname' => Session::get('shipping.firstname'),\n\t\t\t\t'lastname' => Session::get('shipping.lastname'),\n\t\t\t\t'shipping_address' => Session::get('shipping.address'),\n\t\t\t\t'shipping_city' => Session::get('shipping.city'),\n\t\t\t\t'shipping_zipcode' => Session::get('shipping.zipcode'),\n\t\t\t\t'shipping_country' => Session::get('shipping.country'),\n\t\t\t\t'payment_method' => 'Paypal',\n\t\t\t\t'phone' => Session::get('shipping.phone'),\n\t\t\t\t'coupon_id' => Session::get('coupon.id'),\n\t\t\t]);\n\t\t\tSession::forget('coupon');\n\t\t\tforeach ($userCart as $item) {\n\t\t\t\tOrderProduct::create([\n\t\t\t\t\t'order_id' => $order->id,\n\t\t\t\t\t'product_id' => $item->product_id,\n\t\t\t\t\t'options' => $item->options,\n\t\t\t\t\t'amount' => $item->amount,\n\t\t\t\t]);\n\t\t\t\t$item->product->quantity -= $item->amount;\n\t\t\t\t$item->product->save();\n\t\t\t}\n\n\t\t\tSentinel::getUser()->cart()->delete();\n\n\t\t\tFlashAlert()->success('Success!', 'Paypal Payment success');\n\t\t\treturn Redirect('/dashboard');\n\t\t}\n\t\treturn Redirect()->back()\n\t\t\t->with('alert-error', 'Payment failed');\n\t}", "title": "" }, { "docid": "9d634bcb50863d3df9fb5b5df3c41640", "score": "0.6633554", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n // clear the session payment ID\n Session::forget('paypal_payment_id');\n\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n return Redirect::route('product.shoppingCart')\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 your 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 // DEBUG RESULT, remove it later\n\n if ($result->getState() == 'approved') { // payment made\n\n $data = json_decode($result, true);\n\n $product = $data['transactions'][0]['item_list']['items'];\n\n foreach ($product as $products) {\n $name = $products['name'];\n $price = $products['price'];\n $quantity = $products['quantity'];\n $seller = Products::where('product_name', $name)->select('seller_id', 'product_id', 'sell_type_id')->first();\n\n $payments = new paypal_transactions;\n $payments->transaction_id = $payment->getId();\n $payments->amount_paid = $price;\n $payments->paypal_email = $data['payer']['payer_info']['email'];\n $payments->buyer_id = session('user_id');\n $payments->seller_id = $seller->seller_id;\n $payments->product_id = $seller->product_id;\n $payments->mode_of_selling_id = $seller->sell_type_id;\n $payments->status = 'completed';\n $payments->quantity = $quantity;\n $payments->save();\n Session::forget('cart');\n }\n\n\n return Redirect::route('product.shoppingCart')\n ->with('success', 'Payment success. Your transaction Id is:' . $payment->getId());\n }\n\n return Redirect::route('product.shoppingCart')\n ->with('error', 'Payment failed');\n }", "title": "" }, { "docid": "bbfd86dd9098c1f8af117c78070bf676", "score": "0.65770555", "text": "function SwissPostApiGetPaymentStatus(Varien_Event_Observer $observer){\n $result = $observer->getData('result');\n $order_refs = $observer->getData('order_refs');\n if($result && $result->getValues()){\n $values = $result->getValues();\n foreach ($order_refs as $order_ref){\n foreach ($values as $status){\n if(stripos($status['order_ref'], $order_ref) !== false){ \n $order = Mage::helper('swisspostsales/Order')->__fromOrderRef($order_ref);\n if($order){\n Mage::helper('swisspostsales/Order')->processPaymentStatus($order, $status);\n // set final status\n if(Mage::helper('swisspostsales/Order')->isCompleted($order)){\n Mage::helper('swisspostsales/Order')->__toCompleted($order);\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "3b5e2d6589f4d3f2f58ed3f181ecdd10", "score": "0.6547094", "text": "public function payment_response()\n\t{\n\t\t$this->checkout_model->process_payment_status_in_general($_POST, $_GET);\n\t}", "title": "" }, { "docid": "8574d3b1faef1d1a4519ea71783a37a4", "score": "0.652754", "text": "public function checkTransactionStatus()\n {\n\n $paymentId = Session::get('paypalPaymentId');\n # We now erase the payment ID from the session to avoid fraud\n Session::forget('paypalPaymentId');\n $payment = Payment::get($paymentId, $this->apiContext);\n $execution = new PaymentExecution();\n $execution->setPayerId(request()->get('PayerID'));\n\n $result = $payment->execute($execution, $this->apiContext);\n\n\n $this->total_transaction = $result->transactions[0]->getAmount()->getTotal();\n $this->currency_transaction = $result->transactions[0]->getAmount()->getCurrency();\n $this->payer_email = $result->getPayer()->getPayerInfo()->getEmail();\n $this->payer_id = $result->getPayer()->getPayerInfo()->getPayerId();\n $this->payer_country_code = $result->getPayer()->getPayerInfo()->getCountryCode();\n $this->payment_id = $result->getId();\n\n\n return $result->getState() == 'approved';\n\n }", "title": "" }, { "docid": "f5f5c972dd828d43bcf5921c0a0a64e3", "score": "0.6513849", "text": "public static function response(){\n $response = PayUPayments::doAuthorizationAndCapture(parent::$cfg);\n if($response){\n print_r($response->transactionResponse->orderId);\n print_r($response->transactionResponse->transactionId);\n print_r($response->transactionResponse->state);\n if($response->transactionResponse->state==\"PENDING\"){\n $response->transactionResponse->pendingReason;\n $response->transactionResponse->extraParameters->URL_PAYMENT_RECEIPT_HTML;\n $response->transactionResponse->extraParameters->REFERENCE;\n }\n print_r($response->transactionResponse->responseCode);\n }\n}", "title": "" }, { "docid": "a0d1ff4695ec5893c128cb7d26f36886", "score": "0.6486018", "text": "public function getPaymentStatus(Request $request)\n {\n\t $payment_id = Session::get('paypal_payment_id');\n\t //dd($payment_id); // Genera el ID del proceso de pago.\n\t\t/** clear the session payment ID **/\n\t Session::forget('paypal_payment_id');\n\t if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\t\t\t\\Session::put('error', 'Pago fallido');\n\t return Redirect::route('trade.record.store');\n\t\t}\n\t\t$payment = Payment::get($payment_id, $this->_api_context);\n\t\t//dd($payment); // Arreglo con datos del usuario, monto y datos de la transacción.\n\t $execution = new PaymentExecution();\n\t $execution->setPayerId(Input::get('PayerID'));\n\t //dd($execution); // Genera el ID del proceso del pago realizado.\n\t\t/**Execute the payment **/\n\t $result = $payment->execute($execution, $this->_api_context);\n\t //dd($result); // Genera resultado del proceso y estado de aprovación de la transacción.\n\t\tif ($result->getState() == 'approved') {\n\t\t\t//\\Session::put('success', 'Su pago se realizó exitosamente!!!');\t\n\n\t\t\t$data = $result;\n\n\t\t\t$admp = new AdminCandidatePaymentController();\n\n\t\t\t$admp->store($data);\n\n\t return Redirect::route('addmoney.paywithpaypal');\n\t\t}\n\t\t\\Session::put('error', 'Pago fallido');\n\n\t\t\t$data = $result;\n\n\t\t\t$admp = new AdminCandidatePaymentController();\n\n\t\t\t$admp->store($data);\n\n\t return Redirect::route('addmoney.paywithpaypal');\n\t}", "title": "" }, { "docid": "f8fcfdc1ae4ef87f9ab35a5903bc7314", "score": "0.6470735", "text": "public function getEBayPaymentStatus()\n {\n return $this->eBayPaymentStatus;\n }", "title": "" }, { "docid": "3373e83bb4d8926e8cf8d650e5c943d1", "score": "0.64545095", "text": "function getPaymentStatusId(){\n\t\t$tr = $this->_statusTr;\n\t\treturn isset($tr[$this->getStatus()]) ? $tr[$this->getStatus()][\"payment_status_id\"] : null;\n\t}", "title": "" }, { "docid": "2324307af58e4f99f76cca68675b1d2e", "score": "0.6413594", "text": "public function getPaymentStatus(Request $request)\n \t{\n \t\tif(UserHelper::user_session_data('is_user_logged_in')){ \n\t\t \t// Get the payment ID before session clear\n\t\t \t$payment_id = Session::get('paypal_payment_id');\n\n\t\t\t// clear the session payment ID\n\t\t \tSession::forget('paypal_payment_id');\n\n\t\t\tif(empty($request->input('PayerID')) || empty($request->input('token'))){\n\t\t \t\treturn redirect()->route('home')->with('info', 'Payment failed');\n\t\t \t}\n\n\t\t\t$payment = Payment::get($payment_id, $this->_api_context);\n\t\t\t\n\t\t\t// PaymentExecution object includes information necessary\n\t\t \t// to execute a PayPal account payment.\n\t\t \t// The payer_id is added to the request query parameters\n\t\t \t// when the user is redirected from paypal back to your site\n\t\t \t$execution = new PaymentExecution();\n\t\t \t$execution->setPayerId($request->input('PayerID'));\n\n\t\t\t//Execute the payment\n\t\t \t$result = $payment->execute($execution, $this->_api_context);\n\t\t\tif ($result->getState() == 'approved') { // payment made\n\n\t\t\t\t$transactionToken = $result->getId();\n\t\t\t\t$sessionData = UserHelper::user_session_data('user_id'); \n\t\t\t\t$getSessionParams = UserHelper::checkout_session_data();\n\n\t\t\t\t$counter = 1;\n\t\t\t $all_user_name = '';\n\t\t\t $final_total_amount = '';\n\t\t\t\tforeach ($getSessionParams as $getSessionParam) {\n\t\t\t\t\t// fees calculation as per user memberships\n\t\t\t\t\t$totalFessPerUser = $getSessionParam['membershipFees'] + $getSessionParam['paidFees'];\n\t\t\t\t\t$lastPaymentDate = date('d-M-Y');\n\t\t\t\t\t// (1 = RS - Adult, 2 = RS - Concession, 4 = GA - Concession, 3 = GA - Adult)\n\t\t\t \t\t$memType = UserHelper::getMembershipTypes($getSessionParam['membershipType']);\n\n\t\t\t\t\tif($getSessionParam['select_membership'] == \"New\"){\n\n\t\t $userName = ucfirst($getSessionParam['firstName'].' '.$getSessionParam['lastName']);\n\t\t\t\t\t\t// $rand_string = UserHelper::quickRandom(9);\n\t // create user\n \t\t\t\t// $insertedId = $this->commonModel->addRecord(USER, array('userName' => $userName, 'email' => $getSessionParam['profileEmail'], 'password' => bcrypt($rand_string), 'emailConfirmed' => 1));\n \t\t\t\t$memberNumber = UserHelper::generateMemberNo($getSessionParam['prefix']);\n\n \t\t\t\t$dateofBirth = UserHelper::changeDateFormat($getSessionParam['dateofBirth']);\n\t\t\t\t\t\t// get profile data from session\n\t\t\t\t\t\t$profileData = array(\n\t\t 'memberNumber' => $memberNumber,\n\t\t 'firstName' => $getSessionParam['firstName'],\n\t\t 'lastName' => $getSessionParam['lastName'],\n\t\t 'dateofBirth' => $dateofBirth,\n\t\t 'contactNumber' => $getSessionParam['contactNumber'],\n\t\t 'state' => $getSessionParam['state'],\n\t\t 'suburb' => $getSessionParam['suburb'],\n\t\t 'country' => $getSessionParam['country'],\n\t\t 'postCode' => $getSessionParam['postCode'],\n\t\t 'yearFirstJoined' => $getSessionParam['yearFirstJoined'],\n\t\t 'profession' => $getSessionParam['profession'],\n\t\t 'addressLine1' => $getSessionParam['addressLine1'],\n\t\t 'addressLine2' => $getSessionParam['addressLine2'],\n\t\t 'membershipBuyerId' => $getSessionParam['membershipBuyerId'],\n\t\t 'profileEmail' => $getSessionParam['profileEmail'],\n\t\t 'idAttachment' => $getSessionParam['idAttachment'],\n\t\t 'paymentStatus' => 1\n\t\t );\n\t\t $insertId = $this->commonModel->addRecord(PROFILE, $profileData);\n\n\t\t // Email verification token\n\t\t\t \t/*$token = getToken(50);\n\t\t\t \tUser::where('id', $insertedId)->update(array('securityStamp'=>$token));\n\t\t\t \t$email = $getSessionParam['profileEmail'];\n\t\t\t \t$link = WEB_URL.EMAIL_VERIFICATION_FRONT_SLUG.$insertedId.'/'.base64_encode($rand_string).'/'.$token;\n\t\t\t \t$html = sprintf(EMAIL_VERIFICATION_MESSAGE_WITH_PASSWORD, $userName, $memberNumber, $rand_string, $link);\n\t\t\t \t// send email\n\t\t\t try{\n\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t $message->to($email)\n\t\t\t ->subject(EMAIL_VERIFICATION_SUBJECT)\n\t\t\t ->from(FROM_EMAIL)\n\t\t\t ->setBody($html, 'text/html');\n\t\t\t });\n\t\t\t } \n\t\t\t catch(\\Exception $e){\n\t\t\t return redirect('register')->with('message', trans('messages.unable_to_send_email'));\n\t\t\t }*/\n\t\t\t \n\t\t $getUserRecord = DB::table(PROFILE)->select('userId')->where(array('id' => $insertId))->get();\n\t\t if(!empty($getUserRecord)){\n\t\t\t if($getUserRecord[0]->userId == $sessionData['user_id']) {\n\t\t\t \tDB::table(USER)->where('id', $getUserRecord[0]->userId)->update(array('userName' => $userName));\n\t\t\t }\n\t\t\t }\n // image upload email \n\t\t if(!empty($getSessionParam['idAttachment'])){\n\t $email = ADMIN_EMAIL;\n\t $html = sprintf(IMAGE_UPLOAD_MESSAGE, $userName); \n\t try{\n\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t $message->to($email)\n\t ->subject(IMAGE_UPLOAD_SUBJECT)\n\t ->from(FROM_EMAIL)\n\t ->bcc(ADMIN_EMAIL)\n\t ->setBody($html, 'text/html');\n\t });\n\t } \n\t catch(\\Exception $e){\n\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t }\n\t }\n\n\t\t // p($getSessionParam); die;\t \n\t\t if($getSessionParam['membershipType']==1 || $getSessionParam['membershipType']==2 || $getSessionParam['membershipType']==7){\n\t\t \t// send Email \n\t\t \t$Bay = $getSessionParam['Bay'];\n\t\t \t$Row = $getSessionParam['Row'];\n\t\t\t \tif($Bay == 1){\n\t\t\t \t\t$BayType = \"Bay 1\";\n\t\t\t \t} else if ($Bay == 2) {\n\t\t\t \t\t$BayType = \"Bay 2\";\n\t\t\t \t} else if ($Bay == 3) {\n\t\t\t \t\t$BayType = \"Bay 3\";\n\t\t\t \t} else if ($Bay == 4) {\n\t\t\t \t\t$BayType = \"Bay 4\";\n\t\t\t \t} else if ($Bay == 5) {\n\t\t\t \t\t$BayType = \"Bay 5\";\n\t\t\t \t} else {\n\t\t\t \t\t$BayType = \"NA\";\n\t\t\t \t}\n\n\t\t\t \tif($Row){\n $RowType = $getSessionParam['Row'];\n } else {\n $RowType = \"NA\";\n }\n\n\t\t\t \t$user_name = UserHelper::get_name($insertId);\n\t\t \t$email = UserHelper::get_email($insertId);\n\t\t \t// $memberNumber = $getSessionParam['memberNumber'];\n\t\t $seatNumber = $getSessionParam['seatNumber'];\n\n\t \t// $single_user_name = $memType.' - '.$user_name.'<br>';\n\t \t$single_user_name = $memType.' - '.$user_name.'<br><p style=\"margin: 0px;\"><b>'.$BayType.'</b>, Row <b>'.$RowType.'</b>, Seat No. <b>'.$seatNumber.'</b></p>';\n\n\t\t\t\t\t $html = sprintf(MEMBERSHIP_MSG_RS_FULL, $user_name, $single_user_name, $totalFessPerUser, $lastPaymentDate);\n\t\t\t\t\t \n\t\t\t\t\t try{\n\t\t\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t\t\t $message->to($email)\n\t\t\t\t\t ->subject(MEMBERSHIP_SUBJECT_RS)\n\t\t\t\t\t ->from(FROM_EMAIL)\n\t\t\t\t\t ->bcc(ADMIN_EMAIL)\n\t\t\t\t\t ->setBody($html, 'text/html');\n\t\t\t\t\t });\n\n\t\t\t\t\t //Sending email to owner\n\t\t\t\t\t $get_profile_name = UserHelper::get_profile_name();\n \t// $html = sprintf(MEMBERSHIP_MSG_RS_FULL_OWNER, $get_profile_name, $user_name, $memberNumber, $memType, $BayType, $RowType, $seatNumber, $totalFessPerUser, $lastPaymentDate);\n \t// $all_user_name .= $counter.'. '.$memType.' - '.$user_name.'<br>';\n \t$all_user_name .= $counter.'. '.$memType.' - '.$user_name.'<br><p style=\"margin: 0px; padding-left: 15px;\"><b>'.$BayType.'</b>, Row <b>'.$RowType.'</b>, Seat No. <b>'.$seatNumber.'</b></p><br>';\n /*$email = UserHelper::get_profile_email();\n Mail::send(array(), array(), function ($message) use ($email, $html) {\n $message->to($email)\n ->subject(MEMBERSHIP_SUBJECT_RS)\n ->from(FROM_EMAIL)\n ->setBody($html, 'text/html');\n });*/\n\n\t\t\t\t\t // return redirect('home')->with('success', trans('messages.contact_us_mail'));\n\t\t\t\t\t } \n\t\t\t\t\t catch(\\Exception $e){\n\t\t\t\t\t \t// forget session key\n\t\t \t\t\t// Session::forget('checkout_session_data');\n\t\t\t\t\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t\t\t\t\t }\n\t\t } else {\n\t\t \t$user_name = UserHelper::get_name($insertId);\n\t\t \t$email = UserHelper::get_email($insertId);\n\t\t \t// $memberNumber = $getSessionParam['memberNumber'];\n\n\t\t \t$single_user_name = $memType.' - '.$user_name.'<br>';\n\t\t\t\t\t $html = sprintf(MEMBERSHIP_MSG_GA_FULL, $user_name, $single_user_name, $totalFessPerUser, $lastPaymentDate);\n\t\t\t\t\t \t\t \n\t\t\t\t\t try{\n\t\t\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t\t\t $message->to($email)\n\t\t\t\t\t ->subject(MEMBERSHIP_SUBJECT_GA)\n\t\t\t\t\t ->from(FROM_EMAIL)\n\t\t\t\t\t ->bcc(ADMIN_EMAIL)\n\t\t\t\t\t ->setBody($html, 'text/html');\n\t\t\t\t\t });\n\n\t\t\t\t\t //Sending email to owner\n $email = UserHelper::get_profile_email();\n $get_profile_name = UserHelper::get_profile_name();\n $all_user_name .= $counter.'. '.$memType.' - '.$user_name.'<br>';\n \t/*$html = sprintf(MEMBERSHIP_MSG_GA_FULL_OWNER, $get_profile_name, $user_name, $memType, $totalFessPerUser, $lastPaymentDate);\t\n Mail::send(array(), array(), function ($message) use ($email, $html) {\n $message->to($email)\n ->subject(MEMBERSHIP_SUBJECT_GA)\n ->from(FROM_EMAIL)\n ->setBody($html, 'text/html');\n });*/\n\t\t\t\t\t // return redirect('home')->with('success', trans('messages.contact_us_mail'));\n\t\t\t\t\t } \n\t\t\t\t\t catch(\\Exception $e){\n\t\t\t\t\t \t// forget session key\n\t\t \t\t\t// Session::forget('checkout_session_data');\n\t\t\t\t\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t\t\t\t\t }\n\t\t } \t\n\n\t\t\t \t// (1 = RS - Adult, 2 = RS - Concession, 4 = GA - Concession, 3 = GA - Adult)\n\t\t\t\t $user_comment = Session::get('user_comment');\n\t\t\t\t if($user_comment == \"null\"){\n\t\t\t\t \t$userComment = \"\";\n\t\t\t\t } else {\n\t\t\t\t \t$userComment = $user_comment;\n\t\t\t\t }\n\t \t$membershipData = array(\n\t\t\t\t 'membershipType' => $getSessionParam['membershipType'],\n\t\t\t\t 'startDate' => $getSessionParam['startDate'],\n\t\t\t\t 'endDate' => $getSessionParam['endDate'],\n\t\t\t\t 'membershipYear' => $getSessionParam['membershipYear'],\n\t\t\t\t \t'profileId' => $insertId,\n\t\t\t\t 'privacyAcknowledged' => $getSessionParam['privacyAcknowledged'],\n\t\t\t\t 'membershipStatus' => 'Active',\n\t\t\t\t 'comment' => $userComment\n\t\t\t\t );\n\t \t// add new membership\n\t\t \t$memberShipId = $this->commonModel->addRecord(MEMBERSHIP, $membershipData);\n\n\t\t if($getSessionParam['membershipType']==1 || $getSessionParam['membershipType']==2 || $getSessionParam['membershipType']==7){\n\t\t // seat allocation data\n\t\t $seatAlocationData = array(\n\t\t 'Bay' => $getSessionParam['Bay'],\n\t\t 'Row' => $getSessionParam['Row'],\n\t\t 'seatNumber' => $getSessionParam['seatNumber'],\n\t\t 'memberShipId' => $memberShipId,\n\t\t 'reserved' => 1,\n\t\t 'createdOn' => $getSessionParam['createdOn'],\n\t\t 'changedOn' => $getSessionParam['changedOn'],\n\t\t 'createdBy' => $getSessionParam['createdBy'],\n\t\t 'deleted' => $getSessionParam['deleted']\n\t\t );\n\n\t\t // check for inactive seats\n\t \t\t\t$checkForInactiveSeats = DB::table(SEAT_ALLOCATION)->where(array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'reserved' => 0, 'deleted' => 0))->count();\n\t \t\t\tif($checkForInactiveSeats){\n\t \t\t\t\t// update record\n\t \t\t\t\t$this->commonModel->updateRecords(SEAT_ALLOCATION, array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'memberShipId' =>$memberShipId, 'reserved' => 1, 'createdOn' => $getSessionParam['createdOn'], 'changedOn' => $getSessionParam['changedOn'],'createdBy' => $getSessionParam['createdBy'], 'deleted' => $getSessionParam['deleted']), array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'reserved' => 0, 'deleted' => 0));\n\t \t\t\t} else {\n\t\t\t \t// Seat Allocation\n\t\t\t $seatAllocationId = $this->commonModel->addRecord(SEAT_ALLOCATION, $seatAlocationData);\n\t\t\t }\n\t\t }\n\n\t\t if(empty($getSessionParam['Bay']) && empty($getSessionParam['Row']) && empty($getSessionParam['seatNumber'])){\n\t\t \t$BayNo = \"\";\n\t\t \t$RowNo = \"\";\n\t\t \t$seatNo = \"\";\n\t\t } else {\n\t\t \t$BayNo = $getSessionParam['Bay'];\n\t\t \t$RowNo = $getSessionParam['Row'];\n\t\t \t$seatNo = $getSessionParam['seatNumber'];\n\t\t }\n\t\t // insert record into membershipHistory table\n DB::table(HISTORY)->insertGetId(array('profileId' => $insertId, 'membershipId' => $memberShipId, 'membershipType' => $getSessionParam['membershipType'], 'bay' => $BayNo, 'row' => $RowNo, 'seatNumber' => $seatNo, 'membershipBuyerId' => $getSessionParam['membershipBuyerId'], 'yearFirstJoined' => $getSessionParam['yearFirstJoined'], 'createdDate' => date('Y-m-d H:i:s')));\n\n\t\t // $this->commonModel->updateRecords(PROFILE, array('paymentStatus' => 1), array('id' => $insertId));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// existing memebsership logic\n\t\t\t\t\t\t// update profileEmail\n\t\t\t\t\t\t$userName = ucfirst($getSessionParam['firstName'].' '.$getSessionParam['lastName']);\n\t\t\t\t\t\t$dateofBirth = UserHelper::changeDateFormat($getSessionParam['dateofBirth']);\n\t\t\t\t\t\tif(empty($getSessionParam['idAttachment'])){\n\t\t\t\t\t\t\t$this->commonModel->updateRecords(PROFILE, array('firstName' => $getSessionParam['firstName'], 'lastName' => $getSessionParam['lastName'], 'profileEmail' => $getSessionParam['profileEmail'], 'dateofBirth' => $dateofBirth, 'contactNumber' => $getSessionParam['contactNumber'], 'state' => $getSessionParam['state'], 'suburb' => $getSessionParam['suburb'], 'country' => $getSessionParam['country'], 'postCode' => $getSessionParam['postCode'], 'addressLine1' => $getSessionParam['addressLine1'], 'addressLine2' => $getSessionParam['addressLine2'], 'membershipBuyerId' => $getSessionParam['membershipBuyerId'], 'yearFirstJoined' => $getSessionParam['yearFirstJoined'], 'profession' => $getSessionParam['profession']), array('id' => $getSessionParam['profileId']));\t\t\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->commonModel->updateRecords(PROFILE, array('firstName' => $getSessionParam['firstName'], 'lastName' => $getSessionParam['lastName'], 'profileEmail' => $getSessionParam['profileEmail'], 'dateofBirth' => $dateofBirth, 'contactNumber' => $getSessionParam['contactNumber'], 'state' => $getSessionParam['state'], 'suburb' => $getSessionParam['suburb'], 'country' => $getSessionParam['country'], 'postCode' => $getSessionParam['postCode'], 'addressLine1' => $getSessionParam['addressLine1'], 'addressLine2' => $getSessionParam['addressLine2'], 'idAttachment' => $getSessionParam['idAttachment'], 'membershipBuyerId' => $getSessionParam['membershipBuyerId'], 'yearFirstJoined' => $getSessionParam['yearFirstJoined'], 'profession' => $getSessionParam['profession']), array('id' => $getSessionParam['profileId']));\n\n\t // image upload email \n\t\t\t if(!empty($getSessionParam['idAttachment'])){\n\t\t $email = ADMIN_EMAIL;\n\t\t $html = sprintf(IMAGE_UPLOAD_MESSAGE, $userName); \n\t\t try{\n\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t $message->to($email)\n\t\t ->subject(IMAGE_UPLOAD_SUBJECT)\n\t\t ->from(FROM_EMAIL)\n\t\t ->bcc(ADMIN_EMAIL)\n\t\t ->setBody($html, 'text/html');\n\t\t });\n\t\t } \n\t\t catch(\\Exception $e){\n\t\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t\t }\n\t\t }\t\t \n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$getUserRecord = DB::table(PROFILE)->select('userId', 'memberNumber')->where(array('id' => $getSessionParam['profileId']))->get();\n\t\t if(!empty($getUserRecord)){\n\t\t \t$getuserId = $getUserRecord[0]->userId;\n\t\t \t$isExistMIM = $getUserRecord[0]->memberNumber;\n\t\t \tSession::forget('getuserId', $getuserId);\n\t\t\t\t\t\t\tSession::put('getuserId', $getuserId);\n\t\t\t if($getUserRecord[0]->userId == $sessionData['user_id']) {\n\t\t\t \tif(empty($isExistMIM)){\n\t\t\t \t\t// $getFirstThree = substr($getUserRecord[0]->memberNumber,0, 3);\n\t\t\t \t\t$memberNumber = UserHelper::generateMemberNo('MIM');\n\t\t \t\t\tDB::table(PROFILE)->where('id', $getSessionParam['profileId'])->update(array('memberNumber' => $memberNumber, 'paymentStatus' => 1));\n\t\t\t \t}\n\t\t\t \tDB::table(USER)->where('id', $getUserRecord[0]->userId)->update(array('userName' => $userName));\n\t\t\t }\n\t\t\t }\n\t\t\t\t\t\t\n // (1 = RS - Adult, 2 = RS - Concession, 4 = GA - Concession, 3 = GA - Adult)\n\t\t\t\t\t\t$user_comment = Session::get('user_comment');\n\t\t\t\t if($user_comment == \"null\"){\n\t\t\t\t \t$userComment = \"\";\n\t\t\t\t } else {\n\t\t\t\t \t$userComment = $user_comment;\n\t\t\t\t }\n\n\t $checkRecordIsExist = DB::table(MEMBERSHIP)->where(array('profileId' => $getSessionParam['profileId']))->get();\n\t // $checkRecordIsExist = DB::table(MEMBERSHIP)->where(array('profileId' => $getSessionParam['profileId']))->whereYear('membershipYear', '=', $getSessionParam['membershipYear'])->get();\n\t\t\t\t\t\tif(!empty($checkRecordIsExist)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t \t$this->commonModel->updateRecords(MEMBERSHIP, array('membershipType' => $getSessionParam['membershipType'], 'membershipYear' => $getSessionParam['membershipYear'],'comment' => $userComment, 'startDate' => $getSessionParam['startDate'], 'endDate' => $getSessionParam['endDate'], 'membershipStatus' => 'Active'), array('profileId' => $getSessionParam['profileId']));\t \t\n\n\t\t\t\t\t\t \tif($getSessionParam['membershipType']==1 || $getSessionParam['membershipType']==2 || $getSessionParam['membershipType']==7){\n\n\t\t\t\t\t\t \t\t$checkMemberIsExist = DB::table(SEAT_ALLOCATION)->where(array('memberShipId' => $getSessionParam['memberShipId']))->count();\n\n\t\t\t\t\t\t \t\tif($checkMemberIsExist){\n\t\t \t\t\t// Seat Allocation update\n\t\t\t \t\t$this->commonModel->updateRecords(SEAT_ALLOCATION, array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'reserved' => 1, 'createdOn' => $getSessionParam['createdOn'], 'changedOn' => $getSessionParam['changedOn'],'createdBy' => $getSessionParam['createdBy'], 'deleted' => $getSessionParam['deleted']), array('memberShipId' => $getSessionParam['memberShipId']));\n\t\t\t\t\t\t \t\t} else {\n\t\t\t\t\t\t \t\t\t$this->commonModel->addRecord(SEAT_ALLOCATION, array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'memberShipId' => $getSessionParam['memberShipId'], 'reserved' => 1, 'createdOn' => $getSessionParam['createdOn'], 'changedOn' => $getSessionParam['changedOn'],'createdBy' => $getSessionParam['createdBy'], 'deleted' => $getSessionParam['deleted']));\n\t\t\t\t\t\t \t\t}\n\t\t\t } \n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add new membership\n\t \t\t$membershipData = array(\n\t\t\t\t 'membershipType' => $getSessionParam['membershipType'],\n\t\t\t\t 'startDate' => $getSessionParam['startDate'],\n\t\t\t\t 'endDate' => $getSessionParam['endDate'],\n\t\t\t\t 'membershipYear' => $getSessionParam['membershipYear'],\n\t\t\t\t \t'profileId' => $getSessionParam['profileId'],\n\t\t\t\t 'privacyAcknowledged' => $getSessionParam['privacyAcknowledged'],\n\t\t\t\t 'membershipStatus' => 'Active',\n\t\t\t\t 'comment' => $userComment\n\t\t\t\t );\t\n\n\t\t \t\t$memberShipId = $this->commonModel->addRecord(MEMBERSHIP, $membershipData);\n\n\t\t \t\tif($getSessionParam['membershipType']==1 || $getSessionParam['membershipType']==2 || $getSessionParam['membershipType']==7){\n\n\t\t \t\t\t// check for inactive seats\n\t\t \t\t\t$checkForInactiveSeats = DB::table(SEAT_ALLOCATION)->where(array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'reserved' => 0, 'deleted' => 0))->count();\n\n\t\t \t\t\tif($checkForInactiveSeats){\n\t\t \t\t\t\t// update record\n\t\t \t\t\t\t$this->commonModel->updateRecords(SEAT_ALLOCATION, array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'memberShipId' =>$memberShipId, 'reserved' => 1, 'createdOn' => $getSessionParam['createdOn'], 'changedOn' => $getSessionParam['changedOn'],'createdBy' => $getSessionParam['createdBy'], 'deleted' => $getSessionParam['deleted']), array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'reserved' => 0, 'deleted' => 0));\n\t\t \t\t\t} else {\n\t\t\t\t \t// Seat Allocation addRecord\n\t\t\t\t \t$this->commonModel->addRecord(SEAT_ALLOCATION, array('Bay' => $getSessionParam['Bay'], 'Row' => $getSessionParam['Row'], 'seatNumber' => $getSessionParam['seatNumber'], 'memberShipId' => $memberShipId, 'reserved' => 1, 'createdOn' => $getSessionParam['createdOn'], 'changedOn' => $getSessionParam['changedOn'],'createdBy' => $getSessionParam['createdBy'], 'deleted' => $getSessionParam['deleted']));\n\t\t\t \t}\t\t\t \t\n\t\t\t }\n\n\t\t\t\t\t\t}\n\n\t \tif($getSessionParam['membershipType']==1 || $getSessionParam['membershipType']==2 || $getSessionParam['membershipType']==7){\n\t\t \t// send Email \n\t\t \t$Bay = $getSessionParam['Bay'];\n\t\t \t$Row = $getSessionParam['Row'];\n\t\t\t \tif($Bay == 1){\n\t\t\t \t\t$BayType = \"Bay 1\";\n\t\t\t \t} else if ($Bay == 2) {\n\t\t\t \t\t$BayType = \"Bay 2\";\n\t\t\t \t} else if ($Bay == 3) {\n\t\t\t \t\t$BayType = \"Bay 3\";\n\t\t\t \t} else if ($Bay == 4) {\n\t\t\t \t\t$BayType = \"Bay 4\";\n\t\t\t \t} else if ($Bay == 5) {\n\t\t\t \t\t$BayType = \"Bay 5\";\n\t\t\t \t} else {\n\t\t\t \t\t$BayType = \"NA\";\n\t\t\t \t} \n\n\t\t\t \tif($Row){\n $RowType = $getSessionParam['Row'];\n } else {\n $RowType = \"NA\";\n }\n\n\t\t \t$user_name = UserHelper::get_name($getSessionParam['profileId']);\n $seatNumber = $getSessionParam['seatNumber'];\n // $memberNumber = $getSessionParam['memberNumber'];\n $email = UserHelper::get_email($getSessionParam['profileId']);\n\n // $single_user_name = $memType.' - '.$user_name.'<br>';\n $single_user_name = $memType.' - '.$user_name.'<br><p style=\"margin: 0px;\"><b>'.$BayType.'</b>, Row <b>'.$RowType.'</b>, Seat No. <b>'.$seatNumber.'</b></p>';\n\n\t\t\t\t\t $html = sprintf(MEMBERSHIP_MSG_EXIST_FULL, $user_name, $single_user_name, $totalFessPerUser, $lastPaymentDate);\n\n\t\t\t\t\t try{\n\t\t\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t\t\t $message->to($email)\n\t\t\t\t\t ->subject(MEMBERSHIP_SUBJECT_EXIST)\n\t\t\t\t\t ->from(FROM_EMAIL)\n\t\t\t\t\t ->bcc(ADMIN_EMAIL)\n\t\t\t\t\t ->setBody($html, 'text/html');\n\t\t\t\t\t });\n\n\t\t\t\t\t //Notify to owner \n\t\t\t\t \t$get_profile_name = UserHelper::get_profile_name();\n\t\t\t\t \t$email = UserHelper::get_profile_email();\n\t\t\t\t \t// $all_user_name .= $counter.'. '.$memType.' - '.$user_name.'<br>';\n\t\t\t\t \t$all_user_name .= $memType.' - '.$user_name.'<br><p style=\"margin: 0px; padding-left: 15px;\"><b>'.$BayType.'</b>, Row <b>'.$RowType.'</b>, Seat No. <b>'.$seatNumber.'</b></p><br>';\n\t\t\t\t\t \t\t/*$html = sprintf(MEMBERSHIP_MSG_EXIST_FULL_OWNER, $get_profile_name, $user_name, $memType, $BayType, $RowType, $seatNumber, $totalFessPerUser, $lastPaymentDate);\n if($getuserId != $sessionData['user_id']) {\n Mail::send(array(), array(), function ($message) use ($email, $html) {\n $message->to($email)\n ->subject(MEMBERSHIP_SUBJECT_EXIST)\n ->from(FROM_EMAIL)\n ->setBody($html, 'text/html');\n });\n }*/\n\t\t\t\t\t // return redirect('home')->with('success', trans('messages.contact_us_mail'));\n\t\t\t\t\t }\n\t\t\t\t\t catch(\\Exception $e){\n\t\t\t\t\t \t// forget session key\n\t\t \t\t\t// Session::forget('checkout_session_data');\n\t\t\t\t\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \t$user_name = UserHelper::get_name($getSessionParam['profileId']);\n\t\t\t\t\t \t$email = UserHelper::get_email($getSessionParam['profileId']);\n\n\t\t\t\t\t \t$single_user_name = $memType.' - '.$user_name.'<br>';\n\t\t\t\t\t $html = sprintf(MEMBERSHIP_MSG_GA_FULL, $user_name, $single_user_name, $totalFessPerUser, $lastPaymentDate);\t\n\t\t\t\t\t \n\t\t\t\t\t try{\n\t\t\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t\t\t $message->to($email)\n\t\t\t\t\t ->subject(MEMBERSHIP_SUBJECT_GA)\n\t\t\t\t\t ->from(FROM_EMAIL)\n\t\t\t\t\t ->bcc(ADMIN_EMAIL)\n\t\t\t\t\t ->setBody($html, 'text/html');\n\t\t\t\t\t });\n\n\t\t\t\t\t //Sending email to owner\n\t\t\t\t\t $get_profile_name = UserHelper::get_profile_name();\n\n\t\t\t\t\t $all_user_name .= $counter.'. '.$memType.' - '.$user_name.'<br>';\n\t\t\t\t\t \t/*$html = sprintf(MEMBERSHIP_MSG_GA_FULL_OWNER, $get_profile_name, $user_name, $memType, $totalFessPerUser, $lastPaymentDate); \n $email = UserHelper::get_profile_email();\n if($getuserId != $sessionData['user_id']) {\n\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t $message->to($email)\n\t ->subject(MEMBERSHIP_SUBJECT_GA)\n\t ->from(FROM_EMAIL)\n\t ->setBody($html, 'text/html');\n\t });\n\t }*/\n\t\t\t\t\t // return redirect('home')->with('success', trans('messages.contact_us_mail'));\n\t\t\t\t\t } \n\t\t\t\t\t catch(\\Exception $e){\n\t\t\t\t\t \t// forget session key\n\t\t \t\t\t// Session::forget('checkout_session_data');\n\t\t\t\t\t return redirect('home')->with('message', trans('messages.unable_to_send_email'));\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t // update profile paymentStatus to 1(payment Done)\n\t\t\t\t\t // $this->commonModel->updateRecords(PROFILE, array('paymentStatus' => 1), array('id' => $getSessionParam['profileId']));\n\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t // insert into transaction tables\n\t // $totalAmount = Session::get('totalAmount');\n\t $transData = array('transactionToken' => $transactionToken, 'paymentUserId' => $sessionData['user_id'], 'paymentProvider' => 'Paypal', 'amount' => $totalFessPerUser);\n\t // dd($transData);\n\t $insertData = $this->commonModel->addRecord(TRANS_HISTORY, $transData);\t \n \t$counter++;\n\t\t\t \t} \n\t\t\t \t// end for-each\n\n\t\t\t \t// $installmentFreq = $getFrequency;\n\t\t\t \t// $totalInstalments = $total_cycles_remaining;\n\t\t\t \t// $installmentRemainig = $cycles_remaining;\n\t\t\t \t// $installmentAmount = Session::get('setupFess');\n\t\t\t \t// $paymentDeduction = $installmentAmount;\n\t\t\t \t$get_profile_name = UserHelper::get_profile_name();\n\t\t\t \t$totalAmount = Session::get('totalAmount');\n\t\t\t \t$email = UserHelper::get_profile_email();\n\n\t\t\t \t$html = sprintf(FINAL_FULL_OWNER_MESSAGE, $get_profile_name, $all_user_name, $totalAmount, $lastPaymentDate);\n\n\t\t\t \tif($getSessionParam['select_membership'] == \"New\"){\n\t\t\t \t\tMail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t $message->to($email)\n\t\t ->subject(FINAL_OWNER_SUBJECT)\n\t\t ->from(FROM_EMAIL)\n\t\t ->bcc(ADMIN_EMAIL)\n\t\t ->setBody($html, 'text/html');\n\t\t });\n\t\t\t \t} else {\n\t\t\t \t\t$getUserID = Session::get('getuserId');\n\t\t if($getUserID != $sessionData['user_id']) {\n\t\t\t Mail::send(array(), array(), function ($message) use ($email, $html) {\n\t\t\t $message->to($email)\n\t\t\t ->subject(FINAL_OWNER_SUBJECT)\n\t\t\t ->from(FROM_EMAIL)\n\t\t\t ->bcc(ADMIN_EMAIL)\n\t\t\t ->setBody($html, 'text/html');\n\t\t\t });\n\t\t\t }\n\t\t\t \t}\n\n\t\t\t \t// forget session key\n\t \tSession::forget('checkout_session_data');\n\t\t\t\treturn redirect('home')->with('success', trans('messages.payment_done'));\n\t\t \t} \n\t\t \t// return Redirect::route('home')\n\t\t \t\t// ->with('info', 'Payment failed');\n\t\t \t// }\n\t \t} else {\n\t \t\treturn redirect('/')->with('message', trans('messages.alert_session_expired'));\n\t \t}\t\t\n\t}", "title": "" }, { "docid": "7afca8fd766dd68bfe857bfae75e3535", "score": "0.63591284", "text": "public function payment() { return $this->payment; }", "title": "" }, { "docid": "a0589837beabd4879b7833f0d25cc0c5", "score": "0.63118964", "text": "public function getPaymentStatusInfo($status, $storeId = null);", "title": "" }, { "docid": "a0589837beabd4879b7833f0d25cc0c5", "score": "0.63118964", "text": "public function getPaymentStatusInfo($status, $storeId = null);", "title": "" }, { "docid": "29d45c1d5edc4f984788a565cdb878bd", "score": "0.6284892", "text": "public function checkPayment();", "title": "" }, { "docid": "bb7eaae2c310cf2cff9b8fc289fcc030", "score": "0.6255717", "text": "public function getStatus()\n {\n switch ($this->data['VK_SERVICE']) {\n case '5111':\n return 'confirmed';\n case '5112':\n //return 'manual';\n return false;\n case '5113':\n return 'rejected';\n default:\n return false;\n }\n }", "title": "" }, { "docid": "f090a2bda03fe5623d2bd02e2ace2453", "score": "0.6254621", "text": "public function paymentInfoAction() {\n\n if (!Engine_Api::_()->core()->hasSubject('sitecrowdfunding_project')) {\n $this->respondWithError('no_record');\n } else {\n $project = Engine_Api::_()->core()->getSubject();\n $project_id = $project->project_id;\n }\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$this->_helper->requireAuth()->setAuthParams($project, $viewer, \"edit\")->isValid()) {\n $this->respondWithError('unauthorized', \"You don't have permission to configure payment method\");\n }\n\n $viewer_id = $viewer->getIdentity();\n if (empty($viewer_id)) {\n $this->respondWithError('unauthorized', \"You are logout user.\");\n }\n try {\n\n\n $stripeConnected = 0;\n //$paymentMethod = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.paymentmethod', 'paypal');\n $paymentToSiteadmin = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.payment.to.siteadmin', 0);\n $paymentMethod = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.payment.method', 'normal');\n if ($paymentMethod == 'split') {\n $enablePaymentGateway = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.allowed.payment.split.gateway', array());\n } elseif ($paymentMethod == 'escrow') {\n $enablePaymentGateway = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.allowed.payment.escrow.gateway', array());\n } else {\n if (empty($paymentToSiteadmin)) {\n $enablePaymentGateway = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.allowed.payment.gateway', array('paypal'));\n }\n }\n\n $projectEnabledgateway = Engine_Api::_()->getDbtable('otherinfo', 'sitecrowdfunding')->getColumnValue($project_id, 'project_gateway');\n if (!empty($projectEnabledgateway)) {\n $projectEnabledgateway = Zend_Json_Decoder::decode($projectEnabledgateway);\n }\n\n $getEnabledGateways = array();\n if (Engine_Api::_()->hasModuleBootstrap('sitegateway')) {\n $getEnabledGateways = Engine_Api::_()->sitegateway()->getAdditionalEnabledGateways(array('plugin' => array('Sitegateway_Plugin_Gateway_Stripe', 'Sitegateway_Plugin_Gateway_PayPalAdaptive', 'Sitegateway_Plugin_Gateway_MangoPay')));\n }\n $formValues = array();\n\n $formValues['stripeConnected'] = $stripeConnected = 0;\n $formValues['stripeEnabled'] = $stripeEnabled = 0;\n $formValues['adaptivepaypalEnable'] = $adaptivepaypalEnable = 0;\n $formValues['mangopayEnable'] = $mangopayEnable = 0;\n $formValues['paypalEnable'] = $paypalEnable = 0;\n\n $mainForm = array();\n $subform = array();\n foreach ($getEnabledGateways as $getEnabledGateway) {\n $gatewyPlugin = explode('Sitegateway_Plugin_Gateway_', $getEnabledGateway->plugin);\n $gatewayKey = strtolower($gatewyPlugin[1]);\n $gatewayKeyUC = ucfirst($gatewyPlugin[1]);\n\n $enable_getway_method = $this->checkEnableGetway($gatewayKey, $enablePaymentGateway);\n if (empty($enable_getway_method))\n continue;\n if ($getEnabledGateway->plugin == 'Sitegateway_Plugin_Gateway_Stripe' && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegateway.stripeconnect', 0)) {\n $stripUrl = '';\n $projectGatewayObj = Engine_Api::_()->getDbtable('projectGateways', 'sitecrowdfunding')->fetchRow(array('project_id = ?' => $project_id, 'plugin LIKE \\'Sitegateway_Plugin_Gateway_Stripe\\''));\n if (!empty($projectGatewayObj) && !empty($projectGatewayObj->projectgateway_id)) {\n if (is_array($projectGatewayObj->config) && !empty($projectGatewayObj->config['stripe_user_id'])) {\n $stripeConnected = 1;\n $stripeEnabled = 1;\n $formValues['stripeEnable'] = $stripeEnabled;\n $formValues['stripeConnected'] = $stripeConnected;\n }\n } else {\n $stripUrl = $this->stripUrl($project);\n }\n $editForm = array();\n $mainForm[] = array(\n 'type' => 'Dummy',\n \"subType\" => 'payment_method',\n \"hasSubForm\" => true,\n \"isActive\" => $stripeEnabled,\n 'name' => 'StripeHeading',\n 'label' => Engine_Api::_()->getApi('Core', 'siteapi')->translate('Stripe'),\n );\n\n $mainForm[] = array(\n \"name\" => \"stripeEnable\",\n \"type\" => \"Checkbox\",\n \"label\" => $this->translate(\"Stripe\"),\n \"stripurl\" => $stripUrl,\n \"value\" => $stripeConnected\n );\n } elseif ($getEnabledGateway->plugin == 'Sitegateway_Plugin_Gateway_PayPalAdaptive') {\n $projectGatewayObj = Engine_Api::_()->getDbtable('projectGateways', 'sitecrowdfunding')->fetchRow(array('project_id = ?' => $project_id, 'plugin LIKE \\'Sitegateway_Plugin_Gateway_PayPalAdaptive\\''));\n if (!empty($projectGatewayObj)) {\n\n if (!empty($projectGatewayObj->projectgateway_id)) {\n // Populate form\n if (is_array($projectGatewayObj->config)) {\n $formValues = array_merge($formValues, $projectGatewayObj->config);\n }\n if ($projectGatewayObj->enabled == 1) {\n $formValues['adaptivepaypalEnable'] = $adaptivepaypalEnable = 1;\n }\n }\n }\n\n $mainForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getPayPalForm($mainForm, $adaptivepaypalEnable, 0);\n } elseif ($getEnabledGateway->plugin == 'Sitegateway_Plugin_Gateway_MangoPay') {\n\n $projectGatewayObj = Engine_Api::_()->getDbtable('projectGateways', 'sitecrowdfunding')->fetchRow(array('project_id = ?' => $project_id, 'plugin LIKE \\'Sitegateway_Plugin_Gateway_MangoPay\\''));\n if (!empty($projectGatewayObj)) {\n // Populate form\n $adminAPGateway = Engine_Api::_()->sitegateway()->getAdminPaymentGateway('Sitegateway_Plugin_Gateway_MangoPay');\n $mode = 'live';\n if ($adminAPGateway->config['test_mode']) {\n $mode = 'sandbox';\n }\n $config = isset($projectGatewayObj->config[$mode]) ? ($projectGatewayObj->config[$mode]) : null;\n if (is_array($config)) {\n $birthday = $projectGatewayObj->config[$mode]['birthday'];\n $config['birthday'] = date('Y-m-d', $birthday);\n $formValues = array_merge($formValues, $config);\n }\n if ($projectGatewayObj->enabled == 1) {\n $formValues['mangopayEnable'] = $mangopayEnable = 1;\n }\n } else {\n $viewer = Engine_Api::_()->user()->getViewer();\n $searchTable = Engine_Api::_()->fields()->getTable('user', 'search');\n $select = $searchTable->select();\n $select->where('item_id = ?', $viewer->getIdentity());\n $otherUserRecords = $searchTable->fetchRow($select);\n if ($otherUserRecords) {\n $formValues['first_name'] = $otherUserRecords->first_name;\n $formValues['last_name'] = $otherUserRecords->last_name;\n $formValues['birthday'] = $otherUserRecords->birthdate;\n }\n $formValues['mango_pay_email'] = $viewer->email;\n }\n\n $mangoPayForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getMangoPayForm($mainForm, $mangopayEnable);\n $mainForm = $mangoPayForm['mainForm'];\n $subform['mangopayHeading_1'] = $mangoPayForm['subForm'];\n }\n }\n\n $paypalEnable = 0;\n if (!empty($projectEnabledgateway['paypal']) || !empty($paymentToSiteadmin)) {\n $projectGatewayObj = Engine_Api::_()->getDbtable('projectGateways', 'sitecrowdfunding')->fetchRow(array('project_id = ?' => $project_id, 'plugin LIKE \\'Payment_Plugin_Gateway_PayPal\\''));\n if (!empty($projectGatewayObj)) {\n $gateway_id = $projectGatewayObj->projectgateway_id;\n $formValues['paypalEnable'] = $paypalEnable = 1;\n\n $mainForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getPayPalForm($mainForm, $paypalEnable);\n\n $formValues = array_merge($formValues, $projectGatewayObj->toArray());\n if (is_array($projectGatewayObj->config)) {\n $formValues = array_merge($formValues, $projectGatewayObj->config);\n }\n }\n }\n else{\n $projectGatewayObj = Engine_Api::_()->getDbtable('projectGateways', 'sitecrowdfunding')->fetchRow(array('project_id = ?' => $project_id, 'plugin LIKE \\'Payment_Plugin_Gateway_PayPal\\''));\n if (!empty($projectGatewayObj)) {\n $gateway_id = $projectGatewayObj->projectgateway_id;\n $formValues['paypalEnable'] = $paypalEnable = 0;\n $formValues = array_merge($formValues, $projectGatewayObj->toArray());\n if (is_array($projectGatewayObj->config)) {\n $formValues = array_merge($formValues, $projectGatewayObj->config);\n }\n } \n }\n \n\n //form work here.............................\n if (empty($enablePaymentGateway)) {\n\n $mainForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getPayPalForm($mainForm, $paypalEnable);\n \n } elseif (Engine_Api::_()->hasModuleBootstrap('sitegateway') && Engine_Api::_()->sitegateway()->isValidGateway($paymentMethod)) {\n if ($paymentMethod == 'stripe' && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegateway.stripeconnect', 0)) {\n $mainForm[] = array(\n 'type' => 'Dummy',\n \"subType\" => 'payment_method',\n \"hasSubForm\" => true,\n \"isActive\" => $stripeEnabled,\n 'name' => 'StripeHeading',\n 'label' => Engine_Api::_()->getApi('Core', 'siteapi')->translate('Stripe'),\n );\n\n\n $mainForm[] = array(\n \"name\" => \"stripeEnable\",\n \"type\" => \"Checkbox\",\n \"label\" => $this->translate(\"Stripe\"),\n \"stripurl\" => $stripUrl,\n \"value\" => $stripeConnected\n );\n }\n } else {\n if (is_array($enablePaymentGateway) && count($enablePaymentGateway) >= 1) {\n foreach ($enablePaymentGateway as $paymentGateway) {\n if (empty($paypalEnable) && $paymentGateway == 'paypal') {\n $mainForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getPayPalForm($mainForm, $paypalEnable);\n } elseif ($paymentGateway == 'paypaladaptive') {\n $mainForm = Engine_Api::_()->getApi('Siteapi_Core', 'sitecrowdfunding')->getPayPalForm($mainForm, $adaptivepaypalEnable, 0);\n } elseif ($paymentGateway == 'mangopay' && Engine_Api::_()->sitegateway()->isValidGateway($paymentGateway)) {\n \n }\n }\n \n }\n }\n\n $reponse['form'] = $mainForm;\n $reponse['formValues'] = $formValues;\n //$reponse['editForm'] = $formValues;\n $this->respondWithSuccess($reponse, true);\n } catch (Exception $ex) {\n \n }\n }", "title": "" }, { "docid": "c6cee63d82e0ae17ec8fc2986a7a9709", "score": "0.6234739", "text": "public function paymentSuccessCheck();", "title": "" }, { "docid": "1021d5b60dbf9fb5986821464f6bf3c8", "score": "0.6217303", "text": "public function getPayment();", "title": "" }, { "docid": "1021d5b60dbf9fb5986821464f6bf3c8", "score": "0.6217303", "text": "public function getPayment();", "title": "" }, { "docid": "fcd9f53d9fc0b8c4c083a3201c14ea32", "score": "0.6195953", "text": "function get_status(){\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.61920595", "text": "public function getStatus();", "title": "" }, { "docid": "8e9d715de7375067caa4f4659156167f", "score": "0.6183186", "text": "protected function getRecentPayments(){\n\n // check if its not zero if its zero\n\n // publish a stop calculation flag\n }", "title": "" }, { "docid": "804acba00221051194d9f3edaddd5e5d", "score": "0.6162457", "text": "public function getAccountStatus() {\n\t\t\t$user = $this->auth->user();\n\t\t\tif(!$user) {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\t\"code\" => 401,\n\t\t\t\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\t\t$AccountStatus = Payments::where('user_id', $user->id)\n\t\t\t\t\t\t->select('payments.id','payments.date','payments.amount',\n\t\t\t\t\t\t\tDB::raw('(CASE WHEN payment_method = 1 THEN \"OpenPay\" WHEN payment_method = 2 THEN \"PayPal\" END) as payment_method'),\n\t\t\t\t\t\t\tDB::raw('(CASE WHEN status = 0 THEN \"Declinado\" WHEN status = 1 THEN \"Pagado\" WHEN status = 2 THEN \"Error en transacción\" END) as status'),\n\t\t\t\t\t\t\tDB::raw('(CASE WHEN type = 0 THEN \"Pago cuota anual\" WHEN type = 1 THEN \"Pago servicio urgente\" END) as type'))\n\t\t\t\t\t\t->get();\n\t\t\t\t\tif($AccountStatus->count()) {\n\t\t\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\t\t\t\"message\" => \"Estado de cuenta\",\n\t\t\t\t\t\t\t\t\t\"response\" => array(\"transactions\" => $AccountStatus)\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\t\t\t\t\"message\" => \"No hay registros todavia en el estado de cuenta\",\n\t\t\t\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t}\n\t}", "title": "" }, { "docid": "8489c3406e74eb8d9534ac744431ef34", "score": "0.6126026", "text": "public function actionCheckPayment()\n {\n $result = false;\n $vCurresntState = $this->getInvoiceState();\n if ($vCurresntState !== \\BtcRelax\\Model\\Invoice::STATE_CANCELED) {\n $vOldBallance = $this->getInvoiceBalance();\n $vInvoiceAddress = $this->getInvoiceAddress();\n $vPaymentProvider = $this->getPaymentProvider();\n $vPaymentProvider->setInvoiceAddress($vInvoiceAddress);\n $vNewBalance = $vPaymentProvider->getBallanceByWallet();\n if (\\is_numeric($vNewBalance)) {\n $this->setInvoiceBalance($vNewBalance);\n $result = $this;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "a1346644119324723ff004640e238406", "score": "0.6062548", "text": "public function status(){\n return $this->getValue(\"status\");\n }", "title": "" }, { "docid": "2e34649f3e152294395673a2a4ae1dfd", "score": "0.60603285", "text": "public function payment_info()\n\t{\n\t\t// $obj = ($this->paymentID) ? run_sql(\"SELECT * FROM crypto_payments WHERE paymentID = $this->paymentID LIMIT 1\") : false;\n\t\t$obj = ($this->paymentID) ? \\DB::selectOne(\"SELECT * FROM crypto_payments WHERE paymentID = $this->paymentID LIMIT 1\") : false;\n\t\tif ($obj) $obj->countryName = get_country_name($obj->countryID);\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "7e15e48d1bb4ae64ad6ea87109f76c76", "score": "0.60452497", "text": "public function getCurrentStatus(){\n \n \t \n \t/*\n \t \n \t \n \t \n \t \n \tif ($plan->getCurrentStatus() < Plan::STATUS_VALIDADO && $fechaInfo !== false){\n \t \n \t \n \t$modelIndicador = new IndicadorPlan();\n \t \n \t$modelIndicador->ACTIVO = 1;\n \t \n \t$modelIndicador->FECHA_INICIO_VIGENCIA= $fechaInfo->modify('-5 day')->format('Y-m-d');\n \t \n \t$modelIndicador->FECHA_FIN_VIGENCIA = $fechaInfo->modify('+10 day')->format('Y-m-d');*/\n \t \n \t \n \t$v_inicio = strtotime($this->FECHA_INICIO);\n \t$v_fin = strtotime($this->FECHA_TERMINO);\n \t \n \tif (!$v_fin || !$v_inicio){\n \n \t\tRETURN 0;\n \t}\n \t \n \t \n \t$fechaFin60Dias = new \\DateTime($this->FECHA_TERMINO);\n \t$fechaFin60Dias->modify('+60 day');\n \t \n \t$currentTime = time();\n \t \n \tif ($v_inicio > $currentTime ){\n \n \t\tRETURN self::STATUS_CREADO;\n \t\t \n \t}\n \tif ($v_inicio <= $currentTime && $v_fin >= $currentTime ){\n \n \t\tRETURN self::STATUS_INICIADO;\n \n \t}elseif($v_fin < $currentTime ){\n \n \t\treturn self::STATUS_CONCLUIDO;\n \t}\n \t \n \t \n \treturn 0;\n }", "title": "" }, { "docid": "662afb3873869158317498913b97a354", "score": "0.6042609", "text": "public function getPaymentStatus(Request $request){\n $payment_id = Session::get('paypal_payment_id');\n\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n\n if (empty($request->get('PayerID')) || empty($request->get('token'))) {\n\n //+++++++++++++++++++ UPDATE DONATION TABLE :: Start +++++++++++++++++++//\n DB::table('donations')\n ->where('paymentId', $payment_id)\n ->update([\n 'payment_status' => 'failed',\n 'updated_at' => \\Carbon\\Carbon::now()\n ]);\n //+++++++++++++++++++ UPDATE DONATION TABLE :: End +++++++++++++++++++//\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/donate');\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId($request->get('PayerID'));\n\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n \n if ($result->getState() == 'approved') {\n //+++++++++++++++++++ UPDATE DONATION TABLE :: Start +++++++++++++++++++//\n DB::table('donations')\n ->where('paymentId', $payment_id)\n ->update([\n 'payment_status' => 'success',\n 'PayerID' => $request->get('PayerID'),\n 'token' => $request->get('token'),\n 'updated_at' => \\Carbon\\Carbon::now()\n ]);\n //+++++++++++++++++++ UPDATE DONATION TABLE :: End +++++++++++++++++++//\n \n //+++++++++++++++++++ SEND EMAIL :: Start +++++++++++++++++++//\n /* $donation_array = DB::table('donations')\n ->where('paymentId', $payment_id)\n ->first();\n \n Mail::to('[email protected]')\n ->send(new DonationEmail($donation_array)); */\n //+++++++++++++++++++ SEND EMAIL :: End +++++++++++++++++++//\n \n \\Session::put('success', 'Your Payment is Successful.');\n return Redirect::to('/donate');\n\n }\n\n \\Session::put('error', 'Sorry! Payment failed.');\n return Redirect::to('/donate');\n\n }", "title": "" }, { "docid": "bad4bd655e21765f5ea2ca492e76281e", "score": "0.60392064", "text": "public function getPaymentStatus($contract_id)\r\n {\r\n $contract = Contract::find($contract_id);\r\n $project = Project::find($contract->project_id);\r\n $client = Lead::find($project->lead_id);\r\n // Get the payment ID before session clear\r\n $payment_id = Session::get('paypal_payment_id');\r\n\r\n // clear the session payment ID\r\n Session::forget('paypal_payment_id');\r\n\r\n if (!Input::get('PayerID') ||! Input::get('token'))\r\n {\r\n return view('omi.launch_sandbox.payment.index',array('project'=>$project,'contract'=>$contract,'client'=>$client,'error'=>'Payment failed'));\r\n }\r\n if($contract->type==\"PPA\")\r\n {\r\n return view('omi.launch_sandbox.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>0));\r\n }\r\n if($contract->price<=$contract->paid && strlen($contract->signed)>0)\r\n {\r\n return view('omi.launch_sandbox.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>1));\r\n }\r\n else if($contract->price<=$contract->paid)\r\n return view('omi.launch_sandbox.sign',array('client'=>$client,'project'=>$project,'contract'=>$contract,'from'=>'sign'));\r\n else\r\n return view('omi.launch_sandbox.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>0));\r\n\r\n }", "title": "" }, { "docid": "741936e8291f22b5f993a8c6fc194631", "score": "0.6035118", "text": "public function getCurrentStatus()\n {\n return $this->currentStatus;\n }", "title": "" }, { "docid": "f49dfc7b351e7d76a2761eab84e2c981", "score": "0.60288495", "text": "public function get_status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "faff7e28c5811abf6d1841fbd16b2583", "score": "0.6024384", "text": "public function isPaymentExecuted()\n {\n //check request method\n $requestMethod = $_SERVER['REQUEST_METHOD'];\n $chargeId=request('tap_id');\n\n //if redirectURl is given in the request body\n if ($requestMethod == 'GET') {\n\n //retrieve charge\n //result gives error\n $result=$this->getCurl(\"https://api.tap.company/v2/charges/$chargeId\",env('TAP_API_KEY'));\n $jsonResponse=$result->response;\n $err=$result->err;\n $response = json_decode($jsonResponse, true);\n\n if ($err) {\n return \"cURL Error #:\" . $err;\n }\n else {\n\n $charge=$this->getPayment($chargeId);\n $returnResponse=new \\stdClass();\n $returnResponse->track_id=$charge->track_id;\n\n if($response['status']=='CAPTURED' or $response['status']=='APPROVED'){\n\n //update charge entry in database\n $charge->status=\"CAPTURED\";\n $charge->json=$jsonResponse;\n $charge->payment_method=$response['source']['payment_method'];\n $charge->save();\n \n $returnResponse->status=true;\n return $returnResponse;\n }\n else\n $charge->status = $response['status'];\n $charge->json = $jsonResponse;\n $charge->payment_method=$response['source']['payment_method'];\n $charge->save();\n\n $returnResponse->status=false;\n return $returnResponse;\n }\n }\n\n //if PostURl is given in the request body\n else {\n\n $hashString = $_SERVER['HTTP_HASHSTRING'];\n $id = request('id');\n $amount = request('amount');\n $amount = number_format($amount,2);\n $currency = request('currency');\n $gateway_reference = request('reference.gateway');\n $payment_reference = request('reference.payment');\n $status = request('status');\n $created = request('transaction.created');\n $SecretAPIKey = env('TAP_API_KEY', '');\n $toBeHashedString = 'x_id' . $id . 'x_amount' . $amount . 'x_currency' . $currency . 'x_gateway_reference' . $gateway_reference . 'x_payment_reference' . $payment_reference . 'x_status' . $status . 'x_created' . $created . '';\n $myHashString = hash_hmac('sha256', $toBeHashedString, $SecretAPIKey);\n \n $savedCharge = $this->getPayment($id);\n\n $returnResponse= new \\stdClass();\n $returnResponse->track_id= $savedCharge->track_id;\n $returnResponse->tap_id = $id;\n\n if ($myHashString == $hashString) {\n echo \"Secure Post\";\n \n $savedCharge->status = $status;\n $savedCharge->save();\n if ($savedCharge->status == \"CAPTURED\")\n $returnResponse->status=true;\n else\n $returnResponse->status=false;\n //$data='{\"charge_id\" : '.$id.' ,\"status\" : '.$status.'}';\n\n } else {\n $returnResponse->status=false;\n }\n return $returnResponse;\n \n\n }\n }", "title": "" }, { "docid": "957d798b79c188a8cb56adbe45994946", "score": "0.60065514", "text": "public function update_status( Payment $payment ) {\n\t\t$input_data = filter_input( INPUT_POST, 'Data' );\n\t\t$input_seal = filter_input( INPUT_POST, 'Seal', FILTER_SANITIZE_STRING );\n\n\t\t$data = Client::parse_piped_string( $input_data );\n\n\t\t$seal = Client::compute_seal( $input_data, $this->config->secret_key );\n\n\t\t// Check if the posted seal is equal to our seal.\n\t\tif ( 0 === strcasecmp( $input_seal, $seal ) ) {\n\t\t\t$response_code = $data['responseCode'];\n\n\t\t\t$status = ResponseCodes::transform( $response_code );\n\n\t\t\t// Set the status of the payment.\n\t\t\t$payment->set_status( $status );\n\n\t\t\t$labels = array(\n\t\t\t\t'amount' => __( 'Amount', 'pronamic_ideal' ),\n\t\t\t\t'captureDay' => _x( 'Capture Day', 'creditcard', 'pronamic_ideal' ),\n\t\t\t\t'captureMode' => _x( 'Capture Mode', 'creditcard', 'pronamic_ideal' ),\n\t\t\t\t'currencyCode' => __( 'Currency Code', 'pronamic_ideal' ),\n\t\t\t\t'merchantId' => __( 'Merchant ID', 'pronamic_ideal' ),\n\t\t\t\t'orderId' => __( 'Order ID', 'pronamic_ideal' ),\n\t\t\t\t'transactionDateTime' => __( 'Transaction Date Time', 'pronamic_ideal' ),\n\t\t\t\t'transactionReference' => __( 'Transaction Reference', 'pronamic_ideal' ),\n\t\t\t\t'keyVersion' => __( 'Key Version', 'pronamic_ideal' ),\n\t\t\t\t'authorisationId' => __( 'Authorisation ID', 'pronamic_ideal' ),\n\t\t\t\t'paymentMeanBrand' => __( 'Payment Mean Brand', 'pronamic_ideal' ),\n\t\t\t\t'paymentMeanType' => __( 'Payment Mean Type', 'pronamic_ideal' ),\n\t\t\t\t'responseCode' => __( 'Response Code', 'pronamic_ideal' ),\n\t\t\t);\n\n\t\t\t$note = '';\n\n\t\t\t$note .= '<p>';\n\t\t\t$note .= __( 'OmniKassa transaction data in response message:', 'pronamic_ideal' );\n\t\t\t$note .= '</p>';\n\n\t\t\t$note .= '<dl>';\n\n\t\t\tforeach ( $labels as $key => $label ) {\n\t\t\t\tif ( isset( $data[ $key ] ) ) {\n\t\t\t\t\t$note .= sprintf( '<dt>%s</dt>', esc_html( $label ) );\n\t\t\t\t\t$note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$note .= '</dl>';\n\n\t\t\t$payment->add_note( $note );\n\t\t}\n\t}", "title": "" }, { "docid": "c291632436c8a02f13602c0816a019ba", "score": "0.600025", "text": "function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }", "title": "" }, { "docid": "135ff30ce88188988f35e9cedd4a31ef", "score": "0.5995563", "text": "public function paymentCheck(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "31b3989b9aa9f19e7de0ed12f98ea833", "score": "0.59898776", "text": "public function getPaymentInfo()\n {\n return $this->paymentInfo;\n }", "title": "" }, { "docid": "ac1c51ba5bd7b383b3b45f3c36fc2b66", "score": "0.59859", "text": "public function update_status()\n {\n global $order;\n secupay_log($this->sp_log, \"update_status\");\n\n if (($this->enabled) && ((int)MODULE_PAYMENT_SPSK_ZONE > 0)) {\n $check_flag = false;\n try {\n $check_query = xtc_db_query(\"SELECT geo_zone_id FROM \" . TABLE_ZONES_TO_GEO_ZONES . \" WHERE geo_zone_id = '\" . MODULE_PAYMENT_SPSK_ZONE . \"' AND zone_country_id = '\" . $order->billing['country']['id'] . \"' ORDER BY zone_id\");\n while ($check = xtc_db_fetch_array($check_query)) {\n if ($check['geo_zone_id'] == MODULE_PAYMENT_SPSK_ZONE) {\n $check_flag = true;\n break;\n }\n }\n } catch (Exception $e) {\n secupay_log($this->sp_log, 'update_status EXCEPTION: ' . $e->getMessage());\n }\n if ($check_flag == false) {\n $this->enabled = false;\n }\n }\n\n if (($this->enabled) && $this->conf->secupay_sk_xtc->delivery_differs_disable && MODULE_PAYMENT_SPSK_DELIVERY_DISABLE == \"Ja\") {\n $check_delivery_differs = $this->_check_delivery_differs($order);\n if ($check_delivery_differs) {\n $this->enabled = false;\n }\n }\n\n if (($this->enabled) && is_numeric(MODULE_PAYMENT_SPSK_MIN_AMOUNT) && MODULE_PAYMENT_SPSK_MIN_AMOUNT > 0) {\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - check amount\");\n //subtotal should not contain delivery cost\n if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {\n $subtotal = $order->info['subtotal'] + $order->info['tax'];\n } else {\n $subtotal = $order->info['subtotal'];\n }\n $order_amount = number_format($subtotal, 2, '.', '');\n $check_amount = number_format(floatval(MODULE_PAYMENT_SPSK_MIN_AMOUNT), 2, '.', '');\n\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - order amount: \" . $order_amount . \" - amount set: \" . $check_amount);\n\n if ($order_amount < $check_amount) {\n $this->enabled = false;\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - disabled because of low amount\");\n }\n }\n if (($this->enabled) && is_numeric(MODULE_PAYMENT_SPSK_MAX_AMOUNT) && MODULE_PAYMENT_SPSK_MAX_AMOUNT > 0) {\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - check for max amount\");\n //total should contain delivery cost\n if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {\n $total = $order->info['total'] + $order->info['tax'];\n } else {\n $total = $order->info['total'];\n }\n $order_amount = number_format($total, 2, '.', '');\n $check_amount = number_format(floatval(MODULE_PAYMENT_SPSK_MAX_AMOUNT), 2, '.', '');\n\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - order amount: \" . $order_amount . \" - amount set: \" . $check_amount);\n\n if ($order_amount >= $check_amount) {\n $this->enabled = false;\n secupay_log($this->sp_log, \"secupay_sk_xtc - update_status - disabled because of high amount\");\n }\n }\n }", "title": "" }, { "docid": "69756faab1c173f177d79e442482eaae", "score": "0.5977854", "text": "public function transactionStatus(){\n $url = 'https://sandbox.safaricom.co.ke/mpesa/transactionstatus/v1/query';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization:Bearer '.$this->accessToken())); //setting custom header\n\n $initiator = 'testapi';\n $securityCredential = 'YZI7YL7OctylJPmOHvbL8qnOAcTFT7XXYIhCf3z96PaBnHqOf4FJ/5wZzHhQBMvRg55L0sYtBC04C5wvRJchU+kur+fyChE+clphFime+4MQP5qTTICQpkv2P43T4wDfkBM2nuZt3UXvys2QXYwi+kEO1Ju5L48bf+f+pjceFBrGokf0I1wLgpvb67ez25zkb0NaHzPygcNFqgkkFs2wVitMDQWTJnVW+TCjtGI872c60LPWmtvufQBxYZpFBhPLQeWz0mhoQmiT3V8PZJwC3+YMjYZ+cvaojQloYZ8toFNeutK/J8wlluHlx4bpHhXHgCj3R16e5Qa+7Q2SfXWx5Q==';\n $transactionID = 'NBI4XIM97K';\n $paybill = '174379';\n $remarks = 'Check transaction status';\n $resultUrl = 'https://dannextech.com/nabacab/MpesaPayments/callbackUrl';\n $queueTimeOutUrl = 'https://dannextech.com/nabacab/MpesaPayments/callbackUrl';\n $occassion = 'Dannex Tech';\n\n $curl_post_data = array(\n //Fill in the request parameters with valid values\n 'Initiator' => $initiator,\n 'SecurityCredential' => $securityCredential,\n 'CommandID' => 'TransactionStatusQuery',\n 'TransactionID' => $transactionID,\n 'PartyA' => $paybill,\n 'IdentifierType' => '1',\n 'ResultURL' => $resultUrl,\n 'QueueTimeOutURL' => $queueTimeOutUrl,\n 'Remarks' => $remarks,\n 'Occasion' => $occassion\n );\n\n $data_string = json_encode($curl_post_data);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n $curl_response = curl_exec($curl);\n print_r($curl_response);\n\n echo $curl_response;\n }", "title": "" }, { "docid": "77c6bc7d2e56e92d2781e9e772e2c4fb", "score": "0.5974759", "text": "function getStatus() {\n return $this->status;\n }", "title": "" }, { "docid": "d0cf46c166e32b9ec5777212f40edee1", "score": "0.5974144", "text": "public function payment_gateway_details()\n {\t\n\t\t$result = array();\n\t\t$arguments = array(\n\t\t\tarray('$match' =>\n\t\t\t\tarray(\n\t\t\t\t\t'company_id' => 0,\n\t\t\t\t\t'default_payment_gateway' => 1,\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray('$project' =>\n\t\t\t\tarray(\n\t\t\t\t\t'payment_type' => '$payment_gateway_id',\n\t\t\t\t\t'payment_gateway_username' => '$payment_gateway_username',\n\t\t\t\t\t'payment_gateway_password' => '$payment_gateway_password',\n\t\t\t\t\t'payment_gateway_key' => '$payment_gateway_signature',\n\t\t\t\t\t//'gateway_currency_format' => '$currency_code',\n\t\t\t\t\t'payment_method' => '$payment_method',\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\n\t\t$res = $this->mongo_db->aggregate(MDB_PAYMENT_GATEWAYS,$arguments);\n\t\tif(!empty($res['result'])){\n\t\t\t\n\t\t\t$result = $res['result'];\n\t\t}\n\t\treturn $result;\n }", "title": "" }, { "docid": "8164b1fe5d5a8e978022142f45a6bf49", "score": "0.5970688", "text": "function change_return_status(){\r\n $CI =& get_instance();\r\n return $CI->db->select('change_return')->get('db_sitesettings')->row()->change_return;\r\n }", "title": "" }, { "docid": "b162d230288249c01821ec357ee75426", "score": "0.5967688", "text": "public function getPayment(): int\n {\n return $this->payment;\n }", "title": "" }, { "docid": "ec88bfec605652277d8658c58cb24606", "score": "0.59616387", "text": "public function processStatus($statusCode)\n {\n $return = new \\Magento\\Framework\\DataObject();\n $return->setStateChanged(true);\n $return->setIsTransactionPending(true); //payment is pending?\n\n switch($statusCode)\n {\n case '1':\n $return->setState(\\Magento\\Sales\\Model\\Order::STATE_PENDING_PAYMENT);\n $return->setIsCustomerNotified($this->getCode()!='gateway_cc');\n\n $return->setMessage(\n __('Awaiting payment: the buyer initiated the transaction, but so far Gateway has not received any payment information.')\n );\n break;\n case '2':\n $return->setState(\\Magento\\Sales\\Model\\Order::STATE_PAYMENT_REVIEW);\n $return->setIsCustomerNotified(true);\n $return->setMessage(\n __('Under review: the buyer chose to pay with a credit card and Gateway is analyzing the risk of the transaction.')\n );\n break;\n case '3':\n $return->setState(\\Magento\\Sales\\Model\\Order::STATE_PROCESSING);\n $return->setIsCustomerNotified(true);\n $return->setMessage(\n __('Pay: the transaction was paid by the buyer and Gateway has already received a confirmation of the financial institution responsible for processing.')\n );\n $return->setIsTransactionPending(false);\n break;\n case '4':\n $return->setMessage(\n __('Available: The transaction has been paid and has reached the end of its has been returned and there is no open dispute')\n );\n $return->setIsCustomerNotified(false);\n $return->setStateChanged(false);\n $return->setIsTransactionPending(false);\n break;\n case '5':\n $return->setState(\\Magento\\Sales\\Model\\Order::STATE_PROCESSING);\n $return->setIsCustomerNotified(false);\n $return->setIsTransactionPending(false);\n $return->setMessage(\n __('In dispute: the buyer, within the term of release of the transaction, opened a dispute.')\n );\n break;\n case '6':\n $return->setData('state', \\Magento\\Sales\\Model\\Order::STATE_CLOSED);\n $return->setIsCustomerNotified(false);\n $return->setIsTransactionPending(false);\n $return->setMessage(__('Returned: The transaction amount was returned to the buyer.'));\n break;\n case '7':\n $return->setState(\\Magento\\Sales\\Model\\Order::STATE_CANCELED);\n $return->setIsCustomerNotified(true);\n $return->setMessage(__('Canceled: The transaction was canceled without being finalized.'));\n break;\n default:\n $return->setIsCustomerNotified(false);\n $return->setStateChanged(false);\n $return->setMessage(__('Invalid status code returned by Gateway. (%s)', $statusCode ));\n }\n return $return;\n }", "title": "" }, { "docid": "843adc9af96c2c729230809b07cc9205", "score": "0.5951463", "text": "public function status() {\n\t\treturn $this->UserAPI->request_status_check();\n\t}", "title": "" }, { "docid": "96fbff60410c827101c683ff8dbea0cc", "score": "0.5951188", "text": "public function getGateway()\n {\n return ($this->_gatewayOrRenew == self::PARAM_GATEWAY);\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.59452444", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.59452444", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.59452444", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.59452444", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "e7a4ff3805e5b0e810edc8c3697875ba", "score": "0.5935258", "text": "public function updateGoCardLessPaymentStatus()\n {\n\n $transactions = Transaction::select([\n 'id',\n 'gocardless_payment_id'\n ])->whereIn('gocardless_status', Transaction::getCardlessStatusForCron())\n ->get();\n\n $transactions->each(function ($transaction) {\n $client = getCardlessClient();\n $payment = $client->payments()->get($transaction->gocardless_payment_id);\n $transaction->gocardless_status = $payment->status;\n $transaction->save();\n\n // If status is paid_out, create gocardless_charge record\n if ($payment->status === 'paid_out') {\n $payOut = $client->payouts()->get($payment->links->payout);\n $totalCharge = $payOut->deducted_fees / 100;\n\n $charge = new GoCardLessCharge();\n $charge->transaction_id = $transaction->id;\n $charge->amount = $totalCharge;\n $charge->save();\n }\n\n// Send send thank you email to customer if status is paid_out\n// Mail::send('emails.gocardless.varification',\n// ['data' => ['url' => 'some url']],\n// function ($message) {\n// $message->to('[email protected]', 'Status is changing')\n// ->subject('New payment is made');\n//\n// $message->from(env('MAIL_FROM_ADDRESS'));\n// });\n });\n }", "title": "" }, { "docid": "c4a39456928dcdb3131f171807907ca0", "score": "0.59301853", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "5fbc3ce43f5c6b0d163e03c6d07a6595", "score": "0.59266263", "text": "public function getVpnGatewayState() \n {\n return $this->_fields['VpnGatewayState']['FieldValue'];\n }", "title": "" }, { "docid": "5819379576c1029891dabe42a94889f6", "score": "0.5926053", "text": "function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "f33c185f9e03bb7665f49e3907abca98", "score": "0.59255135", "text": "public function getStatus(Request $request) {\n //check access key\n if($request->header('X-SECRET-KEY') == config('services.oldpay.key')) {\n $transaction = OldPay::where('transaction_id',$request->transaction_id)->first();\n if($transaction) {\n return response()->json([\n 'status'=>'success',\n 'id'=>$transaction->id,\n 'transaction_id'=>$transaction->transaction_id,\n 'order_id'=>$transaction->order_id,\n 'sum'=>$transaction->sum,\n ],200);\n } else {\n return response()->json([\n 'status'=>'fail'\n ],404);\n }\n } else {\n return response()->json([\n 'status'=>'fail'\n ],401);\n }\n\n }", "title": "" }, { "docid": "5de6555bd0790f3db96675cd1798196f", "score": "0.592333", "text": "function _parse_payment_status($status){\r\r\n\t\t// default\r\r\n\t\t$mb_status = 'error';\r\r\n\t\t// check\r\r\n\t\tswitch($status){\r\r\n\t\t\tcase -2:\r\r\n\t\t\tcase '-2':\r\r\n\t\t\t\t$mb_status = 'Failed';\r\r\n\t\t\tbreak;\r\r\n\t\t\tcase 2:\r\r\n\t\t\tcase '2':\r\r\n\t\t\t\t$mb_status = 'Processed';\r\r\n\t\t\tbreak;\r\r\n\t\t\tcase 0:\r\r\n\t\t\tcase '0':\r\r\n\t\t\t\t$mb_status = 'Pending';\r\r\n\t\t\tbreak;\r\r\n\t\t\tcase -1:\r\r\n\t\t\tcase '-1':\r\r\n\t\t\t\t$mb_status = 'Cancelled';\r\r\n\t\t\tbreak;\r\r\n\t\t\tcase -3:\r\r\n\t\t\tcase '-3':\r\r\n\t\t\t\t$mb_status = 'Chargeback';\r\r\n\t\t\tbreak;\r\r\n\t\t}\t\t\r\r\n\t\t// return \r\r\n\t\treturn $mb_status;\r\r\n\t}", "title": "" }, { "docid": "79a7f8184fdf2aaa63059f5531d72c01", "score": "0.59153885", "text": "private function validatePaymentStatus($payment_id)\n {\n $data = ['status' => false, 'code' => ''];\n $pscpayment = $this->get_connection();\n $response = $pscpayment->retrievePayment($payment_id);\n if ($response !== false && isset($response[\"status\"])) {\n $data['code'] = $response[\"status\"];\n if ($response[\"status\"] == \"SUCCESS\") {\n $data['status'] = true;\n } elseif ($response[\"status\"] == \"AUTHORIZED\") {\n $response = $pscpayment->capturePayment($payment_id);\n if ($response !== false && isset($response[\"status\"]) && $response[\"status\"] == \"SUCCESS\") {\n $data['status'] = true;\n $data['code'] = $response[\"status\"];\n }\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "53a34a0c882c3e7f5213eb6f81239458", "score": "0.5899109", "text": "public function change_gateway_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\tif (!$this->data['demoserverChk'] || $this->checkLogin('A')==1){\n\t\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t\t$gateway_id = $this->uri->segment(5,0);\n\t\t\t\t$status = ($mode == '0')?'Disable':'Enable';\n\t\t\t\t$newdata = array('status' => $status);\n\t\t\t\t$condition = array('id' => $gateway_id);\n\n\t\t\t\tif($mode=='0') {\n $condition2=array('status'=>'Enable');\n $flag= $this->paygateway_model->get_all_details(PAYMENT_GATEWAY, $condition2);\n if($flag->num_rows()==1){\n $this->setErrorMessage('error','Atleast one Payment Gateway need to be Enabled');\n redirect('admin/paygateway/display_gateway');\n }\n }\n\n\t\t\t\t$this->paygateway_model->update_details(PAYMENT_GATEWAY,$newdata,$condition);\n\t\t\t\t$this->paygateway_model->savePaymentSettings();\n\t\t\t\t$this->setErrorMessage('success','Payment Gateway Status Changed Successfully');\n\t\t\t\tredirect('admin/paygateway/display_gateway');\n\t\t\t}else {\n\t\t\t\t$this->setErrorMessage('error','You are in demo mode. Settings cannot be changed');\n\t\t\t\tredirect('admin/paygateway/display_gateway');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cddadf0e21719b622654fb16670ecf46", "score": "0.58953303", "text": "public function get_payment_list() {\n\t\t$query = $this->db->where([\"payment_status\"=>\"1\"])\n\t\t\t\t\t->get(\"payment_info\");\t\t\n\t\t$list = $query->result();\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "78d8ab0c424a9f745e5456da82d2482f", "score": "0.5889744", "text": "public function status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "78d8ab0c424a9f745e5456da82d2482f", "score": "0.5889744", "text": "public function status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "e106e9cf9b05221ecb736adfe81182e3", "score": "0.58881724", "text": "function check_charges_status($charge_token, $payment_type, $secret_key)\n{\n\t//Charges details using GET Method\n\tif($payment_type == 'test')\n\t{\n\t\t$charges_url = 'https://test-api.pin.net.au/1/charges/'.$charge_token; // Test Payment Url\n\t}elseif($payment_type == 'live')\n\t{\n\t\t$charges_url = 'https://api.pin.net.au/1/charges/'.$charge_token; // Live Payment Url\n\t}\n\t\n\t$charges_url = 'https://test-api.pin.net.au/1/charges/'.$charge_token;\n\t//$url = 'https://test-api.pin.net.au/1/charges/ch_xFHQeSe9-Oji5Im_K4i4yA/refunds'; Sample of test url\n\n\t//open connection\n\t$charges_ch = curl_init();\n\n\tcurl_setopt($charges_ch,CURLOPT_URL, $charges_url);\n\tcurl_setopt($charges_ch, CURLOPT_HTTPGET, 1);\n\tcurl_setopt($charges_ch, CURLOPT_USERPWD, $secret_key.':');\n\n\t// receive server response ...\n\tcurl_setopt($charges_ch, CURLOPT_RETURNTRANSFER, true);\n\n\t//execute get for charges listing\n\n\t$charges_output = curl_exec($charges_ch);\n\tcurl_close($charges_ch);\n\n\t//print_r($charges_output); exit;\n\treturn json_decode($charges_output);\n}", "title": "" }, { "docid": "3c3181aa171ed8492e092cd9d3bfd48c", "score": "0.58848697", "text": "private function stat_payment($within = null) {\n if (!$this->is_loggedin)\n return false;\n $url_suffix = '';\n if ($within != null) {\n $url_suffix = '?within=' . $within;\n }\n\n $content_decoded = json_decode($this->exec_curl($this->baseURL . '/api/s/' . $this->site . '/stat/payment' . $url_suffix));\n return $this->process_response($content_decoded);\n }", "title": "" }, { "docid": "da9142889bbdab5ed4b8f94ebaaa3987", "score": "0.5884841", "text": "public function payPalStatus(Request $request)\n {\n $user = Auth::user();\n $paymentId = $request->input('paymentId');\n $payerId = $request->input('PayerID');\n $token = $request->input('token');\n\n if (!$paymentId || !$payerId || !$token) {\n return redirect('subscription')->with('error', __('Algo1 salió mal con Paypal, recarga la página e intenta de nuevo'));\n }\n\n $pymnt = Payment::get($paymentId, $this->apiContext);\n $execution = new PaymentExecution();\n $execution->setPayerId($payerId);\n\n /** execute the payment **/\n $result = $pymnt->execute($execution, $this->apiContext);\n\n if ($result->getState() === 'approved') {\n /* update transaction in DB */\n $p = PM::where('user_id', $user->id)->where('payment_status', 'pending')->orderBy('id', 'asc')->first();\n try {\n DB::beginTransaction();\n //dd($invoice);\n $p->active = 1;\n $p->payment_status = 'approved';\n $p->payment_method = 'PayPal';\n $p->current_date = Carbon::now();\n $p->updated_at = Carbon::now();\n $p->expiration_date = Carbon::now()->addMonths(1);\n $p->update();\n $user->trial_version_status = 0;\n $user->subscription_status = 1;\n $user->save();\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n DB::rollback();\n $msg = ['status' => 'error', 'message' => __('Ocurrió un error, vuelve a intentarlo'), 'exception' => $ex->getMessage()];\n return response()->json($msg, 400);\n } catch (\\Exception $ex) {\n DB::rollback();\n $msg = ['status' => 'error', 'message' => __('Ocurrió un error, vuelve a intentarlo'), 'exception' => $ex->getMessage()];\n return response()->json($msg, 400);\n } finally {\n DB::commit();\n return redirect('/subscription')->with('success', __('Pago procesado correctamente'));\n }\n }\n return redirect('/subscription')->with('error', __('Algo salió mal con Paypal, recarga la página e intenta de nuevo'));\n }", "title": "" }, { "docid": "ec55ca40db6b3841e84979f5e5559218", "score": "0.5882828", "text": "public function is_paid();", "title": "" }, { "docid": "124e6a67e329eb4ad1e76dd83823f8cf", "score": "0.58826715", "text": "function get_gateway_data( ){\n\t\t\n\t\t$paypal_payments_pro_version = \"56.0\";\n\t\t\n\t\t$paypal_payments_pro_currency = get_option( 'ec_option_paypal_payments_pro_currency' );\n\t\t$paypal_payments_pro_user = get_option( 'ec_option_paypal_payments_pro_user' );\n\t\t$paypal_payments_pro_password = get_option( 'ec_option_paypal_payments_pro_password' );\n\t\t$paypal_payments_pro_signature = get_option( 'ec_option_paypal_payments_pro_signature' );\n\t\t\n\t\tif( $this->credit_card->payment_method == \"visa\" )\n\t\t\t$card_type = \"Visa\";\n\t\telse if( $this->credit_card->payment_method == \"mastercard\" )\n\t\t\t$card_type = \"MasterCard\";\n\t\telse if( $this->credit_card->payment_method == \"maestro\" )\n\t\t\t$card_type = \"Maestro\";\n\t\telse if( $this->credit_card->payment_method == \"switch\" )\n\t\t\t$card_type = \"Maestro\";\n\t\telse if( $this->credit_card->payment_method == \"uke\" )\n\t\t\t$card_type = \"Visa\";\n\t\telse if( $this->credit_card->payment_method == \"amex\" )\n\t\t\t$card_type = \"Amex\";\n\t\telse if( $this->credit_card->payment_method == \"discover\" )\n\t\t\t$card_type = \"Discover\";\n\t\t\t\n\t\t$tax_total = number_format( $this->order_totals->tax_total + $this->order_totals->duty_total + $this->order_totals->gst_total + $this->order_totals->pst_total + $this->order_totals->hst_total, 2, '.', '' );\n\t\tif( !$this->tax->vat_included )\n\t\t\t$tax_total = number_format( $tax_total + $this->order_totals->vat_total, 2, '.', '' );\n\t\t\n\t\t$paypal_payments_pro_data = array(\t\"METHOD\"\t\t\t=> \"DoDirectPayment\",\n\t\t\t\t\t\t\t\t\t\t\t\"VERSION\"\t\t\t=> $paypal_payments_pro_version,\n\t\t\t\t\t\t\t\t\t\t\t\"SIGNATURE\"\t\t\t=> $paypal_payments_pro_signature,\n\t\t\t\t\t\t\t\t\t\t\t\"USER\"\t\t\t\t=> $paypal_payments_pro_user,\n\t\t\t\t\t\t\t\t\t\t\t\"PWD\"\t\t\t\t=> $paypal_payments_pro_password,\n\t\t\t\t\t\t\t\t\t\t\t\"PAYMENTACTION\"\t\t=> \"Sale\",\n\t\t\t\t\t\t\t\t\t\t\t\"IPADDRESS\"\t\t\t=> $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\t\t\t\t\t\t\"BUTTONSOURCE\"\t\t=> \"LevelFourDevelopmentLLC_Cart\",\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\"AMT\" \t\t\t\t=> number_format( $this->order_totals->grand_total, 2, '.', '' ),\n\t\t\t\t\t\t\t\t\t\t\t\"ITEMAMT\"\t\t\t=> number_format( $this->order_totals->sub_total, 2, '.', '' ),\n\t\t\t\t\t\t\t\t\t\t\t\"SHIPPINGAMT\"\t\t=> number_format( $this->order_totals->shipping_total, 2, '.', '' ),\n\t\t\t\t\t\t\t\t\t\t\t\"TAXAMT\"\t\t\t=> $tax_total,\n\t\t\t\t\t\t\t\t\t\t\t\"SHIPDISCAMT\"\t\t=> \"-\" . number_format( $this->order_totals->discount_total, 2, '.', '' ),\n\t\t\t\t\t\t\t\t\t\t\t\"CURRENCYCODE\"\t\t=> $paypal_payments_pro_currency,\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\"INVNUM\"\t\t\t=> $this->order_id,\n\t\t\t\t\t\t\t\t\t\t\t\"PAYMENTACTION\"\t\t=> \"Sale\",\n\t\t\t\t\t\t\t\t\t\t\t\"CREDITCARDTYPE\"\t=> $card_type,\n\t\t\t\t\t\t\t\t\t\t\t\"ACCT\" \t\t\t\t=> $this->credit_card->card_number,\n\t\t\t\t\t\t\t\t\t\t\t\"EXPDATE\" \t\t\t=> $this->credit_card->expiration_month . $this->credit_card->get_expiration_year( 4 ),\n\t\t\t\t\t\t\t\t\t\t\t\"CVV2\" \t\t\t\t=> $this->credit_card->security_code,\n\n\t\t\t\t\t\t\t\t\t\t\t\"EMAIL\"\t\t\t\t=> $this->user->email,\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\"FIRSTNAME\" \t\t=> $this->user->billing->first_name,\n\t\t\t\t\t\t\t\t\t\t\t\"LASTNAME\" \t\t\t=> $this->user->billing->last_name,\n\t\t\t\t\t\t\t\t\t\t\t\"STREET\" \t\t\t=> $this->user->billing->address_line_1,\n\t\t\t\t\t\t\t\t\t\t\t\"CITY\" \t\t\t\t=> $this->user->billing->city,\n\t\t\t\t\t\t\t\t\t\t\t\"STATE\" \t\t\t=> $this->user->billing->state,\n\t\t\t\t\t\t\t\t\t\t\t\"ZIP\"\t\t\t\t=> $this->user->billing->zip,\n\t\t\t\t\t\t\t\t\t\t\t\"COUNTRYCODE\" \t\t=> $this->user->billing->country,\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n\t\t/* NO Longer Allowed\n\t\t//Add Cart Items\n\t\tfor( $i=0; $i<count($this->cart->cart); $i++ ){\n\t\t\t$paypal_payments_pro_data[\"L_NAME\".$i] = substr( $this->cart->cart[$i]->title, 0, 127 );\n\t\t\t//$paypal_payments_pro_data[\"L_DESC\".$i] = substr( $this->cart->cart[$i]->description, 0, 127 );\n\t\t\t$paypal_payments_pro_data[\"L_AMT\".$i] = number_format( $this->cart->cart[$i]->unit_price, 2, '.', '' );\n\t\t\t$paypal_payments_pro_data[\"L_NUMBER\".$i] = substr( $this->cart->cart[$i]->model_number, 0, 127 );\n\t\t\t$paypal_payments_pro_data[\"L_QTY\".$i] = $this->cart->cart[$i]->quantity;\n\t\t\t//$paypal_payments_pro_data[\"L_TAXAMT\".$i] = substr( $this->cart->cart[$i]->title, 0, 127 );\n\t\t}\n\t\t\n\t\t//Add Shipping\n\t\t$paypal_payments_pro_data[\"SHIPTONAME\"] = substr( $this->user->shipping->first_name . \" \" . $this->user->shipping->last_name, 0, 32 );\n\t\t$paypal_payments_pro_data[\"SHIPTOSTREET\"] = substr( $this->user->shipping->address_line_1, 0, 100 );\n\t\t$paypal_payments_pro_data[\"SHIPTOCITY\"] = substr( $this->user->shipping->city, 0, 40 );\n\t\t$paypal_payments_pro_data[\"SHIPTOSTATE\"] = substr( $this->user->shipping->state, 0, 40 );\n\t\t$paypal_payments_pro_data[\"SHIPTOZIP\"] = substr( $this->user->shipping->zip, 0, 20 );\n\t\t$paypal_payments_pro_data[\"SHIPTOCOUNTRY\"] = substr( $this->user->shipping->country, 0, 2 );\n\t\t$paypal_payments_pro_data[\"SHIPTOPHONENUM\"] = substr( $this->user->shipping->phone, 0, 20 );\n\t\t*/\n\t\t\n\t\t//Create parmlist\n\t\t$paypal_payments_pro_string = \"\";\n\t\t$last_i = 0;\n\t\tforeach( $paypal_payments_pro_data as $var=>$val ){\n\t\t\tif( $last_i > 0 )\n\t\t\t\t$paypal_payments_pro_string .= \"&\";\n\t\t\t$paypal_payments_pro_string .= $var . \"=\" . urlencode($val);\n\t\t\t$last_i++;\n\t\t}\n\t\t\n\t\treturn $paypal_payments_pro_string;\n\t\t\n\t}", "title": "" }, { "docid": "a801138afd56c461da1242b6500d59ac", "score": "0.5882045", "text": "public function getPaymentResult () {\n $getData = $_GET;\n\n // Array\n // (\n // [authResult] => REFUSED\n // [merchantReference] => RentomatoPayment @1 - 05/10/2015 23:08\n // [merchantSig] => Hguu5MQygkx1G7YrtTxJPu5Fal5dF5XHfNriXWx6KXI=\n // [paymentMethod] => mc\n // [pspReference] => 8614440865351704\n // [shopperLocale] => en_GB\n // [skinCode] => X37I3kWG\n //)\n\n preg_match('/RentomatoPayment @(\\d+)/', $getData['merchantReference'], $matches);\n $invoiceId = $matches[1];\n\n $invoice = Invoice::find($invoiceId);\n\n $payment = new Payment();\n $payment->invoice_id = $invoiceId;\n $payment->landlord_id = $invoice->landlord_id;\n $payment->tenant_id = $invoice->tenant_id;\n $payment->payment_method = $getData['paymentMethod'];\n $payment->payment_status = $getData['authResult'];\n $payment->psp_reference = $getData['pspReference'];\n $payment->save();\n }", "title": "" }, { "docid": "e1d959e98b4a9af407b0b6ddbc0aa702", "score": "0.58806723", "text": "public function paymentAction()\n {\n try {\n $checkout = $this->_getCheckout();\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($checkout->getLastRealOrderId());\n if (!$order->getId()) {\n Mage::throwException($this->_helper->__('process_noOrderFound'));\n }\n\n\t\t\t$where = \" AND bp.order_id='\".$checkout->getLastRealOrderId().\"'\";\n\t\t\t$this->_setPaymentGateway($where);\n\t\t\t\n $collection=Mage::getModel(\"paymentgateway/paymentGateway\")\n ->getCollection()\n ->addFieldToSelect('*')\n ->addFieldToFilter('order_id',array('eq'=>$checkout->getLastRealOrderId()))\n ->addFieldToFilter('status',array('eq'=> BigFish_PaymentGateway_Helper_Data::TRANSACTION_STATUS_INITED))\n ->addOrder('created_time','desc')\n ->load();\n\n if($collection->getSize()==0) {\n Mage::throwException($this->_helper->__('process_noOrderFound'));\n }\n\n $item = $collection->fetchItem();\n $transactionId = $item->getTransactionId();\n\n $item->setStatus(BigFish_PaymentGateway_Helper_Data::TRANSACTION_STATUS_STARTED);\n $item->save();\n\n $log = Mage::getModel(\"paymentgateway/log\");\n $log->setPaymentgatewayId($item->getId())\n ->setCreatedTime(date(\"Y-m-d H:i:s\"))\n ->setStatus(BigFish_PaymentGateway_Helper_Data::TRANSACTION_STATUS_STARTED)\n ->setDebug(\"The customer was redirected to PaymentGateway.\")\n ->save();\n\n $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,\n $this->_helper->__('process_messageCustomerRedirected')\n );\n $order->save();\n\n $checkout->setPaymentGatewayQuoteId($checkout->getQuoteId());\n $checkout->setPaymentGatewayOrderId($checkout->getLastRealOrderId());\n $checkout->getQuote()->setIsActive(false)->save();\n $checkout->clear();\n\n\t\t\t$url = \\BigFish\\PaymentGateway::getStartUrl(new BigFish\\PaymentGateway\\Request\\Start($transactionId));\n\t\t\t$this->_redirectUrl($url);\n } catch (Exception $e) {\n Mage::logException($e);\n $this->_error($e->getMessage());\n }\n }", "title": "" }, { "docid": "3d3ccd1ff881b50e99c0cee9456596f3", "score": "0.587746", "text": "public function getStatus () {\r\n return $this->_status;\r\n }", "title": "" }, { "docid": "6419238eb28dfd421c47602bbf7e528b", "score": "0.5854758", "text": "function getPayment()\t{\n\t\tif($this->basket['payment'] == '')\n\t\t\t$this->setPayment($this->conf['payment.']['default']);\n\t\treturn $this->basket['payment'];\n\t}", "title": "" }, { "docid": "452eadde30f64f772e6d7146119d39ee", "score": "0.5854332", "text": "public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n if($paymentDetails['data']['status'] === 'success'){\n\n // Save to db\n $payment_successful = Payment::create([\n 'contestant_id' => $paymentDetails['data']['metadata']['contestant_id'],\n 'accname' => $paymentDetails['data']['metadata']['name'],\n 'email' => $paymentDetails['data']['customer']['email'],\n 'amount' => Session::get('amount'),\n 'votes' => Session::get('votes'),\n 'status' => 1,\n 'payment_method' => 'paystack',\n ]);\n\n if($payment_successful){\n $con = Contestant::where('id', $payment_successful->contestant_id)->get()->first();\n\n $con->votes += $payment_successful->votes;\n $con->save();\n }\n\n Session::flash('success', 'Payment Successful, your vote has been added');\n return redirect('contestants/voting-complete');\n }\n\n Session::flash('danger', 'Payment Failed, check your account balance or try again');\n return redirect();\n\n\n// dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "title": "" }, { "docid": "791038f2efa86708c5b9193badf93dd1", "score": "0.58495295", "text": "function isPendingPayment() {\r\n return $this->get('auth_mode') == 'MARK';\r\n }", "title": "" }, { "docid": "ded0cd9ee2ee9035a8ec77d6e5b01309", "score": "0.58370787", "text": "private function check()\n {\n try {\n $collectionOfLastUpdatedString = \\File::get(storage_path('logs/payment-status.log'));\n } catch (FileNotFoundException $exception) {\n write_log('Hello World');\n write_log('Started ...');\n\n exit();\n }\n\n # Clearing the log for the next one\n if (function_exists('exec')) {\n exec(\"truncate -s 0 \" . storage_path('logs/payment-status.log'));\n }\n\n # Filter the \\n from the string\n $collectionOfLastUpdatedString = trim(preg_replace('/\\s\\s+/', ' ', $collectionOfLastUpdatedString));\n\n # Exploding the comma separated string to array and filter the null/empty values\n $collectionOfLastUpdatedArr = array_filter(explode(',', $collectionOfLastUpdatedString));\n\n # Getting the last transaction id\n $lastUpdatedTransactionId = end($collectionOfLastUpdatedArr);\n\n # If is not null or empty get the\n if ($lastUpdatedTransactionId) {\n $lastTransactionId = app('db')->table('transactions')\n ->where('id', $lastUpdatedTransactionId)\n ->value('id');\n }\n\n $query = \\Modules\\Payment\\Payment::query();\n\n if (isset($lastTransactionId)) {\n $query = $query->where('id','>=', $lastTransactionId);\n }\n\n $query->orderBy('created_at', 'ASC')\n ->take(10)\n ->cursor()->each(function ($transaction) {\n write_log($transaction->id);\n $response = $this->callRespectiveGateway($transaction, $transaction->payment_gateway_id);\n\n if (is_null($response)) {\n write_log($transaction->id .' failed to check the status for ', 'payment-status-error');\n } else {\n if ($transaction) {\n\n if ($response->status) {\n $transaction->update([\n 'status' => Payment::PAYMENT_STATUS_DELIVERED,\n ]);\n }\n\n if ($response->response) {\n $transaction->update([\n 'metas' => array_merge( (array) $transaction->metas, (array) $response->response),\n ]);\n }\n\n }\n }\n });\n }", "title": "" }, { "docid": "e02106d4ac9d66a2f2175fab7ff1268f", "score": "0.5834847", "text": "public function status()\n {\n return ($this->status)? 'Active': 'Pending';\n }", "title": "" }, { "docid": "5ad524d989d2bf92ffe40c6cb9bf466e", "score": "0.5831851", "text": "public function getPaymentGateway()\n {\n return app(SettingService::class)->pluck('expense_payment_gateways')[0];\n }", "title": "" }, { "docid": "856888ef2b3f142248adf930bf732163", "score": "0.58299744", "text": "public function handleGatewayCallback()\n {\n\n $paymentDetails = Paystack::getPaymentData();\n\n $user=Auth::user();\n if($paymentDetails['status']==true){\n $data= $paymentDetails['data'];\n $customer =$data['customer'];\n $amount =$data['amount'];\n if($customer['email']==$user['email']){\n $tran =DB::table('subcription_hys')->where('email', '=', $user['email'])->latest()->get();\n $trans_id=$tran[0]->sub_id;\n DB::table('subcription_hys')->where('email', '=', $user['email'])->where('sub_id', '=', $trans_id)->update(['status' => \"successful\"]);\n $sub =DB::table('subcriptions')->where('email', '=', $user['email'])->latest()->get();\n switch ($amount) {\n case 100000:\n $unit = $sub[0]->unit+1;\n break;\n case 1700000:\n $unit = $sub[0]->unit+20;\n break;\n case 4500000:\n $unit = $sub[0]->unit+60;\n break;\n case 7200000:\n $unit = $sub[0]->unit+120;\n break;\n default:\n $unit = $sub[0]->unit+0;\n break;\n }\n\n DB::table('subcriptions')->where('email', '=', $user['email'])->update(['unit' => $unit]);\n return redirect('/home');\n }else{\n return redirect('/home');\n }\n }\n //dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "title": "" }, { "docid": "cf085dbd349ede72158a70b7d6a3f1d8", "score": "0.5828242", "text": "public function getStatus()\n {\n return data_get($this->fields, 'ok', false);\n }", "title": "" }, { "docid": "e686c0fe105f76cc2fbeabd0f6e1dfbe", "score": "0.5825528", "text": "public function status() {\n\t\treturn $this->_status;\n\t}", "title": "" }, { "docid": "24486c5b2dadf6449394a1b934e8b53b", "score": "0.5824021", "text": "public function getStatus()\n {\n if (parent::getStatus() == 'disabled')\n return 'expired'; // red dot\n \n return 'live'; // green dot\n }", "title": "" }, { "docid": "cc27a560072875c55748568d18cdc2b8", "score": "0.5822221", "text": "public function get_status()\n\t{\n\t\treturn $this->_status;\n\t}", "title": "" }, { "docid": "becb08ab610b65fae7a61e094ab8b30f", "score": "0.581421", "text": "protected function _filterPaymentStatus($ipnPaymentStatus)\n {\n switch ($ipnPaymentStatus) {\n case 'Created': // break is intentionally omitted\n case 'Completed': return Mage_Paypal_Model_Info::PAYMENTSTATUS_COMPLETED;\n case 'Denied': return Mage_Paypal_Model_Info::PAYMENTSTATUS_DENIED;\n case 'Expired': return Mage_Paypal_Model_Info::PAYMENTSTATUS_EXPIRED;\n case 'Failed': return Mage_Paypal_Model_Info::PAYMENTSTATUS_FAILED;\n case 'Pending': return Mage_Paypal_Model_Info::PAYMENTSTATUS_PENDING;\n case 'Refunded': return Mage_Paypal_Model_Info::PAYMENTSTATUS_REFUNDED;\n case 'Reversed': return Mage_Paypal_Model_Info::PAYMENTSTATUS_REVERSED;\n case 'Canceled_Reversal': return Mage_Paypal_Model_Info::PAYMENTSTATUS_UNREVERSED;\n case 'Processed': return Mage_Paypal_Model_Info::PAYMENTSTATUS_PROCESSED;\n case 'Voided': return Mage_Paypal_Model_Info::PAYMENTSTATUS_VOIDED;\n }\n return '';\n// documented in NVP, but not documented in IPN:\n//Mage_Paypal_Model_Info::PAYMENTSTATUS_NONE\n//Mage_Paypal_Model_Info::PAYMENTSTATUS_INPROGRESS\n//Mage_Paypal_Model_Info::PAYMENTSTATUS_REFUNDEDPART\n }", "title": "" }, { "docid": "a571d3a11e4455cc0896f9bd850833f8", "score": "0.5809906", "text": "function getStatus();", "title": "" }, { "docid": "ee59732b8fbf243f0bc0d856664547ad", "score": "0.58083934", "text": "public function getStatus() {\n return $this->status;\n }", "title": "" } ]
5a84649724da75340415a1aceec2cb91
Load options for other select on change.
[ { "docid": "0cb9e43f88ebe2f191369570ca3444ba", "score": "0.0", "text": "public function load($field, $url, $idField = 'id', $textField = 'text', bool $allowClear = true)\n {\n if (Str::contains($field, '.')) {\n $field = $this->formatName($field);\n $class = str_replace(['[', ']'], '_', $field);\n } else {\n $class = $field;\n }\n\n $this->additional_script .= <<<JS\n\n let elm = document.querySelector(\"{$this->getElementClassSelector()}\");\n var lookupTimeout;\n elm.addEventListener('change', function(event) {\n var query = {$this->choicesObjName()}.getValue().value;\n var current_value = {$this->choicesObjName($field)}.getValue().value;\n admin.ajax.post(\"{$url}\",{query:query},function(data){\n let found = false;\n for (i in data.data){\n if (data.data[i].id == current_value){\n data.data[i].selected = true;\n found = true;\n }\n }\n if (!found){\n data.data.push({'{$idField}':'','{$textField}':'','selected':true});\n }\n {$this->choicesObjName($field)}.setChoices(data.data, '{$idField}', '{$textField}', true);\n })\n });\nJS;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "e8300e325b3202c79974972e17ce56a3", "score": "0.6021499", "text": "public function refreshOptions($event)\n {\n $this->selectedValues[] = $event['value'];\n $this->emit('option-manager.selectedValues', $this->selectedValues);\n $this->options = ProductOption::with('values')->findMany($this->options->pluck('id'));\n }", "title": "" }, { "docid": "7724fdbd137808c461b061b7844afb1b", "score": "0.60125947", "text": "public function initAllOptValues() {\n\t\t$this->getAll();\n\t}", "title": "" }, { "docid": "94ee0c40b2a26871424fce3f21d5de79", "score": "0.59879225", "text": "function loadSelectDependiente($tabla, $campo1, $campo2, $campo3, $codigo1, $codigo2, $opt) {\r\n\tconnect();\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo3 = '$codigo2' ORDER BY $campo1\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $codigo1) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=htmlentities($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 = '$codigo1'\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities($field[1])?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "91cad66e55b8aa756bf9c1ae92abfe17", "score": "0.596258", "text": "public function load_options()\n {\n // Set option defaults.\n $default_options = array(self::rss_uri_opt_name => '',\n self::section_id_opt_name => '',\n self::topic_id_opt_name => '',\n self::category_id_opt_name => '',\n self::author_account_opt_name => '',\n self::security_code_opt_name => '',\n self::widget_config_id_opt_name => '',\n self::widget_theme_opt_name => 'transparent');\n // Load options into the current_options array, and creating if needed.\n foreach($this->options as $option_name)\n {\n $opt = get_option($option_name);\n if ($opt == false || $opt == '')\n {\n $this->current_options[$option_name] = $default_options[$option_name];\n add_option($option_name, $default_options[$option_name]);\n }\n else\n {\n $this->current_options[$option_name] = $opt;\n }\n }\n }", "title": "" }, { "docid": "1d6cc5a9bc9ac44af099d9481d4b6462", "score": "0.5939408", "text": "function loadSelectDependiente($tabla, $campo1, $campo2, $campo3, $codigo1, $codigo2, $opt) {\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo3 = '$codigo2' ORDER BY $campo1\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $codigo1) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 = '$codigo1'\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "ec9f71c84cca2e7d10583651edfbb723", "score": "0.5840884", "text": "protected function _setOptions() {\n\n\t\t\t$options = array(\n\t\t\t\t'Tauxcgcui' => array(\n\t\t\t\t\t'secteurcui_id' => $this->Tauxcgcui->Secteurcui->find( 'list', array( 'fields' => array( 'id', 'name' ) ) )\n\t\t\t\t)\n\t\t\t);\n\t\t\t$options = Set::merge(\n\t\t\t\t$options,\n\t\t\t\t$this->Tauxcgcui->enums()\n\t\t\t);\n\t\t\t$this->set( compact( 'options' ) );\n\n\t\t\t// Affichage des valeurs non marchnades si le secteur choisi est de type non marchand\n\t\t\t$valeursSecteurcui = $this->Tauxcgcui->Secteurcui->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'order' => array( 'Secteurcui.isnonmarchand DESC', 'Secteurcui.name ASC' )\n\t\t\t\t)\n\t\t\t);\n\t\t\t$secteur_isnonmarchand_id = Hash::extract( $valeursSecteurcui, '{n}.Secteurcui[isnonmarchand=1].id' );\n\t\t\t$this->set( compact( 'secteur_isnonmarchand_id' ) );\n\t\t}", "title": "" }, { "docid": "9ba28412e35892f5555bcc4b490ba58f", "score": "0.5763129", "text": "protected function _prepareValueOptions()\n {\n $selectReady = $this->getData('value_select_options');\n $hashedReady = $this->getData('value_option');\n if ($selectReady && $hashedReady) {\n return $this;\n }\n\n // Get array of select options. It will be used as source for hashed options\n $selectOptions = null;\n if ($this->getAttribute() === 'attribute_set_id') {\n $entityTypeId = Mage::getSingleton('eav/config')\n ->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getId();\n $selectOptions = Mage::getResourceModel('eav/entity_attribute_set_collection')\n ->setEntityTypeFilter($entityTypeId)\n ->load()\n ->toOptionArray();\n } elseif($this->getAttribute() === 'type_id'){\n $selectOptions = Mage::getModel('catalog/product_type')->getAllOptions();\n foreach($selectOptions as $idx => $_opt){\n if($_opt['value'] == '')\n unset($selectOptions[$idx]);\n }\n\n } elseif (is_object($this->getAttributeObject())) {\n $attributeObject = $this->getAttributeObject();\n if ($attributeObject->usesSource()) {\n if ($attributeObject->getFrontendInput() == 'multiselect') {\n $addEmptyOption = false;\n } else {\n $addEmptyOption = true;\n }\n $selectOptions = $attributeObject->getSource()->getAllOptions($addEmptyOption);\n }\n }\n\n // Set new values only if we really got them\n if ($selectOptions !== null) {\n // Overwrite only not already existing values\n if (!$selectReady) {\n $this->setData('value_select_options', $selectOptions);\n }\n if (!$hashedReady) {\n $hashedOptions = array();\n foreach ($selectOptions as $o) {\n if (is_array($o['value'])) {\n continue; // We cannot use array as index\n }\n $hashedOptions[$o['value']] = $o['label'];\n }\n $this->setData('value_option', $hashedOptions);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "5224dc5ff56d36198e947129feda5abd", "score": "0.57428354", "text": "function loadSelect($tabla, $campo1, $campo2, $codigo, $opt) {\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla ORDER BY $campo1\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t if ($field[0] == $codigo) { \r\n\t\t\t \t?> \r\n\t\t\t\t<option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities(utf8_decode($field[1]))?></option>\r\n\t\t\t <? }\r\n\t\t\t\telse {?>\r\n\t\t\t\t\t<option value=\"<?php echo $field[0];?>\"><?php echo $field[1];?></option><? \r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 = '$codigo'\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities(utf8_decode($field[1]))?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "ae2fdc00957b6e27ea83eded68da4bae", "score": "0.57373637", "text": "function load_options() {\n\t\t$this->options = (array) get_option('uclane-options');\n\t\t$this->options = array_merge( $this->default_options(), $this->options);\n\n\t}", "title": "" }, { "docid": "4934af1e747694fe0707679d40b15a0b", "score": "0.5708972", "text": "private function loadGeneralOptions(): void\n {\n $this->generalOptions = $this->entityManager->getRepository(General::class)->getAllOptions();\n }", "title": "" }, { "docid": "ebc1accb277fc36a9b89fea2bbd9ad83", "score": "0.5675316", "text": "function loadSelect($tabla, $campo1, $campo2, $codigo, $opt) {\r\n\tconnect();\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla ORDER BY $campo1\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $codigo) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=htmlentities($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 = '$codigo'\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities($field[1])?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "2296c776d9c8a75cdf6944471134695e", "score": "0.5667891", "text": "function loadSelectValores($tabla, $codigo, $opt) {\r\n\tswitch ($tabla) {\r\n\t\tcase \"ESTADO\":\r\n\t\t\t$c[0] = \"A\"; $v[0] = \"Activo\";\r\n\t\t\t$c[1] = \"I\"; $v[1] = \"Inactivo\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"PRIORIDAD\":\r\n\t\t\t$c[0] = \"N\"; $v[0] = \"Normal\";\r\n\t\t\t$c[1] = \"U\"; $v[1] = \"Urgente\";\r\n\t\t\t$c[2] = \"M\"; $v[2] = \"Muy Urgente\";\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\t$i = 0;\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) echo \"<option value='\".$cod.\"' selected>\".htmlentities($v[$i]).\"</option>\";\r\n\t\t\t\telse echo \"<option value='\".$cod.\"'>\".htmlentities($v[$i]).\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) echo \"<option value='\".$cod.\"' selected>\".htmlentities($v[$i]).\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "54b59128e6bd9c6f2e46d65526ddbd62", "score": "0.56624734", "text": "final protected function reloadOptions() {\n $this->_options = array();\n $this->loadOptions();\n }", "title": "" }, { "docid": "973c66be9b002072d540b78dd18998f6", "score": "0.5655035", "text": "public function syncOptions($ids)\n {\n $this->options = ProductOption::with('values')->findMany($ids);\n }", "title": "" }, { "docid": "bc8d05cbe1bd2a0552baa135260be5e9", "score": "0.55766374", "text": "protected function _prepareValueOptions()\r\n {\r\n $selectReady = $this->getData('value_select_options');\r\n $hashedReady = $this->getData('value_option');\r\n if ($selectReady && $hashedReady) {\r\n return $this;\r\n }\r\n\r\n // Get array of select options. It will be used as source for hashed options\r\n $selectOptions = null;\r\n if ($this->getAttribute() === 'attribute_set_id') {\r\n $entityTypeId = Mage::getSingleton('eav/config')\r\n ->getEntityType('catalog_product')->getId();\r\n $selectOptions = Mage::getResourceModel('eav/entity_attribute_set_collection')\r\n ->setEntityTypeFilter($entityTypeId)\r\n ->load()\r\n ->toOptionArray();\r\n } else if (is_object($this->getAttributeObject())) {\r\n $attributeObject = $this->getAttributeObject();\r\n if ($attributeObject->usesSource()) {\r\n if ($attributeObject->getFrontendInput() == 'multiselect') {\r\n $addEmptyOption = false;\r\n } else {\r\n $addEmptyOption = true;\r\n }\r\n $selectOptions = $attributeObject->getSource()->getAllOptions($addEmptyOption);\r\n }\r\n }\r\n\r\n // Set new values only if we really got them\r\n if ($selectOptions !== null) {\r\n // Overwrite only not already existing values\r\n if (!$selectReady) {\r\n $this->setData('value_select_options', $selectOptions);\r\n }\r\n if (!$hashedReady) {\r\n $hashedOptions = array();\r\n foreach ($selectOptions as $o) {\r\n if (is_array($o['value'])) {\r\n continue; // We cannot use array as index\r\n }\r\n $hashedOptions[$o['value']] = $o['label'];\r\n }\r\n $this->setData('value_option', $hashedOptions);\r\n }\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "d7bb3b96ee0533d4e09628ff6b6a1932", "score": "0.5575223", "text": "protected function setOptionDataForm($where = array()){\r\n parent::setOptionDataForm($where);\r\n \n\t\t$this->load->model('role_model','fk_role_id');\n\t\t/* adjust second parameter on function dropdown with your column name to show in dropdown */\n\t\t$dataFk_role_id = $this->fk_role_id->dropdown('id','name');\n\t\t$this->form['role_id']['options'] = $dataFk_role_id;\n\t\t$this->load->model('menus_model','fk_menu_id');\n\t\t/* adjust second parameter on function dropdown with your column name to show in dropdown */\n\t\t$dataFk_menu_id = $this->fk_menu_id->dropdown('id','name');\n\t\t$this->form['menu_id']['options'] = $dataFk_menu_id;\r\n }", "title": "" }, { "docid": "9318d4d5c59801e65f107a25d583588f", "score": "0.5555927", "text": "public function getAllOptions()\r\n {\r\n if (is_null($this->_options)) {\r\n $this->_options = array(\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Selecteaza'),\r\n 'value' => '',\r\n 'selected' => 'selected'\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Alba'),\r\n 'value' => 278\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Arad'),\r\n 'value' => 279\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Arges'),\r\n 'value' => 280\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Bacau'),\r\n 'value' => 281\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Bihor'),\r\n 'value' => 282\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Bistrita Nasaud'),\r\n 'value' => 283\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Botosani'),\r\n 'value' => 284\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Brasov'),\r\n 'value' => 285\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Braila'),\r\n 'value' => 286\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Bucuresti'),\r\n 'value' => 287\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Buzau'),\r\n 'value' => 288\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Caras-Severin'),\r\n 'value' => 289\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Calarasi'),\r\n 'value' => 290\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Cluj'),\r\n 'value' => 291\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Constanta'),\r\n 'value' => 292\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Covasna'),\r\n 'value' => 293\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Dambovita'),\r\n 'value' =>294\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Dolj'),\r\n 'value' => 295\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Galati'),\r\n 'value' => 296\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Giurgiu'),\r\n 'value' => 297\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Gorj'),\r\n 'value' => 298\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Harghita'),\r\n 'value' => 299\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Hunedoara'),\r\n 'value' => 300\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Ialomita'),\r\n 'value' => 301\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Iasi'),\r\n 'value' => 302\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Ilfov'),\r\n 'value' => 303\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Maramures'),\r\n 'value' => 304\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Mehedinti'),\r\n 'value' => 305\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Mures'),\r\n 'value' => 306\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Neamt'),\r\n 'value' => 307\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Olt'),\r\n 'value' => 308\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Prahova'),\r\n 'value' => 309\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Satu-Mare'),\r\n 'value' => 310\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Salaj'),\r\n 'value' => 311\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Sibiu'),\r\n 'value' => 312\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Suceava'),\r\n 'value' => 313\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Teleorman'),\r\n 'value' => 314\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Timis'),\r\n 'value' => 315\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Tulcea'),\r\n 'value' => 316\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Vaslui'),\r\n 'value' => 317\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Vâlcea'),\r\n 'value' => 318\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Vrancea'),\r\n 'value' => 319\r\n ),\r\n \r\n );\r\n }\r\n return $this->_options;\r\n }", "title": "" }, { "docid": "72863402eaca55db6a422eab1c90187a", "score": "0.5540714", "text": "public function loadOptions()\n {\n }", "title": "" }, { "docid": "fc243f4e6cb9f7c75839943a52ead6a9", "score": "0.55299944", "text": "function loadSelectClasificacion($tabla, $campo1, $campo2, $codigo, $opt) {\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 <> 'RAU' ORDER BY $campo1\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $codigo) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT $campo1, $campo2 FROM $tabla WHERE $campo1 = '$codigo' AND $campo1 <> 'RAU'\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "712461afc7642311c6e4dbce9fb1ba99", "score": "0.5499198", "text": "protected function initInternalOptions()\n {\n $this->_internalOptions = [\n 'id' => ArrayHelper::remove($this->options, 'id'),\n 'data-initialize' => 'combobox'\n ];\n\n }", "title": "" }, { "docid": "6d2b2b74a8d615f3de813baf9e2ebcce", "score": "0.5491582", "text": "public function load_settings_values() {\n\t\t\t$this->settings_values_loaded = true;\n\t\t\t$this->setting_option_values = get_option( $this->setting_option_key );\n\t\t}", "title": "" }, { "docid": "c552ff3450c91da653c08b6a76b8be7d", "score": "0.5466035", "text": "private static function _load_option() {\n\t\t$sections = MPT_Plugin::get_default_settings_sections();\n\t\t$settings = MPT_Plugin::get_default_settings_fields();\n\t\t$defaults = array();\n\t\t\n\t\t// Merge all current DB option\n\t\t$current_options = array();\n\t\t\n\t\t// Loop on each section\n\t\tforeach( $sections as $section ) {\n\t\t\t$settings_names = wp_list_pluck( $settings[$section['id']], 'name' );\n\t\t\t\n\t\t\tforeach( $settings_names as $index => $name ) {\n\t\t\t\t$defaults[$section['id']][$name] = isset( $settings[$section['id']][$index]['default'] ) ? $settings[$section['id']][$index]['default'] : '' ;\n\t\t\t}\n\t\t\t\n\t\t\t$current_options[$section['id']] = wp_parse_args( (array) get_option( $section['id'] ), $defaults[$section['id']] );\n\t\t}\n\t\t\n\t\tself::$options = $current_options;\n\t}", "title": "" }, { "docid": "9e50ae11873e2462f9880180562c72df", "score": "0.5465439", "text": "public function prepareCrazySelectData()\n {\n\n $this->template = 'crazyselect';\n $this->id = $this->id ? $this->id : $this->name;\n $this->data('id', $this->id);\n // nếu có search url trực tiếp\n $this->parseRouteUrl('search');\n if ($sf = $this->d->get('search-field')) {\n $this->data('search-field', $sf);\n } else {\n $this->data('search-field', 'search');\n }\n $this->parseDataEvent('change');\n\n if ($sp = $this->d->get('search-params')) {\n $this->data('search-params', $sp);\n }\n\n\n if ($this->parseRouteUrl('add')) {\n if ($af = $this->d->get('add-field')) {\n $this->data('add-field', $af);\n } else {\n $this->data('add-field', 'name');\n }\n\n if ($add_params = $this->d->get('add-params')) {\n $arr = [];\n if ($params = $this->parseInputParams($add_params)) {\n $this->data('add-params', $params);\n }\n }\n }\n if (in_array(strtolower($type = $this->d->get('select-type')), ['dynamic', 'search'])) {\n $this->data('select-type', $type);\n $this->data('advance-click', $this->d->get('advance-click'));\n if ($at = $this->d->get('advance-text')) {\n $this->data('advance-text', $at);\n } else {\n $this->data('advance-text', 'Thêm');\n }\n } else {\n $this->data('select-type', 'static');\n }\n\n if (in_array(strtolower($typ = $this->d->get('label-type')), ['header', 'value', 'label'])) {\n $this->data('label-type', $typ);\n } else {\n $this->data('label-type', 'label');\n }\n\n if ($cc = $this->d->get('confirm-change')) {\n $this->data('confirm-change', $cc);\n }\n if ($dis = $this->d->get('disable-search')) {\n $this->data('disable-search', 'true');\n }\n }", "title": "" }, { "docid": "af8ba7e6a022fa833dcdf960119aa844", "score": "0.54640526", "text": "function initOptions(){\n\t\t// save default options, in case we want to restore them later\n\t\t$this->defaultOptions = $this->options;\n\t\tif ($options = get_option($this->domain())) {\n\t\t\t$this->options = set_merge($this->options,unserialize($options));\n\t\t}\n\t}", "title": "" }, { "docid": "ce5d40fc0465c611f177e92788aeb418", "score": "0.54528415", "text": "private function prepare_select_multiple() {\r\n\t\r\n\t\t$selectedOption = $this->selectedOptions;\r\n\t\t//var_dump($selectedOption);\r\n\t\techo '<select ';\r\n\t\techo 'name = \"'.$this->name.'\" ';\r\n\t\techo (isset($this->settings['id']))? 'id = \"'.$this->settings['id'].'\" ':null;\r\n\t\techo (isset($this->settings['style']))? $this->settings['style']:null;\r\n\t\techo (isset($this->settings['disabled']) && $this->settings['disabled'])? 'disabled=\"disabled\"':null;\r\n\t\techo ' >';\r\n\t\tforeach($this->options as $option=>$optionText){\r\n\t\t\t\t\r\n\t\t\tif($selectedOption == $option){\r\n\t\t\t\t$selected = 'selected=\"selected\"';\r\n\t\t\t}else{\r\n\t\t\t\t$selected = '';\r\n\t\t\t}//end if\r\n\t\t\t\t\r\n\t\t\t//echo '<option value=\"'.$option.'\" '.$selected.'>'.$optionText.'</option>';\r\n\t\t\t\t\r\n\t\t\techo '<option value =\"'.$option.'\" ';\r\n\t\t\techo (in_array( $option,$selectedOption)) ? 'selected = \"selected\"' :'';\r\n\t\t\techo '>'. $optionText. '</option>';\r\n\t\t\t\r\n\t\t}//end foreach\r\n\t\t\r\n\t\t/*\r\n\t\tforeach($data['attributes'] as $attribute => $value){\r\n\t\t\techo $attribute .'= \"'. $value;\r\n\t\t\techo ($attribute == 'name')? '[]':'';\r\n\t\t\techo '\" ';\r\n\t\t}\r\n\t\techo ' multiple>';\r\n\t\t\t\t\r\n\t\tforeach($data['options'] as $optionVal => $optionText){\r\n\t\t\techo '<option value =\"'.$optionVal.'\" ';\r\n\t\t\techo (in_array( $optionVal,$data['selected_vals'])) ? 'selected = \"selected\"' :'';\r\n\t\t\techo '>'. $optionText. '</option>';\r\n\t\t}\r\n\t\t*/\r\n\t\techo '</select>';\r\n\t\t//echo '<br>';\r\n\t\t//$this->addMsgSpan($data['attributes']['name'],$data['field_msg']);\r\n\t\r\n\t}", "title": "" }, { "docid": "fcc1b75c2784cb46033771fb15cf005b", "score": "0.5420342", "text": "public function init() {\n\t $this->load_options();\n\t }", "title": "" }, { "docid": "8e9e125cfa06c79e01318e5a33326353", "score": "0.54157436", "text": "public function displayAll() {\r\n\t\t$this->form->addJavascriptFile('jquery.js');\r\n\t\t$this->form->addJavascriptFile('dependent_dropdown.js');\r\n\t\t\r\n\t\t$classes[] = 'dependent_dropdown_field';\r\n\t\tif($this->isMaster){\r\n\t\t\tif($this->isSlave){\r\n\t\t\t\t$classes[] = 'master';\r\n\t\t\t\t$classes[] = 'slave';\r\n\t\t\t}else{\r\n\t\t\t\t$classes[] = 'master_only';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($this->isSlave){\r\n\t\t\t\t$classes[] = 'slave_only';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$classes = implode(' ', $classes);\r\n\t\t\r\n\t\tif($this->slavesLinker){\r\n\t\t\t$slaves = $this->slavesLinker->getSlaves();\r\n\t\t\t$slavesIds = array_map(function($s){\r\n\t\t\t\tif($s instanceof DependentDropDownField){\r\n\t\t\t\t\treturn $s->getSelectId();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}, $slaves);\r\n\t\t\t$slavesIdsJS = Utils::php2js($slavesIds);\r\n\t\t\t\r\n\t\t\t$data = $this->data;\r\n\t\t\t$dataJS = Utils::php2js($data);\r\n\t\t}\r\n\t?>\r\n\t\t<div class=\"<?php echo $classes;?>\">\r\n\t\t\t<div class=\"label_error\"><?php\r\n\t\t\t$this->insertLabel();\r\n\t\t\t$this->insertErrorMessage();\r\n\t\t\t?></div>\r\n\t\t\t<select name=\"<?php echo $this->identifier; ?>\"\r\n\t\t\t\tid=\"<?php echo $this->identifier; ?>\"\r\n\t\t\t\tclass=\"dependent_selected_<?php echo $this->value; ?>\"\r\n\t\t\t\t<?php if($this->slavesLinker): ?>\r\n\t\t\t\t\tonChange=\"onSelectChange(this, <?php echo $slavesIdsJS; ?>, <?php echo $dataJS; ?>);\"\r\n\t\t\t\t<?php endif; ?>\r\n\t\t\t\t><?php\r\n\t\t\t\tforeach($this->valuesDescriptions as $key => $value){\r\n\t\t\t\t\t$this->insertOption( $key, $value );\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</select>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "title": "" }, { "docid": "85cefb51d88b06f08aedc0ebddb13e80", "score": "0.53781146", "text": "function poblar_select_subfamilias(){\n\t\t$familia_id=$this->uri->segment(3);\n\t\t$m=new Subfamilia_producto();\n\t\t$m->where('familia_id', $familia_id)->order_by(\"tag\")->get();\n\t\tif($m->c_rows>0){\n\t\t\techo \"<option value='0'>Elija</option>\";\n\t\t\tforeach($m as $row){\n\t\t\t\techo \"<option value='$row->id'>$row->clave - $row->tag</option>\";\n\t\t\t}\n\t\t} else\n\t\t\techo \"<option value='0'>Sin Subfamilias</option>\";\n\t}", "title": "" }, { "docid": "1d0450a1b727020d747bdccfb63f3ca1", "score": "0.5374533", "text": "public abstract function load_options();", "title": "" }, { "docid": "3881628c503d849af57be356053f490b", "score": "0.5369805", "text": "public function addSelectOptions($ak, $data, $selectOptions)\n {\n $defaults = array(\n 'akSelectAllowMultipleValues' => 0,\n 'akSelectAllowOtherValues' => 0,\n 'akSelectOptionDisplayOrder' => 'display_asc'\n );\n\n $data = array_merge($defaults, $data);\n\n $db = Loader::db();\n\n $initialOptionSet = array();//$attr->getOptions();\n\n $akSelectAllowMultipleValues = $data['akSelectAllowMultipleValues'];\n $akSelectAllowOtherValues = $data['akSelectAllowOtherValues'];\n $akSelectOptionDisplayOrder = $data['akSelectOptionDisplayOrder'];\n\n if ($data['akSelectAllowMultipleValues'] != 1) {\n $akSelectAllowMultipleValues = 0;\n }\n if ($data['akSelectAllowOtherValues'] != 1) {\n $akSelectAllowOtherValues = 0;\n }\n if (!in_array($data['akSelectOptionDisplayOrder'], array('display_asc', 'alpha_asc', 'popularity_desc'))) {\n $akSelectOptionDisplayOrder = 'display_asc';\n }\n\n // now we have a collection attribute key object above.\n $db->Replace('atSelectSettings', array(\n 'akID' => $ak->getAttributeKeyID(),\n 'akSelectAllowMultipleValues' => $akSelectAllowMultipleValues,\n 'akSelectAllowOtherValues' => $akSelectAllowOtherValues,\n 'akSelectOptionDisplayOrder' => $akSelectOptionDisplayOrder\n ), array('akID'), true);\n\n // Now we add the options\n $newOptionSet = new SelectAttributeTypeOptionList();\n $displayOrder = 0;\n foreach ($selectOptions as $option) {\n $opt = SelectAttributeTypeOption::getByValue(t($option), $ak);\n\n if (!is_object($opt)) {\n $opt = SelectAttributeTypeOption::add($ak, t($option));\n }\n\n if ($akSelectOptionDisplayOrder == 'display_asc') {\n $opt->setDisplayOrder($displayOrder);\n }\n $newOptionSet->add($opt);\n $displayOrder++;\n }\n\n // Now we remove all options that appear in the\n // old values list but not in the new\n foreach ($initialOptionSet as $iopt) {\n if (!$newOptionSet->contains($iopt)) {\n $iopt->delete();\n }\n }\n }", "title": "" }, { "docid": "23e1e439796757eeabd8e88357c77032", "score": "0.5335524", "text": "public function get_selects()\n\t{\n\t\t$this->selects = array(\n\t\t\t'tr_tracker'\t=> $this->ui->trackers,\n\t\t\t'cat_id' => $this->ui->get_tracker_labels('cat', null),\n\t\t\t'tr_version'\t=> $this->ui->get_tracker_labels('version', null),\n\t\t\t'tr_status'\t=> $this->ui->get_tracker_stati(null),\n\t\t\t'tr_resolution'\t=> $this->ui->get_tracker_labels('resolution',null),\n\t\t\t'tr_priority'\t=> $this->ui->get_tracker_priorities(),\n\t\t\t'tr_private'\t=> array('' => lang('no'),0 => lang('no'),'1'=>lang('yes')),\n\t\t\t'tr_completion' => Api\\Etemplate\\Widget\\Select::typeOptions('select-percent',\"\")\n\t\t);\n\t\tforeach(array_keys($this->selects['tr_tracker']) as $id)\n\t\t{\n\t\t\t$this->selects['cat_id'] += $this->ui->get_tracker_labels('cat', $id);\n\t\t\t$this->selects['tr_version'] += $this->ui->get_tracker_labels('version', $id);\n\t\t\t$this->selects['tr_status'] += $this->ui->get_tracker_stati($id);\n\t\t\t$this->selects['tr_resolution'] += $this->ui->get_tracker_labels('resolution',$id);\n\t\t\t$this->selects['tr_priority'] += $this->ui->get_tracker_priorities($id);\n\t\t}\n\t}", "title": "" }, { "docid": "4cbb602b4c2cbf1b821efcfbbb089991", "score": "0.5332817", "text": "function form_init_data() \n {\n \t$this->set_hidden_element_value(\"option\", \"selvalue\");\n \n\treturn;\n }", "title": "" }, { "docid": "3ef63106a2af815f71e18f9b836a6555", "score": "0.53299296", "text": "private function initOptions() {\n\t\t$security_services = $this->ComplianceManagement->SecurityService->find('list', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'SecurityService.security_service_type_id' => SECURITY_SERVICE_PRODUCTION\n\t\t\t),\n\t\t\t'order' => array('SecurityService.name' => 'ASC'),\n\t\t\t'recursive' => -1\n\t\t));\n\n\t\t$security_policies = $this->getSecurityPoliciesList();\n\n\t\t$this->set( 'security_services', $security_services );\n\t\t$this->set( 'security_policies', $security_policies );\n\t}", "title": "" }, { "docid": "b0a0035678ecc07e5fa6a795ea128d2a", "score": "0.5283568", "text": "function combobox_kelas()\n\t\t{\n\t\t\t$jurusan = $_GET['kd_jurusan'];\n\t\t\techo \"<select id='cbkelas' name='kelas' class='form-control' onChange='loadSiswa()'>\";\n\n\t\t\t$this->db->where('kd_jurusan', $jurusan);\n\t\t\t$kelas = $this->db->get('tbl_kelas');\n\t\t\tforeach ($kelas->result() as $row) {\n\t\t\t\techo \"<option value='$row->kd_kelas' onChange='loadSiswa()'>$row->nama_kelas</option>\";\n\t\t\t}\n\n\t\t\techo \"</select>\";\n\t\t}", "title": "" }, { "docid": "02448a52eb7296596bddc2fd37795985", "score": "0.52722126", "text": "protected function _setSelects() {\r\n\t\t$this->MiEmail->bindUsers();\r\n\t\t$conditions = array();\r\n\t\t$fields = array();\r\n\t\tif ($this->MiEmail->FromUser->hasField('username')) {\r\n\t\t\t$fields = array('FromUser.username');\r\n\t\t}\r\n\t\tif ($this->data) {\r\n\t\t\t$from = Set::extract('{n}.MiEmail.from_user_id', $this->data);\r\n\t\t\t$to = Set::extract('{n}.MiEmail.to_user_id', $this->data);\r\n\t\t\t$conditions['FromUser.id'] = array_unique(array_merge($from, $to));\r\n\t\t}\r\n\t\t$this->set('users', $this->MiEmail->FromUser->find('list', compact('conditions','fields')));\r\n\t}", "title": "" }, { "docid": "a50929a3168779128656fe03f0cc077f", "score": "0.5253081", "text": "function setFrom($where) {\n foreach ($this->getFields() as $field) {\n if (isset($where[$field])) {\n $this->_options[$field] = $where[$field];\n }\n }\n }", "title": "" }, { "docid": "8f242d37fe3916e229b5b72543fdfec9", "score": "0.5250156", "text": "private function updateOptions() {\n $_options = array();\n $defaultKeys = array_keys(self::$defaultOptions);\n foreach($this->options as $key => $value) {\n if(in_array($key, $defaultKeys)) {\n $_options[$key] = $value;\n }\n }\n $this->options = $_options;\n update_option(get_class($this), $this->options);\n }", "title": "" }, { "docid": "ffac73229112da9a5a6acfee270c1f0b", "score": "0.52479154", "text": "public function tech_dropdown_static(){\n\t\tglobal $sites;\n\t\tif(empty($sites)) $sites = Site::get_sites();\n\n\t\tforeach($sites as $site){\n\t\t\tif($site->id == $this->site_id){\n\t\t\t\t?><select name=\"tech_id_<?php echo $this->id;?>\" id=\"tech_id_<?php echo $this->id;?>\">\n\t\t\t\t\t<option></option>\n\t\t\t\t\t\n\t\t\t\t\t<?php for($i=0; $i < count($site->assigned_techs_ids); $i++){\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<option value=\"<?php echo $site->assigned_techs_ids[$i]; ?>\"\n\t\t\t\t\t\t<?php if($this->tech_id==$site->assigned_techs_ids[$i]) echo 'selected';?> >\n\t\t\t\t\t\t\t<?php echo $site->assigned_techs_names_last[$i]; ?>\n\t\t\t\t\t\t</option>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\tif(count($site->assigned_techs_ids)>0){?>\n\t\t\t\t\t\t<option></option>\n\t\t\t\t\t<?php }\n\t\t\t\t\t\tfor($i=0; $i < count($site->remaining_techs_ids); $i++){\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<option value=\"<?php echo $site->remaining_techs_ids[$i]; ?>\"\n\t\t\t\t\t\t<?php if($this->tech_id==$site->remaining_techs_ids[$i]) echo 'selected';?> >\n\t\t\t\t\t\t\t<?php echo $site->remaining_techs_names_last[$i]; ?>\n\t\t\t\t\t\t</option>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t?></select><?php\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "0375c2c4af4b87e686d72651cd31c84f", "score": "0.52468956", "text": "protected function _loadOptionsCache()\r\n\t{\r\n\t\t// Vérification du cache\r\n\t\tif (!isset($this->_options))\r\n\t\t{\r\n\t\t\t$this->_options = array();\r\n\t\t\tif (!$this->isNew())\r\n\t\t\t{\r\n\t\t\t\t$options = Option::getUserOptions($this->id_user);\r\n\t\t\t\tforeach ($options as $option)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->_options[$option->name] = $option;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d56854ea216171e7a65e9ca45d139bef", "score": "0.5217406", "text": "protected function loadOptions() {\n $base = $this->_getPluginPath();\n $optionsFile = \"{$base}/config/options.php\";\n\n if (is_file($optionsFile)) {\n require $optionsFile;\n if ($options!==null) {\n $this->_options = $options;\n }\n }\n }", "title": "" }, { "docid": "0888108a141db0b58da07157b059c370", "score": "0.5210793", "text": "public function optionList(){\n\t\t/*if ($this->request->is('ajax')) {\n \t$this->disableCache();\n\t\t}*/\n\t\t$this->layout = null;\n\t\t//$this->autoRender = false;\n\n\t\t$this->set('chamadotipos',\n\t\t\t\t\t\t\t\t$this->ChamadoTipo->find('list', array(\n\t\t\t\t\t\t\t\t\t'fields' => array('ChamadoTipo.id', 'ChamadoTipo.nome'),\n\t\t\t\t\t\t\t\t\t'conditions' => array('ChamadoTipo.servico_id' => $this->params['url']['servico']))));\n\t}", "title": "" }, { "docid": "910d317047445ad1cd400ebf424149a3", "score": "0.52097607", "text": "public function sortOptions()\n {\n $options = array();\n\n $expectedOptions = $this->di->get('option')->getExpectedOrder();\n\n foreach ($expectedOptions as $pos => $key) {\n if (array_key_exists($pos, $this->options)) {\n $options[$key] = $this->di->get('option')->validate($key, $this->options[$pos]);\n } else {\n $this->di->get('option')->validate($key, null);\n }\n }\n\n $this->di->get('option')->load($options);\n }", "title": "" }, { "docid": "457ef0006696d1092187fbd184cc4f5d", "score": "0.52063686", "text": "function Select2($campo,$selected){\n foreach($campo as $tipo){\n if($tipo->Descripcion == $selected){ ?>\n <option value=\"<?php echo $tipo->Valor ?>\" selected><?php echo $tipo->Descripcion ?></option>\n <?php\n }else if($tipo->Campo == 'Blanco' and $tipo->Descripcion != $selected){?>\n <option value=\"<?php echo $tipo->Valor ?>\" disabled selected><?php echo $tipo->Descripcion ?></option>\n<?php }else{ ?>\n <option value=\"<?php echo $tipo->Valor ?>\"><?php echo $tipo->Descripcion ?></option>\n<?php\n }\n }\n}", "title": "" }, { "docid": "cb646a9990830a243a2c1a15242809a5", "score": "0.51823926", "text": "function loadSelectAlmacen($CodAlmacen, $FlagCommodity, $opt) {\r\n\tif ($FlagCommodity != \"\") $filtro = \"AND FlagCommodity = '\".$FlagCommodity.\"'\";\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql = \"SELECT CodAlmacen, Descripcion\r\n\t\t\t\t\tFROM lg_almacenmast\r\n\t\t\t\t\tWHERE Estado = 'A' $filtro\r\n\t\t\t\t\tORDER BY CodAlmacen\";\r\n\t\t\t$query = mysql_query($sql) or die($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $CodAlmacen) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\t$sql = \"SELECT CodAlmacen, Descripcion\r\n\t\t\t\t\tFROM lg_almacenmast\r\n\t\t\t\t\tWHERE CodAlmacen = '\".$CodAlmacen.\"' AND Estado = 'A' $filtro\r\n\t\t\t\t\tORDER BY CodAlmacen\";\r\n\t\t\t$query = mysql_query($sql) or die($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\t?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><?\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "9dd0b9ad327a936761a7faf3e0514d38", "score": "0.5171041", "text": "function um_select_dropdown_dynamic_callback_options( $options, $data ) {\r\n\r\n\tif( isset( $data['custom_dropdown_options_source'] ) && ! empty( $data['custom_dropdown_options_source'] ) ){\r\n\r\n\t\tif( function_exists( $data['custom_dropdown_options_source'] ) ){\r\n\t\t\t$options = call_user_func( $data['custom_dropdown_options_source'] );\r\n\t\t}\r\n\t}\r\n\r\n\treturn $options;\r\n}", "title": "" }, { "docid": "72545a24293a63705d3c76d0f99d6e25", "score": "0.5169257", "text": "function loadSelectEvaluaciones($CodOrganismo, $Secuencia) {\r\n\t$sql = \"SELECT Secuencia, Descripcion\r\n\t\t\tFROM rh_evaluacionperiodo\r\n\t\t\tWHERE CodOrganismo = '\".$CodOrganismo.\"'\";\r\n\t$query = mysql_query($sql) or die(getErrorSql(mysql_errno(), mysql_error(), $sql));\r\n\twhile ($field = mysql_fetch_array($query)) {\r\n\t\tif ($field[0] == $Secuencia) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=htmlentities($field[1])?></option><? }\r\n\t\telse { ?><option value=\"<?=$field[0]?>\"><?=htmlentities($field[1])?></option><? }\r\n\t}\r\n}", "title": "" }, { "docid": "8f81941eacfa969fb21058efb238cbe2", "score": "0.5167634", "text": "function load_options_form()\n\t{\n\t\t/*\n\t\t\tForm options can be passed in two ways:\n\t\t\t1. POST - this occurs when the options have been passed at the last reload\n\t\t\t2. SESSION - if the user goes away and returns.\n\n\t\t*/\n\n\t\tif (isset($_GET[\"reset\"]))\n\t\t{\n\t\t\t// reset the option form\n\t\t\t$_SESSION[\"form\"][$this->tablename] = NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tif (isset($_GET[\"table_display_options\"]))\n\t\t\t{\n\t\t\t\t// flag custom options as active - this is used to adjust the display of\n\t\t\t\t// the table options dropdown\n\t\t\t\t$_SESSION[\"form\"][$this->tablename][\"custom_options_active\"] = 1;\n\n\t\t\t\tlog_debug(\"table\", \"Loading options form from $_GET\");\n\t\t\t\t\n\t\t\t\t$this->columns\t\t= array();\n\t\t\t\t$this->columns_order\t= array();\n\n\t\t\t\t// load checkboxes\n\t\t\t\tforeach (array_keys($this->structure) as $column)\n\t\t\t\t{\n\t\t\t\t\tif (isset($_GET[$column]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$column_setting = @security_script_input(\"/^[a-z]*$/\", $_GET[$column]);\n\t\t\t\t\t\n\t\t\t\t\t\tif ($column_setting == \"on\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->columns[] = $column;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// load orderby options\n\t\t\t\t$num_cols = count(array_keys($this->structure));\n\t\t\t\tfor ($i=0; $i < $num_cols; $i++)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($_GET[\"order_$i\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->columns_order[] = @security_script_input(\"/^\\S*$/\", $_GET[\"order_$i\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// load filterby option\n\t\t\t\tforeach (array_keys($this->filter) as $fieldname)\n\t\t\t\t{\n\t\t\t\t\t// switch to handle the different input types\n\t\t\t\t\t// TODO: find a good way to merge this code and the code in the security_form_input_predefined\n\t\t\t\t\t// into a single function to reduce reuse and complexity.\n\t\t\t\t\tswitch ($this->filter[$fieldname][\"type\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = @@security_script_input(\"/^[0-9]*-[0-9]*-[0-9]*$/\", $_GET[$fieldname .\"_yyyy\"] .\"-\". $_GET[$fieldname .\"_mm\"] .\"-\". $_GET[$fieldname .\"_dd\"]);\n\n\t\t\t\t\t\t\tif ($this->filter[$fieldname][\"defaultvalue\"] == \"--\")\n\t\t\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = \"\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"timestamp\":\n\t\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = security_script_input(\"/^[0-9]*$/\", $_GET[$fieldname]);\n\n\t\t\t\t\t\t\tif ($this->filter[$fieldname][\"defaultvalue\"] == \"--\")\n\t\t\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = \"\";\n\t\t\t\t\t\tbreak;\n\n\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = @@security_script_input(\"/^\\S*$/\", $_GET[$fieldname]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// just blank input if it's in error\n\t\t\t\t\tif ($this->filter[$fieldname][\"defaultvalue\"] == \"error\")\n\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = \"\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telseif (isset($_SESSION[\"form\"][$this->tablename][\"columns\"]))\n\t\t\t{\n\t\t\t\tlog_debug(\"table\", \"Loading options form from session data\");\n\t\t\t\t\n\t\t\t\t// load checkboxes\n\t\t\t\t$this->columns\t\t= $_SESSION[\"form\"][$this->tablename][\"columns\"];\n\n\t\t\t\t// load orderby options\n\t\t\t\t$this->columns_order\t= $_SESSION[\"form\"][$this->tablename][\"columns_order\"];\n\n\t\t\t\t// load filterby options\n\t\t\t\tforeach (array_keys($this->filter) as $fieldname)\n\t\t\t\t{\n\t\t\t\t\tif (isset($_SESSION[\"form\"][$this->tablename][\"filters\"][$fieldname]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->filter[$fieldname][\"defaultvalue\"] = $_SESSION[\"form\"][$this->tablename][\"filters\"][$fieldname];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// save options to session data\n\t\t\t$_SESSION[\"form\"][$this->tablename][\"columns\"]\t\t= $this->columns;\n\t\t\t$_SESSION[\"form\"][$this->tablename][\"columns_order\"]\t= $this->columns_order;\n\t\t\t\n\t\t\tforeach (array_keys($this->filter) as $fieldname)\n\t\t\t{\n\t\t\t\tif (isset($this->filter[$fieldname][\"defaultvalue\"]))\n\t\t\t\t{\n\t\t\t\t\t$_SESSION[\"form\"][$this->tablename][\"filters\"][$fieldname] = $this->filter[$fieldname][\"defaultvalue\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "b9123a53dd26291ada53e142fedf11e5", "score": "0.51590383", "text": "public function load($field, $source)\n {\n $script = <<<EOT\n\n$(\"#{$this->id}\").change(function () {\n $.get(\"$source?q=\"+this.value, function (data) {\n $(\"#$field option\").remove();\n $(\"#$field\").select2({data: data});\n });\n});\nEOT;\n\n Admin::script($script);\n }", "title": "" }, { "docid": "3eed6e837098bdb11fee57c0d9acb617", "score": "0.51467234", "text": "function load_options() {\n\t\t\tAA_G404D_F && ISCLOG::ti();\n\n\t\t\t// get options\n\t\t\t$this->options = get_option( 'askapache_google_404_options' );\n\n\t\t\t// first try get_option, then parse this __FILE__\n\t\t\t$this->plugin = $this->get_plugin_data();\n\n\t\t\tAA_G404D_F && ISCLOG::ti();\n\t\t}", "title": "" }, { "docid": "0bc795a886c941736031a6fed2ab8dbc", "score": "0.51449096", "text": "public function buildOptions ( )\n {\n $event = new App_Model_DbTable_Event;\n\n $element = $this->getElement('event_id');\n\n $results = $event->fetchAll();\n\n foreach ($results as $result) {\n $element->addMultiOption($result->id, $result->name);\n }\n }", "title": "" }, { "docid": "d41a8dc079968bad3020f23ef64b2fc5", "score": "0.5138772", "text": "protected function initOptions()\n {\n $this->initDataColumns();\n\n if (!empty($this->form)) {\n $this->form->type = ActiveForm::TYPE_VERTICAL;\n }\n\n if ($this->serialColumn !== false) {\n $this->initSerialColumn();\n $this->_columns = array_merge([$this->serialColumn], $this->_columns);\n }\n\n if ($this->actionColumn !== false) {\n $this->initActionColumn();\n $this->_columns = array_merge($this->_columns, [$this->actionColumn]);\n }\n\n if ($this->checkboxColumn !== false) {\n $this->initCheckboxColumn();\n $this->_columns = array_merge($this->_columns, [$this->checkboxColumn]);\n }\n }", "title": "" }, { "docid": "8a39eaa0f4c7791c666e395842b13722", "score": "0.51378477", "text": "function charity_is_hope_core_customizer_load_options() {\r\n\t\t$mode = isset($_POST['mode']) ? $_POST['mode'] : '';\r\n\t\t$override = isset($_POST['override']) ? $_POST['override'] : '';\r\n\t\tif ($mode!='reset' || $override!='customizer') {\r\n\t\t\t$storage = get_option( charity_is_hope_storage_get('options_prefix') . '_options_custom_colors' );\r\n\t\t\tif (!empty($storage)) charity_is_hope_storage_set('custom_colors', $storage);\r\n\t\t\t$storage = get_option( charity_is_hope_storage_get('options_prefix') . '_options_custom_fonts' );\r\n\t\t\tif (!empty($storage)) charity_is_hope_storage_set('custom_fonts', $storage);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e21aad7e80aa81dab4bcd8f81b0c0f40", "score": "0.5125953", "text": "function empty_subaso_dropdown_select() {\n\t\t$empty_select = '<select name=\"sub_fellowship_id\" class=\"chosen-select\" data-placeholder=\"Sub Association\" style=\"width: 300px; display: none;\">';\n\t\t$empty_select_closed = '</select>';\n\t\t//GET THE ID OF THE LISTING USING URI\n\t\t$listingID = $this -> uri -> segment(4);\n\n\t\t//LOAD GCRUD AND GET THE STATE\n\t\t$crud = new grocery_CRUD();\n\t\t$state = $crud -> getState();\n\n\t\t//CHECK FOR A URI VALUE AND MAKE SURE ITS ON THE EDIT STATE\n\t\tif (isset($listingID) && $state == \"edit\") {\n\t\t\t//GET THE STORED STATE ID\n\t\t\t$this -> db -> select('fellowship_id,sub_fellowship_id') -> from('items') -> where('item_id', $listingID);\n\t\t\t$db = $this -> db -> get();\n\t\t\t$row = $db -> row(0);\n\t\t\t//var_dump($row);\n\t\t\t$fellowsip_ID = $row -> fellowship_id;\n\t\t\t$sub_fellowship_ID = $row -> sub_fellowship_id;\n\n\t\t\t//GET THE STATES PER COUNTRY ID\n\t\t\t$this -> db -> select('*') -> from('sub_fellowships') -> where('fellowship_id', $sub_fellowship_ID);\n\t\t\t$db = $this -> db -> get();\n\t\t\t/*\n\t\t\t if($db->result() > 0){\n\n\t\t\t $crud -> required_fields('sub_fellowship_id');\n\t\t\t }\n\t\t\t */\n\t\t\t//APPEND THE OPTION FIELDS WITH VALUES FROM THE STATES PER THE COUNTRY ID\n\t\t\tforeach ($db->result() as $row) :\n\t\t\t\tif ($row -> fellowship_id == $sub_fellowship_ID) {\n\t\t\t\t\t$empty_select .= '<option value=\"' . $row -> sub_fellowship_id . '\" selected=\"selected\">' . $row -> sub_fellowship_name . '</option>';\n\t\t\t\t} else {\n\t\t\t\t\t$empty_select .= '<option value=\"' . $row -> sub_fellowship_id . '\">' . $row -> sub_fellowship_name . '</option>';\n\t\t\t\t}\n\t\t\tendforeach;\n\n\t\t\t//RETURN SELECTION COMBO\n\t\t\treturn $empty_select . $empty_select_closed;\n\t\t} else {\n\t\t\t//RETURN SELECTION COMBO\n\t\t\treturn $empty_select . $empty_select_closed;\n\t\t}\n\t}", "title": "" }, { "docid": "faca89311e8c7a7902a25f076fadd35f", "score": "0.5119121", "text": "protected function initOptions()\n {\n if (!isset($this->options['id'])) {\n $this->options['id'] = $this->getId();\n }\n }", "title": "" }, { "docid": "bfb688d0ff8c78c22d72544bc979f2b3", "score": "0.51100314", "text": "function getDependenciaExt($dependencia, $organismo, $opt) {\r\n\tconnect();\r\n\tif ($opt==3 && $_SESSION[\"USUARIO_ACTUAL\"]==$_SESSION[\"SUPER_USUARIO\"]) $opt=0;\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql=\"SELECT CodDependencia, Dependencia FROM pf_dependenciasexternas WHERE CodOrganismo='\".$organismo.\"' AND CodDependencia<>'' ORDER BY CodDependencia\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tfor ($i=0; $i<$rows; $i++) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\tif ($field[0]==$dependencia) echo \"<option value='\".$field[0].\"' selected>\".htmlentities($field[1]).\"</option>\"; \r\n\t\t\t\telse echo \"<option value='\".$field[0].\"'>\".htmlentities($field[1]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\t$sql=\"SELECT CodDependencia, Dependencia FROM pf_dependenciasexternas WHERE CodOrganismo='\".$organismo.\"' AND CodDependencia<>'' ORDER BY CodDependencia\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tfor ($i=0; $i<$rows; $i++) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\tif ($field[0]==$dependencia) echo \"<option value='\".$field[0].\"' selected>\".htmlentities($field[1]).\"</option>\"; \r\n\t\t\t\telse echo \"<option value='\".$field[0].\"'>\".htmlentities($field[1]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "e74af340b691725b3f770cb9251366d4", "score": "0.5106528", "text": "function LoadOrganizer()\n {\n ?>\n <option>-</option>\n <?php\n include \"../../globalfunction/ajax_include.php\";\n $sqlOrganizer = \"SELECT IdOrganizer, Organizer FROM tb_organizer ORDER BY Organizer ASC\";\n $dataOrganizer = ReadDataManyRow($sqlOrganizer);\n foreach($dataOrganizer as $data)\n {\n ?>\n <option value=\"<?php echo $data[\"IdOrganizer\"]; ?>\"><?php echo $data[\"Organizer\"]; ?></option>\n <?php\n }\n }", "title": "" }, { "docid": "7c38e6134c1c5a2657e934235611b8cd", "score": "0.5097673", "text": "function generaSelect2() { //creacioon de combo para las Regiones\n conexion::conectar();\n if ($_SESSION[\"TipoFarmacia\"] == 1) {\n $comp = \" where HabilitadoFarmacia='S'\";\n } else {\n $comp = \"\";\n }\n $consulta = mysql_query(\"select IdFarmacia,Farmacia\n\t\t\t\t\t\t\tfrom mnt_farmacia\n\t\t\t\t\" . $comp);\n conexion::desconectar();\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdFarmacia' id='IdFarmacia'>\";\n echo \"<option value='0'>[Consumo General ...]</option>\";\n while ($registro = mysql_fetch_row($consulta)) {\n echo \"<option value='\" . $registro[0] . \"'>\" . $registro[1] . \"</option>\";\n }\n echo \"</select>\";\n }", "title": "" }, { "docid": "934556a1444c455747155c5ab64bf9aa", "score": "0.5096249", "text": "function load_element_options() {\n\n\t\tforeach ( $this->elements as $mod_name => $mod_data ) {\n\n\t\t\t$this->elements->$mod_name->options = get_option( $this->options_group . $mod_name . '_options', new stdClass );\n\t\t\tforeach ( $mod_data->default_options as $default_key => $default_value ) {\n\t\t\t\tif ( !isset( $this->elements->$mod_name->options->$default_key ) )\n\t\t\t\t\t$this->elements->$mod_name->options->$default_key = $default_value;\n\t\t\t}\n\n\t\t\t$this->$mod_name->element = $this->elements->$mod_name;\n\t\t}\n\n\t\t/**\n\t\t * Fires after st_workflow has loaded all of the element options from the database.\n\t\t *\n\t\t * Plugin authors can hook into this action to read and manipulate element settings.\n\t\t *\n\t\t */\n\t\tdo_action( 'stworkflow_element_options_loaded' );\n\t}", "title": "" }, { "docid": "429f73833deb40b077f67ed13ab38d44", "score": "0.50948465", "text": "function load_options() {\r\n\t\t$this->options = get_option('advanced-header-images');\r\n\t}", "title": "" }, { "docid": "64c2547463ae95ded8a60a17e318a565", "score": "0.50932616", "text": "protected function liveOptions() {\n\t\tif(!self::$available_options) {\n\t\t\t$countryID = EcommerceCountry::get_country_id();\n\t\t\t$regionID = EcommerceRegion::get_region_id();\n\t\t\t$weight = $this->LiveTotalWeight();\n\t\t\t$options = PickUpOrDeliveryModifierOptions::get();\n\t\t\tif($options->count()) {\n\t\t\t\tforeach($options as $option) {\n\t\t\t\t\t//check countries\n\t\t\t\t\tif($countryID) {\n\t\t\t\t\t\t$optionCountries = $option->AvailableInCountries();\n\t\t\t\t\t\t//exclude if not found in country list\n\t\t\t\t\t\tif($optionCountries->Count() > 0 && ! $optionCountries->find('ID', $countryID)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//check regions\n\t\t\t\t\tif($regionID) {\n\t\t\t\t\t\t$optionRegions = $option->AvailableInRegions();\n\t\t\t\t\t\t//exclude if not found in region list\n\t\t\t\t\t\tif($optionRegions->Count() > 0 && ! $optionRegions->find('ID', $regionID)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$result[] = $option;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(! isset($result)) {\n\t\t\t\t$result[] = PickUpOrDeliveryModifierOptions::default_object();\n\t\t\t}\n\t\t\tself::$available_options = new ArrayList($result);\n\t\t}\n\t\treturn self::$available_options;\n\t}", "title": "" }, { "docid": "86e218e43a668682de8c0dcee38ae863", "score": "0.50858444", "text": "function select (){$this->add($this->select2arr());}", "title": "" }, { "docid": "12d0de1949606123d421cede14e39182", "score": "0.5061619", "text": "public function refreshQueryData()\n {\n $this->showDropdown($this->id);\n }", "title": "" }, { "docid": "b37df121c1cbc7cac9773764d5f0350a", "score": "0.50603217", "text": "function loadCountryDropdown($sel='', $extra='onchange=\"getStateFromCountry(this.value)\" ',$name='country')\n{\n\t$CI =& get_instance();\n\t$res = $CI->db->where('country_status','0')->order_by('country_name')->get('country')->result_array();\n\t\n\t$arr = array(''=>'--- Please select country ---');\n\tforeach($res as $r)\n\t\t$arr[$r['country_id']] = $r['country_name']; \n\t\t\n\treturn form_dropdown($name,$arr,$sel,$extra);\n}", "title": "" }, { "docid": "e5732a08ae61c87602033a00b6693110", "score": "0.5054569", "text": "function setProperties($data) {\n if (isset($data['options'])) {\n $options = [];\n\n foreach ($data['options'] as $key => $option) {\n if (!$option instanceof Element_Select_Option) {\n if (is_string($option)) {\n $option = new Element_Select_Option($key, $option);\n }elseif (is_array($option)) {\n $value = isset($option['value']) ? $option['value'] : $key;\n $caption = isset($option['caption']) ? $option['caption'] : NULL;\n $group = isset($option['group']) ? $option['group'] : NULL;\n\n // Pull normal indexed options for caption / group\n $index = 0;\n if ($caption === null && isset($option[$index])) $caption = $option[$index++];\n if ($group === null && isset($option[$index])) $group = $option[$index++];\n\n $option = new Element_Select_Option($value, $caption, $group);\n }\n }\n $options[] = $option;\n }\n\n\t\t\t$data['options'] = $options;\n\t\t}\n\n\t\tparent::setProperties($data);\n\n if ($this->multiple && substr($this->name, -2) == '[]') {\n throw new Exception('Select boxes of type \\'multiple\\' are automatically named as arrays');\n }\n\t}", "title": "" }, { "docid": "b5f93b133896c662c88d472c80ee942b", "score": "0.50509894", "text": "function loadSelectTransaccion($codigo, $opt) {\r\n\tswitch ($opt) {\r\n\t\tcase \"NUEVO\":\r\n\t\t\t$sql = \"SELECT CodTransaccion, Descripcion \r\n\t\t\t\t\tFROM lg_tipotransaccion \r\n\t\t\t\t\tWHERE CodTransaccion <> 'REQ' AND CodTransaccion <> 'ROC' \r\n\t\t\t\t\tORDER BY TipoMovimiento, CodTransaccion\";\r\n\t\t\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\twhile ($field = mysql_fetch_array($query)) {\r\n\t\t\t\tif ($field[0] == $codigo) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><? }\r\n\t\t\t\telse { ?><option value=\"<?=$field[0]?>\"><?=($field[1])?></option><? }\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "d8e9bd77a939af7823c8b5407062d70c", "score": "0.5050201", "text": "function yourls_get_all_options() {\n\t\tglobal $ydb;\n\t\t$table = YOURLS_DB_TABLE_OPTIONS;\n\n\t\t$allopt = $ydb->get_results(\"SELECT `option_name`, `option_value` FROM `$table` WHERE 1=1\");\n\n\t\tforeach( (array)$allopt as $option ) {\n\t\t\t$ydb->option[$option->option_name] = self::yourls_maybe_unserialize( $option->option_value );\n\t\t}\n\t}", "title": "" }, { "docid": "bc658a6160f8e5010ad332bf91dfa277", "score": "0.50497735", "text": "protected static function getSelectOptions()\n {\n return [];\n }", "title": "" }, { "docid": "4f32a6335d02caf0a52eefce635a5765", "score": "0.5048911", "text": "function iver_select_init_theme_options_array() {\n\t\tglobal $iver_options, $iver_Framework;\n\n\t\t$db_options = get_option( 'qodef_options_iver' );\n\n\t\t//does qodef_options_iver exists in db?\n\t\tif ( is_array( $db_options ) ) {\n\t\t\t//merge with default options\n\t\t\t$iver_options = array_merge( $iver_Framework->qodeOptions->options, get_option( 'qodef_options_iver' ) );\n\t\t} else {\n\t\t\t//options don't exists in db, take default ones\n\t\t\t$iver_options = $iver_Framework->qodeOptions->options;\n\t\t}\n\t}", "title": "" }, { "docid": "2ef8147080340e965e36fc6857398bb3", "score": "0.50450796", "text": "function getDivisiones($division, $dependencia, $opt) {\r\n\tconnect();\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql=\"SELECT CodDivision, Division FROM mastdivisiones WHERE CodDependencia='\".$dependencia.\"' AND CodDivision<>'' ORDER BY CodDivision\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tfor ($i=0; $i<$rows; $i++) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\tif ($field[0]==$division) echo \"<option value='\".$field[0].\"' selected>\".htmlentities($field[1]).\"</option>\"; \r\n\t\t\t\telse echo \"<option value='\".$field[0].\"'>\".htmlentities($field[1]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\t$sql=\"SELECT CodDivision, Division FROM mastdivisiones WHERE CodDivision='\".$division.\"'\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tif ($rows!=0) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\techo \"<option value='\".$field[0].\"'>\".htmlentities($field[1]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "20c09da2b8c975d1957368127486b62f", "score": "0.5035873", "text": "function job_manager_select($option){\n\t$select_list['country'] = array(\"Argentina\", \"Uruguay\", \"Chile\", \"USA\", \"Other\");\n\t$select_list['travel_country'] = array(\"SOUTH AMERICA\", \"USA\", \"OCEANIA\", \"EUROPE\", \"ASIA\", \"AFRICA\");\n\t$select_list['country_visited'] = array(\"SOUTH AMERICA\", \"USA\", \"OCEANIA\", \"EUROPE\", \"ASIA\", \"AFRICA\");\n\t$select_list['countries_ski'] = array(\"Argentina\", \"Chile\", \"USA\", \"France\", \"Switzerland\", \"Australia\", \"Japan\", \"New Zealand\", \"Spain\", \"Canada\", \"Other\");\n\n\t$select_list['university'] = array(\"Belgrano\", \"Austral\", \"UCES\", \"UADE\", \"PALERMO\", \"SAN ANDRES\", \"COMAHUE\", \"UBA\", \"FUC\", \"ITBA\", \"TORCUATO DI TELLA\", \"INSTITUTO DE LA MUJER\", \"DEL SALVADOR\", \"MARIN\", \"IAG\", \"OTT COLLEGE\",\"UNIVERSIDAD NACIONAL DE CORDOBA \",\" UNIVERSIDAD NACIONAL DE CUYO\",\" UNIVERSIDAD DE MENDOZA\",\" UNIVERSDAD BLAS PASCAL\",\" UNIVERSIDAD CATOLICA DE SALTA\",\"universidad del norte santo tomas de aquino\",\" Universidad IPS Florentino Ameghino\",\" UNIVERSIDAD CATOLICA DE CORDOBA\",\" Universidad del Aconcagua\",\" Universidad de los Andes Chile\",\" Universidad del Desarrollo Chile\",\" Universidad ORT de Uruguay\",\" Universidad Empresarial Siglo XXI\",\" Universidad del Centro Educativo Latinoamericana\",\" Universidad Nacional de Rosario\",\" Universidad Nacional de Mar del Plata\",\" Universidad Nacional del Nordeste \",\" Universidad Nacional del Sur\",\" Universidad Interamericana\", \"ISEF N1 Dr Romero Brest\", \"Universidad Nacional de La Plata\" , \"UCA\", \"Other\" );\n\n\t$select_list['fields_of_study'] = array(\"Advertising\", \"Graphic design\", \"Industrial design\", \"Architecture\", \"Medicine\", \"Law\", \"Engineering\", \"Professor\", \"Culinary\", \"Hotel managament\", \"Bussiness administration\", \"Communication\", \"Accountant\", \"Economics\", \"Biology\", \"Arts\", \"Teacher\", \"Tourism\", \"Acting\", \"Musician\", \"Agriculture\", \"Translator\", \"Public Relations\", \"Economy\", \"Human Resources\", \"Finance\", \"Journalism\", \"IT\", \"Marketing\", \"Geography\", \"Nutrition\", \"Film Director\", \"Pharmacy\", \"Dentistry\", \"Phycology\", \"Chemistry\", \"Gym Coach\", \"Event Organizer\", \"Other\");\n\n\t$select_list['company_field'] = array(\"Restaurant\", \"Hotel\", \"Accountant Office\", \"Administrative Office\", \"Law Office\", \"Design Studio\", \"Merchant Store\", \"Clothing Store\", \"School\", \"Kindergarten\", \"Computing/Technology\", \"Fashion\", \"Education\", \"Art\", \"Hospital/Medicine\", \"Bank\", \"Volunteer Job\", \"Freelance Job\", \"Internship Job\", \"Tourism\", \"Other\");\n\t$select_list['position'] = array(\"Sales Person\", \"Assistant/Secretary\", \"Front Desk Agent\", \"Teacher/Professor\", \"Cook/Chef\", \"Administrative Clerk\", \"Waiter/Waitress\", \"Photographer\", \"Host/Hostess\", \"Customer Service Rep\", \"Designer\", \"D.J.\", \"Nanny/Babysitting\", \"Artist\", \"Delivery person\", \"Multitasking position\", \"Cashier\", \"Busser\", \"Barista\", \"Cashier\", \"Sports Trainer\", \"Private Tutor\", \"VOLUNTEER\",\" CAMP COUNSELOR\",\" NURSERY\",\" SKI INSTRUCTOR\",\" SNOWBOARD INSTRUCTOR\",\" INTERN\",\" CUSTOMER SERVICE REP\",\" SKI INSTRUCTOR'S ASSISTANT\",\" RENTAL TECH\",\" LIFT\",\" PREP COOK\",\" MASCOT\", \"Other\");\n\t$select_list['contact_person_position'] = array(\"Manager\", \"Supervisor\", \"Assessor\", \"Owner\", \"Co-worker\", \"Team Leader\");\n\t\n\t$select_list['languages'] = array(\"Spanish\", \"English\", \"French\", \"German\", \"Italian\", \"Portuguese\", \"Japanese\", \"Chinese\");\n\t$select_list['languages_levels'] = array(\"Beginner\", \"Intermediate\", \"Upper Intermediate\", \"Advanced\", \"Native\");\n\t$select_list['programs'] = array(\"Microsoft Office\", \"Mac\", \"Design Software\", \"Engineering Software\", \"Architecture Software\", \"Internet/Emailing/Skype\");\n\n\t$select_list['snow_levels'] = array(\"Beginner\", \"Intermediate\", \"Advanced\", \"Racer\");\n\t$select_list['quantity_of_seasons_skied'] = array(0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);\n\t$select_list['other_sports'] = array(\"Tennis\", \"Basketball\", \"Football\", \"Rugby\", \"Golf\", \"Paragliding\", \"Ice Skating\", \"Running\", \"Swimming\", \"Biking\", \"Hockey\", \"Hourse Riding\", \"Polo\", \"Gym\");\n\n\t$select_list['international_exams'] = array(\"IGCSE (International General Certificate of Secondary Education in English)\", \"PET (Preliminary English Test)\", \"CAE (Certificate of Advanced English\", \"TOEFL\", \"DELF (French Examination)\", \"FCE (First Certificate in English)\", \"IB (International Baccalaureate)\");\n\n\t$select_list['activities_and_interests'] = array(\"watch movies\", \"practise sports\", \"sing\", \"play instruments\", \"traveling\", \"reading\", \"hanging out with friends\", \"dancing\", \"drawing\", \"listening to music\", \"writing\", \"indoor activities\");\n\n\treturn $select_list[$option];\n}", "title": "" }, { "docid": "76c6831aee7d044ee9af415571a47e52", "score": "0.50287634", "text": "public function init() {\n // initialize html id and name\n \n if(isset($this->searchArgument)) {\n $this->options['searchArgument']= $this->searchArgument;\n }\n \n $this->initHtmlId();\n $this->initHiddenFieldId();\n\n // initialize css class. If a class is already set in htmlOptions,\n // concatenate selectBox class to it, otherwise just assign it\n if (isset($this->htmlOptions[\"class\"])) {\n $this->htmlOptions[\"class\"].= \" selectBox\";\n } else {\n $this->htmlOptions[\"class\"] = \"selectBox\";\n }\n\n //\n if (isset($this->options['textPattern'])) {\n $this->htmlOptions['data-text-pattern'] = $this->options['textPattern'];\n }\n\n // initialize columns\n if (!isset($this->options['columns'])) {\n $this->options['columns'] = array();\n }\n //Utility::dump($this->options['columns']);\n // set html ID through the htmlOptions\n $this->htmlOptions[\"id\"] = $this->htmlId . \"_selectBox\";\n\n // insert the \"id\" column before all other columns\n array_unshift($this->options['columns'], array(\n \"name\" => \"id\",\n \"htmlOptions\" => array(\"class\" => \"idColumn\"),\n \"headerHtmlOptions\"=> array(\"class\" => \"idColumn\"),\n )); \n\n // calculate the width of the select box. 200 pixels per column,\n // plus additional 50 pixels for the automatically added \"id\" column\n $this->searchBoxWidth = (count($this->options['columns']) - 1) * 200 + 50;\n if ($this->searchBoxWidth < 250)\n $this->searchBoxWidth = 250;\n\n // set initial text\n if (isset($this->options['initialValue'])) {\n $this->initialText = $this->options['initialValue'];\n } else {\n $this->initialText = $this->getButtonLabel();\n }\n\n if (!isset($this->options[\"random\"])) {\n $this->options[\"random\"] = rand(1, 999999);\n }\n }", "title": "" }, { "docid": "84cdbaadc65cee262dd38e5f1148d0c8", "score": "0.5019719", "text": "function setOptions($a_options) {\n\t\tglobal $lng;\n\n\t\tparent::setOptions(array(self::IGNORE_KEY => $lng->txt('select_one')) + $a_options);\n\t}", "title": "" }, { "docid": "c16616375873ec2dd4b66ab2ef44a74b", "score": "0.50090736", "text": "function loadSelectValores($tabla, $codigo, $opt) {\r\n\tswitch ($tabla) {\r\n\t\tcase \"ESTADO\":\r\n\t\t\t$c[0] = \"A\"; $v[0] = \"Activo\";\r\n\t\t\t$c[1] = \"I\"; $v[1] = \"Inactivo\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"TIPOALMACEN\":\r\n\t\t\t$c[0] = \"P\"; $v[0] = \"Principal\";\r\n\t\t\t$c[1] = \"T\"; $v[1] = \"Tránsito\";\r\n\t\t\t$c[2] = \"V\"; $v[2] = \"Venta\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-ITEMS\":\r\n\t\t\t$c[0] = \"i.CodItem\"; $v[0] = \"Código\";\r\n\t\t\t$c[1] = \"i.Descripcion\"; $v[1] = \"Descripción\";\r\n\t\t\t$c[2] = \"i.CodLinea\"; $v[2] = \"Linea\";\r\n\t\t\t$c[3] = \"i.CodFamilia\"; $v[3] = \"Familia\";\r\n\t\t\t$c[4] = \"i.CodSubFamilia\"; $v[4] = \"Sub-Familia\";\r\n\t\t\t$c[5] = \"i.CodInterno\"; $v[5] = \"Cod. Interno\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-REQUERIMIENTOS\":\r\n\t\t\t$c[0] = \"lr.CodRequerimiento\"; $v[0] = \"# Requerimiento\";\r\n\t\t\t$c[1] = \"lr.Descripcion\"; $v[1] = \"Descripción\";\r\n\t\t\t$c[2] = \"lr.CodCentroCosto\"; $v[2] = \"Centro de Costo\";\r\n\t\t\t$c[3] = \"lc.Descripcion\"; $v[3] = \"Clasificación\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-REQUERIMIENTOS-DET\":\r\n\t\t\t$c[0] = \"lrd.CodRequerimiento\"; $v[0] = \"# Requerimiento\";\r\n\t\t\t$c[1] = \"lrd.CodItem|lrd.CommoditySub\"; $v[1] = \"Código\";\r\n\t\t\t$c[2] = \"lrd.Descripcion\"; $v[2] = \"Descripción\";\r\n\t\t\t$c[3] = \"lrd.CodCentroCosto\"; $v[3] = \"Centro de Costo\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"DIRIGIDO\":\r\n\t\t\t$c[0] = \"C\"; $v[0] = \"Compras\";\r\n\t\t\t$c[1] = \"A\"; $v[1] = \"Almacen\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"PRIORIDAD\":\r\n\t\t\t$c[0] = \"N\"; $v[0] = \"Normal\";\r\n\t\t\t$c[1] = \"U\"; $v[1] = \"Urgente\";\r\n\t\t\t$c[2] = \"M\"; $v[2] = \"Muy Urgente\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ESTADO-REQUERIMIENTO\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"RV\"; $v[1] = \"Revisado\";\r\n\t\t\t$c[2] = \"CN\"; $v[2] = \"Conformado\";\r\n\t\t\t$c[3] = \"AP\"; $v[3] = \"Aprobado\";\r\n\t\t\t$c[4] = \"AN\"; $v[4] = \"Anulado\";\r\n\t\t\t$c[5] = \"RE\"; $v[5] = \"Rechazado\";\r\n\t\t\t$c[6] = \"CE\"; $v[6] = \"Cerrado\";\r\n\t\t\t$c[7] = \"CO\"; $v[7] = \"Completado\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ESTADO-REQUERIMIENTO-DET\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"PE\"; $v[1] = \"Pendiente\";\r\n\t\t\t$c[2] = \"AN\"; $v[2] = \"Anulado\";\r\n\t\t\t$c[3] = \"RE\"; $v[3] = \"Rechazado\";\r\n\t\t\t$c[4] = \"CE\"; $v[4] = \"Cerrado\";\r\n\t\t\t$c[5] = \"CO\"; $v[5] = \"Completado\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ESTADO-REQUERIMIENTO-DET1\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"ORDEN-REQUERIMIENTO-DET\":\r\n\t\t\t$c[0] = \"lrd.CodRequerimiento\"; $v[0] = \"# Requerimiento\";\r\n\t\t\t$c[1] = \"lrd.CodItem|lrd.CommoditySub\"; $v[1] = \"Item/Commodity\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ESTADO-ORDENES\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"RV\"; $v[1] = \"Revisado\";\r\n\t\t\t$c[2] = \"AP\"; $v[2] = \"Aprobado\";\r\n\t\t\t$c[3] = \"AN\"; $v[3] = \"Anulado\";\r\n\t\t\t$c[4] = \"RE\"; $v[4] = \"Rechazado\";\r\n\t\t\t$c[5] = \"CE\"; $v[5] = \"Cerrado\";\r\n\t\t\t$c[6] = \"CO\"; $v[6] = \"Completado\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ESTADO-ORDENES-DET\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"PE\"; $v[1] = \"Pendiente\";\r\n\t\t\t$c[2] = \"AN\"; $v[2] = \"Anulado\";\r\n\t\t\t$c[3] = \"RE\"; $v[3] = \"Rechazado\";\r\n\t\t\t$c[4] = \"CE\"; $v[4] = \"Cerrado\";\r\n\t\t\t$c[5] = \"CO\"; $v[5] = \"Completado\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ORDEN-ORDENES\":\r\n\t\t\t$c[0] = \"oc.NroOrden\"; $v[0] = \"Nro. Orden\";\r\n\t\t\t$c[1] = \"oc.FechaPreparacion\"; $v[1] = \"F. Preparación\";\r\n\t\t\t$c[2] = \"oc.NomProveedor\"; $v[2] = \"Proveedor\";\r\n\t\t\t$c[3] = \"oc.Estado\"; $v[3] = \"Estado\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"ORDEN-CLASIFICACION\":\r\n\t\t\t$c[0] = \"L\"; $v[0] = \"O/C Local\";\r\n\t\t\t$c[1] = \"F\"; $v[1] = \"O/C Foráneo\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-INVITACION-COTIZACION\":\r\n\t\t\t$c[0] = \"lrd.CodRequerimiento\"; $v[0] = \"# Requerimiento\";\r\n\t\t\t$c[1] = \"lrd.CodItem|lrd.CommoditySub\"; $v[1] = \"Código\";\r\n\t\t\t$c[2] = \"lrd.Descripcion\"; $v[2] = \"Descripción\";\r\n\t\t\t$c[3] = \"lrd.CodCentroCosto\"; $v[3] = \"Centro de Costo\";\r\n\t\t\t$c[4] = \"c.CotizacionNumero\"; $v[4] = \"# Invitacion\";\r\n\t\t\t$c[5] = \"c.CodProveedor\"; $v[5] = \"Proveedor\";\r\n\t\t\t$c[6] = \"c.NomProveedor\"; $v[6] = \"Razón Social\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-ORDEN-ALMACEN\":\r\n\t\t\t$c[0] = \"oc.NroOrden\"; $v[0] = \"# Orden\";\r\n\t\t\t$c[1] = \"oc.CodProveedor\"; $v[1] = \"Proveedor\";\r\n\t\t\t$c[2] = \"oc.NomProveedor\"; $v[2] = \"Razón Social\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-ORDEN-ALMACEN-DESPACHO\":\r\n\t\t\t$c[0] = \"r.CodRequerimiento\"; $v[0] = \"# Requerimiento\";\r\n\t\t\t$c[1] = \"r.Comentarios\"; $v[1] = \"Comentario\";\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"MONTO-COTIZADO\":\r\n\t\t\t$c[0] = \"C\"; $v[0] = \"Con Precio\";\r\n\t\t\t$c[1] = \"S\"; $v[1] = \"Sin Precio\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-TRANSACCION\":\r\n\t\t\t$c[0] = \"t.CodDocumento\"; $v[0] = \"Tipo Doc.\";\r\n\t\t\t$c[1] = \"t.NroDocumento\"; $v[1] = \"Nro. Doc.\";\r\n\t\t\t$c[2] = \"t.FechaDocumento\"; $v[2] = \"Fecha Doc.\";\r\n\t\t\t$c[3] = \"t.CodTransaccion\"; $v[3] = \"Transacción\";\r\n\t\t\t$c[4] = \"a.NomAlmacen\"; $v[4] = \"Almacón\";\r\n\t\t\t$c[5] = \"t.CodDocumento\"; $v[5] = \"Periodo\";\r\n\t\t\t$c[6] = \"t.CodDocumentoReferencia\"; $v[6] = \"Doc. Ref.\";\r\n\t\t\t$c[7] = \"t.NroDocumentoReferencia\"; $v[7] = \"Nro. Doc. Ref.\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"BUSCAR-ITEM-ALMACEN\":\r\n\t\t\t$c[0] = \"i.CodItem\"; $v[0] = \"Item\";\r\n\t\t\t$c[1] = \"i.Descripcion\"; $v[1] = \"Descripción\";\r\n\t\t\t$c[2] = \"i.CodUnidad\"; $v[2] = \"Und.\";\r\n\t\t\t$c[3] = \"i.CodLinea\"; $v[3] = \"Linea\";\r\n\t\t\t$c[4] = \"i.CodFamilia\"; $v[4] = \"Familia\";\r\n\t\t\t$c[5] = \"i.CodSubFamilia\"; $v[5] = \"Sub-Familia\";\r\n\t\t\t$c[6] = \"i.CodInterno\"; $v[6] = \"Cod. Interno\";\r\n\t\t\t$c[7] = \"ti.Descripcion\"; $v[7] = \"Tipo Item\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"ORDENAR-INVENTARIO\":\r\n\t\t\t$c[0] = \"i.CodItem\"; $v[0] = \"Item\";\r\n\t\t\t$c[1] = \"i.Descripcion\"; $v[1] = \"Descripción\";\r\n\t\t\t$c[2] = \"i.CodUnidad\"; $v[2] = \"Und.\";\r\n\t\t\t$c[3] = \"i.CodInterno\"; $v[3] = \"Cod. Interno\";\r\n\t\t\t$c[4] = \"iav.StockActual\"; $v[4] = \"Stock Actual\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"ORDENAR-PROVEEDORES\":\r\n\t\t\t$c[0] = \"p.CodProveedor\"; $v[0] = \"Cod. Proveedor\";\r\n\t\t\t$c[1] = \"mp.Ndocumento\"; $v[1] = \"Nro. Documento\";\r\n\t\t\t$c[2] = \"mp.DocFiscal\"; $v[2] = \"Doc. Fiscal\";\r\n\t\t\t$c[3] = \"mp.Nacionalidad\"; $v[3] = \"Nacionalidad\";\r\n\t\t\t$c[4] = \"mp.NomCompleto\"; $v[4] = \"Razón Social\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"ORDENAR-MOVIMIENTOS-ALMACEN\":\r\n\t\t\t$c[0] = \"i.CodItem\"; $v[0] = \"Item\";\r\n\t\t\t$c[1] = \"i.CodInterno\"; $v[1] = \"Cod. Interno\";\r\n\t\t\t$c[2] = \"i.Descripcion\"; $v[2] = \"Descripcion\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase \"ORDENAR-LISTADO-ITEMS\":\r\n\t\t\t$c[0] = \"i.CodItem\"; $v[0] = \"Item\";\r\n\t\t\t$c[1] = \"i.CodInterno\"; $v[1] = \"Cod. Interno\";\r\n\t\t\t$c[2] = \"i.Descripcion\"; $v[2] = \"Descripcion\";\r\n\t\t\t$c[3] = \"i.CodUnidad\"; $v[3] = \"Uni.\";\r\n\t\t\t$c[4] = \"i.CodLinea, i.CodFamilia, i.CodSubFamilia\"; $v[4] = \"Familia\";\r\n\t\t\t$c[5] = \"ti.Descripcion\"; $v[5] = \"Tipo\";\r\n\t\t\t$c[6] = \"p.Descripcion\"; $v[6] = \"Procedencia\";\r\n\t\t\t$c[7] = \"i.PartidaPresupuestal\"; $v[7] = \"Partida\";\r\n\t\t\t$c[8] = \"i.CtaGasto\"; $v[8] = \"Cta. Gasto\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"NACIONALIDAD\":\r\n\t\t\t$c[0] = \"N\"; $v[0] = \"Nacional\";\r\n\t\t\t$c[1] = \"E\"; $v[1] = \"Extranjero\";\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\t$i = 0;\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) \r\n\t\t\t\t\techo \"<option value='\".$cod.\"' selected>\".($v[$i]).\"</option>\";\r\n\t\t\t\telse echo \"<option value='\".$cod.\"'>\".($v[$i]).\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) echo \"<option value='\".$cod.\"' selected>\".($v[$i]).\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "abfca32259d8dfc498c8e41b40bb9c14", "score": "0.500489", "text": "public function get_set_options()\n {\n $saved_options = get_option($this->options_name, array()); //Info saved as serialized arrays in wp_options table\n $this->options = array_merge($this->default_options, $saved_options);\n }", "title": "" }, { "docid": "abfca32259d8dfc498c8e41b40bb9c14", "score": "0.500489", "text": "public function get_set_options()\n {\n $saved_options = get_option($this->options_name, array()); //Info saved as serialized arrays in wp_options table\n $this->options = array_merge($this->default_options, $saved_options);\n }", "title": "" }, { "docid": "eb6e0538cf016da6c896b9a909237c4b", "score": "0.49927223", "text": "protected function readyAllPluginOptions() {\r\n\t\t$this->initPluginOptions();\r\n\t\t$this->populateAllPluginOptions();\r\n\t}", "title": "" }, { "docid": "a66df957aa20fe7dd898ce79d07322c1", "score": "0.49909258", "text": "function getAllOptionsAndValues() {\n\t\tif(0 === count($this->arrAllOptionsAndValues)){\n\n\t\t\t$allOptions = $this->getAllOptions();\n\t\t\t$allOptionValues = $this->getAllOptionValues();\n\n\t\t\t$query = $this->objDB->query(\"select * from \".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);\n\n\t\t\t$optionsId = null;\n\t\t\twhile($res = $this->objDB->fetchArray($query)) {\n\t\t\t\tif($res['products_options_id'] != $optionsId) {\n\t\t\t\t\t$optionsId = $res['products_options_id'];\n\t\t\t\t\t$this->arrAllOptionsAndValues[$optionsId]['name'] = $allOptions[$optionsId];\n\t\t\t\t}\n\t\t\t\t$this->arrAllOptionsAndValues[$optionsId]['values'][$res['products_options_values_id']] =\n\t\t\t\t$allOptionValues[$res['products_options_values_id']];\n\t\t\t}\n\n\t\t\t// add any options that are not yet assigned to the tpovtpo table\n\t\t\tforeach($allOptions as $optionId => $option)\n\t\t\tif(!array_key_exists($optionId, $this->arrAllOptionsAndValues))\n\t\t\t$this->arrAllOptionsAndValues[$optionId]['name'] = $allOptions[$optionId];\n\n\t\t}\n\t\t//\t$this->debugOutput($this->arrAllOptionsAndValues);\n\n\t\treturn $this->arrAllOptionsAndValues;\n\t}", "title": "" }, { "docid": "4e52341b373b38d15515b6647cb88563", "score": "0.49875402", "text": "function loadSelectValores($tabla, $codigo, $opt) {\r\n\tswitch ($tabla) {\t\r\n\t\tcase \"ESTADO-CARRERAS\":\r\n\t\t\t$c[0] = \"AB\"; $v[0] = \"Abierto\";\r\n\t\t\t$c[1] = \"TE\"; $v[1] = \"Terminado\";\r\n\t\t\t$c[2] = \"AN\"; $v[2] = \"Anulado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ORDENAR-EVALUACION\":\r\n\t\t\t$c[0] = \"e1.CodEmpleado\"; $v[0] = \"Empleado\";\r\n\t\t\t$c[1] = \"p1.NomCompleto\"; $v[1] = \"Nombre\";\r\n\t\t\t$c[2] = \"pu1.DescripCargo\"; $v[2] = \"Cargo\";\r\n\t\t\t$c[3] = \"ee.Periodo\"; $v[3] = \"Periodo\";\r\n\t\t\t$c[4] = \"ee.Estado\"; $v[4] = \"Estado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-EVALUACION\":\r\n\t\t\t$c[0] = \"EE\"; $v[0] = \"En Evaluación\";\r\n\t\t\t$c[1] = \"EV\"; $v[1] = \"Evaluado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"TIPO-VACACIONES\":\r\n\t\t\t$c[0] = \"G\"; $v[0] = \"Goce\";\r\n\t\t\t$c[1] = \"I\"; $v[1] = \"Interrupcion\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-VACACIONES\":\r\n\t\t\t$c[0] = \"PE\"; $v[0] = \"Pendiente\";\r\n\t\t\t$c[1] = \"RV\"; $v[1] = \"Revisado\";\r\n\t\t\t$c[2] = \"CO\"; $v[2] = \"Conformado\";\r\n\t\t\t$c[3] = \"AP\"; $v[3] = \"Aprobado\";\r\n\t\t\t$c[4] = \"AN\"; $v[4] = \"Anulado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"MODALIDAD-REQUERIMIENTO\":\r\n\t\t\t$c[0] = \"E\"; $v[0] = \"Externo\";\r\n\t\t\t$c[1] = \"I\"; $v[1] = \"Interno\";\r\n\t\t\t$c[2] = \"A\"; $v[2] = \"Ambos\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-REQUERIMIENTO\":\r\n\t\t\t$c[0] = \"PE\"; $v[0] = \"Pendiente\";\r\n\t\t\t$c[1] = \"AP\"; $v[1] = \"Aprobado\";\r\n\t\t\t$c[2] = \"EE\"; $v[2] = \"En Evaluación\";\r\n\t\t\t$c[3] = \"TE\"; $v[3] = \"Terminado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-REQUERIMIENTO2\":\r\n\t\t\t$c[0] = \"AP\"; $v[0] = \"Aprobado\";\r\n\t\t\t$c[1] = \"EE\"; $v[1] = \"En Evaluación\";\r\n\t\t\t$c[2] = \"AP|EE\"; $v[2] = \"Aprobado/En Evaluación\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-POSTULANTE\":\r\n\t\t\t$c[0] = \"P\"; $v[0] = \"Postulante\";\r\n\t\t\t$c[1] = \"A\"; $v[1] = \"Aceptado\";\r\n\t\t\t$c[2] = \"C\"; $v[2] = \"Contratado\";\r\n\t\t\t$c[3] = \"D\"; $v[3] = \"Descalificado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-CAPACITACION\":\r\n\t\t\t$c[0] = \"PE\"; $v[0] = \"Pendiente\";\r\n\t\t\t$c[1] = \"AP\"; $v[1] = \"Aprobado\";\r\n\t\t\t$c[2] = \"IN\"; $v[2] = \"Iniciado\";\r\n\t\t\t$c[3] = \"TE\"; $v[3] = \"Terminado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-CAPACITACION2\":\r\n\t\t\t$c[0] = \"AP\"; $v[0] = \"Aprobado\";\r\n\t\t\t$c[1] = \"IN\"; $v[1] = \"Iniciado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"TIPO-CAPACITACION\":\r\n\t\t\t$c[0] = \"E\"; $v[0] = \"Externo\";\r\n\t\t\t$c[1] = \"I\"; $v[1] = \"Interno\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"TIPO-HABILIDAD\":\r\n\t\t\t$c[0] = \"H\"; $v[0] = \"Habilidad\";\r\n\t\t\t$c[1] = \"D\"; $v[1] = \"Destreza\";\r\n\t\t\t$c[2] = \"C\"; $v[2] = \"Capacidad\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-BONO\":\r\n\t\t\t$c[0] = \"A\"; $v[0] = \"Abierto\";\r\n\t\t\t$c[1] = \"C\"; $v[1] = \"Cerrado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-JUBILACION\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"CN\"; $v[1] = \"Conformado\";\r\n\t\t\t$c[2] = \"AP\"; $v[2] = \"Aprobado\";\r\n\t\t\t$c[3] = \"AN\"; $v[3] = \"Anulado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"ESTADO-PENSION\":\r\n\t\t\t$c[0] = \"PR\"; $v[0] = \"En Preparación\";\r\n\t\t\t$c[1] = \"CN\"; $v[1] = \"Conformado\";\r\n\t\t\t$c[2] = \"AP\"; $v[2] = \"Aprobado\";\r\n\t\t\t$c[3] = \"AN\"; $v[3] = \"Anulado\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"MOTIVO-PENSION\":\r\n\t\t\t$c[0] = \"I\"; $v[0] = \"Invalidez\";\r\n\t\t\t$c[1] = \"N\"; $v[1] = \"Incapacidad\";\r\n\t\t\t$c[2] = \"F\"; $v[2] = \"Fallecimiento\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"MOTIVO-PENSION2\":\r\n\t\t\t$c[0] = \"I\"; $v[0] = \"Invalidez\";\r\n\t\t\t$c[1] = \"N\"; $v[1] = \"Incapacidad\";\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\t$i = 0;\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) echo \"<option value='\".$cod.\"' selected>\".$v[$i].\"</option>\";\r\n\t\t\t\telse echo \"<option value='\".$cod.\"'>\".$v[$i].\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 1:\r\n\t\t\tforeach ($c as $cod) {\r\n\t\t\t\tif ($cod == $codigo) echo \"<option value='\".$cod.\"' selected>\".$v[$i].\"</option>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "b420f71d535dbbfc698b88a911981ff6", "score": "0.4980109", "text": "protected function get_options()\n\t{}", "title": "" }, { "docid": "4f350217782e2c24a95317bf611f29b5", "score": "0.49799907", "text": "private function prepareSelect(){\r\n\t\r\n\t\t$selectedOption = $this->selectedOptions;\r\n\t\t//var_dump($selectedOption);\r\n\t\t$selected = '';\r\n\t\t\r\n\t\techo '<select ';\r\n\t\techo 'name = \"'.$this->name.'\" ';\r\n\t\techo (isset($this->settings['id']))? 'id = \"'.$this->settings['id'].'\" ':null;\r\n\t\techo (isset($this->settings['style']))? $this->settings['style']:null;\r\n\t\techo (isset($this->settings['disabled']) && $this->settings['disabled'])? 'disabled=\"disabled\"':null;\t\r\n\t\techo ' >';\r\n\t\tforeach($this->options as $option=>$optionText){\r\n\t\t\t\r\n\t\t\tif($selectedOption == $option){\r\n\t\t\t\t$selected = 'selected=\"selected\"';\r\n\t\t\t}else{\r\n\t\t\t\t$selected = '';\r\n\t\t\t}//end if\r\n\t\t\t\r\n\t\t\techo '<option value=\"'.$option.'\" '.$selected.'>'.$optionText.'</option>';\r\n\t\t\t\r\n\t\t}//end foreach\r\n\t\techo ' </select>';\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "dbf567a0aed80cf76939e1b0dc0cd078", "score": "0.4956007", "text": "protected function addToOptions()\n {\n foreach ($this->ifthenpayGateway->getEntidadeSubEntidade($this->paymentMethod) as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $key2 => $value2) {\n if (strlen($value2) > 3) {\n $this->options[] = [\n 'id' => $value2,\n 'name' => $value2\n ];\n }\n }\n } else {\n $this->options[] = [\n 'id' => $value,\n 'name' => $value\n ];\n }\n }\n }", "title": "" }, { "docid": "8e4e5d84b860e4200e7e3f3a08d96cbe", "score": "0.49547383", "text": "function load_settings() {\n\t\t$this->manage_settings = (array) get_option( $this->manage_settings_key );\n\t\t$this->advanced_settings = (array) get_option( $this->advanced_settings_key );\n\t\t\n\t\t// Merge with defaults\n\t\t\n\t\t$this->advanced_settings = array_merge( array(\n\t\t\t'advanced_option' => 'Advanced value'\n\t\t), $this->advanced_settings );\n\t}", "title": "" }, { "docid": "f51fc70e90d4b7e29b9633c022f107ed", "score": "0.49517068", "text": "public function Do_Allselect_Example1(){\n\n\t}", "title": "" }, { "docid": "8fa1973ac64ff3a28c553d7ba481c15b", "score": "0.4947201", "text": "private static function load_all_options_from_db()\n {\n //return true if options list is empty\n if (!count(self::$options_list)) {\n return true;\n }\n self::$loaded = true;\n // build query\n $query = '';\n $table_name = wMyWallet_DBHelper::wpdb()->prefix . 'options';\n $query .= \"Select * from $table_name where \";\n $condition = '';\n $and = false;\n foreach (self::$options_list as $key => $type) {\n // add \" and \"\n if ($and) {\n $condition .= ' OR ';\n } else {\n $and = true;\n }\n\n $condition .= 'option_name=' . \"'\" . wMyWallet_DBHelper::prefix . $key . \"'\";\n }\n $query .= $condition;\n // execute query and get result\n $result = wMyWallet_DBHelper::select($query);\n\n if (count($result)) {\n $plugin_prefix_length = strlen(wMyWallet_DBHelper::prefix);\n foreach ($result as $object) {\n // remove prefix\n $option_key = substr($object->option_name, $plugin_prefix_length);\n // cast and put to self::$data\n self::$data[$option_key] = self::cast_option($option_key, $object->option_value);\n self::$exist_options_in_db[$option_key] = true;\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b170b501461e4b770d4f9c8f4a7a9b0b", "score": "0.49356627", "text": "protected function _reset_select()\n {\n }", "title": "" }, { "docid": "7b09b6a9c423a70dc46d18c5bef8149f", "score": "0.49340606", "text": "protected abstract function LoadData(DataSelect $Select);", "title": "" }, { "docid": "76afd366a3f4f37e71071406211f036d", "score": "0.4930533", "text": "function getCargoExt($cargodestinatario, $destinatario, $opt, $organismo) {\r\n\tconnect();\r\n\tif ($opt==3 && $_SESSION[\"USUARIO_ACTUAL\"]==$_SESSION[\"SUPER_USUARIO\"]) $opt=0;\r\n\tswitch ($opt) {\r\n\t\tcase 0:\r\n\t\t\t$sql=\"SELECT CargoRepresentLegal FROM pf_dependenciasexternas WHERE RepresentLegal='\".$destinatario.\"' AND CargoRepresentLegal<>'' ORDER BY CodDependencia\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tfor ($i=0; $i<$rows; $i++) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\tif ($field[0]==$dependencia) echo \"<option value='\".$field[0].\"' selected>\".htmlentities($field[0]).\"</option>\"; \r\n\t\t\t\telse echo \"<option value='\".$field[0].\"'>\".htmlentities($field[0]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\t$sql=\"SELECT CargoRepresentLegal FROM pf_dependenciasexternas WHERE RepresentLegal='\".$destinatario.\"' AND CodDependencia='\".$destinatario.\"' AND CodOrganismo='\".$organismo.\"' AND CargoRepresentLegal<>'' ORDER BY CodDependencia\";\r\n\t\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t\t$rows=mysql_num_rows($query);\r\n\t\t\tfor ($i=0; $i<$rows; $i++) {\r\n\t\t\t\t$field=mysql_fetch_array($query);\r\n\t\t\t\tif ($field[0]==$cargodestinatario) echo \"<option value='\".$field[0].\"' selected>\".htmlentities($field[0]).\"</option>\"; \r\n\t\t\t\telse echo \"<option value='\".$field[0].\"'>\".htmlentities($field[0]).\"</option>\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "26a4c86bbed04c12f8c9965ec406e013", "score": "0.4924299", "text": "function comboboxOptions() {\n\n\t\t$conn = databaseConnect(\"Pet\");\n\t\t\n\t\ttry {\n\t\t\t$sql = \"select id, name from Pets\";\n\t\t\t$stmt = sqlsrv_query($conn, $sql);\n\t\t\tif ($stmt === false) {\n\t\t\t\techo \"Error Occurred: \" . sqlsrv_errors();\n\t\t\t} else {\n\t\t\t\t$storeValueId;\n\t\t\t\twhile ($row = sqlsrv_fetch_object($stmt)) {\n\t\t\t\t\techo \"<option id = \" . $row->id . \" value = \" . $row->name . \">\" . $row->name . \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Throwable $e) {\n\t\t\techo \"Throwable Error: \" . $e;\n\t\t}\n\n\t\tsqlsrv_close($conn);\n\t}", "title": "" }, { "docid": "ce7623821e347eacf2b3ccbbc9092935", "score": "0.4914896", "text": "function loadSelectEvaluacion($Evaluacion) {\r\n\t$i=0;\r\n\t$sql = \"SELECT\r\n\t\t\t\te.Evaluacion,\r\n\t\t\t\te.Descripcion,\r\n\t\t\t\te.TipoEvaluacion,\r\n\t\t\t\tte.Descripcion As NomTipoEvaluacion\r\n\t\t\tFROM\r\n\t\t\t\trh_evaluacion e\r\n\t\t\t\tINNER JOIN rh_tipoevaluacion te ON (te.TipoEvaluacion = e.TipoEvaluacion)\r\n\t\t\tWHERE e.Estado = 'A'\r\n\t\t\tORDER BY TipoEvaluacion, Descripcion, Evaluacion\";\r\n\t$query = mysql_query($sql) or die(getErrorSql(mysql_errno(), mysql_error(), $sql));\r\n\twhile ($field = mysql_fetch_array($query)) {\t++$i;\r\n\t\tif ($Grupo != $field['TipoEvaluacion']) {\r\n\t\t\t$Grupo = $field['TipoEvaluacion'];\r\n\t\t\tif ($i>1) { ?></optgroup><? }\r\n\t\t\t?><optgroup label=\"<?=htmlentities($field['TipoEvaluacion'].\" \".$field['NomTipoEvaluacion'])?>\"><?\r\n\t\t}\r\n\t\tif ($field[0] == $Evaluacion) { ?><option value=\"<?=$field[0]?>\" selected=\"selected\"><?=($field[1])?></option><? }\r\n\t\telse { ?><option value=\"<?=$field[0]?>\"><?=($field[1])?></option><? }\r\n\t}\r\n}", "title": "" }, { "docid": "79e2fe3969f3af30f3745e58024fa9e7", "score": "0.4910029", "text": "function get_options() {\n //set values from Cookies\n\t if (isset($_COOKIE['sortOrder'])) {\n\t\t $indexSortOrder = intval($_COOKIE['sortOrder']);\n\t\t if (isset( self::$sortOrders[$indexSortOrder] )) {\n\t\t\t $this->data['sortOrder'] = $indexSortOrder;\n\t\t }\n\t }\n\t if (isset($_COOKIE['sortElem'])) {\n\t\t $indexSortElem = intval($_COOKIE['sortElem']);\n\t\t if (isset( self::$sortElems[$indexSortElem] )) {\n\t\t\t $this->data['sortElem'] = $indexSortElem;\n\t\t }\n\t }\n //set values from POST\n if (isset($_POST['sortOrder'])) {\n $indexSortOrder = intval($_POST['sortOrder']);\n if (isset( self::$sortOrders[$indexSortOrder] )) {\n $this->data['sortOrder'] = $indexSortOrder;\n }\n }\n if (isset($_POST['sortElem'])) {\n $indexSortElem = intval($_POST['sortElem']);\n if (isset( self::$sortElems[$indexSortElem] )) {\n $this->data['sortElem'] = $indexSortElem;\n }\n }\n\t //set default values\n\t if (!isset($this->data['sortOrder']) )\n\t $this->data['sortOrder'] = 0; //DESC sort\n\t if (!isset($this->data['sortElem']))\n\t $this->data['sortElem'] = 0; //date field sorting;\n\n }", "title": "" }, { "docid": "9da17ffe3d88bfe153073fd072d43ae2", "score": "0.4906372", "text": "function ajouter_select_double($liste_1, $dependances, $nom_colonne_1, $nom_colonne_2, $valeur_2, $obligatoire, $action_js = '', $valeur_1 = 0)\n {\n $code_js = 'var i = document.getElementById(\\'' . $nom_colonne_1 . '\\').value;';\n $code_js .= 'var select_elem = document.getElementById(\\'' . $nom_colonne_2 . '\\');';\n\n $code_js .= 'while (select_elem.length>1) select_elem.remove(1);';\n\n foreach ($liste_1 as $code_1) {\n $code_js .= 'if (i==' . $code_1 . ') {';\n if (isset($dependances[$code_1])) {\n foreach ($dependances[$code_1] as $code_2) {\n $code_js .= 'var option = document.createElement(\\'option\\');';\n $code_js .= 'option.text = \\'' . str_replace('\\'', \"\\'\", htmlspecialchars(get_nom_valeur($nom_colonne_2, $code_2))) . '\\';';\n $code_js .= 'option.value = \\'' . $code_2 . '\\';';\n $code_js .= 'select_elem.add(option);';\n }\n }\n $code_js .= '}';\n }\n\n $liste_2 = array();\n if ($valeur_1 == 0) {\n foreach ($dependances as $code_1 => $liste_code_2) {\n foreach ($liste_code_2 as $code_2) {\n if ($code_2 == $valeur_2) {\n $liste_2 = $liste_code_2;\n $valeur_1 = $code_1;\n }\n }\n }\n } else {\n foreach ($dependances as $code_1 => $liste_code_2) {\n if ($code_1 == $valeur_1) {\n $liste_2 = $liste_code_2;\n }\n }\n }\n\n $this->ajouter_select($liste_1, $nom_colonne_1, $valeur_1, $obligatoire, $code_js);\n $this->ajouter_select($liste_2, $nom_colonne_2, $valeur_2, $obligatoire, $action_js);\n }", "title": "" }, { "docid": "a7fcacb937d938294ec66360f6dab5ee", "score": "0.49051708", "text": "public function initParamOptionsFields()\n {\n $options_fields = $this->set_options_fields();\n if (! empty($options_fields)) :\n $this->OptionsFields = (array)$options_fields;\n else :\n $this->OptionsFields = $this->getConfig('options_fields');\n endif;\n }", "title": "" }, { "docid": "cfd75b213f323180aa4e06d6e89e17dd", "score": "0.49034488", "text": "public function actionPopulatesubbrandddl()\n { \n $out = [];\n if (isset($_POST['depdrop_parents'])) { \n $parents = $_POST['depdrop_parents'];\n $brand_id = $parents[0];\n if ($brand_id != null) {\n $out = self::getSubbrandddl($brand_id); \n foreach ($out as $i => $val) {\n $selected=$val['id'];\n }\n echo Json::encode(['output'=>$out, 'selected'=>'']);\n return;\n }\n }\n echo Json::encode(['output'=>'', 'selected'=>'']);\n }", "title": "" }, { "docid": "1471bda5c450f875d2878773743f0752", "score": "0.48988295", "text": "function field_option_dropdown($args) {\r\n $options = get_option($args['tab_key']);\r\n $str1 = '';\r\n $str2 = '';\r\n if(isset($options[$args['key']])){\r\n if($options[$args['key']] == 'invoice'){\r\n $str1 = 'selected';\r\n }\r\n\t\t\t\t\telseif($options[$args['key']] == 'order'){\r\n\t\t\t\t\t\t$str2 = 'selected';\r\n\t\t\t\t\t}\r\n }\r\n\r\n ?>\r\n <select <?php echo isset($args['id'])? 'id=\"'.$args['id'].'\"':''; ?> name=\"<?php echo $args['tab_key']; ?>[<?php echo $args['key']; ?>]\">\r\n \t<option <?php echo $str1; ?> value='invoice'><?php _e('Create invoice', 'woocommerce-e-conomic-integration'); ?></option>\r\n <option <?php echo $str2; ?> value='order'><?php _e('Create order', 'woocommerce-e-conomic-integration'); ?></option>\r\n </select>\r\n <span><i><?php echo $args['desc']; ?></i></span>\r\n <?php\r\n }", "title": "" }, { "docid": "75ed8c72474d3b2fdde9e1195e0a4524", "score": "0.48932105", "text": "protected function _initSelect()\n {\n $this->getSelect()->from(array('main_table' => $this->getResource()->getMainTable()))\n ->where('main_table.entity_type_id=?', Mage::getModel('eav/entity')->setType('gene_bluefoot_taxonomy_term')->getTypeId())\n ->join(\n array('additional_table' => $this->getTable('gene_bluefoot/eav_attribute')),\n 'additional_table.attribute_id=main_table.attribute_id'\n );\n return $this;\n }", "title": "" }, { "docid": "593b685bff08f43c663677c5525da1f4", "score": "0.48880002", "text": "public function getStoreSelectOptions()\n {\n $section = $this->getRequest()->getParam('section');\n $curStore = $this->getRequest()->getParam('store');\n\n $storeModel = Mage::getSingleton('adminhtml/system_store');\n /* @var $storeModel Mage_Adminhtml_Model_System_Store */\n\n $url = Mage::getModel('adminhtml/url');\n\n $options = array();\n $options['default'] = array(\n 'label' => Mage::helper('adminhtml')->__('Default Config'),\n 'url' => $url->getUrl('*/*/*', array('section' => $section)),\n 'selected' => !$curStore,\n 'style' => 'background:#ccc; font-weight:bold;',\n );\n\n foreach ($storeModel->getWebsiteCollection() as $website) {\n /** @var Mage_Core_Model_Website $website */\n\n $websiteShow = false;\n\n foreach ($website->getStores() as $store) {\n /** @var Mage_Core_Model_Store $store */\n\n\n $options['store_' . $store->getId()] = array(\n 'label' => $website->getName() . ' - ' . $store->getName(),\n 'url' => $url->getUrl('*/*/*', array('section' => $section, 'store' => $store->getId())),\n 'selected' => $curStore == $store->getId(),\n 'style' => 'padding-left:16px; background:#DDD; font-weight:bold;',\n );\n }\n }\n\n return $options;\n }", "title": "" }, { "docid": "2a6748b74f2c735de6baea0218a107b3", "score": "0.48856616", "text": "function getOptions() {\n //Don't forget to set up the default options\n if (!$theOptions = get_option($this->optionsName)) {\n $theOptions = array('default'=>'options');\n update_option($this->optionsName, $theOptions);\n }\n $this->options = $theOptions;\n\n //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n //There is no return here, because you should use the $this->options variable!!!\n //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n }", "title": "" }, { "docid": "48b5939f43f888ee734c4db7bbc3c328", "score": "0.48725024", "text": "public function admin_options() {\n\n\t\t// allow parent to do its thing\n\t\tparent::admin_options();\n\n\t\t// 'testmode' only applies to production accounts and hide/show the demo/production field\n\t\tob_start();\n\t\t?>\n\t\t$( '#woocommerce_elavon_vm_account' ).change(\n\t\t\tfunction() {\n\t\t\t\tvar testmode_row = $( '#woocommerce_elavon_vm_testmode' ).closest( 'tr' );\n\n\t\t\t\tif ( 'production' == $( this ).val() ) {\n\t\t\t\t\ttestmode_row.show();\n\n\t\t\t\t\t$( '.production-field' ).closest( 'tr' ).show();\n\t\t\t\t\t$( '.demo-field' ).closest( 'tr' ).hide();\n\t\t\t\t} else {\n\t\t\t\t\ttestmode_row.hide();\n\n\t\t\t\t\t$( '.demo-field' ).closest( 'tr' ).show();\n\t\t\t\t\t$( '.production-field' ).closest( 'tr' ).hide();\n\t\t\t\t}\n\t\t\t} ).change();\n\t\t<?php\n\n\t\twc_enqueue_js( ob_get_clean() );\n\t}", "title": "" }, { "docid": "09e38541c2cb62987fb4b1139e8c0506", "score": "0.48674986", "text": "public function init()\n {\n $defaultValue = $this->getDefaultValue();\n $defaultName = $this->getDefaultName();\n\n $options = array();\n \n if ((null !== $defaultValue && false !== $defaultValue) &&\n (null !== $defaultValue && false !== $defaultName))\n {\n $options[$defaultValue] = $defaultName;\n\n $this->setValue($defaultValue);\n }\n\n $options = $options + $this->getOptionsFromQuery();\n\n $this->setMultiOptions($options);\n }", "title": "" }, { "docid": "c6827f6b10aba37706ad4829bb3187ef", "score": "0.48602462", "text": "public function empty_seksi_dropdown_select(){\n $empty_select = '<select name=\"SeksiID\" class=\"chosen-select\" data-placeholder=\"Select Section\" style=\"width: 300px; display: none;\">';\n $empty_select_closed = '</select>';\n //GET THE ID OF THE LISTING USING URI\n $listingID = $this->uri->segment(5);\n \n //LOAD GCRUD AND GET THE STATE\n $crud = new grocery_CRUD();\n $state = $crud->getState();\n \n //CHECK FOR A URI VALUE AND MAKE SURE ITS ON THE EDIT STATE\n if(isset($listingID) && $state == \"edit\") {\n //GET THE STORED STATE ID\n $this->db->select('CompanyId, DivisiID, DeptID, UnitID, SeksiID')\n ->from($this->tbl_profile)\n ->where('NIK', $listingID);\n $db = $this->db->get();\n $row = $db->row(0);\n $UnitID = $row->UnitID;\n $DeptID = $row->DeptID;\n $SeksiID = $row->SeksiID;\n \n //GET THE CITIES PER STATE ID\n $this->db->select('iSectionID, cSectionName')\n ->from('tbl_section')\n ->where('unitID', $UnitID);\n $db = $this->db->get();\n \n //APPEND THE OPTION FIELDS WITH VALUES FROM THE STATES PER THE COUNTRY ID\n foreach($db->result() as $row):\n if($row->iSectionID == $SeksiID) {\n $empty_select .= '<option value=\"'.$row->iSectionID.'\" selected=\"selected\">'.$row->cSectionName.'</option>';\n } else {\n $empty_select .= '<option value=\"'.$row->iSectionID.'\">'.$row->cSectionName.'</option>';\n }\n endforeach;\n \n //RETURN SELECTION COMBO\n return $empty_select.$empty_select_closed;\n } else {\n //RETURN SELECTION COMBO\n return $empty_select.$empty_select_closed; \n }\n }", "title": "" }, { "docid": "a43db91fefba3d6883d3d5139ea4a1b7", "score": "0.4860077", "text": "private function set_options() {\n $this->options = get_option($this->plugin_name.'-options');\n }", "title": "" } ]
7761ed193d79eb90565c9234d994b5fc
mostrarTotales F: fila, C: columna, A: ambos
[ { "docid": "22f7198b05c83488a40247a147ebb83e", "score": "0.6760632", "text": "public function crossTab($conteos,$codConteo,$nbrConteo,$columnas,$codColumna,$nbrColumna,$decimales=0,$mostrarTotales='A'){\n $conteosArr=array();\n foreach ($conteos as $conteo) {\n if(!isset($conteosArr[$conteo[$codConteo]])){\n $conteosArr[$conteo[$codConteo]]=array();\n }\n $conteosArr[$conteo[$codConteo]][$conteo['codigo']]=$conteo['cantidad'];\n }\n $columnArr=array();\n $columnArr[]=array('title' => $nbrConteo,'border' => 1,);\n foreach ($columnas as $columna) {\n $columnArr[]=array('title' => $columna[$nbrColumna], 'border' => 1, 'align' => 'R',);\n }\n if(in_array($mostrarTotales,array('F','A'))){\n $columnArr[]=array('title' => 'Totales','border' => 1,'align' => 'R',);\n }\n\n $reporteArr=$totales=array();\n $totales[]='Totales';\n foreach ($conteosArr as $anio => $value) {\n $subtotal=0;\n $tmp=array($anio);\n reset($columnas);\n foreach ($columnas as $columna) {\n if(!isset($totales[$columna[$codColumna]])){\n $totales[$columna[$codColumna]]=0;\n }\n if(!isset($value[$columna[$codColumna]])){\n $tmp[]=0;\n }\n else{\n $subtotal+=$value[$columna[$codColumna]];\n $tmp[]=number_format($value[$columna[$codColumna]],$decimales);\n $totales[$columna[$codColumna]]+=$value[$columna[$codColumna]];\n }\n }\n if(in_array($mostrarTotales,array('F','A'))){\n $tmp[]=number_format($subtotal,$decimales);\n }\n $reporteArr[]=$tmp;\n if(in_array($mostrarTotales,array('F','A'))){\n if(!isset($totales['subtotal'])){\n $totales['subtotal']=0;\n }\n $totales['subtotal']+=$subtotal;\n }\n }\n foreach ($totales as $key => $value) {\n if($value=='Totales'){\n continue;\n }\n $totales[$key]=number_format($value,$decimales);\n }\n if(in_array($mostrarTotales,array('C','A')) && count($reporteArr)){\n $reporteArr[]=array_values($totales);\n }\n $this->dataTable($columnArr,$reporteArr);\n $this->newLine();\n }", "title": "" } ]
[ { "docid": "0e0cc60282273a9059804160e15bb72d", "score": "0.684768", "text": "function ObtenerTotales($id_factura) {\n $query=\"SELECT SUM(total) total, SUM(valorseguro) total_seguro\nFROM \".Guia::$table.\" WHERE idfactura=$id_factura\";\n return DBManager::execute($query);\n }", "title": "" }, { "docid": "3717ca19d81d6dbe3c7344182e7f2a84", "score": "0.67566866", "text": "function tabla_filas_proyecto($filas,$moneda,$cant,$tip,$barc,$artc,$desc,$prev,$mon,$mons,$monc,$tfdsc,$fdsc,$tdsc,$dsc,$IVA){\n\t\t$monchunk = explode(\"/\",$moneda); \n\t\t$Vmond = trim($monchunk[0]); // Nombre de Moneda\n\t\t$Vmons = trim($monchunk[1]); // Simbolo de Moneda\n\t\t$Vmonc = trim($monchunk[2]); // Tipo de Cambio\n\t\t$Vmonc = str_replace(\"(\",\"\",$Vmonc); //le quita el primer parentesis que rodea el tipo de cambio\n\t\t$Vmonc = str_replace(\" x 1)\",\"\",$Vmonc); //le quita el 2do. parentesis y el x 1\n\t\t\t$salida = '<br>';\n\t\t\t$salida.= '<table class = \"tablegrid\">';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\" height = \"30px\">No.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Cant.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"300px\">Descipción</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Unitario</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Descuento</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Total</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\"></td>';\n\t\t\t$salida.= '</tr>';\n\t$STotal = 0;\n\t$Total = 0;\n\t$Rtotal = 0;\n\t$DescU = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//No.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.$i.'.</td>';\n\t\t\t//Cantidad\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spancant'.$i.'\">'.$cant[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"cant'.$i.'\" id = \"cant'.$i.'\" value = \"'.$cant[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tip'.$i.'\" id = \"tip'.$i.'\" value = \"'.$tip[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descripcion o Articulo\n\t\t\t$desc[$i] = utf8_decode($desc[$i]);\n\t\t\t$desc[$i] = trim($desc[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"left\">'.$desc[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"barc'.$i.'\" id = \"barc'.$i.'\" value = \"'.$barc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"artc'.$i.'\" id = \"artc'.$i.'\" value = \"'.$artc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"desc'.$i.'\" id = \"desc'.$i.'\" value = \"'.$desc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Precio U.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.trim($mons[$i]).' '.$prev[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"prev'.$i.'\" id = \"prev'.$i.'\" value = \"'.$prev[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mon'.$i.'\" id = \"mon'.$i.'\" value = \"'.trim($mon[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mons'.$i.'\" id = \"mons'.$i.'\" value = \"'.trim($mons[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"monc'.$i.'\" id = \"monc'.$i.'\" value = \"'.trim($monc[$i]).'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descuento\n\t\t\t$dsign = ($tdsc[$i] == \"P\")?\"%\":trim($mons[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandsc'.$i.'\">'.$dsign.' '.$dsc[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tdsc'.$i.'\" id = \"tdsc'.$i.'\" value = \"'.$tdsc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"dsc'.$i.'\" id = \"dsc'.$i.'\" value = \"'.$dsc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//sub Total\n\t\t\t$rtot = ($prev[$i] * $cant[$i]);\n\t\t\tif($tdsc[$i] == \"P\"){\n\t\t\t\t$descuento = ($rtot *($dsc[$i])/100);\n\t\t\t}else if($tdsc[$i] == \"M\"){\n\t\t\t $descuento = $dsc[$i];\n\t\t\t}\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$descuento);\n\t\t\t$DescU += $Dcambiar;\n\t\t\t$stot = $rtot - $descuento;\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$stot);\n\t\t\t$STotal+= $Dcambiar;\n\t\t\t$Rcambiar = Cambio_Moneda($monc[$i],$Vmonc,$rtot);\n\t\t\t$Rtotal+= $Rcambiar;\n\t\t\t$stot = round($stot, 2);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstot'.$i.'\">'.trim($mons[$i]).' '.$stot.'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stot'.$i.'\" id = \"stot'.$i.'\" value = \"'.$stot.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"rtot'.$i.'\" id = \"rtot'.$i.'\" value = \"'.$rtot.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//---\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<a href = \"javascript:void(0);\" onclick = \"QuitarFilaVenta('.$i.')\" title = \"Quitar Fila\" style = \"border:none;\" ><img src = \"../../CONFIG/images/icons/delete.png\" style = \"vertical-align:middle;border:none;\"></a>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\tif($tfdsc == \"P\"){\n\t\t\t\t$descuento = ($STotal *($fdsc)/100);\n\t\t\t}else if($tfdsc == \"M\"){\n\t\t\t $descuento = $fdsc;\n\t\t\t}\n\t\t\t$Total = $STotal - $descuento;\n\t\t\t$STotal = round($STotal, 2); //total sin iva\n\t\t\t$Total = round($Total, 2); //total sin iva\n\t\t\t$DescU = round($DescU, 2); //promedio de descuento\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"3\" rowspan = \"4\">';\n\t\t\t$salida.= '<span id = \"spannota\">';\n\t\t\t$salida.= '<b>NOTA:</b> MONEDA PARA COTIZACI&Oacute;N: <b>'.$Vmond.'</b>. TIPO DE CAMBIO '.$Vmonc.' x 1';\n\t\t\t$salida.= '</span></td>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/Unitarios</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanpromdesc\"><b>'.$Vmons.' '.$DescU.'</b></span>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"promdesc\" id = \"promdesc\" value = \"'.$DescU.'\" /></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Subtotal</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstotal\"><b>'.$Vmons.' '.$STotal.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stotal\" id = \"stotal\" value = \"'.$STotal.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/General</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandscgeneral\"><b>'.$Vmons.' '.$descuento.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"tdescuento\" value = \"'.$descuento.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttdescuento\" value = \"'.$tfdsc.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">TOTAL</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanttotal\"><b>'.$Vmons.' '.$Total.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttotal\" value = \"'.$Total.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Rtotal\" id = \"Rtotal\" value = \"'.$Rtotal.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"filas\" id = \"filas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\t\t$salida.= '</form>';\n\t\t\t$salida.= '<br>';\n\t\n\treturn $salida;\n}", "title": "" }, { "docid": "201ace452d3a3df5247a896415bf9792", "score": "0.66649944", "text": "public function gera_linhas_somatorios()\n\t{\n\t\tif(count($this->somatorios) > 0)\n\t\t{\n\t\t\techo \"<tr class=totalizadores>\";\n\t\t\tfor($i=0; $i < count($this->nome_colunas); $i++)\n\t\t\t{\n\t\t\t\t$alinhamento = $this->nome_colunas[$i][alinhamento];\n\n\t\t\t\tfor($b=0; $b < count($this->somatorios); $b++)\n\t\t\t\t{\n\t\t\t\t\tif($this->nome_colunas[$i][nome_coluna] == $this->somatorios[$b][nome_coluna])\n\t\t\t\t\t{\n\t\t\t\t\t\t$valor = $this->somatorios[$b][total];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// \tVERIFICO SE E PARA IMPRIMIR O VALOR\n\t\t\t\tif($this->nome_colunas[$i][somatorio] == 's')\n\t\t\t\t{\n\t\t\t\t\t//\t ESCOLHO O TIPO DE DADO\n\t\t\t\t\tswitch($this->nome_colunas[$i][tipo])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'moeda':\n\t\t\t\t\t\t\t$valor = Util::exibe_valor_moeda($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'data':\n\t\t\t\t\t\t\t$valor = Util::data_certa($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$valor = $valor;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"\n\t\t\t\t\t\t \t<td align=$alinhamento>\n\t\t\t\t\t\t\t\t\" . $valor . \"\n\t\t\t\t\t\t \t</td>\n\t\t\t\t\t\t \";\n\t\t\t\t\t$valor = '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"<td align=$alinhamento></td>\";\n\t\t\t\t}\n\n\n\n\t\t\t}\n\t\t\techo '</tr>';\n\t\t}\n\t}", "title": "" }, { "docid": "eefb25a8dad89ae985b2a86d33c66e52", "score": "0.65791523", "text": "function tabla_filas_proyecto_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.$opera[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.$boucher[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.$observ[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "title": "" }, { "docid": "bbf10612c522eee21413aecb483002da", "score": "0.6534269", "text": "function tabla_filas_compra_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$empresa,$caja,$banco,$cuenta,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t$empresa = explode(\"|\", $empresa);\n\t\t$caja = explode(\"|\", $caja);\n\t\t$banco = explode(\"|\", $banco);\n\t\t$cuenta = explode(\"|\", $cuenta);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.utf8_decode($opera[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.trim($boucher[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.utf8_decode($observ[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tsucur'.$i.'\" id = \"Tsucur'.$i.'\" value = \"'.$empresa[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcaja'.$i.'\" id = \"Tcaja'.$i.'\" value = \"'.$caja[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tbanco'.$i.'\" id = \"Tbanco'.$i.'\" value = \"'.$banco[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcuenta'.$i.'\" id = \"Tcuenta'.$i.'\" value = \"'.$cuenta[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "title": "" }, { "docid": "bc024634d5a69ce24d74248704a779a0", "score": "0.653245", "text": "public function suma_compras_anio_mes_grafica($fecha){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n //se usa para traducir el mes en la grafica\n //imprime la fecha por separado ejemplo: dia, mes y año\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n \n\n //SI EXISTE EL ENVIO POST ENTONCES SE MUESTRA LA FECHA SELECCIONADA\n if(isset($_POST[\"year\"])){\n\n $fecha=$_POST[\"year\"];\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }\n\n\n } else {\n\n\n//sino se envia el POST, entonces se mostraria los datos del año actual cuando se abra la pagina por primera vez\n\n $fecha_inicial=date(\"Y\");\n\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }//cierre del foreach\n\n\n }//cierre del else\n\n\n }", "title": "" }, { "docid": "af52aded4de1ada767220e60f4c76d8f", "score": "0.6384717", "text": "public function comunas(){\n\n\n\t$a=\"select comuna, count(comuna) from codigos group by comuna desc\";\n\t$ta=$this->conexion->query($a);\n\twhile($t=mysqli_fetch_array($ta)){\n\n echo \"<tr>\";\n echo \"<td>\";\n echo $t[0];\n\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n\n\n\n\n \n\n\n echo $t[1];\n echo \"</td>\";\n echo \"</tr>\";\n\n \n\n\n \n\t}\n\n\n}", "title": "" }, { "docid": "ea355d0601b477f4c4a7a3d628a591b4", "score": "0.6357932", "text": "function ventas_totales(){\n\t\tglobal $link;\n\t\n\t\t$sql =\"SELECT SUM(importe) FROM consumos\";\n\t\t$query = mysqli_query($link,$sql);\n\t\t$total = mysqli_fetch_assoc($query);\n\t\t\n\t\treturn $total[\"SUM(importe)\"];\n}", "title": "" }, { "docid": "485272be20901c1052c2d474354e0eb6", "score": "0.6344737", "text": "function tabla($numero){\n\t\t\n\t\techo \"<h3>Tabla de multiplicar del numero: $numero </h3>\";\n\t\tfor ($i=1; $i <=10 ; $i++) {\n\t\t\t$resultado = $numero*$i;\n\n\t\t\techo \"$numero x $i = $resultado <br>\"; \n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "cad9eec701599f0b5f7e3581d6d43eb5", "score": "0.6341821", "text": "public function gerencial_Totales($idCampo, $nombreTabla, $fechaInicial = \"\", $fechaFinal = \"\", $nombreFecha = \"fecha\"){\n\t\t\n\t\t$resultado \t\t= 0;\n\t\t$adicionQuery\t= \"\";\n\t\t\n\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t$adicionQuery = \"AND ( $nombreFecha BETWEEN '$fechaInicial' AND '$fechaFinal') \"; \n\t\t}\n\t\t\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t COUNT($idCampo) AS total\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t $nombreTabla\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t 1 \".$adicionQuery;\n\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n \tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas['total'];\n } \n \n }//fin if\n\t\t\n return $resultado;\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "574788591a5a90c99283744cc4fbdbd7", "score": "0.63369274", "text": "static public function ctrAgregarTabla($datos){\n\n\t\t\n\t\techo '<table class=\"table table-bordered\">\n <tbody>\n <tr>\n <th style=\"width: 10px;\">#</th>\n <th style=\"width: 10px;\">Cantidad</th>\n <th style=\"width: 400px;\">Articulo</th>\n <th style=\"width: 70px;\">Precio</th>\n <th style=\"width: 70px;\">Total</th>\n <th style=\"width: 10px;\">Opciones</th> \n </tr>';\n\t\t\n\t\t\techo \"<tr>\n\t\t\t\t\t\n\t\t\t\t\t<td>1.</td>\n\t\t\t\t\t<td><span class='badge bg-red'>\".$datos['cantidadProducto'].\"</span></td>\n\t\t\t\t\t<td>\".$datos['productoNombre'].\"</td>\n\t\t\t\t\t<td style='text-align: right;'>$ \".$datos['precioVenta'].\".-</td>\n\t\t\t\t\t<td style='text-align: right;'>$ \".$datos['cantidadProducto']*$datos['precioVenta'].\".-</td>\n\t\t\t\t\t<td><button class='btn btn-link btn-xs' data-toggle='modal' data-target='#myModalEliminarItemVenta'><span class='glyphicon glyphicon-trash'></span></button></td>\n\t\t\t\t\t\n\t\t\t\t </tr>\";\n\t\t\t\t\n\t\techo '</tbody></table>';\n\t\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "b8c9022015061e20537ceea4fdc1bd1b", "score": "0.633333", "text": "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, sum(b.no_dias) as no_dias,count(substr(b.fecha_inicio,1,4)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,4)\n ORDER BY substr(b.fecha_inicio,1,4)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$ano]= $cantidad;\n }\n }\n }", "title": "" }, { "docid": "240a053307687f3421182c39a0b96656", "score": "0.6290108", "text": "function tabla($lista, $totalColumnas) {\n $totalFilas = count($lista) / $totalColumnas;\n echo \"<table border='1'>\";\n for ($fila = 0; $fila < $totalFilas; $fila++) {\n echo \"<tr>\";\n for ($i=0;$i<$totalColumnas;$i++) {\n $posicion = $totalColumnas * $fila + $i;\n if ($posicion < count($lista)) {\n $contenido = $lista[$posicion];\n } else {\n $contenido = \"\";\n }\n echo \"<td>\".$contenido.\"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "title": "" }, { "docid": "8ccff1fe7251f929382089943f7b0fb9", "score": "0.6270407", "text": "function mostrarReporteResultadoProceso($total){\r\n $estudiantesConInconvenientes=$total-$this->estudiantesExitosos;\r\n echo \"<h1>Resultados del Proceso</h1>\";\r\n \r\n $html = \"<table>\";\r\n $html .= \"<tr>\";\r\n $html .= \"<td>Total Estudiantes:</td>\";\r\n $html .= \"<td>\".$total.\"</td>\";\r\n $html .= \"</tr>\";\r\n $html .= \"<tr>\";\r\n $html .= \"<td>Estudiantes procesados exitosamente:</td>\";\r\n $html .= \"<td>\".$this->estudiantesExitosos.\"</td>\";\r\n $html .= \"</tr>\";\r\n $html .= \"<tr>\";\r\n $html .= \"<td>Estudiantes que presentan inconvenientes:</td>\";\r\n $html .= \"<td>\".$estudiantesConInconvenientes.\"</td>\";\r\n $html .= \"</tr>\";\r\n $html .= \"</table>\";\r\n \r\n echo $html;\r\n \r\n if($estudiantesConInconvenientes>0){\r\n $this->mostrarDetalleProceso();\r\n }\r\n \r\n }", "title": "" }, { "docid": "471280d5d3156127663711f1dabb95d1", "score": "0.62419724", "text": "public function totcarte()\n {\n $detalle = FacturaDet::join('factura_cab', 'factura_cab.numfac', '=', 'factura_det.numfac')\n ->select(DB::raw('sum(cantserv*valserv) as total'))\n ->where('factura_cab.estfac','<>','0')\n ->where('factura_cab.estfac','<>','1')\n ->first();\n $total=$detalle->total+0;\n $pagos = Pago::select(DB::raw('sum(valpago) as total'))\n ->first();\n if($pagos)\n $pagado = $pagos->total;\n else\n $pagado=0;\n $total = $total - $pagado;\n return $total;\n }", "title": "" }, { "docid": "4deb9d3c3300084def44167831a6a6c6", "score": "0.6231195", "text": "function alumnos_mayores_al_promedio_general($promedio,$vector){\n echo \"<hr> ############# Promedios mayores al promedio general #############\";\n $cont=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n if($n>$promedio){\n $cont=$cont+1;\n echo \"<br>\".$c.\" -->Promedio: \".$n;\n }\n }\n }\n echo \"<br> Total: \".$cont;\n\n }", "title": "" }, { "docid": "bb8c665d5277744b26da8f592c490e58", "score": "0.6227473", "text": "public function reporteDiarioTotal(){\n $transportes = Transporte::where('tipo','=',2)->get();\n $ingresos = IngresoTransporte::all();//todos son unidades(2)\n $egresos = EgresoTransporte::with('transporte')\n ->orderBy('fecha_reporte', 'desc')->get();\n return view('transporte.reporte.diario.index',\n compact('transportes','ingresos','egresos'));\n }", "title": "" }, { "docid": "a80efb50cbbeb5b9aa1e14ce561b03bb", "score": "0.6220736", "text": "public function listaDeAbonos($idFactura)\n{\n conectar::conexiones();\n $idFactura=$this->filtroNumerico($idFactura);\n\n $sql=\"SELECT id, idFactura FROM creditos WHERE idFactura='\".intval($idFactura).\"'\";\n $query=mysql_query($sql);\n $rsCredito=mysql_fetch_array($query);\n\n $sql=\"SELECT idCredito, fechaAbono, valorAbono FROM abonosCredito WHERE idCredito='\".$rsCredito[\"id\"].\"'\";\n $query=mysql_query($sql);\n\n echo '\n <div class=\"col-md-12\">\n <h3><i class=\"fa fa-file\"></i> Abonos Realizados</h3>\n\n\n <table class=\"table table-bordered table-primary nomargin\" id=\"noPrint\">\n <thead>\n <tr> \n <th class=\"text-center\">Fecha Abono</th>\n <th class=\"text-center\">Valor</th>\n </tr>\n </thead>\n <tbody>';\n \n\n //ciclo\n $sum=0;\n while ($rs=mysql_fetch_array($query)) {\n # code...\n echo ' <tr>\n <td class=\"text-center\">'.$this->fechaHumana(date(\"Y-m-d\", $rs[\"fechaAbono\"])).'</td>\n <td class=\"text-center\">$'.number_format($rs[\"valorAbono\"]).'</td>\n </tr>';\n \n $sum=$sum+$rs[\"valorAbono\"];\n }\n\n\n\n //fin del ciclo\n\n echo ' <tbody>\n </table>\n <div class=\"row\" id=\"noPrint\">\n <div class=\"col-md-12\">\n <h1 align=\"center\" class=\"text-danger\">Total Abonado <i>$ '.number_format($sum).'</i></h1>\n </div>\n </div>\n</div>\n ';\n\n\n conectar::desconectar();\n}", "title": "" }, { "docid": "a9eaea3fbac1b0c67a156388dc67d144", "score": "0.6209004", "text": "function tamanhosColunasMatriculaFinal($oFiltros) {\n\n $oFiltros->iColunaAfastado = 46;\n $oFiltros->iColunaEvasaoMes = 23;\n $oFiltros->iColunaTransferenciaMes = 23;\n $oFiltros->iColunaTransferencia = 24;\n $oFiltros->iColunaResultadoFinal = 25;\n $oFiltros->iAlturaLinhaCabecalho = 12;\n $oFiltros->iMaximoAlunosPorPagina = 32;\n}", "title": "" }, { "docid": "5ceffe89061f63c468bd13b707f0dc44", "score": "0.6182257", "text": "public function totalMes(){\n //$conexao = $c->conexao();\n\n $sql = \" SELECT ifnull(sum(c.valor+c.troco),0) as total from tbpedido_pagamento c WHERE MONTH(c.data_pagamento) = MONTH(now()) and c.status = 'F';\";\n $rstotal = $this->conexao->query($sql);\n $result = $rstotal->fetch_assoc();\n $totalgeral = $result['total'];\n\n return $totalgeral;\n }", "title": "" }, { "docid": "e2fff75ff05d68b608047d0ccd20697d", "score": "0.6182088", "text": "public function NumPermisos(){\n\t\t$UsCpermisos = DB::table(\"permiso\")->join(\"alumno\",function($join){\n\t\t\t\t$join->on(\"permiso.Alumno_idAlumno\",\"=\",\"alumno.idAlumno\");\n\t\t\t})->where(\"Coordinador_idCoordinador\", Session::get(\"usuario\"))->where(\"estado\", 0)->count();\n\t\t$UsCalumnos = DB::table(\"alumno\")->where(\"Coordinador_idCoordinador\", Session::get(\"usuario\"))->where(\"estadoperfil\", 1)->get();\n\t\t$UsCcont = 0;\n\t\tforeach ($UsCalumnos as $UsCkey) {\n\t\t\t$UsCcalificaciones = DB::table(\"calificaciones\")->where(\"Alumno_idAlumno\",$UsCkey->idAlumno)->get();\n\t\t\t$UsCnumcalificaciones = DB::table(\"calificaciones\")->where(\"Alumno_idAlumno\",$UsCkey->idAlumno)->count();\n\t\t\t$UsCsuma = 0;\n\t\t\tforeach ($UsCcalificaciones as $UsCkey2) {\n\t\t\t\t$UsCsuma = $UsCsuma + $UsCkey2->calificacion;\n\t\t\t}\n\t\t\tif ($UsCnumcalificaciones > 0) {$UsCpromedio = $UsCsuma/$UsCnumcalificaciones;}\n\t\t\telse {$UsCpromedio = 70;}\n\t\t\tif ($UsCpromedio<70) {\n\t\t\t\t$UsCcont++;\n\t\t\t}\n\t\t}\n\t\t$UsCNotificaciones = $UsCcont+$UsCpermisos;\n\t\treturn \"<ul class='nav'>\n <li><a href=''>Notificaciones(\".$UsCNotificaciones.\")</a>\n <ul>\n <li><a href=''>Permisos(\".$UsCpermisos.\")</a></li><br>\n <li><a href=''>Alumnos Criticos(\".$UsCcont.\")</a></li>\n </ul>\n </li>\n </ul>\";\n\t}", "title": "" }, { "docid": "e3657fedb52ead1e0f0bcdc4786d03e8", "score": "0.6177624", "text": "function show_global_all($a)\n{\n$sql = \"SELECT SUM(count) AS gesamt FROM stats WHERE datum='\".$a.\"'\";\n$result = mysql_db_query(\"portal\",$sql);\n$zeile = mysql_fetch_array($result);\nextract($zeile);\n\necho '<table><tr><td width=\"100\">';\necho $a;\necho '</td><td>';\necho $gesamt;\necho '</td></tr></table>';\n}", "title": "" }, { "docid": "6a3903789e6cea1d3516e7f4a76269ad", "score": "0.6160932", "text": "function tongtienmuasam(){\n date_default_timezone_set('Asia/Ho_Chi_Minh');\n $db = mysqli_connect(HOST,USRNM,PSWD,DBNM) or die(\"Không thể kết nối database\");\n // TỔNG TIỀN START \n $check = mysqli_query($db,\"SELECT SUM(giatien) as total FROM cp_reports_shoping\");\n $row = mysqli_fetch_assoc($check);\n echo \"Tổng tiền sửa chữa: \".number_format($row['total']).\" VNĐ\";\n // END\n\n // Sóng Nam START\n $check1 = mysqli_query($db,\"SELECT SUM(giatien) as total1 FROM cp_reports_shoping WHERE nhacungcap='11'\");\n $row1 = mysqli_fetch_assoc($check1);\n echo \"<br><small style='text-decoration: overline;'> Sóng Nam: \".number_format($row1['total1']).\" VNĐ </small>\";\n // END\n\n // Ánh Phương START\n $check2 = mysqli_query($db,\"SELECT SUM(giatien) as total2 FROM cp_reports_shoping WHERE nhacungcap='22'\"); \n $row2 = mysqli_fetch_assoc($check2); \n echo \"|| <small style='text-decoration: overline;'> Ánh Phương: \".number_format($row2['total2']).\" VNĐ </small>\"; \n // END\n\n // Lan Anh START\n $check3 = mysqli_query($db,\"SELECT SUM(giatien) as total3 FROM cp_reports_shoping WHERE nhacungcap='33'\"); \n $row3 = mysqli_fetch_assoc($check3); \n echo \"|| <small style='text-decoration: overline;'> Lan Anh: \".number_format($row3['total3']).\" VNĐ </small>\"; \n // END \n\n // Hoàng Tuấn START\n $check4 = mysqli_query($db,\"SELECT SUM(giatien) as total4 FROM cp_reports_shoping WHERE nhacungcap='44'\"); \n $row4 = mysqli_fetch_assoc($check4);\n echo \"|| <small style='text-decoration: overline;'> Hoàng Tuấn: \".number_format($row4['total4']).\" VNĐ </small>\";\n // END\n\n // Cửa hàng chuyên hàng xách tay Đình Cư START\n $check6 = mysqli_query($db,\"SELECT SUM(giatien) as total6 FROM cp_reports_shoping WHERE nhacungcap='55'\"); \n $row6 = mysqli_fetch_assoc($check6);\n echo \"|| <small style='text-decoration: overline;'> Cửa hàng chuyên hàng xách tay Đình Cư: \".number_format($row6['total6']).\" VNĐ </small>\";\n // END \n\n // Mua bán điện thoại xách tay Thanh Hải START\n $check7 = mysqli_query($db,\"SELECT SUM(giatien) as total7 FROM cp_reports_shoping WHERE nhacungcap='66'\"); \n $row7 = mysqli_fetch_assoc($check7);\n echo \"|| <small style='text-decoration: overline;'> Mua bán điện thoại xách tay Thanh Hải: \".number_format($row7['total7']).\" VNĐ </small>\";\n // END \n \n // Mua bán điện thoại xách tay Thanh Hải START\n $check8 = mysqli_query($db,\"SELECT SUM(giatien) as total8 FROM cp_reports_shoping WHERE nhacungcap='77'\"); \n $row8 = mysqli_fetch_assoc($check7);\n echo \"|| <small style='text-decoration: overline;'> OnePlus Viet.net: \".number_format($row8['total8']).\" VNĐ </small>\";\n // END \n\n // Khác START\n $check5 = mysqli_query($db,\"SELECT SUM(giatien) as total5 FROM cp_reports_shoping WHERE nhacungcap=''\"); \n $row5 = mysqli_fetch_assoc($check5);\n echo \"|| <small style='text-decoration: overline;'> Khác: \".number_format($row5['total5']).\" VNĐ </small>\";\n // END \n}", "title": "" }, { "docid": "b9fd7ba32838c3ae91fcab921bf3684f", "score": "0.6159801", "text": "public function productosCarrito()\n {\n $total = 0;\n $tabla = \"\";\n $numeroArticulos=0;\n if (isset($_SESSION[\"carritoJDV\"])) {\n $numCarrito=(count($_SESSION[\"carritoJDV\"]));\n for ($i=0; $i<$numCarrito; $i++) {\n \t\t\t$numPiezas=$_SESSION[\"carritoJDV\"][$i][1];\n $numeroArticulos+=$numPiezas;\n }\n $tabla = '<h1 class=\"subTitulos\">Carrito de compras</h1>\n <p class=\"text-muted\">Actualmente tienes '.$numeroArticulos.' artículo(s) en tu carrito.</p>\n <div class=\"table-responsive\">\n <table class=\"table\">\n <thead>\n <tr>\n <th colspan=\"2\">Producto</th>\n <th>Cantidad</th>\n <th>Precio unitario</th>\n <th>Descuento</th>\n <th colspan=\"2\">Total</th>\n </tr>\n </thead>\n <tbody>';\n\n foreach ($_SESSION[\"carritoJDV\"] as $contenido) {\n $prod = $this->BD->ConsultaWhereSimple(\"producto\", \"activo=? AND ID=?\", array(1,$contenido[0]));\n $tabla .= '<tr>\n <td>\n <a href=\"detail.php?id=' . $prod[0][\"ID\"] . '\">\n <img src=\"' . $prod[0][\"img1_prod\"] . '\" alt=\"' . $prod[0][\"nombre_prod\"] . '\">\n </a>\n </td>\n\n <td>\n <a href=\"detail.php?id=' . $prod[0][\"ID\"] . '\">' . $prod[0][\"nombre_prod\"] . ' (' . $contenido[2] . ')</a>\n </td>\n \n <td><form method=\"POST\" action=\"procesos.php\" onchange=\"this.submit();\">\n <input type=\"hidden\" name=\"talla_prod_add\" value=\"' . $contenido[2] . '\">\n <input type=\"hidden\" name=\"id_prod_cart_add\" value=\"' . $prod[0][\"ID\"] . '\">\n <input type=\"number\" name=\"cantidad_prod_add\" value=\"' . $contenido[1] . '\" class=\"quanitySniper\">\n \n </form>\n \n </td>\n \n <td>$' . $prod[0][\"precio_prod\"] . '</td>\n ' . ($prod[0][\"preciodesc_prod\"] > 0 ? \"<td>$\" . ($prod[0][\"precio_prod\"] - $prod[0][\"preciodesc_prod\"]) . \"</td>\" : \"<td>$0</td>\") . ($prod[0][\"preciodesc_prod\"] > 0 ? \"<td>$\" . $prod[0][\"preciodesc_prod\"] * $contenido[1] . \"</td>\" : \"<td>$\" . $prod[0][\"precio_prod\"] * $contenido[1] . \"</td>\") . '\n \n <td><a href=\"procesos.php?deleteprod=' . $prod[0][\"ID\"] . '&talla=' . $contenido[2] . '\"><i class=\"far fa-trash-alt\"></i></a>\n </td>\n </tr>';\n //Problema complejo\n $x=$contenido[1];\n ($prod[0][\"preciodesc_prod\"] > 0 ? ($total = $total + $prod[0][\"preciodesc_prod\"] * $contenido[1]) : ($total = $total + $prod[0][\"precio_prod\"] * $contenido[1]));\n \n }\n \n /**\n * Aqui ya muestra el no. de articulos del carrito\n *var_dump(count($_SESSION[\"carritoJDV\"])); \n *Cuando se inicia sesion, si solo se pone el correo y se da enter, entra a procesos pero ya no avanza\n */\n \n\n $tabla .= '</tbody>\n <tfoot>\n <tr>\n <th colspan=\"5\">Total</th>\n <th colspan=\"2\">$' . $total . '</th>\n </tr>\n </tfoot>\n </table>\n\n </div>\n <!-- /.table-responsive -->\n\n <div class=\"box-footer\">\n <div class=\"pull-right\"><form method=\"post\" action=\"procesos.php\"><input type=\"hidden\" name=\"compra\" value=\"1\">\n <a href=\"basket.php\" class=\"btn btn-default\"><i class=\"fas fa-sync-alt\"></i> Actualizar cesta</a>\n \n <button type=\"submit\" class=\"btn btn-primary\">Proceder a la compra <i class=\"fa fa-chevron-right\"></i>\n </button>\n </form>\n </div>\n </div>';\n } else {\n return \"Aun no cuentas con productos en tu carrito de compras.\";\n }\n return $tabla;\n }", "title": "" }, { "docid": "9c8d6b423422da53b3b357f7465efda3", "score": "0.61596704", "text": "public function mostrarDatosComprobantesDeclarados(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$fecemi = date('Y-m-d');\r\n\r\n\t\t$canales=$_POST['canalesDeclarado'];\r\n\r\n\t\t$inicio = $_POST['fechainicioDeclarado'];\r\n\t\t$fin = $_POST['fechafinDeclarado'];\r\n\r\n\t\t$serie = $_POST['numeroSerieDeclarado'];\t\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<br>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t//$html .=\"<th>Id Comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t//\tfor ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoletaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\tif ($b->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($b->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importe = $b->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\r\n\t\t\t\t\t\t$estado = $b->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->fecha_emision));\r\n\r\n\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t//$html .= \"<td align='left'>\".$$b->idcomprobante.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->serie.\" - \".$b->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante[]' value='\".$b->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".utf8_decode($b->nombre_plan).\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\r\n\t\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t$html .=\"<hr>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha para emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t//for ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\tif ($f->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($f->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importeDos = $f->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', ',');\r\n\t\t\t\t\t\t$estado = $f->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($f->fecha_emision));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$f->serie.\" - \".$f->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie' value='\".$f->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante' value='\".$f->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t}\r\n\r\n\t\techo json_encode($html);\r\n\t}", "title": "" }, { "docid": "1d14ad2da56db5e34c780388f67e5231", "score": "0.61492723", "text": "function affichagetableau6_12($tab)\n{\n foreach ($tab as $elt) {\n echo \"[\" . $elt . \"]\" . \"\\t\";\n }\n echo \"\\nLes valeurs du tableau ont été incrémentées de 1.\";\n}", "title": "" }, { "docid": "a8859aba64428d21ab354fd26072d6b7", "score": "0.61287487", "text": "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, month(b.fecha_inicio) AS mes,b.no_dias,count(substr(b.fecha_inicio,1,7)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND year(b.fecha_inicio) ='\".$this->ano_id.\"' AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,7)\n ORDER BY substr(b.fecha_inicio,1,7)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$mes,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$mes]= $cantidad;\n }\n }\n }", "title": "" }, { "docid": "472a36cea97224ab31a329d098eee713", "score": "0.6124052", "text": "function colunasMatriculaFinal($oPdf, $oFiltros) {\n\n $oPdf->Cell($oFiltros->iColunaAfastado, $oFiltros->iAlturaLinhaPadrao, \"Afastado Por:\", 1, 0, \"C\");\n\n $oPdf->SetXY(163, 49);\n $oPdf->Cell($oFiltros->iColunaEvasaoMes, $oFiltros->iAlturaLinhaPadrao, \"Evasão\", 1, 0, \"C\");\n $oPdf->Cell($oFiltros->iColunaTransferenciaMes, $oFiltros->iAlturaLinhaPadrao, \"Transferência\", 1, 0, \"C\");\n\n $oPdf->SetXY(163, 53);\n $oPdf->Cell($oFiltros->iColunaEvasaoMes, $oFiltros->iAlturaLinhaPadrao, \"Mês\", 1, 0, \"C\");\n $oPdf->Cell($oFiltros->iColunaTransferenciaMes, $oFiltros->iAlturaLinhaPadrao, \"Mês\", 1, 0, \"C\");\n\n $sIngressoTransferencia = \"Ingresso com transferência em: \";\n $oPdf->SetXY(209, 45);\n $oPdf->MultiCell($oFiltros->iColunaTransferencia, 6, $sIngressoTransferencia, 1, \"C\");\n $oPdf->SetXY(233, 45);\n $oPdf->Cell($oFiltros->iColunaResultadoFinal, $oFiltros->iAlturaLinhaCabecalho, \"Resultado Final\", 1, 0, \"C\");\n}", "title": "" }, { "docid": "5c0f8cf4ec1bde80f39cf2362ed453b8", "score": "0.6122942", "text": "function miTabla($numero)\n\t{\n\t\tfor($multiplicador=0;$multiplicador<=10;$multiplicador++)\n\t\t{\n\t\t\techo $numero.\" x \".$multiplicador.\" = \".$numero*$multiplicador.\"<br>\";\n\t\t}\n\t}", "title": "" }, { "docid": "ad1cf9e225e23ac6ae3becfc955296bf", "score": "0.61126846", "text": "public function tatalFacturas(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"Select count(idFactura) as cantidadFacturas from tb_facturas WHERE estado <> 'Iniciada'\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadFacturas'];\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "e98293e4417007f1fb53c6d360cd511e", "score": "0.6101191", "text": "public static function mdlMostrarTotalGastosFijos($tabla){\n\n\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(monto) as total FROM $tabla\");\n\n\n\n\t\t$stmt->execute();\n\n\n\n\t\treturn $stmt->fetch();\n\n\n\n\t\t$stmt-close();\n\n\n\n\t\t$stmt = null;\n\n\n\n\n\n\t}", "title": "" }, { "docid": "9cce98ef9038831199ec6c6617a4fdb3", "score": "0.61004794", "text": "static public function mdlSumTotVtasOtros($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n\n if($fechacutvta!=null){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo, h.cerrado FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item='\".$fechacutvta.\"' and p.totaliza=3 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }else{\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item=curdate() and p.totaliza=3 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }\n\n\t$stmt -> execute();\n\n\treturn $stmt -> fetch();\n\n\n\t$stmt = null;\n}", "title": "" }, { "docid": "dac4a8583b493641fb2970d681c10d40", "score": "0.6095882", "text": "static function displayTotal($a_amount)\n\t{\n\t\techo \"<tr>\\n\";\n\t\techo \"<td></td>\\n\";\n\t\techo \"<td class='exTableTotal'>Total:</td>\\n\";\n\t\techo '<td class=\"exTotal\">$' . $a_amount . \"</td>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "title": "" }, { "docid": "b361a9eec6f0faf29c7f8228d0375e6b", "score": "0.60776526", "text": "public function operaciones($proy_id,$com_id){\n $proyecto = $this->model_proyecto->get_id_proyecto($proy_id); \n $fase = $this->model_faseetapa->get_id_fase($proy_id); //// recupera datos de la tabla fase activa\n $productos = $this->model_producto->lista_operaciones($com_id,$this->gestion); // Lista de productos\n $tabla ='';\n $tabla .='<thead>\n <tr class=\"modo1\">\n <th style=\"width:1%; text-align=center\"><b>COD.</b></th>\n <th style=\"width:1%; text-align=center\"><b>E/B</b></th>\n <th style=\"width:2%;\"><b>COD. OR.</b></th>\n <th style=\"width:2%;\"><b>COD. ACT.</b></th>\n <th style=\"width:15%;\"><b>ACTIVIDAD</b></th>\n <th style=\"width:15%;\"><b>RESULTADO</b></th>\n <th style=\"width:10%;\"><b>TIP. IND.</b></th>\n <th style=\"width:10%;\"><b>INDICADOR</b></th>\n <th style=\"width:1%;\"><b>LINEA BASE '.($this->gestion-1).'</b></th>\n <th style=\"width:1%;\"><b>META</b></th>\n <th style=\"width:4%;\"><b>ENE.</b></th>\n <th style=\"width:4%;\"><b>FEB.</b></th>\n <th style=\"width:4%;\"><b>MAR.</b></th>\n <th style=\"width:4%;\"><b>ABR.</b></th>\n <th style=\"width:4%;\"><b>MAY.</b></th>\n <th style=\"width:4%;\"><b>JUN.</b></th>\n <th style=\"width:4%;\"><b>JUL.</b></th>\n <th style=\"width:4%;\"><b>AGO.</b></th>\n <th style=\"width:4%;\"><b>SEP.</b></th>\n <th style=\"width:4%;\"><b>OCT.</b></th>\n <th style=\"width:4%;\"><b>NOV.</b></th>\n <th style=\"width:4%;\"><b>DIC.</b></th>\n <th style=\"width:10%;\"><b>MEDIO DE VERIFICACI&Oacute;N</b></th>\n <th style=\"width:7%;\"><b>DELETE</b></th>\n <th style=\"width:7%;\"><b>PTTO..</b></th>\n <th style=\"width:7%;\"><b>NRO. REQ.</b></th>\n </tr>\n </thead>\n <tbody>';\n $cont = 0;\n foreach($productos as $rowp){\n $cont++;\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $programado=$this->model_producto->producto_programado($rowp['prod_id'],$this->gestion);\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $color=''; $titulo=''; $por='';\n if($rowp['indi_id']==2){ // Relativo\n $por='%';\n if($rowp['mt_id']==3){\n if($sum[0]['meta_gest']!=$rowp['prod_meta'] || $rowp['or_id']==0){\n $color='#fbd5d5';\n $titulo='ERROR EN LA DISTRIBUCION O FALTA DE ALINEACION';\n }\n }\n }\n else{ // Absoluto\n if($sum[0]['meta_gest']!=$rowp['prod_meta'] || $rowp['or_id']==0){\n $color='#fbd5d5';\n $titulo='ERROR EN LA DISTRIBUCION O FALTA DE ALINEACION';\n }\n }\n \n $tabla .='<tr bgcolor=\"'.$color.'\" class=\"modo1\" title='.$titulo.'>';\n $tabla.='<td align=\"center\"><font color=\"blue\" size=\"2\"><b>'.$rowp['prod_cod'].'</b></font></td>';\n $tabla.='<td align=\"center\">';\n $tabla.='<a href=\"'.site_url(\"admin\").'/prog/mod_prod/'.$rowp['prod_id'].'\" title=\"MODIFICAR OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/modificar.png\" WIDTH=\"33\" HEIGHT=\"34\"/></a>';\n /*if($this->tp_adm==1){\n $tabla.='<a href=\"'.site_url(\"admin\").'/prog/mod_prod/'.$rowp['prod_id'].'\" title=\"MODIFICAR OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/modificar.png\" WIDTH=\"33\" HEIGHT=\"34\"/></a>';\n }*/\n if($rowp['prod_ppto']==1){\n $tabla.='<a href=\"'.site_url(\"\").'/prog/requerimiento/'.$proy_id.'/'.$rowp['prod_id'].'\" target=\"_blank\" title=\"REQUERIMIENTOS DE LA OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/insumo.png\" WIDTH=\"33\" HEIGHT=\"33\"/></a>';\n }\n $tabla.='</td>';\n $tabla.='<td style=\"width:2%;text-align=center\"><b><font size=5 color=blue>'.$rowp['or_codigo'].'</font></b></td>';\n $tabla.='<td style=\"width:2%;text-align=center\"><b><font size=5>'.$rowp['prod_cod'].'</font></b></td>';\n $tabla.='<td style=\"width:15%;\">'.$rowp['prod_producto'].'</td>';\n $tabla.='<td style=\"width:15%;\">'.$rowp['prod_resultado'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['indi_abreviacion'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_indicador'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.round($rowp['prod_linea_base'],2).'</td>';\n $tabla.='<td style=\"width:10%;\">'.round($rowp['prod_meta'],2).'</td>';\n if(count($programado)!=0){\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['enero'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['febrero'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['marzo'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['abril'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['mayo'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['junio'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['julio'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['agosto'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['septiembre'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['octubre'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['noviembre'],2).' '.$por.'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['diciembre'],2).' '.$por.'</td>';\n }\n else{\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>\n <td style=\"width:4%;\" bgcolor=\"#f1bac6\">0</td>';\n }\n $tabla.='<td style=\"width:10%;\" bgcolor=\"#e5fde5\">'.$rowp['prod_fuente_verificacion'].'</td>';\n $tabla.='<td style=\"width:7%;\">';\n if($this->tp_adm==1 || $this->fun_id==715 || $this->fun_id==690){\n $tabla.='<a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-default del_ff\" title=\"ELIMINAR OPERACI&Oacute;N\" name=\"'.$rowp['prod_id'].'\" id=\"'.$proy_id.'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a><br><br>';\n $tabla.=' <center>\n <input type=\"checkbox\" name=\"req[]\" value=\"'.$rowp['prod_id'].'\" onclick=\"scheck'.$cont.'(this.checked);\"/>\n </center>';\n }\n $tabla.='</td>';\n $tabla.='<td>'.number_format($ptto, 2, ',', '.').'</td>';\n $tabla.='<td style=\"width:7%;\" align=\"center\"><font color=\"blue\" size=\"2\"><b>'.count($this->model_producto->insumo_producto($rowp['prod_id'])).'</b></font></td>';\n $tabla .='</tr>';\n ?>\n <script>\n function scheck<?php echo $cont;?>(estaChequeado) {\n val = parseInt($('[name=\"tot\"]').val());\n if (estaChequeado == true) {\n val = val + 1;\n } else {\n val = val - 1;\n }\n $('[name=\"tot\"]').val((val).toFixed(0));\n }\n </script>\n <?php\n }\n $tabla.='</tbody>';\n\n return $tabla;\n }", "title": "" }, { "docid": "b447868982552103f9f99a1b26dbf52c", "score": "0.60635215", "text": "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "title": "" }, { "docid": "9bd81897e70305725c70841d05055be1", "score": "0.6051347", "text": "function Escenario($lista){\r\necho \"<table class='tg' border='1' style='margin:auto;'>\";\r\n echo \"<tr>\";\r\n echo \"<th colspan='6'>ESCENARIO</th>\";\r\n echo \"<tr>\";\r\n echo \"<th></th>\r\n <th>1</th>\r\n <th>2</th>\r\n <th>3</th>\r\n <th>4</th> \r\n <th>5</th>\r\n </tr>\";\r\n \r\n$i=1;\r\n// Imprimimos el contenido de la tabla\r\nforeach ($lista as $fila) {\r\n echo \"<tr>\";\r\n echo \"<th>\";\r\n echo $i;\r\n echo \"</th>\";\r\n foreach ($fila as $silla) {\r\n echo \"<td>\";\r\n echo $silla;\r\n echo \"</td>\";\r\n }\r\n echo \"</tr>\";\r\n $i++;\r\n }\r\necho \"</table>\";\r\n}", "title": "" }, { "docid": "7eaa3e1a54bdc1ffa3f87f8da91f1bb7", "score": "0.6050464", "text": "function listarTotalesPeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERAGTOT_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n\n $this->capturaCount('total_credito_mb','numeric');\n $this->capturaCount('total_credito_me','numeric');\n $this->capturaCount('total_boletos_mb','numeric');\n $this->capturaCount('total_boletos_usd','numeric');\n $this->capturaCount('total_comision_mb','numeric');\n $this->capturaCount('total_comision_usd','numeric');\n $this->capturaCount('total_debito_mb','numeric');\n $this->capturaCount('total_debito_usd','numeric');\n $this->capturaCount('total_neto_mb','numeric');\n $this->capturaCount('total_neto_usd','numeric');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta_agencia','int4');\n $this->captura('codigo_periodo','varchar');\n $this->captura('id_agencia','int4');\n $this->captura('medio_pago','varchar');\n $this->captura('mes','varchar');\n $this->captura('gestion','varchar');\n $this->captura('id_periodo_venta','int4');\n $this->captura('fecha_ini','varchar');\n $this->captura('fecha_fin','varchar');\n $this->captura('moneda_restrictiva','varchar');\n $this->captura('codigo_int','varchar');\n $this->captura('nombre','varchar');\n $this->captura('fecha_ini2','varchar');\n $this->captura('fecha_fin2','varchar');\n $this->captura('estado','varchar');\n $this->captura('total_credito_mb','numeric');\n $this->captura('total_credito_me','numeric');\n $this->captura('total_boletos_mb','numeric');\n $this->captura('total_boletos_usd','numeric');\n $this->captura('total_comision_mb','numeric');\n $this->captura('total_comision_usd','numeric');\n $this->captura('total_debito_mb','numeric');\n $this->captura('total_debito_usd','numeric');\n $this->captura('total_neto_mb','numeric');\n $this->captura('total_neto_usd','numeric');\n $this->captura('monto_mb','numeric');\n $this->captura('monto_usd','numeric');\n $this->captura('billetes','text');\n\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.60434115", "text": "public function getTotal();", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.60434115", "text": "public function getTotal();", "title": "" }, { "docid": "3dcfa96e735f54b52604c088b9da2553", "score": "0.6036137", "text": "public function visualizar() {\n echo $this->getTabuleiro();\n }", "title": "" }, { "docid": "bd05be0c2512a782fdb39f041f677afb", "score": "0.60162693", "text": "public function nombreTotalTableau(){\n $req = $this->db->query(\"SELECT COUNT(*) AS nb FROM tableau\");\n $sortie = $req->fetch(PDO::FETCH_OBJ);\n return $sortie->nb;\n }", "title": "" }, { "docid": "b95290bbd6d5d945de4b2def079c5cbe", "score": "0.6015224", "text": "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }", "title": "" }, { "docid": "6b5ea9c21db2b0cf05aff46ded3052b8", "score": "0.6012408", "text": "function resultados(){\r\n\t\t$valor1 = file($this->arquivoArr[0]); $valor2 = file($this->arquivoArr[1]); \r\n\t\t$valor3 = file($this->arquivoArr[2]); $valor4 = file($this->arquivoArr[3]); \r\n\t\t//Define o total de votos\r\n\t\t$total = $valor1[0] + $valor2[0] + $valor3[0] + $valor4[0];\r\n\t\t//Define porcentagem de cada opção\r\n\t\t$pcGoo = number_format($valor1[0] / $total * 100);\r\n\t\t$pcAmig = number_format($valor2[0] / $total * 100);\r\n\t\t$pcPubli = number_format($valor3[0] / $total * 100);\r\n\t\t$pcOut = number_format($valor4[0] / $total * 100);\r\n\t\t//Exibe os resultados\r\n\t\techo \"<p>TOTAL DE VOTOS: \".$total.\"</p>\";\r\n\t\techo \"<p>Google: \".$pcGoo.\"%</p>\";\r\n\t\techo \"<p>Amigos: \".$pcAmig.\"%</p>\";\r\n\t\techo \"<p>Publicações: \".$pcPubli.\"%</p>\";\r\n\t\techo \"<p>Outros: \".$pcOut.\"%</p>\";\r\n\t\techo \"<p><a href='$_SERVER[PHP_SELF]'>Voltar</a></p>\";\r\n\t}", "title": "" }, { "docid": "0808070ca4dcd5eb0ec83e7fb49bfe07", "score": "0.6008076", "text": "function afficher_panier () {\n\t //lien pour vider le panier\n\t //nbre d'épreuves différentes\n\t $nbrE = count ($_SESSION['panier']['numE']);\n\t if ($nbrE <= 0) {\n\t\t echo \"<p class=\\\"erreur\\\">Votre panier est Vide</p>\";\n\t } else {\n\t\t $total = 0;\n\t\t echo \"<table>\n\t\t <tr><td colspan =\\\"8\\\"></td><td><a href=\\\"vider.php\\\">Vider Mon panier</a></td></tr>\n\t\t <tr><td colspan =\\\"8\\\"></td><td><a href=\\\"Ventes.php\\\">Ajouter une nouvelle Epreuve</a></td></tr>\n\t\t <tr>\n\t\t <td>N° Epreuve</td> <td>Nom Epreuve</td><td>Forme</td>\n\t\t <td>Date</td><td>Categorie</td><td>Prix Unitaire</td>\n\t\t <td>Nombre de Billets</td><td>Prix total Par Epreuve </td>\n\t\t </tr>\n\t\t \";\n\t\t for ($i = 0; $i < $nbrE ; $i ++) {\n\t\t\t\t $total = $total + $_SESSION['panier']['nbr'][$i];\n\t\t\t\t echo \"<tr>\";\n\t\t\t\t echo (\"\n\t\t\t\t <td>\".$_SESSION['panier']['numE'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['nomE'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['forme'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['dateE'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['categ'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['prix'][$i].\" €</td>\n\t\t\t\t <td>\".$_SESSION['panier']['nbr'][$i].\"</td>\n\t\t\t\t <td>\".$_SESSION['panier']['nbr'][$i]*$_SESSION['panier']['prix'][$i].\" €</td>\n\t\t\t\t <td><a href=\\\"supprimer.php?id=\".$_SESSION['panier']['numE'][$i].\"\\\">Supprimer L'Epreuve</a></td>\n\t\t\t\t \");\n\t\t\t\t echo \"</tr>\";\n\t\t\t }\n\t\t\t $montant = montantTot ();\n\t\t\t echo (\"<tr>\n\t\t\t <td colspan=\\\"6\\\">Nombre total d'Epreuve différentes</td><td>$nbrE</td><td></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td colspan=\\\"6\\\">Total Epreuve</td><td>$total</td><td></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td colspan=\\\"7\\\">Motant TOTAL</td><td>$montant €</td>\n\t\t\t </tr>\n\t\t\t \");\n\t\t echo \"</table>\";\n\t\t echo (\"\n\t\t \n\t\t <form action =\\\"valid.php\\\" method=\\\"POST\\\">\n\t\t <label for=\\\"sel_nDossier\\\">Votre Email pour la confirmation du paiement</label><input type=\\\"email\\\" name=\\\"mail\\\" required=\\\"required\\\"/>\n\t\t <br/>\t\n\t\t <input type=\\\"submit\\\" value=\\\"Acheter ces Places\\\"/>\n\t\t <input type=\\\"reset\\\" value=\\\"Annuler\\\"/>\n\t\t </form>\n\t\t \n\t\t \");\n\t }\n }", "title": "" }, { "docid": "153885409311b1d1412c56b1d4f78ce7", "score": "0.59839404", "text": "private function traerventasTotalesToneladas($anio, $mes, $semana) {\r\n $consulta = $this->db->executeQue(\"select SUM(CASE WHEN v.cantidadventa<>0 THEN ((v.cantidadventa*p.gramospresentacion)/1000000) ELSE 0 END) as cantidad\r\n from ventas v, productos p \r\n where v.idproducto=p.idproducto and\r\n v.fecharealventa='$anio-$mes-$semana'\");\r\n $resultado = $this->db->arrayResult($consulta);\r\n return $resultado['cantidad']==\"\"?0:number_format($resultado['cantidad'],2,\".\",\",\");\r\n }", "title": "" }, { "docid": "4e91f5b1ae2f98630c2ce188264dd1fc", "score": "0.59783286", "text": "function imprimir_calificaciones($vector){\n echo \"<hr> ############# Lista de calificaciones #############\";\n foreach ($vector as $key => $value) {\n echo \"<br> Alumno(a) \".$key.\" :\".\"<br>\";\n $cont=1;\n foreach ($value as $c) {\n echo \"<br> Calificacion materia \".$cont.\": \".$c;\n $cont=$cont+1;\n }\n echo \"<br> ********************************\";\n }\n }", "title": "" }, { "docid": "b8d61911e98a14e07ccfa8231bf922d3", "score": "0.59765005", "text": "function totalboaralla(){\n\n\t$crud = new CRUD();\n\t$crud->disconnect();\n\n\t$crud -> sql(\"select SUM(native_boar) as totalboaralla from farmers_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['totalboaralla'];\n\t}\n\t$crud->disconnect();\n}", "title": "" }, { "docid": "735f25e8706d6902623ffb4183389904", "score": "0.5967696", "text": "public function componente_operacion_nuevo($com_id){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente = $this->model_componente->get_componente_pi($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $mes = $this->mes_nombre();\n $tabla='';\n $tabla.='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">\n <thead>\n <tr class=\"modo1\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OPERACI&Oacute;N</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:8%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. PPTO.</th> \n </tr> \n \n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id'],$rowo['gi'],$rowo['gf']); /// Productos\n\n if(count($productos)!=0){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#9cdcd4\"><td colspan=\"22\" style=\"width: 100%; text-align: left\" style=\"height:13px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td></tr>';\n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_producto'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_resultado'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_indicador'].'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['enero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['febrero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['marzo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['abril'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['mayo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['junio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['julio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['agosto'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['octubre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 8%; text-align: left;\">'.$rowp['prod_fuente_verificacion'].'</td>\n <td style=\"width: 4%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n <td style=\"width: 4%; text-align: center;\" bgcolor=\"#dedcdc\">'.$rowp['prod_cod'].'</td>'; \n $tabla.='</tr>';\n }\n }\n }\n }\n else{\n $tabla.='<tr class=\"modo1\"><td colspan=\"22\" style=\"width: 100%; text-align: left;\">SIN OPERACIONES</td></tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "title": "" }, { "docid": "1f530d741dd7e40769b4dc1a2f33bf2b", "score": "0.5967322", "text": "public function Sum(){\n if(isset($this->_sum) && count($this->_sum)>0){\n $this->SetX(($this->w - $this->_tWidth)/2);\n $this->_fill = !$this->_fill;\n $this->SetDrawColor(160,160,160);\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetFont('arial','',9);\n $fill = $this->_fill;\n foreach(array_keys($this->_fields) as $field){\n if(array_key_exists($field,$this->_sum)){\n $align = $this->_fields[$field][\"align\"];\n $format = false;\n if(isset($this->_fields[$field][\"numberFormat\"])){\n $format = $this->_fields[$field][\"numberFormat\"];\n }\n if($format){\n $this->Cell($this->_fields[$field][\"size\"],5,number_format($this->_sum[$field],2,',','.'),1,0,$align,$fill);\n }else{\n $this->Cell($this->_fields[$field][\"size\"],5,$this->_sum[$field],1,0,$align,$fill);\n }\n }else{\n if(isset($total)){\n $this->Cell($this->_fields[$field][\"size\"],5,\"\",\"BT\",0,\"C\",$fill);\n }else{\n if(count($this->_sum)>1){\n $total=\"Totales: \";\n } else{\n $total=\"Total: \";\n }\n $format = '';\n if(isset($this->_fields[$field][\"numberFormat\"])){\n $format = $this->_fields[$field][\"numberFormat\"];\n }\n if($format == 'true'){\n $this->SetFont('arial','B',7);\n $this->Cell($this->_fields[$field][\"size\"],5,number_format($total,2,',','.'),\"LBT\",0,\"L\",$fill);\n $this->SetFont('arial','',7);\n }\n else{\n $this->SetFont('arial','B',7);\n $this->Cell($this->_fields[$field][\"size\"],5,$total,\"LBT\",0,\"L\",$fill);\n $this->SetFont('arial','',7);\n }\n }\n }\n }\n $this->Ln();\n }\n }", "title": "" }, { "docid": "1ab8efd94f86f43d89ca33e614703731", "score": "0.5959242", "text": "public function operaciones2019($proy_id,$com_id){\n $proyecto = $this->model_proyecto->get_id_proyecto($proy_id); \n $fase = $this->model_faseetapa->get_id_fase($proy_id); //// recupera datos de la tabla fase activa\n $productos = $this->model_producto->list_producto_programado($com_id,$this->gestion); // Lista de productos\n $tabla ='';\n $tabla .='<thead>\n <tr class=\"modo1\">\n <th style=\"width:1%; text-align=center\"><b>COD.</b></th>\n <th style=\"width:1%; text-align=center\"><b>E/B</b></th>\n <th style=\"width:20%;\"><b>OPERACI&Oacute;N</b></th>\n <th style=\"width:20%;\"><b>RESULTADO</b></th>\n <th style=\"width:10%;\"><b>TIP. IND.</b></th>\n <th style=\"width:10%;\"><b>INDICADOR</b></th>\n <th style=\"width:1%;\"><b>LINEA BASE</b></th>\n <th style=\"width:1%;\"><b>META</b></th>\n <th style=\"width:5%;\"><b>PONDERACI&Oacute;N</b></th>\n <th style=\"width:4%;\"><b>ENE.</b></th>\n <th style=\"width:4%;\"><b>FEB.</b></th>\n <th style=\"width:4%;\"><b>MAR.</b></th>\n <th style=\"width:4%;\"><b>ABR.</b></th>\n <th style=\"width:4%;\"><b>MAY.</b></th>\n <th style=\"width:4%;\"><b>JUN.</b></th>\n <th style=\"width:4%;\"><b>JUL.</b></th>\n <th style=\"width:4%;\"><b>AGO.</b></th>\n <th style=\"width:4%;\"><b>SEP.</b></th>\n <th style=\"width:4%;\"><b>OCT.</b></th>\n <th style=\"width:4%;\"><b>NOV.</b></th>\n <th style=\"width:4%;\"><b>DIC.</b></th>\n <th style=\"width:7%;\"><b>MEDIO DE VERIFICACI&Oacute;N</b></th>\n <th style=\"width:7%;\"><b>DELETE</b></th>\n <th style=\"width:7%;\"><b>NRO. REQ.</b></th>\n </tr>\n </thead>\n <tbody>';\n $cont = 0;\n foreach($productos as $rowp){\n $cont++;\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $color='';\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n $tabla .='<tr bgcolor=\"'.$color.'\" class=\"modo1\">';\n $tabla.='<td title=\"C&Oacute;DIGO OPERACI&Oacute;N : '.$rowp['prod_cod'].'\" align=\"center\"><font color=\"blue\" size=\"2\"><b>'.$rowp['prod_cod'].'</b></font></td>';\n $tabla.='<td align=\"center\">';\n $tabla.='<a href=\"'.site_url(\"admin\").'/prog/mod_prod/'.$rowp['prod_id'].'\" title=\"MODIFICAR OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/modificar.png\" WIDTH=\"33\" HEIGHT=\"34\"/></a>';\n $tabla.='<a href=\"'.site_url(\"\").'/prog/requerimiento/'.$proy_id.'/'.$rowp['prod_id'].'\" target=\"_blank\" title=\"REQUERIMIENTOS DE LA OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/insumo.png\" WIDTH=\"33\" HEIGHT=\"33\"/></a>';\n\n $tabla.='</td>';\n $tabla.='<td style=\"width:20%;\">'.$rowp['prod_producto'].'</td>';\n $tabla.='<td style=\"width:20%;\">'.$rowp['prod_resultado'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['indi_abreviacion'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_indicador'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_linea_base'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_meta'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_ponderacion'].'%</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['enero'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['febrero'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['marzo'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['abril'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['mayo'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['junio'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['julio'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['agosto'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['septiembre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['octubre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['noviembre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['diciembre'].'</td>';\n $tabla.='<td style=\"width:7%;\" bgcolor=\"#e5fde5\">'.$rowp['prod_fuente_verificacion'].'</td>';\n $tabla.='<td style=\"width:7%;\">';\n $tabla.='<a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-default del_ff\" title=\"ELIMINAR OPERACI&Oacute;N\" name=\"'.$rowp['prod_id'].'\" id=\"'.$proy_id.'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a><br><br>';\n $tabla.='<center>\n <input type=\"checkbox\" name=\"req[]\" value=\"'.$rowp['prod_id'].'\" onclick=\"scheck'.$cont.'(this.checked);\"/>\n </center>';\n $tabla.='</td>';\n $tabla.='<td style=\"width:7%;\" align=\"center\"><font color=\"blue\" size=\"2\"><b>'.count($this->model_producto->insumo_producto($rowp['prod_id'])).'</b></font></td>';\n $tabla .='</tr>';\n ?>\n <script>\n function scheck<?php echo $cont;?>(estaChequeado) {\n val = parseInt($('[name=\"tot\"]').val());\n if (estaChequeado == true) {\n val = val + 1;\n } else {\n val = val - 1;\n }\n $('[name=\"tot\"]').val((val).toFixed(0));\n }\n </script>\n <?php\n }\n $tabla.='</tbody>';\n\n return $tabla;\n }", "title": "" }, { "docid": "0b461c3b8662f01234880b078beb259e", "score": "0.5950174", "text": "public function SumarCarteraCreditos() \n{\n\tself::SetNames();\n\t$sql = \"select\n(select SUM(totalpago) from ventas WHERE tipopagove = 'CREDITO') as totaldebe,\n(select SUM(montoabono) from abonoscreditos) as totalabono\";\n//$sql =\"SELECT SUM(ventas.totalpago) as totaldebe, SUM(abonoscreditos.montoabono) FROM ventas, abonoscreditos WHERE ventas.tipopagove = 'CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "title": "" }, { "docid": "d88717fcb6f5b3e2ac4834c7a9aa3331", "score": "0.5930585", "text": "private function ExibirTamanhos(){\r\n $oDadosCamiseta;\r\n $sSql = \"SELECT * FROM tamanho_camiseta\";\r\n $oDadosCamiseta = $this->Fbd->PesquisarSQL($sSql);\r\n \r\n foreach($oDadosCamiseta as $oRegistro){\r\n echo \"<option value='\".$oRegistro->sigla.\"' class='sctOptTamanho'>\".$oRegistro->nome.\"</option>\";\r\n }\r\n }", "title": "" }, { "docid": "d13bb4bd6a5fc27d1a5f3a05e8d5de0b", "score": "0.59282106", "text": "function cocinar_pago_total() {\n\t\tglobal $bd;\n\t\tglobal $x_idpedido;\n\t\tglobal $x_idcliente;\n\t\t\n\t\t\n\t\t$x_array_pedido_header = $_POST['p_header'];\n\t\t$x_array_tipo_pago = $_POST['p_tipo_pago'];\n\t\t$x_array_subtotales=$_POST['p_subtotales'];\n\t\t$x_array_comprobante=$_POST['p_comprobante'];\n\t\t\n\t\t$id_pedido = $x_idpedido ? $x_idpedido : $x_array_pedido_header['idPedidoSeleccionados'];\n\n\t\t$tipo_consumo = $x_array_pedido_header['tipo_consumo'];\n\t\t$idc=$x_array_pedido_header['idclie'] == ''? ($x_idcliente == '' ? 0 : $x_idcliente) : $x_array_pedido_header['idclie'];\n\t\t// $tt=$x_array_pedido_header['ImporteTotal'];\n\t\t\n\n\t\t// subtotales\n\t\t$sql_subtotales = '';\n\t\t$importe_total=0; // la primera fila es subtotal o total si no hay adicionales\n\t\t$importe_subtotal = $x_array_subtotales[0]['importe'];\n\t\tforeach ( $x_array_subtotales as $sub_total ) {\n\t\t\t$tachado = $sub_total['tachado'] === \"true\" ? 1 : 0; \n\t\t\t$importe_row = $tachado === 1 ? $sub_total['importe_tachado'] : $sub_total['importe'];\n\t\t\t$importe_total = $sub_total['importe'];\n\t\t\t$sql_subtotales = $sql_subtotales.\"(?,\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",'\".$sub_total['descripcion'].\"','\".$importe_row.\"',\".$tachado.\"),\";\t\t\t\n\t\t}\n\n\t\t/// buscamos el ultimo correlativo\n\t\t/// buscamos el ultimo correlativo\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select correlativo + 1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\t\t\n\t\t\t\n\t\t\t// if ($x_array_comprobante['codsunat'] == \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t$sqlrp=\"insert into registro_pago(idorg,idsede,idusuario,idcliente,fecha,total,idtipo_consumo, idtipo_comprobante_serie, correlativo) values (\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",\".$_SESSION['idusuario'].\",\".$idc.\",DATE_FORMAT(now(),'%d/%m/%Y %H:%i:%s'),'\".$importe_total.\"',\".$tipo_consumo.\",\".$idtipo_comprobante_serie.\",'\".$correlativo_comprobante.\"');\";\n\t\t$idregistro_pago=$bd->xConsulta_UltimoId($sqlrp);\n\t\t\n\n \n //registro tipo de pago // efectivo / tarjeta / etc\n $cadena_tp='';\n foreach($x_array_tipo_pago as $item){\n $cadena_tp=$cadena_tp.\"(\".$idregistro_pago.\",\".$item['id'].\",'\".$item['importe'].\"'),\";\n }\n\n $cadena_tp=substr($cadena_tp,0,-1);\n\t\t$cadena_tp=\"insert into registro_pago_detalle (idregistro_pago,idtipo_pago,importe) values \".$cadena_tp.\"; \";\n\t\t\n // registro pago pedido - detalle\n\t\t$sql_idpd=\"select idpedido,idpedido_detalle, cantidad,ptotal from pedido_detalle where idpedido in (\".$id_pedido.\") and (estado=0 and pagado=0)\";\n\t\t$rows_pedido_detalle=$bd->xConsulta2($sql_idpd);\n\t\t$sql_pago_pedido='';\n\t\t//echo $sql_idpd;\n\t\tforeach($rows_pedido_detalle as $fila){ // sacamos el idpedido_detalle y los demas datos\n\t\t\t$sql_pago_pedido=$sql_pago_pedido.\"(\".$idregistro_pago.\",\".$fila['idpedido'].\",\".$fila['idpedido_detalle'].\",'\".$fila['cantidad'].\"','\".$fila['ptotal'].\"'),\";\n }\n \n $sql_pago_pedido=substr($sql_pago_pedido,0,-1);\n $sql_pago_pedido='insert into registro_pago_pedido(idregistro_pago,idpedido,idpedido_detalle,cantidad,total) values '.$sql_pago_pedido.'; ';\n\t\t\n\t\t// subtotal // primero se obtiene $idregistro_pago\n\t\t$sql_subtotales = str_replace(\"?\", $idregistro_pago, $sql_subtotales);\n\t\t$sql_subtotales = substr($sql_subtotales,0,-1);\n\t\t$sql_subtotales = 'insert into registro_pago_subtotal (idregistro_pago,idorg,idsede,descripcion,importe,tachado) values '.$sql_subtotales.'; '; \n\t\n\n\t\t// comprobante de pago | datos\n\t\t// $sql_devolver_correlativo = \"update tipo_comprobante_serie set correlativo=correlativo+1 where (idrog=\".$_SESSION['ido'].\" and idsede=\".$_SESSION['ido'].\") and idtipo_comprobante=\".$x_array_comprobante['idtipo_comprobante'].\" and estado=0;\";\n\n\n\t\t// echo $sql_pago_pedido;\n $bd->xConsulta_NoReturn($sql_pago_pedido);\n\t\t$bd->xConsulta_NoReturn($cadena_tp);\n\t\t$bd->xConsulta_NoReturn($sql_subtotales);\n\t\t\n\t\t// print $correlativo_comprobante.\"|\";\n\n\t\t// $x_respuesta->b = $correlativo_comprobante;\n\t\t// $x_respuesta = ['correlativo_comprobante' => $correlativo_comprobante];\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante, 'idregistro_pago' => $idregistro_pago));\n\t\tprint $x_respuesta.'|';\n\t\t//+++++ info+++++++++ el update pedido idregistropago es un triggers en la tabla registro_pago_pedido\n\n\t}", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.59260243", "text": "public function total();", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.59260243", "text": "public function total();", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.59260243", "text": "public function total();", "title": "" }, { "docid": "e16d40b60e6384ebea5ca88f9f70e0af", "score": "0.5922991", "text": "function visualizar($pag=\"\",$orderby=\"\")\n {\n global $sIdConvenioAct;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=20;\n elseif ($total<400):\n $tampag=40;\n else:\n $tampag=60;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n else if($this->edit==1 and $this->delete==1) $espacio = 2;\n else if($this->edit==1 and $this->delete==0) $espacio = 1;\n else if($this->edit==0 and $this->delete==1) $espacio = 1;\n else $espacio = 0;\n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption><center><font size='1.5'>\".$tablades.\"</font></center></caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=\".($espacio+2).\"></td>\";\n \n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" or is_numeric($des)) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Imprimir' href='reporte/rptEmbarques.php?iFolio=\".$row['iFolio'].\"&sContrato=\".$row['sContrato'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=$sIdConvenioAct\".\"&dFecha=\".$row['dIdFecha'].\"' target='_blank' >\n \\n<img src='\".$this->PathImages.\"impresora.png' width=15></a></td>\";//$_SESSION['orden']\n if($this->edit==1)\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Seleccionar Folio' href='$_SERVER[PHP_SELF]?iFolioSuministro=\".$row['iFolio'].\"'>\n \\n<img src='\".$this->PathImages.\"seleccionar.jpg' width=15></a></td>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Modificar Registro ' href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n \\n<img src='\".$this->PathImages.\"editar.png' width=12></a></td>\";\n if($this->delete==1)//'href='$_SERVER[PHP_SELF]?operacion=b&$filtro'\n echo \"\\n<td class='CrearReporte' >\n \\n<a title = 'Eliminar el Registro' href=\\\"#\\\" \n onClick=\\\" if( confirm('Realmente Desea Eliminar el Registro?') ){ document.location='$_SERVER[PHP_SELF]?operacion=b&$filtro' };\\\" >\n \\n<img src='\".$this->PathImages.\"eliminar.png' width=12>\n \\n</a></td> \";\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos(strtoupper($this->nombreCampo($result, $i)),strtoupper(\"Imagen\")) and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen = str_replace(\"/\",\"-\",$nombreImagen);\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img border=1 src = '$nombreImagen' width = '90' heigth = '90'</img></td>\";\n $img = false;\n }\n else if(( strpos(strtoupper($this->nombreCampo($result, $i)),\"DLL\")!==false or strpos(strtoupper($this->nombreCampo($result, $i)),\"MN\")!==false )\n AND $this->tipoCampo($result, $i)==\"real\"){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'>$ \".$row[$i].\"</td>\";\n }\n else if( strpos($this->tipoCampo($result, $i),\"real\")!==false ){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'> \".$row[$i].\"</td>\";\n }\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n\n }\n echo \"\\n</tr>\";\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "title": "" }, { "docid": "ea5f04205c11f48acda3768733fc1d03", "score": "0.5921839", "text": "function TablaServiciosFacturados()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(75,6,'',0,0,'');\n\t$this->Cell(120,6,'LISTADO DE SERVICIOS FACTURADOS POR FECHAS ',0,1,'C');\n \n\t$this->Cell(75,6,'',0,0,'');\n $this->Cell(120,6,' DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'CÓDIGO',1,0,'C', True);\n\t$this->CellFitSpace(90,8,'DESCRIPCIÓN DE SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'COSTO',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'FACTURADOS',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'MONTO TOTAL',1,1,'C', True);\n\t\n $ve = new Login();\n\t$reg = $ve->BuscarServicios();\n\t$serviciosTotal=0;\n\t$pagoTotal=0;\n\t$a=1;\n\tfor($i=0;$i<sizeof($reg);$i++){\n\t$serviciosTotal+=$reg[$i]['cantidad']; \n\t$pagoTotal+=$reg[$i]['precioservicio']*$reg[$i]['cantidad'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(20,5,$reg[$i][\"coditems\"],1,0,'C');\n $this->CellFitSpace(90,5,utf8_decode($reg[$i][\"nombreitems\"]),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i][\"precioservicio\"], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode($reg[$i][\"cantidad\"]),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['precioservicio']*$reg[$i]['cantidad'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',1,0,'C');\n $this->Cell(20,5,'',1,0,'C');\n $this->Cell(90,5,'',1,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(25,5,'TOTALES',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(25,5,utf8_decode($serviciosTotal),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "title": "" }, { "docid": "dd7e04328f5cc3f309a48b0c9abcd6b8", "score": "0.5918675", "text": "function recorrerPedidosClienteFINAL($arrayPedidos){\r\n $contador=0;\r\n foreach ($arrayPedidos as $key => $value) {\r\n $contador++;\r\n echo '<h1>PIZZAS PEDIDAS ' .$contador.'</h1>';\r\n echo '<table class=\"tablaFINAL\">';\r\n foreach ($value as $key1 => $value1) {\r\n echo $key1.$value1;\r\n }\r\n echo '</table>';\r\n }\r\n}", "title": "" }, { "docid": "d13492a1f365467a33ecbb614b707dbb", "score": "0.59098333", "text": "function ispis_tablice($ucenici)\n {\n echo '<table border=1>';\n foreach ($ucenici as $key => $ime) {\n echo '<tr><td>'\n .$key.'</td>;\n <td>'.$ime.'</td>;\n </tr>';\n }\n echo '</table>';\n }", "title": "" }, { "docid": "347a1af0947d01d9ae510b91aed78691", "score": "0.59075284", "text": "static public function mdlSumaTotalVentas($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n //CAMBIAR EL FORMATO DE FECHA A yyyy-mm-dd \n //$fechadehoy = explode('/', $valor); \n\t//$valor = $fechadehoy[2].'-'.$fechadehoy[1].'-'.$fechadehoy[0];\n\t/*\n*/\n if($fechacutvta!=null){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo, h.cerrado FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item='\".$fechacutvta.\"' and p.totaliza=1 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }else{\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item=curdate() and p.totaliza=1 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }\n //$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n \n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\n\t\t$stmt = null;\n\n}", "title": "" }, { "docid": "a27e98f339b50119bcedcbe7c1a0d303", "score": "0.5905342", "text": "public function rompe1(){\n\n\n\t$a=\"select nombrel, count(cedulal) from codigos,lider,rompe1 where codigos.codigo=rompe1.fk_codigo and lider.cedulal=rompe1.fk_cedulal GROUP BY nombrel,cedulal \";\n\t$ta=$this->conexion->query($a);\n\n\t\n\twhile($t=mysqli_fetch_array($ta)){\n\n echo \"<tr>\";\n echo \"<td>\";\n echo $t[0];\n\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\"; \n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n echo \"&nbsp\";\n \n\n\n echo $t[1];\n echo \"</td>\";\n echo \"</tr>\";\n\n \n\n\n \n\t}\n}", "title": "" }, { "docid": "a11997f42ef1fc100ac5d20c707c847f", "score": "0.59030795", "text": "public function componente_operacion_pi_nuevo($com_id){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente = $this->model_componente->get_componente_pi($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $mes = $this->mes_nombre();\n $tabla='';\n $tabla.='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">\n <thead>\n <tr class=\"modo1\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OPERACI&Oacute;N</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACTIVIDAD</th>\n <th style=\"width:7%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LB.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:2.5%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:8%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th>\n </tr> \n \n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#9cdcd4\"><td colspan=\"22\" style=\"width: 100%; text-align: left\" style=\"height:13px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td></tr>';\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id'],$rowo['gi'],$rowo['gf']); /// Productos\n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'</td>\n <td style=\"width: 9%; text-align: left;\">'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_producto'].'</td>\n <td style=\"width: 9%; text-align: left;\">'.$rowp['prod_resultado'].'</td>\n <td style=\"width: 10%; text-align: left;\"></td>\n <td style=\"width: 7%; text-align: left;\">'.$rowp['prod_indicador'].'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['enero'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['febrero'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['marzo'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['abril'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['mayo'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['junio'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['julio'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['agosto'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['octubre'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.round($rowp['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 8%; text-align: left;\">'.$rowp['prod_fuente_verificacion'].'</td>\n <td style=\"width: 5%; text-align: right;\"></td>'; \n $tabla.='</tr>';\n $tabla.=''.$this->actividades_2019($rowp['prod_id'],$nro).'';\n }\n }\n }\n else{\n $tabla.='<tr class=\"modo1\"><td colspan=\"22\" style=\"width: 100%; text-align: left;\">SIN OPERACIONES</td></tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "title": "" }, { "docid": "d9bf31e5879cfa18d3292dd19bf87702", "score": "0.5894763", "text": "public function mostrarTabla(){\n\n $item = null;\n $valor = null;\n\n $cargo = GestorCargo::verCargoController($item, $valor);\n\tif(count($cargo)>0){\n\t\techo '{\n\t\t\t\t\"data\": [';\n\n\t\t\t\tfor($i = 0; $i < count($cargo)-1; $i++){\n\n\t\t\t\t\t$itemTipoper = \"id_tipoper\";\n\t\t\t\t\t$valorTipoper = $cargo[$i][\"tipo_per\"];\n\n\t\t\t\t\t$tipoper = GestorTipoper::verTipoperController($itemTipoper, $valorTipoper);\n\n\t\t\t\t\techo '[\n\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\"'.$tipoper[\"nombre_tipoper\"].'\",\n\t\t\t\t\t\t\"'.$cargo[$i][\"nombre_cargo\"].'\",\n\t\t\t\t\t\t\"'.$cargo[$i][\"id_cargo\"].'\"\n\t\t\t\t\t],';\n\n\t\t\t\t}\n\t\t\t\t\t$itemTipoper = \"id_tipoper\";\n\t\t\t\t\t$valorTipoper = $cargo[count($cargo)-1][\"tipo_per\"];\n\n\t\t\t\t\t$tipoper = GestorTipoper::verTipoperController($itemTipoper, $valorTipoper);\n\n\t\t\techo'[\n\t\t\t\t\t\"'.count($cargo).'\",\n\t\t\t\t\t\"'.$tipoper[\"nombre_tipoper\"].'\",\n\t\t\t\t\t\"'.$cargo[count($cargo)-1][\"nombre_cargo\"].'\",\n\t\t\t\t\t\"'.$cargo[count($cargo)-1][\"id_cargo\"].'\"\n\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t}';\n\t}else{\n\t\t\techo '{ \"data\": [] }';\n\t\t}\n\n }", "title": "" }, { "docid": "1b02ac7004f421fd4099e842a7b0ff68", "score": "0.5893731", "text": "static public function mdlMostrarComprasTotales($tabla, $item, $valor){\r\n\t\tif($item != null){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT count(sinAdquisicion) as comprasTotales from $tabla where sinAdquisicion = 0 and estado = 1 and tipoCompra != 0 and pendiente = 0 and SUBSTRING(fechaPedido, 4, 2) = :$item\");\r\n\r\n\t\t\t$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\r\n\r\n\t\t\t$stmt -> execute();\r\n\r\n\t\t\treturn $stmt -> fetch();\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT count(sinAdquisicion) as comprasTotales from $tabla where sinAdquisicion = 0 and estado = 1 and tipoCompra != 0 and pendiente = 0\");\r\n\r\n\t\t\t$stmt -> execute();\r\n\r\n\t\t\treturn $stmt -> fetch();\r\n\r\n\t\t}\r\n\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\t}", "title": "" }, { "docid": "f80e86c0ccd0f2157520436599d7ec5a", "score": "0.5875722", "text": "public function actividades_2019($prod_id,$nro){\n $actividad=$this->model_actividad->list_act_anual($prod_id); /// Actividad\n $tabla='';\n $nro_a=0;\n if(count($actividad)!=0){\n foreach ($actividad as $row){\n $programado=$this->model_actividad->actividad_programado($row['act_id'],$this->gestion); /// Actividad Programado\n if(count($programado)!=0){\n $nro_a++;\n $monto=$this->model_actividad->monto_insumoactividad($row['act_id']);\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n $tabla.='<tr class=\"modo1\" bgcolor=\"#f5f5f5\">';\n $tabla.='<td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'.'.$nro_a.'</td>';\n $tabla.='<td style=\"width: 9%; text-align: left;\"></td>';\n $tabla.='<td style=\"width: 10%; text-align: left;\"></td>';\n $tabla.='<td style=\"width: 9%; text-align: left;\"></td>';\n $tabla.='<td style=\"width: 10%; text-align: left;\">'.$row['act_actividad'].'</td>';\n $tabla.='<td style=\"width: 7%; text-align: left;\">'.$row['act_indicador'].'</td>';\n $tabla.='<td style=\"width: 3%; text-align: right;\">'.$row['act_linea_base'].'</td>';\n $tabla.='<td style=\"width: 2.5%; text-align: right;\">'.$row['act_meta'].'</td>';\n $tabla.='<td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['enero'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['febrero'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['marzo'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['abril'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['mayo'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['junio'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['julio'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['agosto'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['septiembre'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['octubre'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['noviembre'].'</td>\n <td style=\"width: 2.5%; text-align: right;\">'.$programado[0]['diciembre'].'</td>';\n $tabla.='<td style=\"width: 8%; text-align: left;\">'.$row['act_fuente_verificacion'].'</td>';\n $tabla.='<td style=\"width: 5%; text-align: left;\">'.number_format($ptto, 2, ',', '.').'</td>';\n $tabla.='</tr>';\n }\n \n }\n }\n\n return $tabla;\n }", "title": "" }, { "docid": "56dcb58e4a48fe660444df045487cced", "score": "0.58739686", "text": "public function TableDrawFacturas($idCotizacion,$idFactura)\r\n {\r\n \r\n\r\n//$Columnas=mysql_query(\"describe $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n//$Columnas=mysql_fetch_array($Columnas);\t\r\nsession_start();\r\n\r\n\r\n$Columnas1=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\n//print_r($Columnas1);\r\n//print_r($Columnas);\r\n\r\nprint('\r\n\r\n\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\" style=\"width:100%;border-left: 1px solid #000000;\r\n\t\tborder-right: 1px solid #000000;\r\n\t\tborder-top: 1px solid #000000;\r\n\t\tborder-bottom: 1px solid #000000;\">\r\n \r\n\r\n <tr> \r\n <td width=\"200\" colspan=\"8\" align=\"center\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\n Seleccione un producto</td>\r\n </tr> <tr> ');\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($NombreCol[$i]==\"\"){\r\n\t\t\tunset($NombreCol[$i]); \r\n\t\t\t$NombreCol = array_values($NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\tif($i<>1 and $i<7)\r\n\t\t\tprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\"><h5>'.$NombreCol[$i].'</h5></td>');\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n\r\nprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">Cantidad</td>');\r\n\r\n\r\n$this->ID=$NombreCol[0];\r\n\r\n$numCols=count($NombreCol);\r\n$this->NumCols=$numCols;\r\n\r\n\r\n\t\r\n\tprint('<tr>');\r\n\t\r\n\t$reg=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion' AND Devuelto=''\", $this->con) or die('no se pudo conectar a cotizaciones 2: ' . mysql_error());\r\n\t\t$i=0;\r\n\t\twhile($datos=mysql_fetch_array($reg)){\r\n\t\t$i++;\r\n\t\tif($i%2)\r\n\t\t\t\t\t\t$backgroundRow=$this->back1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$backgroundRow=$this->back2;\r\n\t\t\t\t\t\t\r\n\t\t\tfor($z=0;$z<$this->NumCols;$z++){\r\n\t\t\t\t\t//$mod=\r\n\t\t\t\t\tif($z<>1 and $z<7)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">'.$datos[$z].'</td>');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">\r\n\t\t\t\t<form name=\"formAgregaItems'.$datos[0].'\" id=\"formAgregaItems'.$datos[0].'\" method=\"POST\" action=\"VerFacturas.php\" target=\"_self\" >\r\n\t\t\t\t<input type=\"hidden\" name=\"TxtBuscarFactura\" value=\"'.$idFactura.'\">\r\n\t\t\t\t\t\t<textarea type=\"text\" name=\"TxtObservaciones\" value=\"\" placeholder=\"Observaciones\"></textarea>\r\n\t\t\t\t\t\t<input type=\"number\" name=\"TxtCantidadDev\" value=\"'.$datos[7].'\" min=\"0\" max=\"'.$datos[7].'\" step=\"any\" readonly style=\"font-size:1em; color:#333; font-family:Arial, sans-serif;\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ItemVenta\" value=\"'.$datos[0].'\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<input type=\"submit\" name=\"BtnDevolver\" value=\"Devolver\"></form></td>');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tprint(\"</tr><tr nobr=true >\");\r\n }\r\n \r\n\t\t\r\n\t\t\r\n\r\n$EspacioCol=$numCols+1;\t\r\nprint('</tr><tr>\r\n\r\n<td width=\"200\" colspan=\"8\" align=\"CENTER\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\nTechno Soluciones\r\n</td>\r\n');\r\n\r\nprint('</tr></table>');\r\n\r\n//print($this->NumCols);\r\n\r\n}", "title": "" }, { "docid": "614f1cd99837a5e52c14e120511020a1", "score": "0.586811", "text": "public function cargaTablaMesas(){\n\t\t$this->cargaMesas(\"no\");\n\t\t// Cabecera de tabla.\n\t\techo \"<div class='table-responsive'>\";\n\t\techo \"<table class='table table-striped table-sm table-bordered table-hover'>\";\n\t\techo '<thead class=\"thead-dark\">';\n\t\t\techo '<th>SALA</th>';\n\t\t\techo '<th>Mesa</th>';\n\t\t\techo '<th>Nº Comensales</th>';\n\t\t\techo '<th>Eliminar</th>';\n\t\techo '</thead>';\t\t\n echo '<tbody>';\n\t\tif (isset($_SESSION['MisMesas'])){\n\t\t\t$misMesas=$_SESSION['MisMesas'];\n\t\t\t$numMesas=count($misMesas);\n\t\t}else{\n\t\t\t$numMesas=0;\n\t\t}\n\t\tfor($i=0;$i<$numMesas;++$i){\n\t\t\t$row=$misMesas[$i];\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td>\".$row['SAL_Nombre'].\"</td>\";\n\t\t\techo \"<td>\".$row['MES_ID'].\"</td>\";\n\t\t\techo \"<td>\".$row['MES_NPersonas'].\"</td>\";\n\t\t\techo \"<td>\";\n\t\t\techo \"<button style ='border:0' onclick=\\\"confirmaBajaMesa('\".$row['SAL_ID'].\"','\".$row['SAL_Nombre'].\"','\".$row['MES_ID'].\"','\".$row['MES_NPersonas'].\"');\\\"><img src='./Assets/Icons/eliminar.svg' alt='Eliminar' ></img></button>\";\n\t\t\techo \"</td>\";\n\t\t\techo \"</tr>\";\n\t\t} \n\t\techo '</tbody>';\n\t\techo '</table>';\n\t\tif ($numMesas==0){echo \"No TIENE MESAS. INTRODUZCALAS AQUI MISMO\";}\t\t\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "137214ef5dc4a5f0cd9f8c92b34eb35d", "score": "0.5866678", "text": "function getTot()\n {\n if (!is_array($this->aDades)) {\n $this->DBCarregar('tot');\n }\n return $this->aDades;\n }", "title": "" }, { "docid": "70e907012f2967da1362f2579d982126", "score": "0.58649987", "text": "function crear_tabla_horario()\n {\n //El funcionamiento es el mismo que en crear_tabla, excepto que aqui no le pasamos el profesor\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n\n $num1 = filter_input(INPUT_POST, 'num1');\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n $mes = str_pad($mes, 2, \"0\", STR_PAD_LEFT);\n $h_profe=$this->model->get_h_profe($profe[0]['id_profesores'], $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n for($i=0;$i<5;$i++)\n {\n\n $numeros[$i+1] = $numeros[$i]+1;\n\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n for($i=8;$i<21;$i++)\n {\n if($i!=14 && $i!=15)\n {\n\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n $ano=str_pad($numeros[$k],2,\"0\",STR_PAD_LEFT);\n //Si el horario del profe esta vacio printamos boton en todos los td\n if(!empty($h_profe))\n {\n $cont = 0;\n foreach ($h_profe as $hora)\n {\n $mes_1 = $mes;\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $fecha = $año.\"-\".$mes_1.\"-\".$ano;\n\n //Comprobamos si la hora y la fecha coincide y sumamos 1 al contador\n if($hora['hora']==$i && $hora['fecha'] == $fecha)\n {\n $cont++;\n }\n }\n //Si el cantador sigue en 0 printamos boton ya que significa que no ha sido marcada\n if($cont ==0)\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n }\n else\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n }\n $total.=\"</tr>\";\n }\n }\n echo $total;\n }", "title": "" }, { "docid": "527b4f6284c8869eb06ab489f0a9e209", "score": "0.5859311", "text": "function calcular()\n\t\t{\n\t\t\tif ($_SERVER['REQUEST_METHOD']=='POST') {\n\t\t\t//Guardamos en un arreglo lo que recibimos de la vista via POST\t\n\t\t\t\t//enviamos ala funcion insertPersons del Modelo de personas \n\t\t\t\t//el arreglo previamente recibido\n\t\t\t\t $listado = $this->_estadisticaModel->getActividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado2 = $this->_estadisticaModel->getMateriales_x_actividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado1 = $this->_estadisticaModel->getCantidad($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $this->_view->_fechai = $_POST['fechai'];\n\t\t\t\t $this->_view->_fechaf = $_POST['fechaf'];\n\t\t\t\t $this->_view->_listado2 = $listado2;\n\t\t\t\t $this->_view->_listado = $listado;\n\t\t\t\t $this->_view->_listado1 = $listado1;\n\t\t\t\t $this->_view->render(\"estadistica\",'','',$this->_sidebar_menu);\n\t\t\t\t \n\t\t\t\t//redireccionamos al listado\n\t\t\t}else{\n\t\t\t\t//se muestra la ventana si no es via post\n\t\t\t\t$this->_view->render(\"insert\",'','',$this->_sidebar_menu);\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "931b8ebac42558fafb63ef92a3e9819f", "score": "0.5858284", "text": "function CuentaPedidosProntoAFacturar($CardCode){\n\t\t\n\t\t $Total_Pedido = 0;\n\t\t $NumPedido = 0;\n\t\t $FechaCreacion = 0;\n\t\t $FechaFin = 0;\n\t\t\t $Total = 0;\n\t\t\t $TotalGeneral = 0;\n\t\tif($this->con->conectar()==true){\n\t\t\t$Resultado = mysql_query(\"SELECT * FROM `PedidosProntosAFacturar` WHERE `CardCode` = '\" .$CardCode. \"'\");\n\t\t\tif($Resultado){\n\t\t\t\techo \"<table class='altrowstable' id='alternatecolor' align='center'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>Num Pedido</th>\n\t\t\t\t\t\t\t\t<th>Fecha Creacion</th>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<th>Total</th>\n\t\t\t\t\t\t\t\t<th>Accion</th>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t while( $PedidoHecho = mysql_fetch_array($Resultado) )\n\t\t\t\t {\n\t\t\t\t\t\t //suma total pedido\n\t\t\t\t\t\t\t// $Total_Pedido = $Total_Pedido + ($PedidoHecho['Cantidad']*$PedidoHecho['Precio']);\n\t\t\t\t\t\t\n\t\t\t\t\t //respalda numero pedido\n\t\t\t\t\t if ($NumPedido != $PedidoHecho['NumPedido'])\n\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t echo\"<tr>\n\t\t\t\t\t \t \t <td>\". $PedidoHecho['NumPedido'].\"</td>\n\t\t\t\t\t\t\t <td>\". $PedidoHecho['Fecha'].\"</td>\n\t\t\t\t\t\t\t <td>\". number_format($PedidoHecho['Total'], 2) .\"</td>\n\t\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t <a id='Actualizar' class='ClassBotones' href='javascript:VerDetallePedido(\\\"\".$CardCode.\"\\\",\\\"\". $PedidoHecho['NumPedido'].\"\\\");'>Ver Detalle</a>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t<tr>\";\n\t\t\t\t\t\t\t$TotalGeneral=$TotalGeneral+$PedidoHecho['Total'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$NumPedido = $PedidoHecho['NumPedido'];\n\t\t\t\t\t\t\t/* NOTAS SE DEBE HACER UA VARIABLE INDEPENDIENTE PARA CADA DATO YA QUE SI NO EL TOTAL DEL PEDIDO NO PODRA MOSTRARSE */\t\t\t\t\t\n\t\t\t\t\t //si el proximo pedido es diferente al actual\t\n\t\t\t\t\t //agarra la siguiente linea\n\t\t\t\t\t\t\t\n\t\t\t\t\t }//fin while\n\t\n\t\t\t\t/*echo\"<table class='altrowstable' id='alternatecolor'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>Num Pedido</th>\n\t\t\t\t\t\t\t\t<th>Foto</th>\n\t\t\t\t\t\t\t\t<th>CodArticulo</th>\n\t\t\t\t\t\t\t\t<th>Descripcion</th>\n\t\t\t\t\t\t\t\t<th>Cantidad</th>\n\t\t\t\t\t\t\t\t<th>Precio</th>\n\t\t\t\t\t\t\t\t<th>Total</th>\t\n\t\t\t\t\t\t </tr>\";\n\t\t\t while( $PedidoHecho = mysql_fetch_array($Resultado) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t echo\"<tr>\n\t\t\t\t\t \t\t <td>\". $PedidoHecho['NumPedido'].\"</td>\n\t\t\t\t\t <td>\";\n\t\t\t\t \t\t\t\tif (file_exists(\"../img/Articulos/\".trim($ItemCode).\".jpg\")) {\n \t\t\t\t\t\t \t\t\techo\" <img src='img/Articulos/$ItemCode.jpg' width='100' height='117'>\";\n\t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo\"<img src='img/General/SinImagenDisponible.jpg' width='100' height='115'>\";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\techo\"\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t <td>\". $PedidoHecho['CodArticulo'].\"</td>\n\t\t\t\t\t\t\t <td>\". $PedidoHecho['Descripcion'].\"</td>\n\t\t\t\t\t\t\t <td>\". $PedidoHecho['Cantidad'].\"</td>\n\t\t\t\t\t\t\t <td>\". number_format($PedidoHecho['Precio'], 2) .\"</td>\n\t\t\t\t\t\t\t <td>\". number_format(($PedidoHecho['Cantidad']*$PedidoHecho['Precio']), 2) . \"\\n\" .\"</td>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t $Total_Pedido = $Total_Pedido + ($PedidoHecho['Cantidad']*$PedidoHecho['Precio']);\n\t\t\t\t\t\t // $Total_Articulos = $Result[\"NumItems\"];\n\t\t\t\t\t \n\t\t\t }//FIN WHILE\n\t\t\t\t*/ echo \"<tr>\n\t\t\t\t\t\t<td colspan='2' align='center'>TOTAL</td>\n\t\t\t\t\t\t<td colspan='1' align='left'>\". number_format($TotalGeneral, 2).\"</td>\n\t\t\t\t\t </tr>\n\t\t\t </table>\";\n\t\t\t\n\t\t }\n\t\t\t }\n\t}", "title": "" }, { "docid": "8dd9cc61f1b8ea7ad42f26bf05b53cc7", "score": "0.5858193", "text": "function barra($nombre, $porcentaje) {\n $ancho = 1;\n\n //LARGO MÍNIMO\n $largo = 10;\n ?>\n <table width=\"50%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n <tr id=\"trtitulogris\">\n <td colspan=\"2\"><?php echo $nombre; ?></td>\n </tr>\n <tr>\n <td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n <td width=\"30%\"><?php echo round($porcentaje, 1) . \" %\"; ?></td>\n </tr>\n </table>\n <br>\n <?php\n }", "title": "" }, { "docid": "5715182215627e613ce04977365fb967", "score": "0.58566165", "text": "static public function mdlSumaTotales($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n\t$campo=\"id_caja\";\n\t$rsp=array();\n\t\n\t$ventas=self::mdlSumaTotalVentas($tabla, $item, $valor, $cerrado, $fechacutvta);\n\t$ventasgral=$ventas[\"sinpromo\"]>0?$ventas[\"sinpromo\"]:0;\n\t$ventaspromo=$ventas[\"promo\"]>0?$ventas[\"promo\"]:0;\n\t$sumaventasgral=$ventasgral+$ventaspromo;\n\t//array_push($rsp, \"ventasgral\", $sumaventasgral);\n\t$rsp[\"ventasgral\"]=$sumaventasgral; // Se crea la key \n\n\t$vtaEnv = self::mdlSumTotVtasEnv($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasenvases=$vtaEnv[\"total\"]>0?$vtaEnv[\"total\"]:0;\n\t//array_push($rsp, \"ventasenvases\", $ventasenvases);\n\t$rsp[\"ventasenvases\"]=$ventasenvases; // Se crea la key \n\n\t$vtaServ = self::mdlSumTotVtasServ($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasservicios=$vtaServ[\"total\"]>0?$vtaServ[\"total\"]:0;\n\t//array_push($rsp, \"ventaservicios\", $ventasservicios);\n\t$rsp[\"ventaservicios\"]=$ventasservicios; // Se crea la key \n\t\t\t\t\t \n\t$ventasaba=self::mdlSumTotVtasOtros($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasgralaba=$ventasaba[\"sinpromo\"]>0?$ventasaba[\"sinpromo\"]:0;\n\t$ventaspromoaba=$ventasaba[\"promo\"]>0?$ventasaba[\"promo\"]:0;\n\t$ventasabarrotes=$ventasgralaba+$ventaspromoaba;\n\t//array_push($rsp, \"ventasabarrotes\", $ventasabarrotes);\n\t$rsp[\"ventasabarrotes\"]=$ventasabarrotes; // Se crea la key \n\n\t$vtaCred = self::mdlSumTotVtasCred($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventascredito=$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]>0?$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]:0;\n\t//array_push($rsp, \"ventascredito\", $ventascredito);\n\t$rsp[\"ventascredito\"]=$ventascredito; // Se crea la key \n\n\t$totingyegr=self::mdlTotalingresoegreso($campo, $valor, $cerrado, $fechacutvta);\n\t$ingresodia=$totingyegr[\"monto_ingreso\"]>0?$totingyegr[\"monto_ingreso\"]:0;\n\t//array_push($rsp, \"ingresodia\", $ingresodia);\n\t$rsp[\"ingresodia\"]=$ingresodia; // Se crea la key \n\t$egresodia=$totingyegr[\"monto_egreso\"]>0?$totingyegr[\"monto_egreso\"]:0;\n\t//array_push($rsp, \"egresodia\", $egresodia);\n\t$rsp[\"egresodia\"]=$egresodia; // Se crea la key \n\n\t$totVentaDia=$ventasgral+$ventaspromo+$ventasenvases+$ventasservicios+$ventasgralaba+$ventaspromoaba+$ventascredito;\n\t//array_push($rsp, \"totalventadia\", $totVentaDia);\n\t$rsp[\"totalventadia\"]=$totVentaDia; // Se crea la key \n\n\treturn $rsp;\n \n}", "title": "" }, { "docid": "d8c199d9bb41de9c613e31473f799e08", "score": "0.5855708", "text": "function mostrarDatosFacturaCliente($precioTotal,$cliente,$arrayPedidos){\r\n echo '<div id=\"parteIzquierdaTercera\">';\r\n echo '<h1>DATOS CLIENTE Y TOTAL FACTURA</h1>';\r\n $precioTotal = 0.0;\r\n //imprimimos cliente\r\n recorrerCliente($cliente);\r\n $precioTotal = calcularTotalPedidosClientes($arrayPedidos);\r\n //Enviamos la factura total por sesion\r\n $_SESSION['facturaTotal'] = $precioTotal;\r\n\r\n echo '<table>';\r\n echo '<tr><td class=\"precioTituloTotal\">TOTAL FACTURA</td><td class=\"precioTdTotal\">\r\n '.$precioTotal.'\r\n </td></tr>';\r\n echo '</table>';\r\n echo '<form name='.\"formularioCancelar\".' action='.\"CancelarConfirmar.php\".' method='.\"POST\".' >';\r\n echo '<table>';\r\n echo '<td><input type='.\"submit\".' value='.\"Cancelar pedido\".' name='.\"Cancelar\".' class='.\"centroBoton\".'></td>';\r\n echo '<td><input type='.\"submit\".' value='.\"Confirmar pedidos\".' name='.\"Confirmar\".' class='.\"centroBoton\".'></td>';\r\n echo '</table>';\r\n echo '</form>';\r\n echo '</div>';\r\n}", "title": "" }, { "docid": "95534ff50b92459e9ad33c5fab546165", "score": "0.58555466", "text": "function FacturasAbiertas() {\n $sql = \"SELECT COUNT(*) count FROM \".self::$table.\" WHERE estado='Abierta'\";\n return DBManager::count($sql);\n }", "title": "" }, { "docid": "22af68c7e8356d53dca0216c68e5a3c2", "score": "0.5854364", "text": "public function ctrMostrarTotalProducto(){\n\n\n\n\t$tabla = 'productos';\n\n\n\n\t$respuesta = ModeloProducto::mdlMostrarTotalProducto($tabla);\n\n\n\n\treturn $respuesta;\n\n\n\n\t}", "title": "" }, { "docid": "88d76b62b89bdebc192dac1d672e02ec", "score": "0.5848436", "text": "public function list_actividades($prod_id){\n $tabla='';\n $actividades = $this->model_actividad->list_actividad_gestion($prod_id,$this->gestion); /// actividades-Proy Inversion\n \n if(count($actividades)!=0){\n $nro=0;\n foreach($actividades as $row){\n $monto=$this->model_actividad->monto_insumoactividad($row['act_id']);\n $tp='';\n if($row['indi_id']==2){\n $tp='%';\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $tabla.='\n <tr bgcolor=\"#f5f0f0\">\n <td style=\"height:12px;\"></td>\n <td style=\"width: 2%; text-align: center; font-size: 7.5px;\"></td>\n <td></td>\n <td></td>\n <td></td>\n <td style=\"width: 9%; text-align: left;\"></td>\n <td style=\"width: 9%; text-align: left;\"></td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_actividad'].'</td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_indicador'].'</td>\n <td style=\"width: 2%; text-align: center;\">'.round($row['act_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: center;\" bgcolor=\"#eceaea\">'.round($row['act_meta'],2).'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['enero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['febrero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['marzo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['abril'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['mayo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['junio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['julio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['agosto'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['octubre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: center;\">'.round($row['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 9%; text-align: left;\">'.$row['act_fuente_verificacion'].'</td>\n <td style=\"width: 5%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n </tr>';\n }\n }\n\n return $tabla;\n }", "title": "" }, { "docid": "7e1dbcb455414051535b991b23394a2d", "score": "0.5846118", "text": "public function reservas_totales($id_a, $finicio, $ffin) //EXCELL\n\n {\n \t$q_string = \"select id_a, nombre_a, carrera_a, count(id_a) as tot from reservas where fecha between '\".$finicio.\"' and '\".$ffin.\"' and id_a = '\".$id_a.\"' and estado ='1' group by id_a\";\n\t\t\t//select id_a, nombre_a, carrera_a, count(id_a) as tot // SE PUEDE OBTENER SOLO CON\n\t\t\t//from reservas\n\t\t\t//where fecha between '2014/06/05' and '2014/06/30' and id_a = '1' and estado ='1'\n\t\t\t//group by id_a\n \t$data = $this->db->query($q_string);\n\t \t return $data;\n\n\t}", "title": "" }, { "docid": "3e14cb1b74f9a022e56bd73b005f7119", "score": "0.5832138", "text": "public function totCadastrosMes(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT ifnull(count(*),0) as total FROM tbclientes a WHERE MONTH(a.data_cadastro) = Month(now());\";\n $rsclimes = $this->conexao->query($sql);\n $result = $rsclimes->fetch_array();\n $rstotclimes = $result['total'];\n\n return $rstotclimes;\n }", "title": "" }, { "docid": "2259469f607497aff38b11edc50943c2", "score": "0.58305085", "text": "function crear_tabla()\n {\n //Array para saber cuantos dias tienen los meses\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n //Recogemos los datos\n $num1 = filter_input(INPUT_POST, 'num1');\n $profe = filter_input(INPUT_POST, 'profe');\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n //Recogemos los horarios del profesor y la zona seleccionados\n $h_profe=$this->model->get_h_profe($profe, $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n //Sacamos los cinco numeros de la semana\n for($i=0;$i<5;$i++)\n {\n $numeros[$i+1] = $numeros[$i]+1;\n //si el numero es superior al dia maximo del mes entonces le restamos el dia maximo y reseteamos los dias\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n //marcamos que cambiamos de mes\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n //bucle para crear los tr de las horas\n for($i=8;$i<21;$i++)\n {\n //Quitamos las horas de comer\n if($i!=14 && $i!=15)\n {\n //generamos el primer td con la hora\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n //bucle para sacar el resto de td\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n //foreach de horarios para comprobar si coincide con la fecha y tenemos que printar un boton\n foreach ($h_profe as $hora)\n {\n //creamos otra variable de mes para no modificar la global\n $mes_1 = $mes;\n //Preguntas para saber si hay que modificar el mes, ya sea sumar o cambiar a 1\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n //Añadimos un zero a la izquierda si es inferior a 10\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $dia = str_pad($numeros[$k], 2, \"0\", STR_PAD_LEFT);\n //Montamos la fecha\n $fecha = $año.\"-\".$mes_1.\"-\".$dia ;\n\n //Preguntamos si la hora del tr es la misma que la del horario y lo mismo con la fecha\n if($hora['hora']== $i && $hora['fecha'] == $fecha)\n {\n //Si coincide creamos el boton\n $total.= \"<button class='practica hvr-grow-shadow'>Marcar</button>\";\n }\n }\n //Le metemos un span oculto con los datos de dia y hora.\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n\n }\n $total.=\"</tr>\";\n }\n }\n //Enviamos la tabla\n echo $total;\n }", "title": "" }, { "docid": "afb77ac4fe2dfc1cbe20cf184997fed1", "score": "0.5825828", "text": "static public function mdlSalidaImpresionTotales($valor){\n\n\t\t$sql=\"SELECT\n\t\t\t\t\t'TOTAL',\n\t\t\t\t\t'PEDIDO',\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '1'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t1,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '2'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t2,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '3'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t3,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '4'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t4,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '5'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t5,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '6'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t6,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '7'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t7,\n\t\t\t\t\tSUM(\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN a.cod_talla = '8'\n\t\t\t\t\t\tTHEN dt.cantidad\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND\n\t\t\t\t\t) AS t8,\n\t\t\t\t\tSUM(dt.cantidad) AS total \n\t\t\t\tFROM\n\t\t\t\t\tdetalle_ing_sal dt\n\t\t\t\t\tLEFT JOIN articulojf a\n\t\t\t\t\tON dt.articulo = a.articulo\n\t\t\t\tWHERE dt.codigo = $valor\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t$stmt=null;\n\n\t}", "title": "" }, { "docid": "17ca955f97adda96e1b344437c19ace8", "score": "0.5824514", "text": "public function inventario_tatalProductos(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idProducto) as cantidadProductos from tb_productos \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadProductos'];\t\t\t\n\t\t\t\n\t\t\t\n }", "title": "" }, { "docid": "650d391430f5ce0ca7eeb0465bae4a23", "score": "0.5823921", "text": "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\n}", "title": "" }, { "docid": "894a213961ce849a3b1a6ba2822b7255", "score": "0.5822918", "text": "public function NumAdeudos(){\n\t\t$UsCg = new HomeController();\n\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t$UsCfechaactual = date('Y-m-d');\n\t\t$UsCseccion = DB::table(\"colegiatura\")->where(\"Alumno_idAlumno\",Session::get(\"usuario\"));\n\t\t$UsCcolegiaturas = $UsCseccion->orderBy('periodo_idperiodo', 'asc')->get();\n\t\t$UsCconcole = $UsCseccion->count();\n\t\t$UsCusuario = DB::table(\"alumno\")->where(\"idAlumno\",Session::get(\"usuario\"))->first();\n\t\t$UsCadeudo = ($UsCg->restaFechas($UsCusuario->fecha, $UsCfechaactual))-$UsCconcole;\n\t\tif ($UsCadeudo < 0) {$UsCadeudo = 0;}\n\t\treturn \"- Adeudos: \".$UsCadeudo;\n\t}", "title": "" }, { "docid": "94e64a756ec22f8c179483dbe2d4ef60", "score": "0.5822642", "text": "public function reporteMensualTotal(){\n\n }", "title": "" }, { "docid": "ff196f9a63f97c86f0d2c9fb8ee3beb8", "score": "0.5821235", "text": "function reporteEstudiantesExito($reporte,$i) {\n\n foreach ($reporte as $key => $value) {\n if($reporte[$key]['motivo']=='ok')\n {?>\n <tr><td align=\"center\"><?echo $i?></td>\n <td align=\"center\"><?echo $reporte[$key]['codigo']?></td>\n <td colspan=\"2\"><?echo $reporte[$key]['nombre']?></td>\n <td align=\"center\"><?echo $reporte[$key]['motivo']?></td>\n </tr>\n <?\n $i++;\n }\n }\n }", "title": "" }, { "docid": "dbc33468cb81fe25bd8b2ed14a871e48", "score": "0.5811446", "text": "function promedios_por_materia($vector){\n echo \"<hr> ############# Promedios por materia #############\";\n $calificacion1=0;\n $calificacion2=0;\n $calificacion3=0;\n $calificacion4=0;\n $calificacion5=0;\n $calificacion6=0;\n foreach ($vector as $key => $value) {\n $calificacion1=$calificacion1+$vector[$key][0];\n $calificacion2=$calificacion2+$vector[$key][1];\n $calificacion3=$calificacion3+$vector[$key][2];\n $calificacion4=$calificacion4+$vector[$key][3];\n $calificacion5=$calificacion5+$vector[$key][4];\n $calificacion6=$calificacion6+$vector[$key][5];\n }\n $prom=$calificacion1/10;\n echo \"<br> Promedio materia 1: \".$prom;\n $prom=$calificacion2/10;\n echo \"<br> Promedio materia 2: \".$prom;\n $prom=$calificacion3/10;\n echo \"<br> Promedio materia 3: \".$prom;\n $prom=$calificacion4/10;\n echo \"<br> Promedio materia 4: \".$prom;\n $prom=$calificacion5/10;\n echo \"<br> Promedio materia 5: \".$prom;\n $prom=$calificacion6/10;\n echo \"<br> Promedio materia 6: \".$prom;\n }", "title": "" }, { "docid": "d342ec7448db5fc26d510d74006681c2", "score": "0.58102125", "text": "public function getTotalAnuncios($filtros = null)\n {\n $filtrostring = ['1=1'];\n $params = [];\n if (!empty($filtros['categoria'])) {\n $filtrostring[] = 'anuncios.id_categoria = :id_categoria:';\n $params['id_categoria'] = $filtros['categoria'];\n }\n if (!empty($filtros['preco'])) {\n $filtrostring[] = 'anuncios.valor BETWEEN :preco1: AND :preco2:';\n $preco = explode('-', $filtros['preco']);\n $params['preco1'] = $preco[0];\n $params['preco2'] = $preco[1];\n }\n if (!empty($filtros['estado'])) {\n $filtrostring[] = 'anuncios.estado = :estado:';\n $params['estado'] = $filtros['estado'];\n }\n\n $db = db_connect();\n $sql = $db->query(\"SELECT COUNT(*) as c FROM anuncios WHERE \" . implode(' AND ', $filtrostring), $params);\n $db->close;\n $row = $sql->getRowObject();\n return $row->c;\n }", "title": "" }, { "docid": "6502ae382ae3b20e89d4b62e7be5e2f6", "score": "0.58039165", "text": "public static function ctrSumaTotalEgresos()\n {\n\n $tabla = \"finanzas\";\n\n $respuesta = ModeloFinanzas::mdlSumaTotalEgresos($tabla);\n\n return $respuesta;\n\n }", "title": "" }, { "docid": "d97a729a7155072b3ea7a8d9a62d6432", "score": "0.5794114", "text": "public function formulas_TotalAplicarFiltrosFormulas($fechaInicial, $fechaFinal, $usuarios, $idMedicamento, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idMedicamento != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_medicamentosFormula AS MF ON MF.idFormula = F.idFormula\n\t\t\t\t\t\t\t\t INNER JOIN tb_listadoMedicamentos AS ME ON ME.idMedicamento = MF.idMedicamento\n\t\t\t\t\t\t\t\t WHERE ME.idMedicamento = '$idMedicamento' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND F.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( F.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND F.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(F.idFormula) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_formulas AS F\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON F.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = F.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = F.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas['totalRegistros'];\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "title": "" }, { "docid": "bdf24abc89837521eb5c6d4f45044450", "score": "0.5792412", "text": "static public function mdlSumTotVtasCred($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n\n if($fechacutvta!=null){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(IF(h.es_promo = 0, h.cantidad*h.precio_venta,0)) AS sinpromo, \n\t\tSUM(IF(h.es_promo = 1, h.precio_venta,0)) AS promo FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item='\".$fechacutvta.\"' and h.id_caja='\".$valor.\"' and h.cerrado='\".$cerrado.\"' AND h.id_tipomov=3\");\n }else{\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.fecha_salida, SUM(IF(h.es_promo = 0, h.cantidad*h.precio_venta,0)) AS sinpromo, \n\t\tSUM(IF(h.es_promo = 1, h.precio_venta,0)) AS promo FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item=curdate() and h.id_caja='\".$valor.\"' and h.cerrado='\".$cerrado.\"' AND h.id_tipomov=3\");\n }\n //$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n \n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\n\t\t$stmt = null;\n\n}", "title": "" }, { "docid": "bb7d7b6f23c58430ac6017d03a914213", "score": "0.57921237", "text": "static public function mdlMostrarSumaVentas($tabla,$almacen)\n\t{\n\t\tif ($almacen != null)\n\t\t{\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(venta) as total FROM $tabla where id_almacen = :almacen\");\n\t\t\t$stmt -> bindParam(\":almacen\", $almacen, PDO::PARAM_STR);\n\t\t\t$stmt -> execute();\n\t\t\treturn $stmt -> fetch();\n\t\t\t$stmt -> close();\n\t\t\t$stmt = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(venta) as total FROM $tabla\");\n\t\t\t$stmt -> execute();\n\t\t\treturn $stmt -> fetch();\n\t\t\t$stmt -> close();\n\t\t\t$stmt = null;\n\t\t}\n\t}", "title": "" }, { "docid": "b88cded413492736d9ef22720456e53f", "score": "0.5787321", "text": "public function ventaMayor($idcliente,$get_tcambio){\n //$sql=\"SELECT ocCab.idordenventa,ocCab.importeordencobro,CASE ovCab.IdMoneda WHEN 2 THEN ocCab.importeordencobro*\".$get_tcambio.\" WHEN 1 THEN ocCab.importeordencobro END AS total\n //FROM wc_ordenventa ovCab,wc_ordencobro ocCab\n //WHERE ovCab.idcliente=\".$idcliente.\"\n //AND ovCab.idordenventa=ocCab.idordenventa\n //AND ovCab.vbcreditos=1\n //AND ovCab.vbventas=1\n //AND ovCab.vbcobranzas=1\n //AND ovCab.estado=1\n //ORDER BY ocCab.idordenventa,ocCab.idordencobro ASC\";\n // $array_ventaMayor = $this->scriptArrayCompleto($sql);\n // $idordenventa=-1;\n // for ($i = 0; $i < count($array_ventaMayor); $i++) {\n // if($idordenventa!=$array_ventaMayor[$i]['idordenventa']){\n // $cadena[]=$array_ventaMayor[$i]['total'];\n // }\n // $idordenventa=$array_ventaMayor[$i]['idordenventa'];\n // }\n // $totalmayor=max($cadena);\n //\n // end como nacio la venta\n\n //start como esta actualmente esta la venta -- angel lo indico en el modulo vista global\n $sql=\"SELECT ovCab.idordenventa,CASE ovCab.IdMoneda WHEN 2 THEN SUM(ogCab.importegasto)*\".$get_tcambio.\" WHEN 1 THEN SUM(ogCab.importegasto) END AS total\n FROM wc_ordenventa ovCab,wc_ordengasto ogCab\n WHERE ovCab.idcliente=\".$idcliente.\"\n AND ovCab.idordenventa=ogCab.idordenventa\n AND ovCab.vbcreditos=1\n AND ovCab.vbventas=1\n AND ovCab.vbcobranzas=1\n AND ovCab.estado=1\n AND ogCab.estado=1\n GROUP BY ovCab.idordenventa ORDER BY total DESC;\";\n $array_ventaMayor = $this->scriptArrayCompleto($sql);\n //end como termino la venta\n return $array_ventaMayor[0]['total'];\n }", "title": "" }, { "docid": "03ad36fcb6c870bfd08d9a0b924e8df5", "score": "0.57857424", "text": "public function prixtotal(){\r\n\t\t\t\trequire(\"connexiondatabase.php\");\r\n\t\t/*on fait ici une somme des différent object commandé et on reourne*/\r\n\t\t$prixtotal=0;\r\n\t\t//on recupere les id des produis sélectionner pour faire la requette\r\n\t\t$ids = array_keys($_SESSION['panier']);\r\n\t\tif (empty($ids)) {//si les id sont vide, \r\n\t\t\t$produits=array(); // \r\n\t\t}else{\r\n\r\n\t\t$produits = $connexion->prepare('SELECT id, prix FROM produits WHERE id IN ('.implode(',' ,$ids).')');\r\n\t\t$produits->execute();\r\n\t\t}\r\n\r\n\t\twhile ($produit=$produits->fetch(PDO::FETCH_OBJ)){\r\n\t\t\t$prixtotal +=$produit->prix*$_SESSION['panier'][$produit->id];\r\n\t\t}\r\n\t\treturn $prixtotal;\r\n\t}", "title": "" }, { "docid": "03b9c68142e9590900440d6f856c460c", "score": "0.57819897", "text": "public function countEtat_compte(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "219f7a38425ca455f8a16a37c2153bea", "score": "0.5776767", "text": "function total() {\n\t\t$sql = \"\n\t\t\tSELECT SUM(biaya) as totalbiaya FROM tiket \n\t\t\tWHERE tgl_pemesanan >= '\".date(\"Y-m-d\").\"' AND tgl_pemesanan <= '\".date(\"Y-m-d\").\"'\n\t\t\tORDER BY id_tiket ASC\"; \n\t\t\n\t\t$query = $this->db->query($sql);\n\t\t$row = $query->row();\n\t\treturn $row->totalbiaya;\n\t}", "title": "" }, { "docid": "90922e54d47429dd4a0a57049a082e02", "score": "0.5775152", "text": "function get_reptotal_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and i.usuario_id = \".$usuario_id.\" \";\r }\r $ingresos = $this->db->query(\"\r select\r SUM(d.detalleven_total) as total\r from\r\r venta v, detalle_venta d, producto p\r\r where\r\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 1\r and v.venta_id = d.venta_id\r and d.producto_id = p.producto_id \r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->row_array();\r \r return $ingresos['total'];\r }", "title": "" }, { "docid": "8f0e7cee70b540a62e251ae028b32143", "score": "0.57742697", "text": "function fantacalcio_calcola_totali($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n// $vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = array();\n foreach ($competitions as $c_id => $competition) {\n $competition_round = get_last_competition_round($c_id);\n $matches_competitions = get_round_matches($competition_round, '', $c_id);\n\n $matches = array_merge($matches, $matches_competitions);\n }\n\n $out = '';\n\n $header = array(\"Comp\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"W\");\n\n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n\n $mod_por_1 = $match->mod_por_1;\n $mod_por_2 = $match->mod_por_2;\n $mod_dif_1 = $match->mod_dif_1;\n $mod_dif_2 = $match->mod_dif_2;\n $mod_centr_1 = $match->mod_centr_1;\n $mod_centr_2 = $match->mod_centr_2;\n $mod_att_1 = $match->mod_att_1;\n $mod_att_2 = $match->mod_att_2;\n \n $bonus_t1 = $match->bonus_t1;\n $bonus_t2 = $match->bonus_t2;\n\n $tot_voti_1 = get_totale($t1_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n $tot_voti_2 = get_totale($t2_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n\n $tot_1 = $tot_voti_1 + $mod_por_1 + $mod_dif_2 + $mod_centr_1 + $mod_att_1 + $bonus_t1;\n $tot_2 = $tot_voti_2 + $mod_por_2 + $mod_dif_1 + $mod_centr_2 + $mod_att_2 + $bonus_t2;\n\n $goals_1 = floor(($tot_1 -60) / 6);\n $goals_2 = floor(($tot_2 -60) / 6);\n $goals_1 = ($goals_1 >= 0) ? $goals_1 : 0;\n $goals_2 = ($goals_2 >= 0) ? $goals_2 : 0;\n \n //vittoria con scarto\n if (variable_get('fantacalcio_scarto', '0') && variable_get('fantacalcio_scarto_punti', '0') > 0) {\n if ( ($goals_1 == $goals_2) && ($tot_1 - $tot_2) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_1++;\n if ( ($goals_1 == $goals_2) && ($tot_2 - $tot_1) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_2++;\n }\n\n $winner_id = ($goals_1 > $goals_2) ? $t1_id : $t2_id;\n $winner_id = ($goals_1 == $goals_2) ? -1 : $winner_id;\n\n //aggiorno partite\n $sql = \"UPDATE {fanta_matches} SET \n pt_1 = '%f', \n pt_2 = '%f', \n tot_1 = '%f', \n tot_2 = '%f', \n goals_1 = '%d', \n goals_2 = '%d', \n played = 1, \n winner_id = '%d' \n WHERE m_id = '%d'\";\n $result = db_query($sql, $tot_voti_1, $tot_voti_2, $tot_1, $tot_2, $goals_1, $goals_2, $winner_id, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Punti\", \"Totale\", \"Goal\", \"Vincitore\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['pt_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['tot_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['goals_1'];\n //$rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['pt_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['tot_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['goals_2'];\n $rows[$row['m_id'] . \"_2\"][] = ($row['winner_id'] == -1) ? \" - \" : $teams[$row['winner_id']]->name;\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n}", "title": "" }, { "docid": "60c21fe6423e250325712755dfdb259b", "score": "0.5771899", "text": "public function totalProducto() {\n\t\t$cantidad = $this->input->post('c');\n\t\t$precio = $this->input->post('p');\n\t\t$descuento = $this->input->post('d');\n\t\t$sub = ($precio * $cantidad);\n\t\t$des = ($sub * ($descuento/100));\n\t\t$total_facturacompra = $sub - $des;\n\t\t$data = array(\n\t\t\t'total_facturacompra' => $total_facturacompra, /*subtotal*/\n\t\t\t'des' => $des, /*descuento*/\n\t\t\t'sub' => $sub /*subtoral_sin_desc*/\n\t\t);\n\t\techo json_encode($data);\n\t}", "title": "" } ]
93df482587ef9afa09d6beaefe16617c
To compare table description of MySQL.
[ { "docid": "6239d21fb74d1d3d398d8632a4a7b7aa", "score": "0.0", "text": "public function __construct($name = null, array $definition = null) {\n\t\tif ($name != null) {\n\t\t\t$this->field = $name;\n\t\t}\n\n\t\tif ($definition != null) {\n\t\t\t$this->type = $definition[0];\n\t\t\t$this->default = null;\n\t\t\tif (isset($definition[1]) AND $definition[1]) {\n\t\t\t\t$this->null = 'YES';\n\t\t\t} else {\n\t\t\t\t$this->null = 'NO';\n\t\t\t}\n\t\t\t$this->extra = (isset($definition[2]) ? $definition[2] : '');\n\t\t\tif ($this->type == T::JSON) {\n\t\t\t\t$this->type = T::Text;\n\t\t\t\t$this->extra = '';\n\t\t\t}\n\t\t\tif ($this->type === T::Enumeration) {\n\t\t\t\t$class = $this->extra;\n\t\t\t\t$this->type = \"enum('\" . implode(\"','\", $class::getTypeOptions()) . \"')\";\n\t\t\t\t$this->extra = '';\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "cd8130b425c214c01ba30e87a5beb2ab", "score": "0.71744215", "text": "function describe($tablename);", "title": "" }, { "docid": "6e4a2aac5309ce2485734072ca7e7447", "score": "0.65191954", "text": "function describe()\n {\n return sprintf(\n Translate::getModuleTranslation('coreupdater', 'Table `%1$s` use `%2$s` database engine instead of `%3$s`', 'coreupdater'),\n $this->table->getName(),\n $this->currentEngine,\n $this->table->getEngine()\n );\n }", "title": "" }, { "docid": "4edb2ccbff883b06be10b91dd1e532f7", "score": "0.6472491", "text": "function describe($table){\n\t\treturn($this->q2obj(\"DESCRIBE \".$table));\n\t}", "title": "" }, { "docid": "eb7382a1aab95553a627e62eee61cc05", "score": "0.6472167", "text": "public static function getTableDescription(){\n\n $table = new ShaBddTable();\n $table\n ->setName(self::getTableName())\n ->addField(\"content_key\")->setType(\"VARCHAR(100)\")->setPrimary()->end()\n ->addField(\"language_id\")->setType(\"SMALLINT UNSIGNED\")->setPrimary()->end()\n ->addField(\"content_value\")->setType(\"TEXT\")->end()\n ->addField(\"content_type\")->setType(\"SMALLINT UNSIGNED\")->end();\n\n return $table;\n\n }", "title": "" }, { "docid": "8d94177ad8158b96840b5de0e721b0aa", "score": "0.6448069", "text": "public function test_sample_table() {\n $db = new DB();\n $excluded_columns = ['register_datetime', 'update_datetime'];\n $this->assertTableNotSimilar($db, 'demo', 'expected_sample', 'demo', 'sample', $excluded_columns);\n $this->assertTableNotSimilar($db, 'demo', 'expected_sample', 'demo', 'sample', $excluded_columns);\n $excluded_columns[] = 'text';\n $this->assertTableSimilar($db, 'demo', 'expected_sample', 'demo', 'sample', $excluded_columns);\n }", "title": "" }, { "docid": "1cceba3e74f1358bd44a873b706693f5", "score": "0.6364745", "text": "static function describeTable($tablename,$schema='',$db=''){\n\t\tif ($db=='')$db=core::$data['db'];\n\t\tif (\\is_array($db))$db=db::autodb($db);\n\t\t$defaultScheme=$schema?$schema:$db;\n\t\tif (core::$debug){\n\t\t\tdebug::group('DBWork describeTable start');\n\t\t\tdebug::consoleLog('Table '.($schema?$schema.'.':'').$tablename);\n\t\t}\n\t\tif (isset(self::$describeStorage[$db][$defaultScheme][$tablename])){\n\t\t\tif (core::$debug){\n\t\t\t\tdebug::consoleLog('table was described early');\n\t\t\t\tdebug::groupEnd();\n\t\t\t}\n\t\t\treturn self::$describeStorage[$db][$defaultScheme][$tablename];\n\t\t}\n\t\tif (core::$data['db_describe_cache']){\n\t\t\t$f=core::$data['db_describe_cache'];\n\t\t\t$cache_file=$f($tablename,$schema,$db);\n\t\t\tif (\\file_exists($cache_file)){\n\t\t\t\tif (core::$debug){\n\t\t\t\tdebug::consoleLog('table was described early from cache');\n\t\t\t\tdebug::groupEnd();\n\t\t\t\t}\n\t\t\t\treturn self::$describeStorage[$db][$defaultScheme][$tablename]=filedata::loaddata($cache_file);\n\t\t\t}\n\t\t}\n\t\t$primaryKey=array();\n\t\t$uniqueKey=array();\n\t\t$data=array();\n\t\tswitch(db::type($db)){\n\t\t\tcase 'mysql':\n\t\t\t\t/************************ MYSQL *************************/\n\t\t\t\t$tablename=\\strtolower($tablename);\n\t\t\t\tif ($schema){\n\t\t\t\t\t$sql='show create table `'.$schema.'`.`'.$tablename.'`';\n\t\t\t\t}else{\n\t\t\t\t\t$sql='show create table `'.$tablename.'`';\n\t\t\t\t}\n\t\t\t\t$rs=db::ea1($sql,'',$db);\n\t\t\t\t$createtable=$rs['Create Table'];\n\t\t\t\t$createtable=\\explode(\"\\n\",$createtable);\n\t\t\t\tif (empty($createtable)) return \\false;\n\t\t\t\tforeach($createtable as $string){\n\t\t\t\t\t$string=\\trim($string,\" \\t\\n\\r\\0,\");\n\t\t\t\t\tif (\\substr($string,0,13) == 'CREATE TABLE ') continue;\n\t\t\t\t\tif (\\substr($string,0,9) == ') ENGINE ') break;\n\t\t\t\t\tif (\\substr($string,0,13) == 'PRIMARY KEY ('){\n\t\t\t\t\t\t$string=\\substr($string,13,-1);\n\t\t\t\t\t\t$key=\\explode(',',$string);\n\t\t\t\t\t\tforeach($key as $item){\n\t\t\t\t\t\t\t$primaryKey[]=input::findFirstPrepare($item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (\\substr($string,0,11) == 'UNIQUE KEY '){\n\t\t\t\t\t\t$string=\\substr($string,11,-1);\n\t\t\t\t\t\t$name=input::findFirstPrepare($string);\n\t\t\t\t\t\t$string=\\trim($string,' (');\n\t\t\t\t\t\t$key=\\explode(',',$string);\n\t\t\t\t\t\tforeach($key as $item){\n\t\t\t\t\t\t\t$uniqueKey[$name][]=input::findFirstPrepare($item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (\\substr($string, 0, 4) == 'KEY ') {\n\t\t\t\t\t\t$string = \\substr($string, 4, -1);\n\t\t\t\t\t\t$name = input::findFirstPrepare($string);\n\t\t\t\t\t\t$string = \\trim($string, ' (');\n\t\t\t\t\t\t$key = \\explode(',', $string);\n\t\t\t\t\t\tforeach ($key as $item) {\n\t\t\t\t\t\t $indexKey[$name][] = input::findFirstPrepare($item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t }\n\t\t\t\t\t if (substr($string, 0, 11) == 'CONSTRAINT ') {\n\t\t\t\t\t\t$re = '/CONSTRAINT `(.*)` FOREIGN KEY \\(`(.*)`\\) REFERENCES `(.*)` \\(`(.*)`\\)( ON DELETE (.*)( ON UPDATE (.*))?)?/';\n\t\t\t\t\t\t$matches = array();\n\t\t\t\t\t\tif (\\preg_match_all($re, $string, $matches, \\PREG_SET_ORDER, 0)) {\n\t\t\t\t\t\t $matches = $matches[0];\n\t\t\t\t\t\t $foreignKey[$matches[1]] = array('table' => $matches[3], 'mainfield' => $matches[2], 'referencefield' => $matches[4]);\n\t\t\t\t\t\t if (isset($matches[6])) {\n\t\t\t\t\t\t\t$foreignKey[$matches[1]]['on delete'] = $matches[6];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t if (isset($matches[8])) {\n\t\t\t\t\t\t\t$foreignKey[$matches[1]]['on update'] = $matches[8];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t }\n\t// parsing to words\n\t\t\t\t\tif (\\substr($string,0,1) == '`'){\n\t\t\t\t\t\t$column=input::findFirstPrepare($string);\n\t\t\t\t\t\t$string=\\trim($string);\n\t//\t\t\t\t\t\t\techo $column.' - ';\n\t\t\t\t\t\t$type=\\substr($string,0,\\strpos($string,' '));\n\t\t\t\t\t\t$string=\\substr($string,\\strlen($type));\n\t\t\t\t\t\t$string=\\trim($string);\n\t//\t\t\t\t\t\t\techo $type.' - ';\n\t\t\t\t\t\t$typerangepos=\\strpos($type,'(');\n\t\t\t\t\t\tif ($typerangepos){\n\t\t\t\t\t\t\t$type=\\trim($type,')');\n\t\t\t\t\t\t\t$data[$column]['typerange']=\\substr($type,$typerangepos + 1);\n\t\t\t\t\t\t\t$type=\\substr($type,0,$typerangepos);\n\t\t\t\t\t\t\tif ($type=='set' or $type=='enum')$data[$column]['typerange']=65335;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data[$column]['type']=$type;\n\t\t\t\t\t\tif (\\substr($string,0,9) == 'unsigned '){\n\t\t\t\t\t\t\t$data[$column]['unsigned']=\\true;\n\t\t\t\t\t\t\t$string=\\substr($string,9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (\\substr($string,0,9) == 'zerofill '){\n\t\t\t\t\t\t\t$data[$column]['zerofill']=\\true;\n\t\t\t\t\t\t\t$string=\\substr($string,9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (\\substr($string,0,9) == 'NOT NULL '){\n\t\t\t\t\t\t\t$data[$column]['notnull']=\\true;\n\t\t\t\t\t\t\t$string=\\substr($string,9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (\\substr($string,0,14) == 'AUTO_INCREMENT'){\n\t\t\t\t\t\t\t$data[$column]['autoincrement']=\\true;\n\t\t\t\t\t\t\t$string=\\substr($string,15);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\\substr($string,0,8) == 'DEFAULT '){\n\t\t\t\t\t\t\t$string=\\substr($string,8);\n\t\t\t\t\t\t\tif (\\substr($string,0,1)==\"'\"){\n\t\t\t\t\t\t\t\t$data[$column]['default']=input::findFirstPrepare($string);\n\t\t\t\t\t\t\t\t$string=\\trim($string);\n\t\t\t\t\t\t\t}elseif (\\substr($string,0,5) =='NULL '){\n\t\t\t\t\t\t\t\t$data[$column]['default']=\\null;\n\t\t\t\t\t\t\t\t$string=\\substr($string,5);\n\t\t\t\t\t\t\t}elseif (\\substr($string,0,18) =='CURRENT_TIMESTAMP '){\n\t\t\t\t\t\t\t\t$data[$column]['default']='CURRENT_TIMESTAMP';\n\t\t\t\t\t\t\t\t$string=\\substr($string,18);\n\t\t\t\t\t\t\t}elseif (\\is_numeric(\\explode(\" \",$string)[0])){\n\t\t\t\t\t\t\t\t$data[$column]['default']=\\explode(\" \",$string)[0];\n\t\t\t\t\t\t\t\t$string=\\substr($string,\\strlen($data[$column]['default'])+1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t//echo $default.' - ';\n\t\t\t\t\t\tif (\\substr($string,0,8)=='COMMENT '){\n\t\t\t\t\t\t\t$string=\\substr($string,8);\n\t\t\t\t\t\t\t$data[$column]['comment']=input::findFirstPrepare($string);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'oci8':\n\t\t\tcase 'oracle':\n\t\t\t\t/************************* ORACLE ************************ */\n\t\t\t\t$tablename=\\strtoupper($tablename);\n\t\t\t\tif ($schema){\n\t\t\t\t\t$schema=\\strtoupper($schema);\n\t\t\t\t\t$sql=\"select CONSTRAINT_NAME from ALL_CONS_COLUMNS WHERE owner=:schema and table_name=:tablename and position is not null\";\n\t\t\t\t\t$pkConstraint=db::ea11($sql,array('tablename'=>$tablename,'schema'=>$schema),$db);\n\t\t\t\t\t$sql=\"select atc.column_name,atc.data_type,data_length,ucc.comments,atc.nullable,atc.data_default from all_tab_columns atc inner join ALL_COL_COMMENTS ucc on atc.table_name=ucc.table_name and atc.column_name=ucc.column_name where atc.table_name = :tablename and atc.OWNER=:schema order by COLUMN_ID\";\n\t\t\t\t\t$rs=db::ea($sql,array('tablename'=>$tablename,'schema'=>$schema),$db);\n\t\t\t\t\t$sql=\"select ai.INDEX_NAME,COLUMN_NAME from ALL_INDEXES ai left join ALL_IND_COLUMNS aic on AI.INDEX_NAME=AIC.INDEX_NAME WHERE owner=:schema and ai.table_name=:tablename and UNIQUENESS='UNIQUE'\";\n\t\t\t\t\t$uniqueKey=datawork::group(db::ea($sql,array('tablename'=>$tablename,'schema'=>$schema),$db),array('INDEX_NAME','[]'),'COLUMN_NAME');\n\t\t\t\t}else{\n\t\t\t\t\t$sql=\"select CONSTRAINT_NAME from USER_CONS_COLUMNS WHERE table_name=:tablename and position is not null\";\n\t\t\t\t\t$pkConstraint=db::ea11($sql,array('tablename'=>$tablename),$db);\n\t\t\t\t\t$sql=\"select atc.column_name,atc.data_type,data_length,ucc.comments,atc.nullable,atc.data_default from user_tab_columns atc inner join USER_COL_COMMENTS ucc on atc.table_name=ucc.table_name and atc.column_name=ucc.column_name where atc.table_name = :tablename order by COLUMN_ID\";\n\t\t\t\t\t$rs=db::ea($sql,array('tablename'=>$tablename),$db);\n\t\t\t\t\t$sql=\"select ai.INDEX_NAME,COLUMN_NAME from USER_INDEXES ai left join USER_IND_COLUMNS aic on AI.INDEX_NAME=AIC.INDEX_NAME WHERE ai.table_name=:tablename and UNIQUENESS='UNIQUE'\";\n\t\t\t\t\t$uniqueKey=datawork::group(db::ea($sql,array('tablename'=>$tablename),$db),array('INDEX_NAME','[]'),'COLUMN_NAME');\n\t\t\t\t}\n\t\t\t\tif ($pkConstraint){\n\t\t\t\t\t$primaryKey=$uniqueKey[$pkConstraint];\n\t\t\t\t\tunset($uniqueKey[$pkConstraint]);\n\t\t\t\t}\n\n\t\t\t\tforeach($rs as $item){\n\t\t\t\t\t$column=$item['COLUMN_NAME'];\n\t\t\t\t\t$data[$column]['type']=$item['DATA_TYPE'];\n\t\t\t\t\t$data[$column]['typerange']=$item['DATA_LENGTH'];\n\t\t\t\t\tif ($item['COMMENTS']) $data[$column]['comment']=$item['COMMENTS'];\n\t\t\t\t\tif ($item['NULLABLE'] == 'N') $data[$column]['notnull']=\\true;\n\t\t\t\t\tif (@$item['DATA_DEFAULT']) $data[$column]['default']=$item['DATA_DEFAULT'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\Exception('no database type found');\n\t\t}\n\t\t\n\t\t$rs=array('data'=>$data,'primary_key'=>$primaryKey,'unique_key'=>$uniqueKey,'foreign_key'=>$foreignKey,'key'=>$indexKey);\n\t\tif (core::$debug){\n\t\t\tdebug::dir(array('result'=>$rs));\n\t\t\tdebug::groupEnd();\n\t\t}\n\t\tif (isset($cache_file))filedata::savedata ($cache_file, $rs);\n\t\treturn self::$describeStorage[$db][$defaultScheme][$tablename]=$rs;\n\t}", "title": "" }, { "docid": "3b0ff14a39c5c6026fdfbf5f61707de9", "score": "0.634549", "text": "private function catalog_mysql_table($table)\n\t{\n\t\t// if this no mysql db we don't do anything\n\t\tif(!$this->typeIs(self::db_type_mysql)) return false;\n\t\t\n\t\t$query = 'DESCRIBE ';\n\t\t$query .= $this->escape_keywords($this->db_handle->real_escape_string($table));\n\t\t\n\t\tif($this->debug_level > 3)\n\t\t\techo \"SDBC: catalog query = $query<br/>\";\n\t\t\n\t\t$result = $this->db_handle->query($query);\n\t\tif(!$result)\n\t\t{\n\t\t\t$this->error_message = 'Could not catalog table '.$table.': '.$this->getSQLError();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$struct = new SapphoTableStructure($table);\n\t\twhile(($data = $result->fetch_row()))\n\t\t{\n\t\t\tif($this->debug_level > 3)\n\t\t\t{\n\t\t\t\techo \"SDBC: Analyzing attribute: \";\n\t\t\t\tprint_r($data);\n\t\t\t\techo \"<br/>\";\n\t\t\t}\n\t\t\t\n\t\t\t$pos = strpos($data[1], \"(\");\n\t\t\tif($pos !== false)\n\t\t\t{\n\t\t\t\t$type = substr($data[1], 0, $pos);\n\t\t\t\t$pos2 = strpos($data[1], \")\");\n\t\t\t\t$length = substr($data[1], $pos+1, $pos2-$pos-1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$type = $data[1];\n\t\t\t\t$length = -1;\n\t\t\t}\n\t\t\t\n\t\t\t$struct->addColumn($data[0], $type, $length);\n\t\t\tif($this->debug_level > 3)\n\t\t\t\techo $data[0].\" -> type = \".$struct->getType($data[0]).\n\t\t\t\t \"; length = \".$struct->getLength($data[0]).\"<br/>\";\n\t\t}\n\t\t\n\t\t$this->tablestruct[$table] = $struct;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "343b83073e452d960099ce08b83e1df9", "score": "0.63206655", "text": "public function descTable($table)\n\t{\n\t}", "title": "" }, { "docid": "6c76f01b071483c302d3df6f67417998", "score": "0.6259182", "text": "public function testTableList()\n {\n // instead, we assert the array length and the known table\n\n $res = $this->db()->tableList()->run($this->conn);\n\n $this->assertCount(7, $res);\n $this->assertContains('t1', (array)$res);\n }", "title": "" }, { "docid": "a3533009e8abd69512356092ebc568a2", "score": "0.62575233", "text": "public function getDescription($table = FALSE);", "title": "" }, { "docid": "82a075cace5291818f2e0f3bfbbc5bd8", "score": "0.62040186", "text": "private function describe(){\n\t\t$this->sql = \"Describe `$this->name`\";\n\t\t$r = $this->db->query($this->sql);\n\t\tif($this->db->errorCode() > 0){\n\t\t\techo $this->db->errorCode();\n\t\t}else{\n\t\t\twhile($row = $r->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\tif(!isset($this->columns[$row['Field']])){\n\t\t\t\t\t\n\t\t\t\t\t$column = new DbColumn($this, $row['Field'], false);\n\t\t\t\t\t$column->actual = true;\n\t\t\t\t\t$search = '/(\\w+)(\\((\\d+)\\))?/';\n\t\t\t\t\tpreg_match($search, $row['Type'], $result);\n\t\t\t\t\tif(isset($result[1])){\n\t\t\t\t\t\t$column->setType($result[1]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$column->setType('unknown');\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif(isset($result[3])){\n\t\t\t\t\t\t$column->setLength($result[3]);\n\t\t\t\t\t}\n\t\t\t\t\tswitch($row['Key']){\n\t\t\t\t\t\tcase 'PRI':\n\t\t\t\t\t\t\t$column->is_primary = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'UNI':\n\t\t\t\t\t\t\t$column->is_unique = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif($row['Null'] == 'NO'){\n\t\t\t\t\t\t$column->not_null = true;\n\t\t\t\t\t}\n\t\t\t\t\tif($row['Extra'] == 'auto_increment'){\n\t\t\t\t\t\t$column->auto_inc = true;\n\t\t\t\t\t}\n\t\t\t\t\tif($column->error_str){\n\t\t\t\t\t\t$this->addError($column->error_str);\n\t\t\t\t\t}\n\t\t\t\t\t$this->columns[$row['Field']] = $column;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a794f6070f11f10a76e4e2022f4fce7", "score": "0.6188435", "text": "function getTableInformations(Connection $_connection , String $databaseName, String $tableName){\n //OR\n // Command = 'SHOW FULL COLUMNS FROM [TABLE];'\n $var = [];\n $req = $this->getBdd($_connection)->prepare('DESCRIBE '.$databaseName.'.'.$tableName.';');\n $req->execute();\n $id = 0;\n while($data = $req->fetch(PDO::FETCH_ASSOC))\n {\n $var[] = new Row($data , $id);\n $id++;\n } \n\n return $var;\n $req->closeCursor();\n\n\n }", "title": "" }, { "docid": "94e7796eb458dca8b41cc5fe3e4611e5", "score": "0.61754376", "text": "protected function _describe() \n\t{\n\t\t// Load description of table and push column names to array\n\t\tif (!$this->_describe) \n\t\t{\n\t\t\t$this->_describe = array();\n\t\t\t$query = 'DESCRIBE ' . $this->_table;\n\t\t\t$this->_result = mysql_query($query, $this->_dbHandle);\n\t\t\twhile ($row = mysql_fetch_row($this->_result)) \n\t\t\t{\n\t\t\t\t array_push($this->_describe,$row[0]);\n\t\t\t}\n\n\t\t\tmysql_free_result($this->_result);\n\t\t}\n\t\t\n\t\t// Create table fields for model; set as null\n\t\tforeach ($this->_describe as $field) \n\t\t{\n\t\t\t$this->$field = null;\n\t\t}\n\t}", "title": "" }, { "docid": "dfee50e3a569fe28d7a5059b244cdc5e", "score": "0.61700296", "text": "public static function get_table_desc($table_name)\n\t{\n\t\t\n\t\treturn Easy_Database_Manage::_describe_table($table_name)->result();\n\t\t\n\t}", "title": "" }, { "docid": "396ee1e216d620aa9603fea9bd55ff39", "score": "0.61546177", "text": "public function getTableInfo() {\n $fields = array();\n if('sqlite' == $this->db->dbname) {\n $results = $this->db->query(\"PRAGMA TABLE_INFO(`{$this->tbname}`)\");\n if(is_array($results)) foreach($results as $result) { \n if(preg_match('/^int/i', $result->type)) $type = 'int'; \n else if('REAL' == strtoupper($result->type)) $type = 'float';\n else $type = 'string';\n $fields[] = array(\n 'field'=>$result->name,\n 'type'=>$type,\n 'notnull'=>$result->notnull ? true : false,\n 'default'=>$result->dflt_value,\n 'pk'=>$result->pk,\n 'autoincremnt'=>$result->pk,\n );\n if($result->pk) $this->tbpk = $result->name;\n }\n } else if('mysql' == $this->db->dbname) {\n $results = $this->db->query(\"DESC `{$this->tbname}`\");\n if(is_array($results)) foreach($results as $result) {\n if(preg_match('/int/i', $result->type)) $type = 'int'; \n else if(preg_match('/(float|double|decimal)/i', $result->type)) $type = 'float';\n else $type = 'string';\n $pk = ('PRI' == strtoupper($result->Key)) ? true : false;\n $fields[] = array(\n 'field'=>$result->Field,\n 'type'=>$type,\n 'notnull'=>'NO' == strtoupper($result->Null) ? true : false,\n 'default'=>$result->Default,\n 'pk'=>$pk,\n 'autoincremnt'=>('AUTO_INCREMENT' == strtoupper($result->Extra)) ? true : false,\n );\n if($pk) $this->tbpk = $result->Field;\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "166a0daa1ff7c462f7e8f95bb29a12d8", "score": "0.6150442", "text": "public function get_table_descrip($table) {\n if ( in_array( $table, $this->get_all_tables() ) ) {\n $tmp = $this->get_table($table);\n $comment = $tmp->get_comment();\n if (isset($comment['description'])) {\n return $comment['description'];\n }\n }\n return false;\n }", "title": "" }, { "docid": "66fcefe96bd00404b6b4bdc1a32ce999", "score": "0.61472857", "text": "public function describeTable($table)\r\n {\r\n $sql = \"SELECT a.attnum, a.attname AS field, t.typname AS type, \"\r\n . \"a.attnotnull AS isnotnull, \"\r\n . \"( SELECT 't' \"\r\n . \"FROM pg_index \"\r\n . \"WHERE c.oid = pg_index.indrelid \"\r\n . \"AND pg_index.indkey[0] = a.attnum \"\r\n . \"AND pg_index.indisprimary = 't') AS pri, \"\r\n . \"(SELECT pg_attrdef.adsrc \"\r\n . \"FROM pg_attrdef \"\r\n . \"WHERE c.oid = pg_attrdef.adrelid \"\r\n . \"AND pg_attrdef.adnum=a.attnum) AS default \"\r\n . \"FROM pg_attribute a, pg_class c, pg_type t \"\r\n . \"WHERE c.relname = '{$table}' \"\r\n . \"AND a.attnum > 0 \"\r\n . \"AND a.attrelid = c.oid \"\r\n . \"AND a.atttypid = t.oid \"\r\n . \"ORDER BY a.attnum \";\r\n\r\n $result = $this->fetchAll($sql);\r\n $descr = array();\r\n foreach ($result as $key => $val) {\r\n if ($val['type'] === 'varchar') {\r\n // need to add length to the type so we are compatible with\r\n // Zend_Db_Adapter_Pdo_Pgsql!\r\n $val['type'] .= '(' . $val['length'] . ')';\r\n }\r\n $descr[$val['field']] = array(\r\n 'name' => $val['field'],\r\n 'type' => $val['type'],\r\n 'notnull' => ($val['isnotnull'] == ''),\r\n 'default' => $val['default'],\r\n 'primary' => ($val['pri'] == 't'),\r\n );\r\n }\r\n return $descr;\r\n }", "title": "" }, { "docid": "3ce0fb86ce29b2b0380c9c7fbd45a383", "score": "0.61324704", "text": "public function tables();", "title": "" }, { "docid": "f8b5d087a273230755d5ad5ba7ae3b59", "score": "0.61212105", "text": "protected function _describeTable( $name ) {\n\t\tif ( $data = $this->structureCache->load( DESCRIBE_CACHE_PREFIX.$name ) ) {\n\t\t\t$tableStructure[ $name ] = $data;\n\t\t} else {\n\t\t\t$tableStructure[ $name ] = $this->fetchReal( 'DESCRIBE '.$name );\n\t\t\t$this->structureCache->save( DESCRIBE_CACHE_PREFIX.$name, $tableStructure[ $name ] );\n\t\t}\n\t}", "title": "" }, { "docid": "6c283ec5cca7c63703ac0c5b92fe4846", "score": "0.61202896", "text": "public function describe()\n {\n return sprintf(\n Translate::getModuleTranslation('coreupdater', 'Table `%1$s` should use character set %2$s instead of %3$s', 'coreupdater'),\n $this->table->getName(),\n $this->table->getCharset()->describe(),\n $this->currentTable->getCharset()->describe()\n );\n }", "title": "" }, { "docid": "d910abb93e78d3c55e0b8132089e943b", "score": "0.60595965", "text": "public function getTableMetaData();", "title": "" }, { "docid": "18f782b3474c0c9d14fa68066b6c6f4a", "score": "0.6055048", "text": "abstract public function tables();", "title": "" }, { "docid": "6c80d47431461a07fa8729daf6b75b96", "score": "0.60454416", "text": "private function getDescribeTable($table_name)\r\n {\r\n\t\t$sth = $this->connection->prepare('DESCRIBE ' . '`' . Settings::getParam('prefix') . $table_name . '`');\r\n\t\t$sth->execute();\r\n\t\t$model_columns_arr = $sth->fetchAll(\\PDO::FETCH_OBJ);\r\n\t\treturn $model_columns_arr;\r\n\t}", "title": "" }, { "docid": "5f4d39a8f007a77f3ae8642ed42705cb", "score": "0.6044159", "text": "function mysql_tablename($result, $i)\n {\n trigger_error(\"Not implemented\", E_USER_WARNING);\n return false;\n }", "title": "" }, { "docid": "610d99be367c8a339ac1b1f871b14740", "score": "0.6031252", "text": "public function describe($tableName) {\n\t\tif (!empty($tableName)) {\n\t\t\t$dataBit = microtime();\n\t\t\t$this->__startLoadTime($dataBit);\n\t\t\t\n\t\t\t$sql = \"DESCRIBE \". $this->backtick($tableName);\n\t\t\t\n\t\t\t$rows = array();\n\t\t\tif ($query = $this->execute($sql, $dataBit)) {\n\t\t\t\twhile ($row = $this->fetchAll($query)) {\n\t\t\t\t\t$rows[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $rows;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "a7355f5291ce4055d9b50123ba2416b3", "score": "0.59859294", "text": "function initTableDetailsHash() {\n $query = self::getMyDBQuery ( self::ACTION_SHOW_TABLES_DETAILS );\n // Assign the query for the table structure and execute it\n $resultSet = self::executeMyDBQuery( $query, $errorString );\n $headerArray = array(); # Used to hold the query header.\n $tableDetailsHash = array(); # Used to hold column data in each query row.\n $this->tableList = array();\n $this->tablesDetailsHash = array();\n\n if ( isset( $resultSet ) ) {\n // Parse $resultSet.\n // Note: $resultSet's only key is 'return'.\n foreach ($resultSet as $key => $val) {\n // Split the query results using \"\\n\".\n $queryResult = explode (\"\\n\", $val);\n\n // Count the number of rows returned.\n $numRows = count ($queryResult);\n $this->tableCount = $numRows;\n\n // Count the number of fields.\n $numColumns = substr_count ($queryResult[0], \":\");\n\n // Go through each detail of a MyDB table\n for ($row = 0; $row < $numRows; $row++) {\n $data = explode (\",\", $queryResult[$row]);\n\t\t $tableDetailsHash = array();\n for ($column = 0; $column < $numColumns; $column++) {\n # Assign values for the header row\n if ($row == 0) {\n // Display the header. Remove the \"[XXX]:String\" and just show \"XXX\".\n $data[$column] = preg_replace ('/^\\[/', '', $data[$column]);\n $data[$column] = preg_replace ('/\\]:\\S+$/', '', $data[$column]);\n $headerArray[$column] = trim($data[$column]); #assign each header\n }\n else {\n\t\t\t // Remove the leading and trailing double quotes\n $data[$column] = preg_replace ('/^\"/', '', $data[$column]);\n $data[$column] = preg_replace ('/\"$/', '', $data[$column]);\n #$data[$column] = PSIHTMLGoodiesClass::htmlEncode( PSIHTMLGoodiesClass::decode( $data[$i] ) );\n\t\t\t if ( $column == 0 )\n $this->tableList[] = trim($data[$column]); #assign table name\n else\n\t\t\t $tableDetailsHash[$headerArray[$column]] = trim($data[$column]); # assign table data\n }\n } // for columns\n if ( $row != 0 ) //don't add the headers\n\t\t $this->tablesDetailsHash[$this->tableList[sizeof($this->tableList)-1]] = $tableDetailsHash;\n } #for row\n } #foreach\n } #if\n else if ( isset( $errorString ) ) {\n\t $this->tableList[0] = 'ERROR'; //assign something to the hash.\n print <<<EOF\n <p><font style=\"color: red\">Unable execute MyDB Table Details Error: $errorString</font></p>\nEOF;\n error_log( \"Error: Query \".$query.\" failed. Stack: $errorString\" );\n }\n }", "title": "" }, { "docid": "f3ba5ee37c627371cb1da606b9c315fa", "score": "0.59767556", "text": "public function readSQL($tablename)\n\t{\n\t\t$keyData = $this->db->query('SHOW CREATE TABLE '.$tablename)->getResultArray();\n\n\t\t$tempFkArray = $this->_buildForeignKeys($keyData);\n\t\t$tempUkArray = $this->_buildUniqueKeys($keyData);\n\t\t$tempKeyArray = $this->_buildKeys($keyData);\n\t\t$tempPkArray = $this->_buildPrimaryKeys($keyData);\n\t\t\n\t\t$columns = $this->db->query('SHOW COLUMNS FROM '.$tablename)->getResultArray();\n\n if(count($columns) > 0)\n {\t\n \t$schemaContent = '';\n \tforeach($columns as $col)\n \t{\n\t\t \t\t\n \t\tif (isset($tempFkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_foreign_keys'][] = $tempFkArray[$col['Field']];\n \t\t\tunset($tempFkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempPkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_primary_keys'][] = $tempPkArray[$col['Field']];\n \t\t\tunset($tempPkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempUkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_unique_keys'][] = $tempUkArray[$col['Field']];\n \t\t\tunset($tempUkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempKeyArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_keys'][] = $tempKeyArray[$col['Field']];\n \t\t\tunset($tempKeyArray[$col['Field']]);\n\n \t\t}\n \t\t$schemaContent.= $this->_buildRow($col); // Output 'password' = array('rules' => 'required|_string(20)|minLen(6)');\n \t}\n\n \treturn $schemaContent;\n }\n\n return false;\n\t}", "title": "" }, { "docid": "35a626a4bc28d667970077a4aa211964", "score": "0.5949", "text": "protected function generateDescribe() {\n\n if(isset($this->tables[0][0])) {\n\n $query = 'DESCRIBE `' . $this->database . '`.`' . $this->tables[0][0] . '` ';\n\n return $query;\n\n } else {\n return null;\n }\n\n }", "title": "" }, { "docid": "b359eb0b7d55b7e83612d1aab0e8eed2", "score": "0.59453225", "text": "public function getDescription() {\n\t\treturn 'select data from a mysql server';\n\t}", "title": "" }, { "docid": "c963e79206b8d6ed947620ec48f24393", "score": "0.5935578", "text": "protected function buildTableInfo()\n {\n $DB = $this->getDB();\n $query = \"DESCRIBE {$this->quoteTable($this->tablename)}\";\n\n if (!($results = $DB->query($query))) {\n return false;\n }\n\n $class = get_class($this);\n\n foreach ($results as $result) {\n self::$columninfos[$class][$result['Field']] = $result['Type'];\n\n if ($result['Key'] == 'PRI') {\n self::$primarykeys[get_class($this)][] = $result['Field'];\n }\n\n self::$nullable_columns[$class][$result['Field']] = $result['Null'] == 'NO' ? false : true;\n\n }\n\n return true;\n }", "title": "" }, { "docid": "c70347beaa8da8b84d2c6a8084a1e8d3", "score": "0.59195423", "text": "abstract public function getTableNames();", "title": "" }, { "docid": "757450a0d836b4d6669c7c5628e7ce0a", "score": "0.59110254", "text": "function describe() {\n\t\tif (!$this->tblExists())\n\t\t\treturn null;\n\t\t\n\t\t$table = $this->_tablename;\n // LIMIT 1 means to only read rows before row 1 (0-indexed)\n $result = mysql_query(\"SELECT * FROM $table LIMIT 1\");\n $describe = mysql_query(\"SHOW COLUMNS FROM $table\");\n $num = mysql_num_fields($result);\n $fields = array();\n for ($i = 0; $i < $num; ++$i) {\n $field = mysql_fetch_field($result, $i);\n // Analyze 'extra' field\n $field->auto_increment = (strpos(mysql_result($describe, $i, 'Extra'), 'auto_increment') === FALSE ? 0 : 1);\n // Create the column_definition\n $field->definition = mysql_result($describe, $i, 'Type');\n if ($field->not_null && !$field->primary_key) $field->definition .= ' NOT NULL';\n if ($field->def) $field->definition .= \" DEFAULT '\" . mysql_real_escape_string($field->def) . \"'\";\n if ($field->auto_increment) $field->definition .= ' AUTO_INCREMENT';\n if ($key = mysql_result($describe, $i, 'Key')) {\n if ($field->primary_key) $field->definition .= ' PRIMARY KEY';\n else $field->definition .= ' UNIQUE KEY';\n }\n // Create the field length\n $field->len = mysql_field_len($result, $i);\n // Store the field into the output\n $fields[$field->name] = $field;\n\n\t\t\t//set the key field\n\t\t\tif ($field->primary_key)\n\t\t\t\t$this->_keyfield = $field->name;\n }\n\t\tmysql_free_result($result);\n return $fields;\n\t}", "title": "" }, { "docid": "e72208e10a9e7769f45a4c7873aeec74", "score": "0.58985245", "text": "public function sql_infos(){\n $this->sql = sql::row(\"information_schema.tables\", $this->table_where());\n //load comment\n $where = sql::where( array(\n \"c.relkind\" => \"r\",\n \"c.relname\" => $this->table_name['name'],\n \"n.nspname\" => $this->table_name['schema'],\n ));\n $query = \"SELECT\n n.nspname AS schema_name,\n c.relname AS table_name,\n pg_get_viewdef(c.oid) AS compiled_definition,\n d.description AS full_description\n FROM\n pg_class AS c\n LEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace\n LEFT JOIN pg_description AS d ON c.oid = d.objoid\n $where;\n \";\n $this->comment_raw = sql::qvalue($query, 'full_description');\n $this->comment_xml = @simplexml_load_string(XML_VERSION.\"<comment>{$this->comment_raw}</comment>\");\n\n if(empty($this->sql))\n return;\n\n if($this->abstract)\n $this->abstract->sql_infos();\n\n }", "title": "" }, { "docid": "c7b8355aad19e8f5494666d15332b53e", "score": "0.5895276", "text": "public function hasTable();", "title": "" }, { "docid": "03f9a01d0dc11a784a7755e300afdf08", "score": "0.58803886", "text": "public function testGetAllTables()\n {\n $expected = [\n 'phinxlog',\n 'test_plugin_phinxlog',\n 'articles',\n 'articles_authors',\n 'addresses',\n 'cities',\n 'countries',\n 'authors',\n 'customers',\n 'bills'\n ];\n $found = $this->TableSniffer->getAllTables();\n sort($expected);\n sort($found);\n $this->assertSame($expected, $found);\n }", "title": "" }, { "docid": "59b12663cb24bcb9a013a5f73fabaf83", "score": "0.5865607", "text": "public static function describeTable($table)\n {\n if(!is_string($table)){\n trigger_error('describeTable expected Argument 1 to be String', E_USER_WARNING);\n }\n try{\n $singleton = self::getQueryHandler();\n \n $sql = 'DESCRIBE ' . $table . ';';\n $PDOS = $singleton->pdo->prepare($sql);\n \n $PDOS->execute();\n $temp = $PDOS->fetchAll();\n $answer = array();\n end($temp);\n for($i = key($temp);$i>-1;$i--){\n $row = new \\Segment\\Controller\\production\\TOL\\TolDbDescripFetch($table);\n foreach($temp[$i] as $key => $value){\n $row->addend($key, [$value]);\n }\n $answer[] = $row;\n }\n \n return $answer;\n } catch(\\PDOException $e) {\n error_log('Error executing describeTable: ' . print_r($e, true));\n echo \"Database Connection Failed\\n\";\n exit();\n }\n }", "title": "" }, { "docid": "ec8a38b704fb9edc9cacbfad7c073159", "score": "0.58603776", "text": "abstract public function getMySQLTableName();", "title": "" }, { "docid": "30c1d1872bc69847e0ba18bdbe07a360", "score": "0.5857849", "text": "public function table()\n\t{\n\t\treturn '(=tableName)';\n\t}", "title": "" }, { "docid": "0afa111652678d41df73f19cb730587a", "score": "0.5855893", "text": "function compare_result_column_desc($a, $b) {\n\treturn $a[\"result\"] < $b[\"result\"];\n}", "title": "" }, { "docid": "9c1653e15ff85ec37e6b24a154080591", "score": "0.5847454", "text": "public function testTableName()\n {\n $command = \\Yii::app()->db->createCommand();\n $command->select = $this->getModelObject()->primaryKey();\n $command->from = $this->getModelObject()->tableName();\n\n try {\n $command->queryRow();\n }\n catch (CDbException $e) {\n throw $e;\n $this->fail('Ocorreu um erro ao tentar selecionar da tabela');\n }\n }", "title": "" }, { "docid": "94a89eea5b118d7beccda9dbfc9d892b", "score": "0.5845612", "text": "public function tables() {}", "title": "" }, { "docid": "af68174b94a20f2378f92d51063011e7", "score": "0.58362734", "text": "abstract public function getDescribedTable(string $table): TableDetails;", "title": "" }, { "docid": "1d4e3cd589b6f0af8a351a704698ee40", "score": "0.58325547", "text": "public static function ADMIN_POST_GET_POST_TABLE(){\n\t $SQL_String = \"DESCRIBE system_post;\";\n\t return $SQL_String;\n\t}", "title": "" }, { "docid": "ab9d26a515d6ef4bdb7688a4e9258aa1", "score": "0.5827415", "text": "public function getQuoteTableDescription()\n {\n $resource = Mage::getSingleton('core/resource');\n $readConnection = $resource->getConnection('core_read');\n $table = $resource->getTableName('sales/quote');\n return $readConnection->describeTable($table);\n }", "title": "" }, { "docid": "e8a74203e663ce1bf3bed79d11046cda", "score": "0.58228403", "text": "function readRelevantTablesMetaInformation($db_name)\n {\n $tables = ConfigHelper::read('db.mysql_tables');\n $finalArray = Array();\n\n foreach ($tables as $table) {\n $query = 'SHOW COLUMNS FROM `' . $table . '` FROM `' . $db_name . '`';\n if ($result = $this->core->dbh->query($query)) {\n $rows = Array();\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n $finalArray[$table] = $rows;\n }\n }\n if (!empty($finalArray)) {\n return $finalArray;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "aca0ecaec19a06e802a9fc74ae815743", "score": "0.5820285", "text": "public function get_table();", "title": "" }, { "docid": "c2a2273f29cfa5396931c4036d49f6f8", "score": "0.5816229", "text": "public function verifyTable() {\n if(!isset(self::$_columns[$this->tableName]))\n self::$_columns[$this->tableName] = self::$db->fetchAttributes($this->tableName);\n $columns = self::$_columns[$this->tableName];\n if(is_null($columns)) return false;\n foreach ($this->module->_fields as $name => $field) {\n $found = false;\n $change = false;\n $k = current($columns);\n $langs = in_array('language', $field);\n $this[$name]=(isset($field['default']) && strtolower($field['default'])!='null')?$field['default']:null;\n //storing special attributes for any cases\n if(in_array('unused',$field)) continue;\n //TODO: if $langs && !in_array($lang,$this->_columns)\n $dataType = array();\n $dataType = $this->parseDataType($field);\n $dataType['Field'] = $name;\n $this->_dataTypes[$name] = $dataType;\n if($dataType['Key']=='PRI') $this->_PK = $name;\n $modifyField = '';\n do {\n $k['Field'] = trim($k['Field'],'`');\n if ($k['Field'] == $name) {\n $diff = array_diff_assoc($dataType, $k);\n if(!empty($diff))\n $change = true;\n $found = true;\n $modifyField = $k['Field'];\n if(isset($diff['Key']) && $diff['Key']!=''){\n if($k['Key']=='MUL' || $k['Key']=='UNI'){\n $Query = new X3_Query($this->tableName,$this->module);\n $Query->action = 'ALTER/TABLE/DROP';\n $Query->select = \"INDEX `{$name}`\";\n $Query->execute();\n }\n $what = (($diff['Key']=='MUL')?'INDEX':(($diff['Key']=='UNI')?'UNIQUE':false));\n if($what!==false){\n if(sizeof($diff)==1){\n $found=true;\n $change=false;\n }\n $Query = new X3_Query($this->tableName,$this->module);\n $Query->action = 'ALTER/TABLE/ADD';\n $Query->select = \"$what (`{$name}`)\";\n $this->_alter_stack[$name.'_INDEX'] = $Query;\n }\n }\n unset($columns[key($columns)]);\n }\n if (strcasecmp($k['Field'], $name) === 0 && !$found) $change = true;\n }while(($k = next($columns)) && !$found && !$change);\n reset($columns);\n\n //check if field is multilanguage\n if (!$found || $change) {\n $Query = new X3_Query($this->tableName,$this->module);\n $Query->action = 'ALTER/TABLE';\n $Query->tables = $this->tableName;\n $this->_alter_stack[$name] = $Query;\n $dataType = $this->compile($dataType);\n //If the field has same name but different case we do this\n if ($change) {\n //TODO: ALTER TABLE `tableName` CHANGE `$k[Field]` `$name` `$dataType`;\n $this->_alter_stack[$name]->action.= \"/CHANGE\";\n $this->_alter_stack[$name]->select = \"`{$modifyField}` `$name`\";\n $this->_alter_stack[$name]->dataType = $dataType;\n //if($langs)\n } else { // !$found\n //TODO: ALTER TABLE `tableName` ADD `$name` `$dataType`;\n $this->_alter_stack[$name]->action .= \"/ADD\";\n $this->_alter_stack[$name]->select = \"`$name`\";\n $this->_alter_stack[$name]->dataType = $dataType;\n }\n }\n }\n foreach($columns as $column){\n $name = $column['Field'];\n $this->_alter_stack[$name] = new X3_MySQL_Command(array('action' => 'ALTER/TABLE', 'tables' => $this->tableName));\n $this->_alter_stack[$name]->action.= \"/DROP\";\n $this->_alter_stack[$name]->select = \"`{$name}`\";\n }\n }", "title": "" }, { "docid": "04a618fa356bc2c4af830b7e6e861b5a", "score": "0.5814667", "text": "public function tableExists(){\n\t\ttry{\n\t\t $result = $this->getDefaultAdapter()->fetchRow('SELECT * FROM '.$this->_name);\n\t\t $result = 1;\n\t\t} catch(Exception $e) {\n\t\t\t$sql =\"CREATE TABLE settings(\n\t\t\t\t\tid INT NOT NULL AUTO_INCREMENT, \n\t\t\t\t\tPRIMARY KEY(id),\n \t\t\t\t\tdbversion INT(20) DEFAULT 0\n \t\t\t\t\t)\";\n \t\t\t$this->getDefaultAdapter()->query($sql);\n \t\t\t$newdata['dbversion'] = 0;\n \t\t\t$this->insert($newdata);\n \t\t\t$result = 1;\n\t\t}\n\t\t return $result;\n\t}", "title": "" }, { "docid": "9ab6fbbafe4d3536403f2ac1d805fd73", "score": "0.5814452", "text": "abstract public function getTable();", "title": "" }, { "docid": "f7c487c597430e849bbaabcedfeb77e7", "score": "0.5806468", "text": "public function table_list()\n\t{\n\t\treturn 'SHOW TABLES';\n\t}", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.57790273", "text": "public function getTable();", "title": "" }, { "docid": "0c4670055a1f5f7d3065b55f60621e6c", "score": "0.5767807", "text": "private function isTableStructureTheSame(string $tableName) : bool\n {\n $master_table = new TableConnection($this->m_master, $tableName);\n $slave_table = new TableConnection($this->m_slave, $tableName);\n \n $masterCreationString = $master_table->fetchCreateTableString();\n $slaveCreationString = $slave_table->fetchCreateTableString();\n \n # Remove the auto_increment bit which does not affect table structure.\n $pattern = \"%(AUTO_INCREMENT=[0-9]+ )%\";\n $filteredMasterCReationString = preg_replace($pattern, \"\", $masterCreationString);\n $filteredSlaveCreationString = preg_replace($pattern, \"\", $slaveCreationString);\n \n return ($filteredMasterCReationString === $filteredSlaveCreationString);\n }", "title": "" }, { "docid": "73b2ac83e07617f6d3a36bf464fadd48", "score": "0.57624674", "text": "function __checkTable() {\n\t\t$model = ClassRegistry::init(array(\n\t\t\t'class'=>Inflector::classify($this->_schemaTable),\n\t\t\t'type'=>'Model'\n\t\t));\n\t\t$describe = $this->db->describe($model);\n\t\tif (array_keys($describe) == array_keys($this->_schemaStructure)) { // Chaves iguais\n\t\t\t$ok = true;\n\t\t\tforeach ($this->_schemaStructure as $key => $structure) {\n\t\t\t\tif ($structure['type'] != $describe[$key]['type']) {\n\t\t\t\t\t$ok = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($ok) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$fakeSchema = new CakeSchema();\n\t\t$fakeSchema->tables = array($this->_schemaTable => '');\n\t\t$this->db->execute($this->db->dropSchema($fakeSchema, $this->_schemaTable));\n\t\t$this->__createTable();\n\t}", "title": "" }, { "docid": "b345dddb9ed3781a8d694290553dbe9c", "score": "0.57567495", "text": "function getTableStructure($table){\n\t\t\n\t}", "title": "" }, { "docid": "bc6cdb4c227ed2bdfc3385b7787e9b76", "score": "0.57520294", "text": "public function getTableNames();", "title": "" }, { "docid": "3295771330445fb5d51fab5961afcf57", "score": "0.5746829", "text": "public abstract function getTableNames();", "title": "" }, { "docid": "e38451365d803cd1904c9d35f2b81009", "score": "0.57425225", "text": "public function compareFieldInTables($name, $table1, $table2)\n\t{\n\t\t$row1 = $this->describeField($name, $table1);\n\t\t$row2 = $this->describeField($name, $table2);\n\t\t$returnArray = array(\n\t\t\t'table1' => $row1,\n\t\t\t'table2' => $row2,\n\t\t\t'msg' => 'error',\n\t\t\t);\n\n\t\t$ignore_filter = array('Key'=>1);\n\t\tif ($row1) {\n\t\t\tif (!$row2) {\n\t\t\t\t// Exists on table1 but not table2\n\t\t\t\t$returnArray['msg'] = 'not_exists_table2';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (sizeof($row1) != sizeof($row2)) {\n\t\t\t\t\t$returnArray['msg'] = 'no_match';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$returnArray['msg'] = 'match';\n\t\t\t\t\tforeach($row1 as $key => $value){\n\t\t\t\t\t\t//ignore keys when checking we will check them when we do the index check\n\t\t\t\t\t\tif( !isset($ignore_filter[$key]) && (!isset($row2[$key]) || $row1[$key] !== $row2[$key])){\n\t\t\t\t\t\t\t$returnArray['msg'] = 'no_match';\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\telse {\n\t\t\t$returnArray['msg'] = 'not_exists_table1';\n\t\t}\n\n\t\treturn $returnArray;\n\t}", "title": "" }, { "docid": "37ff577d6a71afe8d95d4cfbf5d93f3c", "score": "0.57329524", "text": "function show_create_table($table)\n {\n $sql= \"SHOW CREATE TABLE \".$table;\n $res = $this->query($sql);\n $structure = $this->fetch_array($res);\n return $structure['Create Table'];\n }", "title": "" }, { "docid": "78f9de6d80b9a55f16123d1f89996e34", "score": "0.5732713", "text": "public function testTableWithAlias()\n {\n $this->assertEquals(\n 'SELECT * FROM test as t;', \n $this->queryBuilder->table('test as t')->print()\n );\n }", "title": "" }, { "docid": "c0e4ad89a24ce426df3870d7370db1d3", "score": "0.57269686", "text": "function structure_table($db,$table){\r\n $connexion_serveur_bdd = mysql_connect('localhost', 'root', 'root') OR die('Erreur lors de la connexion au serveur');//connection au serveur BDD\r\n $connexion_bdd = mysql_select_db($db,$connexion_serveur_bdd);\r\n $req = mysql_query(\"SELECT * FROM \".$table.\"\");\r\n\t//$nb = mysql_num_rows( $req );mysql_num_fields\r\n\t$nb = mysql_num_fields( $req );\r\n\tfor ($i = 0; $i < $nb ; $i++)\r\n echo mysql_field_name($req, $i).\", \";// echo \" \".mysql_field_name($req, $i++).\".\";\r\n\techo \"<br /\";\r\n\t$columns_names = mysql_field_name($req, $i);\r\n\techo $columns_names;\r\n //while ( $array = mysql_field_name($req,$i)){\r\n //echo $array;\r\n //}\r\n}", "title": "" }, { "docid": "4026e92b303dd7d3251389aa2520c55e", "score": "0.572508", "text": "public function hasTable($strTable);", "title": "" }, { "docid": "210716413f1c901c0e7555a04489a83c", "score": "0.5724068", "text": "function fetch_table_status()\n\t{\n\n\t\t$this->set_error();\n\t\t$this->table_status_data = array();\n\n\t\t$this->db->hide_errors();\n\t\t$tableinfo = $this->db->query_first(\"\n\t\t\tSHOW TABLE STATUS LIKE '\" . TABLE_PREFIX . $this->db->escape_string($this->table_name) . \"'\", DBARRAY_NUM\n\t\t);\n\t\t$this->db->show_errors();\n\n\t\tif (!$tableinfo)\n\t\t{\n\t\t\t$this->set_error(ERRDB_MYSQL, $this->db->error());\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->table_status_data = $tableinfo;\n\t\t\treturn true;\n\t\t}\n\n\t}", "title": "" }, { "docid": "38aeadc510299ca29f447a7c5933662c", "score": "0.5723832", "text": "public function describeTable($tableName, $schemaName = null) {\n $sql = \"SELECT\n a.attnum,\n n.nspname,\n c.relname,\n a.attname AS colname,\n t.typname AS type,\n a.atttypmod,\n FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,\n d.adsrc AS default_value,\n a.attnotnull AS notnull,\n a.attlen AS length,\n co.contype,\n ARRAY_TO_STRING(co.conkey, ',') AS conkey\n FROM pg_attribute AS a\n JOIN pg_class AS c ON a.attrelid = c.oid\n JOIN pg_namespace AS n ON c.relnamespace = n.oid\n JOIN pg_type AS t ON a.atttypid = t.oid\n LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid\n AND a.attnum = ANY(co.conkey) AND co.contype = 'p')\n LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum\n WHERE a.attnum > 0 AND c.relname = \".$this->quote($tableName);\n if ($schemaName) {\n $sql .= \" AND n.nspname = \".$this->quote($schemaName);\n }\n $sql .= ' ORDER BY a.attnum';\n\n $stmt = $this->query($sql);\n\n // Use FETCH_NUM so we are not dependent on the CASE attribute of the PDO connection\n $result = $stmt->fetchAll(Zend_Db::FETCH_NUM);\n\n $attnum = 0;\n $nspname = 1;\n $relname = 2;\n $colname = 3;\n $type = 4;\n $atttypemod = 5;\n $complete_type = 6;\n $default_value = 7;\n $notnull = 8;\n $length = 9;\n $contype = 10;\n $conkey = 11;\n\n $desc = array();\n foreach ($result as $key => $row) {\n $defaultValue = $row[$default_value];\n if ($row[$type] == 'varchar' || $row[$type] == 'bpchar' ) {\n if (preg_match('/character(?: varying)?(?:\\((\\d+)\\))?/', $row[$complete_type], $matches)) {\n if (isset($matches[1])) {\n $row[$length] = $matches[1];\n } else {\n $row[$length] = null; // unlimited\n }\n }\n if (preg_match(\"/^'(.*?)'::(?:character varying|bpchar)$/\", $defaultValue, $matches)) {\n $defaultValue = $matches[1];\n }\n }\n list($primary, $primaryPosition, $identity) = array(false, null, false);\n if ($row[$contype] == 'p') {\n $primary = true;\n $primaryPosition = array_search($row[$attnum], explode(',', $row[$conkey])) + 1;\n $identity = (bool) (preg_match('/^nextval/', $row[$default_value]));\n }\n $desc[$this->foldCase($row[$colname])] = array(\n 'SCHEMA_NAME' => $this->foldCase($row[$nspname]),\n 'TABLE_NAME' => $this->foldCase($row[$relname]),\n 'COLUMN_NAME' => $this->foldCase($row[$colname]),\n 'COLUMN_POSITION' => $row[$attnum],\n 'DATA_TYPE' => $row[$type],\n 'DEFAULT' => $defaultValue,\n 'NULLABLE' => (bool) ($row[$notnull] != 't'),\n 'LENGTH' => $row[$length],\n 'SCALE' => null, // @todo\n 'PRECISION' => null, // @todo\n 'UNSIGNED' => null, // @todo\n 'PRIMARY' => $primary,\n 'PRIMARY_POSITION' => $primaryPosition,\n 'IDENTITY' => $identity\n );\n }\n return $desc; \n }", "title": "" }, { "docid": "5f6525cda7b4c159c22b527bde389598", "score": "0.5722752", "text": "protected abstract function getTable();", "title": "" }, { "docid": "d77fa45231fb688e9dc1ddc0f132385e", "score": "0.5716279", "text": "protected function getTable()\n {\n //please see query for more details\n //return 'kort.errors e';\n }", "title": "" }, { "docid": "636be500ffdb304f10326a343e763d94", "score": "0.57089657", "text": "private function verify ()\n {\n // test if Database exists\n try {\n $db = $this->getDefaultAdapter();\n } catch (Exception $e) {\n throw new Zend_Exception($e->getMessage());\n }\n \n // test if table exists\n try {\n $result = $db->describeTable($this->_name);\n \n if (empty($result)) {\n $this->createTable();\n $this->insertRows();\n }\n } catch (Exception $e) {\n $this->createTable();\n $this->insertRows();\n }\n }", "title": "" }, { "docid": "f434b75ce28ad567941883a2ddc89577", "score": "0.56935686", "text": "public static function description()\n {\n return \"be identical to expected (===).\";\n }", "title": "" }, { "docid": "a4b3b0a20b9c5f8bbc5c5268aad5a049", "score": "0.56851226", "text": "function cmd_CREATE_TABLE() {\n // table_option:\n // [ENGINE=<IDENT>]\n // | [ROW_FORMAT={DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}]\n // | [[DEFAULT] {CHARACTER SET|CHARSET}=ident]\n // | [[DEFAULT] COLLATE=ident]\n // | [AUTO_INCREMENT=number]\n // | [COMMENT=string]\n $table = $this->get_ident();\n if ( isset($this->schema->views[$table]) ) {\n throw $this->error(\"Can't create TABLE $table when a view of that name already exists\");\n }\n $this->get_symbol('(');\n\n $this->ctx = $this->schema->add_table( new Modyllic_Schema_Table($table) );\n $this->ctx->charset = $this->schema->charset;\n $this->ctx->collate = $this->schema->collate;\n $this->ctx->docs = $this->cmddocs;\n\n $last_was = $this->ctx;\n // Load tablespec\n while (! $this->next() instanceOf Modyllic_Token_EOC ) {\n\n # Comments\n while ( $this->cur() instanceOf Modyllic_Token_Comment ) {\n $last_was->docs = trim( $last_was->docs . \" \" . $this->cur()->value() );\n $this->next();\n }\n\n # A key or column spec, followed by...\n if ( $this->is_reserved(array( \"CONSTRAINT\", \"FOREIGN KEY\", \"PRIMARY KEY\", \"UNIQUE\", \"FULLTEXT\", \"SPATIAL\", \"KEY\" )) ) {\n $last_was = $this->load_key();\n }\n else {\n $last_was = $this->load_column();\n }\n\n # Comments\n while ( $this->cur() instanceOf Modyllic_Token_Comment ) {\n $last_was->docs = trim( $last_was->docs . \" \" . $this->cur()->value() );\n $this->next();\n }\n\n # end of keys and columns\n if ( $this->cur()->value() == ')' ) {\n $this->assert_symbol();\n break;\n }\n # or a comma\n else if ( $this->cur()->value() == ',' ) {\n $this->assert_symbol();\n # and some number of additional comments\n while ( $this->peek_next() instanceOf Modyllic_Token_Comment ) {\n $last_was->docs = trim( $last_was->docs . \" \" . $this->next()->value() );\n }\n }\n else {\n throw $this->error(\"Unknown token between columns \".$this->cur()->debug().\", expected ',' or ')'.\");\n }\n }\n\n // Load table flags\n while ( ! $this->peek_next() instanceOf Modyllic_Token_EOC ) {\n $this->next();\n if ($this->cur()->token() == ',') { // Multiple table options are concatenated by comma\n $this->assert_symbol();\n continue;\n }\n if ( $this->maybe_table_option() ) { }\n else {\n throw $this->error(\"Unknown table flag \".$this->cur()->debug().\", expected ENGINE, ROW_FORMAT, CHARSET or COLLATE\");\n }\n }\n foreach ($this->ctx->columns as &$col) {\n if ( $col->type instanceOf Modyllic_Type_String ) {\n $col->type->set_default_charset( $this->ctx->charset );\n $col->type->set_default_collate( $this->ctx->collate );\n }\n }\n foreach ($this->ctx->indexes as &$index) {\n if ($index instanceOf Modyllic_Schema_Index_Foreign ) {\n $this->add_foreign_key_index( '', $index );\n }\n }\n $this->ctx = null;\n }", "title": "" }, { "docid": "e743383f3caace87a089a7f9fca96247", "score": "0.5681425", "text": "function createTable() {\n global $xoopsDB;\n $query = $this->getStructure();\n $query = \"CREATE TABLE `\" . $this->name() . \"` (\" . $query . \") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'\";\n //xoops_debug($query);\n $ret = $xoopsDB->query($query);\n if (!$ret) {\n echo \"&nbsp;&nbsp;\" . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . \" (\" . $xoopsDB->error(). \")<br />\";\n\n } else {\n echo \"&nbsp;&nbsp;\" . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . \"<br />\";\n }\n return $ret;\n }", "title": "" }, { "docid": "6afc2e85d0d7b5b7061533e58d00a8ef", "score": "0.56671095", "text": "public function gettable();", "title": "" }, { "docid": "7a260ccb3e7ee28ceca2136ac2cfed25", "score": "0.5646423", "text": "public function getOrderTableDescription()\n {\n $resource = Mage::getSingleton('core/resource');\n $readConnection = $resource->getConnection('core_read');\n $salesTable = $resource->getTableName('sales/order');\n\n return $readConnection->describeTable($salesTable);\n }", "title": "" }, { "docid": "964a24dd1543ced6d4d231da9f631bb5", "score": "0.56386065", "text": "function DisplayMySQLInfo()\n{\n global $DB;\n\n StartTable('MySQL Information', array('table', 'table-bordered','table-striped'));\n \n echo '<thead>\n \t\t\t<tr>\n\t\t\t\t<th>Setting</th>\n\t\t\t\t<th>Value</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>';\n $mysqlver = $DB->query_first(\"SELECT VERSION();\");\n echo '\n <tr>\n <td>MySQL Version:</td>\n\t <td>'.$mysqlver[0].'</td>\n </tr>\n ';\n\n if(function_exists('mysql_stat'))\n {\n echo '\n <tr>\n <td>Statistics:</td>\n </tr>\n ';\n $mysql_status = explode(' ', mysql_stat($DB->conn));\n foreach($mysql_status as $value)\n {\n echo '\n <tr>\n\t \t<td>&nbsp;</td>\n <td class=\"tdrow1\">'.$value.'</td>\n </tr>\n ';\n }\n }\n\n if($mysql_info = $DB->query('SHOW VARIABLES'))\n {\n echo '\n\t<thead>\n <tr>\n <th colspan=\"2\"><span class=\"bigger-120\">MySQL Variables</span></th>\n </tr>\n\t</thead>\n ';\n while ($row = $DB->fetch_array($mysql_info))\n {\n echo '\n <tr>\n <td class=\"tdrow2\">' . $row['Variable_name'] . '</td>\n <td class=\"tdrow3\">' . $row['Value'] . '</td>\n </tr>\n ';\n }\n $DB->free_result($mysql_info);\n }\n echo '</tbody></table></div>';\n\n}", "title": "" }, { "docid": "1495096382189c1fc0d839664aa316e6", "score": "0.5627454", "text": "function get_table_content($db, $table)\n {\n global $crlf, $db;\n $result = $db->sql_query(\"SELECT * FROM $table\") or mysql_die();\n $fieldcount = @mysql_num_fields($result);\n $fields = \"\";\n if(isset($GLOBALS[\"showcolumns\"])) {\n $fields = \"(\";\n for($j=0; $j<$fieldcount;$j++) {\n if ($j>0) $fields .= \", \";\n $fields .= @mysql_field_name($result,$j);\n }\n $fields .= \") \";\n }\n while($row = $db->sql_fetchrow($result)) {\n $str = \"INSERT INTO $table $fields\";\n $str .= \"VALUES (\";\n for($j=0; $j<$fieldcount;$j++) {\n if ($j>0) $str .= \", \";\n if(!isset($row[$j])) { $str .= \"NULL\"; }\n elseif($row[$j] != \"\") { $str .= \"'\".addcslashes(addslashes($row[$j]), \"\\n\\r\").\"'\"; }\n else { $str .= \"''\"; }\n }\n $str .= \");$crlf\";\n echo $str;\n// echo utf8_encode($str);\n }\n $db->sql_freeresult($result);\n return true;\n }", "title": "" }, { "docid": "61c11179979fdaad232b50a871ad0c1e", "score": "0.5614513", "text": "function compare_table_structures($development_tables, $live_tables)\n {\n $tables_need_updating = array();\n\n $live_table_structures = $development_table_structures = array();\n\n /*\n * generate the sql for each table in the development database\n */\n foreach ($development_tables as $table)\n {\n $table_structure = $this->DBdev->getCreateTableCommand($table);\n $development_table_structures[$table] = $table_structure[0][\"Create Table\"];\n }\n\n /*\n * generate the sql for each table in the live database\n */\n foreach ($live_tables as $table)\n {\n $table_structure = $this->DBprod->getCreateTableCommand($table);\n $live_table_structures[$table] = $table_structure[0][\"Create Table\"];\n }\n\n /*\n * compare the development sql to the live sql\n */\n foreach ($development_tables as $table)\n {\n $development_table = $development_table_structures[$table];\n $live_table = (isset($live_table_structures[$table])) ? $live_table_structures[$table] : '';\n\n if ($this->count_differences($development_table, $live_table) > 0)\n {\n $tables_need_updating[] = $table;\n }\n }\n\n return $tables_need_updating;\n }", "title": "" }, { "docid": "a274b1dd667823883559628d0914a31f", "score": "0.56140125", "text": "function cek_table($nama_db, $nama_table)\n\t{\n\t\treturn $query= $this->db->query(\"\n\t\t\tSELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE TABLE_SCHEMA = '$nama_db'\n\t\t\tAND TABLE_NAME = '$nama_table'\n\t\t\t\"\n\t\t);\n\n\t}", "title": "" }, { "docid": "daec3ce930da34d6af64543e12590600", "score": "0.5614005", "text": "function get_table_def($db, $table, $crlf)\n {\n $schema_create = \"\";\n global $drop;\n if ($drop == 1) {\n $schema_create .= \"DROP TABLE IF EXISTS $table;$crlf\";\n }\n $schema_create .= \"CREATE TABLE $table ($crlf\";\n \n $result = @mysql_db_query($db, \"SHOW FIELDS FROM $table\") or mysql_die();\n while($row = @mysql_fetch_array($result)) {\n $schema_create .= \" `$row[Field]` $row[Type]\"; \n if(isset($row[\"Default\"]) && (!empty($row[\"Default\"]) || $row[\"Default\"] == \"0\"))\n $schema_create .= \" DEFAULT '$row[Default]'\";\n if($row[\"Null\"] != \"YES\")\n $schema_create .= \" NOT NULL\";\n if($row[\"Extra\"] != \"\")\n $schema_create .= \" $row[Extra]\";\n $schema_create .= \",$crlf\";\n }\n $schema_create = ereg_replace(\",\".$crlf.\"$\", \"\", $schema_create);\n $result = @mysql_db_query($db, \"SHOW KEYS FROM $table\") or mysql_die();\n //@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo\n while($row = @mysql_fetch_array($result)) {\n $kname=$row['Key_name'];\n if (($kname != \"PRIMARY\") && ($row['Non_unique'] == 0))\n $kname=\"UNIQUE|$kname\";\n if ($row['Index_type'] == \"FULLTEXT\")\n $kname=\"FULLTEXT|$kname\";\n if (!isset($index[$kname]))\n $index[$kname] = array();\n $index[$kname][] = $row['Column_name'];\n }\n \n while(list($x, $columns) = @each($index)) {\n $schema_create .= \",$crlf\";\n if($x == \"PRIMARY\")\n $schema_create .= \" PRIMARY KEY (\" . implode($columns, \", \") . \")\";\n elseif (substr($x,0,6) == \"UNIQUE\")\n $schema_create .= \" UNIQUE \".substr($x,7).\" (\" . implode($columns, \", \") . \")\";\n elseif (substr($x,0,8) == \"FULLTEXT\")\n $schema_create .= \" FULLTEXT \".substr($x,9).\" (\" . implode($columns, \", \") . \")\";\n else\n $schema_create .= \" KEY $x (\" . implode($columns, \", \") . \")\";\n }\n \n $schema_create .= \"$crlf)\";\n return (stripslashes($schema_create));\n }", "title": "" }, { "docid": "30191c43156187ad8ed1f5e50c4b94ff", "score": "0.5608474", "text": "abstract public function checkCreateTable($table);", "title": "" }, { "docid": "7646a1f9007e50a15645075eae591d5e", "score": "0.56051207", "text": "public function assertTablesEqual($expected, $actual, $message = '') \n\t{\n\t\t$this->dbTestCase->assertTablesEqual($expected, $actual, $message);\n\t}", "title": "" }, { "docid": "c3a6d5961281679000ead71cbbda2b2d", "score": "0.56047195", "text": "public function check_table($table_name):bool;", "title": "" }, { "docid": "102208539541e4dc3c4b0f7e53accee6", "score": "0.56036574", "text": "public function compileTableListing(): string\n {\n return \"select * from sqlite_master where type = 'table' and name = ?\";\n }", "title": "" }, { "docid": "4d72a96c51bf85bff652c85b1a2ff71c", "score": "0.5600407", "text": "function catalog_table($table, $recat=false)\n\t{\n\t\t// structure is already cataloged\n\t\tif(!$recat && in_array($table, array_keys($this->tablestruct)))\n\t\t\treturn true;\n\t\t\t\n\t\tif($this->debug_level)\n\t\t\techo \"SDBC: Analyzing table $table<br/>\";\n\t\t\n\t\tif($this->typeIs(self::db_type_mysql))\n\t\t\treturn $this->catalog_mysql_table($table);\n\t\telse if($this->typeIs(self::db_type_postgre))\n\t\t\treturn $this->catalog_postgre_table($table);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6c1735a0dabbe2439566ea0dba7d2f68", "score": "0.55990314", "text": "public function willCreateTable();", "title": "" }, { "docid": "c5093e2c7baa170fee49abaf4ab1cdc0", "score": "0.5586782", "text": "function table_list(){\n\t\treturn($this->q2obj(\"SHOW TABLES\"));\n\t}", "title": "" }, { "docid": "494564bf0043e02172f8dde3d12c75d2", "score": "0.55833864", "text": "public function describe($table,$from='*'){\n\t\t$data = array();\n\t\t$query = \"SELECT {$from} FROM USER_TAB_COLUMNS where table_name=upper('{$table}') ORDER BY column_id ASC\";\t\n\t\t\n\t\t$sth = $this->dbconn->prepare($query);\n $sth->execute();\n\t\treturn $sth->fetchAll(PDO::FETCH_ASSOC);\n\t\n\t}", "title": "" }, { "docid": "f495e11e27592c5530152324f87b7272", "score": "0.55819994", "text": "function wangyu_test() {\n\t\t$source_table = \"fund_info\";\n\t\t$target_table = \"test_fund_info\";\n\t\t$order_id = \"code\";\n\t\t$is_value = false;\n\t\t$exclude_array=[\"id\", \"status_desc\", \"fund_type\", \"invest_gain\", \"update_date\", \"name\", \"fullname\", \"start_date\", \"exchange_status\", \"company\", \"manager\"];\n\t\t$this->compareTable($source_table, $target_table, $order_id, $is_value, $exclude_array);\n\n\n\t}", "title": "" }, { "docid": "0588304ab7006acdebcceb71a180de82", "score": "0.55797714", "text": "public function _loadTableInfo($className=false) {\n if(!$className) $className = get_class($this);\n $tn = self::_getFullTable($className);\n\n list($db,$tbl) = explode('.',$tn);\n\n if(!$tbl) { // if table wasn't set by the method above, it failed.\n $tn = $this->_db.\".\".$this->_table;\n $db = $this->_db;\n }\n\n if (isset(self::$_tableInfo[$tn])) {\n return true;\n } else {\n $sql = \"SHOW FULL COLUMNS FROM $tn\";\n $res = mysql_db_query($db,$sql) or mysql_die($sql);\n if (!$res) return false;\n $ti = array();\n while ($row = mysql_fetch_assoc($res)) {\n $fn = strtolower($row['Field']);\n $ti[$fn] = array();\n foreach ($row as $k => $v) {\n $ti[$fn][strtolower($k)] = $v;\n }\n }\n self::$_tableInfo[$tn] = $ti;\n mysql_free_result($res);\n return true;\n }\n }", "title": "" }, { "docid": "c1073c86aa1153086f006faf68be7e74", "score": "0.557838", "text": "private function checkTableMatches($table)\n {\n // If the table does not exist, create it\n if (! $this->pdb->tableExists($table->name)) {\n\n // Search previous names for a match; if found the table is renamed\n foreach ($table->previous_names as $old_name) {\n if (!$this->pdb->tableExists($old_name)) continue;\n\n // Found one.\n $this->heading = \"RENAME - Table '{$old_name}' to '{$table->name}'\";\n\n $q = \"RENAME TABLE ~{$old_name} TO ~{$table->name}\";\n $this->storeQuery('rename_table', $q);\n\n // Done!\n return false;\n }\n\n // Otherwise...\n $this->heading = \"MISSING - Table '{$table->name}'\";\n $this->createTable($table);\n\n return false;\n }\n\n // Some conditional stuff for MySQL tables.\n if ($this->pdb instanceof PdbMysql) {\n $attributes = $this->pdb->getTableAttributes($table->name);\n\n $charset = $table->attributes['charset'];\n $engine = $table->attributes['engine'];\n $collate = $table->attributes['collate'];\n\n $bad_engine = false;\n if ($attributes['engine'] != $engine) {\n $bad_engine = true;\n }\n\n $bad_collate = false;\n if ($attributes['table_collation'] != $collate) {\n $bad_collate = true;\n }\n\n if ($bad_engine or $bad_collate) {\n $this->heading = \"ATTRS - Table '{$table->name}'\";\n\n $q = \"ALTER TABLE ~{$table->name}\";\n $q .= \" ENGINE = {$engine},\";\n $q .= \" CHARACTER SET = {$charset},\";\n $q .= \" COLLATE = {$collate}\";\n\n $this->storeQuery('alter_table', $q);\n\n $q = \"ALTER TABLE ~{$table->name}\";\n $q .= \" CONVERT TO CHARACTER SET {$charset}\";\n $q .= \" COLLATE {$collate}\";\n\n $this->storeQuery('alter_table', $q);\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "1ad3eee6c4aadfab644ef1b320b18314", "score": "0.5576457", "text": "function mysql_field_table(mysqli_result $result, $field_offset = 0)\n {\n $info = mysqli_fetch_field_direct($result, $field_offset);\n if (empty($info->table)) {\n return false;\n }\n\n return $info->table;\n }", "title": "" }, { "docid": "b76fdde56a1d34be7e1e4ac03c1e3b52", "score": "0.55729705", "text": "public function testHasValidTableName()\n {\n $this->assertSame('tbl_job_results', $this->model->getTable());\n }", "title": "" }, { "docid": "1719717d0dc48e61f869b0bf1f741435", "score": "0.55707663", "text": "protected function get_table_info() {\n\t\t\t$query = $this->wpdadb->prepare(\n\t\t\t\t'\n\t\t\t\t\tSELECT engine AS engine,\n\t\t\t\t table_collation AS table_collation\n\t\t\t\t\tFROM information_schema.tables\n\t\t\t\t\tWHERE table_schema = %s\n\t\t\t\t\t AND table_name = %s\n\t\t\t\t',\n\t\t\t\t[\n\t\t\t\t\t$this->wpdadb->dbname,\n\t\t\t\t\t$this->table_name,\n\t\t\t\t]\n\t\t\t);\n\n\t\t\treturn $this->wpdadb->get_results( $query, 'ARRAY_A' ); // WPCS: unprepared SQL OK; db call ok; no-cache ok.\n\t\t}", "title": "" }, { "docid": "a22e48eb8ce09827eef539ada014389d", "score": "0.55684114", "text": "protected function getTableStructureSqlMysql($table) {\n $out = \"\";\n $result = db_query(\"SHOW CREATE TABLE `\" . $table['name'] . \"`\", array(), array('fetch' => \\PDO::FETCH_ASSOC));\n\n foreach ($result as $create) {\n // Lowercase the keys because between Drupal 7.12 and 7.13/14 the default\n // query behavior was changed.\n // See: http://drupal.org/node/1171866\n $create = array_change_key_case($create);\n $out .= \"DROP TABLE IF EXISTS `\" . $table['name'] . \"`;\\n\";\n // Remove newlines and convert \" to ` because PDO seems to convert those\n // for some reason.\n $out .= strtr($create['create table'], array(\"\\n\" => ' ', '\"' => '`'));\n\n if ($table['auto_increment']) {\n $out .= \" AUTO_INCREMENT=\" . $table['auto_increment'];\n }\n\n $out .= \";\\n\";\n }\n\n return $out;\n }", "title": "" }, { "docid": "db7748d9dced8d5a46c1b1b11f1c4723", "score": "0.55625623", "text": "public function getDescription()\n\t{\n\t\treturn 'Run a SQL query and retrieve the resultset';\n\t}", "title": "" } ]
f01dc0521f4a37669b7ca831f00daa1d
Get a result row as an enumerated array
[ { "docid": "e9c541239554e4ba270df067366110f5", "score": "0.0", "text": "function mysql_fetch_row($result) {\n $mysqli_result = Resource::fetch($result);\n return mysqli_fetch_row($mysqli_result);\n}", "title": "" } ]
[ { "docid": "33c520d35b195f6146cece041535a149", "score": "0.7183566", "text": "public function getIteratorRow () {}", "title": "" }, { "docid": "3e435bdc31c224c1b65abce0506aec80", "score": "0.7059542", "text": "abstract public function result_array();", "title": "" }, { "docid": "653e0de4b08101c0490ba8f0e7b5a824", "score": "0.7047767", "text": "public function asArray()\n {\n return (array)$this->_resultRow;\n }", "title": "" }, { "docid": "2eb747fdac06d0a958448447faf63f1d", "score": "0.6901836", "text": "function getdata_row($result){\n\n $index = 0;\n $details = [];\n while ($row = $result->fetch_assoc()) {\n $details = $row;\n $index++;\n }\n\n return $details;\n\n }", "title": "" }, { "docid": "a632437f24b75d743da9b9261187adca", "score": "0.6833872", "text": "function sql_fetchrow ($result) {\n return $result->fetch_array();\n }", "title": "" }, { "docid": "13dfc2cd9d02aabea5562fc10f3ca0fb", "score": "0.67955786", "text": "function getdata_rowall($result){\n\n $index = 0;\n $details = [];\n while ($row = $result->fetch_assoc()) {\n $details[$index] = $row;\n $index++;\n }\n\n return $details;\n\n }", "title": "" }, { "docid": "5f3b130a49ada92ddc336876bc527cfe", "score": "0.6791124", "text": "function row($result){\n\t\treturn mysql_fetch_array($result);\n\t}", "title": "" }, { "docid": "2b9b391eb9106b9ffb0f6ac9cf9684e3", "score": "0.67878854", "text": "public function fetchArray() {\n $row = pg_fetch_assoc($this->result);\n return $row;\n }", "title": "" }, { "docid": "505387490ff64e32028fc39687be28d6", "score": "0.67681414", "text": "function fetchArray(){\n\t\t$row = @pg_fetch_array($this->result);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "13ae8ede3e73228e6a7cea22b60878d5", "score": "0.67604", "text": "public function fetchRow(): array\n {\n return $this->query->exec()->fetchRow();\n }", "title": "" }, { "docid": "8345ef7b494ee6f772e397146f0e81b3", "score": "0.6749217", "text": "public abstract function getArrayResult( Database_QueryResult $oQResult );", "title": "" }, { "docid": "596f405fbabb08d188b1e318617d77e8", "score": "0.6726652", "text": "function db_result_to_array($result)\r\n {\r\n $res_array = array();\r\n\r\n for ($count = 0; $row = $result->fetch_assoc(); $count++)\r\n $res_array[$count] = $row;\r\n\r\n return $res_array;\r\n }", "title": "" }, { "docid": "60afeec8e3a275f850dc953844b43cd3", "score": "0.6717202", "text": "function resultToArray($result) {\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "1e80ea352b7e03a7866f5339afc0d375", "score": "0.6693644", "text": "function result_to_array($result)\r\r\n{\r\r\n $result_array = array();\r\r\n\tfor ($i=0; $row = mysqli_fetch_array($result) ; $i++)\r\r\n\t{\r\r\n\t $result_array[$i] = $row; \r\r\n\t}\r\r\n\treturn $result_array;\r\r\n}", "title": "" }, { "docid": "8ccf80ecb90db7b7689dbc2fdc445026", "score": "0.6682266", "text": "public function row()\n\t{\n\t\tif ($this->intIndex < 0)\n\t\t{\n\t\t\t$this->first();\n\t\t}\n\n\t\treturn $this->arrResults[$this->intIndex]->row();\n\t}", "title": "" }, { "docid": "e98b91d35130c5d26f0d5911ff933d38", "score": "0.66761494", "text": "public function fetch_array(){\n\t\t$rows = array();\n\t\twhile($row = $this->fetch()){\n\t\t\t$rows[] = $row;\n\t\t}\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "ba23b87511a8d7e443c05eab55794275", "score": "0.6669946", "text": "function fetchArray()\n {\n $row = @pg_fetch_array($this->result);\n return $row;\n }", "title": "" }, { "docid": "4c6238b8b60b2a2fec6774fa6b01a108", "score": "0.6624448", "text": "function fetchArray($result)\r\n {\r\n return @mysql_fetch_assoc( $result );\r\n }", "title": "" }, { "docid": "2f73d325a0fc4f6ac8e3e0e66766d2d8", "score": "0.65880007", "text": "public function fetchRow()\r\n\t\t{\r\n\t\t\tif(!$this->result || !isset($this->iterator_data[$this->position]))\r\n\t\t\t{\r\n\t\t\t\treturn(false);\r\n\t\t\t}\r\n\r\n\t\t\treturn(\\array_values($this->iterator_data[$this->position++]));\r\n\t\t}", "title": "" }, { "docid": "acc04790f180502fb469d6b8dd7b17d0", "score": "0.65843433", "text": "protected function _fetchArray() {\n return pg_fetch_array($this->result, 0, PGSQL_NUM);\n }", "title": "" }, { "docid": "80440bec3551fd7aa14f2795e582ffd0", "score": "0.6582851", "text": "abstract public function fetchArray($result);", "title": "" }, { "docid": "f71ef1bbc69b7ae26850251b5368e7b4", "score": "0.6565807", "text": "public function row() {\n return $this->__row = $this->__res->fetch_assoc();\n }", "title": "" }, { "docid": "cb32aeea413165e73baaf4b92b255873", "score": "0.6558126", "text": "public function row() {\n if ($this->results != null && count($this->results) > 0) {\n return array_shift($this->results);\n }\n else {\n return [];\n }\n }", "title": "" }, { "docid": "6886643351ec4d22b2b968c86280b8aa", "score": "0.65482426", "text": "public function fetchArray()\n {\n return mysqli_fetch_assoc($this->result);\n }", "title": "" }, { "docid": "59fbba9a8a2730129d616bfdc158a160", "score": "0.65472156", "text": "function parse_result($res) {\n if (is_bool($res)) {\n return $res;\n }\n $arr = array();\n $i = 0;\n while ($row = mysqli_fetch_array($res)) {\n $arr[$i++] = $row;\n }\n return $arr;\n}", "title": "" }, { "docid": "de15e433095f372f48e3a6a436d3b89a", "score": "0.6541128", "text": "function BDD_RESULT2ARRAY($RS) {\r\n\t$result = mysql_fetch_array($RS);\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "6e745af915bdc732d4a0f2580d71d320", "score": "0.6536039", "text": "function resultAsObjectArray($result)\n {\n $rtn = array();\n while ($row = Sqlite_Helper::fetchObject($result)) {\n $rtn[] = $row;\n }\n return $rtn;\n }", "title": "" }, { "docid": "38a9fa0d64d857c6f313b86bdcacf771", "score": "0.6530598", "text": "public function row(): array\n {\n if ($this->intIndex < 0) {\n $this->first();\n }\n\n return $this->arrSlots[$this->intIndex]->row();\n }", "title": "" }, { "docid": "a82e71eeb610fa5b6e5c0066e9a438a4", "score": "0.65080345", "text": "function result_to_array($result)\n {\n\t$result_array = array();\n\n\tfor ($i = 0; $row = mysql_fetch_array($result) ; $i++)\n\t{\n\t $result_array[$i] = $row;\n\t}\n\n\treturn $result_array;\n }", "title": "" }, { "docid": "cf7a40014455d4669117c3d4844d363c", "score": "0.6492582", "text": "public function getRows()\n\t{\n\t\t$retorno = array();\n\t\twhile($data = pg_fetch_object($this->result)){\n\t\t\t$retorno[] = $data;\n\t\t}\n\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "5b0c540b45e5305b7cd6267f579cdc76", "score": "0.6486994", "text": "public function fetchArray($result)\n {\n return @ mysqli_fetch_assoc($result);\n }", "title": "" }, { "docid": "e1db73cecc17b7663f7c4d29f9a35e33", "score": "0.6480038", "text": "public function fetchArray($result) {\r\n $row = mysqli_fetch_assoc($result);\r\n return $row;\r\n }", "title": "" }, { "docid": "284c15fdd880612df5e5bd41c8669755", "score": "0.6465803", "text": "function result_to_array($result){\n\t\t$result_array = array();\n\t for ($i=0; $row = @mysql_fetch_array($result); $i++){\n\t \t$result_array[$i] = $row; \n\t }\n\t return $result_array;\n\t}", "title": "" }, { "docid": "2c71c69bf0d4fff441c986f4e77d4a0b", "score": "0.64650357", "text": "function sqlFetchArray($result) {\r\n\t\treturn mysqli_fetch_array($result, MYSQL_ASSOC);\r\n\t}", "title": "" }, { "docid": "f235e1bae9f70744f97c67ff6bb95cd4", "score": "0.64629394", "text": "public function FetchArray(){\r\n\t\t$row = $this->result->fetch_array();\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "23e93eca5f8d7462eacbf5aa0062747d", "score": "0.6462913", "text": "function sed_sql_fetcharray($res)\n\t{ return (mysql_fetch_array($res)); }", "title": "" }, { "docid": "a2ffa887e6c34bdb159e0d1b08e4c6b4", "score": "0.64598554", "text": "function result_to_array($result){\r\n\t\r\n\t\t$result_array = array();\r\n\t\t\r\n\t\tfor ($i=0; $row = mysql_fetch_array($result); $i++){\r\n\t\t\t$result_array[$i] = $row;\r\n\t\t}\r\n\t\t\r\n\t\treturn $result_array;\r\n\t}", "title": "" }, { "docid": "fc474b270b287d5eddf99c99c23777b9", "score": "0.6434137", "text": "function db_result_to_array($result){\n\t$res_array = array();\n\n\tfor($count=0; $row= @mysql_fetch_array($result); $count++)\n\t\t$res_array[$count] = $row;\n\treturn $res_array;\n\t}", "title": "" }, { "docid": "57e831e3e982f26243f1cd16806bb462", "score": "0.64262384", "text": "public function getRows();", "title": "" }, { "docid": "57e831e3e982f26243f1cd16806bb462", "score": "0.64262384", "text": "public function getRows();", "title": "" }, { "docid": "57e831e3e982f26243f1cd16806bb462", "score": "0.64262384", "text": "public function getRows();", "title": "" }, { "docid": "9cffe57e3a6d4625d9315063d07c9e36", "score": "0.6409042", "text": "public function fetchArray( $result )\r\n\t{\r\n\t\treturn @mysql_fetch_assoc( $result );\r\n\t}", "title": "" }, { "docid": "b21f462dfec7ad936755ddbaef63491e", "score": "0.6406593", "text": "function sql_fetch_array($res)\n {\n return mysql_fetch_array($res);\n }", "title": "" }, { "docid": "600cfe82de17541d887ba3165f7f185a", "score": "0.64034194", "text": "function fetcharray()\n {\n return (mysqli_fetch_array($this->result));\n }", "title": "" }, { "docid": "f923c8fd7f69044ff215ab886a045232", "score": "0.63999987", "text": "public function fetchRow($result)\n {\n return pg_fetch_array($result, null, PGSQL_ASSOC);\n }", "title": "" }, { "docid": "13d54f5d9e60235561e6808a14777833", "score": "0.63960737", "text": "public function load_array()\n\t\t{\n\t\t\t$arr = array();\n\t\t\t\n\t\t\twhile ($row = mysqli_fetch_object($this->result))\n\t\t\t{\n\t\t\t\t$arr[] = $row;\n\t\t\t}\n\n\t\t\treturn $arr;\n\t\t}", "title": "" }, { "docid": "df2a8c0546bb991197a8392d5eded0f7", "score": "0.6384384", "text": "function loadResultArray($numinarray = 0) {\n if (!($cur = $this->query())) {\n return null;\n }\n $array = array();\n while ($row = shield_fetch_row( $cur )) {\n $array[] = $row[$numinarray];\n }\n shield_free_result( $cur );\n return $array;\n }", "title": "" }, { "docid": "6f6a734968b325fe4fb63e4e91cb36c2", "score": "0.6380271", "text": "public function result_array($rs=\"\",$debug=false)\r\n { if($debug){ die($this->query); } \r\n if(empty($rs)){ $rs = $this->result; } \r\n\t return mysqli_fetch_array($rs); \r\n }", "title": "" }, { "docid": "b8b01fc9d55255c06bbebae09a1657a4", "score": "0.6378762", "text": "public function fetchArray($result)\n {\n return mssql_fetch_assoc($result);\n }", "title": "" }, { "docid": "347d67e35c44fe9b283869dee34bba37", "score": "0.63770705", "text": "function FetchArray($result)\n {\n return @mysql_fetch_array($result);\n }", "title": "" }, { "docid": "6e2dcda6b0914343fc201271c944c652", "score": "0.6371171", "text": "public function getRow(): array\n {\n return $this->row;\n }", "title": "" }, { "docid": "2ec22e6ffa5ab2357957e9393f6e096c", "score": "0.63703895", "text": "function ind_array() //\n {\n if (isset($this->res))\n while ($row = mysql_fetch_row($this->res))\n $ind_arr[] = $row;\n return $ind_arr;\n }", "title": "" }, { "docid": "b5c77854b5bed386503cca8e5cfe7397", "score": "0.63686806", "text": "function convert_array($res){\n\n $all = array();\n\n if (count($res) > 0) {\n\n $i = 0;\n\n foreach ($res as $value) {\n\n foreach ($value as $row) {\n\n $all[$i] = $row;\n\n $i++;\n\n } \n\n }\n\n }\n\n return $all;\n\n }", "title": "" }, { "docid": "e834cb9c7bbd90ad4547ac453a45e60d", "score": "0.6367951", "text": "function convert_result_to_array($result){\n\t$data = [];\n\twhile($info=mysqli_fetch_assoc($result)){\n\t\t$data[] = $info;\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "48d358e18c2c1367e04c73ec0cae59fa", "score": "0.63655955", "text": "function fetchRow() {\n return mysql_fetch_array($this->result, MYSQL_ASSOC);\n }", "title": "" }, { "docid": "98d78b8b3a876b66bcebfcc1f0235a91", "score": "0.636125", "text": "public function fetch_row( ){\n\n return db2_fetch_array( $this->m_id_statement );\n }", "title": "" }, { "docid": "9a144055ca1d6b4baad6163da0f7a2ac", "score": "0.6358917", "text": "public function fetchArray($result)\n {\n return mysql_fetch_assoc($result);\n }", "title": "" }, { "docid": "83b4a4e278087a2766baa924708f56c6", "score": "0.6355499", "text": "public function getRow($row) {\n $rt = array();\n for ($col = 0; $col < $this->colcount; $col++) {\n $rt[$col] = $this->data[$row+1][$col];\n }\n return $rt;\n }", "title": "" }, { "docid": "db3108dbb9e4204bb38f56efd092cff2", "score": "0.63520306", "text": "private function fetchAssoc() {\n $rows = array();\n \n while($itm = oci_fetch_assoc($this->stmt)) {\n $rows[] = $itm;\n }\n \n return $rows;\n }", "title": "" }, { "docid": "292b226f8f325735146b5b3151679b64", "score": "0.63506967", "text": "public function fetch_array($result){\n return mysqli_fetch_array($result);\n }", "title": "" }, { "docid": "98779c959028efe56b1e58b8c8b09a05", "score": "0.6349842", "text": "function convertResultToArray($DBResult){\n $resultArray = array();\n while($row = $DBResult->fetch_assoc()){\n $resultArray[] = $row;\n \n }\n return $resultArray;\n}", "title": "" }, { "docid": "a6183b8b206e51ed41071bc2801e99c2", "score": "0.6340738", "text": "public function getRow()\n\t{\n\t\treturn (Object) pg_fetch_assoc($this->result);\n\t}", "title": "" }, { "docid": "29720c603ce439de2d41a9decdcb60aa", "score": "0.6338711", "text": "function ccb_odbc_utility_fetch_array($result)\r\n{\r\n\t$finalArray;\r\n\t$ti = 0;\r\n\t$temp;\r\n\twhile(1)\r\n\t{\r\n\t\t$temp = odbc_fetch_array($result);\r\n\t\tif($temp == false)\r\n\t\t\tbreak;\r\n\t\t$finalArray[$ti] = $temp;\r\n\t\t$ti = $ti + 1;\r\n\t}\r\n\treturn $finalArray;\r\n}", "title": "" }, { "docid": "02fedf07bb881b5341b2af912490914e", "score": "0.6331504", "text": "public function fetchArray()\r\n\t\t{\r\n\t\t\tif(!$this->result || !isset($this->iterator_data[$this->position]))\r\n\t\t\t{\r\n\t\t\t\treturn(false);\r\n\t\t\t}\r\n\r\n\t\t\treturn($this->iterator_data[$this->position++]);\r\n\t\t}", "title": "" }, { "docid": "996b1cbe20fc3d988e5e5b4802fbd247", "score": "0.63241655", "text": "private function toArray($result)\n {\n $rows = [];\n while ($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "8adfed986be2f1e999c1484bba66a764", "score": "0.63187104", "text": "public function load_array()\n\t\t{\n\t\t\t$arr = array();\n\t\t\t\n\t\t\twhile ($row = mssql_fetch_object($this->result))\n\t\t\t{\n\t\t\t\t$arr[] = $row;\n\t\t\t}\n\n\t\t\treturn $arr;\n\t\t}", "title": "" }, { "docid": "2d421efd0127266907c98db8e66396f2", "score": "0.6308553", "text": "function fetchArray() {\n $row=$this->result->fetch_array(MYSQLI_BOTH);\n return $row;\n }", "title": "" }, { "docid": "84d7b9188dc7b1cd0acce0439bf085f3", "score": "0.6306106", "text": "function getResultsArray()\n {\n if (is_resource($this->_result)) {\n $i = 0;\n $results = array();\n \n while ($row = mysql_fetch_assoc($this->_result)) {\n $results[$i++] = $row;\n }\n \n return $results;\n } else {\n trigger_error(\"DolphinDriver_mysql::getResultsArray: Previous query did not return a result resource!\", ERR_ERROR);\n return false;\n }\n }", "title": "" }, { "docid": "b7b2f74d789f6fef45f282750fb169bc", "score": "0.63023806", "text": "public function row_array($n = 0) {\n $result = $this->result_array();\n if (count($result) == 0) {\n return $result;\n }\n if ($n != $this->current_row AND isset($result[$n])) {\n $this->current_row = $n;\n }\n return $result[$this->current_row];\n }", "title": "" }, { "docid": "214fb940ccae26d24fad5a10133ef9a7", "score": "0.6301347", "text": "public function result_array($type=MYSQLI_ASSOC)\n\t{\n\t\tif (!$this->connect_error)\n\t\t{\n\t\t\t$buffer=array();\n\t\t\twhile($camp =$this->result->fetch_array($type))\n\t\t\t{\n\t\t\t\tarray_push($buffer,$camp);\n\t\t\t}\n\t\t\t//$this->free();\n\t\t\treturn $buffer;\n\t\t}\n\t}", "title": "" }, { "docid": "7d38ee7d5961d2f548f8fff111867fe3", "score": "0.6300879", "text": "function FetchRow($rs,$type=2) \n\t\t{\n\t\t\t$rowData = array();\n\t\t\tif (is_resource($rs)) {\n\t\t\t\tif (@odbc_fetch_row($rs)) {\n\t\t\t\t\tfor ($i = 0; $i < $this->columns; $i++) {\n\t\t\t\t\t\tif ($type==1) {\n\t\t\t\t\t\t\t$rowData[@odbc_field_name($rs, $i + 1)] = @odbc_result($rs, $i + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($type==3) {\n\t\t\t\t\t\t\t$result = @odbc_result($rs, $i + 1);\n\t\t\t\t\t\t\t$rowData[@odbc_field_name($rs, $i + 1)] = $result;\n\t\t\t\t\t\t\t$rowData[] = $result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$rowData[] = @odbc_result($rs, $i + 1);\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\tunset($key);\n\t\t\tunset($result);\n\t\t\treturn $rowData;\n\t\t}", "title": "" }, { "docid": "3470ffdf244e189ec7b307550848a0bf", "score": "0.62900066", "text": "public function rowArray()\n {\n return $this->offsetExists(0) ? (array) $this->offsetGet(0) : null;\n }", "title": "" }, { "docid": "26e60872f374e3b487bd9d36636bbff2", "score": "0.6286601", "text": "public function fetch_array($type=Result::BOTH);", "title": "" }, { "docid": "f997a8b6d35de4482a6bfdecfe71f2bb", "score": "0.62815875", "text": "public function result_array($type=MYSQLI_ASSOC)\n\t{\n\t\tif (!$this->connect_error)\n\t\t{\n\t\t\t$buffer=array();\n\t\t\twhile($camp =$this->result->fetch_array($type))\n\t\t\t{\n\t\t\t\tarray_push($buffer,$camp);\n\t\t\t}\n\t\t\t$this->free();\n\t\t\treturn $buffer;\n\t\t}\n\t}", "title": "" }, { "docid": "000257237cd4a62b65eb2c51c27a678d", "score": "0.6280396", "text": "private function returnArray($result){\n $arrayToReturn = array();\n while($r = $result->fetch_assoc()){\n array_push($arrayToReturn,$r);\n }\n return $arrayToReturn;\n }", "title": "" }, { "docid": "ffc594c6c3b1fe50964623454c4f28bf", "score": "0.6267954", "text": "function fetchArray($result) {\n return $result->fetch_array();\n }", "title": "" }, { "docid": "df8fb64f57c1bec13ce225070eb4a5ec", "score": "0.62562066", "text": "public function row() {\n\t\tif (!is_object($this->result)) return false;\n\n\t\t$seek = $this->seekzero ? 0 : 1;\n\t\t$this->seekzero = false;\n\n\t\t$this->data = $this->result->fetch(\n\t\t\tPDO::FETCH_ASSOC,\n\t\t\tPDO::FETCH_ORI_REL,\n\t\t\t$seek\n\t\t);\n\n\t\tif ($this->data !== false) {\n\t\t\t$this->row\t= ($this->row !== false)\n\t\t\t\t\t\t? ($this->row + 1)\n\t\t\t\t\t\t: 0;\n\t\t}\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "97d32b3829fbaee9fe9ab0814214d530", "score": "0.6256075", "text": "public function getRow()\n\t {\n\t\tif ($this->GetNumRows() > $this->_row)\n\t\t {\n\t\t\t$arr = pg_fetch_array($this->_result, $this->_row, PGSQL_ASSOC);\n\t\t\t$this->_row++;\n\t\t }\n\t\telse\n\t\t {\n\t\t\t$arr = false;\n\t\t }\n\n\t\treturn $arr;\n\t }", "title": "" }, { "docid": "4f2a4a17e36aff86861a17fe34f64b6a", "score": "0.6254964", "text": "public function fetchResult() {\n\t\tif ($row = $this->_result->fetch(PDO::FETCH_NUM)) {\n\t\t\t$resultRow = array();\n\t\t\tforeach ($this->map as $col => $meta) {\n\t\t\t\tlist($table, $column, $type) = $meta;\n\t\t\t\tif ($table === 0 && $column === self::ROW_COUNTER) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$resultRow[$table][$column] = $row[$col];\n\t\t\t\tif ($type === 'boolean' && $row[$col] !== null) {\n\t\t\t\t\t$resultRow[$table][$column] = $this->boolean($resultRow[$table][$column]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\t$this->_result->closeCursor();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6914dfb8a5f99bf2601189ca2cba4054", "score": "0.6252747", "text": "function as_array(){\n\t\t \treturn mysql_fetch_array($this->current_query);\n\t\t }", "title": "" }, { "docid": "e9631f88de6a4d6d99cc59b6310d03d9", "score": "0.62360764", "text": "public function row()\n {\n $output = current($this->results);\n\n next($this->results);\n\n return $output;\n }", "title": "" }, { "docid": "37c644c7bce70d4e8a60ff65dc553819", "score": "0.6235878", "text": "function db_result_to_array($result) \n{\n $res_array = array();\n $count=0;\n\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) \n {\n $res_array[$count] = $row;\n $count++;\n }\n echo $res_array;\n return $res_array;\n}", "title": "" }, { "docid": "0ca2faf4bcbd34affe919e6895c061ac", "score": "0.6222727", "text": "public function result_array() {\n if (count($this->result_array) > 0) {\n return $this->result_array;\n }\n// In the event that query caching is on the result_id variable\n// will return FALSE since there isn't a valid SQL resource so\n// we'll simply return an empty array.\n if ($this->result_id === FALSE OR $this->num_rows() == 0) {\n return array();\n }\n $this->_data_seek(0);\n while ($row = $this->_fetch_assoc()) {\n $this->result_array[] = $row;\n }\n return $this->result_array;\n }", "title": "" }, { "docid": "57cac95f2dc65021dfab8d69e6bde1bd", "score": "0.6218289", "text": "public function fetch_array() {\n if (!is_null($this->result))\n return mysql_fetch_array($this->result);\n }", "title": "" }, { "docid": "501fa7b729558dd483f8d0a3398ee4a2", "score": "0.6213342", "text": "function fetchArray($result){\n return mysql_fetch_array($result);\n }", "title": "" }, { "docid": "c2e61c32a8f50c7a831d59a1c3ebcb22", "score": "0.6212533", "text": "protected function fetch_array($result) {\n $array = [];\n while($row = $result->fetch_assoc()) {\n $array[] = $row;\n }\n\n return $array;\n }", "title": "" }, { "docid": "3da97aec250076ee30192080fda66324", "score": "0.6207389", "text": "public function getIterator(){\n if($this->isSingle)\n throw new Core\\Exception(\"This is a Row Object. Can't iterate \");\n \n $It = new ArrayIterator();\n \n foreach($this->getResults() as $rData)\n $It->append($this->map($rData));\n \n \n return\n $It;\n }", "title": "" }, { "docid": "0137a4e3d85263402352ce1573238268", "score": "0.6207259", "text": "function as_array()\n {\n $array = array();\n\n foreach ($this->_rows AS $row)\n {\n $array[] = $row->as_array();\n }\n\n return $array;\n }", "title": "" }, { "docid": "b4e4ca22060a1d60e67d0d6c93bc1bc3", "score": "0.62036854", "text": "public function getRow(): array\n {\n return $this->rawData['databaseRow'] ?? [];\n }", "title": "" }, { "docid": "753dd4802653d4a066090e27f021a299", "score": "0.6197852", "text": "public function fetch_array($result)\n\t\t{\n\t\t\treturn mssql_fetch_array($result);\n\t\t}", "title": "" }, { "docid": "bc2c1b79ad441579cc2bd40249e6f39f", "score": "0.61886555", "text": "private function getArray($result)\n\t{\n\t\t$result_arr = array();\t\n\t\t while ($row = $result->fetch_assoc()) {\n\t\t\t$result_arr[] = $row;\n\t\t}\n\t\t$result->free(); \t\t\n\t\treturn ($result_arr);\n\t}", "title": "" }, { "docid": "6c0ae9aede0b96fe75d3dcbe4628578d", "score": "0.6167108", "text": "public function fetchArray()\n {\n return $this->getStatement()->fetchArray();\n }", "title": "" }, { "docid": "408d99592e2bb7dd1a2b7908df8286db", "score": "0.6163611", "text": "public function result_array($query_result){\n return mysql_fetch_array($query_result, MYSQL_BOTH);\n }", "title": "" }, { "docid": "b8a7073b4010ccc9c48bd3602c0ccc89", "score": "0.6162323", "text": "public function getDataRow() ;", "title": "" }, { "docid": "77da76dcbf98b8f913eb124c3da46049", "score": "0.61611307", "text": "public function getResult() {\n \t$args = func_get_args();\n\t// parsing the data retrieved by the query\n\t$data = array();\n\ttry\n\t{\n\t\t$result = $this->executeQuery($args);\n\t\t\n\t\tif(is_bool($result)) {\n\t\t\t// Do nothing\n\t\t} else {\n\t\t\twhile ($row = mysqli_fetch_object($result)) {\n\t\t\t $data[]=$row;\n\t\t\t}\n\t\t\t// free the memory\n\t\t\tmysqli_free_result($result);\n\t\t}\n\t}\n\tcatch (Exception $e)\n\t{\n\t\t$this->logError($args,$e);\n\t}\n\n\t/*if (!is_object($e)) {\n\n\t\t\n\t}*/\n\n\treturn $data;\n }", "title": "" }, { "docid": "c7b5721df6c28e1e339ebbd6c7d07ddd", "score": "0.6151285", "text": "function resultToArray($qry)\n\t{\n\t\t$res = $this->executeQuery($qry);\n\t\t\n\t\t$result = array();\n\t\t\n\t\twhile($cur=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$result[] = $cur;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "33d946f5d7fc10663bf69bba207f1dee", "score": "0.6149475", "text": "public function Rows($asArray = false) {\n \t$result = null;\n if ($asArray) {\n \tif (!is_resource($this->query_ID)) {\n \t\tif (session(\"isAdmin\")) echo $this->ExecutedCommand().\"<br/>\";\n \t\techo $this->Errors();\n \t}\n \t$result = mysqli_fetch_array($this->query_ID);\n }\n else {\n \t$result = mysqli_fetch_assoc($this->query_ID);\n }\n return $result;\n }", "title": "" }, { "docid": "378d3b6bdbc6c72e9c0f46bb51c38c7c", "score": "0.6146562", "text": "public function fetchArray()\n\t\t{\n\t\t\tif(!$this->result)\n\t\t\t{\n\t\t\t\treturn(false);\n\t\t\t}\n\n\t\t\treturn(\\pg_fetch_array($this->result));\n\t\t}", "title": "" }, { "docid": "5c5680fabd741596219e0e7385569a2c", "score": "0.6146159", "text": "public function fetch_array($result) {\r\n\t\treturn mysqli_fetch_array($result);\r\n\t}", "title": "" }, { "docid": "16c07686f30b9b578527ca574c7dc23a", "score": "0.61447585", "text": "function fetch_array($res){\n\t\treturn mysql_fetch_array ($res);\n\t}", "title": "" }, { "docid": "dc3b1ffe04a8e2790ee90def2c258cd2", "score": "0.61436635", "text": "public function preparedGetRows() {\n\t\t\n\t\t$this->bindResults($this->stmt, $row);\n\n\t\t$result = array();\n\t\twhile ($this->stmt->fetch()) {\n\t\t\tforeach($row as $key => $val) {\n\t\t\t\t$c[$key] = $val;\n\t\t\t}\n\t\t\t$result[] = $c;\n\t\t}\n \n\t\t$this->stmt->close();\n\t\twhile($this->connection->next_result()) { } \n\t\treturn $result;\n\t}", "title": "" } ]
539d67f8211bbada34922285bb344f7e
Create request for operation 'foodIngredientSearchPhpGet'
[ { "docid": "b8c66d31453fabed4791040e1a24b97a", "score": "0.61328584", "text": "protected function foodIngredientSearchPhpGetRequest($find, $limit = null, $user_id = null)\n {\n // verify the required parameter 'find' is set\n if ($find === null || (is_array($find) && count($find) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $find when calling foodIngredientSearchPhpGet'\n );\n }\n\n $resourcePath = '/food/ingredient/search.php';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($find !== null) {\n $queryParams['find'] = ObjectSerializer::toQueryValue($find, null);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, null);\n }\n // query params\n if ($user_id !== null) {\n $queryParams['user_id'] = ObjectSerializer::toQueryValue($user_id, null);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 $queryParams['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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "2eabaab4a8d287c3423505cf3982f862", "score": "0.61612064", "text": "protected function foodBrandedSearchPhpGetRequest($allergen = null, $brand = null, $category = null, $country = null, $diet = null, $ingredient = null, $keyword = null, $mineral = null, $nutrient = null, $palm_oil = null, $trace = null, $vitamin = null, $limit = null, $page = null, $user_id = null)\n {\n\n $resourcePath = '/food/branded/search.php';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($allergen !== null) {\n $queryParams['allergen'] = ObjectSerializer::toQueryValue($allergen, null);\n }\n // query params\n if ($brand !== null) {\n $queryParams['brand'] = ObjectSerializer::toQueryValue($brand, null);\n }\n // query params\n if ($category !== null) {\n $queryParams['category'] = ObjectSerializer::toQueryValue($category, null);\n }\n // query params\n if ($country !== null) {\n $queryParams['country'] = ObjectSerializer::toQueryValue($country, null);\n }\n // query params\n if ($diet !== null) {\n $queryParams['diet'] = ObjectSerializer::toQueryValue($diet, null);\n }\n // query params\n if ($ingredient !== null) {\n $queryParams['ingredient'] = ObjectSerializer::toQueryValue($ingredient, null);\n }\n // query params\n if ($keyword !== null) {\n $queryParams['keyword'] = ObjectSerializer::toQueryValue($keyword, null);\n }\n // query params\n if ($mineral !== null) {\n $queryParams['mineral'] = ObjectSerializer::toQueryValue($mineral, null);\n }\n // query params\n if ($nutrient !== null) {\n $queryParams['nutrient'] = ObjectSerializer::toQueryValue($nutrient, null);\n }\n // query params\n if ($palm_oil !== null) {\n $queryParams['palm_oil'] = ObjectSerializer::toQueryValue($palm_oil, null);\n }\n // query params\n if ($trace !== null) {\n $queryParams['trace'] = ObjectSerializer::toQueryValue($trace, null);\n }\n // query params\n if ($vitamin !== null) {\n $queryParams['vitamin'] = ObjectSerializer::toQueryValue($vitamin, null);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, null);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page, null);\n }\n // query params\n if ($user_id !== null) {\n $queryParams['user_id'] = ObjectSerializer::toQueryValue($user_id, null);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 $queryParams['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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "965f2780e789c4272e98ea2891187b6e", "score": "0.6043896", "text": "protected function searchesV2GetRequest()\n {\n\n $resourcePath = '/api/v2/searches';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e6f1ddae98252d560ec41fe4ab4a57f7", "score": "0.5989817", "text": "public function getRandomFoodTriviaRequest()\n {\n\n $resourcePath = '/food/trivia/random';\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "45a3f4850e82cfa127d327aefff9175b", "score": "0.59738255", "text": "public function getARandomFoodJokeRequest()\n {\n\n $resourcePath = '/food/jokes/random';\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ae8cc9e9eb5830a7daebd082302a3cb3", "score": "0.58492106", "text": "public function getFoods(Request $request) \n {\n \n if ($request->input('q')) {\n $search_query = $request->input('q');\n $foods = Food::with('brand')->where('name', 'like', '%'.$search_query.'%' )->get();\n } else {\n $foods = Food::with('brand')->get();\n }\n\n return response()->json($foods);\n }", "title": "" }, { "docid": "8fcea4d654a56b5e9e8b89f5f73c3681", "score": "0.5757875", "text": "protected function searchesV2GetEmptyRequest()\n {\n\n $resourcePath = '/api/v2/searches/empty';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6a66659cf3f680362223441ef4c43c8a", "score": "0.5741322", "text": "protected function searchesV2DeleteRequest()\n {\n\n $resourcePath = '/api/v2/searches';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5f397288c184a59d5713b2b170d8e384", "score": "0.57140577", "text": "abstract public function searchHotels($request) : array;", "title": "" }, { "docid": "db5c653aad4bb06500d431eb10ec458d", "score": "0.5701566", "text": "protected function recipeSearchPhpGetRequest($title, $excluded_cuisine = null, $included_cuisine = null, $excluded_ingredient = null, $included_ingredient = null, $nutrients_required = null, $limit = null, $page = null, $user_id = null)\n {\n // verify the required parameter 'title' is set\n if ($title === null || (is_array($title) && count($title) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $title when calling recipeSearchPhpGet'\n );\n }\n\n $resourcePath = '/recipe/search.php';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($title !== null) {\n $queryParams['title'] = ObjectSerializer::toQueryValue($title, null);\n }\n // query params\n if ($excluded_cuisine !== null) {\n $queryParams['excluded_cuisine'] = ObjectSerializer::toQueryValue($excluded_cuisine, null);\n }\n // query params\n if ($included_cuisine !== null) {\n $queryParams['included_cuisine'] = ObjectSerializer::toQueryValue($included_cuisine, null);\n }\n // query params\n if ($excluded_ingredient !== null) {\n $queryParams['excluded_ingredient'] = ObjectSerializer::toQueryValue($excluded_ingredient, null);\n }\n // query params\n if ($included_ingredient !== null) {\n $queryParams['included_ingredient'] = ObjectSerializer::toQueryValue($included_ingredient, null);\n }\n // query params\n if ($nutrients_required !== null) {\n $queryParams['nutrients_required'] = ObjectSerializer::toQueryValue($nutrients_required, null);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, null);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page, null);\n }\n // query params\n if ($user_id !== null) {\n $queryParams['user_id'] = ObjectSerializer::toQueryValue($user_id, null);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 $queryParams['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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9f8f5c56ecb585c159d8fe4df05b4295", "score": "0.569078", "text": "protected function searchesV2GetSelectRequest()\n {\n\n $resourcePath = '/api/v2/searches/Select';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8f2a9a537df82ce60eeea596aab1c557", "score": "0.56855226", "text": "protected function recipeIngredientPhpGetRequest($list, $limit = null, $page = null, $user_id = null)\n {\n // verify the required parameter 'list' is set\n if ($list === null || (is_array($list) && count($list) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $list when calling recipeIngredientPhpGet'\n );\n }\n\n $resourcePath = '/recipe/ingredient.php';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($list !== null) {\n $queryParams['list'] = ObjectSerializer::toQueryValue($list, null);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, null);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page, null);\n }\n // query params\n if ($user_id !== null) {\n $queryParams['user_id'] = ObjectSerializer::toQueryValue($user_id, null);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 $queryParams['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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d25c30e0ae82c86cac5f1910aee503c3", "score": "0.5651868", "text": "public function autocomplete(Request $request)\n {\n \n $data = IngredientSample::select(\"name\")->where(\"name\", \"LIKE\", \"%{$request->input('query')}%\")->get();\n \n return response()->json($data);\n }", "title": "" }, { "docid": "f6243ec51716721aa2215a135221a6d6", "score": "0.56486356", "text": "public function searchAllFoodRequest($query, $offset = null, $number = 10)\n {\n // verify the required parameter 'query' is set\n if ($query === null || (is_array($query) && count($query) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $query when calling searchAllFood'\n );\n }\n if ($offset !== null && $offset > 900) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchAllFood, must be smaller than or equal to 900.');\n }\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchAllFood, must be bigger than or equal to 0.');\n }\n\n if ($number !== null && $number > 100) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchAllFood, must be smaller than or equal to 100.');\n }\n if ($number !== null && $number < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchAllFood, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/food/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n true // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $offset,\n 'offset', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $number,\n 'number', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c9d46a37728edc9d9cc0c47c7aa363b3", "score": "0.5566396", "text": "public function detectFoodInTextRequest($content_type = null)\n {\n\n $resourcePath = '/food/detect';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // header params\n if ($content_type !== null) {\n $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type);\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 ['application/x-www-form-urlencoded']\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0c456bf3f1ae65939aca7b7df9194a77", "score": "0.54978096", "text": "public function foodBrandedSearchPhpGetWithHttpInfo($allergen = null, $brand = null, $category = null, $country = null, $diet = null, $ingredient = null, $keyword = null, $mineral = null, $nutrient = null, $palm_oil = null, $trace = null, $vitamin = null, $limit = null, $page = null, $user_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\BrandedFoodObject';\n $request = $this->foodBrandedSearchPhpGetRequest($allergen, $brand, $category, $country, $diet, $ingredient, $keyword, $mineral, $nutrient, $palm_oil, $trace, $vitamin, $limit, $page, $user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\BrandedFoodObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d7f28af56719c459e62a4d8a75ee7f98", "score": "0.5494658", "text": "public function index(Request $request)\n {\n $ingredient = new IngredientService;\n return response()->json($ingredient->listIngredients($request));\n }", "title": "" }, { "docid": "4f9b49badb862d43cdd64454a89e2410", "score": "0.54844946", "text": "public function recipeSearchPhpGetWithHttpInfo($title, $excluded_cuisine = null, $included_cuisine = null, $excluded_ingredient = null, $included_ingredient = null, $nutrients_required = null, $limit = null, $page = null, $user_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\RecipeObject';\n $request = $this->recipeSearchPhpGetRequest($title, $excluded_cuisine, $included_cuisine, $excluded_ingredient, $included_ingredient, $nutrients_required, $limit, $page, $user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\RecipeObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "5d4b32769142e6e43510524a9b7bef71", "score": "0.5481248", "text": "public function searchCustomFoodsRequest($username, $hash, $query = null, $offset = null, $number = 10)\n {\n // verify the required parameter 'username' is set\n if ($username === null || (is_array($username) && count($username) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $username when calling searchCustomFoods'\n );\n }\n // verify the required parameter 'hash' is set\n if ($hash === null || (is_array($hash) && count($hash) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $hash when calling searchCustomFoods'\n );\n }\n if ($offset !== null && $offset > 900) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchCustomFoods, must be smaller than or equal to 900.');\n }\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchCustomFoods, must be bigger than or equal to 0.');\n }\n\n if ($number !== null && $number > 100) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchCustomFoods, must be smaller than or equal to 100.');\n }\n if ($number !== null && $number < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchCustomFoods, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/food/customFoods/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $username,\n 'username', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n true // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $hash,\n 'hash', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n true // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $offset,\n 'offset', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $number,\n 'number', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8810a3094cb9ea0ca4cc8a294821e627", "score": "0.5428473", "text": "public function getAction(Request $request)\n {\n $recipeService = $this->get('recipe_service');\n\n $fridgeService = $this->get('fridge_service');\n\n $today = new \\Datetime();\n\n $freshIngredients = $fridgeService->getFreshIngredients($today);\n\n $recipes = $recipeService->getRecipesByIngredients($freshIngredients);\n\n $pastBestBeforeIngredients = $fridgeService->getIngredientsPastBestBefore($today);\n\n $recipes = array_merge($recipes, $recipeService->getRecipesByIngredients($pastBestBeforeIngredients));\n\n //Cast StdObjects to array\n $recipes = json_decode(json_encode($recipes), true);\n\n $response = array('recipes' => $recipes);\n\n $view = $this->view($response, Response::HTTP_OK);\n\n return $this->handleView($view);\n }", "title": "" }, { "docid": "683068d302b04611914d2d3d388ad4b9", "score": "0.5416388", "text": "public function testPostSearchAction(): void\n {\n $client = $this->makeClient();\n\n $client->request(\n 'POST',\n $this->getUrl('api.ingredient.post_search'),\n ['name' => 'pomme de terre', 'category' => 'Farines']\n );\n\n $this->isSuccessful($result = $client->getResponse());\n\n $result = json_decode($result->getContent());\n\n self::assertCount(1, $result);\n self::assertSame(4090, $result[0]->origfdcd);\n }", "title": "" }, { "docid": "18ec9bcc858435d095171cdd76155c53", "score": "0.54099196", "text": "function car_search_request($search_params) {\r\n\r\n $response['status'] = SUCCESS_STATUS;\r\n $response['data'] = array();\r\n /** Request to be formed for search * */\r\n $this->credentials('Search');\r\n $request_params = array();\r\n $request_params['pickup_location'] = $search_params['pickup_location'];\r\n $request_params['return_location'] = $search_params['return_location'];\r\n $request_params['pickup_loc_id'] = $search_params['pickup_loc_code'];\r\n $request_params['return_loc_id'] = $search_params['return_loc_code'];\r\n $request_params['pickup_datetime'] = $search_params['pickup_datetime'];\r\n $request_params['return_datetime'] = $search_params['return_datetime'];\r\n $request_params['driver_age'] = $search_params['driver_age'];\r\n $response['data']['request'] = json_encode($request_params);\r\n $response['data']['service_url'] = $this->service_url;\r\n return $response;\r\n }", "title": "" }, { "docid": "6145cb6344137010898b8b269cae31ea", "score": "0.54067165", "text": "public function searchFoodVideosRequest($query = null, $type = null, $cuisine = null, $diet = null, $include_ingredients = null, $exclude_ingredients = null, $min_length = null, $max_length = null, $offset = null, $number = 10)\n {\n if ($offset !== null && $offset > 900) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchFoodVideos, must be smaller than or equal to 900.');\n }\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling MiscApi.searchFoodVideos, must be bigger than or equal to 0.');\n }\n\n if ($number !== null && $number > 100) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchFoodVideos, must be smaller than or equal to 100.');\n }\n if ($number !== null && $number < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$number\" when calling MiscApi.searchFoodVideos, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/food/videos/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $type,\n 'type', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $cuisine,\n 'cuisine', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $diet,\n 'diet', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $include_ingredients,\n 'includeIngredients', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $exclude_ingredients,\n 'excludeIngredients', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $min_length,\n 'minLength', // param base name\n 'number', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $max_length,\n 'maxLength', // param base name\n 'number', // openApiType\n 'form', // style\n false, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $offset,\n 'offset', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $number,\n 'number', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8b6cfba9d74218d0316e0a11df25fcc2", "score": "0.5360995", "text": "protected function officesGetRequest()\n {\n\n $resourcePath = '/offices';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2a41df8a8e17c0f9f7fc26331c579630", "score": "0.53048795", "text": "public function index()\n {\n //\n $result=$this->food->searchFoods();\n return new IndexResponse($result);\n }", "title": "" }, { "docid": "f5100222e6a08e6eee5b1399735215ae", "score": "0.5288988", "text": "public function searchAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $requestString = $request->get('q');\n $entities = $em->getRepository('PiBundle:Offre')->findEntitiesByString($requestString);\n if(!$entities) {\n $result['entities']['error'] = \"keine Einträge gefunden\";\n } else {\n $result['entities'] = $this->getRealEntities($entities);\n }\n return new Response(json_encode($result));\n }", "title": "" }, { "docid": "e0293ef885f9bfcf3b725fe66fee3415", "score": "0.52365404", "text": "protected function searchesV2GetFormulaForSearchRequest($fieldcriteria = null)\n {\n\n $resourcePath = '/api/v2/searches/Formula';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($fieldcriteria)) {\n $_tempBody = $fieldcriteria;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "e496e61cb0db5c96c5e73c47f097662d", "score": "0.52085847", "text": "protected function searchKpoAsCarrierRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteTransferCard/v1/Kpo/carrier/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "bc9a54c5d04e33a82e7d2e36aa743291", "score": "0.5196191", "text": "public function search(Request $request) : SearchResultCollection;", "title": "" }, { "docid": "523f5b8d31c94dc8307c8026244cb23d", "score": "0.5193564", "text": "protected function searchesV2GetLastSearchRequest()\n {\n\n $resourcePath = '/api/v2/searches/lastsearch';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "05f90e9fb98b3482605c79c7107fdb08", "score": "0.5185378", "text": "private function search()\n {\n\n //set empty parameter array\n $url_params = array();\n\n //add the parameters\n $url_params['location'] = $this->location;\n $url_params['sort'] = $this->sort;\n $url_params['category_filter'] = $this->category_filter;\n\n //create the search path including the base URL and parameters\n $search_path = $this->search_path . \"?\" . http_build_query($url_params);\n\n //return response\n return $this->request($search_path);\n }", "title": "" }, { "docid": "2b21a65f4cce2aa2180bcde333b0fc28", "score": "0.5156811", "text": "public function app_search(Request $request)\n {\n $hosts = [\"http://127.0.0.1:9200\"];\n\n $client = ClientBuilder::create()\n ->setHosts($hosts)\n ->build();\n\n // ============ get advance query index =============\n if ($request->get('query')) {\n $query = $request->get('query');\n $params = [\n 'index' => 'histories',\n 'body' => [\n 'query' => [\n 'multi_match' => [\n 'fields' => [\n 'name_prefix',\n 'first_name',\n 'last_name',\n 'university',\n 'faculty',\n 'branch',\n 'educational',\n 'experience',\n 'dominant_language',\n 'language_learned',\n 'charisma',\n 'district',\n 'canton',\n 'province',\n 'my_district',\n 'my_canton',\n 'my_province',\n ],\n 'query' => \"*\" . $query . \"*\",\n 'fuzziness' => 'AUTO'\n ]\n ]\n ]\n ];\n $ent_post0 = $client->search($params);\n } else {\n $query = \"\";\n $params = [\n 'index' => 'histories',\n 'body' => [\n 'query' => [\n 'wildcard' => [\n 'first_name' => \"*\"\n ]\n ]\n ]\n ];\n\n $ent_post0 = $client->search($params);\n }\n\n // selected options\n $options = array();\n $options = [\n 'educational' => [],\n 'university' => [],\n 'branch' => [],\n 'my_province' => [],\n ];\n\n foreach ($ent_post0[\"hits\"][\"hits\"] as $v) {\n foreach ($options as $key => $b) {\n if (!in_array($v['_source'][$key], $options[$key])) {\n array_push($options[$key], $v['_source'][$key]);\n }\n }\n }\n\n $ent_post = array_filter($ent_post0[\"hits\"][\"hits\"], function ($v) use ($request) {\n foreach ($request->all() as $query_all => $val) {\n if ($query_all != \"query\" && trim($v[\"_source\"][$query_all]) != trim($val)) {\n return false;\n }\n }\n return true;\n });\n\n // dd($options);\n\n $count = MyJobs::query()->where('a_id', 'LIKE', '2')->count();\n $noti_count = MyJobs::query()->where('a_id', 'LIKE', '2')->count();\n $noti_count_box2 = MyJobs::join('histories', 'histories.history_id', \"=\", \"my_jobs.history_id\")\n ->where('a_id', 'LIKE', '2')\n ->get();\n $noti_count_box = $noti_count_box2->sortDesc();\n $noti_count_box->values()->all();\n\n return view('ent.ent_index', compact('ent_post', 'options', 'query', 'count', 'noti_count', 'noti_count_box'));\n }", "title": "" }, { "docid": "6a4f6bfe952ad98911da641d89622eed", "score": "0.51407313", "text": "public function getFoodMenusIngredientsByAjax(Request $request){\n\n $food_menus_ingredients = RestaurantFoodMenuIngredient::where('food_menu_id', $request->id)->where('del_status', 'Live')->orderBy('updated_at', 'asc')->get();\n\n foreach ($food_menus_ingredients as $key => $food_menus_ingredient) {\n $food_menus_ingredients[$key]->ingredientInfo = RestaurantIngredient::with('unitInfo:id,name')->where('id', $food_menus_ingredient->ing_id)->where('del_status', 'Live')->first();\n }\n return response()->json($food_menus_ingredients);\n }", "title": "" }, { "docid": "1ce90beaddf1b3476c34b66af7589467", "score": "0.5134018", "text": "public function getFormSearchAction()\n {\n\n $regions = [];\n $citys = [];\n $centers = [];\n $em = $this->getDoctrine()->getManager();\n\n $regionAll = $em->getRepository('AppBundle:Region')->findAll();\n foreach ($regionAll as $region){\n $regions[$region->getName()] = null;\n }\n $cityAll = $em->getRepository('AppBundle:City')->findAll();\n foreach ($cityAll as $city){\n $citys[$city->getName()] = null;\n }\n\n $centerAll = $em->getRepository('AppBundle:Center')->findBy(array('share_program' => true));\n foreach ($centerAll as $center){\n $centers[$center->getName()] = null;\n }\n\n $regionCity = array_merge($regions, $citys);\n\n $payload=array();\n $payload['status']='ok';\n $payload['page']='show';\n $payload['region_city'] = $regionCity;\n $payload['center'] = $centers;\n\n return new Response(json_encode($payload));\n }", "title": "" }, { "docid": "8bf49945023e601f827e6c5da2a77657", "score": "0.51263493", "text": "public function getMatchingEventTagsJsonAction(Request $request){\n $searchTerm = \"\";\n\n //Check the format of the search string\n if(isset($_GET['term']) && ctype_alnum(trim(str_replace(' ','',$_GET['term']))) ){\n $searchTerm = $_GET['term'];\n $searchTerm = \"%$searchTerm%\";\n }\n\n\n #Define the SQL to execute\n $tagListSQL = \"SELECT HASHES_TAGS_KY AS id, TAG_TEXT AS label, TAG_TEXT AS value\n FROM HASHES_TAGS HT\n WHERE TAG_TEXT LIKE ?\n ORDER BY TAG_TEXT ASC\";\n\n #Obtain the tag list\n $tagList = $this->fetchAll($tagListSQL,array((string) $searchTerm));\n\n #Set the return value\n $returnValue = $this->app->json($tagList, 200);\n return $returnValue;\n}", "title": "" }, { "docid": "6b7329208965fd04da03a918386a1d41", "score": "0.51251787", "text": "protected function vendorsGetRequest()\n {\n\n $resourcePath = '/vendors';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api_key');\n if ($apiKey !== null) {\n $queryParams['api_key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "b3f7ab621755cf475651a04d3b0ee1c1", "score": "0.51180303", "text": "public function index()\n\t{\n\t\treturn Response::json(CategorieIngredient::get());\n\t}", "title": "" }, { "docid": "9192b4aaff512c0d49d7cba9a15f6b2c", "score": "0.51167613", "text": "public function sendRequestSearchToAswo(Request $request)\n {\n //https://shop.euras.com/eed.php?format=json&sessionid=auto&id=u8Md(cCX;1dsDF4&art=suggestliste&suchbg=\"+ request.term\n $url = \"https://shop.euras.com/eed.php?format=json&sessionid=auto&id=u8Md(cCX;1dsDF4&art=suggestliste&suchbg=\".rawUrlEncode($request->term);\n $json = file_get_contents($url);\n $readjson=json_decode($json, true);\n return $readjson;\n }", "title": "" }, { "docid": "ad5c52bd96989d927802838f29782770", "score": "0.5113846", "text": "protected function getSearchResultRequest(\n ?string $query = '',\n ?string $upc = '',\n ?string $gtin = '',\n ): Request {\n $contentType = self::contentTypes['getSearchResult'];\n\n $resourcePath = '/v3/items/walmart/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n $method = 'GET';\n\n // query params\n $queryParams = array_merge(\n ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? [],\n ObjectSerializer::toQueryValue(\n $upc,\n 'upc', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? [],\n ObjectSerializer::toQueryValue(\n $gtin,\n 'gtin', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? [],\n );\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n $contentType,\n $multipart\n );\n\n $defaultHeaders = parent::getDefaultHeaders();\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\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 } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n $query = ObjectSerializer::buildQuery($queryParams);\n $requestInfo = [\n 'path' => $resourcePath,\n 'method' => $method,\n 'timestamp' => $defaultHeaders['WM_SEC.TIMESTAMP'],\n 'query' => $query,\n ];\n\n // this endpoint requires Bearer authentication (access token)\n $token = $this->config->getAccessToken();\n if ($token) {\n $headers['WM_SEC.ACCESS_TOKEN'] = $token->accessToken;\n }\n\n $operationHost = $this->config->getHost();\n return new Request(\n $method,\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "cfc9af803c5ce3230b4e41f5bcfc5fb7", "score": "0.509881", "text": "protected function searchKeoRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteRecordCard/v1/Keo/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "5e27fa3f1673d560fea6ce03a4c1cd1b", "score": "0.50926703", "text": "public function search(Request $request)\n {\n $this->validate($request, [\n 'query' =>'required',\n 'type' =>'in:recipe,ingredient'\n ]);\n $query = $request->input('query');\n $type = $request->input('type');\n if ($type==\"recipe\") {\n $tag = Tag::where('name', $query)->first();\n if($tag != null)\n {\n $tagId = $tag->id;\n $result = Recipe::where('name', 'like', '%'.$query.'%')\n ->orWhereHas('tags', function ($q) use($tagId) {\n $q->where('tag_id', $tagId);\n }\n )->approved()->paginate(10);\n }\n else {\n $result = Recipe::where('name', 'like', '%'.$query.'%')->approved()->paginate(10);\n }\n\n return view('recipe.index')->with('recipes', $result);\n }\n if ($type==\"ingredient\") {\n $result = Ingredient::where('name', 'like', '%'.$query.'%')->paginate(10);\n return view('ingredient.index')->with('ingredients', $result);\n }\n }", "title": "" }, { "docid": "c8b5840d78e47af685cd2de1eb9ecf3f", "score": "0.50772", "text": "public function getRestaurantOrders(Request $request)\n {\n }", "title": "" }, { "docid": "dd8495502af423279d9aabf64489af4a", "score": "0.5073873", "text": "public function create()\n {\n $form = Ingredient::form();\n $unitsArr = Unit::all()->toArray();\n $units = [];\n foreach($unitsArr as $unit) {\n $units[$unit['name']] = $unit;\n }\n\n $attributeTypes = AttributeType::all()->toArray();\n foreach($attributeTypes as &$type) {\n $form['nutrients'][$type['safe_name']] = [\n 'id' => null,\n 'value' => '',\n 'attribute_type_id' => $type['id'],\n 'type_name' => $type['name'],\n ];\n }\n\n return response()\n ->json([\n 'form' => $form,\n 'units' => $units,\n 'attributeTypes' => $attributeTypes,\n ]);\n }", "title": "" }, { "docid": "d3abc7f7ecc2007aa0838e54c51700d5", "score": "0.5061614", "text": "public function searchSiteContentRequest($query)\n {\n // verify the required parameter 'query' is set\n if ($query === null || (is_array($query) && count($query) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $query when calling searchSiteContent'\n );\n }\n\n $resourcePath = '/food/site/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n true // required\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "481d5559e33c74341acf18f113bdef3a", "score": "0.5060282", "text": "public function getRecipe(Request $request)\n {\n // Check ID was supplied.\n $id = $request->input('id');\n if (!$id) {\n throw new InvalidArgumentException('\"id\" GET parameter missing.');\n }\n\n // Validate recipe ID.\n if (!$recipe = $this->csvData->where('id', '=', $id)->first()) {\n abort(404, 'The specified recipe could not be found.');\n }\n\n // Data found -- output encoded data.\n echo json_encode($recipe);\n }", "title": "" }, { "docid": "ff7aa93c77f8ed05f6d587fd22bb079e", "score": "0.5052313", "text": "protected function searchKeoGeneratedRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteRecordCard/v1/Keo/KeoGenerated/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "8a265e38b64161b3b6185f2d78dd9d95", "score": "0.5048887", "text": "public function index()\n {\n //TODO return list items for API\n return Ingredient::all();\n }", "title": "" }, { "docid": "a49abbf65c34950611a8653ad42729f1", "score": "0.50419956", "text": "public function search(Request $request) {\n\t\t$searchString = trim(strip_tags($request->get('ingrediente')));\n\n $recipe = Recipe::whereHas('ingredients', function ($query) use ($searchString)\n {\n $query->where('name', 'like', '%'.$searchString.'%');\n })->get();\n\t\treturn view('search',compact('recipe'));\n\t}", "title": "" }, { "docid": "95a82bdb1e3e268135dd8cace353cb22", "score": "0.50377554", "text": "public function search(Request $request) {\n // Mọi request gửi lên server đều đọc được bởi biến request\n // Khai báo 1 query\n $search = (new Promotion)->newQuery();\n if($request->exists('q')) {\n // Nếu request gửi lệnh có query dạng api/promotion/search?q=<keyword>\n // Thì sẽ thực hiện câu truy vấn\n $search->where('Contents', 'LIKE','%'.$request->q.'%'); \n }\n // Nếu có query q => trả về kết quả tìm kiềm \n // Nếu không get tất cả danh sách ra\n $result = $search->get();\n return response()->json([\n 'data' => $result\n ]);\n }", "title": "" }, { "docid": "9e58893ad25ae4efebbf6546a1124d0b", "score": "0.50341624", "text": "public function searchProductForRequest($search) {\n\n $fields = array(\n 'p.product_name',\n 'p.description',\n 'c.category_name'\n );\n\n foreach ($fields as $field)\n $this->addField($field);\n\n $this->addField('p.id');\n $this->addField('p.image');\n $this->addField('p.price');\n $this->addField('p.weight');\n $this->addField('p.unit');\n\n $this->addFrom('products p');\n $this->addFrom('left join categories c on c.id = p.category_id');\n\n foreach ($fields as $field)\n $this->addWhere($field . ' like \"%' . str_replace(' ', '%', $search) . '%\"', 'OR');\n\n $this->addLimit('20');\n\n $this->runQuery();\n\n }", "title": "" }, { "docid": "5d2c048a2e4e23385d30709b93566c0d", "score": "0.5013187", "text": "public function foodIngredientSearchPhpGetWithHttpInfo($find, $limit = null, $user_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\IngredientObject';\n $request = $this->foodIngredientSearchPhpGetRequest($find, $limit, $user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\IngredientObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "97e0a189e47515a089cd99fff4b7ac0b", "score": "0.5006615", "text": "public function foodIngredientSearchPhpGet($find, $limit = null, $user_id = null)\n {\n list($response) = $this->foodIngredientSearchPhpGetWithHttpInfo($find, $limit, $user_id);\n return $response;\n }", "title": "" }, { "docid": "de49f0f1a9774bea4bc32c9b163efd51", "score": "0.5005028", "text": "public function searchProducts(Request $request, $funnel_id, $step_id) {\n\n $data \t\t\t\t= array();\t\t\n $step\t\t\t\t= FunnelStep::find( $step_id );\n \n $data['type'] \t\t= $request->input( 'type' );\n $data['funnel_id'] = $step['funnel_id'];\n $data['step_id'] \t= $step['id'];\n $data['products'] = get_products( $step->funnel_id, $request->input( 'keyword' ) );\n \n return view('product.bump-product-list', compact('data'));\n }", "title": "" }, { "docid": "34613f2811665235e75b186b9973fee4", "score": "0.50010884", "text": "public function ProductSearch();", "title": "" }, { "docid": "233105d2bd963ca78c3b5716c4d76ed5", "score": "0.49781173", "text": "protected function getDigitalItemsRequest($_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null, $_placeholders = null)\n {\n\n $resourcePath = '/item/digital_library';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($_limit !== null) {\n $queryParams['_limit'] = ObjectSerializer::toQueryValue($_limit);\n }\n // query params\n if ($_offset !== null) {\n $queryParams['_offset'] = ObjectSerializer::toQueryValue($_offset);\n }\n // query params\n if ($_since !== null) {\n $queryParams['_since'] = ObjectSerializer::toQueryValue($_since);\n }\n // query params\n if ($_sort !== null) {\n $queryParams['_sort'] = ObjectSerializer::toQueryValue($_sort);\n }\n // query params\n if ($_expand !== null) {\n $queryParams['_expand'] = ObjectSerializer::toQueryValue($_expand);\n }\n // query params\n if ($_placeholders !== null) {\n $queryParams['_placeholders'] = ObjectSerializer::toQueryValue($_placeholders);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "090dcc3880a144ef1be009f66e96741a", "score": "0.49668682", "text": "public function index(Request $request)\n {\n $ingredients = Ingredient::name($request->name)\n ->orderBy('name')\n ->get();\n\n IngredientResource::withoutWrapping();\n return IngredientResource::collection($ingredients);\n }", "title": "" }, { "docid": "5992cd99fe258647512cf9dbabb8bf52", "score": "0.49548048", "text": "protected function getCategoriesRequest($filter_search = null, $filter_active = null, $size = '25', $page = '1', $order = 'id:ASC')\n {\n\n $resourcePath = '/categories';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($filter_search !== null) {\n $queryParams['filter_search'] = ObjectSerializer::toQueryValue($filter_search);\n }\n // query params\n if ($filter_active !== null) {\n $queryParams['filter_active'] = ObjectSerializer::toQueryValue($filter_active);\n }\n // query params\n if ($size !== null) {\n $queryParams['size'] = ObjectSerializer::toQueryValue($size);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($order !== null) {\n $queryParams['order'] = ObjectSerializer::toQueryValue($order);\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 (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\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 $httpBody = new MultipartStream($multipartContents); // for HTTP post (form)\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams); // for HTTP post (form)\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\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n $url = $this->config->getHost() . $resourcePath . ($query ? '?' . $query : '');\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 return new Request(\n 'GET',\n $url,\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e16e924f147eed79fce266790281845b", "score": "0.49468112", "text": "public function getAdvancedSearchResult(Request $request)\n {\n $search = $request->all();\n $hasSearch = false;\n foreach($search as $key => $param)\n {\n if($param != \"\")\n $hasSearch = true ;\n }\n if($hasSearch)\n {\n $items = $this->itemRepo->advancedSearch($search); \n foreach($items as $item)\n {\n if(Auth::check())\n {\n $user = Auth::user();\n $item->cart = $this->cartRepo->getUserCart($user->id, $item->id);\n $item->favorite = $this->favoritesRepo->getFavorites($user->id, $item->id);\n }else{\n $ip = $request->ip();\n $item->cart = $this->cartRepo->getCart($item->id, $ip);\n }\n $item->discount = (int)$item->discount;\n }\n $metals = [];\n if(isset($search['metals']))\n { \n foreach($search['metals'] as $metal)\n {\n $metals[] = $this->metalRepo->getMetalById($metal)->name;\n }\n }\n $gemstones = [];\n if(isset($search['gemstones']))\n {\n foreach($search['gemstones'] as $gemstone)\n {\n $gemstones[] = $this->gemstoneRepo->getGemstoneById($gemstone)->name;\n }\n }\n if(isset($search['collection']) && $search['collection'] !=0)\n {\n $searchData['collection'] = $this->collectionRepo->getCollection($search['collection'])->name;\n }\n if(isset($search['category']) && $search['category'] !=0)\n {\n $searchData['category'] = $this->categoryRepo->getCategory($search['category'])->category;\n }\n $searchData['title'] = $search['title'];\n $searchData['subtitle'] = $search['subtitle'];\n $searchData['description'] = $search['description'];\n $searchData['minPrice'] = $search['price_min'];\n $searchData['maxPrice'] = $search['price_max'];\n $searchData['gemstones'] = $gemstones;\n $searchData['metals'] = $metals;\n\n $data = [\n 'title' => 'Search Results | Jewelry Shop',\n 'items' => '',\n 'search' => $request['description'],\n 'searchData' => $searchData,\n 'meta_keywords' => $items,\n 'meta_description' => '',\n ];\n $data['items'] = $items->appends(Input::except('page'));\n return view('users.advanced_searched_items', $data);\n }else{\n return redirect()->back();\n }\n \n\n }", "title": "" }, { "docid": "708468322865da35c84907b28924c761", "score": "0.49434707", "text": "public function index(Request $request)\n {\n $empresas=DB::table('empresa')->get();\n $empresa_users=DB::table('empresa_users')->get();\n if($request)\n {\n $query=trim($request->get('searchText'));\n $ingredientes=DB::table('ingrediente as i')\n ->join('empresa as e','e.idempresa','=','i.idempresa')\n ->join('empresa_users as eu','eu.idempresa','=','e.idempresa')\n ->join('users as u','u.id','=','eu.idusers')\n ->select('i.idingrediente','i.nombre as ingrediente','e.idempresa as empresa','u.id as usuario')\n ->where('i.nombre','LIKE','%'.$query.'%')\n ->orderBy('i.idingrediente','desc')\n ->paginate(10);\n return view('ingredientes.index',[\"ingredientes\"=>$ingredientes,\"searchText\"=>$query,\"empresa_users\"=>$empresa_users,\"empresas\"=>$empresas]);\n }\n }", "title": "" }, { "docid": "a5f9f6617b2ef56f103292533ca4f1da", "score": "0.49390668", "text": "public function getConversationSuggestsRequest($query, $number = null)\n {\n // verify the required parameter 'query' is set\n if ($query === null || (is_array($query) && count($query) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $query when calling getConversationSuggests'\n );\n }\n\n $resourcePath = '/food/converse/suggest';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $query,\n 'query', // param base name\n 'string', // openApiType\n 'form', // style\n false, // explode\n true // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $number,\n 'number', // param base name\n 'number', // openApiType\n 'form', // style\n false, // explode\n false // required\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 = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5ecf0fe618f3b72be6c3fad3deaba3fe", "score": "0.49387082", "text": "public function index()\n {\n $ingredient = Ingredient::all();\n //dd($recipe);\n //dd($allRecips);\n if(!is_null($ingredient)) {\n return response()->json([\"status\" => $this->status_code, \"success\" => true, \"message\" => \"Ingredient was fatched successfully\", \"data\" => $ingredient]);\n }\n\n else {\n return response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"failed to fatch the Ingredient\"]);\n }\n }", "title": "" }, { "docid": "2b9fd982056d1dd25c2049bdbaaac78e", "score": "0.49372143", "text": "public function searchProducts(Request $request)\n {\n $query = $request->input('query');\n $data = Product::where('name','like','%'.$query.'%')->get();\n return response()->json($data);\n }", "title": "" }, { "docid": "bfea181a3417861d2dee3853b413b009", "score": "0.49345642", "text": "function _unh_d1_client_build_search_criteria($request, $args, $options) {\n $ret = array();\n \n // Test to see if we have a valid request.\n if (array_key_exists($request, UNH_D1_CLIENT_API_REQUESTS)) {\n // Get the definition of the request.\n $base = UNH_D1_CLIENT_API_REQUESTS[$request];\n \n // Build a default request structure.\n $opts = _unh_d1_client_build_default_request_body($request);\n\n if (!empty($args)) {\n // Add in the args for the request.\n $opts = _unh_d1_client_build_request_body($request, $opts, $args, $options);\n }\n \n $ret = $opts; \n }\n\n return $ret;\n}", "title": "" }, { "docid": "831eca44b25f553e3d8358db41c9aa53", "score": "0.4932928", "text": "protected function searchKeoExcavatedRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteRecordCard/v1/Keo/KeoExcavated/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "db43e9d1e83bec8e328d59b2ac0c6fe0", "score": "0.49214455", "text": "public function init_request() {\n $xParm = array();\n $getParms = new Parm();\n list($xParm['keyin'],$xParm['keyin1'],$xParm['termslp1']) = \n $getParms->getsuggestParms();\n $xParm['getParms'] = $getParms;\n $xParm['english'] = $getParms->english;\n $xParm['filterin'] = $getParms->filterin;\n\n $term = $getParms->getsuggestTerm;\n $request = array();\n $request['dict'] = $getParms->dict;\n $request['term'] = $term;\n $request['termslp1'] = $xParm['termslp1'];\n $request['input'] = $getParms->filterin;\n if ($getParms->status != 200) {\n $this->result['status'] = $getParms->status;\n $this->result['errorinfo'] = $getParms->errorinfo;\n }else if ($term == '') {\n $this->term_error($term);\n }\n $this->xParm = $xParm;\n return $request;\n }", "title": "" }, { "docid": "981502e9309fa22e10449150a59ccba6", "score": "0.49146652", "text": "public function postRecipe()\n {\n \n if(Input::has('generate'))\n {\n $cusines = Input::get('cuisine');\n \n $ingredients = Input::get('ingredients');\n \n foreach( $cusines as $key => $val)\n {\n $cuisine_selected[] = $val; \n }\n if(isset($ingredients))\n {\n foreach($ingredients as $key => $val)\n {\n foreach($val as $key1 => $val1)\n {\n $ingredients_selected[] = $val1;\n }\n }\n }\n \n if(isset($cuisine_selected))\n {\n if(isset($ingredients_selected))\n {\n $recipes = Recipe::search($cuisine_selected,$ingredients_selected);\n }\n else\n {\n $recipes = Recipe::search($cuisine_selected);\n }\n }\n # Generates a view that displays the recipes retreived from the database based on the cuisine \n # and ingredients selected by the user. \n return View::make('recipe_post_index')\n ->with('recipes',$recipes);\n \n \n }\n \n }", "title": "" }, { "docid": "ee53b52e9cde02f886579195a9fb2321", "score": "0.49125785", "text": "public function actionRecommendFood($ingestion)\r\n {\r\n $model = new Food();\r\n \r\n return $model->Ingestion($ingestion, Yii::$app->request->queryParams);\r\n }", "title": "" }, { "docid": "552ecc50de49188d1c2ad5b5aff661fc", "score": "0.4903297", "text": "public function search($query = '', $request = array(), $returnRaw = false) {\n\n\t\t// We will end up sending $request to elasticsearch.\n\t\t// the ['body'] key will be built from sending $query to buildQueryFromStringOrArray(),\n\t\t// and some certain keys from $request will be added to $request['body'].\n\n\t\t$request = $this->addConfigToRequest($request);\n\t\t$request['method'] = 'GET';\n\t\t$request['uri']['path'] .= '/_search';\n\n\t\t$requestBody = $this->buildQueryFromStringOrArray($query);\n\n\t\t// copy from $request to $requestBody - simple field copies.\n\t\t// 'from' and 'size' limited to integer\n\t\tforeach (array('from', 'size') as $intField) {\n\t\t\tif (!empty($request[$intField])) {\n\t\t\t\t$requestBody[$intField] = intval($request[$intField]);\n\t\t\t}\n\t\t}\n\t\t// 'min_score' simple copy\n\t\tforeach (array('min_score') as $field) {\n\t\t\tif (!empty($request[$field])) {\n\t\t\t\t$requestBody[$field] = $request[$field];\n\t\t\t}\n\t\t}\n\n\t\t// copy from $request to $requestBody - special cases\n\t\tif (!empty($request['limit']) && empty($requestBody['size'])) {\n\t\t\t// 'limit' as a synonym for size\n\t\t\t$requestBody['size'] = intval($request['limit']);\n\t\t}\n\t\tif (!empty($request['page']) && !empty($request['size'])) {\n\t\t\t// auto set 'from' if 'page' and 'size' are set\n\t\t\t$requestBody['from'] = (intval($request['page']) - 1) * intval($request['size']);\n\t\t}\n\t\tif (!empty($request['fields'])) {\n\t\t\t// 'fields' may be an array\n\t\t\t$requestBody['_source'] = is_array($request['fields']) ? array_values($request['fields']) : explode(',', $request['fields']);\n\t\t}\n\n\t\t$request['body'] = $this->asJson($requestBody);\n\t\t$ESresponse = $this->request($request);\n\n\t\tif ($returnRaw) {\n\t\t\treturn $ESresponse;\n\t\t}\n\t\tif (empty($ESresponse['hits']['hits'])) {\n\t\t\treturn array();\n\t\t}\n\t\t$output = array();\n\n\t\tforeach (array_keys($ESresponse['hits']['hits']) as $i) {\n\t\t\t$hit = $ESresponse['hits']['hits'][$i];\n\t\t\t// Always include ID\n\t\t\t$output[$i] = array(\n\t\t\t\t'_id' => $hit['_id'],\n\t\t\t);\n\n\t\t\t// Single fields we add if existing\n\t\t\tforeach (array('_score') as $singleField) {\n\t\t\t\tif (!empty($hit[$singleField])) {\n\t\t\t\t\t$output[$i][$singleField] = $hit[$singleField];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// These are arrays that are merged in if they exist\n\t\t\tforeach (array('_source', 'fields') as $array_field) {\n\t\t\t\tif (!empty($hit[$array_field])) {\n\t\t\t\t\t$output[$i] += $hit[$array_field];\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($ESresponse['hits']['hits'][$i]);\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "0930d2698af5a70ef5edf4504b51a3a8", "score": "0.48962635", "text": "public function addInIngredientCategoryAction() {\n if (!$this->getUser()) {\n return $this->redirect($this->generateUrl('login'));\n }\n\n $entity = new SuperMarket();\n\n $em = $this->getDoctrine()->getManager();\n\n $title = $this->getRequest()->request->get('title');\n $ingredientCategoryId = $this->getRequest()->request->get('id');\n $error = array();\n if (!V::not_null($title)) {\n array_push($error, \"يرجى إدخال الأسم\");\n $return = FALSE;\n }\n\n if (count($error) > 0) {\n $return = $error[0];\n return new Response(json_encode(array('error' => 1, 'message' => $return)));\n }\n\n $entity->setTitle($title);\n\n $entity->setPerson($this->getUser()->getPerson());\n\n $ingredientCategory = $em->getRepository('CMSBundle:IngredientCategory')->find($ingredientCategoryId);\n if (!$ingredientCategory) {\n return new Response(json_encode(array('error' => 1, 'message' => 'خاطئ ')));\n }\n $entity->setIngredientCategory($ingredientCategory);\n $em->persist($entity);\n $em->flush();\n\n\n $return = array(\n 'error' => 0,\n 'message' => $this->renderView('UserBundle:FrontEnd/SuperMarket:superMarketItemAjax.html.twig', array(\n 'entity' => $entity\n ))\n );\n return new Response(json_encode($return));\n }", "title": "" }, { "docid": "badb0b2f6fc37d81762d29dd4eb22096", "score": "0.48624253", "text": "public function update(Request $request, Ingredient $ingredient)\n {\n //\n }", "title": "" }, { "docid": "f1ac5421877b8ce1d837ab164350de1d", "score": "0.48617142", "text": "public function search(Request $request)\n {\n \n $query = [\n \"room_id\" => $this->room_id,\n ];\n\n $params[\"plugin_id\"] = $this->plugin_id;\n $params[\"organization_id\"] = $this->organization_id;\n $query = $request->filter;\n\n $expense = $this->model->find($params, $query);\n return response()->json(['status' => 'expense retrieved successfully', 'data' => $expense], 200); \n \n\n }", "title": "" }, { "docid": "33c9bbff14629d20031ea2ebc0b054dc", "score": "0.4858892", "text": "public function newAction()\n {\n $entity = new Ingredient();\n $form = $this->createForm(new IngredientType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "991794453e9a10508086ff966123807e", "score": "0.485225", "text": "public function search(Request $request){\n\n }", "title": "" }, { "docid": "8ec826a28252ca2bd009542a2118748b", "score": "0.48497725", "text": "public static function getAllVegDish($request)\n {\n if (!empty($request[self::restaurant_token_id])) {\n\n $data = self::select(\n self::dish_id,\n self::restaurant_id,\n self::dish_type,\n self::dish_item,\n self::dish_name,\n self::dish_description,\n self::dish_price,\n self::dish_photo,\n )\n ->where(self::restaurant_token_id, $request[self::restaurant_token_id])\n ->whereRaw('LOWER(`dish_type`) LIKE ? ',strtolower($request['filter_type']).'%')\n ->get();\n\n foreach ($data as $key => $value) {\n\n $value->menuUrl = asset('uploads/dish/' . $value[self::dish_photo]);\n } \n\n if(!$data->isEmpty()){\n \n return APIResponses::success(\n \"Filter apply successfully\",\n \"filterDish\"\n ,$data\n );\n }\n else return APIResponses::failed_result(\"No dish available on this filter please select another filter\");\n }\n else return APIResponses::failed_result(\"Restaurant token mistMatch\");\n }", "title": "" }, { "docid": "1204e85b79443eecb5c3f1b3c9c3c528", "score": "0.48457134", "text": "public function search(Request $request) : Collection;", "title": "" }, { "docid": "338a4707686d5b9dff4c5f3ba1059c56", "score": "0.4828466", "text": "public function gETAdjustmentsRequest()\n {\n\n $resourcePath = '/adjustments';\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 []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8a9281baba19928470fe42684a30ed2c", "score": "0.48270282", "text": "protected function searchKeoForwardedRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteRecordCard/v1/Keo/KeoForwarded/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "fb83bb723dfef40e3312635a034c285f", "score": "0.4821999", "text": "function elastic_rest($method,$uri,$query=NULL,$json=NULL,$options=NULL){\n\t global $elastic_url,$elastic_link,$elastic_option_defaults;\n\t\n\t // Connect \n\t if(!isset($elastic_link)) $elastic_link = curl_init();\n\t\n\t //echo \"<br>DB operation: $method $uri $query $json\\n\";\n\t\n\t // Compose query\n\t $options = array(\n\t\tCURLOPT_URL => $elastic_url.$uri.\"?\".$query,\n\t\tCURLOPT_CUSTOMREQUEST => $method, // GET POST PUT PATCH DELETE HEAD OPTIONS \n\t\tCURLOPT_POSTFIELDS => $json,\n\t ); \n\t curl_setopt_array($elastic_link,($options + $elastic_option_defaults)); \n\t\n\t // send request and wait for response\n\t $response = json_decode(curl_exec($elastic_link),true);\n\t\n\t //echo \"<br>response from DB: \\n\";\n\t //print_r($response);\n\t \n\t return($response);\n\t}", "title": "" }, { "docid": "e95a280aee43acbad8370f0cdc41de16", "score": "0.4820871", "text": "public function gloria_food(Request $request) \n {\n if($request->isMethod(\"POST\")) {\n \n $server_key = $request->header(\"Authorization\");\n\n // !--- need to change this to asymmetric crypto checking\n $merchant_check = Merchant::where('shared_secret', $server_key)->count(); \n \n if ($merchant_check > 0){\n try{\n $merchant_id = Merchant::where('shared_secret', $server_key)->first()->id;\n\n foreach($request->orders as $order){\n \n // -- Location data\n $data['pick_up_latitude'] = $order[\"restaurant_latitude\"] ? $order[\"restaurant_latitude\"] : '0.00';\n $data['pick_up_longitude'] = $order[\"restaurant_longitude\"] ? $order[\"restaurant_longitude\"] : '0.00';\n $data['pick_up_location'] = $order[\"restaurant_street\"] . ' ' . $order[\"restaurant_city\"];\n $data['drop_off_longitude'] = $order[\"longitude\"] ? $order[\"longitude\"] : '0.00';\n $data['drop_off_latitude'] = $order[\"latitude\"] ? $order[\"latitude\"] : '0.00';\n $data['drop_off_location'] = $order[\"client_address\"];\n\n try{\n if($data['drop_off_latitude' == '0.00']){\n $dropoff_geocode = $this->request_helper->GetLatLng($order[\"client_address\"]);\n $data['drop_off_longitude'] = $dropoff_geocode[1];\n $data['drop_off_latitude'] = $dropoff_geocode[0];\n }\n }\n catch(\\Exception $e){\n $data['drop_off_longitude'] = '0.00';\n $data['drop_off_latitude'] = '0.00';\n }\n\n //$pickup_geocode = $this->request_helper->GetLatLng($pickup_location->country . ' ' . $pickup_location->locality . ' ' . $pickup_location->address_line_1);\n\n // --- Customer data\n // --- Cut australian code from client mobile number\n $data['country_code'] = \"61\";\n $data['mobile_number'] = ltrim($order[\"client_phone\"], \"+\".$data['country_code']);\n\n $data['first_name'] = $order[\"client_first_name\"];\n $data['last_name'] = $order[\"client_last_name\"];\n $data['email'] = $order[\"client_email\"];\n \n $data['delivery_fee'] = null;\n \n try {\n if ($order[\"items\"][0][\"name\"] == \"DELIVERY_FEE\"){\n $data['delivery_fee'] = $order[\"items\"][0][\"total_item_price\"];\n }\n } \tcatch (\\Exception $e) {\n logger('getting delivery fee error : '.$e->getMessage());\n }\n\n $user = $this->get_or_create_rider((object)$data);\n \n\n $ride_request = $this->create_ride_request((object)$data, $user);\n\n //create order\n $new_order = new HomeDeliveryOrder;\n\n $accepted_time = new \\Carbon\\Carbon($order[\"accepted_at\"]);\n $fulfill_time = new \\Carbon\\Carbon($order[\"fulfill_at\"]);\n $est_time = $fulfill_time->diffInMinutes($accepted_time);\n try{\n if($est_time = 30){\n $est_time = 30;\n }\n else if($est_time > 46){\n $est_time = $est_time - 30;\n }\n else{\n $est_time = 45;\n }\n }\n catch(\\Exception $e){\n //\n }\n\n $get_fare_estimation = $this->request_helper->GetDrivingDistance($data['pick_up_latitude'], $data['drop_off_latitude'] ,$data['pick_up_longitude'], $data['drop_off_longitude']);\n\n if ($get_fare_estimation['status'] == \"success\") {\n if ($get_fare_estimation['distance'] == '') {\n $get_fare_estimation['distance'] = 0;\n }\n }\n else{\n $get_fare_estimation['distance'] = 0;\n }\n \n $new_order->distance = $get_fare_estimation['distance'];\n $new_order->estimate_time = $est_time;\n $new_order->fee = 0;\n $new_order->customer_id = $user->id;\n $new_order->ride_request = $ride_request->id;\n $new_order->order_description = $order[\"instructions\"];\n $new_order->merchant_id = $merchant_id;\n\n $merchant = Merchant::where('id', $merchant_id)->first();\n $fee = 0.0;\n if($data['delivery_fee']){\n $fee = $data['delivery_fee'];\n }\n else{\n if(($get_fare_estimation['distance']/1000) > $merchant->delivery_fee_base_distance){\n $fee = $merchant->delivery_fee + $merchant->delivery_fee_per_km * ($get_fare_estimation['distance']/1000 - $merchant->delivery_fee_base_distance);\n }\n else{\n $fee = $merchant->delivery_fee;\n }\n }\n $new_order->fee = round($fee, 2);\n \n $new_order->save();\n\n $this->notify_drivers((object)$data, 'New job(s) in your location');\n\n return response()->json([\n 'status_code' => '1',\n 'status_message' => 'Successfully created',\n ]);\n }\n }\n catch(\\Exception $e){\n $data = $request->all();\n //in case of bad order data \n //put that order information \n //in db to manual inserting\n $bad_order = new BadOrders;\n $bad_order->secret = $server_key;\n $bad_order->description = json_encode($data);\n $bad_order->save();\n\n $merchant_name = Merchant::where('shared_secret', $server_key)->first()->name;\n\n $emails = ['[email protected]', '[email protected]'];\n $content = [\n 'first_name' => '_'\n ];\n $data['content'] = json_encode($data, JSON_PRETTY_PRINT);\n $data['first_name'] = $content['first_name'];\n $data['merchant'] = $merchant_name;\n // Send Forgot password email to give user email\n foreach($emails as $email){\n Mail::send('emails.bad_order', $data, function($message) use ($email, $content){\n $message->to($email, $content['first_name'])->subject('Ride On New bad data order');\n $message->from('[email protected]','Ride on Tech support');\n });\n }\n\n return array(\n 'status' => false,\n 'status_message' => $e->getMessage(),\n );\n }\n }\n }\n }", "title": "" }, { "docid": "60b4e8d86aa2f23bdf6d6afe771c219e", "score": "0.48201045", "text": "public function search(Request $request)\n {\n /*****************************\n * Required parameters:\n * - Airport ID\n * - Start date\n * - End date\n *\n * Optional parameters\n * - Start time\n * - End time\n *****************************/\n $formRequest = $request->only(['airport', 'start_date', 'end_date', 'start_time', 'end_time']);\n $application = $request->header('appname');\n $service = $request->header('service');\n\n if (! $this->validateFields(['appname' => $application, 'service' => $service], $this->headerRules)) {\n return $this->respondValidationError(\"Validation errors\", $this->errors);\n }\n\n if (! $this->validateFields($formRequest, $this->rules)) {\n return $this->respondValidationError(\"Validation errors\", $this->errors);\n }\n\n if (! $this->isAuthorized($application, $service)) {\n return $this->respondWithError($this->errors);\n }\n\n $products = Product::search($formRequest['airport'], $formRequest['start_date'], $formRequest['end_date'], $formRequest['start_time'], $formRequest['end_time']);\n\n return $this->respond([\n 'status' => 'success',\n 'status_code' => $this->getStatusCode(),\n 'message' => 'Success',\n 'data' => [\n 'products' => $products\n ]\n ]);\n }", "title": "" }, { "docid": "55a3360e28d84f09762b555d4a7af8f1", "score": "0.48162678", "text": "public function shopSearch(Request $request)\n {\n if ($request->location && $request->service){\n $location = $request->location;\n $service = $request->service;\n $shopResult = Shop::where(\"location\", $location)->where(\"service\",\"LIKE\", \"%\".$service.\"%\")->get();\n return response()->json([\n 'item' => $shopResult\n ]);\n }\n else {\n if ($request->location) {\n $parm = $request->location;\n $shopLocation = Shop::where(\"location\", $parm)->get();\n return response()->json([\n 'item' => $shopLocation\n ]);\n }\n if ($request->service) {\n $parm = $request->service;\n $shopService = Shop::where(\"service\",\"LIKE\", \"%\".$parm.\"%\")->get();\n return response()->json([\n 'item' => $shopService\n ]);\n }\n }\n }", "title": "" }, { "docid": "3b2e2084d14ec2f7d83e7e407c54a883", "score": "0.48136616", "text": "public function getListReviewFoods() {\n $response = array(\n 'error' => array(\n 'code' => 404,\n 'message' => \"Don't have 3 agrumments for this request : from, count, food id.\"),\n 'food' => array(),\n 'listReview' => array()\n );\n\n if (trim($_GET['from']) != '' && trim($_GET['count']) != '' && (isset($_GET['foodId']) && trim($_GET['foodId']) != '')){\n\n $response['error']['message'] = 'Connect successfully !';\n $response['error']['code'] = 0;\n $from = $_GET['from'];\n $count = $_GET['count'];\n $food_id = $_GET['foodId'];\n /* get reviews items by food id\n * get food info for this\n */\n\n /* get reviews info items\n */\n $review_items = $this->BFoodReview->getListFoodReviewRange($food_id,$from,$count);\n $listReview = array();\n\n for($i=0; $i<count($review_items); $i++){\n $review_item = $review_items[$i]['b_food_review'];\n array_push($listReview, array(\n 'reviewId' => $review_item['id'],\n 'name' => $this->User->find('first', array('conditions' => array('id' => $review_item['user_id'])))['User']['user_name'],\n 'rate' => array(\n 'average' => ($review_item['price'] + $review_item['quality'] + $review_item['decoration'])/3,\n 'price' => $review_item['price'],\n 'quality' => $review_item['quality'],\n 'decoration'=> $review_item['decoration']\n ),\n 'date' => $review_item['update_time'],\n 'title' => $review_item['title'],\n 'content' => $review_item['content'],\n 'like' => $this->BFoodReviewLike->countReviewLike($review_item['id']),\n 'likestatus'=> $this->BFoodReview->checkLikeStatus($review_item['id'], $food_id),\n 'comment' => $this->BFoodComment->countComment($review_item['id'])\n )\n );\n }\n\n //get food info item\n $food_record = $this->CFood->find('first',array('conditions'=>array('id'=>$food_id)))['CFood'];\n $food_result = array(\n \"id\" => $food_id,\n \"imageUrl\" => $food_record['image_url'],\n \"rate\" => array(\n \"average\" => 0,\n \"price\" => $this->BFoodReview->Get_AVG_AnField('price', array('food_id' => $food_id)),// get avg for price \n \"quality\" => $this->BFoodReview->Get_AVG_AnField('quality', array('food_id' => $food_id)),// get avg for quality\n \"decoration\" => $this->BFoodReview->Get_AVG_AnField('decoration',array('food_id' => $food_id)),// get avg for decoretion\n \"excellentCount\" => $this->BFoodReview->getCountRatingLevel($listReview,9,10),\n \"goodCount\" => $this->BFoodReview->getCountRatingLevel($listReview,7,9),\n \"averageCount\" => $this->BFoodReview->getCountRatingLevel($listReview,4,7),\n \"badCount\" => $this->BFoodReview->getCountRatingLevel($listReview,1,4)\n ),\n \"name\" => $food_record['name'],\n \"price\" => $food_record['price'],\n \"sale\" => $food_record['sale'],\n \"discount\" => $food_record['discount'],\n \"type\" => $food_record['type']\n );\n $food_result['rate']['average'] = ($food_result['rate']['price'] + $food_result['rate']['quality'] + $food_result['rate']['decoration'])/3;\n\n $response['food'] = $food_result;\n $response['listReview'] = $listReview;\n }\n echo json_encode($response);\n }", "title": "" }, { "docid": "6c9b899c8aa5f68bac5693bf034458b1", "score": "0.48130578", "text": "protected function customerLedgerItemsV2GetRequest()\n {\n\n $resourcePath = '/v2/customerledgeritems';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\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\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ab88dd22a3b4db1031e6858166842177", "score": "0.48047918", "text": "public function searchClientForRequest($search) {\n\n $fields = array(\n 'c.client_name',\n 'c.cpf_cnpj',\n 'c.email',\n 'c.corporate_name',\n 'c.state_registration',\n 'c.municipal_registration',\n 'c.contact'\n );\n\n foreach ($fields as $field)\n $this->addField($field);\n\n $this->addField('c.id');\n $this->addField('group_concat(p.phone_number separator \",\") as phones');\n $this->addField('c.client_type');\n $this->addField('c.image');\n\n $this->addFrom('clients c');\n $this->addFrom('left join client_phone p on p.client_id = c.id');\n\n foreach ($fields as $field)\n $this->addWhere($field . ' like \"%' . str_replace(' ', '%', $search) . '%\"', 'OR');\n\n $this->addWhere('p.phone_number like \"%' . str_replace(' ', '%', $search) . '%\"', 'OR');\n $this->addGroup('c.id');\n $this->addLimit('10');\n\n $this->runQuery();\n\n }", "title": "" }, { "docid": "d6c32a990121890da6f688dc12146d4b", "score": "0.48024908", "text": "public function createAction(Request $request)\n {\n $entity = new Ingredient();\n $form = $this->createForm(new IngredientType(), $entity);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('ingredient_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "d905650b87307833c75fb322861686a6", "score": "0.4800112", "text": "public function searchCustomer(Request $request)\n {\n// $term = $request->has('term') ? $request->input('term') : null ;\n// $query = $request->has('query') ? $request->input('query') : $term;\n\n\n if ($request->has('term'))\n {\n $search = $request->term;\n\n $customers = \\App\\Customer::where( 'name_fiscal', 'LIKE', '%'.$search.'%' )\n ->orWhere( 'name_commercial', 'LIKE', '%'.$search.'%' )\n ->orWhere( 'identification', 'LIKE', '%'.$search.'%' )\n// ->with('currency')\n// ->with('addresses')\n ->take( intval(\\App\\Configuration::get('DEF_ITEMS_PERAJAX')) )\n ->get();\n\n// return $customers;\n// return Product::searchByNameAutocomplete($query, $onhand_only);\n// return Product::searchByNameAutocomplete($request->input('query'), $onhand_only);\n// response( $customers );\n// return json_encode( $customers );\n return response()->json( $customers );\n }\n\n // Otherwise, die silently\n return json_encode( [ 'query' => '', 'suggestions' => [] ] );\n \n }", "title": "" }, { "docid": "3c560b1b90dd7941b9b6525b992051d8", "score": "0.47999835", "text": "public function index(Request $request)\n {\n $text = $request->get('query');\n return FoodResource::collection(Food::with(['photos', 'category', 'comments.user'])->when($text, function ($query) use ($text) {\n return $query->where('name', 'like', '%' . $text . '%');\n })->paginate(10));\n }", "title": "" }, { "docid": "8f755e5046b2f823f13e42b6f00a5f11", "score": "0.47955757", "text": "function get ()\n {\n $text_autocomplete = $this->input->post ( 'query' );\n $RequestStatus = Doctrine_Core::getTable ( 'RequestStatus' )->retrieveAll ($text_autocomplete);\n\n if ( $RequestStatus->count () )\n {\n echo '({\"total\":\"' . $RequestStatus->count () . '\", \"results\":' . $this->json->encode ( $RequestStatus->toArray () ) . '})';\n }\n else\n {\n echo '({\"total\":\"0\", \"results\":[]})';\n }\n }", "title": "" }, { "docid": "e656fa96e7e4a566ff0d42f800600c1a", "score": "0.47937107", "text": "public function search(Request $request)\n {\n $value=$request->input('nom');\n $p=Client::with(\"ville\")->where('nom', 'LIKE', '%'.$value.'%')->orWhere('prenom', 'LIKE', '%'.$value.'%')->get();\n return ClientResource::collection($p);\n // print($p);\n // die();\n }", "title": "" }, { "docid": "568f7f2002241d0dee106f121dabc01b", "score": "0.47906974", "text": "public function getList()\n {\n $this->logger->debug(\"Inside MovieRestfulController, getList() HTTP request handler\");\n \n $data = (array) $this->getRequest()->getQuery(); // return array\n if (! array_key_exists('s', $data)) {\n $data = array(\n \"s\" => constant(\"SAMPLE_SEARCH_STRING\"), // constant(\"SAMPLE_SEARCH_STRING\"),\n \"apikey\" => $this->omdbApiConfig->OMDb_API->OMDb_API_KEY\n );\n } else\n $data[\"apikey\"] = $this->omdbApiConfig->OMDb_API->OMDb_API_KEY;\n \n $this->client->resetParameters($clearCookies = false);\n \n $this->client->setMethod(Request::METHOD_GET);\n $this->client->setParameterGet($data);\n $this->client->send();\n $response = $this->client->getResponse();\n \n $fixtureModelJson = \"{\\\"Search\\\":[{\\\"Title\\\":\\\"Star Trek\\\",\\\"Year\\\":\\\"2009\\\",\\\"imdbID\\\":\\\"tt0796366\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMjE5NDQ5OTE4Ml5BMl5BanBnXkFtZTcwOTE3NDIzMw@@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: Into Darkness\\\",\\\"Year\\\":\\\"2013\\\",\\\"imdbID\\\":\\\"tt1408101\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMTk2NzczOTgxNF5BMl5BanBnXkFtZTcwODQ5ODczOQ@@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: Beyond\\\",\\\"Year\\\":\\\"2016\\\",\\\"imdbID\\\":\\\"tt2660888\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BZDRiOGE5ZTctOWIxOS00MWQwLThlMDYtNWIwMDQwNzBjZDY1XkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek II: The Wrath of Khan\\\",\\\"Year\\\":\\\"1982\\\",\\\"imdbID\\\":\\\"tt0084726\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMzcyYWE5YmQtNDE1Yi00ZjlmLWFlZTAtMzRjODBiYjM3OTA3XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: The Next Generation\\\",\\\"Year\\\":\\\"19871994\\\",\\\"imdbID\\\":\\\"tt0092455\\\",\\\"Type\\\":\\\"series\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BNDViYjAyZWUtNGQxMy00MDUyLTlkZTAtOWNkY2M5ZTk5MTE5XkEyXkFqcGdeQXVyNTA4NzY1MzY@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: The Motion Picture\\\",\\\"Year\\\":\\\"1979\\\",\\\"imdbID\\\":\\\"tt0079945\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BNzNlMzNlNmQtNmYzNS00YmU5LWIzYWQtMDRkYzIzNzEzOTIyXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek IV: The Voyage Home\\\",\\\"Year\\\":\\\"1986\\\",\\\"imdbID\\\":\\\"tt0092007\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMGY2MDE2MGQtMjczYi00YTdhLWIzNzktNDk2NzMzZmYwMTJjXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: Generations\\\",\\\"Year\\\":\\\"1994\\\",\\\"imdbID\\\":\\\"tt0111280\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BNjFiMzc4YzAtNGMzYS00NjI0LWJhYTYtN2JiOTI2ODczYzE3XkEyXkFqcGdeQXVyNTUyMzE4Mzg@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek III: The Search for Spock\\\",\\\"Year\\\":\\\"1984\\\",\\\"imdbID\\\":\\\"tt0088170\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMTliZGVjZmMtNzEzMy00MzVhLWFhYjYtNDhlYmViNGNiMGFlXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg\\\"},{\\\"Title\\\":\\\"Star Trek: Nemesis\\\",\\\"Year\\\":\\\"2002\\\",\\\"imdbID\\\":\\\"tt0253754\\\",\\\"Type\\\":\\\"movie\\\",\\\"Poster\\\":\\\"https:\\/\\/images-na.ssl-images-amazon.com\\/images\\/M\\/MV5BMjAxNjY2NDY3NF5BMl5BanBnXkFtZTcwMjA0MTEzMw@@._V1_SX300.jpg\\\"}],\\\"totalResults\\\":\\\"285\\\",\\\"Response\\\":\\\"True\\\"}\";\n \n if ($response->isSuccess()) {\n return new JsonModel(json_decode($response->getBody(), true)[\"Search\"]);\n } else {\n if ($this->env == 'development') { // temporary solution - using a fixture when movie API is unavailable\n return new JsonModel(json_decode($fixtureModelJson, true)[\"Search\"]);\n }\n }\n }", "title": "" }, { "docid": "9559c618dac62a37f5c21ba2ae1e6670", "score": "0.4784992", "text": "protected function searchKeoTreatedRequest($request = null)\n {\n\n $resourcePath = '/WasteRegister/WasteRecordCard/v1/Keo/KeoTreated/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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": "052f834d1e34c2f89d502b112c8dd359", "score": "0.47848237", "text": "public function searchNew(Request $request)\n {\n // dd($request->all());\n $inputs = [];\n $neighborhoodCount = [];\n $hrefSeeMore='';\n $filters = [0,0,0,0,0,[],[]];\n $houseTypes = (!isset($request->houseType0) && !isset($request->houseType1) && !isset($request->houseType2)) ?\n [1,1,1] :[0,0,0];\n $others = [0,0,0];\n \n if (isset($request->neighborhood) ) {\n $inputs['alld']=$request->neighborhood;\n }else\n {\n $inputs['alld'] = [];\n }\n if (isset($request->date)) {\n $inputs['date']=$request->date;\n if (strpos($hrefSeeMore,'?') === 0) {\n $hrefSeeMore=$hrefSeeMore.'&date_filter='.$request->date;\n } else {\n $hrefSeeMore=$hrefSeeMore.'?date_filter='.$request->date;\n }\n }\n\n if (isset($request->houseType0))\n {\n $houseTypes[0] = (int)$request->houseType0;\n }\n\n if (isset($request->houseType1))\n {\n $houseTypes[1] = (int)$request->houseType1;\n }\n\n if (isset($request->houseType2))\n {\n $houseTypes[2] = (int)$request->houseType2;\n }\n\n if (isset($request->otherFilters0))\n {\n $others[0] = (int)$request->otherFilters0;\n }\n\n if (isset($request->otherFilters1))\n {\n $others[1] = (int)$request->otherFilters1;\n }\n\n if (isset($request->otherFilters2))\n {\n $others[2] = (int)$request->otherFilters2;\n }\n\n if (isset($request->enviroment))\n {\n $filters[0] = $request->enviroment;\n }\n if (isset($request->enviroment))\n {\n $filters[0] = $request->enviroment;\n }\n\n if (isset($request->availableRooms))\n {\n $filters[2] = $request->availableRooms;\n }\n\n if (isset($request->maxRooms))\n {\n $filters[3] = $request->maxRooms;\n }\n\n if (isset($request->privateBathroom))\n {\n $filters[1] = $request->privateBathroom;\n if (strpos($hrefSeeMore,'?') === 0) {\n $hrefSeeMore=$hrefSeeMore.'&private_bathroom_filter='.$request->privateBathroom;\n } else {\n $hrefSeeMore=$hrefSeeMore.'?private_bathroom_filter='.$request->privateBathroom;\n }\n }\n\n if (isset($request->maxPrice))\n {\n $filters[4] = $request->maxPrice;\n if (strpos($hrefSeeMore,'?') === 0) {\n $hrefSeeMore=$hrefSeeMore.'&price_filter='.$request->maxPrice;\n } else {\n $hrefSeeMore=$hrefSeeMore.'?price_filter='.$request->maxPrice;\n }\n }\n\n $filters[5] = $houseTypes;\n $filters[6] = $others;\n // if($inputs['alld'] != \"\")\n // {\n $city = City::where('city_code',Session::get('city_code'))->first();\n $zones = self::getZones($city->name);\n\n $houses = self::getHousesSearch($inputs['alld'],$city);\n\n if (isset($request->sortBy)) {\n $houses=self::sortHousesBy($houses,$request->sortBy);\n }else\n {\n $page = Input::get('page', 1); // Get the ?page=1 from the url\n if($page < 2){\n $houses=self::orderHouses($houses,[1,0]);\n }\n }\n $currency = new Currency;\n $currency = $currency->getCurrentCurrency();\n\n $houses =self::filter($houses, $filters, $currency);\n\n $houses->toArray();\n $houses=self::paginateCollection($houses, 18, true);\n [$price_lower,$price_upper]=self::getPrices();\n $houses->appends(request()->all())->links();\n $favorites = [];\n if (Auth::check()) {\n $favorites = DB::table('houses')\n ->select('houses.id')\n ->join('favorites', 'house_id', '=', 'houses.id')\n ->where('favorites.user_id', Auth::user()->id)\n ->orderBy('houses.id', 'asc')\n ->get();\n }\n // dd($houses->links());\n foreach ($houses as $key => $house) {\n $houses[$key] = (object)$house;\n }\n $interestPoints=InterestPoint::all();\n\n $neighborhoods = [];\n try {\n $neighborhoodsAll = Neighborhood::whereHas('location.zone.city', function ($query) use ($city) {\n $query->where('id', $city->id);\n })->get();\n } catch (\\Exception $ex) {\n $city = City::find(1);\n $neighborhoodsAll = Neighborhood::whereHas('location.zone.city', function ($query) use ($city) {\n $query->where('id', $city->id);\n })->get();\n }\n\n foreach ($neighborhoodsAll as $neighborhood) {\n if (count($neighborhood->houses) > 0) {\n array_push($neighborhoods, $neighborhood);\n }\n }\n $arrayHouses = array();\n\n foreach ($houses as $house) {\n array_push($arrayHouses, $house);\n }\n\n $schools = School::whereHas(\n 'neighborhoods.location.zone.city',\n function($query) use ($city){\n $query->where('id', $city->id);\n }\n )->with('neighborhoods')\n ->get();\n\n foreach ($schools as $school) \n {\n $ids = collect();\n $school->neighborhoods = $school->Neighborhoods->each( function ($item, $key) use ($ids) \n { \n $ids = $ids->push($item->id);\n });\n $school->neighborhoods = $ids;\n }\n return view('houses.index', [\n 'arrayHouses' => $arrayHouses,\n 'houses' => $houses, \n 'schools' => $schools->sortBy('name'),\n 'zones' => $zones->sortBy('name'),\n 'today' => Carbon::now(),\n 'today_30' => Carbon::now()->addWeeks(4),\n 'numberHouses' => $this->numberHouses,\n 'price_lower' => $price_lower,\n 'price_upper' => $price_upper,\n 'favorites' => $favorites,\n 'hrefSeeMore' => $hrefSeeMore,\n 'interestPoints' => $interestPoints,\n 'currency' => $currency,\n 'city' => $city,\n ]);\n }", "title": "" }, { "docid": "18f99e9677ee8343ad4ef7dc6c3c6fca", "score": "0.47829735", "text": "public function search(HotelSearchRequest $request)\n {\n $hotels = Hotel::search($request->toArray())->orderBy('rate', 'DESC')->get();\n\n return $this->responder->respond($hotels);\n }", "title": "" }, { "docid": "579511131c09bc361fa70121ef550aed", "score": "0.47771823", "text": "public function getRestaurant(request $request)\n {\n $response = new Response();\n $rules = ['id' => 'required|exists:Restaurant'];\n $validator = Validator::make(['id' => $request->restaurantId], $rules);\n if ($validator->fails()) {\n $data = $validator->messages();\n $response->error = Common::error_true;\n $response->errorMessage = $data->first();\n } else {\n $restaurantMangementService = new RestaurantMangementService();\n $response = $restaurantMangementService->getRestaurant($request->restaurantId);\n }\n $responsedata = Defaults::encode($response);\n return $responsedata;\n }", "title": "" }, { "docid": "594378eb3e58b9b7c03408a195c1171d", "score": "0.47756833", "text": "public function testGetAction()\n {\n $client = $this->makeClient();\n\n $client->request('GET', $this->getUrl('api.ingredient.get', ['id' => 1]));\n\n $this->isSuccessful($client->getResponse());\n if ($response = $client->getResponse()) {\n $ingredient = json_decode($response->getContent());\n\n self::assertSame(1, $ingredient->id);\n }\n }", "title": "" }, { "docid": "003a60c45f59e5b7c24fbf713fba369c", "score": "0.47580248", "text": "public function searchSupplierProduct(Request $request)\n {\n $search = $request->term;\n\n $products = Product::select('id', 'name', 'reference', 'measure_unit_id')\n ->where( 'name', 'LIKE', '%'.$search.'%' )\n ->orWhere( 'reference', 'LIKE', '%'.$search.'%' )\n ->IsPurchaseable()\n ->qualifyForSupplier( $request->input('supplier_id'), $request->input('currency_id') )\n// ->CheckStock()\n ->IsActive()\n// ->with('measureunit')\n// ->toSql();\n ->take( intval(Configuration::get('DEF_ITEMS_PERAJAX')) )\n ->get();\n\n\n// dd($products);\n\n return response( $products );\n }", "title": "" }, { "docid": "fe6e79d1700c630b7a4416bb6af84bb3", "score": "0.47558066", "text": "public function show($id, Request $request)\n {\n $ingredient = Ingredient::with('units', 'attributes.attributeType')->findOrFail($id)->toArray();\n\n $ingredient['nutrients'] = $this->keyArray($ingredient['attributes'], ['attribute_type', 'safe_name']);\n unset($ingredient['attributes']);\n\n $ingredient['units'] = $this->keyArray($ingredient['units'], 'name');\n\n // In the DB we store the weight of one cup - but the weight on one ml will be more useful so convert now\n if(!empty($ingredient['weight_one_cup'])) {\n $ingredient['weight_one_ml'] = $ingredient['weight_one_cup'] / self::ML_IN_CUP;\n }\n\n return response()\n ->json([\n 'ingredient' => $ingredient,\n ]);\n }", "title": "" }, { "docid": "082c3bdc9a82332a91df3840dd7c42c7", "score": "0.4753913", "text": "public function index(Request $request)\n { \n session()->forget('food_not_found');\n\n $request->validate([\n 'chef_keyword' => 'nullable'\n ]);\n\n $foods = Food::where('user_id', auth('web')->user()->id)\n ->when($request->food_keyword, function($query) use($request) {\n $query->where('food_name', 'like', '%' . strip_tags($request->food_keyword) . '%')\n ->orWhere('rating', $request->food_keyword)\n ->orWhere('description', $request->food_keyword)\n ->orWhere('price', $request->food_keyword);\n })\n ->latest()\n ->paginate(6); \n \n $foods->appends($request->only('food_keyword'));\n\n if(count($foods)) {\n\n return view('chef.food', compact('foods'));\n\n } else {\n \n session()->flash('food_not_found', 'Maaf, data makanan yang Anda dicari tidak ada');\n \n return view('chef.food', compact('foods'));\n }\n\n }", "title": "" }, { "docid": "b21f1851c96b9c1bde619f28cf143278", "score": "0.4749064", "text": "function neoSearch($querystring){\n\n\tglobal $neousername;\n\tglobal $neopassword;\n\n\t//get the feature from neo4j\n\t$searchjson=\"{\\\"statements\\\" : [{\\\"statement\\\" : \\\"$querystring\\\"}]}\";\n\n\t$url = \"http://127.0.0.1:7474/db/data/transaction/commit\";\n\t$headers = array(\n\t\t\"Content-Type: application/json\"\n\t);\n\t$rest = curl_init();\n\tcurl_setopt($rest,CURLOPT_URL,$url);\n\tcurl_setopt($rest,CURLOPT_POST,1);\n\tcurl_setopt($rest,CURLOPT_POSTFIELDS,$searchjson);\n\tcurl_setopt($rest,CURLOPT_HTTPHEADER,$headers);\n\tcurl_setopt($rest, CURLOPT_USERPWD, $neousername . \":\" . $neopassword);\n\tcurl_setopt($rest,CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($rest, CURLOPT_VERBOSE, 1);\n\tcurl_setopt($rest, CURLOPT_HEADER, 1);\n\t$response = curl_exec($rest);\n\t$header_size = curl_getinfo($rest, CURLINFO_HEADER_SIZE);\n\t$header = substr($response, 0, $header_size);\n\t$body = substr($response, $header_size);\n\t$body = json_decode($body);\n\n\t$featuredata = $body->results[0]->data;\n\t\n\treturn $featuredata;\n\n}", "title": "" }, { "docid": "b6ef8a61cd9ba37eb369046058e3c8b5", "score": "0.47470596", "text": "public function searchAction(Request $request) {\n $trips = array();\n $searchTerm = $request->get('searchTerm');\n $em = $this->getDoctrine();\n\n //Si la cadena de búsqueda no está definida o es vacía\n if (!isset($searchTerm) || trim($searchTerm) === '') {\n $trips = $em->getRepository('TripBundle:Trip')\n ->findAll();\n } else {\n //Buscar trips cuyo título contenga la cadena de búsqueda\n $trips = $em->getRepository(\"TripBundle:Trip\")->createQueryBuilder('b')\n ->where('b.name LIKE :searchTerm')\n ->setParameter(\"searchTerm\", '%' . $searchTerm . '%')\n ->getQuery()->getResult();\n }\n\n return $this->render('trip/index.html.twig', array('trips' => $trips));\n }", "title": "" }, { "docid": "cbd01ca81f520fd294fc2f8f7021e24c", "score": "0.47444803", "text": "private function makeQueryRequest($method, $query, $params = array(), $returnJson = false, $returnRequestUrl = false){\n\t\tif ( in_array( $method, array('item', 'brand', 'brand/search') ) )\n\t\t\t$post_params = $this -> get_request_params($params);\n\n\t\tif ($method == 'brand')\n\t\t\t$request_url = $this -> api_url.$method.'/'.$query.'?'.$post_params;\n\t\telse if ($method == 'item' || $method == 'brand/search')\n\t\t\t$request_url = $this -> api_url.$method.'?'.$post_params;\n\n\t\tif ($method != 'search'){\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Nutritionix API v1.1 PHP Client '.phpversion());\n\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\n\t\t\t$result = json_decode(curl_exec($ch), true);\n\t\t}else{\n\t\t\t$data = array(\n\t\t\t\t'appId' => $this -> app_id,\n\t\t\t\t'appKey' => $this -> api_key,\n\t\t\t);\n\n\t\t\t$params['query'] = trim( str_replace(array('/', '\"', '<', '~'), array('\\/', '\\\"', '', ''), $params['query']) );\n\t\t\t$data_merged = array_merge($data, $params);\n\t\t\t$data_string = json_encode($data_merged);\n\n\t\t\t$ch = curl_init($this -> api_url_search_post);\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t'Content-Type: application/json',\n\t\t\t\t'Content-Length: '.strlen($data_string)\n\t\t\t));\n\n\t\t\t$result = json_decode( curl_exec($ch) );\n\n\t\t\tif ( curl_errno($ch) )\n\t\t\t\t$result['api_error'] = curl_error($ch);\n\t\t}\n\n\t\tcurl_close($ch);\n\n\t\tif ($method != 'search' && $returnRequestUrl)\n\t\t\t$result['request_url'] = $request_url;\n\n\t\tif ($returnJson)\n\t\t\t$result = json_encode($result);\n\n\t\treturn $result;\n\t}", "title": "" } ]
01a41b634c848829cf88c0bf66eab8f4
/ Method to validate an UID against the austrian FinanzOnline service.
[ { "docid": "78f587c7ddb4976e2bae1fd83eb9ac74", "score": "0.65578437", "text": "static function austrianServiceUIDabfrage($austrianServiceSessionID =\"\", &$uid2validate, &$countryOfuid, &$name, &$address, &$validationlevel, &$validateATU, &$validationResult)\n\t{\n\t\t// Aufruf UID-Abfrage Webservice \n\t\t$result = FALSE;\n\t\t$soapClientAbfrageOptions =\t(object) array\n\t\t(\n\t\t\t'sessionid'\t=> $austrianServiceSessionID , \n\t\t\t'tid'\t\t=> $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_TeilnehmerID\"] , \n\t\t\t'benid'\t\t=> $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerID\"] , \n\t\t\t'uid_tn'\t=> $GLOBALS[\"UIDvalidationATglobalvars\"][\"firmaUID\"] , \n\t\t\t'uid'\t\t=> $countryOfuid.$uid2validate , \n\t\t\t'stufe'\t\t=> $validationlevel \n\t\t);\n\t\ttry\t{ $soapClient2 = new SoapClient($GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientAbfrageURI\"]); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult); return FALSE; }\t\n\t\ttry\t{ $result = $soapClient2->uidAbfrage($soapClientAbfrageOptions); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceUIDabfrage\", $validationResult); return FALSE; }\t\n\t\tif (is_object($result) ) { return $result;} else { return FALSE; }\n\t}", "title": "" } ]
[ { "docid": "f8643479dd019ce4ae50a3099e80e8c7", "score": "0.75033224", "text": "public function isValidUid($uid);", "title": "" }, { "docid": "d734990981ecd369b9143f56b2a013f8", "score": "0.7089136", "text": "public function validateUid ($uid) {\n if ((strlen($uid) > 11) &&\n (strlen($uid) < 100) &&\n preg_match('/^[a-z]+-\\d+-\\d+/', $uid)){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5b653cdd0e0dcfed8c6c213dcb06a15f", "score": "0.6577843", "text": "function isValidUDID($udid)\n{\n if (strlen($udid) != 64 ){ // 32 for simulator\n \n echo \"bad udid\" . strlen($udid) .\"\\n\";\n return false;\n }\n if (preg_match(\"/^[0-9a-fA-F]+$/\", $udid) == 0)\n return false;\n \n return true;\n}", "title": "" }, { "docid": "27f6c7f9c5ca0888c6ac4d8bbda8393c", "score": "0.6551344", "text": "static function validateNonEUcountryUID(&$referenznummer, &$countryOfuid, &$uid2validate, &$validationlevel, &$name, &$address, &$validationResult) \n\t{\n\t\t$returnCode = FALSE;\n\t\tswitch ($countryOfuid)\n\t\t{\n\t\tcase \"CH\" : // Switzerland UID Validation\n\t\t\t$validateCHUID = UIDvalidationAustria::validateCHUID($referenznummer, $countryOfuid, $uid2validate, $validationlevel, $name, $address, $validationResult);\n\t\t\tif ($validateCHUID === FALSE)\n\t\t\t{\n\t\t\t\t$validationResult[\"ValidateForeigUID\"] = 0;\t\n\t\t\t\t$validationResult[\"OverallValidationResult\"] = 10;\n\t\t\t\t$validateForeignUID = FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$validationResult[\"ValidateForeigUID\"] = 1;\t\n\t\t\t\tif (count ($validateCHUID) == 0 )\n\t\t\t\t{\n\t\t\t\t\t$validationResult[\"ForeigUIDvalid\"] = 0;\n\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 15;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$validationResult[\"ForeigUIDvalid\"] = 1;\n\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 11;\n\t\t\t\t\t$validateForeignUID = array \n\t\t\t\t\t(\n\t\t\t\t\t\t'name'\t\t=> $validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->organisation->organisationName ,\n\t\t\t\t\t\t'address'\t=> $validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->addressInformation->street . \" \" .\n\t\t\t\t\t\t\t\t\t\t$validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->addressInformation->houseNumber . \" \" .\n\t\t\t\t\t\t\t\t\t\t$validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->addressInformation->town . \" \" .\n\t\t\t\t\t\t\t\t\t\t$validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->addressInformation->swissZipCode . \" \" .\n\t\t\t\t\t\t\t\t\t\t$validateCHUID->GetByUIDResult->organisationType->organisation->contact->address->postalAddress->addressInformation->country->countryIdISO2 . \" \",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t//case \"US\" : // USA UID Validation\n\t\t//\t$validateForeignUID = UIDvalidationAustria::validateUSUID($referenznummer, $countryOfuid, $uid2validate, $validationlevel, $name, $address, $validationResult);\n\t\t//\tbreak;\n\t\tdefault :\t// DEFAULT (do nothing)\n\t\t\t$validateForeignUID = FALSE;\n\t\t}\n\t\t\n\t\tif ($validationResult[\"OverallValidationResult\"] == 11 AND $validationlevel == 2 AND $name != '' AND $address != '')\n\t\t{\n\t\t\t$NameAndAddressValidationResult = $validateForeignUID['name'] . \" \" . $validateForeignUID['address'];\n\t\t\t$validateNameAndAddressResult = UIDvalidationAustria::validateNameAndAddress($name, $address, $NameAndAddressValidationResult, $validationResult);\n\t\t\tif ($validateNameAndAddressResult)\n\t\t\t{\n\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 11;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 10;\n\n\t\t\t}\n\t\t}\n\t\treturn ;\n\t}", "title": "" }, { "docid": "0b2ecc148ff9e4bc875c927d08091d93", "score": "0.645441", "text": "static function validateCHUID(&$referenznummer, &$countryOfuid, &$uid2validate, &$validationlevel, &$name, &$address, &$validationResult) \n\t{\n\t\t$result = FALSE;\n\t\t$soapClientCHUIDAbfrageURI = $GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientCHUIDAbfrageURI\"];\n\t\t$soapClientCHUIDOptions =\tnew stdClass;\n\t\t$soapClientCHUIDOptions->uid\t=\tnew stdClass;\n\t\t$soapClientCHUIDOptions->uid->uidOrganisationIdCategorie = substr($uid2validate,0,3);\n\t\t$soapClientCHUIDOptions->uid->uidOrganisationId = substr($uid2validate,3,9);\n\t\ttry\t{ $soapClientCH = new SoapClient($soapClientCHUIDAbfrageURI); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult); return FALSE; }\t\n\t\ttry { $result = $soapClientCH->GetByUID($soapClientCHUIDOptions); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_CHUIDabfrage\", $validationResult); return FALSE; }\t\n\t\tif (is_object($result) ) { return $result;} else { return FALSE; }\n\t}", "title": "" }, { "docid": "6357d7c0a2bef0a2737141339b70e1a7", "score": "0.6272611", "text": "static function VIESServiceUIDabfrage(&$uid2validate, &$countryOfuid, &$name, &$address, &$validationlevel, &$validateATU, &$validationResult)\n\t{\t// Aufruf UID-Abfrage Webservice \n\t\t$result = FALSE;\n\t\t$soapClientVIESAbfrageOptions =\t(object) array\n\t\t(\n\t\t\t'countryCode'\t=> $countryOfuid,\n\t\t\t'vatNumber'\t\t=> $uid2validate\n\t\t);\n\t\ttry\t{ $soapClient4 = new SoapClient($GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientVIESAbfrageURI\"]); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult); return FALSE; }\t\n\t\ttry { $result = $soapClient4->checkVat($soapClientVIESAbfrageOptions); } \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_VIESServiceUIDabfrage\", $validationResult); return FALSE; }\t\n\t\tif (is_object($result) ) { return $result;} else { return FALSE; }\n\t}", "title": "" }, { "docid": "d258d937e0d05429bb2456ca2bdc99ea", "score": "0.6141699", "text": "static function sanitizeInput(&$countryOfuid, &$uid2validate, &$validationlevel, &$validateATU, &$name, &$address, &$validationResult)\n\t{\n\t\tif ($validationlevel == 1 OR $validationlevel == 2) { /* Level OK */ } else {$validationlevel = 1;}\n\t\tif ($validateATU == 0 OR $validateATU == 1) { /* validate ATU OK */ } else {$validateATU = 0;}\n\t\t\n\t\tif ($countryOfuid == 'UK') {$countryOfuid = 'GB';}\n\t\t//if ($countryOfuid == 'GR') {$countryOfuid = 'EL';}\n\t\t//if ($countryOfuid == 'HU') {$countryOfuid = 'HR';}\n\t\t//if ($countryOfuid == 'IE') {$countryOfuid = 'IR';}\n\t\t//if ($countryOfuid == 'PL') {$countryOfuid = 'PO';}\n\t\t$uid2validate =\tstr_replace (array(' ', ',', '.', '-', '_'), '', $uid2validate);\t\n\t\t//\n\t\tif (array_key_exists($countryOfuid, $GLOBALS[\"UIDvalidationATglobalvars\"][\"validateNonEUcountries\"]) AND ($GLOBALS[\"UIDvalidationATglobalvars\"][\"validateNonEUcountries\"][$countryOfuid] === TRUE ) )\n\t\t{\n\t\t\tswitch ($countryOfuid)\n\t\t\t{\n\t\t\tcase \"CH\" : // sanitize Switzerland UID\n\t\t\t\tbreak;\n\t\t\t//case \"US\" : // sanitize USA UID\n\t\t\t//\tbreak;\n\t\t\tdefault :\t// DEFAULT (do nothing)\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif\t(substr ($uid2validate,0,2) == $countryOfuid ) \n\t\t\t{\n\t\t\t\t$validationResult[\"uidWithLeadingPrefix\"] = $uid2validate;\n\t\t\t\t$uid2validate = substr($uid2validate,2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$uidPraefix = $countryOfuid;\n\t\t\t\tif ($countryOfuid == 'GR') {$uidPraefix = 'EL';}\n\t\t\t\t$validationResult[\"uidWithLeadingPrefix\"] = $uidPraefix . $uid2validate;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "79de545c9d5c19d90877719a26c7e1cc", "score": "0.6075246", "text": "function isUid($input)\n{\n $pattern = \"/^[a-zA-Z0-9]{64}$/\";\n return preg_match($pattern, $input);\n}", "title": "" }, { "docid": "8116a61f5bc4d1c82c1ccd0ac22e86ba", "score": "0.6066718", "text": "function isValid( $id_user ) {\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c30fb217e6d2a31bc7e27de519283e3a", "score": "0.5856034", "text": "function isvalidUser($uid, $sqlConnection)\r\n{ $result = array();\r\n\t$sqlSuccess = get_sql_results($result, $sqlConnection,\r\n\t\t\t\"select * from uc_users \".\r\n\t\t\t\"where id = '$uid'\");\r\n\treturn $sqlSuccess;\r\n}", "title": "" }, { "docid": "0bec3bb9ae41f749cc5b6bf8bb37f55c", "score": "0.5819862", "text": "function is_valid_user($user_id) {\n $pre_str = \"usr\";\n if ((strpos($user_id, $pre_str) === false) ||\n (strpos($user_id, $pre_str) != 0)) {\n return false;\n }\n\n //return false if the user ID is not the proper length\n if ((strlen($user_id) < 9)) {\n return false;\n }\n\n if (validate($user_id)) {\n // user ID was found in the database\n return true;\n } else {\n // the specified user ID does not exist in the database\n return false;\n }\n\n }", "title": "" }, { "docid": "f6888b502eefe2f9d0e1923e7812fd06", "score": "0.58032304", "text": "private function _valid_id()\n {\n $user = get_userdata($this->uid);\n\n return ($user->user_login !='' && !empty($user->user_login) );\n }", "title": "" }, { "docid": "f05c0f93217f8d2562c4f0e530d7450a", "score": "0.5800439", "text": "private function verifyID($urlID) {\n\t\t# However, returns true if the url is a valid custom-one\n\t\t# Note that the ID must ALWAYS be in base10\n\t\tif(!isset($urlID)) {\n\t\t\tthrow new Exception(\"Missing parameter, aborting.\", 0);\n\t\t}\n\n\t\tif(preg_match(\"/^[0-9]+$/\", $urlID)) {\n\t\t\t# The id submitted seems to be a normal int'y id\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t$this->log->logInfo(\"Invalid ID submitted - {$urlID}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t}", "title": "" }, { "docid": "9ccacf84bd4a011ef46976f572e87a16", "score": "0.5783335", "text": "public function checkUUID($UUID);", "title": "" }, { "docid": "21f52e488cdbf53ac547b8729bed2f0e", "score": "0.57327014", "text": "public function validate ( $token ) { return $this->server->token2uid( $token ) > 0; }", "title": "" }, { "docid": "d285834ba93a7cadc4c2d25969306fc1", "score": "0.5715421", "text": "public function verify($uuid);", "title": "" }, { "docid": "b77ab9492526b46eea523d9c5f820977", "score": "0.5714026", "text": "static function validationNeeded(&$uid2validate, &$countryOfuid, &$name, &$address, &$validationlevel, &$validateATU, &$validationResult)\n\t{\n\t\t$validation_needed = FALSE;\n\t\tif (array_key_exists($countryOfuid, $GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_eu_memberstates\"])) \n\t\t{ \t// Country is member of EU\n\t\t\t$validationResult[\"ExportOutsideEU\"]\t= 0;\n\t\t\t$validationResult[\"EUmemberstateStandardVATrate\"]\t= $GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_eu_memberstates\"][$countryOfuid][1];\n\t\t\t$validationResult[\"EUmemberstateReducedVATrate\"]\t= $GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_eu_memberstates\"][$countryOfuid][2];\n\t\t\tif ($countryOfuid != $GLOBALS[\"UIDvalidationATglobalvars\"][\"countryInland\"] OR ($countryOfuid == $GLOBALS[\"UIDvalidationATglobalvars\"][\"countryInland\"] and $validateATU == 1))\n\t\t\t{ \t// Country is not Austria (or is Austria and validation is requested anyway) \n\t\t\t\tif ($uid2validate > '')\n\t\t\t\t{\t// UID not empty!\n\t\t\t\t\t$validation_needed = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$validationResult[\"ExportOutsideEU\"]\t= 1;\n\t\t\tif ($uid2validate != \"\")\n\t\t\t{\n\t\t\t\tif (array_key_exists($countryOfuid, $GLOBALS[\"UIDvalidationATglobalvars\"][\"validateNonEUcountries\"]) AND ($GLOBALS[\"UIDvalidationATglobalvars\"][\"validateNonEUcountries\"][$countryOfuid] === TRUE ) )\n\t\t\t\t{\n\t\t\t\t\t$validationResult[\"ValidateNonEUcountry\"]\t= 1;\n\t\t\t\t\t$validation_needed = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $validation_needed;\n\t}", "title": "" }, { "docid": "2a944c50b88570ac8f6a05149a67243d", "score": "0.5706127", "text": "static function VIESwebsiteUIDabfrage(&$uid2validate, &$countryOfuid, &$name, &$address, &$validationlevel, &$validateATU, &$validationResult)\n\t{\n\t\t$curlPOSTURL = $GLOBALS[\"UIDvalidationATglobalvars\"][\"webpageVIESAbfrageURI\"];\n\t\t$curlPOSTVARS = \"memberStateCode=$countryOfuid&requestedMsCode=$countryOfuid&number=$uid2validate\"; \n\t\t$curlObject = curl_init($curlPOSTURL); \n\t\tcurl_setopt($curlObject, CURLOPT_HEADER,0);\n\t\tcurl_setopt($curlObject, CURLOPT_POST, 1);\n\t\tcurl_setopt($curlObject, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curlObject, CURLOPT_POSTFIELDS, $curlPOSTVARS); \n\t\t$curlResponse = curl_exec($curlObject);\n\t\tcurl_close($curlObject);\n\t\t$VIESwebsiteAbfrageResults['curlExecDone']\t= 1 ;\n\t\tpreg_match('/invalid VAT number/i', $curlResponse, $matchesUngueltig);\n\t\tif ( isset($matchesUngueltig[0])) \n\t\t{\n\t\t\t$VIESwebsiteAbfrageResults['curlExecSuccessful'] = 1;\n\t\t\t$VIESwebsiteAbfrageResults['UIDvalid'] = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match('/Yes, valid VAT number/i', $curlResponse, $matchesGueltig);\n\t\t\tif ( isset($matchesGueltig[0])) \n\t\t\t{\n\t\t\t\t$VIESwebsiteAbfrageResults['curlExecSuccessful'] = 1;\n\t\t\t\tif($validationlevel == 2)\n\t\t\t\t{ \n\t\t\t\t\t$curlResponse1 = str_ireplace(array(\"\\n\",\"\\r\",\"\\t\"),array(\"\",\"\",\"\"),$curlResponse );\n\t\t\t\t\t$trimming = array(\"<td>\", \"</td>\");\n\t\t\t\t\t$nameValidationResultpos1 = stripos ($curlResponse1, '<td class=\"labelStyle\">Name</td>' );\n\t\t\t\t\t$nameValidationResultpos2 = stripos ($curlResponse1,'</tr>',$nameValidationResultpos1);\n\t\t\t\t\t$nameValidationResult = str_replace($trimming, \"\", substr ($curlResponse1,$nameValidationResultpos1+32,$nameValidationResultpos2-$nameValidationResultpos1-32));\n\t\t\t\t\t$addrValidationResultpos1 = stripos ($curlResponse1, '<td class=\"labelStyle\">Address</td>' );\n\t\t\t\t\t$addrValidationResultpos2 = stripos ($curlResponse1,'</tr>',$addrValidationResultpos1);\n\t\t\t\t\t$addrValidationResult = str_replace(\"<br />\", \" \", str_replace($trimming, \"\", substr ($curlResponse1,$addrValidationResultpos1+32,$addrValidationResultpos2-$addrValidationResultpos1-32)));\n\t\t\t\t\t$NameAndAddressValidationResult = $nameValidationResult . \" \" . $addrValidationResult ;\n\t\t\t\t\t$validateNameAndAddressResult = UIDvalidationAustria::validateNameAndAddress($name, $address, $NameAndAddressValidationResult, $validationResult);\n\t\t\t\t\tif ($validateNameAndAddressResult)\n\t\t\t\t\t{\n\t\t\t\t\t\t$VIESwebsiteAbfrageResults['UIDvalid'] = 1;\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$VIESwebsiteAbfrageResults['UIDvalid'] = 0;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$VIESwebsiteAbfrageResults['UIDvalid'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$VIESwebsiteAbfrageResults['curlExecSuccessful'] = 0;\n\t\t\t} \n\t\t} \n\t\treturn $VIESwebsiteAbfrageResults;\n\t}", "title": "" }, { "docid": "21af4314bf1e938902d844849879f81f", "score": "0.56974024", "text": "function validateFAID($faID){\n\tinitializeDB();\n\t$command = $_SESSION['connection']->prepare(\"SELECT faID FROM FADetails WHERE faID=?;\");\n\t$command->bind_param('i',$faID);\n\t\n\t$command->execute();\n\t$result = $command->get_result();\n\tif($result->num_rows!=0){\n\t\treturn true;\t\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "99850c3ba04cc1bff89cab8bc120dff2", "score": "0.56870216", "text": "function validateID($userId)\n {\n\t\t$conn = mysqli_connect(\"localhost\",\"root\", \"\", \"CSC350GroupCTerm\"); // connection through mysqli_connect (location, user name, password (if applicable), name of schema)\n\t\tif(!$conn) \n\t\t{\n\t\t\tdie(\"Connection failed: \" .mysqli_connect_error());\n\t\t}\n\t\telse \t\t\n\t\t\t$sql = \"select userId from userinfo;\"; // writing a query into a variable.\n\t\t\t$result = mysqli_query($conn, $sql); // sending the query to the Data Base and placing the return inside the variable ($result).\n\n if (mysqli_num_rows($result) > 0)\n {\n while ($row = mysqli_fetch_assoc($result))\n if ($row[\"userId\"] == $userId)\n {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "382ff9cf3b01a2ae435e8d85df9d1606", "score": "0.56726426", "text": "function checkUserValidbyId($uid){\n global $db_php_path;\n require_once($db_php_path);\n throw New Exception(\"not implement\");\n}", "title": "" }, { "docid": "8be5979f6df79c1f375a02a8ac965600", "score": "0.5662254", "text": "function hasValidUid()\n{\n return isset($_SESSION[\"state\"]) && isUid($_SESSION[\"state\"]);\n}", "title": "" }, { "docid": "363cb4065540a7d2cbdd5bdd3920ae97", "score": "0.5616658", "text": "static function initialize($referenznummer = '', &$validationResult)\n\t{\n\t\t/*\n\t\trequire (\"/kunden.uid-validation-austria.php\");\n\t\tif (array_key_exists($referenznummer, $arr_kunden)) \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"firmaName\"]\t\t\t\t\t\t= $arr_kunden[$referenznummer][\"firmaName\"];\t\t\t\t\t\t\t\t\t// Ihre eigene Firma (fuer UID Abfragen)\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"firmaAdresse\"]\t\t\t\t\t= $arr_kunden[$referenznummer][\"firmaAdresse\"];\t\t\t\t\t\t\t\t\t// Ihre eigene Adresse (fuer UID Abfragen)\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"firmaUID\"]\t\t\t\t\t\t= $arr_kunden[$referenznummer][\"firmaUID\"];\t\t\t\t\t\t\t\t\t\t// Ihre eigene UID\t\t\t\t\t\t\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_TeilnehmerID\"]\t\t= $arr_kunden[$referenznummer][\"finanzOnline_TeilnehmerID\"];\t\t\t\t\t// Ihre eigene TeilnehmerID bei FinanzOnline\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerID\"]\t\t= $arr_kunden[$referenznummer][\"finanzOnline_BenutzerID\"];\t\t\t\t\t\t// FinanzOnline BenutzerID des Webservice Users\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerPIN\"]\t\t= $arr_kunden[$referenznummer][\"finanzOnline_BenutzerPIN\"];\t\t\t\t\t\t// FinanzOnline BenutzerPIN des Webservice Users\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"Stufe2UntergrenzeProzent\"]\t\t= $arr_kunden[$referenznummer][\"Stufe2UntergrenzeProzent\"];\t\t\t\t\t\t// Mindestprozentsatz Stufe 2 fuer Status 6\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"Stufe2erfolgreichProzent\"]\t\t= $arr_kunden[$referenznummer][\"Stufe2erfolgreichProzent\"];\t\t\t\t\t\t// Mindestprozentsatz Stufe 2 fuer Status 1 od. 2\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_DataboxFrequenz\"]\t= $arr_kunden[$referenznummer][\"finanzOnline_DataboxFrequenz\"];\t\t\t\t\t// Abfragefrequenz für UID Protokolle\t\t\t\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"DataBoxAbfrageLogging\"]\t\t\t= $arr_kunden[$referenznummer][\"DataBoxAbfrageLogging\"];\t\t\t\t\t\t// Eintrag im UIDprotokoll fuer Databox Abfrage\t\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"DataBoxAbfrageLeermeldung\"]\t\t= $arr_kunden[$referenznummer][\"DataBoxAbfrageLeermeldung\"];\t\t\t\t\t// Emails mit Leermeldung (keine Protokolle) senden\t\t\t//\n\t\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_EmailAdresse\"]\t\t= $arr_kunden[$referenznummer][\"finanzOnline_EmailAdresse\"];\t\t\t\t\t// Ihre eigene Email Adresse (fuer UID Protokolle)\t\t\t//\n\t\t}\n\t\t*/\n\t\t// if \"general configuration validationLogfilePath is NOT SET, put the logfile into the current directory\n\t\tif ($GLOBALS[\"UIDvalidationATglobalvars\"][\"validationLogfilePath\"] == '')\t{ $GLOBALS[\"UIDvalidationATglobalvars\"][\"validationLogfilePath\"] = dirname(__FILE__); }\n\t\t/************************************************************************************************************************************************************************************/\n\t\t// WSDL definitions\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientSessionURI\"]\t\t= \"https://finanzonline.bmf.gv.at/fon/services/SessionWSI/wsdl/SessionWSIService.wsdl\";\t// Webadresse des WSDL Service fuer FO Session\t\t//\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientAbfrageURI\"]\t\t= \"https://finanzonline.bmf.gv.at/fon/ws/uidAbfrageService.wsdl\";\t\t\t\t\t\t// Webadresse des WSDL Service fuer FO UID Abfrage\t// \n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientDataboxURI\"]\t\t= \"https://finanzonline.bmf.gv.at/fon/services/DataboxWSI/wsdl/DataboxWSIService.wsdl\";\t// Webadresse des WSDL Service fuer FO Databox\t\t//\t\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_Zertifikat\"]\t= \"finanzonline.bmf.gv.at.pem\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Filename des FinanzOnline Serverzertifikates\t\t//\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_ZertifikatPath\"]\t= \"\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientVIESAbfrageURI\"]\t= \"http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl\";\t\t\t\t\t\t// Webadresse des WSDL Service fuer EU VIES Abfrage //\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"webpageVIESAbfrageURI\"]\t\t= \"http://ec.europa.eu/taxation_customs/vies/viesquer.do\";\t\t\t\t\t\t\t\t// Webadresse der EU VIES Website \t\t\t\t\t//\n\t\t//\t\t\t\t\t\t\t\t\t\t http://ec.europa.eu/taxation_customs/vies/viesquer.do?memberStateCode=AT&requestedMsCode=AT&number=U57966222\t\t\t\t\t\t\t\t//\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientCHUIDAbfrageURI\"]\t= \"https://www.uid-wse.admin.ch/V3.0/PublicServices.svc?wsdl\";\t\t\t\t\t\t\t// Webadresse des WSDL Service fuer CH UIDs\t\t\t//\n\t\t/************************************************************************************************************************************************************************************/\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_FinanzOnline_returncodes\"] = array( \n\t\t// Quelle: https://www.bmf.gv.at/EGovernment/FINANZOnline/InformationenfrSoft_3165/_start.htm || Version 5 per 06.02.2013\n\t\t\t0\t\t=> 'Die UID des Erwerbers ist gueltig.',\n\t\t\t1\t\t=> 'Die UID des Erwerbers ist nicht gueltig.',\n\t\t\t3\t\t=> 'Die UID-Nummer des Antragstellers ist ungueltig.',\n\t\t\t4\t\t=> 'Die UID-Nummer des Erwerbers ist falsch.',\n\t\t\t5\t\t=> 'Die UID-Nummer des Antragstellers ist ungueltig.',\n\t\t\t6\t\t=> 'Der angegebene Mitgliedstaat ist derzeit nicht erreichbar.',\n\t\t\t7\t\t=> 'Der angegebene Mitgliedstaat ist derzeit nicht erreichbar.',\n\t\t\t8\t\t=> 'Anfragen sind derzeit nicht moeglich.',\n\t\t\t9\t\t=> 'Name und Anschrift des Erwerbers sind derzeit nicht ermittelbar.',\n\t\t\t101\t\t=> 'Die UID des Antragstellers muss mit ´ATU´ beginnen.',\n\t\t\t102\t\t=> 'Bei ´Stufe´ ist nur ´1´ oder ´2´ zulaessig.',\n\t\t\t103\t\t=> 'Die angefragte UID-Nummer kann im FinanzOnline nur in Stufe 1 bestaetigt werden, da diese UID-Nummer zu einer Unternehmensgruppe (Umsatzsteuergruppe) gehoert. Aus technischen Gruenden werden aus Tschechien keine Firmendaten angezeigt. Für eine gueltige Stufe 2 Abfrage ist es daher erforderlich, dass Sie sich unter http://adisreg.mfcr.cz die Daten der CZ-Umsatzsteuergruppe aufrufen und kontrollieren, ob das angefragte Unternehmen auch tatsaechlich zu dieser Gruppe gehoert. Bitte bewahren Sie den Ausdruck dieser Anfrage in Ihren Unterlagen als Beleg gemaess § 132 BAO auf. Fuer jede Anfrage Stufe 2 ist sowohl das Bestaetigungsverfahren in Stufe 1 im FinanzOnline als auch das Gruppenregister im anderen Mitgliedsstaat laut o.a. Link zu konsultieren. Im Falle von Fragen wenden Sie sich bitte an Ihr zustaendiges Finanzamt.',\n\t\t\t104\t\t=> 'Die angefragte UID-Nummer kann im FinanzOnline nur in Stufe 1 bestaetigt werden, da diese UID-Nummer zu einer Unternehmensgruppe (Umsatzsteuergruppe) gehoert. Aus technischen Gruenden werden aus der Slowakei keine Firmendaten angezeigt. Für eine gueltige Stufe 2 Abfrage ist es daher erforderlich, dass Sie sich unter http://www.drsr.sk die Daten der SK-Umsatzsteuergruppe aufrufen und kontrollieren, ob das angefragte Unternehmen auch tatsaechlich zu dieser Gruppe gehoert. Bitte bewahren Sie den Ausdruck dieser Anfrage in Ihren Unterlagen als Beleg gemaess § BAO auf. Fuer jede Anfrage Stufe 2 ist sowohl das Bestaetigungsverfahren in Stufe 1 im FinanzOnline als auch das Gruppenregister im anderen Mitgliedsstaat laut o.a. Link zu konsultieren. Im Falle von Fragen wenden Sie sich bitte an Ihr zustaendiges Finanzamt.',\n\t\t\t105\t\t=> 'Die UID-Nummer ist ueber FinanzOnline einzeln abzufragen.',\n\t\t\t999\t\t=> 'Nicht alle erforderlichen Parameter wurden angegeben.',\n\t\t\t1511\t=> 'Der angegebene Mitgliedstaat ist derzeit nicht erreichbar.',\n\t\t\t9999\t=> 'unbekannter Returncode'\n\t\t);\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_FinanzOnline_RC2VIES\"] = array( \n\t\t\t0\t\t=> 0,\n\t\t\t1\t\t=> 0,\n\t\t\t3\t\t=> 0,\n\t\t\t4\t\t=> 0,\n\t\t\t5\t\t=> 0,\n\t\t\t6\t\t=> 1,\t// request VIES validation\n\t\t\t7\t\t=> 1,\t// request VIES validation\n\t\t\t8\t\t=> 1,\t// request VIES validation\n\t\t\t9\t\t=> 1,\t// request VIES validation\n\t\t\t101\t\t=> 0,\n\t\t\t102\t\t=> 0,\n\t\t\t103\t\t=> 0,\n\t\t\t104\t\t=> 0,\n\t\t\t105\t\t=> 0,\n\t\t\t999\t\t=> 0,\n\t\t\t1511\t=> 1,\t// request VIES validation\n\t\t\t9999\t=> 0\n\t\t);\n\t\t/************************************************************************************************************************************************************************************/\n\t\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"arr_OverallResultMessage\"] = array( \n\t\t\t0\t\t=> 'Validierung konnte NICHT durchgefuehrt werden - UST aufschlagen!',\n\t\t\t1\t\t=> 'Validierung erfolgreich - EU Unternehmen mit gueltiger UID, UST nicht aufschlagen!',\n\t\t\t2\t\t=> 'Validierung erfolgreich - AT Unternehmen mit gueltiger UID, UST aufschlagen!',\n\t\t//\t3\t\t=> '',\n\t\t//\t4\t\t=> '',\n\t\t\t5\t\t=> 'Validierung erfolgreich - UID Nummer ungueltig - UST aufschlagen!',\n\t\t\t6\t\t=> 'Validierung erfolgreich - UID Nummer gueltig - Stufe-2 Validierung ungenuegend - UST aufschlagen!',\n\t\t//\t7\t\t=> '',\n\t\t\t8\t\t=> 'Validierung nicht durchgeführt - EU Privatperson oder AT Unternehmen - UST aufschlagen!',\n\t\t\t9\t\t=> 'Validierung nicht durchgefuehrt - Export - UST nicht aufschlagen!',\n\n\t\t\t10\t\t=> 'Validierung der Drittstaaten Unternehmens UID konnte NICHT durchgefuehrt werden!',\n\t\t\t11\t\t=> 'Validierung erfolgreich - UID des Drittstaaten Unternehmens ist gueltig!',\n\t\t//\t12\t\t=> '',\n\t\t//\t13\t\t=> '',\n\t\t//\t14\t\t=> '',\n\t\t\t15\t\t=> 'Validierung erfolgreich - UID des Drittstaaten Unternehmens ist ungueltig!',\n\t\t\t16\t\t=> 'Validierung erfolgreich - UID des Drittstaaten Unternehmens ist gueltig - Stufe2 Validierung ungenuegend!',\n\t\t//\t17\t\t=> '',\n\t\t//\t18\t\t=> '',\n\t\t//\t19\t\t=> '',\n\t\t);\n\t\t/************************************************************************************************************************************************************************************/\n\t\t$setEUmemberstates = UIDvalidationAustria::setEUmemberstates();\n\t\t/************************************************************************************************************************************************************************************/\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "0fe2e54a006e08ccccf4fa7a36e3ac3c", "score": "0.5610592", "text": "public static function validate($uuid){\n $regex = '/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[0-5][a-fA-F0-9]{3}-[089aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/';\n return parent::check($uuid, $regex);\n }", "title": "" }, { "docid": "4aa5c230a57d113862d9f324e5a9a484", "score": "0.55533385", "text": "function checkUser($msgid, $uid, $mode)\n{\n\tif ($mode == 1)\n\t\t$checkuid = \\dal\\messages\\checkRecipient($msgid);\n\telseif ($mode == 2)\n\t\t$checkuid = \\dal\\messages\\checkSender($msgid);\n\n\tif ($uid == $checkuid)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}", "title": "" }, { "docid": "16421004a9356b5d387d18b47842676e", "score": "0.5544233", "text": "function validate_id( $id ) {\n\n if ( validate_length( $id, 4, 64) ) return 'id-length-too-short-or-too-long';\n // if ( ! preg_match(\"/^[a-zA-Z0-9\\-_@\\.]+$/\", $id) ) return 'id-malformed';\n return false;\n\n}", "title": "" }, { "docid": "9365b9efc8e5d662cd856aeaafc7eb97", "score": "0.55230117", "text": "public function test_isValidNotificationUID_notUidIsValid_returnFalse()\r\n\t{\r\n\t\t$notuid = \"aDummyNotificationUID\";\r\n\t\t$_REQUEST['notuid'] = $notuid;\r\n\t\t$this->prepareNotificationSentMock($notuid, true);\r\n\t\t\r\n\t\t$actual = NotificationUtils::isValidNotificationUID($notuid, $this->notificationSentMock);\r\n\t\t$this->assertTrue($actual);\r\n\t}", "title": "" }, { "docid": "39bce41f7994a5490001c33667677c77", "score": "0.55136937", "text": "static function Uuid(string $str): void\n\t{\n\t\tif(preg_match('/^(\\w+\\-){4}\\w+$/', $str) != 1)\n\t\t{\n\t\t\tthrow new Exception(\"ERR_UUID\", 1);\n\t\t}\n\t}", "title": "" }, { "docid": "129daaa5efe2730ce9f07404fe242ea8", "score": "0.550288", "text": "public function test_isValidNotificationUID_notUidIsNotValid_returnFalse()\r\n\t{\r\n\t\t$notuid = \"aDummyNotificationUID\";\r\n\t\t$this->prepareNotificationSentMock($notuid, false);\r\n\t\t\r\n\t\t$actual = NotificationUtils::isValidNotificationUID($notuid, $this->notificationSentMock);\r\n\t\t$this->assertFalse($actual);\r\n\t}", "title": "" }, { "docid": "b12dfaa7beaa8dbc9e7b8bb724cb0887", "score": "0.54882413", "text": "protected function checkUserID(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_numeric($this->_UserID) && $this->_UserID !== 0 ) {\n\t\t\t$inMessage .= \"{$this->_UserID} is not a valid value for UserID\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "title": "" }, { "docid": "018fb8a2f7ea18e00046b98cec01c60a", "score": "0.5463238", "text": "public static function validate($completeDLN, array $user = [])\n {\n $matcher = preg_match(\"/^(?=.{16}$)[A-Za-z]{1,5}9{0,4}[0-9](?:[05][1-9]|[16][0-2])(?:[0][1-9]|[12][0-9]|3[01])[0-9](?:99|[A-Za-z][A-Za-z9])(?![IOQYZioqyz01_])\\\\w[A-Za-z]{2}$/\",\n $completeDLN, $output_array);\n\n if (!$matcher) {\n return false;\n }\n\n if (!empty($user)) {\n $userDLN = self::generate($user);\n if ($userDLN !== substr($completeDLN, 0, -3)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "6a8f3ee322eef8c209f997a43e1f7129", "score": "0.54626", "text": "private static function isValid($uuid) : bool\n {\n return (bool) preg_match('/^{?[a-f\\d]{8}-?(?:[a-f\\d]{4}-?){3}[a-f\\d]{12}}?$/i', $uuid);\n }", "title": "" }, { "docid": "aae0e03819afd0b248930dba0f76dad9", "score": "0.54480153", "text": "public function validateProviderUsername($value, $id)\n {\n if (preg_match('/^[a-z0-9]{1}[a-z0-9_]{1,18}[a-z0-9]{1}$/', $value) == FALSE) {\n $this->form_validation->set_message('validateProviderUsername', '{field} can contain letters and underline only.');\n return FALSE;\n }else{\n if($this->Appointment_admin_model->checkProviderUnique(array('provider_username'=>$value), $id)){\n $this->form_validation->set_message('validateProviderUsername', '{field} must be unique.');\n return FALSE;\n }else{\n return TRUE;\n }\n }\n }", "title": "" }, { "docid": "c5e0a81fc98adbdd392fe268b344c8a1", "score": "0.5441504", "text": "function cosign_valid_user()\n{\n\tif ( isset($_SERVER['REMOTE_USER']) ) {\n\t\t// UM user\n\t\tif ( stristr($_SERVER[\"COSIGN_FACTOR\"],\"UMICH.EDU\") ) return TRUE;\n\t\t// external user\n\t\tif ( stristr($_SERVER[\"COSIGN_FACTOR\"],\"friend\") ) return TRUE;\n\t\t// unknown user\n\t\tdie(\"Unable to determine user affiliation for Cosign factor '\".$_SERVER[\"COSIGN_FACTOR\"].\"'. Please contact your system administrator.\");\n\t}\n\telse return FALSE;\n}", "title": "" }, { "docid": "03e84ecb7325b2a64b77dc579eff6172", "score": "0.54359996", "text": "private function validateId($id):void {\n // Only condition that can be considered invalid $id\n if($id === \"\") {\n if(isset($this->logger))\n $this->logger->error('UId can not be null.');\n throw new COARNotificationException('UId can not be null.');\n }\n\n $pattern = '/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/';\n\n if (!filter_var($id, FILTER_VALIDATE_URL) && (preg_match($pattern, $id) === 0)) {\n if(isset($this->logger))\n $this->logger->warning(\"(UId: '$id') Uid is neither a valid URL nor an UUID.\");\n }\n\n\n }", "title": "" }, { "docid": "390aec79508718dd80566ed35ee80742", "score": "0.5425371", "text": "public function validateGUID(string $_guid): bool\n {\n return(boolval(preg_match('/^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$/', strtoupper($_guid))));\n }", "title": "" }, { "docid": "e6a20e431be864c673a6d362a05f6be7", "score": "0.54152197", "text": "function verify_good_member_id ($element_name,$element_value) {\n\tif(ctype_alnum($element_value)) { // it's good, so return immediately & save a little time\n\t\treturn true;\n\t} else {\n\t\t$member_id = ereg_replace(\"\\_\",\"\",$element_value);\n\t\t$member_id = ereg_replace(\"\\-\",\"\",$member_id);\n\t\t$member_id = ereg_replace(\"\\.\",\"\",$member_id);\n\t\tif(ctype_alnum($member_id)) // test again now that we've stripped the allowable special chars\n\t\t\treturn true;\t\t\n\t}\n}", "title": "" }, { "docid": "ab8ec6f0f3d6332f05d02fdd44fa167c", "score": "0.5400187", "text": "static function austrianServiceOK(&$validationResult)\n\t{\n\t\tif ($GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_TeilnehmerID\"] != '' AND $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerID\"] != '' AND $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerPIN\"] != '' )\n\t\t{\n\t\t\t// Aufruf Session Webservice / Login\n\t\t\t$result = FALSE;\n\t\t\t$soapClientSessionOptions = array \n\t\t\t(\n\t\t\t\t'trace' => 1,\n\t\t\t\t'exceptions' => 1,\n\t\t\t\t'cache_wsdl' => WSDL_CACHE_NONE\n\t\t\t);\n\t\t\t$soapClientLoginOptions =\t(object) array\n\t\t\t(\n\t\t\t\t'tid' =>\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_TeilnehmerID\"] , \n\t\t\t\t'benid' =>\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerID\"] , \n\t\t\t\t'pin' =>\t$GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerPIN\"] \n\t\t\t);\n\t\t\ttry {\t$soapClient1 = new SoapClient($GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientSessionURI\"], $soapClientSessionOptions);\t} \n\t\t\tcatch (SoapFault $exception) \t\t\t\t\t\t\t\t\t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult);\t} \t\t\n\t\t\tcatch (Exception $otherException)\t\t\t\t\t\t\t\t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult); return FALSE; } \t\t\n\t\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult); return FALSE; }\t\n\t\t\ttry\t{ $result = $soapClient1->Login($soapClientLoginOptions);\t} \n\t\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult);\t} \t\t\n\t\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult); return FALSE; } \t\t\n\t\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceLogin\", $validationResult); return FALSE; }\t\n\t\t\tif (isset($result) AND is_object($result) AND isset($result->Result) ) { return $result->Result;} else {\treturn FALSE; }\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE; \n\t\t}\n\t}", "title": "" }, { "docid": "678073148d05c3f8df06dda3c55b6dde", "score": "0.53853023", "text": "abstract protected function validateId($id): bool;", "title": "" }, { "docid": "adabd2cdbb8817df1c7c9e110e3d136e", "score": "0.5381193", "text": "function sanitizer($inputId)\n {\n preg_match(\"/([0-9]{6})(_)([a-zA-Z]{1,})/\", $inputId, $inputId2);\n\n if ( !empty($inputId2) and is_numeric($inputId2[1]) and $inputId2[2] == '_' and is_string($inputId2[3]) )\n {\n return TRUE;\n }\n else\n {\n echo \"<strong style='color: red'>Error: </strong>Please enter an ID which starts with six numeric values followed by underscore followed by string in the format example as shown --> 123456_ABC\";\n return FALSE;\n }\n }", "title": "" }, { "docid": "da2ae4127656537aaf301d172a0b0e1b", "score": "0.53641504", "text": "function IsUuid($data)\n{\n return preg_match('/^[a-f\\d]{8}-(?:[a-f\\d]{4}-){3}[a-f\\d]{12}$/i', $data);\n}", "title": "" }, { "docid": "955aa28064d40cceba5f2d32b913ccab", "score": "0.5358779", "text": "function revalidateUserID() {\n\t\tglobal $pun_user;\n\t\t\n\t\tif($this->getUserRole() === AJAX_CHAT_GUEST && $pun_user['is_guest'] || ($this->getUserID() === $pun_user['id'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "91264d78730d41258c6b4e26114caa00", "score": "0.5353213", "text": "function is_valid_uuid($uuid) {\n $regex = '#^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$#';\n $is_uuid = preg_match($regex, $uuid);\n return (boolean)$is_uuid;\n}", "title": "" }, { "docid": "7b0e14c762a2b0d44b616b87601fcc78", "score": "0.53230524", "text": "public function isValidFaculty($api_key){\n $stmt = $this->con->prepare(\"SELECT id from faculties WHERE api_key=?\");\n $stmt->bind_param(\"s\",$api_key);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows>0;\n }", "title": "" }, { "docid": "b3e826ba09203a3bc03eb8d6656cb8bf", "score": "0.53151083", "text": "public function isValidUser($apikey) {\n\t\t$stmt = $this->con->prepare(\"SELECT id from users WHERE apikey = ?\");\n\t\t$stmt->bind_para(\"s\", $apikey);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\t$num_rows = $stmt->num_rows;\n\t\t$stmt->close();\n\t\t\n\t\treturn $num_rows > 0;\n\t}", "title": "" }, { "docid": "b0fbca1a2b1aa4715d1875b234d4ee22", "score": "0.5310263", "text": "static function callVIESwebservice(&$uid2validate, &$countryOfuid, &$name, &$address, &$validationlevel, &$validateATU, &$validationResult)\n\t{\n\t\t$uidVIESAbfrageResult = UIDvalidationAustria::VIESServiceUIDabfrage($uid2validate, $countryOfuid, $name, $address, $validationlevel, $validateATU, $validationResult);\n\t\tif ($uidVIESAbfrageResult === FALSE)\n\t\t{\n\t\t\t$validationResult[\"VIESServiceOK\"]\t= 0;\n\t\t\t// Call (by CURL) european VIES website validation page, because VIES service could not provide validation \n\t\t\t$validationResult[\"VIESwebsitevalidationNeeded\"]\t= 1;\n\t\t\t$uidVIESwebsiteResult = UIDvalidationAustria::VIESwebsiteUIDabfrage($uid2validate, $countryOfuid, $name, $address, $validationlevel, $validateATU, $validationResult);\n\t\t\tif ($uidVIESwebsiteResult['curlExecSuccessful'] == 0)\n\t\t\t{\n\t\t\t\t$validationResult[\"VIESwebsiteOK\"]\t= 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$validationResult[\"VIESwebsiteOK\"]\t= 1;\n\t\t\t\tif ($uidVIESwebsiteResult['UIDvalid'] == 1)\n\t\t\t\t{\n\t\t\t\t\tif ($countryOfuid == $GLOBALS[\"UIDvalidationATglobalvars\"][\"countryInland\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 2;\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$validationResult[\"OverallValidationResult\"] = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($validationResult[\"NameCongruenceCheckProzent\"] > $GLOBALS[\"UIDvalidationATglobalvars\"][\"Stufe2UntergrenzeProzent\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 6;\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$validationResult[\"OverallValidationResult\"] = 5;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$validationResult[\"VIESServiceOK\"]\t= 1;\n\t\t\t$validationResult[\"VIESServiceAbfrageErgebnis\"]\t= $uidVIESAbfrageResult;\n\t\t\tif ($uidVIESAbfrageResult->valid == 1)\n\t\t\t{\n\t\t\t\tif($validationlevel == 2)\n\t\t\t\t{ \n\t\t\t\t\t$NameAndAddressValidationResult = $uidVIESAbfrageResult->name . \" \" . $uidVIESAbfrageResult->address ;\n\t\t\t\t\t$validateNameAndAddressResult = UIDvalidationAustria::validateNameAndAddress($name, $address, $NameAndAddressValidationResult, $validationResult);\n\t\t\t\t\tif ($validateNameAndAddressResult)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($countryOfuid == $GLOBALS[\"UIDvalidationATglobalvars\"][\"countryInland\"])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($validationResult[\"NameCongruenceCheckProzent\"] > $GLOBALS[\"UIDvalidationATglobalvars\"][\"Stufe2UntergrenzeProzent\"])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 6;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 5;\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\t\t\t\n\t\t\t\t\tif ($countryOfuid == $GLOBALS[\"UIDvalidationATglobalvars\"][\"countryInland\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$validationResult[\"OverallValidationResult\"] = 2;\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$validationResult[\"OverallValidationResult\"] = 1;\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\t$validationResult[\"OverallValidationResult\"] = 5;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "a6f0379695a06f46ac445a576d837b5c", "score": "0.53019947", "text": "function ossap_register_site_register_form_user_validate($form, &$form_state) {\n $values = &$form_state['values'];\n // they're trying to use an existing account\n if (isset($values['username'])) {\n $uid = ossap_user_exists($values['domain'], $values['username']);\n if (!$uid) {\n form_set_error($form['tabs']['existing'], t('Unrecognized username or email on %domain. Please reenter and try again.', array('%domain' => $values['domain'])));\n }\n else {\n $values['uid'] = $uid;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8c1ea863296592e3860052823b0bf61f", "score": "0.5273274", "text": "private function getMSISDNfrom($uid, $prefix = '00') {\n $uid = preg_replace('/\\s+/', '', $uid); // Remove all whitespaces\n $uid = str_replace('+', '00', $uid); // Replace all + with 00\n $uid = preg_replace('/\\D/', '', $uid); // Remove all non-digits\n if (strlen($uid) > 5) { // Still something here */\n if ($uid[0] == '0' && $uid[1] != '0') // Add implicit 41 if starting with one 0\n $uid = '41' . substr($uid, 1);\n $uid = ltrim($uid, '0'); // Remove all leading 0\n }\n $uid = $prefix . $uid; // Add the defined prefix\n \n return $uid;\n }", "title": "" }, { "docid": "391cb25969dded729ce2946f9520b274", "score": "0.52727747", "text": "protected function validateOwner()\r\n {\r\n $value = $this->owner->getValue();\r\n $len = strlen($value);\r\n if (empty($len)) {\r\n return true;\r\n }\r\n $parts = explode('@', $value);\r\n if (count($parts) != 2) {\r\n return false;\r\n }\r\n $locallen = strlen($parts[0]);\r\n if ($locallen > 64) {\r\n return false;\r\n }\r\n $domainlen = $len - $locallen;\r\n if ($domainlen < 4 || $domainlen > 255) {\r\n return false;\r\n }\r\n foreach (explode('.', $parts[0]) as $local) {\r\n if (!preg_match('/^[A-Za-z0-9!#$%&\\'*+\\\\/=?^_`{|}~-]+$/D', $local)) {\r\n return false;\r\n }\r\n }\r\n if (!preg_match('/^([a-z0-9][a-z0-9\\-]*[a-z0-9]|[a-z0-9])(\\.([a-z0-9][a-z0-9\\-]*[a-z0-9]|[a-z0-9])){0,10}\\.([a-z]{2,}){1}$/iD', $parts[1])) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "e8a938d66d503b3649d5839d6ee80264", "score": "0.5262297", "text": "function verifyID ($id){\n\n if(preg_match(\"/^[0-9]{8}$/\", $_POST['student_one_id'])){\n\n return true;\n\n }\n return false;\n\n }", "title": "" }, { "docid": "e194f0be7cd7d575c4e1f4277a7d6bbc", "score": "0.5249525", "text": "public function testArgumentValidateUserUid() {\n $view = Views::getView('test_view_argument_validate_user');\n $this->executeView($view);\n\n $this->assertTrue($view->argument['null']->validateArgument($this->account->id()));\n // Reset argument validation.\n $view->argument['null']->argument_validated = NULL;\n // Fail for a valid numeric, but for a user that doesn't exist\n $this->assertFalse($view->argument['null']->validateArgument(32));\n\n $form = [];\n $form_state = new FormState();\n $view->argument['null']->buildOptionsForm($form, $form_state);\n $sanitized_id = ArgumentPluginBase::encodeValidatorId('entity:user');\n $this->assertTrue($form['validate']['options'][$sanitized_id]['roles']['#states']['visible'][':input[name=\"options[validate][options][' . $sanitized_id . '][restrict_roles]\"]']['checked']);\n }", "title": "" }, { "docid": "b9649d6c783790ae203d74c2f67075b0", "score": "0.52436143", "text": "private function validateExisting($first, $last, $uid)\n {\n if($first === 'serveradmin' || $first === 'Boston') { return; }\n $match = $this->users->findByFirstLastName($first, $last)[0];\n if(isset($match[0])) {\n $this->validateUser($uid, $match[0]);\n }\n }", "title": "" }, { "docid": "c8001abc75f3ae1706fe495b5648912f", "score": "0.5234576", "text": "function admin_validation_callback_checker_cf7_validate( $result, $tag ) {\t\n\n\tif($_SERVER['REMOTE_ADDR'] == '217.145.95.33') {\n\t\t\n\t\t$name = $tag['name'];\n\t\t$the_value = $_POST[$name];\n\n\t\tif($the_value == \"sys147\") {\t\t\t\n\t\t\t$result['valid'] = true;\t\n\t\t}\n\n\t\t// Already invalid?\n\t\tif ( !$result['valid'] ) {\n\t\t\treturn $result;\n\t\t}\t\t\n\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "f91f77b54903e58bbb3e030b35a6f69c", "score": "0.5233042", "text": "function validate_user_signup()\n {\n }", "title": "" }, { "docid": "a92092aa3858b0ed65ef882d47ec1935", "score": "0.52278453", "text": "function validateID($id) {\n return ( is_numeric ( $id ) );\n }", "title": "" }, { "docid": "b44f96203cd4889e9234769fcf3dd1cd", "score": "0.5219323", "text": "public static function is_valid($uuid) {\n\t\treturn preg_match(self::VALID_PATTERN, $uuid) ? true : false;\n\t}", "title": "" }, { "docid": "16b0283829be4e8ef1337b55ead495c7", "score": "0.5214943", "text": "public function CheckUsername($username, $userId);", "title": "" }, { "docid": "2df75750094bbc2c2bfd3eab38211f22", "score": "0.52100253", "text": "function testIsCUEValid() {\n $this->assertEqual($this->Instit->isCUEValid(\"601254\"),1);\n $this->assertEqual($this->Instit->isCUEValid(\"201254\"),1);\n $this->assertEqual($this->Instit->isCUEValid(\"0601254\"),1);\n $this->assertEqual($this->Instit->isCUEValid(\"0201254\"),1);\n $this->assertEqual($this->Instit->isCUEValid(\"2601254\"),1);\n $this->assertEqual($this->Instit->isCUEValid(\"9401254\"),1);\n\n // Estos son casos que fallan\n $this->assertEqual($this->Instit->isCUEValid(\"2ss54\"),-1);\n $this->assertEqual($this->Instit->isCUEValid(\"j.kjas\"),-1);\n\n $this->assertEqual($this->Instit->isCUEValid(\"501254\"),-6);\n $this->assertEqual($this->Instit->isCUEValid(\"9810125\"),-7);\n $this->assertEqual($this->Instit->isCUEValid(\"05101255\"),-8);\n $this->assertEqual($this->Instit->isCUEValid(\"051012555\"),-9);\n\n // este es un numero intermedio entre 3 y 6 digitos\n $this->assertEqual($this->Instit->isCUEValid(\"6542\"),2);\n\n //este es un numero menor a 3 digitos\n $this->assertEqual($this->Instit->isCUEValid(\"54\"),-1);\n }", "title": "" }, { "docid": "2354c37bb8f366d3d64b734082fe29f3", "score": "0.52019024", "text": "function signup_nonce_check($result)\n {\n }", "title": "" }, { "docid": "40568ddca02d0eabbecd18b0c6377536", "score": "0.51924324", "text": "function clean_uidl($uidl)\n\t{\n\t\t// Take away \" or ' signs from the UIDL, they will break the HTML formatting when\n\t // passing as a var. Also confuse the SQL query\n\t // Take away and & symbols - They break the XUL interface\n\t $uidl = str_replace(array('<', '>', '\"', \"'\", '/', '&'), '', $uidl);\n\n\t\t// RFC 1939 - UIDL's must be < 70 characters\n\t\t//$uidl = substr($uidl, 0, 70);\n\n\t return $uidl;\n\t}", "title": "" }, { "docid": "2f47372159d01ea99970c2daf2e86b4c", "score": "0.51880735", "text": "protected function checkID(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_numeric($this->_ID) && $this->_ID !== 0 ) {\n\t\t\t$inMessage .= \"{$this->_ID} is not a valid value for ID\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "title": "" }, { "docid": "2f47372159d01ea99970c2daf2e86b4c", "score": "0.51880735", "text": "protected function checkID(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_numeric($this->_ID) && $this->_ID !== 0 ) {\n\t\t\t$inMessage .= \"{$this->_ID} is not a valid value for ID\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "title": "" }, { "docid": "512572d473b6df6e7c9856f35ed641d5", "score": "0.51794183", "text": "public function isValidPassword($uid, $password);", "title": "" }, { "docid": "e833b3c014d4bf11d0e1d137247bb3cf", "score": "0.5173941", "text": "private function checkData() {\n $uSes=new uSes($uCore);\n if(!$uSes->access(31)) {\n print json_encode([\n 'status'=>'forbidden'\n ]);\n exit;\n }\n\n if(!isset($_POST['user_id'])) {\n print json_encode([\n 'status'=>'error',\n 'msg'=>'wrong request'\n ]);\n exit;\n }\n if(!uString::isDigits($_POST['user_id'])) {\n print json_encode([\n 'status'=>'error',\n 'msg'=>'wrong user_id'\n ]);\n exit;\n }\n return (int)$_POST['user_id'];\n }", "title": "" }, { "docid": "b34e377a43dcec76b68d9e21150cbed5", "score": "0.51717705", "text": "function pmpapi_pull_pull_doc_by_guid_validate($form, &$form_state) {\n $guid = trim($form_state['values']['guid']);\n $pattern = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';\n if (!preg_match($pattern, $guid)) {\n form_set_error('guid', t('Not a valid GUID.'));\n }\n}", "title": "" }, { "docid": "1ec10753c9458cfdb9df5596068b370b", "score": "0.5152663", "text": "public function testIsValidUserInfo(): void\n {\n $testCases = [\n \"\" => true,\n \"user\" => true,\n \"user:\" => true,\n \"user:pass\" => true,\n \":\" => true,\n \":user\" => true,\n \":user:pass\" => true,\n \":user:pas:1:2\" => true,\n // All of the valid characters together\n \"%00azAZ09-._~!$&'()*+,;=\" => true,\n // Invalid characters and percent encodings\n \"/\" => false,\n \"?\" => false,\n \"#\" => false,\n \"[\" => false,\n \"]\" => false,\n \"%A\" => false,\n \"%G\" => false,\n \"%GA\" => false,\n \"%AG\" => false\n ];\n\n foreach ($testCases as $userInfo => $isValid) {\n $this->assertEquals($isValid, Rfc3986::isValidUserInfo($userInfo), \"Failed for case '$userInfo'.\");\n }\n }", "title": "" }, { "docid": "4863895c2caae3a5a2183b2032547ad6", "score": "0.51388156", "text": "public function is_valid_id($id){\n\t\treturn (boolean) preg_match('/^[A-z0-9]+$/', $id);\n\t}", "title": "" }, { "docid": "b1f0da209b74f64b0e04a0def0454679", "score": "0.51341337", "text": "function checkUid($aFileName, $aUid) {\r\n\r\n $f = new SplFileObject($aFileName);\r\n $f->setFlags(SplFileObject::DROP_NEW_LINE);\r\n\r\n $match = false;\r\n foreach ($f as $line) {\r\n if (false !== stripos($line, $aUid)) {\r\n $match = true;\r\n break;\r\n }\r\n }\r\n if (true === $match) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "657adae76220cf8e3eab48d05e084a7b", "score": "0.51315147", "text": "public function loginRadiusIsValidGuid($value)\n\t{\n\t\treturn preg_match('/^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$/i', $value);\n\t}", "title": "" }, { "docid": "f509bacc7d91c6f33afcf1962c972674", "score": "0.51239634", "text": "function validate_staff_member($mysqli, $member)\n{\n\tif ( empty($member[\"username\"])\n\t || !is_numeric($member[\"positionID\"]) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "f14cf0a26c0af8b62ac1c6c33f4249b0", "score": "0.5121996", "text": "public function isIdentifierValid()\n {\n return (request('identifier') == $this->identifier) ? true : false;\n }", "title": "" }, { "docid": "9b755590bd1ffb5a60613263797dbf08", "score": "0.51148516", "text": "function verify_id()\n\t{\n\t\tlog_debug(\"inc_services\", \"Executing verify_id()\");\n\n\t\tif ($this->id)\n\t\t{\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT id FROM `services` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "8ad005656ec493779c2760c62d1f1aca", "score": "0.5100643", "text": "function validateIdNumber($idNumber, $name)\n\t\t{\n\t\t\t// include the Id Number Validator Class and validate the id number\n\t\t\tinclude(\"class_libraries/IdNumberValidator.php\");\n\t\t\t$idValidator = new IdNumberValidator();\n\t\t\t\n\t\t\t// validate the id number\n\t\t\t$result = $idValidator -> validateIdNumber($idNumber, $name);\n\t\t\t\n\t\t\t// check the result\n\t\t\tif($result == false)\n\t\t\t{\n\t\t\t\t// get the error and return it\n\t\t\t\treturn $idValidator -> getErrors();\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "5b753519309d7ebfda3d156792d2b3e1", "score": "0.51000214", "text": "function __construct()\n\t{\n\t\t$functionArguments\t=\tfunc_get_args(); \n\t\t$referenznummer\t\t=\t$functionArguments[0];\n\t\t$validationResult\t=\tarray();\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{ $validationResult['notUIDvalidationAustriaRelatedError']\t= $otherError['message']; }\t\n\t\t@trigger_error('');\n\t\t$initialize = UIDvalidationAustria::initialize($referenznummer, $validationResult);\n\t}", "title": "" }, { "docid": "4f10896fbdc85775515b4ded40904ff1", "score": "0.5099638", "text": "private function isValidIdentifier(string $identifier): bool {\n $data = Frontify::extractIdAndToken($identifier);\n\n if (!$data) {\n return false;\n }\n\n return Frontify::isValidUrl($data[1]);\n }", "title": "" }, { "docid": "25426a71d13dda08d5a845f7cda5f5d1", "score": "0.5097557", "text": "function app_emailValidation($emailId) {\n $check = false;\n $pattern = \"/^[_a-z0-9-]+(/.[_a-z0-9-]+)*@[a-z0-9-]+(/.[a-z0-9-]+)*(/.[a-z]{2,3})$/i\";\n if (preg_match($pattern, $emailId))\n $check = true;\n else\n $check = false;\n return $check;\n}", "title": "" }, { "docid": "1d6b2e87a86cc3b961ad705c6e0dd0d2", "score": "0.5094557", "text": "public function hasUid(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "0b84d890f7cca78de41bda422cdc3f7e", "score": "0.5091148", "text": "function _check_affiliate($value)\n {\n if (!$value) return true;\n\n $user = model('user')->find_user(strtolower($value));\n if (!$user) {\n $this->form_validation->set_message(__FUNCTION__, lang('notice_value_not_exist'));\n return FALSE;\n }\n\n if ( $user->blocked == config('verify_yes', 'main') ) {\n $this->form_validation->set_message(__FUNCTION__, lang('user_parent_not_activation'));\n return FALSE;\n }\n if (mod('user')->setting('register_require_activation') && $user->email_activation == config('verify_no', 'main')) {\n $this->form_validation->set_message(__FUNCTION__, lang('user_parent_not_activation'));\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "151f40d16fad8a4e0ffcf587395253ef", "score": "0.5090108", "text": "static function austrianServiceDataboxExt($austrianServiceSessionID =\"\", &$validationResult)\n\t{\t// Aufruf UID-Abfrage Webservice \n\t\t$result = FALSE;\n\t\t$soapClientDataBoxExtOptions =\t(object) array\n\t\t(\n\t\t\t'tid'\t\t=> $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_TeilnehmerID\"] , \n\t\t\t'benid'\t\t=> $GLOBALS[\"UIDvalidationATglobalvars\"][\"finanzOnline_BenutzerID\"] , \n\t\t\t'id'\t\t=> $austrianServiceSessionID , \n\t\t\t'art'\t\t=> 'P' \n\t\t);\n\t\ttry {\t$soapClient5 = new SoapClient($GLOBALS[\"UIDvalidationATglobalvars\"][\"soapClientDataboxURI\"]);\t} \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t\t\t\t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t\t\t\t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult); return FALSE; }\t\n\t\ttry\t{ $result = $soapClient5->getDataboxExt($soapClientDataBoxExtOptions);\t} \n\t\tcatch (SoapFault $exception) \t\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'SoapFault',\t$exception,\t\t\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult);\t} \t\t\n\t\tcatch (Exception $otherException)\t\t\t\t\t{\tUIDvalidationAustria::handleErrors($errorType = 'Exception',\t$otherException,\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult); return FALSE; } \t\t\n\t\t$otherError = error_get_last(); if ($otherError && $otherError['message'] != '')\t{\tUIDvalidationAustria::handleErrors($errorType = 'otherError',\t$otherError,\t\t$validationResultMember = \"soapFault_austrianServiceDataboxExt\", $validationResult); return FALSE; }\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "473a5f9af3f00d36230109bcda2be562", "score": "0.50850785", "text": "function isEmpty($uid)\r\n{\r\n if (!empty($uid)) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "0931ab3584e3a77af4db1a33b7618d30", "score": "0.50765115", "text": "function ssn_us($value) {\n $invalid_area_numbers = array('000', '666');\n $invalid_ssn = array('078051120'); //invalid SSN used in movies and advertisements\n\n $valid = false;\n\n // We do not use Cake's default validation, because we want users to be able to separate\n // the sections of their ssn by either a dash, a period, a space, or by nothing at all\n // The regular expression used here is from the Cake Validation class, modified to allow\n // dash, period, space, or no separator between sections of the ssn\n if (preg_match('/\\\\A\\\\b[0-9]{3}[-. ]?[0-9]{2}[-. ]?[0-9]{4}\\\\b\\\\z/i', $value['value'])) {\n $working_value = preg_replace('/[^0-9]/i', '',$value['value']);\n $areaNumber = substr($working_value,0,3);\n $groupNumber = substr($working_value,3,2);\n $serialNumber = substr($working_value,5,4);\n\n if(!empty($areaNumber) && (!empty($groupNumber) && $groupNumber != '00')\n && (!empty($serialNumber) && $serialNumber != '0000') && (!in_array($working_value, $invalid_ssn))) {\n if( (!in_array($areaNumber, $invalid_area_numbers)) &&\n (!((intval($areaNumber) >= 734) && (intval($areaNumber) <= 749))) && // area numbers 734-749 are invalid\n (!((intval($areaNumber) >= 773) && (intval($areaNumber) <= 999)))) { // area numbers 773-999 are invalid\n $valid = true;\n }\n }\n }\n\n return $valid;\n }", "title": "" }, { "docid": "9d21465b3ae1183977a31bc5520caea4", "score": "0.5071932", "text": "final private function checkUuid($uuid)\n {\n return preg_match(\n '#^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$#i',\n $uuid\n );\n }", "title": "" }, { "docid": "00b75c06ce4da01df0004b932f386651", "score": "0.50692815", "text": "abstract public function nonce_check();", "title": "" }, { "docid": "822a719c621674303925a34d2f523266", "score": "0.50672597", "text": "function twitter_check($str, $uid = -1)\n {\n // Strip away the @ if found\n if ($str[1] == '@') {\n $str = substr($str, 1);\n }\n $user = $this->user_model->getUserbyTwitter($str);\n if (empty($user)) {\n return true;\n }\n\n if ($uid == -1 || $user[0]->ID != $uid) {\n $this->validation->_error_messages['twitter_check']\n = \"This twitter name is already used!\";\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "f2c2d786b8175b954d429ce2c1b297d9", "score": "0.50637484", "text": "public function testInvalidUsabFbUsedToGetRecordNumber()\n {\n $badId = 'ABDEHFC';\n\n // When: It is used to translate back to a valid record index\n try {\n UsafbIdHelper::getRecordNo($badId);\n $this->assertFalse(true);\n }\n\n // Then: It should throw an UnexpectedValueException\n catch (\\UnexpectedValueException $e) {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "dbd529d622d90335bd48627d16a16bf4", "score": "0.50602394", "text": "public function check_username() {\n\t\t$username = $this->route->param1;\n\t\t$check = $this->model('Member')->get_member_id($username);\n\t\tif ($check >= 1) {\n\t\t\techo $check;\n\t\t} else {\n\t\t\techo 0;\n\t\t}\n\n\t}", "title": "" }, { "docid": "3efd7da8a19fc01ee9de4372c54158d1", "score": "0.5058829", "text": "public static function validateNationalIdNumber($input)\n {\n $input = trim($input);\n $prepared_input = preg_replace(\"^\\\\s^\", \"\", $input);\n if ((preg_match(\"[^\\\\d{2}-?\\\\d{6,7}-?[A-Za-z]{1}-?\\\\d{2}$]\", $prepared_input) == FALSE) || strlen($prepared_input) < 12 || strlen($prepared_input) > 16) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "0e2e60e6a43cd8973432ffb0cdb68197", "score": "0.5054883", "text": "public function isValidId($id)\n\t{\n\t\t//return is_string($id) && preg_match('/^[a-f0-9]{40}$/', $id);\n\n\t\t// overload this checking\n\t\t// check that session id has enough characters\n\t\treturn strlen($id) == 64;\n\t}", "title": "" }, { "docid": "f88cff90725efc6260c716299f2df248", "score": "0.5054161", "text": "public static function validate()\n\t{\n\t\t// Star off with some basic params\n\t\t$params = array(\n\t\t\t'openid.assoc_handle'\t=> $_GET['openid_assoc_handle'],\n\t\t\t'openid.signed'\t\t\t=> $_GET['openid_signed'],\n\t\t\t'openid.sig'\t\t\t=> $_GET['openid_sig'],\n\t\t\t'openid.ns'\t\t\t\t=> 'http://specs.openid.net/auth/2.0',\n\t\t);\n\t\t\n\t\t// Get all the params that were sent back and resend them for validation\n\t\t$signed = explode(',', $_GET['openid_signed']);\n\t\tforeach($signed as $item)\n\t\t{\n\t\t\t$val = $_GET['openid_' . str_replace('.', '_', $item)];\n\t\t\t$params['openid.' . $item] = get_magic_quotes_gpc() ? stripslashes($val) : $val; \n\t\t}\n\n\t\t// Finally, add the all important mode. \n\t\t$params['openid.mode'] = 'check_authentication';\n\t\t\n\t\t// Stored to send a Content-Length header\n\t\t$data = http_build_query($params);\n\t\t$context = stream_context_create(array(\n\t\t\t'http' => array(\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'header' => \n\t\t\t\t\t\"Accept-language: en\\r\\n\".\n\t\t\t\t\t\"Content-type: application/x-www-form-urlencoded\\r\\n\" .\n\t\t\t\t\t\"Content-Length: \" . strlen($data) . \"\\r\\n\",\n\t\t\t\t'content' => $data,\n\t\t\t),\n\t\t));\n\n\t\t$result = file_get_contents(self::STEAM_LOGIN, false, $context);\n\t\t\n\t\t// Validate wheather it's true and if we have a good ID\n\t\tpreg_match(\"#^http://steamcommunity.com/openid/id/([0-9]{17,25})#\", $_GET['openid_claimed_id'], $matches);\n\t\t$steamID64 = is_numeric($matches[1]) ? $matches[1] : 0;\n\n\t\t// Return our final value\n\t\treturn preg_match(\"#is_valid\\s*:\\s*true#i\", $result) == 1 ? $steamID64 : '';\n\t}", "title": "" }, { "docid": "ebe650cc4fc01d0820b86c71807fe7b6", "score": "0.50473344", "text": "public function validate()\n {\n // get the value; remove spaces, dashes, and dots\n $value = str_replace([' ', '-', '.'], '', (string) $this->getValue());\n\n // is it composed only of digits?\n if (! ctype_digit($value)) {\n return false;\n }\n\n // luhn mod-10 algorithm: https://gist.github.com/1287893\n $sumTable = [\n [0,1,2,3,4,5,6,7,8,9],\n [0,2,4,6,8,1,3,5,7,9],\n ];\n\n $sum = 0;\n $flip = 0;\n\n for ($i = strlen($value) - 1; $i >= 0; $i--) {\n $sum += $sumTable[$flip++ & 0x1][$value[$i]];\n }\n return $sum % 10 === 0;\n }", "title": "" }, { "docid": "29ddb1880853c7c1e8549eaf1b305283", "score": "0.5041435", "text": "private function validate()\n {\n //Check username already exists\n if (!$this->username) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_EMPTY\"), \"error\", \"username\");\n } elseif ($this->getBy(\"username\", $this->username, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_TAKEN\"), \"error\", \"username\");\n }\n //Check email\n if (!$this->email) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_EMPTY\"), \"error\", \"email\");\n } elseif ($this->getBy(\"email\", $this->email, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_TAKEN\"), \"error\", \"email\");\n }\n //Password?\n if ($this->password && strlen($this->password)<6) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_PASSWORD_SHORT\"), \"error\", \"password\");\n }\n //Return messages avoiding deletion\n return Registry::getMessages(true);\n }", "title": "" }, { "docid": "624542344f44a569d5eb658111b4d561", "score": "0.503767", "text": "function isValid() {\n\t\treturn( @BitBase::verifyId( $this->mContentId ) );\n\t}", "title": "" }, { "docid": "2f664f6926d2534df76b7d34466d0f62", "score": "0.5037571", "text": "function _uid_filter ($dn) { return('(uid='.dn2uid($dn).')'); }", "title": "" }, { "docid": "816b7b8368bbf71e6a737265b0e506eb", "score": "0.5035263", "text": "function validNetid($addr) {\n\t\tif (preg_match('/[a-zA-Z]{2,}[0-9][email protected]/', $addr)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e4e910dae0edef32eeacba8770e11290", "score": "0.50303775", "text": "protected function validate()\n {\n $this->validator\n = substr($this->account, 2, 2) == 99\n ? $this->validator1\n : $this->validatorChain;\n }", "title": "" }, { "docid": "84f7e992877decc3ef8b0982628b98cf", "score": "0.50287795", "text": "public function isAudience($uid) {\n $result = $this->queryRoomAudience($uid);\n return !empty($result['nuntius_room_audience']);\n }", "title": "" }, { "docid": "ecc2ac92399a65746dd2657119859dcd", "score": "0.50260854", "text": "public function testGetInvalidUserByUserId() {\n\t\t//grab a user id that exceeds the maximum allowable user id\n\t\t$user = User::getUserByUserId($this->getPDO(), TimeCrunchersTest::INVALID_KEY);\n\t\t$this->assertNull($user);\n\t}", "title": "" }, { "docid": "743d621fa93ec212db36772a66d3f8cf", "score": "0.50218534", "text": "function idFormat($value){\n \n if(!preg_match(VALID_INT_FORMAT,$value)){\n return false;\n }\n \n return true;\n\n}", "title": "" }, { "docid": "4d47c34a1189d967cb9ff1017ec70d15", "score": "0.5018296", "text": "public function email_valid_ajax()\n\n\t{\n\n\t\t$email = $this->input->post('email');\n\n\t\t$result = $this->sitemodel->valid_candidate_email($email);\n\n\t \n\n\t\tif ($result == 0) {\n\n\t\t\techo 0;//email is unique. not signed up before\n\n\t\t} else {\n\n\t\t\techo 1;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "8e7d5a079470edfad133530d435c68c2", "score": "0.5011877", "text": "function checkid($uid){\n \t//print_r($uid);die;\n \t$query=$this->db->query(\"SELECT usermailid FROM ssr_t_users WHERE usermailid='$uid'\");\n \t$a=$query->result();\n \tif($a == null){\n \t\t$query=$this->db->query(\"SELECT usermailid FROM ssr_t_users WHERE usermailid='$uid' and name='' \");\n \t\t//print_r($query);die;\n \t\t$a=$query->num_rows;\n \t\tif($a !== 0){\n \t\t\t$data=array(\n \t\t\t\t\t'usermailid' =>$uid,\n \t\t\t\t\t'name' =>'',\n \t\t\t\t\t'image' =>'',\n \t\t\t\t\t'phone_number' =>'',\n \t\t\t\t\t'mobile' =>'',\n \t\t\t\t\t'address' =>''\n \t\t\t);\n \t\t\t$this->db->update('ssr_t_users',$data);\n \t\t\t//print_r($uid);die;\n \t\t\treturn TRUE;\n \t\t}\n \t\telse{\n \t\t\t\t\n \t\t\t$data=array(\n \t\t\t\t\t'usermailid' =>$uid,\n \t\t\t\t\t'name' =>'',\n \t\t\t\t\t'image' =>'',\n \t\t\t\t\t'phone_number' =>'',\n \t\t\t\t\t'mobile' =>'',\n \t\t\t\t\t'address' =>''\n \t\t\t);\n \t\t\t$this->db->insert('ssr_t_users',$data);\n \t\t\t$this->db->insert_id();\n \t\t\treturn TRUE;\n \t\t}\n \t}else{\n \t\t$ci = & get_instance();\n \t\t$query = $ci->db->get_where('ssr_t_users',array('usermailid' => $uid));\n \t\t$result=$query->Result();\n \t\t$id=$result[0]->usermailid;\n \n \t\t//print_r($id);die;\n \t\tif($uid == $id){\n \t\t\t//print_r($b);die;\n \t\t\treturn TRUE;\n \t\t}\n \n \t}\n }", "title": "" } ]
544f8c5ba734a25eb5d189fad44411c0
Retrieve the list of classes that implements the DataObject_TaxonomyExtension
[ { "docid": "79bd4c5817f861119641b150634f5be9", "score": "0.7041762", "text": "public static function get_classes_to_index()\n {\n $classes = ClassInfo::subclassesFor(DataObject::class);\n $classes = array_filter($classes, function ($class) {\n return ClassInfo::hasMethod(singleton($class), 'IsTagged');\n });\n \n return $classes;\n }", "title": "" } ]
[ { "docid": "e979736f6e3f38a13083e36fc7c5d7e4", "score": "0.7183032", "text": "public function getClasses();", "title": "" }, { "docid": "b075ecdbe7b7a118dfdb3884082ec0db", "score": "0.7122072", "text": "public function getClasses() {}", "title": "" }, { "docid": "b6bcb932361ca2e75aeb621f60eec5cf", "score": "0.70785487", "text": "public function getKnownClasses();", "title": "" }, { "docid": "08fcd604a7d489f65ad6eaa0d2c9cff2", "score": "0.7037852", "text": "function getClasses() {\n\t\treturn $this->_AutoloadArray;\n\t}", "title": "" }, { "docid": "8e77b27106f6b6cb09eb3ea4cedd21f5", "score": "0.70087606", "text": "public function getClasses() {\n\t\t$BaseClassesWithFluentExtensionsAndFields = [];\n\t\tforeach ($this::getDecoratedBy(\"FluentExtension\") as $class) {\n\t\t\t$ancestry = array_values($class::get()->first()->getClassAncestry($class));\n\t\t\t$firstancestry = array_values($ancestry)[0];\n\t\t\tif ($this->getAncestrysTranslatedFields($class::get()->first())) {\n\t\t\t\tarray_push($BaseClassesWithFluentExtensionsAndFields, $firstancestry);\n\t\t\t}\n\t\t}\n\t\treturn array_values(array_unique($BaseClassesWithFluentExtensionsAndFields));\n\t}", "title": "" }, { "docid": "9bbc4839999df0fa9c89d9a44fd177a7", "score": "0.6928339", "text": "public function getTagClasses();", "title": "" }, { "docid": "23a2202db12b301e46b3b5242d38a013", "score": "0.6724706", "text": "public static function get_tax_classes()\n {\n }", "title": "" }, { "docid": "e57d83840c0858e57568f2e3b64ab990", "score": "0.66709006", "text": "protected function getRegisteredClasses() {}", "title": "" }, { "docid": "58a689f4a1f84efad25abb215fdc516f", "score": "0.66586274", "text": "function get_declared_classes()\n{\n\treturn array();\n}", "title": "" }, { "docid": "89d64443bf52e572d30eaf2aae4c85e4", "score": "0.6647885", "text": "public static function get_tax_class_slugs()\n {\n }", "title": "" }, { "docid": "a347aa952595c0d56b83f73c45b5dae8", "score": "0.66124904", "text": "public function getClasses()\n {\n return $this->_classes;\n }", "title": "" }, { "docid": "a347aa952595c0d56b83f73c45b5dae8", "score": "0.66124904", "text": "public function getClasses()\n {\n return $this->_classes;\n }", "title": "" }, { "docid": "929d51d16a4b0730055856dabdf14e69", "score": "0.6557467", "text": "function get_declared_classes()\n{\n return array();\n}", "title": "" }, { "docid": "fc2bd55d8bd57aaa6fbf89cad3b6aec8", "score": "0.6551997", "text": "public function getClasses ()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "a5b5a91bbec04cbe5c4442857a16c3e8", "score": "0.6544117", "text": "public function getClasses() : array\n {\n return $this->classes;\n }", "title": "" }, { "docid": "07695a9926599879063ea62d5f7a88bc", "score": "0.6531147", "text": "public function getClasses()\n\t{\n\t\treturn $this->getProp('rdfs:type');\n\t}", "title": "" }, { "docid": "00cf667f219fef4befc10bb86712287a", "score": "0.6515628", "text": "public function getObjectClasses(): array\n {\n return $this->getAttribute('objectclass', static::$objectClasses);\n }", "title": "" }, { "docid": "db569fae9f75a13ab5b5908a5c853157", "score": "0.6514231", "text": "public function getClasses()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "db569fae9f75a13ab5b5908a5c853157", "score": "0.6514231", "text": "public function getClasses()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "db569fae9f75a13ab5b5908a5c853157", "score": "0.6514231", "text": "public function getClasses()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "db569fae9f75a13ab5b5908a5c853157", "score": "0.6514231", "text": "public function getClasses()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "2d45a1b15fe8ff8dbdaf100f3bcdc60f", "score": "0.6507285", "text": "public function FluentClasses()\t{\n\t\t// $i = $this::getDecoratedBy(\"FluentExtension\");\n\t\t$i = $this->getClasses();\n\t\t$result = ArrayList::create();\n\t\tforeach($i as $Class) {\n\t\t\t$f = DataObject::create();\n\t\t\t$f->Name = $Class;\n\t\t\t$result->push($f);\n\t\t}\n\t\tif ($result) return($result);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5968d95d54a2265748f6fa5769bf6ad4", "score": "0.64806044", "text": "public function get_classes()\n {\n // Return the classes we are searching for\n return array_keys($this->_classes);\n }", "title": "" }, { "docid": "6133893978db998da9c412bbb7111f9c", "score": "0.64677995", "text": "public static function getTreeClasses() {\n\t\tif (!self::$_queryList)\n\t\t\tself::$_queryList = new QueryList(self::getDescriptor());\n\t\treturn self::$_queryList;\n\t}", "title": "" }, { "docid": "2991ee011fbfff438bd79da60ed60e9b", "score": "0.6440036", "text": "public function getClasses() {\n return $this->classes;\n }", "title": "" }, { "docid": "41467b7f7308100da34ffc9f012492b0", "score": "0.6419608", "text": "public function getTaxonomies(): array;", "title": "" }, { "docid": "1442e70616bebbb09b33380cc6712c07", "score": "0.6419335", "text": "public function get_classes() {\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "38ec9a52bac47e32e584edd5e203d9b4", "score": "0.64066815", "text": "public function getTypes() {\n\t\treturn $this->getChildren(); // possibly change in future\n\t}", "title": "" }, { "docid": "91913c839adde982030e5f1690766acd", "score": "0.6402721", "text": "public function getObjectClasses()\n {\n return $this->objectClasses;\n }", "title": "" }, { "docid": "18e4ac7594c9224d05ea4bd3ee76e981", "score": "0.6393439", "text": "public function getClasses()\n\t{\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "efded2772e52e5b73836296a43112483", "score": "0.6392748", "text": "protected function getShortcodeClasses()\n {\n return [];\n }", "title": "" }, { "docid": "5e83c9f4f59c97e29bd60f5502044d5b", "score": "0.6392698", "text": "abstract protected function getClassList(): array;", "title": "" }, { "docid": "ad28d570ed8e1235f02fa9411aa0372f", "score": "0.63906854", "text": "public function getClassList() {\n return $this->class_list;\n }", "title": "" }, { "docid": "4e099b3dfb6c841ceee75f035466d768", "score": "0.6369607", "text": "public function load()\n {\n return $this->taxClasses;\n }", "title": "" }, { "docid": "d033178d0847a7894781c5dcb7d852f8", "score": "0.63410413", "text": "public function getClasses() {\r\n\t\treturn $this->ilRoomSharingDatabasePrivileges->getClasses();\r\n\t}", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.63401705", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.63401705", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.63401705", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.63401705", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.63401705", "text": "public function getTypes();", "title": "" }, { "docid": "9fe2cf770c402a2a1ae199a720c14574", "score": "0.6338045", "text": "public function getAllClasses()\n\t\t{\n\n\t\t\treturn $this->classes;\n\t\t}", "title": "" }, { "docid": "20300adea436603254ddfa91b7800d87", "score": "0.6335259", "text": "public function getClasses() {\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "c8c673221b9b4af96bd9709d6d09e041", "score": "0.6327413", "text": "function ctools_vocabulary_terms_ctools_content_types() {\n if (module_exists('taxonomy')) {\n return array(\n 'single' => TRUE,\n 'title' => t('Vocabulary terms'),\n 'icon' => 'icon_vocabulary.png',\n 'description' => t('All the terms in a vocabulary.'),\n 'required context' => new ctools_context_required(t('Vocabulary'), 'vocabulary'),\n 'category' => t('Vocabulary'),\n 'defaults' => array('max_depth' => 0, 'tree' => 1),\n );\n }\n}", "title": "" }, { "docid": "50064124547d69df6498b2f085167830", "score": "0.6322111", "text": "public function childClasses()\n {\n return ['person', 'organisation'];\n }", "title": "" }, { "docid": "ba367e8d383dda799341833c8073db5b", "score": "0.63194346", "text": "static public function getImplementations()\n {\n $list = array();\n foreach ( self::$implementations as $name => $className )\n {\n $list[] = $name;\n }\n return $list;\n }", "title": "" }, { "docid": "02f2ecedabd0138a59f40a4c14d6b464", "score": "0.6314508", "text": "public function getClasses(){\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "dfd58f2ad670898f8d6d2581d6ad6e4e", "score": "0.6305167", "text": "function getDefinedClasses($extension_name)\n{\n $classes = get_declared_classes();\n foreach ($classes as $key => $class_name)\n {\n $rc = new ReflectionClass($class_name);\n // Csak a mongóhoz tartozó definiált osztályokra lesz szükség:\n if ($rc->getExtensionName() !== $extension_name)\n unset($classes[$key]);\n }\n return $classes;\n}", "title": "" }, { "docid": "061f2f3b332498cb1bc45b633ec724c2", "score": "0.6302879", "text": "public function subClasses(){\n\t\t\t$result = array();\n\t\t\tforeach(get_declared_classes() as $className){\n\t\t\t\tif(is_subclass_of(Object::construct($className),$this->getClass())){\n\t\t\t\t\t$result[] = $className;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "595d9ef9f58c2febd8fcbbecc67cc650", "score": "0.63023293", "text": "public function getDeclaredTypes() : array;", "title": "" }, { "docid": "f30ba52b77fe924be2ef882a8d069d02", "score": "0.6297941", "text": "public function getAllClasses()\n {\n return $this->reflector->getAllByIdentifierType(\n new IdentifierType(IdentifierType::IDENTIFIER_CLASS)\n );\n }", "title": "" }, { "docid": "bc21a1e8e94a7c11d7eb35687a6a95fe", "score": "0.6294445", "text": "public function get_items_tax_classes()\n {\n }", "title": "" }, { "docid": "ee558558af94c59de61e005f13eaf290", "score": "0.6283877", "text": "public function getBundleClasses();", "title": "" }, { "docid": "2fdd0174bb23724bc0f84ba6c9f4d17b", "score": "0.6276269", "text": "public static function availableTypes(){\n $methods = get_class_methods(__CLASS__);\n $types = array_filter($types, function($type){\n return stripos('__', $type) === false;\n });\n return array_map(function($type){\n return str_replace('__', '', $type);\n }, $types);\n }", "title": "" }, { "docid": "c3dc23af9859505c4c7b507699d2c494", "score": "0.62696946", "text": "public function get_classes()\r\n {\r\n return explode(' ', $this->get_class());\r\n }", "title": "" }, { "docid": "ef66af2179fab3cba9a5a045d45bc162", "score": "0.62449974", "text": "protected function getClasses() {\r\n\t\t$classes = $this->conf['classes.'];\r\n\t\t$a = array();\r\n\t\tif (is_array($classes)) {\r\n\t\t\tforeach ($classes as $class) \r\n\t\t\t\tarray_push($a, $class);\r\n\t\t}\r\n\t\treturn $a;\r\n\t}", "title": "" }, { "docid": "fa7e145d3fc1de5694dd3637769c9d6d", "score": "0.6223477", "text": "public function getPluginTypes();", "title": "" }, { "docid": "fbf0eb8e2d8dd253712c2dc483e9ac8d", "score": "0.6205373", "text": "public function getSubTypesNames()\r\n\t{\r\n\t\treturn self::getSubClasses($this->_type);\r\n\t}", "title": "" }, { "docid": "2cf9c2f157d15dac7337f89ff8dae544", "score": "0.61999375", "text": "public function PageTypes()\n {\n $classes = SiteTree::page_type_classes();\n\n $result = new ArrayList();\n\n foreach ($classes as $class) {\n $instance = SiteTree::singleton($class);\n if ($instance instanceof HiddenClass) {\n continue;\n }\n\n // skip this type if it is restricted\n $needPermissions = $instance->config()->get('need_permission');\n if ($needPermissions && !$this->can($needPermissions)) {\n continue;\n }\n\n $result->push(new ArrayData([\n 'ClassName' => $class,\n 'AddAction' => $instance->i18n_singular_name(),\n 'Description' => $instance->i18n_classDescription(),\n 'IconURL' => $instance->getPageIconURL(),\n 'Title' => $instance->i18n_singular_name(),\n ]));\n }\n\n $result = $result->sort('AddAction');\n\n return $result;\n }", "title": "" }, { "docid": "98e70fb8f16f0ce6e28a65a3827bc3af", "score": "0.6195362", "text": "public function getTypesList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "ff0a9bd72d317ddde7fcf38cb5a2d8ad", "score": "0.61677164", "text": "public function classes()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "ccd1a05e43a8d3309e4c1c7a5b504aa5", "score": "0.6150307", "text": "function getClasses() {\n\t\t$ar = get_declared_classes();\n\t\tforeach ( $ar as $class ) {\n\t\t\t$c = new \\ReflectionClass( $class );\n\t\t\tif ( $c->isUserDefined() ) {//add only when class is user-defined\n\t\t\t\t$this->classes[ $class ] = new IPReflectionClass( $class );\n\t\t\t}\n\t\t}\n\t\tksort( $this->classes );\n\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "69cca26b55fdeb8bc9a12703e7c78c27", "score": "0.6150231", "text": "protected function getTypes() {}", "title": "" }, { "docid": "1457deb2019c62c13678cb111b7dae49", "score": "0.6150068", "text": "public static function content_module_types()\n {\n $base = get_called_class();\n $types = ClassInfo::subclassesFor($base);\n\n $aTypes = array();\n\n if ($types) {\n foreach ($types as $type) {\n $instance = singleton($type);\n if (\n $type != $base &&\n !in_array($type, singleton($base)->stat('exclude_modules')) &&\n !($instance instanceof HiddenClass)\n ) {\n $aTypes[$instance->i18n_singular_name()] = $instance;\n }\n }\n }\n\n ksort($aTypes);\n\n return array_values($aTypes);\n }", "title": "" }, { "docid": "5eaab3c6d2039c69f04617fea6620373", "score": "0.6139737", "text": "function getClasses(&$c)\n {\n $r = $c->classes->getClassesInPath($this->parent->path);\n $rr = array();\n if ($r) {\n foreach ($r as $class => $obj) {\n $rr[$obj->docblock->package][] = $obj;\n }\n }\n return $rr;\n }", "title": "" }, { "docid": "9699c45d1ee69063d18eb36822820a5f", "score": "0.6135994", "text": "public function types()\n {\n return $this->typeLoader()->repository()->getAll();\n }", "title": "" }, { "docid": "72b11eaa7000e5c6d8ed3002f9aeb261", "score": "0.6111527", "text": "public function getSupportedClasses(): array\n {\n return $this->getMaps()->getSupportedClasses();\n }", "title": "" }, { "docid": "dbb0fc095371562a568b5b30eb3bd543", "score": "0.61015004", "text": "public function classes() {\n return $this->classes;\n }", "title": "" }, { "docid": "dbb0fc095371562a568b5b30eb3bd543", "score": "0.61015004", "text": "public function classes() {\n return $this->classes;\n }", "title": "" }, { "docid": "1cc6ab06dcfb59c49012347eefbc8cac", "score": "0.610085", "text": "public function loadClasses()\n {\n foreach (\\eZContentClass::fetchAllClasses() as $class) {\n $attributes = array();\n $dataMap = $class->dataMap();\n $identifier = $class->attribute('identifier');\n foreach ($dataMap as $attributeIdentifier => $attribute) {\n $attributes[$attributeIdentifier] = array(\n 'id' => $attribute->attribute('id'),\n 'identifier' => $attributeIdentifier,\n 'type' => $attribute->attribute('data_type_string'),\n 'can_translate' => $attribute->attribute('can_translate') && $attribute->dataType()->isTranslatable(),\n );\n }\n $this->classIndex[$identifier] = array(\n 'id' => $class->attribute('id'),\n 'status' => 'reference',\n 'identifier' => $identifier,\n 'attributes' => $attributes,\n 'status' => 'reference',\n );\n }\n return $this->classIndex;\n }", "title": "" }, { "docid": "79fac438bda8df1a08016fcb9999f6fb", "score": "0.60975575", "text": "public function getAllClassNames();", "title": "" }, { "docid": "36799e5ec71d7911d3289e6abaa9fb4e", "score": "0.6079152", "text": "public function getAllClassInfo() {\n $return = array();\n foreach($this->class_list as $file_location => $class_name_array) {\n foreach($class_name_array as $class_name) {\n $return[$class_name] = $this->getClassInfo($class_name);\n }\n }\n return Docgen_Hooks::call('all_class_info', array($return));\n }", "title": "" }, { "docid": "5a429129950bae5ada17379fbe8e7a30", "score": "0.60784876", "text": "function getDecoratedBy($extension){\n\t\t$classes = [];\n\t\tforeach(ClassInfo::subClassesFor('DataObject') as $className) {\n\t\t\tif (DataObject::has_extension(\"$className\", \"$extension\") && DataObject::has_own_table($className) && $className::get()->Count()) {\n\t\t\t\t$classes[] = $className;\n\t\t\t}\n\t\t}\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "39663c0e10c5a48399203a5edb65b277", "score": "0.606177", "text": "public static function get_taxonomies()\n {\n }", "title": "" }, { "docid": "94c4f4c7a2abc502ded707d24712530f", "score": "0.6036131", "text": "public function getExtensionClassNames(): array\n\t{\n\t\treturn array_keys($this->extensions);\n\t}", "title": "" }, { "docid": "95eeea7aced3326494020f5d61813887", "score": "0.6015612", "text": "function get_included_types() {\n\n\t\t$included_types = array();\n\n\t\t$post_types = get_post_types( array(), 'objects' );\n\n\t\t// Add icon names for default post types (not defined in type object!)\n\t\t$type_icon_hash = array(\n\t\t\t'post' => 'dashicons-admin-post',\n\t\t\t'page' => 'dashicons-admin-page',\n\t\t\t'links' => 'dashicons-admin-links',\n\t\t\t'attachment' => 'dashicons-admin-media',\n\t\t);\n\n\t\tforeach( $post_types as $type ) {\n\n\t\t\tif( 'revision' == $type->name || 'nav_menu_item' == $type->name ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( isset( $type->menu_icon ) ) {\n\t\t\t\t$menu_icon = $type->menu_icon;\n\t\t\t} else {\n\t\t\t\t$menu_icon = isset( $type_icon_hash[ $type->name ] ) ? $type_icon_hash[ $type->name ] : null;\n\t\t\t}\n\n\t\t\tarray_push( $included_types, array(\n\t\t\t\t'slug' => $type->name,\n\t\t\t\t'label' => $type->label,\n\t\t\t\t'icon' => $menu_icon,\n\t\t\t));\n\n\t\t}\n\n\t\treturn $included_types;\n\n\t}", "title": "" }, { "docid": "0127af5b250a5e9f47c33882a2bf00c6", "score": "0.600057", "text": "private function coreClasses(): array\n {\n return [\n 'request' => 'System\\\\Http\\\\Request',\n 'response'\t => 'System\\\\Http\\\\Response',\n 'session' => 'System\\\\Session',\n 'route' => 'System\\\\Route',\n 'load' => 'System\\\\Loader',\n 'cookie' => 'System\\\\Cookie',\n 'html' => 'System\\\\Html',\n 'view' => 'System\\\\View\\\\ViewFactory',\n 'db' => 'System\\\\Database',\n 'url' => 'System\\\\Url',\n 'validator' => 'System\\\\Validation',\n ];\n }", "title": "" }, { "docid": "697700650be41bc6e57600c272c1ea92", "score": "0.59828854", "text": "public function getContentTypes();", "title": "" }, { "docid": "4baf7ceca6e35cd9fe4fd0e9d3f2efeb", "score": "0.5973203", "text": "public function getClasses()\n {\n if (!isset($this->declarations['T_CLASS'])) {\n return [];\n }\n\n return array_keys($this->declarations['T_CLASS']);\n }", "title": "" }, { "docid": "5f0158f7caa43db6275a02378e1f6776", "score": "0.5954449", "text": "public function getClassModels(): array\n {\n $classes = $this->visitor->getClasses();\n\n return array_combine(\n array_map(function(ClassModel $model) {\n return $model->getFullyQualifiedNamespace();\n }, $classes), $classes);\n }", "title": "" }, { "docid": "b4b36b8fd26774473ae0f224f49e4eb2", "score": "0.5950283", "text": "public function register_taxonomies() {\n\t\tforeach ( $this->taxonomies as $taxonomy_class ) {\n\t\t\t$this->register_content_type( new $taxonomy_class() );\n\t\t}\n\t}", "title": "" }, { "docid": "4fb34f3c0ec12217943ef7abc0fc3b38", "score": "0.59409547", "text": "function Get_declared_classes($param) {\n print_r(get_declared_classes());\n return \"\";\n }", "title": "" }, { "docid": "5705270fad204f74a8ca91c71b636e37", "score": "0.5940552", "text": "public function getCustomDoctrineTypes() : array {}", "title": "" }, { "docid": "b4bb9e85fe2ede43941cacf411ec3542", "score": "0.59390706", "text": "public function getHandleTypes(){\n try{\n $test = $this->taxonomiesBLL->getHandleTypes();\n return $test;\n }\n catch(Exception $e){\n return $e;\n }\n }", "title": "" }, { "docid": "fb0cc6304fbab0a7374cbdfdf963ddbb", "score": "0.59281427", "text": "public function get_all_classes()\n {\n $q = $this->db->get(\"classes\");\n return $q->result();\n }", "title": "" }, { "docid": "dcf4a9dffe243bbe3e9ef754209bcd66", "score": "0.5927846", "text": "public function getTypes(): iterable;", "title": "" }, { "docid": "09aaaf6dc47e65582ff3052d3d468e00", "score": "0.59240025", "text": "public function getNodeTypes() {}", "title": "" }, { "docid": "d0ed19b5205c1f5f6e4d9f77f2ff1aad", "score": "0.5912359", "text": "public function getPluginClasses()\n {\n return array_map(\n function ($plugin) {\n return $plugin->class;\n },\n $this->getInstalledPlugins()\n );\n }", "title": "" }, { "docid": "ce7f550422e043134e8584e8a4bbc3d3", "score": "0.59039307", "text": "function vcex_get_post_term_classes( $post_id, $post_type ) {\n\n\t// Define vars\n\t$classes = array();\n\n\t// Loop through tax objects and save in taxonomies var\n\t$taxonomies = get_object_taxonomies( $post_type, 'names' );\n\n\t// Return of there is an error\n\tif ( is_wp_error( $taxonomies ) || ! $taxonomies ) {\n\t\treturn;\n\t}\n\n\t// Loop through taxomies\n\tforeach ( $taxonomies as $tax ) {\n\n\t\t// Get terms\n\t\t$terms = get_the_terms( $post_id, $tax );\n\n\t\t// Make sure terms aren't empty before loop\n\t\tif ( ! is_wp_error( $terms ) && $terms ) {\n\n\t\t\t// Loop through terms\n\t\t\tforeach ( $terms as $term ) {\n\n\t\t\t\t// Set prefix as taxonomy name\n\t\t\t\t$prefix = esc_html( $term->taxonomy );\n\n\t\t\t\t// Add class if we have a prefix\n\t\t\t\tif ( $prefix ) {\n\n\t\t\t\t\t// Get total post types to parse\n\t\t\t\t\t$parse_types = wpex_theme_post_types();\n\t\t\t\t\tif ( in_array( $post_type, $parse_types ) ) {\n\t\t\t\t\t\t$search = array( $post_type .'_category', $post_type .'_tag' );\n\t\t\t\t\t\t$replace = array( 'cat', 'tag' );\n\t\t\t\t\t\t$prefix = str_replace( $search, $replace, $prefix );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Category prefix\n\t\t\t\t\tif ( 'category' == $prefix ) {\n\t\t\t\t\t\t$prefix = 'cat';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add term\n\t\t\t\t\t$classes[] = $prefix .'-'. $term->term_id;\n\n\t\t\t\t\t// Add term parent\n\t\t\t\t\tif ( $term->parent ) {\n\t\t\t\t\t\t$classes[] = $prefix .'-'. $term->parent;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return classes\n\treturn $classes ? implode( ' ', $classes ) : '';\n\n}", "title": "" }, { "docid": "9a0a51e3acd773203bb5e9163a87ae87", "score": "0.58857995", "text": "public function getTypes(): array;", "title": "" }, { "docid": "bbbe0dd68491ca00099aa3769935225f", "score": "0.58802456", "text": "protected function _getClasses()\n {\n// if (file_exists($filePath)) {\n// $allClasses = unserialize(@file_get_contents($filePath));\n// return $allClasses;\n// }\n $skip = 0;\n $limit = 5;\n $allClasses = [];\n do {\n $response = $this->curl($this->url . ':80/api/adminclass/?limit=' . $limit . '&skip=' . ($skip * $limit), 'GET');\n $classes = json_decode($response, true);\n $classesList = [];\n foreach ($classes as $class) {\n $classesList[$class['id']] = $this->_getClassNameTree($class['class']);\n// $classesList[$class['id']] = $class['class'][0]['title'];\n }\n $allClasses = array_merge($allClasses, $classesList);\n $skip++;\n } while (($skip * $limit) < 30);\n return $allClasses;\n }", "title": "" }, { "docid": "2a3157940200e19c5ba8c083b484a9bc", "score": "0.5874452", "text": "protected function getVirtualClasses() {\n\t\treturn DataObjectCoach_Container::get();\n\t}", "title": "" }, { "docid": "e17b15bb536f180aa2725325a02a8c90", "score": "0.58724016", "text": "abstract protected function getNeededEntityClasses(): array;", "title": "" }, { "docid": "f6407cb27f57f007fd7ac19444c2c9db", "score": "0.586693", "text": "public function getClassArray()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "f1cf7f532846e719154b2b6fa94b85f7", "score": "0.58653677", "text": "function wct_talks_the_classes() {\n\techo wct_talks_get_classes();\n}", "title": "" }, { "docid": "f219face16a4570150a9a2915cec6988", "score": "0.5864458", "text": "function getClassMap() : array ;", "title": "" }, { "docid": "cf742c95b15b509faa9766f1a1603090", "score": "0.5861287", "text": "private function coreClasses() {\n return [\n //'Alias' => 'Namespace'\n //Escaping is understood only by using Double Quotes and not by Single Quotes\n 'request' => 'System\\\\Http\\\\Request',\n 'response' => 'System\\\\Http\\\\Response',\n 'session' => 'System\\\\Session',\n 'route' => 'System\\\\Route',\n 'cookie' => 'System\\\\Cookie',\n 'load' => 'System\\\\Loader',\n 'html' => 'System\\\\Html',\n 'db' => 'System\\\\Database',\n 'view' => 'System\\\\View\\\\ViewFactory',\n 'url' => 'System\\\\Url',\n 'validator' => 'System\\\\Validation'\n ];\n }", "title": "" }, { "docid": "41b59ae8f087dd7a705b1d3229f8cfaa", "score": "0.58604383", "text": "public function GetClasses() {\n\t\t$ReflectionClass = new \\ReflectionClass(get_called_class());\n\t\t$core_absolute_path = dirname($ReflectionClass->getFileName());\n\n\t\t$files = [];\n\t\t$files += $this->ScanDirectoryRecursive(\"{$core_absolute_path}/classes\");\n\t\t$files += $this->ScanDirectoryRecursive(\"{$core_absolute_path}/units\", 1);\n\n\t\t$classes = [];\n\t\tforeach ($files as $path => $file) {\n\t\t\tif ($file['extension'] === 'php') {\n\t\t\t\t$classes[$ReflectionClass->getNamespaceName() . '\\\\' . $file['filename']] = $path;\n\t\t\t}\n\t\t}\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "2f8f8e544cc72ab12a1831f0dcda5f8a", "score": "0.58574367", "text": "public static function types() {\n\t\trequire_once INVENTOR_DIR . 'includes/customizations/class-inventor-customizations-types.php';\n\t}", "title": "" }, { "docid": "4aea89791fbb881f12a43e2cd3a99935", "score": "0.5830102", "text": "public function getEntityTypes(): array;", "title": "" }, { "docid": "f8e46137494e76954eb44176c4e2d459", "score": "0.58292055", "text": "public function filterClassMap()\n {\n $tankClasses = SearchTank::classesImplementTank($this->Tank());\n $filterMap = [];\n\n foreach ($tankClasses as $class) {\n if (singleton($class) instanceof \\Page) {\n $filterMap['pages'] = \\Page::class;\n continue;\n }\n\n /** @var DataObject $singleton */\n $singleton = singleton($class);\n $name = $singleton->i18n_plural_name();\n\n $filterMap[$name] = $class;\n }\n\n return $filterMap;\n }", "title": "" } ]
6491de19e4ab1f2bf48af53e011bd1e8
merge array if not empty else assign
[ { "docid": "484a231f53fedbdb176d7a25f26484c7", "score": "0.58562666", "text": "public function arr_check_empty_merge($main, $data)\n {\n if ( ! empty($main))\n {\n $main = array_merge($main, $data);\n }\n else\n {\n $main = $data;\n }\n\n return $main;\n }", "title": "" } ]
[ { "docid": "867891c6f9094a0d0596990007ddf3fd", "score": "0.6353679", "text": "private function valueMerge()\n\t{\n\t\t$arrays = func_get_args();\n\t\t$base = array_shift($arrays);\n\t\tif (!is_array($base)) $base = empty($base) ? array() : array(\n\t\t\t$base\n\t\t);\n\t\tforeach ($arrays as $append) {\n\t\t\tif (!is_array($append)) $append = array(\n\t\t\t\t$append\n\t\t\t);\n\t\t\tforeach ($append as $key => $value) {\n\t\t\t\tif (!array_key_exists($key, $base) and !is_numeric($key)) {\n\t\t\t\t\t$base[$key] = $append[$key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (is_array($value) || (array_key_exists($key, $base) && is_array($base[$key]))) {\n\t\t\t\t\tif(isset($base[$key]) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$base[$key] = null;\n\t\t\t\t\t}\n\t\t\t\t\t$base[$key] = $this->valueMerge($base[$key], $append[$key]);\n\t\t\t\t} else if (is_numeric($key)) {\n\t\t\t\t\tif (!in_array($value, $base)) $base[] = $value;\n\t\t\t\t} else {\n\t\t\t\t\t$base[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $base;\n\t}", "title": "" }, { "docid": "74fb1d4d66560d38f88c5b7f71e9b91a", "score": "0.6132161", "text": "public static function merge()\n\t{\n\t\t$args = func_get_args();\n\t\tif(count($args)<2) return;\n\t\tcount($args)==3 or $args = [$args[0],$args[1],true];\n\t\t$out = [];\n\t\tforeach ((array)$args[0] as $key => $value) {\n\t\t\t$out[$key] = $value; \n\t\t}\n\t\tforeach ((array)$args[1] as $key => $value) {\n\t\t\tif ((!(bool)$args[2] OR isset($out[$key])) AND strlen($value)>0)\n\t\t\t\t$out[$key] = $value; \n\t\t}\n\treturn (array) $out;\t\n\t}", "title": "" }, { "docid": "04283397f7f3d76fc03caab158593eb6", "score": "0.61089736", "text": "function set_merge($arr1, $arr2 = null) {\n\t\t$args = func_get_args();\n\n\t\t$r = (array)current($args);\n\t\twhile (($arg = next($args)) !== false) {\n\t\t\tforeach ((array)$arg as $key => $val) {\n\t\t\t\tif (is_array($val) && isset($r[$key]) && is_array($r[$key])) {\n\t\t\t\t\t$r[$key] = set_merge($r[$key], $val);\n\t\t\t\t} elseif (is_int($key)) {\n\t\t\t\t\t$r[] = $val;\n\t\t\t\t} else {\n\t\t\t\t\t$r[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "3ecbb2e2bc97eb0a5313ddbb7125591a", "score": "0.60981244", "text": "function merge($array1, $array2){\n for($i = 0; $i < count($array1); $i++){\n //als de value leeg is overslaan\n if ($array2[$i] == \"\"){ continue; }\n //key en value pushen aan array merged\n $merged[$array1[$i]] = $array2[$i];\n }\n return $merged;\n}", "title": "" }, { "docid": "a0949ddbd898f1ac961b6364b1bdabe9", "score": "0.598913", "text": "function arrayMerge($arr, $ins) {\n\t\tif (is_array($arr)) {\n\t\t\tif (is_array($ins)) {\n\t\t\t\tforeach ($ins as $k=>$v) {\n\t\t\t\t\tif (isset($arr[$k])&&is_array($v)&&is_array($arr[$k])) {\n\t\t\t\t\t\t$arr[$k] = $this->arrayMerge($arr[$k],$v);\n\t\t\t\t\t}\n\t\t\t\t\telse $arr[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (!is_array($arr)&&(strlen($arr)==0||$arr==0)) {\n\t\t\t$arr=$ins;\n\t\t}\n\t\treturn($arr);\n\t}", "title": "" }, { "docid": "beef2132cc6b4677e0d34b2ccb63b84d", "score": "0.59796906", "text": "public function merge ($arr) {\n\t\t$this->_reg = array_replace_recursive($this->_reg, (array)$arr);\n\t}", "title": "" }, { "docid": "5b038bfaa7a1c49fb7f373429141175e", "score": "0.5946885", "text": "public function merge($array)\n {\n $this->data = array_merge($this->data,$array);\n }", "title": "" }, { "docid": "58909704723b53f9b3bde90d25bf8dee", "score": "0.5915067", "text": "function array_merge_overwrite($a1, $a2){\n\tforeach($a2 as $key2 => $value2){\n\t\tif(!is_array($value2)){\n\t\t\t$a1[$key2] = $value2;\n\t\t} else {\n\t\t\tif(!isset($a1[$key2])){\n\t\t\t\t$a1[$key2] = null;\n\t\t\t}\n\t\t\tif(!is_array($a1[$key2])){\n\t\t\t\t$a1[$key2] = $value2;\n\t\t\t} else {\n\t\t\t\t$a1[$key2] = array_merge_overwrite($a1[$key2], $a2[$key2]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $a1;\n}", "title": "" }, { "docid": "710918dd8517008e3b70d688412aa5b8", "score": "0.58520186", "text": "protected function _merge()\n\t{\n\t\treturn Arr::merge($this->_data, $this->_changed);\n\t}", "title": "" }, { "docid": "216d65f2c50bbf70b9ee9ec71b2d4e81", "score": "0.5833709", "text": "function fn_array_merge(){\n\t\t$arg_list = func_get_args();\n\t\t$preserve_keys = true;\n\t\t$result = array();\n\t\tif (is_bool(end($arg_list))) {\n\t\t\t$preserve_keys = array_pop($arg_list);\n\t\t}\n\t\n\t\tforeach ((array)$arg_list as $arg) {\n\t\t\tforeach ((array)$arg as $k => $v) {\n\t\t\t\tif ($preserve_keys == true) {\n\t\t\t\t\t$result[$k] = !empty($result[$k]) && is_array($result[$k]) ? $thid->fn_array_merge($result[$k], $v) : $v;\n\t\t\t\t} else {\n\t\t\t\t\t$result[] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0061cc333a194d01f6bef31d43582882", "score": "0.5831896", "text": "function assarray_merge($array1, $array2)\n\t{\tforeach($array2 as $k => $v)\n\t\t{\t$array1[$k] = $v;\n\t\t}\n\t\treturn $array1;\n\t}", "title": "" }, { "docid": "2b39287a450e43ea4003113c5e040f75", "score": "0.5808243", "text": "function array_coalesce() {\n\t$args = func_get_args();\n\t$array = array_shift($args);\n\twhile ($key = array_shift($args))\n\t\tif (array_key_exists($key, $array))\n\t\t\treturn $array[$key];\n\treturn null;\n}", "title": "" }, { "docid": "795ea8d1e278bf9f110513a3cfb11c35", "score": "0.5788207", "text": "public function merge(array $values);", "title": "" }, { "docid": "665301e5084b10f54f9ddbe1ad350a38", "score": "0.5761591", "text": "function cache_merge($arr = array(), $update = array())\n{\n if (empty($arr) || empty($update)) return TRUE;\n\n if (count($update) == count($update, 1)) {\n $arr = cache_merge_data($arr, $update);\n } else {\n foreach ($update as $k => $v) {\n !isset($arr[$k]) AND $arr[$k] = array();\n $arr = cache_merge_data($arr[$k], $v);\n }\n }\n return $arr;\n}", "title": "" }, { "docid": "145a5efd4a4d959d446ae2eb53f5d27a", "score": "0.5748802", "text": "static function arrayMerge(){\n $arrayCombine = array();\n foreach (func_get_args() as $array) {\n foreach ($array as $k => $v) {\n $arrayCombine[$k] = $v;\n }\n }\n return $arrayCombine;\n }", "title": "" }, { "docid": "aee326d0ba113f630974e11b004408a9", "score": "0.57260466", "text": "function smart_merge($base, $replace) {\n\t$base = array_merge(as_array($base), as_array($replace));\n\t$merge = array();\n\tforeach ($base as $key => $value) {\n\t\t// single named element without a value such as \"array('hidden')\" implies \"array('hidden' => true)\"\n\t\tif (is_int($key) && !is_array($value)) {\n\t\t\t$merge[$value] = true; \n\t\t} else {\n\t\t\t$merge[$key] = $value;\n\t\t}\n\t}\n\treturn $merge;\n}", "title": "" }, { "docid": "d838851372c973a43544d64b0f7dd144", "score": "0.5704826", "text": "static function array_special_merge($array1,$array2)\n {\n if(!is_array($array1)){\n $array1 = array();\n }\n if(is_array($array2)){\n foreach($array2 as $key2 => $val2){\n if(!array_key_exists($key2,$array1)){\n $array1[$key2] = $val2;\n }else{\n $array1[] = $val2;\n }\n }\n }\n\n return $array1;\n\n }", "title": "" }, { "docid": "8d98e089348a5b45fc96ba15267c1e56", "score": "0.56665605", "text": "protected function mergeArray(&$arr1, &$arr2) {\n\t\tforeach ((array) $arr1 as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$this->mergeArray($value, $arr2[$key]);\n\t\t\t} elseif (strlen($value) > 0) {\n\t\t\t\t// overwrite settings if not empty\n\t\t\t\t$arr2[$key] = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "871ae758997128d7a35c031f0251249c", "score": "0.565083", "text": "protected static function merge(array $data)\n {\n static::$data = array_replace_recursive(static::$data, $data);\n }", "title": "" }, { "docid": "aba8e9aab0897a4a9110a75dff21706e", "score": "0.5635301", "text": "private function array_merge_assoc() {\n\t\t$mixed = null;\n\t\t$arrays = func_get_args();\n\t\n\t\tforeach ($arrays as $k => $arr) {\n\t\t\tif ($k === 0) {\n\t\t\t\t$mixed = $arr;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t$mixed = array_combine(\n\t\t\t\t\tarray_merge(array_keys($mixed), array_keys($arr)),\n\t\t\t\t\tarray_merge(array_values($mixed), array_values($arr))\n\t\t\t\t\t);\n\t\t}\n\t\n\t\treturn $mixed;\n\t}", "title": "" }, { "docid": "4094f9dbced7d99278a73f21352285fd", "score": "0.56332153", "text": "public function merge($items);", "title": "" }, { "docid": "283218016f4c5f884238e6971ede980d", "score": "0.56331766", "text": "public function merge(array $data)\n {\n $this->populate((object)$data);\n }", "title": "" }, { "docid": "683883b3f558868d947c112cc7b30c36", "score": "0.55692214", "text": "abstract public function combineTo(array $array);", "title": "" }, { "docid": "6cfe078f13136e06c740f6f2b04e19f4", "score": "0.55521995", "text": "function fct_array_merge($TInitial) {// faire un seul tableau de plusieurs sous tableaux\n $test2 = array_merge($TInitial[0], $TInitial[1], $TInitial[2]);\n return $test2;\n}", "title": "" }, { "docid": "9b2311c81cd84b5d9bf698653cd89b04", "score": "0.5540163", "text": "public static function merge($array){\n $result = [];\n foreach(func_get_args() as $array) if($result){\n $insert = count($keys = array_keys($result));\n foreach($keys as $index => $key) if(array_key_exists($key,$array)){\n $insert = $index;\n break;\n }\n foreach($array as $key => $value) if(in_array($key,$keys)){\n $result[$key] = $value;\n $insert = array_search($key,array_keys($result)) + 1;\n }\n else $result = self::splice($result,$insert++,0,[$key => $value]);\n }\n else $result = $array;\n return $result;\n }", "title": "" }, { "docid": "acc7cab993d7d4e79fdead31ce5e2c6f", "score": "0.5539268", "text": "public static function merge(array $input)\n {\n }", "title": "" }, { "docid": "8d17e762c1a4ead63993392f18dae0b3", "score": "0.54831296", "text": "abstract public function combineWith(array $array);", "title": "" }, { "docid": "81414fa6ef67431987047f4f6a4abc13", "score": "0.54732215", "text": "function mergeTwoDArrays($static_source, $active_source){\n\tforeach ($active_source as $key => $record){\n\t\tif(!isset($static_source[$key])){\n\t\t\t// if it does not, add it.\n\t\t\t$static_source[$key] = $record;\n\t\t\n\t\t// if it exist, check to see \n\t\t} else {\n\t\t\tforeach($record as $field => $value){\n\t\t\t\tif(isset($active_source[$key][$field])){\n\t\t\t\t\t$static_source[$key][$field] = $active_source[$key][$field];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $static_source;\n}", "title": "" }, { "docid": "4e0c80b6145ffa1968ada13dafb926fc", "score": "0.54628855", "text": "function pgv_array_merge($array1, $array2) {\n\tforeach ($array2 as $key=>$value) {\n\t\t$array1[$key] = $value;\n\t}\n\treturn $array1;\n}", "title": "" }, { "docid": "0fc7e4a918c365891b2f742d33a8b6cb", "score": "0.54578656", "text": "abstract public function mergeTo(array $array, $recursively = false);", "title": "" }, { "docid": "4af6359e6bdce7805464131774503dd1", "score": "0.5454847", "text": "protected function merge(array $a, array $b)\n {\n return array_replace_recursive($b, $a);\n }", "title": "" }, { "docid": "2fbddfec58d1ef4f52d3df4e82884114", "score": "0.54546016", "text": "abstract public function mergeWith(array $array, $recursively = false);", "title": "" }, { "docid": "1981821951acf2c5e1406c6ad3c2119f", "score": "0.5448677", "text": "function mergeArray()\n{\n\t$args = func_get_args();\n\t$res = array_shift($args);\n\twhile (!empty($args)) {\n\t\t$next = array_shift($args);\n\t\tforeach ($next as $k => $v) {\n\t\t\tif (is_integer($k)) {\n\t\t\t\tisset($res[$k]) ? $res[] = $v : $res[$k] = $v;\n\t\t\t} elseif (is_array($v) && isset($res[$k]) && is_array($res[$k])) {\n\t\t\t\t$res[$k] = mergeArray($res[$k], $v);\n\t\t\t} else {\n\t\t\t\t$res[$k] = $v;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $res;\n}", "title": "" }, { "docid": "a7b9d93928b0ade36995c543888638a0", "score": "0.54467374", "text": "function fn_array_merge()\n{\n $arg_list = func_get_args();\n $preserve_keys = true;\n $result = array();\n if (is_bool(end($arg_list))) {\n $preserve_keys = array_pop($arg_list);\n }\n\n foreach ((array) $arg_list as $arg) {\n foreach ((array) $arg as $k => $v) {\n if ($preserve_keys == true) {\n $result[$k] = !empty($result[$k]) && is_array($result[$k]) ? fn_array_merge($result[$k], $v) : $v;\n } else {\n $result[] = $v;\n }\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "b52327eebfb03673e4149b096d124758", "score": "0.54385597", "text": "private function mergeArray(array $a, array $b)\n {\n foreach ($b as $key => $value) {\n if ($value instanceof MergeReplaceKeyInterface) {\n $a[$key] = $value->getData();\n } elseif (isset($a[$key]) || array_key_exists($key, $a)) {\n if ($value instanceof MergeRemoveKey) {\n unset($a[$key]);\n } elseif (is_int($key)) {\n $a[] = $value;\n } elseif (is_array($value) && is_array($a[$key])) {\n $a[$key] = $this->mergeArray($a[$key], $value);\n } else {\n $a[$key] = $value;\n }\n } else {\n if (! $value instanceof MergeRemoveKey) {\n $a[$key] = $value;\n }\n }\n }\n return $a;\n }", "title": "" }, { "docid": "5b7a21e217edaf2f00c164b38db268a5", "score": "0.54087496", "text": "public function merge(&$array)\n {\n $this->_storage += $array;\n }", "title": "" }, { "docid": "3f4f90ad7b5e0504643751a206b59900", "score": "0.53660375", "text": "function mergeArrays($main,$temp)\n{\n\tforeach ($temp as $key=>$val)\n\t{\n\t\tif(array_key_exists($key, $main) == TRUE)\n\t\t{\t\n\t\t\t$main[$key]['tf'] = $main[$key]['tf'] + $temp[$key]['tf'];\t\t\n\t\t\t$main[$key]['df'] = $main[$key]['df'] + $temp[$key]['df'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$main[$key]['tf'] = $temp[$key]['tf'];\n\t\t\t$main[$key]['df'] = $temp[$key]['df'];\n\t\t}\t\n\t}\n\treturn $main;\t\t\n}", "title": "" }, { "docid": "bb9620eb907fffcd0a995fc496cfcafe", "score": "0.53595793", "text": "public function mergeParams($vars){\n $params = $this->params;\n if(count($vars) > 0){\n foreach($vars as $key => $value){\n if(is_null($value))\n unset($params[$key]);\n else\n $params[$key] = $value;\n }\n }\n return $params;\n }", "title": "" }, { "docid": "000a432fc2d4dfdb3f3f0d38692dcb5a", "score": "0.535452", "text": "function combine_array($a,$b){\r\n if( !is_array($a) ){\r\n $a = array($a);\r\n }\r\n if( !is_array($b) ) {\r\n $b = array($b);\r\n }\r\n// $a = array_filter($a);\r\n// $b = array_filter($b);\r\n if( empty($a) ) return $b;\r\n if( empty($b) ) return $a;\r\n \r\n $result = array();\r\n foreach($a as $k_a){\r\n $result[$k_a] = $b;\r\n }\r\n \r\n return combine_string($result);\r\n}", "title": "" }, { "docid": "4c62d2dcbc8478fe409dfb75838b0b58", "score": "0.5349747", "text": "public function & merge($data) {\n\t\t# Copy all values\n\t\tforeach ($data as $name => $value) {\n\t\t\t# Only non empty\n\t\t\tif ($value) {\n\t\t\t\t$this->data[$name] = $value;\t\n\t\t\t}\n\t\t}\n\t\t# Chain\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "51e21c0a839beaf765c519caaae79445", "score": "0.528127", "text": "function eligo_options_array_merge($original = array(), $new = array()) {\r\n\t// if original isn't an array, it's either null, or a string that needs converting to array\r\n\tif (empty($original)) {\r\n\t\treturn $new;\r\n\t}\r\n\r\n\t// treat it as a string\r\n\tif (!is_array($original)) {\r\n\t\t$original = array($original);\r\n\t}\r\n\r\n\t// normal scenario\r\n\tif (is_array($original) && is_array($new)) {\r\n\t\tforeach ($new as $item) {\r\n\t\t\t$original[] = $item;\r\n\t\t}\r\n\t\treturn $original;\r\n\t}\r\n}", "title": "" }, { "docid": "3a398bbc83b9b4e70fc32ea27abe2873", "score": "0.52731085", "text": "public function merge(array $array1, array $array2): array;", "title": "" }, { "docid": "28070196043dbf701e4f055d920ef15b", "score": "0.52330387", "text": "public function mergeData(array $data)\n\t{\n\t\t$args = func_get_args();\n\t\twhile (list(,$v) = each($args)) {\n\t\t\tif (is_array($v)) {\n\t\t\t\t$this->data = array_merge($this->data, $v);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e6a07d3ad84b6132bc269c303fd5235f", "score": "0.5231957", "text": "function xa_merge( $a1, $a2, $r = true )\r\n\t{\r\n\t\t// Ensure two valid arrays\r\n\t\t$a = ( is_array( $a1 ) ) ? $a1 : array();\r\n\t\tif ( !is_array( $a2 ) ) \r\n\t\t\treturn $a;\r\n\r\n\t\t// Merge the arrays\r\n\t\tforeach ( $a2 as $k => $v )\r\n\t\t\tif ( $r && is_array( xa( $a1, $k ) ) && is_array( $v ) )\r\n\t\t\t\t$a[ $k ] = xa_merge( $a1[ $k ], $v , true );\r\n\t\t\telse \r\n\t\t\t\t$a[ $k ] = $v;\r\n\r\n\t\treturn $a;\r\n\t}", "title": "" }, { "docid": "bd5281b12ffd0b7433313fd6731ae867", "score": "0.5214682", "text": "function array_merge_r() \n{\n if (func_num_args() < 2) {\n trigger_error(__FUNCTION__ .' needs two or more array arguments', E_USER_WARNING);\n return;\n }\n $arrays = func_get_args();\n $merged = array();\n while ($arrays) {\n $array = array_shift($arrays);\n if (!is_array($array)) {\n trigger_error(__FUNCTION__ .' encountered a non array argument', E_USER_WARNING);\n return;\n }\n if (!$array) continue;\n foreach ($array as $key => $value)\n if (is_string($key)) {\n if (is_array($value) && array_key_exists($key, $merged) && is_array($merged[$key])) {\n $merged[$key] = array_merge_r($merged[$key], $value);\n } else {\n $merged[$key] = $value;\n }\n } else {\n $merged[] = $value;\n }\n }\n return $merged;\n}", "title": "" }, { "docid": "a6887f3044f81363e1ba4363767bbe50", "score": "0.51797324", "text": "function array_merge_recursive_ex(array $match, array $match1){\r\n $merged = $match;\r\n\r\n foreach ($match1 as $key => & $value) {\r\n if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {\r\n $merged[$key] = array_merge_recursive_ex($merged[$key], $value);\r\n } else if (is_numeric($key)) {\r\n if (!in_array($value, $merged)) {\r\n $merged[] = $value;\r\n }\r\n } else {\r\n $merged[$key] = $value;\r\n }\r\n }\r\n return ($merged);\r\n}", "title": "" }, { "docid": "593c37aa5a966e8486f1560a8f45bd50", "score": "0.51602185", "text": "public static function mergev(array $arrays) {\n\t\treturn empty($arrays) ? array() : call_user_func_array('array_merge', $arrays);\n\t}", "title": "" }, { "docid": "2e8cf4f4834b8d8f450712a76d6b334a", "score": "0.51523954", "text": "public static function merge(array $_)\n\t{\n\t\t$tgt = [];\n\n\t\tforeach(func_get_args() as $merge) {\n\t\t\tforeach($merge as $key => $val) {\n\t\t\t\tif (array_key_exists($key, $tgt)) {\n\t\t\t\t\tif (is_int($key)) {\n\t\t\t\t\t\t$tgt[] = $val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (is_array($val)) {\n\t\t\t\t\t\t\t$tgt[$key] = static::merge($tgt[$key], $val);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tgt[$key] = $val;\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$tgt[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $tgt;\n\t}", "title": "" }, { "docid": "0250bcc44d933abc2983836f9910666c", "score": "0.51455146", "text": "private function mergeRecursive()\n {\n $arrays = func_get_args();\n $base = array_shift($arrays);\n\n foreach ($arrays as $array) {\n reset($base);\n while (list($key, $value) = @each($array)) {\n if (is_array($value) && @is_array($base[$key])) {\n $base[$key] = $this->mergeRecursive($base[$key], $value);\n } else {\n $base[$key] = $value;\n }\n }\n }\n\n return $base;\n }", "title": "" }, { "docid": "c064d99c259762c9aec261f29c627da9", "score": "0.51348543", "text": "function __mergeConditions($query, $assoc) {\n\t\tif (empty($assoc)) {\n\t\t\treturn $query;\n\t\t}\n\n\t\tif (is_array($query)) {\n\t\t\treturn array_merge((array)$assoc, $query);\n\t\t}\n\n\t\tif (!empty($query)) {\n\t\t\t$query = array($query);\n\t\t\tif (is_array($assoc)) {\n\t\t\t\t$query = array_merge($query, $assoc);\n\t\t\t} else {\n\t\t\t\t$query[] = $assoc;\n\t\t\t}\n\t\t\treturn $query;\n\t\t}\n\n\t\treturn $assoc;\n\t}", "title": "" }, { "docid": "03a4271bb13d6bd320bb5f6f9b516fdb", "score": "0.5133587", "text": "function populate_array(&$target, $values, $beginning = false) {\n if ($beginning) {\n if (isset($target)) {\n foreach ($target as $tgt) {\n $values[] = $tgt;\n }\n }\n $target = $values;\n } else {\n foreach ($values as $value) {\n $target[] = $value;\n }\n }\n}", "title": "" }, { "docid": "2751f77e4bf17dc914f68ccd2c76150a", "score": "0.51208407", "text": "private function _collapse($array) {\r\n foreach ($array as $tag => $data) {\r\n if (is_array($data) && (count($data) == 1)) {\r\n $array[$tag] = $data[0];\r\n }\r\n }\r\n return $array;\r\n }", "title": "" }, { "docid": "ae9ac1e461f8f49afd1329a469500f75", "score": "0.5120723", "text": "protected function _merge(array $data, array $item) {\n\t\t$filter = function ($value) use (&$filter) {\n\t\t\tif (is_array($value)) {\n\t\t\t\treturn array_map($filter, $value);\n\t\t\t}\n\t\t\treturn stripcslashes($value);\n\t\t};\n\t\t$fields = ['id', 'ids', 'translated', 'context'];\n\n\t\tforeach ($fields as $field) {\n\t\t\tif (isset($item[$field])) {\n\t\t\t\t$item[$field] = $filter($item[$field]);\n\t\t\t}\n\t\t}\n\t\tif (isset($item['ids']['singular'])) {\n\t\t\t$item['id'] = $item['ids']['singular'];\n\t\t}\n\t\tif (empty($item['id']) || ctype_space($item['id'])) {\n\t\t\treturn $data;\n\t\t}\n\t\treturn parent::_merge($data, $item);\n\t}", "title": "" }, { "docid": "a86d7deafdea49ba33a88b3579fa2759", "score": "0.51206654", "text": "public function mergeAll(array ...$sets): array;", "title": "" }, { "docid": "f78024534c207c9e70c6b459708b9044", "score": "0.51187885", "text": "public static function merge(array ...$arrays): array\n {\n\n $result = [];\n foreach ($arrays as $array) {\n foreach ($array as $key => $value) {\n // key does not yet exist\n if (!array_key_exists($key, $result)) {\n // set the value\n $result[$key] = $value;\n continue;\n }\n\n // the result value and new value are both arrays\n if (is_array($value) && is_array($result[$key])) {\n // set the value to a merge between the two arrays\n $result[$key] = self::merge($result[$key], $value);\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "daa39b91682fe1992aff5296dd96b4f6", "score": "0.5097597", "text": "public static function array_merge_recursive() {\n\t\t$args = func_get_args();\n\n\t\t$result = array_shift( $args );\n\n\t\tforeach ( $args as $arg ) {\n\t\t\tforeach ( $arg as $key => $value ) {\n\t\t\t\t// Renumber numeric keys as array_merge() does.\n\t\t\t\tif ( is_numeric( $key ) ) {\n\t\t\t\t\tif ( ! in_array( $value, $result ) )\n\t\t\t\t\t\t$result[] = $value;\n\t\t\t\t}\n\t\t\t\t// Recurse only when both values are arrays.\n\t\t\t\telseif ( array_key_exists( $key, $result ) && is_array( $result[$key] ) && is_array( $value ) ) {\n\t\t\t\t\t$result[$key] = self::array_merge_recursive( $result[$key], $value );\n\t\t\t\t}\n\t\t\t\t// Otherwise, use the latter value.\n\t\t\t\telse {\n\t\t\t\t\t$result[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "98403e33d2e28f0bdccc6277df511198", "score": "0.5087566", "text": "public function mergeMyArray($one, $two, $email = \"\")\n {\n $emailData = $email ? array('EMAIL'=> $email) : array();\n if (count($one) > 0) {\n foreach($one as $k => $v) {\n $emailData[$k] = isset($two[$v])?str_replace(';',',', $two[$v]):'';\n }\n }\n return $emailData;\n }", "title": "" }, { "docid": "d922dde924b0d2407763b5131d94e0f6", "score": "0.50462294", "text": "function array_merge_recursive_distinct () {\n\t\t\t$arrays = func_get_args();\n\t\t\t$base = array_shift( $arrays );\n\t\t\tif ( ! is_array( $base ) ) { \n\t\t\t\t$base = empty( $base ) ? array() : array( $base );\n\t\t\t}\n\t\t\tforeach ( $arrays as $append ) {\n\t\t\t\tif ( ! is_array( $append ) ) {\n\t\t\t\t\t$append = array( $append);\n\t\t\t\t}\n\t\t\t\tforeach ( $append as $key => $value ) {\n\t\t\t\t\tif ( ! array_key_exists( $key, $base ) && ! is_numeric( $key ) ) {\n\t\t\t\t\t\t$base[$key] = $append[$key];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ( is_array( $value ) || is_array( $base[$key] ) ) {\n\t\t\t\t\t\t$base[$key] = UD_F::array_merge_recursive_distinct( $base[$key], $append[$key] );\n\t\t\t\t\t} elseif ( is_numeric( $key ) ) {\n\t\t\t\t\t\tif ( ! in_array( $value, $base ) ) {\n\t\t\t\t\t\t\t$base[] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$base[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $base;\n\t\t}", "title": "" }, { "docid": "0da88770d922979591da5fd5620c8c57", "score": "0.50380737", "text": "public function merge($key, $value = [])\n {\n if (is_array($key)) {\n $this->items = array_merge($this->items, $key);\n } elseif (is_string($key)) {\n $items = (array) $this->get($key, null, false);\n $value = array_merge($items, $this->getArrayItems($value));\n\n $this->set($key, $value, false);\n } elseif ($key instanceof self) {\n $this->items = array_merge($this->items, $key->all());\n }\n }", "title": "" }, { "docid": "f1ff6fee5c66e99ef72aa5f971a8cb54", "score": "0.503682", "text": "public static function mergeRef(array &$array /*, $array1 [, ...] */){\n\t\treturn $array = call_user_func_array('array_merge', func_get_args());\n\t}", "title": "" }, { "docid": "0aaaefbdc8b2c1a5edcee46a31135f13", "score": "0.503436", "text": "private function merge(array $a, array $b): array\n\t{\n\t\tforeach ($b as $key => $value)\n\t\t{\n\t\t\t$a[$key] = $value;\n\t\t}\n\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "f49864afd8b80fbc6147f841ca932735", "score": "0.50263387", "text": "public function array_merge_recursive_overrule($arr0, $arr1, $notAddKeys = 0, $includeEmtpyValues = TRUE, $kill = TRUE) {\n\t\tforeach ($arr1 as $key => $val) {\n\t\t\tif (is_array($arr0[$key])) {\n\t\t\t\tif (is_array($arr1[$key])) {\n\t\t\t\t\t$arr0[$key] = $this->array_merge_recursive_overrule($arr0[$key], $arr1[$key], $notAddKeys, $includeEmtpyValues, $kill);\n\t\t\t\t} else {\n\t\t\t\t\tif ($kill) {\n\t\t\t\t\t\tif ($includeEmtpyValues || $val) {\n\t\t\t\t\t\t\t$arr0[$key] = $val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($notAddKeys) {\n\t\t\t\t\tif (isset($arr0[$key])) {\n\t\t\t\t\t\tif ($includeEmtpyValues || $val) {\n\t\t\t\t\t\t\t$arr0[$key] = $val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($includeEmtpyValues || $val) {\n\t\t\t\t\t\t$arr0[$key] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treset($arr0);\n\n\t\treturn $arr0;\n\t}", "title": "" }, { "docid": "6bdd958d384bc738443737fb646ceb94", "score": "0.5019678", "text": "public function merge($values): Sequence;", "title": "" }, { "docid": "9aad737b360ddd3d9c11045a82d00cb5", "score": "0.50176644", "text": "private function getArrayResultWithNullCheck(): array\n {\n return $this->data[self::DEFAULT_ITEMS_KEY] ?? $this->data ?? [];\n }", "title": "" }, { "docid": "64efbcfac29c5892f4f1d542ed0aeda8", "score": "0.5015432", "text": "function w3_array_union_recursive($array1,$array2)\r\n {\r\n $retval=$array1+$array2;\r\n foreach($array1 as $key=>$value)\r\n {\r\n if(is_array(@$array1[$key]) && is_array(@$array2[$key]))\r\n $retval[$key]=w3_array_union_recursive($array1[$key],$array2[$key]);\r\n }\r\n return $retval;\r\n }", "title": "" }, { "docid": "85f2f172cc240507ece1b687a9659156", "score": "0.50136524", "text": "function merge_duplicates($items){\n\t$null_key = '[email protected]';\n\t$null_iter = 0;\n\t$by_email = array();\n\tforeach($items as $item){\n\t\t$key = ($item->email) ? $item->email : $null_key . $null_iter++;\n\t\tif (!array_key_exists($key, $by_email)){\n\t\t\t$by_email[$key] = array();\n\t\t}\n\t\t$by_email[$key][] = $item;\n\t}\n\treturn $by_email;\n}", "title": "" }, { "docid": "10e1dcf502603b9f8c383e76ecb0c41a", "score": "0.50112885", "text": "public function mergeData()\n {\n\n if( $sData = $this->cache->data){\n\n $uData = $this->user->data ?:[];\n\n $this->user->data = array_merge($sData,$uData);\n\n $this->user->save();\n\n }\n }", "title": "" }, { "docid": "20e5ed778bee2ef8412686bc6e3301b5", "score": "0.5002316", "text": "function union($first, ...$rest)\n{\n $result = array_values(array_unique(array_merge($first, ...$rest)));\n return $result;\n // END\n}", "title": "" }, { "docid": "319b4dd311627ee653a4565f3f23f235", "score": "0.49973166", "text": "public function mergeAndGetValues(array &$arr)\n {\n $values = $this->getValues();\n return $this->arrayMergeRecursiveDistinct($values, $arr);\n }", "title": "" }, { "docid": "2def6b559c4fac9744e018554207c444", "score": "0.49927598", "text": "public static function merge(array $data, $merge) {\n $args = func_get_args();\n $return = current($args);\n\n while (($arg = next($args)) !== false) {\n foreach ((array)$arg as $key => $val) {\n if (!empty($return[$key]) && is_array($return[$key]) && is_array($val)) {\n $return[$key] = self::merge($return[$key], $val);\n } else {\n $return[$key] = $val;\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "4c12d98c13b7082c0e78e085f5f558d9", "score": "0.49907887", "text": "function cache_merge_data($arr = array(), $update = array())\n{\n if (empty($arr) || empty($update)) return TRUE;\n foreach ($update as $k => $v) {\n $op = substr($k, -1);\n if ('+' == $op || '-' == $op) {\n $k = substr($k, 0, -1);\n !isset($arr[$k]) AND $arr[$k] = 0;\n $v = '+' == $op ? ($arr[$k] + $v) : ($arr[$k] - $v);\n }\n $arr[$k] = $v;\n }\n return $arr;\n}", "title": "" }, { "docid": "cde8dd94309049d1bcff4d99c2266a28", "score": "0.49679866", "text": "public static function mergeMultiArray($array)\n {\n if ($array instanceof Zend_Config) {\n $array = $array->toArray();\n }\n\n foreach(new RecursiveIteratorIterator(\n\t\t new RecursiveArrayIterator((array) $array),\n\t\t RecursiveIteratorIterator::SELF_FIRST\n\t\t) as $key => $value) {\n\t\t if(!is_array($value)) {\n\t\t $return_array[$key] = $value;\n\t\t }\n\t\t}\n\n return $return_array;\n }", "title": "" }, { "docid": "b1afd8c06f3439e532d10cc4f7f7484c", "score": "0.49660802", "text": "public static function fixGroupConcatArray(&$array)\n {\n if (!is_array($array)) {\n return;\n }\n\n if (count($array) != 1) {\n return;\n }\n\n Arrays::reduceNulls($array[0]);\n\n if (is_null($array[0])) {\n $array = array();\n }\n }", "title": "" }, { "docid": "c59120d7bf8ead4a0de20982be34d5a3", "score": "0.4947458", "text": "public static function merge(array $data, $merge) {\n\t\t$args = array_slice(func_get_args(), 1);\n\t\t$return = $data;\n\n\t\tforeach ($args as &$curArg) {\n\t\t\t$stack[] = array((array)$curArg, &$return);\n\t\t}\n\t\tunset($curArg);\n\n\t\twhile (!empty($stack)) {\n\t\t\tforeach ($stack as $curKey => &$curMerge) {\n\t\t\t\tforeach ($curMerge[0] as $key => &$val) {\n\t\t\t\t\tif (!empty($curMerge[1][$key]) && (array)$curMerge[1][$key] === $curMerge[1][$key] && (array)$val === $val) {\n\t\t\t\t\t\t$stack[] = array(&$val, &$curMerge[1][$key]);\n\t\t\t\t\t} elseif ((int)$key === $key && isset($curMerge[1][$key])) {\n\t\t\t\t\t\t$curMerge[1][] = $val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$curMerge[1][$key] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset($stack[$curKey]);\n\t\t\t}\n\t\t\tunset($curMerge);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "31eb75cb9e8809885144d6b35a3ec568", "score": "0.49449396", "text": "protected function _mergeOptions(array $array1, $array2 = null)\n {\n if (is_array($array2)) {\n foreach ($array2 as $key => $val) {\n if (is_array($array2[$key])) {\n $array1[$key] = (array_key_exists($key, $array1) && is_array($array1[$key]))\n ? $this->_mergeOptions($array1[$key], $array2[$key])\n : $array2[$key];\n } else {\n $array1[$key] = $val;\n }\n }\n }\n\n return $array1;\n }", "title": "" }, { "docid": "72bee541b8a0e17c637af5712979299c", "score": "0.4929415", "text": "private static function merge(array $a1, array $a2) : array\n {\n if ($a1) {\n foreach ($a2 as $k => $v) {\n if (is_int($k)) {\n $a1[] = $v;\n } else if (is_array($v) && isset($a1[$k]) && is_array($a1[$k])) {\n $a1[$k] = self::merge($a1[$k], $v);\n } else {\n $a1[$k] = $v;\n }\n }\n return $a1;\n }\n return $a2;\n }", "title": "" }, { "docid": "d58bac35ed6a193414dcc04d593b357b", "score": "0.4925679", "text": "public function merge($with) {\n\t\tforeach ($with as $item) $this->push($item);\n\t}", "title": "" }, { "docid": "3b1b34dbf0a3db8fdfa4d64c780bb7df", "score": "0.49238852", "text": "function bb_merge( $array1, $array2 ) {\r\n $output = array();\r\n \r\n //loop through the arrays while at least one still has elements left in it\r\n while( !empty( $array1 ) || !empty( $array2 ) ) \r\n \t\r\n \t//one of the arrays is empty, so the last man standing wins...\r\n \tif ( empty( $array1 ) || empty( $array2 ) )\r\n \t\t$output[] = ( empty( $array2 ) ) ? array_shift( $array1 ) : array_shift( $array2 );\r\n \t\t\r\n \t//both arrays still have elements, looks like we have a showdown...\r\n \telse \r\n \t\t$output[] = ( $array1[ 0 ] <= $array2[ 0 ] ) ? array_shift( $array1 ) : array_shift( $array2 );\r\n \r\n //pass back the output array\t\r\n return $output;\r\n}", "title": "" }, { "docid": "e75059fb9190d8f5fcc501e1954d1b00", "score": "0.49034548", "text": "public function merge($items): self;", "title": "" }, { "docid": "9e4ff737a4b3480a7910e6e8179bed26", "score": "0.48907742", "text": "protected function merge(&$arg1, $arg2) {\n if(is_array($arg1) && is_array($arg2)) {\n $arg1 = array_merge($arg1, $arg2);\n }\n }", "title": "" }, { "docid": "e465b3d1ce8367d9e136e2635dd0a3ee", "score": "0.4883959", "text": "public static function unique_array_union() {\n $array = [];\n foreach (func_get_args() as $item) {\n $array = array_merge($array, $item);\n }\n return array_unique($array);\n }", "title": "" }, { "docid": "5f16a94794bba837c96f41f88b4efd34", "score": "0.48762023", "text": "function mergeTableArrays($static_source, $active_source){\n\t\n\tforeach ($active_source as $key => $value){\n\t\t$static_source[$key] = $value;\n\t}\n\treturn $static_source;\n}", "title": "" }, { "docid": "3abac515bc354962dd8330e2b6a9c8ec", "score": "0.4869201", "text": "public function SmartMerge($Array1, $Array2 /*,$Array3,$Array4,..*/) {\n\n $Merged= array();\n foreach(func_get_args() as $ArgumentKey => $Array) {\n if (!is_array($Array)) {\n $this->FatalError('ArrayUtils:SmartMerge: argument['.$ArgumentKey.'] is not an array.');\n continue;\n }\n if (empty($Array)) continue;\n foreach ($Array as $Key => $Value) {\n if (!is_string($Key)) { // numerical indexes are just appended\n $Merged[]= $Value;\n continue;\n }\n $Merged[$Key]= (is_array($Value) && !empty($Value) && isset($Merged[$Key]) && is_array($Merged[$Key]))\n ? $this->SmartMerge($Merged[$Key], $Value) // recursion\n : $Value;\n }\n }\n return $Merged;\n }", "title": "" }, { "docid": "e230a25fd05a3c3afc88f950f1c7bb99", "score": "0.48638976", "text": "protected function _merge($object = null)\n {\n $res = $this() ? clone $this() : (object)null;\n foreach (\\func_get_args() as $obj) {\n foreach ($obj instanceof self ? $obj() : $obj as $k => $v) {\n if (!isset ($res->$k)) {\n $res->$k = $v;\n } elseif (\\is_array($v) || \\is_object($v)) {\n $res->$k = static::merge($res->$k, $v)->content;\n }\n }\n }\n return $this->result($res);\n }", "title": "" }, { "docid": "e54204ee1128e1cce914afd22fd6eb76", "score": "0.48633", "text": "public function merge(array $subscriptions) {\n foreach ($subscriptions as $subscription) {\n if ($existing = &$this->subscriptions[$subscription->email][$subscription->list_id]) {\n $existing->merge($subscription);\n }\n else {\n $this->subscriptions[$subscription->email][$subscription->list_id] = $subscription;\n }\n }\n }", "title": "" }, { "docid": "7ff0ab7955bde99695cfb6be950316fa", "score": "0.48623395", "text": "function arr_to_set($data_arr) {\n $data_set = implode(',', $data_arr);\n $data_set = \"$data_set\";\n return $data_set;\n}", "title": "" }, { "docid": "479b5cae2b33fdec0686991a59675d02", "score": "0.48596758", "text": "function array_insert($arr1, $key, $arr2, $before = FALSE)\n{\n $done = FALSE;\n \n foreach($arr1 as $arr1_key => $arr1_val) {\n\t\n\tif(!$before) {\n\n\t $new_array[$arr1_key] = $arr1_val;\n\n\t}\n\t\n\tif($arr1_key == $key && !$done) {\n\t \n\t foreach($arr2 as $arr2_key => $arr2_val) {\n\n\t\t$new_array[$arr2_key] = $arr2_val;\n\n\t }\n\n\t $done = TRUE;\n\n\t}\n\t\n\tif($before) {\n\n\t $new_array[$arr1_key] = $arr1_val;\n\n\t}\n\n }\n \n if(!$done) {\n\n\t$new_array = array_merge($arr1, $arr2);\n\n }\n \n return $new_array;\n \n}", "title": "" }, { "docid": "4acf73d8683f38e736a4d5844ee6f8c1", "score": "0.48414484", "text": "function tribe_array_merge_recursive( array &$array1, array &$array2 ) {\n\t\t$merged = $array1;\n\n\t\tforeach ( $array2 as $key => &$value ) {\n\t\t\tif ( is_array( $value ) && isset( $merged [ $key ] ) && is_array( $merged [ $key ] ) ) {\n\t\t\t\t$merged [ $key ] = tribe_array_merge_recursive( $merged [ $key ], $value );\n\t\t\t} else {\n\t\t\t\t$merged [ $key ] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $merged;\n\t}", "title": "" }, { "docid": "21d4128d871d75c6d7a7146fd4c479bb", "score": "0.48361188", "text": "public static function arrayMerge()\n\t{\n\t\tif (func_num_args() < 2)\n\t\t{\n\t\t\ttrigger_error(__FUNCTION__ .' needs two or more array arguments', E_USER_WARNING);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$arrays = func_get_args();\n\t\t$merged = array();\n\t\t\n\t\twhile ($arrays)\n\t\t{\n\t\t\t$array = array_shift($arrays);\n\t\t\t\n\t\t\tif ( ! is_array($array))\n\t\t\t{\n\t\t\t\ttrigger_error(__FUNCTION__ .' encountered a non array argument', E_USER_WARNING);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $array)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($array as $key => $value)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (is_string($key))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif (is_array($value) && array_key_exists($key, $merged) && is_array($merged[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$merged[$key] = self::arrayMerge($merged[$key], $value);\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$merged[$key] = $value;\n\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{\n\t\t\t\t\t$merged[] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $merged;\t\n\t}", "title": "" }, { "docid": "e4585514b232b36cebeaeade8dd1b19e", "score": "0.48297578", "text": "function array_intersect_value($array, $value, $if_empty = null) {\n\t$intersection = array_intersect($array, [$value]);\n\t$result = array_shift($intersection);\n\tif ($result === null)\n\t\treturn $if_empty === null ? reset($array) : $if_empty;\n\treturn $result;\n}", "title": "" }, { "docid": "b9e90b6931d23dc96cb063477e7ddc84", "score": "0.4824955", "text": "public function merge(array $input)\n\t{\n\t\t$this->request->add($input);\n\n\t\t$this->query->add($input);\n\t}", "title": "" }, { "docid": "d02c25fd1f719b2de6206ed1911f8ff4", "score": "0.48134416", "text": "function bulkAssign($vars, $clear = false) {\n\t\tif($clear) {\n\t\t\t$this->vars = $vars;\n\t\t} else {\n\t\t\tif( is_array($vars) ) {\n\t\t\t\t$this->vars = array_merge($this->vars, $vars);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "baa608ec94d837eb1589251c7ad900e4", "score": "0.48133227", "text": "function kalium_hook_merge_arrays( $value ) {\n\t$returnable = new Kalium_WP_Hook_Value();\n\t$returnable->array = $value;\n\n\treturn array( $returnable, 'mergeArrays' );\n}", "title": "" }, { "docid": "02b5c704e588cc708c6f22240f422476", "score": "0.4812525", "text": "public function merge(...$subjects)\n {\n $result = array_shift($subjects);\n foreach ($subjects as $subject) {\n if ($this->isOverwrite($result, $subject)) {\n $result = $subject;\n } elseif (is_object($subject)) {\n $result = $this->mergeObjects($result, $subject);\n } elseif (is_array($subject)) {\n $result = $this->mergeArrays($result, $subject);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "705cf69e4efec06eb84bf8bf17315db3", "score": "0.48001042", "text": "public function merge($target, $value)\n {\n if ($this->isArrayish($target)) {\n $target[] = $value;\n return $target;\n }\n\n if (!is_associative_array($value) && !is_object($value)) {\n return $value;\n }\n\n if (is_associative_array($target) || $target instanceof ArrayAccess) {\n return $this->mergeAssoc($target, $value);\n }\n\n if (is_object($target)) {\n return $this->mergeObject($target, $value);\n }\n\n return $value;\n }", "title": "" }, { "docid": "b088226e53248138de5d0c081f29b473", "score": "0.47944605", "text": "protected function getArrayableAppends()\n {\n if(!is_null(static::$static_replace_appends)) {\n if(static::$static_replace_appends) {\n $this->appends = array_unique(array_merge(static::$static_appends,$this->appends??[]));\n } else {\n $this->appends = static::$static_appends;\n }\n }\n return parent::getArrayableAppends();\n }", "title": "" }, { "docid": "d88cc068a4c46a5cc1fbe4aa579cf3b2", "score": "0.47943145", "text": "public static function merge(\n ...$arrays,\n ): array {\n $result = [];\n\n foreach ($arrays as $array) {\n if (\\is_array($array) && [] !== $array) {\n /** @var array<mixed> $merging */\n [$merging] = self::filter([$array])->array()->trim();\n\n if ([] !== $merging) {\n $result = array_merge($result, $merging);\n }\n }\n }\n\n /** @var array<mixed> $response */\n $response = self::filter([$result])->array()->trim()[0];\n return $response;\n }", "title": "" }, { "docid": "77fd08e43f07d44991889263c1323993", "score": "0.4786254", "text": "public static function merge(...$arrays) {\n\n $merged = array();\n while ($arrays) {\n $array = array_shift($arrays);\n if (!is_array($array)) {\n trigger_error(__FUNCTION__ .' encountered a non array argument', E_USER_WARNING);\n return;\n }\n if (!$array)\n continue;\n foreach ($array as $key => $value)\n if (is_string($key))\n if (is_array($value) && array_key_exists($key, $merged) && is_array($merged[$key]))\n $merged[$key] = call_user_func(__FUNCTION__, $merged[$key], $value);\n else\n $merged[$key] = $value;\n else\n $merged[] = $value;\n }\n return $merged;\n }", "title": "" }, { "docid": "1fd17e97e59d0376e540073cde023b98", "score": "0.47823843", "text": "function catalyst_merge_exports() {\n $arrays = func_get_args();\n $result = array();\n foreach ($arrays AS $array) {\n foreach ($array AS $key => $value) {\n if (isset($result[$key]) && is_array($result[$key]) && is_array($value)) {\n $result[$key] = catalyst_merge_exports($result[$key], $value);\n }\n else {\n $result[$key] = $value;\n }\n }\n }\n return $result;\n}", "title": "" }, { "docid": "99030b9a8dde857a721b40b0239252c2", "score": "0.47823742", "text": "function array_model($array = array(), $model = array(), $default_value = NULL, $strict_mode = TRUE) {\n $model = CAST_TO_ARRAY( $model );\n if ( !$array ) {\n return $model;\n }\n $array = CAST_TO_ARRAY( $array );\n if ( !array_is_assoc( $model ) ) {\n $model = array_fill_keys( $model, $default_value );\n }\n if ( $strict_mode ) {\n $the_array = array();\n foreach ($model as $key => $default_value ) {\n $the_array[$key] = isset( $array[$key] ) ? $array[$key] : $default_value;\n }\n }\n else {\n $the_array = array_merge( $model, $array );\n }\n\n return $the_array;\n}", "title": "" } ]
8af7312e04d7943946103b9e403715af
/ $CI =& get_instance(); $CI>load>library('session'); $CI>load>library('encrypt'); $CI>load>helper('date');
[ { "docid": "8f3a801118769067e2405362cfc4229d", "score": "0.5955894", "text": "function lock($id){\n $CI =& get_instance();\n $CI->load->library('encrypt'); \n $encrypt= $CI->encrypt->encode($id ); \n return $encrypt;\n }", "title": "" } ]
[ { "docid": "c581c2d1b2266a4aff11e1531c1bab85", "score": "0.7128496", "text": "function Authentication()\r\n {\r\n //We can use this object anywhere in this class\r\n $this->CI = &get_instance();\n $this->CI->load->library('encryption');\r\n }", "title": "" }, { "docid": "62e352de5900b5e8b3094bc42fe66dcd", "score": "0.7096086", "text": "public function __construct()\n{\nparent::__construct();\n//Load Library and model.\n$this->load->library('session');\n$this->load->helper('url');\n}", "title": "" }, { "docid": "ba7cd77b50d0e4e06749e8ff3614a2d2", "score": "0.67501307", "text": "function authenticate_user()\n{\n\t $CI =& get_instance(); //first get instance\n // call the session library\n\t$user_logged_in = $CI->session->userdata('user'); \n \n\tif (!$user_logged_in) {\n\t\tredirect(base_url().'');\n\t}\n\t\n}", "title": "" }, { "docid": "c8b58b01db23bb0778fc478ea7296466", "score": "0.6709729", "text": "function __construct(){\n parent::__construct();\n $this->load->helper('url'); \n $this->load->library('session'); \n }", "title": "" }, { "docid": "3a787b1bb0d17a5b9c3eee222389b8d6", "score": "0.6661105", "text": "public function __construct()\n {\n parent::__construct();\n // if(!$this->session->userdata('id'))\n // {\n // redirect('index');\n // }\n $this->load->library('encryptioncustom');\n $this->load->model('admindashboard_model');\n }", "title": "" }, { "docid": "1b87538d2896ea73563f268b85979c1a", "score": "0.6637599", "text": "public function __construct() {\n parent::__construct();\n $this->load->library(\"session\");\n $this->load->helper('url');\n }", "title": "" }, { "docid": "033b03ef693012e92e716e83cacbc441", "score": "0.6618171", "text": "public function __construct() {\n parent::__construct();\n $this->load->database();\n $this->load->library(\"session\");\n $this->load->helper('string','email_helper');\n }", "title": "" }, { "docid": "033b03ef693012e92e716e83cacbc441", "score": "0.6618171", "text": "public function __construct() {\n parent::__construct();\n $this->load->database();\n $this->load->library(\"session\");\n $this->load->helper('string','email_helper');\n }", "title": "" }, { "docid": "6477a393c11c9cc01772bf5759bb3da7", "score": "0.6583822", "text": "public function __construct()\n{\n parent::__construct();\n $this->load->database();\n $this->load->library('session');\n\n\n}", "title": "" }, { "docid": "fdbec2638ea6dad4dbd4ee03a4a30aa8", "score": "0.6560663", "text": "public function __construct()\r\n {\r\n // Assign the CodeIgniter super-object\r\n \r\n $this->CI =& get_instance();\r\n $this->CI->load->helper('url');\r\n $this->CI->load->library('session');\r\n $this->CI->load->database();\r\n\r\n }", "title": "" }, { "docid": "d73a290ed94e1deb2da0754ec1a17838", "score": "0.6521086", "text": "function __construct(){\n parent::__construct();\n //$this->load->library('encrypt');\n\n \t}", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.65157413", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.65157413", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.65157413", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.65157413", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "fc9d89e9a23ca1b1c873554132183351", "score": "0.65067387", "text": "function __construct(){\n $this->_ci =& get_instance();\n $this->CI=& get_instance(); \n $CI=& get_instance();\n $CI->load->database();\n //$this->CI->load->library('session');\n //$this->CI->load->helper('cookie','session');\n //Include the user_model so we can use it\n $this->_ci->load->model('Menu_model');\n }", "title": "" }, { "docid": "b8b42323503ba7a7fa074d5e6c6600b3", "score": "0.6489318", "text": "public function __construct() {\n parent::__construct();\n $this->load->helper('cookie');//添加cookie助手函数 \n }", "title": "" }, { "docid": "4facce482474f9908ffc0bf34f02f887", "score": "0.6487905", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->load->helper('url');\r\n $this->load->library('session');\r\n \r\n }", "title": "" }, { "docid": "15ee290e1c4a715fb0042c77da8cca71", "score": "0.6468803", "text": "function __construct(){\n parent::__construct();\n $this->load->library('encrypt');\n\n \t}", "title": "" }, { "docid": "4d4d1fc4863f7ca629eb110db254ed07", "score": "0.6442542", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n }", "title": "" }, { "docid": "6e3ed97e7cf721b032ba0247f39ea7eb", "score": "0.64261305", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t}", "title": "" }, { "docid": "346b7a9c191f792b2763a20c25e4ea7f", "score": "0.64013636", "text": "function __construct() {\n parent::__construct();\n\t\t$this->load->library('session');\n }", "title": "" }, { "docid": "09b7203ac658d3f576a86ff4d2b5f813", "score": "0.6399813", "text": "public function __construct(){\n parent::__construct();\n $this->load->helper('form');\n $this->load->helper('url');\n $this->load->helper('form');\n //$this->load->model(\"registration_model\");\n $this->load->helper('security');\n $this->load->library('encrypt');\n //$this->load->library('session');\n $this->load->library('auth');\n $this->load->library('form_validation');\n \n\n }", "title": "" }, { "docid": "0d704b207973a5b20f5abf3c8d871e88", "score": "0.6392191", "text": "public function __construct(){\n // Call the CI_Model constructor\n parent::__construct();\n $this->load->helper(\"date\");\n }", "title": "" }, { "docid": "50400fea29e2c52a867c4f89a3817498", "score": "0.6378909", "text": "function __construct()\n {\n parent::__construct();\n $this->load->helper(array(\n 'form',\n 'url',\n 'html'\n ));\n $this->load->library(array(\n 'session',\n 'form_validation'\n ));\n $this->load->helper('security');\n $this->load->database();\n $this->load->model('Homemodel');\n $this->load->model('Authmodel');\n $this->load->model('Datamodel');\n $this->load->model('Udisemodel');\n $this->load->model('Udise_assetmodel');\n date_default_timezone_set('Asia/Kolkata');\n }", "title": "" }, { "docid": "3a65459477eb265f0c9b53d52bb2c62c", "score": "0.6365181", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n }", "title": "" }, { "docid": "3a65459477eb265f0c9b53d52bb2c62c", "score": "0.6365181", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n }", "title": "" }, { "docid": "f69eb2103435116dd325f0fe0319a02d", "score": "0.63600624", "text": "function md5plus($string)\n{\n $CI = & get_instance();\n return '_' . md5($CI->session->encryption_key . $string);\n}", "title": "" }, { "docid": "c1f8046a0ea2fb090e55fefb8f5fad83", "score": "0.6336067", "text": "function __construct(){\n parent::__construct();\n\t\t \n\t\t $this->load->helper('date'); \n\t\t $this->load->helper(array('url','form'));\n\t\t $this->load->library('session');\n\t\t $this->load->database();\n\t\t $this->load->model('m_account');\n\n }", "title": "" }, { "docid": "62b232b5ee8304d4dc8907a6a31ea24d", "score": "0.6333825", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->helper(\"date\");\n }", "title": "" }, { "docid": "8b4af77235e5f6537c8913cca7a3ff3e", "score": "0.63317496", "text": "function __construct()\n\t{\n\t\t$this->load->helper('security');\n\t}", "title": "" }, { "docid": "54909ff3b931e1bae789b01120172d85", "score": "0.63306266", "text": "public function __construct()\n\t{\n\t\t parent::__construct();\n\t\t $this->load->helper('form');\n\t\t $this->load->helper('url');\n\t\t $this->load->library('session');\n\t\t /*if(! $this->session->userdata('login'))\n\t\t {\n\t\t\t redirect('login/Authentication/logout');\n\t\t }*/\n\t\t $this->load->library('form_validation');\n\t\t $this->load->database();\n\t\t $this->load->model('Authentications');\n\t\t $this->load->helper('datetime');\n }", "title": "" }, { "docid": "6817468e6d9cf572bf1cf38e8f662750", "score": "0.63130563", "text": "function Authentication()\r\n\r\n {\r\n $this->CI = &get_instance();\r\n\r\n }", "title": "" }, { "docid": "a55fd7acf2e839b42399fc295643b428", "score": "0.627005", "text": "public function __construct() {\n parent::__construct();\n $this->load->helper('url');\n $this->load->library('session');\n }", "title": "" }, { "docid": "bf011f2272127062871bb2d9f0b401f6", "score": "0.6255142", "text": "public function __construct() {\r\n\r\n\r\n parent::__construct();\r\n $this->load->library('form_validation');\r\n $this->load->helper('form');\r\n $this->load->helper('url');\r\n $this->load->helper('date');\r\n $this->load->library('session');\r\n \r\n }", "title": "" }, { "docid": "f1686474e9c219dd0cd3905d34335c67", "score": "0.6251761", "text": "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->load->library('session');\r\n\t}", "title": "" }, { "docid": "ac2292004d51f8f7abd1686a324f528d", "score": "0.6251561", "text": "public function __construct() {\n parent::__construct();\n // $this->load->library(array('form_validation','session','base_user')); // load form lidation libaray & session library\n \n }", "title": "" }, { "docid": "a9087f175266a55adfd784d1dbea5a97", "score": "0.62495947", "text": "function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n \n $this->load->helper('form');\n }", "title": "" }, { "docid": "5b5c86f7a48c7a0eb2214385a63fe489", "score": "0.62361765", "text": "function __construct() \n {\n parent::__construct();\n $this->load->database(); \n $this->load->helper('date');\n\n\n //$this->load->model('modelsite');\n }", "title": "" }, { "docid": "3c4a5438d37e8689a6ed6c39c2d02fdb", "score": "0.6230802", "text": "public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n $this->CI->load->library('user_agent');\n $this->CI->load->library('notification');\n $this->CI->load->helper('cookie');\n $this->CI->load->helper('date');\n }", "title": "" }, { "docid": "1caa064c848f3ebd79ed74952d0f0585", "score": "0.62295264", "text": "function __construct()\r\n \t{\r\n parent::__construct();\r\n $this->load->helper('form');\r\n $this->load->helper('url');\r\n $this->load->library('session');\r\n }", "title": "" }, { "docid": "10a294a56da38c2d508ba4bf038f1f7f", "score": "0.6202212", "text": "function get_cache_id(){\n \n $CI = & get_instance();\n \n $session_data = $CI->session->all_userdata();\n \n return $session_data['cache_id'];\n}", "title": "" }, { "docid": "a9ed26e12e4c412d7bdcb4bfc601ed95", "score": "0.61939317", "text": "public function __construct() {\n parent::__construct();\n $this->load->helper('url'); \n\t\t$this->load->helper('form');\n\t\t$this->load->library('encrypt');\n\t\t$this->load->library('session');\n $this->load->library('email');\n\t\t$this->load->model('AccountModel');\n\t\t\n }", "title": "" }, { "docid": "05855d7556deef93ecb63d678c4c7fcc", "score": "0.6172397", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t}", "title": "" }, { "docid": "05855d7556deef93ecb63d678c4c7fcc", "score": "0.6172397", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t}", "title": "" }, { "docid": "d950d8b8ec6a15d3083c7b39281e6376", "score": "0.6171184", "text": "public function __construct() {\n parent::__construct(); \n $this->load->database();\n $this->load->model('mlog');\n $this->load->library(array('encrypt', 'email', 'session', 'Bcrypt'));\n }", "title": "" }, { "docid": "e559de6fa25b7649537c8239d6f56148", "score": "0.6156819", "text": "function __construct() {\r\n parent::__construct();\r\n date_default_timezone_set('Asia/Dhaka');\r\n $this->load->library('tank_auth');\r\n if (!$this->tank_auth->is_logged_in()) { //not logged in\r\n redirect('login');\r\n return 0;\r\n }\r\n $this->load->library('grocery_CRUD');\r\n $this->load->model('QC_model');\r\n $this->load->library('session');\r\n }", "title": "" }, { "docid": "88c5992a70a735e61d4a94718e2ffcc7", "score": "0.61559725", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->helper('url');\n\n $this->load->library('session');\n\n\t\t\n\t}", "title": "" }, { "docid": "71e91cbbdb7679022d4e3ff383677b05", "score": "0.6142942", "text": "function __construct()\n {\n parent::__construct();\n $this->load->database();\n $this->load->helper('date');\n }", "title": "" }, { "docid": "71e91cbbdb7679022d4e3ff383677b05", "score": "0.6142942", "text": "function __construct()\n {\n parent::__construct();\n $this->load->database();\n $this->load->helper('date');\n }", "title": "" }, { "docid": "1ddd799ccf57a6455809270397dc99c5", "score": "0.6140536", "text": "function Menu() {\r\n parent::Controller();\r\n $this->load->helper('html');\r\n $this->lang->load('userauth', $this->session->userdata('ua_language'));\r\n $this->lang->load('validation', $this->session->userdata('ua_language'));\r\n }", "title": "" }, { "docid": "1553eb61f9b22caa2e6dfcc0f0333925", "score": "0.61361045", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->helper('form');\n\t\t$this->load->library('form_validation');\n\t\t$this->load->library('session');\n\t\t$this->load->model('login_model');\n\t\t$this->load->model('model_crud');\n\t\t//$this->load->library('encrypt');\n\t}", "title": "" }, { "docid": "5c857338c7919a010026c6fb39f34bbe", "score": "0.6127373", "text": "function load_lang_file($file_name = \"basic\"){\r\n $ci = & get_instance();\r\n $ci->session->set_userdata('lang_file', $file_name);\r\n}", "title": "" }, { "docid": "e6f0df7fe747419e19c8e7c4a46b6c75", "score": "0.61264986", "text": "function __construct() /************* Constructor **********/\n\t{/************ Start Of Constructor ********/\n parent:: __construct(); /********** Launch Constructer **********/\n $StudentSession = $this->session->userdata('StudentSession'); /****** Check User Session ********/\n if ($StudentSession == false) { /********* If Session Is not Activated ******/\n\t\t\treturn redirect('login');/******** Redirect User To Login*****/\n }/********end of user check condition********/\n $this->load->model('Admindb');/******* Initialize Student Model Database ********/\n /******** Language Get from model**********/\n $this->encryption->initialize(/*********** Initialize encryption *********/\n array(/******start of array***** */\n 'cipher' => 'aes-256',\n 'mode' => 'ctr',\n 'key' => '<a 32-character random string>'\n )/******array end for password encryption****** */\n );/********encryption library end********** */\n date_default_timezone_set('Asia/Karachi');\n }", "title": "" }, { "docid": "1c74eff71e52720a2b7246ef76271a1b", "score": "0.61263543", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\tdate_default_timezone_set('Asia/Kolkata');\n\t\t$this->load->model('AnalyticsModel');\n\t\t$this->load->model('CashierModel');\n\t\t$this->load->model('AppointmentsModel');\n\t\t$this->load->model('POSModel');\n\t\t$this->load->model('BusinessAdminModel');\n\t\t$this->load->helper('ssl_helper');\n }", "title": "" }, { "docid": "0945d9dc5698a97cb0bb57ff01c84faa", "score": "0.61163384", "text": "public function __construct()\n {\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->helper('url');\n }", "title": "" }, { "docid": "0d2037ac91ba26a98e8d2815a6f4a8ae", "score": "0.61067814", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->helper('url');\n $this->load->database();\n $this->load->library('session');\n }", "title": "" }, { "docid": "2d9882b38fb24ce950cec8c9705bf72b", "score": "0.6106387", "text": "public function __construct(){\n parent::__construct(); \n $this->load->model('login_model');\n $this->load->database();\n $this->load->library('session');\n }", "title": "" }, { "docid": "a9a32b26384b4fa328c8d5dceea55c06", "score": "0.6096977", "text": "function __construct()\r\n\t{\r\n\t\tparent::__construct();\t\r\n\t\t$this->load->model('news_model');\r\n\t\t//$this->load->library('session');\r\n\t}", "title": "" }, { "docid": "c625c997dfcdc550703098eb137a8b0f", "score": "0.60830224", "text": "public function __construct()\n {\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->helper('url');\n\t}", "title": "" }, { "docid": "a4cfb852d50c2b09ff72ef7aa7111fff", "score": "0.6058646", "text": "function logged_in()\n{\n $CI=get_instance();\n $info=$CI->session->userdata('logged_in');\n if(!$info)\n {\n return false;\n }else\n {\n return true;\n }\n}", "title": "" }, { "docid": "67ba445a53c75c254dbb9659587a1acd", "score": "0.60459316", "text": "public function __construct() {\n parent::__construct();\n $this->load->helper('url'); \n\t\t$this->load->helper('form');\n\t\t$this->load->library('encrypt');\n\t\t$this->load->library('session');\n $this->load->library('email');\n\t\t$this->load->model('SettingsModel');\n\t\t$this->load->model('ChangePasswordModel');\n\t\t$this->load->helper('settings_helper');\n\t\t\n }", "title": "" }, { "docid": "20bcaee179b94422654fedeece116e54", "score": "0.6026168", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('Lessen/Inlogger_model', 'Inlogger_model');\n $this->load->helper('form');\n $this->load->library('session');\n }", "title": "" }, { "docid": "6e8340bba24b81ef621f3e1e18507f9b", "score": "0.6015568", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->database();\n //$this->load->library('session');\n //$this->ci =& get_instance();\n }", "title": "" }, { "docid": "05ff49e349f9d718226f29d7b73d4391", "score": "0.60145307", "text": "function _assign_libraries()\r\n\t{\r\n\t\tif ($CI =& get_instance())\r\n\t\t{\r\n\t\t\t// Load CodeIgniters form validation if not already loaded\r\n\t\t\tif ( ! isset($CI->form_validation))\r\n\t\t\t{\r\n\t\t\t\t$CI->load->library('form_validation');\r\n\t\t\t}\r\n\r\n\t\t\t$this->form_validation = $CI->form_validation;\r\n\t\t\t$this->lang = $CI->lang;\r\n\t\t\t$this->load = $CI->load;\r\n\t\t\t$this->db = $CI->db;\r\n\t\t\t$this->config = $CI->config;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8e215b97dc07593f358bc303d9142aad", "score": "0.60142654", "text": "function __construct()\n {\n parent::__construct();\n \n $this->load->helper('safety');\n $this->load->library('encrypt');\n }", "title": "" }, { "docid": "1a9237db184b1654cea72dcf9f204346", "score": "0.6001659", "text": "public function __construct()\n {\n $this->CI =& get_instance();\n\n // call password_crypt class \n $this->CI->load->model('simple_mailer_model');\n \n }", "title": "" }, { "docid": "2b78194a070e2adde226d72c04279338", "score": "0.60002095", "text": "public function __construct() {\n parent::__construct();\n $this->load->library(array('common','encryption', 'SnsLogin'));\n $this->load->helper('url');\n $this->load->model('biz/Emailforsignbiz', 'emailforsignbiz');\n $this->efs_hour = \"2\"; // 인증 가능 시간\n $this->efs_url = \"http://shoes.prog106.indoproc.xyz/sign/auth/\";\n }", "title": "" }, { "docid": "0941218e4d101bdd75f433614e0882a4", "score": "0.5995434", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n\t\t$this->load->model('login_model');\r\n\t\t$this->load->library('Password_encryption'); \r\n }", "title": "" }, { "docid": "596dcfe42102f423f679df499038cc98", "score": "0.59915954", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\tif($this->session->userdata('logged_in') && $this->session->userdata('user_login')) {\n\t\t\n\t\t// $this->load->helper('url');\n\t\t// // Load form helper library\n\t\t// $this->load->helper('form');\n\n\t\t// // Load form validation library\n\t\t// $this->load->library('form_validation');\n\n\t\t// // Load session library\n\t\t// $this->load->library('session');\n\t\t// $this->load->model('Memberboardprocess_model');\n\n\t\t// Load database\n\t\t$this->load->model('MemberCommission_model');\n\t\t\n\t\t$this->load->model('Memberboardprocess_model');\n\t\n\t\t$this->load->helper('cookie');\n\n\t\t// Load database\n\t\t\n\t\n\t\t$this->lang->load('user/mtmpayment',$this->session->userdata('language'));\n\t\t$this->lang->load('user/common',$this->session->userdata('language'));\n\t\t\n\t\t} else {\n\t \tredirect('login');\n\t }\n\t}", "title": "" }, { "docid": "aa87b122c60d8ea4b2881c591d8f786a", "score": "0.5990588", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\tdate_default_timezone_set('Asia/Kolkata');\n\t\t$this->load->library('session');\n\t\t$this->load->model('CustomModel');\n\t\t$this->load->helper('datefilter');\n\t\tif (!isset($_SESSION['userInfo'])) {\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('UserAuthenticationControl/index');\n\t\t}\n\t}", "title": "" }, { "docid": "cf7f0d34daf498d0d942291ff2696048", "score": "0.5981301", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n // $this->load->helper('url');\r\n // $this->load->helper('form');\r\n // $this->load->model('Sinduadi_model');\r\n // $this->load->library('Session/Session');\r\n }", "title": "" }, { "docid": "cb0be9d3cb3a953acd12928f0714a2df", "score": "0.59774953", "text": "public function __construct() \n {\n parent::__construct();\n /* Load the libraries and helpers */\n $this->load->library('form_validation');\n $this->load->library('session');\n $this->load->helper(array('form', 'url', 'captcha'));\n }", "title": "" }, { "docid": "1fb06bf842330bfb4cfcfa862cead3cd", "score": "0.5968751", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('UserModel');\n $this->load->library('session');\n $this->load->helper('security');\n }", "title": "" }, { "docid": "f9573e049307d6b1c4634be1d2e1de7b", "score": "0.5960719", "text": "public function __construct() {\n //set smarty template directory to this module\n //$this->smarty->template_dir = APPPATH . 'modules\\users\\views';\n //START\n //Check if user has previlleges\n Security::can_access_app(2);\n //END\n //load the necessary helper functions and libraries\n $this->load->helper('url');\n $this->load->helper('html');\n $this->load->library('session');\n $this->load->helper('form');\n $this->load->helper('tidalilane_helper');\n $this->load->library('form_validation');\n $this->load->library('session');\n\n\n //load the helper \n $this->load->helper('tidalilane_helper');\n \n $this->load->model('TidalilaneModels');\n }", "title": "" }, { "docid": "c8cd42c5bf3bbc1d76110a5565bdf9ed", "score": "0.5955853", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->load->database();\r\n $this->config->load('general');\r\n $this->load->helper('fecha');\r\n }", "title": "" }, { "docid": "594f6270805bf43e43176c838ec6bf13", "score": "0.59488654", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->library('email');\n\t\t$this->load->database();\n\t\t$this->load->helper('url');\n $this->load->library('form_validation');\n $this->load->library('details');\n $this->load->helper('security');\n $this->load->model('login_form');\n $this->load->model('All_page');\n\t}", "title": "" }, { "docid": "4d45f5cc8294b17a193bb18aa29ca53d", "score": "0.59323794", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->helper(array('form','url'));\n\t\t$this->load->model('welcome_model');\n\t\t$this->load->library('session');\n\t\t$this->load->library('form_validation');\n\t}", "title": "" }, { "docid": "60bbc57b692aae39dd80f6d1bb1e7abf", "score": "0.5929005", "text": "public function __construct()\n\t { \n\t\t\t\tparent::__construct();\n\t\t\t\t$this->load->helper('url'); \n\t\t\t\t$this->load->helper('form');\n\t\t\t\t$this->load->library('form_validation');\n\t\t\t\t$this->load->helper('security');\n\t\t\t\t$this->load->library('session');\n\t\t\t\t//$this->load->model('Mod_health');\n\t\t\t\t$this->load->model('Mod_report');\n }", "title": "" }, { "docid": "b8e3a1d4a81809c4f5e14518a9a41efe", "score": "0.5924589", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->database();\n\t\t$this->load->helper('url');\n\t\t$this->load->library('form_validation');\n $this->load->helper('security');\n $this->load->model('All_page');\n $this->load->library('email');\n $this->load->library('details');\n\t}", "title": "" }, { "docid": "b8e3a1d4a81809c4f5e14518a9a41efe", "score": "0.5924589", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->database();\n\t\t$this->load->helper('url');\n\t\t$this->load->library('form_validation');\n $this->load->helper('security');\n $this->load->model('All_page');\n $this->load->library('email');\n $this->load->library('details');\n\t}", "title": "" }, { "docid": "fba69b9ba2f73918e76f2c2f045564a8", "score": "0.5912931", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->helper('url');\n\t\t$this->load->model('mldb2');\n\t\t$this->load->model('mlPreguntas');\n\t\t$this->load->library('session'); \t\n\t}", "title": "" }, { "docid": "fd51d7e4ae8745f8e3511eeea77db958", "score": "0.5908393", "text": "function __construct() {\r\n parent::__construct();\r\n date_default_timezone_set('Asia/Dhaka');\r\n $this->load->library('tank_auth');\r\n if (!$this->tank_auth->is_logged_in()) { //not logged in\r\n redirect('login');\r\n return 0;\r\n }\r\n $this->load->library('grocery_CRUD');\r\n $this->load->model('checkuser');\r\n \r\n }", "title": "" }, { "docid": "71739f154ccd88037eb867f30d527201", "score": "0.5903961", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->library('email');\n\t\t$this->load->database();\n\t\t$this->load->helper('url');\n $this->load->library('form_validation');\n $this->load->library('details');\n $this->load->helper('security');\n $this->load->model('login_form');\n $this->load->model('Mailsend');\n\t}", "title": "" }, { "docid": "128c48678c04647dfced1775b05413e6", "score": "0.5899528", "text": "public function __construct() {\n //load database in autoload libraries \n parent::__construct(); \n $this->load->model('DashboardModal'); \n\n if(!$this->session->userdata('id'))\n {\n redirect('login');\n }\n $this->load->helper('url', 'form'); \n $this->load->library('form_validation');\n $this->load->library('form_validation');\n $this->load->library('upload');\n $this->load->model('ImageModel'); \n $this->load->library('session'); \n \n }", "title": "" }, { "docid": "fd597c5869da2e9cfe33d97163cfa48d", "score": "0.58981323", "text": "public function uniqueId(){\n $this->load->helper('string');\n}", "title": "" }, { "docid": "a43ea0c42bf296e3de15c57e1af2e5cc", "score": "0.58935905", "text": "function get_user_id(){\n \n $CI = & get_instance();\n \n $session_data = $CI->session->all_userdata();\n \n return $session_data['user_data']['id'];\n}", "title": "" }, { "docid": "901e1f36d4f971b65c13d13c4123f3d4", "score": "0.58768576", "text": "function getSessionVal($key) {\n $CI = & get_instance();\n $val = $CI->session->userdata($key);\n if ($val != \"\")\n return $val;\n else\n return false;\n}", "title": "" }, { "docid": "df5fcd0fe7091101d59226f7bab25f0a", "score": "0.58689666", "text": "function __construct(){\n parent::__construct(); //untuk menjalankan construct pada parent nya\n $this->load->model('Mahasiswa_model'); //berfungsi untuk memuat model yang akan kita gunakan\n $this->load->library('session');\n }", "title": "" }, { "docid": "98ab291276c3cdd7a55e2318c39fb58d", "score": "0.58664894", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\t\t$this->load->helper('url');\n\t\t$this->load->Model('Login_Model');\n\n }", "title": "" }, { "docid": "160547c252e01eba682ba68536a520b5", "score": "0.58609253", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->load->model('Adminusermodel');\r\n $this->load->model('Usermodel');\r\n $this->load->helper('randomstring_helper');\r\n $this->load->library('user_agent');\r\n\r\n $this->load->library('Common_lib');\r\n\r\n $this->load->library('Paypal_lib');\r\n }", "title": "" }, { "docid": "af107f954ccd499507328e5ed909b782", "score": "0.58443916", "text": "function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->library(\"Services\");\r\n $this->load->library('apifunct');\r\n $this->load->model('users_model');\r\n $this->load->model('general_model');\r\n\r\n ini_set('display_errors', 1);\r\n\r\n date_default_timezone_set('Asia/Jakarta');\r\n\r\n $this->time_now = date('H:i:s');\r\n\r\n }", "title": "" }, { "docid": "5521cf6ab42d6aa25be3ee998e198212", "score": "0.58374715", "text": "public function __construct() {\n parent::__construct();\n self::check_authority();\n \n $this->load->library(\"datetimemanipulation\");\n $this->load->library('ciqrcode');\n\n \n }", "title": "" }, { "docid": "6e1f783feb04b51231dba8335e5ce60c", "score": "0.5826805", "text": "function __construct()\n {\n // $this->_ci =& get_instance();\n //load config \n // $this->load->library('user_agent'); \n }", "title": "" }, { "docid": "188aa735b6a71240bf8b1dad88acb344", "score": "0.58115506", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->helper(array('form','url'));\n $this->load->library(array('session', 'form_validation', 'email'));\n $this->load->library(array('session', 'form_validation', 'pagination', 'email','MY_Input'));\n $this->load->database();\n $this->load->model('Init_models');\n }", "title": "" }, { "docid": "c9c469625d3784e349075ec46e24b343", "score": "0.5811243", "text": "public function Func() {\n parent::__construct();\n\n $this->load->library('DX_Auth');\n $this->load->library('Form_validation');\n $this->load->library('session');\n $this->load->library('email');\n\n $this->load->helper('form');\n $this->load->helper('url');\n\n $this->load->model('Email_model');\n $this->load->model('Message_model');\n $this->load->model('Trips_model');\n }", "title": "" }, { "docid": "c242d09e43acbbc39a88baabd1423ccc", "score": "0.5806014", "text": "public function __construct() {\n\t\tparent::__construct();\n $this->load->helper(array('form','url','html', 'date'));\n\t\t$this->load->library(array('session'));\n\t\t$this->load->database();\n\t\t$this->load->model('employee_model');\n\t\t$this->load->model('business_model');\n\n\t}", "title": "" }, { "docid": "9dd8c76549ec7fff5a5fce7802e40972", "score": "0.5805477", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->helper(array('url','form','security','string'));\n $this->load->library('session');\n if(empty($this->session->userdata('username')))\n {\n redirect('/user_login/');\n }\n }", "title": "" }, { "docid": "6b2fa4bec4e36bbe798e32582eca383e", "score": "0.57900697", "text": "function get_tema(){\n $CI =& get_instance();\n $CI->load->library('sistema');\n return $CI->sistema->tema;\n\n}", "title": "" }, { "docid": "5482b41f64fc34dcb5752ce98f75c7aa", "score": "0.57898754", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('template');\n\t\t$this->load->helper(array('form', 'url', 'html'));\n\t\t$this->load->library(array('form_validation', 'table', 'simple_login', 'session'));\n\t\t$this->load->model('Admin_model');\n\t\t$this->load->database();\n\t\t\n\t\t$this->simple_login->cek_login();//memproteksi semua method\n\t\t//$this->load->library('table');\n\t}", "title": "" } ]
775ff756eb34af7cd47577b5ad7ea1a4
Category has many icons.
[ { "docid": "4b52b807c4342c9fa589b207c82dcb6d", "score": "0.8538899", "text": "public function icons(): HasMany\n {\n return $this->hasMany(CategoryIcon::class);\n }", "title": "" } ]
[ { "docid": "1f97abaebf1756a1ca40a236a36a706e", "score": "0.64961547", "text": "function categories_as_images( $categories ){\r\n\tforeach ( $categories as $category ){\r\n\t\techo '<a href=\"' . esc_url( get_category_link( $category->term_id ) ) . '\" class=\"post-category\">';\r\n\t\tif( $category->slug == 'events'){\r\n\t\t\techo '<i class=\"glyphicon glyphicon-calendar category-glyph\" aria-hidden=\"true\" ></i>';\r\n\t\t} else {\r\n\t\t\techo '<img src=\"' . get_stylesheet_directory_uri() .'/assets/images/categories/' . $category->slug .'.png\" width=\"50px\" />';\r\n\t\t}\r\n\t\techo '</a>';\r\n }\r\n}", "title": "" }, { "docid": "1fe7b3a869f34d782bb21710ac81e221", "score": "0.60825473", "text": "public function core_admin_category_list_specific_icons($category_row)\n {\n //the category ID\n $category_id = (int)$category_row['category_id'];\n $icons = array();\n //expects array of arrays...\n\n //do a check to see if this icon should be displayed... (this is example,\n //so just set it to true to always show the icon)\n $show_this_icon = true;\n\n //Note that this is called once for EVERY category displayed, so if there\n //is some information you retrieve that is the same each time, it would be\n //a good idea to store in a local variable or similar, so you don't have\n //to keep retrieving it over and over. Also make sure this is as \"optimized\"\n //as possible so it doesn't slow things down too much on sites showing 100\n //categories on the page.\n\n $icons[] = array (\n //EXAMPLE ONLY - this icon does not actually work..\n\n //Title displayed when you hover on the icon\n 'title' => 'Example Icon',\n\n //image location relative to the admin folder to display if the\n //category does have this thing attached\n 'src' => 'admin_images/icons/filter.png',\n\n //set to true to show the icon, or false to not show the icon for this\n //category\n 'active' => $show_this_icon\n );\n\n //note - can add multiple icons if needed...\n\n return $icons;\n }", "title": "" }, { "docid": "64c6c2d6f2b5636d1572330af7734f8e", "score": "0.6079344", "text": "public function addImgIconCategories(Request $request) {\n try {\n return $this->getCategoriesService()->addImageIcon($request);\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n return $this->jsonErrorResponse($ex->getMessage());\n } catch (\\Exception $ex) {\n return $this->jsonErrorResponse($ex->getMessage());\n }\n }", "title": "" }, { "docid": "ec0376f18074f2d1804aca797f8a9473", "score": "0.6002174", "text": "public function icon()\n {\n return $this->belongsTo(Icon::class);\n }", "title": "" }, { "docid": "306888f5f51c6b0c2471cdc6c3df9f05", "score": "0.589396", "text": "public function icon()\n {\n return $this->belongsTo(Icon::class, 'icon_id');\n }", "title": "" }, { "docid": "b1effaafe2bea6848562a7a1774ace10", "score": "0.5748661", "text": "Public function addIconAction()\n\t{\n\t\t//SET LAYOUT\n\t\t$this->_helper->layout->setLayout('admin-simple');\n\n\t\t//GET CATEGORY ID\n\t\t$this->view->category_id = $category_id = $this->_getParam('category_id');\n\t\t$category = Engine_Api::_()->getItem('sitegroup_category', $category_id);\n\n //CREATE FORM\n $this->view->form = $form = new Sitegroup_Form_Admin_Settings_Addicon();\n\n\t\t$this->view->close_smoothbox = 0;\n\n if( !$this->getRequest()->isPost() ) {\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n return;\n }\n\n\t\t//UPLOAD PHOTO\n\t\tif( isset($_FILES['photo']) && is_uploaded_file($_FILES['photo']['tmp_name']) )\n\t\t{\n\t\t\t//UPLOAD PHOTO\n\t\t\t$photoFile = $category->setPhoto($_FILES['photo']);\n\n\t\t\t//UPDATE FILE ID IN CATEGORY TABLE\n\t\t\tif(!empty($photoFile->file_id)) {\n\t\t\t\t$category->file_id = $photoFile->file_id;\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\n\t\t$this->view->close_smoothbox = 1;\n\t}", "title": "" }, { "docid": "58b1b2d0d5d010d9ef78b0e3ec46b4bd", "score": "0.5726493", "text": "function iconcat()\n {\n //extraemos el nombre de la categoría y la cargamos a una variable\n $category = get_the_category();\n $nombrecat = $category[0]->category_nicename;\n //imprimimos la etiqueta de la imagen\n echo $nombrecat;\n }", "title": "" }, { "docid": "fca4ffbab6c8681dace52cbae9df86b3", "score": "0.5716228", "text": "public function categories() {\n return $this->morphToMany('App\\Models\\Content\\Category', 'categorized');\n }", "title": "" }, { "docid": "a0a2d49eef86390f5b4c816d72a35d53", "score": "0.5703402", "text": "public function categories()\n {\n return $this->morphToMany(Category::class, 'categorizable', 'categorizables');\n }", "title": "" }, { "docid": "3e6fb9358e43e0b2347a282fac848343", "score": "0.5661334", "text": "public function icons() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/icons.php';\n\t}", "title": "" }, { "docid": "25caf2006d4d2ab813435f3aafae7259", "score": "0.5632513", "text": "function getAllWithIcon() {\n $retval = $this->getAll();\n $retval['icon'] = sotf_Blob::cacheIcon($this->id);\n return $retval;\n }", "title": "" }, { "docid": "e744ee2da818d0790b01486a447ffd73", "score": "0.5626869", "text": "public function categorias() {\n return $this->belongsToMany('Categoria', 'item_categoria', 'item_id', 'categoria_id');\n }", "title": "" }, { "docid": "93adb45c02f8568be43ab9b01c8c7afd", "score": "0.5601268", "text": "public function getIcon() {}", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.55990726", "text": "public function getIcon();", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.55990726", "text": "public function getIcon();", "title": "" }, { "docid": "739dfcab275656a89fb5f3d61098985d", "score": "0.5551273", "text": "protected function _buildListOfIcons()\n {\n $icons = new \\Yana\\Views\\Icons\\Collection();\n $icons[\"1\"] = $icon1 = new \\Yana\\Views\\Icons\\File();\n $icon1->setId(\"Id1\")->setPath(\"Path1\");\n $icons[\"2\"] = $icon2 = new \\Yana\\Views\\Icons\\File();\n $icon2->setId(\"Id2\")->setPath(\"Path2\");\n return $icons;\n }", "title": "" }, { "docid": "a1415c0027fb5cb3d1aeb82b4a71f275", "score": "0.55480736", "text": "public function categories()\n {\n return $this->morphMany('App\\Category', 'categorable');\n }", "title": "" }, { "docid": "a4237bd84f1dbccc15c8d93d08f3c00a", "score": "0.5539028", "text": "public function categories(){\n return $this -> belongsToMany('Category');\n }", "title": "" }, { "docid": "8c4d29159275f88130fe73daca97b789", "score": "0.5513665", "text": "public function categories() {\n return $this->belongsToMany('Category');\n }", "title": "" }, { "docid": "bfda4a0c5c86d89a78bcffb993c742de", "score": "0.5499376", "text": "public function categories(){\n return this->hasMany('App\\Category');\n }", "title": "" }, { "docid": "6eb8be0d3bfcc81d1d4fe0502e93fd9b", "score": "0.5498384", "text": "public function categorias()\n {\n return $this->belongsToMany('App\\Categoria');\n }", "title": "" }, { "docid": "9b2582d956d6bc1eca9f2ed51fb3e1f4", "score": "0.5497282", "text": "public function categories();", "title": "" }, { "docid": "9b2582d956d6bc1eca9f2ed51fb3e1f4", "score": "0.5497282", "text": "public function categories();", "title": "" }, { "docid": "0d189921fb3d99b516e2dd4e2d937b98", "score": "0.5481536", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class,'category_files')->withTimestamps();\n }", "title": "" }, { "docid": "6f0b325b92541dc5cbe67d22be704a07", "score": "0.5448279", "text": "public function getIconUrl()\n {\n if (($sIcon = $this->oxcategories__oxicon->value)) {\n $oConfig = $this->getConfig();\n $sSize = $oConfig->getConfigParam('sCatIconsize');\n if (!isset($sSize)) {\n $sSize = $oConfig->getConfigParam('sIconsize');\n }\n\n return oxRegistry::get(\"oxPictureHandler\")->getPicUrl(\"category/icon/\", $sIcon, $sSize);\n }\n }", "title": "" }, { "docid": "e89d714f8e6fb7d943b5aedaaed0fcbc", "score": "0.54479253", "text": "public function categories() {\n return $this->hasMany(Category::class);\n }", "title": "" }, { "docid": "3299a56a6c9541d386e44ab1624e2371", "score": "0.5442843", "text": "function categories()\n {\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "661c137523b7ebec3bb7001db3a6549b", "score": "0.54326797", "text": "public function categories() : BelongsToMany\n {\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "9186f91aa43747ef7c8d81e65faedd57", "score": "0.54319894", "text": "public function categories()\n {\n return $this->belongsToMany('App\\Category');\n }", "title": "" }, { "docid": "9186f91aa43747ef7c8d81e65faedd57", "score": "0.54319894", "text": "public function categories()\n {\n return $this->belongsToMany('App\\Category');\n }", "title": "" }, { "docid": "9186f91aa43747ef7c8d81e65faedd57", "score": "0.54319894", "text": "public function categories()\n {\n return $this->belongsToMany('App\\Category');\n }", "title": "" }, { "docid": "9186f91aa43747ef7c8d81e65faedd57", "score": "0.54319894", "text": "public function categories()\n {\n return $this->belongsToMany('App\\Category');\n }", "title": "" }, { "docid": "9186f91aa43747ef7c8d81e65faedd57", "score": "0.54319894", "text": "public function categories()\n {\n return $this->belongsToMany('App\\Category');\n }", "title": "" }, { "docid": "cf30f1e06922ba2ca108cdfe343aa019", "score": "0.54063195", "text": "public function categories()\n {\n return $this->belongsToMany(Category::Class);\n }", "title": "" }, { "docid": "1739f8016a5e104a23bd4817f47f678a", "score": "0.53993946", "text": "public function get_icon() {\n return 'astha far fa-images';\n }", "title": "" }, { "docid": "5e476be9627eeb90cdd0d16ad6eda380", "score": "0.5398027", "text": "public static function getIcon();", "title": "" }, { "docid": "2f95f77930ad2936174dae089384820a", "score": "0.5366945", "text": "public function categories(): BelongsToMany {\n\t\treturn $this->belongsToMany(Category::class);\n\t}", "title": "" }, { "docid": "bc2521fa04df45e55556692009e6a508", "score": "0.53582335", "text": "function install($parent) {\r\n\t\t\r\n\t\tinclude_once JPATH_ADMINISTRATOR.'/components/com_smarticons/tables/icon.php';\r\n\t\t\r\n\t\t//Set language file from mod_quickicons\r\n\t\tJFactory::getLanguage()->load('mod_quickicon');\r\n\t\t\r\n\t\t$user\t\t\t\t= JFactory::getUser();\r\n\t\t$db\t\t\t\t\t= JFactory::getDbo();\r\n\t\t$categoriesSaved\t= 0;\r\n\t\t$iconsSaved\t\t\t= 0;\r\n\r\n\t\t//Create the categories for each group of icons\r\n\t\tforeach ($this->categories as $category) {\r\n\t\t\t$categoryTable\t= JTable::getInstance('Category');\r\n\t\t\t\r\n\t\t\t$categoryTable->setLocation($category['parent_id'], 'last-child');\r\n\t\t\t$categoryTable->setRules('{\"core.view\":{\"1\":1},\"core.delete\":[],\"core.edit\":[],\"core.edit.state\":[]}');\r\n\t\t\t\r\n\t\t\t$category['title']\t\t\t\t= JText::_($category['title']);\r\n\t\t\t$category['created_user_id']\t= $user->id;\r\n\r\n\t\t\tif ($categoryTable->save($category)) {\r\n\t\t\t\t\r\n\t\t\t\t$query = $db->getQuery(true);\r\n\t\t\t\t\r\n\t\t\t\t$query->select('id')\r\n\t\t\t\t ->from('#__categories')\r\n\t\t\t\t ->where('title =' . $db->quote($category['title']));\r\n\t\t\t\t\r\n\t\t\t\t$db->setQuery($query);\r\n\t\t\t\t\r\n\t\t\t\t$categoryId = $db->loadResult();\r\n\t\t\t\t\r\n\t\t\t\tforeach ($category['icons'] as $icon) {\r\n\t\t\t\t\t$iconsTable = new SmartIconsTableIcon($db);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$iconsTable->setRules('{\"core.view\":{\"1\":1},\"core.delete\":[],\"core.edit\":[],\"core.edit.state\":[]}');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$icon['catid']\t= $categoryId;\r\n\t\t\t\t\t$icon['Name']\t= JText::_($icon['Name']);\r\n\r\n\t\t\t\t\tif ($iconsTable->save($icon)) {\r\n\t\t\t\t\t\t$iconsSaved++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$error = $categoryTable->getErrors();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo '<p>'.JText::plural('COM_SMARTICONS_INSTALLER_N_ICONS_SAVED', $iconsSaved).'</p>';\r\n\r\n\t\t//Copy images to folder\r\n\t\t$sourceDir = JPATH_ADMINISTRATOR.'/components/com_smarticons/images';\r\n\t\t$targetDir = JPATH_SITE.'/images/smarticons';\r\n\r\n\t\tif (!(JFolder::exists($targetDir))) {\r\n\t\t\tif (JFolder::copy($sourceDir, $targetDir)) {\r\n\t\t\t\tJFolder::delete($sourceDir);\r\n\t\t\t\techo '<p>'. JText::_('COM_SMARTICONS_INSTALLER_IMAGES_COPYSUCCESS') .'</p>';\r\n\t\t\t} else {\r\n\t\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_IMAGES_COPYFAIL') .'</p>';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\techo '<p>'. JText::_('COM_SMARTICONS_INSTALLER_IMAGES_EXISTS') .'</p>';\r\n\t\t}\r\n\r\n\t\t//Install smarticons module\r\n\t\t$modulePath = JPATH_ADMINISTRATOR.'/components/com_smarticons/module';\r\n\r\n\t\t$installer = new JInstaller();\r\n\t\t$installer->setOverwrite(true);\r\n\r\n\t\tif ($installer->install($modulePath)) {\r\n\t\t\tJFolder::delete($modulePath);\r\n\t\t\techo '<p>'. JText::_('COM_SMARTICONS_INSTALLER_MODULE_INSTALL_SUCCESS') .'</p>';\r\n\t\t} else {\r\n\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_MODULE_INSTALL_FAIL') .'</p>';\r\n\t\t\techo \"<p style=\\\"color:red\\\">\".nl2br($installer->message) .'</p>';\r\n\t\t}\r\n\r\n\t\t//Enable mod_smarticons module\r\n\t\t$query = $db->getQuery(true);\r\n\t\t\r\n\t\t$query->select('id')\r\n\t\t ->from('#__modules')\r\n\t\t ->where('module = '.$db->quote('mod_smarticons'));\r\n\r\n\t\t$db->setQuery($query);\r\n\r\n\t\tif ($id = $db->loadResult()) {\r\n\t\t\t$query = $db->getQuery(true);\r\n\t\t\t\r\n\t\t\t$query->update('#__modules')\r\n\t\t\t ->set('published = 1')\r\n\t\t\t ->set('position = \\'icon\\'')\r\n\t\t\t ->set('ordering = 1')\r\n\t\t\t ->set('access = 3')\r\n\t\t\t ->where('id = '. $db->quote($id));\r\n\t\t\t\r\n\t\t\t$db->setQuery($query);\r\n\t\t\t\r\n\t\t\tif ($db->query()) {\r\n\t\t\t\t$query = $db->getQuery(true);\r\n\t\t\t\t\r\n\t\t\t\t$query->insert('#__modules_menu')\r\n\t\t\t\t ->set('moduleid = '. $db->quote($id))\r\n\t\t\t\t ->set('menuid = 0');\r\n\t\t\t\t \r\n\t\t\t\t$db->setQuery($query);\r\n\t\t\t\t\r\n\t\t\t\tif ($db->query()) {\r\n\t\t\t\t\techo '<p>'. JText::_('COM_SMARTICONS_INSTALLER_MODULE_ENABLE_SUCCESS') .'</p>';\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_MODULE_ENABLE_FAIL') .'</p>';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_MODULE_ENABLE_FAIL') .'</p>';\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_MODULE_ENABLE_FAIL');\r\n\t\t}\r\n\r\n\t\t//Disable mod_quickicons module\r\n\t\t$query = $db->getQuery(true);\r\n\r\n\t\t$query->select('id')\r\n\t\t ->from('#__modules')\r\n\t\t ->where('module = '. $db->quote('mod_quickicon'));\r\n\r\n\t\t$db->setQuery($query);\r\n\r\n\t\tif ($id = $db->loadResult()) {\r\n\t\t\t$query = $db->getQuery(true);\r\n\t\t\t\r\n\t\t\t$query->update('#__modules')\r\n\t\t\t ->set('published = 0')\r\n\t\t\t ->where('id = '. $db->quote($id));\r\n\t\t\t\r\n\t\t\t$db->setQuery($query);\r\n\t\t\t\r\n\t\t\tif ($db->query()) {\r\n\t\t\t\techo '<p>'. JText::_('COM_SMARTICONS_INSTALLER_QUICKICON_DISABLE_SUCCESS') .'</p>';\r\n\t\t\t} else {\r\n\t\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_QUICKICON_DISABLE_FAIL') .'</p>';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\techo \"<p style=\\\"color:red\\\">\".JText::_('COM_SMARTICONS_INSTALLER_QUICKICON_DISABLE_FAIL') .'</p>';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.53511775", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.53511775", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.53511775", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.53511775", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.53511775", "text": "public function getCategories();", "title": "" }, { "docid": "d52d2f9188415badbc3f8d9113759afa", "score": "0.5344519", "text": "public function categories(){\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "68a908351fe7dcc2f047dbc94cf3e90c", "score": "0.5343371", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "68a908351fe7dcc2f047dbc94cf3e90c", "score": "0.5343371", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "68a908351fe7dcc2f047dbc94cf3e90c", "score": "0.5343371", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "733501f9efc2de175e82711a67a4a7fd", "score": "0.5343235", "text": "public function Categories(){\n return $this->belongsToMany(Category::class);\n }", "title": "" }, { "docid": "920ca2f9e377c394c587fd067974f5f0", "score": "0.53288686", "text": "public function getIconClass()\n {\n return self::ICON;\n }", "title": "" }, { "docid": "f17af611a0d0e2c1dd19f1542be1b5e0", "score": "0.53137165", "text": "public function addCategory(Request $request) {\n\n if ($request->isMethod('get')) {\n return view('admin.add-category');\n }\n\n $validation_data = [\n 'arabic_category' => 'required',\n 'english_category' => 'required',\n 'non_selected_icon' => 'required',\n 'selected_icon' => 'required',\n ];\n\n $validator = Validator::make($request->all(), $validation_data);\n\n if ($validator->fails()) {\n return redirect()->back()->withInput()->withErrors($validator);\n }\n\n // selected icon\n $file = $request->file('selected_icon');\n $extension = $file->getClientOriginalExtension();\n $picture = uniqid() . '.' . $extension;\n $destinationPath = base_path() . '/public/admin/icons';\n $file->move($destinationPath, $picture);\n\n // non selected icon\n $file2 = $request->file('non_selected_icon');\n $picture2 = 'non-' . $picture;\n $destinationPath = base_path() . '/public/admin/icons';\n $file2->move($destinationPath, $picture2);\n\n $category_data = [\n 'arabic' => $request->arabic_category,\n 'english' => $request->english_category,\n 'non_selected_icon' => $picture2,\n 'selected_icon' => $picture,\n 'created_at' => $this->current_date_time,\n 'updated_at' => $this->current_date_time,\n ];\n\n $id = DB::table('categories')->insertGetId($category_data);\n $this->digitalOcean->table('categories')->insertGetId($category_data);\n\n if ($id) {\n Session::flash('success', 'Type successfully added');\n\n return redirect('admin/view-categories');\n }\n\n Session::flash('error', 'Type could not be added');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "aa28d2fbb9e9c8269c8acb57c0f5d184", "score": "0.53026736", "text": "public function childCategories(): HasMany\n {\n return $this->hasMany(Category::class, 'category_id');\n }", "title": "" }, { "docid": "ce02c90af1ab2584757e2eb36be82011", "score": "0.52933395", "text": "public function getAllCategories() {\n\n }", "title": "" }, { "docid": "6e876f661d987f303b144777390b2f8b", "score": "0.5282654", "text": "public function Category_Image()\n {\n $prods = Products::all();\n $imgs = Images::all()->load('product');\n return view('admin.image_category', compact('imgs', 'prods'));\n }", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5275114", "text": "public function getCategory();", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5275114", "text": "public function getCategory();", "title": "" }, { "docid": "34b48a710da8cf942daa2072f1dff741", "score": "0.5264912", "text": "public function categories()\n {\n return $this->hasMany(Category::class);\n }", "title": "" }, { "docid": "e13deb18fd9e260e586b5e4af9282992", "score": "0.52576363", "text": "abstract protected function form_icon();", "title": "" }, { "docid": "00ec362a4ac266ce47e548f0abe16eeb", "score": "0.5256574", "text": "public function index()\n\t{\n\n $this->data['icon'] = $this->model_category->getAllIcon();\n\t\t$this->render_template('kategori/index', $this->data);\n\t}", "title": "" }, { "docid": "b9abca39f7ab0b0b253dcbab21338841", "score": "0.5254902", "text": "public function getAllCategories();", "title": "" }, { "docid": "d145ab703f5a38f54c394762dfc8de10", "score": "0.5250621", "text": "public function index()\n {\n $categories = Category::all();\n foreach ($categories as $category) {\n if ($category->is_cover)\n {\n $category->cover = asset(Storage::url($category->cover));\n $category->icon = asset(Storage::url($category->icon));\n }\n else\n {\n $category->cover = asset($category->cover);\n $category->icon = asset($category->icon);\n }\n }\n return $categories;\n }", "title": "" }, { "docid": "55af93267d507aded07999a5bc983b98", "score": "0.52478975", "text": "public function category() {\n // Qui mettiamo belongTo perchè è qui che si trova la foreign key\n $this->belongsTo(Category::class);\n }", "title": "" }, { "docid": "0a682330efb9fcb74a6840397dff5154", "score": "0.52422357", "text": "public function get_categories() {\n return [ 'Alita-elements' ];\n }", "title": "" }, { "docid": "f8bc70cd6c87f58fbbff151ccd8ffc82", "score": "0.5232032", "text": "public function getCategoryAssembler();", "title": "" }, { "docid": "753bc0d63c93f1fa4f7fdbec083a4273", "score": "0.52305245", "text": "public function get_icon() {\n return 'fa fa-plug';\n }", "title": "" }, { "docid": "9d7e1acfcaa016b56415badeec9bf916", "score": "0.5189614", "text": "public function category()\n {\n return $this->belongsTo('App\\Models\\osclass\\Category', 'fk_i_category_id');\n }", "title": "" }, { "docid": "0012ecc64e0827f610532245b1fcd36c", "score": "0.51801306", "text": "public function getCategoryIconUrl($category)\n {\n return $this->url->getCategoryIconUrl($category);\n }", "title": "" }, { "docid": "6f784ca0eae0f226e7a9eea4cefb3139", "score": "0.51726586", "text": "public function loadCategories () {\n\t\tif ($xrefs = FilesCategories::where(['file_id' => $this->id])->get()) {\n\t\t\tforeach (array_keys($xrefs) as $category_id) { //loop to use the cache in Category::find\n\t\t\t\tif ($category = Category::find($category_id)) {\n\t\t\t\t\t$this->addCategory($category);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9725ca84d01211d3fb67f8f231b5321c", "score": "0.5172581", "text": "public function getIconAttribute()\n {\n switch ($this->type) {\n case TypeGuesser::TYPE_GROUP:\n return 'fas fa-users';\n case TypeGuesser::TYPE_CONTAINER:\n return 'far fa-folder';\n case TypeGuesser::TYPE_USER:\n return 'far fa-user';\n case 'domain':\n return '';\n }\n }", "title": "" }, { "docid": "ec61afdc1bba0a9c253dcf952ca6682c", "score": "0.51671267", "text": "public function deleteIconAction()\n {\n\t\t//SET LAYOUT\n\t\t$this->_helper->layout->setLayout('admin-simple');\n\n\t\t//GET CATEGORY ID\n\t\t$this->view->category_id = $category_id = $this->_getParam('category_id');\n\n\t\t//GET CATEGORY ITEM\n\t\t$category = Engine_Api::_()->getItem('sitegroup_category', $category_id);\n\n\t\t$this->view->close_smoothbox = 0;\n\n\t\tif( $this->getRequest()->isPost() && !empty($category->file_id)){\n\n\t\t\t//DELETE CATEGORY ICON\n\t\t\t$file = Engine_Api::_()->getItem('storage_file', $category->file_id);\n\t\t\t$file->delete();\n\n\t\t\t//UPDATE FILE ID IN CATEGORY TABLE\n\t\t\t$category->file_id = 0;\n\t\t\t$category->save();\n\n\t\t\t$this->view->close_smoothbox = 1;\n \t}\n\t\t$this->renderScript('admin-settings/delete-icon.tpl');\n\t}", "title": "" }, { "docid": "c75fc99c6bacc2d261f5dbb7066ccbd0", "score": "0.5147365", "text": "public function categoryTranslations()\n {\n return $this->hasMany('App\\AccessbltyCatTranslation');\n }", "title": "" }, { "docid": "1ce6ed0c88be8f95da3d620a88e1d72f", "score": "0.514717", "text": "public function get_categories() {\n\n (new MidrubBaseUserAppsCollectionStorageHelpers\\Categories)->get_categories();\n \n }", "title": "" }, { "docid": "a181edf515d1dfd1ad2c94897d34f60a", "score": "0.51444685", "text": "public function getIconButtons() {\n $buttons = [];\n $current = '';\n foreach ($this->getIconList() as $name) {\n foreach ($this->sets as $set) {\n if(!($set == 'line-white' || $set == 'experimental-white')){\n if (strpos($name, \"icon-$set-\") !== FALSE) {\n if ($current != $set) {\n $buttons[$set][] = \"<h5>\" . (string) $set . \"</h5>\";\n $current = $set;\n }\n $buttons[$set][] = \"<button class='jcc-courtyard-icons__button' data-icon-name='$name'>\n <svg role='img' aria-label='$name'>\n <use xlink:href='/$this->iconsPath#$name'></use>\n </svg>\n </button>\";\n }\n }\n }\n }\n\n foreach ($buttons as $group) {\n $groups[] = implode(' ', $group);\n }\n\n if (!empty($buttons)) {\n return \"<div class='jcc-courtyard-icons'>\" . implode(' ', $groups) . \"</div>\";\n }\n else {\n return '<h3>' . $this->t('Icons Not Configured') . '</h3>\n <p>' .\n $this->t('See <a href=\"/admin/config/system/jcc-courtyard-icons\">JCC Courtyard Icons settings</a>') . '\n </p>\n ';\n }\n }", "title": "" }, { "docid": "e75c7ee6c6a8bc4a0f3aeeab9422e9d4", "score": "0.51377934", "text": "abstract public function category();", "title": "" }, { "docid": "6eb25301405aa4c9b6600ce8c7d7733a", "score": "0.5133415", "text": "public function categorias(){\n return $this->hasMany(Categoria::class,'tipo_categorias','id');\n }", "title": "" }, { "docid": "fec4b9ff4aaef90831a466609657a291", "score": "0.5128847", "text": "public function get_icon()\n {\n return 'fa fa-blog';\n }", "title": "" }, { "docid": "d031997c22dbc525e2d80294ac40849d", "score": "0.51279217", "text": "public function categories() {\n\t\treturn $this->belongsToMany('Category', 'pm_categories', 'pm', 'category');\n\t}", "title": "" }, { "docid": "9f1fc585b86a1b46f435e8a21057e568", "score": "0.5127866", "text": "public function getCategoryRepository();", "title": "" }, { "docid": "a2a9acf0c32d59b6a275cd96ee13d066", "score": "0.5127077", "text": "public function getIcons()\n {\n // Initialise:\n \n $icons = [];\n \n // Iterate Grouped Icons:\n \n foreach ($this->getGroupedIcons() as $name => $group) {\n \n foreach ($group as $id => $icon) {\n \n if (!isset($icons[$id])) {\n $icons[$id] = isset($icon['name']) ? $icon['name'] : $id;\n }\n \n }\n \n }\n \n // Sort Icons by Key:\n \n ksort($icons);\n \n // Answer Icons:\n \n return $icons;\n }", "title": "" }, { "docid": "c283edd39d9a923ba0129480aee48c6f", "score": "0.51217824", "text": "public function store(Request $request)\n {\n $category = new Category();\n $category->name = $request->input('category_name');\n $category->icon = \"\";\n $category->user_id = 0;\n if($category->save()){\n\n $photo = $request->file('category_icon');\n if($photo != null){\n $ext = $photo->getClientOriginalExtension();\n $filename = rand() . '.'. $ext;\n if($ext == 'jpg' || $ext == 'png'){\n if($photo->move(public_path(), $filename)){\n $category = Category::find($category->id);\n $category->icon = url('/') . '/' . $filename;\n $category->save();\n }\n }\n }\n\n return redirect()->back()->with('success', 'Category saved!');\n\n }\n else{\n\n return redirect()->back()->with('failed', 'Could not save Category');\n }\n }", "title": "" }, { "docid": "6ce8ff44e4732099516c62d39d252886", "score": "0.5111922", "text": "public function getCategories()\n {\n return $this->hasMany(Category::class, ['typeId' => 'id']);\n }", "title": "" }, { "docid": "044fda5ed84e1b72e6a1c537b9bf44fe", "score": "0.51096714", "text": "public function getGroupedIcons()\n {\n // Answer Cached Icons (if available):\n \n if ($icons = self::cache()->get($this->getCacheKey())) {\n return $icons;\n }\n \n // Initialise:\n \n $icons = [];\n \n // Parse Icon Source Data:\n \n $data = Yaml::parse($this->getSourceData());\n \n // Build Icon Groups:\n \n if (isset($data['icons'])) {\n \n foreach ($data['icons'] as $icon) {\n \n foreach ($icon['categories'] as $category) {\n \n // Create Category Array:\n \n if (!isset($icons[$category])) {\n $icons[$category] = [];\n }\n \n // Create Icon Element:\n \n $icons[$category][$icon['id']] = [\n 'name' => $icon['name'],\n 'unicode' => $icon['unicode']\n ];\n \n }\n \n }\n \n }\n \n // Sort Icons by Group:\n \n ksort($icons);\n \n // Sort Icon Groups by Name:\n \n foreach ($icons as &$group) {\n uasort($group, function ($a, $b) {\n return strcasecmp($a['name'], $b['name']);\n });\n }\n \n // Store Icons in Cache:\n \n self::cache()->set($this->getCacheKey(), $icons);\n \n // Answer Grouped Icons:\n \n return $icons;\n }", "title": "" }, { "docid": "db114932dfe87b50ca829dc314bbd717", "score": "0.5108978", "text": "public function getCategories_image_url()\n {\n return $this->categories_image_url;\n }", "title": "" }, { "docid": "98e88ea1fd831855ca9b360a79e3a902", "score": "0.5104462", "text": "public function category()\n {\n return $this->belongsTo('multiventas\\Models\\Categoria','category_id');\n }", "title": "" }, { "docid": "7ce970fae6ef3b117c97cc223a6f5e2e", "score": "0.5104212", "text": "public function imagenes()\n {\n return $this->hasMany('marygastro\\Modules\\Noticias\\Models\\Imagenes');\n }", "title": "" }, { "docid": "815d270b8d6bc65798d08df6e0d261bb", "score": "0.5101439", "text": "public function getIconAttribute()\n\t{\n\t\tswitch ($this->extension) {\n\t\t\tcase 'crt':\n\t\t\tcase 'csr':\n\t\t\tcase 'key':\n\t\t\tcase 'pem':\n\t\t\tcase 'pgp':\n\t\t\t\treturn 'certificate';\n\n\t\t\tcase 'bz2':\n\t\t\tcase 'gz':\n\t\t\tcase 'tar':\n\t\t\tcase 'z':\n\t\t\tcase 'zip':\n\t\t\t\treturn 'compressed';\n\n\t\t\tcase 'gif':\n\t\t\tcase 'jpeg':\n\t\t\tcase 'jpg':\n\t\t\tcase 'png':\n\t\t\tcase 'tif':\n\t\t\tcase 'tiff':\n\t\t\t\treturn 'picture';\n\n\t\t\tcase 'aif':\n\t\t\tcase 'aiff':\n\t\t\tcase 'flac':\n\t\t\tcase 'm4a':\n\t\t\tcase 'mp3':\n\t\t\tcase 'ogg':\n\t\t\tcase 'wav':\n\t\t\t\treturn 'music';\n\n\t\t\tcase 'markdown':\n\t\t\tcase 'md':\n\t\t\tcase 'doc':\n\t\t\tcase 'txt':\n\t\t\t\treturn 'file';\n\t\t}\n\n\t\tif ($mime = $this->type) {\n\t\t\tlist($category, $type) = explode('/', $mime, 2);\n\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'x-whatever':\n\t\t\t\t\treturn 'paperclip';\n\t\t\t}\n\n\t\t\tswitch ($category) {\n\t\t\t\tcase 'audio':\n\t\t\t\t\treturn 'music';\n\n\t\t\t\tcase 'image':\n\t\t\t\t\treturn 'picture';\n\n\t\t\t\tcase 'text':\n\t\t\t\t\treturn 'file';\n\t\t\t}\n\t\t}\n\n\t\treturn 'paperclip';\n\t}", "title": "" }, { "docid": "2a4489182063db63f073e28d0620a2f9", "score": "0.50997645", "text": "public function getCategorie();", "title": "" }, { "docid": "3cd35dc8d554f55113c8fc780f95d456", "score": "0.50967604", "text": "public function run()\n {\n\n $icon_ids = [];\n\n \\App\\Models\\ResourceQiniu::where('key','like','seeder/icon/%')->get()->each(function ($model,$index)use(&$icon_ids){\n $icon_ids[] = $model->resource->id;\n });\n\n $categories = factory(\\App\\Models\\Category::class)->times(count($icon_ids))->make();\n\n\n foreach ($icon_ids as $k => $id){\n $categories[$k]->icon_id = $id;\n $categories[$k]->save();\n }\n\n }", "title": "" }, { "docid": "c90165cdfb3328312232201026edbd43", "score": "0.50937754", "text": "function wptp_add_categories_to_attachments() {\n\t register_taxonomy_for_object_type( 'post_tag', 'attachment' );\n\t}", "title": "" }, { "docid": "a642cda8de05ff2464dc6f3ebd7602a9", "score": "0.50911367", "text": "public function getIcons()\n {\n return array(\n 'icon-active',\n 'icon-add',\n 'icon-assessments',\n 'icon-browse',\n 'icon-conditions',\n 'icon-copy',\n 'icon-cpdb',\n 'icon-databack',\n 'icon-databegin',\n 'icon-dataend',\n 'icon-dataforward',\n 'icon-defaultanswers',\n 'icon-do',\n 'icon-edit',\n 'icon-emailtemplates',\n 'icon-expired',\n 'icon-export',\n 'icon-exportcsv',\n 'icon-exportr',\n 'icon-exportspss',\n 'icon-exportvv',\n 'icon-expression',\n 'icon-expressionmanagercheck',\n 'icon-global',\n 'icon-import',\n 'icon-importcsv',\n 'icon-importldap',\n 'icon-importvv',\n 'icon-inactive',\n 'icon-invite',\n 'icon-label',\n 'icon-labels',\n 'icon-list',\n 'icon-logout',\n 'icon-maximize',\n 'icon-minimize',\n 'icon-organize',\n 'icon-quota',\n 'icon-remind',\n 'icon-renumber',\n 'icon-resetsurveylogic',\n 'icon-responses',\n 'icon-saved',\n 'icon-security',\n 'icon-settings',\n 'icon-shield',\n 'icon-superadmin',\n 'icon-survey',\n 'icon-takeownership',\n 'icon-template',\n 'icon-templatepermissions',\n 'icon-templates',\n 'icon-tools',\n 'icon-user',\n 'icon-usergroup',\n 'icon-viewlast'\n );\n }", "title": "" }, { "docid": "eb1bb8e4244d4a5806177ade1abbecba", "score": "0.50905454", "text": "Public function editIconAction()\n\t{\n\t\t//SET LAYOUT\n\t\t$this->_helper->layout->setLayout('admin-simple');\n\n\t\t//GET CATEGORY ID\n\t\t$this->view->category_id = $category_id = $this->_getParam('category_id');\n\n\t\t//GET CATEGORY ITEM\n\t\t$category = Engine_Api::_()->getItem('sitegroup_category', $category_id);\n\n //CREATE FORM\n $this->view->form = $form = new Sitegroup_Form_Admin_Settings_Editicon();\n\n\t\t$this->view->close_smoothbox = 0;\n\n if( !$this->getRequest()->isPost() ) {\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n return;\n }\n\n\t\t//UPLOAD PHOTO\n\t\tif( isset($_FILES['photo']) && is_uploaded_file($_FILES['photo']['tmp_name']) )\n\t\t{\n\t\t\t//UPLOAD PHOTO\n\t\t\t$photoFile = $category->setPhoto($_FILES['photo']);\n\n\t\t\t//UPDATE FILE ID IN CATEGORY TABLE\n\t\t\tif(!empty($photoFile->file_id)) {\n\t\t\t\t$previous_file_id = $category->file_id;\n\t\t\t\t$category->file_id = $photoFile->file_id;\n\t\t\t\t$category->save();\n\t\t\t\n\t\t\t\t//DELETE PREVIOUS CATEGORY ICON\n\t\t\t\t$file = Engine_Api::_()->getItem('storage_file', $previous_file_id);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t$this->view->close_smoothbox = 1;\n\t}", "title": "" }, { "docid": "567a3510cd61b645e36338fa3161f018", "score": "0.508798", "text": "function IconCount() { return 1;}", "title": "" }, { "docid": "005f2d171688b9439f2d7ec4324fe789", "score": "0.5085698", "text": "public function resources()\n {\n // Resource possui várias categorias\n return $this->belongsToMany('App\\Resource', 'resources_categories');\n }", "title": "" }, { "docid": "49d47bcf473cb1589209d879b8d68cab", "score": "0.50810796", "text": "public function getIconList() {\n if (!empty($this->iconList)) {\n return $this->iconList;\n }\n\n if (file_exists($this->iconsPath)) {\n $file = file_get_contents($this->iconsPath);\n preg_match_all('/id=\"([a-z]|-)*\"/', $file, $matches);\n foreach ($matches[0] as $id) {\n preg_match('/(?<=\")[^\"]+(?=\")/', $id, $match);\n $name = $match[0];\n $this->iconList[$name] = $name;\n }\n }\n else {\n $this->iconList = [];\n }\n\n return $this->iconList;\n }", "title": "" }, { "docid": "d4085c914918eef5cc3f7c25b7e225b9", "score": "0.50780225", "text": "function PMicon($row,$a,$c,$nextCount,$exp)\t{\n\n\t\t$renderElement = $nextCount ? ($exp?'treeMinusIcon':'treePlusIcon') : 'treeJoinIcon';\n\n\t\t$BTM = ($a==$c)?'Bottom':'';\n\t\t$icon=$this->cObj->IMAGE($this->conf['categoryTree.'][$renderElement.$BTM.'.']);\n\n\t\tif ($nextCount)\t{\n\t\t\t$cmd=$this->bank.'_'.($exp?'0_':'1_').$row['uid'].'_'.$this->treeName;\n\t\t\t$bMark=($this->bank.'_'.$row['uid']);\n\t\t\t$icon = $this->PM_ATagWrap($icon,$cmd,$bMark);\n\t\t}\n\n\t\treturn $icon;\n\t}", "title": "" }, { "docid": "ac4c93d8e458e765a446d96194a29280", "score": "0.5074563", "text": "public function categories() {\n\t\treturn $this->belongsTo('Category');\n\t}", "title": "" }, { "docid": "60ec4e679f592524dee262d6b0c2bf09", "score": "0.5072079", "text": "public function categoryOptions()\n {\n return $this->hasMany('App\\AccessbltyOpt');\n }", "title": "" }, { "docid": "2ed43633a0222f5cb93e3a48de17f46b", "score": "0.5069324", "text": "public function imagecategory(){\n return $this->belongsTo('App\\Models\\ImageCategory','image_category_id','id');\n }", "title": "" }, { "docid": "92fa2583c7b8b401f5fc70ee0704a056", "score": "0.5069225", "text": "public function categories(){\n return $this->belongsTo('Category');\n }", "title": "" }, { "docid": "4a5b651b817c85cede79c4723201bbd0", "score": "0.5062484", "text": "public function Item()\n {\n return $this->hasMany(Item::class, 'id_categories', 'id');\n }", "title": "" }, { "docid": "ab5fd5244c80208cbc2a7b1a6f687fb9", "score": "0.5059453", "text": "function getIconArray(){\n\t$result = $this->getIcons();\n\t\n\t$arr = $this->resultSetToArray($result);\n\t\n\treturn $arr;\n\t\n}", "title": "" } ]
21d4f9d1973dbaf8708b5af0b1ca6915
=========================================================================== Name: tagEntry ===========================================================================
[ { "docid": "6b5b4b75b5b8c968dde555305c54d727", "score": "0.66766924", "text": "function tagEntry($tag, $noClass=false, $app='all', $section='') {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<a <if test=\"noClass:|:!$noClass\">class='ipsTag'</if> href=\"{parse url=\"app=core&amp;module=search&amp;do=search&amp;search_tags={parse expression=\"IPSText::urlencode_furlSafe($tag)\"}&amp;search_app=<if test=\"inSearch:|:isset($this->request['search_app']) AND $this->request['search_app']\">{$this->request['search_app']}<else />{$app}</if><if test=\"hasSearchSection:|:$section\">&amp;search_app_filters[<if test=\"inSearchSub:|:isset($this->request['search_app']) AND $this->request['search_app']\">{$this->request['search_app']}<else />{$app}</if>][searchInKey]={$section}</if>\" base=\"public\" template=\"tags\" seotitle=\"false\"}\" data-tooltip=\"{parse expression=\"sprintf( $this->lang->words['find_more_tags'], $tag )\"}\"><span>{$tag}</span></a>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" } ]
[ { "docid": "128e96e6712f88b863572ba9e0f49eba", "score": "0.68474394", "text": "public function getTaggedEntry()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "aadd13c1392d8b7c7c477c65e56ad361", "score": "0.6352499", "text": "function conanMD_entry_tags() {\n\t$posttags = get_the_tags();\n\tif ($posttags) {\n\t\tprintf( '<div class=\"tags-links\"><span class=\"screen-reader-text\">%s</span>', __( 'Tags', 'ConanMD' ) );\n\t\tforeach ( $posttags as $tag ) {\n\t\t\techo '<a class=\"entry-tag-item\" href=\"' . esc_url( get_category_link( $tag->term_id ) ) . '\">\n\t\t\t\t \t<span class=\"mdl-chip\">\n\t\t\t\t\t <span class=\"mdl-chip__text\">' . esc_html( $tag->name ) . '</span>\n\t\t\t\t\t</span>\n\t\t\t\t</a>';\n\t\t}\n\t\tprintf( '</div>' );\n\t}\n}", "title": "" }, { "docid": "0cd35cd4dd8da5ce833c1769bad13828", "score": "0.6297994", "text": "public function tag () {\r\n\t \r\n }", "title": "" }, { "docid": "f24926288b593eae0df4b1f9ac93ec49", "score": "0.6264196", "text": "public function setTaggedEntry($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DataCatalog\\V1\\TaggedEntry::class);\n $this->writeOneof(1, $var);\n\n return $this;\n }", "title": "" }, { "docid": "46c4dfd9f5bfa598fe9f0d769b6a7fe3", "score": "0.61606777", "text": "function tag_instruction_entry($parser, $target, $data)\n {\n \t if(!array_key_exists($this->idx, $this->INSTR))$this->INSTR[$this->idx] = array();\n \t array_push($this->INSTR[$this->idx],array('target'=>$target, 'data'=>$data));\n\n }", "title": "" }, { "docid": "701a67d58234d5114f07e2da83e614f9", "score": "0.607513", "text": "public function Create_Entry_Tag($data) {\n\t\tglobal $wpdb; \n // If no uuid, create one\n if (!isset($data['uuid'])) { $data['uuid'] = uniqid(); }\n // Submission table name (including wp prefix)\n $entries_tags_table = $this->Get_Entries_Tags_Table(); \n // Insert the new entry\n $wpdb->insert($entries_tags_table, $data);\n }", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.59956646", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.59956646", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.59956646", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.59956646", "text": "public function getTag();", "title": "" }, { "docid": "70f3e52d168ea14ee47282c50176b063", "score": "0.5969495", "text": "public function get_tag();", "title": "" }, { "docid": "5e66c601b133116a70bac345a53ee353", "score": "0.5924822", "text": "public static function tag (&$parser, $data = '', $type = '', $offset = 0, $entry = '')\n\t{\n\t\tif ($entry == '')\n\t\t\t$entry = $type;\n\t\t$tags = self::getTags($data, $type);\n\t\tforeach ($tags as &$tag)\n\t\t{\n\t\t\tif ($offset >= count($tag))\n\t\t\t\tcontinue;\n\t\t\tif ($tag[$offset] == $entry)\n\t\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "dcfeeee1fb5c355c89b70def55bed281", "score": "0.5900814", "text": "public static function tagged($tag)\n {\n }", "title": "" }, { "docid": "74dd8a78af8322ef6a1af17438481640", "score": "0.58896804", "text": "public function tag($tag);", "title": "" }, { "docid": "b2b7e593885a330217f989688307947e", "score": "0.58843577", "text": "public function entry() {\n return $this->add_child(\"Atom_Entry\", \"entry\");\n }", "title": "" }, { "docid": "472145fbd279d37e1fb60457fc9f16f5", "score": "0.5830571", "text": "public function getEntry();", "title": "" }, { "docid": "1f1da0fb81344ca32e76a56f4f8c4e3d", "score": "0.58215946", "text": "protected function get_tag() {\n\t\treturn self::TAG;\n\t}", "title": "" }, { "docid": "b4aa8783ce153ff688b51e00f7c5e155", "score": "0.5773632", "text": "abstract public function getTag();", "title": "" }, { "docid": "80a13350b1fcf197c82d507c10f7f25c", "score": "0.57388103", "text": "private function tag()\n\t{\n\t\t$this->getTagItems(true);\n\n\t\t// Set the flag for sending feed links to head\n\t\t$this->feedLinkToHead = $this->params->get('tagFeedLink');\n\n\t\t// Set metadata\n\t\t$this->setMetadata($this->tag);\n\n\t\t// Set the layout\n\t\t$this->setLayout('tag');\n\n\t}", "title": "" }, { "docid": "ea7e67825342ca366418507f7c59c78c", "score": "0.5703159", "text": "public function Select_Entry_Tag($entry_id,$tag_code) {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entries_tags_table = $this->Get_Entries_Tags_Table();\n // The primary select statement\n $sql_string = \"SELECT * FROM $entries_tags_table AS Tag WHERE Tag.entry_id = %d AND Tag.tag_code = %s;\";\n // Populate the prepare values\n $sql_prepare[] = $entry_id;\n $sql_prepare[] = $tag_code;\n // Retrieve the results\n $tags = $wpdb->get_results($wpdb->prepare($sql_string,$sql_prepare));\n // Retrieve a list of all the published vv forms\n return $tags[0];\n }", "title": "" }, { "docid": "ea7160c8b9c4fd56f887ce5f0ef5a0d9", "score": "0.5641748", "text": "public function handleTagStart() {}", "title": "" }, { "docid": "9d1ef1c8bf9b141fc81ccd35f4bae435", "score": "0.56102824", "text": "function plugin_tag_admin(&$tagdb, &$entry) {\n\t\t$this->tagdb=&$tagdb;\n\t\t$this->entry=&$entry;\n\t\tadd_filter('publish_post', array(&$this, 'entry_save'), 5, 2);\n\t\tadd_filter('delete_post', array(&$this, 'entry_delete'));\n\t\tadd_filter('wp_footer', array(&$this, 'purge_cache'));\n\n\t\tif(!defined('MOD_ADMIN_PANEL') && version_compare(SYSTEM_VER, '0.1010', '>=')==1) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_filter('simple_edit_form', array(&$this, 'simple'));\n\t\tadd_filter('admin_entry_write_onsave', array(&$this, 'simpleadd'));\n\t\tadd_filter('admin_entry_write_onsavecontinue', array(&$this, 'simpleadd'));\n\t\tadd_filter('admin_entry_write_main', array(&$this, 'simpleremove'));\n\t\tadd_filter('admin_entry_write_onsubmit', array(&$this, 'simpleremove'));\n\t\tadd_action('wp_head', array(&$this, 'simplestyle'), 5);\n\t\tadd_action('init', array(&$this, 'simpleajax'));\n\t}", "title": "" }, { "docid": "e59295fb9def5b995af72f217beab4f7", "score": "0.55912256", "text": "function getTag()\r\n {\r\n return $this->_tag;\r\n }", "title": "" }, { "docid": "ff73b09a227a9b16d2a94a3ee7117de7", "score": "0.5590073", "text": "abstract protected function getItemTag();", "title": "" }, { "docid": "01e3341ac1adca738f6a5d9f0122f23d", "score": "0.5576908", "text": "function _openTag(&$tag) {\r\n $name = $tag->getTagName();\r\n if (! in_array($name, array_keys($this->_tags))) {\r\n $this->_tags[$name] = array();\r\n }\r\n array_push($this->_tags[$name], $tag);\r\n }", "title": "" }, { "docid": "9ead2ecc344b4ca0212b3143573b0457", "score": "0.5551879", "text": "public abstract static function getTag();", "title": "" }, { "docid": "1e9797d227b1d4fcfcbb9f2835e2208a", "score": "0.5534468", "text": "function sTag($tag = null) {\n $tag = array();\n $tag['Tag']['tag'] = \"gi22\";\n \t$this->autoRender=false;\n //$this->SearchIndex->create();\n //$this->Tag->Setup();\n $this->Tag->create();\n $this->Tag->save($tag, array('validate' => 'false'));\n \n return $this->Tag->id; \n }", "title": "" }, { "docid": "fa3e2f2e7ff79a9f61a6b58685a4ed16", "score": "0.5526126", "text": "public function Select_Entry_Tags($entry_id) {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entries_tags_table = $this->Get_Entries_Tags_Table();\n // The primary select statement\n $sql_string = \"SELECT * FROM $entries_tags_table AS Tag WHERE Tag.entry_id = %d;\";\n // Populate the prepare values\n $sql_prepare[] = $entry_id;\n // Retrieve the results\n $tags = $wpdb->get_results($wpdb->prepare($sql_string,$sql_prepare));\n // Retrieve a list of all the published vv forms\n return $tags;\n }", "title": "" }, { "docid": "a8f7b6f2b025686294b29561e6bf6c83", "score": "0.54948866", "text": "function basalstyle_entry_meta() {\n\n $format = get_post_format();\n if ( current_theme_supports( 'post-formats', $format ) ) {\n printf(\n '<span class=\"entry-format\">%1$s<a href=\"%2$s\">%3$s</a></span>',\n sprintf( '<span class=\"screen-reader-text\">%s </span>', _x( 'Format', 'Used before post format.', 'twentytwenty' ) ),\n esc_url( get_post_format_link( $format ) ),\n get_post_format_string( $format )\n );\n }\n\n if ( 'post' === get_post_type() ) {\n printf(\n '<p class=\"entry-tags\">%1$s</p>',\n basalstyle_entry_tags()\n );\n }\n\n }", "title": "" }, { "docid": "ecc82514fe7a6c9954a31542dfac7c0d", "score": "0.5481529", "text": "public function taggedAs();", "title": "" }, { "docid": "09f86ab6e4f422e2f9faecdb74c78a1d", "score": "0.5461103", "text": "function entry_delete($id) {\n\t\t# D'oh! We need to find in the database because entry doesn't exist anymore!\n\t\t# So ugly function, a linear parse of all tags! Oh my...\n\t\t$lister=new tag_lister();\n\t\t$list=$lister->_list;\n\t\tif(!count($list)) {\n\t\t\t# There is no tag, let's stop here\n\t\t\treturn true;\n\t\t}\n\n\t\t# Very similar to entry_save\n\t\tforeach($list as $file) {\n\t\t\t$f=$this->tagdb->open_file($file);\n\t\t\tif(!count($f)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach($f as $tag=>$entries) {\n\t\t\t\t$k=array_keys($entries, $id);\n\t\t\t\tif(@isset($entries[$k[0]])) {\n\t\t\t\t\tunset($this->tagdb->files[$file][$tag][$k[0]]);\n\t\t\t\t}\n\t\t\t\tif(count($this->tagdb->files[$file][$tag])==0) {\n\t\t\t\t\tunset($this->tagdb->files[$file][$tag]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->tagdb->save_all();\n\n\t\tif($this->use_rewrite) {\n\t\t\t$this->tagdb->rewriteCache(true);\n\t\t}\n\n\t\t# See at lines 127-128\n\t\tif(file_exists(CACHE_DIR.'tag-widget.tmp')) {\n\t\t\t@unlink(CACHE_DIR.'tag-widget.tmp');\n\t\t}\n\t\t$remover=new tag_relted_remover();\n\t\t$remover->getList();\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "27845c1333605110cd92035494635f27", "score": "0.54474074", "text": "protected abstract function new_entry();", "title": "" }, { "docid": "7ec6f98d069fa9dbcb7e60b113334347", "score": "0.54402876", "text": "public function addEntry( $tag, $data )\n {\n $this->counter++;\n $percentage = $this->counter / $this->max * 100;\n\n $this->outputHandler->outputLine(\n sprintf(\n $this->options['formatString'],\n $percentage,\n $tag,\n $data\n )\n );\n }", "title": "" }, { "docid": "fdec3c9ad1170cae8eba6a388583f6b3", "score": "0.54398847", "text": "public function getEntry()\n {\n return $this->entry;\n }", "title": "" }, { "docid": "fdec3c9ad1170cae8eba6a388583f6b3", "score": "0.54398847", "text": "public function getEntry()\n {\n return $this->entry;\n }", "title": "" }, { "docid": "fdec3c9ad1170cae8eba6a388583f6b3", "score": "0.54398847", "text": "public function getEntry()\n {\n return $this->entry;\n }", "title": "" }, { "docid": "fdec3c9ad1170cae8eba6a388583f6b3", "score": "0.54398847", "text": "public function getEntry()\n {\n return $this->entry;\n }", "title": "" }, { "docid": "0d298daff33f3eb4223a319e0c149f6c", "score": "0.5419645", "text": "function getTagline() {\n\t\treturn $this->row['data']['tagline'];\n\t}", "title": "" }, { "docid": "1acfb5e808045a2eb08947aa5029dc34", "score": "0.5408397", "text": "function simpleadd() {\n\t\tif(empty($_POST['taginput'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$tags=$_POST['taginput'];\n\t\tif(substr($tags, -1)==',') {\n\t\t\t$tags=substr($tags, 0, -1);\n\t\t}\n\t\t$tags=explode(',', $tags);\n\t\t$tags=array_filter($tags);\n\n\t\t$cont=$_POST['content'];\n\t\t$cont=$this->entry->tag_list($cont);\n\t\t$tags=array_merge($tags, $this->entry->tags);\n\t\t$tags=array_map('trim', $tags);\n\t\t$tags=array_unique($tags);\n\n\t\t$tags=implode(', ', $tags);\n\t\t$cont=trim($cont);\n\t\t$cont.=\"\\n[tag]{$tags}[/tag]\";\n\n\t\t$_POST['content']=$cont;\n\t}", "title": "" }, { "docid": "6060dabf68fcc4f3fb1d076c43cca474", "score": "0.53550065", "text": "abstract protected function _add_entry($title, $description, $author, $link, $updated);", "title": "" }, { "docid": "5b9fc64dd658e6eff761b97038a20561", "score": "0.5345267", "text": "public function getTag()\n {\n return $this->Tag;\n }", "title": "" }, { "docid": "0e8cf4e793dfd8a6e011971c402ad9c9", "score": "0.5339192", "text": "abstract protected function getTags();", "title": "" }, { "docid": "fa1dc162a6e4b7e81d1e11d477190e15", "score": "0.53286606", "text": "public function Delete_Entry_Tag($data) {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entries_tags_table = $this->Get_Entries_Tags_Table(); \n // Insert the new entry\n $wpdb->delete($entries_tags_table, $data);\n }", "title": "" }, { "docid": "7d5931fbba4b825714745d10ae1b5fd3", "score": "0.5321317", "text": "public static function tagentry (&$parser, $data = '', $type = '', $num = 0, $offset = 0, $notfound = 'not found'/*, ...*/)\n\t{\n\t\t$numcaps = func_num_args() - 6;\n\t\t$tags = self::getTags($data, $type);\n\t\tif (count($tags) == 0)\n\t\t\treturn $notfound;\n\t\tif ($num < 0)\n\t\t\t$num += count($tags);\n\t\tif (($num < 0) || ($num >= count($tags)))\n\t\t\treturn $notfound;\n\t\tforeach ($tags as &$tag)\n\t\t{\n\t\t\tif ($offset >= count($tag))\n\t\t\t\tcontinue;\n\t\t\t$match = true;\n\t\t\tfor ($i = 0; $i < $numcaps; $i++)\n\t\t\t{\n\t\t\t\t$parm = func_get_arg($i + 5);\n\t\t\t\tlist($checkoffset, $checkval) = explode(':', $parm);\n\t\t\t\tif (($checkoffset >= count($tag)) || ($tag[$checkoffset] != $checkval))\n\t\t\t\t{\n\t\t\t\t\t$match = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$match)\n\t\t\t\tcontinue;\n\t\t\tif ($num)\n\t\t\t{\n\t\t\t\t$num--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$range = explode(':', $offset);\n\t\t\tif (count($range) == 1)\n\t\t\t\treturn $tag[$offset];\n\t\t\telse\n\t\t\t{\n\t\t\t\t$out = array();\n\t\t\t\tfor ($i = $range[0]; $i <= $range[1]; $i++)\n\t\t\t\t\t$out[] = $tag[$i];\n\t\t\t\treturn implode(':', $out);\n\t\t\t}\n\t\t}\n\t\treturn $notfound;\n\t}", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.53083736", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.53083736", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "0b7eaeea3fba5a16573edd0e8f55339f", "score": "0.5299265", "text": "public function listTags()\n\t{\n\t\t// Most common tags. You can redefine this method by extending the class\n\t\t$getAll = array(\n\t\t\tarray('id' => 1, 'name' => 'Object type', 'tag' => '2#003'),\n\t\t\tarray('id' => 2, 'name' => 'Object attribute', 'tag' => '2#004'),\n\t\t\tarray('id' => 3, 'name' => 'Title', 'tag' => '2#005'),\n\t\t\tarray('id' => 4, 'name' => 'Edit status', 'tag' => '2#007'),\n\t\t\tarray('id' => 5, 'name' => 'Editorial update', 'tag' => '2#008'),\n\t\t\tarray('id' => 6, 'name' => 'Urgency', 'tag' => '2#010'),\n\t\t\tarray('id' => 7, 'name' => 'Subject reference', 'tag' => '2#012'),\n\t\t\tarray('id' => 8, 'name' => 'Category', 'tag' => '2#015'),\n\t\t\tarray('id' => 9, 'name' => 'Supplemental categories', 'tag' => '2#020'),\n\t\t\tarray('id' => 10, 'name' => 'Fixture identifier', 'tag' => '2#022'),\n\t\t\tarray('id' => 11, 'name' => 'Keywords', 'tag' => '2#025'),\n\t\t\tarray('id' => 12, 'name' => 'Location code', 'tag' => '2#026'),\n\t\t\tarray('id' => 13, 'name' => 'Location name', 'tag' => '2#027'),\n\t\t\tarray('id' => 14, 'name' => 'Release date', 'tag' => '2#030'),\n\t\t\tarray('id' => 15, 'name' => 'Release time', 'tag' => '2#035'),\n\t\t\tarray('id' => 16, 'name' => 'Expiration date', 'tag' => '2#037'),\n\t\t\tarray('id' => 17, 'name' => 'Expiration time', 'tag' => '2#038'),\n\t\t\tarray('id' => 18, 'name' => 'Instructions', 'tag' => '2#040'),\n\t\t\tarray('id' => 19, 'name' => 'Action advised', 'tag' => '2#042'),\n\t\t\tarray('id' => 20, 'name' => 'Reference service', 'tag' => '2#045'),\n\t\t\tarray('id' => 21, 'name' => 'Reference date', 'tag' => '2#047'),\n\t\t\tarray('id' => 22, 'name' => 'Reference number', 'tag' => '2#050'),\n\t\t\tarray('id' => 23, 'name' => 'Date created', 'tag' => '2#055'),\n\t\t\tarray('id' => 24, 'name' => 'Time created', 'tag' => '2#060'),\n\t\t\tarray('id' => 25, 'name' => 'Digital creation date', 'tag' => '2#062'),\n\t\t\tarray('id' => 26, 'name' => 'Digital creation time', 'tag' => '2#063'),\n\t\t\tarray('id' => 27, 'name' => 'Originating program', 'tag' => '2#065'),\n\t\t\tarray('id' => 28, 'name' => 'Program version', 'tag' => '2#070'),\n\t\t\tarray('id' => 29, 'name' => 'Object cycle', 'tag' => '2#075'),\n\t\t\tarray('id' => 30, 'name' => 'Author', 'tag' => '2#080'),\n\t\t\tarray('id' => 31, 'name' => 'AuthorsPosition', 'tag' => '2#085'),\n\t\t\tarray('id' => 32, 'name' => 'City', 'tag' => '2#090'),\n\t\t\tarray('id' => 33, 'name' => 'Sublocation', 'tag' => '2#092'),\n\t\t\tarray('id' => 34, 'name' => 'State/Province', 'tag' => '2#095'),\n\t\t\tarray('id' => 35, 'name' => 'Country code', 'tag' => '2#100'),\n\t\t\tarray('id' => 36, 'name' => 'Country', 'tag' => '2#101'),\n\t\t\tarray('id' => 37, 'name' => 'Transmission reference', 'tag' => '2#103'),\n\t\t\tarray('id' => 38, 'name' => 'Headline', 'tag' => '2#105'),\n\t\t\tarray('id' => 39, 'name' => 'Credit', 'tag' => '2#110'),\n\t\t\tarray('id' => 40, 'name' => 'Source', 'tag' => '2#115'),\n\t\t\tarray('id' => 41, 'name' => 'Copyright notice', 'tag' => '2#116'),\n\t\t\tarray('id' => 42, 'name' => 'Contact Information', 'tag' => '2#118'),\n\t\t\tarray('id' => 43, 'name' => 'Description', 'tag' => '2#120'),\n\t\t\tarray('id' => 44, 'name' => 'Description writer', 'tag' => '2#122'),\n\t\t\tarray('id' => 45, 'name' => 'Image type', 'tag' => '2#130'),\n\t\t\tarray('id' => 46, 'name' => 'Image orientation', 'tag' => '2#131'),\n\t\t\tarray('id' => 47, 'name' => 'Language identifier', 'tag' => '2#135'),\n\t\t\tarray('id' => 48, 'name' => 'AudioType', 'tag' => '2#150'),\n\t\t\tarray('id' => 49, 'name' => 'AUdio sampling rate', 'tag' => '2#151'),\n\t\t\tarray('id' => 50, 'name' => 'Audio sampling resolution', 'tag' => '2#152'),\n\t\t\tarray('id' => 51, 'name' => 'Audio duration', 'tag' => '2#153'),\n\t\t\tarray('id' => 52, 'name' => 'Audio outcue', 'tag' => '2#154'),\n\t\t\tarray('id' => 53, 'name' => 'Job ID', 'tag' => '2#184'),\n\t\t\tarray('id' => 54, 'name' => 'Master document ID', 'tag' => '2#185'),\n\t\t\tarray('id' => 55, 'name' => 'Short document ID', 'tag' => '2#186'),\n\t\t\tarray('id' => 56, 'name' => 'Unique document ID', 'tag' => '2#187'),\n\t\t\tarray('id' => 57, 'name' => 'Owner ID', 'tag' => '2#188'),\n\t\t\tarray('id' => 58, 'name' => 'Object preview file format', 'tag' => '2#200'),\n\t\t\tarray('id' => 59, 'name' => 'Object preview file version', 'tag' => '2#201'),\n\t\t\tarray('id' => 60, 'name' => 'Object preview data', 'tag' => '2#202'),\n\t\t\tarray('id' => 61, 'name' => 'Prefs', 'tag' => '2#221'),\n\t\t\tarray('id' => 62, 'name' => 'Classify state', 'tag' => '2#225'),\n\t\t\tarray('id' => 63, 'name' => 'Similarity index', 'tag' => '2#228'),\n\t\t\tarray('id' => 64, 'name' => 'Document notes', 'tag' => '2#230'),\n\t\t\tarray('id' => 65, 'name' => 'Document history', 'tag' => '2#231'),\n\t\t\tarray('id' => 66, 'name' => 'Exif camera info', 'tag' => '2#232'),\n\t\t\tarray('id' => 67, 'name' => 'Catalog sets', 'tag' => '2#255')\n\t\t);\n\t\t\n\t\tif (count($getAll) > 0)\n\t\t{\n\t\t\tforeach ($getAll as $tag)\n\t\t\t\t$this->listTags[$tag['id']] = $tag['tag'];\n\t\t}\n\t}", "title": "" }, { "docid": "42841dc0d38d60aaaa4ca63f752a4817", "score": "0.52943707", "text": "function tagTextEntryBox($tags, $options, $where) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n{parse js_module=\"tags\"}\n<input type=\"text\" class=\"input_text\" size=\"50\" value=\"\" name=\"{$options['fieldId']}\" id=\"{$options['fieldId']}\" <if test=\"isClosedField:|: ! $options['isOpenSystem']\">readonly=\"readonly\"</if> />\n<if test=\"canPrefix:|:$options['prefixesEnabled'] && !$this->memberData['gbw_disable_prefixes']\">\n\t&nbsp;&nbsp;<span class=\"desc lighter\"><input type=\"checkbox\" value=\"1\" name=\"{$options['fieldId']}_prefix\" id=\"{$options['fieldId']}_prefix\" <if test=\"prefixChecked:|:$tags['formatted']['prefix'] OR $this->request[ $options['fieldId'] . '_prefix' ]\">checked='checked'</if> /> {$this->lang->words['firsttagprefix']}</span>\n</if>\n<if test=\"!$options['minTags'] && $options['maxTags']\">\n\t<br /><span class='desc lighter'>{parse expression=\"sprintf( $this->lang->words['tags_max_no_min'], $options['maxTags'] )\"}</span>\n</if>\n<if test=\"$options['minTags'] && !$options['maxTags']\">\n\t<br /><span class='desc lighter'>{parse expression=\"sprintf( $this->lang->words['tags_min_no_max'], $options['minTags'] )\"}</span>\n</if>\n<if test=\"$options['minTags'] && $options['maxTags']\">\n\t<br /><span class='desc lighter'>{parse expression=\"sprintf( $this->lang->words['tags_max_and_min'], $options['minTags'], $options['maxTags'] )\"}</span>\n</if>\n<php>\n\t$options['lang']['tag_add_link']\t= $this->lang->words['add_a_tag'];\n\t$options['lang']['tip_text']\t\t= $this->lang->words['tag_tip'];\n\t$options['forceLowercase']\t\t\t= $this->settings['tags_force_lower'];\n\t$options['existingTags']\t\t\t= count($tags['tags']) ? $tags['tags'] : null;\n\t\n\t$_tmp = $options;\n\t\n\t/* Always return as UTF-8 */\n\t$jsonEncoded = IPSText::jsonEncodeForTemplate( $_tmp );\n</php>\n<script type=\"text/javascript\">\n\t$( \"{$options['fieldId']}\" ).tagify( {parse expression=\"$jsonEncoded\"} );\n</script>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "7d80b32e0ba031abf2a9809b0a9e0591", "score": "0.527023", "text": "function tags($key = null){\n\t\t\t//foreach ($tags as $tag){\n\t\t\t//\t$this->Product->Query(\"INSERT INTO groups set tag_id = {$tag['tags']['tag_id']}, main_menu = 1\");\n\t\t\t//\t//debug($tag['tags']);\n\t\t\t//}\n\t\t\t\n\t}", "title": "" }, { "docid": "6335f231967b0126d63bb2b0c2e0ff41", "score": "0.5263444", "text": "public function getTagline() {\n\t\treturn $this->_data['tagline'];\n\t}", "title": "" }, { "docid": "6335f231967b0126d63bb2b0c2e0ff41", "score": "0.5263444", "text": "public function getTagline() {\n\t\treturn $this->_data['tagline'];\n\t}", "title": "" }, { "docid": "7f592388e04c89e3b17bf1fb3fa580ff", "score": "0.52609825", "text": "function tag_selector ($tag) { return array(\"display\"=>$tag['tagname'],\"value\"=>$tag['tag_type_id']); }", "title": "" }, { "docid": "3130424652c7c28dca0cfd07d254cd66", "score": "0.52541214", "text": "function getTags();", "title": "" }, { "docid": "959e05205cf97f851558609db7732c2c", "score": "0.524006", "text": "function cyberchimps_post_tags()\n {\n global $post;\n\n if (is_single()) {\n $show = (cyberchimps_get_option('single_post_byline_tags', 1)) ? cyberchimps_get_option('single_post_byline_tags', 1) : false;\n } elseif (is_archive()) {\n $show = (cyberchimps_get_option('archive_post_byline_tags', 1)) ? cyberchimps_get_option('archive_post_byline_tags', 1) : false;\n } else {\n $show = (cyberchimps_get_option('post_byline_tags', 1)) ? cyberchimps_get_option('post_byline_tags', 1) : false;\n }\n if ($show):\n $tags_list = get_the_tag_list('', ', ');\n if ($tags_list) :\n $tags = sprintf(__('Tags: %s', 'primo'), $tags_list); ?>\n\t\t\t\t<span class=\"taglinks\">\n\t\t\t\t<?php echo apply_filters('cyberchimps_post_tags', $tags); ?>\n\t\t\t</span>\n\t\t\t\t<span class=\"sep\"> <?php echo apply_filters('cyberchimps_entry_meta_sep', '|'); ?> </span>\n\t\t\t<?php endif; // End if $tags_list\n endif;\n }", "title": "" }, { "docid": "ae2f980d84cbdadc64d4f0df194bacc1", "score": "0.5235396", "text": "private function processData ($entry,$label='')\n {\n foreach ($entry->attributes() AS $attr_name => $attr_value) {\n $temp_array[0][$attr_name] = (string)$attr_value;\n }\n /*** insert data ***/\n if ($label != 'acl') {\n $temp_array = $this->transformDate($temp_array);\n }\n foreach ($temp_array AS $this->temp_array) {\n if ($label != 'acl') {\n $this->executeDataInsert();\n } else if ($label == 'acl') {\n $this->executeAclInsert();\n }\n }\n unset($this->temp_array);\n }", "title": "" }, { "docid": "4a1a132e1cfacc40fde2bfb2d6ae01e7", "score": "0.5230945", "text": "function get_tags($tag_id = null,$entry_id = null) {\n include('connection.php');\n $sql = $where = $order = \"\";\n try {\n $sql = \"SELECT tags.* FROM tags\";\n if (!empty($entry_id)) {\n $where = \" JOIN entries_to_tags ON entries_to_tags.tag_id = tags.tag_id\n WHERE entries_to_tags.entry_id = ?\";\n }\n elseif (!empty($tag_id)) {\n $where = \" WHERE tags.tag_id = ?\";\n }\n $order = \" ORDER BY tags.title ASC\";\n $results = $db->prepare($sql . $where . $order);\n if (!empty($entry_id)) {\n $results->bindParam(1,$entry_id,PDO::PARAM_INT);\n }\n elseif (!empty($tag_id)) {\n $results->bindParam(1,$tag_id,PDO::PARAM_INT);\n }\n $results->execute();\n\n if (!empty($tag_id)) {\n $tags = $results->fetch();\n }\n else {\n $tags = $results->fetchAll(PDO::FETCH_ASSOC);\n }\n\n } catch (Exception $e) {\n echo \"Bad query: \" . $e->getMessage();\n exit;\n }\n return $tags;\n}", "title": "" }, { "docid": "e1c3e76a9fb1fb10ef73979d19393795", "score": "0.5223967", "text": "public function entry($ident);", "title": "" }, { "docid": "274d7eadab0aaf0b0f73612574ea7127", "score": "0.5190074", "text": "public function addEntry(): void\n {\n }", "title": "" }, { "docid": "bd4b1396ba8f5ca8c48802fdcc107022", "score": "0.5187121", "text": "function acceptTag(&$tag) {\r\n if ($tag->getTagName() == \"a\") {\r\n $this->_addLink($tag);\r\n } elseif ($tag->getTagName() == \"title\") {\r\n $this->_setTitle($tag);\r\n } elseif ($this->_isFormElement($tag->getTagName())) {\r\n for ($i = 0; $i < count($this->_open_forms); $i++) {\r\n $this->_open_forms[$i]->addWidget($tag);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3c37d651eb20b0c764af526ff3f9519e", "score": "0.51871043", "text": "public function get_tag() {\n return $this->tag;\n }", "title": "" }, { "docid": "9a07cc5ab8228fc24815d304d7fd906f", "score": "0.518305", "text": "function jrblog_entry_meta() {\r\n\t// Translators: used between list items, there is a space after the comma.\r\n\t$categories_list = get_the_category_list( __( ', ', 'jrblog' ) );\r\n\r\n\t// Translators: used between list items, there is a space after the comma.\r\n\t$tag_list = get_the_tag_list( '', __( ', ', 'jrblog' ) );\r\n\r\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\r\n\t\tesc_url( get_permalink() ),\r\n\t\tesc_attr( get_the_time() ),\r\n\t\tesc_attr( get_the_date( 'c' ) ),\r\n\t\tesc_html( get_the_date() )\r\n\t);\r\n\r\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\r\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\r\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'jrblog' ), get_the_author() ) ),\r\n\t\tget_the_author()\r\n\t);\r\n\r\n\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\r\n\tif ( $tag_list ) {\r\n\t\t$utility_text = __( 'Posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'jrblog' );\r\n\t} elseif ( $categories_list ) {\r\n\t\t$utility_text = __( 'Posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'jrblog' );\r\n\t} else {\r\n\t\t$utility_text = __( 'Posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'jrblog' );\r\n\t}\r\n\r\n\tprintf(\r\n\t\t$utility_text,\r\n\t\t$categories_list,\r\n\t\t$tag_list,\r\n\t\t$date,\r\n\t\t$author\r\n\t);\r\n}", "title": "" }, { "docid": "b8f47d1d08f446ea7528742ced397f20", "score": "0.5169964", "text": "function tags_editline($attrib)\n {\n $attrib += array('id' => 'rcmtasktagsedit');\n $this->rc->output->add_gui_object('edittagline', $attrib['id']);\n\n $input = new html_inputfield(array('name' => 'tags[]', 'class' => 'tag', 'size' => $attrib['size'], 'tabindex' => $attrib['tabindex']));\n return html::div($attrib, $input->show(''));\n }", "title": "" }, { "docid": "fa18d30ab628bc024af62dc55b402287", "score": "0.5166287", "text": "function simple() {\n\t\tglobal $lang, $smarty;\n\t\tif(!isset($lang['admin']['plugin']['tag'])) {\n\t\t\t$lang=lang_load('plugin:tag');\n\t\t}\n\n\t\t// Get the simple tags\n\t\tif(!empty($this->simplebody)) {\n\t\t\t$entry=array('content'=>$this->simplebody);\n\t\t} else {\n\t\t\t$entry=$smarty->get_template_vars('post');\n\t\t}\n\t\t$this->entry->tag_list($entry['content']);\n\t\t$tags=$this->entry->tags;\n\t\tif(!empty($_POST['taginput'])) {\n\t\t\t$tags=array_merge((array)$tags, explode(',', $_POST['taginput']));\n\t\t}\n\t\t$tags=array_map('trim', $tags);\n\t\t$tags=array_unique($tags);\n\t\t$tagsimple=implode(', ', $tags);\n\n\t\t$smarty->assign('taglang', $lang['admin']['plugin']['tag']);\n\t\t$smarty->assign('tags_simple', $tagsimple);\n\t\t$smarty->display('plugin:tag/tagsimple');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7ed33d64a4fff48c5e2326153a300ff3", "score": "0.51634026", "text": "public function getTag()\n {\n return 'exit';\n }", "title": "" }, { "docid": "e20a9213882f202ba81c147ed36fcb5f", "score": "0.5139737", "text": "public function setEntry($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DataCatalog\\V1\\Entry::class);\n $this->entry = $var;\n\n return $this;\n }", "title": "" }, { "docid": "291e0e48fd09f48d644e181074e00a7f", "score": "0.51389307", "text": "public function __construct(Tag $tag)\n\t{\n $this->tag = $tag;\n }", "title": "" }, { "docid": "0e61f79aae77b2ff38c1aeed630d6907", "score": "0.5126087", "text": "public function tags()\n {\n // return ['lumiere', 'hubble:' . $this->data['update_id'], 'fetch_id:' . $this->data['fetch_id']];\n }", "title": "" }, { "docid": "eb4fee56c42bd18e52d103eced050760", "score": "0.511718", "text": "function tag($tag) {\n\t\t$this->data[\"Tag\"] = $tag;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "beb4618ae393747ae31177f7746a58a7", "score": "0.510676", "text": "function bstrap_lite_entry_footer() {\n\t\n\tif ( 'post' === get_post_type() ) {\n\t\t/* translators: used between list items, there is a space after the comma */\n\t\t$tags_list = get_the_tag_list( '', esc_html__( ' ', 'bstrap-lite' ) );\n\t\tif ( $tags_list ) {\n\t\t\t/*$newtags_list = str_replace('rel=\"tag\"', 'rel=\"tag\" class=\"label label-default\"', $tags_list);*/\n\t\t\tprintf( '<span class=\"tags-links\"><i class=\"fa fa-tags\"></i>' . esc_html__( 'Tagged %1$s', 'bstrap-lite' ) . '</span>', $tags_list ); // WPCS: XSS OK.\n\t\t}\n\t}\n\n\tedit_post_link(\n\t\tsprintf(\n\t\t\t/* translators: %s: Name of current post */\n\t\t\tesc_html__( 'Edit %s', 'bstrap-lite' ),\n\t\t\tthe_title( '<span class=\"screen-reader-text\">\"', '\"</span>', false )\n\t\t),\n\t\t'<span class=\"edit-link pull-right\">',\n\t\t'</span>'\n\t);\n}", "title": "" }, { "docid": "9834698a164f4c9f222ec04e166bc9ee", "score": "0.51039", "text": "private function getTagData(): array {\n\t\treturn [\n\t\t\t'tags' => [\n\t\t\t\t[ 'name' => $this->tag_name ],\n\t\t\t]\n\t\t];\n\t}", "title": "" }, { "docid": "0a58312fe35c26473d4f2ac1e4163933", "score": "0.50972253", "text": "function get_author_tag(){\n return $this->author->tag->tagType;\n }", "title": "" }, { "docid": "ff14b1eeea73691c70ef741419846021", "score": "0.5094343", "text": "function getTag($tag)\n {\n global $application;\n $value = null;\n switch ($tag)\n {\n case 'PaginatorLine':\n $obj = &$application->getInstance('PaginatorLine');\n $value = $obj->output('Catalog_SearchResult_'.$this->search_id, \"SearchResult\");\n break;\n\n case 'Local_Items':\n $value = $this->getHTMLProductsList();\n break;\n\n case 'PaginatorDropdown':\n $obj = &$application->getInstance('PaginatorDropdown');\n $value = $obj->output('Catalog_SearchResult_'.$this->search_id, \"SearchResult\");\n break;\n\n case 'Local_ProductNumber':\n \t if (is_object($this->_Product_Info))\n {\n $value = $this->_Product_Info->getProductTagValue('Local_ProductNumber');\n }\n else\n {\n $value = '';\n }\n break;\n\n case 'ProductName':\n \t if (is_object($this->_Product_Info))\n \t {\n \t $value = $this->_Product_Info->getProductTagValue('Name');\n $value = $this->highlightIndexWords($value);\n \t }\n break;\n\n case 'ProductShortDescription':\n \t if (is_object($this->_Product_Info))\n \t {\n \t $value = $this->_Product_Info->getProductTagValue('ShortDescription');\n $value = $this->cstring->mergeWhiteSpace($this->cstring->stripHTML($value));\n $value = $this->highlightIndexWords($value);\n \t }\n break;\n\n case 'ProductDetailedDescription':\n \t if (is_object($this->_Product_Info))\n \t {\n \t $value = $this->_Product_Info->getProductTagValue('DetailedDescription');\n $value = $this->cstring->mergeWhiteSpace($this->cstring->stripHTML($value));\n $value = $this->highlightIndexWords($value);\n \t }\n break;\n\n \t default:\n \t list($entity, $tag) = getTagName($tag);\n \t if ($entity == 'product' && is_object($this->_Product_Info))\n \t {\n \t $value = $this->_Product_Info->getProductTagValue($tag);\n \t }\n \t\tbreak;\n }\n return $value;\n }", "title": "" }, { "docid": "07c4353cd013af0cb33d32a33fc3e17a", "score": "0.50941837", "text": "function sgb_entry_meta() {\n // Translators: used between list items, there is a space after the comma.\n $categories_list = get_the_category_list( __( ', ', 'sgb' ) );\n\n // Translators: used between list items, there is a space after the comma.\n $tag_list = get_the_tag_list( '', __( ', ', 'sgb' ) );\n\n $date = sprintf( 'Veröffentlicht am <time class=\"entry-date\" datetime=\"%3$s\" pubdate>%4$s um %2$s Uhr</time>',\n esc_url( get_permalink() ),\n esc_attr( get_the_time() ),\n esc_attr( get_the_date( 'c' ) ),\n esc_html( get_the_date() )\n );\n\n $author = sprintf( '<span class=\"author vcard\">%1$s %2$s</span>',\n get_the_author_meta( 'first_name' ),\n get_the_author_meta( 'last_name' )\n );\n\n // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n $utility_text = __( '%3$s <span class=\"by-author\"> von %4$s</span>.', 'sgb' );\n\n printf(\n $utility_text,\n $categories_list,\n $tag_list,\n $date,\n $author\n );\n}", "title": "" }, { "docid": "eb3fe9249af049318baf7b118a69414c", "score": "0.50731754", "text": "public function insert($entry) {\n $id = $entry->getZoteroId();\n\n //load the bibtex file using REST api\n $url = \"https://api.zotero.org/\"\n . $this->type . \"/\" . $this->id\n . \"/items/\" . $id\n . \"?key=\" . $this->key\n . \"&format=atom&content=bibtex\";\n $http = new HTTPClient();\n $response = $http->get($url);\n\n $item = simplexml_load_string($response);\n $bib_item = (string) $item->content;\n\n //make the short title as the title of the entry\n preg_match('#^[@].*\\{(.*),$#m', $bib_item, $match);\n $bib_item = str_replace($match[1], $entry->getCiteKey(), $bib_item);\n\n $this->bib_entries[$entry->getCiteKey()] = $bib_item;\n }", "title": "" }, { "docid": "9fe513d2b6471b1f39b3bbf6bc047b72", "score": "0.506433", "text": "public function getTagline()\n {\n return $this->tagline;\n }", "title": "" }, { "docid": "41caa667d9ea89640c292354ff9427ff", "score": "0.50521684", "text": "public function tag($args, $assoc_args)\n\t{\n\t\t$this->_purgeby_helper($args, LiteSpeed_Cache_Admin_Display::PURGEBY_TAG, 'get_tag') ;\n\t}", "title": "" }, { "docid": "c262219c4834659842beea6abb742784", "score": "0.50483245", "text": "abstract public function getTags();", "title": "" }, { "docid": "8c57144e757a3e8c2dd39611699b456f", "score": "0.5043115", "text": "public function add($dn, $entry);", "title": "" }, { "docid": "327e2a4b9e0c83aa4b66a169a53a38f9", "score": "0.5041811", "text": "abstract public function getTagList();", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.50410205", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "b1ba37f96974bc190789e700f284f91c", "score": "0.5040232", "text": "public function addTags( $value){\n return $this->_add(7, $value);\n }", "title": "" }, { "docid": "b1ba37f96974bc190789e700f284f91c", "score": "0.5040232", "text": "public function addTags( $value){\n return $this->_add(7, $value);\n }", "title": "" }, { "docid": "92f8de9c0490440c28d26d9796768e40", "score": "0.50402015", "text": "function get_entries($entry_id = null,$tag_id = null) {\n include('connection.php');\n $sql = $where = $order = \"\";\n try {\n $sql = \"SELECT entries.* FROM entries\";\n\n if (!empty($tag_id)) {\n $where = \" JOIN entries_to_tags ON entries.entry_id = entries_to_tags.entry_id\n WHERE entries_to_tags.tag_id = ?\n \";\n }\n elseif (!empty($entry_id)) {\n $where = \" WHERE entries.entry_id = ?\";\n }\n $order = \" ORDER BY entries.date DESC\";\n\n $results = $db->prepare($sql . $where . $order);\n if (!empty($tag_id)) {\n $results->bindParam(1,$tag_id,PDO::PARAM_INT);\n }\n elseif (!empty($entry_id)) {\n $results->bindParam(1,$entry_id,PDO::PARAM_INT);\n }\n $results->execute();\n\n if (!empty($entry_id)) {\n $entries = $results->fetch();\n }\n else {\n $entries = $results->fetchAll(PDO::FETCH_ASSOC);\n }\n\n } catch (Exception $e) {\n echo \"Bad query: \" . $e->getMessage();\n exit;\n }\n return $entries;\n\n}", "title": "" }, { "docid": "9449ffe3f5d47549decccba5cdca35e3", "score": "0.5039927", "text": "function start_handler($xml, $tag, $attributes) { \n\t\t\tglobal $level; global $tagName; global $count_item;\n\n\t\t\t\t/* Save tag name for later use as key of tag value when runing function char_data_handler() */\n\t\t\t\t\t $tagName = $tag;\n\n\t\t\t\t/* Count # of item to put each item in an subarray of $d */\n\t\t\t\t\tif ($tag == \"ITEM\") {\n\t\t\t\t\t\t$count_item++;\n\t\t\t\t\t}\n\n\t\t\t\t/* Get attributes of the current tag if needed*/ \n\t\t\t\t\t// foreach($attributes as $key => $value) { \n\t\t\t\t\t// \tprint \" $key='$value'\"; \n\t\t\t\t\t// } \n\n\t\t\t/* increase indentation level */ \n\t\t\t$level++; \n\t\t}", "title": "" }, { "docid": "adbbe68527e07692376bdc39c19cc75f", "score": "0.50398594", "text": "function Parseentries_ris()\r\n {\r\n $this->preamble = $this->strings = $this->entries = array();\r\n $this->currentLine=1;\r\n $this->risString=\"1\";\r\n $this->count=0;\r\n }", "title": "" }, { "docid": "b31d0fe93a696396e8a320667647b49f", "score": "0.50251514", "text": "protected function _SQL_Entries_Tags_Table() {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entries_tags_table = $this->Get_Entries_Tags_Table(); \n // Charset string\n\t\t$charset_collate = $wpdb->get_charset_collate();\n // SQL for the entries table\n $entries_tags_table_sql = \"CREATE TABLE $entries_tags_table (\n\t\t\tid bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n uuid varchar(255) NOT NULL,\n\t\t\tentry_id varchar(255) NOT NULL,\n tag_code varchar(255) NOT NULL,\n tag_data longtext NOT NULL,\n time_created bigint(20) UNSIGNED NOT NULL,\n time_modified bigint(20) UNSIGNED NULL,\n date_created date NOT NULL,\n date_modifed date NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t) \".$charset_collate.\";\"; \n // Use the dbdelta to compare and upgrade\n dbDelta($entries_tags_table_sql);\n }", "title": "" }, { "docid": "3cef9cbbd9f40893cd2a5cb05babe4d4", "score": "0.5020624", "text": "private function processAttributes($entry)\n {\n foreach ($entry AS $label => $entry) {\n if ($label == 'id') {\n $this->saveEntityID($this->entity_id,$entry);\n }else {\n $attr_flag = true;\n if (substr($label,0,strlen('master')) == 'master') {\n $value = $this->entity_ids[$this->current_entity][(string)$entry];\n }else {\n $value = (string)$entry;\n }\n $columns[] = $label;\n $values[] = $value;\n }\n }\n if ($attr_flag) {\n $this->updateEntity($columns,$values);\n }\n }", "title": "" }, { "docid": "1cb025f5a6c04c62c098d4d58b6eab64", "score": "0.5014756", "text": "function eastBlue_entry_meta() {\n\t// Sticky post\n\tif ( is_sticky() && is_home() && ! is_paged() )\n\t\techo '<span class=\"featured-post\">' . __( 'Sticky', 'eastBlue' ) . '</span>';\n\t\n\t// Post author\n\tif ( 'post' == get_post_type() ) {\n\t\tprintf( '<span class=\"icon-user author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( '查看%s的所有文章', 'eastBlue' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}\n\t// post time\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n\t\teastBlue_entry_date();\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'eastBlue' ) );\n\tif ( $categories_list ) {\n\t\techo '<span class=\"icon-cat\">' . $categories_list . '</span>';\n\t}\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'eastBlue' ) );\n\tif ( is_single() && $tag_list ) {\n\t\techo '<span class=\"icon-tag\">' . $tag_list . '</span>';\n\t}\n\n}", "title": "" }, { "docid": "a746695ac499e4ae9bd41f114067faf6", "score": "0.5011501", "text": "public function getTag()\n {\n\n return $this->_tag;\n }", "title": "" }, { "docid": "a51c53957bd8e7c3afa3e70fb5ff7e3b", "score": "0.50051886", "text": "public function addEntry($entry) {\n $clone = $this->doc->importNode($entry->model, true);\n $this->model->appendChild($clone);\n }", "title": "" }, { "docid": "569c38300696a94fa1d0bb7e87a3db93", "score": "0.5002286", "text": "function entrySet();", "title": "" }, { "docid": "9bbf2d9d463a9443506ebe98b21b3dae", "score": "0.4996582", "text": "function saveTags($entry_id, $tags) {\n $this->EntryTag->deleteAll(array('EntryTag.entry_id' => $entry_id), false);\n\n // Add the tags and relationships one by one\n foreach($tags as $tag) {\n $this->EntryTag->create();\n\n $entryTag = array();\n $entryTag['EntryTag']['entry_id'] = $entry_id;\n\n // check if tag is a number, if so it most likely exists\n if(is_numeric($tag)) {\n $entryTag['EntryTag']['tag_id'] = $tag;\n }\n else {\n // Get rid of single quotes and trim whitespace from tag\n $tag = preg_replace(\"/(^\\'|\\'\\z)/\", \"\", $tag);\n $tag = trim($tag);\n\n // check to make sure tag is not in the DB\n $result = $this->Tag->find('first', array(\n 'conditions' => array(\n 'Tag.name' => $tag\n ),\n 'recursive' => 0\n ));\n\n if(!empty($result)) {\n // tag exists!\n $entryTag['EntryTag']['tag_id'] = $result['Tag']['id'];\n }\n else {\n // tag does not exist, create it\n $entryTag['Tag']['name'] = $tag;\n }\n }\n\n // finally save the relationship (and tag)\n $this->EntryTag->saveAll($entryTag);\n }\n }", "title": "" }, { "docid": "5a3c5df82ac4704346ca438038076532", "score": "0.49846613", "text": "abstract protected function renderTag(): string;", "title": "" }, { "docid": "0476ae3fd6a67106b0026e9854f01e58", "score": "0.49718902", "text": "function xml_entry(array $record, string $timestamp): string\n{\n $str = \"<Entry>\n <UUID>\" . uniqid() . \"</UUID>\n <IconID>0</IconID>\n <ForegroundColor/>\n <BackgroundColor/>\n <OverrideURL/>\n \";\n\n $str .= (!isset($record['__TAGS__']) ? '<Tags/>' : '<Tags>' . $record['__TAGS__'] . '</Tags>') . PHP_EOL;\n\n $str .= \"<Times>\n <LastModificationTime>$timestamp</LastModificationTime>\n <CreationTime>$timestamp</CreationTime>\n <LastAccessTime>$timestamp</LastAccessTime>\n <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>\n <Expires>False</Expires>\n <UsageCount>0</UsageCount>\n <LocationChanged>$timestamp</LocationChanged>\n </Times>\n \";\n\n foreach ($record as $key => $value) {\n if ($key == '__TAGS__' || empty($value)) {\n continue;\n }\n $str .= '<String><Key>' . $key . '</Key>';\n $str .= ($key == 'Password' ? '<Value ProtectInMemory=\"True\">' : '<Value>') . $value . '</Value>';\n $str .= '</String>' . PHP_EOL;\n }\n\n $str .= \"<AutoType>\n <Enabled>True</Enabled>\n <DataTransferObfuscation>0</DataTransferObfuscation>\n </AutoType>\n <History/>\n </Entry>\n \";\n\n return $str;\n}", "title": "" }, { "docid": "508f4ac1d49cc9465b10ce48376ec44e", "score": "0.49635255", "text": "protected function parse($args) {\n\n $tag = @$args[0];\n $name = preg_replace('!\\(([a-z0-9]+)\\:.*$!i', '$1', $tag);\n $class = $this->tagclass($name);\n\n // if the class is not available, return the entire tag\n if(!$class) return $tag;\n\n // initialize the tag class\n $object = new $class(array(\n 'name' => $name, \n 'tag' => $tag,\n 'kirbytext' => $this\n ));\n\n // return the generated html\n return $object->html();\n \n }", "title": "" }, { "docid": "84199a16d8b0c54a54dc85c4b3f684c3", "score": "0.49627483", "text": "public function getEntry()\n {\n return $this->options['entry'];\n }", "title": "" }, { "docid": "4a2847d7886ab29d723c135435e468cb", "score": "0.49573332", "text": "function comment_entries_tagdata($tagdata, $row)\n\t{\n\t\tglobal $EXT, $IN, $DB;\n\n\t\t$entry_id = (! isset($IN->SEGS[sizeof($IN->SEGS)]) ? '0' : $IN->SEGS[sizeof($IN->SEGS)]);\n\n\t\t$query = $DB->query(\"SELECT a.comment_id, b.entry_id\n\t\t\t\t\t\t\t FROM exp_comments a, exp_weblog_titles b\n\t\t\t\t\t\t\t WHERE b.url_title = '\".$entry_id.\"'\n\t\t\t\t\t\t\t AND a.entry_id = b.entry_id\n\t\t\t\t\t\t\t ORDER BY a.comment_id DESC\n\t\t\t\t\t\t\t LIMIT 1\");\n\n\t\tif($EXT->last_call !== FALSE)\n\t\t{\n\t\t\t$tagdata = $EXT->last_call;\n\t\t}\n\t\tif ($row[\"comment_id\"] == $query->row[\"comment_id\"])\n\t\t{\n\t\t\t$tagdata = str_replace(LD.'last_comment'.RD, '<a id=\"last_comment\"></a>', $tagdata);\n\t\t} else {\n\t\t\t$tagdata = str_replace(LD.'last_comment'.RD, '', $tagdata);\n\t\t}\n\n\t\treturn $tagdata;\n\t}", "title": "" }, { "docid": "b30c8340545de41c4dd3c75151540314", "score": "0.49566588", "text": "public function postTag():CRUInterface;", "title": "" }, { "docid": "5dc264340a12ba6f1bf60fbb42273b4d", "score": "0.49494556", "text": "function _tagger_devdemon($entry_id, $field_id, $tagger_data = array(), $rules = array())\n\t{\n\t\tif( ! isset($entry_id) || empty($entry_id) || empty($tagger_data))\n\t\t{\n\t\t\treturn '&nbsp;';\n\t\t}\n\t\t$output = \"\";\n\t\n\t\tif(isset($tagger_data['entry_id_'.$entry_id]))\n\t\t{\n\t\t\tforeach($tagger_data['entry_id_'.$entry_id] as $key => $tag_name)\n\t\t\t{\n\t\t\t\t$output .= $tag_name.', ';\n\t\t\t}\n\t\t\t$output = substr($output, 0, -2);\n\t\t}\n\t\t\n\t\t$output = $this->highlight($output, $rules, 'field_'.$field_id);\n\t\treturn $output;\n\t\t\n\t}", "title": "" }, { "docid": "9eea75e8cd673c5684c415496a11ff87", "score": "0.4946787", "text": "public function getIdTag()\n {\n return $this->idTag;\n }", "title": "" } ]
b2a5d19c0fedef7ca6b9a007c42a9311
Only admin users can access library Members area
[ { "docid": "13ca3449163025deff2b43f8e00aeab8", "score": "0.0", "text": "public function accessRules()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t\t\t\tarray('allow', 'roles' => array('admin')),\n\t\t\t\t\t\t\tarray('deny', 'users' => array('*')),\n\t\t\t\t\t\t);\n\t\t}", "title": "" } ]
[ { "docid": "0491bb96cdad2e83dd5822bd487f6818", "score": "0.72887164", "text": "protected function access_only_allowed_members() {\n if ($this->access_type !== \"all\") {\n redirect(\"forbidden\");\n }\n }", "title": "" }, { "docid": "b9d521f07d2a90efb8b69446a9c7d89f", "score": "0.69780725", "text": "function user_can_access_admin_page() {}", "title": "" }, { "docid": "a445fc2c7e8d28c5c1db444a845334aa", "score": "0.6961805", "text": "function course_nav_members_access(){\n\t\t\n\t\tif(!is_singular('course'))\n\t\t\treturn;\n\n\t\tglobal $bp;\t\t\n\t\t$permalinks = Vibe_CustomTypes_Permalinks::init();\n\t\t\n\t\tif((isset($_GET['action']) && $_GET['action'] == 'members') || bp_current_action() == 'members' || (!empty( $bp->unfiltered_uri[2]) && ($bp->unfiltered_uri[2] == 'members' || $bp->unfiltered_uri[2] == trim($permalinks->permalinks['members_slug'],'/')))){\n\t\t\tif(!$this->check_access($this->settings['vibe_display_course_members'])){\n\t\t\t\tglobal $post;\n\t\t\t\twp_redirect(get_permalink($post->ID));\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5968aaa0a2b4bc3c6ba1c6afbf055097", "score": "0.6804016", "text": "function current_user_can_access(){\n $user = current_user();\n\n if($user->role == 'admin' || $user->client_id == $this->client_id)\n return true;\n else return false;\n }", "title": "" }, { "docid": "800bc604df6d9244dc88bfdfc046e05e", "score": "0.67588484", "text": "protected function access_only_team_members() {\n if ($this->login_user->user_type !== \"staff\") {\n redirect(\"forbidden\");\n }\n }", "title": "" }, { "docid": "ee093054458abcbf6daad9a210e91a5b", "score": "0.6687789", "text": "protected function access_only_admin() {\n if (!$this->login_user->is_admin) {\n redirect(\"forbidden\");\n }\n }", "title": "" }, { "docid": "1d7e8cb330269f9827de73bb4d317411", "score": "0.6574364", "text": "function ssp_private_allow_subscribers_private_access() {\n\t$subscriber = get_role( 'subscriber' );\n\t$subscriber->add_cap( 'read_private_posts' );\n\t$subscriber->add_cap( 'read_private_pages' );\n}", "title": "" }, { "docid": "05aa23f0c1c326610e1b156b03d43a2c", "score": "0.6548471", "text": "static public function checkUserHasSomeAdminAccess()\n\t{\n\t\tZend_Registry::get('access')->checkUserHasSomeAdminAccess();\n\t}", "title": "" }, { "docid": "c249ad7d653d89894a30942bec3969aa", "score": "0.6538298", "text": "public static function disableAccess()\n {\n add_filter('acf/settings/show_admin', function () {\n if (is_user_logged_in()) {\n $current_user = wp_get_current_user();\n\n if (in_array('administrator', $current_user->roles)) {\n return true;\n }\n }\n\n return false;\n });\n }", "title": "" }, { "docid": "bf607c94305c8e234d7d03bfc5621885", "score": "0.65357196", "text": "public function requireAdmin()\n {\n if ( ! $this->isAdmin()) {\n Util::denyAccess();\n }\n }", "title": "" }, { "docid": "e069f9b450a6d94c74b9ec418650b0aa", "score": "0.6514279", "text": "function checkPermissions() {\n // Check if user can access to whole wiki\n if(!$this->wiki->isAutorized(user_getid())) {\n $GLOBALS['Response']->addFeedback(\n 'error', \n $GLOBALS['Language']->getText(\n 'plugin_phpwiki_wikiservice',\n 'acces_denied_whole',\n session_make_url(\"/project/memberlist.php?group_id=\".$this->gid)\n ),\n CODENDI_PURIFIER_DISABLED\n );\n exit_permission_denied();\n }\n\n // Check if user can access to selected page\n if(!empty($_REQUEST['pagename'])) {\n $wp = new PHPWikiPage($this->gid, $_REQUEST['pagename']);\n if(!$wp->isAutorized(user_getid())) {\n $GLOBALS['Response']->addFeedback(\n 'error', \n $GLOBALS['Language']->getText(\n 'plugin_phpwiki_wikiservice',\n 'acces_denied_page',\n session_make_url(\"/project/memberlist.php?group_id=\".$this->gid)\n ),\n CODENDI_PURIFIER_DISABLED\n );\n exit_permission_denied();\n }\n }\n }", "title": "" }, { "docid": "6b56b18cf7a3a8c289bc6bec167a58d2", "score": "0.6456823", "text": "function user_rights(){\n\t \n }", "title": "" }, { "docid": "3aee23eb48ec722f1b5307bd61f12722", "score": "0.64064705", "text": "function isAdmin(){\n return $_SESSION['user']['permissions'] ==2;\n }", "title": "" }, { "docid": "ebb4b8aa7a3329c6249bf732fae913b1", "score": "0.63921714", "text": "public function restricted_admin() \n\t{\n\t\t$this->template->loadData(\"activeLink\", \n\t\t\tarray(\"restricted\" => array(\"general\" => 1)));\n\n\t\tif($this->user->info->user_level < 4) {\n\t\t\t$this->template->error(\"You cannot view this page as you are not an admin!\");\n\t\t}\n\n\t\t// Loads HTML page\n\t\t$this->template->loadContent(\"test/admin.php\", array(\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "501610f30e6fa4ff3212500734fd6c98", "score": "0.63786626", "text": "function block_admin_access() {\n global $pagenow, $current_user;\n\n // bail out if we are from WP Cli\n if ( defined( 'WP_CLI' ) ) {\n return;\n }\n\n $no_access = dokan_get_option( 'admin_access', 'dokan_general', 'on' );\n $valid_pages = array( 'admin-ajax.php', 'admin-post.php', 'async-upload.php', 'media-upload.php' );\n $user_role = reset( $current_user->roles );\n\n if ( ( $no_access == 'on' ) && ( !in_array( $pagenow, $valid_pages ) ) && in_array( $user_role, array( 'seller', 'customer' ) ) ) {\n wp_redirect( home_url() );\n exit;\n }\n }", "title": "" }, { "docid": "335ae3f31ab5b41f6ee5875bdcd44811", "score": "0.63369364", "text": "private function allowModify()\n { \n if($this->controllerVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "f4418b42c8ad3939c3e34036ce2293ce", "score": "0.63350034", "text": "function check_user_access_level()\n{\n\t$CI = & get_instance();\n\t// Get the user's ID and add it to the config array\n\t$config = array('userID'=>$CI->session->userdata('logged_in_user')->sb_hotel_user_id);\n\t// Load the ACL library and pas it the config array\n\t$CI->load->library('acl',$config);\n}", "title": "" }, { "docid": "628197885bd79be89b844cdb787f2984", "score": "0.63338095", "text": "static function access() {\n return onapp_has_permission(array('virtual_machines', 'virtual_machines.read.own'));\n }", "title": "" }, { "docid": "3492ffcabb7f4b080d50e34d4eee7f6d", "score": "0.63187575", "text": "public function beforeFilter(){\n\t\t//Define Public Actions\n\t\t$this->Auth->allow('index','browse','register');//this can be viewed by guest user before login filter is applied\n\t}", "title": "" }, { "docid": "a49681a8709b8a90575662269635b1d0", "score": "0.6301988", "text": "public function uac_permissions();", "title": "" }, { "docid": "c253a326614327ef7f352ea9e267b8e3", "score": "0.6278429", "text": "function is_user_admin() {}", "title": "" }, { "docid": "215d880ac4c980d24722a7b8b234c89a", "score": "0.62401974", "text": "function is_staff(){\r\n\treturn checkAuth(AUSTAFF | AUADMIN);\r\n}", "title": "" }, { "docid": "7c0721444104e66795b5ea00baf48d1a", "score": "0.6236205", "text": "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow();\n //$this->Auth->deny('admin_index','admin_add');\n }", "title": "" }, { "docid": "bbcb54790f8f7eb48b4e312ef5097aa2", "score": "0.6234526", "text": "public function authorize()\n {\n return $this->user()->can('backend_edit_mainsliders');\n }", "title": "" }, { "docid": "74e125167b09541673319d6341da6f88", "score": "0.62318283", "text": "function is_non_administrator()\n{\n $user_level = false;\n\n $userDao = new UserDao();\n $userToken = new UserTokenDao();\n $validator = new FormValidator();\n $authenticator = new Authentication($userDao, $userToken, $validator);\n\n $accessLevel = $authenticator -> accessLevel();\n\n if(($accessLevel != 'administrator')) {\n \n $user_level = true;\n\n } else {\n\n $user_level = false;\n\n }\n\n return $user_level;\n\n}", "title": "" }, { "docid": "a2906f355c329278e32ef33679dbd0b2", "score": "0.62315774", "text": "public function getAdminOnlyAccess()\n {\n if (Sentinel::getUser()->inRole('admin')) {\n\n return View('admin/groups/admin_only');\n }\n else {\n return View('admin/404');\n }\n\n // fallback\n return View('admin/404');\n }", "title": "" }, { "docid": "d552bbfb28e8790b4579bbb1dc07aa76", "score": "0.62310666", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_logistics/classroom');\n }", "title": "" }, { "docid": "a26b87cd6d17ead52a17eea0f43299e1", "score": "0.622298", "text": "public function te_uac_permissions();", "title": "" }, { "docid": "a0fe779654be1eed1eb841e7029b6639", "score": "0.6216962", "text": "function vine_media_limit_rest_view_to_logged_in_users( $is_allowed, $cmb_controller ) {\n\tif ( ! is_user_logged_in() ) {\n\t\t$is_allowed = false;\n\t}\n\n\treturn $is_allowed;\n}", "title": "" }, { "docid": "48b4b92c18ef9e8170cccf2f453ea8b5", "score": "0.6215212", "text": "public function allowOnlyOwner() {\n if (Yii::app()->user->getState('role') > 2) {\n return true;\n } else {\n return Step::model()->findByPk($_GET[\"id\"])->traveler->userId === Yii::app()->user->id;\n }\n }", "title": "" }, { "docid": "1305b9be4f240d6abefb7dee3e75fa48", "score": "0.61991125", "text": "function current_user_is_admin() {\n\treturn true;\n}", "title": "" }, { "docid": "6155a5874cea723964eb9447ca2f7c78", "score": "0.61945605", "text": "function is_admin_user() {\n\n\treturn current_user_can( 'manage_options' );\n\n}", "title": "" }, { "docid": "04e545bfc3d9c30fd514e333bdc8c86c", "score": "0.6190943", "text": "function hasAdminAccess(){\n\t\treturn isLoggedIn() && hasAccess($_SESSION['userrole'], 0);\n\t}", "title": "" }, { "docid": "ad9f4b0340075623c750f24ea7aee1a0", "score": "0.6186581", "text": "function get_instructor_permissions_check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ef621022a31a41585693b0e8246d7767", "score": "0.61837703", "text": "function isAdminAuthorized()\n\t{\n\t\t$is_admin = $this->Session->read(\"Auth.Member.is_admin\");\n\t\tif ($is_admin) { return true; }\n\t\treturn false;\n \t}", "title": "" }, { "docid": "c8e68866b222f93748ddcbfbc18b8a64", "score": "0.6170731", "text": "function bum_acl()\n{\n\tdefined(\"BUM_CURRENT_USER_CAN\") or define(\"BUM_CURRENT_USER_CAN\", (current_user_can(BUM_CAPABILITY)));\n\tdefined(\"BUM_CURRENT_USER_CANNOT\") or define(\"BUM_CURRENT_USER_CANNOT\", (!BUM_CURRENT_USER_CAN) );\n}", "title": "" }, { "docid": "1d09cc370418f0985daff062a7a23443", "score": "0.6164217", "text": "function can_now_reading_admin() {\r\n\r\n//depends on multiuser mode (B. Spyckerelle)\r\n $options = get_option(NOW_READING_OPTIONS);\r\n $nr_level = $options['multiuserMode'] ? 'level_2' : 'level_9';\r\n\r\n return current_user_can($nr_level);\r\n}", "title": "" }, { "docid": "60f2d3fe15804ccad0ec2aaba7eea304", "score": "0.6155268", "text": "public function checkAccess();", "title": "" }, { "docid": "8cd2597c8333701090c5dd5084a626f0", "score": "0.615363", "text": "function get_instructors_permissions_check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "89e6df5ffef8e187022f4b780fdcaad9", "score": "0.6152787", "text": "function _greeting_node_access(){\n\tglobal $user;\n\tif (user_is_logged_in()) {\t\t\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "5996d89deb18cf0ea2be684877a0ebdc", "score": "0.61487913", "text": "public function canManage() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\n if (!Engine_Api::_()->authorization()->isAllowed('sitecrowdfunding_project', $viewer, 'view')) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "bbcfe0de9cc88164ceb1ceea002309d5", "score": "0.61447275", "text": "function setRestrictedAccess() {\n\tglobal $fbUser;\n\tif (!$fbUser) {\n _exit('the operation is not permitted');\n }\n\n\treturn true;\n}", "title": "" }, { "docid": "0f05fb61e7f411637b67a5e8d43c6456", "score": "0.6143896", "text": "function isMember() {\n if(isLoggedIn()) {\n $role = Auth::user()->role;\n\n if($role == \"member\") {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "1d6195438c94c9b134673b3956f7550e", "score": "0.61345893", "text": "protected function _isAllowed () {\n\t\t\t// Is module config in admin user's ACL\n\t\t\treturn Mage::helper (\"twofactor/data\")->isAllowed ();\n\t\t}", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.6129942", "text": "public function permissions();", "title": "" }, { "docid": "7639f9ee7cb5bedcff0ab23f76c32fd6", "score": "0.6120385", "text": "function is_admin() {\n global $Authenticate;\n return $Authenticate->IsAdmin();\n}", "title": "" }, { "docid": "b6b8891d888d7f05b20ab4ea7a0d3200", "score": "0.6114358", "text": "private function _restrict_prefs_access()\n\t{\n\t\tif ( ! $this->cp->allowed_group(\n\t\t\t'can_access_admin',\n\t\t\t'can_admin_channels',\n\t\t\t'can_access_content_prefs'\n\t\t))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'));\n\t\t}\n\t}", "title": "" }, { "docid": "136f88eb250f1f3b93850968066ab672", "score": "0.61140007", "text": "public function isAdmin(){\n return $this->role === 0;\n }", "title": "" }, { "docid": "95dcb36a676161f2c9e7815a76a6d092", "score": "0.61110395", "text": "public function authorize()\n {\n // Just let edit Users if is an Admin\n return Auth::user()->admin;\n }", "title": "" }, { "docid": "ba9444b629022636a59144a7dd9bc0e9", "score": "0.60935205", "text": "function restricted_user_profile($id,$status){\r\n global $upme_roles;\r\n\r\n $restricted = true;\r\n if( '2' == $status ){\r\n\r\n $current_option = get_option('upme_options');\r\n \r\n $restricted_roles = ('' != $current_option['choose_roles_for_view_profile']) ? $current_option['choose_roles_for_view_profile'] : array();\r\n \r\n if(!is_array($restricted_roles)){\r\n $restricted_roles = array();\r\n }\r\n\r\n array_push($restricted_roles, 'administrator');\r\n\r\n $current_user_roles = $upme_roles->upme_get_user_roles_by_id($id);\r\n \r\n if(is_array($current_user_roles)){\r\n foreach ($current_user_roles as $key => $role) {\r\n if(in_array($role, $restricted_roles)){\r\n $restricted = false;\r\n }\r\n }\r\n }\r\n \r\n\r\n } else if('0' == $status && !current_user_can('manage_options') ){\r\n\r\n $restricted = true;\r\n } else{\r\n $restricted = false;\r\n }\r\n\r\n if($restricted){ \r\n return true;\r\n }else{\r\n return false;\r\n }\r\n\r\n }", "title": "" }, { "docid": "6ce5a272bf89b302346b4883b8b7fa57", "score": "0.6089356", "text": "function beforeFilter() {\r\n parent::beforeFilter();\r\n $this->Auth->allow('showService','getStaff','getAvailableTimeslots','getAdminTimeslots','removeTimeSlot','appointment','payment','check_phone');\r\n //$this->Auth->allow('*');\r\n }", "title": "" }, { "docid": "5c5520bb915898d7601146afa5cd91f7", "score": "0.60875124", "text": "public function isAdmin()\n {\n return $this->isLoggedIn() && $this->getCurrentUser()->is_admin;\n }", "title": "" }, { "docid": "4e754f7db4091cd39ccdbd055975ccd0", "score": "0.60727036", "text": "public function roles_protected() {\n return false;\n }", "title": "" }, { "docid": "4e754f7db4091cd39ccdbd055975ccd0", "score": "0.60727036", "text": "public function roles_protected() {\n return false;\n }", "title": "" }, { "docid": "0ec23729491d963fc2253b7041be61e5", "score": "0.60609525", "text": "public function isAdministrator() {\n return ($this->access_level >= 2);\n }", "title": "" }, { "docid": "4012405f457132dc5374dac90b12c9de", "score": "0.606011", "text": "public function isAdmin()\n {\n return $this->role_id == 3;\n }", "title": "" }, { "docid": "f4a4372a0fdb9076a3424c24bf260cba", "score": "0.6059382", "text": "public function isAdmin(){\n if($this->role == 1){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1196b09ae0b9f0c80a70a73814e240e7", "score": "0.604384", "text": "protected function userHasAccess() {\n\n return current_user_can( 'view_private_files' );\n }", "title": "" }, { "docid": "cf75de43cebef810d97276438d919152", "score": "0.6039849", "text": "public function isAdmin()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "1ccb9d99dc40a8b9958c77591a329714", "score": "0.60311395", "text": "public function testAdminCanMark()\n {\n $user = User::findOrFail(\"1\"); // Gets root admin user.\n $this->be($user); // Mocks Auth::user with this user.\n\n // Gets a random module, the user is not apart of.\n $exceptModules = Module::all()->except($user->modules->pluck('id')->toArray());\n\n $this->assertTrue(CourseworkPermission::canMark($exceptModules->first()));\n }", "title": "" }, { "docid": "b53a3991d58e8db0df4afae2170f14f5", "score": "0.60221523", "text": "protected function access_only_clients() {\n if ($this->login_user->user_type != \"client\") {\n redirect(\"forbidden\");\n }\n }", "title": "" }, { "docid": "526d33e739d4c920df76ce0ce4d8eb0b", "score": "0.60132766", "text": "public function superadmin()\n {\n dd('Access only Superadmin');\n }", "title": "" }, { "docid": "36a1f77a248863323fda4219a3366b81", "score": "0.60119987", "text": "function getIsAdmin(){\n return ( $this->user && $this->user->level >= Users::LEVEL_ADMIN );\n }", "title": "" }, { "docid": "553b02de23ec5e3eb0bed4e2776b842a", "score": "0.6009892", "text": "function show_admin_bar_for_client_partner_users(){\n\n\tif(ba_is_client_user() || ba_is_resource_partner() || ba_is_resource_author() || current_user_can('manage_options' ))\n\t\treturn true;\n}", "title": "" }, { "docid": "e857668f812e085a51c23a701e2fb13c", "score": "0.6000564", "text": "public function current_user_has_access() {\n\t\treturn ! $this->capability || GFCommon::current_user_can_any( $this->capability );\n\t}", "title": "" }, { "docid": "b26b57bc14b1fda81f48b3ae752f3586", "score": "0.600024", "text": "public function amLoggedInAsMember(): void\n {\n $this->amLoggedInAs($this->grabUserByRole(Item::ROLE_MEMBER));\n }", "title": "" }, { "docid": "8495c39fccfae54e44691e4052b35e11", "score": "0.59956455", "text": "function var_profile_access() {\n\t\t$auth = [];\n\t\t$pass = false;\n\t\t$loggedIn = wp_get_current_user();\n\n\t\t$auth['loggedIn'] = $loggedIn;\n\t\t$auth['postAuthor'] = get_the_author_meta('ID');\n\t\t$auth['isAdmin'] = var_is_admin_user();\n\n\t\tif($auth['loggedIn']->ID === $auth['postAuthor'] \n\t\t\t|| $auth['isAdmin'] ) {\n\t\t\t$pass = true;\n\t\t}\n\n\t\treturn $auth;\n\t}", "title": "" }, { "docid": "07044dc50e22bb817e87344bb4d9770e", "score": "0.5993433", "text": "public function ajax_user_can() {\n return current_user_can( 'manage_pickups' ) || current_user_can( 'manage_options' );\n }", "title": "" }, { "docid": "4320657c617b3f40f2f0137e91ace7d7", "score": "0.5986345", "text": "public function authorize()\n {\n return \\Auth::user()->canDo('EDIT_USERS');\n }", "title": "" }, { "docid": "3dcf0def1b8cc2949eb9b966e28babd4", "score": "0.5977643", "text": "public function isAdmin() : bool;", "title": "" }, { "docid": "0d07273ae37579734fa0aa817fdec92a", "score": "0.59735566", "text": "public function authorize()\n {\n return Auth::user()->is_admin || (Auth::user()->can('create keepass') && Auth::user()->categories->where('id', $this->category_id)->first());\n }", "title": "" }, { "docid": "fc05857a7c68a5b0611333403211ce5b", "score": "0.5973503", "text": "public function authorize()\n {\n return !Auth::guest() && Auth::user()->admin;\n }", "title": "" }, { "docid": "4640ad710e0647bd4736d37d2fdba6b6", "score": "0.59722245", "text": "protected function check_access()\n\t{\n\t\t$admins = CConfig::load('admins');\n\t\tif (in_array(CUser::user()->email,$admins)) return true;\n\t\t$this->redirect('');\n\t\tdie();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f5ae99e54cdb89994640c82916718c69", "score": "0.5971775", "text": "public function authorize()\n {\n\n if ($this->has('id')){\n // update\n $article = Article::findOrFail($this->get('id'));\n return Auth::user()->isAdmin() || $article->isOwnedByCurrentUser();\n } else {\n // create\n return Auth::user()->isAdmin();\n }\n\n }", "title": "" }, { "docid": "6e832d9a69524a112190eecccf9d9305", "score": "0.5968122", "text": "function has_privileges(){\n $CI =& get_instance();\n $priv = $CI->session->userdata('user_privileges');\n $mod = $CI->uri->segment(1, NULL);\n $has_p = false;\n if($priv == '2'){ //pic\n $has_p = ($mod == 'pic');\n }elseif ($priv == '3'){ //pic/dispather\n $has_p = ($mod == 'pic' || $mod == 'dispatcher');\n }elseif ($priv == '4'){ //dispatcher\n $has_p = ($mod == 'dispatcher');\n }elseif ($priv == '6'){ //admin\n $has_p = ($mod == 'admin');\n }elseif ($priv == '7'){ //dispatcher\n $has_p = ($mod == 'dispatcher');\n }elseif ($priv == '8'){\n $has_p = ($mod == 'pic');\n }\n\n if($has_p == false) redirect(get_module(),'refresh');\n }", "title": "" }, { "docid": "3603c55636e22efadb6d7eed9d7f0480", "score": "0.59607846", "text": "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n \n //Read Only can list \n if (in_array($this->request->action, ['index'])) {\n if ($user['group_id'] <= 3) {\n return true;\n }\n }\n \n //managers can add / edit\n if (in_array($this->request->action, ['add','edit','delete'])) {\n if ($user['group_id'] <= 2) {\n return true;\n }\n }\n \n //Admins have all\n return parent::isAuthorized($user);\n }", "title": "" }, { "docid": "b65ebb06658785f1b628514dcbfa31f6", "score": "0.59571886", "text": "function is_admin( $user_id = false ) {}", "title": "" }, { "docid": "5a976b9ac1376da7a207bda97e33b61b", "score": "0.59570265", "text": "public function authorize()\n {\n return Auth::user()->UserRole == \"Administratorius\";\n }", "title": "" }, { "docid": "5a976b9ac1376da7a207bda97e33b61b", "score": "0.59570265", "text": "public function authorize()\n {\n return Auth::user()->UserRole == \"Administratorius\";\n }", "title": "" }, { "docid": "5a976b9ac1376da7a207bda97e33b61b", "score": "0.59570265", "text": "public function authorize()\n {\n return Auth::user()->UserRole == \"Administratorius\";\n }", "title": "" }, { "docid": "905882ac1b0d2b1e7d50e5230259f24d", "score": "0.5955947", "text": "public function checkAdmin()\n {\n $this->_actionController->getHelper(\"checkMember\")->direct();\n\n $session = $this->_actionController->getHelper(\"currentSession\")->direct();\n $user = $session->getUser();\n\n if (! $user || ! in_array($user->getRole(), array(\"admin\")))\n {\n $session->write(\"messages\", \"NOT_ALLOWED\");\n $session->write(\"messages_class\", \"error\");\n $this->_actionController->getHelper(\"redirector\")->gotoRoute(array(), \"home\", true);\n }\n }", "title": "" }, { "docid": "e7cd1a592024c3ba69c46a1a33e6b52f", "score": "0.5954119", "text": "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('employee_api_control'); \n }", "title": "" }, { "docid": "eb70ab035f178d310c994f3291c0b4f3", "score": "0.59531075", "text": "function AdminBodyMain()\n\t{\tif ($this->user->CanUserAccess(\"news\") || $this->user->CanUserAccess(\"web content\"))\n\t\t{\t$this->ListDocs();\n\t\t}\n\t}", "title": "" }, { "docid": "f803f9f27d64a921870740c6b02a5f47", "score": "0.5946593", "text": "public function enableAccess()\n {\n }", "title": "" }, { "docid": "ed521e97925d08f7c44cdce6dfc857ca", "score": "0.5945618", "text": "public function authorize()\n {\n return Auth::user()->level > 1;\n }", "title": "" }, { "docid": "ed521e97925d08f7c44cdce6dfc857ca", "score": "0.5945618", "text": "public function authorize()\n {\n return Auth::user()->level > 1;\n }", "title": "" }, { "docid": "2ac25cc47d90f8b6b7b6f769d7e44e9f", "score": "0.594532", "text": "function admin_protect($conn)\n{\n global $user_data;\n $id = $user_data['user_id'];\n $a = has_access($id,1,$conn);\n if($a==false)\n {\n header('Location: index.php');\n }\n}", "title": "" }, { "docid": "4e748784789587d0fc96b193141b70d4", "score": "0.594435", "text": "private function checkViewPermission()\n {\n if($this->viewVar['loggedUserRole'] <= 40)\n {\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "a35e05e86fe8fdb94b793dfbda64572e", "score": "0.5943812", "text": "public function isAdmin(){\n if($this->getTipeAkun() < 2){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "bc0816eaa3affc6c281711b35d8ce2c1", "score": "0.5940374", "text": "protected function checkRights()\n {\n }", "title": "" }, { "docid": "4874314f5e6b2120e9a25ed91526fa0f", "score": "0.5939877", "text": "public function authorize()\n {\n\t\treturn Auth::user()->isAdmin();\n }", "title": "" }, { "docid": "2bf155dc717bbd3eb1c6230566cd81a9", "score": "0.593723", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('polyweb_sitereview/sitereview');\n }", "title": "" }, { "docid": "f49ee62fc054f6363ec1002cd85e65a8", "score": "0.5936918", "text": "function hdq_user_permission(){\n\t$hasPermission = false;\n\t$authorsCan = sanitize_text_field(get_option(\"hd_qu_authors\"));\n\tif($authorsCan == \"yes\"){\n\t\tif(current_user_can('publish_posts')){\n\t\t\t$hasPermission = true;\n\t\t}\n\t} else {\n\t\tif(current_user_can('edit_others_pages')){\n\t\t\t$hasPermission = true;\n\t\t}\n\t}\n\treturn $hasPermission;\n}", "title": "" }, { "docid": "75b921b4467ab6b280f1afeba63acf03", "score": "0.5933448", "text": "function require_admin() {\n global $session;\n if($session->user_level !== 'a') {\n redirect_to(url_for('/index.php'));\n } else {\n // Let the page load\n }\n}", "title": "" }, { "docid": "ea2613005eb08d0b8a081809adb1b609", "score": "0.5931627", "text": "function IsAdmin(){\n\tglobal $adminList;\n\t$loggedInUser = IsLoggedIn();\n\tif($loggedInUser === false){\n\t\treturn false;\n\t}\n\t\n\tif($loggedInUser[\"admin\"] != 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "d1517ce57e05d32a2acdd23920e3d965", "score": "0.5928141", "text": "function adv_sidebox_admin_permissions(&$admin_permissions)\n{\n\tglobal $lang;\n\n\tif(!$lang->adv_sidebox)\n\t{\n\t\t$lang->load('adv_sidebox');\n\t}\n\n\t$admin_permissions['adv_sidebox'] = $lang->adv_sidebox_admin_permissions_desc;\n}", "title": "" }, { "docid": "9343c4cc13c69ea5a65137d500ac9806", "score": "0.59274083", "text": "abstract function isAuthorised();", "title": "" }, { "docid": "24d55f30f5c79b4402d7c629fe5c3737", "score": "0.5918148", "text": "public function authorize()\n {\n return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;\n }", "title": "" }, { "docid": "59b34ef3d319bced33281feb0baf0d2d", "score": "0.5917572", "text": "function get_filtered_courses_permissions_check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "1059681b3f5e11b623aec40628bbdc79", "score": "0.5916555", "text": "public function isAdmin() {\n return $this->hasCredential( array( 'ADMIN' ), $useAnd = false);\n }", "title": "" }, { "docid": "a91ebf1d08fee7ae20581d807a3eecd2", "score": "0.5914492", "text": "static public function isUserHasSomeAdminAccess()\n\t{\n\t\ttry{\n\t\t\tself::checkUserHasSomeAdminAccess();\n\t\t\treturn true;\n\t\t} catch( Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
f176ec64ce6ae5b15236fe653f358bc6
Constructor, called during UD initialisation
[ { "docid": "08b4b3ae27b7f6a39381a07c5452378c", "score": "0.0", "text": "public function __construct() {\n\t\tadd_action('updraftplus_restored_db', array($this, 'updraftplus_restored_db'), 10, 2);\n\t\tadd_action('updraftplus_restored_db_table', array($this, 'updraftplus_restored_db_table'), 10, 3);\n\t\tadd_action('updraftplus_restore_db_pre', array($this, 'updraftplus_restore_db_pre'));\n\t\tadd_action('updraftplus_restore_db_record_old_siteurl', array($this, 'updraftplus_restore_db_record_old_siteurl'));\n\t\tadd_action('updraftplus_restore_db_record_old_home', array($this, 'updraftplus_restore_db_record_old_home'));\n\t\tadd_action('updraftplus_restore_db_record_old_content', array($this, 'updraftplus_restore_db_record_old_content'));\n\t\tadd_action('updraftplus_restore_db_record_old_uploads', array($this, 'updraftplus_restore_db_record_old_uploads'));\n\t\tadd_action('updraftplus_restored_plugins_one', array($this, 'restored_plugins_one'));\n\t\tadd_action('updraftplus_restored_themes_one', array($this, 'restored_themes_one'));\n\t\tadd_action('updraftplus_debugtools_dashboard', array($this, 'debugtools_dashboard'), 30);\n\t\tadd_action('updraftplus_adminaction_searchreplace', array($this, 'adminaction_searchreplace'));\n\t\tadd_action('updraftplus_migrate_tab_output', array($this, 'updraftplus_migrate_tab_output'));\n\t\tadd_action('updraftplus_creating_table', array($this, 'updraftplus_creating_table'), 10, 1);\n\t\t// Displaying notices after migration if migrated url exists in .htaccess file\n\t\tadd_action('all_admin_notices', array($this, 'migration_admin_notices'));\n\t\t \n\t\tadd_filter('updraftplus_restore_set_table_prefix', array($this, 'restore_set_table_prefix'), 10, 2);\n\t\tadd_filter('updraftplus_dbscan_urlchange', array($this, 'dbscan_urlchange'), 10, 3);\n\t\tadd_filter('updraftplus_https_to_http_additional_warning', array($this, 'https_to_http_additional_warning'), 10, 1);\n\t\tadd_filter('updraftplus_http_to_https_additional_warning', array($this, 'http_to_https_additional_warning'), 10, 1);\n\t\tadd_filter('updraftplus_dbscan_urlchange_www_append_warning', array($this, 'dbscan_urlchange_www_append_warning'), 10, 1);\n\t\t\n\t\tadd_filter('updraftplus_restorecachefiles', array($this, 'restorecachefiles'), 10, 2);\n\t\tadd_filter('updraftplus_restored_plugins', array($this, 'restored_plugins'));\n\t\tadd_filter('updraftplus_get_history_status_result', array($this, 'get_history_status_result'));\n\t\t// Actions/filters that need UD to be fully loaded before we can consider adding them\n\t\tadd_action('plugins_loaded', array($this, 'plugins_loaded'));\n\t}", "title": "" } ]
[ { "docid": "982b282d6d3706326f97c02079a0fa7d", "score": "0.8157278", "text": "private function __construct( )\n {\n $this->Initialise( );\n }", "title": "" }, { "docid": "625e1f14faaedc67311bb1e0f23a6267", "score": "0.80429804", "text": "public function __construct() {\n\t\t\t// leave empty, see singleton below\n\t\t}", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.8029203", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.8029203", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "2bd40717790f916a84e46bdc8dbb5d4e", "score": "0.79679406", "text": "private function __construct() {\n\t\t//\n\t}", "title": "" }, { "docid": "0666b14e1490be036701bc5d0a2f0c47", "score": "0.79539365", "text": "final private function __construct() {\r\n\t}", "title": "" }, { "docid": "0666b14e1490be036701bc5d0a2f0c47", "score": "0.79539365", "text": "final private function __construct() {\r\n\t}", "title": "" }, { "docid": "bf6415fa8c4a6fab5aef50bfb994cd99", "score": "0.7944319", "text": "protected function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "e66cb980f78f9e2b9174b4faf17224d2", "score": "0.7907302", "text": "private function __contructor() {}", "title": "" }, { "docid": "efd4a2eb68c8a49599d48b63a9a23267", "score": "0.78861415", "text": "protected function _construct() {}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.78793794", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.78793794", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.7866087", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "2c7f310971e413362d9c3e9fc45f752c", "score": "0.7846478", "text": "private function __construct() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e0d32b1092cccdabf07ea33174fe3780", "score": "0.78361946", "text": "protected function __construct() {\n\t\t//Generated by ManagerGenerator::generateConstruct() on 06/06/2017 11:24:56\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.7836024", "text": "private function __construct(){}", "title": "" }, { "docid": "cf5260a41ff6dc457912a8fdf7a8e5be", "score": "0.7828319", "text": "private function __construct()\n {\n }", "title": "" }, { "docid": "365fa1d285830c92f43002a58f01718f", "score": "0.7822195", "text": "private function _construct() {}", "title": "" }, { "docid": "9b1554e5bbcc6a0ae0c57795d17e8fb7", "score": "0.78198713", "text": "private function __construct() {\r\n\t}", "title": "" }, { "docid": "d6a1afef10e9f626192ef285db966c35", "score": "0.7819008", "text": "public function __construct(){\n\t\t\t\n\t\t\t$this->init( );\n\t\t}", "title": "" }, { "docid": "e9cadc1246d76d8211a08cf63917335a", "score": "0.7817583", "text": "public function __construct()\n\t\t{\n\t\t\n\t\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.781469", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.781469", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.781469", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.7813346", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.7813346", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.7813346", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7806053", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7806053", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7806053", "text": "public function init() {}", "title": "" }, { "docid": "da09d58cc20cad166e7dd61c95c70db4", "score": "0.7805777", "text": "protected function __construct() {\n\t\t//Generated by ManagerGenerator::generateConstruct() on 12/05/2017 15:43:03\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.7785782", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "4ac0a5f073697c8d3ff1ba0055192f6c", "score": "0.77842945", "text": "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "title": "" }, { "docid": "4ac0a5f073697c8d3ff1ba0055192f6c", "score": "0.77842945", "text": "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.77839684", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "f3f7530d499f282b1677193f38718083", "score": "0.7782581", "text": "private function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "f3f7530d499f282b1677193f38718083", "score": "0.7782581", "text": "private function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "f3f7530d499f282b1677193f38718083", "score": "0.7782581", "text": "private function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "15f695115c2c735a8c346788b6cb2511", "score": "0.77709174", "text": "private function __construct (){}", "title": "" }, { "docid": "9b4c1873a4542dbf73eb500d2c7bdbc0", "score": "0.7764812", "text": "private function __construct () {\n\t}", "title": "" }, { "docid": "e2edb80863931c711b5aec84b47dba76", "score": "0.77556384", "text": "function __construct( ) {\n $this->initialize( );\n }", "title": "" }, { "docid": "813b67675d2f7218fcf89417bb82a3f3", "score": "0.775224", "text": "private function __construct()\n \t{\n \t\t\t\n \t}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7749428", "text": "protected function init() {}", "title": "" }, { "docid": "085c774d204396744faaff6f591a546a", "score": "0.772824", "text": "private function ___construct()\n\t{\n\t\t$this->init();\n\t}", "title": "" }, { "docid": "056052bae1491e4f5207481c2b0a427a", "score": "0.7724091", "text": "public function __construct() {\n\n\t\t}", "title": "" }, { "docid": "fb4c3f07ec66dc085096bd8483bf3da6", "score": "0.772375", "text": "private final function __construct(){}", "title": "" }, { "docid": "f367678ba4de3094ba8fe4fd27f54d32", "score": "0.77210593", "text": "private function __construct()\n\t{ \n\t}", "title": "" }, { "docid": "81427cb81edc6995521f24ea70c130e3", "score": "0.7714186", "text": "function __construct()\n\t{\n\t\t// so this one is just a dummy one until it needs something to do.\n\t}", "title": "" }, { "docid": "00739776f32d69d24153dde97e0ec1b7", "score": "0.7711465", "text": "function __construct()\n\t\t{\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.76999724", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "86d305b7f898da39a6e09a7ed27a6cc0", "score": "0.76975816", "text": "protected function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.7693242", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "05b135ab3f6aedf2651984ce62cbf3a2", "score": "0.7689109", "text": "public function init() { }", "title": "" }, { "docid": "aa34413b119a090a1ccd9a288a5eacf0", "score": "0.76851344", "text": "public function __construct() {\n\t\t$this->_init();\n\t}", "title": "" }, { "docid": "c41deb021c32b4b05456fbde5a15525d", "score": "0.7683692", "text": "public function init() {\n }", "title": "" }, { "docid": "c9d90847d4c7669333e2c0c4e3c17cef", "score": "0.76816404", "text": "function __construct() {\n\t\t}", "title": "" }, { "docid": "c9d90847d4c7669333e2c0c4e3c17cef", "score": "0.76816404", "text": "function __construct() {\n\t\t}", "title": "" } ]
426a1bee9296fad46c9048d678bd7322
Public function batch_insert : void
[ { "docid": "3846d6f597a7e4c55bc7ba4109d9da6d", "score": "0.6660707", "text": "public function batch_insert($table, $insert_values_arr, $additional_strip_column = FALSE){\n if(!$additional_strip_column){\n $additional_strip_column = '';\n }\n else{\n $additional_strip_column = ','.$additional_strip_column;\n }\n $columns = $this->table_columns($table, 'id, create_date, update_date, is_deleted '.$additional_strip_column);\n $columns = implode(',',$columns);\n $ret_arr = [];\n foreach($insert_values_arr AS $ins){\n $query = \"INSERT INTO {$table}({$columns}) VALUES({$ins})\";\n $q = $this->query($query);\n array_push($ret_arr, $q);\n }\n\n return $ret_arr;\n }", "title": "" } ]
[ { "docid": "f242ca3ea7b1106a40eb0676a38d06eb", "score": "0.80469835", "text": "public function insert_batch($table, $data=array());", "title": "" }, { "docid": "b860a30459e7fe0aa359f972872b754e", "score": "0.7892704", "text": "function insertBatch($params)\n\t{\n\t\t$this->db->insert_batch('transaksi_item', $params);\n\t}", "title": "" }, { "docid": "18c71515830e4d2f02c9f33c358c3c5b", "score": "0.7335967", "text": "public function insert_batch($data)\n {\n foreach ($data as $i => $d) {\n $data[$i] = $this->trigger('before_create', $d);\n }\n \n $insert = $this->_database->insert_batch($this->_table, $data);\n $this->trigger('after_create', $data);\n return $insert;\n }", "title": "" }, { "docid": "7e555ab9acd1950d62790ec333710acd", "score": "0.73030984", "text": "public function insert_batch() {\n $datas = array();\n for ($i = 0; $i < 2; $i++) {\n $data[\"admin_email\"] = \"[email protected]\";\n $data[\"admin_name\"] = \"jyothi$i\";\n array_push($datas, $data);\n }\n $a = $this->crud->createData('admin_tbl', $datas);\n /* For get insert_id in every data, please use method insert_ids() */\n echo var_dump($this->crud->insert_ids());\n }", "title": "" }, { "docid": "403087033b6a1801f8d6c280a468f92b", "score": "0.7276171", "text": "public function insert_batch($table, $set = NULL, $escape = NULL, $batch_size = 100)\r\n {\r\n $affected_rows = parent::insert_batch($table , $set, $escape, $batch_size);\r\n $this->trail($affected_rows,'insert', $table, $set);\r\n\r\n return $affected_rows;\r\n }", "title": "" }, { "docid": "eac1539ec5d42b3c2e7a85d3222faeb6", "score": "0.7189963", "text": "function insert()\n {\n $query = Query::getQuery();\n \n $data = [];\n $result = [];\n for ( $index = 1; $index <= 1000; $index++ ) {\n $data[] = [':t' => 1 + $index, ':o' => 2 + $index, ':r' => 3 + $index];\n if ( ( $index % 1000 == 0 ) ) {\n $rowCount = $query->insert( '{{%product}}', ['t', 'o', 'r'], $data );\n \n $data = [];\n \n $result[ $rowCount ] = $query->getPreviousInsertId();\n }\n }\n App::createObject( Response::getClass() )\n ->end( 'Already to add 1000 records to database.' );\n }", "title": "" }, { "docid": "8090127b199cbe3d55ba79243a50ebcd", "score": "0.7172574", "text": "public function insert_multiple($data){\n\t\t$this->db->insert_batch('tbl_buku', $data);\n\t}", "title": "" }, { "docid": "1d4ad60339591aa1db434705b35d0d6c", "score": "0.71717703", "text": "public function insert_multiple($data){\n $this->db->insert_batch('siswa', $data);\n }", "title": "" }, { "docid": "b98e7e8e20037ff3fa66826b1bc0e064", "score": "0.71498024", "text": "public function insert_multiple($data){\n\t\t$this->db->insert_batch('tbl_data', $data);\n\t}", "title": "" }, { "docid": "9809c027e2767c1ae940a5e2ac39cd65", "score": "0.70999986", "text": "public function insert_batch($table, $data) {\n return $this->db->insert_batch($table, $data);\n }", "title": "" }, { "docid": "81102b1ebe46dd51844010d1c3c39082", "score": "0.70236754", "text": "function insert_batch_table($data) {\n $this->db->insert_batch(\"default_classes\", $data);\n }", "title": "" }, { "docid": "7bc43d5c1932756d782aa4a43aa9a80e", "score": "0.69406885", "text": "public function insert_batch(string $table, ?array $set = null, ?bool $escape = null, $batch_size = 100)\n {\n $this->ensureQueryBuilder($table);\n\n $ret = $this->builder->insertBatch($set, $escape, $batch_size);\n\n $this->_reset_write();\n\n return $ret;\n }", "title": "" }, { "docid": "0b08a3c808154198fa81c7abd4f3ad4c", "score": "0.69110733", "text": "public function insert_multiple($data){\n\t\t$this->db->insert_batch('pegawai', $data);\n\t}", "title": "" }, { "docid": "cf4917fe001520b1ede4782876b0b8e5", "score": "0.6895805", "text": "public function crud_batch_insert($table_name,$data)\n{\nif (count($data) > 0 && !empty($table_name))\n{\n$this->db->insert_batch($table_name, $data);\n$this->get_last_insert_id = $this->db->insert_id();\nreturn $this->get_last_insert_id;\n} else {\nthrow new Exception(\"THE TABLE NAME OR VALUE MISSING\");\n}\n}", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.6879454", "text": "public function insert();", "title": "" }, { "docid": "993277d846f341700b913fddf5a52d27", "score": "0.6825402", "text": "private function insertRows ()\n {\n \n }", "title": "" }, { "docid": "319db694f892985eeef3a513ec721152", "score": "0.6801956", "text": "public function f_insert_multiple($table_name, $data_array){\n\n $this->db->insert_batch($table_name, $data_array);\n\n return;\n\n }", "title": "" }, { "docid": "187f9398ceca453d9fb6cb3b5c2e07d1", "score": "0.67789155", "text": "public function insert_batch($table, $data) {\n $this->db->insert_batch($table, $data);\n if ($this->db->affected_rows() >= 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "1fe515c4d197200f6a30321f738b43cc", "score": "0.6734269", "text": "public function insertBatchData($tbname, $tbdata) {\n $this->db->insert_batch($tbname, $tbdata);\n }", "title": "" }, { "docid": "b674d912f30133c5b998f43d9399e662", "score": "0.67249256", "text": "public function batchInsert($arrInserts,$strTable) {\n\n $arrInsertRows = array();\n\n //build the batch statement components\n foreach($arrInserts as $row) {\n $arrInsertRows[] = implode(\",\",$row);\n }\n\n if(count($arrInsertRows)) {\n //get the field names\n $strKeys = implode(array_keys(current($arrInserts)));\n\n $strStatements = implode(\"),(\",$arrInsertRows);\n \\Database::getInstance()->executeUncached(\"INSERT INTO $strTable ($strKeys)VALUES($strStatements)\");\n }\n\n }", "title": "" }, { "docid": "d0518736079f73906f6076f9dd7718f9", "score": "0.66838557", "text": "public function insert_batch($table, $data=array())\n\t{\n\t\t// Each member of the data array needs to be an array\n\t\tif ( ! is_array(current($data))) return NULL;\n\n\t\t// Start the block of sql statements\n\t\t$sql = \"EXECUTE BLOCK AS BEGIN\\n\";\n\n\t\t$table = $this->quote_table($table);\n\t\t$fields = \\array_keys(\\current($data));\n\n\t\t$insert_template = \"INSERT INTO {$table} (\"\n\t\t\t. implode(',', $this->quote_ident($fields))\n\t\t\t. \") VALUES (\";\n\n\t\tforeach($data as $item)\n\t\t{\n\t\t\t// Quote string values\n\t\t\t$vals = array_map(array($this, 'quote'), $item);\n\n\t\t\t// Add the values in the sql\n\t\t\t$sql .= $insert_template . implode(', ', $vals) . \");\\n\";\n\t\t}\n\n\t\t// End the block of SQL statements\n\t\t$sql .= \"END\";\n\n\t\t// Ruturn a null array value so the query is run as it is,\n\t\t// not as a prepared statement, because a prepared statement\n\t\t// doesn't work for this type of query in Firebird.\n\t\treturn array($sql, NULL);\n\t}", "title": "" }, { "docid": "e31d0f18e1e95ae7a50c6eca7c3f1c5a", "score": "0.668332", "text": "public function processInserts($arrInserts) {\n\n }", "title": "" }, { "docid": "84cad1af767fb6ed01f19f4117557b6b", "score": "0.66693544", "text": "public function storeBatch(array $batch);", "title": "" }, { "docid": "81d37581a0d08d6ff05ad5bd7b46c52a", "score": "0.6639481", "text": "function insertMany(array $objects);", "title": "" }, { "docid": "442145845030481b7cf3353987c5ee02", "score": "0.6595842", "text": "public function insert(){}", "title": "" }, { "docid": "8eb8cd9a0c60dbe1d4af595c80c78258", "score": "0.6590616", "text": "public function add_batch($table,$data)\n {\n $array = array();\n if ($this->db->insert_batch($table, $data)) {\n $array['status'] = TRUE;\n $array['insert_id'] = $this->db->insert_id();\n } else {\n $array['status'] = FALSE;\n }\n // echo $this->db->last_query(); exit;\n return $array;\n }", "title": "" }, { "docid": "67b2241b17eb22082958c1e1fb35c3e5", "score": "0.6586052", "text": "public function insertBatch($table, $data)\n {\n $this->db->insert_batch($table, $data);\n return $this->db->affected_rows() ? true : false;\n }", "title": "" }, { "docid": "961de62aba61ac09a8b30ff7115ce1a3", "score": "0.6559739", "text": "public function multipleInsert()\n {\n $sql = '\n { query : [\n {\n table: \"users\" ,\n values: { firstname: \"' . $this->genFakeName() . '\", lastname: \"' . $this->genFakeName() . '\" }\n },{\n table: \"users\" ,\n values: { firstname: \"' . $this->genFakeName() . '\", lastname: \"' . $this->genFakeName() . '\" }\n }\n ] }\n\t\t';\n\n // Store the result\n $rs = PDO4You::insert($sql, 'pdo4you');\n\n echo '<code>&nbsp;<strong>Test with PDO4You::insert()</strong></code>';\n echo '<code class=\"debug\">PDO4You::insert(' . $this->formatSql($sql) . ', ' . $this->formatDB() . ');' . $this->formatRS($rs, true, true) . '</code>';\n }", "title": "" }, { "docid": "98b2b6e722ae1479b356950c3cdd8d91", "score": "0.6522673", "text": "private function buildInsert(): void {\r\n\r\n $this -> query[] = 'INSERT';\r\n $this -> buildIgnore();\r\n }", "title": "" }, { "docid": "cf51585a16f16328b922860c69fcd708", "score": "0.6517883", "text": "protected abstract function insert();", "title": "" }, { "docid": "c2c74b23937412bdf468614fa64a43e4", "score": "0.6509676", "text": "function insertMulti($table, $fields, $values) {\n\t\t$primaryKey = $this->_getPrimaryKey($table);\n\t\t$hasPrimaryKey = $primaryKey != null && (\n\t\t\t(is_array($fields) && in_array($primaryKey, $fields)\n\t\t\t|| (is_string($fields) && strpos($fields, $this->startQuote . $primaryKey . $this->endQuote) !== false))\n\t\t);\n\n\t\tif ($hasPrimaryKey) {\n\t\t\t$this->_execute('SET IDENTITY_INSERT ' . $table . ' ON');\n\t\t}\n\t\tparent::insertMulti($table, $fields, $values);\n\t\tif ($hasPrimaryKey) {\n\t\t\t$this->_execute('SET IDENTITY_INSERT ' . $table . ' OFF');\n\t\t}\n\t}", "title": "" }, { "docid": "a0a5b9ef9bd522a63ca54a27a6cf35e1", "score": "0.6469398", "text": "abstract protected function insert();", "title": "" }, { "docid": "1240a19467d36a82c48f9b31900d722c", "score": "0.6460488", "text": "abstract public function insert();", "title": "" }, { "docid": "4cc80e59a979ed9e61ec9142958bc674", "score": "0.6460048", "text": "public function insert_batch($array = array())\n {\n if(count($array) == 0)\n {\n return FALSE;\n }\n\n $this->db->insert_batch($this->table, $array);\n\n log_debug($this->db->last_query());\n\n return ($this->db->affected_rows() > 0);\n }", "title": "" }, { "docid": "a042f8bbe0702b265ae8bc85857584b8", "score": "0.6439203", "text": "public function insert_multiple($data){\n $insert = $this->db->insert_batch('agenda', $data);\n if($insert){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "002019cd9224f2ee4ba45f4872e0d2aa", "score": "0.6439031", "text": "public function add_batch($data)\n {\n $res = $this->db->autoExecute($this->ecs->table(\"batch\"), $data, 'INSERT');\n if ($res) {\n return $this->db->insert_id();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "cf96cbe7df3ad847a152b3263b5749d4", "score": "0.64324087", "text": "function db_multi_insert($db, $table, array $columns, array $data) {\n\tDBProfile::query('insert');\n\tif ($db===null){\n\t\t$db=db_get_connection();\n\t}\n\t$query = \"INSERT INTO $table (\".implode(',',$columns).') VALUES ';\n\t$values = array();\n\tforeach ($data as $datum){\n\t\t$values[]= '('.implode(', ',array_map('_db_validate_value',$datum)).')';\n\t}\n\t$query.= implode(',', $values);\n\tunset($values);\n\t$res = mysql_query($query,$db);\n\tif(!$res){\n\t\treturn mysql_error();\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "e72d0820fe1042be08c21138801aaae6", "score": "0.6422562", "text": "public function insert(array $data);", "title": "" }, { "docid": "a841d5e6849df4b81b50111cb73d3c89", "score": "0.6405325", "text": "function insert();", "title": "" }, { "docid": "a4da66ecfe1fa9d60b70db37d3c9cbfc", "score": "0.6395787", "text": "public function insert_batch($table, $values) {\n $GLOBALS['$logger']->info(\"Executing insert_batch Query for the Table: \".$table);\n try {\n $this->db->initialize();\n $insert = $this->db->insert_batch($table,$values);\n $error = $this->db->error();\n if ($error['code']!= 0) {\n $GLOBALS['$logger']->info(\"/-------------------------------------------------------------------------/\");\n throw new Exception($error['message'], $error['code'], NULL);\n }\n $this->db->close();\n return $insert;\n } catch (Exception $e) {\n $GLOBALS['$logger']->info('Exception in dbFramework!!!'.PHP_EOL.$e.PHP_EOL.'Query: '.$table);\n $this->db->close();\n $msg = $e->getMessage();\n $code = $e->getCode(); \n throw new LConnectApplicationException($code, new Exception(), $msg);\n }\n }", "title": "" }, { "docid": "c056bc0fd9428376ed009248914aefd3", "score": "0.63831925", "text": "public function batchInsert($index, $columns, $rows, &$params)\n {\n return $this->generateBatchInsertReplace('INSERT', $index, $columns, $rows, $params);\n }", "title": "" }, { "docid": "2c90189c4d132e5e312ab3a12e399db7", "score": "0.63616014", "text": "function insert($data)\n {\n $this->db->insert_batch('contact_table', $data);\n }", "title": "" }, { "docid": "b24bbdfd2e73ef1681655903554bcb37", "score": "0.63450855", "text": "function upsert_multi(DatastoreClient $datastore, array $tasks)\n{\n // [START upsert_multi]\n $datastore->upsertBatch($tasks);\n // [END upsert_multi]\n}", "title": "" }, { "docid": "7464618e9e75e4ed4e6a9017bb279443", "score": "0.632763", "text": "public function HourComponentFixedInsertBatch(\\Controle\\HourComponentFixed\\Insert\\Batch $parameters) {\n return $this->__soapCall(\n 'HourComponentFixed_Insert_Batch',\n array($parameters),\n array('uri'=>'https://api.nmbrs.nl/soap/v2.1/EmployeeService')\n );\n\t}", "title": "" }, { "docid": "dedadb0efe6072623bc96a18d02678d6", "score": "0.6318017", "text": "public function insertMultiple(array $data): void\n {\n $escapedData = [];\n\n foreach ($data as $row) {\n $escapedData[] = $this->getEscapedArray($row, false);\n }\n\n $this->db->insert_query_multiple(\n static::TABLE_NAME,\n $escapedData\n );\n }", "title": "" }, { "docid": "b16670a8fb9754bbd5f4cded32ea15a6", "score": "0.63142526", "text": "public function testInsertAll()\n {\n $this->object->insertAll(0, new \\Xyster\\Collection\\ArrayList);\n }", "title": "" }, { "docid": "36063d24c3c8c775dfa01ed6424c809c", "score": "0.6312319", "text": "public function WageComponentFixedInsertBatch(\\Controle\\WageComponentFixed\\Insert\\Batch $parameters) {\n return $this->__soapCall(\n 'WageComponentFixed_Insert_Batch',\n array($parameters),\n array('uri'=>'https://api.nmbrs.nl/soap/v2.1/EmployeeService')\n );\n\t}", "title": "" }, { "docid": "66b9241d7b5be0753c9f00a8bdd4233f", "score": "0.62889624", "text": "function multiple_insert($tabla, $datos) {\n\t\tif (!$this->conectado)\n\t\t\treturn FALSE;\n\t\t\n\t\tif (!is_array($datos))\n\t\t\treturn FALSE;\n\t\t\n\t\t$sql = \"\";\n\t\t$num_reg = count($datos);\n\t\t\n\t\tfor ($i=0; $i<$num_reg; $i++)\n\t\t\t$sql .= $this->preparar_insert($tabla, $datos[$i]) . \";\\n\";\n\t\t\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "4eff1c67716c3624acc803c8935df1b0", "score": "0.6283262", "text": "function add_post_op_pain_management_data_1($patient_form_id,$post_op_pain_management_1)\n{\n for($i=0; $i<count($post_op_pain_management_1);$i++)\n{\n $data[] = array(\n 'patient_form_id' => $patient_form_id,\n 'post_op_pain_management_1_id' => $post_op_pain_management_1[$i]\n );\n }\n if (isset($post_op_pain_management_1))\n {\n $this->db->insert_batch('patient_form_post_op_pain_management_details_1', $data);\n }\n}", "title": "" }, { "docid": "6c47eb5c7a4adfe36e0bf27325c79193", "score": "0.62829065", "text": "public function executeInserts()\n {\n if ( ! $this->_queuedInserts) {\n return;\n }\n\n $postInsertIds = array();\n $idGen = $this->_class->idGenerator;\n $isPostInsertId = $idGen->isPostInsertGenerator();\n\n $stmt = $this->_conn->prepare($this->getInsertSQL());\n $tableName = $this->_class->table['name'];\n\n foreach ($this->_queuedInserts as $entity) {\n $insertData = $this->_prepareInsertData($entity);\n\n if (isset($insertData[$tableName])) {\n $paramIndex = 1;\n foreach ($insertData[$tableName] as $column => $value) {\n $stmt->bindValue($paramIndex++, $value, $this->_columnTypes[$column]);\n }\n }\n\n $stmt->execute();\n\n if ($isPostInsertId) {\n $id = $idGen->generate($this->_em, $entity);\n $postInsertIds[$id] = $entity;\n } else {\n $id = $this->_class->getIdentifierValues($entity);\n }\n\n if ($this->_class->isVersioned) {\n $this->_assignDefaultVersionValue($this->_class, $entity, $id);\n }\n }\n\n $stmt->closeCursor();\n $this->_queuedInserts = array();\n\n return $postInsertIds;\n }", "title": "" }, { "docid": "cd7639da3a6efad011be560edd506c65", "score": "0.62809443", "text": "public function WageComponentVarInsertBatch(\\Controle\\WageComponentVar\\Insert\\Batch $parameters) {\n return $this->__soapCall(\n 'WageComponentVar_Insert_Batch',\n array($parameters),\n array('uri'=>'https://api.nmbrs.nl/soap/v2.1/EmployeeService')\n );\n\t}", "title": "" }, { "docid": "4949c1639bde9b9db095f8a665a81ae8", "score": "0.62730944", "text": "public function insert(array $data = []);", "title": "" }, { "docid": "b3347242f08601af045c73bd933e2031", "score": "0.6261468", "text": "public function insertBatch($data, $tableName, $throwException = false) \n {\n\n if ($this->db->insert_batch($tableName, $data)) {\n return true;\n } else {\n if ($throwException) {\n throw new Exception(\"Insert Batch Error\");\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "3cf287a533ace4e5129e190f139c21c4", "score": "0.62604696", "text": "public function HourComponentVarInsertBatch(\\Controle\\HourComponentVar\\Insert\\Batch $parameters) {\n return $this->__soapCall(\n 'HourComponentVar_Insert_Batch',\n array($parameters),\n array('uri'=>'https://api.nmbrs.nl/soap/v2.1/EmployeeService')\n );\n\t}", "title": "" }, { "docid": "6817572ea43e0347616463e32f1bb553", "score": "0.6258033", "text": "public function insertAll($list) {\n if (!is_array($list) && !($list instanceof ArrayIterator))\n throw new \\InvalidArgumentException(\"Argument to insertAll must be iterable.\");\n if (count($list) == 0) return;\n $tmpl = null;\n $fields = array();\n $q = $this->createQuery(DBQuery::INSERT);\n foreach ($list as $i => $obj) {\n if (!($obj instanceof DBObject))\n throw new \\InvalidArgumentException(sprintf(\"insertAll arguments must be DBObject's; %s found instead.\", get_class($obj)));\n if ($tmpl === null) {\n $tmpl = $obj;\n $fields = $tmpl->db_fields();\n $q->fields($fields, $tmpl->db_name());\n }\n elseif (get_class($tmpl) != get_class($obj))\n throw new \\InvalidArgumentException(sprintf(\"Expected element %s to be of type %s, found %s instead.\", $i, get_class($tmpl), get_class($obj)));\n\n $this->fillSetQuery($obj, $q, $fields);\n }\n $this->query($q);\n }", "title": "" }, { "docid": "ee3776227fc64d9db86e7487a5b17e3d", "score": "0.6247733", "text": "function query_insert_many($table, $datas) {\n\t\tif (empty($datas)) return false;\n\t\t$table = preg_replace('/\\./', '`.`', $table);\n\t $q=\"INSERT INTO `\".$this->pre.$table.\"` (\";\n\t $v=''; #$n='';\n\t \n\t foreach ($datas[0] as $k => $v) $q .= \"`$k`, \";\n\t \n\t $q = rtrim($q, ', ') . \") VALUES \";\n\t \n\t foreach ($datas as $data) {\n\t \t$v = '';\n\t\t foreach($data as $key=>$val) {\n\t\t #$n.=\"`$key`, \";\n\t\t if(strtolower($val)=='null') $v.=\"NULL, \";\n\t\t elseif(strtolower($val)=='now()') $v.=\"NOW(), \";\n\t\t elseif(preg_match('/^md5\\(/i', $val)) $v.=$val.', ';\n\t\t # <|F|> == Formula. Useful for formulas, such as Qty = Qty - #number#\n\t\t elseif(preg_match('/^<\\|F\\|>/', $val)) $v.=preg_replace('/^<\\|F\\|>/', '', $val).', ';\n\t\t else $v.= \"'\".$this->clean($val).\"', \";\n\t\t }\n\t\t \n\t\t\t$q .= \"(\". rtrim($v, ', ') .\"), \";\n\t }\n\t \n\t if($this->query(rtrim($q, ', ') . ';')){\n\t //$this->free_result();\n\t return $this->inserted_id();\n\t }\n\t else return false;\n\t}", "title": "" }, { "docid": "7d123e45481770775e0af96edd8fd26b", "score": "0.62447566", "text": "private function insertData(){\n\t\tglobal $database;\n\t\t$query = \"INSERT INTO \".static::$tablename;\n\t\t$query .= \"(\";\n\t\t$query .= implode(\", \",array_keys(static::$tablefields));\n\t\t$query .= \") VALUES ( '\";\n\t\t foreach (array_values(static::$tablefields) as $value) {\n\t \t $fieldvalues[] = $database->escapeString($value);\n\t\t }\n\t\t$query .= implode(\"','\",$fieldvalues);\n\t\t$query .= \"' )\";\n $database->query($query);\n\t $database->getInsertedId();\n\t}", "title": "" }, { "docid": "1708f2afaa378bcc8bf8a51dda144c36", "score": "0.6240481", "text": "public function insert(){\n\t\tglobal $E;\n\t\t$flds = array();\n\t\t$vals = array();\n var_dump( $this->data );\n\t\tforeach ( $this->data as $index => $item ){\n\t\t\tif( (!empty( $index ) ) && ( !empty( $item ) ) ){\n\t\t\t\tif( $index != $this->keyfield)\n\t\t\t\t\t$flds[] = '`'.$index.'`';\n\t\t\t\t\t$vals[] = \"'$item'\";\n\t\t\t}\n\t\t}\n var_dump( $vals );\n echo \"<br>sss<br>\";\n\t\tif( count( $flds ) > 0){\n\t\t\t$flds = implode( ',', $flds );\n\t\t\t$vals = implode( ',', $vals ); \n// var_dump( $vals );\n\t\t\t$sql = \"INSERT INTO `{$this->table}` (\".$flds.\") VALUES ( \".$vals.\" )\";\n\t\t\treturn $this->db->sql_query( $sql );\n\t\t} else {\n\t\t\t$E->setError( CANTSAVE.\" for insert\");\n\t\t\treturn ERRCODE;\n\t\t}\n\t}", "title": "" }, { "docid": "a4cfbbd1ab8a4441f982f24a224d227e", "score": "0.6227352", "text": "public function insert(array $data=[]);", "title": "" }, { "docid": "99474c19733aa414546fd8e2a29fe6b6", "score": "0.6226686", "text": "function add_post_op_pain_management_data($patient_form_id,$post_op_pain_management)\n{\n for($i=0; $i<count($post_op_pain_management);$i++)\n{\n $data[] = array(\n 'patient_form_id' => $patient_form_id,\n 'post_op_pain_management_id' => $post_op_pain_management[$i]\n );\n }\n if (isset($post_op_pain_management))\n {\n $this->db->insert_batch('patient_form_post_op_pain_management_details', $data);\n }\n}", "title": "" }, { "docid": "12ace6db97334fe4646d73538d0f62f1", "score": "0.6185771", "text": "function insertCustomer($data){\n\n\t\t\t$query = $this->db->insert_batch($this->_table,$data);\n\n\t\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "cc728d0985687496e901e199d8fb24ff", "score": "0.6178558", "text": "public static function insert()\n {\n }", "title": "" }, { "docid": "cc728d0985687496e901e199d8fb24ff", "score": "0.6178558", "text": "public static function insert()\n {\n }", "title": "" }, { "docid": "42dbc65a1ed0345cf8a55f5626fe77a0", "score": "0.61767256", "text": "public function push(array $batch) { \n $entries = array();\n foreach ($batch as $record) {\n $body = json_encode($record);\n $entries[] = array('Id' => uniqid(), 'MessageBody' => $body);\n }\n\n \\cli::log('Pushing a batch of ' . sizeof($batch) . ' records to sqs table : ' . $this->_queueUrl);\n $result = $this->_client->sendMessageBatch(array('QueueUrl' => $this->_queueUrl, 'Entries' => $entries));\n\n return $result;\n }", "title": "" }, { "docid": "e938cee30b6cd8cd77f4dde529a3b50e", "score": "0.6167755", "text": "static public function groupInsertToDb($tableName, $Datas, $db = \"subdb\", $update_fields = array())\r\n {\r\n $totalInserted = 0;\r\n $fields_str = '';\r\n $sql_values = '';\r\n $fields = array();\r\n //step 1, create a full SQL.\r\n $i = 10000;\r\n $starti = $i + 1;\r\n $bindDatas = array();\r\n foreach ($Datas as $data) {\r\n $i++;\r\n\r\n $bindDatas[$i] = $data;\r\n $eachRecordValues = '';\r\n\r\n //找到这个表要insert 的所有field 字段名\r\n if ($fields_str == '') {\r\n foreach ($data as $fieldName => $fieldValue) {\r\n\r\n if (!empty($update_fields) and empty($update_fields[$fieldName]))\r\n continue;\r\n\r\n $fields_str .= empty($fields_str) ? \"\" : \",\";\r\n $fields_str .= $fieldName;\r\n $fields[] = $fieldName;\r\n }\r\n $sql = \" INSERT INTO `$tableName` ( $fields_str ) VALUES \";\r\n }\r\n\r\n //值的排列\r\n foreach ($data as $fieldName => $fieldValue) {\r\n if (!empty($update_fields) and empty($update_fields[$fieldName]))\r\n continue;\r\n\r\n $eachRecordValues .= empty($eachRecordValues) ? \"\" : \",\";\r\n $eachRecordValues .= \":\" . $fieldName . $i;\r\n }\r\n\r\n $sql_values .= ($sql_values == '' ? '' : \",\") . \"( $eachRecordValues )\";\r\n\r\n if (strlen($sql_values) > 2000) {\r\n //one sql syntax do not exceed 4800, so make 3000 as a cut here\r\n\r\n $command = Yii::$app->get($db)->createCommand($sql . $sql_values . \";\");\r\n\r\n //bind all values\r\n for ($tempi = $starti; $tempi <= $i; $tempi++) {\r\n foreach ($fields as $aField) {\r\n $command->bindValue(':' . $aField . $tempi, $bindDatas[$tempi][$aField], \\PDO::PARAM_STR);\r\n }\r\n }//end of each data index for this bulk insert\r\n\r\n $totalInserted += $command->execute();\r\n\r\n $sql_values = '';\r\n $starti = $i + 1;\r\n }\r\n }//end of each track no\r\n\r\n //step 2, insert the rest\r\n if ($sql_values <> '') {\r\n if ($db == 'subdb')\r\n $command = Yii::$app->subdb->createCommand($sql . $sql_values . \";\");\r\n elseif ($db == 'ost_db')\r\n $command = Yii::$app->ost_db->createCommand($sql . $sql_values . \";\");\r\n elseif ($db == 'db_queue')\r\n $command = Yii::$app->db_queue->createCommand($sql . $sql_values . \";\");\r\n elseif ($db == 'db_queue2')\r\n $command = Yii::$app->db_queue2->createCommand($sql . $sql_values . \";\");\r\n else\r\n $command = Yii::$app->db->createCommand($sql . $sql_values . \";\");\r\n\r\n for ($tempi = $starti; $tempi <= $i; $tempi++) {\r\n foreach ($fields as $aField) {\r\n $command->bindValue(':' . $aField . $tempi, $bindDatas[$tempi][$aField], \\PDO::PARAM_STR);\r\n }\r\n }//end of each data index for this bulk insert\r\n $totalInserted += $command->execute();\r\n }\r\n\r\n return $totalInserted;\r\n }", "title": "" }, { "docid": "2f92d9ef187e37e944ac49fa21dcb055", "score": "0.6165143", "text": "function insertJarum($data){\n\n\t\t\t$query = $this->db->insert_batch('jarum',$data);\n\n\t\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "e692a78ef77d6430c5d60620316a1fbe", "score": "0.61548334", "text": "public function bulkCreate($data);", "title": "" }, { "docid": "98457e54aca1c9109d072905e22836a1", "score": "0.6151203", "text": "public function insertAll($rows)\n\t{\n\t\t$connection = $this->manager->getConnection();\n\t\t$driver = $connection->getSupplementalDriver();\n\t\t$connection->query('INSERT INTO ' . $driver->delimite($this->name), $rows);\n\t}", "title": "" }, { "docid": "aa7baffdb533adef262236dfa550af5b", "score": "0.6122693", "text": "private function insert_all($mysql) {\n $sql = '';\n $sql.= self::FLG<1?'':\"begin; \\n\";\n\n\n // $sql = 'INSERT INTO kaitou ('.implode(', ', $this->csv_col).') VALUES'.\"\\n\";\n $handle = fopen( self::CSV_FILE, 'r' );\n if ( $handle ) {\n $key = 0;\n while (($data = fgetcsv($handle)) !== false) {\n if ($key > 0) {\n $insert_val = array();\n $insert_col = array();\n foreach ($data as $key_val => $value) {\n if (in_array($key_val, array_keys($this->int_val))) {\n if (strlen($value) > 0) {\n $insert_val[] = (int)$value;\n $insert_col[] = $this->csv_col[$key_val];\n }\n } else {\n $insert_col[] = $this->csv_col[$key_val];\n $insert_val[] = '\"'.$mysql->real_escape_string(trim($value)).'\"';\n }\n }\n\n $sql.= \"INSERT INTO kaitou (\".implode(', ', $insert_col).') VALUES (';\n $sql.= implode(', ', $insert_val);\n $sql.= \"); \\n\";\n }\n\n $key++;\n }\n }\n\n fclose($handle);\n\n $fp = fopen(self::SQL_FILE, 'a');\n fwrite($fp, $sql);\n fclose($fp);\n }", "title": "" }, { "docid": "933ba1096254f35ab73db0a28e6fce26", "score": "0.6095714", "text": "function insert_stop_arrivals($batch_data) {\n $save_sql = \"INSERT INTO batch_journey_all (stopid,\"\n \t .\"visitnumber,destinationtext,vehicleid,estimatedtime,\"\n\t .\"expiretime,recordtime,uniqueid) \"\n\t .\"VALUES (:stopid, :visitnumber, :destinationtext, :vehicleid, \"\n\t .\":estimatedtime, :expiretime, :recordtime, :uniqueid) \";\n\n $save_uniqueid = $this->DBH->prepare($save_sql);\n\n foreach($batch_data as $entry) {\n $save_uniqueid->bindValue(':stopid', $entry['stopid'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':visitnumber', $entry['visitnumber'],PDO::PARAM_INT);\n $save_uniqueid->bindValue(':destinationtext', $entry['destinationtext'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':vehicleid', $entry['vehicleid'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':estimatedtime', $entry['estimatedtime'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':expiretime', $entry['expiretime'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':recordtime', $entry['recordtime'],PDO::PARAM_STR);\n $save_uniqueid->bindValue(':uniqueid', $entry['uniqueid'], PDO::PARAM_STR);\n $save_uniqueid->execute();\n } \n }", "title": "" }, { "docid": "c26eb1962a1d0ec5239a5de0f885f302", "score": "0.60919374", "text": "public function insertAll() {\n // delete all previous experience\n $this->removeAll();\n\n // wait for all inserts to work before commit\n $this->conn->beginTransaction();\n\n // make a query to insert all \n $query = \"INSERT INTO \".$this->tableName.\" (id_profession, title, description, id_user) \n VALUES (:id_profession, :title, :description, :id_user)\";\n\n // create prepare statement\n $stmt = $this->conn->prepare($query);\n\n // sanitize each entry given\n $this->id_user = htmlspecialchars(strip_tags($this->id_user));\n for($i = 0; $i < count($this->id_profession); $i++) {\n $this->id_profession[$i] = htmlspecialchars(strip_tags($this->id_profession[$i]));\n $this->title[$i] = htmlspecialchars(strip_tags($this->title[$i]));\n $this->description[$i] = htmlspecialchars(strip_tags($this->description[$i]));\n\n // bind parameters to the prepare statement\n $stmt->bindParam(':id_profession', $this->id_profession[$i]);\n $stmt->bindParam(':title', $this->title[$i]);\n $stmt->bindParam(':description', $this->description[$i]);\n $stmt->bindParam(':id_user', $this->id_user);\n\n // execute each query\n $stmt->execute();\n }\n\n // commit changes\n $this->conn->commit();\n }", "title": "" }, { "docid": "7a6ad0e94931c38ad1efc25f586eabbb", "score": "0.6080402", "text": "function insert() {\n\n\n\t}", "title": "" }, { "docid": "f998e5db64f4d860e1b66d0b862a65c7", "score": "0.6071458", "text": "function queueForInsert() {\n\t\t// If we've reached the maximum batch size, insert it and empty it.\n\t\tif (count(Guest::$_insertBatch) >= Guest::$_insertBatchSize) {\n\t\t\tGuest::insertBatch();\n\t\t}\n\n\t\tGuest::$_insertBatch[] = $this;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "88f981834ee1ddd3bdcfc06f8ea760c8", "score": "0.606297", "text": "function add_post_op_pain_agent_data($patient_form_id,$post_op_pain_agent)\n{\n for($i=0; $i<count($post_op_pain_agent);$i++)\n{\n $data[] = array(\n 'patient_form_id' => $patient_form_id,\n 'anesth_agent_id' => $post_op_pain_agent[$i]\n );\n }\n if (isset($post_op_pain_agent))\n {\n $this->db->insert_batch('patient_form_post_op_pain_agent_details', $data);\n }\n}", "title": "" }, { "docid": "de80ac3357515eb0818678be32c29c94", "score": "0.60536593", "text": "public function insert($data, $batch = false) {\n\t\tif(!$batch) {\n\t\t\t$insert = $this->db->insert($this->table, $data);\n\t\t}else {\n\t\t\t$insert = $this->db->insert_batch($this->table, $data);\n\t\t}\n\n\t\treturn $insert;\n\t}", "title": "" }, { "docid": "69616bb7caebd86ce019d5d463222d46", "score": "0.6040183", "text": "function insert_separate($table, $keys, $data) {\r\n\t\t$key = \"\";\r\n\t\t$val = \"\";\r\n\t\tforeach ($data as $k=>$v) {\r\n\t\t\t$key .= \"`\".$keys[$k].\"`,\";\r\n\t\t\tif ($v != 'NULL')\r\n\t\t\t\t$val .= \"'\".$v.\"',\";\r\n\t\t\telse\r\n\t\t\t\t$val .= $v.\",\";\r\n\t\t}\r\n\t\t$key = \"(\".substr($key,0,-1).\")\";\r\n\t\t$val = \"(\".substr($val,0,-1).\")\";\r\n\t\t$query = \"INSERT INTO $table $key VALUES $val\";\r\n\t\t//echo $query;\r\n\t\t$result = mysql_query($query, $this->link) or die('Query failed: '.mysql_error());\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "ce86d25d0d3d59000056ac14a5851759", "score": "0.6024094", "text": "public function loadAll() {\n $this->db->query(\"truncate table {$this->table}\"); \n foreach ($this->data as $row) {\n $this->db->insert($this->table, array_combine($this->fields, $row));\n }\n\n }", "title": "" }, { "docid": "a8d9a3f86375a48e2c96660dce146285", "score": "0.6019496", "text": "public function insert(){\n\n\t}", "title": "" }, { "docid": "8afb4ea4087de9c33fccef56b17052c6", "score": "0.6010147", "text": "public function push(array $batch) { \n $content = null;\n foreach ($batch as $record) {\n $content .= json_encode(array('Data' => json_encode($record), 'PartitionKey' => uniqid(),)) . PHP_EOL;\n }\n \n $result = file_put_contents($this->_filename, $content, FILE_APPEND);\n \\cli::log('Pushing a batch of ' . sizeof($batch) . ' records to file : ' . $this->_filename);\n\n return $result;\n }", "title": "" }, { "docid": "dbc71573c7a2e18ab37160565e4bdfc0", "score": "0.6006237", "text": "function bulkOperation()\n {\n }", "title": "" }, { "docid": "11328b112731c99cb7e4f54d6d1cab2d", "score": "0.5995554", "text": "public function insert() {\n if(-1 == $this->getId())\n {\n \n $db = DatabaseHandler::getInstance();\n \n $db->connect();\n \n $db->executeNonSelect($this->getInsertSql());\n \n //need to get last id and set it in memory, as this will be used again later\n $this->setId($db->getLastInsertID());\n if(NULL != $this->getJobsList())\n {\n \n $this->processInsertUpdate($db);\n \n } else {\n $this->update();\n }\n \n }\n }", "title": "" }, { "docid": "8cd56b87c09022c12498f7bd7740399c", "score": "0.59885585", "text": "function db_insert($table, $input){\n\t$columns = '';\t\n\t$placeholders = '';\t\n\t$total = count($input);\n\t$i = 1;\n\tforeach ($input as $key => $val){\n\t\t$columns .= $key;\n\t\t$placeholders .= ':' . $key;\n\t\tif ($val != NULL){\n\t\t\t$data[$key] = $val;\n\t\t}else{\n\t\t\t$data[$key] = NULL;\n\t\t}\n\t\tif ($total != $i){\n\t\t\t$columns .= \", \";\n\t\t\t$placeholders .= \", \";\n\t\t}\n\t\t$i++;\n\t}\n\ttry {\n\t\t$a = $GLOBALS['database']->prepare(\"INSERT INTO $table ($columns) value ($placeholders)\");\n\t\t$a->execute($data);\n\t}\n\tcatch(PDOException $e) {\n\t echo $e->getMessage();\n\t}\n\t$o = $GLOBALS['database']->lastInsertId();\n\treturn $o;\n}", "title": "" }, { "docid": "cc0c8acd3d8060ec769600b38170b065", "score": "0.59757394", "text": "public function insert(){\n\t}", "title": "" }, { "docid": "97c5bd57b35844d17e1b93c5668908bf", "score": "0.5969705", "text": "public function insert()\n\t{\n\n\t}", "title": "" }, { "docid": "3ed4d6c3bf1650c66a92710eeba1b609", "score": "0.596907", "text": "public function insertAll() {\n // delete all previous language\n $this->removeAll();\n\n // wait for all inserts to work before commit\n $this->conn->beginTransaction();\n\n // make a query to insert all \n $query = \"INSERT INTO \".$this->tableName.\" (id_user, id_language, id_language_level) \n VALUES (:id_user, :id_language, :id_language_level)\";\n\n // create prepare statement\n $stmt = $this->conn->prepare($query);\n\n // sanitize each entry given\n $this->id_user = htmlspecialchars(strip_tags($this->id_user));\n for($i = 0; $i < count($this->id_language); $i++) {\n $this->id_language[$i] = htmlspecialchars(strip_tags($this->id_language[$i]));\n $this->id_language_level[$i] = htmlspecialchars(strip_tags($this->id_language_level[$i]));\n\n // bind parameters to the prepare statement\n $stmt->bindParam(':id_language', $this->id_language[$i]);\n $stmt->bindParam(':id_language_level', $this->id_language_level[$i]);\n $stmt->bindParam(':id_user', $this->id_user);\n\n // execute each query\n $stmt->execute();\n }\n\n // commit changes\n $this->conn->commit();\n }", "title": "" }, { "docid": "98bbf84fafecea0fd1fa69a77206f54c", "score": "0.59432393", "text": "function action_insert_all($var1,$var2,$var3,$var4,$var5){\r\n \t return DB::GetInstance()->Set(\"INSERT INTO action VALUES ($var1,$var2,'$var3','$var4','$var5')\");\r\n }", "title": "" }, { "docid": "615afec22dbaecd60d39aed98b7cdcbb", "score": "0.5939569", "text": "function insert()\n{\n\t$common = new AiCommon();\n\techo \"Running insert() function from line \" . __LINE__ . \"...\\n\";\n\t\n\t// insert two new records\n\t$queries = array(\n\t\t\"INSERT INTO test_table ( id, int_field, str_field, bool_field ) VALUES ( DEFAULT, 1, '\" . $common->mDb->escapeString( \"A 'test' \\\"String\\\"\" ) . \"', \" . $common->mDb->fixDbBoolean( 1 ) . \" )\",\n\t\t\"INSERT INTO test_table ( id, int_field, str_field, bool_field ) VALUES ( DEFAULT, 1, '\" . $common->mDb->escapeString( \"Another 'test' \\\"String\\\"\" ) . \"', \" . $common->mDb->fixDbBoolean( 1 ) . \" )\"\n\t);\n\t\n\tforeach( $queries as $index => $sql )\n\t{\n\t\techo \"Executing query:\\n\" . stripslashes( $sql ) . \"\\n\";\n\t\t$common->mDb->query( $sql, __FILE__, __LINE__ );\n\t}\n\t\n\techo \"Now retrieving all records...\\n\";\n\tgetAllRecords();\n\t\n}", "title": "" }, { "docid": "d57a5e4e0a5b79d7cec1ae6772828632", "score": "0.5931453", "text": "public function Insert(array $data):int{\n $keys='' ; $values='';\n foreach ($data as $key=>$value){\n $keys .= $key. ' , '; \n $values .= \" '$value' , \"; \n }\n $this->Sql= \"INSERT INTO $this->TableName (\".rtrim($keys , ', ').\") values (\".rtrim($values , ', ').\")\"; \n return $this->exec(); \n }", "title": "" }, { "docid": "9ae46b38c7b62c28ac68a5dff431032b", "score": "0.5922734", "text": "abstract function queryInsert($tableName, array $valueArray, $mode=self::C_ALLOW_DUPLICATES);", "title": "" }, { "docid": "5fdbfa8e66bca9accbb9324360e43db9", "score": "0.5914019", "text": "public function run()\n\t{\n\t\t$chunk = array_chunk(self::ITEMS, floor(count(self::ITEMS) / 2));\n\n\t\tforeach ($chunk as $items) {\n\t\t\t$collection = [];\n\n\t\t\tforeach ($items as $item) {\n\t\t\t\t$collection[] = $item;\n\t\t\t}\n\n\t\t\tDB::table($this->table)->insert($collection);\n\t\t}\n\t}", "title": "" }, { "docid": "c364f1b880fb14313fd2bd932d4a7cf2", "score": "0.5911474", "text": "public function insertAsBulk(string $table, array $data): bool\n {\n $binds = [];\n $columns = $this->getInclusiveColumns($data);\n $default = \\array_fill_keys($columns, null);\n\n foreach ($data as $row) {\n $row = \\array_merge($default, $row);\n $binds = \\array_merge($binds, \\array_values($row));\n }\n\n $sql = \"INSERT INTO {$table} (\" . \\implode(',', $columns) . ') VALUES ';\n $set = '(' . \\rtrim(\\str_repeat('?,', \\count($columns)), ',') . ')';\n $sql .= \\rtrim(\\str_repeat($set . ',', \\count($data)), ',');\n\n return $this->execute($sql, $binds);\n }", "title": "" }, { "docid": "981ce510e2dda608bbd0ad0c41b5645c", "score": "0.59079444", "text": "function insert_set_items( $items )\n\t{\n\t\t$res = $this->db->insert_batch( 'mb_set_items', $items );\n\n\t\tif ( $res )\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b1ed1178e80c44452f8744e6c388d445", "score": "0.59036845", "text": "public function insert_array($table, $insert_values){\n\t\tforeach($insert_values as $key=>$value){\n\t\t\t$keys[] = $key;\n\t\t\t$insertvalues[] = '\\''.$value.'\\'';\n\t\t}\n\t\t$keys = implode(',', $keys);\n\t\t$insertvalues = implode(',', $insertvalues);\n\t\t$sql = \"INSERT INTO $table ($keys) VALUES ($insertvalues)\";\n\t\t$this->sqlordie($sql);\n\t}", "title": "" }, { "docid": "4c22a2dd14c137a9b01356d34cf53586", "score": "0.5903509", "text": "public function insertThis(){\r\n $data = $this->_prepareStorageData(false);\r\n $this->id = $this->ins($this->table, $data);\r\n }", "title": "" }, { "docid": "07fdcc2ae60796d2cbe4153e8513b4ff", "score": "0.5889625", "text": "function insert_best_results($selected_rows) {\n echo \"Inserting correct rows...\";\n $sql = \"INSERT INTO batch_journey_all (stopid,visitnumber,destinationtext,vehicleid,estimatedtime,expiretime,recordtime,uniqueid) \"\n .\"VALUES (:stopid, :visitnumber, :destinationtext, :vehicleid, :estimatedtime, :expiretime, :recordtime, :uniqueid)\";\n\n $insert_rows = $this->DBH->prepare($sql);\n\n foreach($selected_rows as $entry) {\n $insert_rows->bindValue(':stopid', $entry['stopid'],PDO::PARAM_STR);\n $insert_rows->bindValue(':visitnumber', $entry['visitnumber'],PDO::PARAM_INT);\n $insert_rows->bindValue(':destinationtext', $entry['destinationtext'],PDO::PARAM_STR);\n $insert_rows->bindValue(':vehicleid', $entry['vehicleid'],PDO::PARAM_STR);\n $insert_rows->bindValue(':estimatedtime', $entry['estimatedtime'],PDO::PARAM_STR);\n $insert_rows->bindValue(':expiretime', $entry['expiretime'],PDO::PARAM_STR);\n $insert_rows->bindValue(':recordtime', $entry['recordtime'],PDO::PARAM_STR);\n $insert_rows->bindValue(':uniqueid', $entry['uniqueid'],PDO::PARAM_STR);\n $insert_rows->execute();\n }\n }", "title": "" }, { "docid": "b79598ea680efee605478018e88c8f14", "score": "0.58846647", "text": "private function _makeInsert() {\n\t\t$cola = NULL;\n\t\t$colb = NULL;\n\t\t$and = NULL;\n\t\tif (!empty($this->_q['inserts']['a']) && is_array($this->_q['inserts']['a'])) {\n\t\t\tforeach ($this->_q['inserts']['a'] as $k=>$v) {\n\t\t\t\tif (!empty($cola)) $and = ', ';\n\t\t\t\t$cola .= $and.'`'.$v.'`';\n\t\t\t\tif (empty($this->_q['inserts']['b'][$k]) && !is_numeric($this->_q['inserts']['b'][$k])) $this->_q['inserts']['b'][$k] = \"''\"; \n\t\t\t\t$colb .= $and.$this->_q['inserts']['b'][$k];\n\t\t\t}\n\t\t\t$this->_q['set'] = '('.$cola.') VALUES ('.$colb.')';\n\t\t}\n\t\tif (!empty($cola)) return false;\n\t\telse return true;\n\t}", "title": "" }, { "docid": "1b56fed281f2220264d6e593d3e6e029", "score": "0.5882418", "text": "function handleInserts($debug) {\n\tglobal $numRows, $numColumns, $connection;\n\n\t// outputs (variables that are modified)\n\tglobal $numRowsInserted, $data, $errorMessages;\n\n\t// look for up to 1000 new rows. too bad if the user entered more than 1000 new rows.\n\tfor ($rowNum = $numRows; $rowNum < $initialNumRows + 1000; $rowNum++) {\n\t\t$haveSomeData = false;\n\t\tfor ($colNum = 0; $colNum < $numColumns; $colNum++) {\n\t\t\t$cellId = makeCellId($rowNum, $colNum);\n\t\t\t$postedValue = $_POST[$cellId];\n\t\t\tif ($postedValue) {\n\t\t\t\t$haveSomeData = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ($haveSomeData) {\n\t\t\t$sql = generateInsertCommand($rowNum);\n\n\t\t\tif ($debug) {\n\t\t\t\techo \"$sql<br>\";\n\t\t\t}\n\n\t\t\tif (mysql_query($sql, $connection)) {\n\t\t\t\t$numRowsInserted++;\n\t\t\t} else {\n\t\t\t\t$errorMessages .= mysql_error() . '<br>';\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7e8aca4cb02db02fc8f45c0a00cbb1ba", "score": "0.5877996", "text": "function insert($table, $data) {\n\t$columns = \" (\";\n\t$values = \" (\";\n\tforeach ( $data as $columnName => $value ) {\n\t\t$columns .= $columnName . \", \";\n\t\t$values .= \"'\" . $value . \"', \";\n\t}\n\t$columns = substr ( $columns, 0, strlen ( $columns ) - 2 ) . \")\";\n\t$values = substr ( $values, 0, strlen ( $values ) - 2 ) . \")\";\n\t\n\t$insert = \"INSERT INTO \" . $table . $columns . \" VALUES \" . $values . \";\";\n\trunInsert ( $insert );\n}", "title": "" }, { "docid": "16e27e9e5866b25e6ed89738c4274f75", "score": "0.5872647", "text": "public function generateSqlInsert() {\n\t\t$column = explode($this->separator, $this->tab['column']);\n\t\t$column = implode(',', $column);\n\t\t$column = trim($column);\n\n\t\t$req = \"INSERT INTO $this->table ($column) VALUES \\n\";\n\n\t\t$valueTab = [];\n\t\tforeach ($this->tab['content'] as $key => $value) {\n\t\t\t$tmpTab = explode($this->separator, $value);\n\t\t\t$tmpTab = $this->escapeValue($tmpTab);\n\n\t\t\t$reqValue = implode(',', $tmpTab);\n\n\t\t\t$valueTab[] = \"($reqValue)\";\n\t\t}\n\n\t\t$reqValue = implode(', ', $valueTab);\n\n\t\t$req .= \"$reqValue;\";\n\n\t\t$this->finalReq = $req;\n\t}", "title": "" }, { "docid": "70172ec95437a1c6d2dcdc8a37175b2e", "score": "0.5870493", "text": "private function beginBatch() {\n\n //Start up the batch\n $this->batch = $this->client->startBatch();\n\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "4a5dc5b34cb385b300df1e57fcb806ef", "score": "0.0", "text": "public function create()\n {\n $tipos = Tipo::pluck('tipo', 'id');\n $empresas = Empresa::pluck('nombre', 'id');\n\n return view('proyectos.create', compact('tipos', 'empresas'));\n }", "title": "" } ]
[ { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "f6d3fc80bf700f89fa22e42e685b217d", "score": "0.7184248", "text": "public function create()\n {\n return view ('penilaiansmp.form');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.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": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a7352ebb77d0418eb30e8fe2e7bfb857", "score": "0.7087128", "text": "public function actionCreate()\n\t{\n\t\t$this->render('create');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "033dad9a04f818507b4dc909e40e2cca", "score": "0.6988088", "text": "public function create()\n {\n $data[\"action\"] = 'anggota.store';\n return view('anggota.form', $data);\n }", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "121c8c321a85cfc3184f64d92ecfca6c", "score": "0.6954882", "text": "public function create()\n\t{\n\t\treturn view ('oficinas.create');\n\t}", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "50d6adc18861a552fb9ddb0969a2630f", "score": "0.69202167", "text": "public function create()\n {\n return view('umbooks::admin.models.book.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "98e3bff438d778b0a9ccaad60778cf09", "score": "0.69096565", "text": "public function create()\n {\n return view('admin/car/add-car');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "eec374cbf73315b7af3e5f2b21f37d4d", "score": "0.69059855", "text": "public function create()\n {\n return view('linhvuc.create');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "985e9c7c0b741b5b1eb67c091e5ad371", "score": "0.6886975", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('oficinas.create');\n\t}", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6648fe4f8fd4df24b091c04829b92bbb", "score": "0.6878773", "text": "public function create()\n\t{\n\t\treturn View::make('powerful.create');\n\t}", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "60ee9672a795f51a440ede1e68b26045", "score": "0.6870999", "text": "public function create()\n {\n return view('smp.create');\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "d14776cad1affd8d37756a185e7fe660", "score": "0.68665606", "text": "public function create()\n {\n return view('relasi.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" } ]
b432eaeffe32490e3a4f7b6eab94b7a1
A basic unit test example.
[ { "docid": "f33f6ae881ac51162874c6dc71c29e44", "score": "0.0", "text": "public function testDelete()\n {\n $service = new ScheduleDeleteService($this->scheduleRepo);\n $result = $service->delete(1);\n\n $this->assertTrue($result);\n }", "title": "" } ]
[ { "docid": "781e992105ab5350d7b6803e68439e7c", "score": "0.80752075", "text": "public function testExample()\n {\n }", "title": "" }, { "docid": "4fc6137a2fdeb0555a3d1ac619ecb26b", "score": "0.76924044", "text": "public function testSample()\n\t{\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "83305b3fb9cf6ea444c429d40e89622c", "score": "0.7590508", "text": "public function testExample() {\n $this->assertTrue(true); // uvijek mora proci\n }", "title": "" }, { "docid": "55798086742f8091cb2544b59379dd1e", "score": "0.75840735", "text": "public function testSample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "f829224432aa487d74c70c0783fb42f9", "score": "0.7575706", "text": "public function testGetGreetings()\n {\n }", "title": "" }, { "docid": "9bb7d6a32f7db4bf20830ab46f52b6b9", "score": "0.7557095", "text": "public function testMe()\n\t{\n\t}", "title": "" }, { "docid": "f7966c192a8d080a33ebbd4daa46fb78", "score": "0.75257766", "text": "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "f7966c192a8d080a33ebbd4daa46fb78", "score": "0.75257766", "text": "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "e7b2443f2745f839c94397f4b8681e70", "score": "0.75253415", "text": "public function testWillPass()\n {\n echo \"This will pass.\";\n }", "title": "" }, { "docid": "355c99151f633c8c1efcdf9ab8d6e429", "score": "0.7444021", "text": "public function testBasic()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "0603eb617e4e9a32ce20cd823b541754", "score": "0.74334717", "text": "public function testGetGreeting()\n {\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7423434", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.741977", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.741977", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.7393162", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.7393162", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.7393162", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.7393162", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "575de5bef13f2420fba0a3c89522b2e5", "score": "0.73790437", "text": "public function testExample()\n {\n $this->assertTrue(true);\n\n }", "title": "" }, { "docid": "0979880c44f9974d7dfe60947b0dcd06", "score": "0.73704946", "text": "function test_sample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "83b283456ff0eed7dfcfd68a2113c168", "score": "0.7326179", "text": "public function testExample(): void\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "8b7afd97fe81c2a6b9107ca20b4fe4c8", "score": "0.73195136", "text": "public function testGetUserGreetings()\n {\n }", "title": "" }, { "docid": "0a5918c91d145e87534f4dde8c9bc252", "score": "0.7278367", "text": "public function testBasicExample()\n {\n $this->withoutExceptionHandling();\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Trade');\n });\n }", "title": "" }, { "docid": "f6c4d8a9b97949a5f7a1d89b6beb1496", "score": "0.7276946", "text": "public function test()\n\t{\n\n\t}", "title": "" }, { "docid": "899dca00ff0bd6d58f9bd8312410d563", "score": "0.72506726", "text": "public function testExample()\n {\n // dump('token');\n //\n //\n // $this->assertTrue(true);\n }", "title": "" }, { "docid": "095c1d6f679cce1ca8789c25569d5297", "score": "0.72414595", "text": "public function testOne()\n {\n }", "title": "" }, { "docid": "bcfbd74a05ac0dd9b55f73e640b1a173", "score": "0.7201384", "text": "public function testBasicTest()\n {\n $this->assertTrue(true,\"Basic result\");\n }", "title": "" }, { "docid": "8ff5e0b9f51cc1a62bd3131824c41dd3", "score": "0.7193064", "text": "public static function test() {\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "550cf58b117378eb01795b61f8aca08a", "score": "0.7143564", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "7274683e1b4236e3906e08abdc8e5a83", "score": "0.71398926", "text": "public function testBasicTest()\n {\n // Arrange:定義要使用的資料\n $originNumber = 1;\n $addedNumber = 2;\n $expectResult = 3;\n\n // Act:定義要執行的動作\n $actingResult = $this->add($originNumber, $addedNumber);\n\n // Assert:斷言執行的結果\n $this->assertEquals($expectResult, $actingResult);\n }", "title": "" }, { "docid": "2af57d55cdff871280409bc319e78d97", "score": "0.71217054", "text": "public function test()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "92b1586174a50adc63129116cb6e62df", "score": "0.71172434", "text": "public function testDummy() {\n\n }", "title": "" }, { "docid": "f96be7c7ad437f35e5ada648cc8e4273", "score": "0.7096041", "text": "public function testRun()\n {\n }", "title": "" }, { "docid": "5f1eb4d2f755060c331fa5e2f8516082", "score": "0.70947", "text": "public function testExampleTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "1d95a34f137bb9ca7f70dcd7a577b7f8", "score": "0.7083192", "text": "public function testHelloWorld() {\n $this->assertTrue(true);\n $this->assertFalse(false);\n $this->assertEquals(10, 10);\n }", "title": "" }, { "docid": "61fc3e4dbce8883a5aeaa0efd140c120", "score": "0.70708853", "text": "public function testExample()\n {\n $this->assertTrue(false);\n }", "title": "" }, { "docid": "e05bd019a25d002af5f0b26f3f4f8052", "score": "0.7060646", "text": "public function testBasicExample()\n {\n $this->markTestSkipped('This is an example basic test');\n }", "title": "" }, { "docid": "4851741d98f3d458af885a0cd6bb4873", "score": "0.70576", "text": "public function test_example()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "4851741d98f3d458af885a0cd6bb4873", "score": "0.70576", "text": "public function test_example()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "b8d0c7bd25426e9f52324d8178d43dc9", "score": "0.70553315", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/one/two')\n ->assertSee('http://localhost:8000/one/two')\n ->pause(5000);\n });\n }", "title": "" }, { "docid": "ddb0a425b6e9a5343fb8a5212ee7534a", "score": "0.705466", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Hola Mundo!');\n }", "title": "" }, { "docid": "28683b0c0c66912e9a20ba6dabc886ca", "score": "0.7046146", "text": "public function testFoo()\n { }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "3ea65ba002a94652e2bcf07f0d132bbc", "score": "0.0", "text": "public function run()\n {\n $foods = [\n [\n 'name' => 'Nasi Goreng',\n 'type' => 'makanan',\n 'price' => 20000\n ],\n [\n 'name' => 'Es Jeruk',\n 'type' => 'minuman-dingin',\n 'price' => 5000\n ],\n [\n 'name' => 'Kentang Goreng',\n 'type' => 'cemilan',\n 'price' => 10000\n ],\n\n ];\n\n foreach ($foods as $food) {\n $food['status'] = 'ready';\n Food::updateOrCreate(['name' => $food['name']], $food);\n }\n\n for ($x=1; $x<=10; $x++) {\n Table::updateOrCreate(['name' => 'Meja '. $x], [\n 'name' => 'Meja '. $x,\n 'seat' => 4\n ]);\n }\n }", "title": "" } ]
[ { "docid": "ba2a7f942feff00bea6c9ca893111631", "score": "0.8144927", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $faker = Faker::create();\n foreach (range(1, 10) as $index) {\n DBS::table('books')->insert([\n 'title' => $faker->name,\n 'description' => $faker->text(355)\n ]);\n }\n\n foreach (range(1, 10) as $index) {\n DBS::table('authors')->insert([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "29c2cd808c3202eaf0dd76362c0ccb86", "score": "0.8049916", "text": "public function run() {\n /* Settings */\n App\\Models\\Settings::create(['modified' => date(\"Y-m-d H:i:s\", time())]);\n\n /* User groups */\n App\\Models\\UserGroup::create(['name' => 'Administrator', 'alias' => 'administrator', 'is_admin' => 1]);\n App\\Models\\UserGroup::create(['name' => 'Support', 'alias' => 'support', 'is_admin' => 1]);\n App\\Models\\UserGroup::create(['name' => 'Registered', 'alias' => 'registered']);\n\n /* Users */\n App\\Models\\User::create(['email' => '[email protected]', 'password' => 'b59c67bf196a4758191e42f76670ceba', 'group_id' => 1, 'first_name' => 'Admin', 'terms_accepted' => true, 'is_verified' => true]); // pass: 1111\n\n\n\n echo \"\\n\\n\\nSeeding completed. \\n\\n\\n\";\n }", "title": "" }, { "docid": "9a90b1a3921e6e5f972bb47b90af3c5c", "score": "0.79920006", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n if (config('database.default') !== 'sqlite') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n }\n\n $faker = app(Faker\\Generator::class);\n\n \\App\\Article::truncate();\n $categoryIds = \\App\\Category::\n whereKeyName('articles')->firstOrFail()\n ->children()->pluck('id');\n for ($i = 0; $i < 100; $i++) {\n $date = $faker->dateTimeThisMonth;\n\n \\App\\Article::create([\n 'title' => $faker->sentence(),\n 'content' => $faker->paragraph(),\n 'user_id' => 1,\n 'category_id' => $faker->randomElement($categoryIds),\n 'created_at' => $date,\n 'updated_at' => $date,\n ]);\n }\n \n\n // App\\Category::truncate();\n // factory(App\\Category::class, 10)->create();\n\n // $categories = App\\Category::all();\n // $categories->each(function ($category) use ($faker) {\n // $parentIds = App\\Category::pluck('id')->toArray();\n // App\\Category::create([\n // 'name' => $faker->word(),\n // 'value' => $faker->sentence(),\n // 'parent_id' => $faker->randomElement($parentIds),\n // ]);\n // });\n\n if (config('database.default') !== 'sqlite') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }\n }", "title": "" }, { "docid": "d50ef144cc9f789d5d628a6e5bb14596", "score": "0.7939677", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $names = ['test',];\n // foreach ($names as $name) {\n // DB::table('users')->insert([\n // 'name' => $name,\n // 'email' => '[email protected]',\n // 'email_verified_at' => null,\n // 'password' => 'aaaa',\n // 'remember_token' => 'aaaa',\n // 'created_at' => null,\n // 'updated_at' => null,\n // ]);\n // }\n // DB::table('users')->insert([\n // 'name' => 'test',\n // 'email' => '[email protected]',\n // 'email_verified_at' => null,\n // 'password' => 'testuser',\n // 'remember_token' => 'bbbb',\n // 'created_at' => null,\n // 'updated_at' => null,\n // ]);\n\n DB::table('todos')->insert([\n 'title' => 'test02 todo',\n 'description' => 'test02aaaaamediwl.co.jp',\n // 'user_id' => 2,\n 'created_at' => null,\n 'updated_at' => null,\n ]);\n }", "title": "" }, { "docid": "6b6c53f7f55ac8689721060fb0e32060", "score": "0.7930545", "text": "public function run()\n {\n\n $this->call(UserTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n\n TipoEmpleado::create([\n \"id\"=> 1,\n \"descripcion\"=> \"Tipo 1\",\n ]);\n TipoEmpleado::create([\n \"id\"=> 2,\n \"descripcion\"=> \"Tipo 2\",\n ]);\n TipoServicio::create([\n 'id'=>1,\n 'descripcion'=>\"tecnico\"\n ]);\n TipoOrden::create([\n 'id' => 1,\n 'descripcion' => \"mantenimiento de equipo\",\n 'idTipoServ' => 1\n ]);\n\n TipoOrden::create([\n 'id' => 2,\n 'descripcion' => \"mantenimiento de equipo 2\",\n 'idTipoServ' => 1\n ]);\n }", "title": "" }, { "docid": "e61011079697409dd28d70e1afaf1a4b", "score": "0.7902253", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('admins')->insert([\n [\n 'name' => 'Pablo Eliézer',\n 'age' => 21,\n 'location' => 'Brazil',\n 'email' => '[email protected]',\n 'password' => Hash::make('senhasenha'),\n ]\n ]);\n\n DB::table('categories')->insert([\n [\n 'name' => 'Notebook'\n ],\n [\n 'name' => 'Smartphone'\n ],\n [\n 'name' => 'Acessório'\n ]\n ]);\n\n DB::table('products')->insert([\n [\n 'name' => 'Notebook Positivo x89',\n 'description' => 'A Notebook for gamers',\n 'price' => 2999.90,\n 'category_id' => 1\n ],\n [\n 'name' => 'Notebook acer aspire e5',\n 'description' => 'A notebook for home',\n 'price' => 2000.0,\n 'category_id' => 1\n ],\n [\n 'name' => 'Mouse gamer multilaser',\n 'description' => 'A mouse for gamers',\n 'price' => 12.50,\n 'category_id' => 3\n ]\n ]);\n }", "title": "" }, { "docid": "601c9f5adb750eb17baec3eb8a073b2f", "score": "0.78864557", "text": "public function run()\n {\n // Truncamos los datos de los modelos y insertamos de nuevo en cada seed\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tDB::table('rol_usuario')->truncate();\n\t\tRol::truncate();\n\t\tUsuario::truncate();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n\t\tfactory(Rol::class)->create( ['nombre' => 'administrador'] );\n\t\tfactory(Rol::class)->create( ['nombre' => 'profesor' ]);\n\t\tfactory(Rol::class)->create( ['nombre' => 'alumno' ]);\n\n\t\tfactory(Usuario::class, 15)\n\t\t\t->create()\n\t\t\t->each(function($usuario){\n\t\t\t\t$usuario\n\t\t\t\t\t->roles()\n\t\t\t\t\t->attach( array_rand(array_flip(range(1, 3)), 2) );\n\t\t\t});\n\n }", "title": "" }, { "docid": "f8572188bddb161144aea3d168a25218", "score": "0.7873561", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Post::create([\n 'title' => 'first post',\n 'description' => 'sfdsgdfhgfhfdhgf dgdfghfhfd fgdfgdfgdfgdfgdfg dfgdfg dgdgdfdfg dfgdfgdf'\n ]);\n\n Post::create([\n 'title' => 'second post',\n 'description' => 'sfdsgdfhgfhfdhgf dgdfghfhfd fgdfgdfgdfgdfgdfg dfgdfg dgdgdfdfg dfgdfgdf'\n ]);\n\n Post::create([\n 'title' => 'third post',\n 'description' => 'sfdsgdfhgfhfdhgf dgdfghfhfd fgdfgdfgdfgdfgdfg dfgdfg dgdgdfdfg dfgdfgdf'\n ]);\n\n Post::create([\n 'title' => 'forth post',\n 'description' => 'sfdsgdfhgfhfdhgf dgdfghfhfd fgdfgdfgdfgdfgdfg dfgdfg dgdgdfdfg dfgdfgdf'\n ]);\n\n Post::create([\n 'title' => 'fifth post',\n 'description' => 'sfdsgdfhgfhfdhgf dgdfghfhfd fgdfgdfgdfgdfgdfg dfgdfg dgdgdfdfg dfgdfgdf'\n ]);\n }", "title": "" }, { "docid": "fe6f19a5746c2a0d0d8a6823ea8a234f", "score": "0.7860805", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name' => 'Admin Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('adminadmin123'),\n 'role_id' => 2\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Teacher T',\n 'email' => '[email protected]',\n 'password' => Hash::make('teacher123'),\n 'role_id' => 3\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Student S',\n 'email' => '[email protected]',\n 'password' => Hash::make('student123'),\n 'role_id' => 4\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'guest'\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'admin'\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'teacher'\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'student'\n ]);\n }", "title": "" }, { "docid": "ead05576222a7b98f627ad0b3d816a51", "score": "0.78585047", "text": "public function run()\n {\n\n $faker = Factory::create();\n\n // create a few articles,users,comments,categories in database:\n for ($i = 0; $i < 10; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'img' => $faker->imageUrl(),\n 'body' => $faker->paragraph,\n 'user_id' => value(1),\n 'category_id' => value(1),\n ]);\n // User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->email,\n // 'address' => $faker->address,\n // 'birthday' => $faker->date(),\n // 'is_admin' => 0,\n // 'genre' => $faker->boolean,\n // 'password' => Hash::make('123456')\n // ]);\n Activity::create([\n 'title' => $faker->title,\n 'description' => $faker->sentence,\n 'video' => $faker->imageUrl(),\n ]);\n // Comment::create([\n // 'body' => $faker->sentence,\n // 'user_id' => value(1),\n // 'article_id' => value(1),\n // ]);\n // Category::create([\n // 'name' => $faker->colorName,\n\n // ]);\n }\n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "84bf4540c405e2d12bac39868aad8f88", "score": "0.7852115", "text": "public function run()\n {\n // 获取所有的用户ID\n $userIds = \\App\\Models\\User::all()->pluck('id')->toArray();\n\n // 获取所有的分类ID\n $categoryIds = \\App\\Models\\Category::all()->pluck('id')->toArray();\n\n // 获取 faker 实例\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(\\App\\Models\\Article::class)\n ->times(100)\n ->make()\n ->each(function ($article, $index) use ($userIds, $categoryIds, $faker) {\n $article->user_id = $faker->randomElement($userIds);\n $article->category_id = $faker->randomElement($categoryIds);\n });\n\n \\App\\Models\\Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "d05a23144d4053ba91a484e6083190a5", "score": "0.7848844", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory('App\\Category',10)->create();\n factory('App\\Product',10)->create();\n factory('App\\Customer',10)->create();\n factory('App\\Payment_type',3)->create();\n factory('App\\Discount_coupon',10)->create();\n factory('App\\Order',10)->create();\n factory('App\\Funne',5)->create();\n factory('App\\Sale',50)->create();\n\n }", "title": "" }, { "docid": "3e7023d70d57f3f9b56959f17b704a12", "score": "0.7841247", "text": "public function run()\n {\n Model::unguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Seed `administrators` table\n $administratorsCount = count(factory(Administrator::class, 10)->create());\n\n // Seed `positions` table\n $positions = factory(Position::class, 50)->make()\n ->each(function (Position $position) use ($administratorsCount) {\n $position->admin_created_id = rand(1, $administratorsCount);\n })->toArray();\n Position::insert($positions);\n\n // Seed `currencies` table\n Currency::insert(factory(Currency::class)->make()->toArray());\n\n $positionsCount = count($positions);\n $employeeCount = 200;\n\n // Seed `employees` table\n $employees = factory(Employee::class, $employeeCount)->make()->each(function (Employee $employee) use ($administratorsCount, $positionsCount, $employeeCount) {\n $employee->position_id = rand(1, $positionsCount);\n $employee->head_id = rand(1, $employeeCount);\n $employee->admin_created_id = rand(1, $administratorsCount);\n })->toArray();\n Employee::insert($employees);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n Model::reguard();\n }", "title": "" }, { "docid": "ff6d8982b92524a888efce2a30ce8bc8", "score": "0.78397703", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n comentaris::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \tcomentaris::create([\n \t\t'idcomentaris' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'comtext' => $faker->text($maxNbChars = 150)),\n \t\t'comvaloracio' => $faker->numberBetween($min = 1, $max = 5),\n \t]);\n }\n }", "title": "" }, { "docid": "9d5426c433e865e0ab876c87bb2cf5fe", "score": "0.7837698", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Producto::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 Producto::create([\n 'cCodigo' => $faker->number,\n 'cNombreProducto' => $faker->sentence,\n 'nPrecioUnitario' => $faker->number,\n 'nCostoUnitario' => $faker->number,\n 'nGanancia' => $faker->number,\n 'dUltimaVenta' => $faker->date,\n 'nGanancia' => $faker->number,\n 'body' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "824b616639f21882ef847d8ba3e46846", "score": "0.78351504", "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\tArtist::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tfor($i = 1; $i <= 30; $i++)\n\t\t{\n\t\t\tArtist::create([\n\t\t\t\t'user_id' => $i,\n\t\t\t\t'genre_id' => rand(1, 16),\n\t\t\t\t'name' => User::find($i)->displayname\n\t\t\t]);\n\t\t}\n\n\t\t// foreach(range(1, 30) as $index)\n\t\t// {\n\n\t\t// \t$artistId = User::orderBy(DB::raw('RAND()'))->first();\n\n\t\t// \tArtist::create([\n\t\t// \t\t'user_id' => $artistId->id,\n\t\t// \t\t'name' => $artistId->displayname\n\t\t// \t]);\n\t\t// }\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "ae2a3bbf2354a38f1451660d46cf7942", "score": "0.78222734", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Models\\School::class, 1)->create();\n\n factory(App\\Models\\Campus::class, 3)->create();\n\n factory(App\\Models\\Department::class, 8)->create();\n\n factory(App\\Models\\Course::class, 20)->create();\n\n factory(App\\Models\\Klass::class, 8)->create();\n\n factory(App\\Models\\Student::class, 100)->create();\n\n }", "title": "" }, { "docid": "3c3cb3db77c202749ef6f7a8ab620cf7", "score": "0.7809915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // factory(Year::class,20)->create();\n\n // factory(Category::class,9)->create();\n\n // factory(Actor::class,20)->create();\n\n // factory(Country::class,50)->create();\n\n // factory(Director::class,10)->create();\n\n // factory(Musician::class,10)->create();\n\n // factory(Producer::class,10)->create();\n\n //factory(Movie::class,50)->create();\n\n //factory(Tvshow::class,50)->create();\n }", "title": "" }, { "docid": "8ba30aed33421cb2190c8ce7f2f23503", "score": "0.7805362", "text": "public function run()\n {\n\n Schema::disableForeignKeyConstraints();\n\n DB::table('streams')->truncate();\n DB::table('users')->truncate();\n DB::table('teachers')->truncate();\n DB::table('classes')->truncate();\n DB::table('students')->truncate();\n DB::table('years')->truncate();\n DB::table('terms')->truncate();\n DB::table('subjects')->truncate();\n DB::table('exams')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n DB::table('years')->insert(['name' => now()->yearIso]);\n\n factory(\\App\\Subject::class, 2)->create();\n factory(\\App\\Stream::class, 2)->create();\n factory(\\App\\User::class)->create();\n factory(\\App\\Teacher::class, 10)->create();\n factory(\\App\\Classes::class, 2)->create();\n factory(\\App\\Student::class, 30)->create();\n factory(\\App\\Term::class, 10)->create();\n factory(\\App\\Exam::class, 10)->create();\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "eb3e3c0db9406880d4600007d8ed77d8", "score": "0.78030676", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'name' => 'Administrator'\n ]);\n Role::create([\n 'name' => 'Member'\n ]);\n Status::create([\n 'name' => 'Active'\n ]);\n Status::create([\n 'name' => 'Inactive'\n ]);\n\n $sites = ['Smart City' => 'smart', 'EZ Pay' => 'ezpay', 'Sinaoo' => 'sinao', 'Tebar Benih' => 'tebar', 'Cilik' => 'cilik', 'T&D Jogja' => 'jogja'];\n foreach($sites as $sit => $site){\n Site::create([\n 'name' => $sit,\n 'description' => $site\n ]);\n }\n\n User::create([\n 'name' => 'Admin',\n 'last_name' => 'Smart City',\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'role_id' => 1,\n 'site_id' => 1\n ]);\n\n\n }", "title": "" }, { "docid": "8c4b3e56763a8136fa081c97c3656358", "score": "0.78006244", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Charla::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('es_ES');\n\n // And now, let's create a few articles in our database:\n for ($i = 1; $i < 5; $i++) {\n Charla::create([\n 'nombre' => $faker->name,\n 'fecha' => $faker->dateTime($max = 'now', $timezone = null),\n 'sala_id' => $faker->randomNumber(1),\n 'speaker_id' => $faker->randomNumber(1),\n ]);\n }\n }", "title": "" }, { "docid": "21539179ecb4247f62869e626ba00f7b", "score": "0.7797443", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'remember_token' => Str::random(10),\n 'email_verified_at' => now(),\n 'password' => Hash::make('hello123')\n ]);\n\n User::create([\n 'name' => 'Abhinav Garg',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'remember_token' => Str::random(10),\n 'password' => Hash::make('hello123')\n ]);\n\n User::factory(2)->create();\n News::factory(5)->create(['user_id' => '1']);\n News::factory(5)->create(['user_id' => '2']);\n Event::factory(5)->create(['user_id' => '1']);\n Event::factory(10)->create(['user_id' => '2']);\n }", "title": "" }, { "docid": "ac3cc80cfbbc09843ad8b07da133efc7", "score": "0.77973807", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Bruno',\n 'last_name' => 'Díaz',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'birth_day' => '1939-05-01',\n 'tipo' => 'admin'\n ]);\n\n DB::table('categories')->insert(\n ['name' => 'Libros', 'active' => true],\n ['name' => 'Comics', 'active' => true],\n ['name' => 'Videojuegos', 'active' => true],\n ['name' => 'Películas', 'active' => true],\n ['name' => 'Series', 'active' => true]\n );\n }", "title": "" }, { "docid": "c9ecfc191091b7afa905e657b02c9941", "score": "0.77953374", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // to insert fake record in categories table -start\n /* DB::table('categories')->insert([\n 'categoryname' => str_random(10),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]); */\n // to insert fake record in categories table -end\n\n factory(App\\Category::class,5)->create(); // to insert 5 fake records in category\n \n factory(App\\Product::class,5)->create(); // to insert 5 fake records in product\n\n }", "title": "" }, { "docid": "a96ac0966e1c6b0db7c2d0a0afecd178", "score": "0.7793679", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n (new PositionSeeder())->run();\n (new SummaryStatusSeeder())->run();\n (new LevelSeeder())->run();\n (new SummarySeeder())->run();\n }", "title": "" }, { "docid": "d7ea7fa73d2e1f2fdbe5a96bdd118bfb", "score": "0.7788253", "text": "public function run()\n {\n $faker = Faker::create();\n\n // customer\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('Password123!'),\n ]);\n\n // superuser\n DB::table('users')->insert([\n 'role_id' => '1',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('Password123!'),\n ]);\n\n // admin\n DB::table('users')->insert([\n 'role_id' => '2',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('Password123!'),\n ]);\n }", "title": "" }, { "docid": "9ed3f10e3bfc0f738979b9dbe00f890d", "score": "0.7785228", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // DB::table('categories')->insert([\n // ['cate_name'=>'cactus','cate_des'=>'plant that grows in the desert'],\n // ['cate_name'=>'rose','cate_des'=>'rose flower'],\n // ]);\n\n DB::table('payments')->insert([\n ['pm_name'=>'Stripe'],\n ['pm_name'=>'shipcode'],\n ]);\n\n DB::table('roles')->insert([\n ['role_name'=>'admin'],\n ['role_name'=>'customer'],\n ]);\n\n DB::table('order_states')->insert([\n ['st_name'=>'init'],\n ['st_name'=>'confirmed'],\n ['st_name'=>'processing'],\n ['st_name'=>'completed'],\n ]);\n DB::table('users')->insert([\n ['id'=>'1', 'name'=>'HoangMy', 'email'=>'[email protected]', 'password'=>bcrypt('admin'),'role_id'=>'1'],\n ]);\n\n }", "title": "" }, { "docid": "7f8de7d7f97990b5a84bb1622dd5955d", "score": "0.7782712", "text": "public function run()\n {\n\n $this->call([\n UsersTableSeeder::class,\n BlogCategoriesTableSeeder::class,\n RolesTableSeeder::class,\n\n ]);\n factory(\\App\\Models\\BlogPost::class, 100)->create();\n factory(\\App\\Models\\User::class, 100)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $roles = \\App\\Models\\Role::all();\n\n // Populate the pivot table\n \\App\\Models\\User::all()->each(function ($user) use ($roles) {\n $user->roles()->attach(\n $roles->random(rand(1, 4))->pluck('id')->toArray()\n );\n });\n\n }", "title": "" }, { "docid": "2eaa63a6cab2e3ceec7496fa80448c48", "score": "0.77822846", "text": "public function run()\n {\n Author::create([\n 'id' => 1,\n 'first_name' => 'Petar',\n 'last_name' => 'Petrovic'\n ]);\n\n Author::create([\n 'id' => 2,\n 'first_name' => 'Pera',\n 'last_name' => 'Peric'\n ]);\n\n Author::create([\n 'id' => 3,\n 'first_name' => 'Bogdan',\n 'last_name' => 'Ciric'\n ]);\n }", "title": "" }, { "docid": "154ce301d59c1d95063b61c5c333584d", "score": "0.7779364", "text": "public function run()\n {\n $this->seeds([\n Provinsi::class => ['master/wilayah/provinsi.csv', 34],\n KotaKabupaten::class => ['master/wilayah/kotakab.csv', 514],\n Kecamatan::class => ['master/wilayah/kecamatan.csv', 7215],\n Kelurahan::class => ['master/wilayah/kelurahan.csv', 80534],\n ]);\n }", "title": "" }, { "docid": "7b18c526c5a077ebe02742a2819c0da9", "score": "0.7777651", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n Product::truncate();\n ShoppingItem::truncate();\n ShoppingList::truncate();\n User::truncate();\n\n factory(User::class, 20)->create();\n factory(Product::class, 100)->create();\n factory(ShoppingList::class, 50)->create();\n factory(ShoppingItem::class, 100)->create()->each(function ($item) {\n $shopping_list_id = ShoppingList::all()->random()->id;\n $item->shopping_list()->associate($shopping_list_id);\n });\n }", "title": "" }, { "docid": "83b88c64117116d409e15f2ace449250", "score": "0.7772719", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $perro= Type::create([\n \t'name' => 'Perro'\n ]);\n\n $gato= Type::create([\n \t'name' => 'Gato'\n ]);*/\n\n $perro = Type::find(1);\n $gato = Type::find(2);\n\n $perro->breeds()->createMany([\n \t['name'=> 'huskee siberiano'],\n \t// ['name'=> 'pitbull'],\n ['name'=> 'bull terrier'],\n ['name'=> 'golden'],\n ['name'=> 'labrador'],\n ]);\n\n $gato->breeds()->createMany([\n \t// ['name'=> 'persa'],\n \t// ['name'=> 'siames'],\n ['name'=> 'bengala'],\n ['name'=> 'burmés'],\n ['name'=> 'ragdoll'],\n ['name'=> 'siberiano'],\n ]);\n }", "title": "" }, { "docid": "a826e7ce774337865579c0ea686c76cc", "score": "0.77711815", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n Book::truncate();\n $faker = \\Faker\\Factory::create();\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->sentence,\n 'author' => $faker->name,\n ]);\n }\n\n User::truncate();\n User::create([\n 'name' => 'Alex',\n 'email' => '[email protected]',\n 'password' => Hash::make('pwdpwd'),\n ]);\n\n }", "title": "" }, { "docid": "501068a858fb725d1212ab435e48739e", "score": "0.77709514", "text": "public function run()\n {\n //clear table\n DB::statement('TRUNCATE users CASCADE');\n\n /* DB::table('users')->truncate();*/\n echo \"Seeding database with users, please wait...\".PHP_EOL;\n //make my test user\n DB::table('users')->insert([\n 'name' => \"Theo\",\n 'email' => '[email protected]',\n 'program' => 'Comp Sci',\n 'password' => bcrypt('dawson'),\n ]);\n\n //create 100 fake users\n $faker = Faker::create();\n foreach(range(1, 100) as $index)\n {\n DB::table('users')->insert([\n 'name' => $faker->firstName.\" \".$faker->lastName,\n 'email' => $faker->unique()->safeEmail,\n 'program' => $faker->cityPrefix.' Studies',\n 'password' => bcrypt(\"secret\"),\n ]);\n }\n echo \"100 users successfully seeded.\".PHP_EOL;\n\n }", "title": "" }, { "docid": "e5139d59d0ff1dbdabe4cd4fea6b4bf2", "score": "0.7769279", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CommentsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n\n //i onda pokrecemo php artisan db:seed\n //moramo obrisati sve iz baze podataka sto smo rucno uneli da bi pokrenuli seed\n }", "title": "" }, { "docid": "719ed9fd29d4c396d81030f507a92d26", "score": "0.77684265", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t\tMaterialCategoria::create(array(\n\t\t\t'nombre' => 'Sin Categoria',\n\t\t\t'tipo' => 'unidad',\n\t\t));\n\n\t\tModuloCategoria::create(array(\n\t\t\t'nombre' => 'Sin Categoria',\n\t\t));\n\n\t\tCliente::create(array(\n\t\t\t'nombre' => 'Anonimo',\n\t\t\t'apellido' => 'equis',\n\t\t\t'persona' => 'n',\n\t\t\t'identificacion' => '00000',\n\t\t\t'telefono' => '00000',\n\t\t\t'email' => '[email protected]',\n\t\t\t'celular' => '00000',\n\t\t\t'sexo' => 'm',\n\t\t\t'nacimiento' => '00-00-00'\n\t\t));\n\n\t\tUser::create(array(\n\t\t\t'username' => 'master',\n\t\t\t'email' => '[email protected]',\n\t\t\t'password' => Hash::make('123456'),\n\t\t\t'role' => 'master',\n\t\t));\n\t}", "title": "" }, { "docid": "6915446a68aa7fe0895c3e801322f081", "score": "0.77649254", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n collect(factory(\\App\\Models\\User::class, 25)->create())\n ->each(function ($user) {\n collect(factory(\\App\\Models\\Post::class, 50)->create(['user_id' => $user->id]))\n ->each(function ($post) {\n collect(factory(\\App\\Models\\Comment::class, rand(5, 10))->create([\n 'post_id' => $post->id,\n 'user_id' => function() {\n return rand(1, 25);\n },\n ]));\n });\n });\n }", "title": "" }, { "docid": "a446cc33b342531ccae09ad4ad1411fb", "score": "0.7763216", "text": "public function run()\n {\n User::create([\n 'username' => 'vxuandai',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',\n 'name' => 'Đại Vương',\n 'email' => '[email protected]',\n 'role_id' => 1\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 < 50; $i++) {\n $name = $faker->unique()->word;\n User::create([\n 'username' => $name,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',\n 'name' => $faker->name,\n 'email' => $faker->unique()->safeEmail,\n ]);\n }\n }", "title": "" }, { "docid": "a09294c19b063cc9040b9c70fc6f6fdd", "score": "0.7761005", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\User::class, 10)->create();\n // factory(App\\Language::class, 10)->create();\n // factory(App\\Profession::class, 10)->create();\n // factory(App\\Nationality::class, 10)->create();\n // factory(App\\Customer::class, 10)->create();\n // factory(App\\City::class, 3)->create();\n // factory(App\\School::class, 3)->create();\n // factory(App\\Location::class, 3)->create();\n // factory(App\\Neighborhood::class, 3)->create();\n // factory(App\\House::class, 3)->create();\n // factory(App\\Room::class, 15)->create();\n // factory(App\\ImageHouse::class, 4)->create();\n // factory(App\\ImageRoom::class, 30)->create();\n }", "title": "" }, { "docid": "d31837cd693b41aa458ce1c225190f1b", "score": "0.775763", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,100)->create();\n factory(Post::class,1500)->create();\n factory(Category::class,10)->create();\n factory(Tag::class,1500)->create();\n factory(Image::class,2500)->create();\n factory(Video::class,500)->create();\n factory(Comment::class,2500)->create();\n }", "title": "" }, { "docid": "69d006f322b2e6acdee2bb648e06b70c", "score": "0.7756014", "text": "public function run()\n {\n $usersId = [1, 2, 3];\n $faker = app(Faker\\Generator::class);\n $articles = factory(Article::class)\n ->times(50)\n ->make()\n ->each(function ($article) use ($faker, $usersId) {\n $article->user_id = $faker->randomElement($usersId);\n });\n\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "c084211df888f9d418876c7378a14f25", "score": "0.7754872", "text": "public function run()\n {\n\n // Use the factory to create a Faker\\Generator instance.\n $faker = \\Faker\\Factory::create('en_NG');\n\n /**\n * Loop through and insert the dummy data into the users table\n */\n for ($i = 0; $i < 10; $i++) {\n Specialization::create([\n 'specialization_title' => $faker->word(rand(7, 12)),\n 'specialization_description' => $faker->sentence(),\n ]);\n }\n }", "title": "" }, { "docid": "afdea0d64d69ce19b1f3ff1462d5183d", "score": "0.7751974", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1, 20) as $index) {\n\n $body = '';\n foreach ($faker->paragraphs(3, false) as $paragraph) {\n $body .= \"$paragraph<br>\";\n }\n\n $title = $faker->unique()->catchPhrase;\n $slug = str_replace(' ', '-', $title);\n\n $user = User::all()->random(1);\n $category = Category::all()->random(1);\n\n DB::table('posts')->insert([\n 'title' => $title,\n 'subtitle' => $faker->catchPhrase,\n 'body' => $body,\n 'slug' => $slug,\n 'category_id' => $category->id,\n 'user_id' => $user->id,\n 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "431f385246db2762d5fef25b924f2a8a", "score": "0.775153", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Tag::class, 10)->create();\n\n factory(App\\User::class, 10)->create()\n ->each(function ($u) {\n $u->possessions()->saveMany(factory(App\\Possession::class, 3)->make())\n ->each(function($p){\n\n $tags = DB::table('tags')->get();\n $tagsIds = $tags->pluck('id');\n $r = collect([1, 2, 3, 4, 5]);\n $p->tags()->attach($tagsIds->random($r->random()));\n\n $users = DB::table('users')->get();\n $usersIds = $users->pluck('id');\n $r2 = collect([1, 2, 3, 4, 5, 6, 7]);\n $p->share()->attach($usersIds->random($r2->random()));\n\n });\n });\n }", "title": "" }, { "docid": "d25a1ab7b90dd9355ce6d16748326d50", "score": "0.775056", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Film::factory(3)->create();\n // \\App\\Models\\Genre::factory(1)->create();\n $this->call(GenresSeeder::class);\n $this->call(FilmGenreSeeder::class);\n $this->call(FilmSeeder::class);\n $this->call(CommentSeeder::class);\n }", "title": "" }, { "docid": "4ebbcc43020722efe554a313b7635107", "score": "0.7740149", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Movie::truncate();\n $status = [\n 'now_playing',\n 'upcoming',\n 'popular'\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 < 50; $i++) {\n Movie::create([\n 'title' => $faker->sentence,\n 'overview' => $faker->paragraph,\n 'popularity' => $faker->randomFloat(3, 0, 300),\n 'vote_count' => $faker->numberBetween(0, 1000),\n 'video' => $faker->boolean,\n 'poster_path' => $faker->md5.'.jpg',\n 'id' => $faker->numberBetween(1000, 9000),\n 'adult' =>$faker->boolean,\n 'backdrop_path' => $faker->md5.'.jpg',\n 'original_language' => $faker->languageCode,\n 'original_title' => $faker->jobTitle,\n 'vote_average' => $faker->randomFloat(1, 0, 10),\n 'release_date' => $faker->date('Y-m-d'),\n 'status' => $status[array_rand($status)],\n ]);\n }\n }", "title": "" }, { "docid": "e70505f02b4209f4cf5fff637ff91dac", "score": "0.7732915", "text": "public function run()\n {\n User::create([\n 'name' => 'Clebson Moura',\n 'username' => 'clebson.moura',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('password'),\n ]);\n\n $users = User::factory(10)->create();\n\n $categories = Category::factory(10)->create();\n\n $posts = collect([]);\n foreach ($categories as $category) {\n\n $posts->push(\n ...Post::factory(rand(2, 10))->create([\n 'user_id' => $users->random()->id,\n 'category_id' => $category->id,\n ])\n );\n }\n\n foreach ($posts as $post) {\n foreach (range(1, rand(2, 10)) as $x) {\n Comment::factory()->create([\n 'post_id' => $post->id,\n 'user_id' => $users->random()->id,\n ]);\n }\n }\n }", "title": "" }, { "docid": "74cd42951adb4bdea75fe05b6eeab7c8", "score": "0.7732759", "text": "public function run()\n {\n\n $faker = Faker::create();\n $books = 80;\n $authors = 20;\n\n DB::table('users')->insert([\n 'name' => 'demo',\n 'email' => '[email protected]',\n 'password' => Hash::make('demodemo'),\n ]);\n foreach (range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'picture' => $faker->imageUrl(128, 128),\n 'created_at' => $faker->dateTimeThisYear(),\n 'updated_at' => $faker->dateTimeThisYear(),\n ]);\n }\n\n foreach (range(1, $books) as $_) {\n DB::table('books')->insert([\n 'title' => $faker->company,\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(10,400),\n 'short_description' => $faker->realText(200,2),\n 'author_id' => rand(1,$authors),\n 'created_at' => $faker->dateTimeThisYear(),\n 'updated_at' => $faker->dateTimeThisYear(),\n ]);\n }\n\n }", "title": "" }, { "docid": "9c6fe574fb9564a0db82528d6cdb9a0c", "score": "0.7730007", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = FackerFactory::create(config('app.locale'));\n for($cpt=0; $cpt<6;$cpt++){\n \\App\\Models\\TodoList::create([\n 'name'=> $faker->sentence(3)\n ]);\n }\n }", "title": "" }, { "docid": "652ceb1d6044961b5e97e9ee8a510ce1", "score": "0.7729622", "text": "public function run()\n {\n $this->call(UserstableSeeder::class);\n $this->call(TagstableSeeder::class);\n $this->call(CategoriestableSeeder::class);\n $this->call(ColorstableSeeder::class);\n\n factory(App\\Post::class, 10)->create();\n $tags = App\\Tag::all()->where('id', 1);\n App\\Post::All()->each(function ($post) use ($tags) {\n $post->tags()->saveMany($tags);\n });\n }", "title": "" }, { "docid": "c1fdad93fe0fd286d572bb68e662113e", "score": "0.77275497", "text": "public function run()\n {\n $this->call([\n UserSeeder::class,\n CategorySeeder::class,\n PermissionRoleSeeder::class,\n ]); \n\n // User::factory()->count(40)->create();\n // Application::factory()->count(70)->create();\n\n // $app = Application::all();\n // Application::all()->each(function($app){\n // $cat = Category::find(rand(1, 8));\n // $app->category()->associate($cat);\n // });\n }", "title": "" }, { "docid": "7bd4a30e684ee761c8f09cc4d25e6e98", "score": "0.77240145", "text": "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n $this->call(UsesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n// factory('App\\User', 10)->create();\n factory('App\\Organization', 10)->create();\n factory('App\\Warehouse', 15)->create();\n// factory('App\\Stock', 100)->create();\n $this->call(StocksTableSeeder::class);\n $this->call(ImagesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n// factory('App\\Image', 20)->create();\n }", "title": "" }, { "docid": "af3b8c063fa968f49429d699632b8371", "score": "0.7719799", "text": "public function run()\n {\n\n $user_ids =\\App\\Models\\User::all()->pluck('id')->toArray();\n $category_ids = \\App\\Models\\Category::all()->pluck('id')->toArray();\n\n $faker=app(\\Faker\\Generator::class);\n\n $posts = factory(\\App\\Models\\Post::class)\n ->times(50)\n ->make()\n ->each(function($post,$index)\n use($user_ids,$category_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n $post->category_id = $faker->randomElement($category_ids);\n });\n \\App\\Models\\Post::insert($posts->toArray());\n\n }", "title": "" }, { "docid": "b1b1852b87bd9c49a9c815337875441f", "score": "0.7717144", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n \n // For roles table\n foreach (range(1,10) as $index) {\n\t \\DB::table('roles')->insert([\n 'name' => $faker->word,\n 'created_at' => $faker->dateTime,\n\t ]);\n }\n }", "title": "" }, { "docid": "817f02783adbe83cd434315902c4ccd1", "score": "0.77149147", "text": "public function run()\n {\n $faker = Faker::create();\n DB::table('articulos')->insert([\n 'codigo' => $faker->ean13,\n 'descripcion' => $faker->name,\n 'lote' => Str::random(),\n 'vencimiento' => Carbon::create('2000', '01', '01')\n ]);\n\n DB::table('articulos')->insert([\n 'codigo' => $faker->ean13,\n 'descripcion' => $faker->name,\n 'lote' => Str::random(),\n 'vencimiento' => Carbon::create('2000', '01', '01')\n ]);\n \n DB::table('articulos')->insert([\n 'codigo' => $faker->ean13,\n 'descripcion' => $faker->name,\n 'lote' => Str::random(),\n 'vencimiento' => Carbon::create('2000', '01', '01')\n ]);\n }", "title": "" }, { "docid": "e36e429108f125719bf0537e793a0787", "score": "0.7711331", "text": "public function run()\n\t{ \n\n\t\t$usersId = User::lists('id')->all();\n\n\t\t$faker = Faker::create();\n\n\t\tforeach (range(1,10) as $index) {\n\t\t\t$title = $faker->sentence(2);\n\t\t\t$desc = $faker->paragraph(6);\n\t\t\tProduct::create([\n\t\t\t\t'price' \t=> 10.99,\n\t\t\t\t'amount' \t=> 10,\n\t\t\t\t'img' \t\t=> 'product.jpg',\n\t\t\t\t'en' \t=> ['title' => $title, 'description' => $desc ],\n\t\t\t\t'ar' \t=> ['title' => 'ararbic '.$title , 'description' => 'arabic ' . $desc],\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "d9360075fb274a180c75099f683606d9", "score": "0.77101576", "text": "public function run()\n {\n Model::unguard();\n $bookId = DB::table('books')->pluck('id')->toArray();\n $userId = DB::table('users')->pluck('id')->toArray();\n $faker = Faker::create();\n $posts = DB::table('posts')->get();\n foreach ($posts as $value) {\n factory(App\\Model\\Rating::class, 1)->create([\n 'book_id' => $value->book_id,\n 'user_id' => $value->user_id,\n 'rating' => rand(1,5),\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "2634f1af96141762951a94aebfa82cab", "score": "0.77099645", "text": "public function run()\n {\n DB::table('disciplinas')->truncate();\n\n $faker = Faker::create();\n\n foreach (range(1,10) as $i){\n\n Disciplina::create([\n\n 'nome' => $faker->word(),\n 'referenciaBasica' => $faker->sentence(),\n 'referenciaComplementar' => $faker->sentence(),\n 'ementa' => $faker->sentence(),\n 'cargaHoraria' => $faker->numberBetween(20,40),\n 'aulasTeoricas' => $faker->numberBetween(20,40),\n 'aulasPraticas' => $faker->numberBetween(20,40),\n 'aulasLaboratorio' => $faker->numberBetween(20,40)\n\n ]);\n\n }\n }", "title": "" }, { "docid": "c4732fc65dc309fc0231d180a3408186", "score": "0.77098864", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $tags_id = factory('App\\Tag', 22)->create()->pluck('id');\n foreach(['character', 'scene', 'polt', 'others'] as $c) {\n factory('App\\Paragraph', rand(5, 11))->create(['category' => $c])\n ->each( function ($p) use ($tags_id) {\n $p->tags()->attach($tags_id->random(rand(1, 5))->toArray());\n });\n } \n }", "title": "" }, { "docid": "b56203320f6c9e467abc31132cafc697", "score": "0.77071106", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('gqe_sections')->delete();\n\n $sections = [\n ['id' => 1, 'name' => 'DB'],\n ['id' => 2, 'name' => 'SD'],\n ['id' => 3, 'name' => 'TF'],\n ['id' => 4, 'name' => 'OS'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('gqe_sections')->insert($sections);\n }", "title": "" }, { "docid": "eb4e64cd27ae683a30c0f8360fb988ff", "score": "0.7706325", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n \n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin')\n ])->assignRole('admin');\n\n User::factory(10)->create();\n $subjects = array(\"Web design\", \"Databases Management\", \"Web Applications\", \"Web Servers Administration\", \"Mobile applications\", \"Cybersecurity\", \"OOP\", \"Data mining\", \"Linear Algebra\", \"IOT\");\n $cuatri = array(1, 2, 3, 4, 5, 1, 2, 3, 4, 5);\n $timestamp = now();\n\n foreach( $subjects as $key => $mat){\n DB::table('materias')->insert([\n 'materia'=>$mat,\n 'cuatri'=>$cuatri[$key],\n 'created_at'=>$timestamp ,\n 'updated_at'=>$timestamp\n ]);\n }\n }", "title": "" }, { "docid": "2f8bbbbc0e5c31dbc7c46fc41966e882", "score": "0.7706246", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('users')->insert([\n 'username' => 'Collin',\n 'email' => '[email protected]',\n 'avatar' => 'placeholder.png',\n 'bio' => $faker->paragraph(),\n 'gender' => 'male',\n 'birthday' => $faker->dateTime,\n 'password' => bcrypt('welkom'),\n 'role_id' => 2,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n\n DB::table('users')->insert([\n 'username' => 'Cow',\n 'email' => '[email protected]',\n 'avatar' => 'placeholder.png',\n 'bio' => $faker->paragraph(),\n 'gender' => 'male',\n 'birthday' => $faker->dateTime,\n 'password' => bcrypt('welkom'),\n 'role_id' => 1,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n }", "title": "" }, { "docid": "62232289a1bd43e553d5ec952549e3c9", "score": "0.7705873", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n\n for($i = 0; $i<50; $i++) {\n $user = \\OpenBook\\User::create([\n 'id'=> null,\n 'name'=> $faker->name,\n 'email'=> $faker->unique()->safeEmail,\n 'password'=> bcrypt('secret'),\n ]);\n $userId = $user->id;\n for($j = 0; $j < 5; $j++) {\n $blog = \\OpenBook\\Blog::create([\n 'user_id' => $userId,\n 'name' => $faker->word(),\n 'description' => $faker->paragraph(3),\n ]);\n $blogId = $blog->id;\n for($k = 0; $k<5; $k++) {\n $post = \\OpenBook\\Blogpost::create([\n 'blog_id' => $blogId,\n 'title' => $faker->sentence(),\n 'body' => $faker->paragraph(10),\n 'image' => $faker->imageUrl($width = 640,$height = 480),\n 'tags' => $faker->word(),\n ]);\n } \n }\n }\n \n }", "title": "" }, { "docid": "da3fcce5171a9661453fcbdcab1a0502", "score": "0.77034503", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 3)->create()->each(function($u){\n $u->questions()->saveMany(factory(Question::class, rand(1, 5))->make());\n });\n //factory(Question::class, 10)->create();\n }", "title": "" }, { "docid": "634a8c3546a3a5f71bde9e9e3149dd4e", "score": "0.77034146", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(LabelSeeder::class);\n $this->call(ArtistsSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(ReviewsSeeder::class);\n DB::table('roles')->insert([\n 'name' => 'admin',\n ]);\n DB::table('roles')->insert([\n 'name' => 'customer',\n ]);\n }", "title": "" }, { "docid": "f5d44ad7229b80eae4b98bf5c827fb0d", "score": "0.7702739", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'email' => 'test',\n 'password' => bcrypt('test'),\n 'access_level' => 2\n ]);\n\n DB::table('configurations')->insert([\n [\n 'name' => 'address',\n 'value' => '#123 Example St., Taytay, Rizal'\n ],\n [\n 'name' => 'contact_number',\n 'value' => '123456789'\n ],\n [\n 'name' => 'email',\n 'value' => '[email protected]'\n ],\n [\n 'name' => 'bank_name',\n 'value' => 'BPI'\n ],\n [\n 'name' => 'card_number',\n 'value' => '1234567890123456'\n ],\n [\n 'name' => 'gcash_number',\n 'value' => '9161234567'\n ]\n ]);\n }", "title": "" }, { "docid": "a0608bf506531831ddf19c265bfc0d91", "score": "0.77026147", "text": "public function run()\n {\n //avatar\n //admin\n //user\n\n //category\n //ask\n //asklike\n //comment\n //comment like\n\n // \\App\\Models\\User::factory(10)->create();\n $this->call(AvatarSeeder::class);\n\n $this->call(AdminSeeder::class);\n\n $this->call(CategorySeeder::class);\n\n User::factory()->count(20)->create();\n\n Admin\\Ask::factory()->count(20)->create()->each(function ($q) {\n /**@var \\App\\Models\\Admin\\Ask $q */\n for ($i = 1; $i <= rand(3, 6); $i++) {\n $q->categories()->attach([\n 'category_id' => Category::query()->inRandomOrder()->pluck('id')[0]\n ]);\n }\n });\n\n //--------\n\n\n //--------\n\n\n $this->call(AskSeeder::class);\n }", "title": "" }, { "docid": "6644d3ec38aea3b3e63dc10cf50f206b", "score": "0.76982594", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Articulo::factory(100)->create();\n ArticuloUser::factory(10)->create();\n Pedido::factory(10)->create();\n LPedido::factory(10)->create();\n\n }", "title": "" }, { "docid": "126823c87421a668d2e65f9fafab353b", "score": "0.7695388", "text": "public function run()\n {\n // ** manual database seeds with basic categories */\n ItemType::create([\n 'name' => 'Resource',\n ]);\n\n ItemType::create([\n 'name' => 'Book',\n ]);\n\n ItemType::create([\n 'name' => 'Article',\n ]);\n\n ItemType::create([\n 'name' => 'Film',\n ]);\n\n ItemType::create([\n 'name' => 'Press',\n ]);\n\n ItemType::create([\n 'name' => 'Blog Post',\n ]);\n\n ItemType::create([\n 'name' => 'Podcast',\n ]);\n\n ItemType::create([\n 'name' => 'Graphics',\n ]);\n }", "title": "" }, { "docid": "5e7d8cfe5057fc6d70be8da5d5fd1c34", "score": "0.76928055", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'admin' => true,\n ]);\n\n Settings::create();\n\n /*$teams = factory(Team::class,4)->create();\n $teams->each(function($team){\n $team->memberships()->create([\n \"user_id\" => factory(User::class)->create()->id\n ]);\n $team->tickets()->createMany( factory(Ticket::class,4)->make()->toArray() );\n });\n\n factory(Ticket::class)->create();\n */\n }", "title": "" }, { "docid": "8457b304eb7c82366a3c8f9089b6188d", "score": "0.7685785", "text": "public function run()\n {\n $faker = Factory::create();\n \n //clean table\n Post::truncate();\n \n //insert 40 posts\n for($i=0; $i<40; $i++){\n Post::create(['title'=> $faker->word, 'body'=>$faker->paragraph]);\n }\n }", "title": "" }, { "docid": "7e906256d8b48c22a700edd48e1bc69d", "score": "0.7680291", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class)->create(['name'=> 'Admin','email' => '[email protected]', 'role' => 'admin']);\n factory(\\App\\User::class, 100)->create();\n factory(\\App\\categoria::class, 20)->create();\n factory(\\App\\anuncio::class, 50)->create();\n factory(\\App\\image::class, 200)->create();\n factory(\\App\\Transaction::class, 25)->create();\n }", "title": "" }, { "docid": "7880139717c29a5fdcbd5e07d5f1e3f6", "score": "0.7678655", "text": "public function run()\n {\n // limpiamos el seeder si esta ocupado\n Movie::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for($i = 0; $i < 10; $i++){\n Movie::create([\n 'title' => $faker->sentence,\n 'synopsis' => $faker->paragraph,\n 'year' => $faker->randomDigit,\n 'cover' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "c1d152c873835a0986a147556c97a6a5", "score": "0.7677241", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->call(TagsTableSeeder::class);\n// $this->call(CategoriesTableSeeder::class);\n\n foreach (array_fill(1, 300, 1) as $key => $value) {\n DB::table('category_news')->insert([\n 'news_id' => $key,\n 'category_id' => rand(30, 60)\n ]);\n }\n }", "title": "" }, { "docid": "e3684785118a2e1214a6940e679025a9", "score": "0.76754785", "text": "public function run()\n {\n // Seed roles table\n $roles = array(\n array(\n 'id' => 1,\n 'name' => 'ricardo-beverly-hills',\n 'display_name' => 'Ricardo Beverly Hills',\n 'description' => 'Ricardo Beverly Hills Employee',\n 'created_at' => '2017-02-19 00:00:00',\n 'updated_at' => '2017-02-19 00:00:00'\n ),\n array(\n 'id' => 2,\n 'name' => 'part-company',\n 'display_name' => 'Part Company',\n 'description' => 'Part Company Employee',\n 'created_at' => '2017-02-19 00:00:00',\n 'updated_at' => '2017-02-19 00:00:00'\n ),\n array(\n 'id' => 3,\n 'name' => 'repair-center',\n 'display_name' => 'Repair Center',\n 'description' => 'Repair Center Employee',\n 'created_at' => '2017-02-19 00:00:00',\n 'updated_at' => '2017-02-19 00:00:00'\n )\n );\n\n DB::table('roles')->insert($roles);\n\n // Seed role_user table\n $roleUser = array(\n array(\n 'user_id' => 1,\n 'role_id' => 1\n ),\n array(\n 'user_id' => 2,\n 'role_id' => 2\n ),\n array(\n 'user_id' => 3,\n 'role_id' => 3\n )\n );\n\n DB::table('role_user')->insert($roleUser);\n }", "title": "" }, { "docid": "84d3d900a6223eaddab360efa566f449", "score": "0.7674336", "text": "public function run(): void\n {\n $this->seedCategories();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "53ffa8a66ed5aafa29202beb9ba08658", "score": "0.76734495", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //factory(App\\Model\\Admin::class,5)->create();\n //factory(App\\Model\\Category::class,6)->create();\n //factory(App\\Model\\Customer::class,50)->create();\n factory(App\\Model\\Product::class,600)->create();\n factory(App\\Model\\Review::class,3000)->create();\n //factory(App\\Model\\SubCategory::class,20)->create();\n }", "title": "" }, { "docid": "c318b439566b542140d624e06317408a", "score": "0.7672262", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n // Movie::truncate();\n\n User::factory()->create([\n 'email' => '[email protected]',\n 'api_token' => 'PFhy4Y3GjPrWE4JpLupaWiQHQwZeS3H2gi4pamTOG40tSjZ2qMX9bHvDA8uugM4XF3tL7E7EVGrKsRcO',\n 'is_admin' => true,\n ]);\n\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n User::factory(10)->create();\n\n Category::factory(10)->create();\n\n for($i=0; $i<100 ;$i++) {\n $categories = Category::inRandomOrder()->limit(3)->get();\n\n Movie::factory()\n ->hasAttached($categories)\n ->create();\n }\n\n\n }", "title": "" }, { "docid": "955fac9fbcf0d0d98d8c10498d296487", "score": "0.7669368", "text": "public function run()\n {\n $this->call(ConfigurationSeeder::class);\n\n $dni = DocumentType::create([\n \"DOCUMENT_TYPE\" => \"DNI\"\n ]);\n\n $dilan = Person::create([\n \"NAME\" => \"Dilan\",\n \"SURNAME\" => \"Bernabe\",\n \"DOCUMENT_NUMBER\" => 12345678,\n \"ID_DOCUMENT_TYPE\" => $dni->ID_DOCUMENT_TYPE,\n ]);\n\n $agustin = Person::create([\n \"NAME\" => \"Agustin\",\n \"SURNAME\" => \"Normand\",\n \"DOCUMENT_NUMBER\" => 41677293,\n \"ID_DOCUMENT_TYPE\" => $dni->ID_DOCUMENT_TYPE,\n ]);\n\n\n $renault = Brand::create([\"NAME\" => \"Renault\"]);\n\n $volkswagen = Brand::create([\"NAME\" => \"Volkswagen\"]);\n\n $clio = ModelV::create([\"NAME\" => \"CLIO\", \"ID_BRAND\" => $renault->ID_BRAND]);\n\n $gol = ModelV::create([\"NAME\" => \"GOL\", \"ID_BRAND\" => $volkswagen->ID_BRAND]);\n\n $vento = ModelV::create([\"NAME\" => \"VENTO\", \"ID_BRAND\" => $volkswagen->ID_BRAND]);\n\n $agustin->vehicles()->save($clio);\n\n\n }", "title": "" }, { "docid": "2c6f17407c495fc948b2e8d9789968de", "score": "0.7669091", "text": "public function run()\n {\n DB::table('doctor')->truncate();\n // Create a Faker object\n // https://github.com/fzaninotto/Faker\n $faker = Faker\\Factory::create();\n\n // Create 10 news\n for ($i=0; $i < 226; $i++) \n {\n Doctor::create([ \n 'user_id' => 1,\n 'speciid' => rand(1,174), \n 'doctor_name' => $faker->name, \n 'intro' => $faker->text($maxNbChars = 1000), \n 'address' => $faker->address, \n 'latitude' => $faker->latitude, \n 'longitude' => $faker->longitude, \n 'overview' => $faker->text($maxNbChars = 1000), \n 'patient_ratings' => $faker->randomDigitNotNull, \n 'background' => $faker->text($maxNbChars = 600), \n 'appointments' => $faker->text($maxNbChars = 600), \n 'pic_url' => $faker->url\n ]); \n\n }\n\n }", "title": "" }, { "docid": "0b1cd08a4e06e149a5bd7318cc8e6f4f", "score": "0.7668169", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Term::create([\n 'contents' => 'Mtaa Security Framework is an application that when used appropriately would boost your own security. You are required to respect Kenyans resolution to fight crime with this application, and other modes. Misuse of this application would be prosecuted'\n ]);\n\n Cat::create([\n 'title' => 'text',\n 'description' => 'This is a tip conveyed via writings'\n ]);\n\n Cat::create([\n 'title' => 'audio',\n 'description' => 'This is a tip conveyed via audio recording'\n ]);\n\n Cat::create([\n 'title' => 'media',\n 'description' => 'This is a tip conveyed via image or video'\n ]);\n\n\n Town::create([\n \t'title' => 'Eldoret'\n ]);\n\n Estate::create([\n \t'title' => 'Racecourse Estate Eldoret',\n \t'user_id' => 1,\n \t'town_id' => 1\n ]);\n\n House::create([\n \t'number' => '54 Block A',\n \t'estate_id' => 1,\n \t'group_id' => 1,\n ]);\n\n Group::create([\n \t'number' => '54 Block A',\n \t'estate_id' => 1,\n \t'user_id' => 1\n ]);\n\n User::create([\n \t'name' => 'Timothy M',\n \t'username' => 'timo',\n \t'email' => '[email protected]',\n 'gender' => 'bot',\n \t'phone' => '+254000000000',\n \t'house_id' => 1,\n \t'role' => 'admin',\n \t'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'\n ]);\n }", "title": "" }, { "docid": "483dab42ca695078c0c35defd1731f50", "score": "0.7668032", "text": "public function run()\n {\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n Teacher::truncate();\n Student::truncate();\n Course::truncate();\n User::truncate();\n DB::table('course_student')->truncate();\n\n factory(Teacher::class, 50)->create();\n factory(Student::class, 500)->create();\n factory(Course::class, 40)->create()->each(function(Course $course) {\n $course->students()->attach(array_rand(range(1, 500), 40));\n });\n factory(User::class, 2)->create();\n //enable foreign key check again\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "title": "" }, { "docid": "1c7df6cc09c705b0ec52f7d563bf2258", "score": "0.76665384", "text": "public function run()\n {\n $seeder=array(\n array(\n 'first_name'=>'hPE4NbTPeo2R4sHryXY+9w==',\n 'last_name'=>'hPE4NbTPeo2R4sHryXY+9w==',\n 'title_id'=>1,\n 'email'=>'7rRz721uLV1i8obKzSiqEw==',\n 'phone'=>'qImgx8IkBSUsutvQO7Wosg==',\n 'mobile'=>'qImgx8IkBSUsutvQO7Wosg==',\n 'gender_id'=>1,\n 'password'=>'$6$536ad3eae4f968b5$XarYMdgpKqqn5mIJTFU2kqHiHrpbKdGjDGve7qUnWXmUPX5L0DuF4I0fj0d3Nw97i7Cqh2RuJ6dpN9Fsq/09z1',\n 'uuid'=>'947b876a30ea1cb1056'\n )\n );\n DB::table('users')->insert($seeder);\n }", "title": "" }, { "docid": "5588095af928cd73bbc8570454defa86", "score": "0.76648223", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //desactivando relaciones\n Schema::disableForeignKeyConstraints();\n \n /*eliminando datos de las tablas*/\n User::truncate(); \n Category::truncate();\n Transaction::truncate();\n Product::truncate();\n \n //eliminando datos de la tabla pivote\n DB::table('category_product')->truncate();\n \n //incando factoris\n $cantUsers = 1000;\n $cantCategories = 30;\n $cantProducts = 1000;\n $cantTransactions = 500;\n\n //creando usuarios aleatorios a la base de datos\n factory(User::class, $cantUsers)->create();\n //creando categorias aleatorios a la base de datos\n //recuperando los datos en una variable\n $categories = factory(Category::class, $cantCategories)->create();\n //creando productos\n factory(Product::class, $cantProducts)->create()->each(\n function($product) use($categories){\n //recuperando de una lista aleatoria de 5 categorias un id\n $randomCategories = $categories->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($randomCategories); \n }\n );\n //creando transactiones aleatorias\n factory(Transaction::class, $cantTransactions)->create();\n\n //activando relaciones\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "4d40491fc508c6cfa42aee2847b53e9b", "score": "0.76638657", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /*\n factory(App\\User::class, 2)->create()->each(function($u) {\n $u->issues()->save(factory(App\\Issues::class)->make());\n });\n */\n\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'mobile' => '0123456789',\n 'street' => 'seed st',\n 'city' => 'seed city',\n 'admin' => 1,\n ]);\n }", "title": "" }, { "docid": "06963344d3eb36ddd9c2ccd38ceb863f", "score": "0.7663806", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name' => 'Talha Rai',\n 'email' => '[email protected]',\n 'password' => bcrypt('000000'),\n 'active' => '1',\n 'created_at' => Carbon::now()\n ]);\n\n DB::table('shops')->insert([\n 'shop_name' => 'My Shop',\n 'active' => '1',\n 'created_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Pepsi',\n 'user_id' => '1',\n 'price' => '100',\n 'active' => '1',\n 'created_at' => Carbon::now()\n ]);\n DB::table('product_shop')->insert([\n 'product_id' => '1',\n 'shop_id' => '1',\n ]);\n }", "title": "" }, { "docid": "b56b00221009126c677247dda605e5ea", "score": "0.7662642", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// DB::statement('SET FOREIGN_KEY_CHECKS=0');\n//\n// $table = [\n// 'users', 'departments', 'semesters', 'courses', 'designations', 'teachers', 'course_assign_teachers',\n// ];\n//\n// foreach ($table as $item){\n//\n// DB::table($item)->truncate();\n// }\n//\n// DB::statement('SET FOREIGN_KEY_CHECKS=1');\n//\n// factory(User::class, 2)->create();\n\n// factory(Department::class, 10)->create();\n//\n// for ($i = 1; $i <= 8; $i++) {\n// factory(Semester::class)->create([\n// 'title' => sprintf(\"Semester-%02d\", $i),\n// ]);\n// }\n//\n// factory(Course::class, 100)->create();\n//\n// factory(Designation::class, 5)->create();\n//\n// factory(Teacher::class, 10)->create();\n\n }", "title": "" }, { "docid": "3756b8ddeb6fd218f1138074158981d0", "score": "0.7661267", "text": "public function run()\n {\n $this->call(GenderSeeder::class);\n $this->call(UserSeeder::class);\n\n DB::table('phones')->insert([\n 'phone' => '701203405',\n 'user_id' => 1,\n 'primary' =>true,\n 'verified' => true,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('emails')->insert([\n 'email' => '[email protected]',\n 'user_id' => 1,\n 'primary' =>true,\n 'verified' => true,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n \\App\\Models\\User::factory(7)->create(); \n \\App\\Models\\Password::factory(1)->create();\n\n $this->call(CurrencySeeder::class);\n $this->call(CustomerGroupSeeder::class);\n $this->call(CustomerStatusSeeder::class);\n\n $this->call(TransactionMethodSeeder::class);\n $this->call(TransactionStatusSeeder::class);\n $this->call(TransactionTypeSeeder::class);\n\n \\App\\Models\\Customer\\Customer::factory(7)->create();\n \\App\\Models\\Email::factory(7)->create();\n \\App\\Models\\Phone::factory(7)->create();\n \\App\\Models\\Transaction\\Transaction::factory(7)->create();\n }", "title": "" }, { "docid": "b5b90796010642f82e5cf135b38ee03e", "score": "0.76578546", "text": "public function run()\n {\n DB::table('titles')->delete();\n\n $titles = array(\n ['id' => 1, 'author' => 'Title 1', 'summery' => 'title-1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'author' => 'Title 2', 'summery' => 'title-2', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 3, 'author' => 'Title 3', 'summery' => 'title-3', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n\n // Uncomment the below to run the seeder\n DB::table('titles')->insert($titles);\n }", "title": "" }, { "docid": "e16edba2637cd75eec9876047dd55776", "score": "0.76567626", "text": "public function run()\n {\n /* $newUser = User::factory()->newUser()->create();\n $users = User::factory(5)->create();\n $users = $newUsers->concat([$newUser]);\n\n $posts = BlogPost::factory(30)->make()->each(function($post) use ($users) {\n $post->user_id = $users->random()->id;\n $post->save();\n }); */\n\n if($this->command->confirm('Do you want to add fake data in your database?', true)) {\n // $this->command->call('migrate:refresh')\n $this->command->info('Database has been renovated.');\n }\n\n $this->call([UsersTableSeeder::class, BlogPostsTableSeeder::class]);\n }", "title": "" }, { "docid": "e54d9e9aada668407dc8618e0cda2d17", "score": "0.76559335", "text": "public function run()\n {\n \t$faker = \\Faker\\Factory::create();\n\n \\App\\Program::unguard();\n\n // $table->increments('id');\n // $table->integer('denomination_id')->unsigned();\n // $table->string('research_and_dev');\n // $table->string('gender_dev');\n // $table->string('humanitarian');\n // $table->string('peace_justice');\n // $table->string('comm_for_min');\n\n \\App\\Program::create([\n \t'denomination_id' => 1,\n \t'programs' => $faker->text,\n ]);\n }", "title": "" }, { "docid": "639986812d10a9aa30836a8126b237e0", "score": "0.7655751", "text": "public function run()\n {\n // Crear Seeder\n \t// php artisan make:seeder WorksTableSeeder\n\n \t// Ejecutar\n \t//php artisan db:seed --class=WorksTableSeeder\n \t//\n \t\n \t/*DB::table('works')->insert([\n\t 'company' => 'iAhorro',\n\t\t\t'slug' => 'iahorro',\n\t\t\t'job' => 'Programador Backend',\n\t\t\t'status' => 1,\n\t\t\t'description' => self::getDescription(),\n\t\t\t'created_at' => now(),\n\t\t\t'updated_at' => now(),\n\t\t\t'start_date' => '2018-03-01 00:00:0'\n ]);*/\n \n\n \tWork::create([\n\t 'company' => 'iAhorro',\n\t\t\t'slug' => 'iahorro',\n\t\t\t'job' => 'Programador Backend',\n\t\t\t'status' => 1,\n\t\t\t'description' => self::getDescription(),\n\t\t\t'start_date' => '2018-03-01 00:00:00'\n ]);\n }", "title": "" }, { "docid": "f4a6a5d52cba403d4b1a650660c28050", "score": "0.7653422", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Project::class, rand(2, 5))->create()->each(function ($project) {\n $project->tasks()->saveMany(\n factory(Task::class, rand(2, 4))->make()\n );\n });\n }", "title": "" }, { "docid": "b53426a77f8d03a04bacdab0855e4277", "score": "0.7650987", "text": "public function run()\n {\n // disable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Let's clear the users table first\n Order::truncate();\n $faker = \\Faker\\Factory::create();\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 35; $i++) {\n Order::create([\n 'user_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'total' => 1000,\n 'status' => random_int(1, 3),\n 'address' => $faker->address,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n }\n\n // enable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "60db9502c2cc77d9310cc87e07d5fdf3", "score": "0.765044", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n\n PostFactory::new()->times(5)->create();\n PostFactory::new()->times(105)->create(['type' => 'news']);\n }", "title": "" }, { "docid": "334d94502f8a7f168ad019e240da7eeb", "score": "0.7650309", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n /*$this->call([\n UsersTableSeeder::class,\n CategoriesTableSeeder::class,\n ProductsTableSeeder::class,\n TransactionsTableSeeder::class\n ]);*/\n\n User::factory(20)->create();\n Category::factory(10)->create();\n Product::factory(50)->create()->each(\n function($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n }\n );\n Transaction::factory(50)->create();\n }", "title": "" }, { "docid": "29e56983fdb3ed32622eb3f5aa44d838", "score": "0.76499355", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(UsersSeeder::class);\n Category::factory(3)->create();\n Task::factory(10)->create();\n }", "title": "" }, { "docid": "a97cacf86474463d4841f1f9fe2c5eca", "score": "0.7646798", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker\\Factory::create();\n $this->seedTasks($faker);\n $this->seedTags($faker);\n }", "title": "" }, { "docid": "46223c0a8fd3d448ec6eec904f7bfddf", "score": "0.76467425", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n factory(App\\proveedores_model::class, 10)->create();\n factory(App\\clientes_model::class, 10)->create();\n factory(App\\User::class, 10)->create();\n factory(App\\productos::class, 10)->create();\n factory(App\\clientes_proveedores::class, 10)->create();\n factory(App\\ventas::class, 10)->create();\n factory(App\\ventas_detalle::class, 10)->create();\n \n\n }", "title": "" }, { "docid": "64987439ec5564faf20d25f3c31c5cc0", "score": "0.7645286", "text": "public function run()\n {\n $todos = [];\n for ($i = 0; $i < 10; $i++) {\n array_push($todos, [\n \"title\" => \"Test todo \" . ($i+1),\n \"assignee_id\" => ($i+1)\n ]);\n }\n\n Todo::insert($todos);\n\n echo \"Seed todo success\";\n }", "title": "" }, { "docid": "a5b4b20ca8a8c2a03800eb96160349e0", "score": "0.76450694", "text": "public function run()\n {\n Street::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 15; $i++) {\n Street::create([\n 'street_name' => $faker->unique->city(),\n 'city_id' => 1\n ]);\n }\n for ($i = 0; $i < 4; $i++) {\n Street::create([\n 'street_name' => $faker->unique->city(),\n 'city_id' => 2\n ]);\n }\n }", "title": "" } ]
bfe33f71d45d1bd799ea008c4c5a74b0
Manage show profile request
[ { "docid": "601fbd722d1f1cdcd74b2a544d45948f", "score": "0.0", "text": "public function show($id)\n {\n $m = self::MODEL;\n $data = $m::where('id', $id)->with('imagem', 'especialidade', 'classe')->get();\n return $this->showResponse($data);\n }", "title": "" } ]
[ { "docid": "424ed620338f7c91d0cd0d29206b84cd", "score": "0.75863165", "text": "public function profile_show()\n\t{\n $this->isSigned();\n $data['query'] = $this->Users_model->getUser($_SESSION['user_id']);\n $this->load->view('header');\n $this->load->view('pages/my_profile',$data);\n\t}", "title": "" }, { "docid": "715db415dffa357a66641a6bdfffafb8", "score": "0.75401694", "text": "public function show(Profile $profile)\n {\n //\n\n }", "title": "" }, { "docid": "6f812700275e9932e09253ca01491a56", "score": "0.7502177", "text": "public function show(profile $profile)\n {\n //\n }", "title": "" }, { "docid": "b64c8d1a1a0123641c183687c9b4efae", "score": "0.7485022", "text": "public function showProfile()\n\t{\n\t\t// $options = array($_SESSION[\"id\"]);\n\t\t// print_r($options);\n\t\trequire 'Views/profile.php';\n\t}", "title": "" }, { "docid": "c23a504f63841723de247d03a31a53f9", "score": "0.7469098", "text": "public function show(Profile $profile) {\n //\n }", "title": "" }, { "docid": "d3f14d95fc382c05efc14f18cfa4d914", "score": "0.745357", "text": "public function actionProfile() {\n $arr = array(\n 'controller' => $this->id,\n 'action' => $this->action->id,\n 'status' => 'NOK'\n );\n $model = Yii::app()->user->model;\n if ($model) {\n $arr ['status'] = 'OK';\n $arr ['list'] [] = $model->toArray();\n } else {\n $arr ['status'] = 'NOK';\n }\n $this->sendJSONResponse($arr);\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "68f127206aae2b11c3d8dc9f2165fc40", "score": "0.74384415", "text": "public function show(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "c4292d38fb81a0eb7de580afc31d0633", "score": "0.7425024", "text": "public function profileAction()\n {\n \t\n\t // action body\n \t$id = Auth_StaffAdapter::getIdentity()->id; \n \t\t$data = Doctrine_Query::create()->select(\"u.*\")\n \t->from('User u')\n \t//->leftJoin(\"u.profileimage pi\")\n \t->where(\"u.id = \". $id)\n \t->fetchOne(null , Doctrine::HYDRATE_ARRAY);\n \t//$user = Doctrine_Core::getTable(\"User\")->find($id);\n \t//echo \"<pre>\";\n \t//print_r($data);\n \t$this->view->profile = $data ;\n \t\n \t$flash = $this->_helper->getHelper('FlashMessenger');\n\t\t$message = $flash->getMessages();\n\t\t$this->view->messageSuccess = isset($message[0]['success']) ? $message[0]['success'] : '';\n\t\t$this->view->messageError = isset($message[0]['error']) ? $message[0]['error'] : '';\n \t\n }", "title": "" }, { "docid": "d8a49cee3f2b9b4017f7c6c40d3c53f2", "score": "0.7406842", "text": "public function profile() {\n admin_authenticate();\n //$data['pagetype']=\"Profile\";\n //$this->load->view('admin/admin-profile',$data);\n\n $getsitename = getsitename();\n $this->layouts->set_title($getsitename . ' | Profile');\n $this->layouts->render('admin/admin-profile', array(), 'admin');\n }", "title": "" }, { "docid": "6843e368e5d31b8b4cf450c97f61d135", "score": "0.7378147", "text": "public function profileAction()\n {\n $this->initUser();\n if ($this->_error) {\n return;\n }\n $this->view->headTitle(\"профиль\");\n $this->_topMenu->selectItem('profile');\n\n $this->view->writeboard = $this->_user->getWriteboard();\n }", "title": "" }, { "docid": "11864959816c608b9ba98869be4906f2", "score": "0.73337495", "text": "public function actionProfile()\n\t{\n\t\t$model = $this->loadUser();\n\t $this->render('profile',array(\n\t \t'model'=>$model,\n\t\t\t'profile'=>$model->profile,\n\t ));\n\t}", "title": "" }, { "docid": "12844fc3a35081c6a8ed666d087d6183", "score": "0.73273766", "text": "public function showAction() // edit to match fosuserbundle declaration\n\t{\n\t $request = $this->container->get('request'); //edited to match fosuserbundle declaration\n\t\t$user = $this->container->get('security.context')->getToken()->getUser();\n\n return $this->forward('IMDCTerpTubeBundle:Profile:showSpecific', array(\n 'userName' => $user->getUsername()\n ));\n\t}", "title": "" }, { "docid": "f2e17713d0168a226b71da85c52fa65b", "score": "0.72851264", "text": "public function profileAction(){\n //$readHandler = new UserReadHandler($this);\n // profile render here\n $loggedIn = $this->dispatcher->getParam('payload');\n if($loggedIn === false){\n $this->view->disable();\n $this->response->redirect(\"/accounts/logout\");\n }\n $this->view->setVars($loggedIn);\n\n }", "title": "" }, { "docid": "0c39d6f32a00bfa87d5c6c992908c24e", "score": "0.7270268", "text": "public function profile()\n {\n $data['account_user'] = $this->account_user_model->get_all_join_profile_id('id', 'desc');\n // $data['kurir'] = $this->kurir_model->get_all_order_by('id', 'desc');\n $data['title'] = 'Profile';\n $data['title_foto'] = 'Foto';\n $this->template->load('template_neura/index', 'profile/index', $data);\n }", "title": "" }, { "docid": "06fbd9782d921bf2d17c35f3f8757112", "score": "0.72308946", "text": "public function action_profile()\n\t{\n\t\tglobal $context;\n\n\t\t$memID = currentMemberID();\n\n\t\t// Fetch any providers this user has activated\n\t\t$context['connected_providers'] = connectedProviders($memID);\n\n\t\t// Providers available\n\t\t$context['enabled_providers'] = extauth_enabled_providers();\n\t}", "title": "" }, { "docid": "2af78b33b93ad33503b3673ec2e57066", "score": "0.7218867", "text": "public function actionShowProfile()\n {\n $user = $this->getUser();\n\n return $this->render('show_profile', [\n 'user' => $user,\n ]);\n }", "title": "" }, { "docid": "89c72cb7dfc02abac6179cab3f21392b", "score": "0.7193048", "text": "public function profileAction() {\n /**\n * get the CustomerID Valeu.\n */\n $customerid = Mage::app ()->getRequest ()->getParam ( 'id' );\n /**\n * Get the Customer Info by loading the customerID\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $customerid );\n /**\n * Cust Name.\n */\n $customerName = $customer->getName ();\n /**\n * loading the layout.\n */\n $this->loadLayout ();\n /**\n * Set Title to the block\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( $customerName ) );\n /**\n * Render the Layout\n */\n $this->renderLayout ();\n }", "title": "" }, { "docid": "30fa35bb290c12e97df28cfe9465719d", "score": "0.7147022", "text": "public function profileAction()\n {\n return [\n 'user' => $this->getUser()\n ];\n }", "title": "" }, { "docid": "d88f2734c40c676f00123239e7e901a8", "score": "0.713036", "text": "public function profile(SeeProfile $request): JsonResponse\n {\n return response()->resource($request->user(), new UserSerializer());\n }", "title": "" }, { "docid": "d9bcdf5a92bd1c84052e3dc081136290", "score": "0.7104948", "text": "public function profile() {\n\t\t$data['current'] = $this->session->userdata();\n\t\t$data['userItems'] = $this->lending->getUserItems($this->session->userdata('id'));\n\t\t$data['userRating'] = $this->lending->getUserRatings($this->session->userdata('id'));\n\t\t$addressData = $this->lending->getAddress();\n\t\t$this->session->set_userdata('address', $addressData);\n\t\t$this->load->view('profile', $data);\n\t}", "title": "" }, { "docid": "0d2b2dadce8f63673c4f292bdd106318", "score": "0.7099104", "text": "public function view_profile() {\n \n $data['user_info'] = $this->get_user_info();\n \n $data['acad_info'] = $this->get_acad_info(); \n \n $data['user_type'] = $this->user_type;\n \n $page_name = \"{$this->user_type}_profile\";\n $title = \"{$this->main->item('user_lname')}'s Profile\";\n $page_content = $this->load->view($this->folder_name.'/'.$page_name, $data, true);\n $page_content .= $this->load->view($this->folder_name.'/partials/change_image', $data, true);\n $this->page->build($page_content, $this->folder_name, $page_name, $title, false);\n }", "title": "" }, { "docid": "bf105f265aa28ccbc24bd1e962ec75f2", "score": "0.7088408", "text": "public function profile()\n {\n $action = route('profile.edit');\n \n if(Auth::user()->isAdmin()){\n $view = view('admin.user.edit.update');\n }else{\n $view = view('backend.user.edit.update');\n }\n $breadcrumbs = [\n [\n 'active' => false,\n 'route' => route('profile'),\n 'label' => __('app.profile'),\n ],\n [\n 'active' => true,\n 'label' => __('app.profile.edit'),\n ],\n \n ];\n return $view->with('title', __('app.profile'))\n ->with('action', $action)\n ->with('item', Auth::user())\n ->with('breadcrumbs', $breadcrumbs);\n }", "title": "" }, { "docid": "13ca1a76fd711c0a9480371cdb7d16f1", "score": "0.70704436", "text": "public function profile() {\r\n\t\t$user = $this->Auth->user();\r\n\t\tif($user != null) {\r\n\t\t\t$this->redirect(array('action'=>'view', $user['username']));\r\n\t\t} else {\r\n\t\t\t$this->redirect(array('action'=>'index'));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1bc6491811aeeb7bc3fbd033a323d6b2", "score": "0.7041294", "text": "public function profile()\n {\n $check_status = array(REQUEST_NO_PROVIDER_AVAILABLE,REQUEST_CANCELLED,REQUEST_TIME_EXCEED_CANCELLED,REQUEST_COMPLETED);\n\n $check_requests = Requests::where('confirmed_provider' , \\Auth::guard('provider')->user()->id)->whereNotIn('status' , $check_status)->count();\n\n $allow_availability_change = 1;\n\n if($check_requests == 0) {\n $allow_availability_change = 0;\n }\n\n return view('provider.profile')->with('allow',$allow_availability_change);\n }", "title": "" }, { "docid": "f383a8ce1e7c644fc36422fe99a7ef82", "score": "0.70246637", "text": "public function actionProfile()\n {\n $data = PembayaranZakat::find()->where(['pembayaranZakatUserId' => Yii::$app->user->identity->userId])->orderBy(['pembayaranZakatTgl' => SORT_DESC])->all();\n\n return $this->render('profile', ['data' => $data]);\n }", "title": "" }, { "docid": "c465ab30ce82ab5bce6687cd7c73091d", "score": "0.70071495", "text": "public static function profile()\r\n {\r\n if(!isset($_SESSION['id'])){\r\n $message = '<div class=\"container text-danger\"><b>You must login to view profile</b></div>';\r\n self::getTemplate('login', $message);\r\n }else{\r\n $id = $_SESSION['id'];\r\n $record = accounts::findOne($id);\r\n self::getTemplate('profile', $record);\r\n }\r\n }", "title": "" }, { "docid": "b7bdd5393701d1dea36d74b16deb00f0", "score": "0.70021534", "text": "public function profile() {\n $query = $this->Users->find('all')->contain(['AdminDetails'])->where(['Users.id' => $this->Auth->user('id')], ['Users.is_active' => 1]);\n $userDetail = $query->first();\n $this->set(compact('userDetail'));\n }", "title": "" }, { "docid": "119a955f63c8b2146997b700aa22b07f", "score": "0.6998786", "text": "function profile(){\n\t\tglobal $template;\n\t\tlogin_required();\n\t\t$template->set_title('My Profile');\n\t\t$template->render(\"user\",\"profile\",true);\n\t}", "title": "" }, { "docid": "9b27654feb35688d36635f584fb022d7", "score": "0.6988962", "text": "public function profile()\n {\n $this->set_login_required(true);\n $this->information['page_title'] = 'Profile Page';\n $this->information['description'] = \"Just a sample profile page\";\n $this->information['nav_urls']['account']['active'] = true;\n\n $this->load_view('account/account_view.php', $this->information);\n }", "title": "" }, { "docid": "f15fc154a42afdd90b17552f35dfd88b", "score": "0.6980945", "text": "public function showProfilePage() {\n $username = $_GET['username'];\n if ($this->db->exists('users', 'username', $username)) {\n $user = $this->db->getUser('username', $username);\n $numbers = $user->getNumbers($this->db);\n $requests = $user->getRequests($this->db);\n $this->view->set('user', $user);\n $this->view->set('numbers', $numbers);\n $this->view->set('requests', $requests);\n $this->view->show('user/view');\n $this->view->render('html');\n } else {\n $this->view->show('user/notfound');\n $this->view->render('html');\n }\n }", "title": "" }, { "docid": "9c6147456b98e779465e47f18fb29ee0", "score": "0.6971415", "text": "function show_Profile (){\n \t\treturn view('layouts.update_profile');\n\t}", "title": "" }, { "docid": "84d0679c6af97eecc5f50d2391643e1b", "score": "0.6967676", "text": "public function profile()\n {\n if(!WebUser::isGuest()) {\n $user = User::findOne(['id' => WebUser::getID()]);\n \n return $this->render('profile', ['model' => $user, 'active' => 4]);\n } else {\n $this->redirect('/');\n }\n }", "title": "" }, { "docid": "00041f9f03445eb8819fb8cac3f8b5c5", "score": "0.69484895", "text": "public function profile()\n\t{\n\t\t$categories = $this->problem_model->get_category();\n\t\t$data['categories'] = $categories;\n\n\t\t$this->loginInfo = $this->session->all_userdata();\n\t\t$data['profile']= $this->brain_model->get_profile($this->loginInfo);\n\t\t$this->load->view('profile',$data);\n\t}", "title": "" }, { "docid": "1e18bde67e6ba3236f12423424239993", "score": "0.6936886", "text": "public function profile()\n {\n $users = Systems::getProfile_role_name();\n $data['data'] = $users[0];\n\n return view('member::profile',$data);\n }", "title": "" }, { "docid": "41eabbe9dc6f31e66149d26d40a7cc7c", "score": "0.69330657", "text": "public static function showProfile($profile) {\r\n \r\n if (is_null($profile) || !($profile instanceof UserProfile) || $profile->getErrorCount() > 0) {\r\n ?><p>Error: profile has errors or is invalid and cannot be shown</p><?php\r\n return;\r\n }\r\n \r\n $host_base = $_SERVER['HTTP_HOST'].'/'.$_SESSION['base'];\r\n $_SESSION['styles'][] = 'ProfileStyles.css';\r\n HeaderView::show($profile->getUserName() . '\\'s Profile');\r\n ?>\r\n<section id=\"profile-info\" class=\"row\">\r\n <div class=\"col-sm-12 col-md-3 col-lg-4\"><?php\r\n if (!empty($profile->getPicture())): ?>\r\n <img src=\"<?= 'http://' . $host_base . '/' . self::$imgDir . $profile->getPicture() ?>\" class=\"img-responsive img-rounded\" alt=\"<?= $profile->getUserName() ?>'s profile picture\" /><?php\r\n else: ?>\r\n No profile image: <?php echo $profile->getPicture();\r\n endif; ?>\r\n </div>\r\n <div class=\"col-sm-6 col-md-5 col-lg-4\">\r\n \r\n <ul class=\"list-group\">\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n First Name:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getFirstName() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Last Name:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getLastName() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n E-mail:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getEmail() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Phone #:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getPhoneNumber() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Gender:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getGender() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Facebook:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getFacebook() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Date of Birth:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getDOB() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-4\">\r\n Country:\r\n </div>\r\n <div class=\"attrValue col-sm-8\">\r\n <?= $profile->getCountry() ?>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"col-sm-6 col-md-4 col-lg-4\">\r\n <ul class=\"list-group\">\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n Theme:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->getTheme() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n Theme Accent Color:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->getAccentColor() ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n Profile Public:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->isProfilePublic() ? \"yes\" : \"no\" ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n Picture Public:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->isPicturePublic() ? \"yes\" : \"no\" ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n E-mail Reminders:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->isSendRemindersSet() ? \"yes\" : \"no\" ?>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item row\">\r\n <div class=\"attrLabel col-sm-6 col-lg-5\">\r\n Stay Logged In:\r\n </div>\r\n <div class=\"attrValue col-sm-6 col-lg-7\">\r\n <?= $profile->isStayLoggedInSet() ? \"yes\" : \"no\" ?>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n</section><?php\r\n if (isset($_SESSION) && isset($_SESSION['profile']) && $_SESSION['profile']->getUserName() == $profile->getUserName()): ?>\r\n<section class=\"row\">\r\n <div class=\"col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4\">\r\n <a href=\"profile_edit_show\" class=\"btn btn-info btn-block\">\r\n <span class=\"glyphicon glyphicon-pencil\"></span>\r\n &nbsp;Edit Profile\r\n </a>\r\n </div>\r\n</section><?php\r\n endif;\r\n \r\n FooterView::show();\r\n }", "title": "" }, { "docid": "955f9b7bd5ecf05e93ba575936f70352", "score": "0.6876783", "text": "public function profile()\n {\n $user = $this->Users->get($this->CurUser->id);\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n $user = $this->Core->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved'), ['plugin' => 'Admin']);\n return $this->redirect(['action' => 'profile']);\n } else {\n $this->Flash->error(__('The user could not be saved'), ['plugin' => 'Admin']);\n }\n }\n \n $this->set(compact('user'));\n }", "title": "" }, { "docid": "102301cf0242958cda6dbf329584e1c0", "score": "0.685738", "text": "private function personalProfile() {\n if($this->registry->getObject('authenticate')->isLoggedIn() == true) {\n $user = $this->registry->getObject('authenticate')->getUser()->getUserID();\n // show the edit form\n $this->registry->getObject('template')->buildFromTemplates('header.tpl.php', 'profile/content/privateview.tpl.php', 'footer.tpl.php');\n $this->registry->getObject('template')->addTemplateBit('userbar', 'userbar_loggedin.tpl.php');\n // get the profile information to pre-populate the form fields\n require_once(FRAMEWORK_PATH . 'models/personalprofile.php');\n $profile = new Personalprofile($this->registry, $user);\n $profile->toTags('p_');\n require_once(FRAMEWORK_PATH.'models/crushreturn.php');\n $crush = new Crush($this->registry);\n }\n\telse {\n $this->registry->errorPage('Please login', 'You need to be logged in to edit your profile');\n }\t\n }", "title": "" }, { "docid": "e725ba32c98209028b62ed67c3bfae88", "score": "0.68559927", "text": "public function showProfile()\n\t{\n\n\t\t$me = User::find(Auth::user()->id);\n\n\t\t$bankinformation = unserialize($me->bankinformation);\n\n\t\t$withdrawal_requests = 0;\n\t\t$total_amount = 0;\n\t\t$requests_by_group = array(\n\t\t\t'id' => null,\n\t\t\t'username' => null,\n\t\t\t'name' => null,\n\t\t\t'last_update' => null,\n\t\t\t'status' => null,\n\t\t\t'group' => null,\n\t\t);\n\t\t$last_update = null;\n\t\t$request_status = null;\n\t\t$gateway = '';\n\n\t\t$requester = WithdrawRequestedBy::getUserrequest(Auth::user()->id);\n\n\t\tforeach ($requester as $my_request) \n\t\t{\n\t\t\t$last_update = $my_request->updated_at;\n\t\t\t$request_status = $my_request->status;\n\t\t}\n\t\t\n\t\t$requests_by_group = array( \n\t\t\t'id' => Auth::user()->id,\n\t\t\t'username' => DB::table('users')->where('id', '=', Auth::user()->id)->pluck('username'),\n\t\t\t'name' => DB::table('users')->where('id', '=', Auth::user()->id)->pluck('firstname') . ' ' . DB::table('users')->where('id', '=', Auth::user()->id)->pluck('lastname'),\n\t\t\t'last_update' => $last_update,\n\t\t\t'status' => $request_status,\n\t\t\t'group' => Withdraw::getRequestsfrom(Auth::user()->id),\n\t\t);\n\t\n\t\tforeach ($requests_by_group['group'] as $each) \n\t\t{\n\t\t\t$total_amount = $total_amount + $each['request'];\n\t\t\t$gateway = $each['gateway'];\n\t\t}\n\n\n\t\treturn View::make('account/profile', array(\n\t\t\t'page_title' => 'Profile',\n\t\t\t'me' => $me,\n\t\t\t'my_gateway' => $bankinformation,\n\t\t\t'requests_by_group' => $requests_by_group,\n\t\t\t'total_amount' => $total_amount,\n\t\t\t'gateway' => $gateway,\n\t\t));\n\t}", "title": "" }, { "docid": "d7c1dad6808a24319aa27f3f1772934e", "score": "0.68380684", "text": "public function editProfile(){\n\t}", "title": "" }, { "docid": "51b189f2147e6338efd32a59f203ce0b", "score": "0.6835801", "text": "public function profile()\n\t{\n\t\t$userId = $this->uri->segment(3);\n\t\t$follow_type = $this->userManager->getUserState($userId);\n\t\t$no_of_following = $this->userManager->noOfFollowings($userId);\n\t\t$userDetails = $this->userManager->getUserDetails($userId);\n\t\t$post_data = $this->postManager->getUsersPost($userId);\n\t\tforeach ($post_data as $post) {\n\t\t\t$post_details = $this->postManager->genearatePostContent($post->getDescription(), $post->getPostId());\n\t\t\t$post->setDescription($post_details);\n\t\t}\n\t\t$this->load->view('shared/header');\n\t\t$this->load->view('private_home', array(\n\t\t\t'userDetails' => $userDetails[0],\n\t\t\t'posts' => $post_data,\n\t\t\t'noOfPosts' => count($post_data),\n\t\t\t'noOfFollowing' => $no_of_following,\n\t\t\t'followType' => $follow_type\n\t\t));\n\t}", "title": "" }, { "docid": "e0d397582a9d077c82c2f1207447924d", "score": "0.6830283", "text": "public function show()\n {\n $user = Auth::getUser();\n return view('profile.show', ['user' => $user, 'editable' => true, 'guild' => $user->guilds()->onServer($this->server())->first()]);\n }", "title": "" }, { "docid": "2ed86af707422a37341da76954be4d74", "score": "0.6828337", "text": "public function Profile()\n {\n\n $data['page_title'] = $this->page_title;\n\n if (isset($_REQUEST['tab']) && !empty($_REQUEST['tab'])) {\n $tab = $_REQUEST['tab'];\n } else {\n $tab = 'panel_overview';\n }\n\n $data['tab'] = $tab;\n $last_login = (\\Session::has('last_login')) ? \\Session::get('last_login') : date('Y-m-d H:i:s');\n $data['last_login'] = \\App\\Common::TiemElapasedString($last_login);\n\n $user_info = \\DB::table('users')\n ->where('email', \\Auth::user()->email)\n ->first();\n $data['user_info'] = $user_info;\n\n $user_meta_info = \\DB::table('user_meta')\n ->where('meta_user_id', \\Auth::user()->id)\n ->get();\n\n foreach ($user_meta_info as $key => $list) {\n\n if ($list->user_meta_field_name == 'gender') {\n $data['gender'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_city') {\n $data['user_city'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_address') {\n $data['user_address'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_twitter_account') {\n $data['user_twitter_account'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_facebook_account') {\n $data['user_facebook_account'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_google_plus_account') {\n $data['user_google_plus_account'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_github_account') {\n $data['user_github_account'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_linkedin_account') {\n $data['user_linkedin_account'] = $list->user_meta_field_value;\n }\n if ($list->user_meta_field_name == 'user_skype_account') {\n $data['user_skype_account'] = $list->user_meta_field_value;\n }\n }\n return view('normal_user.profile',$data);\n }", "title": "" }, { "docid": "c02e8f981270a00f3177e9fe19c22684", "score": "0.6824893", "text": "public function admin_profile_page(){\n\t\t$data['title'] = 'Admin Profile';\n\t\t$data['content'] = 'admin/admin_profile';\n\t\t$data['profile'] = $this->Admin->get_single_admin_data($this->session->userdata('id'));\n\t\t$this->load->view('admin_master', $data);\n\t}", "title": "" }, { "docid": "a8bc8cf7ade8f02306eb4faadc858bdc", "score": "0.68226093", "text": "public function profile() {\n $this->data['meta_title'] = '';\n $this->data['active'] = 'data-target=\"employee_menu\"';\n $this->data['subMenu'] = 'data-target=\"all\"';\n $this->data['confirmation'] = null;\n \n $this->data['emp_info']= $this->action->read('employee', array('id'=> $this->input->get(\"id\")));\n\n $this->load->view($this->data['privilege'].'/includes/header', $this->data);\n $this->load->view($this->data['privilege'].'/includes/aside', $this->data);\n $this->load->view($this->data['privilege'].'/includes/headermenu', $this->data);\n $this->load->view('components/employee/employee-nav', $this->data);\n $this->load->view('components/employee/profile', $this->data);\n $this->load->view($this->data['privilege'].'/includes/footer');\n }", "title": "" }, { "docid": "4fd226f39c46711ed10c01af617e0564", "score": "0.6806001", "text": "public function getProfile()\n {\n if (Self::$customer_info) \n {\n $data[\"page\"] = \"Profile\";\n $data[\"mlm\"] = isset(Self::$customer_info->ismlm) ? Self::$customer_info->ismlm : 0;\n $data[\"profile\"] = Tbl_customer::shop(Self::$customer_info->shop_id)->where(\"tbl_customer.customer_id\", Self::$customer_info->customer_id)->first();\n $data[\"profile_address\"] = Tbl_customer_address::where(\"customer_id\", Self::$customer_info->customer_id)->where(\"purpose\", \"permanent\")->first();\n $data[\"profile_info\"] = Tbl_customer_other_info::where(\"customer_id\", Self::$customer_info->customer_id)->first();\n $data[\"_country\"] = Tbl_country::get();\n $data[\"_locale\"] = Tbl_locale::where(\"locale_parent\", 0)->orderBy(\"locale_name\", \"asc\")->get();\n $data[\"allowed_change_pass\"] = isset(Self::$customer_info->signup_with) ? (Self::$customer_info->signup_with == \"member_register\" ? true : false) : false;\n\n $data['beneficiary'] = null;\n if(Self::$customer_info)\n {\n $data[\"customer_summary\"] = MLM2::customer_income_summary($this->shop_info->shop_id, Self::$customer_info->customer_id);\n $data[\"wallet\"] = $data[\"customer_summary\"][\"_wallet\"];\n\n $data['beneficiary'] = CustomerBeneficiary::first(Self::$customer_info->customer_id);\n }\n\n\n // $data[\"allowed_change_pass\"] = true;\n\n return (Self::load_view_for_members(\"member.profile\", $data));\n }\n else\n {\n return Redirect::to(\"/members/login\");\n }\n }", "title": "" }, { "docid": "42232fa62f0776a7d3924c73675f003d", "score": "0.6805093", "text": "function __loadProfile(){\n\t\tif(!$this->Session->check('profile')){\n\t\t\t$this->User = ClassRegistry::init('User');\n\t\t\t$this->User->id = AppController::$userid;\n\t\t\t$getMetaData = $this->User->getMeta('profile');\n\t\t\tif($getMetaData){\n\t\t\t\t$this->Session->write('profile', $getMetaData);\n\t\t\t}\n\t\t}\n\t\t$this->viewVars['jsonData']['profile'] = $this->Session->read('profile');\n\t}", "title": "" }, { "docid": "2e5c34041141a0ff9f5efd7607ea5e7c", "score": "0.68025297", "text": "public function view_profile(Request $request) {\n $user_info = User::find($request->id);\n return view(\"profile\")->with('user_info', $user_info);\n }", "title": "" }, { "docid": "0d6bf673ff2bf1793964d89bc539b5b9", "score": "0.67949504", "text": "public function getMyProfile()\n\t{\n\t\t$this->PageResponse->main_title = trans('pages.view.PROFILE' );\n\t\t$this->PageResponse->breadcrumb = [\n\t\t\t['route'=>route('index'),'text'=>'Home'],\n\t\t\t['route'=>route($this->route . '.index'),'text'=>$this->names],\n\t\t\t['route'=>NULL,'text'=> trans('pages.view.PROFILE')],\n\t\t];\n\t\treturn $this->edit(Auth::user()->collaborator);\n\t}", "title": "" }, { "docid": "59459b75a5b43281c5f0d56e0ec08507", "score": "0.6789073", "text": "public function profile() {\n \tif(!$this->user) {\n \t\t\n \t\tRouter::redirect('/users/login');\n \t}\n \t\n \t# If user is logged in:\n \t# Setup view\n \t$this->template->content = View::instance('v_users_profile');\n \t$this->template->title = \"Profile of \".$this->user->first_name;\n \n \t\t\n \t\t$avatar = $this->user->avatar;\n \t\t\n \t\t# Pass data to the view\n \t\t$this->template->content->avatar = $avatar; \t \t\n \t\n \t# Render template\n \techo $this->template;\n }", "title": "" }, { "docid": "78fb112da05aeca0de056803957b71fa", "score": "0.6787497", "text": "public function showProfile()\n {\n return view('user.profile');\n }", "title": "" }, { "docid": "91a9c07ae2f11a9c77de62996d3c4222", "score": "0.67854697", "text": "public function profile()\n {\n \n $this->check_login(); \n $profdata['res'] = $this->Prof_model->posts_list();\n $this->load->view('admin/includes/header');\n\n $this->load->view('admin/includes/sidebar');\n\n $this->load->view('admin/view_prof_list', $profdata);\n\n $this->load->view('admin/includes/footer');\n }", "title": "" }, { "docid": "fd67af5817feffeb6fdfe3e4ea8ec11d", "score": "0.6771955", "text": "public function getProfile()\n {\n if (Auth::check()){\n return view('user.profile')->withUser(Auth::user());\n } else abort(404);\n }", "title": "" }, { "docid": "9f8ab42f434d285ac16d9294027816aa", "score": "0.67716026", "text": "public function show(UserProfile $userProfile)\n {\n //\n }", "title": "" }, { "docid": "03b53c2eb32617423da377c10d54247e", "score": "0.67663217", "text": "public function profile()\n \n {\n \tif(!$this->user)\n \t\n \t{\n \t\t\n \t\t echo \"Members only. <a href='/users/login'>Login</a>\";\n \n \t\t # Return will force this method to exit here so the rest of the code won't be executed and the profile view won't be displayed.\n \t\t return false;\n\t\n\t }\n \n\t # Setup view\n \t $this->template->content = View::instance('v_users_profile');\n \t $this->template->title = \"Profile of\".$this->user->first_name;\n \n\t # Render template\n\t echo $this->template;\n \n \t # Display the menu\n\t echo \"<a href='/users/logout'>Logout</a></br>\";\n\t echo \"<a href='/posts/users/'>Change who you're following</a></br>\";\n\t echo \"<a href='/posts/'>View posts</a></br>\";\n\t echo \"<a href='/posts/add'>Add a new post</a></br>\";\n \n }", "title": "" }, { "docid": "3c543cbb8e586ab102963f2b759284d8", "score": "0.67604476", "text": "public function show(){\n\t\t$user = Auth::user();\n\t\t$calling_code = Config::get('contains.CALLING_CODE');\n\n\t\treturn view('profile.index',compact('user','calling_code'));\n\t}", "title": "" }, { "docid": "d1ab2a958e3851f6f8d027fed1837ff2", "score": "0.6759767", "text": "public function changeprofile(){\n \n $this->show('changeprofileRestaurant', [ 'restaurant'=>$this->session->get('restaurant')]);\n \n }", "title": "" }, { "docid": "58cf870017534dc684d16a81dd07e24e", "score": "0.6754472", "text": "function profile(){\n\t\t// Check that there is a user logged in\n\t\tif(isset($this->session->userdata['id'])){\n\t\t\t$result = $this->user_model->retrieve($this->session->userdata['id']);\n\t\t\tif($result === false){\n\t\t\t\tredirect('user/login');\n\t\t\t}else{\n\t\t\t\t$this->load->view('user/user_profile', $result);\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('user/login');\n\t\t}\n\t}", "title": "" }, { "docid": "9a2e4f36873a0791692b63210b38afbf", "score": "0.67534244", "text": "public function index() {\n\t\t$this->profile();\n\t}", "title": "" }, { "docid": "2bc2845dc4a0f27042cb89627a87e19f", "score": "0.6752057", "text": "public function infoAction(){\n $inst_user = new Model_DbTable_User(); \n $this->view->login = urlencode($this->getRequest()->username);\n $rows = $inst_user->fetchAll($inst_user->select()->where('login = ?', $this->getRequest()->username));\n if(count($rows) == 1){\n $view_user = $inst_user->find($rows[0]['idUser'])->current(); \n $this->view->view_user = $view_user;\n $this->view->profile = $inst_user->getProfile($view_user->idUser);\n $this->view->bool_connecte = $inst_user->getUser();\n if($inst_user->getUser()){\n if($lists_user = $inst_user->getLists($view_user->idUser)){\n $this->view->lists = $lists_user;\n }\n if($friends_user = $inst_user->getFriends($view_user->idUser)){\n $this->view->friends = $friends_user;\n }\n }\n }\n }", "title": "" }, { "docid": "569c3e6118751c927d17687c3f2529c9", "score": "0.6746305", "text": "protected function profile() {\n\t\t\t$id = $_SESSION['user_id'];\n\t\t\t$user = $this->userModel->getUserById($id);\n\t\t\t$userData = $this->userModel->getUserDataById($id);\n\n\t\t\t// If data is not present show empty string\n\t\t\tif (!$userData) {\n\t\t\t\t$userData = [\n\t\t\t\t\t'user_data_id' => '',\n\t\t\t\t\t'address' => '',\n\t\t\t\t\t'zipcode' => '',\n\t\t\t\t\t'city' => '',\n\t\t\t\t\t'country' => '',\n\t\t\t\t\t'phone' => '',\n\t\t\t\t\t'date_of_birth' => '',\n\t\t\t\t\t'user_id_FK' => ''\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t// load data\n\t\t\t$data = [\n\t\t\t\t'user' => $user,\n\t\t\t\t'user_data' => $userData\n\t\t\t];\n\n\n\t\t\t// Load view\n\t\t\t$this->view('users/profile', $data);\n\t\t}", "title": "" }, { "docid": "63056e32f3b466bb3d5edf1f00fe0c19", "score": "0.6742808", "text": "public function user_profile()\n\t\t{\n\t\t\t$mail=$_SESSION['user_email'];\n\t\t\t$st['stats']=$this->auth->fetch_data_stats('neko_user_data',$mail);\t\t\n\t\t\t$this->load->view('layout/two-layer-header',$st);\n\t\t\t$this->load->view('user-profile',$st);\n\t\t\t$data['points']=$this->auth->fetch_data_highpoints('neko_user_data');\t\t\n\t\t\t$this->load->view('layout/side-bar',$data);\n\t\t\t$this->load->view('layout/footer');\n\t\t\n\t\t}", "title": "" }, { "docid": "32baaa1a8114e2c7713c0a69d4c734d8", "score": "0.6738865", "text": "function show_profile($profile) {\n\tglobal $core, $document, $user;\n\t$siteurl = $core->config['Paths']['web'];\n\n\t//Sanity check\n\tif (!is_object($profile)) { fatal_error(\"Invalid user object passed to show profile\"); }\t\n\n\t//Get info object\n\t$userinfo =& $profile->info;\n\t//For safety\n\t$userinfo['user_password'] = \"\"; $userinfo['user_cookie'] = \"\";\n\n\t//Fill in blanks\n\tif (!isset($userinfo['user_homepage']) || $userinfo['user_homepage'] == \"\") { \n\t\t$userinfo['user_homepage'] = \"<i>None</i>\"; }\n\telse {\n\t\t$userinfo['user_homepage'] = '<a href=\"' . $userinfo['user_homepage'] . '\">Homepage</a>';\n\t}\n\tif (!isset($userinfo['user_bio']) || $userinfo['user_bio'] == \"\") { \n\t\t$userinfo['user_bio'] = \"<i>Not available</i>\"; }\n\telse {\n\t\t$userinfo['user_bio'] = $core->make_formatted(\"plaintext\",$userinfo['user_bio']);\n\t}\n\tif (!isset($userinfo['user_picture']) || $userinfo['user_picture'] == \"\") { \n\t\t$site_url = $core->config['Paths']['web'];\n\t\t$style = $user->get(\"user_style\");\n\t\t$userinfo['user_picture'] = \"$site_url/resources/images/$style/nopicture.png\"; }\n\n\t//Build breadcrumb\n\t$userinfo['breadcrumb'] = '<p><img src=\"$siteurl/resources/images/$style/folder.gif\"></img>&nbsp;';\n\t$userinfo['breadcrumb'] .= '<a href=\"$siteurl/forums.php\" title=\"Home\">$title</a> / ';\n\t$userinfo['breadcrumb'] .= '<a href=\"$siteurl/user.php?id=' . $userinfo['user_id'] . '\" title=\"Home\">' . $userinfo['user_name'] . '</a>';\n\n\t//Push to user template\n\t$document->append_template(\"title\",array('title' => \"Profile\"));\n\t$document->append_template(\"user_profile\",$userinfo);\n\n\t//Administrative options\n\tif ($user->is_admin()) {\n\n\t\t$admin = '<br/><br/><small class=\"windowbg\">Admin: ' .\n\t\t\t\t'<a href=\"' . $siteurl . '/user.php?action=edit&amp;uid=' . $userinfo['user_id'] . '\">Edit User</a></small>';\n\t\t$document->append($admin);\t\n\t}\n}", "title": "" }, { "docid": "131ec6142bba437c1a952e3f6d39656d", "score": "0.6737481", "text": "public function profile() {\n//solo permitido SI esta logeuado\n if (!$this->isAuthorized()) {\n $data[\"error\"] = 1;\n $data[\"error_message\"] = \"Que haces por acá Picaron?.\";\n $this->load->view('home_layout', $data);\n return; //andate de esta funcion\n } else {\n $this->load->model('user_model');\n $data[\"log\"] = 1;\n $data[\"error\"] = 0;\n $res = false;\n\n if (($this->uri->segment(3) === null) || $this->uri->segment(3) === \"\" || $this->uri->segment(3) === \"me\" || $this->uri->segment(3) === $this->session->userdata('nick')) {\n $data[\"profile\"] = \"me\";\n $res = $this->user_model->selectByNick($this->session->userdata('nick'));\n } else if ($this->uri->segment(3) !== \"\" || ($this->uri->segment(3) !== null)) {\n $data[\"profile\"] = \"alien\";\n $res = $this->user_model->selectByNick(\"\" . $this->uri->segment(3) . \"\");\n }\n if ($res !== false) {\n if ($res->thumbUrl === \"\") {\n $res->thumbUrl = base_url() . ALT_PROFILE_PIC;\n } else {\n $res->thumbUrl = base_url() . USER_THUMB_IMAGE_UPLOAD . $res->thumbUrl;\n }\n $data[\"user_data\"] = $res;\n //aca habria que pedir videos\n $this->load->view('user_layout', $data);\n return; //andate de esta funcion \n } else {\n show_404();\n return;\n }\n }\n }", "title": "" }, { "docid": "38160d06fae7df6a05087313c5f6eed3", "score": "0.6735112", "text": "public function getProfile();", "title": "" }, { "docid": "caf1fe4cd82946f2f96d42183354b92e", "score": "0.67324966", "text": "public function my_profile(){\n AppController::myCheckSession();\n $myUser = $this->Session->read('User');\n \n $myUserId = $myUser['User']['id'];\n \n $conditions = array(\"User.id\" => $myUserId);\n \n $myInfo = $this->User->find('all',array('conditions' => $conditions));\n\n $this->set('myInfo', $myInfo);\n }", "title": "" }, { "docid": "8fe19914c6369f482bdb4fe5cc59be84", "score": "0.67182916", "text": "public function viewProfileAction() {\n\n try {\n $objClientService = new Base_Model_Lib_Client_Service_Client();\n $clientId = $this->_request->getParam('id');\n $clientInfo = $objClientService->getClient($clientId);\n $this->view->clientInfo = $clientInfo;\n } catch (Exception $ex) {\n throw new Exception('<ERROR>' . $ex->getMessage() . \"\\n\");\n }\n }", "title": "" }, { "docid": "b588105780369017bbd6a5fb04cc1a75", "score": "0.67121917", "text": "function open_graph_metas_show_profile_member_profile()\n{\n\tglobal $mybb, $lang, $memprofile;\n\tglobal $uid, $useravatar;\n\n\t// og:title\n\t$title = $lang->profile . ' - '. $mybb->settings['bbname'];\n\n\t// og:description\n\t$desc = $memprofile['username'];\n\tif(!empty($memprofile['signature']))\n\t{\n\t\t$desc .= \"\\n\".$memprofile['signature'];\n\t}\n\t$desc = open_graph_metas_helper_func_format_description($desc);\n\n\t// og:url\n\t$url = str_replace(\"{uid}\", $uid, PROFILE_URL);\n\t$url = open_graph_metas_helper_func_get_full_url($url);\n\n\t// og:image\n\t$useravatar = format_avatar($memprofile['avatar'], '', OPEN_GRAPH_METAS_IMG_MAX_DIMS);\n\t$image = $useravatar['image'];\n\n\tglobal $headerinclude;\n\t$headerinclude .= open_graph_metas_helper_func_output_og_metas($title, $url, $desc, $image);\n}", "title": "" }, { "docid": "ffebc110c3388e30cd50c428ac8cf60d", "score": "0.6701705", "text": "function profile()\n {\n $SpeakerID = Convert::raw2sql($this->request->param(\"SpeakerID\"));\n // Check to see if the ID is numeric\n if (is_numeric($SpeakerID)) {\n // Check to make sure there's a member with the current id\n if ($Profile = $this->findSpeaker($SpeakerID)) {\n $country = $Profile->Member() ? $Profile->Member()->Country : $Profile->Country;\n $Profile->CountryName = CountryCodes::countryCode2name($country);\n $data[\"Profile\"] = $Profile;\n //return our $Data to use on the page\n return $this->getViewer('profile')->process\n (\n $this->customise($data)\n );\n }\n }\n return $this->httpError(404, 'Sorry that speaker could not be found');\n }", "title": "" }, { "docid": "f8b272e73ed6d04e084a4810b491b135", "score": "0.6695867", "text": "public function profile()\n {\n $user=auth()->user();\n \n // return response()->json(auth()->user());\n return Response::success($user, \"Admin profile\");\n }", "title": "" }, { "docid": "961207058e6550ad919bb25d9048cdee", "score": "0.6683777", "text": "public function profile()\n\t{\n\t // Retrieve current user\n\t $user = \\T4KModels\\User::find(Auth::user()->id);\n\t \n\t // Array of data to send to view\n\t $data = array(\n\t 'user' => $user,\n\t 'currentRoute' => \\Route::currentRouteName(),\n\t 'activeScreen' => 'ProfileIndex'\n\t );\n\t \n\t // Render view\n\t $this->layout->content = \\View::make('users.moncompte', $data);\n\t}", "title": "" }, { "docid": "0614b69ffe3f20f376c44c49b9993355", "score": "0.6683124", "text": "public function get_profile()\n {\n $profile_data = User::all()->where(\"id\", Auth::user()->id);\n $specialization = Specialization::get();\n\n return view(\"settings.profile\")->with([\n 'profiles' => $profile_data,\n 'types' => $specialization\n ]);\n }", "title": "" }, { "docid": "5b3c4330bcff63a6e1e0e91ee411aad3", "score": "0.667957", "text": "public function actionProfile()\n {\n $avatar = new AvatarForm;\n if (Yii::$app->request->isPost) {\n $avatar->imageFile = UploadedFile::getInstance($avatar, 'imageFile');\n $avatar->upload();\n }\n $model = $this->finder->findProfileById(\\Yii::$app->user->identity->getId());\n if ($model == null) {\n $model = \\Yii::createObject(Profile::className());\n $model->link('user', \\Yii::$app->user->identity);\n }\n $event = $this->getProfileEvent($model);\n $this->performAjaxValidation($model);\n $this->trigger(self::EVENT_BEFORE_PROFILE_UPDATE, $event);\n if ($model->load(\\Yii::$app->request->post()) && $model->save()) {\n \\Yii::$app->getSession()->setFlash('success', \\Yii::t('user', 'Your profile has been updated'));\n $this->trigger(self::EVENT_AFTER_PROFILE_UPDATE, $event);\n return $this->refresh();\n }\n return $this->render('profile', [\n 'model' => $model,\n 'avatar' => $avatar,\n ]);\n }", "title": "" }, { "docid": "69b2eae3a7e0d1545abd8623dd7f00a3", "score": "0.66752315", "text": "public function profile() {\n\t\t\n # If user is blank, they're not logged in; redirect them to the login page\n\t\tif(!$this->user) {\n\t\t\tRouter::redirect('/users/login');\n\t\t}\n\n\t\t# If they weren't redirected away, continue:\n\n\t\t# Setup view\n\t\t$this->template->content = View::instance('v_users_profile');\n\t\t$this->template->title = \"Profile of \".$this->user->first_name;\n\t\t$signupDate = Time::display($this->user->created, 'm-d-Y');\n\t\t$this->template->content->signupDate = $signupDate;\n\t\t# Render template\n\t\techo $this->template;\n\t\t\t\n }", "title": "" }, { "docid": "2b0db4eef5f79e8d4cc0571c4a218d25", "score": "0.66607517", "text": "public function myProfile()\n {\n $id = auth()->user()->id;\n $user_data = User::find($id);\n $role = User::find($id)->getRoles();\n\n if(auth()->user()->level() >= $this->constants['access_level']['sit']) {\n return self::getProfile($id);\n }\n\n else {\n\n $calculations = self::getProfileCalculations($id);\n\n return view('personal_profile')->with('user_data', $user_data)\n ->with('constants', $this->constants)\n ->with('role', $role)\n ->with('calculations', $calculations);\n }\n }", "title": "" }, { "docid": "12dc0a9ff8dc97f6e0d51f0a709c444c", "score": "0.6649109", "text": "public function profilelist()\n {\n $data['page'] = 'Farmer';\n $data['page_title'] = 'List Farmer Profile';\n $data['page_module'] = 'profile';\n $data['state_list'] = $this->Fpo_Model->getStateList();\n $this->load->view('farmer/farmer_profile_list', $data);\n }", "title": "" }, { "docid": "9bc8c409fd47e0b06f79d2acf8e29c4f", "score": "0.6624339", "text": "public function profile(Request $req)\n {\n $user = Admin::where('id', Auth::user()->id)->first();\n \n return view('admin.admin-profile', ['user' => $user]);\n }", "title": "" }, { "docid": "87ee0993ee94a7f138c47024167e88f8", "score": "0.662018", "text": "public function getShow()\n {\n $user = Auth::user();\n $type = 'Profile';\n return view('profiles.show', compact('user', 'type'));\n }", "title": "" }, { "docid": "1afae4db8462a47497376c97f1bb9e3e", "score": "0.6606777", "text": "public function getProfile(Request $request){\n if ($request->isMethod('post')) {\n \n }\n }", "title": "" }, { "docid": "a944c89e5e2ab2b866cfe932a08b02a9", "score": "0.660215", "text": "public function myprofile()\n {\n $userDetail = Auth::user();\n $school = new School();\n $schoolsList = $school->getList();\n $roleCountry = new RolesCountry();\n $rolesList = $roleCountry->getRoleByCountry(Auth::user()->userMeta->country);\n $userSchools = new UsersSchools();\n $user_schools = $userSchools->getUserSchools(Auth::user()->id);\n $my_schools = $userSchools->getUserSchools(Auth::user()->id, false);\n return view(generateUrlPrefix() . \".profile\", compact('userDetail', 'schoolsList', 'user_schools', 'rolesList', 'my_schools'));\n }", "title": "" }, { "docid": "3af745117e15c953d0d2c5f0a7027547", "score": "0.6600146", "text": "public function index(Request $request)\n {\n \t$data_user = Auth::user();\n\n if($this->getUserPermission('index profile'))\n {\n $this->systemLog(false,'Mengakses halaman Profile');\n return view('profile.index', ['active'=>'profile', 'data_user'=>$data_user]);\n }\n else\n {\n $this->systemLog(true,'Gagal Mengakses halaman Profile');\n return view('error.unauthorized', ['active'=>'profile']);\n }\n }", "title": "" }, { "docid": "af02e7e2cb200b8984350183be94d6e4", "score": "0.65952736", "text": "public function show(Request $request) {\n// $user=$request->user();\n// $profil=$user::with('tutorials', 'comments')->where('id', $user->id)->first(); //eager loading\n// \n// return $profil;\n \n // Menampilkan profil user\n return $request->user();\n }", "title": "" }, { "docid": "e3da582157c7ed362f4b003927a25216", "score": "0.65865564", "text": "public function profile(Request $request)\n {\n // $user = Staff::find($request);\n $user = auth()->user();\n return view('staff.profile', ['user' => $user]);\n }", "title": "" }, { "docid": "b0e6071160993f9f54402d85fe870ae5", "score": "0.6583911", "text": "public function my_profile()\n\t{\n\t\t$user = currentUserDetails();\n\t\treturn view('frontend.profile', compact('user'));\n\t}", "title": "" }, { "docid": "073c879595506d91af06c453c9b9b8fc", "score": "0.657098", "text": "public function profile()\n {\n $users = User::where('id', Auth::id())->get();\n //$users = User::all();\n return view('admin.profile',compact('users'));\n }", "title": "" }, { "docid": "37238570f3e0d5ccf1a0afd2a3bad396", "score": "0.65666634", "text": "public function show(ProfileRequest $request)\n {\n $profile = Profile::with('attachment')->firstOrFail();\n return $this->sendData($profile);\n }", "title": "" }, { "docid": "b90fcabf87285cd35c72f9788aa2c9d3", "score": "0.65607", "text": "public function profile()\n {\n return view('Main.profile');\n }", "title": "" }, { "docid": "067b1d2d46b368c73673cf843fc52dd8", "score": "0.65597343", "text": "public function profile(Request $request){\n $user_id = $request->route('id');\n $auth_id = Auth::user()->id;\n\n if($user_id == $auth_id){\n return \\redirect(route('home'));\n }\n\n $user = User::find($user_id);\n\n return view('users.profile', compact('user'));\n }", "title": "" }, { "docid": "4d4b0519e3b35904d0aee74cdb1710e5", "score": "0.6555947", "text": "public function getProfile()\n\t{\n\t\t$user = User::first();\n\t\treturn view('admin.profile')\n\t\t\t->with('user', $user);\n\t}", "title": "" }, { "docid": "49e79028dc30e35713136f67a9917245", "score": "0.6555869", "text": "public function getUserProfiles(){\n $pageData = [\n 'title' => 'User Profile',\n 'record' => \\App\\User::find(Auth::id()),\n ];\n\n $password_conf = app(LoginController::class)->userLevelInfoQuery(Auth::user()->id);\n\n $privilege_houses = Session::get('PRIVILEGE_HOUSE');\n if(empty($privilege_houses) ){\n $privilege_house_info=DB::select('SELECT * FROM bat_company WHERE bat_company_id ');\n }\n else {\n $privilege_house_info = DB::select('SELECT * FROM bat_company WHERE bat_company_id IN (' . $privilege_houses . ')');\n }\n\n return view('user.profiles', compact('pageData','password_conf','privilege_house_info'));\n }", "title": "" }, { "docid": "e197751569262878c0751c7753352ec9", "score": "0.655355", "text": "public function show()\n {\n return view('profile.show');\n }", "title": "" }, { "docid": "6e2be0c760075783ef3c39be6ae37130", "score": "0.65455097", "text": "public function editprofile()\r\r\n\t{\r\r\n\t\t$value['profile']\t= $this->admin_model->get_user_profile($this->session->userdata('user_name'));\r\r\n\r\r\n\t\t$data['title']\t\t= lang_key('edit_profile');\r\r\n\t\t$data['content'] \t= load_admin_view('profile/editprofile_view',$value,TRUE);\r\r\n\t\tload_admin_view('template/template_view',$data);\r\r\n\t}", "title": "" }, { "docid": "c09ceed3e1ed09dbd00369ea81296093", "score": "0.65396416", "text": "public function getAccountProfile()\n {\n # gets all the data from user by userId\n App::get('database')->selectWhere(\n 'users',\n [\n 'username'\n ],\n [\n 'userId' => $_SESSION['attributes']['userId']\n ]\n );\n\n\n $this->assign('css', ['account', 'form']);\n $this->assign('username',\n App::get('database')->fetch()['username']\n );\n\n $this->view('user/account/accountProfile');\n }", "title": "" }, { "docid": "d5d1f9ddc71ab4a09571026f819ac96b", "score": "0.65377903", "text": "function getProfile ();", "title": "" }, { "docid": "c78542bfca243627fbfc6a0b19f4ad46", "score": "0.653605", "text": "public function profile()\r\n {\r\n $state = getStates();\r\n $seeks = getGender();\r\n\r\n //If the form has been submitted\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n //var_dump($_SESSION['user']);\r\n\r\n if(!$this->_validator->validEmail($_POST['email'])) {\r\n $this->_f3->set('errors[\"email\"]', \"Invalid email\");\r\n }\r\n\r\n if (empty($this->_f3->get('errors'))) {\r\n //Store the data in the session array\r\n $_SESSION['user']->setEmail($_POST['email']);\r\n $_SESSION['user']->setState($_POST['state']);\r\n $_SESSION['user']->setSeeking($_POST['seek']);\r\n $_SESSION['user']->setBio($_POST['bio']);\r\n\r\n if($_SESSION['user'] instanceOf PremiumMember) {\r\n //Redirect to interests page\r\n $this->_f3->reroute('/interests');\r\n }\r\n else{\r\n //Redirect to summary page\r\n $this->_f3->reroute('/summary');\r\n }\r\n }\r\n }\r\n\r\n $this->_f3->set('selected', $_POST['state']);\r\n $this->_f3->set('selectedSeek', $_POST['seek']);\r\n $this->_f3->set('email', $_POST['email']);\r\n $this->_f3->set('bio', $_POST['bio']);\r\n $this->_f3->set('seeks', $seeks);\r\n $this->_f3->set('state', $state);\r\n\r\n $view = new Template();\r\n echo $view->render('views/profile.html');\r\n }", "title": "" }, { "docid": "926a6b375a94d31df74b2586f33770bb", "score": "0.6533162", "text": "function seeProfilAction() {\r\n\r\n global $_URL;\r\n $pseudo = array_keys($_URL);\r\n\r\n $indexM = $this->loadModel(\"profil\");\r\n\r\n $return = $indexM->seeProfil(@$pseudo[0]);\r\n\r\n $this->loadView(\"header_co\", \"\");\r\n $this->loadView(\"profil\", $return);\r\n $this->loadView(\"footer\", \"\");\r\n }", "title": "" }, { "docid": "c0e8508184645c3c4fd7714561b6313c", "score": "0.65303993", "text": "public function profile(Request $request)\n {\n $user = getUser($request->id);\n $socials = DB::table('user_reseau_socials')\n ->join('reseau_socials','reseau_socials.id','=','user_reseau_socials.reseau_socials')\n ->where('user_reseau_socials.user_id','=',$request->id)\n ->select('user_reseau_socials.*','reseau_socials.*')\n ->get();\n\n return view('profile')->with('userInfo',$user)->with('socials',$socials);\n }", "title": "" } ]
f606ff958330d1eead5257439e0d03bc
Remove likes of post
[ { "docid": "88db21d636faabcd85cc155829566fa8", "score": "0.69910073", "text": "public function rmlikespost($id){\n // Prepare Query\n $this->db->query('DELETE FROM likes WHERE id_post = :id_post');\n\n // Bind Values\n $this->db->bind(':id_post', $id);\n \n //Execute\n if($this->db->execute()){\n return true;\n } else {\n return false;\n }\n }", "title": "" } ]
[ { "docid": "d3da0747be6f902f7dab43c13a7fc1d0", "score": "0.8487187", "text": "public function removeLikes();", "title": "" }, { "docid": "cb27efe586a634f2e71ee94a19fcf25b", "score": "0.7620483", "text": "public function unlike()\n {\n $this->likes()->where(['user_id' => auth()->id()])->delete();\n }", "title": "" }, { "docid": "5204937699475a7712df68c6959a15f0", "score": "0.72869235", "text": "public function removeLike(){\n\n\t\t//get post informations\n\t\t$event_id = request('event_id');\n\n\t\t// restraint access\n\t\tif(Auth::user() !== null)\n\t\t{\n\t\t\tif(Auth::user()->id_roles != 3)\n\t\t\t{\n\t\t\t\t$liked = ConnexionVoted::where('id_events', $event_id)->where('id_users', Auth::user()->id);\n\n\t\t\t\t$liked->delete();\n\t\t\t}\n\t\t}\n\t\treturn redirect('/events/'.$event_id);\n\t}", "title": "" }, { "docid": "b26c93464c62a48d2ae3cb4ee3811f53", "score": "0.726325", "text": "function unLike($jrrny_id, $user_id) {\n\tglobal $wpdb;\n\t//Remove count of voute\n\t$likesCount = intval(get_post_meta( $jrrny_id, \"likes_count\", true ));\n\t--$likesCount;\n\t$like = update_post_meta($jrrny_id, \"likes_count\", $likesCount);\n\tif(!$like){\n\t\tthrow new Exception('Can not save meta!');\n\t}\n\n\t//Remove from like table\n\t$sql = \"DELETE FROM `\". $wpdb->prefix . \"jrrny_likes` \";\n\t$sql .= \"WHERE user_id='\" . intval($user_id) .\"' \";\n\t$sql .= \"AND post_id='\" . intval($jrrny_id) . \"' \";\n\t$sql .= \";\";\n\t$wpdb->get_results( $sql );\n\n\t//sendUnlikeMail($jrrny_id, $user_id);\n\n\treturn $likesCount;\n}", "title": "" }, { "docid": "71e9b6e8a987c17cfe0c54b76aa0fe39", "score": "0.6755245", "text": "public function unfavorite()\n {\n $arguments = ['user_id' => auth()->id()];\n\n // fetching and deleting a like\n $this->favorites()->where($arguments)->delete()->get()->each(function ($favorite){\n\n $favorite->delete();\n\n });\n }", "title": "" }, { "docid": "d4f3dbd9fd04fdc9a55b028840f38705", "score": "0.67171377", "text": "public function rmlikes($data2){\n // Prepare Query\n $this->db->query('DELETE FROM likes WHERE id_post = :id_post AND id_user = :id_user');\n\n // Bind Values\n $this->db->bind(':id_post', $data2['id_post']);\n $this->db->bind(':id_user', $data2['id_user']);\n \n //Execute\n if($this->db->execute()){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "287ff36660941171cc68d43ad9cc0f3d", "score": "0.66956604", "text": "public function destroy(Post $post)\n {\n $post->likes()->where('user_id','=',auth()->user()->id)->delete();\n return ['status'=>true];\n }", "title": "" }, { "docid": "84feb3723278e3092a19ef60625a037e", "score": "0.6584998", "text": "function removeLike($page_id)\r\n {\r\n $FD = getInstance();\r\n $graph_url = \"https://graph.facebook.com/$page_id/likes?method=delete&access_token=\".$FD->Session->get_data('FB_TOKEN');\r\n $res = json_decode(file_get_contents($graph_url)); \r\n return $res;\r\n }", "title": "" }, { "docid": "a95cbb66243195ca2cfcba2711853974", "score": "0.6563065", "text": "function deleteLike($data) {\n\n $likeID = sanitize_text_field($data['like']); //'like' needs to match the name of the property that we're sending from your javascript.\n\n //get_post_field = first argument is what information you want about that post \n //second argument is the ID of the post that you want information about.\n if (get_current_user_id() == get_post_field('post_author', $likeID) AND get_post_type($likeID) == 'like') {\n \n //First argument is obviously the ID of the post that we want to delete.\n //second argument is if you want to send it to the trash first or if you just want to skip the trash and permanently delete (true = skip trash)\n wp_delete_post($likeID, true);\n\n return 'Like deleted!';\n } else {\n die(\"You do not have permission to delete that.\");\n }\n}", "title": "" }, { "docid": "38cd712f4e12706386384fcefe40ab16", "score": "0.65498626", "text": "public function unlike (int $user_id, int $post_id)\n {\n if ($this->is_liked_by($user_id, $post_id))\n {\n $delete_query = $this->link->prepare(\n 'DELETE FROM favorite\n WHERE \n user_id = :user &&\n post_id = :post'\n );\n $delete_query->execute([\n ':user' => $user_id,\n ':post' => $post_id\n ]);\n }\n }", "title": "" }, { "docid": "b5790dc29a1afe06536aae1f625406ee", "score": "0.6545079", "text": "public function destroy(Post $post)\n {\n auth()->user()->likes()->detach($post->id);\n\n return back();\n }", "title": "" }, { "docid": "476663caffa36d71187bbd9c1ef2db66", "score": "0.6517586", "text": "public function destroy(Likes $likes)\n {\n //\n }", "title": "" }, { "docid": "476663caffa36d71187bbd9c1ef2db66", "score": "0.6517586", "text": "public function destroy(Likes $likes)\n {\n //\n }", "title": "" }, { "docid": "fa1b21c14e891bbcfe4584b71539a54a", "score": "0.6503702", "text": "public function testAUserCanUnlikeAPost()\n {\n $this->post->like();\n $this->post->unlike();\n\n $this->assertDatabaseMissing('likes', [\n 'user_id' => $this->user->id,\n 'likeable_id' => $this->post->id,\n 'likeable_type' => get_class($this->post)\n ]);\n\n $this->assertFalse($this->post->isLiked());\n }", "title": "" }, { "docid": "9164efab1d8de9b8c84a16bff7eec5ad", "score": "0.64423895", "text": "public function destroy(Like $like)\n {\n //$post = Post::find($id);\n //$post->users()->attach(Auth::id());\n // $post = Employee::find($id);\n // $post->users()->attach(Auth::id());\n $like = Like::where('tweet_id', $id)->where('tweet_id', Auth::id())->first();\n $like->delete();\n return response()->json([\n 'result' => true,\n ]);\n }", "title": "" }, { "docid": "5ad0f891ebb8a134634501e750337f7d", "score": "0.6432131", "text": "function jptweak_remove_share() {\n remove_filter( 'the_content', 'sharing_display', 19 );\n remove_filter( 'the_excerpt', 'sharing_display', 19 );\n if ( class_exists( 'Jetpack_Likes' ) ) {\n remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );\n }\n}", "title": "" }, { "docid": "b1835865142552ef636d97362c8761f3", "score": "0.64251477", "text": "function jptweak_remove_share() {\n remove_filter( 'the_content', 'sharing_display',19 );\n remove_filter( 'the_excerpt', 'sharing_display',19 );\n if ( class_exists( 'Jetpack_Likes' ) ) {\n remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );\n }\n}", "title": "" }, { "docid": "dca7f0cd717abc5d5752b951d029bea3", "score": "0.6401534", "text": "function jptweak_remove_share() {\n remove_filter( 'the_content', 'sharing_display',19 );\n remove_filter( 'the_excerpt', 'sharing_display',19 );\n if ( class_exists( 'Jetpack_Likes' ) ) {\n remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );\n }\n}", "title": "" }, { "docid": "cc8877282c891d05cbd62aa256f9483c", "score": "0.6358164", "text": "public function dislikes(): HasMany\n {\n return $this->swipes()->disliked();\n }", "title": "" }, { "docid": "861915d6d4267ded41c4c43face94e53", "score": "0.6346221", "text": "public function unlikePost($pid)\r\n {\r\n if (!is_string($pid)) {\r\n throw new LinkedInException('LinkedIn->unlikePost(): bad data passed, $pid must be of type string');\r\n }\r\n \r\n // construct the XML\r\n $data = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\t\t <is-liked>false</is-liked>';\r\n \r\n // construct and send the request\r\n $query = self::_URL_API . '/v1/posts/' . trim($pid) . '/relation-to-viewer/is-liked';\r\n $response = $this->fetch('PUT', $query, $data);\r\n \r\n /**\r\n * Check for successful request (a 204 response from LinkedIn server) \r\n * per the documentation linked in method comments above.\r\n */\r\n return $this->setResponse(204, $response);\r\n }", "title": "" }, { "docid": "9db65c0dd5f5da9f51db1005527b3ca8", "score": "0.6334036", "text": "public function dislike($id)\n {\n $like = Like::where([\n ['user_id','=',parent::getUserId()],\n ['post_id','=',$id]\n ])->first();\n\n if($like !== null){\n $like->delete();\n\n $totalLikes = Like::where('post_id','=',$id)->count();\n\n return json_encode(['statusCode' => 200,'totalLikes' => $totalLikes]);\n }\n\n return json_encode(['statusCode' => 400,'totalLikes' => -1]);\n }", "title": "" }, { "docid": "c60a29ff7f549ec894f89ae008e4c224", "score": "0.6319327", "text": "public function unlike(int $id, Request $request)\n {\n // check if there is a logged in user\n if (!$this->user) {\n flash()->error('Error', 'No user is logged in.');\n\n return back();\n }\n\n if (!$post = Post::find($id)) {\n flash()->error('Error', 'No such post');\n\n return back();\n }\n\n // update the likes\n --$post->likes;\n $post->save();\n\n // delete the like\n $response = Like::where('object_id', '=', $id)->where('user_id', '=', $this->user->id)->where('object_type', '=', 'post')->first();\n $response->delete();\n\n flash()->success('Success', 'You are no longer liking the post.');\n\n return back();\n }", "title": "" }, { "docid": "256bb5599761e7e23f528203a58904a3", "score": "0.63016355", "text": "public function destroy(Likes $likesDisLikes)\n {\n //\n }", "title": "" }, { "docid": "c629f2dd2cc14cb85f4fef8818b1643c", "score": "0.6280888", "text": "public function removeAllRelatedPosts() {}", "title": "" }, { "docid": "a620f35f9a6804ddd3d92235310eab65", "score": "0.62324643", "text": "public function unlike_post($id)\r\n {\r\n echo json_encode(array(\r\n 'success' => $this->newsfeed_model->unlike_post($id)\r\n ));\r\n }", "title": "" }, { "docid": "7c7c79109bf6ae75a7ca89149f1d960d", "score": "0.6229411", "text": "function delete_like($entry_id) {\n $this->fetch(\"/like/delete\", null, array(\n \"entry\" => $entry_id,\n ));\n }", "title": "" }, { "docid": "2e7256ef95f1a64bc82769db2c98ffef", "score": "0.6166249", "text": "public function unlike($entity, User $user=null)\r\n {\r\n \tif (!$user) $user = $this->user;\r\n if (!$user) throw new AccessDeniedException('User not logged in');\r\n \r\n $isliking = $this->isLiking($entity, $user);\r\n $type = $this->getType($entity);\r\n \r\n if (!$isliking) throw new \\Exception('User does not like ' . $type);\r\n \r\n $lc = $entity->getLikeCount();\r\n foreach ($isliking as $lk) {\r\n \t\t$this->em->remove($lk);\r\n \t\t$lc--;\r\n \t} \r\n \t$this->em->flush();\r\n \t\r\n \t$ent = $this->em->getRepository('DodiciFansworldWebBundle:'.ucfirst($type))->find($entity->getId());\r\n \t$ent->setLikeCount($lc);\r\n \t$this->em->persist($ent);\r\n \t$this->em->flush();\r\n }", "title": "" }, { "docid": "9db0bc50bec357a11aaec255623e6605", "score": "0.61173236", "text": "public function unlikeIt(Reply $reply)\n {\n $reply->like()->where('user_id', auth()->id())->first()->delete();\n\n broadcast(new LikeEvent($reply->id, 0))->toOthers();\n }", "title": "" }, { "docid": "d544874540d2ccc61c54f4305fdefae7", "score": "0.60796237", "text": "public function unLikeIt(Reply $reply)\n {\n $reply->likes()->where('user_id', '1')->first()->delete();\n\n return response('Unliked!', 204);\n }", "title": "" }, { "docid": "321d3c4f746352cb7d3b1e37c14e606a", "score": "0.6062916", "text": "public function removeAllPosts() {}", "title": "" }, { "docid": "4e33a4432c87f9435bf809221c676beb", "score": "0.5881631", "text": "public function unlike(Request $request)\n {\n Likes::where([\n ['address', '=', $request->address],\n ['contract', '=', $request->contract],\n ['token_id', '=', $request->token_id]\n ])->update(['liked' => false]);\n return response()->json(['success' => true]);\n }", "title": "" }, { "docid": "3612a04217eb30504077aef0576f07f4", "score": "0.5877278", "text": "function delete_likes_movies($idUser, $idMovie) {\n $liaison = liaison_user_movie($idUser, $idMovie);\n\n // Si une liaison existe\n if( $liaison != false ) { \n $query = MySQL::getInstance()->prepare(\"UPDATE users_movies_liaison SET likes = NULL WHERE user_id=:idUser and movie_id=:idMovie\"); \n $query->bindValue(':idUser', $idUser, PDO::PARAM_INT);\n $query->bindValue(':idMovie', $idMovie, PDO::PARAM_INT);\n return $query->execute();\n }\n}", "title": "" }, { "docid": "cd4003817f00096d81aa0dcf590e441e", "score": "0.5870654", "text": "public function removeLike($db, $pictureID, $userID) {\n $db->query(\"DELETE FROM likes WHERE pictureID = ? AND userID = ?\", [\n $pictureID,\n $userID]);\n }", "title": "" }, { "docid": "f6988103384315cbd16d4065978f6bfb", "score": "0.58428067", "text": "public function unlikeAction()\n\t{\n\t\tif (!$this -> _helper -> requireUser() -> isValid())\n\t\t\treturn;\n\n\t\t// Collect params\n\t\t$action_id = $this -> _getParam('action_id');\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\n\n\t\t// Start transaction\n\t\t$db = Engine_Api::_() -> getDbtable('likes', 'activity') -> getAdapter();\n\t\t$db -> beginTransaction();\n\n\t\ttry\n\t\t{\n\t\t\t$action = Engine_Api::_() -> getDbtable('actions', 'activity') -> getActionById($action_id);\n\t\t\t// Check authorization\n\t\t\tif (!Engine_Api::_() -> authorization() -> isAllowed($action -> getObject(), null, 'comment'))\n\t\t\t{\n\t\t\t\tthrow new Engine_Exception('This user is not allowed to unlike this item');\n\t\t\t}\n\n\t\t\t$action -> likes() -> removeLike($viewer);\n\t\t\t$db -> commit();\n\t\t\t$data = array('title' => $this->view->translate('Like'),\n\t\t\t\t\t\t 'str_totalLike' => $this->view->translate(array('%s Like','%s Likes', $action -> likes() -> getLikeCount()), $action -> likes() -> getLikeCount())\n\t\t\t\t\t\t);\n\t\t\tif($action -> likes() -> getLikeCount() == 0)\n\t\t\t{\n\t\t\t\t$data['str_totalLike'] = '';\n\t\t\t}\n\t\t\telse if($action -> comments() -> getCommentCount() && $action -> likes() -> getLikeCount()) \n\t\t\t{\n\t\t\t\t$data['str_totalLike'] = $data['str_totalLike'].' <span class=\"ynmb_dot\">·</span>';\n\t\t\t}\n\t\t\t$this -> _helper -> layout() -> disableLayout();\n\t\t\t$this -> _helper -> viewRenderer -> setNoRender(true);\n\t\t\techo Zend_Json::encode($data);\n\t\t\texit;\n\t\t}\n\n\t\tcatch( Exception $e )\n\t\t{\n\t\t\t$db -> rollBack();\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "7b8542faca002b134b4edb83996714b6", "score": "0.583844", "text": "function like_decrease (&$likes)\n{\n\tif ($likes > 0) {\n\t\t$likes = $likes - 1;\n\t}\n}", "title": "" }, { "docid": "ac47091ad29983b19a5e5bac69198233", "score": "0.58371824", "text": "public function disLike($image_id){\n \n\n \n /* recoger datos del usuario y la imagen */\n $user = Auth::user();\n\n /* para comprobar si ya le di like a una publicacion y no duplicarlo */\n $like = Like::where('user_id', $user->id)\n ->where('image_id', $image_id)\n ->first();\n\n\n \n \n if($like){\n \n /* eliminar el like que existe*/\n $like->delete();\n\n return response()->json([\n 'like' => $like,\n 'message'=> 'like eliminado'\n ]);\n\n /* ahora me creo una ruta en routes web.php */\n }else{\n return response()->json([\n 'message' => 'el like no existe'\n ]);\n }\n }", "title": "" }, { "docid": "a497e8485eec44b946ea10613aafb482", "score": "0.5808255", "text": "public function likeForumPost($forumPostId ,$userId){\n $stmt = $this->pdo->query(\"SELECT COUNT(*) FROM forumpost_user_like WHERE userid = \" . $userId . \" AND forumpostid = \" . $forumPostId);\n $checkIfUserLiked = $stmt->fetchColumn();\n if($checkIfUserLiked == 1){\n $stmt = $this->pdo->query(\"UPDATE forumposts SET likes = likes - 1 WHERE id = \" . $forumPostId);\n $stmt = $this->pdo->query(\"DELETE FROM forumpost_user_like WHERE userid = \" . $userId . \" AND forumpostid = \" . $forumPostId);\n }else if($checkIfUserLiked == 0){\n $stmt = $this->pdo->query(\"UPDATE forumposts SET likes = likes + 1 WHERE id = \" . $forumPostId);\n $stmt = $this->pdo->query(\"INSERT INTO forumpost_user_like (forumpostid, userid) VALUES (\" . $forumPostId . \", \" . $userId . \")\");\n }\n \n }", "title": "" }, { "docid": "3c55346856ac319961d645f7a60cd5be", "score": "0.5807", "text": "public function likePost($user_id) {\n //if count 0\n // guardo like\n // return true\n // return false\n \n }", "title": "" }, { "docid": "0b4b747e0b24766caa56153892970817", "score": "0.57994485", "text": "public static function likepost($postid, $liker) {\n if (!DB::query('SELECT user_id FROM post_likes WHERE post_id =? AND user_id = ? ', array($postid, $liker))) {\n DB::query('UPDATE posts SET likes = likes+1 WHERE id =? ', array($postid));\n DB::query('INSERT INTO post_likes VALUES(\"\",?,?)', array($postid, $liker));\n Notify::createnotify(\"\", $postid);\n } else {\n DB::query('UPDATE posts SET likes = likes-1 WHERE id =? ', array($postid));\n DB::query('DELETE FROM post_likes WHERE post_id = ? AND user_id = ? ', array($postid, $liker));\n }\n }", "title": "" }, { "docid": "3091a63ddd783ed60ac4b7d2cb824ca3", "score": "0.57893324", "text": "public function store(Request $request,$post)\n {\n\n $isLiked = Likes::where('post_id',$post)->where('user_id',$request->user() != null? $request->user()->id : 0)->orWhere('user_ip',$request->ip)->get();\n if($isLiked->count() < 1){\n Likes::create([\n 'post_id' => $post,\n 'user_id' => $request->user() != null? $request->user()->id : 0,\n 'user_ip' => $request->ip()\n ]);\n }else{\n $isLiked->map(function ($like) {\n $like->delete();\n });\n }\n return redirect()->back();\n\n }", "title": "" }, { "docid": "335b38ae7ee7e50f1e3fe1c3f184e0a4", "score": "0.57768476", "text": "public function removeModelLikes(LikeableContract $likeable, $type);", "title": "" }, { "docid": "153b6dd0cb1bb17eb5fa3e48d7a556dc", "score": "0.57657975", "text": "public function decrementLikesCount(LikeableContract $likeable);", "title": "" }, { "docid": "b3fce9c6314171109c172ed073a027f6", "score": "0.5748178", "text": "public function listPostUserLikes(){\n \n $user = Auth::user()->id;\n $posts = Like::where('user_id', $user)->pluck('post_id')->toArray();\n if($posts){\n return Post::whereIn('id', $posts)->withCount('comments','likes')->get();\n }else{\n return response([\n 'status'=>'error',\n 'message'=>trans('messages.listPostUserError')\n ]);\n }\n }", "title": "" }, { "docid": "a151250a0dc8325dd79be29f97b07f51", "score": "0.5747297", "text": "public function dislikes()\n {\n return $this->hasMany(ProductRatingLikes::class, 'product_rating_id')->where('like', false)->count();\n }", "title": "" }, { "docid": "07c8bcc9ec3b19ef000886c8aaf0422c", "score": "0.5744493", "text": "function nolike_partial_deletable_blogpost($conn, $owner, $timestamp, $title, $id, $content, $tags) {\n\t$trash = \"<a href='delete.php?val=\" . $id . \"'>🗑️ </a>\";\n\t$edit = \"<a href='edit.php?val=\" . $id . \"'>✏️</a>\";\n\treturn \"<div class='blogpost' id='bp\" . $id . \"'><p class='time'>Written by <a href='profile.php?username=\" . $owner . \"'>\" . $owner . \"</a> on \" . $timestamp . \" \" . $edit . $trash . \"</p><p class='title'>\" . strip_tags($title) . \"</p><p class='content'>\" . strip_tags($content) . \"</p><p class='tags'>\" . strip_tags($tags) . \"</p></div>\\n\";\n}", "title": "" }, { "docid": "946fe23550de5f452619b773a21728a3", "score": "0.57404464", "text": "function printLikeDislikePost($idpost){\n\tglobal $userid;\n\t$ficelle = '';\n\t$wallowner = getCreatorIdByPostId($idpost);\n\tif(!alreadyRatedPostByUser($idpost, $userid)){\n\t\t// Like button\n\t\t$ficelle.= '<div class=\"like_button\" ><button title=\"Like post\" value='.$idpost.' name=\"post_like\" type=\"submit\">\n\t\t\t\t\tLike\n\t\t\t\t\t</button></div>';\n\t\t// Dislike button\n\t\t$ficelle.= '<div class=\"dislike_button\" ><button title=\"Dislike post\" value='.$idpost.' name=\"post_dislike\" type=\"submit\">\n\t\t\t\t\tDislike\n\t\t\t\t\t</button></div>';\n\t}else{ // undo rating?\n\t\t$ficelle.= '<div class=\"user_post_rate\" >';\n\t\tif(getCurrentUserPostRatingByPost($idpost)==0){\n\t\t\t$ficelle.='You dislike this post. ';\n\t\t}else{\n\t\t\t$ficelle.='You like this post. ';\n\t\t}\n\t\t$ficelle.= '</div>';\n\n\t\t$ficelle.= '<div class=\"undo_button\" ><button title=\"Undo post rating\" value='.$idpost.' name=\"post_undo_rating\" type=\"submit\">\n\t\t\t\t\tUndo\n\t\t\t\t\t</button></div>';\n\t}\n\n\t// delete button\n\tif(posterOrOwnerOfPost($idpost, $userid)){\n\t\t$ficelle.= '<div class=\"delete_button\" ><button title=\"Delete post\" value='.$idpost.' name=\"post_delete\" type=\"submit\">\n\t\t\t\t\tDelete\n\t\t\t\t\t</button></div>';\n\t}\n\n\treturn $ficelle;\n}", "title": "" }, { "docid": "f4d7517c739f35cdcc7945ffb7d60a87", "score": "0.5733789", "text": "function getDislikesByPost($idpost){\n\t$sql = 'SELECT id FROM wall_post_rating WHERE rating=0 AND id_post='.$idpost;\n\t$query = mysql_query($sql);\n\n\tif(!$query || mysql_num_rows($query)<1) return 0;\n\treturn mysql_num_rows($query);\n}", "title": "" }, { "docid": "3bb893f62d94c3adf5784ff18ee2c8a9", "score": "0.57141685", "text": "public function postLikes(){\n return $this->hasMany(PostLike::class, 'post_id');\n }", "title": "" }, { "docid": "730795c918d375f75f6a6ab2d4e11a3c", "score": "0.56961024", "text": "public function shareRemove(Post $post)\n {\n auth()->user()->shared_posts()->detach($post);\n\n $user = auth()->user();\n\n return redirect(route('profile.sharedPosts', $user));\n\n }", "title": "" }, { "docid": "e6f87f51af59c725a1c140efb017ee98", "score": "0.5679599", "text": "public function unlikeBy($userId = null);", "title": "" }, { "docid": "a4de8039a35d8cb54ff1e5d9301d8e22", "score": "0.56646085", "text": "public function likeDeleteAction()\n {\n $response = array('status' => 0);\n if ($this->getRequest()->isAjax()) {\n $product_id = (int) $this->getRequest()->getParam('product', 0);\n $customer_id = (int) $this->getRequest()->getParam('customer', 0);\n $fb_id = $this->getRequest()->getParam('fb_id', 0);\n\n try {\n if ($product_id && $fb_id) {\n $collection = Mage::getModel('facebook/likes')->getCollection();\n /* @var $model Belvg_Facebook_Model_Resource_Likes_Collection */\n $collection->addFieldToFilter('fb_id', $fb_id)\n ->addFieldToFilter('product_id', $product_id);\n\n if ($collection->count()) {\n foreach ($collection as $item) {\n $item->delete();\n }\n }\n\n $response['status'] = 1;\n Mage::dispatchEvent('facebook_controller_like_delete',\n array('fb_id' => $fb_id, 'customer_id' => $customer_id, 'product_id' => $product_id));\n }\n } catch (Exception $e) {\n Mage::log('Delete Like: ' . $e->getMessage(), NULL, 'facebook.log');\n $response['error'] = $e->getMessage();\n }\n }\n\n $this->getResponse()->setHeader('Content-type', 'application/json');\n $this->getResponse()->setBody(Zend_Json::encode($response));\n }", "title": "" }, { "docid": "178787aa3d498fa4f7d550ee409b3a53", "score": "0.56375945", "text": "public function remove_related_post_data( $postId ) {\n\t\tglobal $current_user;\n\t\t$login = $current_user->user_login;\n\t\t$this->livepress_communication->send_to_livepress_handle_twitter_follow(\"clear\", \"\", $postId, $login); // TODO: Handle error\n\t\tCollaboration::clear_searches( $postId, $login ); //clear all term searches for this post/user\n\n\t}", "title": "" }, { "docid": "2a3e6edaa90a857875caa1b6daa157fa", "score": "0.56335557", "text": "public function removeMiddlePostFromBlog() {}", "title": "" }, { "docid": "5058a52fb676ff4bca0532791913b9b3", "score": "0.56311244", "text": "function delete_dislikes_movies($idUser, $idMovie) {\n $liaison = liaison_user_movie($idUser, $idMovie);\n\n // Si une liaison existe\n if( $liaison != false ) {\n $query = MySQL::getInstance()->prepare(\"UPDATE users_movies_liaison SET dislikes = NULL WHERE user_id=:idUser and movie_id=:idMovie\");\n $query->bindValue(':idUser', $idUser, PDO::PARAM_INT);\n $query->bindValue(':idMovie', $idMovie, PDO::PARAM_INT);\n\n return $query->execute();\n } \n}", "title": "" }, { "docid": "5a257d7a324603152004832524dec8e6", "score": "0.5616679", "text": "static function process_simple_like() {\n\t\t// Security check\n\t\t$nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : 0;\n\n\t\tif ( ! wp_verify_nonce( $nonce, 'simple-likes-nonce' ) ) {\n\t\t\texit( esc_html__( 'Not permitted', 'rovoko' ) );\n\t\t}\n\n\t\t// Base variables\n\t\t$post_id = ( isset( $_REQUEST['post_id'] ) && is_numeric( $_REQUEST['post_id'] ) ) ? $_REQUEST['post_id'] : '';\n\t\t$result = array();\n\t\t$post_users = null;\n\t\t$like_count = 0;\n\n\t\tif ( $post_id != '' ) {\n\t\t\t$count = get_post_meta( $post_id, \"_post_like_count\", true ); // like count\n\t\t\t$count = ( isset( $count ) && is_numeric( $count ) ) ? $count : 0;\n\n\t\t\tif ( ! self::already_liked( $post_id ) ) {\n\t\t\t\t// Like the post\n\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t// user is logged in\n\t\t\t\t\t$user_id = get_current_user_id();\n\t\t\t\t\t$post_users = self::post_user_likes( $user_id, $post_id );\n\n\t\t\t\t\t// Update User & Post\n\t\t\t\t\t$user_like_count = get_user_option( \"_user_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\t\t\t\t\tupdate_user_option( $user_id, \"_user_like_count\", ++ $user_like_count );\n\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_liked\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// user is anonymous\n\t\t\t\t\t$user_ip = self::get_user_ip();\n\t\t\t\t\t$post_users = self::post_ip_likes( $user_ip, $post_id );\n\n\t\t\t\t\t// Update Post\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_IP\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$like_count = ++ $count;\n\t\t\t\t$response['status'] = \"liked\";\n\t\t\t} else {\n\t\t\t\t// Unlike the post\n\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t// user is logged in\n\t\t\t\t\t$user_id = get_current_user_id();\n\t\t\t\t\t$post_users = self::post_user_likes( $user_id, $post_id );\n\n\t\t\t\t\t// Update User\n\t\t\t\t\t$user_like_count = get_user_option( \"_user_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\n\t\t\t\t\tif ( $user_like_count > 0 ) {\n\t\t\t\t\t\tupdate_user_option( $user_id, '_user_like_count', -- $user_like_count );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update Post\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\t$uid_key = array_search( $user_id, $post_users );\n\t\t\t\t\t\tunset( $post_users[ $uid_key ] );\n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_liked\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// user is anonymous\n\t\t\t\t\t$user_ip = self::get_user_ip();\n\t\t\t\t\t$post_users = self::post_ip_likes( $user_ip, $post_id );\n\n\t\t\t\t\t// Update Post\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\t$uip_key = array_search( $user_ip, $post_users );\n\t\t\t\t\t\tunset( $post_users[ $uip_key ] );\n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_IP\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$like_count = ( $count > 0 ) ? -- $count : 0; // Prevent negative number\n\t\t\t\t$response['status'] = \"unliked\";\n\t\t\t}\n\n\t\t\tupdate_post_meta( $post_id, \"_post_like_count\", $like_count );\n\t\t\tupdate_post_meta( $post_id, \"_post_like_modified\", date( 'Y-m-d H:i:s' ) );\n\n\t\t\t$response['count'] = self::get_like_count_markup( $like_count );\n\n\t\t\twp_send_json( $response );\n\t\t}\n\n\t\texit();\n\t}", "title": "" }, { "docid": "cecdf142c2f623f031905ad81e65f1b7", "score": "0.5609072", "text": "public function likes(){\n \treturn $this->hasMany(PostLike::class, 'post_id', 'id');\n }", "title": "" }, { "docid": "3e4edcf63c4a153d20e5dc796e3cadf7", "score": "0.5599522", "text": "public function likes();", "title": "" }, { "docid": "2e1a964421808966d2a4962068e16c60", "score": "0.55951494", "text": "function unfollow() {\n\t\tfor ($i = 0; $i < count($this->no_follow_back); $i = $i + 1) {\n\t\t\t// TODO: Proper error handling. Use OAuth last response.\n\t\t\t$this->tum_oauth->post(\"http://api.tumblr.com/v2/user/unfollow\", array(\"url\" => $this->no_follow_back[$i])); // Let 404 (Blog not found) fail silently, shouldn't matter\n\t\t}\n\t}", "title": "" }, { "docid": "8490ccea4aca0b3826d3fb11954251fa", "score": "0.55916995", "text": "function porto_ajax_blog_like() {\n\n\t// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification\n\tif ( isset( $_POST['blog_id'] ) ) {\n\n\t\t$blog_id = (int) $_POST['blog_id'];\n\t\t$like_count = get_post_meta( $blog_id, 'like_count', true );\n\n\t\tif ( ! isset( $_COOKIE[ 'porto_like_' . $blog_id ] ) || 0 == (int) $like_count ) {\n\n\t\t\t$like_count++;\n\t\t\tsetcookie( 'porto_like_' . $blog_id, $blog_id, time() + 360 * 24 * 60 * 60, '/' );\n\t\t\tupdate_post_meta( $blog_id, 'like_count', $like_count );\n\t\t}\n\n\t\techo '<span class=\"like-text\">' . esc_html__( 'Liked', 'porto' ) . ': </span><span class=\"blog-liked linked text-color-secondary\" title=\"' . esc_attr__( 'Already Liked', 'porto' ) . '\" data-tooltip><i class=\"fas fa-heart\"></i><span class=\"font-weight-semibold\">' . ( (int) $like_count ) . '</span></span>';\n\t}\n\t// phpcs: enable\n\texit;\n}", "title": "" }, { "docid": "67196b47de142e7b09b42e7a62cd53da", "score": "0.55914456", "text": "public function destroy($id)\n {\n $likes = likesModel::findOrFail($id);\n $likes->delete();\n }", "title": "" }, { "docid": "fc20d9201976ee53c501510f0ca2cad5", "score": "0.55858684", "text": "public function likePost(Request $request)\n {\n\n $post_id = $request->input('post_id');\n $user_id = auth()->id();\n\n // check if the user likes the following/sent post id\n $likedPost = LikedPost::where('user_id', '=', $user_id)->where('post_id', \"=\", $post_id)->first();\n\n // if post is liked -> delete it else create a like\n if ($likedPost) {\n $likedPost->delete();\n return array([\"response\" => \"Unliked a post.\"]);\n } else {\n $like = LikedPost::create([\n 'user_id' => $user_id,\n 'post_id' => $post_id,\n ]);\n return array([\"response\" => \"Liked a post.\"]);\n }\n }", "title": "" }, { "docid": "59eddb94232ff873b73ea12c31c28b7a", "score": "0.5583614", "text": "public function decrementDislikesCount(LikeableContract $likeable);", "title": "" }, { "docid": "c07263e47e1de27154c53028e3ebd1ea", "score": "0.55776113", "text": "function unLike() {\n try {\n if (comprobarSession()) {\n $bd = new Bd($_SESSION['user']['role']);\n if ($bd->getError() === false) {\n $statement = \"DELETE FROM likes WHERE Users_idUsers=:idUser and Posts_idPost=:idPost\";\n\n $stmt = $bd->prepareQuery($statement, array(\"idUser\" => $_SESSION['user']['id'], \"idPost\" => $_POST['id']));\n if ($stmt === false) {\n throw new Exception(\"Se ha producido un error.\");\n } else {\n echo \"true\";\n }\n } else {\n throw new Exception(\"Se ha producido un error.\");\n }\n }\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n}", "title": "" }, { "docid": "5933922afd4909ff77b0afc36cb4a7cb", "score": "0.556457", "text": "function userDisliked($obj_type,$obj_id,$u_id){\n $h = con();\n $r = mysqli_query($h, \"SELECT value FROM likes WHERE user='$u_id' AND $obj_type='$obj_id'\");\n query_feedback($h);\n $row=mysqli_fetch_assoc($r);\n if ($row['value']==-1){\n return 1;\n }\n return 0;\n}", "title": "" }, { "docid": "805999bef5a43f4fd2e8e93a95ac96ad", "score": "0.55380136", "text": "public function destroy(Post $post)\n {\n //dd($post->id);\n $post->comments()->delete();\n $post->likes()->delete();\n $post->delete();\n return redirect()->back()->with(['success' => __('Deleted successfully')]);\n }", "title": "" }, { "docid": "ffec4bd16441169a629dcf0a6459de4f", "score": "0.5537231", "text": "public function deleteLikes($pageID)\n {\n return $this->where('page_id', $pageID)->delete();\n }", "title": "" }, { "docid": "6ca84b85557dbbeb52bea8a2bae09ea3", "score": "0.552525", "text": "protected function remove_old_data(){\n\t\t$list = get_posts('numberposts=-1&post_type=lottery&post_status=any' );\n\t\tforeach ($list as $post){\n\t\t\t$this->delete_attachments_with_post($post->ID);\n\t\t\twp_delete_post($post->ID, true);\n\t\t}\n\t}", "title": "" }, { "docid": "23e259e5d3d0d5ce98ca3d444c39cf71", "score": "0.5524606", "text": "public function destroy($id)\n {\n \t$this->like->where('user_id', Auth::user()->id)->where('post_id', $id)->delete();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "877707cbf5d93517fc9e9cc14c0859f0", "score": "0.5521944", "text": "public function removeLikeFrom(LikeableContract $likeable, $type, $userId);", "title": "" }, { "docid": "6e1b6b94e9c8c1d2bf764af634c2a0e3", "score": "0.55083185", "text": "abstract public function addLikeVerdict(Likes $like);", "title": "" }, { "docid": "292d07765c44f3fe84c41840e62ac1d4", "score": "0.55070186", "text": "function nouserlink_deletable_blogpost($conn, $owner, $timestamp, $title, $id, $content, $tags) {\n\t$trash = \"<a href='delete.php?val=\" . $id . \"&ref=\" . basename($_SERVER['REQUEST_URI']) . \"'>🗑️</a>\";\n\t$edit = \"<a href='edit.php?val=\" . $id . \"&ref=\" . basename($_SERVER['REQUEST_URI']) . \"'>✏️</a>\";\n\t$hide = hideButton($conn, $id);\n\t$hideClass = hideClass($conn, $id);\n\treturn \"<div class='blogpost \" . $hideClass[0] . \"' id='bp\" . $id . \"'><p class='time'>Written by \" . $owner . \" on \" . $timestamp . \" \" . $edit . $trash . $hide . \"</p><p class='title'><a href='post.php?val=\" . $id . \"'>\" . strip_tags($title) . $hideClass[1] . \"</a></p><p class='content'>\" . strip_tags($content) . \"</p><p class='tags'>\" . strip_tags($tags) . \"</p>\" . likeDisplay($conn, $id) . \"</div>\\n\";\n}", "title": "" }, { "docid": "95ab406dd8f0398e24fa06e9f112bfd4", "score": "0.5500751", "text": "public function like(Post $post)\n {\n $alreadyLiked = $post->likesFor($this->auth->user());\n $message = '';\n\n if( !! $alreadyLiked->count() )\n {\n $message = 'You unliked a post.';\n $alreadyLiked->delete();\n }\n else\n {\n $message = 'You liked a post.';\n $post->likes()->create(['user_id' => $this->auth->user()->id]);\n }\n\n return back()->withSuccessMessage($message);\n }", "title": "" }, { "docid": "0baf47408c7b9c181a5a3574ec92aa4f", "score": "0.5463469", "text": "public function unfollow()\r\n {\r\n $userids = $this->input->get_post('userids');\r\n $this->_check_userid($userids);\r\n if ($userids) {\r\n $res = $this->user_model->remove_follower($this->userid, $userids);\r\n }\r\n $tags = $this->input->get_post('tags');\r\n if ($tags) {\r\n $res = $this->user_model->remove_follow_tag($this->userid, $tags);\r\n }\r\n $this->_deal_res($res);\r\n }", "title": "" }, { "docid": "540c5dc59792cb9d5c51558090549d62", "score": "0.54624665", "text": "public function unlike($uid)\r\n {\r\n return $this->unlikeUpdate($uid);\r\n }", "title": "" }, { "docid": "b3db897695ce4627442336a33bfdcb97", "score": "0.54575527", "text": "function unRating($userid, $postid){\n global $db;\n $sql = \"DELETE FROM rating_info WHERE user_id = '$userid' AND post_id = '$postid' \";\n $rs = $db->delete($sql);\n\n if($rs){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "af209f32fe8d99abb4fd18c32aee89d0", "score": "0.545693", "text": "function userDisliked($post_id)\n{\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM rating_info WHERE user_id like'%$user_id%'\n AND post_id=$post_id AND rating_action='dislike'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "8912f8dacd3533c3ecaa40127bba5c28", "score": "0.545452", "text": "function RemoveUpvote(){\n\t\t$reel = Reel::FindById($_POST['reel_id']);\n\t\t$reel->RemoveUpvote();\t\t\n\t}", "title": "" }, { "docid": "632b974ab0ee67a5b364bb132f5d677d", "score": "0.5453194", "text": "public function actionDislike()\r\n {\r\n $request = Yii::$app->request;\r\n $dataPost = $request->post();\r\n $modelLike = new Like();\r\n $modelLike->scenario = Like::SCENARIO_DIS_LIKE;\r\n $modelLike->setAttributes($dataPost);\r\n if (!$modelLike->validate()) {\r\n return [\r\n 'status' => 400,\r\n 'messages' => $modelLike->errors\r\n ];\r\n }\r\n $activityDetail = Activity::findOne(['activity_id' => $modelLike->activity_id]);\r\n $activityDetailLike = Activity::findOne(['member_id' => Yii::$app->user->identity->member_id, 'type' => Activity::TYPE_LIKE,'status' => Activity::STATUS_ACTIVE, 'relate_id' => $modelLike->activity_id]);\r\n $activityDetailOld = Activity::find()->where(['member_id' => Yii::$app->user->identity->member_id, 'type' => Activity::TYPE_DISLIKE, 'relate_id' => $modelLike->activity_id])->orderBy(['activity_id' => SORT_DESC])->one();\r\n \r\n //insert new record and update status record like\r\n if (!$activityDetailOld || ($activityDetailOld && $activityDetailOld->status == Activity::STATUS_DELETE && $activityDetailOld->updated_date != null && $modelLike->status != Activity::STATUS_DELETE)) {\r\n $dataSave = $modelLike->saveDisLike($activityDetail, $activityDetailLike);\r\n //return error\r\n if (!$dataSave) {\r\n return [\r\n 'status' => 400,\r\n 'messages' => 'System error'\r\n ];\r\n }\r\n //return success\r\n return [\r\n 'status' => 200,\r\n 'data' => [\r\n 'activity_id' => $dataSave\r\n ]\r\n ];\r\n } else {\r\n //update status if status post diff status old\r\n if ($activityDetailOld->status != $modelLike->status) {\r\n if (!$modelLike->updateLikeOrDisLike($activityDetailOld, $activityDetail, 2)) {\r\n return [\r\n 'status' => 400,\r\n 'messages' => 'System error'\r\n ];\r\n }\r\n return [\r\n 'status' => 200\r\n ];\r\n }\r\n return [\r\n 'status' => 200\r\n ];\r\n }\r\n }", "title": "" }, { "docid": "58789793cf674f9669efeae4145afd7d", "score": "0.54512495", "text": "public function setLikes($likes) {\n $this->likes = $likes;\n }", "title": "" }, { "docid": "4043d937ea03a3ad44ebed7be84ad21f", "score": "0.54451317", "text": "public function unmark() {\n\t\tif ($this->post != null) {\n\t\t\t$this->post->unmark();\n\t\t}\n\t\telse if (is_array($this->postID)) {\n\t\t\t$threadIDs = PostEditor::getThreadIDs(implode(',', $this->postID));\n\t\t\tif (!empty($threadIDs)) {\n\t\t\t\t// check permissions\n\t\t\t\t$sql = \"SELECT\t*\n\t\t\t\t\tFROM\twbb\".WBB_N.\"_thread\n\t\t\t\t\tWHERE\tthreadID IN (\".$threadIDs.\")\";\n\t\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t\t$thread = new ThreadEditor(null, $row);\n\t\t\t\t\t$thread->enter();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($this->postID as $postID) {\n\t\t\t\t\t$post = new PostEditor($postID);\n\t\t\t\t\t$post->unmark();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "34c47aa2c952994f8651ce8373bd69be", "score": "0.54412115", "text": "function gotravel_mikado_like_latest_posts() {\n\t\treturn gotravel_mikado_like()->add_like();\n\t}", "title": "" }, { "docid": "e35f13adf4e96f715f3810e5d580d573", "score": "0.54363555", "text": "public function likes()\n {\n return $this->morphToMany('App\\User', 'likeable')->whereDeletedAt(null);\n }", "title": "" }, { "docid": "075f25c74f440a55581f375ed9c614aa", "score": "0.54304796", "text": "public function setLikes($likes)\n {\n $this->likes = $likes;\n }", "title": "" }, { "docid": "c863e563653ed2d678f9f6687d2928f1", "score": "0.542732", "text": "private function _addButtons($post)\n\t{\n\t\tglobal $context, $txt;\n\n\t\t$txt_like_post = '<li></li>';\n\n\t\t// Can they like/unlike this post?\n\t\tif ($post['can_like'] || $post['can_unlike'])\n\t\t{\n\t\t\t$txt_like_post = '\n\t\t\t\t<li class=\"listlevel1' . (!empty($post['like_counter']) ? ' liked\"' : '\"') . '>\n\t\t\t\t\t<a class=\"linklevel1 ' . ($post['can_unlike'] ? 'unreact_button' : 'react_button') . '\" href=\"javascript:void(0)\" title=\"' . (!empty($post['like_counter']) ? $txt['liked_by'] . ' ' . implode(', ', $context['likes'][$post['id']]['member']) : '') . '\" onclick=\"likePosts.prototype.likeUnlikePosts(event,' . $post['id'] . ', ' . $post['topic'] . '); return false;\">' .\n\t\t\t\t(!empty($post['like_counter']) ? '<span class=\"likes_indicator\">' . $post['like_counter'] . '</span>&nbsp;' . $txt['likes'] : $txt['like_post']) . '\n\t\t\t\t\t</a>\n\t\t\t\t</li>';\n\t\t}\n\t\t// Or just view the count\n\t\telseif (!empty($post['like_counter']))\n\t\t{\n\t\t\t$txt_like_post = '\n\t\t\t\t<li class=\"listlevel1 liked\">\n\t\t\t\t\t<a href=\"javascript:void(0)\" title=\"' . $txt['liked_by'] . ' ' . implode(', ', $context['likes'][$post['id']]['member']) . '\" class=\"linklevel1 reacts_button\">\n\t\t\t\t\t\t<span class=\"likes_indicator\">' . $post['like_counter'] . '</span>&nbsp;' . $txt['likes'] . '\n\t\t\t\t\t</a>\n\t\t\t\t</li>';\n\t\t}\n\n\t\treturn array(\n\t\t\t// How about... even... remove it entirely?!\n\t\t\t'remove' => array(\n\t\t\t\t'href' => getUrl('action', ['action' => 'deletemsg', 'msg' => $post['id'], 'topic' => $post['topic'], 'recent', '{session_data}']),\n\t\t\t\t'text' => $txt['remove'],\n\t\t\t\t'test' => 'can_delete',\n\t\t\t\t'custom' => 'onclick=\"return confirm(' . JavaScriptEscape($txt['remove_message'] . '?') . ');\"',\n\t\t\t),\n\t\t\t// Can we request notification of topics?\n\t\t\t'notify' => array(\n\t\t\t\t'href' => getUrl('action', ['action' => 'notify', 'topic' => $post['topic'] . '.' . $post['start']]),\n\t\t\t\t'text' => $txt['notify'],\n\t\t\t\t'test' => 'can_mark_notify',\n\t\t\t),\n\t\t\t// If they *can* reply?\n\t\t\t'reply' => array(\n\t\t\t\t'href' => getUrl('action', ['action' => 'post', 'topic' => $post['topic'] . '.' . $post['start']]),\n\t\t\t\t'text' => $txt['reply'],\n\t\t\t\t'test' => 'can_reply',\n\t\t\t),\n\t\t\t// If they *can* quote?\n\t\t\t'quote' => array(\n\t\t\t\t'href' => getUrl('action', ['action' => 'post', 'topic' => $post['topic'] . '.' . $post['start'], 'quote' => $post['id']]),\n\t\t\t\t'text' => $txt['quote'],\n\t\t\t\t'test' => 'can_quote',\n\t\t\t),\n\t\t\t// If they *can* like?\n\t\t\t'like' => array(\n\t\t\t\t'override' => $txt_like_post,\n\t\t\t\t'test' => 'can_like',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7907935aaefd5c1f8759b198e52d55e9", "score": "0.54123926", "text": "public function removePost()\n\t\t{\n\t\t\t$id = $_GET['id'];\n\t\t\t$adminModel = $this -> model( \"BlogModel\" );\n\t\t\t$images = $adminModel-> getSingle($id);\n\t\t\t$gall = preg_split( '~/~', $images['image']);\n\t\t\t$gal = array_shift($gall);\n\t\t\t$target_dir = $_SERVER['DOCUMENT_ROOT'] . CONFIG['site_path'] . \"/assets/image/\";\n\t\t\tforeach ($gall as $i){;\n\t\t\t\tunlink($target_dir.$i);\n\t\t\t}\n\t\t\t$adminModel -> remove( $id );\n\t\t\t$this -> index();\n\n\t\t}", "title": "" }, { "docid": "0a1ba16ba95048afcf111357755fff8b", "score": "0.54071945", "text": "public function unlike_comment($id, $postid)\r\n {\r\n $success = $this->newsfeed_model->unlike_comment($id, $postid);\r\n $comment = $this->comment_single($this->newsfeed_model->get_comment($id, true));\r\n echo json_encode(array(\r\n 'success' => $success,\r\n 'comment' => $comment\r\n ));\r\n }", "title": "" }, { "docid": "a8bf6870f0073af6a01f41e036abd139", "score": "0.54058933", "text": "public static function removeAbandonedPosts() {\n $sub_posts = \\SubPost::getWhere(array('post_parent' => 0));\n foreach($sub_posts as $sp) {\n wp_delete_post($sp->ID, true);\n }\n }", "title": "" }, { "docid": "1cff7368e7dda41d6a5ddd17fa9fbe38", "score": "0.5403277", "text": "function aton_qodef_like_latest_posts() {\n\t\treturn aton_qodef_like()->add_like();\n\t}", "title": "" }, { "docid": "436a30ab5d8db3f3b366628447d925e1", "score": "0.5402152", "text": "public function deleteLike($album)\n\t{\n\t\treturn $this->deleteConnection($album, 'likes');\n\t}", "title": "" }, { "docid": "de0ca341f215c0025a2f7a4c9824759f", "score": "0.5401893", "text": "public function getDislikes()\n {\n return $this->dislikes;\n }", "title": "" }, { "docid": "633c427ce1e48654c8c6caa142076024", "score": "0.53915995", "text": "function like_post() {\n $data = $_REQUEST['content'];\n $count = get_post_meta($data['id'], 'as_like_count', true);\n $count++;\n $result = update_post_meta($data['id'], 'as_like_count', $count);\n if (!is_wp_error($result)) {\n $response = array(\n 'success' => true,\n 'count' => get_post_meta($data['id'], 'as_like_count', true),\n );\n }\n else {\n $response = array(\n 'success' => false,\n 'count' => 0,\n );\n }\n wp_send_json($response);\n}", "title": "" }, { "docid": "36c7302bba360e5014f48c41746cb071", "score": "0.53906554", "text": "public function likePost($pid, $like = TRUE)\r\n {\r\n if (!is_string($pid)) {\r\n throw new LinkedInException('LinkedIn->likePost(): bad data passed, $pid must be of type string');\r\n }\r\n \r\n // construct the XML\r\n $data = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\t\t <is-liked>true</is-liked>';\r\n \r\n // construct and send the request\r\n $query = self::_URL_API . '/v1/posts/' . trim($pid) . '/relation-to-viewer/is-liked';\r\n $response = $this->fetch('PUT', $query, $data);\r\n \r\n /**\r\n * Check for successful request (a 204 response from LinkedIn server) \r\n * per the documentation linked in method comments above.\r\n */\r\n return $this->setResponse(204, $response);\r\n }", "title": "" }, { "docid": "0ccbf5fe55de7e3b2baf90cade7545cc", "score": "0.5387212", "text": "function process_tutor_like() {\n\t// Security\n\t$nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : 0;\n\tif ( !wp_verify_nonce( $nonce, 'simple-likes-nonce' ) ) {\n\t\texit( __( 'Not permitted', 'contutor' ) );\n\t}\n\t// Test if javascript is disabled\n\t$disabled = ( isset( $_REQUEST['disabled'] ) && $_REQUEST['disabled'] == true ) ? true : false;\n\t// Test if this is a comment\n\t$is_comment = ( isset( $_REQUEST['is_comment'] ) && $_REQUEST['is_comment'] == 1 ) ? 1 : 0;\n\t// Base variables\n\t$post_id = ( isset( $_REQUEST['post_id'] ) && is_numeric( $_REQUEST['post_id'] ) ) ? $_REQUEST['post_id'] : '';\n\t$result = array();\n\t$post_users = NULL;\n\t$like_count = 0;\n\t// Get plugin options\n\tif ( $post_id != '' ) {\n\t\t$count = ( $is_comment == 1 ) ? get_comment_meta( $post_id, \"_comment_like_count\", true ) : get_post_meta( $post_id, \"_post_like_count\", true ); // like count\n\t\t$count = ( isset( $count ) && is_numeric( $count ) ) ? $count : 0;\n\t\tif ( !already_liked( $post_id, $is_comment ) ) { // Like the post\n\t\t\tif ( is_user_logged_in() ) { // user is logged in\n\t\t\t\t$user_id = get_current_user_id();\n\t\t\t\t$post_users = post_user_likes( $user_id, $post_id, $is_comment );\n\t\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\t\t// Update User & Comment\n\t\t\t\t\t$user_like_count = get_user_option( \"_comment_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\t\t\t\t\tupdate_user_option( $user_id, \"_comment_like_count\", ++$user_like_count );\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\tupdate_comment_meta( $post_id, \"_user_comment_liked\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Update User & Post\n\t\t\t\t\t$user_like_count = get_user_option( \"_user_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\t\t\t\t\tupdate_user_option( $user_id, \"_user_like_count\", ++$user_like_count );\n\t\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_liked\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // user is anonymous\n\t\t\t\t$user_ip = tutor_get_ip();\n\t\t\t\t$post_users = post_ip_likes( $user_ip, $post_id, $is_comment );\n\t\t\t\t// Update Post\n\t\t\t\tif ( $post_users ) {\n\t\t\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\t\t\tupdate_comment_meta( $post_id, \"_user_comment_IP\", $post_users );\n\t\t\t\t\t} else { \n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_IP\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$like_count = ++$count;\n\t\t\t$response['status'] = \"liked\";\n\t\t\t$response['icon'] = get_liked_icon();\n\t\t} else { // Unlike the post\n\t\t\tif ( is_user_logged_in() ) { // user is logged in\n\t\t\t\t$user_id = get_current_user_id();\n\t\t\t\t$post_users = post_user_likes( $user_id, $post_id, $is_comment );\n\t\t\t\t// Update User\n\t\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\t\t$user_like_count = get_user_option( \"_comment_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\t\t\t\t\tif ( $user_like_count > 0 ) {\n\t\t\t\t\t\tupdate_user_option( $user_id, \"_comment_like_count\", --$user_like_count );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$user_like_count = get_user_option( \"_user_like_count\", $user_id );\n\t\t\t\t\t$user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0;\n\t\t\t\t\tif ( $user_like_count > 0 ) {\n\t\t\t\t\t\tupdate_user_option( $user_id, '_user_like_count', --$user_like_count );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Update Post\n\t\t\t\tif ( $post_users ) {\t\n\t\t\t\t\t$uid_key = array_search( $user_id, $post_users );\n\t\t\t\t\tunset( $post_users[$uid_key] );\n\t\t\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\t\t\tupdate_comment_meta( $post_id, \"_user_comment_liked\", $post_users );\n\t\t\t\t\t} else { \n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_liked\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // user is anonymous\n\t\t\t\t$user_ip = tutor_get_ip();\n\t\t\t\t$post_users = post_ip_likes( $user_ip, $post_id, $is_comment );\n\t\t\t\t// Update Post\n\t\t\t\tif ( $post_users ) {\n\t\t\t\t\t$uip_key = array_search( $user_ip, $post_users );\n\t\t\t\t\tunset( $post_users[$uip_key] );\n\t\t\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\t\t\tupdate_comment_meta( $post_id, \"_user_comment_IP\", $post_users );\n\t\t\t\t\t} else { \n\t\t\t\t\t\tupdate_post_meta( $post_id, \"_user_IP\", $post_users );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$like_count = ( $count > 0 ) ? --$count : 0; // Prevent negative number\n\t\t\t$response['status'] = \"unliked\";\n\t\t\t$response['icon'] = get_unliked_icon();\n\t\t}\n\t\tif ( $is_comment == 1 ) {\n\t\t\tupdate_comment_meta( $post_id, \"_comment_like_count\", $like_count );\n\t\t\tupdate_comment_meta( $post_id, \"_comment_like_modified\", date( 'Y-m-d H:i:s' ) );\n\t\t} else { \n\t\t\tupdate_post_meta( $post_id, \"_post_like_count\", $like_count );\n\t\t\tupdate_post_meta( $post_id, \"_post_like_modified\", date( 'Y-m-d H:i:s' ) );\n\t\t}\n\t\t$response['count'] = get_like_count( $like_count );\n\t\t$response['testing'] = $is_comment;\n\t\tif ( $disabled == true ) {\n\t\t\tif ( $is_comment == 1 ) {\n\t\t\t\twp_redirect( get_permalink( get_the_ID() ) );\n\t\t\t\texit();\n\t\t\t} else {\n\t\t\t\twp_redirect( get_permalink( $post_id ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t} else {\n\t\t\twp_send_json( $response );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ddeed3b298cfe45147aa92c6b879057a", "score": "0.5386407", "text": "function goxeedmodule_challenge_user_like_toggle ($nid)\n{\n global $user;\n $found = -1;\n $node = goxeedmodule_node_secure_load($nid);\n $items = goxeedmodule_field_secure_get_items ('node', $node, 'field_goxeed_challenge_like_uid');\n $counter = 0;\n if ($items) foreach ($items as $item)\n {\n if ($item['value'] == $user->uid) $found = $counter;\n $counter ++;\n }\n if ($found<0)\n {\n $node->field_goxeed_challenge_like_uid[\"und\"][] = array (\"value\" => $user->uid);\t\t// .. add the user\n }\n else\n {\n unset($node->field_goxeed_challenge_like_uid[\"und\"][$found]);\n }\n \n node_save ($node);\n \n goxeedmodule_challenge_user_points_update ($nid);\n}", "title": "" }, { "docid": "64324f2520df670d12906f684ec04f23", "score": "0.53735536", "text": "public function deleteLike($idTweet)\n {\n $this->setDeleteLIke($idTweet);\n }", "title": "" }, { "docid": "43da5c1bb45cbe5cb8b6110f4e4c6159", "score": "0.53708667", "text": "public function dislikesPub($idUser) {\n\n return count($this->dislikes->where('id_member', '=', $idUser)) > 0;\n }", "title": "" }, { "docid": "4a2d57545739039218c344053d02ca53", "score": "0.5357385", "text": "public function index_onRemoveOrphanedTags()\n {\n if (!$delete = Tag::has('posts', 0)->delete())\n return Flash::error('An unknown error has occured.');\n\n Flash::success('Successfully deleted orphaned tags.');\n\n return $this->listRefresh();\n }", "title": "" }, { "docid": "fbf82a5ec3d67bcad305723446d41dce", "score": "0.53571653", "text": "public function liked(){\n $options = array();\n $options['limit_row'] = 35;\n $options['order_by'] = \"post_stat.likes desc\";\n \n $posts = Post::getPosts($options);\n \n $data = array();\n $data['view'] = \"top\";\n $data['selected'] = \"liked\";\n $data['posts'] = $posts;\n \n $this->load->view('templates/layout', $data);\n }", "title": "" }, { "docid": "85ee4b668c6b5674604023c21bebe832", "score": "0.5356753", "text": "public function destroy(CommentLike $commentLike)\n {\n if ($commentLike->user_id == auth()->user()->id){\n $commentLike->delete();\n }\n else{\n return response()->json([\n 'status'=>'Error',\n 'data'=>'شما دسترسی ندارید'\n ]);\n }\n }", "title": "" }, { "docid": "8aec2ba2387cdc99a06e273d948abb36", "score": "0.5347185", "text": "function post_like()\n{\n\t$nonce = $_POST['nonce'];\n \n if ( ! wp_verify_nonce( $nonce, 'ajax-nonce' ) )\n die ( 'Busted!');\n\t\t\n\tif(isset($_POST['post_like']))\n\t{\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t$post_id = $_POST['post_id'];\n\t\t\n\t\t$meta_IP = get_post_meta($post_id, \"voted_IP\");\n\n\t\t$voted_IP = $meta_IP[0];\n\t\tif(!is_array($voted_IP))\n\t\t\t$voted_IP = array();\n\t\t\n\t\t$meta_count = get_post_meta($post_id, \"votes_count\", true);\n\n\t\tif(!hasAlreadyVoted($post_id))\n\t\t{\n\t\t\t$voted_IP[$ip] = time();\n\n\t\t\tupdate_post_meta($post_id, \"voted_IP\", $voted_IP);\n\t\t\tupdate_post_meta($post_id, \"votes_count\", ++$meta_count);\n\t\t\t\n\t\t\techo $meta_count;\n\t\t}\n\t\telse\n\t\t\techo \"already\";\n\t}\n\texit;\n}", "title": "" } ]
6e3579b285ac1125ad9dc9882364e34d
Responds to a SmsMessage
[ { "docid": "e85e2fcc4a73bc7d5159e911822661bb", "score": "0.5306521", "text": "function sendResponse($smsMessage, $messageText) {\n\t\t$country = $smsMessage->getCountry();\n\t\t$this->smsGateway = SmsGatewayFactory::GetSmsGateway($country);\n\t\t$this->smsGateway->freeNumbers = array();\n\t\tforeach ($this->freeNumbers as $number) {\n\t\t\t$this->smsGateway->addFreeNumber($number);\n\t\t}\n\t\t$message = $this->smsGateway->createMessage($smsMessage->getOriginator(), $messageText);\n\t\t$this->smsGateway->send($message);\n\t}", "title": "" } ]
[ { "docid": "4d5f96068d9d8ad6cf45a94d13240f61", "score": "0.63076895", "text": "public function respond()\n {\n\n // Thing actions\n $this->thing->flagGreen();\n\n $this->makeSMS();\n\n $this->message = $this->sms_message;\n\n $message_thing = new Message($this->thing, $this->thing_report);\n $this->thing_report[\"info\"] = $message_thing->thing_report[\"info\"];\n }", "title": "" }, { "docid": "e3545796cdec4ff52d84542daff520db", "score": "0.6107876", "text": "function sendMessage() {\n\t\t$this->getUserMessage()->save();\n\t\t\n\t\tif ( $this->getMovieID() ) {\n\t\t\t$oMsgLog = mofilmMovieMessageHistory::factoryFromPrivateMessage($this->getUserMessage(), $this->getMovieID());\n\t\t\t$oMsgLog->save();\n\t\t}\n\t\t\n\t\tif ( $this->getUser()->getParamSet()->getParam('PrivateMessageAlerts', 1) ) {\n\t\t\tif ( $this->getUser()->getTerritory()->getID() > 0 ) {\n\t\t\t\t$lang = $this->getUser()->getTerritory()->getLanguageSet()->getFirst()->getIso();\n\t\t\t} else {\n\t\t\t\t$lang = 'en';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$oQueue = commsOutboundManager::newQueueFromApplicationMessageGroup(\n\t\t\t\t0, mofilmMessages::MSG_GRP_CLIENT_PRIVATE_MESSAGE, $lang\n\t\t\t);\n\t\t\t\n\t\t\tif ( count($this->_MessageParams) > 0 ) {\n\t\t\t\t$this->addMessageParam(mofilmMessages::MSG_PARAM_PM_ID, $this->getUserMessage()->getMessageID());\n\t\t\t\tcommsOutboundManager::mergeParamsInMessageStack($oQueue, $this->getMessageParams());\n\t\t\t}\n\t\t\tcommsOutboundManager::setCustomerInMessageStack($oQueue, $this->getUser()->getID());\n\t\t\tcommsOutboundManager::setRecipientInMessageStack($oQueue, $this->getUser()->getEmail());\n\t\t\tcommsOutboundManager::replaceDataInMessageStack($oQueue, array(), array());\n\t\t\tif ( $oQueue->send() ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tthrow new mvcModelException($oQueue->getLastException()->getMessage());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "922c1b284ccce463fa7765c07a04abe7", "score": "0.6078696", "text": "public function respond()\n\t{\n\t\tif (!PhandaStr::startsIn('client-', $this->payload->event)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$channel = $this->channelManager->find($this->connection->getApplication()->getAppId(), $this->payload->channel);\n\t\t$channel->broadcastToOthers($this->connection, $this->payload);\n\t}", "title": "" }, { "docid": "f8a992ed8412cb849faca1f4c6efcb1d", "score": "0.60167235", "text": "public function send()\n {\n if (!isset($this->message))\n {\n return FALSE;\n }\n\n $this->sqs_client->sendMessage([\n 'MessageGroupId'\t\t\t=> '1',\n 'MessageDeduplicationId'\t=> mt_rand(),\n 'QueueUrl' \t\t\t\t=> SQS_VIDEO_URL,\n 'MessageBody' \t\t\t\t=> json_encode($this->message)\n ]);\n\n return TRUE;\n }", "title": "" }, { "docid": "e729a89c01d707f1a64fd141d9a52eb0", "score": "0.600274", "text": "function smsghsend(){\n\t$auth\t=\tnew\t BasicAuth(\"YOUR_CLIENT_ID_HERE\",\t\"CLIENT_SECRET_HERE\");\n\t$apiHost = new ApiHost($auth);\n\t$messagingApi = new MessagingApi($apiHost);\n\ttry{\n\t\tob_start();\t\t\t\t\t\t\t\t\t\n\t $mesg\t=\tnew\tMessage();\t\n\t $mesg->setContent($outAll);\t\t\t\t\t\t\t\t\t\n\t $mesg->setTo(\"DESTINATION_PHONE_NUMBER_HERE\");\t\t\t\t\t\t\t\t\t\n\t $mesg->setFrom(\"SMS_SERVICE_NAME\");\t\t\t\t\t\t\t\t\t\n\t $mesg->setRegisteredDelivery(true);\t\t\t\t\t\t\t\t\t\n\t $messageResponse\t=\t$messagingApi->sendMessage($mesg);\t\n\t ob_end_clean();\t\n\t if\t($messageResponse instanceof MessageResponse)\t\n\t {\n\t \techo\t\"</br></br>status...\".$messageResponse->getStatus();\t\t\t\t\t\t\t\t\t\n\t }\t \n\t elseif\t($messageResponse instanceof HDpResponse)\t\n\t {\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t echo\t\"\\nServer\tResponse\tStatus\t:\t\"\t.\t$messageResponse->getStatus();\t\t\t\t\t\t\t\t\t\n\t\t}\t\t\n\t}\n\tcatch(ExcepWon\t$ex)\n\t{\t\t\t\t\t\t\t\t\t\n\t\techo\t$ex->getTraceAsString();\t\t\t\t\t\n\t}\n\n}", "title": "" }, { "docid": "045030420de355426e33c70360cd3222", "score": "0.58069056", "text": "private function sendMessage()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"username not provided\");\n\n if( !isset($request['subject']) || $request['subject']==\"\" )\n throw_error_msg(\"subject not provided\");\n\n if( !isset($request['content']) || $request['content']==\"\" )\n throw_error_msg(\"content not provided\");\n\n $array['is_pm'] = true;\n $array['from'] = $uid;\n $array['to'] = $request['username'];\n $array['subj'] = mysql_clean($request['subject']);\n $array['content'] = mysql_clean($request['content']);\n\n global $cbpm;\n $rs = $cbpm->send_pm($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"message sent successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n\n }", "title": "" }, { "docid": "00594f7258e23b0120ff428794ebd3ff", "score": "0.57904166", "text": "public function sendMessageAction()\n {\n\t\t$em = \\Zend_Registry::get('em');\n\t\t$zend_filter_obj = Zend_Registry::get('Zend_Filter_StripTags');\n\t\t\n\t\t$params=$this->_request->getParams();\n\t\t\n\t\t$recieverID = $params[\"user_id\"];\n\t\t\n\t\t$senderID = Auth_UserAdapter::getIdentity()->getId();\n\t\t\n\t\t$subject=$params[\"msg_type\"];\n\t\t$msg = $zend_filter_obj->filter($params[\"msg\"]);\n\t\t\n\t\n\t\t$textmsgID=\\Extended\\message::addMessage( $subject, $msg, $senderID, $recieverID, \\Extended\\message::MSG_TYPE_GENERAL );\n\t\tif($textmsgID)\n\t\t{\n\t\t\t$msguser=\\Extended\\message_user::addMessageUsers($senderID, $recieverID, $textmsgID);\n\t\t\tif($msguser)\n\t\t\t{\n\t\t\t\t$recieve_user_folder=\\Extended\\user_folder::getUserFolder($recieverID, Extended\\folder::FOLDER_INBOX);\n\t\t\t\tif($recieve_user_folder)\n\t\t\t\t{\n\t\t\t\t\t$result=\\Extended\\message_folder::addMessageStatus($textmsgID, $msguser, $recieve_user_folder);\n\t\t\t\t\tif($result)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sent_user_folder=\\Extended\\user_folder::getUserFolder(Auth_UserAdapter::getIdentity()->getId(), Extended\\folder::FOLDER_SENT_ITEMS);\n\t\t\t\t\t\tif($sent_user_folder)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result=\\Extended\\message_folder::addMessageStatus($textmsgID, $msguser, $sent_user_folder);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}\n\t\tif($result)\n\t\t{\n\t\t $msg=array(\"msg\"=>\"success\");\n\t\t}\n\t\telse\n\t\t{\n\t\t $msg=array(\"msg\"=>\"fail\");\n\t\t}\n\t\techo Zend_Json::encode($msg);\n\t\tdie;\n\t\t\t\n\t\t\n }", "title": "" }, { "docid": "4362a7ae361c3f634d5be1470acd5fd4", "score": "0.57362956", "text": "public function send(Messages\\Message $message);", "title": "" }, { "docid": "584c480b13d19d1457a44b0f2e57b407", "score": "0.57355195", "text": "public function respondResponse()\n {\n\n // Thing actions\n // Because we are making a decision and moving on. This Thing\n // can be left alone until called on next.\n $this->thing->flagGreen();\n\n // $this->makePNG();\n\n // While we work on this\n $this->thing_report['email'] = $this->sms_message;\n $message_thing = new Message($this->thing, $this->thing_report);\n\n // $this->makeWeb();\n\n //\t\treturn $this->thing_report;\n }", "title": "" }, { "docid": "a0dc427892ee66361edd74d265c16626", "score": "0.5649813", "text": "public function reply(ValidMessage $request)\n {\n $message = new Message();\n $message->message = $request->{'message-'.$request->thread};\n $message->to = $request->to;\n $message->from = Auth::user()->id; // No one should ever be sending a message on behalf of someone else. \n $message->thread = $request->thread;\n \n $message->save();\n\t\t\n\t // Email notification to the receiver\n\t $receiver = User::where('id', $request->to)->first();\n\t Mail::to($receiver->email)->send(new MessageNotification($request->message));\n \n return Redirect::route('messages')->with('success', 'Your message has been sent!');\n }", "title": "" }, { "docid": "fe6d348973cded29675db81b8e3eb19e", "score": "0.564421", "text": "public function send($message);", "title": "" }, { "docid": "fe6d348973cded29675db81b8e3eb19e", "score": "0.564421", "text": "public function send($message);", "title": "" }, { "docid": "fe6d348973cded29675db81b8e3eb19e", "score": "0.564421", "text": "public function send($message);", "title": "" }, { "docid": "b00d580642831c5d0f0884dd6fb3ff8b", "score": "0.5642556", "text": "public function respond(Media $media)\n {\n $this->api->send($this->chat->id, $media);\n }", "title": "" }, { "docid": "b6772bcb45b57704fb4bea8bb86604dc", "score": "0.5623593", "text": "function sb_resend_message() {\n\t\tif(isset($_GET['resend']) && $_GET['resend'] == 'true') {\n\t\t\t$settings = $this->sb_admin->get_settings(); ?>\n\t\t\t<div class=\"woocommerce-message message-wrapper\">\n\t\t\t\t<div class=\"message-container container success-color medium-text-center sb-custom-alert\">\n\t\t\t\t <i class=\"icon-checkmark\"></i><?php _e($settings['new_verification_link'], 'woocommerce'); ?>\n\t\t\t\t</div><?php\n\t\t}\n\t}", "title": "" }, { "docid": "977fe9a015ff2211e0d19d94d38786fc", "score": "0.5581408", "text": "function reply($message, $additional_values = null, $additional_parameters = null) {\n return $this->send($this->chat_id, $message, $additional_values, $additional_parameters);\n }", "title": "" }, { "docid": "2ffc667d0cc324aced423d37b73c47e0", "score": "0.5549592", "text": "public function handleSendMessage() {\n\t\t$json = file_get_contents(\"php://input\"); //vytánutí všech dat z POST požadavku - data ve formátu JSON\n\t\t$data = Json::decode($json); //prijata zprava dekodovana z JSONu\n\t\t$user = $this->getPresenter()->getUser();\n\t\t$addMessage = $this->addMessage($data, $user);\n\t\tif (!empty($addMessage)) {\n\t\t\t$this->sendRefreshResponse($data->lastid);\n\t\t}\n\t}", "title": "" }, { "docid": "036bc17fb8ac0368621eccf90469da4d", "score": "0.5523132", "text": "public function sendMessage(){\n\n\n }", "title": "" }, { "docid": "5c7e14e11d4fd0d56079c03bb19951f3", "score": "0.54883057", "text": "public function reply($data, $msg);", "title": "" }, { "docid": "1a3a97bb3065b113b03eee10b6fb55b1", "score": "0.5484846", "text": "public function respondWithMessage($message) {\n return $this->respondWithJson([\n 'message' => $message\n ]);\n }", "title": "" }, { "docid": "88868ec4d441cd226e770095387a5ea4", "score": "0.54807705", "text": "public function test_message_can_be_responded_to() {\n\n $response = Message::create('a thoughtful response', $this->user, $this->message);\n $this->assertEquals($this->message, $response->getParentMessage());\n\n $response = Message::findById($response->getId());\n $this->assertEquals($this->message, $response->getParentMessage()->loadDependencies());\n\n }", "title": "" }, { "docid": "19640c6954af5fba8bce4ab497aca526", "score": "0.54673606", "text": "public function send($message)\n {\n }", "title": "" }, { "docid": "18d7f77e9225302e934e9923777a7c7c", "score": "0.5460059", "text": "public function getSentMIMEMessage()\n {\n }", "title": "" }, { "docid": "113adfcb310972a894404f8c11f16dbc", "score": "0.5454247", "text": "function send()\n {\n try{\n $client = new Client();\n $response = $client->request('POST', $this->base_url_SendSMS, [\n 'form_params' => [\n 'Userid' => $this->username,\n 'pwd' => $this->password,\n 'APIKEY' => $this->apikey,\n 'MSG' => $this->msgtext,\n 'FROM' => $this->from,\n 'To' => $this->to,\n ]\n ]);\n\n echo $response->getStatusCode(); // 200\n $response->getReasonPhrase(); // OK\n $response->getProtocolVersion(); // 1.1\n }\n catch(\\GuzzleHttp\\Exception\\ClientException $e){\n echo $e->getMessage();\n }\n catch(ErrorException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "b6a5114f4caf5c4724a1decfc6d04c20", "score": "0.54423046", "text": "public function send(Mail\\Message $message);", "title": "" }, { "docid": "20fae386d7d815f8776b1bcb02babb8a", "score": "0.540869", "text": "function send(Message $message);", "title": "" }, { "docid": "beb835ce55154be2255e3b72533ae1d7", "score": "0.5403664", "text": "public function messagesHandled()\n {\n $messages = $this->buildReply($this->replies);\n\n // Reset replies\n $this->replies = [];\n\n Response::create(json_encode([\n 'status' => $this->replyStatusCode,\n 'messages' => $messages,\n ]), $this->replyStatusCode, [\n 'Content-Type' => 'application/json',\n 'Access-Control-Allow-Credentials' => true,\n 'Access-Control-Allow-Origin' => '*',\n ])->send();\n }", "title": "" }, { "docid": "3dedc69cbac518f1267a897eabb9a133", "score": "0.5401423", "text": "public function acceptDirectMessage( $messageId ){\n\t}", "title": "" }, { "docid": "67094c6affb0995926f087f9acdebe08", "score": "0.53966296", "text": "public function message_send_post()\n {\n\n $result = $this->_customer->message_send($this->post('users_id'),$this->post('user_id'),$this->post('time'),$this->post('subject'),$this->post('body'),$this->post('sms'));\n if (isset($result['error'])) {\n $this->response(array(\n 'status' => 'failed',\n 'message' => $result['error']\n ), 400);\n }\n $this->response($result);\n\n }", "title": "" }, { "docid": "537513ec0e3a5bd58119c49524931d98", "score": "0.5379265", "text": "public function respond() {\n\t \n\t // Prevent duplicate responses\n\t if ($this->hasResponded) return;\n\t $this->hasResponded = true;\n\t \n\t // Set google as default for now\n\t $integrations = array(\n\t\t 'google' => array(\n\t\t\t 'expectUserResponse' => $this->expectUserResponse,\n\t\t\t 'richResponse' => array(\n\t\t\t\t 'items' => $this->items\n\t\t\t )\n\t\t )\n\t );\n\t \n\t $fulfillmentMessages = array();\n\t \n\t $response = array(\n\t\t 'fulfillmentText' => $this->speech,\t\t \n\t\t 'payload' => $integrations,\t\t \n\t );\n\t \n\t header(\"Content-type:application/json\");\n\t return json_encode($response);\n }", "title": "" }, { "docid": "6c6296823924433c0429595f19ec7c82", "score": "0.53735286", "text": "function resend($message_id) {\n $data = array_merge($this->_client_id_param);\n return $this->post_request($this->_base_route.'transactional/messages/' . $message_id . '/resend', $data);\n }", "title": "" }, { "docid": "7831eece88c339bfae2d73111235c0e0", "score": "0.5370438", "text": "public function send()\n {\n $this->assertValid();\n $guzzle = new Client();\n $params = [\n 'message' => [\n 'sender' => $this->sender,\n 'recipients' => $this->recipient,\n 'message' => $this->message\n ]\n ];\n if ($this->statusUrl) {\n $params['message']['statusurl'] = 0;\n }\n if ($this->returnData) {\n $params['message']['status'] = true;\n $params['message']['returndata'] = $this->returnData;\n }\n if ($this->flash) {\n $params['message']['class'] = 0;\n }\n $response = $guzzle->post($this->url, [\n 'json' => $params,\n 'connect_timeout' => 120\n ]);\n return $response->getStatusCode() == 201;\n }", "title": "" }, { "docid": "b0fd85adffc88e224c777d083cb57590", "score": "0.5369326", "text": "public function writeMessage ()\n {\n $authObject = new Authenticate();\n $authObject->validateWriteMessage($_GET[\"controller\"]);\n \n $body = $_POST[\"body\"];\n $subject = $_POST[\"subject\"];\n \n $sentto = $_POST[\"sentto\"];\n \n $this->createUser();\n \n if (($this->_objUser->messageSend($body, $subject, $sentto)) == false) {\n $this->setCustomMessage(\"ErrorMessage\", \"Problem in sending message\");\n } else {\n $this->setCustomMessage(\"SuccessMessage\", \"Message sent successfully\");\n }\n }", "title": "" }, { "docid": "f636dbb429281c38d7f5f244cb6c8178", "score": "0.5360522", "text": "public abstract function send_message($message);", "title": "" }, { "docid": "5f736a2e71a7a80efb90c0523d5777e7", "score": "0.5360491", "text": "protected function onResponse($message, $response, &$failedRecipients) \r\n {\r\n $this->_debug(\"=== Start AWS Response ===\");\r\n $this->_debug($response);\r\n $this->_debug(\"=== End AWS Response ===\");\r\n $ret = $this->do_sent($message, $response, $failedRecipients);\r\n $this->sendPerformed($message, $response, $failedRecipients);\r\n return $ret;\r\n }", "title": "" }, { "docid": "e2d47c392fc5b02a1cbe8ed52e28e286", "score": "0.5355467", "text": "public function replyAction() {\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n } else {\n /**\n * Get the message id\n */\n $messageid = $this->getRequest ()->getParam ( 'message_id' );\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n $customerid = $customer->getId ();\n /**\n * Get the Message\n */\n $message = $this->getRequest ()->getParam ( 'message' );\n $flag = 0;\n $url = Mage::getBaseUrl () . \"property/property/inbox/\";\n /**\n * add the error Message\n */\n $errorMsg = $this->__ ( 'Warning: you may be trying to send contact information.' );\n if (preg_match ( '/\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b/si', $message )) {\n $flag = 1;\n Mage::getSingleton ( 'core/session' )->addError ( $errorMsg );\n Mage::app ()->getFrontController ()->getResponse ()->setRedirect ( $url );\n }\n /**\n * setting the redirect\n */\n if (preg_match ( '/(?:\\+?1[-. ]?)?\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})/', $message )) {\n $flag = 1;\n Mage::getSingleton ( 'core/session' )->addError ( $errorMsg );\n Mage::app ()->getFrontController ()->getResponse ()->setRedirect ( $url );\n }\n if ($flag == 0) { \n if (Mage::getModel ( 'airhotels/calendar' )->replyMail ( $messageid, $customerid, $message )) {\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( 'Mail sent successfully' ) );\n } else {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'Mail sent failed' ) );\n }\n }\n }\n $url = Mage::getBaseUrl () . \"property/property/inbox/\";\n Mage::app ()->getFrontController ()->getResponse ()->setRedirect ( $url );\n }", "title": "" }, { "docid": "9d8aacb1ec664e7ee324352f5a6b183d", "score": "0.53545177", "text": "public function receiveMessage()\n {\n $request = new ReceiveMessageRequest($this->queueName);\n $response = new ReceiveMessageResponse($this->base64);\n return $this->client->sendRequest($request, $response);\n }", "title": "" }, { "docid": "d1d08474901cb901a6ff64c34f7b1baf", "score": "0.5337125", "text": "private function sendMessageViaSB($to, $message) {\r\n $socket = $this->switchBoardSessionLookup[$to];\r\n if (self::socketcheck($socket)) {\r\n return false;\r\n }\r\n\r\n $id = &$this->switchBoardSessions[(int) $socket]['id'];\r\n\r\n $aMessage = $this->getMessage($message);\r\n // CheckEmotion...\r\n $MsnObjDefine = $this->GetMsnObjDefine($aMessage);\r\n if ($MsnObjDefine !== '') {\r\n $SendString = \"MIME-Version: 1.0\\r\\nContent-Type: text/x-mms-emoticon\\r\\n\\r\\n$MsnObjDefine\";\r\n $len = strlen($SendString);\r\n\r\n if ($this->sb_writeln($socket, $id, \"MSG $id N $len\") === false ||\r\n $this->sb_writedata($socket, $SendString) === false) {\r\n $this->endSBSession($socket);\r\n return false;\r\n }\r\n }\r\n $len = strlen($aMessage);\r\n\r\n if ($this->sb_writeln($socket, $id, \"MSG $id N $len\") === false ||\r\n $this->sb_writedata($socket, $aMessage) === false) {\r\n $this->endSBSession($socket);\r\n return false;\r\n }\r\n\r\n // Don't close the SB session, we might as well leave it open\r\n return true;\r\n }", "title": "" }, { "docid": "1d4c70f661819d8714ac843b02c837aa", "score": "0.5304876", "text": "function _sendMessageReply($chatId, $messageId, $text){\n\n $data = [\n 'chat_id' => $chatId,\n 'reply_to_message_id'=>$messageId,\n 'parse_mode'=>'HTML',\n 'disable_web_page_preview'=>true, \n 'text' => $text\n ];\n \n return Request('sendMessage', $data);\n}", "title": "" }, { "docid": "e20c7dc5a19e6c6868be7f600dd490a4", "score": "0.5303596", "text": "abstract function getResponseMessage();", "title": "" }, { "docid": "6dc05ff27769070559acf71f1a81808f", "score": "0.52939737", "text": "function sendSubscriptionConfirmationByPhone() {\n\t\t$message = 'Dear '.$this->getUser()->getFirstName().', your payment of Shs '.$this->getAmount().' for FARMIS has been received. Services have been activated on your account untill '.formatDateAndTime($this->getSubscription()->getEndDate(), false);\n\t\t// debugMessage($message);\n\t\t$sendresult = sendSMSMessage($this->getUser()->getPhone(), $message);\n\t\t// debugMessage($sendresult);\n\t\t# saving of message to application inbox is not valid here\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d196651b2149d55c2ae6eb0c33b8bc70", "score": "0.5279813", "text": "public function afterSend($message, $isSuccessful) {\n $event = new SmsEvent(['message' => $message, 'isSuccessful' => $isSuccessful]);\n $this->trigger(self::EVENT_AFTER_SEND, $event);\n }", "title": "" }, { "docid": "7be9581d5f99f1b4892bf55c5ff28c5d", "score": "0.5272737", "text": "public function sendMessage($message) {\n $message->dateSent = Message::$objects->formatDateTime(new DateTime());\n $message->read = false;\n $message->save();\n \n // FIXME: If the user is subscribed to email notifications,\n // call emailMessage($message)\n }", "title": "" }, { "docid": "6d97180cc125528faf264970b1c4d1a7", "score": "0.52668434", "text": "function send_sms($message,$to,$from=null){\n if($from && strlen($from)>11){\n $from = substr($from,0,11);\n }\n $url = $this->api_base_url.\"/messages?app_id=\".$this->app_id.\"&app_secret=\".base64_encode($this->app_secret);\n $data['to'] = $to; \n $data['from']= $from;\n $data['message'] = $message;\n\n $this->result = $this->send_request($url, \"POST\", [],$data, true);\n return ($this->result->success && $this->result->message==\"MESSAGE SENT.\");\n }", "title": "" }, { "docid": "7d86048708550c2e13a648d32e111f44", "score": "0.5261207", "text": "public function respondWithMessage($message)\n {\n return $this->respond(JsonBuilder::message($message));\n }", "title": "" }, { "docid": "4dccf48d808c93f696fbfa0a59b647dd", "score": "0.5247927", "text": "public function actionSendMessage() {\n\n // get data, sent by client\n $data = Yii::app()->request->getPost('chat', array());\n\n // try to store message\n $model = new Chat();\n $result = $model->storeMessage($data);\n\n // prepare return array, set status\n $response = array(\n 'status' => (bool)$result\n );\n\n // encode return array\n echo json_encode($response);\n\n // force app to end\n Yii::app()->end();\n\t}", "title": "" }, { "docid": "c826f9ec83fa1c55cc793efdfe952213", "score": "0.5236414", "text": "public function sendResponse()\n {\n }", "title": "" }, { "docid": "a38bb64a5d8c88f1d33799ff541618a8", "score": "0.52315766", "text": "public function savePhoneMessageReply()\n\t{\n\t\t$input = Request::all();\n\t\t//get twilio sms status response\n\t\tLog::info('Twilio Reply: Save phone message reply'.print_r($input,1));\n\t\ttry {\n\t\t\t$parser = new WebhookResponseParser($input);\n\t\t\t$this->service->saveReplyFromTwilio($parser->get());\n\n\t\t\treturn ApiResponse::success([\n\t \t'message' => trans('response.success.message_received'),\n\t \t]);\n\n\t\t} catch(TwilioException $e) {\n\t\t\tLog::error($e->getMessage());\n\t\t\treturn ApiResponse::errorGeneral($e->getMessage());\n\t\t} catch(PhoneMessageException $e) {\n\t\t\tLog::error($e->getMessage());\n\t\t\treturn ApiResponse::errorGeneral($e->getMessage());\n\t\t} catch(\\Exception $e) {\n\t\t\tLog::error($e->getMessage());\n\t\t\treturn ApiResponse::errorInternal(trans('response.error.internal'), $e);\n\t\t}\n\t}", "title": "" }, { "docid": "ed041a6dbf3d5483b0880f6a2b7b4d38", "score": "0.5230249", "text": "public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }", "title": "" }, { "docid": "9f7812a36c6e971f8f19b9fb0962b115", "score": "0.52297", "text": "function sendMessages($session,$alias,$message,$recipients,$messageType)\n{\n $client=getClient();\n\n $smsMessage= new stdClass();\n $smsMessage->message=$message;\n $smsMessage->messageId=\"\";\n $smsMessage->recipients=$recipients;\n $smsMessage->retries=\"\";\n $smsMessage->sender=$alias;\n $smsMessage->messageType=$messageType;\n $smsMessage->sequenceNum=\"\";\n $smsMessage->status=\"\";\n $smsMessage->time=\"\";\n $smsMessage->type=\"\";\n $smsMessage->user=\"\";\n\n $sendMessages = new stdClass();\n $sendMessages->session = $session;\n $sendMessages->smsMessage = $smsMessage;\n\n $sendMessagesResponse = new stdClass();\n $sendMessagesResponse = $client->sendMessages($sendMessages);\n\n return $sendMessagesResponse->return;\n}", "title": "" }, { "docid": "4f44698251e2c65aec35f40c46e72472", "score": "0.5222941", "text": "public function respond()\n {\n }", "title": "" }, { "docid": "d87c94939fa61166f67261080a7cae6b", "score": "0.5220493", "text": "function easysms_sendsms($smsmessage,$to=null) {\n\t\n\t $mySMS = new EasySMS('balexiou', '92527');\n\t //get the account balance\n\t echo 'BALANCE:' . $mySMS->getbalance();\n\t //get the delivery reports\n\t echo 'REPORT:' . $mySMS->getDeliveryReports();\n\t //send sms\n\t $ret = $mySMS->sendSMS($to,\t\t //the target mobile number\n\t\t\t\t\t\t $smsmessage,\t\t\t//the message\n\t\t\t\t\t\t true, \t \t\t //request delivery report\n\t\t\t\t\t\t false,\t\t\t\t//not as flash sms\n\t\t\t\t\t\t $this->sender\t\t//set the originator\n\t\t\t\t\t );\n\t\t\t\t\t\t \n\t echo 'SMS:' . $ret;\t\t\t\t\t \n\t \n\t return $ret;\n\t}", "title": "" }, { "docid": "406e5b319cdf69e4ce762dc2ed30525a", "score": "0.5218106", "text": "public function receive()\n {\n $message = Message::fromRawPostData();\n\n // Get from SNS notifiate.\n if (! $message) {\n $this->log('Error: Failed checkNotificateFromSns().');\n exit;\n }\n\n // Check from SNS notificate.\n if (! $this->checkNotificateFromSns($message)) {\n $this->log('Error: Failed checkNotificateFromSns().');\n exit;\n }\n\n // Check SNS TopicArn. (TopicArn is unique in AWS)\n if ($message['Type'] == self::TYPE_SUBSCRIPTION) {\n $topic = $message['TopicArn'];\n $this->isSubscription = $email = true;\n } elseif ($message['Type'] == self::TYPE_NOTIFICATION) {\n $topic = $message['TopicArn'];\n $detail = json_decode($message['Message'], true);\n $email = $detail['mail']['source'];\n $this->isSubscription = false;\n } else {\n $this->log('Error: Failed approved message type.');\n exit;\n }\n if (! $this->checkSnsTopic($topic, $email)) {\n $this->log('Error: Failed checkSnsTopic().');\n exit;\n }\n\n if ($this->isSubscription) {\n // enable end point\n $this->SubscriptionEndPoint($message);\n } else {\n // Insert bounce log\n $this->insertLog($detail['bounce']['bouncedRecipients'][0]['emailAddress'], $message['Message']);\n }\n }", "title": "" }, { "docid": "9cc47ed9b3d614c81a35db1c50417f42", "score": "0.52168405", "text": "function sent_message() {\r\n\t\t\r\n\t\t$this->Fields(array(\r\n\t\t\t\t\t\t\t\"description\",\r\n\t\t\t\t\t\t\t\"user_to\",\r\n\t\t\t\t\t\t\t\"messaging_time\"\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\r\n\t\t$this->From(\"messaging\");\r\n\t\t$this->Where(array(\"user_from\"=>$this->_user_from));\r\n\r\n\t\t$this->Select();\r\n\t\t//echo $this->lastQuery();\r\n\t\treturn $this->resultArray();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5c85fcdb3881a495386fdd21580d4aa8", "score": "0.52025646", "text": "public function handle()\n {\n /**\n * {\n * \"id\":111,\n * \"url\":\"http:/xxxxx/com\",\n * \"data\":{},\n * \"notifycount\":0\n * }\n */\n\n $message = Redis::lpop(Sms::SMS_LIST_KEY);\n\n //$message = '{\"id\":1,\"url\":\"http://www.baidu.com\",\"data\":{\"name\":\"111\"},\"notifycount\":0}';\n if(!$message) {\n return;\n }\n\n Log::debug(\"Message: $message\");\n\n $message = json_decode($message, true);\n\n $sms = Sms::where('id', $message['id'])->first();\n\n if(!$sms) {\n Log::debug(\"Sms not exists {$message['id']}\");\n return;\n }\n\n if($sms->notifystatus == 1) {\n Log::debug(\"SMS:{$message['id']} already notified.\");\n }\n\n $response = Curl::to($message['url'])->withData( $message['data'] )->returnResponseObject()->post();\n\n /**\n *\n * Response Structure\n {\n \"content\": \"Message content here\",\n \"status\": 200,\n \"contentType\": \"content-type response header (ex: application/json)\",\n \"error\": \"Error message goes here (Only added if an error occurs)\"\n }\n */\n\n if($response->status == 200) {\n // 回调通知成功\n Log::debug(\"SMS:{$message['id']} notify success\");\n $sms->notifystatus = 1;\n $sms->save();\n }\n else {\n // 回调失败\n if($message['notifycount'] == 2) {\n $sms->notifystatus = 2;\n $sms->save();\n Log::debug(\"SMS:{$message['id']} notify failed\");\n }\n else {\n $message['notifycount'] += 1;\n Log::debug(\"SMS:{$message['id']} notify retry {$message['notifycount']}\");\n Redis::rpush(Sms::SMS_LIST_KEY, json_encode($message));\n }\n }\n\n\n\n }", "title": "" }, { "docid": "e6c58cc3f2169611a04e64254b5d3559", "score": "0.520147", "text": "public function send($message = null)\n {\n $smsText = $message ? $message : $this->smsText;\n\n return parent::send($smsText);\n }", "title": "" }, { "docid": "34ade444acbbbd30a5c438a349c52117", "score": "0.51929414", "text": "protected function sendResponse() {}", "title": "" }, { "docid": "7036e95948bef6da46f88a22fd6c05a3", "score": "0.5192795", "text": "public function sendMessage($request, $response) {\n if (!isset($_SESSION['user'])) {\n // impossible due to the RestMiddleware\n return $response;\n }\n // Get Room\n $room = Room::find($request->getParam('roomId'));\n\n // Check message is not empty\n $messageText = $request->getParam('message');\n if (self::isNullOrWhitespace($messageText)) {\n return $response->withJson([\n 'reason' => 'Message cannot be empty.'\n ], 400);\n }\n\n // Create and send Message\n $message = new Message;\n $message->message = $messageText;\n $message->user_id = $_SESSION['user'];\n $room->messages()->save($message);\n\n return $response->withJson($message);\n }", "title": "" }, { "docid": "70b40299d1d6b8dfa74f73dc4d7ec3ec", "score": "0.5182705", "text": "public function sendMessage(ValidMessage $request)\n {\n $message = new Message();\n \n $message->message = $request->message;\n $message->to = $request->to;\n $message->from = Auth::user()->id; // No one should ever be sending a message on behalf of someone else.\n $message->save();\n \n $message->thread = $message->id;\n $message->save();\n\t\t\n\t // Email notification to the receiver\n\t $receiver = User::where('id', $request->to)->first();\n\t Mail::to($receiver->email)->send(new MessageNotification($request->message));\n \n return Redirect::route('messages')->with('success', 'Your message has been sent!');\n }", "title": "" }, { "docid": "759cdbdca15d9ccb05f0599f906c297f", "score": "0.5171248", "text": "public function send(){\n\t\t\n\t\t$database = new Database();\n\t\t$query = $database->selectOne('message_queues', array('id',\n\t\t\t\t\t\t\t\t\t 'is_executed','executed_at','message','cellphone'), \n\t\t\t\t\t\t\t\t\t ' is_executed=0 ');\n\t\t$exec = $database->query($query);\n\t\tif ($exec) {\n\t\t\t$record = $database->fetchArray($exec);\n\t\t\t$response = $this->sendMessage($database, $record);\n\n\t\t\treturn json_encode(array('status' => $response['status'], 'message' => $response['message']));\n\t\t}\n\n\t}", "title": "" }, { "docid": "97c431d9cb558d93f27edb15bc569332", "score": "0.5170125", "text": "public function sendResponse();", "title": "" }, { "docid": "09d2263be1ae00b2480c15fb95402101", "score": "0.51634705", "text": "function sendMessage($rid,$status){\n\t\t$this->loadModel('Booking');\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"ajax\";\n\t\t//If this is a message accepting or Declining a RESERVATION\n\t\tif(isset($rid) && !empty($rid)){\n\t\t\t\n\t\t\t$this->Booking->id = $rid;\n\t\t\t$this->Booking->contain(array('User'));\n\t\t\t$booking = $this->Booking->read();\n\t\t\t$this->set('bookinginformation', $booking);\n\t\t\t$this->set('status',$status);\n\t\t\t//In the view we'll decide what to do if they're accepting or declining\n\t\t\t$this->render('../Elements/Message/sendmessage');\n\t\t//Otherwise it's a regular contact message\n\t\t} \n\t}", "title": "" }, { "docid": "d00fbb2021911144c953cce1fdf3a670", "score": "0.5158037", "text": "public function send(string $contactId, string $content): ResponseInterface\n {\n $url = 'http://www.smsglobal.com/http-api.php?action=sendsms&user=' . $this->config['user'] . '&password=' . $this->config['password']\n . '&from=' . $this->config['sendingServiceName'] . '&to=' . $this->formatPhoneNumber($contactId) . '&text=' . urlencode($content);\n\n $clientOptions = [\n 'headers' => [\n 'Accept' => 'application/json, text/javascript, */*; q=0.01',\n 'Accept-Encoding' => 'gzip, deflate',\n 'Accept-Language' => 'en-US,en;q=0.5',\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'X-Requested-With' => 'XMLHttpRequest'\n ],\n 'timeout' => 30\n ];\n\n return $this->client->request('GET', $url, $clientOptions);\n }", "title": "" }, { "docid": "bd4ea86b45f6329ad8f6af50d65333fd", "score": "0.51477426", "text": "function handleMessageText($sender_psid,$text) {\n $response = \n [\n \"text\" => $text \n ];\n callSendAPI($sender_psid, $response);\n }", "title": "" }, { "docid": "898628a6aa775a540820e270e674125a", "score": "0.51460016", "text": "function onMessage(Ratchet\\ConnectionInterface $from, $msg)\r\n {\r\n \r\n \r\n\r\n $message = json_decode($msg);\r\n \r\n $message->resourceId = $from->resourceId;\r\n\r\n if ($message->type == 'yourId'){\r\n $from->send(json_encode($message));\r\n } else {\r\n foreach($this->clients as $client){\r\n if ($from !== $client){\r\n $client->send(json_encode($message));\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "0a6a3c61d0470af44ce4594d845128e5", "score": "0.5144839", "text": "function sendSMS($recipients,$msg){\n\t\t//require_once('AfricasTalkingGateway.php');\n\t\t$username = \"stevebab\";\n\t\t$apikey = \"c8933dc169561310819188ca7d69db1a7a967a05bd3c952bad081ea3f71a5ce8\";\n\t\t//$recipients = \"0723401197\";\n\t\t$message = $msg;\n\t\t// Create a new instance of our awesome gateway class\n\t\t$gateway = new AfricasTalkingGateway($username, $apikey);\n\t\ttry{\n\t\t// Thats it, hit send and we'll take care of the rest.\n\t\t$results = $gateway->sendMessage($recipients, $message,$from);\n\t\tforeach($results as $result) {\n\t\t}\n\t\t}\n\t\tcatch ( AfricasTalkingGatewayException $e )\n\t\t{\n\t\techo \"Encountered an error while sending: \".$e->getMessage();\n\t\t}\n\t\t}", "title": "" }, { "docid": "e2f2a0637eea10f6c967b239b83ee815", "score": "0.5141995", "text": "public function sendMessage($to, $subject, $body) {\n\t\t$response = null;\n\t\tif ($to && $subject && $body) {\n\t\t\t$urlMessage = \"{$this->apiHost}/compose\";\n\t\t\t// Build post Data in normalized manner.. appropriately converting the\n\t\t\t// text.\n\t\t\t$postData = http_build_query ( array (\n\t\t\t\t\t'to' => $to,\n\t\t\t\t\t'subject' => $subject,\n\t\t\t\t\t'text' => $body,\n\t\t\t\t\t'uh' => $this->modHash\n\t\t\t) );\n\t\t\t$response = $this->runCurl ( $urlMessage, $postData );\n\t\t}\n\t\t// Determine status of message\n\t\tif($response->jquery[14][3][0] == 'your message has been delivered'){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t\t//return $response;\n\t}", "title": "" }, { "docid": "7ee74a62ba700731630d658ad833db1f", "score": "0.5140151", "text": "public static function handleResponse()\n {\n Yii::import('application.components.aws.CustomSns.Notification');\n \n // Make sure the request is POST\n if ($_SERVER['REQUEST_METHOD'] !== 'POST') {\n throw new Exception(\"Method Not Allowed\", 405);\n }\n \n try {\n // Create a message from the post data and validate its signature\n $message = Message::fromRawPostData();\n $validator = new MessageValidator();\n $validator->validate($message);\n } catch (Exception $e) {\n // Pretend we're not here if the message is invalid\n throw new Exception(\"Not Found\", 404);\n }\n\n if ($message->get('Type') === 'SubscriptionConfirmation') {\n // Send a request to the SubscribeURL to complete subscription\n $client = new Client();\n $subscribeURL = $message->get('SubscribeURL');\n $client->get($subscribeURL)->send();\n }\n elseif ($message->get('Type') === 'Notification') {\n $msg = json_decode($message->get('Message'), true);\n \n if (!empty($msg) && isset($msg['notificationType']) && in_array($msg['notificationType'], array(NotificationType::BOUNCE, NotificationType::COMPLAINT))) {\n return new Notification($message);\n }\n }\n \n return null;\n }", "title": "" }, { "docid": "59e1b17175a6c855fa772e42c907c343", "score": "0.5138987", "text": "public function sendReplyEnd()\n {\n }", "title": "" }, { "docid": "a9a95eec4ace1a8fcfa90987af0ed8f0", "score": "0.51339275", "text": "protected function sendPerformed(Swift_Mime_SimpleMessage $message, $response, $failedRecipients)\n {\n $event = new Swift_Events_SendEvent($this, $message);\n foreach ($this->plugins as $plugin) {\n if (method_exists($plugin, 'sendPerformed')) {\n $plugin->sendPerformed($event);\n }\n }\n \n $statusCode = $this->client->isVersion2() ? 200 : $response->get(\"@metadata\")[\"statusCode\"];\n $this->_debug(\"STATUS CODE: $statusCode \");\n\n // aws response event\n if ($respEvent = $this->_eventDispatcher->createResponseEvent(\n $this, $response, \n $statusCode === 200)) {\n $this->_eventDispatcher->dispatchEvent($respEvent, 'responseReceived');\n }\n\n // Send SwiftMailer Event\n if ($this->evt) {\n $this->evt->setResult($statusCode===200 \n ? Swift_Events_SendEvent::RESULT_SUCCESS \n : Swift_Events_SendEvent::RESULT_FAILED);//TODO: implement more...\n $this->evt->setFailedRecipients($failedRecipients);\n $this->_eventDispatcher->dispatchEvent($this->evt, 'sendPerformed');\n } \n }", "title": "" }, { "docid": "3d90f9819084a7de60cede812587dc19", "score": "0.5131957", "text": "public function chat_message () {\r\n //for client 2 example only\r\n $this->socket->event->addEvent('chat message', function ($socket,$data,$sender) {\r\n $socket->event->broadcastMessage('chat message', $data,true);\r\n });\r\n }", "title": "" }, { "docid": "47d999ff203d75a7cb252efcb04a95b2", "score": "0.5126485", "text": "public function handleSendEvent(object $message): void;", "title": "" }, { "docid": "bc6b4871f0e4c9440818116f4a8b88b6", "score": "0.5114771", "text": "public function sendMessage(ShortMessageContract $message);", "title": "" }, { "docid": "b307749e83fd0099f6c736080dae806b", "score": "0.51058036", "text": "public function onResponse(AMQPMessage $rep) {\n \t$this->log->addInfo('Received response');\n \t\n\t\tif($rep->get('correlation_id') == $this->corr_id) {\n\t\t\t$this->log->addInfo('Correlation id matches, setting response: ' . $rep->body);\n\t\t\t$this->response = $rep->body;\n\t\t}\n\t}", "title": "" }, { "docid": "eceddcbfcabc8b2ba76ddbe5cf885228", "score": "0.51039654", "text": "public function send()\n {\n $status = $this->api->send([\n 'from' => $this->from,\n 'html' => $this->body,\n 'subject' => $this->subject,\n 'recepients' => $this->recepients\n ]);\n \n return $status;\n }", "title": "" }, { "docid": "d0367f02cf7285ec5155a0e42d371b58", "score": "0.51026624", "text": "function sms_send_authd_post()\n\t{\n\t\t$from \t\t= config_item('twilio_phone_number');\n\t\t$to\t\t\t= $this->input->post('to_number');\n\t\t$message \t= $this->input->post('sms_message');\n\n\t\t$send_sms = $this->twilio->sms($from, $to, $message);\n\n\t\tif ($send_sms)\n\t\t{\n $message = array('status' => 'success', 'message' => 'Yay, your SMS was sent');\n }\n else\n {\n $message = array('status' => 'error', 'message' => 'Dang your SMS could not be sent');\n }\t\t\n\t\t\n\t\t$this->response($message, 200);\t\t\n\t}", "title": "" }, { "docid": "9a0cd5ec9f8d8c2a59c44df8e405a998", "score": "0.5100771", "text": "public function postMessage(MessageRequest $form)\n {\n $response = ['done' => false];\n\n if (\\Auth::check()) {\n $mute = $this->mutes->getByUserActive(\\Auth::user()->id);\n\n if (!empty($mute)) {\n // The user is muted, return an error\n $response['error'] = -2;\n } else {\n $status = Chat::STATUS_VISIBLE;\n $contents = $form->contents;\n if (\\Auth::user()->isStaff()) {\n // The user is a staff member, enable commands\n if (\\String::startsWith('/pin ', $contents)) {\n $contents = \\String::replaceFirst('/pin ', $contents);\n $status = Chat::STATUS_PINNED;\n } elseif (\\String::startsWith('/hide ', $contents)) {\n $contents = \\String::replaceFirst('/hide ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/hid ', $contents)) {\n $contents = \\String::replaceFirst('/hid ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/pinhid ', $contents)) {\n $contents = \\String::replaceFirst('/pinhid ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n } elseif (\\String::startsWith('/hidpin ', $contents)) {\n $contents = \\String::replaceFirst('/hidpin ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n }\n }\n\n // Parse the contents into Markdown\n $contentsParsed = with(new \\Parsedown)->text($contents);\n\n // Filter out words that are censored\n $filters = $this->filters->getAll();\n foreach ($filters as $filter) {\n $asterisks = str_repeat('*', strlen($filter->text));\n $contentsParsed = str_ireplace($filter->text, $asterisks, $contentsParsed);\n }\n\n with(new Chat)->saveNew(\\Auth::user()->id, $form->contents, $contentsParsed, $status, $this->channels->getByNameTrim($form->channel)->id);\n $channel = $this->channels->getByNameTrim($form->channel);\n $channel->messages = $channel->messages + 1;\n $channel->save();\n\n $response['done'] = true;\n }\n } else {\n // The user is not logged in\n $response['error'] = -1;\n }\n\n return json_encode($response);\n }", "title": "" }, { "docid": "dcee8ebce4f15315cb5a8d3467615455", "score": "0.50928855", "text": "function ts3client_requestSendServerTextMsg($serverConnectionHandlerID, $message) {}", "title": "" }, { "docid": "321cd70b873d14f65a09fe1b7cc3e433", "score": "0.50880015", "text": "protected function sendMessage($message)\n {\n \\Yii::info('Sending email \"' . $message->getSubject() . '\" to \"' . implode(', ', $message->getTo()) . '\"', self::LOG_CATEGORY);\n\n try {\n if ($this->useMandrillTemplates) {\n return $this->wasMessageSentSuccesfully(\n $this->_mandrill->messages->sendTemplate(\n $message->getTemplateName(),\n $message->getTemplateContent(),\n $message->getMandrillMessageArray(),\n $message->isAsync()\n )\n );\n } else {\n return $this->wasMessageSentSuccesfully(\n $this->_mandrill->messages->send(\n $message->getMandrillMessageArray(),\n $message->isAsync()\n )\n );\n }\n } catch (Mandrill_Error $e) {\n \\Yii::error('A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage(), self::LOG_CATEGORY);\n return false;\n }\n }", "title": "" }, { "docid": "f52c9d7e56c22e890729bd90e2809f5f", "score": "0.5087738", "text": "public function sendSMSMessage(Request $request)\n {\n return $this->successResponse($this->smsService->sendSMSMessage($request->all(), Response::HTTP_CREATED));\n }", "title": "" }, { "docid": "b7bff5b3e66396b8ffb5fc1777513337", "score": "0.5087477", "text": "public function send(Mail\\Message $message) {\n\n\t\t$httpClient = new GuzzleAdapter(new Client());\n\t\t$sparky = new SparkPost($httpClient, ['key' => $this->api_key]);\n\n\t\t$parts = $message->getBody()->getParts();\n\n\t\t$html = null;\n\t\t$text = null;\n\t\t$attachments = [];\n\n\t\tforeach ($parts as $part) {\n\t\t\t$type = $part->getType();\n\t\t\tswitch ($type) {\n\t\t\t\tcase Mime::TYPE_TEXT :\n\t\t\t\t\t$text = $part->getContent();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Mime::TYPE_HTML :\n\t\t\t\t\t$html = $part->getContent();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$attachments[] = [\n\t\t\t\t\t\t'name' => $part->getFileName(),\n\t\t\t\t\t\t'type' => $part->getType(),\n\t\t\t\t\t\t'data' => base64_encode($part->getRawContent()),\n\t\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\t$recipients = [];\n\n\t\tforeach ($message->getTo() as $recipient) {\n\t\t\t$recipients[] = [\n\t\t\t\t'address' => [\n\t\t\t\t\t'name' => $recipient->getName(),\n\t\t\t\t\t'email' => $recipient->getEmail(),\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\n\t\t$sender_name = $message->getSender()->getName();\n\t\t$sender_email = $message->getSender()->getEmail();\n\n\t\t$options = [];\n\n\t\tif (elgg_get_plugin_setting('mode', 'hypeNotifications') == 'staging') {\n\t\t\t$options['sandbox'] = true;\n\t\t}\n\n\t\t$promise = $sparky->transmissions->post([\n\t\t\t'content' => [\n\t\t\t\t'from' => [\n\t\t\t\t\t'name' => $sender_name,\n\t\t\t\t\t'email' => $sender_email,\n\t\t\t\t],\n\t\t\t\t'subject' => $message->getSubject(),\n\t\t\t\t'html' => $html,\n\t\t\t\t'text' => $text,\n\t\t\t\t'attachments' => $attachments,\n\t\t\t],\n\t\t\t'recipients' => $recipients,\n\t\t\t'options' => $options,\n\t\t], $message->getHeaders()->toArray());\n\n\t\ttry {\n\t\t\t$response = $promise->wait();\n\t\t\t$code = $response->getStatusCode();\n\t\t\tif ($code !== 200) {\n\t\t\t\tthrow new Mail\\Exception\\RuntimeException($response->getBody(), $code);\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\telgg_log(\"SparkPost: \" . $e->getMessage(), 'ERROR');\n\t\t\tthrow new Mail\\Exception\\RuntimeException($e->getMessage(), $e->getCode());\n\t\t}\n\n\t}", "title": "" }, { "docid": "26ae96f10e27f697d7fb4b875bbfa902", "score": "0.5082345", "text": "public function sendMessage($discordChannel, $discordMessage) {\n }", "title": "" }, { "docid": "fdaf82763337f748580bc6e64a84a055", "score": "0.50784564", "text": "private function send_message() {\n if($this->chek_input()) {\n $send = $this->insert('messages', 'name, subject, email, phone, content, date', ':xname, :xsubject, :xemail, :xphone, :xcontent, now()');\n $values = array(\n ':xname' => $this->name,\n ':xsubject' => $this->subject,\n ':xemail' => $this->email,\n ':xphone' => $this->phone,\n ':xcontent' => $this->content\n );\n if($send->execute($values)) {\n return true;\n }\n\n }\n return false;\n }", "title": "" }, { "docid": "b576a763d90595d286a157050faf1598", "score": "0.5072481", "text": "public function allowMessage()\n {\n $this->_data['Mensaje'] = 1;\n }", "title": "" }, { "docid": "f5757b89d1ad9f7f4946ec092d805712", "score": "0.50690556", "text": "public function sentMessageResponseById($id)\n {\n $token = $this->_getToken($this->APIKey, $this->SecretKey);\n if ($token != false) {\n\n $url = $this->APIURL.$this->getAPIMessageSendUrl().\"?id=\".$id;\n $SentMessageResponseById = $this->_executeGet($url, $token);\n\n $object = json_decode($SentMessageResponseById);\n\n $result = false;\n if (is_object($object)) {\n if ($object->IsSuccessful == true) {\n $result = $object->Messages;\n } else {\n $result = $object->Message;\n }\n } else {\n $result = false;\n }\n\n } else {\n $result = false;\n }\n return $result;\n }", "title": "" }, { "docid": "188a7c428db843c062ff033e5bbe9d8d", "score": "0.5067882", "text": "public function sms() {\n }", "title": "" }, { "docid": "d9321a6b523e5dbc0aecac23cd9a9a76", "score": "0.5066256", "text": "public function sendMessage()\n\t{\n\t\t$result = false;\n\n\t\tif (\n\t\t\t$this->config['WELCOME_MESSAGE'] == 'Y'\n\t\t\t&& isset($this->config['WELCOME_MESSAGE_TEXT'])\n\t\t\t&& $this->session['SOURCE'] != Connector::TYPE_NETWORK\n\t\t\t&& $this->sessionManager->isEnableSendSystemMessage()\n\t\t)\n\t\t{\n\t\t\t$result = Im::addAutomaticSystemMessage(\n\t\t\t\t$this->session['CHAT_ID'],\n\t\t\t\t$this->config['WELCOME_MESSAGE_TEXT']\n\t\t\t);\n\n\t\t\tif ($this->session['SOURCE'] === Connector::TYPE_LIVECHAT && $this->clientChat)\n\t\t\t{\n\t\t\t\t$this->clientChat->updateFieldData([Chat::FIELD_LIVECHAT => ['WELCOME_TEXT_SENT' => 'Y']]);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->isWelcomeFormNeeded())\n\t\t{\n\t\t\t$this->sendWelcomeForm();\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1a7ab8111dbf4385bbcc3fc62853f12b", "score": "0.5065155", "text": "public function sendMsg()\n {\n $input = Input::all();\n $verif = array(\n 'content' => 'required',\n );\n\n $validator = Validator::make($input, $verif);\n\n if ($validator->passes()) {\n $message = new Message();\n $message->id_sender = Auth::user()->id;\n $message->id_receiver = $input['id'];\n $message->content = $input['content'];\n $message->save();\n return redirect()->back();\n } else {\n return redirect()->back()->withErrors($validator);\n }\n }", "title": "" }, { "docid": "eecb401b401b50bcabd2363e1f80bdd2", "score": "0.50622344", "text": "public function sendMessage(){\n $user = Auth::user();\n // $chatroom->message = request()->message;\n // $success = request()->user()->chatroom()->save($chatroom);\n $chatroom = $user->chatroom()->create([\n 'message' => request()->get('message')\n ]);\n // event(new MessagePosted($chatroom,$user));\n\n broadcast(new MessagePosted($chatroom, $user))->toOthers();\n\n if($chatroom){\n return ['success' => 'good'];\n }else{\n return ['errors' => 'Message is sent failed'];\n }\n\n }", "title": "" }, { "docid": "25d06ce8276267974307a11d70fc93db", "score": "0.5055685", "text": "public function sendMessage(string $stream, array $message): void;", "title": "" }, { "docid": "c5cebeb5f24bc8c5072d690abdb9f51b", "score": "0.5045171", "text": "public function isSent() {}", "title": "" }, { "docid": "af9c3b3e117005e919fd78e32c3e86fe", "score": "0.50443363", "text": "function L_sendSms ($msg, $id, $numberto) {\n\t\t\n\t\t$result = false;\n\t\t\n\t\t$ch = curl_init(\"http://sms.ru/sms/send\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, array(\n\n\t\t\t\"api_id\"\t\t=>\t$id,\n\t\t\t\"to\"\t\t\t=>\t$numberto,\n\t\t\t\"text\"\t\t=>\ticonv(\"windows-1251\",\"utf-8\",$msg)\n\n\t\t));\n\t\t\n\t\t$body = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\t($body != false) ? $result = true : $result = false;\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "4b61f5020357c0856f5967734d4252a5", "score": "0.5044175", "text": "function resend($options = null)\n {\n return new Telerivet_Message($this->_api, $this->_api->doRequest(\"POST\", \"{$this->getBaseApiPath()}/resend\", $options));\n }", "title": "" }, { "docid": "12208ff4b5c53bfdf4bcee8bd207d8ad", "score": "0.5034694", "text": "public function respond_simpleMessage($textToSpeak, $stringToDisplay = '') {\n\t \n\t // Prevent duplicate responses\n\t if ($this->hasResponded) return;\n\t $this->hasResponded = true;\n\t \n // If this hasn't been defined, set it to the same text as the speech (accessibility)\n if ($stringToDisplay == '') {\n $stringToDisplay = $textToSpeak;\n }\n header(\"Content-type:application/json\");\n\t\treturn json_encode(array(\n\t\t\t\"speech\" => $textToSpeak,\n\t\t\t\"displayText\" => $stringToDisplay,\n\t\t));\n }", "title": "" }, { "docid": "fd026eeac66502cbb2e01a87c18e8810", "score": "0.5034431", "text": "function send_message() {\r\n\t\t\r\n\t\t$this->Fields(array\r\n\t\t\t\t(\r\n\t\t\t\t\t\t\"id\"=>$this->_message_id,\r\n\t\t\t\t\t\t\"description\"=>$this->_message_description,\r\n\t\t\t\t\t\t\"user_from\"=>$this->_user_from,\r\n\t\t\t\t\t\t\"user_to\"=>$this->_user_to,\r\n\t\t\t\t\t\t\"messaging_time\"=>$this->_messaging_time\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t$this->From(\"messaging\");\r\n\t\t$this->Insert();\r\n\t\t//echo $this->lastQuery();\r\n\t\t//echo (mysql_error());\r\n\r\n\t}", "title": "" }, { "docid": "fbea0b446a0326e88057a4dc9eb98ea4", "score": "0.5032826", "text": "public function sendSMS($data)\n {\n Mobily::send($data['mobile'], $data['message']);\n }", "title": "" }, { "docid": "5ce0f616b6021d7005a76ce19085f35b", "score": "0.5027289", "text": "public function isMessage(): bool\n {\n return $this->code >= CODE_CONTINUE &&\n $this->code < CODE_OK;\n }", "title": "" }, { "docid": "4f8e24c45266b3c7081405d7af872826", "score": "0.5025557", "text": "public function send($message)\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "4eadaa83ba280ddae63c4163abc7a3f1", "score": "0.5024947", "text": "public function sendsms(){\r\n // $username = \"onitshamarket\";\r\n // $apikey = \"d69b04b7fd1cf8b156a2fc04139b37dbef25c8acc990718aae7d3ed11db2d141\";\r\n// $username = \"ArtisansUsers\";\r\n// $apikey = \"9ac256570d664969766b527a7635f13f84bad5633c1b34757be00bef961bf308\"; // ONITSHA\r\n// $username = \"artisan\";\r\n// $apikey = \"4c614bc247ca9df530a1e60e9762306ba22ff2bdf3c6861c13d1a16fef9805e9\"; // JEFF\r\n $username = \"gecharl\";\r\n $apikey = \"10b64abbaba877a0ffef2b9183017655171f2481b8bacb06a5cbf943201c63a1\";\r\n// die ( $username . ' and ' . $apikey );\r\n $AT = new AfricasTalking($username, $apikey);\r\n $sms = $AT->sms();\r\n if( is_array($this->recipents) && !empty($this->recipents)){\r\n foreach( $this->recipents as $key => $message ){\r\n // remove the preceeding\r\n if( !empty( $key ) || !is_null($key) ){\r\n $recipent = $this->remove( $key );\r\n try {\r\n $result = $sms->send(array(\r\n 'to' => $recipent,\r\n 'message' => $message,\r\n 'enqueue' => true\r\n ));\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c9d18e806406563c8d46bfecd76b5fb2", "score": "0.5016531", "text": "public static function sendMessage($msg) {\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_HEADER => false,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t\tCURLOPT_SSL_VERIFYHOST => false,\n\t\t\tCURLOPT_URL => self::$ucwa_baseserver . self::$ucwa_path_send,\n\t\t\tCURLOPT_REFERER => self::$ucwa_baseserver . self::$ucwa_path_xframe,\n\t\t\tCURLOPT_POST => true,\n\t\t\tCURLOPT_POSTFIELDS => $msg,\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\"Authorization: Bearer \" . self::$ucwa_accesstoken,\n\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\",\n\t\t\t\t\"X-Ms-Origin: \" . self::$ucwa_fqdn,\n\t\t\t),\n\t\t\tCURLOPT_TIMEOUT => 20,\n\t\t));\n\t\t\n\t\t$response = curl_exec($curl);\n\t\t$status = curl_getinfo($curl);\n\t\tcurl_close($curl);\t\n\t\t\n\t\tif ($status[\"http_code\"] == 201) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tself::_error(\"Can't send message for Skype UCWA\", $status);\t\n\t\t\treturn false;\t\n\t\t}\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "bda972ac4706fdb0113c9bbc52e78cee", "score": "0.0", "text": "public function buscaCep(string $address)\n {\n $data = $this->repository->buscaCep($address);\n\n if(is_array($data) && array_key_exists('Error', $data)){\n return response()->json(['data' => $data], 422);\n }\n\n return AddressResource::collection($data);\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": "" } ]
00e47db9e0a34b08a93eaa7f7bf67897
Finds the Service from the DB that is assigned to the provided Device Id
[ { "docid": "b67cf6b7cf12ad89e368c3fd44d934b5", "score": "0.65604603", "text": "public static function findByDevice($device) {\n\t\t$device_id = is_numeric($device) ? intval($device) : $device->getId();\n\n\t\t$columns = implode(',', self::$COLUMNS);\n\t\t$where = array('device_id' => $device_id);\n\t\t$join = '`' . self::$DEVICES_TABLE . '` ON `' . self::$DEVICES_TABLE . '`.`service_id` = `' . self::$TABLE . '`.`id`';\n\n\t\t$rows = select_query(self::$TABLE, $columns, $where, null, null, 1, $join);\n\n\t\tif(mysql_num_rows($rows) == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$values = mysql_fetch_array($rows);\n\n\t\treturn self::createInstanceFromRow($values);\n\t}", "title": "" } ]
[ { "docid": "5ade5ea7e7b3238214ecd29e9fa19802", "score": "0.6854015", "text": "public function getservice() {\n return $this->hasOne(Services::classname(), ['id' => 'sid']);\n }", "title": "" }, { "docid": "d2c150912fe97d5ff639f5747eac1f83", "score": "0.6745231", "text": "public function findService($id)\n {\n return $this->service_repo->find($id);\n }", "title": "" }, { "docid": "43e02cf5c92153cb099fb2fe52d81102", "score": "0.6675488", "text": "public function get_service_by_id($id) {\n\t\t$stmt = $this->database->prepare(\"SELECT * FROM service WHERE id = ?\");\n\t\t$stmt->bind_param('d', $id);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\tif($row = $result->fetch_assoc()) {\n\t\t\t$service = new Service($row['id'], $row);\n\t\t} else {\n\t\t\tthrow new ServiceNotFoundException('Service does not exist.');\n\t\t}\n\t\t$stmt->close();\n\t\treturn $service;\n\t}", "title": "" }, { "docid": "82b0a072ce101d3321bfef1e7ed40d62", "score": "0.65782434", "text": "static function ServiceSearchsByServiceId($serviceId,$database)\n\t{\n\t\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\t\tSERVICE\n\t\t\t\tWHERE\n\t\t\t\t\tSERVICE_ID = '{$serviceId}'\";\n\t\t$res = $database->query($sql);\n\t\t\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "8753193f56c95ab177acc2096711b1f7", "score": "0.6483415", "text": "public function findService($id) {\n if (!isset($this->serviceCache[$id])) {\n $this->serviceCache[$id] = json_decode($this->doGetRequest(\"https://api.palvelutietovaranto.suomi.fi/api/v10/Service/$id\"), true);\n }\n\n return $this->serviceCache[$id];\n }", "title": "" }, { "docid": "c6021d548a180a200286e29c9fac402b", "score": "0.6437025", "text": "protected function getServiceById($id)\n\t{\n\t\tforeach($this->services as $service) {\n\t\t\tif ($service['id']==$id) return $service;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "74ef63173757edf5d1d4a691ee04f7c9", "score": "0.62936467", "text": "function getServiceName($id) {\n global $db;\n $res=$db->Execute(\"SELECT name FROM aa_services WHERE id=$id\");\n list($name)=$res->FetchRow();\n return translateDesktop($name);\n }", "title": "" }, { "docid": "36c2de10301674354b1f792babfae352", "score": "0.62132007", "text": "public function getService()\n {\n return $this->hasOne(ServiceRoom::class, ['id' => 'id_service']);\n }", "title": "" }, { "docid": "b20abff4c2f66cdd0123c4891d41442d", "score": "0.6171565", "text": "public function selectService()\n {\n $sql = \"SELECT * FROM services\";\n $service = $this->db->fetchAll($sql);\n return $service ;\n }", "title": "" }, { "docid": "725402ac9a01d2fc07d67a6968cc4144", "score": "0.61702365", "text": "public function getService($id);", "title": "" }, { "docid": "e6836d7db70d5a4709313d54abaf9f9b", "score": "0.6166713", "text": "public function getService($id) {\n \t$dql = \"SELECT s FROM Service s\n\t\t\t\tWHERE s.id = :id\";\n\n \t$service = $this->em\n\t \t->createQuery($dql)\n\t \t->setParameter('id', $id)\n\t \t->getSingleResult();\n\n \treturn $service;\n }", "title": "" }, { "docid": "fc01828039edf557d8be61e4c19bc64a", "score": "0.6127715", "text": "public function get(int $serviceId);", "title": "" }, { "docid": "d07878a954878bf1b940ed9a4bd95a58", "score": "0.59910977", "text": "public function getService()\n {\n if ( null === $this->_service )\n {\n $model = new Application_Model_Service();\n $this->_service = $model->fetchRow( \"id = '\" . $this->service_group_id . \"'\" );\n }\n return $this->_service;\n }", "title": "" }, { "docid": "0552dcc7e72236ca8d5084368ad28cd6", "score": "0.5955847", "text": "public function services() {\n\t\treturn $this->hasOne(\n\t\t\t'Models\\Services',\n\t\t\t'id',\n\t\t\t'services_id'\n\t\t);\n\t}", "title": "" }, { "docid": "f24e889307fe2490760ab1568c0724e9", "score": "0.59292316", "text": "public function service()\n {\n return $this->hasOne('App\\Model\\Services', 'service_id', 'service_id');\n }", "title": "" }, { "docid": "769de38762bb250438dc0dd83886c6e4", "score": "0.5915302", "text": "function getoneservice($service_id){\r\n\tglobal $check;\r\n\t$service = mysqli_query($check,\"SELECT * FROM `service` WHERE service_id = '$service_id'\");\r\n\treturn $service;\r\n}", "title": "" }, { "docid": "2aaf861b3138d6214e3001634b28c5d3", "score": "0.59019005", "text": "public function searchByService($id) {\n $filters = ['serviceId' => $id];\n return $this->bookingRepo->search($filters);\n }", "title": "" }, { "docid": "8721517f86be912c1b95a13233474f3f", "score": "0.58983886", "text": "function getservice($wedding_hall_id)\n{\t\n\t$con=new dbcon;\n\t$sql=\"select service_id from \".DBPREFIX.\"wedding_hall_service where wedding_hall_id =$wedding_hall_id \";\n\t$con->Query($sql);\t\n\twhile($rs=$con->FetchRow())\n\t{\n\t\t$servicetype[]=getServiceName($rs[\"service_id\"]);\t\n\t}\t\n\t\treturn $servicetype;\n}", "title": "" }, { "docid": "7b9f8c7f7d2f0c42855c73134cdcb049", "score": "0.57973576", "text": "private function getServiceType($id) {\n $dql = \"SELECT st FROM ServiceType st WHERE st.id = :id\";\n $st = $this->em->createQuery($dql)\n ->setParameter('id', $id)\n ->getSingleResult();\n return $st;\n }", "title": "" }, { "docid": "b4b0a8690cae7f529a7dff0677f8db83", "score": "0.5781392", "text": "public static function getAssignedDevices() {\n\t\t$table = self::$DEVICES_TABLE;\n\t\t$columns = 'device_id,service_id';\n\t\t$join = '`' . self::$TABLE . '` ON `' . self::$DEVICES_TABLE . '`.`service_id` = `' . self::$TABLE . '`.`id`';\n\n\t\t$rows = select_query($table, $columns, null, null, null, null, $join);\n\n\t\t$devices_services = array();\n\n\t\twhile ($data = mysql_fetch_array($rows)) {\n\t\t\t$devices_services[intval($data['device_id'])] = intval($data['service_id']);\n\t\t}\n\n\t\treturn $devices_services;\n\t}", "title": "" }, { "docid": "0fc666465c9b44a490ba6c40748a1b9a", "score": "0.5764517", "text": "public function findById($id){\n\t\treturn \\App\\DeviceType::findOrFail($id);\n\t}", "title": "" }, { "docid": "df51835e11d12b59c2dfd2be0a9b1574", "score": "0.5753705", "text": "function getService($id) {\n global $db;\n $res=$db->Execute(\"SELECT container FROM aa_services_element WHERE id=$id\");\n list($container)=$res->FetchRow();\n return $container;\n }", "title": "" }, { "docid": "37e5c8f88c6ccddbc4be4e87ccb453c8", "score": "0.5741887", "text": "public function get_service()\n { \n $this->db->select(\"{$this->service_table}.*\");\n\t $result = $this->db->get($this->service_table);\n\t\treturn $result->result_array();\n \n }", "title": "" }, { "docid": "fe9f1d3126ac239399871d08201e95da", "score": "0.57271624", "text": "public function findBySvcId($svcid)\r\n {\r\n $sql=\"SELECT * FROM services WHERE svcid='$svcid' LIMIT 1\";\r\n return $this->getSelfObject($sql);\r\n }", "title": "" }, { "docid": "2146a9b7222bc278bca686b10d337b13", "score": "0.57206523", "text": "public function show($id) {\n return Service::firstOrFail($id);\n }", "title": "" }, { "docid": "09288dfbf68cdc49b0cdbdafa52c32bd", "score": "0.5715719", "text": "public function us_service()\n\t{\n\t\treturn $this->hasOne(Locale_service::class, 'id', 'us_service_id');\n\t}", "title": "" }, { "docid": "770c368ecbf63970500104280e2bd69f", "score": "0.5713728", "text": "public function getServiceId()\n {\n return $this->get('service_id');\n }", "title": "" }, { "docid": "d15784b468982b1628cf57fb4351552c", "score": "0.56803524", "text": "public function services()\n {\n return $this->hasOne('App\\Services', 'id', 'services_id');\n }", "title": "" }, { "docid": "82fec0272fbe32c09b0a66b621e4741e", "score": "0.5643138", "text": "public function listeServiceByDepartementId($id_service){\n\t\t\t\t\t$sql = \"SELECT * FROM service WHERE service.id_service = \".$id_service.\" \";\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": "fc43a6950120a086c6ee5e6962afb763", "score": "0.56357324", "text": "public function service()\n {\n \treturn $this->belongsTo('App\\Models\\Service', 'service_id', 'id');\n }", "title": "" }, { "docid": "554a9f907f0036b6c3ddcc44a1efd47e", "score": "0.562944", "text": "public function sel_id($service_id)\n\t{\n\t\t$arr_bind_param = array();\n\t\n\t\t$query_str = \"select \";\n\t\t$query_str .= \"\tm_service.service_id \";\n\t\t$query_str .= \"from \";\n\t\t$query_str .= \"\tm_service \";\n\t\t$query_str .= \"where \";\n\t\t$query_str .= \"\tm_service.del_flag = 0 \";\n\t\n\t\t$query = DB::query(Database::SELECT, $query_str);\n\t\t$query->parameters($arr_bind_param);\n\t\n\t\treturn $query->execute($this->db, true);\n\t}", "title": "" }, { "docid": "8236609749ac442de1f231197169326c", "score": "0.5619873", "text": "public function show($id) {\n return $this->serviceRepo->findOrFail($id);\n }", "title": "" }, { "docid": "417424a345f932a2f6570896f00df8c5", "score": "0.55927134", "text": "public function service()\n\t{\n\t\treturn $this->belongsTo('ServiceModel', 'service_id');\n\t}", "title": "" }, { "docid": "aff5b7523e5b8e448b03b4e57c17b655", "score": "0.5551528", "text": "public function get_service_by_name($name) {\n\t\t$stmt = $this->database->prepare(\"SELECT * FROM service WHERE name = ?\");\n\t\t$stmt->bind_param('s', $name);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\tif($row = $result->fetch_assoc()) {\n\t\t\t$service = new Service($row['id'], $row);\n\t\t} else {\n\t\t\tthrow new ServiceNotFoundException('Service does not exist.');\n\t\t}\n\t\t$stmt->close();\n\t\treturn $service;\n\t}", "title": "" }, { "docid": "20813942a40209e566e80abbecb50ed5", "score": "0.55468136", "text": "public function getSubservice() {\n return $this->hasOne(SubServices::classname(), ['id' => 'ssid']);\n }", "title": "" }, { "docid": "47719e4b7e24bdb74cb877c101b742e8", "score": "0.5529539", "text": "public function byId(int $serviceId)\n {\n return $this->getId($serviceId);\n }", "title": "" }, { "docid": "efc57867b492a252967e05c2042a85e1", "score": "0.55247426", "text": "public function getServiceListById($id) \n {\n $rows = new Query();\n\n $result = $rows->select(['service.id', 'service.service_category_id', 'service_category.name', 'service.service_name', 'service.default_price', 'service.created_at'])\n ->from('service')\n ->join('INNER JOIN', 'service_category', 'service.service_category_id = service_category.id')\n ->where(['service.id' => $id])\n ->orderBy('service.id')\n ->all();\n\n if( count($result) > 0 ) {\n return $result;\n }else {\n return 0;\n } \n }", "title": "" }, { "docid": "a6717121765206b547871479f08e613b", "score": "0.5524506", "text": "public function getServiceId()\n {\n return $this->serviceId;\n }", "title": "" }, { "docid": "fa99a60a635061fb073b77de31828f87", "score": "0.54978454", "text": "function getServiceName($service_id)\n{\n\t$cuisineName=array();\n\t\t$con=new dbcon;\n\t\t$sql=\"select service_id,service_title from \".DBPREFIX.\"service where service_id=$service_id\";\n\t\t$con->Query($sql);\t\n\t\twhile($rs=$con->FetchRow())\n\t\t{\n\t\t\t$ServiceName[]=$rs[\"service_title\"];\n\t\t}\t\t\t\n\treturn $ServiceName;\n}", "title": "" }, { "docid": "f1007cf28141d40c94a678be2c0d711a", "score": "0.54757154", "text": "public function service()\n {\n return $this->belongsTo(Service::class);\n }", "title": "" }, { "docid": "49987267152b8e23beaeeb3077a81a07", "score": "0.5455118", "text": "public function service()\n {\n return $this->belongsTo('App\\Service');\n }", "title": "" }, { "docid": "93ab666061b305f4a78c7266af69cc1e", "score": "0.54529005", "text": "public function listUserServices($id);", "title": "" }, { "docid": "602ce8b847cf60dac86040fc50f8ba47", "score": "0.54318887", "text": "public function getServiceId()\n {\n return $this->_ServiceId;\n }", "title": "" }, { "docid": "8e1cec1ddf0ae58665e3d9bd0d8cf159", "score": "0.5431798", "text": "public function find(string $id);", "title": "" }, { "docid": "67dcc9644f3290904ba66b819dd480d4", "score": "0.54171574", "text": "function get_device($device_id)\n {\n return $this->db->get_where('devices',array('device_id'=>$device_id))->row_array();\n }", "title": "" }, { "docid": "ac2a501319ee32f1a4da020cf35daf48", "score": "0.54104936", "text": "public function getService($id)\n {\n if (!filter_var($id, FILTER_VALIDATE_INT, array('options' => array('min_range' => 0)))) {\n throw new BadMethodCallException('ID must be a positive integer got: '.$id);\n }\n\n try {\n\n $url = '/services/'.$id.'.json';\n $method = 'GET';\n $params = array();\n\n $res = $this->callApi($method, $url, $params);\n\n if (!array_key_exists('service', $res)) {\n throw new ServiceNotFoundException('Cannot find Service: '.$id, 404);\n }\n\n return $res['service'];\n\n } catch (Exception $re) {\n if (404 == $re->getCode()) {\n throw new ServiceNotFoundException('Cannot find entry: '.$id, 404);\n }\n\n throw $re;\n }\n }", "title": "" }, { "docid": "50f9c1f5b0a3a68a016ca52e3993c414", "score": "0.5403513", "text": "public function services()\n {\n return $this->belongsTo('App\\Services', 'serv_id');\n }", "title": "" }, { "docid": "54dda0fab3acd85b812e72e02f7d953e", "score": "0.5402019", "text": "function device($deviceID=false){\n\t\tif($deviceID\t){\treturn $this->call('devices/'.$deviceID);\t} //informacion de un dispositivo\n\t\telse\t\t\t {\treturn $this->call('devices');\t\t\t\t} //lista de dispositivos\n\t}", "title": "" }, { "docid": "c2c259adb9ca28eb5aff2916a38474f0", "score": "0.53958696", "text": "private static function getService($id)\n {\n /** @var T */\n return static::getContainer()->get((string) $id);\n }", "title": "" }, { "docid": "97ab1adccc882df60d01822dfdfa474b", "score": "0.5391432", "text": "public function find($id) {\n\t\t$sql = \"SELECT * FROM *PREFIX*\".self::$table.\" WHERE id = ?\";\n\t\treturn $this->findEntity($sql, [$id]);\n\t}", "title": "" }, { "docid": "084a6f9142542fdaf2db3d812c8dd314", "score": "0.53894556", "text": "public function findService(string $id): ExternalService\n {\n if (array_key_exists($id, $this->services)) {\n return $this->services[$id];\n }\n throw new PaymentException(\"Service {$id} cannot be found\");\n }", "title": "" }, { "docid": "ff488bbbe20eff9125b8f54c5af2710b", "score": "0.53884614", "text": "public function service()\n {\n return $this->belongsTo('App\\Models\\Service','service_id');\n }", "title": "" }, { "docid": "59c4566ef78ae7fa306f3c401ee76707", "score": "0.53752524", "text": "public function findById ( $id );", "title": "" }, { "docid": "a9d5bd1bef1e3e16fb53847f98c8ffc4", "score": "0.53688025", "text": "public function service()\n {\n return $this->belongsTo('Service');\n }", "title": "" }, { "docid": "451d7a936f68aae2fa0761938f1fc921", "score": "0.53634566", "text": "public function getCustomerService($id){\n\t\t$userRepository = new UserRepository();\n\t\tif($userRepository->isExist($id)){\n\t\t\t$this->getUser($id);\n\t\t\t$customerServiceRepository = new CustomerServiceRepository();\n\t\t\t$cusServId = $customerServiceRepository->getID($this->getUsername());\n\t\t\t$this->setState($customerServiceRepository->getState($cusServId));\n\t\t\t$this->setRoom($customerServiceRepository->getRoom($cusServId));\n\t\t\t$this->setMealReqID($customerServiceRepository->getMealReqID($cusServId));\n\t\t\t$this->setCleanReqID($customerServiceRepository->getCleanReqID($cusServId));\n\t\t\t$this->setBillNumber($customerServiceRepository->getBillNumber($cusServId));\n\t\t}\n\t\telse{\n\t\t}\n\t}", "title": "" }, { "docid": "5226b9141661dcf898d9c1fd47c75f01", "score": "0.5362692", "text": "function findUser($id) {\n AppLogger::info(\"Entering CommunityBussinessService.findUser()\");\n $servername = Database::$dbservername;\n $username = Database::$dbusername;\n $password = Database::$dbpassword;\n $dbname = Database::$dbname;\n \n //Get connection to the database\n $db = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $uds = new userDataService($db);\n AppLogger::info(\"Leaving CommunityBusinessService to CommunityDataService.findUserById()\");\n $user = $uds->findUserById($id);\n return $user;\n \n \n //Close connection to the database\n AppLogger::info(\"Exiting CommunityBusinessService\");\n $db = null;\n }", "title": "" }, { "docid": "602a7be5275fd618d13daee174a85174", "score": "0.5352294", "text": "private function setService()\n {\n $this->service = Service::find()->all();\n }", "title": "" }, { "docid": "ed4b38b247f73b41acbd25f2911e0dd8", "score": "0.534921", "text": "public function getService($id)\n {\n return $this->getServiceContainer()->getService($id);\n }", "title": "" }, { "docid": "9c4b45cfc566dc316c2cf4c79810253a", "score": "0.5344226", "text": "protected function getService($id)\n {\n return $this->getContainer()->get($id);\n }", "title": "" }, { "docid": "aa6a098682bbd9cb297b72f0ccdf235a", "score": "0.53333795", "text": "public function setServiceId(){\n\t\t\t//This is being called from this class's setInsurance() method\n\n\t\t\tif(isset($this->patient_id) && isset($this->dos)){\n\n\t\t\t\t$service = new service(array('patient_id' => $this->patient_id, 'dos' => $this->dos));\n\t\t\t\t$service->setServiceByDOS();\n\t\t\t\t$patientService = $service->getService();\n\n\t\t\t\t//check to make sure there wasn't an error\n\t\t\t\t$flash = $service->getFlash();\n\t\t\t\n\t\t\t\tif(array_key_exists('error', $flash)){\n\t\t\t\t\t\n\t\t\t\t\tarray_merge($this->flash, $flash);\n\t\t\t\t\treturn false;\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$this->service_id = $patientService['id_services'];\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\t$this->setFlash(array('Error', 'The service_id and dos seem not to have been sent to insurance.php.'));\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "5643fc7cad897dda000fb11d116ea9f4", "score": "0.5319602", "text": "public function listeDepartementByServiceId($id){\n\t\t\t\t\t$sql = \"SELECT * FROM departement WHERE departement.id_service = \".$id.\" \";\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": "b0e84b5a3353c1385a9ea7ace430e256", "score": "0.53167635", "text": "public static function find($id);", "title": "" }, { "docid": "f44dbec3b7f200d1dd0ad782484a2498", "score": "0.5309211", "text": "public function service()\r\n {\r\n return $this->belongsTo('App\\Service');\r\n }", "title": "" }, { "docid": "6761e54aec6c38dfab74489b02a8ce20", "score": "0.528942", "text": "public function getServiceId()\n {\n return $this->getParameter('serviceId');\n }", "title": "" }, { "docid": "84183b0d262f371c1cc5d063c8202bd0", "score": "0.52881426", "text": "public function findServiceChannel($id) {\n if (!isset($this->serviceChannelCache[$id])) {\n $this->serviceChannelCache[$id] = json_decode($this->doGetRequest(\"https://api.palvelutietovaranto.suomi.fi/api/v10/ServiceChannel/$id\"), true);\n }\n\n return $this->serviceChannelCache[$id];\n }", "title": "" }, { "docid": "96abad68b0af48b8b4429a4ae7de2e19", "score": "0.52869153", "text": "public function find($id)\n {\n return Product::find($id);\n }", "title": "" }, { "docid": "3ed28e5e493f2eca5736a7b9a3e4da03", "score": "0.528499", "text": "public function getServiceByServiceType($serviceType){\n $query = $this->serviceId->where('active','Y');\n if(strtolower($serviceType) == 'all'){\n $query = $query->orderby('type');\n }else{\n $query = $query->where('type',$serviceType);\n }\n return $query->select('row_id', 'service_id', 'type', 'active')->get();\n }", "title": "" }, { "docid": "9e9f6a6f79283a7f2d860920f7c25e78", "score": "0.52787554", "text": "function findSkill($id){\n Log::info(\"Entering MemberProfileBusinessService.findSkill()\");\n \n //Get credentials for accessing the database\n $servername = config(\"database.connections.mysql.host\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n $dbname = config(\"database.connections.mysql.database\");\n \n //create connection\n $conn = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n //Create a Security Service DAO with this connection \n $service = new MemberProfileDataService($conn);\n $flag = $service->findSkill($id); \n \n //Return the finder results\n Log::info(\"Exit MemberProfileBusinessService.findSkill() with \" . json_encode($flag));\n return $flag;\n }", "title": "" }, { "docid": "c3c6ce91829f81a465f3b4740d41fba4", "score": "0.5277426", "text": "public static function find($id){\n return Product::find($id);\n }", "title": "" }, { "docid": "473b2a78de842f0c40767bc42d89fe50", "score": "0.5276854", "text": "protected function getService(string $id): ?object\n {\n return static::getContainer()->get($id);\n }", "title": "" }, { "docid": "8983124d3e52e0b80ac86955f949e054", "score": "0.5270181", "text": "protected function findPkSimple($key, ConnectionInterface $con)\n {\n $sql = 'SELECT id_service, title, description, price_vat_excluded, price_vat_included FROM services WHERE id_service = :p0';\n try {\n $stmt = $con->prepare($sql);\n $stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);\n }\n $obj = null;\n if ($row = $stmt->fetch(\\PDO::FETCH_NUM)) {\n /** @var ChildServices $obj */\n $obj = new ChildServices();\n $obj->hydrate($row);\n ServicesTableMap::addInstanceToPool($obj, null === $key || is_scalar($key) || is_callable([$key, '__toString']) ? (string) $key : $key);\n }\n $stmt->closeCursor();\n\n return $obj;\n }", "title": "" }, { "docid": "3ec5b7a7a4a37688397c02178c1305fc", "score": "0.5266532", "text": "public function get($id)\n {\n if (!$this->has($id)) {\n throw new ServiceNotFoundException('Service not found: '.$id);\n }\n\n if (!isset($this->serviceStore[$id])) {\n $this->serviceStore[$id] = $this->createService($id); \n }\n\n return $this->serviceStore[$id];\n }", "title": "" }, { "docid": "3df1befe53c8d9c1282acf56d550d009", "score": "0.52643585", "text": "public static function find($id){\n\t\t\ttry{\n\t\t\t\t$connect = Database::connect();\n\t\t\t\t$query= 'SELECT * FROM vehicles WHERE id =:id';\n\t\t\t\t$statement=$connect->prepare($query);\n\t\t\t\t$statement->bindParam(':id', $id);\n\t\t\t\t$statement->execute();\n\t\t\t\treturn $statement->fetch(PDO::FETCH_OBJ);\n\t\t\t}\n\t\t\tcatch (\\Exception $e) {\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ccfec02aacd4605eca2d53f221807499", "score": "0.52640814", "text": "function searchForService($userSearchTerm, $hospital)\n {\n //$query = \"SELECT * FROM serviceInfo WHERE service_description LIKE '%$userSearch%' AND hospital_id=$hospital;\";\n $query = \"select service_description,charge,hospital_procedure_code,HCPCS_id from serviceInfo where hospital_id=$hospital and service_description LIKE '%$userSearchTerm%';\"; \n return mysqli_query($this->db, $query);\n }", "title": "" }, { "docid": "1a8134d8d1950994bc36cfee3e26d38b", "score": "0.5259871", "text": "public function find($uuid);", "title": "" }, { "docid": "651d2c8e7fe24631f65c791ef19c9988", "score": "0.52575326", "text": "public function listUserInfoServices($id);", "title": "" }, { "docid": "99bbeffe8b193751a1e47be77a3622e3", "score": "0.5244838", "text": "static function ServiceSearchsByServiceName($serviceName,$database)\n\t{\n\t\t\n\t\t$sql = \"SELECT \n\t\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\t\tSERVICE\n\t\t\t\tWHERE\n\t\t\t\t\tSERVICE_NAME = '{$serviceName}'\";\n\t\t$res = $database->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.5225378", "text": "public function find($id);", "title": "" } ]
9d38faa203d4b89ce3baec0e37109ee2
Get free apple for user based on exist apples.
[ { "docid": "75b0f8cabcb0c3b9bd82c652816031c4", "score": "0.7214072", "text": "public function takeFreeApple(User $user)\n {\n $freeApple = Apple::query()->whereDoesntHave('user')->first();\n if (!$freeApple) {\n throw new NoAvailableAppleException();\n }\n\n $userApples = $user->apples->first();\n if ($userApples) {\n $isEven = $userApples->id % 2 === 0;\n $freeApple = Apple::query()->whereDoesntHave('user')->where(\\DB::raw(\"id % 2\"), $isEven ? 0 : 1)->first();\n if (!$freeApple) {\n throw new OddEvenException();\n }\n }\n\n return $freeApple;\n }", "title": "" } ]
[ { "docid": "25dabbf634c2e7a2884d3bc0ecfe7d8c", "score": "0.70896983", "text": "public function freeApples()\n {\n return Apple::query()->update(['user_id' => null]);\n }", "title": "" }, { "docid": "d2ff69c498a9946b77332084e0ae3306", "score": "0.70679927", "text": "public function getFreeApples()\n {\n return Apple::query()->whereDoesntHave('user')->get()->map(function (Apple $apple) {\n return 'Apple' . $apple->id;\n });\n }", "title": "" }, { "docid": "9f127d5b6d60d0a639a3dcc3f18806cf", "score": "0.55853224", "text": "private function getAppleProduct()\r\n\t{\r\n\t\t$appleDiscount = new NoneDiscount();\r\n\r\n\t\t$apple = new Product();\r\n\t\t$apple->setName(self::PRODUCT_APPLE_NAME);\r\n\t\t$apple->setPricePerUnit(self::PRODUCT_APPLE_PRICE);\r\n\t\t$apple->setUnit(self::PRODUCT_APPLE_UNIT);\r\n\t\t$apple->setDiscount($appleDiscount);\r\n\r\n\t\treturn $apple;\r\n\t}", "title": "" }, { "docid": "9bd426f4a7ad19f70c6d2e7f79228ec4", "score": "0.49739593", "text": "public function applier ()\n {\n return $this->app->user_at_id ($this->applier_id, false, true);\n }", "title": "" }, { "docid": "e1f39e903450993268c9b780956d2529", "score": "0.49354708", "text": "public function get($user_id, $app_id)\r\n\t{\r\n\t\t$sql = \"SELECT UDQ_SIZE FROM \".$this->table.\" \r\n\t\t\t\tWHERE UDQ_USER_ID = s:user_id AND UDQ_APP_ID = s:app_id\";\r\n\t\treturn $this->prepare($sql)->query(array('user_id' => $user_id, 'app_id' => $app_id))->fetchField('UDQ_SIZE');\r\n\t}", "title": "" }, { "docid": "e2cf227e1c907649e449409262acf2be", "score": "0.49136028", "text": "function isAppUsed($userid, $apps){\r\n\t\t$db\t = &$this->getDBO();\r\n\t\t$sql = \"SELECT count(*) FROM #__community_apps WHERE `apps`=\" . $db->Quote($apps) . \" AND `userid`=\" . $db->Quote($userid);\r\n\t\t$db->setQuery( $sql );\r\n\t\t$result = ($db->loadResult() > 0) ? true : false;\r\n\t\t\r\n\t\tif($db->getErrorNum()) {\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "e89fa54302e7bf4540676c77be915e05", "score": "0.4822566", "text": "private function is_apple()\n {\n return stripos($this->agent, 'Apple') !== false\n || stripos($this->agent, 'Mac OS X') !== false\n || stripos($this->agent, 'iOS/') !== false;\n }", "title": "" }, { "docid": "4573a71b19407a08c664ee0eebe5aee9", "score": "0.47714362", "text": "public function checkUserAvailability(Request $request)\n {\n $dateTime = Carbon::createFromFormat('Y-m-d H:i:s', $request->date, $this->settings->timezone)->setTimezone('UTC');\n\n [$service_ids, $service_names] = Arr::divide(json_decode($request->cookie('products'), true));\n\n $user_lists = BusinessService::with('users')->whereIn('id', $service_ids)->get();\n\n $all_users_of_particular_services = array();\n foreach($user_lists as $user_list) {\n foreach($user_list->users as $user) {\n $all_users_of_particular_services[] = $user->id;\n }\n }\n\n /* if no employee for that particular service is found then allow booking with null employee assignment */\n if(empty($all_users_of_particular_services)) {\n return response(Reply::dataOnly(['continue_booking'=>'yes']));\n }\n\n $assigned_user_list_array = array();\n $assigned_users_list = Booking::with('users')\n ->where('date_time' , $dateTime)\n ->get();\n\n /* TODO: */\n foreach ($assigned_users_list as $key => $value) {\n foreach ($value->users as $key1 => $value1) {\n $assigned_user_list_array[] = $value1->id;\n }\n }\n\n $free_employee_list = array_diff($all_users_of_particular_services, array_intersect($all_users_of_particular_services, $assigned_user_list_array));\n\n $select_user = '<select name=\"\" id=\"selected_user\" name=\"selected_user\" class=\"form-control mt-3\"><option value=\"\">--Select Employee--</option>';\n\n /* if no employee found of that particular service */\n if(empty($free_employee_list)) {\n if($this->settings->multi_task_user=='enabled') {\n /* give dropdown of all users */\n if($this->settings->employee_selection=='enabled') {\n $employee_lists = User::allEmployees()->select('id', 'name')->whereIn('id', $all_users_of_particular_services)->get();\n foreach ($employee_lists as $key => $employee_list) {\n $select_user .= '<option value=\"'.$employee_list->id.'\">'.$employee_list->name.'</option>';\n }\n $select_user .= '</select>';\n return response(Reply::dataOnly(['continue_booking'=>'yes', 'select_user'=>$select_user]));\n }\n }\n else {\n /* block booking here */\n return response(Reply::dataOnly(['continue_booking'=>'no']));\n }\n }\n \n /* if multitasking and allow employee selection is enabled */\n if($this->settings->multi_task_user=='enabled') {\n /* give dropdown of all users */\n if($this->settings->employee_selection=='enabled') {\n $employee_lists = User::allEmployees()->select('id', 'name')->whereIn('id', $all_users_of_particular_services)->get();\n foreach ($employee_lists as $key => $employee_list) {\n $select_user .= '<option value=\"'.$employee_list->id.'\">'.$employee_list->name.'</option>';\n }\n $select_user .= '</select>';\n return response(Reply::dataOnly(['continue_booking'=>'yes', 'select_user'=>$select_user]));\n }\n }\n\n /* select of all remaining employees */\n $employee_lists = User::allEmployees()->select('id', 'name')->whereIn('id', $free_employee_list)->get();\n\n if($this->settings->employee_selection=='enabled') {\n $i = 0;\n foreach ($employee_lists as $key => $employee_list) {\n $user_schedule = $this->checkUserSchedule($employee_list->id, $request->date);\n if($this->settings->disable_slot=='enabled') {\n // call function which will see employee schedules\n if($user_schedule==true) {\n $select_user .= '<option value=\"'.$employee_list->id.'\">'.$employee_list->name.'</option>';\n $i++;\n }\n }\n else {\n if($user_schedule==true) {\n $select_user .= '<option value=\"'.$employee_list->id.'\">'.$employee_list->name.'</option>';\n $i++;\n }\n }\n }\n $select_user .= '</select>';\n if($i>0) {\n return response(Reply::dataOnly(['continue_booking'=>'yes', 'select_user'=>$select_user]));\n }\n return response(Reply::dataOnly(['continue_booking'=>'no']));\n }\n\n $user_check_array = array();\n foreach ($employee_lists as $key => $employee_list) {\n // call function which will see employee schedules\n $user_schedule = $this->checkUserSchedule($employee_list->id, $request->date);\n if($user_schedule==true) {\n $user_check_array[] = $employee_list->id;\n }\n }\n\n if(empty($user_check_array)) {\n return response(Reply::dataOnly(['continue_booking'=>'no']));\n }\n }", "title": "" }, { "docid": "92f814d1a7a9b693fa100d12fe6334e7", "score": "0.47226667", "text": "public function getAppliedCompOffs($user)\n {\n\n $query = \"SELECT * FROM \".$this->_name.\" WHERE created_by = '\".$user.\"' \";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return \"NO\";\n }", "title": "" }, { "docid": "938cec18f5f6de255eca750f2c1fefd5", "score": "0.47184885", "text": "public function getSKU();", "title": "" }, { "docid": "3eab491dbd63b6afb7c241d21b72634a", "score": "0.4641612", "text": "public function getAvailableShipping($to_address, $shippable_items, $user);", "title": "" }, { "docid": "c8a4f7c3979e7ebcabf99bfffbfa91d2", "score": "0.4590003", "text": "public function getAppStoreBlockInAppPurchases()\n {\n if (array_key_exists(\"appStoreBlockInAppPurchases\", $this->_propDict)) {\n return $this->_propDict[\"appStoreBlockInAppPurchases\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "692875ae6114c01df78e0bd385fc8a5f", "score": "0.45059836", "text": "public function getUserPurchasesItemsByUserId(string $userId, array $components = []): array;", "title": "" }, { "docid": "744be18362ab17a35e231281166a5a18", "score": "0.45051318", "text": "public function getAvailableByUserPostalCode(User $user) {\n $qb = $this->getQbForAvailableByUserZip($user);\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "414e88b3de823330a92e57aa1ba07c68", "score": "0.44941503", "text": "public function getUsedSpaceForUsers(array $users);", "title": "" }, { "docid": "8d3dab79e5d61f8e7ae8b95e0e7234c7", "score": "0.44569802", "text": "static function SearchAffisByProductName($product_name){\n $products = self::GetProductsByName($product_name);\n //creates an empty array to hold found affiliates\n $affi_array = [];\n //creates empty array to keep track of each affi ID, so we dont repeat affiliates\n $affi_ids = [];\n if ($products) {\n //iterates thru all the users\n foreach ($products as $product) {\n //grabs the affiliate asociated to the user\n $temp_affi = self::GetAffByID($product[1]);\n if ($temp_affi != false) {\n $temp_affi = self::arrayTranslator($temp_affi);\n //if the ID array has any results\n if (count($affi_ids)>0) {\n //creates a variable lock to indicated if there is a match\n $lock = false;\n //iterates thru all IDs in the ID array\n foreach ($affi_ids as $affi_id) {\n //if the ID in the array matches with the ID of the affiliate associate to the user\n if ($affi_id == $temp_affi[0]) {\n //set the lock to true preventing the affiliate from being added again to the Affiliate Array\n $lock = true;\n }\n }\n // if the lock has not been turned on, it pushed the affiliate to the Affi array\n if (!$lock) {\n array_push($affi_array, $temp_affi);\n array_push($affi_ids, $temp_affi[0]);\n }\n }else {\n //if the ID array is empty\n array_push($affi_array, $temp_affi);\n array_push($affi_ids, $temp_affi[0]);\n }\n }\n }\n }\n return $affi_array;\n //closeLink($stmt, $link);\n }", "title": "" }, { "docid": "bcb09c648ab2f253b333500c80466047", "score": "0.44223365", "text": "public function get_favorite_product_by_user( $user_id ) {\n\t\t\tglobal $wpdb;\n\t\t\t$favo_prepare = $wpdb->prepare( \"SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value LIKE %s\", \"favo\", '%,'.$wpdb->esc_like($user_id).',%' );\n\t\t\t$favo = $wpdb->get_results( $favo_prepare, ARRAY_A );\n\t\t\treturn $favo;\n\t\t}", "title": "" }, { "docid": "6885c873e6485f77ce2318d39cf147e6", "score": "0.43920863", "text": "protected function manageCadidates($receipt, $refuse, $action)\n\t{\n\t\tif($this->getRights(array(\"CAN_SEE_APPLICATIONS\")))\n\t\t{\n\t\t\tforeach($action as $userid)\n\t\t\t{\n\t\t\t\t$where = Core::getDB()->quoteInto(\"ap.userid = ? AND ap.aid = ?\", array($userid, $this->aid));\n\t\t\t\t$result = Core::getQuery()->select(\"allyapplication ap\", array(\"a.tag\", \"u.username\", \"u2a.aid\"), \"LEFT JOIN \".PREFIX.\"alliance a ON (a.aid = ap.aid) LEFT JOIN \".PREFIX.\"user u ON (u.userid = ap.userid) LEFT JOIN \".PREFIX.\"user2ally u2a ON (u2a.userid = u.userid)\", $where);\n\t\t\t\tif($row = $result->fetchRow())\n\t\t\t\t{\n\t\t\t\t\tif($receipt && !$row[\"aid\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tHook::event(\"ReceiptAllianceCandidate\", array($userid, $row));\n\t\t\t\t\t\tnew Bengine_Game_AutoMsg(24, $userid, TIME, $row);\n\t\t\t\t\t\t$_result = Core::getQuery()->select(\"user2ally\", \"userid\", \"\", Core::getDB()->quoteInto(\"aid = ?\", $this->aid));\n\t\t\t\t\t\tforeach($_result->fetchAll() as $_row)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnew Bengine_Game_AutoMsg(100, $_row[\"userid\"], TIME, $row);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$_result->closeCursor();\n\t\t\t\t\t\tCore::getQuery()->insert(\"user2ally\", array(\"userid\" => $userid, \"aid\" => $this->aid, \"joindate\" => TIME));\n\t\t\t\t\t\tCore::getQuery()->delete(\"allyapplication\", \"userid = ?\", null, null, array($userid));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tHook::event(\"RejectAllianceCandidate\", array($userid, $row));\n\t\t\t\t\t\tnew Bengine_Game_AutoMsg(25, $userid, TIME, $row);\n\t\t\t\t\t\tCore::getQuery()->delete(\"allyapplication\", \"userid = ? AND aid = ?\", null, null, array($userid, $this->aid));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result->closeCursor();\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b64490874ce94284e4319b0578bbc257", "score": "0.43895596", "text": "public function get($app) {\r\n\t\t$apps = db::get_array(\"apps\",array(\"id\"=>$app));\r\n\t\tif (count($apps) > 0) {\r\n\t\t\treturn $apps[0];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "e4fbfe1f49116840ea8ad859fe5392c9", "score": "0.43890396", "text": "public function matchesBuy() {\n\n\t\tif($this->info->last_match_seen === null) {\n\t\t\t$this->info->last_match_seen = 0;\n\t\t}\n\n\t\t$userBuys = $this->buysHas()->pluck( 'category_id' );\n\t\t$sellers = CompanySellsItem::whereIn( 'category_id', $userBuys )\n\t\t\t\t\t\t\t\t\t->where('user_id', '!=', $this->id)\n\t\t\t\t\t\t\t\t//\t->where('created_at', '>', $this->info->last_match_seen)\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t$buyingCompanies = $sellers->pluck( 'user_id' )->toArray();\n\n\t\treturn $buyingCompanies;\n\t}", "title": "" }, { "docid": "e650265b4a21e1c0ac32f44c28e59174", "score": "0.43883348", "text": "public static function getByDeveloper()\n {\n \treturn ProspectBuyer::getCurrentDeveloper()->get();\n }", "title": "" }, { "docid": "1dc27a80c8d53392dffa0d3814ce851c", "score": "0.43881607", "text": "public function getFreeAppWithRevenue($connection=false){\n\t\tif(!$connection)\n\t\t\t$connection=Yii::$app->getDb();\n\t\t$query = \"select count(*) as count from (SELECT count( `jod`.`merchant_id` ) AS `count`,count( `jp`.`merchant_id` ) AS `live_products` , `jed`.`merchant_id` FROM `jet_extension_detail` AS `jed` LEFT JOIN `jet_product` `jp` ON `jed`.`merchant_id` = `jp`.`merchant_id` AND `jp`.`status`='Available for Purchase' LEFT JOIN `jet_order_detail` `jod` ON `jed`.`merchant_id` = `jod`.`merchant_id` AND `jod`.`status` = 'complete' WHERE `jed`.`status` = 'Not Purchase' GROUP BY `jed`.`merchant_id` HAVING count >0 AND live_products > 0 ) FINAL \";\n\t\t\n\t\t$count = $connection->createCommand($query)->queryOne();\n\n\t\treturn isset($count['count'])?$count['count']:0;\n\t}", "title": "" }, { "docid": "3ca4f3af980000c92bbd95be8b2b3bf0", "score": "0.43869814", "text": "public function getUserAppreciations( $id_or_username, $assoc = false ) {\n\n $endpoint = self::ENDPOINT_USERS . '/' . $id_or_username . '/appreciations';\n $results = $this->_getDecodedJson( $endpoint, array(), 'appreciations', $assoc );\n\n // IMPORTANT: Ensure this will always return an array\n return ( empty( $results ) )\n ? array()\n : $results;\n\n }", "title": "" }, { "docid": "c51bd1ec8bbb7f471d73fcf3b6b276f2", "score": "0.43808317", "text": "function isOwned($userid, $appid)\r\n\t{\r\n\t\t$db\t = &$this->getDBO();\r\n\t\t\r\n\t\t$query\t= 'SELECT COUNT(*) FROM '\r\n\t\t\t\t. $db->nameQuote( '#__community_apps' ) . ' '\r\n\t\t\t\t. 'WHERE ' . $db->nameQuote( 'id' ) . '=' . $db->Quote( $appid ) . ' '\r\n\t\t\t\t. 'AND ' . $db->nameQuote( 'userid' ) . '=' . $db->Quote( $userid );\r\n\t\t\r\n\t\t$db->setQuery( $query );\r\n\t\t$result = $db->loadResult();\r\n\t\t\r\n\t\tif($db->getErrorNum()) {\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "5c26e08e92a39dec2a4ea2fe52e6a812", "score": "0.4378762", "text": "public function getUserApplicationUsedSpace( $U_ID, $APP_ID )\r\n\t{\r\n\t\t$sql = \"SELECT DU_SIZE FROM DISK_USAGE WHERE DU_USER_ID = s:du_user_id AND DU_APP_ID = s:du_app_id\";\r\n\t\t$size = $this->prepare($sql)->query(array( 'du_user_id' => $U_ID, 'du_app_id' => $APP_ID ))->fetchField('DU_SIZE');\r\n\t\t\r\n\t\tif ( !strlen($size) )\r\n\t\t\t$size = 0;\t\t\t\r\n\r\n\t\treturn $size;\t\t\r\n\t}", "title": "" }, { "docid": "07b1967342048664e282188d21bba3e7", "score": "0.43692136", "text": "private static function global_user($a_user, $o_user, $s_key = \"\", $wt_value = NULL) {\n\t\t\n\t\tstatic $a_users;\n\t\tif (!isset($a_users)) {\n\t\t\t\t$a_users = array();\n\t\t}\n\t\t$o_user_retval = NULL;\n\n\t\t// determine if a user is being stored or loaded\n\t\tif ($a_user === NULL || $o_user === NULL) {\n\t\t\t\t\n\t\t\t\t// return the already loaded user\n\t\t\t\tfor($i = 0; $i < count($a_users); $i++) {\n\t\t\t\t\t\tif ($a_users[$i][0][$s_key] == $wt_value) {\n\t\t\t\t\t\t\t\t$o_user_retval = $a_users[$i][1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t} else {\n\t\t\t\t\n\t\t\t\t// store the user\n\t\t\t\t$a_users[] = array($a_user, $o_user);\n\t\t\t\t$o_user_retval = $o_user;\n\t\t}\n\n\t\treturn $o_user_retval;\n\t}", "title": "" }, { "docid": "7281fd5f220a02d1f34cbe87114975f1", "score": "0.4354452", "text": "public function get($name)\n\t{\n\t\t// iterate over the data until we find the one we want\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t $this->rest->option(CURLOPT_PORT, REST_PORT);\n\t return $this->rest->get('/supplies/item/id/' . $name);\n\t}", "title": "" }, { "docid": "d7f99cd34ec36186cdde7d8086940391", "score": "0.43238482", "text": "public function buyFruit(){\n\t\techo \"Bazar : lets go. \";\n\t\t$input = Input::except('_token');\n\t\tif(!($input['num_units'] && $input['fruit_id']))\n\t\t\treturn \"Input not read.\";\n\t\t$num_units = (int)($input['num_units']);\n\n\t\t$user = Auth::user()->get();\n\t\t$LE=$user->le; echo \"Current LE = \".$LE.\"<BR>\";\n\n//maybe put this into a function\n\t\t$p=Fruit::find($input['fruit_id']);\n\t\tif(!$p)\t\t\t\t\t\t\treturn \"fruit not found\";\n\t\tif(!$p->launched==1)\t\treturn \"(launched!=1 : $p->launched)Fruit is not being sold. <BR>\";\n\t\tif($p->avl_units<0){\n\t\t\t$p->launched=-1;$p->save(); return \"0 avl units\";\n\t\t\t//expired. place to update this?\n\t\t}\n\t\tif(!$p->farmer)\t\t\t\t\treturn \"This fruit doesn't have an owner!\"; //\n\t\t$farmer=$p->farmer; //accessed to increase f's LE\n\t\t$buy_price= $this->calcFruitPrice($p);// RFT positive check here. \n\t\tif($buy_price==0)\t\t\t\treturn \"buy_price is 0 => ET/RET/avl_units problem!\";\n\t\tif($p->avl_units < $num_units){ \n\t\t\techo \" Buying available units(\".$p->avl_units.\")\"; \n\t\t\t$num_units=$p->avl_units;\n\t\t}\n\t\t$price=$num_units* $buy_price;\n\t\t$total=Game::sysLE()//CHECK IF THIS WORKS ALL TIME\n\t\t$THR= $total * Config::get('game.facF'); //this factor may depend on number of users ?!\n\t\t\n\t\t//Life Energy price check /successful here.\n\t\tif($LE - $price > $THR) {\n\t\t// fruit's avl units cut\n\t\t\t$p->avl_units -= $num_units; \t\t\t\t\t\t$p->save();\n\t\t\t$farmer->user->le += $price;\t\t\t\t\t\t\t\t\t$farmer->user->save();\n\t\t\t$user->le -= $price;\n\t\t\t$user->stored_LE += $p->storage_le;\t\t\t$user->save();\n\t\t\t$p->save();\n\n\t\t//Notes this in purchases table\n\t\t\t$pch = new Fruitbill(); //new model\n\t\t\t$pch->investor_id = $user->investor->id;\n\t\t\t$pch->fruit_id = $p->id;\n\t\t\t$pch->num_units = $num_units;\n\t\t\t$pch->avl_units = $num_units;\n\t\t\t$pch->buy_price = $buy_price;// $prod_price; //should be $buy_price !\n\t\t\t$pch->save();\n\t\t\techo $pch->id.\" Success. Now LE = \".$user->le;\n\t\t}", "title": "" }, { "docid": "3d2720100880a0b2ed2c489c110f4ec7", "score": "0.43194807", "text": "public function getUsedPurchases() {\n\t\treturn ($this->usedInPurchases) ? $this->usedInPurchases : NULL;\n\t}", "title": "" }, { "docid": "2d003b38ba3b84b83a3895a20980b14e", "score": "0.43188915", "text": "public function getAppliedCompOffsCeoUser()\n {\n\n $query = \"SELECT * FROM \".$this->_name.\" WHERE 1=1 \";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return \"NO\";\n }", "title": "" }, { "docid": "943dcb5410431af1f79b22723e32b8e8", "score": "0.43178278", "text": "public function CheckUfxServiceAvailable() {\n \n global $obj,$ufx_data;\n\t\t\n\t\tif (strtoupper(ENABEL_SERVICE_PROVIDER_MODULE) == 'NO') {\n return \"No\";\n }\n\t\t\n if (strtoupper(ONLYDELIVERALL) == 'YES') {\n return \"No\";\n }\n\t\t\n if (!empty(IS_CUBE_X_THEME) && IS_CUBE_X_THEME == \"Yes\") {\n return \"No\";\n }\n\tif (strtoupper(APP_TYPE) == \"RIDE-DELIVERY-UBERX\" || strtoupper(APP_TYPE) == \"UBERX\") {\n if (!empty($ufx_data) && count($ufx_data) > 0) {\n //Data Found\n }else{\n $ufx_data = $obj->MySQLSelect(\"SELECT COUNT(iVehicleCategoryId) AS Total FROM \" . $this->getVehicleCategoryTblName() . \" WHERE 1 = 1 AND eCatType = 'ServiceProvider'\");\n }\n if (!empty($ufx_data[0]['Total']) && $ufx_data[0]['Total'] > 0) {\n return \"Yes\";\n } else {\n return \"No\";\n }\n }\n \n return \"No\";\n }", "title": "" }, { "docid": "7ca1f904b1f550c543b67e344f8759b3", "score": "0.43124864", "text": "public function getFreeAppWithNoRevenue($connection=false){\n\t\tif(!$connection)\n\t\t\t$connection=Yii::$app->getDb();\n\t\t$query = \"select count(*) as count from (SELECT count( `jod`.`merchant_id` ) AS `count`,count( `jp`.`merchant_id` ) AS `live_products` , `jed`.`merchant_id` FROM `jet_extension_detail` AS `jed` LEFT JOIN `jet_product` `jp` ON `jed`.`merchant_id` = `jp`.`merchant_id` AND `jp`.`status`='Available for Purchase' LEFT JOIN `jet_order_detail` `jod` ON `jed`.`merchant_id` = `jod`.`merchant_id` AND `jod`.`status` = 'complete' WHERE `jed`.`status` = 'Not Purchase' GROUP BY `jed`.`merchant_id` HAVING count <1 ) FINAL \";\n\t\t\n\t\t$count = $connection->createCommand($query)->queryOne();\n\n\t\treturn isset($count['count'])?$count['count']:0;\n\t}", "title": "" }, { "docid": "fcddec897afe6731d097c22738f58f75", "score": "0.43056628", "text": "public function getUserPurchases()\n {\n return Controllers\\UserPurchasesController::getInstance();\n }", "title": "" }, { "docid": "35bdf8228756da89d016c8877925b105", "score": "0.43016735", "text": "public function supplies()\n {\n $supplies = Item::where('category_id', $this->parseCategory(request('category')))\n ->where('supply', 1)\n ->orderBy('title', 'asc')\n ->get();\n\n return $this->respond($supplies->toArray());\n }", "title": "" }, { "docid": "8902968591b2bcd26f5e434941e73319", "score": "0.42750221", "text": "function get_app_data($val)\n\t//------------------------------------------------------//\n\t{\n\t\tglobal $mysqli;\t\t\n\t\t$q = 'SELECT '.$val.' FROM apps WHERE id = \"'.get_app_info('app').'\" AND userID = '.get_app_info('main_userID');\n\t\t$r = mysqli_query($mysqli, $q);\n\t\tif ($r && mysqli_num_rows($r) > 0)\n\t\t{\n\t\t while($row = mysqli_fetch_array($r))\n\t\t {\n\t\t\t\treturn $row[$val];\n\t\t } \n\t\t}\n\t}", "title": "" }, { "docid": "cb2f248e47af7af8cd2524d7a5a358a9", "score": "0.4271181", "text": "private function checkForManualActivation($user, array &$data) {\n if (Activation::completed($user) && !$data['activated']) {\n return Activation::remove($user);\n }\n\n if (!Activation::completed($user) && $data['activated']) {\n $activation = Activation::create($user);\n\n return Activation::complete($user, $activation->code);\n }\n }", "title": "" }, { "docid": "4010dd37e675a2e47f65625f0753a6af", "score": "0.42677894", "text": "function getApplication($user_id){\r\n \treturn DB::select('*')\n \t ->from('applicant')\n \t ->where('userid', '=', $user_id)\n \t ->where('timestamp', '>', mktime(0,0,0,0,0))\n \t ->execute()->as_array();\r\n }", "title": "" }, { "docid": "cf690e20ed576d620d7f57edd4c8d382", "score": "0.42674473", "text": "public function getAvailableForPickupInStore()\n {\n return $this->availableForPickupInStore;\n }", "title": "" }, { "docid": "46539a4810856e4adcf877606251c01e", "score": "0.42652774", "text": "function addApp($userid, $appName)\r\n\t{\r\n\t\t$db\t = &$this->getDBO();\r\n\t\t\r\n\t\t// @todo: make sure this apps is not inserted yet\r\n\t\t$sql = \"SELECT count(*) FROM #__community_apps WHERE `userid`=\" . $db->Quote($userid) . \" AND `apps`=\" . $db->Quote($appName);\r\n\t\t$db->setQuery( $sql );\r\n\t\t$exist = $db->loadResult();\r\n\t\t\r\n\t\tif($db->getErrorNum()) {\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\t\t\r\n\t\tif(!$exist){\r\n\t\t\t$sql = \"INSERT INTO #__community_apps SET `userid`=\" . $db->Quote($userid) . \", `apps`=\" . $db->Quote($appName);\r\n\t\t\t$db->setQuery( $sql );\r\n\t\t\t$result = $db->query();\r\n\t\t\t\r\n\t\t\tif($db->getErrorNum()) {\r\n\t\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "b2a8e0393e79f4340b12345b87a08267", "score": "0.425793", "text": "public function apple_callback(Request $request) \n {\n $client_id = api_credentials('service_id','Apple');\n\n $client_secret = getAppleClientSecret();\n\n $params = array(\n 'grant_type' \t=> 'authorization_code',\n 'code' \t\t \t=> $request->code,\n 'redirect_uri' => url('api/apple_callback'),\n 'client_id' \t=> $client_id,\n 'client_secret' => $client_secret,\n );\n \n $curl_result = curlPost(\"https://appleid.apple.com/auth/token\",$params);\n\n if(!isset($curl_result['id_token'])) {\n $return_data = array(\n 'status_code' => '0',\n 'status_message' => $curl_result['error'],\n );\n\n return response()->json($return_data);\n }\n\n $claims = explode('.', $curl_result['id_token'])[1];\n $user_data = json_decode(base64_decode($claims));\n\n $user = User::where('apple_id', $user_data->sub)->first();\n\n if($user == '') {\n $return_data = array(\n 'status_code' => '1',\n 'status_message' => 'New User',\n 'email_id' => optional($user_data)->email ?? '',\n 'apple_id' => $user_data->sub,\n );\n\n return response()->json($return_data);\n }\n\n $token = JWTAuth::fromUser($user);\n\n $user_details = $this->getUserDetails($user);\n\n $return_data = array(\n 'status_code' => '2',\n 'status_message' => 'Login Successfully',\n 'apple_email' => optional($user_data)->email ?? '',\n 'apple_id' => $user_data->sub,\n 'access_token' => $token,\n );\n\n return response()->json(array_merge($return_data,$user_details));\n }", "title": "" }, { "docid": "564912e5660ee6dc356ab41aabfeaa0c", "score": "0.4255486", "text": "function appUsers($app) {\n\t\tif ($app) {\n\t\t\t$cutoff = date('Y-m-d', time()-(86400*30));\n\t\t\t$userSql = \"SELECT COUNT(*) AS 'user_count' FROM `\" . sql_safe($app['users_table']) . \"` WHERE `last_seen`>='\" . sql_safe($cutoff) . \"'\";\n\t\t\t$countResult = $this->Shimmer->query($userSql);\n\t\t\tif ($countResult) {\n\t\t\t\t$row = mysql_fetch_array($countResult);\n\t\t\t\treturn intval($row['user_count']);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "84385ef85281b94328e08214375fb8cd", "score": "0.4252538", "text": "public function getSupplies()\n\t{\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $result = $this->rest->get('/supplies/');\n return $result;\n \n\t\t/*\n\t\t$sql = sprintf(\"SELECT * from SUPPLIES\");\n $query = $this->db->query($sql);\n return $query->result();\n */\n\t}", "title": "" }, { "docid": "5cf8f28eb5dfb8858226c47593d3500d", "score": "0.42421597", "text": "private function checkForManualActivation($user, array &$data)\n {\n if (!isset($data['activated'])) {\n return;\n }\n\n if (Activation::completed($user) && !$data['activated']) {\n return Activation::remove($user);\n }\n\n if (!Activation::completed($user) && $data['activated']) {\n $activation = Activation::create($user);\n\n return Activation::complete($user, $activation->code);\n }\n }", "title": "" }, { "docid": "8adc5566ae465ffbaa4659227058692c", "score": "0.42420623", "text": "public function getAllBusesForUser(User $user)\n {\n return $user->buses()\n ->orderBy('economic_number', 'asc')\n ->get();\n }", "title": "" }, { "docid": "ed9f6b006ac1b4a40eee6b52fa72740c", "score": "0.42416382", "text": "function getExternalApps() {\n\n $arr = array();\n\n //figure out which of our external progs exist\n if (checkAppAvail(APP_OCR)) $arr[\"ocr\"] = 1;\n if (checkAppAvail(APP_WGET)) $arr[\"wget\"] = 1;\n if (class_exists(\"ZipArchive\")) $arr[\"zip\"] = 1;\n\n if (checkAppAvail(APP_MOGRIFY)) $arr[\"mogrify\"] = 1;\n if (checkAppAvail(APP_CONVERT)) $arr[\"convert\"] = 1;\n if (checkAppAvail(APP_MONTAGE)) $arr[\"montage\"] = 1;\n if ($arr[\"mogrify\"] && $arr[\"convert\"] && $arr[\"montage\"]) $arr[\"imagemagick\"] = 1;\n\n if (checkAppAvail(APP_PDFTOTEXT)) $arr[\"pdftotext\"] = 1;\n if (checkAppAvail(APP_PDFIMAGES)) $arr[\"pdfimages\"] = 1;\n if ($arr[\"pdftotext\"] && $arr[\"pdfimages\"]) $arr[\"xpdf\"] = 1; \n\n if (checkAppAvail(APP_TIFFINFO)) $arr[\"tiffinfo\"] = 1;\n if (checkAppAvail(APP_TIFFSPLIT)) $arr[\"tiffsplit\"] = 1;\n if ($arr[\"tiffinfo\"] && $arr[\"tiffsplit\"]) $arr[\"libtiff\"] = 1;\n\n if (checkAppAvail(APP_SENDMAIL) || function_exists(\"imap_8bit\")) $arr[\"email\"] = 1;\n\n if (checkAppAvail(APP_CLAMAV)) $arr[\"clamav\"] = 1;\n\n return $arr;\n\n}", "title": "" }, { "docid": "f7e142c3f609cee32e7ea3ce2dff0bd1", "score": "0.42371562", "text": "public function acceptedOffers($user) {\r\n return count(array_filter($user['Offer'], function($offer) {\r\n return $offer['accepted'];\r\n }));\r\n }", "title": "" }, { "docid": "95c8b3f452514c7b6337869422a2737b", "score": "0.42342368", "text": "public function getUserPrice($user) {\n return $this->makePrice('max');\n\n // we'll delete this section once tested TODO: delete this code\n if(elgg_instanceof($user,ElggUser)) {\n $user_guid = $user->guid;\n }else {\n $user_guid = elgg_get_logged_in_user_guid();\n }\n $price_array = (array) unserialize($this->user_pirce_array);\n\n if(!isset ($price_array[$user_guid])) {\n $price_array[$user_guid] = $this->makePrice();\n self::get_access();\n $this->user_pirce_array = serialize((array) $price_array);\n self::remove_access();\n }\n\n $current_price = $price_array[$user_guid];\n return $current_price;\n }", "title": "" }, { "docid": "945a66af4f4de24fad356ae69ee53a99", "score": "0.42311662", "text": "function getSeller() {\n $myDB = &ADONewConnection(DSN);\n $query = \"SELECT * FROM auction_users WHERE ID = {$this->userID}\"; \n $rs = &$myDB->Execute($query);\n if (!$rs || $rs->RecordCount() < 1) {\n return AUCTION_NO_USER_FOUND;\n } else {\n $seller = new User($rs->fields);\n return $seller;\n } \n }", "title": "" }, { "docid": "5f537d0ca67122a88c9f9da56abb52f7", "score": "0.42298594", "text": "public function apples() {\n return \"we do not sell apples<br>\";\n }", "title": "" }, { "docid": "85997fd57c831f2264e57a994d676eaf", "score": "0.42234245", "text": "public function getUserPurchasesItem($where, array $markers = [], $default = null, bool $throwNotFoundEx = false);", "title": "" }, { "docid": "67dd8c047ea05a3437e6b4061a658d01", "score": "0.4216957", "text": "public function getShop($email){\n $user = JWTAuth::parseToken()->authenticate();\n $shop = shop::where(['email_corporate' => $email, 'users_id' => $user->id])->first();\n return $shop->id;\n }", "title": "" }, { "docid": "53ea57799d5d7057e9298e7694e913f5", "score": "0.42105278", "text": "public function getuserproduct($shopid){\n $sql = \"SELECT * from products inner join images on image_fk_product_id = prd_id where shop_shop_id = $shopid\";\n $data = $this->queryNone($sql);\n if (empty($data)) {\n //false to mean user has not requested to post an add\n return false;\n } else {\n return $data;\n }\n }", "title": "" }, { "docid": "c133794f781e9259fd3a1b6289f0772c", "score": "0.42104092", "text": "public function isBasketCanGiveApple()\n {\n $lastUpdatedApple = Apple::query()->orderBy('updated_at', 'desc')->first();\n $timePassed = time() - $lastUpdatedApple->updated_at->getTimestamp();\n return $timePassed > Config::get('app.basket.timeout', 60);\n }", "title": "" }, { "docid": "172ed44fc1542287b28a20152e352bf7", "score": "0.42100325", "text": "public function user_avail()\n\t{\n\t\tif($_SESSION['acm_userlevel'] != 'User')\n\t\t{\n\t\t\treturn Helper::redirect('/');\n\t\t}\n\n\t\t//gets all the province from the database\n\t\t$get_all_province = App::get('database')->selectAll('province');\n\n\t\t//gets all the city from the database\n\t\t$get_all_city = App::get('database')->selectAll('city');\n\n\t\tif(($get_all_province != null)&&($get_all_city != null))\n\t\t{\n\t\t\t$_SESSION['acm_province'] = $get_all_province;\n\t\t\t$_SESSION['acm_city'] = $get_all_city;\n\t\t}\n\n\t\tHelper::active('user_avail');\n\n\t\treturn Helper::view('user_avail');\n\t}", "title": "" }, { "docid": "57ef668c03b9bd5ebe6f89ea1ea1396f", "score": "0.42078248", "text": "public function getForUser( $userId )\n\t\t{\n\t\t\t$tableUsers = new Default_Model_DbTable_Users();\n\t\t\treturn $this->fetchRow(\n\t\t\t\t$this->select()\n\t\t\t\t\t->setIntegrityCheck( false )\n\t\t\t\t\t->from(\n\t\t\t\t\t\tarray ( 's' => $this->info( 'name' ) ),\n\t\t\t\t\t\tarray ( 's.*' )\n\t\t\t\t\t)\n\t\t\t\t\t->joinLeft(\n\t\t\t\t\t\tarray ( 'u' => $tableUsers->info( 'name' ) ),\n\t\t\t\t\t\t\"u.shop_id = s.id\",\n\t\t\t\t\t\tarray ()\n\t\t\t\t\t)\n\t\t\t\t\t->where( 'u.id = ?', $userId )\n\t\t\t\t\t->limit( 1 )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "ca5ceaef85c4bf9999b239e57f91e8b7", "score": "0.42004454", "text": "function getAlertForUser($userId) {\n\t\t\treturn $this->getForUser($userId,1);\n\t\t}", "title": "" }, { "docid": "bc9abad2f3071f4009f538a462121709", "score": "0.41603455", "text": "public function get($which)\n\t{\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $result = $this->rest->get('/supplies/id/' . $which);\n return $result;\n\n /*\n $sql = sprintf(\"SELECT * from SUPPLIES where ID = %d\", $which);\n $query = $this->db->query($sql);\n $result = $query->result();\n $reset = reset($result);\n return $reset;\n */\n\t}", "title": "" }, { "docid": "eb3aa40cf2fa4a24dc8cc06e76f0a30a", "score": "0.41599244", "text": "function getUserApps($userid, $state = 0)\r\n\t{\r\n\t\t$db\t = &$this->getDBO();\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM #__community_apps \"\r\n\t\t\t\t.\" WHERE `userid`=\" . $db->Quote($userid)\r\n\t\t\t\t.\" AND `apps`!='news_feed' \"\r\n\t\t\t\t.\" AND `apps`!='profile' \"\r\n\t\t\t\t.\" AND `apps`!='friends' \"\r\n\t\t\t\t.\" ORDER BY `ordering` \";\r\n\t\t\t\t\t\t\t\t\r\n\t\t$db->setQuery( $sql );\r\n\t\t$result = $db->loadObjectList();\r\n\r\n\t\tif($db->getErrorNum())\r\n\t\t{\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\t\t\r\n\t\t// If no data yet, we load default apps\r\n\t\t// and add them to db\r\n\t\tif(empty($result))\r\n\t\t{\r\n\t\t\t$result = $this->getCoreApps();\r\n\t\t\tforeach($result as $row)\r\n\t\t\t{\r\n\t\t\t\t$row->userid = $userid;\r\n\t\t\t\t$db->insertObject('#__community_apps', $row);\r\n\t\t\t\tif($db->getErrorNum()) {\r\n\t\t\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Reload the apps\r\n\t\t\t// @todo: potential duplicate code\r\n\t\t\t$sql = \"SELECT * FROM #__community_apps \"\r\n\t\t\t\t.\" WHERE `userid`=\" . $db->Quote($userid)\r\n\t\t\t\t.\" AND `apps`!='news_feed' \"\r\n\t\t\t\t.\" AND `apps`!='profile' \"\r\n\t\t\t\t.\" AND `apps`!='friends' \"\r\n\t\t\t\t.\" ORDER BY `ordering` \";\r\n\t\t\t$db->setQuery( $sql );\r\n\t\t\t$result = $db->loadObjectList();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif($db->getErrorNum()) {\r\n\t\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n// \t\t$apps = array();\r\n// \t\tforeach( $result as $row ) {\r\n// \t\t\t$row = $this->getAppInfo($row->apps);\r\n// \t\t\t$apps[] = $row;\r\n// \t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f5183c351241c86fa2e60891ec6e4006", "score": "0.41570568", "text": "private function getAppleShaString(array $appleParams): string\n {\n $appleShaString = '';\n\n foreach ($appleParams as $index => $value) {\n if ($appleShaString) {\n $appleShaString .= ', ';\n }\n $appleShaString .= $index .'=' . $value;\n }\n\n return $appleShaString;\n }", "title": "" }, { "docid": "97ceac62755a2497090dd76b802d69d6", "score": "0.41515586", "text": "public function purchased_application($app_id){\n $user_id = \\Auth::user()->id;\n $purchase = App\\Purchase::where('application_id', $app_id)->where('user_id', $user_id)->count();\n if($purchase == 0){\n return false;\n }\n else{\n return true;\n }\n }", "title": "" }, { "docid": "14f8439ad7eea1c7d577ed227f88b92a", "score": "0.41345426", "text": "protected static function isAppleSystem() {\n\n $userAgent = $_SERVER['HTTP_USER_AGENT'];\n\n if ((stripos($userAgent, 'iPod') || stripos($userAgent, 'iPhone') || stripos($userAgent, 'iPad') || stripos($userAgent, 'Mac')) && (self::getBrowserName($userAgent) == 'Safari')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "631215cea3c2fb5850c86cda9ed5d23d", "score": "0.41266465", "text": "public function getItemsToBuy($userEmail){\n\n \t$sql = $this->db->query(\"Select a.itemID, a.iName, a.cost, a.currName, a.actionType, b.tradeType from item as a, tradeitems as b where a.itemID = b.itemId and b.tradeType = 'sell' and userID != '\".$userEmail.\"'\");\n \treturn $sql;\n\n }", "title": "" }, { "docid": "acd460d7452034cafb1ed43644862406", "score": "0.41250914", "text": "function give_count_purchases_of_customer( $user = null ) {\n\n\t$backtrace = debug_backtrace();\n\n\t_give_deprecated_function( __FUNCTION__, '1.8.9', 'give_count_donations_of_donor', $backtrace );\n\n\treturn give_count_donations_of_donor( $user );\n}", "title": "" }, { "docid": "9d866e2a268166c462a0daf8248d3fdf", "score": "0.41204035", "text": "public function apples()\n {\n return \"Fruitstore sez--we have apples.<br/>\";\n }", "title": "" }, { "docid": "3881d351a33ea0378280befe98af5293", "score": "0.4114917", "text": "public function getUserPurchasesItems($where, array $markers = []);", "title": "" }, { "docid": "4f3e3a9c07f2ed52b8addf5d8d9af10b", "score": "0.41097996", "text": "function getPrivacy($userid, $appname){\r\n\t\tstatic $privacy = array();\r\n\t\t\r\n\t\tif( empty($privacy[$userid]) )\r\n\t\t{\r\n\t\t\t// Preload all this user's privacy settings\r\n\t\t\t$db\t = &$this->getDBO();\r\n\t\t\t$sql = \"SELECT privacy, apps FROM #__community_apps\" \r\n\t\t\t\t .\" WHERE `userid`=\" . $db->Quote($userid);\r\n\t\t\t\t\r\n\t\t\t$db->setQuery( $sql );\r\n\t\t\t$db->query();\r\n\t\t\t\r\n\t\t\tif($db->getErrorNum()) \r\n\t\t\t{\r\n\t\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t $result = $db->loadObjectList();\r\n\t\t $privacy[$userid] = array();\r\n\t\t \r\n\t\t foreach($result as $row)\r\n\t\t\t{\r\n\t\t\t\t$privacy[$userid][$row->apps] = $row->privacy;\r\n\t\t\t}\r\n\t }\r\n\t \r\n\t if(empty($privacy[$userid][$appname]))\r\n\t \t$privacy[$userid][$appname] = 0;\r\n\t \t\r\n\t $result = $privacy[$userid][$appname];\r\n\t \r\n\t\treturn $result;\t\r\n\t}", "title": "" }, { "docid": "48a84ae297a06b4478f6ca2b7891b171", "score": "0.41024056", "text": "public function getUsersAddressbook(){\n\t\t$ab = Addressbook::model()->findSingleByAttribute('users', '1'); //\\GO::t(\"Users\"));\n\t\tif (!$ab) {\n\t\t\t$ab = new Addressbook();\n\t\t\t$ab->name = \\GO::t(\"Users\");\n\t\t\t$ab->users = true;\n\t\t\t$ab->save(true);\n\t\t\t\n\t\t\t$ab->acl->addGroup(\\GO::config()->group_internal);\n\t\t}\n\t\treturn $ab;\n\t}", "title": "" }, { "docid": "939c4db3303df0c820f14b9a87fd6f00", "score": "0.4101492", "text": "public function getAppStoreBlockUIAppInstallation()\n {\n if (array_key_exists(\"appStoreBlockUIAppInstallation\", $this->_propDict)) {\n return $this->_propDict[\"appStoreBlockUIAppInstallation\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "004b0d12b325dc681518929abb9b61d1", "score": "0.4100207", "text": "public function suggestEmployee($date)\n {\n $dateTime = $date;\n\n [$service_ids, $service_names] = Arr::divide(json_decode(request()->cookie('products'), true));\n\n $user_lists = BusinessService::with('users')->whereIn('id', $service_ids)->get();\n\n $all_users_of_particular_services = array();\n foreach($user_lists as $user_list){\n foreach($user_list->users as $user){\n $all_users_of_particular_services[] = $user->id;\n }\n }\n\n /* if no empolyee for that particular service is found then allow booking with null employee assignment */\n if(empty($all_users_of_particular_services)) {\n return '';\n }\n\n $assigned_user_list_array = array();\n $assigned_users_list = Booking::with('users')\n ->where('date_time' , $dateTime)\n ->get();\n\n foreach ($assigned_users_list as $key => $value){\n foreach ($value->users as $key1 => $value1){\n $assigned_user_list_array[] = $value1->id;\n }\n }\n\n $free_employee_list = array_diff($all_users_of_particular_services, array_intersect($all_users_of_particular_services, $assigned_user_list_array));\n\n /* if no employee found then return allow booking with no employee assignment */\n if(empty($free_employee_list))\n {\n if($this->settings->multi_task_user=='enabled') {\n /* give single users */\n return User::select('id', 'name')->whereIn('id', $all_users_of_particular_services)->first()->id;\n }\n }\n\n /* select of all remaining employees */\n $users = User::select('id', 'name')->whereIn('id', $free_employee_list);\n if($this->settings->disable_slot=='enabled')\n {\n foreach ($users->get() as $key => $employee_list)\n {\n // call function which will see employee schedules\n $user_schedule = $this->checkUserSchedule($employee_list->id, $date);\n if($user_schedule==true)\n {\n return $employee_list->id;\n }\n }\n }\n return $users->first()->id;\n\n }", "title": "" }, { "docid": "08925e698378417d9159a4fb5a29f22a", "score": "0.40963042", "text": "function getUser($name){\n $users = loadUsers();\n $i = 0;\n for(;$i < count($users); $i++){\n if($users[$i]->name == $name)\n break;\n }\n return $users[$i];\n}", "title": "" }, { "docid": "22455e15e5040af9606013da80331d26", "score": "0.40951267", "text": "public function get_user_preference($user_id) {\n $this -> db -> select('u.RetailerId,u.StoreId,r.CompanyName as RetailerName ,s.StoreName,s.StoreTypeId');\n $this -> db -> from('userpreferredbrands as u'); \n $this -> db -> join('retailers as r', 'r.Id = u.RetailerId', 'left');\n $this -> db -> join('stores as s', 's.Id = u.StoreId', 'left');\n $this -> db -> where(array(\n 'u.IsActive' => 1,\n 'u.IsRemoved' => 0,\n 'u.UserId' => $user_id\n ));\n $this -> db -> limit(1);\n $query = $this -> db -> get();\n\n return $query -> row_array();\n }", "title": "" }, { "docid": "289117dafdbcd4bf721c654af8729c78", "score": "0.40907443", "text": "function getApps($user_email){\n // echo \"asdsad\";\n $result = $this->db->get_where($this->tablename, array(\"user_email\"=> $user_email)); \n return $result->result_array();\n }", "title": "" }, { "docid": "ca1b33e68371609636671a770fa205fd", "score": "0.4086643", "text": "function etsy_pull_shop($shop_name) {\r\n\t\t\t$url = \"/public/shops/$shop_name?\";\r\n\t\t\t$result = etsy_access_api($url);\r\n\t\r\n\t\t\tif(!is_array($result)) globals('etsy', 'error_message', 'Aw, snap! Unable to retrieve shop information.');\r\n\t\t\treturn $result;\r\n\t\t}", "title": "" }, { "docid": "7125ffee558e795a58834338a5840949", "score": "0.40865505", "text": "function _get_user_assigned_equipment($uid) {\n global $user;\n //print_r($user->roles); exit();\n // check for the permission type to use this option or not0.\n if ($uid ==1 || !empty($user->roles[5]) || !empty($user->roles[8]) || !empty($user->roles[4]) ) {\n $ret= 'all';\n return $ret;\n }\n if (variable_get('cmms_perm_type', array()) == 2) {\n $query = \"select e.field_employee_equipment_value as equipment_value from content_field_employee_equipment e inner join node on node.nid=e.nid where node.uid = %d and node.type = 'hospital_employee'\";\n $result = db_query($query, $uid);\n $equipment_ids_array = array();\n\n while ($row = db_fetch_array($result)) {\n $equipment_ids_array[] = $row['equipment_value'];\n }\n\n if (count($equipment_ids_array) > 0) {\n\n //return '430+427'; \n return implode('+', $equipment_ids_array);\n }\n else {\n\n\n }\n }\n else return 'all';\n}", "title": "" }, { "docid": "7582346f74d1eeb847623919ba81c80f", "score": "0.407998", "text": "public function test_intv_apple_customer()\n {\n $customer = factory(Customer::class)->create([\n 'name' => 'Mock Apple'\n ]);\n $standoutPriceRule = \\App\\Services\\PricingRule\\Rules\\Factories\\FixedAdTypePriceRuleFactory::fromArray([\n 'adTypeId' => AdType::TYPE_STANDOUT,\n 'fixedPrice' => 299.99\n ]);\n CustomerPricingRule::unguard();\n $customerPricingRule = factory(CustomerPricingRule::class)->create([\n 'customer_id' => $customer->getKey(),\n 'pricing_rule_id' => PricingRule::whereProviderAlias($standoutPriceRule->getAlias())\n ->first()\n ->getKey(),\n 'pricing_rule_settings' => json_encode($standoutPriceRule->toArray())\n ]);\n $customer->pricingRules()->save($customerPricingRule);\n $checkout = factory(Checkout::class)->create();\n\n $itemCollection = CheckoutItemCollectionFactory::createForCustomer($customer);\n\n $expectedPrice = 1294.96;\n\n $this->addCheckoutItemToCollection(AdType::TYPE_STANDOUT, $itemCollection, $checkout, 3);\n $this->addCheckoutItemToCollection(AdType::TYPE_PREMIUM, $itemCollection, $checkout, 1);\n\n $resolvedPrice = $itemCollection->resolve();\n $this->assertEquals($resolvedPrice->price, $expectedPrice);\n }", "title": "" }, { "docid": "cba4147d7c69e831e5542fb7b7d5d129", "score": "0.40755004", "text": "function getIndividualItem($id_user, $item){\r\n\t\t$this->db->select($item);\r\n\t\t$this->db->where('ID', $id_user);\r\n\t\t$this->db->from('users');\r\n\t\t$result = $this->db->get();\r\n\t\tif($result->num_rows() == 1){\r\n\t\t\treturn $result->row(0)->$item;\r\n\t\t} \r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ac131fd0c57481b2e1e79bf89afc6d6e", "score": "0.4069678", "text": "function getActiveUsers() {\r\n $usersCount = 0;\r\n \r\n // initialize database \r\n $db = new ClientDB();\r\n \r\n $usersQuery = $db->query(\"SELECT u_ip FROM users\");\r\n while ($row = $usersQuery->fetchArray(SQLITE3_ASSOC)) {\r\n $usersCount++;\r\n }\r\n \r\n // close db\r\n $db->close();\r\n unset($db);\r\n \r\n // substract super user\r\n // --> production raspberry as user\r\n $usersCount = $usersCount;\r\n\r\n return $usersCount;\r\n}", "title": "" }, { "docid": "473093f86d259ae87c1abcc64ffbb188", "score": "0.40626392", "text": "public function getBuyers()\n {\n $user = getAPIUser();\n\n // Only Buyer User or Broker can access buyer records\n if (!($this->isCustomer() || ($this->isBroker() && $user->broker))) {\n ssAbort('Unauthorised', ERROR_CODE_UNAUTHORIZED);\n }\n\n $buyers = null;\n\n if ($this->isCustomer()) {\n $buyers = $user->buyers;\n } else if ($this->isBroker() && $user->broker) {\n $buyers = $user->broker->buyers;\n }\n\n loadObjects($buyers, [\n 'individual',\n 'company',\n 'officers',\n 'primary_address',\n 'mailing_address',\n 'email_contact',\n 'phone1_contact',\n 'phone2_contact',\n 'documents',\n 'lawyers',\n ]);\n\n $data = [\n \"buyers\" => $buyers,\n ];\n\n return SSResponse::getJsonResponse(true, ERROR_CODE_SUCCESS, $data);\n }", "title": "" }, { "docid": "281181c2e6d39144474635a25ead3333", "score": "0.4061587", "text": "public function singleProductsOwnersOtherProducts()\n {\n $productId = $_GET['productId'];\n $result = $this->db->query(\"SELECT * FROM products AS p1, Products AS p2 WHERE p1.idproducts= $productId AND p1.commercial_user_idcommercial_user=p2.commercial_user_idcommercial_user LIMIT 6\")->fetchAll(PDO::FETCH_ASSOC);\n return json_encode($result);\n }", "title": "" }, { "docid": "48ef4f53387bfe687e1bc76319ebf0df", "score": "0.40596688", "text": "public function getActiveusers(Request $request)\n {\n $users = User::get(); //Isdoctor()->\n if (is_object($users)) {\n return response()->json([\"users\" => $users, \"message\" => \"Active Users collected successfuly\", 'success' => true], 200);\n } else {\n return response()->json(['User' => 'No Users in our Database', 'success' => false, 'message' => 'No User in our Database'], 201);\n }\n }", "title": "" }, { "docid": "5bdb521ac661556d5853daadff83d0c9", "score": "0.4058687", "text": "public function countActivedOffers($user)\n {\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT COUNT(o.id_of) AS allOffers\n FROM AdItemsBundle:AdsOffers ao\n JOIN ao.offers_id_of o\n JOIN ao.ads_id_ad a\n WHERE o.offerAuthor = :user AND a.adState = 1\n ORDER BY ao.addedDate DESC\")\n ->setParameter('user', $user); \n $row = $query->getResult();\n return (int)$row[0]['allOffers'];\n }", "title": "" }, { "docid": "237e6f2061f28cb2a6cb6f21a0635bee", "score": "0.40540832", "text": "protected function showCandidatesAction()\n\t{\n\t\tif($this->isPost())\n\t\t{\n\t\t\t$this->manageCadidates($this->getParam(\"receipt\"), $this->getParam(\"refuse\"), $this->getParam(\"users\"));\n\t\t}\n\t\tif($this->getRights(array(\"CAN_SEE_APPLICATIONS\")))\n\t\t{\n\t\t\t$apps = array();\n\t\t\t$result = Core::getQuery()->select(\"allyapplication a\", array(\"a.userid\", \"a.date\", \"a.application \", \"u.username\", \"u.points\", \"g.galaxy\", \"g.system\", \"g.position\"), \"LEFT JOIN \".PREFIX.\"user u ON (u.userid = a.userid) LEFT JOIN \".PREFIX.\"galaxy g ON (g.planetid = u.hp)\", Core::getDB()->quoteInto(\"a.aid = ?\", $this->aid), \"u.username ASC, a.date ASC\");\n\t\t\tforeach($result->fetchAll() as $row)\n\t\t\t{\n\t\t\t\t$apps[$row[\"userid\"]][\"date\"] = Date::timeToString(1, $row[\"date\"]);\n\t\t\t\t$apps[$row[\"userid\"]][\"message\"] = Link::get(\"game/\".SID.\"/MSG/Write/\".$row[\"username\"], Image::getImage(\"pm.gif\", Core::getLanguage()->getItem(\"WRITE_MESSAGE\")));\n\t\t\t\t$apps[$row[\"userid\"]][\"apptext\"] = nl2br($row[\"application\"]);\n\t\t\t\t$apps[$row[\"userid\"]][\"userid\"] = $row[\"userid\"];\n\t\t\t\t$apps[$row[\"userid\"]][\"username\"] = $row[\"username\"];\n\t\t\t\t$apps[$row[\"userid\"]][\"points\"] = fNumber(floor($row[\"points\"]));\n\t\t\t\t$apps[$row[\"userid\"]][\"position\"] = getCoordLink($row[\"galaxy\"], $row[\"system\"], $row[\"position\"]);\n\t\t\t}\n\t\t\tCore::getTPL()->assign(\"candidates\", sprintf(Core::getLanguage()->getItem(\"CANDIDATES\"), $result->rowCount()));\n\t\t\t$result->closeCursor();\n\t\t\tHook::event(\"ShowAllianceCandidates\", array(&$apps));\n\t\t\tCore::getTPL()->addLoop(\"applications\", $apps);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7f9041720b87e7dac1af1c4677aca495", "score": "0.40532708", "text": "public function getHousMealRegister($username, $term, $opt)\n {\n // Assemble the housing_app object\n $housing_app = new stdClass();\n $housing_app->plan_code = 'HOME';\n $housing_app->status_code = 'AC';\n $housing_app->status_date = '2007-02-20';\n\n // Assemble the room_assign object\n $room_assign = new stdClass();\n $room_assign->bldg_code = 'JTR';\n $room_assign->room_code = 02322;\n $room_assign->status_code = 'AC';\n $room_assign->status_date = '2008-01-14';\n\n // Assemble the meal_assign object\n $meal_assign = new stdClass();\n $meal_assign->plan_code = 1;\n $meal_assign->status_code = 'AC';\n $meal_assign->status_date = '2007-11-20';\n\n // Assemble the final object to be returned\n $hous_meal->housing_app = $housing_app;\n $hous_meal->room_assign = $room_assign;\n $hous_meal->meal_assign = $meal_assign;\n\n return $hous_meal;\n }", "title": "" }, { "docid": "a07ee655c6068bb31415dd428d0d01dc", "score": "0.40517944", "text": "public function getShopping($user_id) : object\n {\n $settings = Settings::first();\n $comprasID = DB::table($settings->prefijo_wp.'postmeta')\n ->select('post_id')\n ->where('meta_key', '=', '_customer_user')\n ->where('meta_value', '=', $user_id)\n ->get();\n return $comprasID;\n }", "title": "" }, { "docid": "fa3419a5d7abbf67577b3a975fab2ce5", "score": "0.4049597", "text": "function getSteamApps() {\n\n\t\t$params = array('key' => getSteamAPIKey(),\n\t\t\t\t\t\t'format' => 'json' );\n\t\t$reply = geturl( 'http://api.steampowered.com/ISteamApps/GetAppList/v0001/', $params );\n\t\t$details = json_decode($reply, true);\n\t\treturn $details['applist']['apps']['app'];\n\t}", "title": "" }, { "docid": "ab888a06941d585fe0fd1975203565ba", "score": "0.40411085", "text": "public function getAppByName($nome)\n {\n return $this->arrApps[ $nome ];\n }", "title": "" }, { "docid": "afd5bdeef7d46ab0c4f2b6a405cbd125", "score": "0.40398645", "text": "public static function getHotel($user) {\n\t\t$hotelUser = new HotelUser();\n\t\t$user->setTable(new User());\n\t\t$hotels = $user->findManyToManyRowset(\"Hotel\", \"HotelUser\", \"User\", 'Hotel', $hotelUser->select()->where(\"permission_id=?\", UserPermission::ADMIN));\n\t\tif (isset($hotels) && count($hotels) > 0) {\n\t\t\treturn $hotels[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "135f50d910b394df3f7688fdf3d6d4cd", "score": "0.4038021", "text": "public function getSelectedItem() {\n\t\tif ($this->get_selectedId() > 0) {\n\t\t\t$user = $this->itemsArr[$this->get_selectedId()];\n\t\t}\n\t\tif (! isset($user)) {\n\t\t\t$user = new tx_ptgsauserreg_user();\n\t\t}\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "cfd6ac7f278226539cf3861a6b9cfcd6", "score": "0.40330535", "text": "function give_purchase_total_of_user( $user = null ) {\n\n\t$backtrace = debug_backtrace();\n\n\t_give_deprecated_function( __FUNCTION__, '1.8.9', 'give_donation_total_of_user', $backtrace );\n\n\treturn give_donation_total_of_user( $user );\n}", "title": "" }, { "docid": "a5edf824403b5dfb241284accc5a6fa1", "score": "0.40329748", "text": "static function SearchAffisByContactName($name){\n $users = self::SearchUSERSByName($name);\n //creates an empty array to hold found affiliates\n $affi_array = [];\n //creates empty array to keep track of each affi ID, so we dont repeat affiliates\n $affi_ids = [];\n if ($users) {\n //iterates thru all the users\n foreach ($users as $user) {\n //grabs the affiliate asociated to the user\n $temp_affi = self::GetAffByUserID($user[0]);\n if ($temp_affi != false) {\n $temp_affi = self::arrayTranslator($temp_affi);\n //if the ID array has any results\n if (count($affi_ids)>0) {\n //creates a variable lock to indicated if there is a match\n $lock = false;\n //iterates thru all IDs in the ID array\n foreach ($affi_ids as $affi_id) {\n //if the ID in the array matches with the ID of the affiliate associate to the user\n if ($affi_id == $temp_affi[0]) {\n //set the lock to true preventing the affiliate from being added again to the Affiliate Array\n $lock = true;\n }\n }\n // if the lock has not been turned on, it pushed the affiliate to the Affi array\n if (!$lock) {\n array_push($affi_array, $temp_affi);\n array_push($affi_ids, $temp_affi[0]);\n }\n }else {\n //if the ID array is empty\n array_push($affi_array, $temp_affi);\n array_push($affi_ids, $temp_affi[0]);\n }\n }\n }\n }\n return $affi_array;\n //closeLink($stmt, $link);\n }", "title": "" }, { "docid": "92effe026f2074453b5b9b9aa002a465", "score": "0.4032238", "text": "function give_get_users_purchases( $user = 0, $number = 20, $pagination = false, $status = 'complete' ) {\n\n\t$backtrace = debug_backtrace();\n\n\t_give_deprecated_function( __FUNCTION__, '1.8.9', 'give_get_users_donations', $backtrace );\n\n\treturn give_get_users_donations( $user, $number, $pagination, $status );\n\n}", "title": "" }, { "docid": "ca7214e49efeea2508a3a48b3cbbda35", "score": "0.40313786", "text": "function findCurrentSaleFromUser($userId) {\n $queryString = \"SELECT \"\n . \"ElectronicItem.id as ElectronicItem_id, ElectronicSpecification_id, serialNumber, expiryForUser, \"\n . \"dimension, weight, modelNumber, brandName, hdSize, price, processorType, ramSize, cpuCores, batteryInfo, os, camera, touchScreen, ElectronicType_id, displaySize, image, \"\n . \"Sale.id as Sale_id, isComplete, timestamp, Sale.User_id as User_id \"\n . \"FROM ElectronicItem \"\n . \"JOIN Sale ON ElectronicItem.Sale_id = Sale.id \"\n . \"JOIN ElectronicSpecification ON ElectronicItem.ElectronicSpecification_id = ElectronicSpecification.id \"\n . \"WHERE Sale.User_id = \" . $userId;\n $saleData = $this->conn->directQuery($queryString);\n\n foreach ($saleData as $key => $value) {\n if ($saleData[$key]->isComplete) {\n unset($saleData[$key]);\n }\n }\n\n return $saleData;\n }", "title": "" }, { "docid": "13cf0e8d54b0c634a14c730f1e6918b2", "score": "0.40303823", "text": "function checkUser($user) {\n\t\t// Initializes the query to extract the selected license-code\n\t\t// associated records.\n\t\t$q = 'SELECT ' .\n\t\t\tUSERS_ID . ' AS ' . USERS_USER_ID . ',' .\n\t\t\tUSERS_FULL_NAME . ',' .\n\t\t\tUSERS_ADDRESS . ',' .\n\t\t\tUSERS_TOWN . ',' .\n\t\t\tUSERS_ZIP . ',' .\n\t\t\tUSERS_COUNTRY . ',' .\n\t\t\tUSERS_EMAIL . ',' .\n\t\t\tUSERS_PHONE . ',' .\n\t\t\tUSERS_VAT . ',' .\n\t\t\tUSERS_EXTRAS .\n\t\t\t\n\t\t\t' FROM ' . DB_TABLE_USERS . \n\t\t\t\t\n\t\t\t' WHERE ' . \n\t\t\t\tDB_TABLE_USERS . '.' . \n\t\t\t\tUSERS_LICENSE_CODE . '=\\'' . $user . '\\'';\n\t\t\t\n\t\tif($this->DEBUG == 1)\n\t\t\techo 'CheckLicenses->checkUser() query = ' . $q . '<br>';\n\t\t\n\t\t// Prepare the query and executes.\n\t\t$pdoStatement = $this->db->prepare($q);\n\t\t$pdoStatement->execute();\n\n\t\t$r = null;\n\n\t\t// If the query returned the record\n\t\tif( $row = $pdoStatement->fetch(PDO::FETCH_ASSOC) ) {\n\t\t\t// Loop on th fields array\n\t\t\tforeach ($this->userFieldList as $key) {\n $r[\"$key\"] = $row[\"$key\"];\n\t\t\t} // Loop on fields\n\t\t} // Record found\n\t\t\n\t\t$pdoStatement->closeCursor();\n\t\t\n\t\tif( $r == null )\n\t\t\t$r[USERS_USER_ID] = null;\n\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "5deeecb016bd3bb45d088996d0c9b780", "score": "0.40286377", "text": "public function applicant(){\n $applicants = Job::has('users')->where('user_id',auth()->user()->id)->get();\n return view('jobs.applicants',compact('applicants'));\n }", "title": "" }, { "docid": "3cd20ff7a77aa79db05bfef995ed94d5", "score": "0.40258095", "text": "public static function fetchFreeTrialsOfLoggedInUser() {\n $db= new Db();\n $userId = LibSession::get('userID');\n \n $result = $db->selectResult(\"Invoice I INNER JOIN \".$db->tablePrefix.\"InvoicePlan IP ON(I.nInvId= IP.nInvId)\n INNER JOIN \".$db->tablePrefix.\"ProductServices PS ON (IP.nServiceId= PS.nServiceId) \n INNER JOIN \".$db->tablePrefix.\"ProductLookup PL ON (PL.nPLId=I.nPLId)\",\n \"PS.vBillingInterval,PS.nBillingDuration,PL.vSubDomain,I.dGeneratedDate,PL.nPLId,PL.nStatus AS userdomainstatus\",\n \"I.vSubscriptionType = 'FREE' AND I.nUId=\".$userId.\" AND I.upgraded<>1 GROUP BY PL.nPLId ORDER BY I.nInvId DESC\");\n\n Logger::info($result);\n return $result;\n\n }", "title": "" }, { "docid": "88e001e984787fd41f1d4243bca493d1", "score": "0.40256375", "text": "public function dispApps(){\n\t\t$data = D('App')->getAppsList(20);\n\t\t\n\t\tif (!$data){\n\t\t\techo L('msg_no_installed_apps');\n\t\t\texit;\n\t\t}else{\n\t\t\t$ac = A('Admin/Administrator');\n\t\t\t$ac->pageKeyList = array('app_id', 'app_name', 'app_author', 'app_admin_entrance', 'app_version', 'app_desc','friendlydate','DOACTION');\n\t\t\t//$ac->searchKey = array('app_name');\n\t\t\t//$ac->searchPostUrl = U('Admin/Public/pluginAgent', array('plugin'=>'AppManager', 'act'=>'dispApps'));\n\t\t\t$ac->pageButton[] = array('title'=>'搜索','onclick'=>\"admin.fold('search_form')\");\n\n\t\t\treturn $ac->displayList($data);\n\t\t}\n\t}", "title": "" }, { "docid": "18bfd4ec916d4dab2bb1f35f1549d17d", "score": "0.40238458", "text": "private function getFree($quantity){\n $quotient = $quantity / $this->buyThreshold; \n return $quotient * $this->freeAmount;\n }", "title": "" }, { "docid": "faed810f8ad698ef1bbceda7dbb8ceb3", "score": "0.4022291", "text": "public function getUsesPerCustomer()\n {\n return $this->_get(self::KEY_USES_PER_CUSTOMER);\n }", "title": "" }, { "docid": "abad47cd9429e47df2ce2d46b1285b40", "score": "0.40201846", "text": "public function findLatestAppWithCertN($product_id=null){\n $product_id = (isset($product_id)) ? $product_id : $this->product_id;\n\n if (empty($product_id)){\n throw new Exception(\"cannot lookup app with blank product_id\");\n }\n $cert_n_list_str = implode(',', Certifications::getCertNRequiredList());\n //print \"product_id={$product_id} and cert_id in ($cert_n_list_str)\";\n $ca = CertificationApplications::model()\n ->publishable()\n //->most_recent() (appearently adding this named scopes causes sql error)\n ->with('requested_certifications')\n ->find(\"product_id={$product_id} and cert_id in ($cert_n_list_str)\"); // grab top of sorted list starting with most recently certified\n //->find(\"product_id=:product_id and cert in ($cert_n_list_str)\", array('product_id', $product_id)); // error with bound parameters\n\n \n return $ca;\n }", "title": "" }, { "docid": "0b72fc6071fceedf66fceec4f31482ed", "score": "0.4017007", "text": "public function fetch_buyer_auctions($userid = NULL){\n if(is_null($userid)){\n\n redirect();\n\n }\n //Fetch a specific item:\n else{\n $query = $this->db->query(\"SELECT * FROM products WHERE products.Buyer_id LIKE '$userid'\");\n }\n\n return $query->result();\n\n }", "title": "" } ]
dbeb56682dbf5704380899abb074d8de
get info on server process
[ { "docid": "8ba319ca0b8d83c54d14ba1ea3e09bdc", "score": "0.62222326", "text": "public function getprocess() {\n return 'getprocess() not implemented';\n }", "title": "" } ]
[ { "docid": "737e61e0ecbfbe07a8b3552928c691c3", "score": "0.77174485", "text": "public function getProcessInfo()\n {\n return $this->rpcClient->call('supervisor.getProcessInfo', array($this->processGroup.':'.$this->processName));\n }", "title": "" }, { "docid": "44863eb448f24a00c0f66302e176b8dd", "score": "0.6767988", "text": "public function getProcess();", "title": "" }, { "docid": "ab3aba01962aa44f6223a6d2cfcac9e0", "score": "0.6651748", "text": "function proc_get_status ($process) {}", "title": "" }, { "docid": "b16b83adb0a55cfb112812e685d5d5f8", "score": "0.65541595", "text": "public function getProcess(): string;", "title": "" }, { "docid": "5c8371a2588030c3411af0cc11d77d64", "score": "0.652128", "text": "public function getServerInfo();", "title": "" }, { "docid": "740156c64a869c3bd7dd2714ef8eb67c", "score": "0.6500411", "text": "public function getServerInfo () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getserverinfo'));\r\n\t}", "title": "" }, { "docid": "a7e9c49ad0409a26af238f5bcd935f77", "score": "0.64684427", "text": "private function getTaskServerStatus()\n {\n $result = '';\n\n $result .= '<pre>';\n\n $result .= 'Task Server Running Processes<br/>';\n\n $res = false;\n\n $semId = sem_get(8088);\n if ($semId) {\n if (sem_acquire($semId)) {\n $shmId = shm_attach(8088);\n if (shm_has_var($shmId, 8088)) {\n $res = shm_get_var($shmId, 8088);\n }\n\n shm_detach($shmId);\n }\n\n sem_release($semId);\n }\n\n if ($res !== false) {\n $result .= '<br/><br/>';\n\n $result .= \"Server start time: \" . date(DATE_RFC2822, $res['__info']['startTime']) . \"<br/>\";\n $result .= \"Server current time: \" . date(DATE_RFC2822, time()) . \"<br/>\";\n\n $res['__info'] = null;\n unset($res['__info']);\n\n $result .= '<br/><br/>';\n\n foreach ($res as $jobType => $jobs) {\n $result .= ucfirst($jobType) . ': ' . implode(' ', $jobs) . '<br/>';\n }\n\n $result .= '<br/><br/>';\n\n $result .= 'Scoreboard Key:<br/>';\n $result .= '\".\" Open slot with no process<br/>';\n $result .= '\"U\" Undefined status<br/>';\n $result .= '\"W\" Working process<br/>';\n $result .= '\"F\" Finishing process<br/>';\n $result .= '\"E\" Error in reading process stastus<br/>';\n\n $result .= '<br/><br/>';\n\n $result .= 'Extended info:<br/>';\n $result .= 'Not implemented at the moment<br/>';\n\n $result .= '<br/><br/>';\n } else {\n $result .= 'Couldn\\'t fetch the job status, please try again.<br/>';\n }\n\n $result .= '</pre>';\n\n return $result;\n }", "title": "" }, { "docid": "eda57d9f8dde74d28f62110d8d845275", "score": "0.6310972", "text": "function info_serverInfo() {\n\t\tif (!$sRead = $this->_fastcall(\"SI\")) return false;\n\t\t$sRead .= $this->_fastcall(\"GAPL\");\n\t\t$sRead = explode(\"\\r\\n\", $sRead);\n\t\t$sInfo = array();\n\t\tforeach ($sRead as $rLine) {\n\t\t\tif (strstr($rLine, \"=\")) {\n\t\t\t\t$match = explode(\"=\", trim($rLine), 2);\n\t\t\t\t$key = $match[0];\n\t\t\t\t$val = $match[1];\n\t\t\t\t$sInfo[$key] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $sInfo;\n\t}", "title": "" }, { "docid": "74b2a67f1b21d4517ba0f78aaf9807cb", "score": "0.62363607", "text": "public function getProcInfo(): string{\r\n $output = shell_exec(\"lscpu\");\r\n return $output;\r\n }", "title": "" }, { "docid": "d6353c4de39e3d5f83ccac95322270fe", "score": "0.6151412", "text": "public function getServerInfo()\n {\n return $this->getAttribute(\\PDO::ATTR_SERVER_INFO);\n }", "title": "" }, { "docid": "e1e518714ed0627e23dd604d22d7f4a5", "score": "0.60748976", "text": "abstract public function serverInfo() : array;", "title": "" }, { "docid": "4194504f456cc291cb2ff6fc4b3a8598", "score": "0.6067555", "text": "public function serverInfo()\n {\n \t\n \ttry{\n \n \t $this->client->call('ServerInfo');\n \n \t return $this->client;\n \t\n \t}catch (HttpException $e) {\n \t\n $e->getCode();\n \t echo $e->getMessage();\n\t}\n }", "title": "" }, { "docid": "4f60fd829f96866d12a4b404edc0c9bc", "score": "0.6066118", "text": "public function getServletInfo();", "title": "" }, { "docid": "648b9a651b63978bd043f0a0631dbd71", "score": "0.60643643", "text": "public function getInfo()\n {\n return curl_getinfo(self::$ch);\n }", "title": "" }, { "docid": "b03d861bc8a56e62c03a95f8c9214941", "score": "0.6050246", "text": "public function getInfo()\n {\n return $this->client->getinfo();\n }", "title": "" }, { "docid": "b7a4328473b060c3098cc43aeb1d7f8f", "score": "0.60361594", "text": "public function getInfo()\n {\n // if info cache is populated and connection is up, return cached info.\n if (isset($this->_info) && $this->isConnected()) {\n return $this->_info;\n }\n\n // run p4 info.\n $result = $this->run(\"info\");\n $this->_info = array();\n\n // gather all data (multiple arrays returned when connecting through broker).\n foreach ($result->getData() as $data) {\n $this->_info += $data;\n }\n\n return $this->_info;\n }", "title": "" }, { "docid": "7c632b0be4948c4c069c4198ac59238a", "score": "0.601697", "text": "public function get_server_variable_details() {\n\t\t\t\n\t\t\t$referer = (isset($_SERVER['HTTP_REFERER']))?$_SERVER['HTTP_REFERER']:'';\n\t\t\t\n\t\t\tif (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {\n\t\t\t\t$referer .= '?'.$_SERVER['QUERY_STRING'];\n\t\t\t}\n\t\t\t\n\t\t\t$server_r = '';\n\t\t\t$server_out = $_SERVER;\n\t\t\tforeach ($server_out as $key=>$val) {\n\t\t\t\t$server_r .= $key.' ::: '.$val.\"<br />\";\n\t\t\t}\n\t\t\t\n\t\t\t$additional_information = '\n\t\t\t\tServer: '.$_SERVER['SERVER_NAME'].\"<br />\".'\n\t\t\t\tURL: '.self::referer(true).\"<br />\".'\n\t\t\t\tReferer: '.$referer.\"<br />\".'\n\t\t\t\tServer Output: '.\"<br />\".$server_r.\"<br />\";\n\t\t\t\n\t\t\treturn $additional_information;\n\t\t}", "title": "" }, { "docid": "4c8fcd9cce4a9b4d171470b4a669783c", "score": "0.6011182", "text": "private function get_server_details(){\r\n\t\t$server_report = array();\r\n\t\t$server_report['hostname'] = gethostname();\r\n\t\t$server_report['ip'] = gethostbyname( $server_report['hostname'] );\r\n\t\t$server_report['php_version'] = PHP_VERSION;\r\n\t\treturn $server_report;\r\n\t}", "title": "" }, { "docid": "ae21bbb0a4d0d2a72f2723c4d5c91c95", "score": "0.5995808", "text": "function get_info() {\n\t\tpreg_match( '/^(nginx|Apache)\\/([0-9\\.]*).*$/', $_SERVER['SERVER_SOFTWARE'], $matches );\n\t\treturn $matches;\n\t}", "title": "" }, { "docid": "423635e6d04d741ec657128a0c82b341", "score": "0.59651613", "text": "public function getInfo()\r\n {\r\n return curl_getinfo($this->curl);\r\n }", "title": "" }, { "docid": "e73e2e173044e1bfa9d3dc5aa5119270", "score": "0.5948087", "text": "function _multisite_profile_get_process() {\n $key = $_COOKIE['multisite_process_key'];\n\n $process = db_select('multisite_process', 'mp')\n ->fields('mp')\n ->condition('private_key', $key)\n ->execute()\n ->fetchAssoc();\n\n return $process;\n}", "title": "" }, { "docid": "15b7c6d86f185b7d09fc0fc067f9ca0b", "score": "0.59275556", "text": "protected function info()\n {\n $this->osname = php_uname('s');\n $this->hostname = php_uname('n');\n $this->osrelease = php_uname('r');\n $this->osversion = php_uname('v');\n $this->ostype = php_uname('m');\n }", "title": "" }, { "docid": "a7b4394d69dba27b1fa635ff6f9f8c16", "score": "0.5889503", "text": "public function info()\r\n\t{\r\n\t\t$result = $this->client->call('app.info', array('state' => $this->client->getSecuritySignSalt()));\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.5871102", "text": "public function get_info();", "title": "" }, { "docid": "e31693b4abfeabb1eb939cf6fceb3873", "score": "0.58391255", "text": "public function info(){\n\t\t$oldCheckVersion = $this->setCheckVersion(false);\n\t\t$response = RR_Client::get($this->buildUrl('', 'info', []), [], $headers);\n\t\t$this->setCheckVersion($oldCheckVersion);\n\t\t$this->checkServerResponse($response, $headers);\n\t\treturn json_decode($response, true);\n\t}", "title": "" }, { "docid": "027157293458586c7cb295467dea7b05", "score": "0.5808583", "text": "function getSystemInfo();", "title": "" }, { "docid": "b8a07800c79a1481de9d108024d2bf16", "score": "0.57487035", "text": "function getServerInfo($type = null);", "title": "" }, { "docid": "163735a5689d8b83f248e96a23f4044a", "score": "0.5746645", "text": "protected function getServerInfo ()\n {\n if (empty($data)) {\n $path = $this->config['shadow']['instancePath'] . '/' . $_SERVER['SERVER_NAME'];\n if (is_dir($path) || is_link($path)) {\n $data = array(\n 'key' => $this->key,\n 'path' => $path,\n 'server' => $_SERVER['SERVER_NAME']\n );\n // apc_store($this->key, $data);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "b87537f0d31badb99961594868327d0b", "score": "0.5745304", "text": "public function getinfo() {\n\t\treturn $this->CI->jsonrpcclient->getinfo();\n\t}", "title": "" }, { "docid": "28fe338fa912d00e64f219f2ea136572", "score": "0.5730006", "text": "public static function process()\n {\n $data = ['action' => 'test_process', 'data' => [ 'id' => 123 ]];\n $result = self::execute($data);\n\n echo 'master:['.\\Swover\\Utils\\Worker::getMasterPid().'] current:['.posix_getpid().'-'.\\Swover\\Utils\\Worker::getChildStatus().']'\n .$result.PHP_EOL;\n }", "title": "" }, { "docid": "5598b67caf529d2580be125dd63b18da", "score": "0.5728347", "text": "function getRunningServerSystemProserver(): ?string\n{\n if (run('ps -acx|grep httpd|wc -l | tr -d \"[:space:]\"') > 0) {\n return 'apache';\n }\n\n if (run('ps -acx|grep nginx|wc -l | tr -d \"[:space:]\"') > 0) {\n return 'nginx';\n }\n\n return null;\n}", "title": "" }, { "docid": "75c3c4a24b31592995c457a654ddf57b", "score": "0.5697577", "text": "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.567232", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.567232", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.567232", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.567232", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "1827ad05cdffa2ee53c3831bde5154ca", "score": "0.56561685", "text": "public function getProcessingInfo()\n {\n return $this->processing_info;\n }", "title": "" }, { "docid": "b88aef859cc01a82f937bc6235b0e363", "score": "0.5637864", "text": "function db_get_server_info()\n \t{\n\t \treturn ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->db_connection) : FALSE );\n\t}", "title": "" }, { "docid": "01c546bbeefa9c5b0043636631589b6d", "score": "0.56302863", "text": "public function systemInfo()\n {\n $system = [];\n\n // Execution time\n $system['Execution time'] = sprintf('%.4f', microtime(true) - Pi::startTime()) . ' s';\n\n // Included file count\n $files_included = get_included_files();\n $system['Included files'] = count($files_included) . ' files';\n\n // Memory usage\n $memory = 0;\n if (function_exists('memory_get_usage')) {\n $memory = memory_get_usage();\n if (function_exists('memory_get_peak_usage')) {\n $memory .= '; peak: ' . memory_get_peak_usage();\n }\n $memory .= ' bytes';\n } else {\n // Windows system\n if (strpos(strtolower(PHP_OS), 'win') !== false) {\n $out = [];\n exec('tasklist /FI \"PID eq ' . getmypid() . '\" /FO LIST', $out);\n $memory = substr($out[5], strpos($out[5], ':') + 1);\n }\n }\n $system['Memory usage'] = $memory ?: 'Not detected';\n\n // Sstem environments\n $system['OS'] = PHP_OS ?: 'Not detected';\n\n // PHP_SAPI ?: 'Not detected';\n $system['Web Server'] = $_SERVER['SERVER_SOFTWARE'];\n $system['PHP Version'] = PHP_VERSION;\n\n // MySQL version\n if (Pi::service()->hasService('database')) {\n $pdo = Pi::Service('database')->db()->getAdapter()->getDriver()->getConnection()->connect()->getResource();\n $server_version = $pdo->getAttribute(PDO::ATTR_SERVER_VERSION);\n $client_version = $pdo->getAttribute(PDO::ATTR_CLIENT_VERSION);\n\n $system['MySQL Version'] = sprintf(\n 'Server: %s; Client: %s',\n $server_version,\n $client_version\n );\n }\n\n // Application versions\n $system['Pi Version'] = PiVersion::version();\n $system['Pi Environment'] = Pi::environment();\n $system['Persist Engine'] = Pi::persist()->getType();\n\n if (Pi::service()->hasService('cache')) {\n $class = get_class(Pi::service('cache')->storage());\n $system['Cache Storage'] = $class;\n }\n\n if (Pi::service()->hasService('module')) {\n $system['Module'] = Pi::service('module')->current() ?: 'N/A';\n }\n\n if (Pi::service()->hasService('theme')) {\n $system['Theme'] = Pi::service('theme')->current();\n }\n\n // Affecting PHP's Behaviour\n // See: http://www.php.net/manual/en/refs.basic.php.php\n $extensions = [];\n\n // APC\n $APCEnabled = ini_get('apc.enabled');\n if (PHP_SAPI == 'cli') {\n $APCEnabled = $APCEnabled && (bool)ini_get('apc.enable_cli');\n }\n if ($APCEnabled) {\n $extensions[] = 'APC: ' . phpversion('apc');\n }\n\n // APD\n if (function_exists('apd_set_pprof_trace')) {\n $extensions[] = 'APD: ' . APD_VERSION;\n }\n\n // XHProf\n if (function_exists('xhprof_enable')) {\n $extensions[] = 'XHProf';\n }\n\n // Xdebug\n if (extension_loaded('xdebug')) {\n $extensions[] = 'Xdebug';\n }\n\n // Intl\n if (extension_loaded('intl')) {\n $extensions[] = 'Intl';\n }\n\n // cURL\n if (function_exists('curl_exec')) {\n $extensions[] = 'cURL';\n }\n\n // Redis\n if (extension_loaded('redis')) {\n $extensions[] = 'Redis';\n }\n\n // Make list\n if (!empty($extensions)) {\n $system['Extensions'] = implode('; ', $extensions);\n }\n\n foreach ($system as $key => $value) {\n $event = [\n 'name' => $key,\n 'value' => $value,\n ];\n\n $this->logger['system'][] = $this->systemInfoFormatter()->format($event);\n }\n }", "title": "" }, { "docid": "c9e4128b8dc9a80c565ae9d5ba0edad5", "score": "0.5614361", "text": "public function getMonitorInfo() {\r\n\t\t$monitor_info = mysql_query(\"SELECT * FROM monitor_info\") or die(mysql_error());\r\n\t\treturn $monitor_info;\r\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55953926", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "0df885a647aaa295aa1e32e4992b0c49", "score": "0.55941105", "text": "public static function getInstanceInfo()\n {\n\n if ( is_null( self::getInstanceId() ) )\n return null;\n\n //TODO: optimize array keys length\n $info = array();\n $info['id'] = (int)self::$_instance['instanceid'];\n $info['active'] = (bool)self::$_instance['active'];\n $info['name'] = Output::encode( strip_tags( self::$_instance['name'] ) );\n $info['maxshouts'] = (int)self::$_instance['options']['maxshouts'];\n $info['floodchecktime'] = (int)self::$_instance['options']['floodchecktime'];\n $info['maxchars'] = (int)self::$_instance['options']['maxchars'];\n $info['maximages'] = (int)self::$_instance['options']['maximages'];\n $info['idletimeout'] = (int)self::$_instance['options']['idletimeout'];\n $info['refresh'] = (int)self::$_instance['options']['refresh'];\n $info['enablepms'] = (bool)self::$_instance['options']['enablepms'];\n $info['enablepmnotifs'] = (bool)self::$_instance['options']['enablepmnotifs'];\n $info['enablesysmsg'] = (bool)self::$_instance['options']['enable_sysmsg'];\n\n return $info;\n }", "title": "" }, { "docid": "8f3e68f9c66c68814ec31356343554e0", "score": "0.5590532", "text": "public function getInfo()\n {\n return $this->_info;\n }", "title": "" }, { "docid": "8f3e68f9c66c68814ec31356343554e0", "score": "0.5590532", "text": "public function getInfo()\n {\n return $this->_info;\n }", "title": "" }, { "docid": "156bc9e36e53125bb0cde50dd99f8351", "score": "0.55818266", "text": "public function show(Process $process)\n {\n //\n }", "title": "" }, { "docid": "3fba088e5dbbf0017bd8b60d0000e3c4", "score": "0.55805933", "text": "function dumpServer()\n// -----------------------\n{\n echo \"<br>------------------<br>\";\n echo \"<pre>\";\n echo \"<br>_SERVER Array<br>\";\n print_r($_SERVER);\n echo \"</pre>\";\n}", "title": "" }, { "docid": "885845221cea67d230b68b3250859fe3", "score": "0.5562256", "text": "public function info(){\n\t\treturn $this->_info;\n\t}", "title": "" }, { "docid": "19b316f4705602fb4865a91ed41f4e8c", "score": "0.5560703", "text": "public function status()\n {\n //extract IP and Host info\n return array_merge(['ip'=>trim($this->cat()->master(['h'=>['ip']])),\n 'host'=>trim($this->cat()->master(['h'=>['host']]))],\n $this->info());\n }", "title": "" }, { "docid": "fd35be678120d41d66688db527930233", "score": "0.55566406", "text": "function getmypid () {}", "title": "" }, { "docid": "22dd145e1b285470a2bff8c98787c3ab", "score": "0.55480915", "text": "public function getInfo()\n {\n return $this->_info;\n }", "title": "" }, { "docid": "920928e933cbd5671501924b5a996cf2", "score": "0.5538216", "text": "public function getInfo()\n {\n return $this->_info;\n }", "title": "" }, { "docid": "5d8c8ce0a00a2e916eb3db56ab5cb804", "score": "0.55362654", "text": "private function retExecInfo($pid, $sid, $getBtime) {\n return array(\"pid\" => $pid, \"sid\" => $sid, \"btime\" => $getBtime);\n }", "title": "" }, { "docid": "cddb44091b90669a5bcb20f3d37a27bc", "score": "0.55359954", "text": "public function getMempoolInfo(): string\n {\n return $this->callRpc('getmempoolinfo');\n }", "title": "" }, { "docid": "487e2d3f03b491511539b0937274dca3", "score": "0.552318", "text": "public function info(){}", "title": "" }, { "docid": "5da5c529601c33507c6912cc971c86ae", "score": "0.5521015", "text": "public function module_info() {\n\n $modules_system = new \\Inside4\\InsideTools\\InsideModularSystem;\n\n $modules_system->db =& $this->db;\n $modules_system->view =& $this->view;\n echo $modules_system->module_info($this->input->get_secure('system_name'));\n }", "title": "" }, { "docid": "ccd9e12d76787b067466030f0753f847", "score": "0.55158013", "text": "abstract protected function getInfo();", "title": "" }, { "docid": "8b83bb94d36036e6fad84047e4c473e4", "score": "0.5515355", "text": "function php_sapi_name () {}", "title": "" }, { "docid": "9146cd189be4003b91b8b6c13f0c0214", "score": "0.55127347", "text": "public function info()\n {\n return $this->_info;\n }", "title": "" }, { "docid": "355cbf39be9a9d7496283eea3be27f8f", "score": "0.55112326", "text": "public function currentProcess()\n {\n // TODO: Implement currentProcess() method.\n }", "title": "" }, { "docid": "25bf420817e083cfef703c203d31738d", "score": "0.5502508", "text": "private function collectData()\n {\n // if we're on a windows box, or we've already collected data, bail early\n if (stripos(php_uname('s'), 'Windows') !== false || isset($this->systemInfo['uname'])) {\n return $this->systemInfo;\n }\n\n // collect all the data we can, based on what commands are available\n $this->systemInfo['uname'] = php_uname('a');\n $this->systemInfo['disk'] = $this->collect('df', '-h');\n $this->systemInfo['date'] = $this->collect('date', '++\"%Y-%m-%d %H:%m:%S[%z/%Z]\"');\n\n if (stripos(php_uname('s'), 'Linux')) {\n // Linux distributions\n $this->systemInfo['process'] = $this->collect(\n 'top',\n '-bn1',\n function ($line) {\n return preg_match('/(top|tasks|mem|cpu|\\s*pid)|apache|httpd/i', $line);\n }\n );\n } else {\n // BSD variants, including OSX (Darwin)\n $this->systemInfo['process'] = $this->collect(\n 'top',\n '-l1',\n function ($line) {\n return preg_match('/(load avg|cpu|physmem|vm|disks|\\s*pid)|apache|httpd/i', $line);\n }\n );\n }\n\n return $this->systemInfo;\n }", "title": "" }, { "docid": "298599eacd8e1f8ba4b86df6beeab9cc", "score": "0.5497837", "text": "public function getInfo(){\n return $this->info;\n }", "title": "" }, { "docid": "d52a71c7dd30d715201aadea18b045dc", "score": "0.54929626", "text": "public function getAllProcesses () {\n return $this->api->getAllProcesses();\n }", "title": "" }, { "docid": "555d444006c4de71601a46d34593916c", "score": "0.5491113", "text": "static function getInfo()\n {\n if (!self::isExtensionInstalled()){\n return array ();\n }\n return pinba_get_info();\n }", "title": "" }, { "docid": "2d327118bb50bb324578244b3cbfd812", "score": "0.5489535", "text": "public final function getProcessName()\n {\n }", "title": "" }, { "docid": "2d327118bb50bb324578244b3cbfd812", "score": "0.5489535", "text": "public final function getProcessName()\n {\n }", "title": "" }, { "docid": "f7153aa63ac6d81c7ae409459b957e68", "score": "0.5479102", "text": "public function info()\n {\n return $this->info;\n }", "title": "" }, { "docid": "f7153aa63ac6d81c7ae409459b957e68", "score": "0.5479102", "text": "public function info()\n {\n return $this->info;\n }", "title": "" }, { "docid": "c758c17f1b4624fe1dae18c8fbedb8cb", "score": "0.54739606", "text": "abstract public function info();", "title": "" }, { "docid": "c758c17f1b4624fe1dae18c8fbedb8cb", "score": "0.54739606", "text": "abstract public function info();", "title": "" }, { "docid": "d9bb14a009cc3976961d3a8ed7084cf4", "score": "0.5466961", "text": "function info_globalInfo() {\n\t\tif (!$sRead = $this->_fastcall(\"GI\")) return false;\n\t\t$sRead = explode(\"\\r\\n\", $sRead);\n\t\t$sInfo = array();\n\t\tforeach ($sRead as $line) {\n\t\t\tif (preg_match('/([a-z_]+)=(.*)/', $line, $match)) {\n\t\t\t\t$key = $match[1];\n\t\t\t\t$val = $match[2];\n\t\t\t\t$sInfo[$key] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $sInfo;\n\t}", "title": "" }, { "docid": "c8af37d4b3fd88e2bf51be4cb7721dde", "score": "0.5456688", "text": "public function getInfo()\n {\n $rest_client = new RESTClient($this->server_key, $this->secret_key);\n $response = $rest_client->post('getInfo');\n if($response['success'] == 0){\n $response = $rest_client->post('getInfo');\n }\n return $response;\n }", "title": "" }, { "docid": "ba199d2c48679704e2245821b432ad66", "score": "0.5453127", "text": "function server_status(){\n\t\t\n\t}", "title": "" }, { "docid": "3362376db1f52ee82c33b8772126a9e9", "score": "0.5448775", "text": "public function getProcessInstanceId(): ?string;", "title": "" }, { "docid": "3362376db1f52ee82c33b8772126a9e9", "score": "0.5448775", "text": "public function getProcessInstanceId(): ?string;", "title": "" }, { "docid": "3362376db1f52ee82c33b8772126a9e9", "score": "0.5448775", "text": "public function getProcessInstanceId(): ?string;", "title": "" }, { "docid": "e5e596ab19400d6631a5fd5c1b879f82", "score": "0.5442913", "text": "public function info()\n {\n return $this->client->get('/')->response();\n }", "title": "" }, { "docid": "047c3c88e0e3bd7fd20d1ef16e7e2363", "score": "0.54386973", "text": "public function serverInfo()\n {\n if ($this->mLink === null) {\n return '';\n }\n\n $result = $this->mLink->getAttribute(PDO::ATTR_SERVER_VERSION);\n\n return $result;\n }", "title": "" }, { "docid": "0cdac91410a3eafd3da93c5181de7266", "score": "0.5422415", "text": "function getServer(){\n\t\treturn $this->server;\n\t}", "title": "" }, { "docid": "fe04b755cef887c6bd6d81cb7d441e05", "score": "0.5408612", "text": "public function getServletInfo()\n {\n return $this->servletInfo;\n }", "title": "" }, { "docid": "dfd3484124cf3899a58ec4b7c4c52f67", "score": "0.5397552", "text": "function tep_get_system_information() {\n global $HTTP_SERVER_VARS;\n\n $db_query = tep_db_query(\"select now() as datetime\");\n $db = tep_db_fetch_array($db_query);\n\n list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n return array('date' => tep_datetime_short(date('Y-m-d H:i:s')),\n 'system' => $system,\n 'kernel' => $kernel,\n 'host' => $host,\n 'ip' => gethostbyname($host),\n 'uptime' => @exec('uptime'),\n 'http_server' => $HTTP_SERVER_VARS['SERVER_SOFTWARE'],\n 'php' => PHP_VERSION,\n 'zend' => (function_exists('zend_version') ? zend_version() : ''),\n 'db_server' => DB_SERVER,\n 'db_ip' => gethostbyname(DB_SERVER),\n 'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),\n 'db_date' => tep_datetime_short($db['datetime']));\n }", "title": "" }, { "docid": "6a16120f039c15d296368f494c4ea40b", "score": "0.5397463", "text": "public function getSAPI() : string{\r\n return php_sapi_name();\r\n }", "title": "" }, { "docid": "954718207ed6101418350631af979bb9", "score": "0.53944916", "text": "public function status()\n {\n $command = 'ps -p '.$this->pid;\n exec($command,$op);\n //var_dump($op);\n if (!isset($op[1]))return false;\n else return true;\n }", "title": "" }, { "docid": "6d3d325266dcd3c0b0e65980e0d7b58f", "score": "0.5390516", "text": "public function getServerPid()\n {\n $value = $this->get(self::SERVER_PID);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "06ce9de63ac8c56aa09e409660606f1c", "score": "0.5387418", "text": "function iitems_catcher_getmoduleinfo(){\n\t$info=array(\n\t\t\"name\"=>\"IItems - Catcher Script\",\n\t\t\"version\"=>\"2009-06-14\",\n\t\t\"author\"=>\"Dan Hall, aka Caveman Joe, improbableisland.com\",\n\t\t\"category\"=>\"IItems\",\n\t\t\"download\"=>\"\",\n\t);\n\treturn $info;\n}", "title": "" }, { "docid": "bc1ea23ef2e3f9c5d0661c9f76cd2b74", "score": "0.5384454", "text": "public function getInfo($key = null)\n\t{\n\n\t\t// If $key is null:\n\t\tif ($key === null) {\n\n\t\t\treturn curl_getinfo($this->handle);\n\n\t\t// Else:\n\t\t} else {\n\n\t\t\treturn curl_getinfo($this->handle, $key);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ce0eba1834de8ea74350ee111df67696", "score": "0.5376203", "text": "public function infoAction()\n {\n /* Disable the view renderer and layout. */\n $this->_helper->viewRenderer->setNoRender();\n $this->_helper->layout()->disableLayout();\n\n $id = $this->_request->getParam('id', '0');\n\n $client = Sahara_Soap::getSchedServerQueuerClient();\n $resp = $client->checkPermissionAvailability(array('permissionID' => $id));\n\n if ($resp->queuedResource->type == 'NOTFOUND')\n {\n $this->_logger->info(\"Permission with ID $id not found on Scheduling Server.\");\n }\n\n /* Add a count of number of free resources. */\n $resp->numberFree = 0;\n if (count($resp->queueTarget) > 1 && $resp->queueTarget[1] instanceof stdClass)\n {\n /* Multiple queue targets. */\n foreach ($resp->queueTarget as $t)\n {\n if ($t->isFree) $resp->numberFree++;\n }\n }\n else if (count($resp->queueTarget))\n {\n /* One queue target (quirk in PHPSoap). */\n if ($resp->queueTarget->isFree) $resp->numberFree = 1;\n }\n\n echo $this->view->json($resp);\n }", "title": "" }, { "docid": "7a583afc6d085f4c33d84bb8c8552315", "score": "0.5373493", "text": "public function getInfoInstance();", "title": "" }, { "docid": "6fbad24f60286684b43413c6217664aa", "score": "0.536435", "text": "function getServerInfo( $i ) {\n\t\tif ( isset( $this->mServers[$i] ) ) {\n\t\t\treturn $this->mServers[$i];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "6febd3d8c68e284e68d1f5b8c3c97e11", "score": "0.53641397", "text": "public function getInfo()\n {\n return isset($this->response['info']) ? $this->response['info'] : false;\n }", "title": "" }, { "docid": "64d3cba7183c7aba4c15ab2a2388c06b", "score": "0.5360523", "text": "public function getServer(){\n\t\treturn $this->getHeaderField('server');\n\t}", "title": "" }, { "docid": "64d3cba7183c7aba4c15ab2a2388c06b", "score": "0.5360523", "text": "public function getServer(){\n\t\treturn $this->getHeaderField('server');\n\t}", "title": "" }, { "docid": "008d36b07b1b06e874a2a9c4afd089a5", "score": "0.5357498", "text": "public static function info($filename)\n\t{\n\t\t$cmd = \"sox --i $filename\";\n\t\terror_log('concatenate cmd: '.$cmd);\n\t\t\n\t\treturn exec($cmd);\n\t}", "title": "" }, { "docid": "e0b9fddb1877edd79480a00b219d6979", "score": "0.53397596", "text": "public function GetBasicInfo()\n {\n return $this->request_handler->execute('get_basic_info');\n }", "title": "" } ]
e33fe38ffb8ef43f3395764b140c0658
/ Function: setDefaultLimit This sets the standard number of records to be pulled out during a paginated query.
[ { "docid": "e106015bd89d324b3b72beff6a5a95e8", "score": "0.73224014", "text": "static function setDefaultLimit( $limit ){\n\t\t\tself::$defaultMysqlLimit = $limit;\n\t\t}", "title": "" } ]
[ { "docid": "f2426ce392f96673236f5f3861e84f78", "score": "0.77279615", "text": "public static function setDefaultResultSetLimit($limit)\n {\n self::$_defaultResultSetLimit = (int) $limit;\n }", "title": "" }, { "docid": "0fa2e8d128bb62402097e6f9a1ed6254", "score": "0.75765514", "text": "protected function getDefaultPageSize()\n {\n return 10;\n }", "title": "" }, { "docid": "6a0be6d70bc0e925a796e45b46eca5a8", "score": "0.74615", "text": "public function defaultLimit()\n {\n return $this->limit( (new SQL_Settings())->selectLimit() );\n }", "title": "" }, { "docid": "ec91cc10701c652ba609d24a109285e1", "score": "0.72474784", "text": "public function getPageLimit();", "title": "" }, { "docid": "b76e1ead6cf21d53905c2f7573f6d3d7", "score": "0.72217226", "text": "protected function defaultPaginationLength()\n {\n return 15;\n }", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.72193754", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.72193754", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.72193754", "text": "public function setLimit($limit);", "title": "" }, { "docid": "64f4d5d8294c7883acb349d381ebe7ba", "score": "0.7216122", "text": "protected function filterLimit()\n {\n\n // Set the paging offset on the result.\n $start = isset($this->params['start']) ? $this->params['start'] : 0;\n $this->result['start'] = $start;\n\n // If passed, apply the limit.\n if (isset($this->params['limit'])) {\n $this->select->limit($this->params['limit'], $start);\n }\n\n }", "title": "" }, { "docid": "3debd73f6696553c4aa22bc006886167", "score": "0.7054142", "text": "public function setLimit(int $limit);", "title": "" }, { "docid": "7f6431aa9f3cbb8af01ef8a6d7914658", "score": "0.700098", "text": "public function setLimitPerPage($limitPerPage);", "title": "" }, { "docid": "afab91961568056f3dadf73422a6e81c", "score": "0.69983107", "text": "function set_Limit($limit=5)\n\t\t\t{\n\t\t\t $this->limit = $limit;\n\t\t\t\t\t$this->setBasePage();\n\t\t\t\t\t$this->setExtraPage();\n\t\t\t}", "title": "" }, { "docid": "341a92c24969b390e35840246489a3fe", "score": "0.6938586", "text": "public function testDefaultLimit() {\n $model = new Model('test', self::$db);\n $model->setDefaultLimit(3);\n\n $this->assertSame(3, count($model->get([])));\n $this->assertSame(3, $model->query([])->rowCount());\n }", "title": "" }, { "docid": "7301839311a40480d9c7f16a9bbd3757", "score": "0.69330174", "text": "public function setDefaultLimit($defaultLimit)\n {\n if ((bool)$this->response) {\n throw new \\LogicException('There is already a response, call setDefaultLimit() before calling search()');\n }\n\n $this->defaultLimit = $defaultLimit;\n }", "title": "" }, { "docid": "b3c7e95df4fe78911f19adff236ac4c5", "score": "0.69062483", "text": "public function setLimit($limit) {\r\n\t$this->parseQuery->setLimit($limit);\r\n }", "title": "" }, { "docid": "d130e906e086d541d39a6b656d90ca04", "score": "0.6861848", "text": "public function limit($limit, $offset = 0);", "title": "" }, { "docid": "ff3889144665426fc3f8d520e1fec9d3", "score": "0.6840745", "text": "public function setLimit($limit){\n $this->limit = $limit;\n }", "title": "" }, { "docid": "cd748b6a66951dc3591308d3f8890467", "score": "0.6810367", "text": "function setLimit($limit){\n\t\t$this->limit = $limit;\n\t}", "title": "" }, { "docid": "cd748b6a66951dc3591308d3f8890467", "score": "0.6810367", "text": "function setLimit($limit){\n\t\t$this->limit = $limit;\n\t}", "title": "" }, { "docid": "a340446f40ba615c63f380715fd9e6a1", "score": "0.6804138", "text": "public function getLimitPerPage();", "title": "" }, { "docid": "b93897a51ee8b26bdaffeac4e0c9fff4", "score": "0.6797417", "text": "public function setLimit($value);", "title": "" }, { "docid": "01b1d3db0ab8b4df145db10fd03b85ef", "score": "0.6744703", "text": "public function Set_Limit($limit = 1){\n $this->_data_array['results'] = $limit;\n return $this;\n }", "title": "" }, { "docid": "1cd5e4f9b9ef77ca12b18c539e07cacb", "score": "0.67432314", "text": "public function setLimit($limit) {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "d922698e8e67aa8ac174e2720b1605b8", "score": "0.66972435", "text": "function setLimit($no) {\r\n\t\t\t$this->limit=$no;\r\n\t\t}", "title": "" }, { "docid": "d4bd4a423f1205645c90bcd57bafa276", "score": "0.6692533", "text": "public function default_limit($default_limit)\n\t{\n\t\t$this->default_limit = $default_limit;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.66756636", "text": "public function limit($limit);", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.66756636", "text": "public function limit($limit);", "title": "" }, { "docid": "ea3e66a1dfe4840678087609a395f889", "score": "0.66649765", "text": "public function setLimit($limit) {\n $this->limit = $limit ?: NULL;\n }", "title": "" }, { "docid": "ea3e66a1dfe4840678087609a395f889", "score": "0.66649765", "text": "public function setLimit($limit) {\n $this->limit = $limit ?: NULL;\n }", "title": "" }, { "docid": "6310a22241f6d4eee2a5222f48e491e2", "score": "0.6623845", "text": "private function getDefaultPageNumber()\n {\n return 25;\n }", "title": "" }, { "docid": "cc72e2b7a750675ae92371ebd6d0d299", "score": "0.6610737", "text": "public function limit($num) {}", "title": "" }, { "docid": "afc63b0349e355b14b3699de5eb8e59f", "score": "0.6595655", "text": "public static function setResultSetLimit($limit)\n {\n Zend_Search_Lucene::setResultSetLimit($limit);\n }", "title": "" }, { "docid": "e5d87b1c09b6ed66439734a268e8098d", "score": "0.65811175", "text": "public function paginate($limit = 15);", "title": "" }, { "docid": "e5d87b1c09b6ed66439734a268e8098d", "score": "0.65811175", "text": "public function paginate($limit = 15);", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.65805733", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.65805733", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.65805733", "text": "public function getLimit();", "title": "" }, { "docid": "5c7949ffadaa5061fbc8ad95ea0bfc8d", "score": "0.6551446", "text": "public function limitBy($limit, $offset = NULL);", "title": "" }, { "docid": "bb7f7353486ea61efb903eea69395e0c", "score": "0.6540674", "text": "public function setLimit( $limit ) {\n\t\t$this->limit = (int)$limit;\n\t}", "title": "" }, { "docid": "91862cf951547d088cb997dc49a68a83", "score": "0.6535443", "text": "public function set_limit($limit)\n\t{\n\t\t$this->limit = $limit;\n\t}", "title": "" }, { "docid": "422fb94ce68fa500556a1bb69b5db03c", "score": "0.65307343", "text": "public function setLimit(int $limit): static;", "title": "" }, { "docid": "f4d4f3510b37232e12503c1f0e344889", "score": "0.6524092", "text": "public function setLimit(int $limit) {\n\t\t$this->setSize($limit);\n\t}", "title": "" }, { "docid": "5d73bc58ed49e09768c755d947ef57da", "score": "0.6514538", "text": "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n }", "title": "" }, { "docid": "f6d832dbbf2c6dea160fe3b005aad1b7", "score": "0.6497277", "text": "public function limit($limit)\n {\n }", "title": "" }, { "docid": "edaa07ad259907794a6ea6e2971be75b", "score": "0.6492929", "text": "function setManualPagenateMode() {if ($this->size_limit >=0) $this->size_limit =-$this->size_limit;}", "title": "" }, { "docid": "cbf55d6ec017d0f9d7fcd04a82147475", "score": "0.6484645", "text": "function set_limit(){\n\t\t$this->once_page_limit('mailbox');\n\t\treturn $this->once_response();\n\t}", "title": "" }, { "docid": "9d216edc2f57114b0e8f81a2696a1e1f", "score": "0.6446608", "text": "public static function setDefaultItemCountPerPage($count)\n {\n if ((int) $count > 0) {\n static::$defaultItemCountPerPage = (int) $count;\n }\n }", "title": "" }, { "docid": "c61ba1720ae088ee01d0b2a24441b4ad", "score": "0.64412075", "text": "protected function setPageSize(){\n $this->data['size'] = isset($this->data['size'] ) ? (int)$this->data['size'] : $this->default_size; \n }", "title": "" }, { "docid": "90b6c02a9800c36656dc3dd6202f1b07", "score": "0.6435999", "text": "function limit($limit)\r\n{\r\n\t$this->limit = $limit;\r\n}", "title": "" }, { "docid": "5fba8a5b0fa3857e59d1582716d0a57c", "score": "0.6430726", "text": "protected function _getMaxResultsPerPage() {\r\n return null;\r\n }", "title": "" }, { "docid": "fbaeae5664b8804583594531e0a821df", "score": "0.6429963", "text": "protected function getMaxPageSize()\n {\n return 100;\n }", "title": "" }, { "docid": "0f28e5d348bfeca82c33218dedc265fe", "score": "0.64271855", "text": "protected function _addPagination()\n {\n if (!$this->isBatchEnabled()) {\n return;\n }\n\n $this->_collection->getSelect()->limit($this->getBatchSize());\n }", "title": "" }, { "docid": "bd6054934ebaff38610766cf30550a95", "score": "0.6420162", "text": "public function getQueryLimit();", "title": "" }, { "docid": "202d65f616b5ec784107078a3c9c80ae", "score": "0.6410788", "text": "public function limit($limit, $offset = null)\n {\n $limit = (int)$limit;\n if(!is_null($offset)) $offset = (int)$offset;\n $this->limitPart = 'LIMIT '.$limit.(!is_null($offset)?','.$offset:'');\n\n return $this;\n }", "title": "" }, { "docid": "dcde1f2b87c23ffdba8afc553f7b4f59", "score": "0.6407262", "text": "protected function filterLimit($limit = null)\n {\n $this->limit = $this->normalizeLimit($limit);\n\n if (!$this->needsFullPagination() && !$this->needsSimplePagination()) {\n $this->builder->take($this->limit);\n }\n }", "title": "" }, { "docid": "33eecc1fedab0027328467558c44cd08", "score": "0.6404541", "text": "public function set_item_limit($limit = 0)\n\t{\n\t\t$this->item_limit = (int) $limit;\n\t}", "title": "" }, { "docid": "83ce7c3d94c3f0cbefee198af8e1247a", "score": "0.6394617", "text": "private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->answersPerPage=$row->answersperpage;\n }", "title": "" }, { "docid": "e6a1b55d010b204de40fec72fd648a9c", "score": "0.63889", "text": "public static function limit($limit): self\n {\n }", "title": "" }, { "docid": "e6a1b55d010b204de40fec72fd648a9c", "score": "0.63889", "text": "public static function limit($limit): self\n {\n }", "title": "" }, { "docid": "e6a1b55d010b204de40fec72fd648a9c", "score": "0.63889", "text": "public static function limit($limit): self\n {\n }", "title": "" }, { "docid": "e6a1b55d010b204de40fec72fd648a9c", "score": "0.63889", "text": "public static function limit($limit): self\n {\n }", "title": "" }, { "docid": "e6a1b55d010b204de40fec72fd648a9c", "score": "0.63889", "text": "public static function limit($limit): self\n {\n }", "title": "" }, { "docid": "1baf9ffe1953b4e67d454b3a7e6f9243", "score": "0.6387862", "text": "public function limit($limit): self\n {\n }", "title": "" }, { "docid": "1baf9ffe1953b4e67d454b3a7e6f9243", "score": "0.6387862", "text": "public function limit($limit): self\n {\n }", "title": "" }, { "docid": "1baf9ffe1953b4e67d454b3a7e6f9243", "score": "0.6387862", "text": "public function limit($limit): self\n {\n }", "title": "" }, { "docid": "1baf9ffe1953b4e67d454b3a7e6f9243", "score": "0.6387862", "text": "public function limit($limit): self\n {\n }", "title": "" }, { "docid": "1baf9ffe1953b4e67d454b3a7e6f9243", "score": "0.6387862", "text": "public function limit($limit): self\n {\n }", "title": "" }, { "docid": "9066fb10d4042d783d91f4b121ceaac1", "score": "0.6378564", "text": "public function setResultLimit($limit)\n {\n $this->resultLimit = $limit;\n return $this;\n }", "title": "" }, { "docid": "dc8778fb0cb57e029541f08beeddfe75", "score": "0.63696325", "text": "function _get_pagination_limit() {\n $limit = 20;\n return $limit;\n }", "title": "" }, { "docid": "15b85781d251ecc602c435c811dfdd1e", "score": "0.6365081", "text": "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n\n return $this;\n }", "title": "" }, { "docid": "15b85781d251ecc602c435c811dfdd1e", "score": "0.6365081", "text": "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b495fe49cf2d9299d86756c0990aeafa", "score": "0.636091", "text": "public function setLimit( $limit)\r\n {\r\n $this->limit = $limit;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "45139732af01de83c368315695509b0a", "score": "0.635221", "text": "public function setMaxPerPage($max);", "title": "" }, { "docid": "b70a4327d7a5aa28204ac2a9a0fa7a78", "score": "0.6347845", "text": "final protected function setLimit() {\n return ' LIMIT ' . $this->getStartPage() . ', ' . $this->getPerPage();\n }", "title": "" }, { "docid": "815e8dd39bd7ef4c00736a2ff07a2d42", "score": "0.63378066", "text": "public static function all ($limit);", "title": "" }, { "docid": "673f303b116a3cca9dabe9d75e1cd79d", "score": "0.6336961", "text": "public function __construct( $limit = 0 ) {\n\t\t$this->limit = ($limit) ? $limit : 20;\n\t}", "title": "" }, { "docid": "f44e75becbfa1b1678e7dbedef208513", "score": "0.631343", "text": "public function set_limit($limit) {\n\t\t$this->limit = intval($limit);\n\t}", "title": "" }, { "docid": "a75f843765e4e2521be9971186c7d47f", "score": "0.63018245", "text": "private function setPagination()\n {\n // ALl Pages\n if ($this->perPage == 'all') return;\n\n $this->firstPage = 1;\n $this->lastPage = ceil($this->totalCount / $this->perPage);\n\n // if current page is greater than the total page\n // then set the current page equal to total page\n $this->page = min($this->page, $this->lastPage);\n\n // Calculate the offset of where the retrieval index start at\n $this->offset = ($this->page - 1) * $this->perPage;\n $this->limit = $this->perPage;\n\n // Next Page And Previous Page\n $this->nextPage = min($this->page + 1, $this->lastPage);\n $this->prevPage = max($this->page - 1, $this->firstPage);\n }", "title": "" }, { "docid": "323a3525a0be719b48d38cf5eaefa694", "score": "0.6283644", "text": "abstract public function limit( $offset_count, $row_count = null );", "title": "" }, { "docid": "7f0babfc1aaa51a4c9f772ebac44d2f4", "score": "0.62824833", "text": "public function setLimit($limit)\n {\n return $this->setProperty('limit', (int) $limit);\n }", "title": "" }, { "docid": "06e82d4316d4aa80aa94620db63d68ac", "score": "0.6269565", "text": "public function limit($limit, $offset=null)\n\t{\n\t\t$this->_query['limit']=(int)$limit;\n\t\tif($offset!==null)\n\t\t\t$this->offset($offset);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6bf3d093bb25373f8614d49d26376e85", "score": "0.62630916", "text": "public function setLimit($limit)\n {\n $this->limit = $limit;\n return $this;\n }", "title": "" }, { "docid": "a8e8e9831e0ef1b27b99366d54ced178", "score": "0.6261398", "text": "public function getResultsLimit()\n {\n return $this->resultsLimit;\n }", "title": "" }, { "docid": "de6456e322757481e6620200f4dd6254", "score": "0.62573224", "text": "public function limit($limit){\n $this->limit = $limit;\n return $this;\n }", "title": "" }, { "docid": "0b4da803e9c7b201ec78c43c6fb329fc", "score": "0.6251569", "text": "private function _getLimit()\r\n\t{\r\n \r\n $productsPerPage = Configure::read('Catalog.default_products_per_page');\r\n\t\t$productsPerPageLabel = $productsPerPage;\r\n\t\t\r\n\t\tif (!empty($this->params['url']['display']))\r\n\t\t{\r\n\t\t\tif ($this->params['url']['display'] == 'all')\r\n\t\t\t{\r\n\t\t\t\t$productsPerPage = 999;\r\n\t\t\t\t$productsPerPageLabel = 'All';\r\n\t\t\t}\r\n\t\t\telse if (in_array($this->params['url']['display'], Configure::read('Catalog.products_per_page_options')))\r\n\t\t\t{\r\n\t\t\t\t$productsPerPage = $this->params['url']['display'];\r\n\t\t\t\t$productsPerPageLabel = $productsPerPage;\r\n\t\t\t\t\r\n\t\t\t\t$this->Cookie->write('Catalog.products_per_page', $productsPerPage);\r\n\t\t\t\t$this->Cookie->write('Catalog.products_per_page_label', $productsPerPageLabel);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$cookieProductsPerPage = $this->Cookie->read('Catalog.products_per_page');\r\n\t\t\t$cookieProductsPerPageLabel = $this->Cookie->read('Catalog.products_per_page_label');\r\n\t\t\t\r\n\t\t\tif (!empty($cookieProductsPerPage) && !empty($cookieProductsPerPageLabel))\r\n\t\t\t{\r\n\t\t\t\t$productsPerPage = $this->Cookie->read('Catalog.products_per_page');\r\n\t\t\t\t$productsPerPageLabel = $this->Cookie->read('Catalog.products_per_page_label');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->paginate['limit'] = $productsPerPage;\r\n\t\t\r\n\t\t$this->set('showingPerPage', $productsPerPageLabel);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5d4c9bec83cf6b49ed941a47d33fe81c", "score": "0.6249282", "text": "private function _per_page($override = null)\n {\n \n return max(1, Data($override)->otherwise(tx('Data')->session->per_page)->otherwise(20)->get('int'));\n \n }", "title": "" }, { "docid": "0b7c6b06e87b1172cff8fa8611988beb", "score": "0.62480503", "text": "public function setLimit($limit, $limitStart = 0){\n $this->filter[\"limit\"] = (int)$limit;\n $this->filter[\"limitStart\"] = (int)$limitStart;\n return $this;\n }", "title": "" }, { "docid": "f25604df10dfca093cb705fe0b9f3ef4", "score": "0.6241775", "text": "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "title": "" }, { "docid": "50a3857118b5082b8612cb238e3d0e83", "score": "0.62334853", "text": "public function setLimit(int $limit): void\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "e7fb32acf9357135297221206a7f49b6", "score": "0.6216194", "text": "public function setPageSize($size = 0);", "title": "" }, { "docid": "bfcda4d4428c7c13b9f28199b91b7fed", "score": "0.6215089", "text": "public function paginate($params, $limit = 15);", "title": "" }, { "docid": "5e6675d40bc156bed1727c175093fd34", "score": "0.6199879", "text": "public function setLimit($limit)\n {\n $this->_limit = $limit;\n\n return $this;\n }", "title": "" }, { "docid": "952ffebc7753f8b5039babdb72f080ba", "score": "0.6178068", "text": "protected function _setSimpleLimit()\n {\n $this->_statement .= \" LIMIT {$this->_sql->getLimit()}\";\n return $this;\n }", "title": "" }, { "docid": "921dce1b8efe0744ce1697bb5f1f371a", "score": "0.61772835", "text": "public function setPageLimitTo($limit)\n {\n $page = $this->ctx->getSession()->getPage();\n\n $toolbar_pagelimit = $page->find('css', '.Toolbar_pagelimit');\n $toolbar_pagelimit->selectFieldOption('l', $limit);\n }", "title": "" }, { "docid": "8597ad824a7eeab2d3609eb787d938ae", "score": "0.6162811", "text": "private function prepare_limit() {\n\t\tif ($this->offset) {\n\t\t\tif ($this->limit >= 0) {\n\t\t\t\t$this->query['LIMIT'] = $this->offset.', '.$this->limit;\n\t\t\t} else {\n\t\t\t\t$this->query['LIMIT'] = $this->offset.', 2000000000';\n\t\t\t}\n\t\t} else {\n\t\t\tif ($this->limit >=0) {\n\t\t\t\t$this->query['LIMIT'] = $this->limit;\n\t\t\t}\n\t\t}\n/*\n\t\tif ($this->offset && $this->limit) {\n\t\t\t$this->query['LIMIT'] = $this->offset.', '.$this->limit;\n\t\t} elseif ($this->limit) {\n\t\t\t$this->query['LIMIT'] = $this->limit;\n\t\t} elseif ($this->offset) {\n\t\t\t// Mysql manual:\n\t\t\t// To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter.\n\t\t\t$this->query['LIMIT'] = $this->offset.', 2000000000';\n\t\t}\n*/\n\t}", "title": "" }, { "docid": "0668e34594b2f5e7ec0baa9d704290d8", "score": "0.61606807", "text": "function limit($limit)\n {\n $this->_limit = $limit;\n return $this;\n }", "title": "" }, { "docid": "c7f9fd8c526c928e6aa452deaa65d139", "score": "0.6152389", "text": "public function limit($limit = 10)\n {\n $this->query .= ' LIMIT ' . $limit;\n return $this;\n }", "title": "" }, { "docid": "1b4032d687c6f52edeeff5e74718f6f2", "score": "0.61442095", "text": "public function limit($limit, $offset = null) {\n $this->_validateCall('limit');\n if (!is_int($limit) OR ($offset !== null AND !is_int($offset))) return false;\n if ($offset !== null) {\n $this->_addElement('limit', array(intval($limit), intval($offset)));\n return $this;\n } else {\n $this->_addElement('limit', intval($limit));\n return $this;\n }\n }", "title": "" }, { "docid": "f535157973e268cebc5543895dc55f28", "score": "0.6140064", "text": "public function setLimit(Limit $limit)\n {\n if (empty($this->limit)) {\n $this->limit = $limit;\n }\n }", "title": "" }, { "docid": "f535157973e268cebc5543895dc55f28", "score": "0.6140064", "text": "public function setLimit(Limit $limit)\n {\n if (empty($this->limit)) {\n $this->limit = $limit;\n }\n }", "title": "" } ]
84c74a76ffe81916b9cb92f224ad7b88
right select box select id
[ { "docid": "093b96ba12f11af4d78a409a4a331684", "score": "0.6304049", "text": "protected function resolveRight()\n {\n // not need specify right option in clientOptions\n $rightSelectID = $this->selectID ?: Html::getInputId($this->model, $this->attribute);\n $this->clientOptions = array_merge(\n $this->clientOptions ?: [],\n ['right' => '#'.$rightSelectID]\n );\n $name = Html::getInputName($this->model, $this->attribute);\n $options = array_merge(['id' => $rightSelectID, 'name' => \"{$name}[]\"], $this->defaultSelectBoxOptions, $this->rightSelectBoxOptions);\n $selectContent = Html::tag(\n 'select',\n '',\n $options\n );\n return $selectContent;\n }", "title": "" } ]
[ { "docid": "eb7eb3256e451370bd359aef970e1b35", "score": "0.63365763", "text": "function getSelectId($caption);", "title": "" }, { "docid": "5d58a51420a2961f043c1c1a8d0d67c1", "score": "0.6187325", "text": "function nuts_get_select ( $name, $key = false ) {\n\n\tglobal $nuts_options_array;\n\n\t$id = nuts_get_option ( $name );\n\n\tif ( $key ) return $id;\n\t\telse return $nuts_options_array[$name][\"values\"][$id];\n\n}", "title": "" }, { "docid": "b9575246456ed021dc15648f4dd8c55a", "score": "0.6132621", "text": "function nuts_type_select_field ( $name, $id ) {\n\n\tglobal $nuts_options_array;\n\t\n\tif ( $id == '' ) $id = $nuts_options_array[$name][\"default\"];\n\t\n\techo '<select name=\"' . nuts_form_ref ( $name ) . '\" id=\"' . $name . '\" autocomplete=\"off\">';\n\n\tforeach ( $nuts_options_array[$name][\"values\"] as $key => $value ) {\n\t\techo '<option value=\"' . $key . '\"';\n\t\t\n\t\tif ( $key == $id ) echo ' selected';\n\t\t\n\t\techo '>' . $value . '</option>';\n\t\techo $key . ' ' . $id;\n\n\t}\n\t\n\techo '</select>';\n\n}", "title": "" }, { "docid": "f9e570180787a5aeff54e26601a54359", "score": "0.6101281", "text": "public function selectItemTypeSelectd()\n {\n \n $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n if (!empty($itemTypeIds)) {\n\n $getItemTypeIdData = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getItemTypeIdData)) {\n\n foreach ($getItemTypeIdData as $itemType) {\n\n $itemTpyeListHtml = '<option value=\"'.$itemType->id.'\"';\n \n if ($itemTypeIds == $itemType->id) { \n\n $itemTpyeListHtml .= ' selected=\"selected\"';\n\n }\n\n $itemTpyeListHtml .= '>'.$itemType->name.'</option>';\n\n echo $itemTpyeListHtml; \n\n }\n\n }\n }\n }", "title": "" }, { "docid": "a1f31e44c624c54ea6eb30fbe04c9ef5", "score": "0.6008063", "text": "public function selectItemTypeSelectds()\n {\n \n // $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n // if (!empty($itemTypeIds)) {\n\n $getItemTypeIdDatas = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getItemTypeIdDatas)) {\n\n foreach ($getItemTypeIdDatas as $itemTypes) {\n\n $itemTpyesListHtml = '<option value=\"'.$itemTypes->id.'\"';\n \n \n\n $itemTpyesListHtml .= '>'.$itemTypes->name.'</option>';\n\n echo $itemTpyesListHtml; \n\n }\n\n }\n // }\n }", "title": "" }, { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.5911425", "text": "public function getSelect();", "title": "" }, { "docid": "942d27897466a0a5f8c90134d3b2486d", "score": "0.5861789", "text": "function List_sel (){\n\techo \"<select name='{$this->texto_field}' id='{$this->texto_field}' class='' tabindex='++$ind'>\";\n\techo \"<option value=''>-->> Escolha <<--</option>\";\n\t while($this->col_lst = mysql_fetch_array($this->sql_lst))\n\t {\n\t echo \"<option value='\".$this->col_lst[\"id\"].\"'>\".$this->col_lst[$this->campo_retorno].\"</option>\";\n\t }\n\techo \"</select>\";\n }", "title": "" }, { "docid": "c8fbf5f9c041f5100e9b46501a471b76", "score": "0.5816279", "text": "public function selectgetValueSelectd()\n {\n \n // $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n$itemCatListHtml = '';\n \n // if (!empty($itemTypeIds)) {\n\n $getItemCatDatas = DB::select('SELECT * FROM item_category_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getItemCatDatas)) {\n\n $itemCatListHtmlsss = '<option value=\"\">Select Item Category Name</option>';\n\n foreach ($getItemCatDatas as $itemCat) {\n\n $itemCatListHtml .= '<option value=\"'.$itemCat->id.'\"';\n $itemCatListHtml .= '>'.$itemCat->name.'</option>';\n\n // echo $itemCatListHtml; \n\n }\n\n echo $itemCatListHtmlsss.$itemCatListHtml;\n\n }\n // }\n \n \n }", "title": "" }, { "docid": "c9af4ba6a0cb30354f3b1e899d9a27d6", "score": "0.57831854", "text": "public function create_navi_selectbox($unavi, $navid) {\r\n global $langu_tra;\r\n $selectbox_start = '<select id=\"navigation\" class=\"selboxEdit\" name=\"navid\" size=\"1\" onchange=\"\">' . \"\\n\";\r\n $selectbox_ende = '</select>';\r\n $unavis = '';\r\n\r\n if (isset($unavi)) {\r\n\r\n while ($row = $unavi->fetchRow(MDB2_FETCHMODE_ASSOC)) {\r\n $nav_array[] = $row;\r\n if ($row['ukap'] > 0) {\r\n $unavis = 'X';\r\n }\r\n }\r\n\r\n\r\n $option = '';\r\n foreach ($nav_array as $key => $row) {\r\n $eintrag = '';\r\n\r\n if ($row['ukap'] == 0) {\r\n $kap = $row['bezeich_' . $langu_tra];\r\n }\r\n if ($row['ukap'] != 0) {\r\n $eintrag = ' - ' . $row['bezeich_' . $langu_tra];\r\n }\r\n // wenn der Navigationspunkt inaktiv ist, soll er in der Selectbox in roter Schrift erscheinen\r\n $style = $row['aktiv'] != 'j' ? 'style=\"color:red;\"' : '';\r\n // Wenn Ukaps vorhanden sind --> count > 1, darf der Eintrag mit ukap = 0 nicht in die Selectbox aufgenommen werden \r\n if ($unavis == 'X') {\r\n $row['nav_id'] == $navid ? $option .= '<option selected ' : $option .= '<option ';\r\n $option .= 'value=\"' . $row['nav_id'] . '\" ' . $style . '>' . $kap . $eintrag . '</option>' . \"\\n\";\r\n } elseif ($unavis == '') {\r\n $row['nav_id'] == $navid ? $option .= '<option selected ' : $option .= '<option ';\r\n $option .= 'value=\"' . $row['nav_id'] . '\" ' . $style . '>' . $kap . '</option>' . \"\\n\";\r\n }\r\n }\r\n } else {\r\n $option .= '<option selected value=\"\">' . $GLOBALS['TEXTE']['TEXT_SELECTBOX_LEER'] . '</option>' . \"\\n\";\r\n }\r\n $selectbox = $selectbox_start . $option . $selectbox_ende;\r\n return $selectbox;\r\n }", "title": "" }, { "docid": "ce7d7e7338c37b79a333315db191e0c6", "score": "0.5751987", "text": "function build_selection_dropdown() {\n\t$output = array();\n\t$output[] = array('id' => '[table1].id', 'text' => RW_RECORD_ID);\n\treturn $output;\n }", "title": "" }, { "docid": "9d67d41ae427d82920e88f84117ee499", "score": "0.5729509", "text": "function CrearSelect2($Vector){\r\n $nombre=$Vector[\"Nombre\"];\r\n $evento=$Vector[\"Evento\"];\r\n $funcion=$Vector[\"Funcion\"];\r\n if($Vector[\"Required\"]==1){\r\n $R=\"required\";\r\n }else{\r\n $R=\"\";\r\n }\r\n print(\"<select id='$nombre' $R name='$nombre' $evento='$funcion'>\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "944e94b199022d2b30e8873d6c1b46ec", "score": "0.57254606", "text": "public function select_num()\r\t{\r\t\t$frm=$this->forminput();\r\t\tif($this->data[\"multiple\"]==\"true\")\r\t\t\t$frm.=\"multiple \";\r\t\t\t\r\t\tif(isset($this->data[\"default\"]))\r\t\t\t$default=$this->data[\"default\"];\r\t\t\r\t\tif(isset($this->data[\"size\"]))\r\t\t\t$frm.=\"size=\\\"\".$this->data[\"size\"].\"\\\" \";\r\t\t\t\r\t\t$html=\"<select \".$frm.\">\\n\";\r\t\tif(isset($this->data[\"start\"]) && isset($this->data[\"end\"]) && isset($this->data[\"step\"])){\r\t\t\tif(isset($default))\r\t\t\t\t$html.=\"\\t<option value=\\\"-1\\\">$default</option>\\n\";\r\t\t\telse\r\t\t\t\t$html.=\"\\t<option value=\\\"-1\\\">Select One</option>\\n\";\r\t\t\tfor($i=$this->data[\"start\"]; $i<=$this->data[\"end\"]; $i+=$this->data[\"step\"])\t\r\t\t\t{\r\t\t\t\tif($this->data[\"value\"]==$i){\r\t\t\t\t\tif(isset($this->data[\"prefix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$this->data[\"prefix\"].\" \".$i.\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\tif(isset($this->data[\"suffix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$i.\" \".$this->data[\"suffix\"].\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$i.\"</option>\\n\";\r\t\t\t\t}\r\t\t\t\telse{\r\t\t\t\t\tif(isset($this->data[\"prefix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$this->data[\"prefix\"].\" \".$i.\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\tif(isset($this->data[\"suffix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$i.\" \".$this->data[\"suffix\"].\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$i.\"</option>\\n\";\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\telse if(isset($this->data[\"start\"]) && isset($this->data[\"end\"])){\r\t\t\tif(isset($default))\r\t\t\t\t$html.=\"\\t<option value=\\\"-1\\\">$default</option>\\n\";\r\t\t\telse\r\t\t\t\t$html.=\"\\t<option value=\\\"-1\\\">Select One</option>\\n\";\r\t\t\r\t\t\tfor($i=$this->data[\"start\"]; $i<=$this->data[\"end\"]; $i++)\r\t\t\t{\r\t\t\t\tif($this->data[\"value\"]==$i){\r\t\t\t\t\tif(isset($this->data[\"prefix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$this->data[\"prefix\"].\" \".$i.\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\tif(isset($this->data[\"suffix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$i.\" \".$this->data[\"suffix\"].\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\" selected>\".$i.\"</option>\\n\";\r\t\t\t\t}\r\t\t\t\telse{\r\t\t\t\t\tif(isset($this->data[\"prefix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$this->data[\"prefix\"].\" \".$i.\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\tif(isset($this->data[\"suffix\"])){\r\t\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$i.\" \".$this->data[\"suffix\"].\"</option>\\n\";\r\t\t\t\t\t\tcontinue;\r\t\t\t\t\t}\r\t\t\t\t\t$html.=\"\\t<option value=\\\"\".$i.\"\\\">\".$i.\"</option>\\n\";\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t$html.=\"</select>\";\r\t\treturn $html;\r\t}", "title": "" }, { "docid": "3d7ae0f551113d4280b938b4ed7dfd13", "score": "0.5722999", "text": "function SF_ret_select($stroke='', $tbl='',$valpost='',$value){\n global $wpdb;\n preg_match('#(?<=name:\")(.*?)(?=\")#',$stroke,$arr);\n preg_match('#(?<=child:\")(.*?)(?=\")#',$stroke,$child);\n $checks=preg_match('#cheks:\"1\"#',$stroke);\n $pastemult='';\n if (preg_match('#multi:\"1\"#',$stroke)){$pastemult='[]';}\n if (!$checks){$stroke=str_replace('[SForm','<select onchange=\"getChilds('. \"'\" . $child[0] . \"', '\".$arr[0].\"', 'multi'\".')\" onclick=\"getChilds('. \"'\" . $child[0] . \"', '\".$arr[0].\"', 'multi'\".')\"',$stroke);}\n $finding=array('name:', 'id:', 'class:', 'type:\"Select\"', 'multi:\"1\"');\n $repling=array('name=', 'id=', 'class=', '', 'multiple=\"multiple\"');\n $stroke=str_replace($finding,$repling,$stroke);\n $stroke=substr($stroke,0,strlen($stroke)-1);\n if (!$checks){$stroke.='>';}\n\n\n if (!$checks){\n if ($valpost!=''){\n $stroke.='<option value=\"'.$valpost.'\" selected=\"selected\" class=\"SFbold\">'.$valpost.'</option>';\n } else {\n if (preg_match('#empty:\"1\"#',$stroke)){\n $stroke.='<option value=\"\" selected=\"selected\">не указано</option>';\n $stroke=str_replace('empty:\"1\"','',$stroke);\n }\n }\n\n\n if ((preg_match('#parent:\"0\"#',$stroke)||(!preg_match('#parent:\"(.*?)\"#',$stroke)))){\n $result=$wpdb->get_results(\"SELECT * FROM `\" . $tbl . \"unicat_list` WHERE `fieldname`='\".$arr[0].\"'\", ARRAY_A);\n if (count($result)==0){$result=$wpdb->get_results(\"SELECT * FROM `\" . $tbl . \"unicat_fields` WHERE `fieldtype`='\".$arr[0].\"' GROUP BY `fielddata`\", ARRAY_A);\n for ($i=0;$i<count($result);$i++){\n if ($value==$result[$i]['fielddata']){$selected=' selected=\"selected\" ';} else {$selected='';}\n $stroke.= '<option value=\"'.$result[$i]['fielddata'].'\" '.$selected.'>'.$result[$i]['fielddata'].'</option>';\n }\n } else {\n for ($i=0;$i<count($result);$i++){\n if ($value==$result[$i]['content']){$selected=' selected=\"selected\" ';} else {$selected='';}\n $stroke.= '<option value=\"'.$result[$i]['content'].'\" '.$selected.'>'.$result[$i]['content'].'</option>';\n }\n }\n }\n $stroke.='</select>';\n } else {\n $stroke=str_replace('[SForm','',$stroke);\n $stroke=preg_replace('#name=\"(.*?)\"|id=\"(.*?)\"|class=\"(.*?)\"|multiple=\"multiple\"|cheks:\"1\"|empty:\"1\"#','',$stroke);\n if ((preg_match('#parent:\"0\"#',$stroke)||(!preg_match('#parent:\"(.*?)\"#',$stroke)))){\n $result=$wpdb->get_results(\"SELECT * FROM `\" . $tbl . \"unicat_list` WHERE `fieldname`='\".$arr[0].\"'\", ARRAY_A);\n for ($i=0;$i<count($result);$i++){\n $stroke.= '<div class=\"UniCatCheckSelect\"><input type=\"checkbox\" name=\"'.$arr[0].$pastemult.'\" value=\"'.$result[$i]['content'].'\" />'.$result[$i]['content'].'</div>';\n }\n\n }\n\n\n }\n\n $stroke=preg_replace('#child:\"(.*?)\"#','',$stroke);\n $stroke=preg_replace('#parent:\"(.*?)\"#','',$stroke);\n if ($pastemult=='[]'){$stroke=preg_replace('#name=\"'.$arr[0].'\"#','name=\"'.$arr[0].'[]\"', $stroke);}\n $stroke=urldecode($stroke);\n\n return $stroke;\n}", "title": "" }, { "docid": "bd5f88593958cd16e23d22a710e41233", "score": "0.5716263", "text": "function createdropdown2($data_query, $id) \n{\n\tif($id == '')\n\t$id = 1;\n\n\twhile ($dataset = tep_db_fetch_array($data_query)) \n\t{\n\t\techo \"<option value='\" . $dataset['d_value'] . \"'\"; \n\t\tif($dataset['d_value'] == $id)\n\t\t{\n\t\t\techo 'selected';\n\t\t}\n\t\techo \">\" . $dataset['d_option'] . \"</option>\".\"\\n\";\n }\n}", "title": "" }, { "docid": "d15c9258720537c8f30109fa6e8f5edb", "score": "0.57021767", "text": "function ec_print_menu_select( $id ){\n\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\" onchange=\\\"ec_editor_select_menu_change( );\\\">\";\n\t$db = new ec_db( );\n\t$menu_items = $db->get_menulevel1_items( );\n\tif( count( $menu_items ) > 0 ){\n\t\techo \"<option value=\\\"0\\\">Select a Menu Item</option>\";\n\t\tforeach( $menu_items as $menu ){\n\t\t\techo \"<option value=\\\"\" . $menu->menulevel1_id . \"\\\">\" . $menu->menu1_name . \"</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No Menu Items Exist</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "b77db23d3900436f3c14a0e5789c26b9", "score": "0.5688045", "text": "function select($data){\n\n extract($data);\n if(!isset($noview)) $noview = '';\n if(!isset($attr)) $attr = '';\n if(!isset($edit)) $edit = false;\n if(!isset($notrans)) $notrans = false;\n if(!isset($parent)) $parent = false;\n if(!isset($label)) $label = false;\n if(!isset($cols)) $cols = 6;\n if(!isset($required)) $required = \"\";\n if(!isset($select_id)) $select_id = \"\";\n\n if(!isset($transAttr)) $transAttr = false;\n if(!isset($transval)) $transval = '';\n\n if($transAttr)\n $transval = trans('validation.attributes.'.$name);\n else\n $transval = ($transval) ? $transval : trans('main.'.$trans);\n\n $astrik = ($required) ? '<span class=\"astrik\">*<span>' : '';\n\n $html = '\n <div class=\"col-md-'.$cols.' '.$name.'\">\n ';\n if(($rows && is_object($rows)) || is_array($rows)){\n $html .= '<div class=\"form-group\">';\n if($label){\n $html .=' <label for=\"'.$name.'\">'.$transval.$astrik.'</label>';\n }\n $html .=' <select '.$required.' id=\"'.$name.'\" class=\"form-control '.$name.'\" name=\"'.$name.'\" '.$attr.'>\n\n\n <option value=\"\">'.$transval.$astrik.'</option>\n '; if(is_array($rows)){\n foreach ($rows as $row){\n $html .='<option value=\"'.$row.'\"';\n if(($edit && $edit->$name == $row) || old($name) == $row || $select_id == $row){\n $html .='selected';\n }\n if(!$notrans)\n $html .= '>'.trans('main.'.$row) .'</option>';\n else\n $html .= '>'.$row.'</option>';\n }\n }else{\n foreach ($rows as $row){\n $id = ($parent)? $row->parent->id : $row->id;\n if(!$id)\n $id = ($parent)? $row->parent->$name : $row->$name;\n $html .='<option value=\"'.$id.'\"';\n if(old($name) == $id){\n $html .='selected';\n }elseif($select_id == $id){\n $html .='selected';\n }elseif(($edit && is_object($edit) && $edit->$name == $id) || (!is_object($edit) && $edit == $id) || old($name) == $id){\n // return $edit;\n $html .='selected';\n }\n $html .= '>'.$row->$frkName .'</option>\n ';\n }\n }\n\n $html .='\n </select>\n ';\n\n $html .=getErrors($errors, $name, $noview).'\n </div>';\n }\n $html .= '</div>\n ';\n return $html;\n}", "title": "" }, { "docid": "4785be0be45cc4bf6c483335b7a8756f", "score": "0.56522906", "text": "function part_rev_drop_down($current_ID=0, $part_type_ID=0, $option_name = 'part_rev_ID') {\n\n\t// start the session:\n\tsession_start();\n\t// enable the DB connection:\n\tinclude 'db_conn.php';\n\t\n\tif ($part_type_ID != 0){\n\t\t$add_part_type_SQL = \" AND `type_ID` = '\" . $part_type_ID . \"'\";\n\t}\n\telse {\n\t\t$add_part_type_SQL = '';\n\t}\n\t\n\tif (($option_name == 'parent_ID')||($option_name == 'part_rev_ID_reference')) {\n\t\t$required = '';\n\t}\n\telse {\n\t\t$required=\"required\";\n\t}\n\t\n?>\n<!-- starting part_rev_drop_down function: -->\n<select data-plugin-selectTwo class=\"form-control populate\" name=\"<?php echo $option_name; ?>\" <?php echo $required; ?>>\n\t<option value=\"\"></option>\n\t<?php\n\t\n\t// get parts list\n\t$get_parts_SQL = \"SELECT * FROM `parts` WHERE `record_status` = '2'\" . $add_part_type_SQL . \" ORDER BY `part_code` ASC\";\n\t// echo $get_parts_SQL;\n\n\t$part_count = 0;\n\n\t$result_get_parts = mysqli_query($con,$get_parts_SQL);\n\t// while loop\n\twhile($row_get_parts = mysqli_fetch_array($result_get_parts)) {\n\n\t\t// GET PART TYPE:\n\n\t\t$get_part_type_SQL = \"SELECT * FROM `part_type` WHERE `ID` ='\" . $row_get_parts['type_ID'] . \"'\";\n\t\t// echo $get_part_type_SQL;\n\n\t\t$result_get_part_type = mysqli_query($con,$get_part_type_SQL);\n\t\t// while loop\n\t\twhile($row_get_part_type = mysqli_fetch_array($result_get_part_type)) {\n\t\t\t$part_type_EN = $row_get_part_type['name_EN'];\n\t\t\t$part_type_CN = $row_get_part_type['name_CN'];\n\t\t}\n\n\t\t// GET PART CLASSIFICATION:\n\n\t\t$get_part_class_SQL = \"SELECT * FROM `part_classification` WHERE `ID` ='\" . $row_get_parts['classification_ID'] . \"'\";\n\t\t// echo $get_part_class_SQL;\n\n\t\t$result_get_part_class = mysqli_query($con,$get_part_class_SQL);\n\t\t// while loop\n\t\twhile($row_get_part_class = mysqli_fetch_array($result_get_part_class)) {\n\t\t\t$part_class_EN = $row_get_part_class['name_EN'];\n\t\t\t$part_class_CN = $row_get_part_class['name_CN'];\n\t\t}\n\t\t?>\n\n\t\t<optgroup label=\"<?php echo $row_get_parts['part_code']; ?> - <?php \n\t\t\techo $row_get_parts['name_EN'];\n\t\t\tif (($row_get_parts['name_CN']!='')&&($row_get_parts['name_CN']!='中文名')) {\n\t\t \t\techo \" / \" . $row_get_parts['name_CN']; \n\t\t \t} \n\t\t \t?>\">\n\n\t\t<?php\n\n\t\t// now list the revisions for this part:\n\n\t\t$get_part_rev_SQL = \"SELECT * FROM `part_revisions` WHERE `part_ID` =\" . $row_get_parts['ID'] . \" AND `record_status`='2' ORDER BY `revision_number` DESC\";\n\t\t$result_get_part_rev = mysqli_query($con,$get_part_rev_SQL);\n\n\t\t// while loop\n\t\twhile($row_get_part_rev = mysqli_fetch_array($result_get_part_rev)) {\n\n\t\t\t// now print each record:\n\t\t\t$rev_id = $row_get_part_rev['ID'];\n\t\t\t$rev_part_id = $row_get_part_rev['part_ID'];\n\t\t\t$rev_number = $row_get_part_rev['revision_number'];\n\t\t\t$rev_remarks = $row_get_part_rev['remarks'];\n\t\t\t$rev_date = $row_get_part_rev['date_approved'];\n\t\t\t$rev_user = $row_get_part_rev['user_ID'];\n\n\t\t\t?>\n\t\t\t\t<option value=\"<?php echo $rev_id; ?>\" <?php if ($rev_id == $current_ID) { ?> selected=\"selected\"<?php } ?>><?php echo $row_get_parts['part_code']; ?> - <?php echo $rev_number; ?></option>\n\t\t\t<?php\n\n\t\t} // end revision look-up loop\n\t\t?>\n\n\t\t</optgroup>\n\n\t<?php\n\t} // END WHILE LOOP\n\n\t?>\n</select>\n\t\n<!-- end part_rev_drop_down function: -->\n<?php\n}", "title": "" }, { "docid": "b9d76fb317372bf2ec1d475cec1f9046", "score": "0.5626989", "text": "function select($options);", "title": "" }, { "docid": "e3f846241e2fdfc839f9cb87871cba4a", "score": "0.5625821", "text": "public function select($id){\n \n }", "title": "" }, { "docid": "092f080c5b9f86585ea269b5b9a883f2", "score": "0.5625211", "text": "function ec_print_menu_multiple_select( $id ){\n\techo \"<select multiple=\\\"multiple\\\" class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\t$db = new ec_db( );\n\t$menu_items = $db->get_menulevel1_items( );\n\tif( count( $menu_items ) > 0 ){\n\t\techo \"<option value=\\\"0\\\">Select a Menu Item</option>\";\n\t\tforeach( $menu_items as $menu ){\n\t\t\techo \"<option value=\\\"\" . $menu->menulevel1_id . \"\\\">\" . $menu->menu1_name . \"</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No Menu Items Exist</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "bace55cbbc9944bcde90d3efb30c4db4", "score": "0.56211364", "text": "function residenceComboBox() {\n \n $residence = getResidences();\n\n echo <<<select\n <select class='be-custom-select'>\n <option value=\"\" disabled selected>\n Lugar de Residencia\n </option>\nselect;\n\n if (Util::val($residence)) {\n foreach ($residence as $res) {\n echo \"<option value='$res->residence_id'>$res->location</option>\";\n }\n echo \"</select>\";\n } else {\n echo <<<select\n <option value=\"\" disabled>\n No hay ciudades de residencia disponibles\n </option>\n </select>\nselect;\n }\n}", "title": "" }, { "docid": "d7d772d3048d510527978d5d39feb431", "score": "0.5619638", "text": "function getSelectCaption($id);", "title": "" }, { "docid": "c42ef8e8593bc9e1c30914c4a7be3d12", "score": "0.5601665", "text": "static function saveSelect($select, $id)\n {\n if (isset($_POST[$select]) AND $_POST[$select] == $id)\n {\n return \"selected\";\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "849a1928cf1ab7d5ca903dcda6d5d89c", "score": "0.55686414", "text": "function agc_custom_xprofile_multi_select_button($html, $option, $field_id, $selected, $index )\n{\n\t$field_data = bp_get_profile_field_data( array('field' => $field_id, 'user_id' => bp_loggedin_user_id()));\n\t$selected = ( $option->name == $field_data )?' selected=\"selected\"':'';\n\n\treturn '<option' . $selected . ' value=\"' . esc_attr( stripslashes( $option->name ) ) . '\">' . esc_attr( stripslashes( $option->name ) ) . '</option>';\n}", "title": "" }, { "docid": "b06e76dbce8db0fcf08cb0ab2cd3299a", "score": "0.55646884", "text": "function agc_custom_xprofile_select_button($html, $option, $field_id, $selected, $index )\n{\n\t$field_data = bp_get_profile_field_data( array('field' => $field_id, 'user_id' => bp_loggedin_user_id()));\n\t$selected = ( $option->name == $field_data )?' selected=\"selected\"':'';\n\n\treturn '<option' . $selected . ' value=\"' . esc_attr( stripslashes( $option->name ) ) . '\">' . esc_attr( stripslashes( $option->name ) ) . '</option>';\n}", "title": "" }, { "docid": "1e2fcd11a3696973560c0778f5c479cb", "score": "0.5560572", "text": "private function set_linked_field_id() {\n\t\tif ( isset( $this->field_options['form_select'] ) && is_numeric( $this->field_options['form_select'] ) ) {\n\t\t\t$this->linked_field_id = (int) $this->field_options['form_select'];\n\t\t}\n\t}", "title": "" }, { "docid": "5c443d39ea8d242d6a946ac345f9b082", "score": "0.55557686", "text": "function fun_getRegionListOptions($region_id='', $pregion_id='', $area_id=''){\t\t\n\t\t$selected = \"\";\n\t\t$where = array();\n\n\t\t$sql = \"SELECT * FROM \" . TABLE_REGION . \" \";\n\t\tif($pregion_id !=\"\"){\n\t\t\tarray_push($where, \"pregion_id='\".(int)fun_db_input($pregion_id).\"' \");\n\t\t}\n\t\tif($area_id !=\"\"){\n\t\t\tarray_push($where, \"area_id='\".(int)fun_db_input($area_id).\"' \");\n\t\t}\n\n\t\tif(sizeof($where) > 0){\n\t\t\t$sql .= \" WHERE \".join($where, \" AND \");\n\t\t}\n\n\t\t$sql .= \" ORDER BY region_name\";\n\n\t\t$result = $this->dbObj->fun_db_query($sql);\n\t\twhile($rowsCon = $this->dbObj->fun_db_fetch_rs_object($result)){\n\t\t\tif($rowsCon->region_id == $region_id && $region_id!=''){\n\t\t\t\t$selected = \"selected\";\n\t\t\t}else{\n\t\t\t\t$selected = \"\";\n\t\t\t}\n\t\t\techo \"<option value=\\\"\".fun_db_output($rowsCon->region_id).\"\\\" \" .$selected. \">\";\n\t\t\techo fun_db_output(ucwords($rowsCon->region_name));\n\t\t\techo \"</option>\\n\";\n\t\t}\t\t\n\t\t$this->dbObj->fun_db_free_resultset($result);\n\t}", "title": "" }, { "docid": "4ab7ab6eb92dea19254dbb10c5bef087", "score": "0.5541149", "text": "function formEdit($id){\t\t\n\n\t\t$person =&Person::getRecordByID($id);\n$groupoptions .= '<select name=\"v_roles\" id=\"v_roles\" >';\n\t\t\t\t\t$groupoptions .= '<option value=17';if ($person ['roles'] == 17) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>ADMISSION</option>';\n\t\t\t\t\t$groupoptions .= '<option value=9';if ($person ['roles'] == 9) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>APOTEK</option>';\n\t\t\t\t\t$groupoptions .= '<option value=16';if ($person ['roles'] == 16) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>EKSEKUTIF</option>';\n\t\t\t\t\t$groupoptions .= '<option value=15';if ($person ['roles'] == 15) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>GIZI</option>';\n\t\t\t\t\t$groupoptions .= '<option value=7';if ($person ['roles'] == 7) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>GUDANG</option>';\n\t\t\t\t\t$groupoptions .= '<option value=8';if ($person ['roles'] == 8) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>LOGISTIK</option>';\n\t\t\t\t\t$groupoptions .= '<option value=13';if ($person ['roles'] == 13) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>JAMKESMAS</option>';\n\t\t\t\t\t$groupoptions .= '<option value=18';if ($person ['roles'] == 18) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>ICD</option>';\n\t\t\t\t\t$groupoptions .= '<option value=19';if ($person ['roles'] == 19) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>KAMAR OPERASI</option>';\n\t\t\t\t\t$groupoptions .= '<option value=22';if ($person ['roles'] == 22) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>ASKES</option>';\n\t\t\t\t\t$groupoptions .= '<option value=23';if ($person ['roles'] == 23) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>KEUANGAN</option>';\n\t\t\t\t\t$groupoptions .= '<option value=24';if ($person ['roles'] == 24) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>JASPEL</option>';\n\t\t\t\t\t$groupoptions .= '<option value=2';if ($person ['roles'] == 2) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>KASIR</option>';\n\t\t\t\t\t$groupoptions .= '<option value=26';if ($person ['roles'] == 26) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>ADMIN RAJAL</option>';\n\t\t\t\t\t$groupoptions .= '<option value=27';if ($person ['roles'] == 27) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>KEPERAWATAN</option>';\n\t\t\t\t\t$groupoptions .= '<option value=5';if ($person ['roles'] == 5) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>LABORATORIUM</option>';\n\t\t\t\t\t$groupoptions .= '<option value=1';if ($person ['roles'] == 1) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>PENDAFTARAN</option>';\n\t\t\t\t\t$groupoptions .= '<option value=4';if ($person ['roles'] == 4) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>RAWAT JALAN</option>';\n\t\t\t\t\t$groupoptions .= '<option value=11';if ($person ['roles'] == 11) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>RAWAT INAP</option>';\n\t\t\t\t\t$groupoptions .= '<option value=6';if ($person ['roles'] == 6) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>RADIOLOGI</option>';\n\t\t\t\t\t$groupoptions .= '<option value=12';if ($person ['roles'] == 12) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>REKAM MEDIK</option>';\t\t\t\t\n\t\t\t\t\t$groupoptions .= '<option value=99';if ($person ['roles'] == 99) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>SUPERVISOR</option>';\t\t\t\t\n\t\t\t\t\t$groupoptions .= '<option value=1017';if ($person ['roles'] == 1017) $groupoptions .= ' selected';\n\t\t\t\t\t$groupoptions .= '>ADMIN</option>';\n\t\t\t\t$groupoptions .= '</select>';\n\t\t\t\t\n$groupoptions2 .= '<select name=\"v_departemen\" id=\"v_departemen\" >';\n$roles = &Person::getUnit();\n\t\t\t\twhile ($row = $roles->fetchRow()) {\n\t\t\t\t\t\t$groupoptions2 .= '<option value=\"'.$row['nama_unit'].'\"';\n\t\t\t\t\t\tif ($person['departemen'] == $row['nama_unit'])\n\t\t\t\t\t\t\t$groupoptions2 .= ' selected';\n\t\t\t\t\t\t$groupoptions2 .= '>'.$row['nama_unit'].'</option>';\n\t\t\t\t}\n$groupoptions2 .= '<option value=\"ADMISSION\"';if ($person ['departemen'] == \"ADMISSION\") $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>ADMISSION</option>';\n$groupoptions2 .= '<option value=\"EKSEKUTIF\"';if ($person ['departemen'] == 'EKSEKUTIF') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>EKSEKUTIF</option>';\n$groupoptions2 .= '<option value=\"JAMKESMAS\"';if ($person ['departemen'] == 'JAMKESMAS') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>JAMKESMAS</option>';\n$groupoptions2 .= '<option value=\"KEPERAWATAN\"';if ($person ['departemen'] == 'KEPERAWATAN') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>KEPERAWATAN</option>';\n$groupoptions2 .= '<option value=\"PEMBAYARAN\"';if ($person ['departemen'] == 'PEMBAYARAN') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>PEMBAYARAN</option>';\n$groupoptions2 .= '<option value=\"PENDAFTARAN\"';if ($person ['departemen'] == 'PENDAFTARAN') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>PENDAFTARAN</option>';\n$groupoptions2 .= '<option value=\"REKAM MEDIK\"';if ($person ['departemen'] == 'REKAM MEDIK') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>REKAM MEDIK</option>';\n$groupoptions2 .= '<option value=\"ADMIN\"';if ($person ['departemen'] == 'ADMIN') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>ADMIN</option>';\n$groupoptions2 .= '<option value=\"ICD\"';if ($person ['departemen'] == 'ICD') $groupoptions2 .= ' selected';\n\t\t\t\t\t$groupoptions2 .= '>ICD</option>';\n\n\t\t$html = '\n\t\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\t<!-- No edit the next line -->\n\t\t\t\t<input type=\"hidden\" id=\"id\" name=\"id\" value=\"'.$person['nip'].'\">\n\n\t\t\t\t<table border=\"0\" width=\"100%\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">Nip *</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_nip\" name=\"v_nip\" size=\"25\" readonly=\"true\" value=\"'.$person['nip'].'\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">Password *</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_pwd\" name=\"v_pwd\" size=\"25\" value=\"'.$person['pwd'].'\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">SES_REG *</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_ses_reg\" name=\"v_ses_reg\" size=\"25\" value=\"'.$person['ses_reg'].'\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">ROLES *</td>\n\t\t\t\t\t<!--<td align=\"left\"><input type=\"text\" id=\"v_roles\" name=\"v_roles\" size=\"25\" value=\"'.$person['roles'].'\"></td>-->\n\t\t\t\t<td align=\"left\">'.$groupoptions.'</td>\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t<!--<tr>\n\t\t\t\t\t<td nowrap align=\"left\">KOde Unit *</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_kdunit\" name=\"v_kdunit\" size=\"25\" value=\"'.$person['kdunit'].'\"></td>\n\t\t\t\t</tr>-->\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">Departemen *</td>\n\t\t\t\t<!--<td align=\"left\"><SELECT id=\"v_departemen\" name=\"v_departemen\" >-->\n\t\t\t\t<td align=\"left\">'.$groupoptions2.'</td>\t\t\t\t\t\t\t\t\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_update(xajax.getFormValues(\"f\"));return false;\\'>Continue</button></td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t\t* Tidak boleh kosong\n\t\t\t\t';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b0e8c108920fe9243ecc8e2391a5e9b0", "score": "0.55411434", "text": "function _rw_field_edit_select($field){\r\n\t\t\r\n\t\t$field['value_range'] = _rw_setup_value_range_array($field);\r\n\t\t\r\n\t\t// build select options\r\n\t\t$select_options\t= '<option value=\"\">Select a '.$field['name'].'</option>';\r\n\t\tforeach($field['value_range'] as $option_value=>$option_label)\t\t\t\t\r\n\t\t\t$select_options\t .= '<option value=\"'.$option_value.'\"'.(($field['value']==$option_value) ? ' selected=\"selected\"' : \"\").'>'.$option_label.'</option>';\r\n\t\r\n\t\techo '<p><label class=\"screen-reader-text\" for=\"'.$field['slug'].'\">'.$field['name'].'</label>'.\r\n\t\t'<select name=\"'.$field['slug'].'\" id=\"select-'.$field['slug'].'\" class=\"'.($field['required'] ? 'required-meta-field' : '').'\">'.$select_options.\r\n\t\t'</select></p>';\r\n\t\t\t\t\r\n\t}", "title": "" }, { "docid": "5c55a3040bdad15b9e1695f1c4dec678", "score": "0.5540905", "text": "function ec_print_submenu_select( $id, $menuid ){\n\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\" onchange=\\\"ec_editor_select_submenu_change( );\\\">\";\n\tif( $menuid > 0 ){\n\t\t$db = new ec_db( );\n\t\t$menu_items = $db->get_menulevel2_items( );\n\t\tif( count( $menu_items ) > 0 ){\n\t\t\techo \"<option value=\\\"0\\\">Select a Menu Item (optional)</option>\";\n\t\t\tforeach( $menu_items as $menu ){\n\t\t\t\tif( $menu->menulevel1_id == $menuid ){\n\t\t\t\t\techo \"<option value=\\\"\" . $menu->menulevel2_id . \"\\\">\" . $menu->menu2_name . \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\techo \"<option value=\\\"0\\\">No SubMenu Items Exist</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No Menu Item Selected</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "539268a40c5557eb7244dc01ae3c7067", "score": "0.5529462", "text": "function user_printSelect_byRole($selectedID, $role, $showAll = false)\n{\n ?>\n <select name=\"userID\" size=\"1\">\n <?php\n if ($showAll) {\n echo '<option value=\"-1\">alle</option>';\n }\n $users = user_listByRole($role);\n while ($rs = db_fetch_array($users)) {\n echo '<option value=\"' . $rs['id'] . '\"' . (($selectedID == $rs['id']) ? \"selected=\\\"selected\\\"\" : \"\") . '>' . htmlspecialchars($rs['login']) . \"</option>\";\n }\n ?>\n </select>\n <?php\n}", "title": "" }, { "docid": "dd052fa12b166feb4ff8ad17aa29784b", "score": "0.5525732", "text": "function GetSelectDropdownList($tblprefix, $table, $fieldname, $datatoget,$datatodisplay, $updateid, $classname, $extrapram){\n\tglobal $db; \n\t$sql_ind = \"SELECT \".$tblprefix.$table.\".$datatoget, \".$tblprefix.$table.\".$datatodisplay from \".$tblprefix.$table.\" where status = 'A' \";\n\t$rs_ind = $db->Execute($sql_ind) or die($db->errorMSg());\n\t$isrs_ind = $rs_ind->RecordCount();\n\tif($isrs_ind){\n\t?>\n <select name=\"<?=$fieldname ?>\" id=\"<?=$fieldname ?>\" class=\"<?=$classname?>\" <?=$extrapram?> >\n\t<option value=\"\">Select</option>\n <?\t\n\t\twhile (!$rs_ind->EOF){ \n\t\t?>\n\t\t<option value=\"<?=$rs_ind->fields[$datatoget]?>\" <? if( strtolower($updateid) == strtolower($rs_ind->fields[$datatoget])){ ?> selected <? } ?>><?=ucfirst($rs_ind->fields[$datatodisplay])?></option>\n\t\t<?\n\t\t$rs_ind->MoveNext(); \n\t\t} \n\t\t?>\n\t\t</select>\n\t\t<?\n\t}\n}", "title": "" }, { "docid": "eb6ab507d6f836d4ec1aa9d3b9fbbd2a", "score": "0.5517984", "text": "function drawSelect($row,$name,$id=\"\"){\r\n $select=\"<select class='ui dropdown' name='$name'>\";\r\n $select.=\"<option value=''>Selecione...</option>\";\r\n foreach($row as $value){\r\n if($id==$value['nombre']) $select.=\"<option value=\".$value['id'].\" selected>\";\r\n else $select.=\"<option value=\".$value['id'].\">\";\r\n $select.=$value['nombre'].\"</option>\";\r\n \r\n }\r\n $select.=\"</select>\";\r\n return $select;\r\n}", "title": "" }, { "docid": "039ca6d8d142350801e5618f77fe989b", "score": "0.55162174", "text": "function opcionesSeleccion($rol, $actual) {\r\n if ($rol->obtenerNombreRol() == $actual) {\r\n echo '<option value=\"' . $rol->obtenerNombreRol() . '\" selected>' . $rol->obtenerNombreRol() . '</option>';\r\n } else {\r\n echo '<option value=\"' . $rol->obtenerNombreRol() . '\">' . $rol->obtenerNombreRol() . '</option>';\r\n }\r\n}", "title": "" }, { "docid": "3ce568086a696031de12729f12947124", "score": "0.5507701", "text": "function createdropdown3($data_query, $id) \n{\n\tif($id == '')\n\t$id = 1;\n\n\twhile ($dataset = tep_db_fetch_array($data_query)) \n\t{\n\t\techo \"<option value='\" . $dataset['d_value'] . \"'\"; \n\t\t\n\t\tif($id == 1)\n\t\t{\n\t\t\tif($dataset['d_option'] == 'Limit')\n\t\t\t{\n\t\t\t\techo 'selected';\n\t\t\t}\n\t\t\n\t\t}\n\t\telse\n\t\tif($id == 2)\n\t\t{\n\t\t\tif($dataset['d_option'] == 'Day')\n\t\t\t{\n\t\t\t\techo 'selected';\n\t\t\t}\n\t\t}\n\t\telse\n\t\tif($id == 3)\n\t\t{\n\t\t\tif($dataset['d_option'] == 'None')\n\t\t\t{\n\t\t\t\techo 'selected';\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\techo \">\" . $dataset['d_option'] . \"</option>\".\"\\n\";\n }\n}", "title": "" }, { "docid": "ecfdb29f6f916436a1f54db26f4d9eb7", "score": "0.5505997", "text": "function form_select_user_privilege($slct_name,$selected=0){\r\n global $USERS_PRIVILEGE;\r\n $html = <<<EOL\r\n <select name=\"{$slct_name}\" >\r\n\r\n \r\nEOL;\r\n foreach ($USERS_PRIVILEGE['users.privilege'] as $key=>$name){\r\n\r\n if($key == $selected){$select_this = 'selected=\"selected\" ';}else{$select_this=\"\";}\r\n if($key >= constant(\"USER_PRIV\")){$disable_this = 'disabled=\"disabled\" style=\"color=#a0a0a0;\" disabled';}else{$disable_this=\"\";}\r\n \r\n $html .=<<<EOL\r\n <option value=\"{$key}\" $select_this $disable_this>{$name}</option>\r\nEOL;\r\n }\r\n\r\n $html .=' </select>'; \r\n\r\n return $html; \r\n\r\n}", "title": "" }, { "docid": "16615e0fbf9043149546b565d5472571", "score": "0.54962206", "text": "function get_unit_id_select_callback($form, &$form_state) {\n\n $commands = array();\n $heading = $form_state['values']['node_title'];\n\n\n $commands[] = ajax_command_replace('#unit_id_select_wrapper', drupal_render($form['container']['category_wrapper']));\n // This will clear the State of Repair field if user re-choices another Category\n $commands[] = ajax_command_replace('#edit-equip-state',\n '<fieldset class=\"panel panel-default form-wrapper\" id=\"edit-equip-state\"><legend class=\"panel-heading\">\n <div class=\"panel-title fieldset-legend\">State of Repair</div></legend> <div class=\"panel-body\"> </div> </fieldset>'\n );\n\n $commands[] = ajax_command_remove('#heading');\n $commands[] = ajax_command_prepend('#edit-container', '<h2 id=\"heading\">' . $heading . '</h2>');\n\n $output = array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n\n return $output;\n}", "title": "" }, { "docid": "09e665cd19da839b3845dd1391be4a86", "score": "0.5493646", "text": "function edit_field_callback_1($value, $row)\n{\n\n return ' <select id=\"tipo\" name=\"tipo\">\n <option value=\"2\" selected>Automatica (Consumo)</option>\n <option value=\"1\">Automatica (Stock Minimo)</option>\n <option value=\"0\">Manual</option>\n <option value=\"3\">Ingreso</option>\n </select>';\n \n\n \n}", "title": "" }, { "docid": "a290aac88016f43369ff359fca953e90", "score": "0.5486683", "text": "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "title": "" }, { "docid": "23d7ce7d2392f97b902d20602b9634ba", "score": "0.54839903", "text": "function renderSecondIdDropDown($id=\"\", $name=\"\", $outputToPage=true)\r\n{\r\n\tglobal $table_pk, $Proj, $secondary_pk, $lang, $surveys_enabled;\r\n\t// Set id and name\r\n\t$id = (trim($id) == \"\") ? \"\" : \"id='$id'\";\r\n\t$name = (trim($name) == \"\") ? \"\" : \"name='$name'\";\r\n\t// Staring building drop-down\r\n\t$html = \"<select $id $name class='x-form-text x-form-field' style='padding-right:0;height:22px;'>\r\n\t\t\t\t<option value=''>{$lang['edit_project_60']}</option>\";\r\n\t// Get list of fields ONLY from follow up forms to add to Select list\r\n\t$followUpFldOptions = \"\";\r\n\t$sql = \"select field_name, element_label from redcap_metadata where project_id = \" . PROJECT_ID . \"\r\n\t\t\tand field_name != concat(form_name,'_complete') and field_name != '$table_pk' \r\n\t\t\tand element_type = 'text' order by field_order\";\r\n\t$q = db_query($sql);\r\n\twhile ($row = db_fetch_assoc($q))\r\n\t{\r\n\t\t$this_field = $row['field_name'];\r\n\t\t$this_label = \"$this_field - \" . strip_tags(label_decode($row['element_label']));\r\n\t\t// Ensure label is not too long\r\n\t\tif (strlen($this_label) > 57) $this_label = substr($this_label, 0, 40) . \"...\" . substr($this_label, -15);\r\n\t\t// Add option\r\n\t\t$html .= \"<option value='$this_field' \" . ($this_field == $secondary_pk ? \"selected\" : \"\") . \">$this_label</option>\";\r\n\t}\r\n\t// Finish drop-down\r\n\t$html .= \"</select>\";\r\n\t// Render or return\r\n\tif ($outputToPage) {\r\n\t\tprint $html;\r\n\t} else {\r\n\t\treturn $html;\r\n\t}\r\n}", "title": "" }, { "docid": "b986e69820616d222b849fc72a58cb06", "score": "0.54839176", "text": "function draw_select($key, $q) {\t\t$is_assoc = array_keys($q['options']) !== range(0, count($q['options']) - 1);\r\n\t\t// Draw Element\r\n\t\techo '<p'.$q['class'].'><label><span>'.$q['label'].'</span>'.\"\\n\";\r\n\t\techo \"\\t\".'<select name=\"'.$key.'\" id=\"'.$key.'\" class=\"txt\">'.\"\\n\";\r\n\t\tforeach ($q['options'] as $val => $opt) {\r\n\r\n\t\t\tif (!$is_assoc)\t$val = $opt;\r\n\t\t\t$sel = ($_POST[$key] == $val) ? ' selected=\"selected\"' : '';\r\n\t\t\techo \"\\t\\t\".'<option value=\"'.$val.'\"'.$sel.'>'.$opt.'</option>'.\"\\n\";\r\n\t\t}\r\n\t\techo \"\\t\".'</select></label></p>'.\"\\n\";\r\n\t}", "title": "" }, { "docid": "ff617c4c2d41cae5683265322c14cb21", "score": "0.54794675", "text": "static function buildSelectInputDocumentID($nameS,$idS,$modS,$foreignTableS, $curValS,$foreignschemeS,\r\n $nameCol,$parCol,$title,$name,$id,$val,$maxlength=\"50\",$readonly=\"\",$onblur=\"\") {\r\n \r\n echo '<LABEL>';\r\n echo '<SPAN>'.$title.' :</SPAN>';\r\n if ($onblur != \"\")\r\n $onblur = ' onBlur=\"'.$onblur.'\" ';\r\n echo '<SELECT class=\"italsisv3\" '.$disabled.' name=\"'.$nameS.'\" '\r\n . 'id=\"'.$idS.'\">';\r\n $modS->fillForeignTableComboParamBoth($foreignTableS,$curValS,\r\n $foreignschemeS,$nameCol,$parCol);\r\n echo '</SELECT>';\r\n echo '<INPUT class=\"italsisv3\" '.$readonly.' name = \"'.$name.'\" '\r\n . 'type=\"text\" onkeypress=\"return isNumber(event)\" '\r\n . 'id=\"'.$id.'\" value = \"'.$val.'\" ';\r\n echo $onblur; \r\n echo 'maxlength=\"'.$maxlength.'\" placeholder=\"'.$title.'\"></INPUT>';\r\n echo '</LABEL>'; \r\n }", "title": "" }, { "docid": "1709ea61f0e5a25aacfc27bd409614d6", "score": "0.54779965", "text": "abstract protected function saveSelectBoxValue($post_id, \\WP_Post $post);", "title": "" }, { "docid": "1c8f48ea57c1f9f9572e02444d89b4da", "score": "0.546802", "text": "public function set_rs_select() {\n }", "title": "" }, { "docid": "9b195eeaac0223395777e3c182640a36", "score": "0.54522514", "text": "function ec_print_submenu_multiple_select( $id, $menuid ){\n\techo \"<select multiple=\\\"multiple\\\" class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\t$db = new ec_db( );\n\t$menu_items = $db->get_menulevel2_items( );\n\tif( count( $menu_items ) > 0 ){\n\t\techo \"<option value=\\\"0\\\">Select a Menu Item (optional)</option>\";\n\t\tforeach( $menu_items as $menu ){\n\t\t\techo \"<option value=\\\"\" . $menu->menulevel2_id . \"\\\">\" . $menu->menu2_name . \"</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No SubMenu Items Exist</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "864937c417f978f98a4133c8a658561e", "score": "0.54159945", "text": "function pulldown_menu_2($label, $options, $selected, $js='') {\n\t$str = '<select name=\"'.$label.'\" id=\"'.$label.'\" '.$js.'>';\n\tforeach ( $options as $o=>$v ) {\n\t\t$s = ( $selected == $o ? ' selected=\"selected\"' : '' );\n\t\t$str .= '<option'.$s.' value=\"'.$o.'\">'.$v.'</option>';\n\t}\n\t$str .= '</select>';\n\treturn $str;\n}", "title": "" }, { "docid": "083405a1f6c69564df096d5c1a66ec9f", "score": "0.5404987", "text": "function selectCompagnieVide($id,$name){\n\t\t\t$resultat = \"<select name=\\\"$name\\\" id=\\\"$id\\\">\\n\\t<option selected value=\\\"-1\\\">Sélectionnez une compagnie</option>\\n\";\n\n\t\t\t$table = null;\n\t\t\t$table = TableRegistry::get('compagnie')\n\t\t \t->find()\n\t\t \t->toArray();\n\n\t\t foreach($table as $data){\n\t\t \t$resultat.=\"\\t<option value=\\\"\".$data['CodeCompagnie'].\"\\\">\".$data['NomCompagnie'].\"</option>\\n\";\n\t\t }\n\t\t\t$resultat.=\"</select>\";\n\t\t\treturn $resultat;\n\t\t}", "title": "" }, { "docid": "e46f6e2d71b39e590de5dffb96464d77", "score": "0.54044276", "text": "function generate_select_menu($option_array, $element_name, $item_id = null, $item_name = null, $id = null) {\n $_id = $id ? \"id='$id'\" : '';\n print \"<select $_id name='$element_name' class='nice-field'>\";\n if ($item_id)\n $this->printq(\"<option value=!<^@^>!$item_id!<^@^>!>$item_name</option>\");\n if (is_array($option_array)) {\n foreach ($option_array as $v) {\n $item_id != $v ? $this->printq(\"<option value= !<^@^>!$v!<^@^>!>$v</option>\") : print \"\";\n }\n } else {\n while ($row = parent::fetch($option_array)) {\n if ($item_id) {\n if ($item_id != $row[0])\n $this->printq(\"<option value=!<^@^>!$row[0]!<^@^>!>$row[1]</option>\");\n } else {\n $this->printq(\"<option value= !<^@^>!$row[0]!<^@^>!>$row[1]</option>\");\n }\n }\n }\n print \"</select>\";\n }", "title": "" }, { "docid": "4e80297181536f095f69782f5d5e8383", "score": "0.5404393", "text": "static function dropdown_before_exactly_after($select_name){\r\n\t\t\r\n\t\t$selected ='';\r\n\t\t$selected_value='';\r\n\t\r\n\t\t//check if we have a after,before,exactly selected \r\n\t\tif(isset($_POST['rdm_job_'.$select_name.'_before_exactly_after']) && $_POST['rdm_job_'.$select_name.'_before_exactly_after']){\r\n\t\t\t$selected = $_POST['rdm_job_'.$select_name.'_before_exactly_after'];\r\n\t\t}\r\n\t\t\r\n\t\t//check if we have a value for the date\r\n\t\tif(isset($_POST['rdm_job_'.$select_name.'_field_id']) && $_POST['rdm_job_'.$select_name.'_field_id']){\r\n\t\t\t$selected_value = $_POST['rdm_job_'.$select_name.'_field_id'];\r\n\t\t}\t\t\r\n\t\t\r\n\t\t?>\r\n\t\t<div class=\"rdm_input_header\">\r\n\t\t<select name=\"rdm_job_<?php echo $select_name;?>_before_exactly_after\" id=\"rdm_<?php echo $select_name;?>_before_exactly_after\">\r\n\t\t\t<option value=\"0\" <?php echo ($selected == '0') ? ' selected = \"selected\" ' : ''; ?>> <?php echo __('All','rdm-job-manager'); ?> </option>\r\n\t\t\t<option value=\"before\" <?php echo ($selected == 'before') ? ' selected = \"selected\" ' : ''; ?>> <?php echo __('Before','rdm-job-manager'); ?> </option>\r\n\t\t\t<option value=\"exactly\" <?php echo ($selected == 'exactly') ? ' selected = \"selected\" ' : ''; ?>> <?php echo __('Exactly','rdm-job-manager'); ?> </option>\r\n\t\t\t<option value=\"after\" <?php echo ($selected == 'after') ? ' selected = \"selected\" ' : ''; ?>> <?php echo __('After','rdm-job-manager'); ?> </option>\r\n\t\t</select>\r\n\t\t</div>\r\n\t\t<input type=\"text\" name=\"rdm_job_<?php echo $select_name;?>_field_id\" placeholder=\"dd-mm-yyyy\" value=\"<?php echo $selected_value;?>\">\r\n\t\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "7ccaf9e99516d5587ba0d0123eb48d8c", "score": "0.5387319", "text": "public function selectPartyNameSelectds()\n {\n\n\n $getItemCatDatas = DB::select('SELECT * FROM user_master WHERE is_deleted_status = \"N\" AND \n user_type = 1 ORDER BY party_name ASC ');\n\n if (!empty($getItemCatDatas)) {\n\n $itemCatListHtmls = '<option value=\"\"> Select Party Name</option>';\n\n $itemCatListHtml = '';\n foreach ($getItemCatDatas as $itemCat) {\n $itemCatListHtml .= '<option value=\"'.$itemCat->id.'\"';\n $itemCatListHtml .= '>'.$itemCat->party_name.'</option>';\n\n }\n\n echo $itemCatListHtmls.$itemCatListHtml;\n\n }\n\n }", "title": "" }, { "docid": "5638e7df22222e9784f3af86f6a28b87", "score": "0.5384672", "text": "public function get_id_type_product(){\n $typeProduct=dtb_typeproduct::all();\n foreach ($typeProduct as $type) {\n echo '<option value=\"'.$type->id.'\">'.$type->id.'-'.$type->name.'</option>';\n }\n }", "title": "" }, { "docid": "9599091491764111150ebd4aae6f6754", "score": "0.5367674", "text": "function render_select_list($id=0)\n {\n\n $tr = new Translate;\n $result = $this->get_newswire_list();\n $result_html = \"<select name=\\\"category\\\">\\n\";\n $result_html .= \"<option value=\\\"\\\">\" . $tr->trans('select_a_category') . \"</option>\\n\";\n while ($row=array_pop($result))\n {\n if ($default_category != $row['category_id'])\n {\n $result_html .= \"<option value=\\\"\" . $row['category_id'] . \"\\\" <\" . \"?php \";\n $result_html .= \"if ($\" . \"category==\" . $row['category_id'] . \") echo \\\"selected\\\" ?\" . \">>\";\n $result_html .= $row['name'];\n $result_html .= \"</option>\\n\";\n }\n }\n $result_html .= \"</select>\\n\";\n return $result_html;\n }", "title": "" }, { "docid": "0a0666cb52b490d483f7f1f510f63460", "score": "0.5363461", "text": "static function buildSelect($title,$name,$id,$mod,$foreignTable,$curVal,$foreignscheme=\"\",$event=\"\",$disabled=\"\") {\r\n\t\t\techo '<LABEL>';\r\n \t\techo '<SPAN>'.$title.' :</SPAN>';\r\n\t\t\tif ($event != \"\") {\r\n\t\t\t\t$event = 'onchange=\"'.$event.'\"';\r\n\t\t\t}\r\n\t\t\techo '<SELECT '.$disabled.' name=\"'.$name.'\" id=\"'.$id.'\" '.$event.' >';\r\n\t\t\t$mod->fillForeignTableCombo($foreignTable,$curVal,$foreignscheme);\r\n\t\t\techo '</SELECT>';\r\n\t\t\techo '</LABEL>';\r\n\t\t}", "title": "" }, { "docid": "4714ce264f5cf9fce272b276b175939d", "score": "0.5362149", "text": "public function select_field($params = array()) {\n extract($params);\n\n global $post, $pagenow;\n\n $prefix = $this->prefix;\n $prop_name = '';\n $prop_id = '';\n $prop_class = '';\n $value = '';\n $db_value = '';\n $extra_attr = '';\n\n if (isset($name) && $name != '' && $pagenow == 'post.php') {\n $db_value = get_post_meta($post->ID, $prefix . $name, true);\n }\n\n if (isset($id) && $id != '') {\n $prop_id = \" id=\\\"{$id}\\\"\";\n }\n if (isset($name) && $name != '') {\n $prop_name = \" name=\\\"{$prefix}{$name}\\\"\";\n }\n if (isset($cus_id) && $cus_id != '') {\n $prop_id = \" id=\\\"{$cus_id}\\\"\";\n }\n if (isset($cus_name) && $cus_name != '') {\n $prop_name = \" name=\\\"{$cus_name}\\\"\";\n }\n if (isset($classes) && $classes != '') {\n $prop_class = \" class=\\\"{$classes}\\\"\";\n }\n if (isset($ext_attr) && $ext_attr != '') {\n $extra_attr = \" $ext_attr\";\n }\n //echo $std;echo '-<';\n if (isset($std) && $std != '') {\n $value = $std;\n }\n if (isset($db_value)) {\n $value = $db_value;\n }\n if (isset($force_std) && $force_std != '') {\n $value = $force_std;\n }\n //echo $value;\n $html = \"<select{$prop_id}{$prop_name}{$prop_class}{$extra_attr}>\";\n if (isset($options) && is_array($options)) {\n foreach ($options as $opton_key => $opton_val) {\n $selected = $value == $opton_key ? ' selected=\"selected\"' : '';\n $html .= \"<option{$selected} value=\\\"{$opton_key}\\\">{$opton_val}</option>\" . \"\\n\";\n }\n }\n $html .= \"</select>\";\n\n if (isset($field_desc) && $field_desc != '') {\n $html .= \"<p class=\\\"field-description\\\">{$field_desc}</p>\";\n }\n\n if (isset($return) && $return === true) {\n return $html;\n } else {\n echo force_balance_tags($html);\n }\n }", "title": "" }, { "docid": "fc0dfb75c80e1fd020dd948c175e902c", "score": "0.5362102", "text": "function get_shift_select($rosterinfo, $shift) {\n if ($rosterinfo[$shift.'_shift']!=0) { // If shift is already filled.\n $coordie = mysql_fetch_assoc(mysql_query('SELECT * FROM people WHERE id='.$rosterinfo[$shift.'_shift']));\n $shiftselect = \"<strong>\".$coordie['first_name'].\" \".$coordie['surname'].\"</strong>\";\n if (!$rosterinfo[$shift.'_confirmed']) {\n $shiftselect .= \"<a href='6?action=edit&date=\".$rosterinfo['date'].\"&shift=$shift' title='Edit'>[edit]</a>\";\n }\n $shiftselect .= \"<br />\";\n } else { // If shift is empty.\n\t $shiftselect = \"<select name='\".$shift.\"shifts[\".$rosterinfo['date'].\"]'>\".get_coordie_options().\"</select>\";\n\t}\n\treturn $shiftselect;\n}", "title": "" }, { "docid": "9482edb275eb68c4e3a31785c4cfbbcb", "score": "0.53595537", "text": "public function get_id_right()\n\t{\n\t\treturn $this->id_right;\n\t}", "title": "" }, { "docid": "5fa1bd32021f17a6db88b8974a7383aa", "score": "0.5357089", "text": "function firstvalueselect($campo, $value1='', $value2='...') { // para un select cuando se quiere mostrar un primer campo\n\t\t$this->firstvalueselect[$campo]=\"<option value=\\\"$value1\\\">$value2</option>\\n\";\n\t}", "title": "" }, { "docid": "eb7beff632cbfc5d3444059312cc7f06", "score": "0.535473", "text": "function ec_print_productdetails_select( $id ){\n\t\n\tglobal $wpdb;\n\t$total = $wpdb->get_var( \"SELECT COUNT( ec_product.product_id ) as total FROM ec_product\" );\n\t\n\tif( $total > 500 ){\n\t\t\n\t\techo \"<input type=\\\"text\\\" class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\t\t\n\t}else{\n\t\t\n\t\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\t\t$products = $wpdb->get_results( \"SELECT ec_product.title, ec_product.model_number FROM ec_product ORDER BY ec_product.title\" );\n\t\tif( count( $products ) > 0 ){\n\t\t\techo \"<option value=\\\"0\\\">Select a Product</option>\";\n\t\t\tfor( $i=0; $i<count( $products ); $i++ ){\n\t\t\t\techo \"<option value=\\\"\" . $products[$i]->model_number . \"\\\">\" . $products[$i]->title . \"</option>\";\n\t\t\t}\n\t\t}else{\n\t\t\techo \"<option value=\\\"0\\\">No Products Exist</option>\";\n\t\t}\n\t\techo \"</select>\";\n\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "9d958a2963020e8aa089e7062f1e11dd", "score": "0.53524166", "text": "function action_select()\n { \n $output = $this->invoke(\"selectPage\");\n if ($output!=\"\")\n {\n $page = &$this->getPage();\n $page->addContent($this->m_node->renderActionPage(\"select\", $output));\n }\n }", "title": "" }, { "docid": "57c050f658c8293a0a3ffc7ea502532a", "score": "0.53509736", "text": "function lab_select( $select_name, $current_lab = NULL )\n{\n $query = \"SELECT labID, name \" .\n \"FROM lab \" .\n \"ORDER BY name \";\n $result = mysql_query( $query )\n or die( \"Query failed : $query<br />\" . mysql_error() );\n\n if ( mysql_num_rows( $result ) == 0 ) return \"\";\n\n $text = \"<select name='$select_name' size='1'>\\n\";\n while ( list( $labID, $name ) = mysql_fetch_array( $result ) )\n {\n $selected = ( $current_lab == $labID ) ? \" selected='selected'\" : \"\";\n $text .= \" <option value='$labID'$selected>$name</option>\\n\";\n }\n\n $text .= \"</select>\\n\";\n\n return $text;\n}", "title": "" }, { "docid": "a541c594822527339ddc4f1e96a167f7", "score": "0.5345419", "text": "function fun_getRegionListOptionstest($region_id='', $pregion_id='', $area_id=''){\t\t\n\t\t$selected = \"\";\n\t\t$where = array();\n\n\t\t$sql = \"SELECT * FROM \" . TABLE_REGION . \" \";\n\t\tif($pregion_id !=\"\"){\n\t\t\tarray_push($where, \"pregion_id='\".(int)fun_db_input($pregion_id).\"' \");\n\t\t}\n\t\tif($area_id !=\"\"){\n\t\t\tarray_push($where, \"area_id='\".(int)fun_db_input($area_id).\"' \");\n\t\t}\n\n\t\tif(sizeof($where) > 0){\n\t\t\t$sql .= \" WHERE \".join($where, \" AND \");\n\t\t}\n\n\t\techo $sql .= \" ORDER BY region_name\";\n\n\t}", "title": "" }, { "docid": "62becc01de082d4a856314ba9839e82a", "score": "0.53426427", "text": "public function setLeftFieldEdit($field,$left){\n $left[2] = str_replace(' ','',ucwords(str_replace('_',' ',$left[0])));\n $this->html['edit_content'] = ' <div class=\"row\">\n <div class=\"col-sm-12\">\n <div class=\"form-group\">\n <label class=\"control-label\">'.$field.'分类:<span class=\"require\">*</span></label>\n <select name=\"NoteTypeID\" class=\"form-control\" v-model=\"item.'.$field.'\">\n <option value=\"0\">请选择</option>\n <template v-for=\"entry in '.$left[2].'\">\n <option :value=\"entry.'.$field.'\" v-if=\"entry.'.$field.' == item.'.$field.'\" selected>\n {{ entry.'.$left[1].' }}\n </option>\n <option :value=\"entry.'.$field.'\" v-else>\n {{ entry.'.$left[1].' }}\n </option>\n </template>\n </select>\n </div>\n </div>\n </div>';\n $this->js['get_left'] .= \"this.getSelect('\".$left[2].\"')\";\n $this->js['more'] = $this->js['more']=='' ? $left[2].':[]' : ','.$left[2].':[],';\n }", "title": "" }, { "docid": "0d7709119d6b738d9d74de009548de5c", "score": "0.533651", "text": "function addSelection($summoners, $lane)\n{\n\techo \"<td class='col-lg-2 col-md-2 col-sm-2 col-xs-2'>\";\n\techo \"<select name='\".$lane.\"' id='\".$lane.\"'>\";\n\t/* correct for sub1 and sub2 possibly being null */\n\tif($lane == \"sub1\" || $lane ==\"sub2\")\n\t\techo \"<option value='0'>None</option>\";\n\tforeach($summoners as $players)\n\t{\n\t\techo \"<option value='\".$players->ppl_id.\"'>\".$players->summoner_name.\"</option>\";\n\t}\n\techo \"</select>\";\n\techo \"</td>\";\n}", "title": "" }, { "docid": "bb2944bde9f106bb3cc9e4c03c1d5d24", "score": "0.53363854", "text": "static function buildSelect2param($title,$name,$id,$mod,$foreignTable,$curVal,$foreignscheme=\"\",$event=\"\",$disabled=\"\",$param = \"\", $param2 = \"\",$readonly=\"\") {\r\n echo '<LABEL>';\r\n echo '<SPAN>'.$title.' :</SPAN>';\r\n if ($event != \"\")\r\n $event = ' onBlur=\"'.$event.'\" ';\r\n\r\n\t\techo '<SELECT '.$disabled.' name=\"'.$name.'\" id=\"'.$id.'\" '.$event.' style=\"widht:10%\" >';\r\n $mod->fillForeignTableComboParamBoth($foreignTable,$curVal,$foreignscheme, $param,$param2);\r\n echo '</SELECT>';\r\n echo $event;\r\n echo '</LABEL>';\r\n \r\n }", "title": "" }, { "docid": "1a6e2774df40b5b3c0df3b9040db2e9a", "score": "0.53284043", "text": "function getSelectName() {\n\t\treturn 'selectedAttachments';\n\t}", "title": "" }, { "docid": "2edcb30ac3d5ccb57a29660307cd4e46", "score": "0.53209966", "text": "function material_drop_down($material_ID = 0, $required_field = 0) {\n\t// start the session:\n\tsession_start();\n\t// enable the DB connection:\n\tinclude 'db_conn.php';\n\t\n\t?>\n\t<select data-plugin-selectTwo class=\"form-control populate\" name=\"material_ID\"<?php if ($required_field == 1) { ?> required<?php } ?>>\n\t\t<?php\n\t\n\t\t$get_mats_SQL = \"SELECT * FROM `material` WHERE `record_status` = '2' ORDER BY `name_EN` ASC\";\n\t\t// echo $get_mats_SQL;\n\n\t\t$result_get_mats = mysqli_query ( $con, $get_mats_SQL );\n\t\t// while loop\n\t\twhile ( $row_get_mats = mysqli_fetch_array ( $result_get_mats ) ) {\t\n\t\t\t$mat_ID = $row_get_mats['ID'];\n\t\t\t$mat_name_EN = $row_get_mats['name_EN'];\n\t\t\t$mat_name_CN = $row_get_mats['name_CN'];\n\t\t\t$mat_description = $row_get_mats['description'];\n\t\t\t$mat_record_status = $row_get_mats['record_status'];\n\t\t\t$mat_wiki_URL = $row_get_mats['wiki_URL'];\n\t\t\n\t\t\t// now show the result!\n\t\t\t?>\n\t\t\t<option value=\"<?php echo $mat_ID; ?>\"<?php if ($mat_ID == $material_ID) { ?> selected=\"selected\"<?php } ?>><?php echo $mat_name_EN; \n\t\t\t\n\t\t\tif (($mat_name_CN != '')&&($mat_name_CN != '中文名')){\n\t\t\t\techo \" / \" . $mat_name_CN;\n\t\t\t}\n\t\t\t\n\t\t\t?></option>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t</select>\n\t<?php\n}", "title": "" }, { "docid": "5a29820013c49d62cac6c191feed53c5", "score": "0.53176993", "text": "function record_status_drop_down($current_status) {\n// now output the result:\n?>\n<select class=\"form-control populate\" name=\"record_status\" id=\"record_status\" data-plugin-selectTwo>\n <option value=\"0\"<?php if ($current_status == 0) { ?> selected=\"selected\"<?php } ?>>✘ DELETED ✘</option>\n <option value=\"1\"<?php if ($current_status == 1) { ?> selected=\"selected\"<?php } ?>>? PENDING ?</option>\n <option value=\"2\"<?php if ($current_status == 2) { ?> selected=\"selected\"<?php } ?>>✔ PUBLISHED ✔</option>\n</select>\n<?php\n}", "title": "" }, { "docid": "635e7456799ea7293ab5fe3e8164fbbb", "score": "0.531614", "text": "function combo_key($n,$items,$select=\"\",$d=false)\n{\n $disabled = \"\";\n \n if(strlen($n)==4){$zero = \"00\";}\n else {$zero=\"0\";}\n $combo = '<select name=\"'.$zero.$n.'\" id=\"'.$zero.$n.'\" class=\"input_text\" '.$disabled.' >';\n $combo .= '<option value=\"\">::Seleccione::</option>';\n foreach($items as $key => $val)\n {\n if($key==$select){$combo .= '<option value=\"'.$key.'\" selected=\"selected\">'.$val.'</option>';}\n else {$combo .= '<option value=\"'.$key.'\">'.$val.'</option>';}\n }\n $combo .= '</select>';\n echo $combo;\n}", "title": "" }, { "docid": "57aa92ae3ef447b1e217b12910fe50fd", "score": "0.5309219", "text": "function set_selID($selID,$get_info=YES)\n\t{\n\t\tglobal $db;\n\n\t\t$this->selID = $selID;\n\n\t\tif ($get_info == YES)\n\t\t{\n\t\t\t$inf = $this->get_info();\n\t\t\t$fields = $inf['FIELDS'];\n\t\t\t$table = $inf['TABLE'][0];\n\t\t\t$prefix = $inf['TABLE'][1];\n\t\t\t$idfield = $inf['TABLE'][2];\n\n\t\t\t$pull_fields = array($prefix.'_'.$idfield);\n\t\t\twhile (list($a,list($f,$t)) = each($fields))\n\t\t\t{\n\t\t\t\t$pull_fields[] = \"${prefix}_$f\";\n\t\t\t}\n\n\t\t\t// pull in the values\n\t\t\t$sql = \"SELECT \".implode(\",\",$pull_fields).\" FROM $table WHERE ${prefix}_$idfield=$this->selID\";\n\t\t\t$result = mysql_query($sql,$db);\n\t\t\t$this->error->mysql(__FILE__,__LINE__);\n\t\t\tif (mysql_num_rows($result))\n\t\t\t{\n\t\t\t\t$row = mysql_fetch_assoc($result);\n\t\t\t\twhile (list($k,$v) = each($row))\n\t\t\t\t{\n\t\t\t\t\t$this->info[substr($k,4)] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { $this->info = array(); }\n\t\t}\n\t}", "title": "" }, { "docid": "a0cf2aac72e42a8c5d14d50e5479960c", "score": "0.530053", "text": "static function buildInputCustomDocumentID($nameS,$idS,$modS,$foreignTableS,\r\n $curValS,$foreignschemeS,$title,$name,$id,$val,$maxlength=\"50\",$readonly=\"\",$onblur=\"\",$disabledsel=\"\"){\r\n echo '<LABEL>';\r\n echo '<SPAN>'.$title.' :</SPAN>';\r\n if ($onblur != \"\")\r\n $onblur = ' onBlur=\"'.$onblur.'\" ';\r\n echo '<SELECT class=\"italsisv3\" '.$disabledsel.' name=\"'.$nameS.'\" id=\"'.$idS.'\">';\r\n $modS->fillForeignTableCombo($foreignTableS,$curValS,$foreignschemeS);\r\n echo '</SELECT>';\r\n echo '<INPUT class=\"italsisv3\" '.$readonly.' name = \"'.$name.'\" type=\"text\" onkeypress=\"return isNumber(event)\" id=\"'.$id.'\" value = \"'.$val.'\" ';\r\n echo $onblur; \r\n echo 'maxlength=\"'.$maxlength.'\" placeholder=\"'.$title.'\"></INPUT>';\r\n echo '</LABEL>';\t\r\n}", "title": "" }, { "docid": "fb2c1c62cef4634990ab30560a655d5d", "score": "0.5298312", "text": "function ec_print_product_display_type_select( $id ){\n\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\t\techo \"<option value=\\\"1\\\" selected=\\\"selected\\\">Default Product Display Type</option>\";\n\t\techo \"<option value=\\\"2\\\">Same as Product Widget Display</option>\";\n\t\techo \"<option value=\\\"3\\\">Custom Display Type 1</option>\";\n\techo \"</select>\";\n}", "title": "" }, { "docid": "1e13044a201230e3433274ecda7ade59", "score": "0.5293554", "text": "public function teacher_select_box(int $dept_id)\n {\n global $wpdb;\n $this->table = $wpdb->prefix . 'department';\n $this->dept_data = $wpdb->get_results(\"SELECT dept_name, dept_id FROM \" . $this->table . \" WHERE dept_id=\" . $dept_id . \"\");\n if ($this->dept_data) {\n\n ?>\n <option value=\"<?php echo $this->dept_data[0]->dept_id ?>\" selected >\n <?php echo $this->dept_data[0]->dept_name ?>\n </option>\n <?php\n\n } else {\n\n ?>\n <option value=\"\" selected disabled hidden>No Department</option>\n <?php\n\n }\n }", "title": "" }, { "docid": "b4bd522f6a15e67d7f4f1daf77def1d3", "score": "0.5290813", "text": "public function RoomTypeId_ForHotelId(){\n\t\t$hotel_id=$_GET['hotel_id'];\n\t\t// $data['all_hotels'] = $this->hotel_model->get_all_hotels($id);\n\t\t$data = $this->room_model->get_room_by_id($hotel_id);\n\t\t// $this->load->view('admin/layout', $data);\n\t\t// var_dump($data);\n\t\techo '<option value=\"'.'0'.'\">'.'Select Room'.'</option>';\n\t\tforeach ($data as $room_type) {\n\t\t// echo $data['room_type']['room_type_id'];\n\t \t\t// var_dump($room_type);\n\t\t\t$room_type_id=$room_type['room_type_id'];\n\t\t\t$room_type_name=$room_type['hotel_room_type'];\n\t\t\techo '<option value=\"'.$room_type_id.'\">'.$room_type_name.'</option>';\n\t\t}\n\t}", "title": "" }, { "docid": "2a0b064580c395cb4a2d13d228d2bfa6", "score": "0.52906036", "text": "public function multi_select() {\n\t}", "title": "" }, { "docid": "71eac85d9b5be38d354bb7e1d4abfb76", "score": "0.5287888", "text": "function affichageSelect() {\n $returnValue = '<select id=\"club\">';\n foreach ($this->_clubs as $key => $club) {\n $returnValue = $returnValue.'<option value=\"'.$key.'\" region=\"'.$club->idRegion().'\">';\n $name = ( $key == 0 ) ? 'tous les clubs' : $club->name();\n $returnValue = $returnValue.$name.'</option>';\n }\n $returnValue = $returnValue.'</select>';\n\n return $returnValue;\n }", "title": "" }, { "docid": "b74bca329c7e3428edcc1f670f43d986", "score": "0.52825046", "text": "function opcionesSelect($combo) {\r\n if ($combo == 'comboRoles') { // carga el combo de permisos roles\r\n echo '<select class=\"form-control \" name =\"' . $combo . '\" id=\"' . $combo . '\" onchange=\"guardarvaloractual(this);\" >';\r\n } else if ($combo == 'comboRolesModal') { //carga el combo de eliminacion\r\n echo '<select class=\"form-control \" name =\"' . $combo . '\" id= \"' . $combo . '\" >';\r\n } else if ($combo == 'comboRolesUsuariosModal') { //carga el combo de usuarios roles\r\n echo '<select class=\"form-control \" name =\"' . $combo . '\" id= \"' . $combo . '\" onchange=\"comboRolesUsuarios(this);\" >';\r\n }\r\n}", "title": "" }, { "docid": "24a7cefe1c3584b90b7bd5b0c2b290ee", "score": "0.5280464", "text": "function printSelect($execFunction=null,$id ){\n \n $arreglo =& self::getRecordbyID($id);\n \n $html = \"<br><h5>Select Product Family</h5><br>\n <select id='pfamily' name='pfamily' onChange=\\\"xajax_$execFunction(document.getElementById('pfamily').value);\\\">\n <option value='0'> -- None --</option>\";\n while ($row=$arreglo->fetchRow()) {\n $html .= \"<option value='\".$row['id'].\"'>\".$row['strname'].\"</option>\"; }\n\n $html .= \"</select>\";\n return $html;\n \n}", "title": "" }, { "docid": "3b12021dd5c4e64d2c4c331f0e1a13ab", "score": "0.5280265", "text": "function dropdowntratamientos($name) {\r\n $str .= \"select mltr_cod, mltr_descripcion from mltr_tratamientos order by mltr_descripcion\";\r\n $str_res = db_query($str);\r\n $a_str_res = array();\r\n while ($row = db_fetch($str_res)) {\r\n $a_str_res[$row['MLTR_COD']] = $row['MLTR_DESCRIPCION'];\r\n }\r\n return dropdown($name, $a_str_res, '0', ' id=\"' . $name . '\" class=\"arc90_multiselect\" multiple=\"multiple\"');\r\n}", "title": "" }, { "docid": "7266f91eed996227f24aa564b3dc0720", "score": "0.52779764", "text": "function Htmls_Select_Hashes_Field($fieldname,$items,$args=array(),$selectoptions=array(),$optionsoptions=array())\n {\n $selected=$this->MyHash_Default($args,\"Selected\",0);\n $namekey=$this->MyHash_Default($args,\"Name_Key\",\"Name\");\n $titlekey=$this->MyHash_Default($args,\"Title_Key\",\"Title\");\n $idkey=$this->MyHash_Default($args,\"ID_Key\",\"ID\");\n $emptytext=$this->MyHash_Default($args,\"Empty_Text\",\"\");\n \n $optionsoptions[ \"VALUE\" ]=\" 0\";\n $selects=\n array\n (\n $this->Html_Tags\n (\n \"OPTION\",\n $emptytext,\n $optionsoptions\n )\n );\n\n foreach ($items as $rid => $item)\n {\n //Copy of options, preventing mixing option options.\n $roptionsoptions=$optionsoptions;\n \n $id=$item[ $idkey ];\n $title=$this->Html_Option_Title($titlekey,$item,$namekey);;\n if ($id==$selected)\n {\n $roptionsoptions[ \"SELECTED\" ]=\"\";\n $roptionsoptions[ \"CLASS\" ]=\"selected\";\n $roptionsoptions[ \"CLASS\" ]=\"selected\";\n $selectoptions[ \"TITLE\" ]=$title;\n }\n\n $roptionsoptions[ \"VALUE\" ]=$id;\n $roptionsoptions[ \"TITLE\" ]=$this->Html_Option_Title($titlekey,$item);\n\n if (!empty($item[ \"Disabled\" ]))\n {\n $roptionsoptions[ \"DISABLED\" ]=\" \";\n $roptionsoptions[ \"CLASS\" ]= \"disabled\";\n }\n\n array_push\n (\n $selects,\n $this->Html_Tags\n (\n \"OPTION\",\n $item[ $namekey ],\n $roptionsoptions\n )\n );\n }\n \n $selectoptions[ \"NAME\" ]=$fieldname;\n\n return\n $this->Htmls_Tag\n (\n \"SELECT\",\n array($selects),\n $selectoptions\n );\n }", "title": "" }, { "docid": "aa42c071964dc58c5784803f08949ddb", "score": "0.52769035", "text": "public function select_field_callback( $args ) {\n\t\n\t\t$options = $this->options;\n\t\n\t\tif( !isset( $options['default_buyer_status'] ) )\n\t\t\t$options['default_buyer_status'] = 'individuals';\n\t\n\t\tif( !isset( $options['default_vendor_status'] ) )\n\t\t\t$options['default_vendor_status'] = 'either';\n\t\n\t\tif( !isset( $options['default_business_type'] ) )\n\t\t\t$options['default_business_type'] = 'either';\n\t\n\t\t$html = '';\n\t\t$f_id\t= $args['field_id'];\n\t\t$current = isset($options[ $f_id ])?$options[ $f_id ]:'';\n\t\n\t\t$html .= '<select id=\"' . $f_id . '\" ' .\n\t\t\t\t'name=\"' . mangopayWCConfig::OPTION_KEY . '[' . $f_id . ']\">';\n\t\n\t\tif( 'default_business_type' == $f_id ) {\n\t\t\t$html .= \"<option value='organisations' \" . selected( 'organisations', $current, false ) . '>' .\n\t\t\t\t\t__( 'Organisations', 'mangopay' ) . '</option>';\n\t\t\t$html .= \"<option value='soletraders' \" . selected( 'soletraders', $current, false ) . '>' .\n\t\t\t\t\t__( 'Soletraders', 'mangopay' ) . '</option>';\n\t\t} else {\n\t\t\t$html .= \"<option value='individuals' \" . selected( 'individuals', $current, false ) . '>' .\n\t\t\t\t\t__( 'Individuals', 'mangopay' ) . '</option>';\n\t\t}\n\t\t$html .= \"<option value='businesses' \" . selected( 'businesses', $current, false ) . '>' .\n\t\t\t\t__( 'Businesses', 'mangopay' ) . '</option>';\n\t\t$html .= \"<option value='either' \" . selected( 'either', $current, false ) . '>' .\n\t\t\t\t__( 'Either', 'mangopay' ) . '</option>';\n\t\n\t\t$html .= '</select>';\n\t\n\t\techo $html;\n\t}", "title": "" }, { "docid": "32730f13d767ebb13249fe62c553bff7", "score": "0.5270687", "text": "function GET_DDL_ROLE($array,$selected)\n {\n echo '<option value=\"\">Select</option>';\n foreach ($array as $item)\n {\n if ($selected == $item['name'])\n echo '<option value=\"' . $item['roleID'] . '\" selected>' . $item['name'] . '</option>';\n else echo '<option value=\"' . $item['roleID'] . '\">' . $item['name'] . '</option>';\n }\n }", "title": "" }, { "docid": "57babbefdba03638b826c47da0a9a2b4", "score": "0.5270049", "text": "public function select() {\n\t\tif( $this->require_role('admin,super-agent,agent') ) {\n\t\t\t$polls = array();\n\t\t\t\n\t\t\tforeach ($this->main_model->getActivePolls() as $poll) {\n\t\t\t\t$polls[$poll->id] = '['.$poll->code.'] '.$poll->label;\n\t\t\t}\n\t\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'content' => 'polls/select',\n\t\t\t\t'title' => \"Sélection de sondage\",\n\t \t\t'js_to_load' => array('polls.js?v=1'),\n\t \t\t'content_data' => array(\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'Sondage' \t=> form_dropdown('poll', $polls, null, 'class=\"form-control\"')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' && set_value('poll', false)){\n\t\t\t\t$seleted_poll_id = set_value('poll', false);\n\t\t\t\t\n\t\t\t\tredirect('/respondents/add/'.$seleted_poll_id);\n\t\t\t}\n\t\t\t\n\t\t\t$this->load->view('global/layout', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "d486eb3c6f8c6ca338a8fd5dbbb231cc", "score": "0.5258787", "text": "function getTierOne()\n{\n\t$result = mysql_query(\"SELECT DISTINCT rw, id_rw FROM arsip_rw\") \n\tor die(mysql_error());\n\n\t while($tier = mysql_fetch_array( $result )) \n \n\t\t{\n\t\t echo '<option value=\"'.$tier['rw'].'\">RW. '.$tier['rw'].'</option>';\n\t\t}\n\n}", "title": "" }, { "docid": "bacf28cffd2da9e9be7bb81346c76511", "score": "0.5258668", "text": "public function selecUnitdSelectds()\n {\n \n // $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n // if (!empty($itemTypeIds)) {\n\n $getUnitsIdData = DB::select('SELECT * FROM unit_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getUnitsIdData)) {\n\n foreach ($getUnitsIdData as $units) {\n\n $unitsListHtml = '<option value=\"'.$units->id.'\"';\n $unitsListHtml .= '>'.$units->unit.'</option>';\n\n echo $unitsListHtml; \n\n }\n\n }\n // }\n }", "title": "" }, { "docid": "33a4efb1d456bccc6238bc98e00b31fe", "score": "0.52435166", "text": "function fnsearchdesccombo($utype,$selid=\"\")\n\t{\n\t\tglobal $db;\n\t\t$str=\"\";\n\t\t\n\t\t$SQL_TITLE = \"SELECT * FROM staticpages WHERE fldIsStatic=0 AND fldUserTypeId='\".$utype.\"' ORDER BY fldStaticPageName\";\n\t\t$res = $this->dbclass->select($SQL_TITLE);\t\n\n\t\t$str.=\"<OPTION value=\\\"0\\\"> - Select - </OPTION>\";\n\t\t//while($row = $db->fn_fetch_array($res))\n\t\t$t=count($res);\n\t\tfor($i=0;$i<$t;$i++)\n\t\t{\n\t\t\tif($row[$i]['fldStaticPageId'] == $selid)\n\t\t\t\t$selected = \"SELECTED\";\n\t\t\telse \n\t\t\t\t$selected = '';\n\t\t\t\t\n\t\t\t$str.=\"<OPTION value=\".$row[$i]['fldStaticPageId'].\" $selected>\".$row[$i]['fldStaticPageName'].\"</OPTION>\";\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "29005ccf14a59ec5b3d72cdde12e714e", "score": "0.5240099", "text": "function makeOptionBedType($arr_bed_type,$enc_id)\r\n {\r\n try\r\n {\r\n if(empty($arr_bed_type))\r\n {\r\n $CI = &get_instance();\r\n $CI->load->model(\"assets_model\");\r\n $arr_bed_type = $CI->assets_model->fetch_bed_type_list();\r\n }\r\n $s_option = '';\r\n if(!empty($arr_bed_type))\r\n {\r\n \r\n foreach($arr_bed_type as $val)\r\n {\r\n $s_select = '';//defined here for unsetting this var \r\n if(encrypt($val['id']) == $enc_id)\r\n {\r\n $s_select = \" selected \";\r\n \r\n }\r\n $s_option .= \"<option $s_select value='\".encrypt($val['id']).\"'>\".$val['s_name'].\"</option>\";\r\n }\r\n unset($s_select) ; \r\n }\r\n unset($enc_id,$arr_property_type);\r\n return $s_option; \r\n \r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "4207bb1ea9b9221466c9e636555c5400", "score": "0.5232134", "text": "static function getSelect($con,$val=false) {\n\t\t\tglobal $contents,$parts;\n\t\t\t$g = $parts[\"calendar\"][\"settings\"];\n\t\t\t$out = \"<select name='$con'><option value=''>-</option>\";\n\t\t\t$val = @$g[$con];\n\t\t\tif (in_array($con, array(\"minutes\",\"minTime\",\"maxTime\")))\n\t\t\t\treturn \"<input name='$con' type='number' value='$val'>\";\n\t\t\tif ($con==\"dropable\")\n\t\t\t\treturn \"<input name='$con' type='radio' value='0' \".($val?\"\":\"checked\").\"> Kapalı\n\t\t\t\t\t\t<input name='$con' type='radio' value='1' \".($val?\"checked\":\"\").\"> Açık\";\n\t\t\tswitch ($con) {\n\t\t\t\tcase \"connect\":\n\t\t\t\t\tforeach($contents as $k => $d)\n\t\t\t\t\t\t$out .= \"<option \".($val==$k?\"selected\":\"\").\" value='$k'>$d[name]</option>\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: \n\t\t\t\t\t$db = $g[\"connect\"];\n\t\t\t\t\tif (isset($contents[$db][\"parts\"])) \n\t\t\t\t\tforeach($contents[$db][\"parts\"] as $k => $d)\n\t\t\t\t\t\t$out .= \"<option \".($val==$k?\"selected\":\"\").\" value='$k'>\n\t\t\t\t\t\t\t\t\".@array_shift(explode(\"||\",$d[\"name\"])).\"</option>\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$out .= \"</select>\";\n\t\t\treturn $out;\n\t\t}", "title": "" }, { "docid": "6fb4de70a5a3445ea19621fa6e69900f", "score": "0.5230651", "text": "function fill_types_clothes(){\n\t\t$types = select(\"select id, nombre from tipo_producto\");\n\t\t\n\t\tfor($i=0;$i<count($types);$i++){\n\t\t\techo('<option value=\"'.array_values($types[$i])[0].'\">'.array_values($types[$i])[1].'</option>');\n\t\t}\n\t}", "title": "" }, { "docid": "7df297e23a7d8530f1e7561c5d06e681", "score": "0.5224567", "text": "public function iFillTheUiSelectWithAndSelectElement2($id, $item)\n {\n $items = explode(\"-\", $item);\n \n if(count($items) > 0){\n $item = $items[0].'-'.((int)$items[1] - 1);\n }else {\n $item = \"0-\".((int)$item - 1);\n }\n $idItem = sprintf(\"#ui-select-choices-row-%s\",$item);\n $this->iClickTheElement(sprintf(\"#%s > div.ui-select-match.ng-scope > span\",$id));\n $this->spin(function($context) use ($idItem){\n $element = $context->findElement($idItem);\n return $element != null;\n },20);\n $element = $this->findElement($idItem);\n $element->click();\n }", "title": "" }, { "docid": "961f84c0cfe46e5dbbaf874abb8786a3", "score": "0.52243906", "text": "function generateSelect2($name, $val = array(), $txt = array(), $current, $blank = 'N', $change = 'N', $width = 0) {\n\n if ($width > 0) {\n $select = \"<select style='width:\" . $width . \"px;' name='\";\n } else {\n $select = \"<select name='\";\n }\n\n if ($change == 'N') {\n $html = $select . $name . \"' id='\" . $name . \"' >\";\n } else {\n $html = $select . $name . \"' id='\" . $name . \"' onchange='\" . $change . \"' >\";\n }\n\n // do we need a blank entry in ere??\n if ($blank == 'Y') {\n $html .= \"<option></option>\";\n }\n\n $i = 0;\n foreach ($txt as $txt => $value) {\n if (trim($value) == trim($current))\n $html .= \"<option value='\" . $val[$i] . \"' selected>\" . $value . \"</option>\";\n else\n $html .= \"<option value='\" . $val[$i] . \"'>\" . $value . \"</option>\";\n $i++;\n }\n\n $html .= '</select>';\n\n return $html;\n}", "title": "" }, { "docid": "ddf437d1c1f783f86aa5397b9ef1923b", "score": "0.5218816", "text": "function print_sidebar_select($value) {\r\n\t\tif(isset($value['std'])) {\r\n\t\t\t$default = $value['std'];\r\n\t\t} else {\r\n\t\t\t$default = false;\r\n\t\t}\r\n\t\tif(isset($value['protected'][0][\"id\"])) {\r\n\t\t\t$protectedValue = $value['protected'][0][\"id\"];\r\n\t\t} else {\r\n\t\t\t$protectedValue = false;\r\n\t\t}\r\n\t\t\r\n\t\t$protected_value = $this->get_field_value($protectedValue, $default);\r\n\t\t\r\n\t\tif(((isset($protectedValue) && $protectedValue!=\"\") && $protected_value==$value['protected'][0][\"value\"]) && $protected_value_1==$value['protected'][1][\"value\"] || ($protectedValue==false)) {\r\n\r\n\t\t\t$input_value = $this->get_field_value($value['id'], $default);\r\n\r\n\t\t\t$sidebar_names = get_option( THEME_NAME.\"_sidebar_names\" );\r\n\t\t\t$sidebar_names = explode( \"|*|\", $sidebar_names );\r\n\t\t\r\n\t\t?>\r\n\t\t<?php if( isset($value['home']) && $value['home'] == \"yes\" ) { ?><div class=\"input-item-full-width-inside clearfix\"><?php } else { ?>\r\n\t\t<div class=\"input-item-full-width clearfix\">\r\n\t\t<?php } ?>\r\n\t\t\t<label><?php echo $value['title'];?></label>\r\n\t\t\t<span class=\"select\">\r\n\t\t\t\t<select name=\"<?php echo $value[\"id\"];?>\" class=\"styled\">\r\n\t\t\t\t\t<option value=\"\">Default</option>\r\n\t\t\t<?php\r\n\t\t\t\tforeach ($sidebar_names as $sidebar_name) {\r\n\t\t\t\t\tif ( $input_value == $sidebar_name ) {\r\n\t\t\t\t\t\t$selected=\"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\t$selected=\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\tif ( $sidebar_name != \"\" ) {\r\n\t\t\t?>\r\n\t\t\t\t\t<option value=\"<?php echo $sidebar_name;?>\" <?php echo $selected;?>><?php echo $sidebar_name;?></option>\r\n\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t\t</select>\r\n\t\t\t</span>\r\n\t\t<?php\r\n\t\t\t$saved_value = get_option( $value['id'].'s' );\r\n\t\t\t$saved_value = stripslashes($saved_value);\r\n\t\t\techo '<input type=\"hidden\" name=\"'.$value['id'].'s\" id=\"'.$value['id'].'s\" value=\"'.$saved_value.'\" />';\r\n\t\t?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e45ca6a05f0a8a2d1a084d2f5cadc2a7", "score": "0.52143186", "text": "public function get_select() //BvS NB parameter ?_app removed\n\t{\n\t\t /* BvS This works but will cause immediate submit after clicking a letter and thus\n\t\t\tnot permitting to choose another street beginning with the same letter:\n\t\t\t$this->result = \"<select name='street' id='street' onchange='this.form.submit()'>\";\n\t\t */\n\t\t$streets=$this->get_streets();\n\n\t\t$this->result = \"<select name='street' id='street'>\";\n\t\t$hidden='';\n\t\tif (!$this->location_id)\n\t\t{\n\t\t\t$this->location_id=-1;\n\t\t\t$this->default_option_content=\"Sélectionnez votre adresse\";\n\t\t\t$hidden=' hidden'; //hidden prevents placeholder to be added to dropdown list (in case select2 is not used e.g. when javascript is disabled)\n\t\t}\n\t\t$this->result = $this->result .\n\t\t\t\"<option value='{$this->location_id}' selected\".$hidden.\">{$this->default_option_content}</option>\";\n\n\t\tforeach ( $streets as $id => $full_name)\n\t\t{\n\t\t\tif ($id!==$this->location_id){ //prevent double entry if $id is in selected option\n\t\t\t\t$this->result = $this->result . \"<option value=$id>$full_name</option>\";\n\t\t\t}\t\t\t\n\t\t}\n\t\t$this->result = $this->result . \"</select>\";\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "b7f9baf5105fcd03cbba8ed9d0b7464d", "score": "0.52122486", "text": "public static function get_edit_form_menu($disabled, $qualID, $typeID)\n\t{\n \n $jsModule = array(\n 'name' => 'mod_bcgtalevel',\n 'fullpath' => '/blocks/bcgt/plugins/bcgtalevel/js/bcgtalevel.js',\n 'requires' => array('base', 'io', 'node', 'json', 'event', 'button')\n );\n global $PAGE;\n $PAGE->requires->js_init_call('M.mod_bcgtalevel.aleveliniteditqual', null, true, $jsModule);\n \n\t\t$subtypeID = optional_param('subtype', -1, PARAM_INT);\n\t\t$subTypes = get_subtype_from_type(-1, LEVEL::level3ID, ALEVELQualification::FAMILYID);\n\t\tif($qualID != -1)\n\t\t{\n\t\t\t$qualSubType = Qualification::get_qual_subtype($qualID);\n\t\t}\n //need an init for alevel \n\t\t$retval = \"\";\n\t\t$retval .= '<input type=\"hidden\" name=\"level\" id=\"qualLevel\" value=\"'.LEVEL::level3ID.'\"/>';\n\t\t$retval .= '<div class=\"inputContainer\"><div class=\"inputLeft\">'.\n '<label for=\"subtype\"><span class=\"required\">*</span>'.\n get_string('subtype', 'block_bcgt').'</label></div>';\n\t\t$retval .= '<div class=\"inputRight\"><select '.$disabled.' name=\"subtype\" id=\"qualSubtype\">';\n\t\t\tif($subTypes)\n\t\t\t{\n\t\t\t\tif(count($subTypes) > 1)\n\t\t\t\t{\n\t\t\t\t\t$retval .= '<option value=\"-1\">'.get_string('pleaseselect', 'block_bcgt').'</option>';\n\t\t\t\t}\n\t\t\t\tforeach($subTypes as $subType) {\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($qualID != -1 && $qualSubType && ($subType->get_id() == $qualSubType->id))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t}\n\t\t\t\t\telseif($subtypeID != -1 && $subtypeID == $subType->get_id())\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t}\n\t\t\t\t\telseif(count($subTypes) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t}\n\t\t\t\t\t$retval .= \"<option $selected value='\".$subType->get_id().\"'>\".$subType->get_subtype().\"</option>\";\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$retval .= \"<option value=''>\".get_string('nosubtypes','block_bcgt').\"</option>\";\n\t\t\t}\n\t\t$retval .= \"</select></div></div>\";\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "6e2d0871e58ba0e74c85379a9f87a3f0", "score": "0.5202045", "text": "private function get_trades_select_html() {\n $this->get_trades();\n\n $html = '<select name=\"trade_id\" class=\"custom-select-sm\">';\n $current_trade = $this->job_offer->get('trade_id');\n\n foreach( $this->trades as $trade ) {\n $selected = $trade->get('id') == $current_trade ? 'selected=\"selected\"' : '';\n $html .= '<option '.$selected.' value=\"'.$trade->get('id').'\">'.$trade->get('name').'</option>';\n }\n\n $html .= '</select>';\n return $html;\n }", "title": "" }, { "docid": "9c83c29295cd1f70392be159d61283e9", "score": "0.52018046", "text": "function selectBox($name,$sel,$class=0,$valuesArray=0, $select_one=0, $onchange=0){\n\t$html = '<select id=\"'.$name.'\" name=\"'.$name.'\"';\n\tif($class) $html .= ' class=\"'.$class.'\"';\n\tif($onchange) $html .= ' onChange=\"'.$onchange.'\"';\n\t$html .= '>';\n\tif(!$select_one) $select_one = 'Select One';\n\tif($select_one && !is_int($select_one)) $html .= '<option value=\"\" style=\"color:#999\">'.$select_one.'</option>';\n\tforeach($valuesArray AS $key => $val){\n\t\t$html .= '<option value=\"'.$key.'\"';\n\t\tif(strtoupper($key) == strtoupper($sel) || $key == $sel) $html .= ' selected'; \n\t\t$html .= '> '.$val.'</option>';\n\t}\t\n\t$html .= '</select>';\n\treturn $html;\n}", "title": "" }, { "docid": "db4771c9eeda5f972569d37a373b5668", "score": "0.52012056", "text": "function person_select( $select_name, $current_ID = NULL )\n{\n $query = \"SELECT personID, lname, fname \" .\n \"FROM people \" .\n \"ORDER BY lname, fname \";\n $result = mysql_query( $query )\n or die( \"Query failed : $query<br />\" . mysql_error() );\n\n if ( mysql_num_rows( $result ) == 0 ) return \"\";\n\n $text = \"<form action='{$_SERVER['PHP_SELF']}' method='post'>\\n\" .\n \" <select name='$select_name' size='1' onchange='form.submit();'>\\n\";\n while ( list( $personID, $lname, $fname ) = mysql_fetch_array( $result ) )\n {\n $t_last = html_entity_decode( stripslashes( $lname ) );\n $t_first = html_entity_decode( stripslashes( $fname ) );\n $selected = ( $current_ID == $personID ) ? \" selected='selected'\" : \"\";\n $text .= \" <option value='$personID'$selected>$t_last, $t_first</option>\\n\";\n }\n\n $text .= \" </select>\\n\" .\n \"</form>\\n\";\n\n return $text;\n}", "title": "" }, { "docid": "7b31d2660fca88597c1d3c0880568c08", "score": "0.5198659", "text": "function ec_print_subsubmenu_select( $id, $submenuid ){\n\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\">\";\n\tif( $submenuid > 0 ){\n\t\t$db = new ec_db( );\n\t\t$menu_items = $db->get_menulevel3_items( );\n\t\tif( count( $menu_items ) > 0 ){\n\t\t\techo \"<option value=\\\"0\\\">Select a SubSub Menu Item (optional)</option>\";\n\t\t\tforeach( $menu_items as $menu ){\n\t\t\t\tif( $menu->menulevel2_id == $submenuid ){\n\t\t\t\t\techo \"<option value=\\\"\" . $menu->menulevel3_id . \"\\\">\" . $menu->menu3_name . \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\techo \"<option value=\\\"0\\\">No SubSubMenu Items Exist</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No Sub Menu Item Selected</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "3ff01102745eae39e77825551b756162", "score": "0.5195962", "text": "public function dropdown_ek(){\n\t\t\t//Get data from ELEMEN_KOMPETENSI table \n\t\t\t$kondisi\t\t\t\t= array('UUID_UK' => $this->input->post('uk_uuid'));\n\t\t\t$lis_ek\t\t\t\t\t= $this->tabel_ek->ambil_data($kondisi);\n\t\t\t$data[\"lis_ek\"]\t\t\t= $lis_ek;\n\t\t\t \n\t\t\tif($lis_ek->num_rows()>0){\n\t\t\tforeach($lis_ek->result() as $row){\n\t\t\t\techo \"<option value='\".$row->UUID_EK.\"'> \".$row->NOMOR_EK.\" - \".$row->NAMA_EK.\"</option>\";\n\t\t\t}\n\t\t}\n\t\t}", "title": "" }, { "docid": "4e8b42dbae8e4bd302339e0b702d4853", "score": "0.5193688", "text": "function igreja_pop ($ind,$igreja,$link){\n\t//Mostra as linhas de select\n\t?>\n\t\t<select name='igreja' id='igreja' class=\"form-control\" onchange='MM_jumpMenu(\"parent\",this,0)' tabindex='<?php echo $ind;?>' >\n\t<?php\n\tif (empty($link)) {\n\t $valor = 'escolha='.$_GET['escolha'].'&menu=top_tesouraria&rec='.$_GET['rec'].'&rol=';\n\t}else {\n\t $valor = $link;\n\t}\n\t\t//echo \"<select name='igreja' id='igreja' onchange='MM_jumpMenu('parent',this,0)' tabindex='$ind' >\";\n\t\twhile($this->col_lst = mysql_fetch_array($this->sql_lst))\n\t\t{\n\t\t\t//echo \"<option value='./?$valor{$this->col_lst[\"rol\"]}'>\".$this->col_lst[$this->campo_retorno].\"</option>\";\n \tif ($igreja==$this->col_lst[\"rol\"]) {\n \t\t$linha1 = \"<option value='./?$valor{$this->col_lst[\"rol\"]}'>\".$this->col_lst[\"razao\"].\"</option>\";\n \t}else {\n \t\t$linst .= \"<option value='./?$valor{$this->col_lst[\"rol\"]}'>\".$this->col_lst[\"razao\"].\"</option>\";\n \t}\n\t\t}\n\t\techo $linha1.$linst;\n\t\techo \"</select>\";\n\t//Disconecta do Banco\n\t//$db->disconnect();\n\t}", "title": "" }, { "docid": "a8c4d690ba5849886dd6e7bcd376e42b", "score": "0.5191047", "text": "function warehouse_drop_down($lookup_ID, $form_element_name = 'location_ID') {\n\n\t$table_name = 'locations';\n\t\n\t// start the session:\n\tsession_start();\n\t// enable the DB connection:\n\tinclude 'db_conn.php';\n\n\t// now output the result:\n\n\t?>\n\t<!-- originally parsed USER ID = <?php echo $this_user_ID; ?> -->\n\t<select class=\"form-control populate\" name=\"<?php echo $form_element_name; ?>\" id=\"<?php echo $form_element_name; ?>\" data-plugin-selectTwo>\n\t\t<option value=\"0\">Select Location</option>\n\t\t<?php\n\t\t// GET LIST:\n\t\t$get_this_list_SQL = \"SELECT * FROM `\" . $table_name . \"` WHERE `record_status` = 2\";\n\t\t// echo $get_this_list_SQL;\n\t\t$result_get_this_list = mysqli_query($con,$get_this_list_SQL);\n\t\t// while loop\n\t\twhile($row_get_list = mysqli_fetch_array($result_get_this_list)) {\n\n\t\t\t$list_ID \t\t\t \t= $row_get_list['ID'];\n\t\t\t$list_name_EN \t\t\t= $row_get_list['name_EN'];\n\t\t\t$list_name_CN \t\t\t= $row_get_list['name_CN'];\n\t\t\t$record_status \t\t\t= $row_get_list['record_status']; // should be 2\n\n\t\t?>\n\t\t\t<option value=\"<?php echo $list_ID; ?>\"<?php if ($list_ID == $lookup_ID) { ?> selected=\"selected\"<?php } ?>><?php echo $list_name_EN; if (($list_name_CN!='')&&($list_name_CN!='中文名')) { echo ' / ' . $list_name_CN; } ?></option>\n\t\t<?php\n\t\t} // end get list loop\n\t\t?>\n\t</select>\n\t<?php\n\n\n}", "title": "" } ]
5bc5f06025a4acf84bc794fa9b1f19f3
Get my open orders
[ { "docid": "872c3f7ab7397533d5f09c96ef59c370", "score": "0.86916417", "text": "public function get_open_orders()\n {\n return $this->send_request(self::uri_get_orders);\n }", "title": "" } ]
[ { "docid": "eb8c2c9bbfbca21f00976cc2d07af098", "score": "0.7369081", "text": "public function getOpenOrders($params)\n {\n return $this->_makeApiRequest('GET', 'openOrders', 'SIGNED', $params);\n }", "title": "" }, { "docid": "cc9a00e81051bbf9d0b0a0e1e31fae9c", "score": "0.7232729", "text": "public function getOrders();", "title": "" }, { "docid": "092d5d90e628f23aa949ca2e1f35cfcb", "score": "0.704286", "text": "public function index_open()\n {\n $orders = auth('chef')\n ->user()\n ->open_orders()\n ->paginate(20);\n $response['status'] = 'success';\n $response['orders'] = $orders;\n return response()->json($response, Response::HTTP_OK);\n }", "title": "" }, { "docid": "0299751146933247fd9e0f5bfbd73a74", "score": "0.6866014", "text": "public function getOrders() {\n\n\t\t//Get the DfpSession instantiated for this instance and a services object\n\t\t$dfpSession = $this->getDFPSession();\n\t\t$dfpServices = new DfpServices();\n\n\t\t//Get the order service for the network\n\t\t$orderService = $dfpServices->get($dfpSession, OrderService::class);\n\n\t\t//Create the statement to select all orders\n\t\t$statementBuilder = new StatementBuilder();\n\t\t$statementBuilder->Where('status = :status AND isArchived = :isArchived')->OrderBy('id ASC')->WithBindVariableValue('status', 'APPROVED')->WithBindVariableValue('isArchived', 0);\n\n\t\t//Get the orders from DFP\n\t\t$orderResults = $orderService->getOrdersByStatement($statementBuilder->ToStatement());\n\n\t\t//Query DFP for all active line items for the orders.\n\t\t//We only want to return orders with READY line items.\n\t\t$lineItemService = $dfpServices->get($dfpSession, LineItemService::class);\n\t\t$lineItemWhereClause = \"\";\n\t\tforeach ($orderResults->getResults() as $order) {\n\t\t\tif ($lineItemWhereClause != \"\") {$lineItemWhereClause .= \" OR \";}\n\t\t\t$lineItemWhereClause .= \"(orderID = \" . $order->getId() . \")\";\n\t\t}\n\t\t$statementBuilder = new StatementBuilder();\n\t\t$statementBuilder->Where(\"($lineItemWhereClause) AND status = 'READY'\");\n\t\t$lineItemResults = $lineItemService->getLineItemsByStatement($statementBuilder->ToStatement());\n\n\t\t//Put all the ids of orders with READY line items into an array\n\t\t$ordersWithREADYLineItems = [];\n\t\tforeach ($lineItemResults->getResults() as $currentLineItem) {\n\t\t\t$ordersWithREADYLineItems[] = $currentLineItem->getOrderId();\n\t\t}\n\t\t$ordersWithREADYLineItems = array_unique($ordersWithREADYLineItems);\n\n\t\t//----------------------------------------------------------------//\n\t\t//Some DFP clients do not allow access to their client companies\n\t\t//information. In such a case, the DFP call will fail. \n\t\t//If this occurs, the advertiserName and agencyName in the final\n\t\t//object will be set to an empty string\n\t\t//----------------------------------------------------------------//\n\t\t$companyService = $dfpServices->get($dfpSession, CompanyService::class);\n\t\t$companyNames = [];\n\t\tif (true) { //(USERDFPNETWORKCODE != 4408) {\n\t\t\ttry { \n\n\t\t\t\t//Build the where clause to get company information for the orders\n\t\t\t\t$companyWhereClause = \"\";\n\t\t\t\tif ($orderResults->getResults()) {\n\t\t\t\t\tforeach ($orderResults->getResults() as $order) {\n\n\t\t\t\t\t\t//If the order has READY line items, add it to the clause\n\t\t\t\t\t\tif (in_array($order->getId(), $ordersWithREADYLineItems)) {\n\t\t\t\t\t\t if ($companyWhereClause != \"\") {$companyWhereClause .= \" OR \";}\n\t\t\t\t\t\t $companyWhereClause .= \"(companyId = \" . $order->getAdvertiserId() . \")\";\n\t\t\t\t\t\t if ($order->getAgencyId()) {$companyWhereClause .= \" OR (companyId = \" . $order->getAgencyId() . \")\";}\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\t//Create the statement to get all companies for the orders\n\t\t\t\tif ($companyWhereClause != \"\") {\n\t\t\t\t\t$statementBuilder = new StatementBuilder();\n\t\t\t\t\t$statementBuilder->Where(\"(\" . $companyWhereClause . \")\");\n\t\t\t\t\t$companyResults = $companyService->\n\t\t\t\t\t\t getCompaniesByStatement($statementBuilder->ToStatement());\n\t\t\t\t}\n\n\t\t\t\t//Format the company names\n\t\t\t\t$companyNames = [];\n\t\t\t\tif ($companyResults->getResults()) {\n\t\t\t\t foreach ($companyResults->getResults() as $company) {\n\t\t\t\t \t$companyNames[$company->getId()] = $company->getName();\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t//Fail silently\n\t\t\t}\n\t\t}\n\n\t\t//Format the returned orders\n\t\t$finalOrders = [];\n\t\tif ($orderResults->getResults()) {\n\t\t foreach ($orderResults->getResults() as $order) {\n\n\t\t\t\t//Only include orders with READY line items\n\t\t\t\tif (in_array($order->getId(), $ordersWithREADYLineItems)) {\n\t\t\t\t\t$finalOrders[$order->getId()] = ['name' => $order->getName(), 'notes' => $order->getNotes()];\n\n\t\t\t\t\tif (count($companyNames) > 0) {\n\t\t\t\t\t\t$finalOrders[$order->getId()]['advertiserName'] = $companyNames[$order->getAdvertiserId()];\n\t\t\t\t\t\t$finalOrders[$order->getId()]['agencyName'] = ($order->getAgencyId()) ? $companyNames[$order->getAgencyId()] : \"\";\n\t\t\t \t}\n\t\t\t }\n\t\t }\n\t\t}\n\t\treturn $finalOrders;\n\t}", "title": "" }, { "docid": "80d2bea530a3b558fc3652ded012e39f", "score": "0.67750394", "text": "public static function getOpenList()\n {\n $sql = 'SELECT a.id, a.name, a.city '\n . 'FROM arena a '\n . 'WHERE a.status_id = (SELECT ass.id FROM arena_status ass WHERE ass.name = \"OPEN\") '\n . 'ORDER BY a.name ASC, a.city';\n \n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "title": "" }, { "docid": "4036cbe0a2f688e43eba4e9ab916944e", "score": "0.67439157", "text": "public function getOrders(){\n\t\t\treturn $this->orders;\n\t\t}", "title": "" }, { "docid": "e3d4d766172b4cda2e2ed0d1e3f60a77", "score": "0.67184347", "text": "private static function getOpenOrderIds() {\n\n global $db; // Need this because of the following subquery\n\n // Fetch ids from status list\n $query = 'SELECT s.*\n FROM ordermgmt_status s\n INNER JOIN (SELECT order_id, status_id, MAX(date_changed) as maxdate FROM ordermgmt_status GROUP BY order_id) sub\n ON sub.order_id = s.order_id AND s.date_changed = sub.maxdate\n WHERE NOT(s.status_id = 7) AND NOT(s.status_id = 3)\n ORDER BY s.order_id';\n $res = $db->Execute($query);\n\n $indexed = $res->GetArray();\n\n\n $openOrderIds = array();\n foreach($indexed as $record) {\n $openOrderIds[] = $record['order_id'];\n }\n\n return $openOrderIds;\n }", "title": "" }, { "docid": "015de3eb07e20a6112e81ec7282da13d", "score": "0.670871", "text": "public function getOrders()\n\t{\n\t\treturn $this->orders;\n\t}", "title": "" }, { "docid": "e6835d3b5e9e5b57e14df6a02f120aef", "score": "0.66118115", "text": "public function getAvailableOrders()\n {\n return $this->_availableOrder;\n }", "title": "" }, { "docid": "2dddcbbaf4bbd4b6189885abb5710bfa", "score": "0.6594467", "text": "public function getOrders(){\n $this->openDatabaseConnection();\n\t\t$res = $this->collection->find();\n\t\t$return = [];\n\t\tforeach($res as $row){\n\t\t array_push($return, new Order($row[\"_id\"]->__toString(),$row[\"totalPrice\"],$row[\"buyDate\"],$row[\"status\"],$row[\"client\"],$row[\"products\"]));\n\t\t}\n\t\treturn $return;\n }", "title": "" }, { "docid": "9342c3849c9525b6e992b8bbc03ce878", "score": "0.6592165", "text": "public function getAllOrders()\n {\n }", "title": "" }, { "docid": "7864e331c71b475d9a378cd2fade3e94", "score": "0.65683466", "text": "public function getOrders() {\n $db = Zend_Registry::get('dbAdapterReadOnly');\n $select = $db->select()->from(array('o' => 'orders'),array('id'))\n ->joinLeft(array('oc' => 'orders_customer'), \"o.id = oc.orderId\",array())\n ->where('oc.email=?',$this->getEmail());\n \n return $db->fetchAll($select);\n \n }", "title": "" }, { "docid": "5a7060e6b3aa5b4de13382ca15a1e579", "score": "0.6567852", "text": "public function updateOpenOrders()\n {\n $exchangeOrders = $this->exchange->getOpenOrders();\n if (count($exchangeOrders)) {\n if (is_array($exchangeOrders)) {\n foreach ($exchangeOrders as $exchangeOrder) {\n $order_id = $exchangeOrder->getId();\n $order = Order::whereOrderId($order_id)->first();\n\n // When open order with order_id is not found then add it.\n if (is_null($order)) {\n Order::create(\n [\n 'pair' => $exchangeOrder->getProductId(),\n 'side' => $exchangeOrder->getSide(),\n 'order_id' => $exchangeOrder->getId(),\n 'size' => $exchangeOrder->getSize(),\n 'amount' => $exchangeOrder->getPrice(),\n 'status' => 'manual',\n ]\n );\n } else {\n if ($order->status != 'done') {\n $order->status = $exchangeOrder->getStatus();\n $order->save();\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "34b3b77d1fdd6477c92767463b484c2e", "score": "0.65418124", "text": "public function getPayedOrders(){\n $this->openDatabaseConnection();\n\t\t$res = $this->collection->find([\"status\" => \"Payed\"]);\n\t\t$return = [];\n\t\tforeach($res as $row){\n\t\t array_push($return, new Order($row[\"_id\"]->__toString(),$row[\"totalPrice\"],$row[\"buyDate\"],$row[\"status\"],$row[\"client\"],$row[\"products\"]));\n\t\t}\n\t\treturn $return;\n }", "title": "" }, { "docid": "34e4613c622fda979efe2fd6cf6bd071", "score": "0.6526068", "text": "public function getOrders( )\n {\n $userRef = $this->getUser();\n // abstract to service?\n $orderRecords = OrderRecord::find()\n ->where( [ 'owner' => $userRef ] )->all();\n return $orderRecords;\n }", "title": "" }, { "docid": "48bff04eab5da5c25276953d5ba7ea31", "score": "0.6493219", "text": "public function getAppOrders()\n {\n return $this->app_orders;\n }", "title": "" }, { "docid": "83c649b2edd914e5d052c3eff4bd92df", "score": "0.6491437", "text": "private\tfunction fetchOrders(){\n\t\t\t$service_url = 'https://hoej.dk/tests/api/orders/';\n\t\t\t$curl = curl_init($service_url);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\t$curl_response = curl_exec($curl);\n\t\t\tif ($curl_response === false) {\n\t\t\t $info = curl_getinfo($curl);\n\t\t\t curl_close($curl);\n\t\t\t die('error occured during curl exec. Additioanl info: ' . var_export($info));\n\t\t\t} \n\n\t\t\tcurl_close($curl);\n\t\t\t$decoded = json_decode($curl_response, TRUE);\n\t\t\tif (isset($decoded->response->status) && $decoded->response->status == 'ERROR') {\n\t\t\t die('error occured: ' . $decoded->response->errormessage);\n\t\t\t}\n\t\t\t\n\t\t\treturn $decoded['orders'];\n\t\t}", "title": "" }, { "docid": "3cc500b015e41568a4873d11e561126d", "score": "0.64687955", "text": "public function getAllOrders()\n\t{\n\t\t$resourceid = $this->_dbConnection->selectFromTableDesc(\"OrdersTable\", null, null, \"NumericDateSubmitted\");\n\t\t$orders = $this->_dbConnection->formatQuery($resourceid);\n\t\t//return json_encode($orders);\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "1ca41e06d751c532bce3086bb936443d", "score": "0.6462598", "text": "public function getReservedOrders(){\n $this->openDatabaseConnection();\n\t\t$res = $this->collection->find([\"status\" => \"Reserved\"]);\n\t\t$return = [];\n\t\tforeach($res as $row){\n\t\t array_push($return, new Order($row[\"_id\"]->__toString(),$row[\"totalPrice\"],$row[\"buyDate\"],$row[\"status\"],$row[\"client\"],$row[\"products\"]));\n\t\t}\n\t\treturn $return;\n }", "title": "" }, { "docid": "052743e49be0a6539e49c966cc794252", "score": "0.64332736", "text": "public static function getOpenIDs() {\n\n\t $payname_lang = Komfortkasse_Order::getPaymentNames();\n\t $paynames = array_keys($payname_lang);\n\n\t\t// get order ids\n\t\t$ret = array ();\n\n\t\t$sql = \"select orders_id from \" . TABLE_ORDERS . \" where orders_status in (\" . Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open) . \") and ( \";\n\t\tfor($i = 0; $i < count($paynames); $i++) {\n\t\t\t$sql .= \" payment_method like '\" . $paynames [$i] . \"' \";\n\t\t\tif ($i < count($paynames) - 1) {\n\t\t\t\t$sql .= \" or \";\n\t\t\t}\n\t\t}\n\t\t$sql .= \" )\";\n\t\t$orders_q = tep_db_query($sql);\n\n\t\twhile ( $orders_a = tep_db_fetch_array($orders_q) ) {\n\t\t\t$ret [] = $orders_a ['orders_id'];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "433e8524ae809b47bbc216fb1f7d3d0f", "score": "0.6412065", "text": "public function showOrders()\n {\n $serviceAccount = ServiceAccount::fromJsonFile(__DIR__ . '/cse327-ec9ea-firebase-adminsdk-hefrs-4152589af7.json');\n $firebase = (new Factory)\n ->withServiceAccount($serviceAccount)\n ->withDatabaseUri('https://cse327-ec9ea.firebaseio.com/')\n ->create();\n $database = $firebase->getDatabase();\n $refs = $database->getReference('Order_Items');\n\n $orders = $refs->getvalue();\n\n foreach ($orders as $order) {\n $all_order[] = $order;\n }\n return view('current-orders', compact('all_order') );\n }", "title": "" }, { "docid": "4efe620ba18bf5cc9683cb1a5b822b08", "score": "0.64079785", "text": "function getPendingOrders()\n {\n //Define the query\n $sql = \"SELECT * FROM requests;\";\n\n $statement = $this->_dbh->prepare($sql);\n\n $statement->execute();\n\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n return $result;\n }", "title": "" }, { "docid": "59fa4a0b72fa8a11b4513db612a419f3", "score": "0.6392995", "text": "public function getOrders()\n {\n $data = [];\n $countries = Config::get('shopping.cron.country');\n\n foreach ($countries as $key => $value)\n {\n if ($value > 0)\n {\n $data[] = $this->query()\n ->join('shop_orderestatus', 'shop_orders.order_estatus_id', '=', 'shop_orderestatus.id')\n ->join('glob_countries', 'shop_orders.country_id', '=', 'glob_countries.id')\n ->select('shop_orders.id AS so_id', 'shop_orders.shop_type AS so_shop_type')\n ->where([\n ['shop_orders.corbiz_order_number', '=', 0],\n ['shop_orderestatus.key_estatus', '=', 'PAYMENT_SUCCESSFUL'],\n ['glob_countries.corbiz_key', '=', $key],\n ])\n ->limit($value)\n ->get();\n }\n }\n\n if ($data != null)\n {\n return $data;\n }\n\n return array();\n }", "title": "" }, { "docid": "776075efcbb6d02bfc5a90f656238bad", "score": "0.6386213", "text": "public function getOrderList() \n {\t\t \n $orderArray = array(); \n $collection = $this->_orderObj->getCollection();\n $collection->addFieldToFilter('status', array('eq' => array('complete'))); \n $this->selectGreyferretLog($this->orderEntity);\n\t\t$this->saveLog($this->entityLastId,$this->orderEntity,$this->entityId,$this->initiate);\t\t\n\t\tif(!is_null($this->entityId)) {\t\n\t\t\t$collection->addFieldToFilter('entity_id',\n\t\t\t\t\t\t array( \n\t\t\t\t\t\t\t array('in' => explode(',',$this->entityId)),\n\t\t\t\t\t\t\t array('gt' => $this->entityLastId)\n \t\t\t\t\t\t )\n\t\t\t\t\t\t );\t\t\t\t\t\t\t\n\t\t\t$this->saveLog($this->entityLastId,$this->orderEntity,null,$this->inprogress);\t\t\t\t\t\t\t\n\t\t}\n \n foreach ($collection as $order) {\t\t\t\n $orderArray = $this->createOrderArray($order);\t \n $this->call($orderArray, $this->orderEntity, true); \n }\n $this->selectGreyferretLog($this->orderEntity);\n\t\tif(is_null($this->entityId)) {\n\t\t\t$this->saveLog($this->entityLastId,$this->orderEntity,null,$this->complete);\t\n\t\t} \n }", "title": "" }, { "docid": "cac58fd0f94888854320ce10d3a09d27", "score": "0.637043", "text": "public static function listOfOpenOrders($start=0, $limit=10) {\n\n global $db;\n\n $openOrderIds = self::getOpenOrderIds();\n\n $filter = array(\n 'order_id' => $openOrderIds\n );\n \n if(count($openOrderIds) > 0) {\n return self::createListFromDatabase($start, $limit, $filter);\n }\n else {\n return array();\n }\n }", "title": "" }, { "docid": "f7ba6faf87eb6b2b7e44f5674b6d82b0", "score": "0.63360405", "text": "public function getIncompleteOrders()\r\n {\r\n $requestParams = array(\r\n array(\r\n 'status'=>array('in'=> $this->incompleteStatuses),\r\n )\r\n );\r\n return $this->sendRequest('sales_order.list', $requestParams);\r\n }", "title": "" }, { "docid": "f3f32c2c15239970b7939bd8fa13feb1", "score": "0.6312195", "text": "public function getOrders()\n {\n $bids=Bid::all(\"order_id\");\n\n $orders= Order::where(\"status\", 1)->whereNotIn(\"id\",$bids)->with('user')->paginate(10);\n\n return view(\"tutor.order.get\", compact(\"orders\"));\n }", "title": "" }, { "docid": "7256fcd35ffb21e5a076cd1ba5957861", "score": "0.63063914", "text": "public function returnOpenOrders($pair = 'all')\n {\n return $this->performPostRequest([\n 'command' => 'returnOpenOrders',\n 'currencyPair' => $pair\n ]);\n }", "title": "" }, { "docid": "bddef07dafd3bbb21c8a876786951e06", "score": "0.63054043", "text": "private function getRecentOrders(){\n\n $this->vars['lastOrders'] = Order::take($this->property('number'))->orderBy('created_at', 'DESC')->get();\n }", "title": "" }, { "docid": "46def5dce229d1726d60d382771d0346", "score": "0.6301968", "text": "public static function countOpenOrders() {\n\n global $db;\n\n // Fetch ids from status list\n $query = 'SELECT count(s.order_id) as count\n FROM ordermgmt_status s\n INNER JOIN (SELECT order_id, status_id, MAX(date_changed) as maxdate FROM ordermgmt_status GROUP BY order_id) sub\n ON sub.order_id = s.order_id AND s.date_changed = sub.maxdate\n WHERE NOT(s.status_id = 7) AND NOT(s.status_id = 3)\n ORDER BY s.order_id';\n $res = $db->Execute($query);\n $rows = $res->getArray();\n\n return intval($rows[0]['count']);\n }", "title": "" }, { "docid": "8508e77e8129a2aabcd0c66c24abdb3a", "score": "0.6298594", "text": "function getAllOrders()\n {\n $sql = \"SELECT OrderID, Email, Subtotal, GST, GrandTotal, Status FROM `order`, `user` WHERE `order`.CustomerID = `user`.UserID\";\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "cd8351e9b5899e53e752e4f2013fdaab", "score": "0.6290664", "text": "public function incomingOrders()\n {\n return $this->hasMany(Order::class, 'worker_id')\n ->where('closed', false)\n ->orderBy('due_date');\n }", "title": "" }, { "docid": "ee4926a4d9178d6bac39687048878b7e", "score": "0.62771416", "text": "public function get_orders () {\n\t\tif ( 'get' != $this->input->method () ) {\n\t\t\tjson_response ( array ( 'response' => $this->config->item ( 'response_incorrect_request' ),\n\t\t\t\t\t\t\t\t\t'message' => 'GET METHOD IS REQUIRED!' ) );\n\t\t}\n\n\t\t$merchantType\t\t= $this->input->get ('merchantType', true);\n\n\t\tif ($merchantType != \"eleme\") {\n\t\t\tjson_response ( array ( 'response' => $this->config->item ( 'response_incorrect_request' ),\n\t\t\t\t\t\t\t\t\t'message' => 'UNSUPPORTED MERCHANT NAME' ) );\n\t\t}\n\n\t\t$token \t\t\t= $this->input->get ( 'token', true );\n\t\t$shopId\t\t\t= $this->input->get ( 'shopId', true );\n\t\t$pageNo\t\t\t= $this->input->get ( 'pageNo', true );\n\t\t$pageSize\t\t= $this->input->get ( 'pageSize', true );\n\t\t$deliveringDay\t= $this->input->get ( 'deliveringDay', true );\n\t\t//$token = \"dab8748599186bc82be515a3896b4df6\";\n\n\t\t$this->ReturnElemeOrders ( $token, $shopId, $pageNo, $pageSize, $deliveringDay );\n\t\t\t\n\t}", "title": "" }, { "docid": "ae302791dcd4c27518815e0aea76fed1", "score": "0.62672234", "text": "function get_all_opened_sondages($order = 'date_creation desc') {\r\n\t$bd = new mysqlObject(HOST, DB, USER, MDP);\r\n\t\r\n\t$donne = $bd->select('select * from sondage where status = '.OPEN.' order by '.$order.';');\r\n\t\r\n\t$bd->close();\r\n\treturn $donne;\r\n}", "title": "" }, { "docid": "cf8c37674c90f7996e89acaf5e2441d1", "score": "0.6255387", "text": "public function ordersList()\n {\n \tif(Session::get('group') == 'merchant'){\n \t\t//Get orders [the new and not complete delivered orders only]\n $orders= Order::where('store_owner', Session::get('user_id'))->where('order_status', '!=', 4)->with('items', 'user.userDate.country', 'user.userDate.city', 'store')->get();\n\n\n \t\tif(Session::get('lang') == 'en'){\n return view('en.order.orders-list', compact('orders'));\n }\n \treturn view('ar.order.orders-list', compact('orders')); \n\n \t}\n \treturn Redirect('/');\n }", "title": "" }, { "docid": "a48573d7bd654cb69be320ec33e2e094", "score": "0.6245827", "text": "public function getOrdersList() {\n\n //$db = Database::getInstance();\n //$db->query(\"SELECT * FROM ClientOrder WHERE fkidClient = ? \", array($this->_id));\n //return $db->resultsToJson();\n\n $db = Database::getInstance();\n $db->query(\"SELECT ClientOrder.id, ClientOrder.date, ClientOrder.user, ClientOrder.commentaire, \n ClientOrder.status, ClientOrder.fkidClient, ClientOrder.fkidSupplier, clientOrderDetail.Qty, \n Product.idProduct, Product.nom, Product.prix, Product.description, Product.origine, Product.code, Product.format, Product.fkidSupplier\n FROM ClientOrder \n INNER JOIN clientOrderDetail ON ClientOrder.id = clientOrderDetail.fkid_ClientOrder\n INNER JOIN Product ON Product.idProduct = clientOrderDetail.fkidProduct\n WHERE ClientOrder.fkidClient = ? \", array($this->_id));\n\n return $db->resultsToJson();\n\n }", "title": "" }, { "docid": "64c8adc11e33eaa3740387ead1971b30", "score": "0.62171185", "text": "public function getOrderList(){\n\n \t\t\t$sql = \"SELECT o.*, u.name, u.lastname, pm.name pm_name, os.name os_name, ds.name ds_name FROM orders o\n\t\t\t\t\t\t\tLEFT JOIN users u ON u.id = o.user_id\n\t\t\t\t\t\t\tLEFT JOIN order_status os ON os.id = o.order_status\n\t\t\t\t\t\t\tLEFT JOIN delivery_status ds ON ds.id = o.delivery_status\n\t\t\t\t\t\t\tLEFT JOIN payment_methods pm ON pm.id = o.payment_method\n\t\t\t\t\t\t\tORDER BY o.id DESC\";\n\t\t\t$orders = Connection()->query($sql);\n\n\t\t\tforeach ($orders['data'] as &$order) {\n\t\t\t\t$order['address'] = $this->container->Users()->Address()->getAddressById($order['address_id']);\n\t\t\t}\n \t\t\treturn $orders;\n \t\t}", "title": "" }, { "docid": "121154b5613e99dde4f50237c06c32e6", "score": "0.61970425", "text": "public function getOrders()\n {\n $inputs = request()->all();\n\n $user = JWTAuth::parseToken()->authenticate();\n\n $orders = $this->userRepo->getUserOrders($user->id, $this->perPage);\n\n return $this->respondWithPagination($orders, $inputs, new OrderTransformer);\n }", "title": "" }, { "docid": "c1b1d2d19b97ffba03349ed0cf083a11", "score": "0.61842877", "text": "public function getLatestOrders(){\n\t\t$orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('created_at', array('from'=> $this->yesterday(), 'to'=> date('Y-m-d h:i:s')));\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.61751443", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.61751443", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.61751443", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.61751443", "text": "public function getOrder();", "title": "" }, { "docid": "2a7f9236b6426b3a541c47ffccb6f75b", "score": "0.6172229", "text": "public function orders_get(){\n\t\t\t$token = ($this->post('token')) ? $this->post('token') : (($this->get('token')) ? $this->get('token') : $this->input->request_headers()['x-access-token']);\n\t\t\t\n\t\t\tif($token){\n\t\t\t\t$key = $this->config->item('encryption_key');\n\t\t\t\ttry{\n\t\t\t\t\t$decoded = JWT::decode($token, $key, array('HS256'));\n\t\t\t\t\t\n\t\t\t\t\t$order_list = $this->orderdata->grab_total_order(array(\"status\" => '1', \"user_id\" => $decoded->id));\n\t\t\t\t\tif(!empty($order_list)){\t\t\t\t\t\n\t\t\t\t\t\tforeach($order_list AS $key => $order){\n\t\t\t\t\t\t\t$order_data[$key]['mailing_date_id'] = $order->mailing_date_id;\n\t\t\t\t\t\t\t$order_data[$key]['order_id'] = $order->order_id;\n\t\t\t\t\t\t\t$order_data[$key]['item'] = $order->item;\n\t\t\t\t\t\t\t$order_data[$key]['quantity'] = $order->quantity;\n\t\t\t\t\t\t\t$order_data[$key]['proof_pdf'] = $order->proof_pdf;\n\t\t\t\t\t\t\t$order_data[$key]['proofapproved_date'] = ($order->proofapproved_date) ? date(\"m-d-Y\", $order->proofapproved_date) : '';\n\t\t\t\t\t\t\t$order_data[$key]['proofsent_date'] = ($order->proofsent_date) ? date(\"m-d-Y\", $order->proofsent_date) : '';\n\t\t\t\t\t\t\t$order_data[$key]['total'] = $order->total;\n\t\t\t\t\t\t\t$order_data[$key]['desired_mail_date'] = date(\"m-d-Y\", $order->date);\n\t\t\t\t\t\t\t$order_data[$key]['status'] = $this->config->item('mailing_dates_status')[$order->status];\n\t\t\t\t\t\t\t$order_data[$key]['order_created_date'] = date(\"m-d-Y\", $order->date_added);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$response = array(\n\t\t\t\t\t\t\t\"status\" => true,\n\t\t\t\t\t\t\t\"message\" => \"Orders fetched succesfully\",\n\t\t\t\t\t\t\t\"data\" => $order_data\n\t\t\t\t\t\t);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$response = array(\n\t\t\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\t\t\"message\" => \"Order not found\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t$this->set_response($response, REST_Controller::HTTP_OK);\n\t\t\t\t}catch(\\Exception $e){\t\t\t\t\t\n\t\t\t\t\t$response = array(\n\t\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\t\"message\" => $e->getMessage()\n\t\t\t\t\t);\n\t\t\t\t\t$this->set_response($response, REST_Controller::HTTP_OK);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->set_response(array(\"status\" => false, \"message\" => \"Token not found\"), REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "548738fb0c67c065e1a9fb51bcb51471", "score": "0.615311", "text": "public function getOrders()\n {\n return $this->hasMany(Orders::className(), ['orderId' => 'orderId'])->viaTable('order_items', ['dishId' => 'dishId']);\n }", "title": "" }, { "docid": "f8028ca4f127762f5cff42cc4cad2d89", "score": "0.614804", "text": "public static function getallOrders() {\n // $data = array(':lv' => $lv);\n \n // return static::find_by_sql($sql,$data);\n return static::all();\n }", "title": "" }, { "docid": "f8028ca4f127762f5cff42cc4cad2d89", "score": "0.614804", "text": "public static function getallOrders() {\n // $data = array(':lv' => $lv);\n \n // return static::find_by_sql($sql,$data);\n return static::all();\n }", "title": "" }, { "docid": "14ff7585c04e883510c9f782cf273ef1", "score": "0.6145298", "text": "public function get_orders( $args = array() ) {\n\t\t\treturn $this->build_request( 'sales/orders', $args )->fetch();\n\t\t}", "title": "" }, { "docid": "b2ee3f7d8f5e80bee305c2ea58b8f5d8", "score": "0.61425114", "text": "public function highestOpenBuyOrder()\n {\n return $this->hasOne(Order::class)->buys()->open()->orderBy('exchange_rate', 'desc');\n }", "title": "" }, { "docid": "13fd27ae0f0f609dd593d639c16d758e", "score": "0.6123907", "text": "public function bookStoreGetMyOrderItemsByOrderId_get()\n {\n $page = ($this->get('page')) ? $this->get('page') : 0;\n $page = $this->perPageNum * $page;\n $orderId = $this->get('orderId');\n if(NULL != $orderId)\n {\n $response = $this->login->getOrderItemsByOrderId($this->perPageNum,$page, $orderId);\n if ($response['success'] == true)\n {\n $output['data'] = $response['data'];\n $output['totalRecords'] = $response['totalRecords'];\n $this->response($output,REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_CONFLICT], REST_Controller::HTTP_CONFLICT);\n }\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_BAD_REQUEST], REST_Controller::HTTP_CONFLICT);\n }\n }", "title": "" }, { "docid": "81dc733d6cb98829dd1425f1df059f2a", "score": "0.61152375", "text": "public function actionOrders(){\n\t\t$OrdersTmp = $this->_getOrderModel()->getAllOrder();\n\t\t\n\t\t$viewParams = array(\n\t\t\t'Orders' => $OrdersTmp\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Orders','dtui_order_list',$viewParams);\n\t}", "title": "" }, { "docid": "b988b7cbaf8b2d6721e21afd4a234a4f", "score": "0.6105195", "text": "public function getAdminPendingOrders()\n\t{\n\t\t$resourceid = $this->_dbConnection->selectFromTableAsc(\"OrdersTable\", \"Status\", \"AdminPending\", \"NumericDateSubmitted\");\n\t\t$orders = $this->_dbConnection->formatQuery($resourceid);\n\t\t//return json_encode($orders);\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "bb0afa80235c45a9bad9e4e90ae22c31", "score": "0.61007726", "text": "public function outgoingOrders()\n {\n return $this->hasMany(Order::class, 'creator_id')\n ->where('closed', false)\n ->orderBy('due_date');\n }", "title": "" }, { "docid": "8e14944aed27f373dd32223b86f94a45", "score": "0.60952944", "text": "public function index()\n {\n $orders = PickupOrder::all();\n return $orders;\n }", "title": "" }, { "docid": "6714b339755c1e96cbff1311e79928f4", "score": "0.6091367", "text": "public function orders();", "title": "" }, { "docid": "977bb45869d609639a8a48aefdd30d13", "score": "0.60887223", "text": "public function getOrders($params)\n {\n return $this->_makeApiRequest('GET', 'allOrders', 'SIGNED', $params);\n }", "title": "" }, { "docid": "0aea28023e8d003042ec88a6edac0ad5", "score": "0.6074921", "text": "public function getOrderings(): array;", "title": "" }, { "docid": "c7a2b66d102a4ce3a15e6d4ff4fecd9e", "score": "0.607005", "text": "public function ordersHistory()\n {\n if(Session::get('group') == 'merchant'){\n $delivered= Order::where('user_id', Session::get('user_id'))->where('')\n } \n }", "title": "" }, { "docid": "80f5623150dc122ccc727874917c4a83", "score": "0.60688263", "text": "function getOrder(){\n\t\t $qry=\"SELECT * FROM tbl_order where status!=2 order by cr_date desc LIMIT 0 , 20\";\n\t\t return $result = $this->modelObj->fetchRows($qry);\n\t\t}", "title": "" }, { "docid": "151edf107692edf6692f84b290e66468", "score": "0.60648715", "text": "public function bookStoreGetMyOrders_get()\n {\n $page = ($this->get('page')) ? $this->get('page') : 0;\n $page = $this->perPageNum * $page;\n $userId = $this->get('userId');\n if(NULL != $userId)\n {\n $response = $this->login->getallMyOrdersData($this->perPageNum, $page, $userId);\n if ($response['success'] == true)\n {\n //$output['status'] = REST_Controller::HTTP_OK;\n // $output['totalOrders'] = $response['totalRecords'];\n $output['data'] = $response['data'];\n $this->response($output,REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_CONFLICT], REST_Controller::HTTP_CONFLICT);\n }\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_BAD_REQUEST], REST_Controller::HTTP_CONFLICT);\n }\n }", "title": "" }, { "docid": "ca3ec3a984aeb307b38e2745efca6317", "score": "0.6063805", "text": "public function getAllOrders() {\r\n\t\t$sql = \"SELECT * FROM \" . DB_PREFIX . \"order WHERE shipping_code LIKE '%saffwebdhl%' ORDER BY order_id DESC\";\r\n\t\t$query = $this->db->query($sql);\r\n\t\t$saffwebdhl = $query->rows;\r\n\t\treturn $saffwebdhl;\r\n\t}", "title": "" }, { "docid": "58d5141767abd8a00b74aa19622ef211", "score": "0.6050927", "text": "public function index()\r\n {\r\n $orders = Order::with('user')->get();\r\n return $orders;\r\n }", "title": "" }, { "docid": "61822e25f7cc5fb5e8b3ccaa663204b9", "score": "0.60458773", "text": "public function getCompleteOrders()\n {\n $orders = array();\n if ($this->getCollection()) {\n foreach ($this->getCollection() as $item) {\n $orders[] = $item->getOrderId();\n }\n }\n return $orders;\n }", "title": "" }, { "docid": "3e05834dac6d80d3ddf6f3ec53b748b8", "score": "0.6038064", "text": "public function archivedIncomingOrders()\n {\n return $this->hasMany(Order::class, 'worker_id')\n ->where('closed', 1)\n ->orderBy('due_date');\n }", "title": "" }, { "docid": "ea37eca29089f7cd077a46ec9349d394", "score": "0.6035258", "text": "public function shipped_orders()\n\t{\n\t\t$q = \"SELECT o.`id`, o.`email`, o.`datetime`, o.`is_shipped`, sum(c.`quantity`) as item_count, customers.`first_name`, customers.`last_name` \";\n\t\t$q .= \"FROM `bodega_orders` AS o, `bodega_contains` AS c, `bodega_customers` as customers \";\n\t\t$q .= \"WHERE o.`is_shipped` = 1 AND o.`id` = c.`oid` AND customers.`email` = o.`email` \";\n\t\t$q .= \"GROUP BY c.`oid` ORDER BY o.`datetime` ASC;\";\n\t\t$orders = $this->db->query($q);\n\t\treturn $orders->result_array();\n\t}", "title": "" }, { "docid": "e7076bb755e05bcbff9abed7fa7e958d", "score": "0.60324657", "text": "public function listAll()\n {\n $orders = new Order();\n return $orders->all();\n }", "title": "" }, { "docid": "c81e21275e52286938402d76a2bad7da", "score": "0.60121566", "text": "public function online_orders(Request $request)\n {\n $user = User::where('api_token', $request->api_token)->first();\n\n $finished_online_orders = OnlineOrder::where('status', 'done')->where('user_id',$user->id)->get();\n return response()->json($finished_online_orders);\n }", "title": "" }, { "docid": "f0025dfb0e8e5f50f5d49282df2c4c8f", "score": "0.600892", "text": "public function testListOrder()\n {\n $order = Order::latest('timestamp')->first();\n $user = User::where('user-id', $order->{'user-id-buy'})->orWhere('user-id', $order->{'user-id-sell'})->first();\n $response = $this->actingAs($user, 'api')->json('GET', '/api/v1/orders/'.$order->{'connect-id'});\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "271615a4b07dd96d45e084deb20273d0", "score": "0.59987354", "text": "public static function getUserOrdersDetails() {\n $oCriteria = new CDbCriteria;\n $oCriteria->alias = 'o';\n $oCriteria->condition = \"o.payment_status != 4 AND is_deleted = 0\";\n $oCriteria->order = \"o.payment_date desc\";\n\n return new CActiveDataProvider(\"Orders\", array(\n 'criteria' => $oCriteria,\n ));\n }", "title": "" }, { "docid": "c8f04f66fcefaa7a162237fcd48f559b", "score": "0.5997255", "text": "public function getOrders() {\n\t$prepare = $this->con->prepare(\"select *,SUM(pro_price) as total_price from view_customer_product_order_join where registered_user=? and pay_sta=? group by CID\");\n\t$prepare->execute([$_SESSION[\"userid\"], 1]);\n\treturn $prepare->fetchAll();\n }", "title": "" }, { "docid": "e350a6558727573d6ec17ec47eccfb27", "score": "0.5977453", "text": "function showProdOrders($oid)\r\n\t{\r\n\t\t//declare vars\r\n\t\t$data = array();\r\n\t\t//statement\r\n\t\t$select = \"SELECT * FROM product_orders\r\n\t\t\t\t WHERE orders_id\t= '$oid'\";\r\n\t\t\t\t \r\n\t\t//execute query\r\n\t\t$query\t= mysql_query($select);\r\n\t\t//echo $select.mysql_error();exit;\r\n\t\t//holds the data\r\n\t\twhile($result = mysql_fetch_object($query))\r\n\t\t{\r\n\t\t\t$data = array(\r\n\t\t\t\t\t$result->orders_id,\t\t\t\t\t//0\r\n\t\t\t\t\t$result->design_no,\t\t\t\t\t//1\r\n\t\t\t\t\t$result->party_name,\t\t\t\t//2\r\n\t\t\t\t\t$result->brokar,\t\t\t\t\t//3\r\n\t\t\t\t\t$result->retahol,\t\t\t\t\t//4\r\n\t\t\t\t\t$result->form,\t\t\t\t\t\t//5\r\n\t\t\t\t\t$result->quantity,\t\t\t\t\t//6\r\n\t\t\t\t\t$result->colour,\t\t\t\t\t//7\r\n\t\t\t\t\t$result->remark,\t\t\t\t\t//8\r\n\t\t\t\t\t$result->order_date,\t\t\t\t//9\r\n\t\t\t\t\t$result->target_date,\t\t\t\t//10\r\n\t\t\t\t\t$result->added_on,\t\t\t\t\t//11\r\n\t\t\t\t\t$result->modified_on,\t\t\t\t//12\r\n\t\t\t\t\t$result->payment_qty,\t\t\t\t//13\r\n\t\t\t\t\t$result->book_no,\t\t\t\t\t//14\r\n\t\t\t\t\t$result->priority,\t\t\t\t\t//15\r\n\t\t\t\t\t$result->status\t\t\t\t\t\t//16\r\n\t\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\t//return the data\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "43cf6e6b4e13fb198d5b11c36e7bf727", "score": "0.59774", "text": "public function getMentorPendingOrders()\n\t{\n\t\t$resourceid = $this->_dbConnection->selectFromTableDesc(\"OrdersTable\", \"Status\", \"MentorPending\", \"NumericDateSubmitted\");\n\t\t$orders = $this->_dbConnection->formatQuery($resourceid);\n\t\t//return json_encode($orders);\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "a1ba08b0d0baf23b6557eab20dded150", "score": "0.59729326", "text": "public function getItems(){\n return OrderItem::getAll(\"WHERE order_id = \".$this->getId());\n }", "title": "" }, { "docid": "cfaaad9fa8d3f16fdc1a547747421fa3", "score": "0.59717274", "text": "public function get_sell_active_orders() {\n\n\t\t$admin_id = $this->session->userdata('admin_id');\n\t\t$symbol = $this->session->userdata('global_symbol');\n\t\t$application_mode = $this->session->userdata('global_mode');\n\t\t//Check Filter Data\n\t\t//$session_post_data = $this->session->userdata('filter-data');\n\n\t\t//$search_array = array('admin_id'=> $admin_id, 'status' =>'new');\n\n\t\t$search_array = array('admin_id' => $admin_id, 'status' => 'FILLED', 'is_sell_order' => 'yes', 'application_mode' => $application_mode);\n\t\t$search_array['symbol'] = $symbol;\n\n\t\t$this->mongo_db->where($search_array);\n\t\t$this->mongo_db->limit(50);\n\t\t$this->mongo_db->sort(array('_id' => 'desc'));\n\t\t$responseArr22 = $this->mongo_db->get('buy_orders');\n\n\n\n\t\t$fullarray = array();\n\t\tforeach($responseArr22 as $valueArr22){\n\t\t\t$this->mongo_db->where(array('_id' => $valueArr22['sell_order_id']));\n\t\t\t$this->mongo_db->limit(50);\n\t\t\t$this->mongo_db->sort(array('_id' => 'desc'));\n\t\t\t$responseArr = $this->mongo_db->get('orders');\n\t\t\tforeach ($responseArr as $valueArr) {\n\t\t\t\t$returArr = array();\n\n\t\t\t\tif (!empty($valueArr)) {\n\n\t\t\t\t\t$datetime = $valueArr['created_date']->toDateTime();\n\t\t\t\t\t$created_date = $datetime->format(DATE_RSS);\n\n\t\t\t\t\t$datetime = new DateTime($created_date);\n\t\t\t\t\t$datetime->format('Y-m-d g:i:s A');\n\n\t\t\t\t\t$new_timezone = new DateTimeZone('Asia/Karachi');\n\t\t\t\t\t$datetime->setTimezone($new_timezone);\n\t\t\t\t\t$formated_date_time = $datetime->format('Y-m-d g:i:s A');\n\n\t\t\t\t\t$returArr['_id'] = $valueArr['_id'];\n\t\t\t\t\t$returArr['symbol'] = $valueArr['symbol'];\n\t\t\t\t\t$returArr['binance_order_id'] = $valueArr['binance_order_id'];\n\t\t\t\t\t$returArr['purchased_price'] = $valueArr['purchased_price'];\n\t\t\t\t\t$returArr['quantity'] = $valueArr['quantity'];\n\t\t\t\t\t$returArr['profit_type'] = $valueArr['profit_type'];\n\t\t\t\t\t$returArr['sell_profit_percent'] = $valueArr['sell_profit_percent'];\n\t\t\t\t\t$returArr['sell_profit_price'] = $valueArr['sell_profit_price'];\n\t\t\t\t\t$returArr['sell_price'] = number_format($valueArr['sell_price'], 8, '.', '');\n\t\t\t\t\t$returArr['market_value'] = $valueArr['market_value'];\n\t\t\t\t\t$returArr['trail_check'] = $valueArr['trail_check'];\n\t\t\t\t\t$returArr['trail_interval'] = $valueArr['trail_interval'];\n\t\t\t\t\t$returArr['sell_trail_price'] = $valueArr['sell_trail_price'];\n\t\t\t\t\t$returArr['stop_loss'] = $valueArr['stop_loss'];\n\t\t\t\t\t$returArr['loss_percentage'] = $valueArr['loss_percentage'];\n\t\t\t\t\t$returArr['status'] = $valueArr['status'];\n\t\t\t\t\t$returArr['admin_id'] = $valueArr['admin_id'];\n\t\t\t\t\t$returArr['application_mode'] = $valueArr['application_mode'];\n\t\t\t\t\t$returArr['buy_order_id'] = $valueArr['buy_order_id'];\n\t\t\t\t\t$returArr['buy_order_binance_id'] = $valueArr['buy_order_binance_id'];\n\t\t\t\t\t$returArr['created_date'] = $formated_date_time;\n\t\t\t\t}\n\n\t\t\t\t$fullarray[] = $returArr;\n\t\t\t}\n\t\t}\n\t\treturn $fullarray;\n\n\t}", "title": "" }, { "docid": "4c5765a631349a459b4feb02a1541223", "score": "0.59617025", "text": "public function getFinanceReportOrdersInfo()\n {\n return $this->getBankTransferOrders(self::STATUS_DAILY);\n }", "title": "" }, { "docid": "4d2292dbebfb7ee02368a0c6e298f1df", "score": "0.5957531", "text": "public function lists()\n {\n $user = (new UserRepository(app()))->findByToken(request()->bearerToken());\n if($user == null){\n return $this->sendError(trans('user.messages.errors.login'));\n }\n\n $input = request()->all();\n $input['user_id'] = $user->id;\n\n /** @var array $order */\n $orders = $this->orderRepository->lists($input);\n\n return $this->sendResponse(OrderResource::toArray($orders, $this->language), trans('order.messages.retrieved'));\n }", "title": "" }, { "docid": "6317ad0fd8ff018fc34abd7cda6427dd", "score": "0.5953739", "text": "function getAllOrdersInfo()\n{\n $row = allOrdersInfo();\n return $row;\n}", "title": "" }, { "docid": "1c7e1c22343cae14e6dc1c58332a12b6", "score": "0.594692", "text": "public function index()\n {\n return OrderResource::collection(Order::whereIn('state', ['confirmed', 'in preparation'])->where('responsible_cook_id', \\Auth::guard('api')->user()->id)->orWhere('state', 'confirmed')->whereNull('responsible_cook_id')->orderBy('state', 'desc')->orderBy('start', 'asc')->paginate(10));\n }", "title": "" }, { "docid": "8ad2c1871cfbf2d1c6f3be7bc12b569f", "score": "0.5945177", "text": "public function getOpenIds() {\n\t\treturn $this->openIds;\n\t}", "title": "" }, { "docid": "fc66057a2666aa1fe4ed940869230d1e", "score": "0.59403074", "text": "public function GetAllOrdersFromPM() {\n $response = \\Httpful\\Request::get($this->Uri . \"orders?with[]=addresses&with[]=orderItems.variation\")\n ->sendsJson()\n ->addHeaders(array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->AccessToken\n ))\n ->send();\n \n $this->response = $response;\n }", "title": "" }, { "docid": "67b7bd15f97af87f3c60d2c103d2eae6", "score": "0.5938525", "text": "public function index()\n {\n return Order::get();\n }", "title": "" }, { "docid": "d51dd4343465ecfca7c0955289d78517", "score": "0.5934056", "text": "public static function palpodelivery_get_all_future_orders() {\n\t\tglobal $wpdb;\n\n\t\t$gmt = false;\n if( has_filter( 'palpodelivery_gmt_calculations' ) ) {\n $gmt = apply_filters( 'palpodelivery_gmt_calculations', '' );\n }\n $current_time = current_time( 'timestamp', $gmt );\n\n\t\t$palpodelivery_query = \"SELECT ID, post_status FROM `\" . $wpdb->prefix . \"posts` WHERE post_type = 'shop_order' AND post_status NOT IN ( 'wc-on-hold', 'wc-cancelled', 'wc-failed', 'wc-refunded', 'trash' ) AND ID IN ( SELECT post_id FROM `\" . $wpdb->prefix . \"postmeta` WHERE ( meta_key = '_palpodelivery_timestamp' AND meta_value >= '\" . $current_time . \"' ) )\";\n\t\t$results = $wpdb->get_results( $palpodelivery_query );\n\n\t return $results;\n\t}", "title": "" }, { "docid": "064ab323babccf97c5555dbc4b73bb16", "score": "0.5927329", "text": "public static function allOrders(){\r\n\t\t\t$db = Database::connect();\r\n\t\t\t$query = \"SELECT * FROM ordini ORDER BY data DESC\";\r\n\t\t\t$risp = $db -> query($query);\r\n\t\t\treturn ($risp -> rowCount() > 0) ? $risp : false;\r\n\t\t}", "title": "" }, { "docid": "32a254139c5609f06eb33fed85ecdc7a", "score": "0.59202224", "text": "public function orders()\n {\n $items = Auth::user()->orders()\n ->where('status', 'ordered')\n ->paginate($this->pageSize);\n \n return view('afa.order.all')\n ->with('title', __('afa.orders'))\n ->with('items', $items);\n }", "title": "" }, { "docid": "38fe7ed328702656fff47844f9965e81", "score": "0.59181315", "text": "public function ExportOrders()\n\t{\n\t\t// Load up the orders class\n\t\t$GLOBALS['ISC_CLASS_ADMIN_ORDERS'] = GetClass('ISC_ADMIN_ORDERS');\n\n\t\t// Get the value of the order status setting\n\t\tif($this->GetValue('orderstatus') == 'shipped') {\n\t\t\t$_GET['orderStatus'] = 2;\n\t\t}\n\n\t\t$numOrders = 0;\n\t\t$ordersResult = $GLOBALS['ISC_CLASS_ADMIN_ORDERS']->_GetOrderList(0, 'orderid', 'desc', $numOrders, true);\n\n\t\tif($numOrders == 0) {\n\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ORDERS']->ManageOrders(GetLang('NoOrders'));\n\t\t\treturn;\n\t\t}\n\n\t\trequire_once(ISC_BASE_PATH.'/lib/class.xml.php');\n\t\t$xml = new ISC_XML_PARSER();\n\n\t\t$tags = array();\n\n\t\twhile($order = $GLOBALS['ISC_CLASS_DB']->Fetch($ordersResult)) {\n\t\t\t$orderTags = array();\n\t\t\t$orderTags[] = $xml->MakeXMLTag('amount', number_format($order['ordtotalamount'], 2));\n\t\t\t$orderTags[] = $xml->MakeXMLTag('customer', $order['ordbillfirstname'].' '.$order['ordbilllastname'], true);\n\t\t\t$orderTags[] = $xml->MakeXMLTag('date', CDate($order['orddate']), true);\n\t\t\t$attributes = array(\n\t\t\t\t'orderid' => $order['orderid']\n\t\t\t);\n\t\t\t$tags[] = $xml->MakeXMLTag('order', implode('', $orderTags), false, $attributes);\n\t\t}\n\n\t\t@ob_end_clean();\n\t\t$xml->SendXMLHeader();\n\t\t$xml->SendXMLResponse($tags);\n\t\texit;\n\t}", "title": "" }, { "docid": "94edc73a3cdf365473146727ca865d31", "score": "0.59093046", "text": "private function GetCustomerOrders()\n\t\t{\n\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('customers');\n\n\t\t\t$custId = (int) $_REQUEST['c'];\n\n\t\t\t// Get the details for the orders from the database\n\t\t\t$query = \"\n\t\t\t\tSELECT o.*, c.custconemail\n\t\t\t\tFROM [|PREFIX|]orders o\n\t\t\t\tLEFT JOIN [|PREFIX|]customers c ON (c.customerid=o.ordcustid)\n\t\t\t\tWHERE ordcustid='\".(int)$custId.\"' AND ordstatus != 0\n\t\t\t\";\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\t$query .= \" AND ordvendorid='\".(int)$GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId().\"'\";\n\t\t\t}\n\t\t\t$query .= \"ORDER BY orderid DESC\";\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t// Output the details of the order\n\t\t\t\t$GLOBALS['OrderId'] = (int) $row['orderid'];\n\t\t\t\t$GLOBALS['OrderStatus'] = GetOrderStatusById($row['ordstatus']);\n\t\t\t\t$GLOBALS['OrderTotal'] = FormatPrice($row['ordtotalamount']);\n\t\t\t\t$GLOBALS['OrderDate'] = CDate($row['orddate']);\n\t\t\t\t$GLOBALS['OrderViewLink'] = '<a href=\"#\" onclick=\"viewOrderNotes(' . $row['orderid'] . '); return false;\">' . GetLang('CustomerOrderListNotesLink') . '</a>';\n\n\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"customer.quickorder\");\n\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\n\t\t\t\t// The email is used by the view all orders button\n\t\t\t\t$GLOBALS['Email'] = isc_html_escape($row['custconemail']);\n\t\t\t\t$GLOBALS['CustomerId'] = $row['ordcustid'];\n\t\t\t}\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"customer.quickorderall\");\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t}", "title": "" }, { "docid": "93cea77f2c4e9b12981bc5e1a1ae19c3", "score": "0.59069467", "text": "public function actionOrders() {\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->orders($_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": "12e41f357a0ed3ded582dc2535ba71ad", "score": "0.5900671", "text": "public function getListorders() {\n\n\t\t$orders = Orders::orderBy('idbag', 'DESC') -> get();\n\t\t//print_r($orders);\n\t\t$this -> layout -> content = View::make('admin.listorders', array('orders' => $orders));\n\t}", "title": "" }, { "docid": "90b1343592b0b1b547a469bad6fb2734", "score": "0.58972347", "text": "public function getOrders()\n {\n\t\t$result['data']=$this->AdminModel->getOrders();\n\t\t$this->load->view('admin_orders',$result);\n\t}", "title": "" }, { "docid": "da2efb25969663bc18d15f78933f2bc3", "score": "0.5896615", "text": "public function index()\t{\n\t\treturn Order::open()->with(\"member\")->with(\"product\")->with(\"merchant\")->orderBy('updated_at', 'DESC')->take(50)->get()->toJson();\n\t}", "title": "" }, { "docid": "2a81a0e42f1c36982e1c07c6b90ec628", "score": "0.58754736", "text": "public function getCustomerOrderList()\n {\n $orders = $this->orderService->getCustomerOrderList();\n if ($orders) {\n return $this->responseSuccess($orders, Response::HTTP_OK);\n }\n return $this->responseError(__('order.index.fail'), Response::HTTP_INTERNAL_SERVER_ERROR);\n }", "title": "" }, { "docid": "52744a84b5dca41792c291345e322bbd", "score": "0.587454", "text": "public function orders()\n {\n // filter order to only return products owned by current seller\n $orders = auth()->guard('seller')->user()->orders->load(['user', 'status', 'products' => function ($query) {\n $query->where('seller_id', auth()->guard('seller')->user()->id);\n }]);\n\n return response()->json($orders, 200);\n }", "title": "" }, { "docid": "2b8fb8feb2d3b91fa30fbf3f73993d0a", "score": "0.587287", "text": "public function index()\n {\n //\n $orders = Order::with(['status', 'product', 'user'])\n ->get();\n\n for($i = 0; $i < count($orders); $i++)\n {\n $clientName = Client::where('id', $orders[$i]->product->clientId)->get();\n $orders[$i]->product->client = $clientName[0];\n }\n\n return $orders;\n }", "title": "" }, { "docid": "dfb8c8b7b89ec9f7fcafe24dae92bda0", "score": "0.58668303", "text": "public function getAllOrders()\n {\n $id = $this->request->getParam('id');\n $entityModel = $this->_entityFactory->create();\n\n //get all orders - need to change\n $orderCollection = $this->_orderCollectionFactory->create();\n\n $orders = [];\n foreach ($orderCollection as $order) {\n $orders[] = $order->getId();\n }\n\n return $orders;\n }", "title": "" }, { "docid": "90734aac59c50ab163965b54c0bccc75", "score": "0.5861261", "text": "public function getOrders(Request $request){\n\t\t$user = $request->user();\n\n\t\t$filter = $this->filter($request);\n\n if($filter['filter']){\n return Order::where($filter['query'])->where('user_id',$user->id)->orderBy($filter['orderField'],$filter['order'])->paginate(10);\n }\n \n return Order::where('user_id',$user->id)->orderBy('id','desc')->paginate(10);\n\t}", "title": "" }, { "docid": "1bc28d54da9e9833c6c0034ca913aadf", "score": "0.58589923", "text": "public function testListOrders()\n {\n // ARRANGE & ACT\n $response = $this->json('GET', '/orders?page=1&limit=10', [])->response->getContent();\n $json = json_decode($response);\n \n // ASSERT\n $this->assertResponseStatus(200);\n $this->seeJsonStructure([\n [\n 'id',\n 'distance',\n 'status'\n ]\n ]);\n }", "title": "" }, { "docid": "5dfac99950378d1fb007ceb0391c1ba5", "score": "0.5857176", "text": "public function lastOrders()\n\t{\n\t\treturn $this->selectAll(\n\t\t\t'SELECT statuses.name AS status, orders.email, orders.customer \n\t\t\t\tFROM orders INNER JOIN statuses\n\t\t\t\tWHERE statuses.status_id = orders.status_id \n\t\t\t\tORDER BY created_at DESC LIMIT 5'\n\t\t);\n\t}", "title": "" }, { "docid": "c077087073b33cc50179bfedc60f1072", "score": "0.5838873", "text": "public function getOrder()\n {\n }", "title": "" }, { "docid": "9fced3a75027b3c08b9b5271f7a149ca", "score": "0.5832845", "text": "public function consultOrder()\n {\n $this->load->model('OrdersModel', 'ordersModel', true);\n $list_orders = $this->ordersModel->getOrders();\n\n $this->response(\n [\n \"list_orders\" => $list_orders\n ],\n 200\n );\n }", "title": "" }, { "docid": "9b158f00d5f801097a473a2f470574f0", "score": "0.5827304", "text": "public function orders(){\n\n return static::hasmany(Order::class);\n }", "title": "" } ]
2d7a6fd6390f2f1e87836bfcbd7c6525
Resets some or all of the parameters of a DB Parameter Group to the default values. When resetting the entire group, dynamic parameters are updated immediately, and static parameters are set to pendingreboot to take effect when the DB Instance reboots.
[ { "docid": "5390fdf5769f4f15edac53af8addfcd2", "score": "0.67599225", "text": "public function ResetDBParameterGroup($DBParameterGroupName,\r\n\t\t\t\t\t\t\t\t\t\t\t\tParametersList $parameters,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resetAllParameters = true )\r\n\t\t{\r\n\t\t\t$request_args = array(\r\n\t\t\t\t\t\"Action\" \t\t\t\t\t=> \"ResetDBParameterGroup\",\r\n\t\t\t\t\t\"DBParameterGroupName\"\t\t=> strtolower($DBParameterGroupName),\r\n\t\t\t\t\t\"resetAllParameters\"\t\t=> $resetAllParameters\t\t\t\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t\tforeach ($parameters->GetParameters() as $i=>$o)\r\n\t\t\t{\r\n\t\t\t\t$request_args['Parameters.member.'.($i+1).\".ParameterName\"]\t = $o->ParameterName;\t\t\t\r\n\t\t\t\t$request_args['Parameters.member.'.($i+1).\".ApplyMethod\"]\t = $o->ApplyMethod;\r\n\t\t\t}\t\t\r\n\t\t\t\r\n\t\t\t$response = $this->Request(\"GET\", \"/\", $request_args);\r\n\t\t\t\r\n\t\t\treturn $response;\r\n\t\t}", "title": "" } ]
[ { "docid": "33da9004018fa47caf2437c6ffe7fcae", "score": "0.617934", "text": "public static function reset_global_settings() {\n\t\t\t$defaults = static::get_defaults();\n\n\t\t\tforeach ( $defaults as $groupId => $groupValues ) {\n\t\t\t\t$purchaseCode = null;\n\t\t\t\tif ( array_key_exists( 'purchase_code', $groupValues ) ) {\n\t\t\t\t\t$purchaseCode = self::get( 'purchase_code', $groupId );\n\t\t\t\t}\n\n\t\t\t\tdelete_option( $groupId );\n\n\t\t\t\tif ( $purchaseCode ) {\n\t\t\t\t\tupdate_option( $groupId, array( 'purchase_code' => $purchaseCode ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8f07447d72d8b11bbef9d73f73c7706d", "score": "0.6038893", "text": "public function resetParams()\n {\n $this->params = array();\n }", "title": "" }, { "docid": "db47185ffba73354391946e5cc853094", "score": "0.59414685", "text": "public function resetPreparedGroupByValues() {}", "title": "" }, { "docid": "db47185ffba73354391946e5cc853094", "score": "0.59414685", "text": "public function resetPreparedGroupByValues() {}", "title": "" }, { "docid": "db47185ffba73354391946e5cc853094", "score": "0.59414685", "text": "public function resetPreparedGroupByValues() {}", "title": "" }, { "docid": "db47185ffba73354391946e5cc853094", "score": "0.59414685", "text": "public function resetPreparedGroupByValues() {}", "title": "" }, { "docid": "135ea89e61d6cae5a2afd2ac271d83cc", "score": "0.59278184", "text": "public function resetImageParams()\n\t{\n\t\tunset(\n\t\t\t$this->params['src'],\n\t\t\t$this->params['width'],\n\t\t\t$this->params['height'],\n\t\t\t$this->params['quality'],\n\t\t\t$this->params['align'],\n\t\t\t$this->params['cropMode'],\n\t\t\t$this->params['sharpen'],\n\t\t\t$this->params['canvasColor'],\n\t\t\t$this->params['canvasTransparent'],\n\t\t\t$this->params['filters'],\n\t\t\t$this->params['cropRect'],\n\t\t\t$this->params['jpgProgressive']\n\t\t);\n\n\t\t$this->params['width'] = self::DEFAULT_SIZE;\n\t\t$this->params['height'] = self::DEFAULT_SIZE;\n\t}", "title": "" }, { "docid": "09299da88647d4e05193b1d91db0e17a", "score": "0.5906634", "text": "function resetPreparedGroupByValues() ;", "title": "" }, { "docid": "0fc0c982336049ac950a3e502ad0316a", "score": "0.5850866", "text": "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\n $this->parentId = null;\n $this->rank = 0;\n $this->managementKind = 'date';\n $config = wcmConfig::getInstance();\n $this->request = null; //serialize(array(\"query\" => $config['wcm.channel.query']));\n }", "title": "" }, { "docid": "770887f51a7c27767e1ed6f18145ebf6", "score": "0.58284724", "text": "function setDefaultValues() {}", "title": "" }, { "docid": "6c08b9554eb8995308c94637f1eae3bd", "score": "0.5822086", "text": "public function clearParameters() {}", "title": "" }, { "docid": "6c08b9554eb8995308c94637f1eae3bd", "score": "0.5822086", "text": "public function clearParameters() {}", "title": "" }, { "docid": "6c08b9554eb8995308c94637f1eae3bd", "score": "0.5822086", "text": "public function clearParameters() {}", "title": "" }, { "docid": "6c08b9554eb8995308c94637f1eae3bd", "score": "0.5822086", "text": "public function clearParameters() {}", "title": "" }, { "docid": "6c08b9554eb8995308c94637f1eae3bd", "score": "0.5822086", "text": "public function clearParameters() {}", "title": "" }, { "docid": "0afc29aceb9e6e0704c6f6bbae18c068", "score": "0.58189374", "text": "public function reset()\n {\n $this->values[self::BASE] = null;\n $this->values[self::CURRENTSYNCKEY] = null;\n $this->values[self::MAXSYNCKEY] = null;\n $this->values[self::CONTINUEFLAG] = null;\n $this->values[self::SELECTBITMAP] = null;\n $this->values[self::CMDCOUNT] = null;\n $this->values[self::CMDLISTLIST] = array();\n $this->values[self::RATIO] = null;\n }", "title": "" }, { "docid": "824c306e0d3556f118757b6b71fe4b93", "score": "0.5817122", "text": "private function resetParamGroupFields(array $param_groups)\n {\n $params = [];\n foreach ($param_groups as $group_id) {\n $params[$group_id] = $this->ds->getGroup($group_id);\n $this->data['blocks']['param' . $group_id] = [];\n\n $n = 1;\n foreach ($params[$group_id] as $key => $label) {\n $this->data['blocks']['param' . $group_id][$key] = [\n 'id' => str_pad($n, 2, \"0\", STR_PAD_LEFT),\n 'label' => $label,\n 'count' => 0\n ];\n $n++;\n }\n $this->data['p' . $group_id . '.num'] = str_pad($n, 2, \"0\", STR_PAD_LEFT);\n $this->data['p' . $group_id . '.sum'] = 0;\n\n }\n\n return $params;\n }", "title": "" }, { "docid": "e614545bd46e2fad03b34c48c2df01ce", "score": "0.5760167", "text": "public function reset(){\r\n $this->sql = NULL;\r\n $this->params=array();\r\n }", "title": "" }, { "docid": "e2a32729497132ab340145bf4d99d1a5", "score": "0.5749278", "text": "private function resetDefaultQueryVars() {\r\n\t\t$this->_query = '';\r\n\t\t$this->_data = [];\r\n\t\t$this->_where = ['string' => '', 'data' => []];\r\n\t\t$this->_groupBy = '';\r\n\t\t$this->_orderBy = '';\r\n\t\t$this->_limit = 0;\r\n\t\t$this->_set = ['column' => [], 'marker' => [], 'data' => []];\r\n\t}", "title": "" }, { "docid": "52d9c34b436008465e7ccf4d8f6ec80f", "score": "0.57481945", "text": "function Reset()\n\t{\n\t\tforeach($this->input_list as $input)\n\t\t\t$input->data = $input->data_default;\n\t}", "title": "" }, { "docid": "e327f2203e5b16386f052a4720f1ce5b", "score": "0.57111144", "text": "protected function reset()\n {\n foreach ($this->defaultAttributes as $attr => $value) {\n $this->$attr = $value;\n }\n }", "title": "" }, { "docid": "518d6c11d393b3c000b2fb486b59b333", "score": "0.56847894", "text": "protected function group_defaults()\n {\n }", "title": "" }, { "docid": "f7fa8aa35672fbefbb8c281ef208c9f9", "score": "0.5668843", "text": "private function reset() : void\n {\n $this->options_set = [\n 'expand' => false,\n 'style' => false,\n 'background' => false,\n 'text' => false\n ];\n\n $this->classes = [\n 'main' => [ ],\n 'groups' => [ 'btn-group' ],\n 'left' => [ 'btn-group' ],\n 'right' => [ 'btn-group' ]\n ];\n\n $this->tool_groups = [\n 'main' => [],\n 'left' => [],\n 'right' => []\n ];\n\n $this->active = null;\n $this->id = null;\n $this->base_uri = null;\n }", "title": "" }, { "docid": "23ec79a081405564f0b7dde663594522", "score": "0.562822", "text": "function reset()\n\t{\n\t\t$this->data = static::$defaults;\n\t\t$this->data[static::$pk] = null;\n\t}", "title": "" }, { "docid": "953016475382bf3bd03158b621e2eb41", "score": "0.5607035", "text": "function ResetSearchParms() {\r\n\r\n\t\t// Clear search WHERE clause\r\n\t\t$this->SearchWhere = \"\";\r\n\t\t$this->setSearchWhere($this->SearchWhere);\r\n\r\n\t\t// Clear advanced search parameters\r\n\t\t$this->ResetAdvancedSearchParms();\r\n\t}", "title": "" }, { "docid": "4f4e5ca2bf6ec6c78c222f8e1111fb32", "score": "0.5605912", "text": "private function reset()\n {\n $this->cfg_select = '*';\n $this->cfg_from = '';\n $this->cfg_limit = NULL;\n $this->cfg_where = array();\n $this->cfg_join = array();\n $this->cfg_bind_count = 1;\n }", "title": "" }, { "docid": "d35415de87909797e0cce575b6673de5", "score": "0.56044096", "text": "private function loadDefaults(): void\r\n {\r\n foreach ($this->defaults as $parameter => $value) {\r\n $this->setDefault($parameter, $value);\r\n }\r\n }", "title": "" }, { "docid": "9afcc9e6177c34659a164f5b16317759", "score": "0.5593927", "text": "protected function setDefaultValues()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "16fba9313d78873200e5819b35f3a852", "score": "0.5583632", "text": "function ResetSearchParms() {\n\n\t\t// Clear search WHERE clause\n\t\t$this->SearchWhere = \"\";\n\t\t$this->setSearchWhere($this->SearchWhere);\n\n\t\t// Clear basic search parameters\n\t\t$this->ResetBasicSearchParms();\n\n\t\t// Clear advanced search parameters\n\t\t$this->ResetAdvancedSearchParms();\n\t}", "title": "" }, { "docid": "19139e7ff0d112e06439e10fe89298b8", "score": "0.55825764", "text": "function ResetSearchParms() {\r\n\r\n\t\t// Clear search WHERE clause\r\n\t\t$this->SearchWhere = \"\";\r\n\t\t$this->setSearchWhere($this->SearchWhere);\r\n\r\n\t\t// Clear basic search parameters\r\n\t\t$this->ResetBasicSearchParms();\r\n\r\n\t\t// Clear advanced search parameters\r\n\t\t$this->ResetAdvancedSearchParms();\r\n\t}", "title": "" }, { "docid": "19139e7ff0d112e06439e10fe89298b8", "score": "0.55825764", "text": "function ResetSearchParms() {\r\n\r\n\t\t// Clear search WHERE clause\r\n\t\t$this->SearchWhere = \"\";\r\n\t\t$this->setSearchWhere($this->SearchWhere);\r\n\r\n\t\t// Clear basic search parameters\r\n\t\t$this->ResetBasicSearchParms();\r\n\r\n\t\t// Clear advanced search parameters\r\n\t\t$this->ResetAdvancedSearchParms();\r\n\t}", "title": "" }, { "docid": "1bb4f308caa7cf1f03a5247e36ed461a", "score": "0.5573302", "text": "function ResetSearchParms() {\n\n\t\t// Clear search WHERE clause\n\t\t$this->SearchWhere = \"\";\n\t\t$this->setSearchWhere($this->SearchWhere);\n\n\t\t// Clear basic search parameters\n\t\t$this->ResetBasicSearchParms();\n\t}", "title": "" }, { "docid": "1bb4f308caa7cf1f03a5247e36ed461a", "score": "0.5573302", "text": "function ResetSearchParms() {\n\n\t\t// Clear search WHERE clause\n\t\t$this->SearchWhere = \"\";\n\t\t$this->setSearchWhere($this->SearchWhere);\n\n\t\t// Clear basic search parameters\n\t\t$this->ResetBasicSearchParms();\n\t}", "title": "" }, { "docid": "88f73c8ae42ca4d195274b4668aa58a9", "score": "0.5558367", "text": "public function resetAll() {\r\n $this->_global_title_uuid = '';\n $this->_first_name = '';\n $this->_last_name = '';\n $this->_preferred_global_language_uuid = '';\n $this->_username = '';\r\n }", "title": "" }, { "docid": "4ff62eb499dc914eb3aa8e07f7d23972", "score": "0.5544255", "text": "private function resetVars()\n {\n $this->select = '*';\n $this->offset = 0;\n $this->limit = null;\n $this->conditions = null;\n $this->order = null;\n $this->sql = '';\n $this->related = [];\n\n }", "title": "" }, { "docid": "9e36071ef450f815e5d315c36c20a789", "score": "0.55426484", "text": "function ResetSearchParms() {\n\n\t// Clear search where\n\tglobal $admin;\n\t$sSrchWhere = \"\";\n\t$admin->setSearchWhere($sSrchWhere);\n\n\t// Clear basic search parameters\n\tResetBasicSearchParms();\n}", "title": "" }, { "docid": "300895c8011e5722d6d89300e71d7f39", "score": "0.55246514", "text": "function ResetSearchParms() {\r\n\t\tglobal $keu_laporan_keuangan;\r\n\r\n\t\t// Clear search WHERE clause\r\n\t\t$this->SearchWhere = \"\";\r\n\t\t$keu_laporan_keuangan->setSearchWhere($this->SearchWhere);\r\n\r\n\t\t// Clear basic search parameters\r\n\t\t$this->ResetBasicSearchParms();\r\n\r\n\t\t// Clear advanced search parameters\r\n\t\t$this->ResetAdvancedSearchParms();\r\n\t}", "title": "" }, { "docid": "65b9f84184134a104d0eacb25368b3dc", "score": "0.5511563", "text": "public function pi_setPiVarDefaults() {}", "title": "" }, { "docid": "58c13bfa522a08d793c24f0cf92a92cb", "score": "0.55103946", "text": "protected function _resetRequestParameters()\n\t{\n\t\t$this->request['period']\t\t\t= IPSSearchRegistry::get('in.period');\n\t\t$this->request['real_period']\t\t= IPSSearchRegistry::get('in.real_period');\n\t\t$this->request['search_app']\t\t= IPSSearchRegistry::get('in.search_app');\n\t\t$this->request['vncFollowFilterOn']\t= IPSSearchRegistry::get('in.vncFollowFilterOn');\n\t\t$this->request['followedItemsOnly']\t= IPSSearchRegistry::get('in.vncFollowFilterOn');\n\t\t$this->request['userMode']\t\t\t= IPSSearchRegistry::get('in.userMode');\n\t}", "title": "" }, { "docid": "e7aa707addf6a7711940f22bddf02e80", "score": "0.5494019", "text": "public function resetDefaultValue()\n {\n $this->defaultValue = null;\n }", "title": "" }, { "docid": "1526c2b4157f4433f0d4e7505d350443", "score": "0.54920244", "text": "public function resetProperties() {\n $this->mode = $this->columns = $this->where = $this->values = $this->data = null;\n }", "title": "" }, { "docid": "281e6c1bc9b09d300dca68a6881c7286", "score": "0.54880244", "text": "public function applyDefaultValues()\n {\n $this->active = false;\n }", "title": "" }, { "docid": "8c9891acd38911d880c50bba59843430", "score": "0.54709345", "text": "function ResetSearchParms() {\n\t\tglobal $student_applicant;\n\n\t\t// Clear search WHERE clause\n\t\t$this->sSrchWhere = \"\";\n\t\t$student_applicant->setSearchWhere($this->sSrchWhere);\n\n\t\t// Clear advanced search parameters\n\t\t$this->ResetAdvancedSearchParms();\n\t}", "title": "" }, { "docid": "79e7cc2b144ee8c7cba286e9d5b07bc6", "score": "0.5465543", "text": "public function reset()\n\t{\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v)\n\t\t{\n\t\t\t// If the property is not the primary key, reset it.\n\t\t\tif (!in_array($k, $this->tableKeys))\n\t\t\t{\n\t\t\t\t$this->$k = $v->Default;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9035d95710e005abbb1225a71c617c8c", "score": "0.5458033", "text": "function ResetSearchParms() {\n\t\tglobal $view_sponsored_student_school;\n\n\t\t// Clear search WHERE clause\n\t\t$this->sSrchWhere = \"\";\n\t\t$view_sponsored_student_school->setSearchWhere($this->sSrchWhere);\n\n\t\t// Clear basic search parameters\n\t\t$this->ResetBasicSearchParms();\n\t}", "title": "" }, { "docid": "34dc61e1953cec50447450f4ae54f845", "score": "0.54571694", "text": "public function reset()\n {\n $this->values[self::PARTICIPANT_ID] = null;\n $this->values[self::NEW_BLOCK_STATE] = null;\n }", "title": "" }, { "docid": "9b6eecf97e9c3c555fbd489977179597", "score": "0.5454798", "text": "function ResetAdvancedSearchParms() {\n\t\t$this->ID_Formulario->AdvancedSearch->UnsetSession();\n\t\t$this->USUARIO->AdvancedSearch->UnsetSession();\n\t\t$this->NOM_GE->AdvancedSearch->UnsetSession();\n\t\t$this->Otro_PGE->AdvancedSearch->UnsetSession();\n\t\t$this->FECHA_NOVEDAD->AdvancedSearch->UnsetSession();\n\t\t$this->NOM_PE->AdvancedSearch->UnsetSession();\n\t\t$this->Otro_Nom_PE->AdvancedSearch->UnsetSession();\n\t\t$this->Muncipio->AdvancedSearch->UnsetSession();\n\t\t$this->departamento->AdvancedSearch->UnsetSession();\n\t\t$this->Modificado->AdvancedSearch->UnsetSession();\n\t\t$this->llave_2->AdvancedSearch->UnsetSession();\n\t}", "title": "" }, { "docid": "38f39ab73212dbc5a660c6e411ddeca0", "score": "0.54417586", "text": "public function reset()\n {\n $this->values[self::token] = null;\n $this->values[self::group_id] = null;\n $this->values[self::channel] = null;\n $this->values[self::plat_form] = null;\n $this->values[self::value_id] = null;\n $this->values[self::params] = null;\n $this->values[self::checksum] = null;\n $this->values[self::message] = null;\n $this->values[self::status] = null;\n $this->values[self::priority] = null;\n $this->values[self::typequeue] = null;\n }", "title": "" }, { "docid": "d2d5f5ea9b5b820f769ff267e56d390c", "score": "0.54305387", "text": "function ResetSearchParms() {\r\n\t\tglobal $tbl_profile;\r\n\r\n\t\t// Clear search WHERE clause\r\n\t\t$this->sSrchWhere = \"\";\r\n\t\t$tbl_profile->setSearchWhere($this->sSrchWhere);\r\n\r\n\t\t// Clear basic search parameters\r\n\t\t$this->ResetBasicSearchParms();\r\n\r\n\t\t// Clear advanced search parameters\r\n\t\t$this->ResetAdvancedSearchParms();\r\n\t}", "title": "" }, { "docid": "15be286d512911c6622cc873f0e8bd2e", "score": "0.54229844", "text": "public function reset()\n {\n $this->values[self::FIELD] = null;\n $this->values[self::PRIORVALUE] = null;\n $this->values[self::VALUE] = null;\n $this->values[self::EFFECTIVEDATE] = null;\n $this->values[self::STATUS] = null;\n $this->values[self::USERNAME] = null;\n $this->values[self::DELEGATEDUSER] = null;\n }", "title": "" }, { "docid": "95df69cd852bebf8a5888358917539d6", "score": "0.54150164", "text": "public function reset()\n {\n $this->values[self::REQUEST_HEADER] = null;\n $this->values[self::PRESENCE_STATE_SETTING] = null;\n $this->values[self::DND_SETTING] = null;\n $this->values[self::DESKTOP_OFF_SETTING] = null;\n $this->values[self::MOOD_SETTING] = null;\n }", "title": "" }, { "docid": "5477f4c99a70e9a7a36259cf292e0a34", "score": "0.54090655", "text": "public function applyDefaultValues()\n {\n $this->managed = false;\n }", "title": "" }, { "docid": "de5eccfd1243d7f59aed1ec2e81bc898", "score": "0.54089415", "text": "public function applyDefaultValues()\n {\n $this->delted = false;\n }", "title": "" }, { "docid": "c42cad4e96631e2138c63e5cdaa6509b", "score": "0.5404323", "text": "public function applyDefaultValues()\n {\n $this->cctbconfkey = 0;\n }", "title": "" }, { "docid": "c015be10c636ac69a998af9bf7562ccd", "score": "0.54003596", "text": "public static function setAll(array $parameters)\n {\n self::$parameters = array_replace(self::getDefault(), $parameters);\n }", "title": "" }, { "docid": "a552f67c970a7a5698ac59a022ef29d5", "score": "0.5398429", "text": "public function reset()\n {\n $this->values[self::FLAG] = null;\n }", "title": "" }, { "docid": "e2f295ec1e42082e18838b7085c564d6", "score": "0.5388193", "text": "function resetOptions()\r\n {\r\n $this->options = $this->_defaultOptions;\r\n }", "title": "" }, { "docid": "154fd33e10e5edf27741c36b2309c889", "score": "0.5385997", "text": "public function reset()\n {\n $this->values[self::ATTR] = array();\n $this->values[self::TEMPLATE_ID] = null;\n }", "title": "" }, { "docid": "b79640c1a207157fb4e839da90c5b243", "score": "0.5379019", "text": "function ResetAdvancedSearchParms() {\r\n\t\t$this->Id_Articulo->AdvancedSearch->UnsetSession();\r\n\t\t$this->COD_Marca_eq->AdvancedSearch->UnsetSession();\r\n\t\t$this->Articulo->AdvancedSearch->UnsetSession();\r\n\t\t$this->Codigo->AdvancedSearch->UnsetSession();\r\n\t}", "title": "" }, { "docid": "2e4fb6870d16f822d658930e888b6784", "score": "0.5375614", "text": "function ResetAdvancedSearchParms() {\r\n\t\t$this->pr_Barcode->AdvancedSearch->UnsetSession();\r\n\t\t$this->pr_PO->AdvancedSearch->UnsetSession();\r\n\t\t$this->pr_intStatus->AdvancedSearch->UnsetSession();\r\n\t}", "title": "" }, { "docid": "17ec6d33cf9223b89052f2c6929f0d7a", "score": "0.5374158", "text": "public static function resetPdoParamAliases()\n {\n self::$pdoParamAliasesUsed = [];\n }", "title": "" }, { "docid": "cf1eb2c0f7cce23740857bcd7dc367bf", "score": "0.53665805", "text": "function resetOptions()\n {\n $this->_options = $this->_defaultOptions;\n }", "title": "" }, { "docid": "cf1eb2c0f7cce23740857bcd7dc367bf", "score": "0.53665805", "text": "function resetOptions()\n {\n $this->_options = $this->_defaultOptions;\n }", "title": "" }, { "docid": "04d4893b8431a68b9838ad1ae7d182e6", "score": "0.5364873", "text": "private function ResetGlobalVariables()\n\t{\n\t\t$this->_select\t = '';\n\t\t$this->_where\t = '';\n\t\t$this->_join\t\t= '';\n\t\t$this->_limit\t = '';\n\t\t$this->_groupBy\t= '';\n\t\t$this->_offset\t = '';\n\t\t$this->_orderBy\t= '';\n\n $this->_table = '';\n\t\t$this->_alias = '';\n\t\t$this->_primary = '';\n\t}", "title": "" }, { "docid": "77f3576f06ac8df633eab7348f8655ab", "score": "0.5363707", "text": "public function reset()\n {\n $this->values[self::OBJ] = null;\n $this->values[self::METHOD] = null;\n $this->values[self::PARAMS] = array();\n }", "title": "" }, { "docid": "7cbcfb15ddbdbf54b0b52d22123451cb", "score": "0.53622323", "text": "function ResetSearchParms() {\n\t\tglobal $t_tinbai_mainsite_level;\n\n\t\t// Clear search WHERE clause\n\t\t$this->sSrchWhere = \"\";\n\t\t$t_tinbai_mainsite_level->setSearchWhere($this->sSrchWhere);\n\n\t\t// Clear basic search parameters\n\t\t$this->ResetBasicSearchParms();\n\n\t\t// Clear advanced search parameters\n\t\t$this->ResetAdvancedSearchParms();\n\t}", "title": "" }, { "docid": "8d509b80e6f858ffb9d7ec8aabfb21ff", "score": "0.5357491", "text": "function ResetBasicSearchParms() {\n\n\t// Clear basic search parameters\n\tglobal $admin;\n\t$admin->setBasicSearchKeyword(\"\");\n\t$admin->setBasicSearchType(\"\");\n}", "title": "" }, { "docid": "0163280e95cd7b72cb7219899827f68e", "score": "0.5355656", "text": "public function applyDefaultValues()\n {\n $this->active = 1;\n }", "title": "" }, { "docid": "fd181a7f19e4b35f4903a8bbf961f6d8", "score": "0.53537667", "text": "function ResetAdvancedSearchParms() {\r\n\r\n\t// Clear advanced search parameters\r\n\tglobal $logs;\r\n\t$logs->setAdvancedSearch(\"x_id\", \"\");\r\n\t$logs->setAdvancedSearch(\"x_time\", \"\");\r\n\t$logs->setAdvancedSearch(\"x_client\", \"\");\r\n\t$logs->setAdvancedSearch(\"x_group\", \"\");\r\n\t$logs->setAdvancedSearch(\"x_type\", \"\");\r\n\t$logs->setAdvancedSearch(\"x_message\", \"\");\r\n}", "title": "" }, { "docid": "42ffc90137c25ad3eb250231b9c36d6e", "score": "0.5352018", "text": "protected function resetDefault()\n {\n $this->schema()->drop('users_default');\n $this->schema()->drop('contracts_default');\n $this->schema()->drop('positions_default');\n }", "title": "" }, { "docid": "91e223930210635dc54c95196b0a5245", "score": "0.5342124", "text": "function SetParameters()\n\t{\n\t}", "title": "" }, { "docid": "9a05f803881515adbea17b3286a2f403", "score": "0.53414077", "text": "public function unsetDefaultParameter($key)\n {\n unset($this->defaultParameters[$key]);\n }", "title": "" }, { "docid": "1109bd779d52672236758d213ecce044", "score": "0.5340741", "text": "public function reset()\n {\n $this->values[self::LONGCONNECTIPCOUNT] = null;\n $this->values[self::SHORTCONNECTIPCOUNT] = null;\n $this->values[self::SEQ] = null;\n $this->values[self::LONGCONNECTIPLIST] = array();\n $this->values[self::SHORTCONNECTIPLIST] = array();\n }", "title": "" }, { "docid": "f30ffef5bc2adc2c8f26159c12d4c0ec", "score": "0.53334", "text": "public function reset(): void\n {\n $this->enabled = $this->enabledDefault;\n }", "title": "" }, { "docid": "873cf063e141394d12461e1ac4d9736e", "score": "0.53292656", "text": "public function reset()\n {\n $this->values[self::IP] = array();\n $this->values[self::PORT] = array();\n $this->values[self::PID] = array();\n }", "title": "" }, { "docid": "aed74bd6418cf8e6d40fb555d4a295ff", "score": "0.53289425", "text": "public function applyDefaultValues()\n {\n $this->pohdnbr = '';\n $this->podtline = 0;\n }", "title": "" }, { "docid": "d5b804114f91824dbbbf85354e1a8b89", "score": "0.53283906", "text": "public function reset() {\n\t\t\tforeach ($this->fields as $key => $vals) {\n\t\t\t\t$this->$vals[0] = array(NULL, NULL, true);\n\t\t\t}\n\t\t\t$this->clearErrors();\n\t\t\t$this->clearErrorFields();\n\t\t}", "title": "" }, { "docid": "3cb3c7ca26cce26adb60e96c2efc7cdd", "score": "0.53192407", "text": "public function reset()\n {\n $this->values[self::GID] = null;\n $this->values[self::SOLDIER] = array();\n $this->values[self::RES_TYPE] = array();\n $this->values[self::RES_COUNT] = array();\n $this->values[self::NAME] = null;\n $this->values[self::ICON] = null;\n $this->values[self::POS] = null;\n $this->values[self::LEAGUE_ID] = null;\n $this->values[self::LEAGUE_NAME] = null;\n $this->values[self::POWER] = null;\n $this->values[self::COMBAT_DAILY_DATA] = array();\n $this->values[self::IS_MONSTER] = self::$fields[self::IS_MONSTER]['default'];\n $this->values[self::LEAGUE_SHORT] = null;\n $this->values[self::ORIG_HKEY] = null;\n $this->values[self::JOIN_TIME] = null;\n $this->values[self::TECH_IDS] = array();\n $this->values[self::RES_TYPE_EXT] = array();\n $this->values[self::RES_COUNT_EXT] = array();\n $this->values[self::HERO_SKILLS] = array();\n }", "title": "" }, { "docid": "d7944fa4db5e6e84eb59cb3c5f880d45", "score": "0.53059757", "text": "protected function resetToDefaults()\n {\n $this->auth_level = 'USER';\n $this->encrypted_passwd = '';\n $this->user_id = -1;\n $this->user_name = '';\n $this->user_email = '';\n $this->loggedIn = false;\n }", "title": "" }, { "docid": "910122e0562cf37561357da7a2bc1ed1", "score": "0.5299006", "text": "public function Reset()\n {\n while (count($this->params) > 0) \t\t// Still some left?\n array_pop($this->params);\t\t\t// Remove last element\n }", "title": "" }, { "docid": "618b607088bfdd9fea48164307d01d65", "score": "0.5294006", "text": "public static function reset()\n {\n static::$_processedFields = false;\n static::$_processedSites = false;\n static::$_processedUserGroups = false;\n }", "title": "" }, { "docid": "c6861b97bee012ca4d29f9b699bbc602", "score": "0.52895707", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->setUpdateMethod(UpdateMethodType::MANUAL);\n\t}", "title": "" }, { "docid": "0df90a113d444351e06ad3ba113a4b54", "score": "0.52851784", "text": "function ResetSearchParms() {\r\n\r\n\t// Clear search where\r\n\tglobal $logs;\r\n\t$sSrchWhere = \"\";\r\n\t$logs->setSearchWhere($sSrchWhere);\r\n\r\n\t// Clear basic search parameters\r\n\tResetBasicSearchParms();\r\n\r\n\t// Clear advanced search parameters\r\n\tResetAdvancedSearchParms();\r\n}", "title": "" }, { "docid": "03e9e177e2ead50732746937d802259e", "score": "0.5280867", "text": "public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "03e9e177e2ead50732746937d802259e", "score": "0.5280867", "text": "public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ebbbbc8c8efdb0e61d10a7e4d8e1c9cd", "score": "0.52803504", "text": "public function assignDefaultValues() {\r\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\r\n\t}", "title": "" }, { "docid": "1b41f89c4550257e85d700bc272c68cd", "score": "0.52802384", "text": "function ResetAdvancedSearchParms() {\r\n\t\t$this->id_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->dociden_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->nomb_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->apell_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->telf_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->email_empleado->AdvancedSearch->UnsetSession();\r\n\t\t$this->st_empleado_p->AdvancedSearch->UnsetSession();\r\n\t\t$this->id_perfil->AdvancedSearch->UnsetSession();\r\n\t}", "title": "" }, { "docid": "06f32a67c48a759e5ce2d3948fedee56", "score": "0.5280006", "text": "function ResetBasicSearchParms() {\n\t\t$this->setSessionBasicSearchKeyword(\"\");\n\t\t$this->setSessionBasicSearchType($this->BasicSearchTypeDefault);\n\t}", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.52799624", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.52799624", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.52799624", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "cd38eac8a19dc7f29c9a1f3f5f8beb21", "score": "0.5277179", "text": "protected function resetPlan()\n {\n $this->defaultPlan = new Plan($this->newModelInstance());\n $this->plans = [];\n $this->planStep = null;\n }", "title": "" }, { "docid": "dffecc45aa9197ab40e38f2343e03383", "score": "0.52730983", "text": "public function applyDefaultValues()\n {\n $this->is_rascunho = true;\n $this->qte_comentarios = 0;\n $this->qte_curtidas = 0;\n $this->qte_seguidores = 0;\n $this->qte_concluidos = 0;\n }", "title": "" }, { "docid": "fdbfb5c47dab9b3d07cbf8cb89e6319e", "score": "0.52581865", "text": "public function setDefaultParameters() {\n \tif ( ! isset($this->screenShotPath) ) {\n\t\t $this->screenShotPath = \"/root/screenshots/\";\n\t\t}\n if ( ! isset($this->users) ) {\n\t\t $this->users = [ 'admin' => 'admin'];\n\t\t}\n if ( ! isset($this->subdomain) ) {\n\t\t $this->subdomain = false;\n\t\t}\n if ( ! isset($this->multisite) ) {\n\t\t $this->multisite = true;\n\t\t}\n if ( ! isset($this->timeout) ) {\n\t\t $this->timeout = 30;\n\t\t}\n if ( ! isset($this->pluginsPageUrl) ) {\n\t\t $this->pluginsPageUrl = \"wp-admin/plugins.php\" ;\n\t\t}\n if ( ! isset($this->themesPageUrl) ) {\n\t\t $this->themesPageUrl = \"wp-admin/themes.php?default=1\";\n\t\t}\n }", "title": "" }, { "docid": "12b5c90d69810a9a99d1bde99de7fd48", "score": "0.52541184", "text": "public function reset()\n {\n $this->values[self::KPP] = null;\n $this->values[self::FULLNAME] = null;\n $this->values[self::ADDRESS] = null;\n }", "title": "" }, { "docid": "bbb5e22bfbf522461d51f214ad007e4a", "score": "0.52536523", "text": "public function set_defaults()\n {\n }", "title": "" }, { "docid": "3c8609b696e8497738f86c9d4d125567", "score": "0.5252924", "text": "protected function prependAllValueToPossibleValues() {\n array_unshift(\n $this->possibleValues,\n array(\n 'value' => 'reset',\n 'label' => 'LLL:EXT:pt_list/locallang.xml:filter_group_all',\n )\n );\n\t}", "title": "" }, { "docid": "8a96237ff66638570a08be865a5e9742", "score": "0.5249194", "text": "public function resetConfig();", "title": "" }, { "docid": "e0d3f13b9ea8a71b8aa458aaa12e6fe2", "score": "0.52464324", "text": "protected function init_defaults() {\n\t\t$this->arguments_defaults = array();\n\t}", "title": "" }, { "docid": "1cc1f58d25e98fee9cf47ff8c06bbda4", "score": "0.5244523", "text": "public function set_defaults() {\n $this->data = $this->default_data;\n $this->changes = array();\n $this->set_object_read( false );\n }", "title": "" } ]
7a20f4df28f8064f256fbaa42af7929d
Creates the column Manager. specifiy the amount of columns to use for large medium and small
[ { "docid": "ca6274a86d01b2065e67e2f40a8b2e70", "score": "0.56348485", "text": "public function __construct($numberLarge, $numberMedium, $numberSmall, $numberXSmall, $before = null, $after = null)\n {\n $this->numberOfColumns = $numberLarge;\n \n if (isset($before))\n $this->before = $before;\n if (isset($after))\n $this->after = $after;\n $large = 12 / $numberLarge;\n $medium = 12 / $numberMedium;\n $small = 12 / $numberSmall;\n $xSmall = 12 / $numberXSmall;\n $this->columns = [];\n for ($i = 0; $i < $numberLarge; $i++) {\n array_push($this->columns, [\n \"start\" => '<div class=\"col-lg-' . $large .\n ' col-md-' . $medium .\n ' col-sm-' . $small . ' col-xs-' . $xSmall . '\">',\n \"end\" => \"</div>\",\n \"content\" => \"\"\n ]);\n }\n }", "title": "" } ]
[ { "docid": "ca4ef4030ea0a0aa3c73c3b2bd6be407", "score": "0.6490139", "text": "protected function buildColumns()\n {\n foreach ($this->columns as &$columnOptions) {\n\n /**\n * In case of when column is already build\n */\n if (is_object($columnOptions)) {\n continue;\n }\n\n /**\n * When only attribute name/value passed\n */\n if (is_string($columnOptions)) {\n $columnOptions = [\n 'value' => $columnOptions,\n ];\n }\n\n $columnOptions = array_merge($this->columnOptions, $columnOptions);\n\n $className = GridViewHelper::resolveAlias('column', $columnOptions['class']);\n $columnOptions = new $className($columnOptions);\n }\n }", "title": "" }, { "docid": "6016da2107c8bc81b561c7b4ec34370e", "score": "0.64633214", "text": "private function prepareColumnDefinitions ()\n { \n foreach ($this->columns as $col) \n {\n // evaluate the column type\n $type_function = \"string\"; // default \n if (property_exists($col, \"datatype\")) \n {\n $type_function = $col->datatype;\n }\n \n // evaluate the size property\n // size is only applicable to certain data types\n if (!in_array($type_function, [\"string\", \"float\", \"double\", \"decimal\", \"char\"])) \n {\n $size = 0;\n }\n else \n {\n if (property_exists($col, \"size\")) \n {\n // if the size is applicable to the data type\n // and size has been provided, use that\n $size = $col->size;\n } \n else \n {\n // otherwise use the defaults\n $size_map = [\n \"string\" => \"64\", \"float\" => \"8, 2\", \"decimal\" => \"5, 2\",\n \"double\" => \"15, 8\", \"char\" => \"8\"\n ];\n $size = $size_map[$type_function];\n }\n } // else\n\n \n // evaluate whether the column is optional or mandatory\n $nullable = false; // default\n if (property_exists($col, \"optional\")) \n {\n $nullable = $col->optional;\n }\n\n $def = '$table->'\n . $type_function\n . '(\"' . $col->name . '\"' . ($size != 0 ? ', ' . $size : '') . ')'\n . ($nullable ? \"->nullable();\" : \";\");\n\n array_push($this->columnDefinitions, $def);\n } // foreach\n }", "title": "" }, { "docid": "62f47c45fdaf9639b1b9de3b69b50f2e", "score": "0.6424441", "text": "public function getColumnsToCreate()\n\t{\n\n\t}", "title": "" }, { "docid": "69167f32e20c511ecd5ec9f1b1addd70", "score": "0.640849", "text": "private function init_columns() {\n\t\t$columns = array();\n\t\t$info_table = $this->db()->table_info($this->dbtable);\n\t\tforeach ($info_table['columns'] as $info_column) {\n\t\t\t// Create column object :\n\t\t\t$column = new GlueDB_Column(\n\t\t\t\t\t$this,\n\t\t\t\t\t$info_column['column'],\n\t\t\t\t\t$info_column['type'],\n\t\t\t\t\t$info_column['nullable'],\n\t\t\t\t\t$info_column['maxlength'],\n\t\t\t\t\t$info_column['precision'],\n\t\t\t\t\t$info_column['scale'],\n\t\t\t\t\t$info_column['default'],\n\t\t\t\t\t$info_column['auto']\n\t\t\t\t);\n\n\t\t\t// Add columns :\n\t\t\t$columns[$column->name()] = $column;\n\t\t}\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "f40af53fbad410e1418e63524cf7e101", "score": "0.6385998", "text": "public function createColumns()\n\t {\n\t\t //$this->colId = $this->createNodeColumn(\"Id\", QQN::Tourist()->Id);\n\t\t $this->colName = $this->createNodeColumn(\"Name\", QQN::Tourist()->Name);\n\t\t $this->colNickname = $this->createNodeColumn(\"Name\", QQN::Tourist()->Nickname);\n\t\t //$this->colPassport = $this->createNodeColumn(\"Passport\", QQN::Tourist()->Passport);\n\t\t //$this->colContactinfo = $this->createNodeColumn(\"Contactinfo\", QQN::Tourist()->Contactinfo);\n\t\t $this->colLanguage = $this->createNodeColumn(\"Language\", QQN::Tourist()->Language);\n\t\t //$this->colCity = $this->createNodeColumn(\"City\", QQN::Tourist()->City);\n\t\t $this->colCountry = $this->createNodeColumn(\"Country\", QQN::Tourist()->Country);\n\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "0c6ff447eb237238edd16b2e32a357bb", "score": "0.6372308", "text": "protected function _prepareColumns()\n {\n $this->addColumn(\n 'emag_id',\n array(\n 'header' => $this->__('eMAG ID'),\n 'align' => 'left',\n 'type' => 'number',\n 'index' => 'emag_id',\n 'width' => '50px',\n )\n );\n $this->addColumn(\n 'rate',\n array(\n 'header' => $this->__('Rate'),\n 'align' => 'right',\n 'type' => 'text',\n 'index' => 'rate',\n )\n );\n if (!Mage::app()->isSingleStoreMode()) {\n $this->addColumn(\n 'store_id',\n array(\n 'header' => Mage::helper('sales')->__('Store'),\n 'index' => 'store_id',\n 'type' => 'store',\n 'store_view' => true,\n )\n );\n }\n $this->addColumn(\n 'updated_at',\n array(\n 'header' => $this->__('Updated at'),\n 'align' => 'center',\n 'type' => 'datetime',\n 'index' => 'updated_at',\n 'width' => '150px',\n )\n );\n $this->addColumn(\n 'created_at',\n array(\n 'header' => $this->__('Created at'),\n 'align' => 'center',\n 'type' => 'datetime',\n 'index' => 'created_at',\n 'width' => '150px',\n )\n );\n \n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "bd99d82818aecc2343e034e669762da3", "score": "0.6217203", "text": "public static function columns() {\n \t\n \t$columns['id'] = new \\Gino\\IntegerField(array(\n \t\t'name'=>'id',\n \t\t'primary_key'=>true,\n \t\t'auto_increment'=>true,\n \t));\n \t$columns['label'] = new \\Gino\\CharField(array(\n \t\t'name'=>'label',\n \t 'label' => _(\"Etichetta\"),\n \t\t'required' => true,\n \t\t'max_lenght'=>100,\n \t));\n \t$columns['name'] = new \\Gino\\CharField(array(\n \t\t'name'=>'name',\n \t 'label' => _(\"Nome classe\"),\n \t\t'required' => true,\n \t\t'max_lenght'=>100,\n \t));\n \t$columns['active'] = new \\Gino\\BooleanField(array(\n \t\t'name'=>'active',\n \t 'label' => _(\"Attivo\"),\n \t\t'required' => true,\n \t\t'default'=>1,\n \t));\n \t$columns['tbl_name'] = new \\Gino\\CharField(array(\n \t\t'name'=>'tbl_name',\n \t 'label' => _(\"Prefisso tabelle\"),\n \t\t'required' => true,\n \t\t'max_lenght'=>30,\n \t));\n \t$columns['instantiable'] = new \\Gino\\BooleanField(array(\n \t\t'name'=>'instantiable',\n \t 'label' => _(\"Tipo di classe\"),\n \t\t'required' => true,\n \t 'choice' => [1 => _('istanziabile'), 0 => _('non istanziabile')]\n \t));\n \t$columns['description'] = new \\Gino\\TextField(array(\n \t\t'name'=>'description',\n \t 'label' => _(\"Descrizione\"),\n \t\t'required'=>true\n \t));\n \t$columns['removable'] = new \\Gino\\BooleanField(array(\n \t\t'name' => 'removable',\n \t 'label' => _(\"Rimovibile\"),\n \t\t'required' => true,\n \t));\n \t$columns['class_version'] = new \\Gino\\CharField(array(\n \t\t'name' => 'class_version',\n \t 'label' => _(\"Versione\"),\n \t\t'required' => true,\n \t\t'max_lenght' => 200,\n \t));\n \treturn $columns;\n }", "title": "" }, { "docid": "e406f2164fc141530539aa07d5c447bd", "score": "0.6183164", "text": "protected function tableColumns() {\n\t\t\t$this->table->columns = array();\n\t\t\t$this->table->columns[] = array('name' => \"ID\", \"key\" => $this->dataKey, \"class\" => \"listCheckBox center\");\n\t\t\t$this->table->columns[] = array('name' => 'Name', 'key' => 'name', 'class' => 'center');\n\t\t\t$this->table->columns[] = array('name' => 'Min', 'key' => 'min_lvl', 'class' => 'center');\n\t\t\t$this->table->columns[] = array('name' => 'Max', 'key' => 'max_lvl', 'class' => 'center');\n\t\t\t$this->table->columns[] = array('name' => 'Date Added', 'key' => 'date_added', 'class' => 'center');\n\t\t\t$this->table->columns[] = array('name' => 'Last Updated', 'key' => 'last_updated', 'class' => 'center');\n\t\t}", "title": "" }, { "docid": "9417eee47423549857ec965aa01b69e3", "score": "0.617544", "text": "protected function dtgCursoDocentes_CreateColumns() {\n\t\t$this->dtgCursoDocentes->CreateColumns();\n\t}", "title": "" }, { "docid": "2d4b1cb6b17ce8623cbf6d6620f5c1b9", "score": "0.61442554", "text": "abstract public function columns();", "title": "" }, { "docid": "2d4b1cb6b17ce8623cbf6d6620f5c1b9", "score": "0.61442554", "text": "abstract public function columns();", "title": "" }, { "docid": "5b458ca126847802fe950bf07c3110aa", "score": "0.61368275", "text": "protected function _prepareColumns()\n {\n $yesno = Mage::getModel('adminhtml/system_config_source_yesno')->toArray();\n \n $this->addColumn('order_id', array(\n 'header'=>Mage::helper('cp_reviewreminder')->__('Order #'),\n 'sortable'=>true,\n 'index'=>'entity_id',\n 'width' => '100px',\n ));\n \n $this->addColumn('customer_name', array(\n 'header'=>Mage::helper('cp_reviewreminder')->__('Customer Name'),\n 'sortable'=>true,\n 'index'=>'customer_firstname',\n 'width'=>'60px',\n 'renderer' => 'cp_reviewreminder/adminhtml_addReminder_renderer_customerName',\n 'filter_condition_callback' => array($this, '_customerNameCondition')\n ));\n \n /*$this->addColumn('product_name', array(\n 'header'=>Mage::helper('cp_reviewreminder')->__('Product Name'),\n 'sortable'=>true,\n 'index'=>'name',\n ));*/\n \n $this->addColumn('order_status', array(\n 'header'=>Mage::helper('cp_reviewreminder')->__('Order Status'),\n 'sortable'=>true,\n 'index'=>'status',\n 'type' => 'options',\n 'options' => Mage::getSingleton('sales/order_config')->getStatuses(),\n ));\n \n $this->addColumn('order_date', array(\n 'header'=>Mage::helper('cp_reviewreminder')->__('Order Date'),\n 'sortable'=>true,\n 'index'=>'created_at',\n 'type' => 'datetime',\n ));\n \n return $this;\n }", "title": "" }, { "docid": "5bb7024f416203aee18bdca57e896945", "score": "0.6117629", "text": "protected function _prepareColumns()\n {\n if (!$this->isReadonly()) {\n $this->addColumn(\n 'in_products',\n [\n 'type' => 'checkbox',\n 'name' => 'in_products',\n 'values' => $this->_getSelectedProducts(),\n 'align' => 'center',\n 'index' => 'entity_id',\n 'header_css_class' => 'col-select',\n 'column_css_class' => 'col-select'\n ]\n );\n }\n\n $this->addColumn(\n 'entity_id',\n [\n 'header' => __('ID'),\n 'sortable' => true,\n 'index' => 'entity_id',\n 'header_css_class' => 'col-id',\n 'column_css_class' => 'col-id'\n ]\n );\n\n $this->addColumn(\n 'name',\n [\n 'header' => __('Name'),\n 'index' => 'name',\n 'header_css_class' => 'col-name',\n 'column_css_class' => 'col-name'\n ]\n );\n\n $this->addColumn(\n 'type',\n [\n 'header' => __('Type'),\n 'index' => 'type_id',\n 'type' => 'options',\n 'options' => $this->_type->getOptionArray(),\n 'header_css_class' => 'col-type',\n 'column_css_class' => 'col-type'\n ]\n );\n\n $sets = $this->_setsFactory->create()->setEntityTypeFilter(\n $this->_productFactory->create()->getResource()->getTypeId()\n )->load()->toOptionHash();\n\n $this->addColumn(\n 'set_name',\n [\n 'header' => __('Attribute Set'),\n 'index' => 'attribute_set_id',\n 'type' => 'options',\n 'options' => $sets,\n 'header_css_class' => 'col-attr-name',\n 'column_css_class' => 'col-attr-name'\n ]\n );\n\n $this->addColumn(\n 'status',\n [\n 'header' => __('Status'),\n 'index' => 'status',\n 'type' => 'options',\n 'options' => $this->_status->getOptionArray(),\n 'header_css_class' => 'col-status',\n 'column_css_class' => 'col-status'\n ]\n );\n\n $this->addColumn(\n 'visibility',\n [\n 'header' => __('Visibility'),\n 'index' => 'visibility',\n 'type' => 'options',\n 'options' => $this->_visibility->getOptionArray(),\n 'header_css_class' => 'col-visibility',\n 'column_css_class' => 'col-visibility'\n ]\n );\n\n $this->addColumn(\n 'visibility_status',\n [\n 'header' => __('visibility_status'),\n 'type' => 'visibility_state',\n 'index' => 'visibility',\n 'editable' => true,\n 'filter' => false,\n 'header_css_class' => 'no-display',\n 'column_css_class' => 'no-display',\n ]\n );\n\n $this->addColumn(\n 'sku',\n [\n 'header' => __('SKU'),\n 'index' => 'sku',\n 'header_css_class' => 'col-sku',\n 'column_css_class' => 'col-sku'\n ]\n );\n\n $this->addColumn(\n 'price',\n [\n 'header' => __('Price'),\n 'type' => 'currency',\n 'currency_code' => (string)$this->_scopeConfig->getValue(\n \\Magento\\Directory\\Model\\Currency::XML_PATH_CURRENCY_BASE,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n ),\n 'index' => 'price',\n 'header_css_class' => 'col-price',\n 'column_css_class' => 'col-price'\n ]\n );\n\n $this->addColumn(\n 'is_featured',\n [\n 'header' => __('Featured'),\n 'type' => 'checkbox',\n 'field_name' => 'featuredproducts[]',\n 'values' => $this->_getFeaturedProducts(),\n 'index' => 'entity_id',\n 'filter' => false,\n ]\n );\n\n $this->addColumn(\n 'position',\n [\n 'header' => __('Position'),\n 'type' => 'number',\n 'index' => 'position',\n 'editable' => true,\n 'filter' => false,\n ]\n );\n\n $this->addColumn(\n 'position',\n [\n 'header' => __('Position'),\n 'name' => 'position',\n 'type' => 'number',\n 'editable' => true,\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n// 'editable' => !$this->getBrand()->getRelatedReadonly(),\n// 'edit_only' => !$this->getBrand()->getId(),\n 'header_css_class' => 'col-position',\n 'column_css_class' => 'col-position'\n ]\n );\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "09927f96a88d5af3e50c9bff2d88ed36", "score": "0.6084191", "text": "private function setColumns(){\n $columns = array(\n 1 =>'name',\n 2 =>'email',\n 3 =>'phone',\n 4 =>'age',\n 5 =>'submit_time',\n 6 =>'clevel',\n 7 =>'current_level',\n 8 =>'ad_name',\n 9 =>'channel_name',\n 10 =>'source_name',\n 11 =>'team_name',\n 12 =>'marketer_name',\n 13 =>'campaign_name',\n 14 =>'subcampaign_name',\n 15 =>'landing_page',\n 16 =>'invalid_reason',\n 18 =>'is_export',\n 19 =>'olm_status',\n 20 =>'export_sale_date',\n 21 =>'send_sms',\n 22 =>'mailchimp_expired'\n );\n\n return $columns;\n }", "title": "" }, { "docid": "4eb015ae173e6c97f12d5fa7f5bc0ba8", "score": "0.6074142", "text": "abstract public function setColumns();", "title": "" }, { "docid": "d441dd1543fee3889ac43e3f521f49a9", "score": "0.6012293", "text": "protected function initColumns() {\n\t\t$this->initColumnsFromI18nReference($this->getModel()->getReference('i18n'));\n\t\t\n\t\t// use standard process to add other columns\n\t\tparent::initColumns();\n\t}", "title": "" }, { "docid": "11151f79402c0bd700aeac5428b7f192", "score": "0.6002177", "text": "public function initColumns(): void\n {\n $this->columnPrice();\n $this->columnCreatedAt();\n $this->columnCreated();\n }", "title": "" }, { "docid": "9048312ae6189c8d7b43787b1849a9fe", "score": "0.59967303", "text": "protected function initColumns() {\n foreach ($this->getColumns() as $k => $v) {\n $this->addColumn($v['txt'], $k, 'auto');\n }\n }", "title": "" }, { "docid": "58906ff7f86afc1371605e046c9fa371", "score": "0.5993899", "text": "function get_columns() {\n\t\t$columns['cb'] = '<input type=\"checkbox\" />';\n\t\t$i=0;\n\t\tif( array_key_exists( 0, $this->colum_name ) ) {\n\t\t\tforeach ( $this->colum_name[0] as $key => $name ) {\n\t\t\t\tif ( $i == $this->max )\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t$columns[\"entry_{$i}\"] = $name;\n\t\t\t\t$i++;\n\t\t\t} \n\t\t}\n\t\t$columns['date'] = __( 'Entry Date', TRUST_FORM_DOMAIN );\n\n\t\t$columns = apply_filters( 'tr_entry_manage_posts_columns', $columns, $this->id );\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "054989cd9e33504559db2dc60d7601fd", "score": "0.59852785", "text": "public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(Application::class_name(), Application::PROPERTY_NAME));\n $this->add_column(\n new DataClassPropertyTableColumn(Application::class_name(), Application::PROPERTY_DESCRIPTION));\n $this->add_column(new DataClassPropertyTableColumn(Application::class_name(), Application::PROPERTY_URL));\n }", "title": "" }, { "docid": "3dac7d8f637884201a863f931bac2d44", "score": "0.5967419", "text": "protected function initColumns()\n {\n foreach ($this->columns as $i => $column) {\n if (is_array($column) && !isset($column['class'])) {\n $this->columns[$i]['class'] = 'application.components.widgets.gridView.DataColumn';\n }\n }\n\n parent::initColumns();\n\n if (isset($this->responsiveTable) && $this->responsiveTable) {\n $this->writeResponsiveCss();\n }\n }", "title": "" }, { "docid": "857e5730d7d3a3b5e5ad12c1c907a1fc", "score": "0.5961785", "text": "protected function _prepareColumns() {\n $this->addColumn ( 'entity_id', array (\n 'header' => Mage::helper ( 'catalog' )->__ ( 'ID' ),\n 'sortable' => true,\n 'width' => '60',\n 'index' => 'entity_id' \n ) );\n \n $this->addColumn ( 'name', array (\n 'header' => Mage::helper ( 'catalog' )->__ ( 'Name' ),\n 'index' => 'name' \n ) );\n $this->addColumn ( 'sku', array (\n 'header' => Mage::helper ( 'catalog' )->__ ( 'SKU' ),\n 'width' => '80',\n 'index' => 'sku' \n ) );\n $this->addColumn ( 'price', array (\n 'header' => Mage::helper ( 'catalog' )->__ ( 'Price' ),\n 'type' => 'currency',\n 'width' => '1',\n 'currency_code' => ( string ) Mage::getStoreConfig ( Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE ),\n 'index' => 'price' \n ) );\n $this->addColumn ( 'visibility', array (\n 'header' => Mage::helper ( 'pushnoteproducts' )->__ ( 'Visibility' ),\n 'width' => '70px',\n 'index' => 'visibility',\n 'type' => 'options',\n 'options' => Mage::getModel ( 'catalog/product_visibility' )->getOptionArray () \n ) );\n \n $this->addColumn ( 'status', array (\n 'header' => Mage::helper ( 'pushnoteproducts' )->__ ( 'Status' ),\n 'width' => '70px',\n 'index' => 'status',\n 'type' => 'options',\n 'options' => Mage::getSingleton ( 'catalog/product_status' )->getOptionArray () \n ) );\n \n $this->addColumn ( 'Notification', array (\n 'header' => Mage::helper ( 'pushnoteproducts' )->__ ( 'Notification' ),\n 'index' => 'Push',\n 'filter' => false,\n 'renderer' => 'pushnoteproducts/adminhtml_pushnoteproducts_renderer_notification',\n 'actions' => array (\n array (\n 'caption' => Mage::helper ( 'pushnoteproducts' )->__ ( 'Push' ),\n 'url' => array (\n 'base' => '*/',\n 'params' => array (\n 'store' => $this->getRequest ()->getParam ( 'store' ) \n ) \n ),\n 'field' => 'id',\n 'target' => '_blank' \n ) \n ) \n ) );\n \n $this->addColumn ( 'Action', array (\n 'header' => Mage::helper ( 'pushnoteproducts' )->__ ( 'Action' ),\n 'index' => 'Push',\n 'filter' => false,\n 'renderer' => 'pushnoteproducts/adminhtml_pushnoteproducts_renderer_view',\n 'actions' => array (\n array (\n 'caption' => Mage::helper ( 'pushnoteproducts' )->__ ( 'View' ),\n 'url' => array (\n 'base' => '*/',\n 'params' => array (\n 'store' => $this->getRequest ()->getParam ( 'store' ) \n ) \n ),\n 'field' => 'id',\n 'target' => '_blank' \n ) \n ) \n ) );\n if (Mage::helper ( 'catalog' )->isModuleEnabled ( 'Mage_Rss' )) {\n $this->addRssList ( 'rss/catalog/notifystock', Mage::helper ( 'catalog' )->__ ( 'Notify Low Stock RSS' ) );\n }\n \n return parent::_prepareColumns ();\n }", "title": "" }, { "docid": "b38699a2529fe436af13a056d0021e0c", "score": "0.5961398", "text": "private function setup_columns() {\n\t\t$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );\n\t}", "title": "" }, { "docid": "0c957d00d350b6a74d63c1375e029c08", "score": "0.5959648", "text": "protected function setup_columns()\n {\n foreach ( $this->field->options as $name => $title ) {\n /**\n * @filter pdb-member_payments_non_column_options \n * @param array\n * \n * provides a way to add field definition options that are not table columns\n */\n if ( !in_array( $name, apply_filters( 'pdb-member_payments_non_column_options', array() ) ) ) {\n $this->columns[$name] = $title;\n }\n }\n }", "title": "" }, { "docid": "2af2a41426b1b59bb8024171fa0f55f7", "score": "0.5953309", "text": "protected function createAdminColumns ()\n {\n\n //Adds Column labels. Can be enabled/disabled using screen options.\n add_filter('manage_' . $this->uglify($this->postType) . '_posts_columns', function () {\n\n $additionalLabels = [];\n foreach($this->additionalFields as $name => $label) {\n if($name != 'first_name' && $name != 'last_name' && $name != 'full_name') {\n $additionalLabels[$name] = $label;\n }\n }\n\n $defaults = array_merge(\n [\n 'title' => 'Name',\n 'email_address' => 'Email',\n 'phone_number' => 'Phone Number',\n ], $additionalLabels\n );\n\n $defaults['date'] = 'Date Posted'; //always last\n\n return $defaults;\n }, 0);\n\n //Assigns values to columns\n add_action('manage_' . $this->uglify($this->postType) . '_posts_custom_column', function ($column_name, $post_ID) {\n if($column_name != 'title' && $column_name != 'date'){\n switch ($column_name) {\n case 'email_address':\n $email_address = get_post_meta($post_ID, 'lead_info_email_address', true);\n echo(isset($email_address) ? '<a href=\"mailto:' . $email_address . '\" >' . $email_address . '</a>' : null);\n break;\n case 'phone_number':\n $phone_number = get_post_meta($post_ID, 'lead_info_phone_number', true);\n echo(isset($phone_number) ? '<a href=\"tel:' . $phone_number . '\" >' . $phone_number . '</a>' : null);\n break;\n default:\n echo get_post_meta($post_ID, 'lead_info_' . $column_name, true);\n }\n }\n }, 0, 2);\n }", "title": "" }, { "docid": "e263084420ae6c70c7e9c077c763901b", "score": "0.5950368", "text": "protected function _prepareColumns() {\r\n $this->addColumn('product_name', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Product Name'),\r\n 'width' => '20%',\r\n 'index' => 'name'));\r\n \r\n $this->addColumn('sku', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Sku'),\r\n 'width' => '20%',\r\n 'index' => 'sku'));\r\n\r\n $this->addColumn(\r\n 'deals_price', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Deal (Special) Price'),\r\n 'width' => '2%',\r\n 'index' => 'special_price',\r\n 'type' => 'price',\r\n 'currency_code' => Mage::app()->getStore()->getBaseCurrency()->getCode(),\r\n )\r\n );\r\n\r\n $this->addColumn(\r\n 'deals_from_date', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Start date and time'),\r\n 'width' => '16%',\r\n 'align' => 'center',\r\n 'index' => 'deals_from_date',\r\n 'type' => 'datetime',\r\n 'renderer' => 'rudoman_dailydeal/adminhtml_widget_grid_column_renderer_time',\r\n )\r\n );\r\n\r\n $this->addColumn(\r\n 'deals_to_date', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('End date and time'),\r\n 'width' => '16%',\r\n 'align' => 'center',\r\n 'index' => 'deals_to_date',\r\n 'type' => 'datetime',\r\n 'renderer' => 'rudoman_dailydeal/adminhtml_widget_grid_column_renderer_time',\r\n )\r\n );\r\n\r\n $this->addColumn(\r\n 'ordered_qty', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Ordered Qty'),\r\n 'width' => '2%',\r\n 'align' => 'right',\r\n 'filter' => false,\r\n 'index' => 'ordered_qty',\r\n )\r\n );\r\n \r\n $this->addColumn(\r\n 'status', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Status'),\r\n 'width' => '10%',\r\n 'type' => 'options',\r\n //'filter' => false,\r\n 'renderer' => 'rudoman_dailydeal/adminhtml_widget_grid_column_renderer_status',\r\n 'options' => array(\r\n 0 => Mage::helper('rudoman_dailydeal')->__('Deal has ended'),\r\n 1 => Mage::helper('rudoman_dailydeal')->__('Ending soon'),\r\n 2 => Mage::helper('rudoman_dailydeal')->__('Active')))\r\n );\r\n\r\n $this->addColumn('is_active', array(\r\n 'header' => Mage::helper('rudoman_dailydeal')->__('Active'),\r\n 'index' => 'is_active_deals',\r\n 'type' => 'options',\r\n 'width' => '10%',\r\n 'renderer' => 'rudoman_dailydeal/adminhtml_widget_grid_column_renderer_active',\r\n 'options' => array(\r\n 0 => Mage::helper('rudoman_dailydeal')->__('Disabled'),\r\n 1 => Mage::helper('rudoman_dailydeal')->__('Enabled'))));\r\n\r\n return parent::_prepareColumns();\r\n }", "title": "" }, { "docid": "7ec247501c1aba8be9e70e63628db501", "score": "0.5938987", "text": "protected function _prepareColumns()\n {\n $this->addColumn('real_order_id', array(\n 'header'=> Mage::helper('sales')->__('Attribute #'),\n 'width' => '80px',\n 'type' => 'text',\n 'index' => 'increment_id',\n ));\n \n $this->addColumn('magento_category_name', array(\n 'header'=> Mage::helper('sales')->__('Magento Attribute Name'),\n 'type' => 'text',\n 'index' => 'increment_id',\n ));\n\n $this->addColumn('aukro_category_name', array(\n 'header' => Mage::helper('sales')->__('Aukro Attribute Name'),\n 'type' => 'text',\n 'index' => 'increment_id',\n ));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "e357e8d47856874e36646b355f1cea06", "score": "0.5938905", "text": "protected function _prepareColumns()\n {\n $helper = Mage::helper('gene_braintree');\n\n $this->addColumn('id', array(\n 'header' => $helper->__('ID'),\n 'index' => 'id',\n 'width' => 120,\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('created_at', array(\n 'header' => $helper->__('Transaction Date'),\n 'index' => 'created_at',\n 'type' => 'datetime',\n 'frame_callback' => array($this, 'handleDate'),\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('orderId', array(\n 'header' => $helper->__('Magento Order ID'),\n 'index' => 'orderId',\n 'width' => 120,\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('order_status', array(\n 'header' => $helper->__('Magento Status'),\n 'index' => 'order_status',\n 'type' => 'options',\n 'options' => Mage::getSingleton('sales/order_config')->getStatuses(),\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('merchantAccountId', array(\n 'header' => $helper->__('Merchant Account ID'),\n 'index' => 'merchantAccountId',\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('type', array(\n 'header' => $helper->__('Type'),\n 'index' => 'type',\n 'frame_callback' => array($this, 'handleType'),\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('payment_information', array(\n 'header' => $helper->__('Payment Information'),\n 'index' => 'payment_information',\n 'frame_callback' => array($this, 'handlePaymentInformation'),\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('amount', array(\n 'header' => $helper->__('Amount'),\n 'index' => 'amount',\n 'type' => 'number',\n 'frame_callback' => array($this, 'handleAmount'),\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('currencyIsoCode', array(\n 'header' => $helper->__('Currency'),\n 'index' => 'currencyIsoCode',\n 'filter' => false,\n 'sortable' => false\n ));\n\n $this->addColumn('status', array(\n 'header' => $helper->__('Braintree Status'),\n 'type' => 'options',\n 'options' => $helper->getStatusesAsArray(),\n 'index' => 'status',\n 'filter' => false,\n 'sortable' => false\n ));\n\n // Allow the admin to export this viewed data\n $this->addExportType('*/*/exportCsv', $helper->__('CSV'));\n $this->addExportType('*/*/exportExcel', $helper->__('Excel XML'));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "8e69ebfb7ec060087e9077d4ac314c21", "score": "0.5858115", "text": "static function getColumns()\n {\n }", "title": "" }, { "docid": "ef6bc000530cb1c3fd78a454326a5601", "score": "0.58362305", "text": "protected function _prepareColumns() {\n $this->addColumn('physicalstocktaking_id', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('ID'),\n 'sortable' => true,\n 'width' => '60',\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'physicalstocktaking_id'\n ));\n\n $this->addColumn('physical_created_at', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Created on'),\n 'type' => 'date',\n 'width' => '150px',\n 'align' => 'right',\n 'index' => 'physical_created_at',\n 'filter_condition_callback' => array($this, 'filterCreatedOn')\n ));\n\n $this->addColumn('create_by', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Created by'),\n 'width' => '80px',\n 'align' => 'left',\n 'index' => 'create_by'\n ));\n\n $this->addColumn('physical_warehouse_name', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Stocktake Warehouse'),\n 'width' => '150px',\n 'align' => 'left',\n 'index' => 'physical_warehouse_name',\n 'filter_condition_callback' => array($this, 'filterWarehouseName')\n ));\n\n\n $this->addColumn('warehouse_contact', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Warehouse\\'s Contact'),\n 'width' => '150px',\n 'align' => 'left',\n 'index' => 'manager_name',\n ));\n\n $this->addColumn('warehouse_email', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Warehouse\\'s Email'),\n 'width' => '150px',\n 'align' => 'left',\n 'index' => 'manager_email',\n ));\n\n $this->addColumn('warehouse_phone', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Warehouse\\'s Phone'),\n 'width' => '150px',\n 'align' => 'right',\n 'index' => 'telephone',\n ));\n\n $this->addColumn('warehouse_country', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Warehouse\\'s Country'),\n 'width' => '150px',\n 'align' => 'left',\n 'index' => 'country_id',\n 'type' => 'options',\n 'options' => Mage::helper('inventoryplus')->getCountryList()\n ));\n\n $this->addColumn('physical_status', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Status'),\n 'align' => 'left',\n 'width' => '80px',\n 'index' => 'physical_status',\n 'type' => 'options',\n 'options' => array(\n 0 => 'Pending',\n 1 => 'Completed',\n 2 => 'Canceled',\n ),\n ));\n\n $this->addColumn('action', array(\n 'header' => Mage::helper('inventoryphysicalstocktaking')->__('Action'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getPhysicalstocktakingId',\n 'renderer' => 'vendorsinventory/physicalstocktaking_listphysicalstocktaking_renderer_action',\n 'filter' => false,\n 'sortable' => false,\n 'index' => 'stores',\n 'is_system' => true,\n ));\n\n $this->addExportType('*/*/exportCsv', Mage::helper('inventoryphysicalstocktaking')->__('CSV'));\n $this->addExportType('*/*/exportXml', Mage::helper('inventoryphysicalstocktaking')->__('XML'));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "4a64567baa152aad9562a774446ccfd5", "score": "0.58339953", "text": "protected function _prepareColumns()\n {\n $help = Mage::helper('antoinek_slider');\n\n $this->addColumn('chooser_id', array(\n 'header' => $help->__('ID'),\n 'align' => 'right',\n 'index' => 'slider_id',\n 'width' => 50\n ));\n\n $this->addColumn('chooser_title', array(\n 'header' => $help->__('Title'),\n 'align' => 'left',\n 'index' => 'title',\n ));\n\n if (!Mage::app()->isSingleStoreMode()) {\n $this->addColumn('chooser_store_id', array(\n 'header' => Mage::helper('adminhtml')->__('Visible In'),\n 'type' => 'store',\n 'index' => 'store_id',\n 'sortable' => false,\n 'store_all' => true,\n 'store_view' => true,\n 'width' => 200,\n 'filter_condition_callback' => array($this, '_filterStoreCondition'),\n ));\n }\n\n $this->addColumn('chooser_is_active', array(\n 'header' => Mage::helper('adminhtml')->__('Status'),\n 'index' => 'is_active',\n 'type' => 'options',\n 'sortable' => false,\n 'options' => array(\n '1' => $help->__('Enabled'),\n '0' => $help->__('Disabled'),\n ),\n 'frame_callback' => array($this, 'decorateStatus')\n ));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "a6ed007cca66a16eeda79dd57be4abd9", "score": "0.58214945", "text": "public function initialize_columns()\n {\n $this->add_group_name_column();\n $this->add_column(new StaticTableColumn(Manager::PROPERTY_GROUP_MEMBERS));\n \n parent::initialize_columns();\n }", "title": "" }, { "docid": "1cacb4f9f214b4d0b7f7fe4a201cf3ad", "score": "0.5821268", "text": "private function setup_columns() {\n\t\tif ( array_key_exists( 'remove', $this->columns ) ) {\n\t\t\tadd_filter( \"manage_edit-{$this->type}_columns\", [ $this, 'remove_custom_post_columns' ] );\n\t\t}\n\t\tif ( array_key_exists( 'add', $this->columns ) ) {\n\t\t\tadd_filter( \"manage_edit-{$this->type}_columns\", [ $this, 'add_custom_post_columns' ] );\n\t\t}\n\t\tif ( array_key_exists( 'sort', $this->columns ) ) {\n\t\t\tadd_filter( \"manage_edit-{$this->type}_sortable_columns\", [ $this, 'add_custom_post_columns_sortable' ] );\n\t\t}\n\t\tif ( array_key_exists( 'callback', $this->columns ) ) {\n\t\t\tif ( is_callable( $this->columns['callback'] ) ) {\n\t\t\t\tadd_action( 'manage_posts_custom_column', $this->columns['callback'], 10, 2 );\n\t\t\t} else {\n\t\t\t\t$this->logg( 'columns[callback] function name not callable', $this->columns['callback'] );\n\t\t\t}\n\t\t} else {\n\t\t\tadd_filter( 'manage_posts_custom_column', [ $this, 'display_custom_post_column' ], 10, 2 );\n\t\t}\n\t}", "title": "" }, { "docid": "3adb3842f31d957e792d66c02d4de34c", "score": "0.58168364", "text": "protected function _prepareColumns()\n\t{\n\t\t$this->addColumn('file', array(\n\t\t\t'header'\t=> $this->__('Image'),\n\t\t\t'align'\t\t=> 'left',\n\t\t\t'index'\t\t=> 'file',\n\t\t));\n\t\t\n\t\t$this->addColumn('src_size', array(\n\t\t\t'header'\t=> $this->__('Source Size (bytes)'),\n\t\t\t'align'\t\t=> 'left',\n\t\t\t'index'\t\t=> 'src_size',\n\t\t\t'type' => 'number',\n\t\t));\n\t\t\n\t\t$this->addColumn('dest_size', array(\n\t\t\t'header'\t=> $this->__('Result Size (bytes)'),\n\t\t\t'align'\t\t=> 'left',\n\t\t\t'index'\t\t=> 'dest_size',\n\t\t\t'type' => 'number',\n\t\t));\n\t\t\n\t\t$this->addColumn('percent', array(\n\t\t\t'header'\t=> $this->__('Compression Percentage (%)'),\n\t\t\t'align'\t\t=> 'left',\n\t\t\t'index'\t\t=> 'percent',\n\t\t\t'type' => 'number',\n\t\t));\n\n\t\t$this->addColumn('created_at', array(\n\t\t\t'header' => Mage::helper('cms')->__('Date'),\n\t\t\t'index' => 'created_at',\n\t\t\t'type' => 'datetime',\n\t\t\t'align' => 'right',\n\t\t));\n\n\t\treturn parent::_prepareColumns();\n\t}", "title": "" }, { "docid": "99ddc3bcf1a1cd91f8cd2a73d77234f3", "score": "0.58158505", "text": "function get_columns() {}", "title": "" }, { "docid": "72e37aef98430bec6d7a35ab78c78cfb", "score": "0.5809126", "text": "abstract public function get_columns();", "title": "" }, { "docid": "fdfcd899874b5235fc087e6923c3ce96", "score": "0.5786311", "text": "public function setColumns(): void\n {\n $columns = collect($this->columns())\n ->filter(fn ($column) => $column instanceof Column)\n ->map(function (Column $column) {\n $column->setComponent($this);\n\n if ($column->hasField()) {\n if ($column->isBaseColumn()) {\n $column->setTable($this->getBuilder()->getModel()->getTable());\n } else {\n $column->setTable($this->getTableForColumn($column));\n }\n }\n\n return $column;\n });\n\n $this->columns = $columns;\n }", "title": "" }, { "docid": "77ce0ca06fdd35feb63977f9dc55f454", "score": "0.5782244", "text": "abstract protected function getColumns();", "title": "" }, { "docid": "8f2da4b2e25e5de287fbc6407d6e7f19", "score": "0.5753658", "text": "protected function initColumns()\n {\n $this->columns = collect();\n\n return $this;\n }", "title": "" }, { "docid": "ad7c512330d8599b28a5762aa71c105a", "score": "0.5745771", "text": "public function addColumns()\n {\n\n $this->addColumn([\n 'index' => 'id',\n 'label' => 'ردیف',\n 'type' => 'number',\n 'searchable' => false,\n 'sortable' => true,\n 'filterable' => false\n ]);\n\n $this->addColumn([\n 'index' => 'title',\n 'label' => 'عنوان',\n 'type' => 'string',\n 'searchable' => false,\n 'sortable' => false,\n 'filterable' => false\n ]);\n $this->addColumn([\n 'index' => 'subtitle',\n 'label' => 'توضیحات کوتاه',\n 'type' => 'string',\n 'searchable' => false,\n 'sortable' => false,\n 'filterable' => false\n ]);\n $this->addColumn([\n 'index' => 'is_published',\n 'label' => 'وضعیت',\n 'type' => 'string',\n 'searchable' => false,\n 'sortable' => false,\n 'filterable' => false,\n 'wrapper' => function($value) {\n if ($value->is_published == 1)\n return 'فعال';\n else\n return 'غیر فعال';\n }\n ]);\n }", "title": "" }, { "docid": "8d663d2a354ebc3931772b6ebcacc72a", "score": "0.5739009", "text": "abstract public function getColumns();", "title": "" }, { "docid": "8d663d2a354ebc3931772b6ebcacc72a", "score": "0.5739009", "text": "abstract public function getColumns();", "title": "" }, { "docid": "8d663d2a354ebc3931772b6ebcacc72a", "score": "0.5739009", "text": "abstract public function getColumns();", "title": "" }, { "docid": "aca390157b115ac8d589c25e5640dba2", "score": "0.5717873", "text": "private function buildColumns() {\n $html = '';\n foreach ($this->_columns as $key => $column) {\n $html .= '<th id=\"'.$key.'\" style=\"width:'.$column['size'].'; align:'.$column['align'].';\">'.$column['label'].'</th>';\n }\n\n foreach ($this->_buttons as $key => $button) {\n $html .= '<th style=\"min-width:10%; align:center;\"><center><i class=\"material-icons\">settings</i></center></th>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "e1d7308247d79b92a984e66fcc5fa02b", "score": "0.57148045", "text": "function make_column($category) {\n\t\t\n\t\t$column = $this->menu->some('category', $category);\n\t\t\n\t\tforeach( $column as $col )\n\t\t{\n\t\t\t$col->order_num = $this->data['order_num'];\n\t\t}\n\t\t\n\t\treturn $column;\n }", "title": "" }, { "docid": "c8cfac20b4f9f5dc335fd26a9309c311", "score": "0.57095706", "text": "public function buildColumns(){\r\n \r\n if(isset($this->_schematic['column_attributes']['header_row'])){\r\n \r\n $properties = $this->_processAttributes($this->_schematic['column_attributes']['header_row']);\r\n unset($this->_schematic['column_attributes']['header_row']);\r\n }\r\n \r\n $columns = '<thead>'\r\n . '<tr '.$properties.'>';\r\n \r\n if(isset($this->_schematic['columns'])){\r\n \r\n $colcount = 1;\r\n foreach($this->_schematic['columns'] as $column){\r\n \r\n if(isset($this->_schematic['column_attributes'])){\r\n \r\n $spcolumn = array_search($colcount, array_keys($this->_schematic['column_attributes']));\r\n \r\n if($spcolumn != FALSE){\r\n $position = $colcount;\r\n }\r\n else{\r\n $position = null;\r\n }\r\n \r\n $attr = $this->_processColumnAttributes($column,$position);\r\n }\r\n \r\n $columns .= $this->_processColumn($column, $attr);\r\n $colcount++;\r\n }\r\n }\r\n \r\n $columns .= '</tr>'\r\n . '</thead>';\r\n \r\n return $columns;\r\n }", "title": "" }, { "docid": "e972efbe070dcd9a2fbe81a340effb21", "score": "0.57078314", "text": "public function init_columns() {\n\t\tglobal $pagenow;\n\n\t\t$request = array_map( 'sanitize_text_field', $_GET );\n\t\t$options = new Services\\Options();\n\n\t\t$post_types = $options->get_option( 'helpful_post_types', array(), 'esc_attr' );\n\t\t$hide_cols = $options->get_option( 'helpful_hide_admin_columns', 'off', 'esc_attr' );\n\n\t\tif ( isset( $hide_cols ) && 'on' === $hide_cols ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/* Allows filtering the content afterwards */\n\t\t$post_types = apply_filters( 'helpful_admin_columns_post_types', $post_types );\n\n\t\tif ( ! isset( $post_types ) || ! is_array( $post_types ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$type = 'post';\n\n\t\tif ( array_key_exists( 'post_type', $request ) ) {\n\t\t\t$type = wp_unslash( $request['post_type'] );\n\t\t}\n\n\t\tif ( ! in_array( $type, $post_types, true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $post_types as $type ) :\n\t\t\tif ( is_admin() && 'edit.php' === $pagenow ) {\n\t\t\t\tadd_filter( 'manage_' . $type . '_posts_columns', array( & $this, 'register_columns' ) );\n\t\t\t\tadd_action( 'manage_' . $type . '_posts_custom_column', array( & $this, 'populate_columns' ), 10, 2 );\n\t\t\t\tadd_filter( 'manage_edit-' . $type . '_sortable_columns', array( & $this, 'register_sortable_columns' ) );\n\t\t\t\tadd_action( 'pre_get_posts', array( & $this, 'sort_columns_query' ) );\n\t\t\t}\n\t\tendforeach;\n\t}", "title": "" }, { "docid": "0e3c6feb08597c1e46d5fda93f5d30f0", "score": "0.57076776", "text": "protected function _prepareColumns()\n {\n $customermodel = Mage::registry('current_customer');\n $parentId = $customermodel->getParentId();\n\n $this->addColumn(\n 'in_customers', \n array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'field_name' => 'in_customers[]',\n 'values' => $this->_getSelectedCustomers(),\n 'align' => 'center',\n 'index' => 'entity_id'\n )\n );\n\n $this->addColumn(\n 'entity_id', \n array(\n 'header' => Mage::helper('customer')->__('ID'),\n 'width' => '50px',\n 'index' => 'entity_id',\n 'type' => 'number',\n )\n );\n\n $this->addColumn(\n 'uid', \n array(\n 'header' => Mage::helper('customer')->__('Username'),\n 'index' => 'uid',\n 'type' => 'text',\n )\n );\n\n $this->addColumn(\n 'name', \n array(\n 'header' => Mage::helper('customer')->__('Name'),\n 'index' => 'name'\n )\n );\n\n $this->addColumn(\n 'email', \n array(\n 'header' => Mage::helper('customer')->__('Email ID'),\n 'index' => 'email'\n )\n );\n\n $this->addColumn(\n 'role_name', \n array(\n 'header' => Mage::helper('customer')->__('Roles'),\n 'index' => 'role_name'\n )\n );\n\n $this->setFilterVisibility(TRUE);\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "de4fb5143ac1591a88c74d8ff955fcc8", "score": "0.5703488", "text": "static function getColDefBuilder(): ColumnDefinitionBuilder {\n return (new ColumnDefinitionBuilder())\n ->table(static::getTableName());\n }", "title": "" }, { "docid": "c5b8734fd8e7a0b7b5c223e217cd9087", "score": "0.56922936", "text": "function getMentorColumns($model)\n{\n $columnArrayOrder = getColumnArrayOrder();\n \n //only if make a cache of the columns if needed\n if (isset($_GET['sourceColumn']) && isset($_GET['destinationColumn']))\n {\n \n $source = $_GET['sourceColumn'] ;\n $destination = $_GET['destinationColumn'];\n \n \n $sourceIndex = $source[0];\n $destIndex = $destination[0];\n \n ReportUtils::moveColumnsByIndex($sourceIndex,$destIndex,$columnArrayOrder); \n \n Yii::app()->session['MentorColumnOrder'] = $columnArrayOrder;\n }\n \n \n $columns = array();\n \n \n for ($i = 0; $i < count($columnArrayOrder); $i++ )\n {\n \n switch ($columnArrayOrder[$i]) \n {\n \n case MentorColumns::userID:\n \n \n $columns[] = array('name' => 'userID',\n 'header'=> 'Mentor User ID',\n 'filter'=> CHtml::activeNumberField($model, 'userID'),\n 'headerHtmlOptions' => array('width'=>'75', ));\n break;\n \n \n case MentorColumns::name:\n $columns[] = array('name' => 'name',\n 'header'=> 'Mentor Name',\n 'filter'=> CHtml::activeTextField($model, 'name'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n \n break;\n \n case MentorColumns::email:\n $columns[] = array('name' => 'email',\n 'header'=> 'Mentor Email',\n 'filter'=> CHtml::activeEmailField ($model, 'email'),\n 'headerHtmlOptions' => array('width'=>'200', )); \n break;\n \n case MentorColumns::userName:\n $columns[] = array('name' => 'userName',\n 'header'=> 'Mentor User Name',\n 'filter'=> CHtml::activeTextField ($model, 'userName'),\n 'headerHtmlOptions' => array('width'=>'120', )); \n break;\n \n case MentorColumns::disabled:\n $columns[] = array('name' => 'disabled',\n 'header'=> 'Mentor Disabled',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->disabled)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', )); \n break;\n \n \n case MentorColumns::isProjectMentor:\n $columns[] = array('name' => 'isProjectMentor',\n 'header'=> 'Project Mentor',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isProjectMentor)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', )); \n break;\n \n case MentorColumns::isPersonalMentor:\n $columns[] = array('name' => 'isPersonalMentor',\n 'header'=> 'Personal Mentor',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isPersonalMentor)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', )); \n break;\n \n \n case MentorColumns::isDomainMentor:\n $columns[] = array('name' => 'isDomainMentor',\n 'header'=> 'Domain Mentor',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isDomainMentor)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', )); \n break;\n \n case MentorColumns::isJudge:\n $columns[] = array('name' => 'isJudge',\n 'header'=> 'Judge',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isJudge)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', ));\n break;\n \n case MentorColumns::isNew:\n $columns[] = array('name' => 'isNew',\n 'header'=> 'Is New',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isNew)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', )); \n break;\n \n case MentorColumns::isEmployer:\n $columns[] = array('name' => 'isEmployer',\n 'header'=> 'Is Employer',\n 'value' => 'ReportUtils::getZeroOneToYesNo($data->isEmployer)',\n 'filter'=> array('1'=>'Yes','0'=>'No'),\n 'headerHtmlOptions' => array('width'=>'80', ));\n break;\n \n case MentorColumns::employer: \n $columns[] = array('name' => 'employer',\n 'header'=> 'Mentor Employer',\n 'filter'=> CHtml::activeTextField ($model, 'employer'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n break;\n \n \n case MentorColumns::position:\n $columns[] = array('name' => 'position',\n 'header'=> 'Mentor Position',\n 'filter'=> CHtml::activeTextField ($model, 'position'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n break;\n \n \n case MentorColumns::fieldOfStudy:\n $columns[] = array('name' => 'fieldOfStudy',\n 'header'=> 'Mentor Field Of Study',\n 'filter'=> CHtml::activeTextField ($model, 'fieldOfStudy'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n break;\n \n \n case MentorColumns::degree:\n $columns[] = array('name' => 'degree',\n 'header'=> 'Mentor Degree',\n 'filter'=> CHtml::activeTextField ($model, 'degree'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n break;\n \n \n case MentorColumns::gradYear:\n $columns[] = array('name' => 'gradYear',\n 'header'=> 'Mentor Graduation Year',\n 'filter'=> CHtml::activeNumberField ($model, 'gradYear'),\n 'headerHtmlOptions' => array('width'=>'200', ));\n break;\n }\n \n \n \n }\n \n \n return $columns;\n}", "title": "" }, { "docid": "8ea1dce093b90fe0c605b22421f08c7a", "score": "0.5691443", "text": "private function createGrid()\n {\n $builder = $this->getService('grid')->create($this->getRequest());\n $builder->setFormatter(new BasicGridFormatter('device/my',false));\n $builder->setDataManager(new DqlDataManager(\n $this->getDoctrine()->getEntityManager()\n ,'SELECT i.id,i.name,i.serialNumber,t.name as type , s.name state,s.id as stateId FROM Entity\\Device i JOIN i.state s JOIN i.type t WHERE i.user=:user'\n ,'SELECT count(i) as c FROM Entity\\Device i WHERE i.user=:user'\n ,array('user'=>$this->getUser())\n ));\n\n $builder->setLimit(10);\n\n $builder->addColumn(new Column('id','#'));\n $builder->addColumn(new Column('name','Name'));\n $builder->addColumn(new Column('serialNumber','Serial number'));\n $builder->addColumn(new Column('type','Type'));\n $builder->addColumn(new Column('state','State'));\n\n $freeColumn=new FreeColumnFormatter('device/my');\n $freeColumn->addButton('assign','Assign to location');\n $builder->addColumn(new Column(array('id','stateId'),'Action',$freeColumn,array()));\n return $builder;\n }", "title": "" }, { "docid": "e98f729a09c3888cdd909ceff8f9005c", "score": "0.567964", "text": "public function _getFlatColumnsDdlDefinition()\n {\n $helper = Mage::getResourceHelper('eav');\n $columns = array();\n switch ($this->getBackendType()) {\n case 'static':\n $describe = $this->_getResource()->describeTable($this->getBackend()->getTable());\n if (!isset($describe[$this->getAttributeCode()])) {\n break;\n }\n $prop = $describe[$this->getAttributeCode()];\n $type = $prop['DATA_TYPE'];\n $size = ($prop['LENGTH'] ? $prop['LENGTH'] : null);\n\n $columns[$this->getAttributeCode()] = array(\n 'type' => $helper->getDdlTypeByColumnType($type),\n 'length' => $size,\n 'unsigned' => $prop['UNSIGNED'] ? true: false,\n 'nullable' => $prop['NULLABLE'],\n 'default' => $prop['DEFAULT'],\n 'extra' => null\n );\n break;\n case 'datetime':\n $columns[$this->getAttributeCode()] = array(\n 'type' => Varien_Db_Ddl_Table::TYPE_DATETIME,\n 'unsigned' => false,\n 'nullable' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'decimal':\n $columns[$this->getAttributeCode()] = array(\n 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,\n 'length' => '12,4',\n 'unsigned' => false,\n 'nullable' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'int':\n $columns[$this->getAttributeCode()] = array(\n 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,\n 'unsigned' => false,\n 'nullable' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'text':\n $columns[$this->getAttributeCode()] = array(\n 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,\n 'unsigned' => false,\n 'nullable' => true,\n 'default' => null,\n 'extra' => null,\n 'length' => Varien_Db_Ddl_Table::MAX_TEXT_SIZE\n );\n break;\n case 'varchar':\n $columns[$this->getAttributeCode()] = array(\n 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,\n 'length' => '255',\n 'unsigned' => false,\n 'nullable' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n }\n\n return $columns;\n }", "title": "" }, { "docid": "ea144417f35c1e350b755975fcda2bb3", "score": "0.5661023", "text": "protected function _prepareColumns()\n {\n if (!$this->isReadonly()) {\n $this->addColumn('in_products', array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_products',\n 'values' => $this->_getSelectedProducts(),\n 'align' => 'center',\n 'index' => 'entity_id'\n ));\n }\n\n $this->addColumn('entity_id', array(\n 'header' => Mage::helper('catalog')->__('ID'),\n 'sortable' => true,\n 'width' => 60,\n 'index' => 'entity_id'\n ));\n\n $this->addColumn('name', array(\n 'header' => Mage::helper('catalog')->__('Name'),\n 'index' => 'name'\n ));\n\n $this->addColumn('type', array(\n 'header' => Mage::helper('catalog')->__('Type'),\n 'width' => 100,\n 'index' => 'type_id',\n 'type' => 'options',\n 'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(),\n ));\n\n $sets = Mage::getResourceModel('eav/entity_attribute_set_collection')\n ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())\n ->load()\n ->toOptionHash();\n\n $this->addColumn('set_name', array(\n 'header' => Mage::helper('catalog')->__('Attrib. Set Name'),\n 'width' => 130,\n 'index' => 'attribute_set_id',\n 'type' => 'options',\n 'options' => $sets,\n ));\n\n $this->addColumn('status', array(\n 'header' => Mage::helper('catalog')->__('Status'),\n 'width' => 90,\n 'index' => 'status',\n 'type' => 'options',\n 'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),\n ));\n\n $this->addColumn('visibility', array(\n 'header' => Mage::helper('catalog')->__('Visibility'),\n 'width' => 90,\n 'index' => 'visibility',\n 'type' => 'options',\n 'options' => Mage::getSingleton('catalog/product_visibility')->getOptionArray(),\n ));\n\n $this->addColumn('sku', array(\n 'header' => Mage::helper('catalog')->__('SKU'),\n 'width' => 80,\n 'index' => 'sku'\n ));\n\n $this->addColumn('price', array(\n 'header' => Mage::helper('catalog')->__('Price'),\n 'type' => 'currency',\n 'currency_code' => (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),\n 'index' => 'price'\n ));\n\n\n $this->addColumn('position', array(\n 'header' => Mage::helper('catalog')->__('Position'),\n 'name' => 'position',\n 'width' => 60,\n 'type' => 'number',\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n 'editable' => !$this->isReadonly(),\n 'edit_only' => !$this->_getProduct()->getId(),\n 'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')\n ));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "7f696a8d279958d2f5ed4d3e7a5916b0", "score": "0.5658975", "text": "function buildColumns() {\n\t\t\n\t\tif ($this->_selectZendDb === true) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Lets add the columns\n\t\tif (count ( $this->data ['fields'] ) != count ( $this->_select->getPart ( Zend_Db_Select::COLUMNS ) )) {\n\t\t\t\n\t\t\t//Reset all columns already set\n\t\t\t$this->_select->reset ( Zend_Db_Select::COLUMNS );\n\t\t\t\n\t\t\t$this->_fields = false;\n\t\t\t$this->_titles = false;\n\t\t\t\n\t\t\tforeach ( array_keys ( $this->data ['fields'] ) as $field ) {\n\t\t\t\t\n\t\t\t\t$finalField = $this->getArrayForDbSelect ( $field );\n\t\t\t\t\n\t\t\t\tif (is_array ( $finalField )) {\n\t\t\t\t\t\n\t\t\t\t\t$this->_fields [] = key ( $finalField );\n\t\t\t\t\t$this->_titles [key ( $finalField )] = $this->data ['fields'] [$field] ['title'];\n\t\t\t\t\t$this->_select->columns ( $finalField );\n\t\t\t\t} else {\n\t\t\t\t\t//we need to check if this fields has any sql expression...\n\t\t\t\t\t\n\n\t\t\t\t\tif (isset ( $this->data ['fields'] [$field] ['sqlexp'] )) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sqlexp = trim ( $this->data ['fields'] [$field] ['sqlexp'] );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$explode = explode ( '.', $finalField );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_select->columns ( new Zend_Db_Expr ( $sqlexp . ' as ' . $this->_db->quote ( end ( $explode ) ) ) );\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_select->columns ( $finalField );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->_fields [] = $finalField;\n\t\t\t\t\t$this->_titles [$finalField] = isset ( $this->data ['fields'] [$field] ['title'] ) ? $this->data ['fields'] [$field] ['title'] : ucfirst ( $finalField );\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn;\n\t\n\t}", "title": "" }, { "docid": "74ddea429dfaf4f9bf679d793cd08f24", "score": "0.5647528", "text": "public function install()\n\t{\n\t\t$columns = array(\n\t\t\t'col_id' => array(\n\t\t\t\t'type'\t\t\t\t=> 'int',\n\t\t\t\t'constraint'\t\t=> 10,\n\t\t\t\t'unsigned'\t\t\t=> TRUE,\n\t\t\t\t'auto_increment'\t=> TRUE\n\t\t\t),\n\t\t\t'field_id' => array(\n\t\t\t\t'type'\t\t\t\t=> 'int',\n\t\t\t\t'constraint'\t\t=> 10,\n\t\t\t\t'unsigned'\t\t\t=> TRUE\n\t\t\t),\n\t\t\t'content_type' => array(\n\t\t\t\t'type'\t\t\t\t=> 'varchar',\n\t\t\t\t'constraint'\t\t=> 50\n\t\t\t),\n\t\t\t'col_order' => array(\n\t\t\t\t'type'\t\t\t\t=> 'int',\n\t\t\t\t'constraint'\t\t=> 3,\n\t\t\t\t'unsigned'\t\t\t=> TRUE\n\t\t\t),\n\t\t\t'col_type' => array(\n\t\t\t\t'type'\t\t\t\t=> 'varchar',\n\t\t\t\t'constraint'\t\t=> 50\n\t\t\t),\n\t\t\t'col_label' => array(\n\t\t\t\t'type'\t\t\t\t=> 'varchar',\n\t\t\t\t'constraint'\t\t=> 50\n\t\t\t),\n\t\t\t'col_name' => array(\n\t\t\t\t'type'\t\t\t\t=> 'varchar',\n\t\t\t\t'constraint'\t\t=> 32\n\t\t\t),\n\t\t\t'col_instructions' => array(\n\t\t\t\t'type'\t\t\t\t=> 'text'\n\t\t\t),\n\t\t\t'col_required' => array(\n\t\t\t\t'type'\t\t\t\t=> 'char',\n\t\t\t\t'constraint'\t\t=> 1\n\t\t\t),\n\t\t\t'col_search' => array(\n\t\t\t\t'type'\t\t\t\t=> 'char',\n\t\t\t\t'constraint'\t\t=> 1\n\t\t\t),\n\t\t\t'col_width' => array(\n\t\t\t\t'type'\t\t\t\t=> 'int',\n\t\t\t\t'constraint'\t\t=> 3,\n\t\t\t\t'unsigned'\t\t\t=> TRUE\n\t\t\t),\n\t\t\t'col_settings' => array(\n\t\t\t\t'type'\t\t\t\t=> 'text'\n\t\t\t)\n\t\t);\n\n\t\tee()->load->dbforge();\n\t\tee()->dbforge->add_field($columns);\n\t\tee()->dbforge->add_key('col_id', TRUE);\n\t\tee()->dbforge->add_key('field_id');\n\t\tee()->dbforge->add_key('content_type');\n\t\tee()->dbforge->create_table($this->_table);\n\n\t\tee()->db->insert('content_types', array('name' => 'grid'));\n\t}", "title": "" }, { "docid": "fb7d0c56ab1570d728f99cdad7ee498f", "score": "0.5639571", "text": "public function getColumnSetup()\n {\n $eol = $this->getEol();\n $tab = $this->getPadding();\n $tableClass = '{{class Magento\\Framework\\DB\\Ddl\\Table}}';\n $lines = [];\n $lines[] = '->addColumn(';\n $lines[] = $tab.\"'\".$this->getCode().\"',\";\n $lines[] = $tab.$tableClass.'::'.$this->getTypeInstance()->getSqlTypeConst().',';\n $lines[] = $tab.$this->getTypeInstance()->getSetupLength().',';\n if ($this->getRequired()) {\n $lines[] = $tab.'[\\'nullable => false\\'],';\n } else {\n $lines[] = $tab.'[],';\n }\n $lines[] = $tab.'\\''.$this->getEntity()->getLabelSingular(true).' '.$this->getLabel().'\\'';\n $lines[] = ')';\n return $tab.$tab.$tab.implode($eol.$tab.$tab.$tab, $lines).$eol;\n }", "title": "" }, { "docid": "58dcf1ab79258a13629843dcad239efe", "score": "0.56245816", "text": "private function _setColumnsFromTable()\r\n\t{\r\n\t\t// Get the profiler and memcache instrances\r\n\t\tglobal $__profiler, $__memcache;\r\n\r\n\t\t// Tell the profier we are entering the _setCoulumnsFromTable section\r\n\t\t$__profiler->enterSection('Model::_setColumnsFromTable');\r\n\r\n\t\tif ($this->_table)\r\n\t\t{\r\n\t\t\t//If we have an accociated table\r\n\r\n\t\t\t// Check the cache for this table's structure\r\n\t\t\t$result = $__memcache->get($this->_class.'::table');\r\n\t\t\tif($result != NULL)\r\n\t\t\t{\r\n\t\t\t\t// If we have a listing then save it to the object\r\n\t\t\t\t$this->_columns = $result;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Query the database for the columns in the table\r\n\r\n\t\t\t\t$result = $this->_db->query('SHOW COLUMNS FROM `'.$this->_table.'`');\r\n\r\n\t\t\t\tif ( !is_object($result) )\r\n\t\t\t\t{\r\n\t\t\t\t\t/// If we had an error looking up the columns\r\n\t\t\t\t\tfatal_error('Table `'.$this->_table.'` is missing or corrupt');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get the result of the query\r\n\t\t\t\t$result = $result->fetchAll();\r\n\r\n\t\t\t\tforeach($result as $col)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Add the column we found in the result to the objects list of columns\r\n\t\t\t\t\t$this->_columns[] = $col['Field'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Cache the resultant list for easier access\r\n\t\t\t\t$__memcache->set($this->_class.'::table', $this->_columns, CACHE_OBJ_EXPIRE_LONGER);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Tell the profiler we are leaving the _setColumnsFromTable section\r\n\t\t$__profiler->leaveSection('Model::_setColumnsFromTable');\r\n\t}", "title": "" }, { "docid": "b95b78dd019333c3a35b8be452cfc9dc", "score": "0.56241494", "text": "public function initParamColumns()\n { \n if( $columns = $this->set_columns() ) :\n elseif( $columns = $this->getConfig( 'columns' ) ) :\n else :\n $columns = array();\n $columns['cb'] = \"<input id=\\\"cb-select-all-1\\\" type=\\\"checkbox\\\" />\";\n foreach( (array) $this->db()->ColNames as $name ) :\n $columns[$name] = $name;\n endforeach;\n endif;\n \n $this->Columns = $columns;\n }", "title": "" }, { "docid": "9a44978c1dfc2468118aff5b51678808", "score": "0.56174016", "text": "public function addMTableColumn($requestData): TableColumns\n {\n // Validation\n $strictValidation = true;\n $this->validateForNew($requestData, $strictValidation);\n\n // Create new m_table_columns record\n $tableColumns = new TableColumns();\n $tableColumns->table_id = $requestData['table_id'];\n $tableColumns->column_name = $requestData['column_name'];\n $tableColumns->column_name_alias = $requestData['column_name_alias'];\n $tableColumns->data_type = $requestData['data_type'];\n $tableColumns->length = $requestData['length'];\n $tableColumns->maximum_number = $requestData['maximum_number'];\n $tableColumns->decimal_part = $requestData['decimal_part'];\n $tableColumns->validation = $requestData['validation'];\n if ($requestData['data_type'] == 'date' || $requestData['data_type'] == 'datetime') {\n $tableColumns->length = null;\n $tableColumns->maximum_number = null;\n $tableColumns->decimal_part = null;\n $tableColumns->validation = null;\n }\n $tableColumns->save();\n\n return $tableColumns;\n }", "title": "" }, { "docid": "6cccec2a7c3401f41e05bb48217c57f1", "score": "0.5608544", "text": "protected function _prepareColumns() {\n /**\n * Display id in grid list\n */\n $this->addColumn ( 'id', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'Id' ),\n 'align' => 'left','index' => 'id' \n ) );\n /**\n * Display city name.\n */\n $this->addColumn ( 'city', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'City' ),\n 'align' => 'left',\n 'index' => 'city' \n ) );\n /**\n * Display city description.\n */\n $this->addColumn ( 'city_description', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'Description' ), \n 'index' => 'city_description','align' => 'left'\n ) );\n /**\n * Display created date.\n */\n $this->addColumn ( 'created_at', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'Created' ),\n 'align' => 'left','type' => 'datetime','index' => 'created_at' \n ) );\n /**\n * Display edit city link.\n */\n $this->addColumn ( 'editaction', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'Edit Action' ),\n 'width' => '50px','type' => 'action',\n 'actions' => array (\n array (\n 'caption' => Mage::helper ( 'airhotels' )->__ ( 'Edit' ),\n 'url' => array (\n 'base' => 'airhotels/adminhtml_city/edit/',\n 'params' => array (\n 'store' => $this->getRequest ()->getParam ( 'store' ) \n ) \n ),\n 'field' => 'id' \n ) \n ),\n 'getter' => 'getId','sortable' => false,\n 'filter' => false, \n 'index' => 'stores' \n ) );\n /**\n * Display delete city link.\n * \n * Add confirm message to delete action\n */\n $this->addColumn ( 'deleteaction', array (\n 'header' => Mage::helper ( 'airhotels' )->__ ( 'Delete Action' ),\n 'width' => '50px',\n 'type' => 'action',\n 'getter' => 'getId', \n 'sortable' => false, \n 'index' => 'stores',\n 'filter' => false,\n 'actions' => array (\n array (\n 'caption' => Mage::helper ( 'airhotels' )->__ ( 'Delete' ),\n 'url' => array (\n 'base' => 'airhotels/adminhtml_city/delete/',\n 'params' => array (\n 'store' => $this->getRequest ()->getParam ( 'store' )\n )\n ),\n 'field' => 'id',\n 'confirm' => Mage::helper ( 'airhotels' )->__ ( 'Are you sure?' )\n )\n ),\n ) );\n /**\n * Calling the parent Construct Method.\n */\n return parent::_prepareColumns ();\n }", "title": "" }, { "docid": "3a3e6d46041bff9b1810316f0631fc7a", "score": "0.5595692", "text": "public function _add_columns() {\n\t\tadd_filter( 'manage_posts_columns', array( $this, '_manage_posts_columns' ) );\n\t\tadd_action( 'manage_posts_custom_column', array( $this, '_manage_posts_custom_column' ) );\n\t}", "title": "" }, { "docid": "427b157e17529690b4e4db0085559d2f", "score": "0.5583158", "text": "public function getColumns()\n {\n // not needed\n }", "title": "" }, { "docid": "6a964f188d03f9111840cf4931db7011", "score": "0.55822504", "text": "private static function get_default_columns()\r\n {\r\n $columns = array();\r\n $columns[] = new StaticTableColumn('', false);\r\n $columns[] = new ObjectTableColumn(ContentObject::PROPERTY_TITLE, true);\r\n $columns[] = new ObjectTableColumn(ContentObject::PROPERTY_DESCRIPTION, true);\r\n $columns[] = new ObjectTableColumn(ContentObject::PROPERTY_TYPE, true);\r\n $columns[] = new ObjectTableColumn(self:: COLUMN_METADATA_PROPERTY_TYPE, true);\r\n $columns[] = new ObjectTableColumn(self :: COLUMN_METADATA_PROPERTY_VALUE, true);\r\n// $columns[] = self :: get_action_column();\r\n return $columns;\r\n }", "title": "" }, { "docid": "b84a8a226e9bc81bb38b62e2b52409f2", "score": "0.55691046", "text": "public static function crudColumns();", "title": "" }, { "docid": "68edcc538dcf40db0376aeb57d35070c", "score": "0.5569052", "text": "function cbstdsys_column_init() {\n \n // columns for Posts\n add_filter( 'manage_posts_columns', 'cbstdsys_manage_columns' );\n \n // columns for Pages\n add_filter( 'manage_pages_columns', 'cbstdsys_manage_columns' ); \n\n }", "title": "" }, { "docid": "e66f4746b141449cdeb79711e2e83617", "score": "0.55531436", "text": "protected function _prepareColumns() {\n \n $this->addColumn('in_products', array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_products',\n 'values' => $this->_getSelectedProducts(),\n 'align' => 'center',\n 'index' => 'entity_id',\n 'use_index' => true,\n 'is_system' => true,\n ));\n \n \n $this->addColumn('entity_id', array(\n 'header' => Mage::helper('inventoryplus')->__('ID'),\n 'align' => 'right',\n 'width' => '10px',\n 'type' => 'number',\n 'index' => 'entity_id',\n ));\n \n $this->addColumn('name', array(\n 'header' => Mage::helper('inventoryplus')->__('Name'),\n 'type' => 'text',\n 'index' => 'name',\n )); \n\n $this->addColumn('sku', array(\n 'header' => Mage::helper('inventoryplus')->__('SKU'),\n 'type' => 'text',\n 'index' => 'sku',\n )); \n \n /*\n $this->addColumn('supplier_list', array(\n 'header' => Mage::helper('inventoryplus')->__('Suppliers'),\n 'type' => 'text',\n 'index' => 'supplier_list',\n 'width' => '200px',\n 'renderer' => 'inventorypurchasing/adminhtml_purchaseorder_lowstock_renderer_supplierdropdown',\n )); \n */\n \n $this->addColumn('available_qty', array(\n 'header' => Mage::helper('inventoryplus')->__('Avail. Qty'),\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'available_qty',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n )); \n \n $this->addColumn('lowstock_qty', array(\n 'header' => Mage::helper('inventoryplus')->__('Low Stock Qty'),\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'lowstock_qty',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n )); \n \n \n $this->addColumn('purchasing_qty', array(\n 'header' => Mage::helper('inventoryplus')->__('In-Purchasing Qty'),\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'purchasing_qty',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n )); \n \n $this->addColumn('purchase_qty', array(\n 'header' => Mage::helper('inventoryplus')->__('Purchase Qty'),\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'purchase_qty',\n //'editable' => true,\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n )); \n /*\n $this->addColumn('clone_input', array(\n 'header' => Mage::helper('inventoryplus')->__('Qty'),\n 'align' => 'right',\n 'type' => 'number',\n 'index' => 'clone_input',\n 'editable' => true,\n )); \n */\n if(0){\n $this->addColumn('action',\n array(\n 'header' => Mage::helper('inventoryplus')->__('Action'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('inventoryplus')->__('Orders List'),\n 'url' => array('base'=> '*/*/orders'),\n 'field' => 'id'\n )),\n 'filter' => false,\n 'sortable' => false,\n 'index' => 'stores',\n 'is_system' => true,\n ));\n }\n $this->addExportType('*/*/exportCsv', Mage::helper('inventoryplus')->__('CSV'));\n $this->addExportType('*/*/exportXml', Mage::helper('inventoryplus')->__('XML'));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "57e459be4d296f8d874dcd6e409909cb", "score": "0.55529165", "text": "public function settingTemplateColumns()\n {\n\t\t/* Setting */\n\t\t\t$setting_advanceMou = false;\n\t\t\t$setting_color = false;\n\t\t\t$setting_size = false;\n\t\t\t$setting_frameNo = false;\n\n\t\t\t$settingData = $this->getData();\n\t\t\t$settingData = json_decode($settingData);\n\n\t\t\t$stCount = count($settingData);\n\t\t\t$stIndex = 0;\n\t\t\twhile ($stIndex < $stCount) {\n\t\t\t\t$settingSingleData = $settingData[$stIndex];\n\n\t\t\t\tif($settingSingleData->settingType == 'product')\n\t\t\t\t{\n\t\t\t\t\tif ($settingSingleData->productAdvanceMouStatus == 'enable') {\n\t\t\t\t\t\t$setting_advanceMou = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productColorStatus == 'enable') {\n\t\t\t\t\t\t$setting_color = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productSizeStatus == 'enable') {\n\t\t\t\t\t\t$setting_size = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productFrameNoStatus == 'enable') {\n\t\t\t\t\t\t$setting_frameNo = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productMrpRequireStatus == 'enable') {\n\t\t\t\t\t\t$setting_mrp = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productMarginStatus == 'enable') {\n\t\t\t\t\t\t$setting_margin = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($settingSingleData->productVariantStatus == 'enable') {\n\t\t\t\t\t\t$setting_variant = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$stIndex++;\n\t\t\t}\n\t\t/* End Setting */\n\n\t\t\n\t\t$htmlTh = \"\";\n\t\tif ($setting_advanceMou == true)\n\t\t{\n\t\t\t$htmlTh = \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='3' rowspan='2'><strong>MOU</strong></td>\";\n\t\t}\n\t\t$color_size_colspan = 3;\n\t\tif($setting_frameNo == true){\n\t\t\t$color_size_colspan = 2;\n\t\t}\n\n\t\tif ($setting_color == true && $setting_size == true )\n\t\t{\n\t\t\t$htmlTh .= \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='\".$color_size_colspan.\"' rowspan='2'><strong>Color | Size</strong></td>\";\n\t\t} \n\t\telse if ($setting_color == true) \n\t\t{\n\t\t\t$htmlTh .= \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='\".$color_size_colspan.\"' rowspan='2'><strong>Color</strong></td>\";\n\t\t} \n\t\telse if ($setting_size == true)\n\t\t{\n\t\t\t$htmlTh .= \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='\".$color_size_colspan.\"' rowspan='2'><strong>Size</strong></td>\";\n\t\t}\n\n\t\tif ($setting_frameNo == true)\n\t\t{\n\t\t\tif ($setting_color == true || $setting_size == true) \n\t\t\t{\n\t\t\t\t$htmlTh .= \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='1' rowspan='2'><strong>Frame No</strong></td>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$htmlTh = \"<td class='tg-m36b theqp' style='font-size: 12px; padding: 2px; height: 15px; text-align: center; border: 1px solid black; border-right: 0px; overflow-wrap: break-word; max-width: 100px;' colspan='3' rowspan='2'><strong>Frame No</strong></td>\";\n\t\t\t}\n\t\t}\n\n\t\treturn $htmlTh;\n\t}", "title": "" }, { "docid": "378ab5d921b1d7abff07d6d3915c4e3d", "score": "0.5550875", "text": "function get_columns() {\n return $columns= array(\n 'col_group_id'=>__('ID'),\n 'col_group_name'=>__('Name'),\n 'col_group_wallet_amount'=>__('Montant du porte-feuille'),\n 'col_group_badge_id' => __('Badge associé'),\n 'col_group_members_registered'=>__('Membres inscrit'),\n 'col_group_members_purchased'=>__('Membres qui ont acheté un produit')\n );\n }", "title": "" }, { "docid": "e6eb340208c3e6404188eb64b67dd2ad", "score": "0.554644", "text": "protected function _prepareColumns() {\r\n $this->addColumn('seller_invoice_id', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Order Id'),\r\n 'width' => '20px',\r\n 'index' => 'seller_invoice_id',\r\n 'type' => 'number',\r\n ));\r\n\r\n $this->addColumn('seller_id', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Paypal Id'),\r\n 'width' => '30px',\r\n 'index' => 'seller_id',\r\n 'sortable' => false,\r\n ));\r\n\r\n\r\n $this->addColumn('created_at', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Created At'),\r\n 'width' => '20px',\r\n 'index' => 'created_at',\r\n 'type' => 'datetime',\r\n ));\r\n\r\n $this->addColumn('commission_amount', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Commission Amount'),\r\n 'width' => '20px',\r\n 'index' => 'commission_amount',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('shipping_amount', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Shipping Amount'),\r\n 'width' => '20px',\r\n 'index' => 'shipping_amount',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('coupon_discount_amount', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Coupon Discount Amount'),\r\n 'width' => '20px',\r\n 'index' => 'coupon_discount_amount',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('seller_amount', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Earned Amount'),\r\n 'width' => '20px',\r\n 'index' => 'seller_amount',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('group_type', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('User Type'),\r\n 'width' => '20px',\r\n 'index' => 'group_type',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('currency_code', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Currency'),\r\n 'width' => '20px',\r\n 'index' => 'currency_code',\r\n 'sortable' => false,\r\n ));\r\n\r\n\r\n $this->addColumn('buyer_paypal_mail', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Buyer Paypal Id'),\r\n 'width' => '30px',\r\n 'index' => 'buyer_paypal_mail',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('seller_transaction_id', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Transaction Id'),\r\n 'width' => '30px',\r\n 'index' => 'seller_transaction_id',\r\n 'sortable' => false,\r\n ));\r\n\r\n $this->addColumn('transaction_status', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Transaction Status'),\r\n 'width' => '20px',\r\n 'index' => 'transaction_status',\r\n 'sortable' => false,\r\n 'filter' => false,\r\n ));\r\n\r\n $this->addColumn('order_status', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Order Status'),\r\n 'width' => '20px',\r\n 'filter' => false,\r\n 'index' => 'order_id',\r\n 'renderer' => 'Apptha_Paypaladaptive_Block_Adminhtml_Renderersource_Orderstatus',\r\n 'sortable' => false\r\n ));\r\n\r\n\r\n $this->addColumn('view', array(\r\n 'header' => Mage::helper('paypaladaptive')->__('Action'),\r\n 'width' => '30',\r\n 'type' => 'action',\r\n 'getter' => 'getOrderId',\r\n 'actions' => array(\r\n array(\r\n 'caption' => Mage::helper('paypaladaptive')->__('View'),\r\n 'url' => array('base' => 'adminhtml/sales_order/view/'),\r\n 'field' => 'order_id'\r\n )\r\n ),\r\n 'filter' => false,\r\n 'sortable' => false,\r\n 'index' => 'stores',\r\n 'is_system' => true,\r\n ));\r\n\r\n\r\n return parent::_prepareColumns();\r\n }", "title": "" }, { "docid": "5d1aa96e1e503e278b94845d03d63c5a", "score": "0.55450946", "text": "public function setColumnsToCreate($columns)\n\t{\n\n\t}", "title": "" }, { "docid": "f2f38371c1d11026221b1ba84800a908", "score": "0.5539527", "text": "public function maxColumnsProvider()\n {\n return [[1]];\n }", "title": "" }, { "docid": "2ae69d1296ce599ccacb160a1f252cf8", "score": "0.5523979", "text": "public function initializeWithCustomColumns()\n {\n if (method_exists($this, 'columns') && $this->initialized) {\n $this->customColumns = call_user_func([$this, 'columns']);\n\n if ($this->customColumns instanceof Builder) {\n\n $list = [];\n\n foreach ($this->customColumns->columns as $column)\n $list[$column['name']] = $column['value'];\n\n $this->customColumns = $list;\n }\n }\n\n if (!$this->initialized)\n $this->initialized = true;\n }", "title": "" }, { "docid": "696237d74618ae0d78d98a1f0c08a0f5", "score": "0.551888", "text": "function get_columns()\n {\n return $columns = array(\n 'col_id' => __('id'),\n 'col_name' => __('Name'),\n 'col_url' => __('Url'),\n 'col_description' => __('Description'),\n 'col_status' => __('Status')\n );\n }", "title": "" }, { "docid": "dc21957f76918a9aaa6f10326cbaa87c", "score": "0.5514811", "text": "public function minColumnsProvider()\n {\n return [[1]];\n }", "title": "" }, { "docid": "b91f9b8801d9dff680a23f28256629fd", "score": "0.5507978", "text": "public function loadColumns(): void\n\t{\n\t\t$moduleName = $this->fieldModel->getModuleName();\n\t\t$fieldName = $this->fieldModel->getName();\n\t\t$fieldNameForColor = App\\Colors::sanitizeValue($fieldName);\n\t\tswitch ($this->fieldModel->getFieldDataType()) {\n\t\t\tcase 'picklist':\n\t\t\t\t$allowedValues = $this->fieldModel->getPicklistValues();\n\t\t\t\t$picklistValues = App\\Fields\\Picklist::getValues($fieldName);\n\t\t\t\tforeach ($picklistValues as $value) {\n\t\t\t\t\t$color = \"{$moduleName}_{$fieldNameForColor}_\" . App\\Colors::sanitizeValue($value['picklistValue']);\n\t\t\t\t\t$this->columns[$value['picklistValue']] = [\n\t\t\t\t\t\t'label' => \\App\\Language::translate($value['picklistValue'], $moduleName),\n\t\t\t\t\t\t'icon' => $value['icon'] ?? '',\n\t\t\t\t\t\t'class' => '',\n\t\t\t\t\t\t'colorBg' => 'picklistLb_' . $color,\n\t\t\t\t\t\t'colorBr' => 'picklistCBr_' . $color,\n\t\t\t\t\t\t'description' => $value['description'] ?? '',\n\t\t\t\t\t\t'isEditable' => isset($allowedValues[$value['picklistValue']]),\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'owner':\n\t\t\t\t$owner = App\\Fields\\Owner::getInstance($moduleName);\n\t\t\t\t$owner->showRoleName = false;\n\t\t\t\tif ($users = $owner->getAccessibleUsers('Public')) {\n\t\t\t\t\t$allowedValues = $owner->getAccessibleUsers('private', 'owner');\n\t\t\t\t\tforeach ($users as $key => $value) {\n\t\t\t\t\t\t$this->columns[$key] = [\n\t\t\t\t\t\t\t'label' => $value,\n\t\t\t\t\t\t\t'image' => \\App\\User::getImageById($key)['url'] ?? '',\n\t\t\t\t\t\t\t'icon' => 'fas fa-user',\n\t\t\t\t\t\t\t'class' => '',\n\t\t\t\t\t\t\t'colorBg' => 'ownerCBg_' . $key,\n\t\t\t\t\t\t\t'colorBr' => 'ownerCBr_' . $key,\n\t\t\t\t\t\t\t'isEditable' => isset($allowedValues[$key]),\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($group = $owner->getAccessibleGroups('private', 'owner', true)) {\n\t\t\t\t\t$allowedValues = $owner->getAccessibleGroups('private', 'owner', true);\n\t\t\t\t\tforeach ($group as $key => $value) {\n\t\t\t\t\t\t$this->columns[$key] = [\n\t\t\t\t\t\t\t'label' => $value,\n\t\t\t\t\t\t\t'icon' => 'adminIcon-groups',\n\t\t\t\t\t\t\t'class' => '',\n\t\t\t\t\t\t\t'colorBg' => 'ownerCBg_' . $key,\n\t\t\t\t\t\t\t'colorBr' => 'ownerCBr_' . $key,\n\t\t\t\t\t\t\t'isEditable' => isset($allowedValues[$key]),\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\App\\Exceptions\\AppException('ERR_NOT_ALLOWED_FIELD_TYPE');\n\t\t}\n\t}", "title": "" }, { "docid": "a90194fa6450bb0ab2b3d5afb1d3e278", "score": "0.5492603", "text": "protected function _prepareColumns() {\r\n $currency = $this->getCurrency();\r\n\r\n $this->addColumn('product_id', array(\r\n 'header' => Mage::helper('catalog')->__('ID'),\r\n 'sortable' => true,\r\n 'width' => '60',\r\n 'index' => 'product_id'\r\n ));\r\n\r\n $this->addColumn('product_name', array(\r\n 'header' => Mage::helper('catalog')->__('Name'),\r\n 'align' => 'left',\r\n 'index' => 'product_name',\r\n 'renderer' => 'inventorypurchasing/adminhtml_purchaseorder_edit_tab_renderer_product',\r\n ));\r\n\r\n $sets = Mage::getResourceModel('eav/entity_attribute_set_collection')\r\n ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())\r\n ->load()\r\n ->toOptionHash();\r\n\r\n $this->addColumn('product_sku', array(\r\n 'header' => Mage::helper('catalog')->__('SKU'),\r\n 'width' => '80px',\r\n 'index' => 'product_sku'\r\n ));\r\n\r\n\r\n $this->addColumn('product_image', array(\r\n 'header' => Mage::helper('catalog')->__('Image'),\r\n 'width' => '90px',\r\n 'filter' => false,\r\n 'renderer' => 'inventoryplus/adminhtml_renderer_productimage'\r\n ));\r\n\r\n\r\n $this->addColumn('supplier_sku', array(\r\n 'header' => Mage::helper('inventorypurchasing')->__('Supplier SKU'),\r\n 'name' => 'supplier_sku',\r\n 'index' => 'supplier_sku',\r\n 'width' => '80px',\r\n 'filter' => false\r\n ));\r\n $this->addColumn('qty', array(\r\n 'header' => Mage::helper('inventorypurchasing')->__('Qty Ordered'),\r\n 'name' => 'qty',\r\n 'type' => 'number',\r\n 'index' => 'qty',\r\n 'filter' => false\r\n ));\r\n\r\n\r\n $this->addColumn('qty_recieved', array(\r\n 'header' => Mage::helper('inventorypurchasing')->__('Qty Received'),\r\n 'name' => 'qty_recieved',\r\n 'type' => 'number',\r\n 'index' => 'qty_recieved',\r\n 'filter' => false,\r\n 'sortable' => false\r\n ));\r\n $this->addColumn('qty_returned', array(\r\n 'header' => Mage::helper('inventorypurchasing')->__('Qty Returned'),\r\n 'name' => 'qty_returned',\r\n 'type' => 'number',\r\n 'index' => 'qty_returned',\r\n 'filter' => false,\r\n 'sortable' => false\r\n ));\r\n $this->addColumn('qty_not_receive', array(\r\n 'header' => Mage::helper('inventorypurchasing')->__('Qty Shortfall'),\r\n 'renderer' => 'inventorypurchasing/adminhtml_purchaseorder_edit_tab_renderer_productnotreceive',\r\n 'index' => 'qty_not_receive',\r\n 'align' => 'right',\r\n 'width' => '80px',\r\n 'filter' => false,\r\n 'sortable' => false\r\n ));\r\n\r\n }", "title": "" }, { "docid": "a9543cf7dc2e560b085a5839f14eb3bc", "score": "0.54851854", "text": "function team_members_custom_columns()\n{\n $columns = [\n 'cb' => '<input type=\"checkbox\">',\n 'title' => __('Title'),\n 'name' => __('Name'),\n 'role' => __('Role'),\n 'featured_image' => __('Photo'),\n 'date' => __('Date'),\n ];\n\n return $columns;\n}", "title": "" }, { "docid": "834318011ae2aedb0f24d73fc073f258", "score": "0.5484265", "text": "protected function _prepareColumns()\n {\n $this->addColumn(\n 'region_id',\n array(\n 'header_css_class' => 'a-center',\n 'type' \t\t\t=> 'checkbox',\n 'name' \t\t\t=> 'region_id',\n 'values'\t\t\t=> $this->_getSelectedRegions(),\n 'align' \t\t\t=> 'center',\n 'index'\t\t\t\t=> 'region_id'\n )\n );\n\n\t\t$this->addColumn(\n\t\t\t'default_name',\n\t\t\tarray(\n\t\t\t\t'header' => $this->__('Name'),\n\t\t\t\t'align' => 'left',\n\t\t\t\t'index' => 'default_name',\n\t\t\t)\n\t\t);\n\n $this->addColumn(\n 'code',\n array(\n 'header' => $this->__('Region Code'),\n 'align' => 'left',\n 'index' => 'code',\n )\n );\n\n $this->addColumn(\n 'country_id',\n array(\n 'header' => $this->__('Country'),\n 'width' => '1',\n 'index' => 'country_id'\n )\n );\n\n $this->addColumn(\n 'position',\n array(\n 'header' => $this->__('Position'),\n 'name' => 'position',\n 'width' => 60,\n 'type' => 'number',\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n 'editable' => true,\n )\n );\n }", "title": "" }, { "docid": "f2e30d4900f6dce670d7dd13022a9c36", "score": "0.5481459", "text": "protected function _prepareColumns()\n {\n $this->addColumn('report_id', array(\n 'header' => Mage::helper('reportsviewer')->__('Report #'),\n 'align' => 'right',\n 'width' => '50px',\n 'index' => 'report_id',\n ));\n\n $this->addColumn('error', array(\n 'header' => Mage::helper('reportsviewer')->__('Error'),\n 'align' => 'right',\n 'index' => 'error',\n ));\n\n $this->addColumn('url', array(\n 'header' => Mage::helper('reportsviewer')->__('URL'),\n 'align' => 'right',\n 'index' => 'url',\n ));\n\n $this->addColumn('script_name', array(\n 'header' => Mage::helper('reportsviewer')->__('Script Name'),\n 'align' => 'right',\n 'index' => 'script_name',\n ));\n\n $this->addColumn('skin', array(\n 'header' => Mage::helper('reportsviewer')->__('Skin'),\n 'align' => 'right',\n 'index' => 'skin',\n ));\n\n $this->addColumn('file', array(\n 'header' => Mage::helper('reportsviewer')->__('File'),\n 'align' => 'right',\n 'index' => 'file',\n ));\n\n $this->addColumn('added', array(\n 'header' => Mage::helper('reportsviewer')->__('Created At'),\n 'index' => 'added',\n 'width' => '140px',\n 'type' => 'datetime',\n 'gmtoffset' => true,\n 'default' => ' -- '\n ));\n\n // Here we use a custom renderer to be able to display what we want\n $this->addColumn('action', array(\n 'header' => Mage::helper('reportsviewer')->__('Action'),\n 'index' => 'stores',\n 'sortable' => false,\n 'filter' => false,\n 'width' => '160',\n 'is_system' => true,\n 'renderer' => 'reportsviewer/adminhtml_template_grid_renderer_action'\n ));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "1656e9b672046527ebaca1f6a79c1cf2", "score": "0.54800093", "text": "private function add_channel_max_entries_columns()\n\t{\n\t\tee()->smartforge->add_column(\n\t\t\t'channels',\n\t\t\tarray(\n\t\t\t\t'max_entries' => array(\n\t\t\t\t\t'type' => 'int',\n\t\t\t\t\t'null' => FALSE,\n\t\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t\t'default' => 0\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tee()->smartforge->add_column(\n\t\t\t'channels',\n\t\t\tarray(\n\t\t\t\t'total_records' => array(\n\t\t\t\t\t'type' => 'mediumint',\n\t\t\t\t\t'constraint' => 8,\n\t\t\t\t\t'null' => FALSE,\n\t\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t\t'default' => 0\n\t\t\t\t),\n\t\t\t),\n\t\t\t'total_entries'\n\t\t);\n\t}", "title": "" }, { "docid": "6226f677e01bdb2111db940d5b11c95d", "score": "0.5477253", "text": "public static function setup_custom_columns()\n {\n add_filter( 'manage_graduate_posts_columns', [ __CLASS__, 'add_columns' ] );\n add_action( 'manage_graduate_posts_custom_column', [ __CLASS__, 'custom_columns'], 10, 2 );\n add_action( 'manage_edit-graduate_sortable_columns', [ __CLASS__, 'custom_columns_sortable'] );\n add_action( 'pre_get_posts', [ __CLASS__, 'custom_columns_orderby'] );\n }", "title": "" }, { "docid": "2248645f37b0e957b44656472d63fdec", "score": "0.54701704", "text": "function xkit_portfolio_columns_create( $columns ) {\r\n\t\t\t$column_thumbnail = array( \r\n\t\t\t\t'thumbnail' => esc_html__( 'Thumbnail', 'xkit' )\r\n\t\t\t);\r\n\t\t\t$columns = array_slice( $columns, 0, 1, true ) + $column_thumbnail + array_slice( $columns, 1, NULL, true );\r\n\r\n\t\t\treturn $columns;\r\n\t\t}", "title": "" }, { "docid": "bff48cce5880f3d5e81bef0ce639b445", "score": "0.5462333", "text": "protected function createColumnSchema()\n {\n return $this->db->createColumnSchema();\n }", "title": "" }, { "docid": "4e8e3acb439b18f2c00b24fdf234c17f", "score": "0.5459015", "text": "public function initialize_columns($addActionsColumn = true)\n {\n parent::initialize_columns(false);\n \n $this->add_column(new StaticTableColumn(self::COLUMN_PROGRESS));\n $this->addActionsColumn();\n }", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.5448346", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.5448346", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.5448346", "text": "public function getColumns();", "title": "" }, { "docid": "9c34a5124deb778489f2029d7b401974", "score": "0.5433631", "text": "protected function _prepareColumns()\r\n {\r\n parent::_prepareColumns();\r\n return $this;\r\n }", "title": "" }, { "docid": "1251d089d81bd5b777c34b447c4fdddc", "score": "0.542856", "text": "function get_columns()\n {\n return $columns = array(\n 'cb' => __('<input type=\"checkbox\" />'), // Render a checkbox instead of text\n 'col_first_name' => __('First Name'),\n 'col_last_name' => __('Last Name'),\n 'col_email' => __('Email'),\n 'col_phone' => __('Phone'),\n 'col_addr' => __('Address')\n );\n }", "title": "" }, { "docid": "a8782c1be2be8a272d6ea28e858cc3fe", "score": "0.5421251", "text": "protected function actionHandlerAddColumn() {\n $name = $this->quoteColumnName($this->action['parms']['name']);\n $definition = $this->action['parms']['definition'];\n $this->sqlCommand[] = 'ADD '.$name.' '.$definition;\n }", "title": "" }, { "docid": "4ee7fa645f63d33d070d6c4b2655d266", "score": "0.542043", "text": "public function get_columns()\n {\n if (!empty($this->results)) {\n $primary_key = [\n 'meta_id',\n 'comment_ID',\n 'link_ID',\n 'option_id',\n 'blog_id',\n 'option_name',\n 'ID',\n 'term_id',\n 'object_id',\n 'term_taxonomy_id',\n 'umeta_id',\n 'id',\n ];\n $unique_key = ['term_id', 'taxonomy', 'slug'];\n $data = [\n 'name' => '', // column name\n 'table' => '', // table name\n 'max_length' => 0, // max length of the column\n 'not_null' => 1, // 1 if not null\n 'primary_key' => 0, // 1 if column has primary key\n 'unique_key' => 0, // 1 if column has unique key\n 'multiple_key' => 0, // 1 if column doesn't have unique key\n 'numeric' => 0, // 1 if column has numeric value\n 'blob' => 0, // 1 if column is blob\n 'type' => '', // type of the column\n 'unsigned' => 0, // 1 if column is unsigned integer\n 'zerofill' => 0, // 1 if column is zero-filled\n ];\n if (preg_match(\"/\\s*FROM\\s*(.*)?\\s*/i\", $this->rewritten_query, $match)) {\n $table_name = trim($match[1]);\n } else {\n $table_name = '';\n }\n foreach ($this->results[0] as $key => $value) {\n $data['name'] = $key;\n $data['table'] = $table_name;\n if (in_array($key, $primary_key)) {\n $data['primary_key'] = 1;\n } elseif (in_array($key, $unique_key)) {\n $data['unique_key'] = 1;\n } else {\n $data['multiple_key'] = 1;\n }\n $this->column_data[] = new ObjectArray($data);\n $data['name'] = '';\n $data['table'] = '';\n $data['primary_key'] = 0;\n $data['unique_key'] = 0;\n $data['multiple_key'] = 0;\n }\n\n return $this->column_data;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c960da58ee324aedcb8e9c2aec0e7213", "score": "0.5418685", "text": "protected function _getFlatColumnsOldDefinition() {\n $columns = array();\n switch ($this->getBackendType()) {\n case 'static':\n $describe = $this->_getResource()->describeTable($this->getBackend()->getTable());\n if (!isset($describe[$this->getAttributeCode()])) {\n break;\n }\n $prop = $describe[$this->getAttributeCode()];\n $columns[$this->getAttributeCode()] = array(\n 'type' => $prop['DATA_TYPE'] . ($prop['LENGTH'] ? \"({$prop['LENGTH']})\" : \"\"),\n 'unsigned' => $prop['UNSIGNED'] ? true: false,\n 'is_null' => $prop['NULLABLE'],\n 'default' => $prop['DEFAULT'],\n 'extra' => null\n );\n break;\n case 'datetime':\n $columns[$this->getAttributeCode()] = array(\n 'type' => 'datetime',\n 'unsigned' => false,\n 'is_null' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'decimal':\n $columns[$this->getAttributeCode()] = array(\n 'type' => 'decimal(12,4)',\n 'unsigned' => false,\n 'is_null' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'int':\n $columns[$this->getAttributeCode()] = array(\n 'type' => 'int',\n 'unsigned' => false,\n 'is_null' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'text':\n $columns[$this->getAttributeCode()] = array(\n 'type' => 'text',\n 'unsigned' => false,\n 'is_null' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n case 'varchar':\n $columns[$this->getAttributeCode()] = array(\n 'type' => 'varchar(255)',\n 'unsigned' => false,\n 'is_null' => true,\n 'default' => null,\n 'extra' => null\n );\n break;\n }\n return $columns;\n }", "title": "" }, { "docid": "800bf1f574199c1da3a76bedd80d0431", "score": "0.5416992", "text": "function cbstdsys_manage_columns ( $cols ) {\n if ( post_type_supports( get_current_screen()->post_type, 'thumbnail' ) ) {\n $cols['thumbnail'] = __('Image');\n }\n\n if ( ! cbstdsys_opts('m_tags') ) {\n unset( $cols['tags'] );\n }\n \n if ( ! cbstdsys_opts( 'm_multiauthor' ) ) {\n unset( $cols['author'] ); \n }\n \n \n return $cols;\n }", "title": "" }, { "docid": "2e6ebfede570889d3e9656c94a5ad04f", "score": "0.540579", "text": "function manage_posts_columns() {\n\t\tglobal $socialflow;\n\t\t\n\t\t// Loop through all active post_types and add custom columns\n\t\tif ( $socialflow->options->get( 'post_type' ) ) {\n\t\t\tforeach ( $socialflow->options->get( 'post_type' ) as $post_type ) {\n\t\t\t\tadd_filter( 'manage_'. $post_type .'_posts_columns' , array( $this, 'add_column' ) );\n\t\t\t\tadd_action( 'manage_'. $post_type .'_posts_custom_column' , array( $this, 'custom_column' ), 10, 2 );\n\t\t\t}\n\t\t}\n\n\t\t// Add send action to posts list table \n\t\tadd_action( 'post_row_actions', array( $this, 'row_actions' ), 10, 2 );\n\t\tadd_action( 'page_row_actions', array( $this, 'row_actions' ), 10, 2 );\n\t\tadd_action( 'media_row_actions', array( $this, 'row_actions' ), 10, 2 );\n\t}", "title": "" }, { "docid": "abf1a35046ea0e09218710ef8fd45a95", "score": "0.5405164", "text": "function xkit_testimonials_columns_create( $columns ) {\r\n\t\t\t$column_thumbnail = array( \r\n\t\t\t\t'avatar' => esc_html__( 'Avatar', 'xkit' )\r\n\t\t\t);\r\n\t\t\t$columns = array_slice( $columns, 0, 1, true ) + $column_thumbnail + array_slice( $columns, 1, NULL, true );\r\n\r\n\t\t\treturn $columns;\r\n\t\t}", "title": "" }, { "docid": "4c34194fa11e800ff582f3e6f327cd1f", "score": "0.5398311", "text": "function get_columns()\n {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'status' => __('Status'),\n 'author' => __('Submitted by'),\n 'suggestion' => __('Suggestion'),\n );\n\n return $columns;\n }", "title": "" }, { "docid": "1af0f710b66b8615cf6c2034d3c77680", "score": "0.5395902", "text": "protected function _prepareColumns () {\n\t\t\t// Add all the desired columns to the table\n\t\t\t$this->addColumn ( \"username\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Username\"),\n\t\t\t\t\"index\" => \"username\",\n\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"firstname\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Firstname\"),\n\t\t\t\t\"index\" => \"firstname\",\n\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"lastname\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Lastname\"),\n\t\t\t\t\"index\" => \"lastname\",\n\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"email\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Email Address\"),\n\t\t\t\t\"index\" => \"email\",\n\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"last_timestamp\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Last Authenticated On\"),\n\t\t\t\t\"index\" => \"user_id\",\n\t\t\t\t\"renderer\" => \"twofactor/renderer_manage_timestamp\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"last_address\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"Last Authenticated From\"),\n\t\t\t\t\"index\" => \"user_id\",\n\t\t\t\t\"renderer\" => \"twofactor/renderer_manage_address\",\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"status\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"2FA Enabled\"),\n\t\t\t\t\"index\" => \"user_id\",\n\t\t\t\t\"width\" => \"200px\",\n\t\t\t\t\"renderer\" => \"twofactor/renderer_manage_status\",\n\t\t\t\t\"sortable\" => false,\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t$this->addColumn ( \"state\", array (\n\t\t\t\t\"header\" => Mage::helper (\"twofactor\")->__(\"2FA State\"),\n\t\t\t\t\"index\" => \"user_id\",\n\t\t\t\t\"width\" => \"200px\",\n\t\t\t\t\"renderer\" => \"twofactor/renderer_manage_state\",\n\t\t\t\t\"sortable\" => false,\n\t\t\t\t\"filter\" => false\n\t\t\t));\n\t\t\t// Return whatever the inherited method returns\n\t\t\treturn parent::_prepareColumns ();\n\t\t}", "title": "" }, { "docid": "43f5c85b6e6bd31a06a48c896238f758", "score": "0.53884023", "text": "private function getColumns()\n {\n $this->columns = DB::getSchemaBuilder()->getColumnListing($this->table);\n $this->columns = array_flip($this->columns);\n }", "title": "" }, { "docid": "8e3848e0d4d5f9e6ffef4a0e8e8d71f0", "score": "0.53780264", "text": "private function createGrid()\r\n {\r\n $builder = $this->getService('grid')->create($this->getRequest());\r\n $builder->setFormatter(new BasicGridFormatter('role',$this->isAllow(8)));//prefix\r\n $builder->setDataManager(new BasicDataManager(\r\n $this->getDoctrine()->getEntityManager()\r\n , 'Entity\\Role'\r\n ));\r\n\r\n $builder->setLimit(10);\r\n\r\n $builder->addColumn(new Column('id','#'));\r\n $builder->addColumn(new Column('name','Name'));\r\n\r\n $builder->addColumn(new Column('id','Action', new ActionColumnFormatter('role', array('edit')),array()));\r\n return $builder;\r\n }", "title": "" }, { "docid": "36410c45ea8d0d0078d8be1066eb6891", "score": "0.5368005", "text": "protected function defineColumnsForDatagrid($grid) {\r\n\r\n\r\n $grid->addNumber('prodejID', 'Id');\r\n\r\n $grid->addDate('datum', 'Datum prodeje')\r\n ->setFormat('j.n.Y H:i:s');\r\n\r\n $grid->addNumber('pobockaID', 'Číslo pobočky');\r\n\r\n $grid->addTemplate('pobockaID', 'Pobočka')\r\n ->setCallbackArguments(array($this))\r\n ->setTemplate(__DIR__ . '/templates/Column/_itemName.latte') // or instanceof UI\\ITemplate\r\n ->setCallback(function($data, Nette\\Application\\UI\\ITemplate $template, $presenter) {\r\n $template->id = $data['pobockaID'];\r\n $template->nazev = $presenter->pobockaManager->getName($data['pobockaID']);\r\n });\r\n\r\n\r\n return $grid;\r\n }", "title": "" } ]
2896a62e406b294998d8b7923f078c8e
Fetch template or custom double
[ { "docid": "6185cb1b737fc61d1b084f8eb9ddf059", "score": "0.0", "text": "public function fetchCustom($resource_name, $cache_id = null, $compile_id = null, $display = false)\n\t{\n\t return $this->fetch(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id, $display);\n\t}", "title": "" } ]
[ { "docid": "92ad036a8e20deb2e96b6d2349e5257d", "score": "0.5861738", "text": "protected abstract function getTemplateData();", "title": "" }, { "docid": "e2144374affd4d4e6233ea913d60d605", "score": "0.5764779", "text": "private function get_fetch_object() {\n\t\tswitch ( filter_input( INPUT_POST, 'type' ) ) {\n\t\t\tcase 'post':\n\t\t\t\treturn new WPSEO_Recalculate_Posts();\n\t\t\tcase 'term':\n\t\t\t\treturn new WPSEO_Recalculate_Terms();\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "b8e49191d18532cdfdf3d864aee04e7c", "score": "0.5750128", "text": "public function get_template();", "title": "" }, { "docid": "81853744be8fe1cb5fd3fb2e8a060cc8", "score": "0.5735796", "text": "public function getTemplate() {\n // This could potentially be an annotation, but I'm wondering about code readability\n\n }", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.5646692", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.5646692", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.5646692", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.5646692", "text": "public function getTemplate();", "title": "" }, { "docid": "46caea474f32a52c734f7690bcb85ba1", "score": "0.564634", "text": "function fetch($request) {\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t$spotlightDao =& DAORegistry::getDAO('SpotlightDAO');\n\t\t$spotlight =& $spotlightDao->getById($this->getSpotlightId());\n\t\t$templateMgr->assign_by_ref('spotlight', $spotlight);\n\t\t$templateMgr->assign('pressId', $this->getPressId());\n\n\t\tif (isset($spotlight)) {\n\t\t\t$templateMgr->assign('title', $spotlight->getTitle(null));\n\t\t\t$templateMgr->assign('description', $spotlight->getDescription(null));\n\t\t\t$templateMgr->assign('assocTitle', $this->getAssocTitle($spotlight->getAssocId(), $spotlight->getAssocType()));\n\t\t\t$templateMgr->assign('assocId', $spotlight->getAssocId() . ':' . $spotlight->getAssocType());\n\t\t}\n\n\t\treturn parent::fetch($request);\n\t}", "title": "" }, { "docid": "2201b66ac337f7393505e6aea309d357", "score": "0.55637497", "text": "function get_single(){\n return get_note(SLUG);\n}", "title": "" }, { "docid": "38d44f99aad986596aecf0fcb4a9b171", "score": "0.5480718", "text": "public static function getTemplate();", "title": "" }, { "docid": "b6a7d3efb9fd6ac505f67797c4dd16ef", "score": "0.5453272", "text": "private function get_template($model, $type, $default = false) {\n \n $query = new Query('read',array(\n 'table' => 'templates',\n 'fields' => $type,\n 'where' => array('`table`',$model),\n 'groupby' => 'none'\n )); \n $template = $query->execute();\n\n if (empty($template)) {\n \t\t\tif ($default) return $default;\n \t\t\telse {\n \t\t\t\t$response = new Response(404, array(\n \t\t\t\t\t'error'\t=>\t$type . ' template file for ' . $model . ' not found.'\n \t\t\t\t), 'html', '404');\n \t\t\t} \t\n }\n else return $template;\n\t}", "title": "" }, { "docid": "9ec2630e76782c0414efdc7131d3b27a", "score": "0.536956", "text": "abstract public function getOne();", "title": "" }, { "docid": "5cf59f06c7146033657f90bedbf0df49", "score": "0.5331347", "text": "static function get_single_template($post_id){\n\t\tglobal $wpdb;\n\t\t$post_type = self::posttype;\n\t\t$sql = \"SELECT post_title, post_content FROM $wpdb->posts WHERE post_type='$post_type' AND post_status = 'publish' AND ID = '$post_id'\";\n\t\treturn $wpdb->get_row($sql);\t\n\t}", "title": "" }, { "docid": "c42fb5f7fd924748e6c733bcd80c1c62", "score": "0.52338314", "text": "public function templateData() {\n return $template[0];\n }", "title": "" }, { "docid": "83eb84058310bda0764346b8372ad5e9", "score": "0.52246356", "text": "public function fetch() \n {\n\t\t$obLevel = ob_get_level();\n\t\t\n ob_start();\n\t\t\n\t\textract($this->templateVars, EXTR_SKIP | EXTR_REFS);\n\t\t\n try\t{\n require $this->getTemplateFile();\n } catch (Exception $e) {\n $this->handleViewException($e, $obLevel);\n } catch (Throwable $e) {\n $this->handleViewException(new FatalThrowableError($e), $obLevel);\n }\n\t\t\n return ob_get_clean();\n }", "title": "" }, { "docid": "1b8d91aed466d08b53c5e0430a430f34", "score": "0.5222805", "text": "function web_apper_get_equation_by_equation_id( $equation_id ) {\r\n\tglobal $wpdb;\r\n\t$item = web_apper_equation_get_results( \"SELECT * FROM {$wpdb->prefix}web_apper_equations WHERE equation_id = '{$equation_id}'\" );\r\n\treturn $item[0];\t\r\n}", "title": "" }, { "docid": "5b5af24d6818f636ff2bb3e104104bdd", "score": "0.51962864", "text": "function hail_single_template($single) {\nglobal $wp_query, $post;\n\n/**\n* Checks for single template by author\n* Check by user nicename and ID\n*/\n$curauth = get_userdata($wp_query->post->post_author);\n\nif(file_exists(SINGLE_PATH . '/single-services.php'))\nreturn SINGLE_PATH . '/single-services.php';\n}", "title": "" }, { "docid": "200421811ec23e6497e9ba5f063dad9e", "score": "0.51848024", "text": "public function getDouble();", "title": "" }, { "docid": "a536a4fe3fa15d4d62c9ec91cd907b7f", "score": "0.5159614", "text": "function template_get_price($id){\n\tglobal $wpdb;\n\t$table_delivery_cities = $wpdb->prefix . 'delivery_cities';\n\t$table_delivery_pricing = $wpdb->prefix . 'delivery_pricing';\n\t$table_delivery_delay = $wpdb->prefix . 'delivery_delay';\n\tif (isset($id) && !empty($id)) {\n\t if (!is_admin()) {\n\t \t\t$results = $wpdb->get_results(\"SELECT * FROM $table_delivery_cities, $table_delivery_pricing, $table_delivery_delay WHERE $table_delivery_cities.id = $table_delivery_pricing.delivery_cities_id and $table_delivery_pricing.id= $table_delivery_delay.pricing_id and $table_delivery_pricing.delivery_companies_id='$id';\");\n\t\t //return query object\n\t\t return $results;\n\t }\n\t}else{\n\t\treturn false;\n\t}\n \n}", "title": "" }, { "docid": "17db7b0024988299f6ddec5d1136e959", "score": "0.5149416", "text": "public function TemplatedResults() {\n\t\t\t$query = $this->owner->data()->getQuery();\n\t\t\tif ($this->owner->data()->ListingTemplateID && $query) {\n\t\t\t\t$template = DataObject::get_by_id('ListingTemplate', $this->owner->data()->ListingTemplateID);\n\t\t\t\tif ($template && $template->exists()) {\n\t\t\t\t\t$items = $query ? $query->getDataObjects() : new DataObjectSet();\n\t\t\t\t\t$item = $this->owner->data()->customise(array('Items' => $items));\n\t\t\t\t\t$view = SSViewer::fromString($template->ItemTemplate);\n\t\t\t\t\treturn $view->process($item);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6749507e2d525c430fdc0e3413889be0", "score": "0.5140459", "text": "private function getTemplate($template)\r\n {\r\n return json_decode(file_get_contents(\"application/models/templates/\".$template.\".json\"));\r\n }", "title": "" }, { "docid": "871a38429acf2caeb745332d7172546d", "score": "0.51278645", "text": "abstract public static function getTemplate(): string;", "title": "" }, { "docid": "ef1d971e90ffb1fbf0750ab52bf6d1a4", "score": "0.51120687", "text": "abstract public function _fetchOne();", "title": "" }, { "docid": "0c64647e4fc6f32c42add5fd02cdbb12", "score": "0.5100667", "text": "public function fetch($template, array $data = [])\n {\n $attributes = array_merge($this->attributes, $data);\n\n return $this->engine->render($template, $attributes);\n }", "title": "" }, { "docid": "b0b656524bd65ab9d81e84df282b1504", "score": "0.5100576", "text": "function market_reports_single( $single_template ){\n\n if(is_singular('market_reports')){\n\n $found = locate_template('single-market_reports.php', false);\n\n if($found == ''){\n\n return plugin_dir_path(__FILE__) .'/templates/single-market_reports.php';\n\n }\n\n }\n\n return $single_template;\n }", "title": "" }, { "docid": "da3411d411aa31bb2a14b2f95d580ffb", "score": "0.5078316", "text": "abstract function get();", "title": "" }, { "docid": "f0848508bc97480393cde23964f9d147", "score": "0.5064892", "text": "function fetch($template_file){\n\n\t\t// this name will be in template vars scope\n\t\t$psa_sdf33saf2342as8dmm32 = $template_file;\n\n\t\t// extract the template_values to local namespace\n\t\textract($this->template_values);\n\n\t\t// start output buffering\n\t\tob_start();\n\n\t\t// include template file\n\t\tinclude $this->template_dir . '/' . $psa_sdf33saf2342as8dmm32;\n\n\t\t// get the contents and clean the buffer\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "1eab9ece81ed68fef819066310430164", "score": "0.5052293", "text": "function fetch($template, $cacheId = NULL, $params = array()) {\n\t\tisset($params['display']) || $params['display'] = FALSE;\n\t\tif (!self::checkCache($template,$cacheId,$params)) {\n\t\t\t$this->compile($template,$cacheId,$params);\n\t\t}\n\t\t$cachePath\t=\tSmile::getCacheFilePath($template,$cacheId,$params);\n\t\tif (isset($params['display']) && !$params['display']) {\n\t\t\tob_start();\n\t\t\tob_implicit_flush(0);\n\t\t}\n\t\t\n\t\textract($this->tpVar);\n\t\tinclude $cachePath;\n\t\tif (isset($params['display']) && !$params['display']) {\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "8974daab7bdb96dafc6026e617e59c68", "score": "0.50438297", "text": "protected function _fetchTemplate($template, array $variables = array())\n {\n return $this->_dwoo->get(\n $this->getTemplatePath($template), $variables\n );\n }", "title": "" }, { "docid": "69ff312c7331c7cb14d654ad5121d221", "score": "0.5030511", "text": "public function fetchMyPrice();", "title": "" }, { "docid": "03ac11ad57fa530ff40a6ee8eacbbbef", "score": "0.502191", "text": "function _fetchTemplate( $template )\n\t{\n\t\tswitch( $this->_templates[$template]['attributes']['type'] )\n\t\t{\n\t\t\t/**\n\t\t\t * condition template\n\t\t\t */\n\t\t\tcase 'condition':\n\t\t\t\t$value = $this->_getConditionValue($template, $this->_templates[$template]['attributes']['conditionvar']);\n\t\t\t\tif ($value === false) {\n\t\t\t\t\t$this->_templates[$template]['work']\t\t\t\t= '';\n\t\t\t\t\t$this->_templates[$template]['currentDependencies']\t= array();\n\t\t\t\t} else {\n\t\t\t\t\t$this->_templates[$template]['work']\t\t\t\t= $this->_templates[$template]['subtemplates'][$value]['data'];\n\t\t\t\t\t$this->_templates[$template]['currentDependencies']\t= $this->_templates[$template]['subtemplates'][$value]['dependencies'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * condition template\n\t\t\t */\n\t\t\tcase 'simplecondition':\n\t\t\t\tforeach( $this->_templates[$template]['attributes']['requiredvars'] as $var )\n\t\t\t\t{\n\t\t\t\t\t// different template scope\n\t\t\t\t\tif( $var[0] !== $template ) {\n\t\t\t\t\t\t$this->_fetchVariables($var[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$value = null;\n\t\t\t\t\t// fetch the local variable\n\t\t\t\t\tif( isset( $this->_templates[$var[0]]['vars'][$var[1]] )\n\t\t\t\t\t && strlen( $this->_templates[$var[0]]['vars'][$var[1]] ) > 0 ) {\n\t\t\t\t\t $value = $this->_templates[$var[0]]['vars'][$var[1]];\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($this->_templates[$template]['attributes']['useglobals'])) {\n\t\t\t\t\t\tif(isset($this->_globals[$var[1]]) && strlen($this->_globals[$var[1]]) > 1) {\n\t\t\t\t\t\t\t$value = $this->_globals[$var[1]];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($value !== null) {\n if ($var[2] === null) {\n \tcontinue;\n } else {\n \t// Joomla! addition 23-June-2005\n \t// value wrapped in ## uses regex for comparison\n\t\t\t\t\t\t\t$condition = $var[2];\n\t\t\t\t\t\t\tif (substr( $condition, 0, 1 ) == '#' && substr( $condition, -1, 1 ) == '#' ) {\n\t\t\t\t\t\t\t\tif (preg_match( $condition, $value )) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ($condition == $value) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n \t/* Pat Original\n if ($var[2] == $value) {\n \tcontinue;\n }\n */\n }\n }\n\n\t\t\t\t\t$this->_templates[$template]['work']\t\t\t\t= '';\n\t\t\t\t\t$this->_templates[$template]['currentDependencies']\t= array();\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t\t$this->_templates[$template]['work'] \t\t\t\t= $this->_templates[$template]['content'];\n\t\t\t\t$this->_templates[$template]['currentDependencies']\t= $this->_templates[$template]['dependencies'];\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * modulo template\n\t\t\t */\n\t\t\tcase 'modulo':\n\t\t\t\t// check for empty template\n\n\t\t\t\tif ($this->_hasVariables($template)) {\n\t\t\t\t\t$value = (string)($this->_templates[$template]['iteration'] + 1 ) % $this->_templates[$template]['attributes']['modulo'];\n\t\t\t\t} else {\n\t\t\t\t\t$value = '__empty';\n\t\t\t\t}\n\n\t\t\t\t$value = $this->_getConditionValue($template, $value, false);\n\t\t\t\tif ($value === false) {\n\t\t\t\t\t$this->_templates[$template]['work']\t\t\t\t= '';\n\t\t\t\t\t$this->_templates[$template]['currentDependencies']\t= array();\n\t\t\t\t} else {\n\t\t\t\t\t$this->_templates[$template]['work']\t\t\t\t= $this->_templates[$template]['subtemplates'][$value]['data'];\n\t\t\t\t\t$this->_templates[$template]['currentDependencies']\t= $this->_templates[$template]['subtemplates'][$value]['dependencies'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * standard template\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\t$this->_templates[$template]['work'] \t\t\t\t=\t$this->_templates[$template]['content'];\n\t\t\t\t$this->_templates[$template]['currentDependencies']\t=\t$this->_templates[$template]['dependencies'];\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e43c0f85bcf6e4e044b7e7567e2dfc88", "score": "0.5008041", "text": "public function getPost()\n\t\t{\n\t\t\treturn apply_filters( 'chef_sections_template_post_getter', get_post( $this->object->template_id ) );\n\t\t}", "title": "" }, { "docid": "163b0f173251df910862cfad400f5b54", "score": "0.5001142", "text": "public function pc_calling_single_template() {\n \n global $product;\n\n if('price_calculator' == $product->get_type()) {\n\n wc_get_template('single-product/add-to-cart/pc-calculator-product.php', array(), '', pc_pcalculator_template_path . '/' );\n }\n }", "title": "" }, { "docid": "8604e97bc3960c23593c090fbb749376", "score": "0.4995472", "text": "public function getTemplate(): ?string;", "title": "" }, { "docid": "8ee00093a35c66a56578dfcc4d98b52f", "score": "0.4990968", "text": "public function testRetrieveOneTemplate()\n {\n }", "title": "" }, { "docid": "f397838a42fc33f783e8325cb169874e", "score": "0.4987301", "text": "final public function SmartyFetch($template) {\r\n return $this->smarty->fetch($this->GetFileResource($template));\r\n }", "title": "" }, { "docid": "940993d02d8576221daa5fbc7e4c23ce", "score": "0.49844876", "text": "public function fetch_template($template = NULL)\n\t{\n\t\tif (is_null($template))\n\t\t{\n\t\t\t$class = str_replace(Request::current()->extension_prefix, '', get_class($this));\n\t\t\t$foo = explode('_', $class);\n\t\t\tarray_shift($foo);\n\t\t\t$this->_template_path = implode('/', $foo);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_template_path = $template;\n\t\t}\n\n\t\t$template = Kohana::find_file('tmpl', $this->_template_path, 'mustache');\n\n\t\tif ($template)\n\t\t\t$this->_template = file_get_contents($template);\n\t\telse\n\t\t\tthrow new Kohana_Exception('Template file not found: :path :template', array(':path' => $this->_template_path, ':template' => $template));\n\n\t\treturn $this->_template;\n\t}", "title": "" }, { "docid": "74805c7f4ea74b7f3ecd15bdb854943f", "score": "0.49721417", "text": "abstract public function getTemplate($name);", "title": "" }, { "docid": "a7757b0215beebb3d7f901acf06a9747", "score": "0.4967442", "text": "function fetch($request) {\n\n\t\t$context = $request->getContext();\n\n\t\t$templateMgr = TemplateManager::getManager($request);\n\t\t$templateMgr->assign('submissionId', $this->getSubmission()->getId());\n\t\t$templateMgr->assign('stageId', $this->getStageId());\n\t\t$templateMgr->assign('formParams', $this->getFormParams());\n\t\t$templateMgr->assign('context', $context);\n\n\t\t$journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO');\n\t\t$templateMgr->assign('issueOptions', $this->getIssueOptions($context));\n\n\t\t$publishedArticle = $this->getPublishedArticle();\n\t\tif ($publishedArticle) {\n\t\t\t$templateMgr->assign('publishedArticle', $publishedArticle);\n\t\t\t$issueDao = DAORegistry::getDAO('IssueDAO');\n\t\t\t$issue = $issueDao->getById($publishedArticle->getIssueId());\n\t\t\tif ($issue) {\n\t\t\t\t$templateMgr->assign('issueAccess', $issue->getAccessStatus());\n\t\t\t\t$templateMgr->assign('accessOptions', array(\n\t\t\t\t\tARTICLE_ACCESS_ISSUE_DEFAULT => __('editor.issues.default'),\n\t\t\t\t\tARTICLE_ACCESS_OPEN => __('editor.issues.open')\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// include payment information\n\t\t// Set up required Payment Related Information\n\t\timport('classes.payment.ojs.OJSPaymentManager');\n\t\t$paymentManager = new OJSPaymentManager($request);\n\t\t$completedPaymentDao = DAORegistry::getDAO('OJSCompletedPaymentDAO');\n\t\t$publicationFeeEnabled = $paymentManager->publicationEnabled();\n\t\t$templateMgr->assign('publicationFeeEnabled', $publicationFeeEnabled);\n\t\tif ($publicationFeeEnabled) {\n\t\t\t$templateMgr->assign('publicationPayment', $completedPaymentDao->getPublicationCompletedPayment($context->getId(), $this->getSubission()->getId()));\n\t\t}\n\n\t\t$templateMgr->assign('submission', $this->getSubmission());\n\n\t\treturn parent::fetch($request);\n\t}", "title": "" }, { "docid": "439e56a74bb8e005e0ac67f5fbcf037f", "score": "0.49572656", "text": "function get_template_link($page){\r\r\n\t\tglobal $wpdb;\r\r\n\t\t$get_meta = $wpdb->get_row(\"SELECT * FROM \".$wpdb->postmeta.\" WHERE `meta_key` = '_wp_page_template' AND `meta_value` = '\".$page.\"'\");\r\r\n\t\t$post = get_post($get_meta->post_id);\r\r\n\r\r\n\t\treturn $post;\r\r\n\t}", "title": "" }, { "docid": "d767cb7d0f3e8e45f90d3643e6b35436", "score": "0.4954172", "text": "function ovacrs_get_price_hour( $post_id ){\n return wc_price( get_post_meta( $post_id, 'ovacrs_regul_price_hour', true ) );\n}", "title": "" }, { "docid": "ec006bc67421c3b0cf3c9159c145cc3e", "score": "0.49332187", "text": "public function fetch($template, $data = [], $cacheId = null)\n {\n $data = array_merge($this->variables, $data);\n\n return $this->environment->render($template, $data);\n }", "title": "" }, { "docid": "80abb9f702f1726443b10e3c1d1a2e5a", "score": "0.493166", "text": "function fetchPage($file, $format, $template_id, $label_id, $sub=\"\")\n{\n global $templates_obj;\n\n if($format == \"css\")\n {\n $getcaps[\"tablename\"] = \"tbl_template_vars\";\n $getcaps[\"whereCon\"] = 'p1te_id ='.$template_id.' and p1tv_id ='.$label_id;\n $debug = array('file'=>'editor.php', 'line'=>'getcss');\n $getcaps = $templates_obj->get_all($getcaps, $debug);/*getcss*/\n $css_title = $getcaps[0]['p1tv_name'];\n $xml = simplexml_load_file($file);\n }\n else\n {\n $getcaps[\"tablename\"] = \"tbl_template_captions\";\n $getcaps[\"whereCon\"] = 'p1te_id ='.$template_id.' and p1tc_id ='.$label_id;\n $debug = array('file'=>'editor.php', 'line'=>'getxml');\n $getcaps = $templates_obj->get_all($getcaps, $debug);/*getxml*/\n $css_title = $getcaps[0]['p1tc_title'];\n $xml = simplexml_load_file($file);\n if($sub == \"mobile\") {\n $xml = $xml->mobile;\n }\n else if($sub == \"home\") {\n $xml = $xml->home;\n }\n else if($sub == \"anyphone\") {\n $xml = $xml->anyphone;\n }\n }\n foreach($xml->name as $val) {\n $title[] = (string) $val['title'];\n $value[] = (string) $val['value'];\n }\n $no = array_keys($title, $css_title);\n return $value[$no[0]];\n}", "title": "" }, { "docid": "a160ec9bef31ef676ee43dd595988b32", "score": "0.49302626", "text": "public function fetch($y_view_tpl) {\n \tob_start(); \t \t\n \textract($this->valueArray); \t \t \n\t\trequire_once ($y_view_tpl);\n \t$contents = ob_get_contents();\n \tob_end_clean();\n \t return $contents;\n }", "title": "" }, { "docid": "7c2db88ee37814a07ba549df923044de", "score": "0.49054423", "text": "public function getFeaturedTemplates(){\n\t\t\n\t\t//Get ID\n\t\t$id = 1;\n\t\t\n\t\t//Get remote files collector\n\t\tinclude_once(\"core/lib/RemoteFiles.php\");\n\t\t\n\t\t//Create new remote file connector.\n\t\t$rf = new RemoteFiles();\n\t\t\n\t\t$id = $this->getInputString(\"id\", \"1\", \"G\");\n\t\t\n\t\t$out1 = $rf->getURL(\"http://styles.lotuscms.org/lcms-3-styles/infoloader.php?id=\".$id);\n\t\t\n\t\tif(empty($out1)){\n\t\t\texit(\"<br /><br /><strong>Data retrieval failed</strong> - LotusCMS probably unavailable, please try again later.\");\t\n\t\t}\n\t\t\n\t\treturn $out.$out1;\n\t}", "title": "" }, { "docid": "69519906faa197e4a5cc64fcf464a01d", "score": "0.4896447", "text": "function processAndFetch($template, &$o_site, &$o_data, $request = null, $cacheDiscriminant = null)\n\t{\n\t\t$this->setTemplate($template);\n\t\t$cache_id = (!is_null($cacheDiscriminant)) \n\t\t\t? md5(SMARTY_CACHE_ID . $cacheDiscriminant) \n\t\t\t: SMARTY_CACHE_ID;\n\n\t if (!$this->is_cached($template, $cache_id, $this->compile_id))\n\t\t{\n\t\t\t$this->processDatas($o_site, $o_data, $request);\n\t }\n\n\t return $this->fetch($this->template, $cache_id, $this->compile_id);\n\t}", "title": "" }, { "docid": "2052e5b4d727cd70261b0beebe096695", "score": "0.4895502", "text": "public function display($template){\n\t\t$template->assign('id', $this->id);\n\t\t$template->assign('name', $this->name);\n\t\t$template->assign('kcal', $this->kcal);\n\t\t$template->assign('description', $this->description);\n\t\treturn $template->fetch();\n\t}", "title": "" }, { "docid": "48d7464487f6bbb3080d1148aecbe159", "score": "0.4894565", "text": "function getTemplate() {\n\t\t$row = $this->getTable($this->_tablename);\n\t\t\n\t\tif ($this->_id == 0) {\n\t\t\t$this_id = $this->GetFirstTemplateId();\n\t\t}\n\t\t$row->load($this->_id);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "8529bb5d3cd96bc01ebc93f6a8765ded", "score": "0.48938212", "text": "public function getOne();", "title": "" }, { "docid": "86ba5f0830fb16fa86e141536d55e1fd", "score": "0.48851126", "text": "abstract public function _fetch();", "title": "" }, { "docid": "f3d1ceda42f2db747dfa7ae6b6be9bc3", "score": "0.48773783", "text": "public function fetch(string $template, array $variables = []): string\n {\n return $this->create()->fetch($template, $variables);\n }", "title": "" }, { "docid": "e3884e602e160f57d9a10873f4cd1910", "score": "0.48688242", "text": "public function getSingleResult()\n {\n }", "title": "" }, { "docid": "e3884e602e160f57d9a10873f4cd1910", "score": "0.48688242", "text": "public function getSingleResult()\n {\n }", "title": "" }, { "docid": "f9b99f726859b752d8c2a8d29a55fe6c", "score": "0.48620844", "text": "public static function get()\n {\n return self::$template;\n }", "title": "" }, { "docid": "ac40e1b5d20ab5d854bbd35fc9e92b23", "score": "0.48562008", "text": "public function templateSingleCar ( $single ) {\n\t\tglobal $post;\n\n\t\tif ( $post->post_type == $this->nameCTP ) {\n\t\t\tif ( file_exists( get_template_directory() . '/single-car.php' ) ) {\n\t\t\t\treturn $single;\n\t\t\t} else {\n\t\t\t\treturn JWA_CAR_PLUGIN_DIR . '/template/single_car/single-car.php';\n\t\t\t}\n\t\t}\n\n\t\treturn $single;\n\t}", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.4847329", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.4847329", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.4847329", "text": "abstract public function get();", "title": "" }, { "docid": "6a089a33b6720c03b9026d06936f11d4", "score": "0.4841718", "text": "public abstract function fetch ();", "title": "" }, { "docid": "9f8b9ee14a06984557adfe54fd8084f4", "score": "0.48404828", "text": "public function template_action()\n\t{\n\t\t$get_call = array(static::$config['model_class'], 'get_by_id');\n\n\t\tglobal $wp_query;\n\t\tif (isset($wp_query->query_vars[static::$config['id_field']]))\n\t\t\t$this->item_instance = $get_call((int)$wp_query->query_vars[static::$config['id_field']]);\n\t\telse\n\t\t\t$this->item_instance = null;\n\t}", "title": "" }, { "docid": "fa89af3ffa6085796260e34ab3c4022f", "score": "0.4840353", "text": "function socialRateRecordGet($user_id,$entity_id,$entity_type, $rate_type=0){\n global $dbConn;\n $params = array(); \n $query = \"SELECT * FROM cms_social_ratings WHERE entity_type=:Entity_type AND rate_type=:Rate_type AND user_id=:User_id AND entity_id=:Entity_id AND published=1\";\n \n $params[] = array( \"key\" => \":Entity_type\", \"value\" =>$entity_type);\n $params[] = array( \"key\" => \":Rate_type\", \"value\" =>$rate_type);\n $params[] = array( \"key\" => \":User_id\", \"value\" =>$user_id);\n $params[] = array( \"key\" => \":Entity_id\", \"value\" =>$entity_id);\n $select = $dbConn->prepare($query);\n PDO_BIND_PARAM($select,$params);\n $res = $select->execute();\n\n $ret = $select->rowCount();\n if(!$res || ($ret == 0) ){\n return false;\n }else{\n $row = $select->fetch(PDO::FETCH_ASSOC);\n return $row;\n }\n}", "title": "" }, { "docid": "b7f33ecbe05797f574e9af9f42158470", "score": "0.48297784", "text": "function perfEntity($entity,$header='h2',$permalink=''){\n\t$host = $GLOBALS['host'];\n\t$lbl = $GLOBALS['lbl'];\n\t$resource = $GLOBALS['resource'];\n\t$excludeKeys = \tarray (\n\t\t\t\t\t\t\t\t\t'rdf:type',\n\t\t\t\t\t\t\t\t\t'frbr:exemplarOf',/**/\n\t\t\t\t\t\t\t\t\t'frbr:realizationOf',\n\t\t\t\t\t\t\t\t\t'frbr:realization',\n\t\t\t\t\t\t\t\t\t'frbr:embodimentOf',\n\t\t\t\t\t\t\t\t\t'frbr:embodiment',\n\t\t\t\t\t\t\t\t\t'skos:prefLabel',\n\t\t\t\t\t\t\t\t\t'skosxl:prefLabel',\n\t\t\t\t\t\t\t\t\t'foaf:img',\n\t\t\t\t\t\t\t\t\t'frbr:exemplar',\n\t 'pangea:date',\n\t 'rdfs:comment', \n\t 'skos:note', \n 'pangea:note',\n\t\t\t\t\t\t\t\t\t'rdfs:Label',\n\t 'pangea:nomen',\n\t 'frbr:relatedResponsibleEntity'\n\t\t\t\t\t\t\t\t);\n\t$type = (isset($entity['rdf:type']))?$entity['rdf:type'][0]['value']:'';\n\t$preflabel = (isset($entity['skos:prefLabel']))?$entity['skos:prefLabel'][0]['value']:'';\n\t$prefxlabel = (isset($entity['skosxl:prefLabel']))?$entity['skosxl:prefLabel'][0]['value']:'';\n\t$prefImage = (isset($entity['foaf:img']))?$entity['foaf:img'][0]['value']:'';\n\t$title = (isset($entity['frbr:exemplarOf']))?perfValues('frbr:exemplarOf',($entity['frbr:exemplarOf'])):'';\n\t$exemplars = (isset($entity['frbr:exemplar']))?$entity['frbr:exemplar']:Array();\n\t$label = ($preflabel)?$preflabel:(($prefxlabel)?getConceptLiteralForm($prefxlabel):'');\n\tlist($pref,$class)=explode(':',$type);\n\t$image = '\n\t\t<div class=\"thumb\">\n\t\t\t<img src=\"http://dev.pangea.ohc.cu/resource/'.$prefImage.'\" alt=\"imagen preferida\" />\n\t\t\t<small>Imagen de la portada</small>\n\t\t</div>';\n\t//echo '<div class=\"entity '.strtolower($class).'\" resource=\"'.$resource.'\" typeof=\"'.$type.'\">';\n\t//echo '<div class=\"entity\" resource=\"'.$resource.'\" typeof=\"'.$type.'\">';\n\t//echo ($prefImage)?$image:'';\n\techo ($label)?'<'.$header.'>'.(($permalink)?'<a href=\"'.$host.'?_ids='.$permalink.'\" title=\"permalink\">'.$label.'</a>':$label).'</'.$header.'>':'';\n\t//echo '<'.$header.'>'.$label.'</'.$header.'>';\n\techo '<ul class=\"verlist\">';\n\techo ($title)?'<li>'.$title.'</li>':'';\n\t$key = array_keys(deleteFromArray($entity,$excludeKeys));\n\t$size = sizeOf($key);\n\tfor ($i=0; $i<$size; $i++){\n\t\t//echo '<dt>'.getLabel($key[$i]).'</dt><dd>'.perfValues($key[$i],$entity[$key[$i]]).'</dd>';\n\t\techo '<li><span class=\"label\">'.(($lbl[$key[$i]])?$lbl[$key[$i]]:$key[$i]).'</span>'.perfValues($key[$i],$entity[$key[$i]]).'</li>';\n\t}\n\tif ($exemplars) echo '<li><span class=\"label\">ejemplares</span>'.count($exemplars).'</li>';\n\techo '</ul>';\n\t//echo '</div>';\n}", "title": "" }, { "docid": "7e8337586eb2fc8d8c8724355e1fbdb8", "score": "0.48274985", "text": "abstract protected function fetchValueFromPage();", "title": "" }, { "docid": "3c4b0e2ee6e935fa7e01f5591a4764b1", "score": "0.4825791", "text": "public function get_template(){\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "cc5efc07e987b6c8592a8b38c0e42674", "score": "0.48191684", "text": "function custom_single_template($single) {\n global $wp_query, $post;\n\n\n/* Checks for single template by category. Check by category slug and ID */\nforeach((array)get_the_category() as $cat) :\n\n if(file_exists(SINGLE_PATH . '/single-cat-' . $cat->slug . '.php'))\n return SINGLE_PATH . '/single-cat-' . $cat->slug . '.php';\n\n elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php'))\n return SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php';\n\nendforeach;\n\n/* Checks for single template by top-level category. Check by category slug and ID */\nforeach((array)get_the_category() as $cat) :\n//get top-level category\n\t\t\t\t\t//$p_cats=get_the_category($post_id);\n\t\t\t\t\t$parents =get_category_parents($cat->term_id);\n\t\t\t\t\t//$cat_arr = split(\"/\",$parents);\n\t\t\t\t\t$cat_arr = explode(\"/\",$parents);\n\t\t\t\t\t$topcat = get_category_by_slug($cat_arr[0]);\n\n if(file_exists(SINGLE_PATH . '/single-cat-' . $topcat->slug . '.php'))\n return SINGLE_PATH . '/single-cat-' . $topcat->slug . '.php';\n\n elseif(file_exists(SINGLE_PATH . '/single-cat-' . $topcat->term_id . '.php'))\n return SINGLE_PATH . '/single-cat-' . $topcat->term_id . '.php';\n\nendforeach;\n\n/* Checks for single template by custom post type */\nif ($post->post_type == \"bhauthor\"||\"products\"){\n if(file_exists(SINGLE_PATH . '/single-' . $post->post_type . '.php'))\n return SINGLE_PATH . '/single-' . $post->post_type . '.php';\n}\n\n/* Checks for single template by tag. Check by tag slug and ID */\n\t$wp_query->in_the_loop = true;\n\tif(has_tag()):\n\tforeach((array)get_the_tags() as $tag) :\n\n\t\tif(file_exists(SINGLE_PATH . '/single-tag-' . $tag->slug . '.php'))\n\t\t\treturn SINGLE_PATH . '/single-tag-' . $tag->slug . '.php';\n\n\t\telseif(file_exists(SINGLE_PATH . '/single-tag-' . $tag->term_id . '.php'))\n\t\t\treturn SINGLE_PATH . '/single-tag-' . $tag->term_id . '.php';\n\n\tendforeach;\n\tendif;\n\t$wp_query->in_the_loop = false;\n\n\n/*Checks for default single post files within the single folder */\nif(file_exists(SINGLE_PATH . '/single.php'))\n return SINGLE_PATH . '/single.php';\n\nelseif(file_exists(SINGLE_PATH . '/default.php'))\n return SINGLE_PATH . '/default.php';\n\nreturn $single; \n}", "title": "" }, { "docid": "e70a75cff8b8c170619852c89ffec6be", "score": "0.48167253", "text": "function RetDouble($input) {\n // NOTE: $input is of type inDouble\n // NOTE: should return an object of type RetDoubleResult\n\n // Here the $input is the actual simple value, you just set it to the ret value\n $ret = $input;\n return $ret;\n}", "title": "" }, { "docid": "7cd1d4880bb5db476b0b70f44f3231b2", "score": "0.4814753", "text": "abstract function get_one($query);", "title": "" }, { "docid": "968f8818ba765cf64578ec5b1801ef6c", "score": "0.48121876", "text": "function _fetch_template( $tmp = '', $data = array(), $settings = array() )\n\t{\n\t\tif ( $tmp == '' )\n\t\t{\n\t\t\tif ( ! $tmp = ee()->input->get_post('template') )\n\t\t\t{\n\t\t\t\tif ( ! (isset(ee()->TMPL) AND is_object(ee()->TMPL)) OR ! $tmp = ee()->TMPL->fetch_param('template') )\n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tmp\t\t= str_replace( '&amp;', '&', $tmp );\n\n\t\t$template\t= preg_split( \"/\\/|\".preg_quote(T_SLASH, '/').\"/\", trim( $tmp, \"/\" ) );\n\n\t\tif ( isset( $template['1'] ) === FALSE ) return FALSE;\n\n\t\t$query\t\t= ee()->db->query(\n\t\t\t\"SELECT t.template_type, t.template_data\n\t\t\t FROM \texp_templates \t\tAS t\n\t\t\t JOIN \texp_template_groups AS tg\n\t\t\t ON \ttg.group_id = t.group_id\n\t\t\t WHERE \ttg.group_name = '\" . $template['0'] . \"'\n\t\t\t AND \tt.template_name = '\" . $template['1'] . \"'\n\t\t\t LIMIT \t1\"\n\t\t);\n\n\t\tif ( $query->num_rows() == 0 )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tPrevent an infinite loop if this\n\t\t//\tfunction is being called inside the\n\t\t//\ttemplate that we are calling.\n\t\t//\t----------------------------------------\n\n\t\tif ( stristr( $query->row('template_data'), \"exp:friends\" ) )\n\t\t{\n\t\t\treturn $this->show_error(array(lang('template_loop')));\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInstantiate template class\n\t\t//\t----------------------------------------\n\n\t\trequire_once 'addon_builder/parser.addon_builder.php';\n\t\t$TEMPL = $GLOBALS['TMPL'] = new Addon_builder_parser_friends();\n\n\t\t//\t----------------------------------------\n\t\t//\tSet some values\n\t\t//\t----------------------------------------\n\n\t\t$TEMPL->encode_email\t\t= FALSE;\n\n\t\t$TEMPL->disable_caching\t\t= TRUE;\n\n\t\t$TEMPL->global_vars\t\t\t= ( isset( $TEMPL->global_vars )) ? $TEMPL->global_vars: array();\n\n\t\t$TEMPL->global_vars\t\t\t= array_merge( $TEMPL->global_vars, $data );\n\n\t\t$body = $GLOBALS['TMPL']->process_string_as_template($query->row('template_data'));\n\n\t\t//\t----------------------------------------\n\t\t//\tReturn\n\t\t//\t----------------------------------------\n\n\t\treturn $body;\n\t}", "title": "" }, { "docid": "6c1419faa5c4236ebeb74eb04a90ee0e", "score": "0.4806917", "text": "public function __get($name)\n\t{\n\t\treturn $this->_template->{$name};\n\t}", "title": "" }, { "docid": "e47225a4dca7c132b012bda2fd1e5348", "score": "0.48011324", "text": "public function retrieve();", "title": "" }, { "docid": "e47225a4dca7c132b012bda2fd1e5348", "score": "0.48011324", "text": "public function retrieve();", "title": "" }, { "docid": "5f9b2543056d08e3164da5c790fb4ab3", "score": "0.47983217", "text": "function fetch_data( $slug = null ) {\n\t\t\n\t\t$slug = $this->get_slug( $slug );\n\t\t\n\t\t$url = $this->build_url( $slug );\n\t\t\n\t\tif ( isset( $this->data[ $slug ] ) )\n\t\t\treturn $this->data[ $slug ];\n\t\t\n\t\tif ( $cache = wp_cache_get( $slug, $this->cache_group ) )\n\t\t\treturn $cache;\n\t\t\t\n\t\t$data = wp_remote_get( $url );\n\t\t\n\t\tif ( is_wp_error( $data ) )\n\t\t\twp_die( $data-> get_error_message() );\n\t\t\t\n\t\t$data = simplexml_load_string( wp_remote_retrieve_body( $data ) );\n\t\t\n\t\t//parse the data into raw, daily and cumulative counts, store as public var\n\t\t$this->data[ $slug ]['raw'] = $data;\n\t\t$this->parse_daily( $slug );\n\t\t$this->parse_cumulative( $slug );\n\t\t\n\t\t//can't serialize simplexml obj\n\t\tunset( $this->data[ $slug ]['raw'] );\n\n\t\twp_cache_set( $slug, $this->data[ $slug ], $this->cache_group, $this->ttl );\n\t\t\n\t\treturn $this->data[ $slug ];\n\t\n\t}", "title": "" }, { "docid": "77d16c09864b3a93f70b1cf854196e36", "score": "0.47978112", "text": "function ovacrs_get_price_type( $post_id ){\n return get_post_meta( $post_id, 'ovacrs_price_type', true ) ;\n}", "title": "" }, { "docid": "8bdfa640193def598e657484f332e3ec", "score": "0.478979", "text": "public function get_template() {\n\t\tif (is_string($this->data) || count($this->data) > 1) return $this->metadata['s_template'];\n\t\telse return $this->metadata['pl_template'];\n\t}", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.47779885", "text": "abstract protected function _get();", "title": "" }, { "docid": "a9afeeba3930acf077022a627994e20e", "score": "0.4774185", "text": "public function get_template($key=NULL) {\n\t}", "title": "" }, { "docid": "d06e9a4539fd061c1b84d15b88adc0cb", "score": "0.47713697", "text": "abstract public function _fetchObject();", "title": "" }, { "docid": "67459045182d9f68049f712fac6ecec7", "score": "0.47668952", "text": "public function fetch($id)\n {\n // use class to get single and store\n }", "title": "" }, { "docid": "ea6d6acb735036e9db825bf8877aed33", "score": "0.47655004", "text": "abstract public function loadTemplate();", "title": "" }, { "docid": "3e547c6cb08fe01b75ebc8947b2d8056", "score": "0.47616154", "text": "function get_data($sth) { return $this->d($sth); }", "title": "" }, { "docid": "fdbd5f5cf605697b38e732f45c8c44aa", "score": "0.47594213", "text": "protected function _getTemplateModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Template');\n\t}", "title": "" }, { "docid": "b547a65b537b8da67f04ffd91a236b58", "score": "0.4756845", "text": "function template_rawdata()\n{\n\tglobal $context;\n\n\techo $context['raw_data'];\n}", "title": "" }, { "docid": "7ee476baff66d2df1a41ba14926357ba", "score": "0.47553393", "text": "final public function SmartyClientFetch($template, $fallback = null) {\r\n $this->SmartyHeaders();\r\n $tpl = $this->SmartyResource($template);\r\n $fb = $this->SmartyResource($fallback);\r\n if (!$this->smarty->templateExists($tpl) && $this->smarty->templateExists($fb)) $tpl = $fb;\r\n return $this->smarty->fetch($tpl);\r\n }", "title": "" }, { "docid": "49c277e124ca9f2a553f2731e9f8bb4e", "score": "0.47513756", "text": "public function fetch($template = null)\n{\n\tob_start();\n\tif ($this->parse($template) === false)\n\t{\n\t\tif (ob_get_level() > 0)\n\t\t{\n\t\t\tob_end_clean();\n\t\t}\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn (ob_get_level() > 0) ? ob_get_clean() : false;\n\t}\n}", "title": "" }, { "docid": "32792d678997d9548a308c721008f8d9", "score": "0.475047", "text": "function portfolio_single( $template ) {\r\n\t\tglobal $post;\r\n\r\n\t\tif ( $post->post_type == 'saaspik_portfolio' ) {\r\n\t\t\t$template = SAASPIK_ADDONCE_DIR . 'inc/post-type/portfolio/views/single.php';\r\n\t\t}\r\n\t\treturn $template;\r\n\t}", "title": "" }, { "docid": "547a8deb0186dcddea23afd2543fc44f", "score": "0.47485915", "text": "function singleView() {\n\n\t\t$this->recordtemplate = $this->cObj->getSubpart(\n\t\t\t$this->template,\n\t\t\t'###RECORD_SINGLE###'\n\t\t);\n\n\t\t$record = $this->fetchLocalized(FALSE, '*', 'tx_multicatalog_product', 'uid = ' . intval($this->piVars['uid']) . $this->cObj->enableFields('tx_multicatalog_product'));\n\t\t$content = $this->renderRecord($record, $this->getFieldsConf('product'), $this->recordtemplate);\n\t\treturn $content;\n\n\t}", "title": "" }, { "docid": "aa42c9a0725975976a2ddca952e99b0f", "score": "0.4743784", "text": "abstract protected function getTemplateContents();", "title": "" }, { "docid": "dd6861695a12f647c6e0338a4f887d69", "score": "0.47403806", "text": "public function getTemplate () {\n\t\treturn $this->get('template', $this->template);\n\t}", "title": "" }, { "docid": "e1df67f85f565cdb973b2ea85ed16e5b", "score": "0.47396672", "text": "function ovacrs_get_price_day( $post_id ){\n return wc_price( get_post_meta( $post_id, '_regular_price', true ) );\n}", "title": "" }, { "docid": "4f5cb2823e225085e654db1e6f210fde", "score": "0.4726132", "text": "function cpt_dokumentReferenz_columns_content($column_name, $post_ID) {\n global $post;\n switch($column_name)\n {\n case 'image':\n $post_thumbnail_id = get_post_thumbnail_id($post_ID);\n if ($post_thumbnail_id) \n {\n $post_thumbnail_img = wp_get_attachment_image_src( $post_thumbnail_id, 'thumbnail' );\n echo '<img width=\"180\" src=\"' . $post_thumbnail_img[0] . '\" />';\n }\n break;\n case 'kurzbeschreibung':\n $custom = get_post_custom();\n echo $custom['kurzbeschreibung'][0];\n break;\n }\n \n}", "title": "" }, { "docid": "61d9368a014886269e9f46859b59eab9", "score": "0.47219324", "text": "public function fetch($template, array $data = [])\n {\n if (isset($data['template'])) {\n throw new \\InvalidArgumentException('Duplicate template key found');\n }\n\n $path = $this->templatePath . ltrim($template, '/\\\\');\n\n if (!is_file($path)) {\n throw new \\RuntimeException(\"View cannot render `$template` because the template does not exist\");\n }\n\n $data = array_merge($this->attributes, $data);\n\n return $this->adaptee->render($path, $data);\n }", "title": "" }, { "docid": "7237241153c31e2fb3a325920f287e3a", "score": "0.472144", "text": "public abstract function get();", "title": "" }, { "docid": "7237241153c31e2fb3a325920f287e3a", "score": "0.472144", "text": "public abstract function get();", "title": "" }, { "docid": "5f76b57f5c4f14a0257bbbd56ab73310", "score": "0.4716207", "text": "public function fetchEmailTemplate()\n {\n if (null !== $this->owner) {\n $this->_template = $this->_repository->getByKeyWithTranslation(\n $this->generateKey(),\n $this->owner->{$this->_languageAttribute}\n );\n } else {\n $this->_template = $this->_repository->create();\n }\n }", "title": "" }, { "docid": "f2b60d29cf99262bc9f37e873fd4a704", "score": "0.4698198", "text": "public function price($post);", "title": "" }, { "docid": "7fc2f3839a83b3f25d1496249811735e", "score": "0.4694565", "text": "private function getTemplate($template)\n\t{\n\t\t$template = config(\"imagecache.templates.{$template}\");\n\n\t\tswitch(true) {\n\t\t\t// closure template found\n\t\t\tcase is_callable($template):\n\t\t\t\treturn $template;\n\n\t\t\t// filter template found\n\t\t\tcase class_exists($template):\n\t\t\t\treturn new $template;\n\n\t\t\tdefault:\n\t\t\t\t// template not found\n\t\t\t\tabort(404);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "14b86ef867f61554c1a39a0ba289a21c", "score": "0.46918693", "text": "function pixelgrade_get_template_part_html( $template_slug, $template_path = '', $args = array(), $template_name = '', $default_path = '' ) {\n\t\tob_start();\n\t\tpixelgrade_get_template_part( $template_slug, $template_path, $args, $template_name, $default_path );\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "91a83b6d5847851fa8d12c1c9f95c958", "score": "0.4690354", "text": "public function getCustom();", "title": "" }, { "docid": "91a83b6d5847851fa8d12c1c9f95c958", "score": "0.4690354", "text": "public function getCustom();", "title": "" }, { "docid": "91a83b6d5847851fa8d12c1c9f95c958", "score": "0.4690354", "text": "public function getCustom();", "title": "" } ]
f4b81da7fd59c411dad780dcaeb940eb
Display a listing of the Cliente.
[ { "docid": "6b2372825bbd39c6636f1004c06031ef", "score": "0.0", "text": "public function index(Request $request)\n {\n $this->clienteRepository->pushCriteria(new RequestCriteria($request));\n $clientes = $this->clienteRepository->all();\n\n return view('admin.clientes.index')\n ->with('clientes', $clientes);\n }", "title": "" } ]
[ { "docid": "29be0548af0b7f0eb6f3cb2aee267dfa", "score": "0.8102034", "text": "public function list_client() {\n\n $clients = $this->clientDao->findAll();\n\n $this->content->addHtmlElement(new TwigTemplate($this->twig, 'views/list_client/list_client.twig',\n array(\n 'clients' => $clients\n )\n ));\n $this->template->toHtml();\n }", "title": "" }, { "docid": "354cf8b9f1c0f88f56e591dfc84e5f1a", "score": "0.74936503", "text": "public function list(){\r\n \t echo $this->Clients->list();\r\n\t}", "title": "" }, { "docid": "7164b1800886503f97fe12b4f6d95df0", "score": "0.7493283", "text": "public function show(clientes $clientes)\n {\n \n }", "title": "" }, { "docid": "dc65fd91665f8e53c9682fc96e90be8b", "score": "0.7421305", "text": "public function show(clientes $clientes)\n {\n //\n }", "title": "" }, { "docid": "4bd289918ac2c39364261414dfe7b14b", "score": "0.7366484", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArthurHoaroRssCruncherClientBundle:Client')->findAll();\n\n return $this->render(\n '@ArthurHoaroRssCruncherClient/Client/index.html.twig',\n ['entities' => $entities]\n );\n }", "title": "" }, { "docid": "0ec91b96587ed92939cfdecab8ae99b6", "score": "0.7349863", "text": "public function index()\n {\n $clientes = Cliente::get();\n //Retornando para a View e enviando os dados\n return view('clientes/lista', ['clientes' => $clientes]);\n }", "title": "" }, { "docid": "58891d7b2829e9f22711498e2ae68d20", "score": "0.73260343", "text": "public function indexAction()\n {\n $this->view->clientPagerName = 'client-page';\n $this->view->relationship = $this->_getParam('relation', 'Customer');\n $this->view->clientLetters = $this->clientService->getClientTitleLetters($this->view->relationship);\n\n $currentLetter = ifset($this->_getAllParams(), $this->view->clientPagerName, ifset($this->view->clientLetters, 0, 'A'));\n \n $obj = new Client();\n $this->view->relationships = $obj->constraints['relationship']->getValues();\n \n if ($this->view->relationship == \"ALL\") {\n \t$this->view->clients = $this->clientService->getClients(array('title like '=>$currentLetter.'%'), 'title asc'); // , $currentPage, za()->getConfig('project_list_size'));\n }else{\n \t$this->view->clients = $this->clientService->getClients(array('relationship='=>$this->view->relationship, 'title like '=>$currentLetter.'%'), 'title asc'); // , $currentPage, za()->getConfig('project_list_size'));\n }\n\t\tif ($this->_getParam('_ajax')) {\n\t\t\t$this->renderRawView('client/list.php');\n\t\t} else {\n\t\t\t$this->renderView('client/list.php');\n\t\t}\n \n }", "title": "" }, { "docid": "a9559508211a35228277d5a85ed322dd", "score": "0.7316928", "text": "public function index()\n\t{\n//\t\t$clients = $this->client->all();\n\n $query = \\Request::get('q');\n\n $clients = $query\n ? $this->client->search($query)->paginate(5)\n : $this->client->paginate(5);\n\n\t\treturn \\View::make('admin.clients.index', compact('clients'));\n\t}", "title": "" }, { "docid": "52a7f08853803cb12ed72feb5fe51aee", "score": "0.7316226", "text": "public function show(Clientes $clientes)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d86c5f06ad4bb5968ff617a9445e20e0", "score": "0.72726285", "text": "public function actionIndex()\n {\n $searchModel = new ClienteSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "d86c5f06ad4bb5968ff617a9445e20e0", "score": "0.72726285", "text": "public function actionIndex()\n {\n $searchModel = new ClienteSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "77b3934f961bc383ed427c7916dcf6c1", "score": "0.72209895", "text": "function index(){\r\n\t\t$this->set(\"clientes\", $this->Clientes->All());\r\n\t}", "title": "" }, { "docid": "9762d1f12cfb05c4236f1fbe9aeb60a5", "score": "0.7213121", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n// $em->getFilters()->disable('softdeleteable');\n $clients = $em->getRepository('AppBundle:Client')->findAllOrderByLastname();\n\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n ));\n }", "title": "" }, { "docid": "f1c94449988c898d2591c2a89eedb57e", "score": "0.7201279", "text": "public function index()\n {\n $clientes = $this->clientes->all();\n\n return view('clientes::admin.clientes.index', compact('clientes'));\n }", "title": "" }, { "docid": "c6ed442c6ebf032fe3036194ea041ace", "score": "0.71667635", "text": "public function index()\n {\n //\n $user = Auth::user();\n $clientes = Cliente::where('electricista_id', $user->id)->get();\n\n return Inertia::render('Clientes',[\n 'clientes' => $clientes\n ]);\n }", "title": "" }, { "docid": "0128b285a329ec175b72b9b44b536d33", "score": "0.7165219", "text": "public function index() {\r\n $page_data['all_client'] = $this->client_model->get_all_client();\r\n backend_page_view('index', 'Client', 'client', $page_data);\r\n }", "title": "" }, { "docid": "ba76064d7adbcdb9a7e1f2d5d6f1226f", "score": "0.7146112", "text": "public function index()\n {\n return view('layouts.backoffice.clients.clients')->with('clients', Client::all());\n }", "title": "" }, { "docid": "a296c09e5f8531f36f4d4d86f58c4435", "score": "0.7142559", "text": "public function index()\n {\n $clientes = Cliente::paginate(4);\n $data = [\n 'titulo'=>\"Clientes\",\n 'menu'=>\"Clientes\",\n 'submenu'=>\"Listar\",\n 'tipo'=>\"view\",\n 'getClientes'=>$clientes\n ];\n\n return view(\"cliente.list\", $data);\n }", "title": "" }, { "docid": "3048d1cbd71f473e7c3a72b59352a92e", "score": "0.71258324", "text": "public function lists(){\n $title=\"clients\";\n $clients=Client::get();\n return view('backend.clients-list',compact('title','clients'));\n }", "title": "" }, { "docid": "559a56d4439e92b1b5267f1c9cd74869", "score": "0.7102242", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $clientes = $em->getRepository('AppBundle:Cliente')->findAll();\n\n return $this->render('cliente/index.html.twig', array(\n 'clientes' => $clientes,\n ));\n }", "title": "" }, { "docid": "c1ad965aecec6007f92e4d8486702db6", "score": "0.71015537", "text": "public function index()\n {\n $clients = Client::with('isDeleted')->paginate(20);\n return view('dashboard.client.clientList', ['clients' => $clients]);\n }", "title": "" }, { "docid": "7d7e3c092de43ff966dfa194bf99be7c", "score": "0.70991176", "text": "public function index()\n {\n //\n\n $clients = Client::paginate(5);\n\n return view('admin.clients.index', compact('clients'));\n }", "title": "" }, { "docid": "4445a6fa34e7fc2499456615460b2556", "score": "0.70894444", "text": "public function index()\n {\n $clientes = Clientes::paginate(10);\n return view('clientes.index',compact('clientes'));\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.70824164", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "fbeb130c8eeb567e7fad3c7305600c0c", "score": "0.7064848", "text": "public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "6014e7032a00cbdcb94654039be306ad", "score": "0.7057739", "text": "public function listClientAction() {\n\t\t$personModel = new PersonModel($this->conexion);\n\n\t\t$title = 'Ver lista de usuario';\n\t\t$_SESSION['MENU'] = Constants::$MENU_SELECTED_USER;\n\n\t\t$this->breadCrumbs->insertBread('', 'Usuarios');\n\t\t$this->breadCrumbs->insertBread('profile/list/', 'Editar Cuentas de usuario');\n\n\t\tif(isset($_POST['searchUser'])) {\n\t\t\t$searchUser = $_POST['searchUser'];\n\t\t\t$person = $personModel->getPerson($searchUser);\n\t\t\tif($person[0]['ID_PERSON']>0) {//si existe la persona direccionar al perfil de la person buscada\n\t\t\t\theader('Location: '.Helper::base().'profile/edit/'.$person[0]['EMAIL_PERSON']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->setMesaje('warning', 'Usuario '.$searchUser.'no encontrado');\n\t\t\t}\n\t\t}\n\t\t$listPerson = $personModel->getListPersonRol(3);;//lista de clientes\n\n\t\treturn new View('profilePanel', $title, $this->breadCrumbs->getBreads(), $this->mesaje, compact('searchUser', 'listPerson'));\n\t}", "title": "" }, { "docid": "78b218f8df5d731e9295fbff04995414", "score": "0.7048846", "text": "public function index()\n\t{\n $clients = $this->client->all();\n\t\treturn view('clients.index', compact('clients'));\n\t}", "title": "" }, { "docid": "5702a714f68fc5d197846acd1eb83ca1", "score": "0.7046001", "text": "public function index()\n {\n $clientes = Cliente::orderBy('id', 'DESC')->paginate(5);\n $num = 1;\n\n return view('listarClientes', compact('clientes', 'num'));\n }", "title": "" }, { "docid": "6b54ecd823019fa0b70103083273d512", "score": "0.70445246", "text": "public function index() {\n $client = Client::all();\n return view('adminlte.clients.client', compact('client'));\n }", "title": "" }, { "docid": "cacd5de8f36f472a75d6bbea456a348b", "score": "0.70434755", "text": "public function index()\n {\n $clientes = Client::all();\n\n return view('admin.clientes.index', ['clientes' => $clientes]);\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "82a5776039bdb395ebbf9f597db7b681", "score": "0.7016443", "text": "public function show(Cliente $cliente)\n {\n //\n }", "title": "" }, { "docid": "874a54efb3db928475a4c8469706397a", "score": "0.70121294", "text": "public function index() {\n $data = array();\n\n //busca todos os clientes \n $clientes = $this->Clientes_model->findAll();\n\n $data['view'] = 'app/clientes/list';\n $data['url'] = 'clientes';\n $data['clientes'] = $clientes;\n $this->load->view('index', $data);\n }", "title": "" }, { "docid": "500a3770b293b6462ee4598efd9c329f", "score": "0.7008666", "text": "public function index()\n {\n $clientes= Cliente::latest()->paginate(3);\n\n //retornamos a la vista index de clientes q se encuentra en la carpeta resouce view administrador clientes\n //con el metodo compact enviamos los datos de la variable clientes\n return view('administrador.clientes.index', compact('clientes'));\n }", "title": "" }, { "docid": "2d376e879632cd40ab3f7ccd1722d247", "score": "0.6984465", "text": "public function index()\n\t{\n\t\t$cliente = $this->cliente->all();\n\t\treturn View::make('clientes.index')->with('cliente', $cliente);\n\n\t}", "title": "" }, { "docid": "c85808dad6ffbf0150e37e6bdf239156", "score": "0.6972988", "text": "public function index()\n {\n $clients = Client::latest('created_at')->paginate(10);\n\n return view('clients.index', compact('clients'));\n\n }", "title": "" }, { "docid": "d1e9dc8f76d93a36d066044d695dc7c8", "score": "0.6971201", "text": "public function index()\n {\n $records = Client::paginate(20);\n return view('admin.clients.index', compact('records'));\n }", "title": "" }, { "docid": "899437a0b79372059b08766a8b4a2c2c", "score": "0.6950136", "text": "public function listClients() {\n\t\t// $this->isLoggedIn();\n\t\t$this->loadModel('Client');\n\t\t$this->Client->recursive = 0;\n\t\t// debug($this->paginate('Client'));\n\t\t$this->set('clients', $this->paginate('Client'));\n\t}", "title": "" }, { "docid": "36cabaeddeadf3b2753c80164bdef88d", "score": "0.6946903", "text": "public function clientsAction()\n {\n $this->view->headTitle('Clientes - ');\n $this->view->inlineScript()->appendFile('/js/client/search.js');\n \n $cliente = new Application_Model_Client();\n\n $resp = $cliente->buscar('client',\"type\");\n\n $this->view->data = $resp;\n }", "title": "" }, { "docid": "a19fcb85e0f45323e361cd697346771d", "score": "0.69414294", "text": "public function ListadoClientes(){\n\n\t\t$Empresa = new Empresa();\n\t\t$clientes = $Empresa->getListadoContactos();\n\t\t\n\t\treturn View::make('mantenedor.listadoClientes', array('clientes' => $clientes));\n\t}", "title": "" }, { "docid": "70d725355e4526d972a58190186d1c40", "score": "0.69384825", "text": "public function index()\n {\n $clients = Clients::orderBy('sort')->get();\n return view('clients.index', compact('clients'));\n }", "title": "" }, { "docid": "3117dec6768c553bc7065d1e1c1f00a1", "score": "0.6936575", "text": "public function index()\n {\n $clients = Client::orderBy('client_name', 'asc')->get();\n return view('clients.index', compact('clients'));\n }", "title": "" }, { "docid": "709cbb3be201bb9d31d3c6fe23f59049", "score": "0.69286716", "text": "public function index()\n {\n return view('clients.index', [\n 'clients' => Client::latest('id')->get()\n ]);\n }", "title": "" }, { "docid": "13fec7c599536a688fe524f4a1648fed", "score": "0.6927813", "text": "public function index()\n\t{\n\t\t$time = Carbon::now();\n\t\t$clients = Client::orderBy('lname', 'asc')->get();\n\n\t\treturn view('clients.index', compact('clients', 'time'));\n\t}", "title": "" }, { "docid": "5ee9f1af167d76d98073eb93b4aaa806", "score": "0.6924748", "text": "public function index()\n {\n $clientes = Client::all();\n return view('clientes.index', compact('clientes'));\n }", "title": "" }, { "docid": "c2843441ccad5c672620f1c56a4ddc43", "score": "0.69148344", "text": "public function index()\n {\n //\n $clientes = Cliente::all();\n return view ('gastronomica/sombreros/clientes/cliente')->with('clientes', $clientes);\n }", "title": "" }, { "docid": "20852ecb768e803cb7b7c752901e4d68", "score": "0.68969625", "text": "public function getClientesAction() {\r\n $this->_helper->layout->disableLayout();\r\n $ModelClientes = new Admin_Model_Clientes();\r\n\r\n $consulta = $ModelClientes->ListarClientes();\r\n\r\n if ($consulta) {\r\n $resposta = $consulta;\r\n $resposta['total'] = count($consulta);\r\n $resposta['result'] = 'ok';\r\n } else {\r\n $resposta['result'] = 'failed';\r\n }\r\n $this->_helper->json($resposta);\r\n }", "title": "" }, { "docid": "50cf64bfd70677180306604f363046dd", "score": "0.6886425", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $contratCLients = $em->getRepository('AdminBundle:ContratClient')->findAll();\n\n return $this->render('AdminBundle:ContratClient:index.html.twig', array(\n 'contratClients' => $contratCLients,\n ));\n }", "title": "" }, { "docid": "7532d774314d0a47109034407db5bc1b", "score": "0.68854916", "text": "public function index()\r\n {\r\n $clients = $this->repository->all();\r\n return view('clients.index', compact('clients'));\r\n }", "title": "" }, { "docid": "9a87da984b80219dddb7754cf42c4742", "score": "0.6885133", "text": "public function index()\n {\n // $client = Clients::all();\n // return view ('clients.index', array('clients' => $client));\n }", "title": "" }, { "docid": "55b50aad64a14101c1da7b36036fc645", "score": "0.68638635", "text": "public function index()\n {\n $clients = Client::all();\n if ( Auth::user()->hasRole( 'loan_officer' ) ) {\n $clients = Auth::user()->clients;\n }\n return view('site.clients.index')->with(['clients' => $clients]);\n }", "title": "" }, { "docid": "56dbd059b48be11d5de3a6063bc631f6", "score": "0.6842188", "text": "public function index()\n {\n\n $client = User::select(\"*\")->orderBy(\"id\", \"desc\")->get();\n\n return view(\"admin.client.index\", compact(\"client\"));\n }", "title": "" }, { "docid": "c0be93661e292b96bbd368d439b6b299", "score": "0.6831975", "text": "public function show(clients $clients)\n {\n //\n }", "title": "" }, { "docid": "b4184132e943ccf5b3e08f6a291ccb0e", "score": "0.68309367", "text": "public function index()\n {\n if (!Gate::allows('client_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (!Gate::allows('client_delete')) {\n return abort(401);\n }\n $Clients = Client::onlyTrashed()->get();\n } else {\n $Clients = Client::all();\n }\n\n return view('backend.Clients.index', compact('Clients'));\n }", "title": "" }, { "docid": "66f13bcb707abc0657ba02eef6de2f18", "score": "0.682991", "text": "public function index()\n {\n $clients = Client::orderBy('id','DESC')->paginate(5);\n return view('clients.index', compact('clients'));\n }", "title": "" }, { "docid": "aa6092684db464ed5e4bbf85a09f8381", "score": "0.6829758", "text": "public function index()\n {\n $clientes = Cliente::paginate(2);\n return view('cliente.index',compact('clientes'));\n }", "title": "" }, { "docid": "f7db078f33484a2968671d1f536b8505", "score": "0.6811347", "text": "public function index()\n {\n $clientes = cliente::all();\n return view('admin.clientes.index', compact('clientes'));\n }", "title": "" }, { "docid": "24716f78fa1798ecee7344c0553e427b", "score": "0.67970765", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }", "title": "" }, { "docid": "4e33f41838774d0b577cc5af72de2487", "score": "0.6794325", "text": "public function index()\n {\n $tablacliente = clientes::paginate(3);\n return view('clientes.index',compact('tablacliente'));\n }", "title": "" }, { "docid": "18e79f452c750dcc20af703a84ad471a", "score": "0.678306", "text": "public function congesListeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Conge')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Super-Admin/DonneesSysteme/Conges:conges.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "7c9d2db9b22db6f7167cf906a0858f8d", "score": "0.67813605", "text": "public function index()\n {\n $clients = client::all();\n return view('client')->with('clients', $clients);\n }", "title": "" }, { "docid": "687a1a620162df3ddb42f97142347368", "score": "0.6772822", "text": "public function index()\n {\n return view('g.site.clientes.index');\n }", "title": "" }, { "docid": "b8e431390f5b67a5f72b6438249d3256", "score": "0.6772082", "text": "public function index()\n {\n $clients = Client::latest()->paginate(100);\n return view('client.index', compact('clients'))\n ->with('i', (request()->input('page',1) -1)*100);\n }", "title": "" }, { "docid": "53fe75739dd62806830a3cba004ac9a0", "score": "0.67714345", "text": "public function index()\n {\n $clientes = Cliente::all();\n return view('cliente', compact('clientes'));\n }", "title": "" }, { "docid": "cd872668bf30ce5de2a9828dd9c2db98", "score": "0.67685306", "text": "public function index()\n {\n $clients = Client::oldest()->get();\n return view('clients.index', compact('clients'));\n }", "title": "" }, { "docid": "40f3477b5f1528ee0bddf752cede61de", "score": "0.67627966", "text": "public function index()\n {\n $clients = Client::orderBy('name')->get();\n $states = State::orderBy('name')->get();\n $cities = City::orderBy('name')->get();\n $regions = Region::orderBy('name')->get();\n return view('admin.clients.index',compact('clients','states','cities','regions'));\n }", "title": "" }, { "docid": "c3e62fc32fa21b6ca5285b3b65987fd2", "score": "0.6762396", "text": "public function index()\n {\n $user = \\Auth::guard('admin')->user();\n if (!$user->can('client_list')) {\n abort(403, 'Unauthorized action.');\n }\n\n return view('admin.client.client');\n }", "title": "" }, { "docid": "f5737fe5518c0d5201bbf97b860bcde8", "score": "0.67595637", "text": "public function index()\n {\n //\n return Cliente::all();\n }", "title": "" }, { "docid": "850641cbafca6d99a1b577f97ce5d3f5", "score": "0.6756887", "text": "public function index()\n {\n $clients = Clients::paginate(7);\n return view('clients.index',\n [\n 'clients' => $clients,\n 'search' => '',\n ]);\n }", "title": "" }, { "docid": "5d4790f6f7f488acfc9930a23deffe56", "score": "0.6754539", "text": "public function index()\n {\n $clients = Client::latest()->paginate(20);\n \n return view('clients.index',compact('clients'))\n ->with('i', (request()->input('page', 1) - 1) * 20);\n\n }", "title": "" }, { "docid": "eb0c9fbaa880b8f772644c58697b3b60", "score": "0.6752304", "text": "public function index()\n {\n return view('adminuser.clientes.tablaClientes',['filas' => Cliente::all(),'titulo_tabla' => 'Clientes', 'descripcion_tabla' => '*Se puede filtrar por cualquier campo en el cuadro de busqueda']);\n }", "title": "" }, { "docid": "d308478297f1454ca7c2802e763313cf", "score": "0.67422605", "text": "public function index()\n {\n\t $data = Client::all();\n\t $this->page->response = $data->map( function ( $s ) {\n\t\t return [\n\t\t\t 'entity' => $this->entity,\n\t\t\t 'id' => $s->id,\n\t\t\t 'name' => $s->getShortName(),//Nome/Razão Social\n\t\t\t 'email' => $s->getShortEmail(),//Nome/Razão Social\n\t\t\t 'created_at' => $s->getCreatedAtFormatted(),\n\t\t\t 'created_at_time' => $s->getCreatedAtTime(),\n\t\t\t 'active' => $s->user->getActiveFullResponse()//Status\n\t\t ];\n\t } );\n\t return view( 'pages.clients.index' )\n\t\t ->with( 'Page', $this->page );\n }", "title": "" }, { "docid": "0bdc14be6b08cbafdc13137911d6f37c", "score": "0.6741439", "text": "public function index()\n {\n $records = Client::all();\n return view('clients.index' , compact('records'));\n //\n }", "title": "" }, { "docid": "2d6f14d2b9db2ab07e0cb68f93e499fd", "score": "0.673539", "text": "public function index()\n {\n $clients = DB::table('clients')->simplePaginate(10);\n\n $total = DB::table('clients')->count();\n\n return view('admin.index', compact('clients'), compact('total'))->with('status');\n }", "title": "" }, { "docid": "850f671fb2e0fa919f79020d089d3ccb", "score": "0.6731486", "text": "public function index()\n {\n $clientes = Cliente::orderBy('id', 'desc')->take(7)->get();\n return view('auth.cliente.index', compact('clientes'));\n }", "title": "" }, { "docid": "843961e1da258402f198aaba819ad79b", "score": "0.67297554", "text": "public function index()\n { \n return view('cliente.index', [\n 'clientes' => Cliente::get()\n ]);\n }", "title": "" }, { "docid": "cd07434f297afa10a87b1e0c88d26136", "score": "0.6726146", "text": "public function actionIndex()\n {\n $searchModel = new ClientsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "9a9ea5bfe178227e81e129b8cb3ff685", "score": "0.6720651", "text": "public function index()\n {\n $clientes = Cliente::where('activo',true)->get();\n return view('admin.cliente.index', compact('clientes'));\n }", "title": "" }, { "docid": "28c4f079c46627b6952f0131ed25c10f", "score": "0.6718609", "text": "public function actionIndex()\n {\n $searchModel = new ClientsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "65c660f4357eec9f440d3ded8c8675aa", "score": "0.67130625", "text": "public function index()\n {\n if (! Gate::allows('all')) {\n return abort(401);\n }\n $clients = Client::with('user')->get();\n $letters = Client::all(['name'])->map(function(Client $client){\n return strtoupper(substr($client->name, 0, 1));\n })->unique()->sortBy('name');\n return view('clients.index', compact('clients', 'letters'));\n }", "title": "" }, { "docid": "f62a6873a67daf80384bc10fd2f4d16e", "score": "0.6712774", "text": "public function index()\n {\n $clients = Client::with('projects')->orderBy('created_at', 'DESC')->get();\n return view('admin.view_client',compact('clients'));\n }", "title": "" }, { "docid": "53f230388814ce8582184033e576d845", "score": "0.67117786", "text": "public function index()\n\n\t{\t\n\t\t$dataFromModel = new MSClients();\n\t\t$config = $this->listBladeData();\n\t\t$config['tableName'] = $dataFromModel->getTableName();\n\t\t$config['list'] = MSClients::get()->toArray();\n\t\t$config['ignore'] = ['created_at', 'updated_at', 'deleted_at', 'id', 'count'];\n\n\t\tif($config['list'] == null )\n\t {\n\t \treturn redirect()->route('app.clients.create');\n\t }\n\n\t\treturn view('partials.listIndex', $config);\n\t}", "title": "" }, { "docid": "8ae1e23d9e262dfe819458252f39fc65", "score": "0.6711487", "text": "public function index()\n\t{\n\t\tif(!$this->autorizado) return Redirect::to('admin/login');\n\t\t$clientes = Cliente::all();\n\t\treturn View::make('admin.clientes.index', array('clientes' => $clientes));\n\t}", "title": "" }, { "docid": "b71a635469721908bde5f36512e33040", "score": "0.67041117", "text": "public function index()\n {\n $clientes = Cliente::orderBy('idcliente','DESC')->get();\n \treturn view ('gerente.clientes.ver_clientes',compact('clientes'));\n }", "title": "" }, { "docid": "e508f26cee6b6110b5e315b37bf01715", "score": "0.6700902", "text": "public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "c11d55ce36b9b6bf39c0094bfe5d0fd7", "score": "0.66921216", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "e533587355232158e7f7fcc949daf969", "score": "0.66890293", "text": "public function index()\n {\n $clients = User::with('contacts')->get();\n\n return view('client.index',compact('clients'));\n }", "title": "" }, { "docid": "29f83f68b1d46d0798fda83450230fac", "score": "0.6686725", "text": "public function index()\n {\n $clientes= Cliente::buscar($request->get('dato'))->orderBy('id','ASC')->paginate(10);\n return view('admin.clientes.index')->with('clientes',$clientes);\n }", "title": "" }, { "docid": "d5c3c24557d1d7b9a9dfe270d49f722a", "score": "0.66740495", "text": "public function index()\n\t{\n\t\t$clients = Client::all();\n\t\t$header='Clients';\n\t\t$description='Current Clients';\n\n\t\tif (! Entrust::can('view_client') ) // Checks the current user\n {\n return Redirect::to('/')->with('notice', 'you do not have access to this resource. Contact your system admin');\n }else{\n\n Audit::logaudit('Clients', 'viewed clients', 'viewed clients in the system');\n\n\t\treturn view('clients.index', compact('clients','header','description'));\n\t}\n\t}", "title": "" }, { "docid": "55c949d0ade0cb66be169ca791a8e20c", "score": "0.66737545", "text": "public function index()\n {\n return view('clients');\n }", "title": "" }, { "docid": "afec047f014891a095aab9fd0045bb41", "score": "0.6673047", "text": "public function index()\n {\n $title=\"clients\";\n $clients=Client::get();\n return view('backend.clients',compact('title','clients'));\n }", "title": "" }, { "docid": "18e0b3b75460948d6553430a936a9225", "score": "0.66710603", "text": "public function getClients() {\r\n $clients = Client::all();\r\n\r\n AnonymousController::header();\r\n Controller::$app->render('clients/clients.php', array('clients' => $clients));\r\n //AnonymousController::modals();\r\n AnonymousController::footer();\r\n\r\n }", "title": "" }, { "docid": "53bfc1e60bf369be83a2dbb46ef4dd1d", "score": "0.66703624", "text": "public function index()\n {\n return view('cliente.lista');\n }", "title": "" }, { "docid": "95dea30559cc49df1eecc6c1a6dd0b58", "score": "0.66654164", "text": "public function index()\n {\n $aux = new Cliente();\n $this->authorize('view', $aux);\n $clientes = Cliente::orderBy('nombre', 'asc')->get();\n $estados = Cliente::ESTADO;\n return view('cliente.index')\n ->with('clientes', $clientes)\n ->with('estados', $estados)\n ->with('aux', $aux);\n }", "title": "" }, { "docid": "8b49299a4b03769a59822208a7080dfc", "score": "0.6663393", "text": "public function index()\n {\n $clients = Client::all();\n return View::make('client.index')->with('clients', $clients);\n }", "title": "" }, { "docid": "2f6fe27c0139c47af68727f255dd95a7", "score": "0.66594875", "text": "public function adminIndex ()\n {\n $config = [\n 'title' => trans('Rivile::rivile_clients.page_title'),\n 'listURL' => route('admin.api.routes.rivile.clients'),\n 'newFormUrl' => route('admin.api.form-manager', ['rivile-clients-new']),\n 'editFormUrl' => route('admin.api.form-manager', ['rivile-clients-edit']),\n 'imagesUrl' => route('resource.get', ['/']),\n 'headers' => $this->getAdminListHeader(),\n ];\n\n if (auth()->user()->can('interactivesolutions_rivile_routes_rivile_clients_create'))\n $config['actions'][] = 'new';\n\n if (auth()->user()->can('interactivesolutions_rivile_routes_rivile_clients_update')) {\n $config['actions'][] = 'update';\n $config['actions'][] = 'restore';\n }\n\n if (auth()->user()->can('interactivesolutions_rivile_routes_rivile_clients_delete'))\n $config['actions'][] = 'delete';\n\n $config['actions'][] = 'search';\n $config['filters'] = $this->getFilters();\n $config['popUpLabel'] = 'N08_PAV';\n\n return hcview('HCCoreUI::admin.content.list', ['config' => $config]);\n }", "title": "" }, { "docid": "10d9740450917f33309c9d79e03f232d", "score": "0.66574854", "text": "public function index()\n {\n $clients = Client::All();\n\n return view('client.index', [\"clients\" => $clients]);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a632488de2b52d986a17dfa8a6179fa6", "score": "0.0", "text": "public function index(){\n if ($id = \\request('segment')){\n $segment = Segment::with('segment_logics')->findOrFail($id);\n $subscribers = Subscriber::where(function ($query) use ($segment){\n $this->conditionalQuery($segment, $query);\n })->get();\n }else{\n $subscribers = Subscriber::all();\n }\n return view('subscriber', compact('subscribers'));\n }", "title": "" } ]
[ { "docid": "1d384f4e78f98647387c1b7298b0696a", "score": "0.74735427", "text": "public function index ()\n {\n $this->list();\n }", "title": "" }, { "docid": "4bed8c9cfd05d9666f1acd8791970421", "score": "0.74595845", "text": "public function index()\n {\n /** @var \\Colibri\\Database\\ModelCollection $items */\n $items = new $this->listClass();\n $this->applyListFilters($items);\n $items->load();\n\n $this->template->vars[$this->listTplVar] = $items;\n if ($this->pagedList) {\n $this->template->vars['pagination'] = [\n 'page' => (int)(isset($_GET['page']) ? $_GET['page'] : 0),\n 'recordsPerPage' => $items->recordsPerPage,\n 'recordsCount' => $items->recordsCount,\n 'pagesCount' => $items->pagesCount,\n 'base_url' => '/' . $this->division . '/' . $this->module,\n ];\n }\n }", "title": "" }, { "docid": "fd728130e464c7ca0e936873b067ad9b", "score": "0.74557644", "text": "public function index()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\n $select = ['id'];\n $eagerLoad = [];\n foreach($resource->fields as $field)\n {\n if($field->list) $select[] = $field->slug;\n\n if($field->type == 'relational')\n {\n $eagerLoad[] = $field->data('method');\n }\n }\n\n $model = $this->getModel($resource);\n $entities = $model::with($eagerLoad)->select($select)->get();\n\n $hasObjects = false;\n if(method_exists($model, 'objects')) $hasObjects = true;\n\n return view('laramanager::resource.index', compact('resource', 'entities', 'hasObjects'));\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "53e8cdd7001e03b480caa697d00c6da2", "score": "0.73947984", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "c66f120116ada3a42cc9932c701e6a9d", "score": "0.7343025", "text": "public function listAction()\n {\n $bookRepository = new BookRepository();\n $books = $bookRepository->getAll();\n\n $argsArray = [\n 'books' => $books\n ];\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "f89eac18f2fecb9e12a4e0696258300d", "score": "0.7321151", "text": "public function listing()\n {\n return $this->render(\"listing.html.twig\");\n }", "title": "" }, { "docid": "27e6e4cef6757eab4dd656d684b1f18f", "score": "0.729922", "text": "public function index()\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->getAll($this->_getListOrder(), $this->_getQueryConditions());\n }\n\n return view('admin.' . $this->resource . '.index')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eb8bf6d357654d40e9f3c6be964ff840", "score": "0.72384673", "text": "public function index()\n {\n $data = $this->model->all();\n return view('admin::resource.index', [\n 'items' => $data,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "1a9358d5e70acc9743aa95c2f18698aa", "score": "0.7216698", "text": "public function listAction()\n {\n $this->View()->assign(\n $this->getList(\n $this->Request()->getParam('start', 0),\n $this->Request()->getParam('limit', 20),\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('filter', []),\n $this->Request()->getParams()\n )\n );\n }", "title": "" }, { "docid": "09297f1ea9fe181abebbfadcb8142222", "score": "0.7186935", "text": "public function index(){\n $this->listItems();\n }", "title": "" }, { "docid": "ecc2dbc48848a139f5406206edda7fd6", "score": "0.70593506", "text": "function seeAll() {\n $results = array();\n $data = Resource::getList();\n $results['resources'] = $data['results'];\n $results['totalRows'] = $data['totalRows'];\n $results['pageTitle'] = \"Resource Archive | Couch To Code\";\n require( $TEMPLATE_PATH . \"/archive.php\" );\n}", "title": "" }, { "docid": "1e170838915eaf18af92a3ce754576f4", "score": "0.70549136", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", 'like', \"%$filter%\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "1bc9d0eeecbb5965922934931cecd66c", "score": "0.7042268", "text": "public function index()\n { \n //Get entries\n $entries = Entry::paginate(10);\n \n //Return collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "d64ddf4f7bf215d8ac46dc7bbfb1a5eb", "score": "0.70275784", "text": "public function listAction()\n {\n $this->_useAdditionalContent = true;\n \t\n \t$dataType = $this->_request->getParam('dataType');\n if($dataType == 'data'){\n \t// Abstract route\n \tthrow new Lib_Exception(\"dataType 'data' not allowed for listAction\");\n }\n $page = $this->_getParam('page', 1);\n $result = Data_Utils::getList($this->_user, $this->_acl, $dataType, $page);\n $items = $this->_paginateData($result['select'], $page, $result['itemsPerPage']);\n\n if(count($items)){\n \t$item = $items->getIterator()->current();\n } else {\n \t$table = ucfirst($dataType);\n \t$table = new $table();\n \t$item = $table->fetchNew();\n }\n Zend_Registry::set('Category', $item->getCategory());\n Zend_Registry::set('SubCategory', $item->getSubCategory());\n\n $this->_helper->layout->setLayout($item->getLayout(Data::ACTION_LIST));\n\n $this->view->items = $items;\n $this->view->dataType = $dataType;\n $this->view->separateFirstContentCardHeader = true;\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "42bf79f7c36bcd7921da4ede6d5056e2", "score": "0.69541866", "text": "public function lists()\n\t{\n\t\t$pics = Picture::all();\n\t\treturn view('default.rc.resources.lists')->with('pics', $pics);\n\t}", "title": "" }, { "docid": "673459c7290880615c394e798a3f1a65", "score": "0.69069874", "text": "public function index()\n {\n return ReadingListResource::collection(ReadingList::all());\n }", "title": "" }, { "docid": "11b3547fc126f6093eb0a2e7e0aef2eb", "score": "0.68977946", "text": "public function listAction()\n {\n $pages = \\Page\\Model\\Page::find();\n $filter = new \\Api\\Filter\\PagesList();\n $payload = new \\Api\\Model\\Payload($filter->filter($pages));\n\n return $this->render($payload);\n }", "title": "" }, { "docid": "76af57d44f9f03d2c164c16d1a203b35", "score": "0.68751", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "d5424d838a7b9b5f2347c4e6d78a4dae", "score": "0.6867298", "text": "public function indexAction()\n\t{\n\t\t$page = $this->getRequest()->getParam('page');\n\n\t\t$resources = Application_Model_Document_Resource::all();\n\t\t// Store the resources in the view so it can render them with partials\n\t\t$this->view->resources = $resources;\n\t\tforeach($resources as $resource) {\n\t\t\t$array[] = $resource;\n\t\t}\n\t\t$paginator = Zend_Paginator::factory($array);\n\t\t$paginator->setCurrentPageNumber(intval($page));\n\t\t$paginator->setItemCountPerPage(8);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "1a97cf3e4d924e503cce423b0ca0da55", "score": "0.6864841", "text": "public function listAction()\n\t{\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\t\t\t\t\n\t\t\n\t\t$paginator = $this->_getPagedData();\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\t\t\n\t\t$this->_model->setRelationships($records);\t\t\n\n\t\t$html = new Fgsl_Html();\t\t\n\t\t$this->_table = $html->createTable($records);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->view->render('list.phtml');\n\t}", "title": "" }, { "docid": "ae4b114ffb14ab57ea0164b2b2a1e2a9", "score": "0.6854672", "text": "public function listing()\n {\n $mode = Input::get('mode') ?: \"search\";\n\n switch ($mode) {\n case 'roots':\n $roots = $this->listRootNodes();\n return response()->json(['data' => $roots]);\n case 'search':\n $page = Input::get('page')?: 1;\n $pageInfoArray = $this->listPage($page);\n return response()->json($pageInfoArray);\n default:\n return response()->json(['message' => 'Invalid search mode', 'errors' => array()])\n ->setStatusCode(400, '');\n }\n }", "title": "" }, { "docid": "b446e47526e7914ef4bdc3737ae4f077", "score": "0.68438184", "text": "public function list(){\n\t\t$this->load->view('listing');\n\t}", "title": "" }, { "docid": "761494348df8b3750a8a88c51e0b7195", "score": "0.68372846", "text": "public function actionList()\n {\n if(!in_array('list',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n $this->render(Yii::app()->request->isAjaxRequest ? $this->listPartial : $this->listView);\n }", "title": "" }, { "docid": "87f5741441fb47fe705676a54aca43a4", "score": "0.68317467", "text": "public function actionList()\n {\n $loansearch= new LoanSearch();\n $dataProvider = $loansearch->search(Yii::$app->request->get());\n \n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'searchmodel' => $loansearch\n ]);\n }", "title": "" }, { "docid": "87bb478103dde18bab9318d72db00152", "score": "0.6822629", "text": "public function index()\n\t{\n\t\t$items = Item::all();\n\t\treturn \\View::make('Item/list_item',compact('items'));\n\t}", "title": "" }, { "docid": "d1b243aa3b9ada5174dcd3dee5386a71", "score": "0.67757565", "text": "public function actionList() {\n\t\t$searchModel = DynamicSearchRecord::forModel ( $this->modelClassname );\n\t\t$dataProvider = $searchModel->search ( \\Yii::$app->request->queryParams );\n\t\t\n\t\treturn $this->owner->render ( 'list.json', [ \n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'dataProvider' => $dataProvider \n\t\t] );\n\t}", "title": "" }, { "docid": "d6f559efcd790aae0721cec604c5738a", "score": "0.67756224", "text": "public function listAction()\n {\n $frontEndDiscountsService = $this->container->get('dft_foapi.front_end_discounts');\n\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $frontEndDiscountsService->fetchAll($this->getAuthenticatedUserIdAndSubAccountIds())\n ));\n }", "title": "" }, { "docid": "48bfc0bd9a7b31cd041cca86fc310bff", "score": "0.6764525", "text": "public function listing() {\n\n $this->getMapper()->tableExists();\n\n // process any paging params\n $offset = 0;\n $limit = 10;\n $order = $this->getMapper()->getKey();\n $asc = TRUE;\n\n // process any offset requirements\n if ($this->request->getQueryParam('offset') !== NULL && is_numeric($this->request->getQueryParam('offset'))) {\n $offset = $this->request->getQueryParam('offset');\n }\n\n // process any limit requirements\n if ($this->request->getQueryParam('limit') !== NULL && is_numeric($this->request->getQueryParam('limit'))) {\n $limit = $this->request->getQueryParam('limit');\n }\n\n // process any order parameters\n if ($this->request->getQueryParam('order') !== NULL) {\n if (property_exists($this->mapper->getModel(), $this->request->getQueryParam('order'))) {\n $order = $this->request->getQueryParam('order');\n }\n }\n\n // process any asccending/decending requirements\r\n if ($this->request->getQueryParam('desc') !== NULL) {\r\n $asc = FALSE;\r\n }\n\n // ensure we arent passing in keys in query params ?keys=1,2,3,4 etc\n if ($this->request->getQueryParam('keys') !== NULL) {\n // List by id\r\n $result = $this->getMapper()->load_multiple(explode(',', $this->request->getQueryParam('keys')), $offset, $limit, $order, $asc);\n $data = $result['list'];\n $total = $result['total'];\n }\n else {\n // List all\n $result = $this->getMapper()->listing(NULL, $offset, $limit, $order, $asc);\n $data = $result['list'];\r\n $total = $result['total'];\n }\n\n // set the data\n $this->response->setMeta(array(\n 'order' => $order,\n 'offset' => $offset,\n 'limit' => $limit,\n 'direction' => ($asc == TRUE) ? 'ASC' : 'DESC',\n 'count' => count($data),\n 'total' => $total\n ));\n $this->response->setData($data);\n\n // Set response\n if (!empty($data)) {\n $this->response->setHeader('__OK', Http::Response(Http::OK));\n return TRUE;\n }\n $this->response->setHeader('__NOT_FOUND', Http::Response(Http::NOT_FOUND));\n return TRUE;\n }", "title": "" }, { "docid": "4af89c443382295cf45d3e2622ace5f2", "score": "0.67597896", "text": "public function show_list(){\n\t\t$fields\t\t\t = $this->get_fields();\n\t\t$display_fields\t = $fields;\n\t\t$db_fields\t\t = array_keys($fields);\n\t\t$this->set_fields($db_fields);\n\t\t$this->set_filters($this->get_filters_filter());\n\t\t$count\t\t\t = $this->get_count($this->get_filters());\n\t\t$this->set_row_count($count);\n\t\t$rows\t\t\t = $this->get_all($this->get_filters(), true);\n\t\t$this->un_set_fields();\n\t\tif($count == 1){\n\t\t\t$id\t\t\t\t = $rows[0][$this->get_primary_id_col()];\n\t\t\t$params\t\t\t = array();\n\t\t\t$params['id']\t = $id;\n\t\t\tif($this->needs_sub_table()){\n\t\t\t\t$params['sub_id'] = $rows[0][$this->get_sub_id_col()];\n\t\t\t}\n\t\t\t$params['action'] = 'edit';\n\t\t\t$this->redirect('', $params);\n\t\t}\n\t\t$col_count\t = count($fields);\n\t\t$filter_url\t = $this->get_ctrl_url();\n\t\t$this\n\t\t\t\t->assign('rows', $rows)\n\t\t\t\t->assign('fields', $display_fields)\n\t\t\t\t->assign('filter_url', $filter_url)\n\t\t\t\t->assign('col_count', $col_count)\n\t\t\t\t->view('list');\n\t}", "title": "" }, { "docid": "d711cb52a8e6005890b369293af69e7b", "score": "0.6758816", "text": "public function index()\n {\n $Recipes = Recipe::with('ingredients')->orderBy('name', 'asc')->paginate(15);\n return RecipeResource::collection($Recipes);\n }", "title": "" }, { "docid": "ff7b9b0b2610bec017a23bdf07c0fadc", "score": "0.6749715", "text": "public function index()\n {\n\n // SECURITY:\n // if view_table_permission is false, abort\n if (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n abort(403, 'Not allowed.');\n }\n\n // get all results for that entity\n $model = $this->crud['model'];\n\n if (isset($this->crud['is_translate']) && $this->crud['is_translate'] == true) {\n $this->data['entries'] = $model::orderby('id', 'ASC')->get();\n } else {\n $this->data['entries'] = $model::all();\n }\n\n // add the fake fields for each entry\n //dd($this->data['entries']);\n //foreach ($this->data['entries'] as $key => $entry) {\n // $entry->addFakes($this->getFakeColumnsAsArray());\n //}\n\n $this->prepareColumns();\n $this->data['crud'] = $this->crud;\n\n // load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\n return $this->firstViewThatExists('vendor.infinety.crud.list', 'crud::list', $this->data);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "d68899c3dabc0c21b0b2be7724f8030d", "score": "0.67380875", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Part Subtitute - '.APP_NAME;\n $this->global['pageMenu'] = 'List Part Subtitute';\n $this->global['contentHeader'] = 'List Part Subtitute';\n $this->global['contentTitle'] = 'List Part Subtitute';\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": "06f27ec9bf146b469adbf2e6705aabe8", "score": "0.6732888", "text": "public function index()\n {\n $pagination = new Pagination();\n $options = array();\n $pagination->setTotal(call_user_func_array([$this->_modelName, 'count'], array($options)));\n $options['limit'] = $pagination->rowsPerPage;\n $options['page'] = $pagination->offset;\n $records = call_user_func_array([$this->_modelName, 'all'], array($options));\n $this->set(compact('records', 'pagination'));\n }", "title": "" }, { "docid": "c71795f30a5bb75ebbd3e292fb5e8a4b", "score": "0.67322874", "text": "public function index()\n {\n return ProspectListResource::collection(Prospect::paginate());\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\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": "652313a0e1da74ef567bfde3163208da", "score": "0.6711615", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->get());\n }", "title": "" }, { "docid": "09d6b29a7dfc37d687e4be6b37813ff1", "score": "0.66846824", "text": "private function listing()\n {\n //List partners\n $PartnersLib = new PartnersLib($this->DB);\n $this->responseSetContent($PartnersLib->listing());\n }", "title": "" }, { "docid": "66b2855c608ff83c2186cf3c1df31163", "score": "0.6681495", "text": "public function Index()\n\t{\n\t\t$data = parent::_ListData($this->_getPageTitle($this->method), 1000, \"parent_id = \".$this->db->escape_str($this->parent_id), \"\", $this->parent_id.\"/\", \"sort\", \"asc\");\n\n\t\t$data['tpl_page'] = $this->_getController().'/list';\n\t\tparent::_OnOutput($data);\n\t}", "title": "" }, { "docid": "69c11dee847c7c0490ac6622948612f7", "score": "0.6678495", "text": "public function index()\n {\n return view('resource-collections.index', ['resourceCollections' => ResourceCollection::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "79017f87f771247f39999d976e80538f", "score": "0.6677284", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getViews();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "d6bd209eea7a909ec1bbf56afae413a6", "score": "0.66759527", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Search')->findAll();\n\n return $this->render('AppBundle:Search:list.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8f532ae29d0271e5352287d73bdf275b", "score": "0.6675639", "text": "public function index()\n\t\t{\n\t\t\t// Consolidate data\n\t\t\t$data = array('hello' => 'world');\n\n\t\t\t// Handle request\n\t\t\tswitch (\\Request::format())\n\t\t\t{\n\t\t\t\tcase 'json':\n\t\t\t\t\treturn Response::json($data); // API\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->layout->content = \\View::make('scores::admin.listing', $data); // HTML\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b2bfe4741f53980dfae4fe18136b3f9", "score": "0.66670376", "text": "public function consolesListingPage() {\n Auth::redirectToLoginIfNotLoggedIn();\n\n $data['title'] = 'Consoles';\n $data['message'] = 'Here is the entire listing of available consoles.';\n $data['no-consoles'] = \"Sorry, there aren't any consoles available yet.\";\n $data['consoles'] = \\services\\Console::createConsoleObjectArray();\n\n View::rendertemplate('header', $data);\n View::render('consoles/consoles', $data);\n View::rendertemplate('footer', $data);\n }", "title": "" }, { "docid": "26b71fb578321a0935c2ecdff45d3b80", "score": "0.6665553", "text": "public function listAction()\n {\n return $this->render(\n 'AppBundle:employee:list.html.twig',\n [\n 'employees' => $this->get('employee')->loadEmployees(),\n ]\n );\n }", "title": "" }, { "docid": "02a808be513bd750788350c882906a0c", "score": "0.6660171", "text": "public function index() {\n // Get pagination parameters\n $fields = \\Core\\App::getInstance()->request->get(\"fields\");\n $fields = explode(\",\", $fields);\n\n $limit = \\Core\\App::getInstance()->request->get(\"limit\");\n $offset = \\Core\\App::getInstance()->request->get(\"offset\");\n $sort = \\Core\\App::getInstance()->request->get(\"sort\");\n $order = \\Core\\App::getInstance()->request->get(\"order\");\n $search = \\Core\\App::getInstance()->request->get(\"search\");\n $where = \\Core\\App::getInstance()->request->get(\"where\");\n $filter = json_decode(\\Core\\App::getInstance()->request->get(\"filter\"), true);\n\n // Get the data\n $data = \\Helpers\\Database::getObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $offset, $limit, $sort, $order, $filter);\n $count = \\Helpers\\Database::countObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $filter);\n\n // Send response\n \\Helpers\\Response::success([\n 'total' => $count,\n 'rows' => $data\n ]);\n }", "title": "" }, { "docid": "a3406c7ff6face6ebd5912a2a062298a", "score": "0.66530275", "text": "public function listAction()\n\t{\n\t\t$list = $this->db->select();// recuperation les infomations relatif a la function Select du fichier Database.php.\n\t\techo $this->twig->render('listPost.html',\n\t\t\t[\n\t\t\t\t\"list\" => $list\n\t\t\t]\n\t\t);\n\n\t}", "title": "" }, { "docid": "79f5369358653dfc5bbd4ed88772cc37", "score": "0.6647595", "text": "public function index()\n {\n //method show all Tags\n return TagResource::collection(Tag::paginate());\n }", "title": "" }, { "docid": "3e2f78b81b111995e32d53c1e5113d60", "score": "0.6631635", "text": "public function index()\n {\n return view('resource.row',\n [\n 'resources' => Resources::with('category', 'reservation')\n ->get()\n ]);\n }", "title": "" }, { "docid": "4eecf023369060252d00f8bf4fee5c2b", "score": "0.66296786", "text": "public function index()\n {\n return $this->show(\"All\");\n }", "title": "" }, { "docid": "28aaefde81bffe6c35ee93653410bbe4", "score": "0.6615643", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MInformations::getInstance()->getListSelect($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "0ce098c670548596cee63a4f7a02e6d6", "score": "0.6610194", "text": "public function list() { \n try {\n $list = $this->listModel->getList($_POST['pageNo']);\n if($list) {\n $this->response($list,200,'Success');\n } else {\n $this->response('',204,'No content');\n } \n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "title": "" }, { "docid": "01f5c196228688f47955dc605b965462", "score": "0.66081655", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Engineers - '.APP_NAME;\n $this->global['pageMenu'] = 'List Engineers';\n $this->global['contentHeader'] = 'List Engineers';\n $this->global['contentTitle'] = 'List Engineers';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['classname'] = $this->cname;\n $data['readonly'] = $this->readonly;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "7f1c8a5ab63c01e02fb3ba65a1e27120", "score": "0.66048485", "text": "public function index()\n {\n return StudentResource::collection($this->studentRepository->list());\n }", "title": "" }, { "docid": "09ff54f3ae80db26f6fde9cf6871ccdc", "score": "0.6594758", "text": "public function index()\n {\n // Get all Intents\n $intents = Intent::paginate(50);\n\n return IntentResource::collection($intents);\n }", "title": "" }, { "docid": "38d10de11fa88686187f73576fe11a7c", "score": "0.6575308", "text": "public function index()\n {\n View::share('resourceUrl', $this->resourceUrl);\n \n $photos = PhotoModel::all()->toArray();\n $babys = \\BabyModel::all()->lists('name', 'id');\n \n $this->layout->with('title', '列表');\n $this->layout->content = View::make( $this->resourceUrl . 'index' )->with(compact('photos', 'babys'));\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "f9a0a7fc5de7f0a8c0c42ac168169d27", "score": "0.6572973", "text": "public function index()\n {\n $books = Book::all();\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "643e2e525a9956d4f3d154800f2706fb", "score": "0.6567327", "text": "public function index()\n {\n // Get all the resources list.\n\n $contacts = Contact::orderBy('id', 'asc')->paginate(10);\n \n // Check if there is no resource.\n if(is_null($contacts)) {\n return response()->json([\"message\"=>\"No Contact found.\", \"data\"=>[], \"errors\"=>[], \"success\"=>true], 204);\n }\n // Return the list of resources.\n return response()->json([\"message\"=>\"Contacts list.\", \"data\"=>$contacts, \"errors\"=>[], \"success\"=>true], 200);\n }", "title": "" }, { "docid": "c4b3a61da5b12f663884b5e9ad36c7d1", "score": "0.6566601", "text": "public function index()\n {\n $products = Product::paginate(12);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2e6cf3266883ceb02caa28803bff3287", "score": "0.65665895", "text": "public function indexAction()\n {\n return $this->forward()\n ->dispatch(\n $this->params()\n ->fromRoute( 'controller', get_called_class() ),\n array(\n 'action' => 'list',\n 'locale' => (string) $this->locale(),\n )\n );\n }", "title": "" }, { "docid": "98b6312310ec07ad4be1841adb403ce3", "score": "0.656651", "text": "public function actionList() {\n $data = Yii::app()->db->createCommand('SELECT * from products')->queryAll();\n // or $data = Products::model()->findAll();\n $dataProvider = new CArrayDataProvider($data, array(\n 'pagination' => array('pagesize' => 10),\n ));\n $this->render('list', array(\n 'dataProvider' => $dataProvider,\n ));\n }", "title": "" }, { "docid": "131cc08b0e6134cac1d6af3250da5d11", "score": "0.6564312", "text": "public function list()\n {\n //\n return view('admin.onepage.list');\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($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": "54d7b491cb48bf1dc5aa48e4b70243e8", "score": "0.6560677", "text": "public function index()\n {\n //Get Suppliers\n $suppliers = Supplier::paginate(100);\n\n //Return collection of suppliers as resource\n return SupplierResource::collection($suppliers);\n }", "title": "" }, { "docid": "eab040e429e9d0ed7c49740991e16b6a", "score": "0.65539455", "text": "public function actionList()\r\n {\r\n //All Sites\r\n $allSites = new Site('search');\r\n $allSites->unsetAttributes();\r\n if (isset($_GET['Site']))\r\n $allSites->attributes = $_GET['Site'];\r\n\r\n $this->render('list', array(\r\n 'allSites' => $allSites,\r\n 'gridViewSettings' => Site::gridViewSettings(),\r\n ));\r\n }", "title": "" }, { "docid": "b5dabee7628f504a4f1332387216fe1b", "score": "0.6541906", "text": "public function index()\n\t{\n\n\t\t$this->set(strtolower($this->modelNamePlural), $this->model->getAll());\n\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "bce9b2084302b70f248236ecc9038792", "score": "0.65368795", "text": "public function index()\n {\n try {\n $keywords = $this->request->query('keywords');\n $where = $this->request->query('where');\n $category_id = $this->request->query('category_id');\n\n $listings = $this->service\n ->search($keywords, $where, $category_id)\n ->sortByDesc('created_at');\n\n if ($this->paginate !== null) {\n $listings = $listings->paginate($this->paginate);\n }\n\n return new ListingResourceCollection($listings);\n } catch (Exception $ex) {\n return parent::handleException($ex);\n }\n }", "title": "" }, { "docid": "4f95d8e48aed5748b1d47771a5c780ff", "score": "0.65317386", "text": "public function index()\n {\n // Get divisions\n $divisions = Division::latest()->paginate(5);\n\n // Return collection of divisions as a resource\n return DivisionResource::collection($divisions);\n }", "title": "" }, { "docid": "bdc3df82aa2775b984746ad43f1f270d", "score": "0.65289664", "text": "public function listAction() {\n //Render the list twig\n return $this->render('MesdReportDemoBundle:Report:list.html.twig');\n }", "title": "" }, { "docid": "b3239f030ba6e204500bc8512083d8dd", "score": "0.6527235", "text": "public function index()\n {\n return ProgramsResource::collection(Program::paginate(15));\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "a590bbd0ca49f8f16ccf69ff4c577785", "score": "0.651896", "text": "public function index()\n {\n $sortieDetails = SortieDetails::all();\n\n // Return collection of sortie_details as a resource\n return SortieDetailsResource::collection($sortieDetails);\n }", "title": "" }, { "docid": "d88f7c52ab4450961acca7bf2dca42d7", "score": "0.65143025", "text": "public function displayList()\n\t{\n\n\t\t$this->lAdmin->DisplayList();\n\t}", "title": "" }, { "docid": "339c0962f54b7e532fa1290f675bd8c4", "score": "0.6505196", "text": "public function action_listing()\n\t{\n\t\t// populate data array\n\t\t$data = Table::get_all_data();\n\n\t\tif ($submit = \\Input::post('submit'))\n\t\t{\n\t\t\t// update table data via post and redirect\n\t\t\tTable::update_data(\\Input::post(null));\n\n\t\t\t// choose redirect action\n\t\t\tif ($submit == 'Back')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'prev');\n\t\t\t}\n\n\t\t\tif ($submit == 'Next')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'next');\n\t\t\t}\n\n\t\t\t\\Response::redirect($action);\n\t\t}\n\n\t\t// set common template vars\n\t\tself::_set_template_vars($this->template);\n\t}", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "e2c39459334902c7d856712c054793ec", "score": "0.6503653", "text": "public function index()\n {\n return $this->resourceCollection($this->model->with('teams')->get());\n }", "title": "" }, { "docid": "b7bae9c804826cdd9b0c94669ad36536", "score": "0.6501805", "text": "public function index()\n {\n $request = $this->makeRequest('index');\n $result = $this->service->getAll();\n\n return $this->maybeMakeResource('collection', $result);\n }", "title": "" }, { "docid": "56cb1332aceddef95a5e1453e37d8832", "score": "0.6501376", "text": "public function listAction()\n {\n try {\n $this->collectParameters();\n $this->findAirports();\n \n return $this->listActionResponse();\n } catch (\\Exception $e) { // Log exception and return an error response\n return $this->buildErrorResponse($e);\n }\n }", "title": "" }, { "docid": "97eab9d51e99c2a53b12711e284a2665", "score": "0.64992535", "text": "function display() {\n\t\t$this->getDefaultView()->setListingId(KRequest::getInt('listing_id'))->display();\n\t}", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "b806629cb8d4f33084d6c8e3071e3f35", "score": "0.6496737", "text": "public function listAction()\n {\n $params = $this->params();\n $request = $this->getRequest();\n $bodyOnly = $request->isXmlHttpRequest();\n $page = $params->fromRoute( 'page',\n $request->getPost( 'page',\n $request->getQuery( 'page', 1 )\n )\n );\n\n $view = new ViewModel( array(\n 'paginator' => $this->getPaginator(),\n 'page' => ( (int) $page ) ?: 1,\n 'format' => $bodyOnly,\n ) );\n\n if ( $bodyOnly )\n {\n $view->setTerminal( true );\n }\n\n return $view;\n }", "title": "" }, { "docid": "47edbc785ea53823a4f3981e16262e11", "score": "0.64958936", "text": "public function index()\n {\n // Get all clubs\n $clubs = Club::all();\n\n // Return club as a collection of resources\n return ClubResource::collection($clubs);\n }", "title": "" }, { "docid": "50b30c3618e535c4e58fcbcaa800b3f9", "score": "0.6494503", "text": "public function index()\n {\n // Get items from CACHE if exists else get items from database and add them CACHE\n $items = Cache::remember(request()->fullUrl(), 60, function() {\n return Item::paginate(10);\n });\n\n return ResourcesItem::collection($items);\n }", "title": "" }, { "docid": "fb449ee6d59076f97a7b455cd49a361a", "score": "0.6492989", "text": "public function index()\n {\n $cate = Category::paginate();\n return CategoryResource::collection($cate);\n }", "title": "" }, { "docid": "a3105ba14523f4d28c0c61f1ae3a4126", "score": "0.64928555", "text": "public function index()\n {\n $doctor = Doctor::paginate(15);\n // Return collection of articles as a resource\n return DoctorResource::collection($doctor);\n }", "title": "" }, { "docid": "2f893b7055407e4ba0e047d0d86b3713", "score": "0.64906514", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_room->get_all();\n\t\t$this->template->set('title', 'Room List');\n\t\t$this->template->load('template', 'contents', 'room/room_list', $data);\n\t}", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "bcb5195ddfb190dcd7d1cb464966fa39", "score": "0.6483486", "text": "protected function indexAction()\n {\n /* Select all rows request */\n $this->crudHelper->get($this->mapper);\n }", "title": "" }, { "docid": "bee92afbf5f5543a8639ff7712cc6521", "score": "0.6480457", "text": "public function list()\n\t{\n\t\t$chechPermission = get_controller_and_action();\n\t\tif($chechPermission == FALSE)\n\t\t{\n\t\t\tredirect(base_url('access'));\n\t\t}\n\t\t$data['title'] = 'Po List';\n\t\t$this->load->view('admin/includes/_header', $data);\n\t\t$this->load->view('po/po_list');\n\t\t$this->load->view('admin/includes/_footer');\t\n\t}", "title": "" }, { "docid": "0db1519c1fe132e8fd9ea16de60ae674", "score": "0.64800423", "text": "public function index()\n {\n return Resource::collection(User::paginate(10));\n }", "title": "" }, { "docid": "a8c3b4396d681ea7d1b2f1cd417a6d26", "score": "0.64796", "text": "abstract public function view_list();", "title": "" }, { "docid": "8867deb779456d5ddb47aa51a4b25985", "score": "0.6476355", "text": "public function index() {\n $this->all();\n }", "title": "" }, { "docid": "f71ee6e727b6e6ce48d431df89e195db", "score": "0.6474087", "text": "public function index()\r\n {\r\n $this->retrieve();\r\n }", "title": "" } ]
bf3d4301b5242dc918a937b380e6abe6
Get the user data
[ { "docid": "71307489009d0d860fc645226cd8196d", "score": "0.0", "text": "public function get_user($user_id, $rows='*', $where = FALSE) {\n\t\t$where = ($where) ? $where : 'id=\"'.$user_id.'\"';\n\t\t//Select $rows from users table\n\t\t$db = new Database;\n\t\tif ($db->select('users', $rows, $where, null, 1)) {\n\t\t\t$result = $db->getResult();\n\t\t\treturn $result[1];\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" } ]
[ { "docid": "b4318055d23d10ca5e6c8a5af3d18692", "score": "0.8319972", "text": "public function getUserData(){\n $client = $this->getClient();\n $user_data = $client->api(\"users/self\", 'GET')[\"data\"];\n return $user_data;\n }", "title": "" }, { "docid": "459323da8c99dafc1c3167a31d2f237d", "score": "0.81352973", "text": "public function getUserData()\n\t{\n\t\treturn $this->loginModel->getUserData();\n\t}", "title": "" }, { "docid": "a4dc76edd29a894d13641471d99c29a7", "score": "0.79386944", "text": "public function get_user_data(){\n\n return session()->get('user_data');\n }", "title": "" }, { "docid": "2b5be8eae4cc3c67682d4002cad89f73", "score": "0.7928282", "text": "public function getMyData(){\r\n\t\t$user = App::getInstance()->getUser();\r\n\t\t$this->data[\"personalData\"] = $user->getPersonalData();\r\n\t\t\r\n\t\t// add other types of data from the user\r\n\t}", "title": "" }, { "docid": "dafeac6ac49e297f18d7fe8b33586cd2", "score": "0.7924894", "text": "public function get_user_data() {\n\n if (!$this->loaded) {\n $this->load();\n }\n\n return $this->user;\n }", "title": "" }, { "docid": "792cd34d9fa6806f0e24e0403dcf3c46", "score": "0.787751", "text": "private function _getUserData() {\n\t\t$sql = \"SELECT * FROM rb_users WHERE id = '$this->uid' LIMIT 1;\";\n\t\t$qry = $this->pdo->query($sql);\n\n\t\treturn $qry->fetch();\n\t}", "title": "" }, { "docid": "0ea89a23225000372c052c4a23e06b9f", "score": "0.78392893", "text": "public function getUserData(){\n $sql = \"select * from user where id = \".$this->getId();\n $query = $this->conn->prepare($sql);\n $query->execute();\n $userDbData = $query->fetchAll(PDO::FETCH_OBJ)[0];\n $this->setUserData($userDbData);\n \n }", "title": "" }, { "docid": "72d122682e6b2278ded6ecf18a738e3f", "score": "0.77805346", "text": "protected function get_user_data() {\n\n $user_data = array();\n\n $user = wp_get_current_user();\n\n $user_data['user_agent'] = $_SERVER['HTTP_USER_AGENT'];\n\n $user_data['user_ip'] = $_SERVER['REMOTE_ADDR'];\n\n if($user->ID != 0) {\n $user_data['user_email'] = $user->user_email;\n }\n\n $user_data = $user_data;\n\n return $user_data;\n }", "title": "" }, { "docid": "a3a4a20d2a32e49f0853e1da58d7da34", "score": "0.7725104", "text": "public function getUserData()\n {\n $user = User::with('profile')->where('id',\\Auth::user()->id)->first();\n return $user;\n }", "title": "" }, { "docid": "2c1472ed3cc843c3d14c5ace4ab90258", "score": "0.76747423", "text": "public static function getUserData() {\n\t\t$user_id = \\Core\\Session\\Base::get( self::getXFormCmd() . '_user_id' );\n\t\tif(isset(self::$instance_user_data[$user_id])) {\n\t\t\treturn self::$instance_user_data[$user_id];\n\t\t} else {\n\t\t\t$instance = new self();\n\t\t\tif((int)$user_id) {\n\t\t\t\t$user_data = $instance->get($user_id);\n\t\t\t\tif(!$user_data) {\n\t\t\t\t\t$user_data = /*$instance->emptyUserData();*/$instance->fetchNew();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$user_data = /*$instance->emptyUserData();*/$instance->fetchNew();\n\t\t\t}\n\t\t\t\\Core\\Session\\Base::set( array('user_data' => $user_data) );\n\t\t\tself::$instance_user_data[$user_id] = $user_data;\n\t\t\treturn $user_data;\n\t\t}\n\t}", "title": "" }, { "docid": "a91627571c93e1879a6b954c00dfd65a", "score": "0.76579267", "text": "public function getUserData() {\n $token_url = $this->getTokenUrl();\n $params = array();\n parse_str(file_get_contents($token_url), $params);\n $this->app[\"session\"]->set(\"access_token\", $params[\"access_token\"]);\n\n $graph_url = \"https://graph.facebook.com/me?access_token=\" . $params[\"access_token\"];\n return json_decode(file_get_contents($graph_url), true);\n }", "title": "" }, { "docid": "ebe2945daa860129f4dce975f5c8cd39", "score": "0.76433754", "text": "public function getUserInfo() {\n return $this->getSomething('user', $this->fuid);\n }", "title": "" }, { "docid": "551d3450d2ed4abedcaa12db26482743", "score": "0.76284224", "text": "public function getUserinfo()\n {\n return [\n 'data' => $this->UserService->getUserInfo(Session::get('user_id')),\n ];\n }", "title": "" }, { "docid": "d31874a8605b3859d2f99ed1249ef0d4", "score": "0.76030505", "text": "public function getUserData()\n {\n $userData = $this->session->userdata();\n \n // Return userdata\n return $userData;\n }", "title": "" }, { "docid": "6a5caf6144048164588e7b8cb098c6d5", "score": "0.7579361", "text": "public function getUserInfo();", "title": "" }, { "docid": "6c8efc6bd850b78b8484ec3b2945446c", "score": "0.757494", "text": "public function userinfo()\r\n\t{\r\n\t\t$auth = Zend_Auth::getInstance();\r\n\t\t\r\n\t\t$user = $auth->getStorage();\r\n\t\t//$user->getUserBy('u.userID',$_COOKIE['user']);\r\n\t\t$user->getUserSportsInfo();\r\n\t\t$user->getUserGames();\r\n\t\t$user->getOldUserNotifications(); // Must be after get games, teams, and groups call\r\n\t\t//$auth->getStorage()->write($user);\r\n\t\t\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "38ec0dfffe32ee180fcd693f34efb31b", "score": "0.7548228", "text": "public function pullUserData()\n {\n // Make the query\n $q = \"SELECT first_name, last_name, role, city, state, zipcode,\n sex, email, pass, registration_date, birth_date,\n phone_num, digoro_score, invited, default_teamID,\n login_before\n FROM users\n WHERE id_user = {$this->_id}\n LIMIT 1\";\n \n // Execute the query and store the result\n $result = $this->_dbObject->getRow($q);\n\n // Found result\n if($result !== false) {\n $this->setUserAttributes($result['first_name'], $result['last_name'],\n $result['role'], $result['city'],\n $result['state'], $result['zipcode'],\n $result['sex'], $result['email'], $result['pass'],\n $result['registration_date'], $result['birth_date'],\n $result['phone_num'], $result['digoro_score'],\n $result['invited'], $result['default_teamID'],\n $result['login_before']);\n }\n\n }", "title": "" }, { "docid": "dd04cf7d92b4ed459a87553964fc23dd", "score": "0.75398105", "text": "public function getUserData(){\n $userData = $this->session->userdata();\n \n // Return userdata\n return $userData;\n }", "title": "" }, { "docid": "b8113917de088a8b292879a5b6b91742", "score": "0.7532893", "text": "public function getUser()\n {\n return $this->getData(self::USER);\n }", "title": "" }, { "docid": "ed0ad0a6222a1e07bff75ce5a9e36072", "score": "0.74889916", "text": "public function getUserInfo()\n {\n return $this->user_info;\n }", "title": "" }, { "docid": "37d5c2e5f32a996584a2eb479fe0b646", "score": "0.74761397", "text": "public function readUser();", "title": "" }, { "docid": "d278aafbf971356cf3b8b5320953b911", "score": "0.7470418", "text": "public function getUserData($userId);", "title": "" }, { "docid": "ee8acc01af2aedc034376d31acae13ca", "score": "0.74341726", "text": "private function get_user_data() {\n\t\t$query = $this->db->prepare( \"SELECT * FROM users WHERE ID = ?\" );\n\t\t$query->bindValue( 1, $this->id );\n\n\t\ttry {\n\n\t\t\t$query->execute();\n\t\t\t$row = $query->fetch();\n\n\t\t\treturn $row;\n\t\t\t\n\t\t} catch (PDOexception $e) {\n\t\t\tdie( $e->getMessage() );\n\t\t}\n\t}", "title": "" }, { "docid": "18ab01f04f7e586176623158de377e80", "score": "0.7424284", "text": "public function read_user()\n {\n }", "title": "" }, { "docid": "1cf8774984734d96b42bb0152ef18a2a", "score": "0.74181575", "text": "public function getUserData()\n {\n return $this->steamData;\n }", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.74135756", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.74135756", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.74135756", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.74135756", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.74135756", "text": "public function getUser();", "title": "" }, { "docid": "022ed1051536889a774af46fa1ff79b3", "score": "0.73983526", "text": "public function currentUserData()\n\t{\n\t\t$data = array();\n\t\t$user_id = $this->timber->security->getId();\n\t\t$user = $this->timber->user_model->getUserById($user_id);\n\n\t\tif( (false === $user) || !(is_object($user)) ){\n\t\t\t$this->timber->security->endSession();\n\t\t\t$this->timber->redirect( $this->timber->config('request_url') . '/500' );\n\t\t}\n\n\t\t$user = $user->as_array();\n\t\tforeach ($user as $key => $value) {\n\t\t\t$data['current_user_' . $key] = $value;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "3453dbd9ddf91290ea0eea540ed91ec2", "score": "0.7389891", "text": "function all_userdata()\n\t{\n\t\treturn $this->user_data;\n\t}", "title": "" }, { "docid": "86690c5e1a4ac46ec9f87d08b326399b", "score": "0.73496425", "text": "public function getProfileData()\n {\n $data = json_encode([\n '_uuid' => $this->uuid,\n '_uid' => $this->username_id,\n '_csrftoken' => $this->token,\n ]);\n\n return $this->http->request('accounts/current_user/?edit=true', SignatureUtils::generateSignature($data))[1];\n }", "title": "" }, { "docid": "c9e4a5bc8ab544637ef7917dab9fa2d7", "score": "0.73345137", "text": "public function currentUserData()\n {\n $data = array();\n $user_id = $this->timber->security->getId();\n $user = $this->timber->user_model->getUserById($user_id);\n\n if( (false === $user) || !(is_object($user)) ){\n $this->timber->security->endSession();\n $this->timber->redirect( $this->timber->config('request_url') . '/500' );\n }\n\n $user = $user->as_array();\n foreach ($user as $key => $value) {\n $data['current_user_' . $key] = $value;\n }\n\n return $data;\n }", "title": "" }, { "docid": "c9e4a5bc8ab544637ef7917dab9fa2d7", "score": "0.73345137", "text": "public function currentUserData()\n {\n $data = array();\n $user_id = $this->timber->security->getId();\n $user = $this->timber->user_model->getUserById($user_id);\n\n if( (false === $user) || !(is_object($user)) ){\n $this->timber->security->endSession();\n $this->timber->redirect( $this->timber->config('request_url') . '/500' );\n }\n\n $user = $user->as_array();\n foreach ($user as $key => $value) {\n $data['current_user_' . $key] = $value;\n }\n\n return $data;\n }", "title": "" }, { "docid": "a3fee4300d34e0f14dba0935557161be", "score": "0.73339415", "text": "public static function getUserInfo() {\n return Raxan::data(DataKeys::USER_INFO);\n }", "title": "" }, { "docid": "6a9dbebbe5697cc9eb1a837f09cbcee8", "score": "0.73315144", "text": "public function read()\n {\n return User::find(Auth::User()->id)->toJson();\n }", "title": "" }, { "docid": "0b4c24b15f03695c7063659e31670318", "score": "0.7328988", "text": "function getuserdata()\r\n{\r\n $output = load_service(\"outputbuffer\");\r\n \r\n $user = load_service(\"user\");\r\n $output->add(\"{'username':'\" . $user->getusername() . \"','rights':'\" . $user->getrights() . \"'}\");\r\n}", "title": "" }, { "docid": "f895c1fc80599a092f654c492cc8d6d5", "score": "0.731352", "text": "public function getInfo()\n {\n return $this->getUser();\n }", "title": "" }, { "docid": "fbfe02bbc5d00707f3c5b16d9708be7e", "score": "0.7301716", "text": "public function getUserInfo()\n {\n return [\n 'id' => $this->userID,\n 'userName' => $this->userName,\n 'accessKey' => $this->accessKey,\n ];\n }", "title": "" }, { "docid": "dc1b9f923df07ba0cce6e63da25d3e61", "score": "0.72986186", "text": "public function getUser(){ return UserData::getById($this->ADMIN_ID);}", "title": "" }, { "docid": "3472414b8b75783a4c9c721d4ad45c19", "score": "0.7288426", "text": "function getUserData($userId) {\n $userData = [];\n if ($userId == $_SESSION['uid']) {\n $userData['id'] = $_SESSION['uid'];\n $userData['email'] = $_SESSION['current-user-email'];\n $userData['name'] = $_SESSION['current-user-first-lastname'];\n } else {\n $data = get('user', \"user_id='$userId'\");\n $userData['id'] = $data['user_id'];\n $userData['email'] = $data['email'];\n $userData['name'] = $data['firstname'].' '.$data['lastname'];\n }\n return $userData;\n}", "title": "" }, { "docid": "75e6e8f8327b6705496f10041ea2eec6", "score": "0.7268845", "text": "public function getUser()\n\t{\n\t\treturn $this->user()->getResults();\n\t}", "title": "" }, { "docid": "cce1b9cf87eb25dbfcfa89f23b5d3588", "score": "0.7265938", "text": "public function get_user();", "title": "" }, { "docid": "80932f057f3312cfd586169ffe3c2a58", "score": "0.7215047", "text": "public function getUserData() {\n $response = $this->_connectAndGrabUserData();\n\n if($response) {\n return array(\n 'first_name'\t\t=> $response['first_name'],\n 'last_name'\t\t\t=> $response['last_name'],\n 'url_friendly_name'\t=> (isset($response['screen_name']) && !preg_match('/^id[0-9]+$/i',$response['screen_name']))?$response['screen_name']:'',\n 'email' => (isset($response['email']))?$response['email']:'',\n 'timezone'\t\t\t=> $response['timezone'],\n 'gender'\t\t\t=> $response['sex']?$response['sex']:0,\n 'vkontakte_id'\t\t=> $response['uid']\n );\n }\n\n return false;\n }", "title": "" }, { "docid": "ff07dc246ef16a7e24b7226d607399b5", "score": "0.71769893", "text": "public static function getUser();", "title": "" }, { "docid": "586840a82f9b5688975d7c82601fb547", "score": "0.7158796", "text": "protected function getUser(){ return( $this->_user ); }", "title": "" }, { "docid": "8e2eb7596f9d2b986d145f42e2b17c16", "score": "0.71474284", "text": "public function getData()\n {\n return \\Yii::$app->session->get($this->userDataSessionKey);\n }", "title": "" }, { "docid": "21a267079f138835422abe85314d3181", "score": "0.7145061", "text": "function userdata()\n{\n $authenticate = Services::authentication();\n $init = model('App\\Models\\admin_model');\n\n if (!$authenticate->check()) {\n return false;\n }\n\n $user = $authenticate->user();\n $data = [\n 'id' => $user->id,\n 'fullname' => $user->fullname,\n 'email' => $user->email,\n 'nim' => $user->nim,\n 'image' => $user->user_image,\n ];\n\n return $data;\n}", "title": "" }, { "docid": "9b28ffb44d8313634374c17c3eb167e5", "score": "0.71252304", "text": "public function user() {\n \t// If we have retrieved the user by now, we will return that value.\n // Fetching it multiple times in a session is costly\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n $token = $this->getTokenFromRequest();\n\n // If in the request is present a token, we will use it to fetch the data\n if (!empty($token)) {\n $this->user = $this->provider->retrieveByCredentials(\n [$this->storageKey => $token]\n );\n }\n\n return $this->user;\n }", "title": "" }, { "docid": "be94a846a7080e1529701f0253726182", "score": "0.707186", "text": "public static function getUserData()\n {\n $session = self::getJoomlaSession();\n $userData = isset($_SESSION['offerUserData']) ? $_SESSION['offerUserData'] : null;\n if (!isset($userData)) {\n $userData = self::initializeUserData();\n $_SESSION['offerUserData'] = $userData;\n }\n\n return $userData;\n }", "title": "" }, { "docid": "7488d00fe64d6f3167d6666a8406ecf9", "score": "0.70706886", "text": "public function getUser(){\r\n \r\n return $this->user;\r\n \r\n }", "title": "" }, { "docid": "d32c4cc4a612a0971958d3cfa90fd861", "score": "0.70703673", "text": "function get_user_info($user_id)\r\n {\r\n return UserDataManager :: get_instance()->retrieve_user($user_id);\r\n }", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.7055063", "text": "abstract public function getUser();", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.7055063", "text": "abstract public function getUser();", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.7055063", "text": "abstract public function getUser();", "title": "" }, { "docid": "77af589bef97b511b0167ede71ee5b69", "score": "0.7051126", "text": "public function getProfileData($userName){\r\n\t\t$user = new User($username);\r\n\t\t$this->data[\"personalData\"] = $user->getPersonalData();\r\n\t\r\n\t\t// get other types of data from the user\r\n\t}", "title": "" }, { "docid": "32e1295658af151a86bec690e5ceee05", "score": "0.7044266", "text": "public function getUserData(){\r\n $sql = \"SELECT * FROM tbl_users ORDER BY id DESC\";\r\n $query = $this->db->pdo->prepare($sql);\r\n $query->execute();\r\n $r = $query->fetchAll(PDO::FETCH_ASSOC);\r\n return $r;\r\n }", "title": "" }, { "docid": "42e88b2e30a632e3084fe94bd9765b07", "score": "0.7037974", "text": "public function getUser()\n\t{\n\t\tif ($this->data === null)\n\t\t{\n\t\t\t$userId = $this->getState('user.id');\n\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t$db->setQuery(\n\t\t\t\t'SELECT p.`fields`,u.`name`,u.`id` FROM `#__test_profiles` AS p '.\n\t\t\t\t'LEFT JOIN `#__users` AS u ON u.id=p.user_id '.\n\t\t\t\t'WHERE p.id='. $db->quote($userId)\n\t\t\t);\n\n\t\t\t$this->data = $db->loadObject();\n\t\t\t$this->data->fields = json_decode($this->data->fields);\n\t\t\tif( count($this->data->fields) ){\n\t\t\t\t$db->setQuery(\n\t\t\t\t\t'SELECT f.`label`,v.`value`,f.`id` FROM `#__fields_values` AS v '.\n\t\t\t\t\t'LEFT JOIN `#__fields` AS f ON f.`id`=v.`field_id` '.\n\t\t\t\t\t'WHERE v.`field_id` IN ('. implode(',',$this->data->fields) . ') '.\n\t\t\t\t\t'AND f.`context`=\"com_users.user\" '.\t\t\t\t\t\n\t\t\t\t\t'AND v.`item_id`='.$db->quote($this->data->id)\n\t\t\t\t);\n\t\t\t\t$this->data->fields = $db->loadObjectList();\n\t\t\t}\n \n\t\t}\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "4f03c5e79e5b06347cf7e28ac1707ac8", "score": "0.70374256", "text": "public function getUserInfo()\n {\n return $this->httpGet(\"/\" . self::API_VERSION . \"/userinfo\");\n }", "title": "" }, { "docid": "2d977f0f0f83e7e1ecb28fa9a28f68c7", "score": "0.7036187", "text": "public function getUser(){\n }", "title": "" }, { "docid": "b94b0486c4faeebcda862cca3016aedb", "score": "0.7035728", "text": "public function getUserData(int $id);", "title": "" }, { "docid": "cfafc91fb92fd498eda68d82bee8f0f7", "score": "0.7032019", "text": "public function getUser()\n {\n \t//check if there is session register to this user\n if(! $this->_isset('ShieldfyUser')) {\n \t$this->loadNewUser();\n } else {\n \t$this->loadExistingUser();\n }\n\n $this->_save('ShieldfyUser',[\n \t'sId' => $this->sessionId,\n \t'ip' => $this->user->getIp(),\n \t'score' => $this->user->getScore()\n ]);\n }", "title": "" }, { "docid": "343716ca3d62f48109154cd1ca56dcc1", "score": "0.70243204", "text": "public function information() {\n if ($this->logged()) {\n return dbRow(\"SELECT `name`, `surname`, `email`, `phone`, `city`, `description` FROM `\".self::USER_TABLE.\"` WHERE `id` = \".$this->userID);\n }\n }", "title": "" }, { "docid": "b7f131ed620c91dd5c7ee3a02a14cb0a", "score": "0.7023374", "text": "protected function getUser() {\n if ($this->_user === null) {\n $userInfo= Helps::createNativeSql(\"\n select u.real_phone,u.real_card,u.auser,u.apwd,u.real_name,u.accountId,u.set_pwd,u.auto_bid,u.accountId,\n eu.name as companyName,eu.organType,eu.legalName,\n lm.*\n from xx_user as u \n LEFT JOIN xx_enter_users as eu on eu.user_id=u.user_id\n LEFT JOIN xx_loan_merchant as lm on lm.user_id=u.user_id\n where u.real_phone={$this->real_phone}\")->queryOne();\n $this->_user = User::findByUsernameOrEmailOrPhone($this->real_phone);\n $this->_userInfo = $userInfo;\n }\n return $this->_user;\n }", "title": "" }, { "docid": "86b095839d0412553bd77d0639394d67", "score": "0.7013782", "text": "public function get_user_info(): UserInfo;", "title": "" }, { "docid": "48c32482ccb5fc96ad5eadedf0c9036c", "score": "0.70113593", "text": "public function get()\n\t{\n\t\t$userID = Session::read(\"userID\");\n\n\t\tif(!$this->setUser($userID)){\n\t\t\treturn;\n\t\t}\n\n\t\t$userInfos = $this->model->getFullUser();\n\n\t\t//Send JSON response\n\t\t$resp = new Response();\n\t\t$resp->setSuccess(200, \"all elements returned\")\n\t\t ->bindValue(\"userID\", $userID)\n\t\t ->bindValue(\"userName\", $userInfos['user_name'])\n\t\t ->bindValue(\"userEmail\", $userInfos['user_email'])\n\t\t ->bindValue(\"userRegisterTime\", $userInfos['user_register_time'])\n\t\t ->bindValue(\"userLastActivity\", $userInfos['user_last_activity'])\n\t\t ->bindValue(\"userModerator\", $userInfos['user_moderator'])\n\t\t ->bindValue(\"userAdmin\", $userInfos['user_admin'])\n\t\t ->bindValue(\"userActivated\", $userInfos['user_activated'])\n\t\t ->send();\n\t}", "title": "" }, { "docid": "f5576012c17f0d2a02f6306f499b9067", "score": "0.69870085", "text": "public function getUser ()\n {\n try {\n\n $data = $this->getRequestData();\n\n $return = $this->_userModel->getDataByIdentity($data->sq_person);\n\n # remove password.\n unset($return->ds_password);\n\n return $return;\n } catch (Exception $ex) {\n\n throw $ex;\n }\n }", "title": "" }, { "docid": "8a905a6f23314eedcd64a222d98b9ba7", "score": "0.69854593", "text": "public function getUserInfo() {\n\t\treturn ($this->userInfo);\n\t}", "title": "" }, { "docid": "1b7b09024705fc339fe1a090e6ebd2ab", "score": "0.6982201", "text": "private function _setUserData() {\n\n $userData = $this->_CI->authentication->user_status(0);\n if($userData) {\n return $userData;\n }\n }", "title": "" }, { "docid": "727f480a654e8be380f9ffea76a224e8", "score": "0.69801205", "text": "public function getUserData()\n\t{\n\t\tif ( null === ( $_resource = $this->_config->getEndpointUrl( EndpointTypes::IDENTITY ) ) )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->fetch( $_resource );\n\t}", "title": "" }, { "docid": "4da4cf90dd351a7833920ed40046ebd7", "score": "0.6970327", "text": "public static function getUserInfo() {\n\t\t\treturn (Session::getVar('user')) ? Session::getVar('user') : false;\n\t\t}", "title": "" }, { "docid": "75096631accae6b9e0d08b061ff0cdd9", "score": "0.6958744", "text": "function getUser();", "title": "" }, { "docid": "75096631accae6b9e0d08b061ff0cdd9", "score": "0.6958744", "text": "function getUser();", "title": "" }, { "docid": "ade50f78b1b4d26e811b5d314740911b", "score": "0.6955902", "text": "public function getUser(){\n\t\treturn $this->_user;\n\t}", "title": "" }, { "docid": "a29bc1cc847de15d378fc580363cff34", "score": "0.6952895", "text": "public function getUserAssociatedData()\r\n {\r\n con();\r\n $sql = \"SELECT * FROM \" . $this->tableName . \" WHERE user_id = \" . $_COOKIE['id'];\r\n $result = $GLOBALS['con']->query($sql);\r\n $GLOBALS['con']->close();\r\n return $result;\r\n }", "title": "" }, { "docid": "5c371e55842e1d9fd04d377061459cfe", "score": "0.69486195", "text": "function getUser(){\n\t\treturn $this->_user;\n\t}", "title": "" }, { "docid": "718c22fd4749d26826c1a82d0e026267", "score": "0.69396555", "text": "function getUserData( $userPointer ) {\n $userData = $this->getDataFromDB(\"user_db\", $userPointer);\n //Check whether the data header exists\n if($userData->success != true){\n $userData->message = \"No users with this credentials found!\";\n }else{\n $userData->message = \"User data successfully retrieved!\";\n }\n return $userData;\n }", "title": "" }, { "docid": "6a8bc2c6f0350263481f3f36899d59e2", "score": "0.69386977", "text": "private function getUser()\n {\n $token = $this->request->header('ACCESS-TOKEN');\n if (!empty($token)) {\n return Cache::read('user_' . $token);\n }\n }", "title": "" }, { "docid": "534941558da400ac0fa7b146639a5490", "score": "0.6933389", "text": "public function getUserData()\n {\n if (is_null($this->userData) && !is_null($this->userDataClass)) {\n $this->userData = Yii::createObject($this->userDataClass);\n }\n\n return $this->userData;\n }", "title": "" }, { "docid": "c2511f23776348105099e8915e5d304f", "score": "0.69271725", "text": "protected function initUserAttributes()\n {\n return $this->getAccessToken()->getParams()['user'];\n }", "title": "" }, { "docid": "39e0de65e4c355c42229e5c38448f66f", "score": "0.6926585", "text": "public function getUser(){\n return $this->user;\n }", "title": "" }, { "docid": "39e0de65e4c355c42229e5c38448f66f", "score": "0.6926585", "text": "public function getUser(){\n return $this->user;\n }", "title": "" }, { "docid": "b79456579f60430b9095a1835842b340", "score": "0.6925757", "text": "public function getuser()\n {\n\t\t return $this->user;\n }", "title": "" }, { "docid": "2db76d060e4200f90fba574e71545c91", "score": "0.6920077", "text": "protected function data(): array\n {\n return [\n 'user' => $this->auth->user(),\n ];\n }", "title": "" }, { "docid": "8e832db7b40991e79fb03fe934e32cc9", "score": "0.69199204", "text": "public function user_data()\n\t{\n\t\t$data['users'] = array();\n\t\t\n\t\t$this->render('user_management/user_data', $data);\n\t}", "title": "" }, { "docid": "4fcb078548d92c36b88aa73eb3c09a7e", "score": "0.69097054", "text": "protected function initUserInfoAttributes()\n {\n return $this->api(\"v2/user/get\", 'GET', ['userId' => $this->getUserAttributes()['id']]);\n }", "title": "" }, { "docid": "1728c7bbb0ec5dc60af9715d7699abf3", "score": "0.69088787", "text": "public function getAllUserData()\n {\n $result = $this -> getAdapter() -> query('SELECT * FROM members');\n $object = $result -> fetchAll();\n \n return $object;\n }", "title": "" }, { "docid": "5c3487876833e22ec8b2fec485dc15a7", "score": "0.69085276", "text": "function getUserInfo(){\n\t$userData = array();\n\t$userData['custName'] = \"Zenith Insurance Company\" ;\n\t$userData['contact'] =\"Casasnovas, Norma\";\n\treturn $userData;\n}", "title": "" }, { "docid": "9dbc4baa8f9db554a5f1455cd65a914c", "score": "0.6904672", "text": "public function userDetails(){\n\t\t\n\t\ttry{\n\t\t\t$userDetails = json_decode($this->scWrap->get('me'), true);\n\t\t\t$this->scUserName = $userDetails['username'];\n\t\t\t$_SESSION['scUserName'] = $this->scUserName;\n\t\t\t\n\t\t}catch(Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {\n\t\t\texit($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "aa0efe82104428d86c80acaaa61b7111", "score": "0.6904013", "text": "public function getUserinfo(){\n \treturn User::find()->where(['role_tab_id'=>$this->id])->one();\n\n }", "title": "" }, { "docid": "d5adbd0d7d0d0635bb61e42c82f22591", "score": "0.6901157", "text": "function all_userdata()\n\t{\n\t\treturn $_SESSION['userdata'];\n\t}", "title": "" }, { "docid": "06794aa54d4ecf253a44ae8c5f6dca51", "score": "0.69010544", "text": "protected function getUserInfo() {\n $params = $this->handleOptionalParameters(\"auth_token\", \"userId\", \"username\");\n $user = null;\n if ($params['auth_token'] != null) {\n $user = $this->model->getUserByToken($params['auth_token']);\n } else if ($params['userId'] != null) {\n $user = $this->model->getUserById($params['userId']);\n } else if ($params['username']) {\n $user = $this->model->getUserByName($params['username']);\n } else {\n $this->missingArgs(\"auth_token' or 'userId' or 'username\");\n }\n\n if ($user == null) {\n\n $this->code = 400;\n $this->message = \"Invalid user identifier given!\";\n } else {\n return $user;\n }\n\n }", "title": "" }, { "docid": "91372ee9c40c21496408cb4f5abd253a", "score": "0.6898159", "text": "function getData(){\n return [\n 'name' => 'Dexter',\n 'email' => '[email protected]',\n 'username' => 'dexneutron',\n ];\n\n }", "title": "" }, { "docid": "9d911929a05a23df4148f2675d155ccb", "score": "0.6893233", "text": "function getUserInfo();", "title": "" }, { "docid": "75cdc8a39e76d705ca2ee7d604b0fc54", "score": "0.68918675", "text": "public function data(){\n\t\t\treturn data_karyawan::find(\\Auth::user()->id_karyawan);\n\t\t}", "title": "" }, { "docid": "4942248a5666a591332c1808fe7a5393", "score": "0.68869054", "text": "public function getUser()\n {\n $user = json_decode($this->provider->request('/me?fields=id,name,email,picture,link'), true);\n\n return [\n 'facebook_id' => $user[ 'id' ],\n 'email' => $user[ 'email' ],\n 'name' => $user[ 'name' ],\n ];\n }", "title": "" }, { "docid": "eb1efb8f01339008673c1402de963fa2", "score": "0.68867725", "text": "protected function getUser() {\n $account_id = $this->getAccountId();\n $data = $this->get('https://www.drupal.org/api-d7/user.json?name=' . urlencode($account_id));\n if (isset($data['list']) && count($data['list']) === 1) {\n return reset($data['list']);\n }\n else {\n return [];\n }\n }", "title": "" }, { "docid": "380f6b5125b05d0cfcf8be8e7477b9b8", "score": "0.68866676", "text": "public function getUserDataById($id){\n $client = $this->getClient();\n $user_data = $client->api(\"users/\".$id, 'GET')[\"data\"];\n return $user_data;\n }", "title": "" }, { "docid": "2b7352c0524c3faf10721829d1a878ce", "score": "0.6883107", "text": "public function userInfo()\n {\n $user_info = [];\n\n $current_user = wp_get_current_user();\n $user_name = $current_user->user_login;\n\n array_push($user_info, $user_name); //[0]\n\n return $user_info;\n }", "title": "" }, { "docid": "ab68616661c3a457f939361cb075375e", "score": "0.6879887", "text": "public function getUserInfo() {\n if (!isset($this->access_token)) {\n $auth = $this->authenticate();\n }\n\n $user_info_url = \"https://{$this->host}/oauth/userinfo\";\n $headers = $this->getHeaders($this->access_token);\n $response = Unirest\\Request::get($user_info_url, $headers);\n $json = $response->body;\n return $json;\n }", "title": "" } ]
ee44cf650e9c77ff7bc7ca0b9b8f2af6
The location of the encryption keys.
[ { "docid": "dc9dee3ced2d33061d9f1b23a1a5e7ec", "score": "0.5183221", "text": "public static function keyPath($file)\n {\n $file = ltrim($file, '/\\\\');\n\n return static::$keyPath\n ? rtrim(static::$keyPath, '/\\\\').DIRECTORY_SEPARATOR.$file\n : storage_path($file);\n }", "title": "" } ]
[ { "docid": "d6010853ac58b93993e0b13a2e4f886d", "score": "0.73417705", "text": "protected static function getKeyPath() {\r\n return Framework::getInstance()->getInstallationPath() . '/protected/encryption.key';\r\n }", "title": "" }, { "docid": "bca8262e3adc5f8eca08b28e698e7a23", "score": "0.7074323", "text": "public function getKeysDirectory()\n {\n return $this->keysDirectory;\n }", "title": "" }, { "docid": "d20da62169f00bb44160dbbf8ef20bd9", "score": "0.6436083", "text": "public function getStoragePath() {\n return $this->getPath() . DIRECTORY_SEPARATOR . '.letsencrypt';\n }", "title": "" }, { "docid": "8983bc10dc5f41150ce6594ec10d0347", "score": "0.62678707", "text": "function getEncryptionKey() {\r\n return file_get_contents(dirname($_SERVER['DOCUMENT_ROOT']) . \"/db.key\");\r\n }", "title": "" }, { "docid": "f3f68655d4f9ff2e32506891a0bed0f8", "score": "0.58044714", "text": "public function get_central_localkeys() {\n\t\treturn $this->get_option('updraft_central_localkeys');\n\t}", "title": "" }, { "docid": "fc178236f25dfb5e1b5ec0355462f338", "score": "0.57960266", "text": "protected function getEncryptionPrefix(): string\n {\n return config('ciphersweet.backend');\n }", "title": "" }, { "docid": "9b91a0d3b0da266d81507379c5ba6744", "score": "0.57745796", "text": "public function keyIndexBackupPath() {\n return self::BIP32Path([\n \"m\", $this->keyIndex\n ]);\n }", "title": "" }, { "docid": "d41876d93a671ce94f9c036a4aabbe36", "score": "0.5698957", "text": "public function getKeysFromSrcFiles();", "title": "" }, { "docid": "7b4035a8a072d977c17fe6b50214e25a", "score": "0.5681299", "text": "public function getEncKey()\n {\n return $this->config['enckey'];\n }", "title": "" }, { "docid": "df4821ccdc1aadf2fa6fd9868a046db5", "score": "0.56562406", "text": "public function getKeystoreUri()\n {\n return $this->keystore_uri;\n }", "title": "" }, { "docid": "8bcd4052eb687057d9835d76502291da", "score": "0.55907273", "text": "public function getLicenseKeyPath()\n\t{\n\t\treturn $this->getConfigPath().'license.key';\n\t}", "title": "" }, { "docid": "7aafbc2fce7c3ce081ba9e9c8a04fede", "score": "0.5555991", "text": "protected static function loadKey() { \r\n return KeyFactory::loadEncryptionKey(static::getKeyPath());\r\n }", "title": "" }, { "docid": "635bb2c99c1f1165243b577bba267b04", "score": "0.5553835", "text": "public function getJwksUri()\r\n {\r\n return $this->jwks_uri;\r\n }", "title": "" }, { "docid": "3a29170597f50a1df1b10fd47ce735c0", "score": "0.55511755", "text": "public function keys()\n\t{\t\n\t\t$keys = $this->client->components($config);\n\n\t\t$delimeter = Kohana::$config->load('jquarry.profile.key_delimeter');\n\t\t\n\t\treturn implode($delimeter, $keys);\n\t}", "title": "" }, { "docid": "476ab7318582d2fdd53602f83fb59ce1", "score": "0.55118513", "text": "private function encryption_key() {\n\t\treturn SECURE_AUTH_KEY;\n\t}", "title": "" }, { "docid": "b3ef7d24c37fa587afbd8fd61abca5d5", "score": "0.5484012", "text": "public function keys()\n {\n return $this->config()['keys'] ?? [];\n }", "title": "" }, { "docid": "f9fb51ce2142363285246373de113de1", "score": "0.547915", "text": "protected function getAesryptPrefix()\n {\n return Config::has('aescrypt.prefix') ? Config::get('aescrypt.prefix') : '__AESCRYPT__:';\n }", "title": "" }, { "docid": "9cec3566e33a13886b866984ffaa1e15", "score": "0.5473388", "text": "protected function setupKeys()\n {\n $this->keys = [\n 'VA_PAYBILL' => $this->repository->paybillNumber,\n 'VA_PASSWORD' => $this->password,\n 'VA_TIMESTAMP' => $this->timestamp,\n 'VA_TRANS_ID' => $this->getTransactionNumber(),\n 'VA_REF_ID' => $this->referenceId,\n 'VA_AMOUNT' => $this->amount,\n 'VA_NUMBER' => $this->number,\n 'VA_CALL_URL' => $this->repository->callbackUrl,\n 'VA_CALL_METHOD' => $this->repository->callbackMethod,\n ];\n }", "title": "" }, { "docid": "35ae2e7eb127e329ab591a80df6a9bd7", "score": "0.54563373", "text": "private function oAuthIdsPath()\n {\n return cache_path('oauth_ids.yaml');\n }", "title": "" }, { "docid": "f29ddc773281e02cfccfda8afbaf4c78", "score": "0.54443574", "text": "public function getOtpConfigEncryptionKey()\n\t{\n\t\treturn JFactory::getConfig()->get('secret');\n\t}", "title": "" }, { "docid": "d9f5a80ef94bfd09b861404bd87c91bf", "score": "0.54395795", "text": "public function getEncrypting();", "title": "" }, { "docid": "cacf2119f25f70fcb641d54344658662", "score": "0.54350245", "text": "private function keys(): array\n {\n return [\n 'api_key' => $this->getApiKey(),\n 'api_key_secret' => $this->getApiKeySecret(),\n 'access_token' => $this->getAccessToken(),\n 'access_token_secret' => $this->getAccessTokenSecret(),\n ];\n }", "title": "" }, { "docid": "15971f06aa2fca7013a39072b404c607", "score": "0.54316235", "text": "public function keyObject()\n {\n return [\n 'partitionId' => $this->partitionId(\n $this->projectId,\n $this->options['namespaceId'],\n $this->options['databaseId']\n ),\n 'path' => $this->path\n ];\n }", "title": "" }, { "docid": "49fe5bcfaf5d5041ff42efe203c5c688", "score": "0.54072154", "text": "public static function getKey()\n {\n return \\Illuminate\\Encryption\\Encrypter::getKey();\n }", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5405616", "text": "public function keys();", "title": "" }, { "docid": "0bf5793e48984bb1f30b77dc28c2685c", "score": "0.5389154", "text": "public function getJwksUri()\n {\n return $this->jwksUri;\n }", "title": "" }, { "docid": "08bafd24e7b62e33fb887cf2e77a7369", "score": "0.5378179", "text": "public function getLocations()\n {\n return array(\n 'plugin' => $this->root.'/app/plugins/{$name}/',\n 'theme' => $this->root.'/app/themes/{$name}/',\n 'muplugin' => $this->root.'/app/mu-plugins/{$name}/',\n 'dropin' => $this->root.'/app/{$name}/',\n );\n }", "title": "" }, { "docid": "dce541211c1947017eb3fb1ddae5fca3", "score": "0.5337395", "text": "public static function getKeys()\n\t{\n\t\treturn [static::$key, static::$nonce];\n\t}", "title": "" }, { "docid": "cfd317252b8d96d7015365f36720bcec", "score": "0.5316048", "text": "public function getKey(): string\n {\n $parts = [\n 'date' => $this->getDate(),\n 'time' => $this->getTime(),\n ];\n return RotateConfig::path($parts);\n }", "title": "" }, { "docid": "06f72f2a86319a64ae71ac2ce11a01ed", "score": "0.53145224", "text": "public function pathdir()\n\t{\n\t\treturn Upload_Server::combine_path($this->path, $this->key);\n\t}", "title": "" }, { "docid": "350a9151bd321ed3455c7068edb7338c", "score": "0.53125554", "text": "public function getRelativeDataDir()\n\t{\n\t\treturn 'cer';\n\t}", "title": "" }, { "docid": "1a5dc5974b9faa3cb70afb311a2bb02d", "score": "0.5298059", "text": "public function getKeysFromDestFiles($lang);", "title": "" }, { "docid": "2043acd989070257422535ffb135692a", "score": "0.528943", "text": "public function getResourceStoreLocation() {\n return Config::get('PRODUCT_IMG_STORE_LOCATION');\n }", "title": "" }, { "docid": "1e0d0250dc0bc336c3f98d720b80f385", "score": "0.52871597", "text": "protected function getEncrypts()\n {\n return property_exists($this, 'encrypts') ? $this->encrypts : [];\n }", "title": "" }, { "docid": "347ba572bb2d5e8c8f39fc0edc670334", "score": "0.5276537", "text": "public function getAllowedKeys()\n {\n $array = array(\n 'deregister_scripts',\n 'scripts',\n 'styles',\n 'localize',\n 'custom',\n 'customize',\n );\n return array_map(array(&$this, 'addPrefix'), $array);\n }", "title": "" }, { "docid": "84373019201d4893aa726329bf610b12", "score": "0.5269666", "text": "public static function getConfigRootKeyName(): string\n {\n return \\basename(static::getConfigPath(), '.php');\n }", "title": "" }, { "docid": "683d3016e17a7b2dbcd5f0fa9e864122", "score": "0.52672255", "text": "public function getKeys()\n {\n $settings = Capsule::table('tbladdonmodules')->where('module', 'bulutfon')->get();\n\n $callbackUrl = Capsule::table('tblconfiguration')->where('setting', 'SystemURL')->first();\n\n $callbackUrl = rtrim(preg_replace(\"/^http:/i\", \"https:\", $callbackUrl->value), '/') . '/modules/addons/bulutfon/callback.php';\n\n $fields = array('clientId', 'clientSecret');\n\n $keys = array('redirectUri' => $callbackUrl);\n\n foreach ($settings as $key) {\n if (in_array($key->setting, $fields)) {\n $keys[$key->setting] = $key->value;\n }\n }\n\n $keys['verifySSL'] = false;\n\n return $keys;\n }", "title": "" }, { "docid": "a694710a838548f65628be835909b775", "score": "0.5250098", "text": "public function key() {\n return key($this->storage);\n }", "title": "" }, { "docid": "1802c8256ead13e09ea968b48fcb9780", "score": "0.52471447", "text": "private function loadAllSKey()\r\n\t{\r\n\t\t$keyfile_name = dirname(__FILE__) . '/../../config/SKEY';\r\n\t\t$keyfile=@fopen($keyfile_name,\"r\");\r\n\t\t$keyfile_stat = @stat($keyfile_name);\r\n\t\tif ($keyfile && $keyfile_stat) {\r\n\t\t\t$keyfile_ctime = $keyfile_stat['ctime'];\r\n\t\t\t$current = time();\r\n\t\t\t$lineNum = -1;\r\n\t\t\twhile (!feof($keyfile))\r\n\t\t\t{\r\n\t\t\t\t++$lineNum;\r\n\t\t\t\t$line = trim(fgets($keyfile), \"\\n\");\r\n\t\t\t\tif (!empty($line)) {\r\n\t\t\t\t\tif (abs($current - $keyfile_ctime ) < 3600 && $lineNum == 0) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->_SKEY_ARRAY[] = $line;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfclose($keyfile);\r\n\t\t\t\r\n\t\t\t//if the key file was recently updated ( <1 hour ), use the old key for cookie generating\r\n\t\t\tif (abs($current - $keyfile_ctime ) < 3600 && count($this->_SKEY_ARRAY) > 1) {\r\n\t\t\t\t$this->_SKEY_HEAD_ID = 1;\r\n\t\t\t} else {\r\n\t\t\t\t$this->_SKEY_HEAD_ID = 0;\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t\tif (count($this->_SKEY_ARRAY) == 0) {\r\n\t\t\t$this->_SKEY_ARRAY[] = \"dEfaUltSKy\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ee751dbb67859489d7895a85fda7844c", "score": "0.5241505", "text": "public function keys()\n {\n // TODO: Implement keys() method.\n }", "title": "" }, { "docid": "9ad4ef5703f47f654b4ab39560f4f0ee", "score": "0.5238911", "text": "public function keyIndexPath() {\n return self::BIP32Path([\n \"m\", \"{$this->keyIndex}'\"\n ]);\n }", "title": "" }, { "docid": "38d3e1f1bc2791d86f39b0941e7a2cdc", "score": "0.5230431", "text": "public function getAddonKeys()\n {\n return $this->addon_keys;\n }", "title": "" }, { "docid": "d4eff1fdc8c4ae01e427270f0539eb56", "score": "0.52296287", "text": "public function generateEncryptionKey()\n\t{\n\t\t$length = 16;\n\n\t\t$this->ci->load->library('Encryption');\n\t\t$key = bin2hex( $this->ci->encryption->create_key( $length ) );\n\n\t\t$replace = \"hex2bin( '$key' )\";\n\n\t\t$kit = new FileKit();\n\n\t\t$kit->replaceIn(BUILDBASE .'../application/config/config.php', \"'PLEASE_CHANGE_ME!'\", $replace);\n\t}", "title": "" }, { "docid": "c67265c6ddfedf31908d81c686c394d4", "score": "0.5201444", "text": "public function getKeystorePasswordUri()\n {\n return $this->keystore_password_uri;\n }", "title": "" }, { "docid": "a342e52c0a717181e4d0bf5d88e6d352", "score": "0.5191569", "text": "public function getAllKeys()\n {\n $trans_files = $this->getTransFileName();\n $all_keys = $this->overallGetAllKeysFromAllDri($trans_files);\n\n return $all_keys;\n }", "title": "" }, { "docid": "9e590a272714fac08baa170e77c2f775", "score": "0.51910895", "text": "public function getLocKey()\n {\n return $this->loc_key;\n }", "title": "" }, { "docid": "50c8f564861d3c1c4bd87f6cbbbbfa09", "score": "0.51859707", "text": "protected function getDirectory()\n {\n return [\n 'repository' => config('repository.path.repository'),\n 'contract' => config('repository.path.contract')\n ];\n }", "title": "" }, { "docid": "931bd62b9da36d653c9fef8aea29f83e", "score": "0.51832795", "text": "public function getAllKeys();", "title": "" }, { "docid": "fbb9fecfd7ba4cd7d14098ba2c6f947f", "score": "0.5178866", "text": "public function getKmsKeyUri()\n {\n return $this->kms_key_uri;\n }", "title": "" }, { "docid": "dc1a6dfb76ab4753146f9b7df75472ce", "score": "0.5173805", "text": "public function key(): string\n {\n return strval(key($this->uploadedFiles));\n }", "title": "" }, { "docid": "991ba94090e257e840b028d326621d96", "score": "0.516409", "text": "static function GetKeyArray()\n {\n return array('appId' => self::$ApiId, 'secret' => self::$Secret, 'cookie' => true);\n }", "title": "" }, { "docid": "943ac001d30d8825f9295ddaea2aff4c", "score": "0.5151174", "text": "function encryptionKey() {\n $keyAscii = trim(file_get_contents(\"../config/secret-key.txt\"));\n return $keyAscii;\n}", "title": "" }, { "docid": "cc52045932709247dcd59b3337c86daf", "score": "0.51221067", "text": "protected function getKey(): string\n {\n return config('services.viva.public_key');\n }", "title": "" }, { "docid": "5a359a73e4feb6d6f6fd3fb25a0275d7", "score": "0.51189715", "text": "public function key() {\n\t\treturn key($this->storage);\n\t}", "title": "" }, { "docid": "15039aa03716be3380da1b2836408945", "score": "0.5116446", "text": "public function providerKeys()\n {\n return array( [ '463f4b5ff3885ebc0d33ee2c5ec732d2af69f6152cefd4becbffb7bf74cd9ac8' , true , 1 ]\n , [ 'd6cbec51334a8054a1ef46508bf92badce119bd7fb6441bcb434ebc91f212f9d' , true , 2 ]\n , [ 'd48c3659bdf66e2eccce42f4111c95e8505ed3da2706c740890f62daf3f2a213' , true , 3 ]\n , [ '309e228a3c7d252f0939d8d0517d04d9b9f874bab4eec4c4218f952edd4d85d9' , true , 4 ]\n , [ 'e1261474304406f7a14844227fe4c74261544c2427b5b765ce6225f076879827' , true , 5 ]\n , [ '97577059f6d16ea6503739151273b18934916c74873a3f020e749e2c25892cb6' , true , 6 ]\n , [ '70800c40b939a576f08334ec47d5976a0bd9a515003518df39f3f0ec175d427' , false , false ] //too short\n , [ '0423809fc5f5785af5c08a6fbbd045cc8f883ecded80bd32e522b1b14746ebc9' , false , false ] //wrong\n , [ '' , false , false ] //empty\n ); \n }", "title": "" }, { "docid": "0a9d4ea7248595920d1590029681dfa7", "score": "0.51094013", "text": "function keys() {\n global $db;\n\n $results = $db->Execute(\"select configuration_key from \" . TABLE_CONFIGURATION . \"\n where configuration_key like 'MODULE_PAYMENT_GETFINANCING_%' \" . \"\n order by sort_order\");\n $keys = array();\n while (!$results->EOF) {\n array_push($keys, $results->fields['configuration_key']);\n $results->MoveNext();\n }\n\n return $keys;\n }", "title": "" }, { "docid": "b30122794e4f3437525e6d4c50601aca", "score": "0.510755", "text": "function createKeys()\n {\n //Create Can Keys \n shuffle(Lib\\Can::$base);\n shuffle(Lib\\Can::$extra_base);\n file_put_contents($this->configKeysPath.'can.key', implode(Lib\\Can::$base).\"\\n\".implode(Lib\\Can::$extra_base));\n\n $SSLcnf = [];\n $dn = []; \n\n //get configurations\n include $this->configKeysPath.'openssl.config.php';\n\n // Generate a new private (and public) key pair\n $privkey = openssl_pkey_new($SSLcnf);\n\n // Generate a certificate signing request\n $csr = openssl_csr_new($dn, $privkey, $SSLcnf);\n\n // You will usually want to create a self-signed certificate at this\n // point until your CA fulfills your request.\n // This creates a self-signed cert that is valid for 365 days\n $sscert = openssl_csr_sign($csr, null, $privkey, 365, $SSLcnf);\n\n //CERTIFICADO\n openssl_csr_export_to_file($csr, $this->configKeysPath.'certificate.crt', false);\n\n //CERTIFICADO AUTO-ASSINADO\n openssl_x509_export_to_file($sscert, $this->configKeysPath.'self_signed_certificate.cer', false);\n\n //CHAVE PRIVADA (private.pem)\n openssl_pkey_export_to_file($privkey , $this->configKeysPath.'private.key', null, $SSLcnf);\n\n //CHAVE PÚBLICA (public.key)\n return file_put_contents($this->configKeysPath.'public.key', openssl_pkey_get_details($privkey)['key']);\n }", "title": "" }, { "docid": "6b2f88472136aa285ce1e613f926e34d", "score": "0.50963527", "text": "public function getKeyInfo()\n {\n return $this->getEncryptedKey()->getKeyInfo();\n }", "title": "" }, { "docid": "ae6a4d2c139a569c92ed389db822d120", "score": "0.50932723", "text": "public function getKeys()\n {\n return explode('/', $this->url);\n }", "title": "" }, { "docid": "8787309242342ca28c139ffd5299085b", "score": "0.5089739", "text": "public function getKeyPasswordUri()\n {\n return $this->key_password_uri;\n }", "title": "" }, { "docid": "3a56dc1195e86d00ac591626fa1e8bc7", "score": "0.50876606", "text": "private function getPrivateKeyFilename()\n {\n return PathUtils::combinePathWithFile($this->tempdirectory, self::PRIVATE_KEY_FILENAME);\n }", "title": "" }, { "docid": "a5ca7bba8703250cfedfdb27a0912e7e", "score": "0.50836957", "text": "public function get_base_key()\n {\n return $this->base_key;\n }", "title": "" }, { "docid": "8665467f30281639045ca01035655a49", "score": "0.5073711", "text": "abstract protected function getEncryptionKey($keySalt = \"\");", "title": "" }, { "docid": "cea57466ee17919624bff2024b8bd63b", "score": "0.50704736", "text": "public function getApiKey()\n {\n switch ($this->getApiMode()) {\n case Convert_Porterbuddy_Model_Carrier::MODE_PRODUCTION:\n return Mage::getStoreConfig(self::XML_PATH_PRODUCTION_API_KEY);\n case Convert_Porterbuddy_Model_Carrier::MODE_TESTING:\n return Mage::getStoreConfig(self::XML_PATH_TESTING_API_KEY);\n default:\n return Mage::getStoreConfig(self::XML_PATH_DEVELOPMENT_API_KEY);\n }\n }", "title": "" }, { "docid": "112c01842c8207b6a9cc8983bbb588cb", "score": "0.5066307", "text": "public function backupPath() {\n return self::BIP32Path([\n \"m\", $this->keyIndex, $this->chain, $this->address\n ]);\n }", "title": "" }, { "docid": "fb02fd337304aa406a68f78a61502a01", "score": "0.50463057", "text": "protected function getConfigsFolderPath()\n {\n return $this->laravel->basePath().DIRECTORY_SEPARATOR.'config';\n }", "title": "" }, { "docid": "0887c8c7743500d31c740473d3d1dd00", "score": "0.5036519", "text": "public function getRequiredConfigKeys()\n {\n return $this->requiredConfigKeys;\n }", "title": "" }, { "docid": "d9d4328ba4069aaaee65e6d41935e129", "score": "0.503312", "text": "function module_folders()\n{\n\treturn array_keys(Install::$locations);\n}", "title": "" }, { "docid": "481f7ae5be14e2ff22ecf3aec834d063", "score": "0.50268894", "text": "public function ownerKeyPath()\n {\n return $this->project->user->keyPath();\n }", "title": "" }, { "docid": "0a8dcec9391d74d8a3b2ea0b215aa44f", "score": "0.5018008", "text": "protected function generateFormEncryptionKeys()\n {\n $rsa = new \\phpseclib\\Crypt\\RSA();\n $password = Utils::generateStrongPassword(43);\n\n $rsa->comment = $this->projectName . \" YesSecurity\";\n $rsa->setPassword($password);\n\n $keysCreated = $rsa->createKey(2048);\n\n return [\n 'publicKey' => $keysCreated['publickey'],\n 'privateKey' => $keysCreated['privatekey'],\n 'password' => $password\n ];\n }", "title": "" }, { "docid": "44b0fb0e59d9ee230830c8c0365e83a2", "score": "0.50082076", "text": "public function configPaths()\n {\n return [\n 'docks.' . self::class => dirname(__DIR__, 3) . '/config/docks/vendors.php',\n 'abilities' => dirname(__DIR__, 3) . '/config/abilities.php',\n ];\n }", "title": "" }, { "docid": "7fa66f129cdf38124fb8071eb964d8b9", "score": "0.50066155", "text": "public function getPublicApiKey()\n {\n switch ($this->getApiMode()) {\n case Convert_Porterbuddy_Model_Carrier::MODE_PRODUCTION:\n return Mage::getStoreConfig(self::XML_PATH_PRODUCTION_PUBLIC_API_KEY);\n case Convert_Porterbuddy_Model_Carrier::MODE_TESTING:\n return Mage::getStoreConfig(self::XML_PATH_TESTING_PUBLIC_API_KEY);\n default:\n return Mage::getStoreConfig(self::XML_PATH_DEVELOPMENT_PUBLIC_API_KEY);\n }\n }", "title": "" }, { "docid": "94dca7034bb28a682744afbc7961b815", "score": "0.50033826", "text": "private function getPublicKeyFilename()\n {\n return PathUtils::combinePathWithFile($this->tempdirectory, self::PUBLIC_KEY_FILENAME);\n }", "title": "" }, { "docid": "c155b28e5f74c24a242b9a9ec386e7bd", "score": "0.5000428", "text": "public function getKeys()\n {\n $results = ORM::for_table('tbladdonmodules')->where('module', 'bulutfon')->findMany();\n\n $url = ORM::for_table('tblconfiguration')->where('setting','SystemURL')->findOne();\n\n $fields = array('clientId','clientSecret','verifySSL');\n\n $keys = array();\n\n foreach($results as $key){\n if(in_array($key->setting, $fields)){\n $keys[$key->setting] = $key->value;\n }\n }\n \n // Url must be https\n $keys['redirectUri'] = rtrim(preg_replace(\"/^http:/i\", \"https:\", $url->value),'/').'/modules/addons/bulutfon/callback.php';\n\n $keys['verifySSL'] = filter_var($keys['verifySSL'], FILTER_VALIDATE_BOOLEAN);\n\n return $keys;\n }", "title": "" }, { "docid": "40bd9de35bc04bc716ae4977aa6eb2f1", "score": "0.4998983", "text": "public static function getSkinKeys() {\n\t\treturn array_merge(self::getCustomSkinKeys(), self::getStandardSkinKeys());\n\t}", "title": "" }, { "docid": "b782bbd41df63972a1ce2bccd8ef9853", "score": "0.49984413", "text": "private static function get_key() {\n $key_path = Core::get_encryption_key_path();\n $key_filepath = sprintf( '%s/%s', rtrim( $key_path, '/' ), self::$key_file );\n if( !file_exists( $key_filepath ) ) {\n return false;\n }\n $key = file_get_contents( $key_filepath );\n if( is_string( $key ) && !empty( $key ) ) {\n return $key;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "13f7b5bc3fbe8f2c9753460c87b5c6b6", "score": "0.499772", "text": "public function findKey()\n {\n if ($id = $this->provider->user->provider_key_id) {\n return $this->request('get', '/account/keys/'.$id)['ssh_key'];\n }\n\n return collect($this->aggregate('get', '/account/keys', 'ssh_keys'))->first(function ($key) {\n return $key['public_key'] == trim($this->provider->user->public_worker_key);\n });\n }", "title": "" }, { "docid": "ebae860385b1c7dfcabc7e25be2c43d6", "score": "0.4984476", "text": "public static function getKey() :string\n {\n return base64_encode(sodium_crypto_box_keypair());\n }", "title": "" }, { "docid": "9e7147a0c77531d8131f0bac5951e9e7", "score": "0.49781176", "text": "public function getDerivedEncryptionKey()\n {\n return $this->getDerivedKey(\n static::PURPOSE_ENCRYPTION,\n static::PURPOSE_ENCRYPTION\n );\n }", "title": "" }, { "docid": "2785c3424fff926f3dd68733b4ffec3e", "score": "0.4977786", "text": "public function get_installer_images_path()\n\t{\n\t\treturn JPATH_ADMINISTRATOR . '/components/com_akeeba/Master/Installers';\n\t}", "title": "" }, { "docid": "ccf0623978563df6da8fe70f2162db7f", "score": "0.49614483", "text": "function loadEncryptionKeyFromConfig() {\n return Key::loadFromAsciiSafeString(encryptionKey());\n}", "title": "" }, { "docid": "8cefedbf2f04d4c52e15c532aa2d9257", "score": "0.49534526", "text": "public function getFiles()\n {\n return $this->getKey('Files');\n }", "title": "" }, { "docid": "dc3ae9f90e3b76f81b38d2450215b279", "score": "0.49520347", "text": "public function getDiskEncryptionConfiguration()\n {\n return $this->disk_encryption_configuration;\n }", "title": "" }, { "docid": "573c48ca7073eba899287bb29d18cad0", "score": "0.49480343", "text": "public function getApiKeysUrl(): ?string\n {\n return $this->getBaseUrl() . self::CREDENTIALS_AUTH_KEYS_URL;\n }", "title": "" }, { "docid": "e5ae3300363c11973438f79bdb5f3ec3", "score": "0.49417275", "text": "public function getPublicKey() {\n return array('n' => $this->n, 'e' => $this->e);\n }", "title": "" }, { "docid": "0266682fa34afd5f802fb700ae957d83", "score": "0.49388698", "text": "public function getStorageKey() {\n\t\treturn $this->getKey();\n\t}", "title": "" }, { "docid": "4c901c0aed5ffdf02cf6e3b2ce123955", "score": "0.49369466", "text": "protected function getFileLocation()\n\t{\n\t\t$config_locations = $this->command->config['server']['configuration'];\n\t\t$class_name = $this->getClassName();\n\t\tif (!array_key_exists($class_name, $config_locations))\n\t\t\tthrow new ConfigurationManagerException('There is no config location defined for ' . $class_name);\n\n\t\t// Return the result.\n\t\treturn $config_locations[$class_name];\n\t}", "title": "" }, { "docid": "b98f992db1412f82be2223a4e652fb4b", "score": "0.49360135", "text": "public function getAllSourceKeys(): array;", "title": "" }, { "docid": "87b5eee95c0b147aa2cc6ce13c392784", "score": "0.49341342", "text": "public function getSupportedEncryptionCiphers() : array;", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.49299064", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.49299064", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.49299064", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.49299064", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.49299064", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" } ]
b977bafdd81d6358ab0b83e68ebe461a
Check to see if the shortcode exists in the post content
[ { "docid": "83aa16d5ed2b9a704d1d9ee6de40b619", "score": "0.66886634", "text": "public static function ShortcodeInPost($shortcode_name, $post_id) {\n $post = get_post($post_id);\n if ($post) {\n $pattern = \"(.?)\\[($shortcode_name)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/\\2\\])?(.?)\";\n preg_match('/' . $pattern . '/s', $post->post_content, $matches);\n if (is_array($matches) && isset($matches[2]) && $matches[2] == $shortcode_name) {\n return true;\n }\n }\n return false;\n }", "title": "" } ]
[ { "docid": "9f16f44ae62556f8f6805b0a23f2e96d", "score": "0.8101258", "text": "function sh_has_shortcode( $shortcode = '' ) {\n\tglobal $wp_query;\n\tforeach( $wp_query->posts as $post ) {\n\t\tif ( ! empty( $shortcode ) && stripos($post->post_content, '[' . $shortcode) !== false ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "9da34909a1a60d70beda59d83ddf56a2", "score": "0.7988461", "text": "function dcl_check_shortcode( $dcl_shortcode = false ) {\n\n\t\tglobal $post;\n\t\t\n\t\t$post_obj = get_post( $post->ID );\n\t\t\n\t\t$found = false;\n\n\t\tif ( !$dcl_shortcode ) {\n\t\t\treturn $found;\n\t\t}\n\t\telse if ( stripos( $post_obj->post_content, '[' . $dcl_shortcode . ']' ) !== false ) {\n\t\t\t$found = true;\n\t\t}\n\t\t\n\t\treturn $found;\n\t}", "title": "" }, { "docid": "fd89222a55ad50269e9ac61527259bb5", "score": "0.7794535", "text": "function has_shortcode($shortcode_name, $post_id = 0) {\n $post = &get_post($post_id);\n $post_id = isset($post->ID) ? $post->ID : (int) $post_id;\n return WP_Shortcodes_API::ShortcodeInPost($shortcode_name, $post_id);\n }", "title": "" }, { "docid": "82b52fe643df8e43eba433a9e2cd567e", "score": "0.76534724", "text": "function moments_qodef_has_shortcode( $shortcode, $content = '' ) {\n\t\t$has_shortcode = false;\n\n\t\tif ( $shortcode ) {\n\t\t\t//if content variable isn't past\n\t\t\tif ( $content == '' ) {\n\t\t\t\t//take content from current post\n\t\t\t\t$page_id = moments_qodef_get_page_id();\n\t\t\t\tif ( ! empty( $page_id ) ) {\n\t\t\t\t\t$current_post = get_post( $page_id );\n\n\t\t\t\t\tif ( is_object( $current_post ) && property_exists( $current_post, 'post_content' ) ) {\n\t\t\t\t\t\t$content = $current_post->post_content;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//does content has shortcode added?\n\t\t\tif ( stripos( $content, '[' . $shortcode ) !== false ) {\n\t\t\t\t$has_shortcode = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $has_shortcode;\n\t}", "title": "" }, { "docid": "9018ca3a5afa8a73087b016d0be82e26", "score": "0.7579273", "text": "function bbp_has_shortcode($text = '')\n{\n}", "title": "" }, { "docid": "e7116ecff362f84aeaff130a485beb88", "score": "0.71284634", "text": "public function check_for_shortcode() {\n\t\tif( function_exists( 'is_checkout_pay_page' ) && is_checkout_pay_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$checkout_page_id = wc_get_page_id( 'checkout' );\n\n\t\t// Check if page ID is set in WooCommerce\n\t\tif( ! $checkout_page_id || $checkout_page_id <= 0 ) {\n\t\t return;\n }\n\n\t\t$content = get_post_field( 'post_content', $checkout_page_id );\n\n\t\t/**\n\t\t * If the current post contains the shortcode and invoice is enabled\n\t\t * set the variable using_get_address_shortcode to true\n\t\t */\n\t\tif( has_shortcode( $content, 'svea_get_address' )\n\t\t\t&& WC_Gateway_Svea_Invoice::init()->enabled === \"yes\" ) {\n\t\t\tself::$using_get_address_shortcode = true;\n\t\t}\n\t}", "title": "" }, { "docid": "8eb7ee09bafd2c2a28d6bcadddf664b6", "score": "0.69083583", "text": "function check_html_layout_shortcode($content){\n\tif(has_shortcode( $content, 'one_full') || has_shortcode( $content, 'one_half') || has_shortcode( $content, 'one_third') || has_shortcode( $content, 'two_third') || has_shortcode( $content, 'one_fourth') || has_shortcode( $content, 'three_fourth')){\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "cfe575393fb91c054c5fda9b9d857f3a", "score": "0.6802949", "text": "function test_shortcode_added() {\n\t\t$this->assertTrue( shortcode_exists( 'espn' ) );\n\t}", "title": "" }, { "docid": "5b1fe6773b8f678623036ce803a85416", "score": "0.6748566", "text": "function kloe_qodef_has_blog_shortcode() {\n\t\t$blog_shortcodes = array(\n\t\t\t'qodef_blog_list',\n\t\t\t'qodef_blog_slider',\n\t\t\t'qodef_blog_carousel'\n\t\t);\n\n\t\t$slider_field = get_post_meta(kloe_qodef_get_page_id(), 'qodef_page_slider_meta', true); //TODO change\n\n\t\tforeach ($blog_shortcodes as $blog_shortcode) {\n\t\t\t$has_shortcode = kloe_qodef_has_shortcode($blog_shortcode) || kloe_qodef_has_shortcode($blog_shortcode, $slider_field);\n\n\t\t\tif($has_shortcode) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "58ad882412e3e73f3c36ea845219b4ef", "score": "0.6639591", "text": "public function registered($shortcode)\n {\n return array_key_exists($shortcode, self::$shortcodes);\n }", "title": "" }, { "docid": "39404a5dd698c2b5fc5e54286db3e69f", "score": "0.64474255", "text": "function check_weaverii($content)\n {\n if (function_exists('weaverii_show_posts_shortcode'))\n C_NextGen_Shortcode_Manager::get_instance()->activate_all();\n\n return $content;\n }", "title": "" }, { "docid": "31aa81f9121af5a80461d829c8b0fa22", "score": "0.64376724", "text": "function add_shortcode( $atts, $content, $name ) {\n\t\t\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\t$post_id = get_the_ID();\n\n\t\tob_start();\n\t\tglobal $oxygen_vsb_css_caching_active;\n\t\techo \"<\".esc_attr($options['tag']).\" id='\" . esc_attr( $options['selector'] ) . \"' class='\" . esc_attr( $options['classes'] ) . \"'>\";\n\n\t\tif(isset($_REQUEST['oxy_preview_revision']) && is_numeric($_REQUEST['oxy_preview_revision'])) {\n\t\t\t$shortcodes = Oxygen_Revisions::get_post_meta_db( $post_id, null, true, null, OBJECT, $_REQUEST['oxy_preview_revision'] )->meta_value;\n\t\t}\n\t\telse if (isset($_REQUEST['xlink']) && $_REQUEST['xlink'] == \"css\" && $_REQUEST['nouniversal'] == \"true\") {\n\t\t\t// set random text so it does not look for template\n\t\t\t$shortcodes = \"no shortcodes\";\n\t\t} \n\t\telse if (isset($oxygen_vsb_css_caching_active) && $oxygen_vsb_css_caching_active===true) {\n\t\t\t$shortcodes = \"no shortcodes\";\n\t\t}\n\t\telse {\n\t\t\t$shortcodes = get_post_meta( $post_id, 'ct_builder_shortcodes', true );\n\t\t\tif( class_exists('Oxygen_Gutenberg') && get_post_meta( $post_id, 'ct_oxygenberg_full_page_block', true ) == '1' ) {\n\t\t\t $post = get_post($post_id);\n\t\t\t $shortcodes = do_blocks( $post->post_content );\n }\n\t\t}\n\n\t\tif(empty(trim($shortcodes))) {\n\n\t\t\t// find the template that has been assigned to innercontent\n\t\t\t$template = ct_get_inner_content_template();\n\n\t\t\tif($template) {\n\t\t\t\t$shortcodes = get_post_meta($template->ID, 'ct_builder_shortcodes', true);\n\t\t\t}\n\n\t\t\tif($shortcodes) {\n echo ct_do_shortcode($shortcodes);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// RENDER default content\n\t\t\t\tif(function_exists('is_woocommerce') && is_woocommerce()) {\n\t\t\t\t\twoocommerce_content();\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t // Use WordPress post content as inner content\n\t\t\t\t // if(!in_the_loop()) {\n\t\t\t while ( have_posts() ) {\n\t\t\t the_post();\n\t\t\t the_content();\n\t\t\t }\n\t\t\t // }\n\t\t\t // else {\n\t\t\t // \tthe_content();\n\t\t\t // }\n\t\t }\n\t\t }\n\n } else {\n\t\t // Use Oxygen designed inner content\n $content .= $shortcodes;\n }\n\n if ( ! empty( $content ) ) {\n\t echo ct_do_shortcode( $content );\n }\n\n echo \"</\".esc_attr($options['tag']).\">\";\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "f1301b28781e3b20236c11c637e152fb", "score": "0.63115764", "text": "public static function hasContent(): bool\n {\n return true;\n }", "title": "" }, { "docid": "e11e5bc24f79cc482651f158d7f2acf6", "score": "0.6251156", "text": "function test_shortcode() {\n\t\t// Create posts to test against\n\t\t$post_id = wl_create_post( '', 'post1', 'A post with no entities', 'publish', 'post' );\n\t\t$post_id1 = wl_create_post( '', 'post2', 'A post with an entity', 'publish', 'post' );\n\t\t$post_id2 = wl_create_post( '', 'post3', 'A post with two entities', 'publish', 'post' );\n\n\t\t$entity_id = wl_create_post( '', 'entity1', 'An Entity', 'publish', 'entity' );\n\t\t$entity_id2 = wl_create_post( '', 'entity2', 'Another Entity', 'publish', 'entity' );\n\t\t$entity_id3 = wl_create_post( '', 'entity3', 'Entity to Entity', 'publish', 'entity' );\n\n\t\twl_core_add_relation_instance( $post_id1, WL_WHAT_RELATION, $entity_id );\n\t\twl_core_add_relation_instance( $post_id2, WL_WHAT_RELATION, $entity_id );\n\t\twl_core_add_relation_instance( $post_id2, WL_WHAT_RELATION, $entity_id2 );\n\t\twl_core_add_relation_instance( $entity_id2, WL_WHAT_RELATION, $entity_id3 );\n\n\t\t// test post with no connected entities at all\n\t\t$this->go_to( '?p=' . $post_id );\n\t\t$output = do_shortcode( '[wl_cloud]' );\n\t\t$this->assertEquals( '', $output );\n\n\t\t// test post with a connected entity\n\t\t$this->go_to( '?p=' . $post_id1 );\n\t\t$output = do_shortcode( '[wl_cloud]' );\n\t\t$this->assertNotEquals( '', $output );\n\t}", "title": "" }, { "docid": "578a378b696a472bc2b67953fa4634de", "score": "0.62103355", "text": "function sofa_get_embed_shortcode($content) {\n\tpreg_match('/\\[embed(.*)](.*)\\[\\/embed]/', $content, $matches);\n\treturn $matches;\n}", "title": "" }, { "docid": "47a80df0ced3c1efe3facf98327ebcfd", "score": "0.6151295", "text": "function mts_post_has_moretag() {\n\treturn strpos( get_the_content(), '<!--more-->' );\n}", "title": "" }, { "docid": "ca5acf1add64a9c952ce93ce7711a999", "score": "0.61452675", "text": "public function hasContent()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "33069030d3beed2d030d1026126f8ad3", "score": "0.61076045", "text": "public function hasContent() : bool;", "title": "" }, { "docid": "a694b4fcea0d6e13e9862e8893d32acd", "score": "0.6104652", "text": "function is_recipe_post($postId){\n $tags = get_the_tags($wp_query->post->ID);\n \n // Go through the tags and look for the recipe tag\n if ($tags) {\n foreach($tags as $tag) {\n if( $tag->name == 'recipe' ){ \n return true;\n } \n }\n }\n \n return false;\n}", "title": "" }, { "docid": "ff6188649fb17dbd2e8e7faefaab120d", "score": "0.6090206", "text": "function test_espn_embed_shortcode_works() {\n\t\t$allowed_html = array(\n\t\t\t'div' => array(\n\t\t\t\t'class' => array(),\n\t\t\t),\n\t\t);\n\t\t$content = '[espn url=\"http://espn.go.com/video/clip?id=14500616\"]';\n\t\t$output = wp_kses( do_shortcode( $content ), $allowed_html );\n\t\t// Just check that the video container gets inserted because of an url-encoding nightmare\n\t\t$this->assertEquals( '<div class=\"content-media__video\"></div>', $output );\n\n\t\t// Bad URL should return nothing\n\t\t$content = '[espn url=\"https://boston.com\"]';\n\t\t$output = do_shortcode( $content );\n\t\t$this->assertEquals( '', $output );\n\t}", "title": "" }, { "docid": "e8e16cde997796da126ec76afe5224d2", "score": "0.6088043", "text": "function jhm_shorturl_auto_check($content) {\n\t\n\tif(!is_single()) { echo(do_shortcode($content)); return; }\n\t\n\t$_s = jhm_shorturl_settings_load();\n\tif(!empty($_s[\"auto\"])) {\n\t\t$content = $content . str_replace(\"\\'\", \"'\", str_replace('\\\"',\"'\", do_shortcode($_s[\"auto\"])));\n\t} \n\techo(do_shortcode($content));\n}", "title": "" }, { "docid": "810f4d7754dc9d28200b956f88c26dca", "score": "0.60795754", "text": "public function the_title_filter( $title, $id = null ) {\r\n\r\nif (has_shortcode( $title, 'lh_personalised_content' )){\r\n\r\n$title = do_shortcode($title);\r\n\r\n}\r\n\r\nreturn $title;\r\n}", "title": "" }, { "docid": "4d794f68f19a58d3465e5e7233a8f128", "score": "0.60448647", "text": "function member_only_shortcode($atts, $content = null)\n{\n if (is_user_logged_in() && !is_null($content) && !is_feed()) {\n return $content;\n }\n}", "title": "" }, { "docid": "056b167a00ec295331d60d35bf7a1d6c", "score": "0.6021928", "text": "public function hasContent()\n {\n return true;\n }", "title": "" }, { "docid": "056b167a00ec295331d60d35bf7a1d6c", "score": "0.6021928", "text": "public function hasContent()\n {\n return true;\n }", "title": "" }, { "docid": "056b167a00ec295331d60d35bf7a1d6c", "score": "0.6021928", "text": "public function hasContent()\n {\n return true;\n }", "title": "" }, { "docid": "056b167a00ec295331d60d35bf7a1d6c", "score": "0.6021928", "text": "public function hasContent()\n {\n return true;\n }", "title": "" }, { "docid": "ccfcb2a13932865b338a569ba21dc295", "score": "0.60215586", "text": "function storefront_do_shortcode( $tag, array $atts = array(), $content = null ) {\n\tglobal $shortcode_tags;\n\n\tif ( ! isset( $shortcode_tags[ $tag ] ) ) {\n\t\treturn false;\n\t}\n\n\treturn call_user_func( $shortcode_tags[ $tag ], $atts, $content, $tag );\n}", "title": "" }, { "docid": "3c1a1e6f89157168c9111172ed2d3cdb", "score": "0.60181075", "text": "public function hasContent(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "6ddb16962f3d9a8b79a335ff5798140b", "score": "0.6017725", "text": "function funky_embed_feature_content() { \r\n\r\n\t\tglobal $post, $shortname, $wp_embed;\r\n\t\t\r\n\t\tif ( get_post_meta( $post->ID, $shortname .'_web_video', true ) != '' ) {\r\n\t\t\t\r\n\t\t\t$url = get_post_meta( $post->ID, $shortname .'_web_video', true );\r\n\t\t\t\r\n\t\t} elseif ( get_post_meta( $post->ID, $shortname .'_video_m4v', true ) != '' ) {\r\n\t\t\t\r\n\t\t\t$url = get_post_meta( $post->ID, $shortname .'_video_m4v', true );\t\t\t\r\n\t\t\r\n\t\t} elseif ( get_post_meta( $post->ID, 'web_video', true ) != '' ) {\r\n\t\t\t\r\n\t\t\t$url = get_post_meta( $post->ID, 'web_video', true );\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t// Find first URL\r\n\t\t\t$url = funky_get_first_url( get_the_content(), false );\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Check if a URL was found\r\n\t\tif ( $url !== false ) {\r\n\t\t\t\r\n\t\t\t$embed_code = $wp_embed->shortcode( false, $url );\r\n\t\t\t\r\n\t\t\tif ( preg_match( '#\\[video\\s*.*?\\]#s', $embed_code, $matches ) || preg_match( '#\\[audio\\s*.*?\\]#s', $embed_code, $matches ) ) {\r\n\t\t\t\techo do_shortcode( $embed_code );\r\n\t\t\t} else {\r\n\t\t\t\techo $embed_code;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} \r\n\t\t\r\n\t}", "title": "" }, { "docid": "125c22c2bee118560ac403899dfdc760", "score": "0.59721285", "text": "function get_shortcode_from_content( $content, $tag) {\n //$content=$post->post_content;\n $ret = array();\n $regex=get_shortcode_regex(array($tag)); //we only want to filter the supplied one\n //var_dump($regex);\n if ( preg_match_all( '/' . $regex . '/s', $content, $matches, PREG_SET_ORDER ) ) {\n //var_dump($matches);\n foreach ( $matches as $shortcode ) {\n if ( $shortcode[2] === $tag ) {\n //$srcs = array();\n //var_dump($shortcode[3]);\n //echo(htmlspecialchars($shortcode[3]) . \"<br>\");\n /*\n if ($parsePosh) {\n //need to find and replace the posh quotes with standard ones! \n $shortcode[3]=str_replace(\"=&#8221;\",\"=\\\"\",$shortcode[3]);\n $shortcode[3]=str_replace(\"&#8221; \",\"\\\" \",$shortcode[3]);\n //echo(htmlspecialchars(substr($shortcode[3], -7)) . \"<br>\");\n if (substr($shortcode[3], -7)===\"&#8221;\") {\n $shortcode[3]=substr($shortcode[3], 0, -7) . \"\\\"\";\n };\n }\n */\n //echo(htmlspecialchars($shortcode[3]) . \"<br>\");\n $shortcode_attrs = shortcode_parse_atts( $shortcode[3] );\n if ( ! is_array( $shortcode_attrs ) ) {\n $shortcode_attrs = array();\n }\n //var_dump($shortcode_attrs);\n //$ret[]=array($shortcode_attrs, $shortcode[5]);\n \n $item = (object) [\n 'atts' => $shortcode_attrs,\n 'content' => $shortcode[5]\n ];\n \n $ret[]=$item;\n }\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "43a6268b216e77ad650d13eafda8fbce", "score": "0.59709054", "text": "public function hasContent(): bool\n {\n return isset($this->content);\n }", "title": "" }, { "docid": "aef21fc914bfda841ce36d606ce42476", "score": "0.596059", "text": "function wporg_shortcode($atts = [], $content = null)\n{\n \n //$content = 'testadd';\n return $content;\n}", "title": "" }, { "docid": "07fee8a8d731edd6782440d8042fd66f", "score": "0.5945196", "text": "public function hasContent()\n {\n return $this->get(self::CONTENT) !== null;\n }", "title": "" }, { "docid": "b762e0ff56e341863d6b66df971bd609", "score": "0.5943235", "text": "public function hasContent(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "fba231a1a5e74148b91dab3e3c894125", "score": "0.5923958", "text": "public function hasContent() : bool\n {\n return isset($this->content);\n }", "title": "" }, { "docid": "51ee251dead14b93b28267747b1af0f7", "score": "0.59198", "text": "function custom_cta_below( $content ) {\n global $post;\n $attached = get_post_meta( get_the_ID(), '_attached_cmb2_attached_posts', true );\n\n if(empty($attached))\n { }\n else\n {\n foreach ($attached as $attached_post) {\n $post = get_post($attached_post);\n $extras = '<div class=\"custom-cta-cmb2\">' . $post->post_content . '</div>';\n $extras = do_shortcode($extras);\n }\n }\n\n $filteredcontent = $content . $extras;\n\n return $filteredcontent;\n}", "title": "" }, { "docid": "757862140f272eb32afd12c7e9e21b54", "score": "0.59016937", "text": "function fashion_do_shortcode( $tag, array $atts = array(), $content = null ) {\n\t\tglobal $shortcode_tags;\n\n\t\tif ( ! isset( $shortcode_tags[ $tag ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn call_user_func( $shortcode_tags[ $tag ], $atts, $content, $tag );\n\t}", "title": "" }, { "docid": "542e9588b3f51cfaad38cf3c15d2a9ba", "score": "0.58730173", "text": "function wpsp_post_shortcode( $atts, $content = null ) {\n\n\tob_start();\n\textract( shortcode_atts( array(\n\t\t'term_id' => null,\n\t\t'post_format' => null,\n\t\t'post_num' => null,\n\t\t'cols' \t\t=> null,\n\t), $atts ) );\n\n\t$args = array (\n\t\t\t'tax_query' => array(\n\t\t\t\t'relation' => 'AND',\n array(\n 'taxonomy' => 'post_format',\n 'field' => 'slug',\n 'terms' => array( $post_format ),\n ),\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t'terms' => array($term_id)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'posts_per_page' => $post_num\n\t\t);\n\twpsp_get_posts_type( 'post', $args, $cols );\n\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "7a9bd91ad14ffa785de06fe1582d5bc4", "score": "0.586959", "text": "function on_shortcode ($dummy_atts, $dummy_content) // phpcs:ignore\n{\n // Include the <script> only if the shortcode is actually on the page.\n // Makes the script show up in the footer.\n enqueue_scripts ();\n\n return '<div id=\"cap-collation-app\"></div>';\n}", "title": "" }, { "docid": "bb994f9d3cfcf4787a9bca722d97a755", "score": "0.58680546", "text": "public function inf_do_shortcode( $tag, array $atts = array(), $content = null ) {\n\n global $shortcode_tags;\n\n if ( ! isset( $shortcode_tags[ $tag ] ) ) {\n return false;\n }\n\n return call_user_func( $shortcode_tags[ $tag ], $atts, $content, $tag );\n }", "title": "" }, { "docid": "46f41194c3ec36b42a7d2dcf5a76ea43", "score": "0.58504355", "text": "protected function register_shortcodes() {}", "title": "" }, { "docid": "875445c3518d89f3c111639b6140c613", "score": "0.5848142", "text": "protected function detect_self_metaslider_shortcode( $content ) {\n $pattern = get_shortcode_regex();\n\n if ( preg_match_all( '/'. $pattern .'/s', $content, $matches ) && array_key_exists( 2, $matches ) && ( in_array( 'metaslider', $matches[2] ) || in_array( 'ml-slider', $matches[2] ) ) ) {\n // caption contains [metaslider] shortcode\n if ( array_key_exists( 3, $matches ) && array_key_exists( 0, $matches[3] ) ) {\n // [metaslider] shortcode has attributes\n $attributes = shortcode_parse_atts( $matches[3][0] );\n\n if ( isset( $attributes['id'] ) && $attributes['id'] == $this->slider->ID ) {\n // shortcode has ID attribute that matches the current slideshow ID\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "e8fa7dc9ba024f2419c140fcc2118184", "score": "0.5814661", "text": "function thmplt_is_page($atts, $content = NULL ){\n\n\tglobal $post;\n\n\t$showonpage = false;\t\n\t\n $a = shortcode_atts( array(\n\t\t'is' => '',\n\t\t'ifis' => '',\n 'pids' => '',\n\t\t'not' => '',\n\t\t'ifnot' => '',\n\t\t'ifispt' => '',\n\t\t'ifnotpt' => '',\n\t\t'ifisarchive' => '',\n\t\t'ifnotarchive' => '',\n ), $atts );\t\n\n\t$pt = !empty($a['ifispt']) ? $a['ifispt']: \"\" ;\n\t$pt = !empty($pt) ? explode(\",\", $pt): \"\";\n\t\t\n\t$npt = !empty($a['ifnotpt']) ? $a['ifnotpt']: \"\" ;\t\n\t$npt = !empty($npt) ? explode(\",\", $npt): \"\";\t\n\t\n\t$ifispt = (is_array($pt) && in_array($post->post_type, $pt )) ? true : false;\n\t$ifnotpt = (is_array($npt) && in_array($post->post_type, $npt )) ? true : false;\t\n\t\n\t\n\t$archive = !empty($a['ifisarchive']) ? $a['ifisarchive']: \"\" ;\n\t$archive = !empty($archive) ? explode(\",\", $archive): \"\";\n\t\t\n\t$narchive = !empty($a['ifnotarchive']) ? $a['ifnotarchive']: \"\" ;\t\n\t$narchive = !empty($narchive) ? explode(\",\", $narchive): \"\";\t\n\t\n\t$ifisarchive = (is_array($archive) && in_array($post->post_type, $archive )) ? true : false;\n\t$ifnotarchive = (is_array($ifnotarchive) && in_array($post->post_type, $narchive )) ? true : false;\t\t\n\t\n\t\n\t$pids = !empty($a['pids']) ? $a['pids']: \"\" ;\n\t$pids = !empty($a['is']) ? $a['is']: $pids ;\n\t$pids = !empty($a['ifis']) ? $a['ifis']: $pids ;\t\n\t$pids = !empty($pids) ? explode(\",\", $pids): \"\";\n\n\t$nids = !empty($a['not']) ? $a['not']: \"\" ;\n\t$nids = !empty($a['ifnot']) ? $a['ifnot']: $nids ;\n\t$nids = !empty($nids) ? explode(\",\", $nids): \"\";\t\n\n\t$pids = thmplt_convert_numeric($pids);\n\t$nids = thmplt_convert_numeric($nids);\t\n\t\n\n\t$ifis = is_page($pids)? true : ( is_single($pids) ? true : false );\n\t$ifnot = is_page($nids)? true : ( is_single($nids) ? true : false );\n\n\n\n\n\tif ( is_array($pids) && $ifis ){\n\t\t$showonpage = true;\n\t} elseif ( is_array($nids) && !$ifnot ){\n\t\t$showonpage = true;\n\t}\n\n\t// Logic for post-types\n\tif ( is_array($pt) && $ifispt ){\n\t\t$showonpage = true;\n\t} elseif ( is_array($npt) && !$ifnotpt ){\n\t\t$showonpage = true;\n\t}\n\n\n\t// Logic for archives\n\tif ( is_array($archive) && $ifisarchive ){\n\t\t$showonpage = true;\n\t} elseif ( is_array($narchive) && !$ifnotarchive ){\n\t\t$showonpage = true;\n\t}\n\n\t\n\tif ( $showonpage === true ){\n\t\treturn do_shortcode($content);\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "b824308ae1a5ad2cbf4973366cfa3315", "score": "0.58096594", "text": "function bcn_the_slug_exists($post_name) {\n global $wpdb;\n if($wpdb->get_row(\"SELECT post_name FROM wp_posts WHERE post_name = '\" . $post_name . \"'\", 'ARRAY_A')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f854d07aff4f93cfbc155e9bdd31dd8f", "score": "0.57873476", "text": "private function add_shortcodes()\n {\n }", "title": "" }, { "docid": "22d2733b852aed241e09ce1a22ff2500", "score": "0.5783133", "text": "public function hasContent()\n {\n return !empty($this->content);\n }", "title": "" }, { "docid": "9c132ed486ef9aaaa58d6ff5b1d3ef6b", "score": "0.5782479", "text": "function bbp_register_shortcodes()\n{\n}", "title": "" }, { "docid": "0edb394ac5860c6877e97b6b2a6d5606", "score": "0.57734674", "text": "function ignore_media_credit_shortcode($atts, $content = null)\n{\n return $content;\n}", "title": "" }, { "docid": "6e53a5b534146a2bf8286caf82e92f48", "score": "0.5767963", "text": "function dt_content_question( $content ) {\r\n if( false !== strpos($content, '<!--more-->')) {\r\n return true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "4956c6fe95ac16ddb652bb7b7f907827", "score": "0.57640827", "text": "public function handler_avia_builder_precompile( $content )\n\t\t{\n\t\t\tglobal $shortcode_tags;\n\n\t\t\t//in case we got none/more than one postcontent elements make sure that replacement doesnt get executed/onle gets executed once\n\n\t\t\t/**\n\t\t\t * In case we have no av_postcontent we can return\n\t\t\t */\n\t\t\tif( strpos( $content, '[' . $this->config['shortcode'] ) === false ) \n\t\t\t{\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * save the 'real' shortcode array and limit execution to the shortcode of this class only\n\t\t\t */\n\t\t\t$old_sc = $shortcode_tags;\n\t\t\t$shortcode_tags = array( $this->config['shortcode'] => array( $this, 'shortcode_handler' ) );\n\n\t\t\twhile( false !== strpos( $content, $this->config['shortcode'] ) )\n\t\t\t{\n\t\t\t\t$content = do_shortcode( $content );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Restore the original shortcode pattern\n\t\t\t */\n\t\t\t$shortcode_tags = $old_sc;\n\n\t\t\t/**\n\t\t\t * Update the shortcode tree to reflect the current page structure.\n\t\t\t * Prior make sure that shortcodes are balanced.\n\t\t\t */\n\t\t\tAvia_Builder()->get_shortcode_parser()->set_builder_save_location( 'none' );\n\t\t\t$content = ShortcodeHelper::clean_up_shortcode( $content, 'balance_only' );\n\t\t\tShortcodeHelper::$tree = ShortcodeHelper::build_shortcode_tree( $content );\n\n\t\t\t\t\n\n\t\t\t//$content = preg_replace('!\\[av_postcontent.*?\\]!','',$content);\n\n\t\t\t//now we need to re calculate the shortcode tree so that all elements that are pulled from different posts also get the correct location\n//\t \t\t\t$pattern = str_replace('av_postcontent','av_psprocessed', ShortcodeHelper::get_fake_pattern());\n//\n//\t \t\t\tpreg_match_all('/'.$pattern.'/s', $content, $matches);\n//\t \t\t\tShortcodeHelper::$tree = ShortcodeHelper::build_shortcode_tree($matches);\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Currently we can leave content unchanged\n\t\t\t * \n\t\t\t * @since 4.7.6.2 - might change in future\n\t\t\t */\n//\t\t\t$content = Av_Responsive_Images()->remove_loading_lazy_attributes( $content );\n\t\t\t\n\t\t\treturn $content;\n\t\t}", "title": "" }, { "docid": "aaa83bea71168c3bf117d9b6009a1ca5", "score": "0.5748226", "text": "public function hasContent()\n {\n if ($this->content === null) {\n return false;\n }\n\n if (trim($this->content) === \"\") {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "2818ea273d76a91ce7bcad33f4d54332", "score": "0.57475823", "text": "function zt_dummy_content_shortcode($atts, $content = null) {\n ob_start();\n include 'zt-dummy-content-1.php';\n $dc1 = ob_get_clean();\n\n ob_start();\n include 'zt-dummy-content-2.php';\n $dc2 = ob_get_clean();\n\n // ob_start();\n // include 'any-other-template.php';\n // $dc3 = ob_get_clean();\n\n extract( shortcode_atts( array (\n \t'style' => 'standard' // set attribute default\n ), $atts ));\n\n if ( $style == 'standard' ) {\n \treturn $dc1;\n }\n\n elseif ( $style == 'short' ) {\n \treturn $dc2;\n }\n\n // elseif ( $style == 'anyothername' ) {\n // \treturn $dc3;\n // }\n\n}", "title": "" }, { "docid": "f3c5fc27fda10b6a8a1b9f9947e107a4", "score": "0.5741368", "text": "function su_widget_shortcode_support() {\n\n\tadd_filter('widget_text', 'do_shortcode');\n\n}", "title": "" }, { "docid": "0794af17d3dd0cc46535ee8def06d87f", "score": "0.5739983", "text": "function get_shortcode( $name ) {\n\t\t$shortcodes = get_option( 'elm_testimonials_shortcodes' );\n\t\t\n\t\tif ( ! is_array( $shortcodes ) )\n\t\t\t$shortcodes = array();\n\t\t\n\t\tif ( array_key_exists( strtolower( $name ), $shortcodes ) )\n\t\t\treturn $shortcodes[$name];\n\t}", "title": "" }, { "docid": "b1341cf1601f368493e07b4be3a6f636", "score": "0.573941", "text": "function notloggedin_only_shortcode($atts, $content = null)\n{\n if (!is_user_logged_in() && !is_null($content) && !is_feed()) {\n return $content;\n }\n}", "title": "" }, { "docid": "b6f8710b9523d40c3fc255683e4020b4", "score": "0.5732428", "text": "function neudev_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "0c16e8c712863c3e510b7b80656ea807", "score": "0.572857", "text": "protected function insta_slug_exists($insta_post_name) {\n\t\tglobal $wpdb;\n\t\tif ($wpdb->get_row(\"SELECT post_name FROM {$wpdb->prefix}posts WHERE post_name = '\" . $insta_post_name . \"'\", 'ARRAY_A')) :\n\t\t\treturn true;\n\t\telse :\n\t\t\treturn false;\n\t\tendif;\n\t}", "title": "" }, { "docid": "e9840c109f3049965e2290911bf73f98", "score": "0.57277125", "text": "function webtreats_lang_test( $atts, $content = null ) {\r\n\t\textract(shortcode_atts(array( 'lang' => '' ), $atts));\r\n\t\t\r\n\t\t$lang_active = ICL_LANGUAGE_CODE;\r\n\t\t\r\n\t\tif($lang == $lang_active){\r\n\t\t\treturn $content;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "80a0c01f026d6d979c70e484ad2e7b92", "score": "0.5717652", "text": "function gcpta_post_check() {\n\tglobal $post;\n\t\n\tif ( ! is_post_type_archive() )\n\t\treturn;\n\n\tif ( genesis_get_option( 'gcpta_remove_post_info_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) )\n\t\tgcpta_remove_function( 'genesis_post_info' );\n\telseif ( genesis_get_option( 'gcpta_post_info_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) )\n\t\tadd_filter( 'genesis_post_info' , 'gcpta_post_info_filter' );\n\t\n\tif ( genesis_get_option( 'gcpta_remove_post_meta_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) )\n\t\tgcpta_remove_function( 'genesis_post_meta' );\n\telseif ( genesis_get_option( 'gcpta_post_meta_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) )\n\t\tadd_filter( 'genesis_post_meta' , 'gcpta_post_meta_filter' );\n\t\n\tif ( genesis_get_option( 'gcpta_post_title_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) )\n\t\tgcpta_remove_function( 'genesis_do_post_title' );\n\t\n\tgcpta_replace_functions();\n\tgcpta_remove_function( 'genesis_do_post_image' );\n\t\t\n\tif ( is_post_type_archive() && ! gcpta_is_doing_grid_loop() )\n\t\tadd_action( 'genesis_post_content', 'gcpta_do_post_image', 5 );\n}", "title": "" }, { "docid": "b1a1288cd6fd5d0f3f4010d31672fa6e", "score": "0.5699123", "text": "function landpg_slug_exists( $post_name ) {\n\tglobal $wpdb;\n\t\n\tif( $wpdb->get_row( \"SELECT post_name FROM wp_posts WHERE post_name = '\" . $post_name . \"'\", 'ARRAY_A' ) ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "dfb213927b3d98df90ad5a7c947b8d57", "score": "0.5690313", "text": "private function hasContent($node)\n {\n return $node->count() > 0 ? true : false;\n }", "title": "" }, { "docid": "dfb213927b3d98df90ad5a7c947b8d57", "score": "0.5690313", "text": "private function hasContent($node)\n {\n return $node->count() > 0 ? true : false;\n }", "title": "" }, { "docid": "fa1746393439dc3455ddc69b185102ec", "score": "0.56875706", "text": "protected function hasContent()\n {\n return !empty($this->getContent());\n }", "title": "" }, { "docid": "cc0729a8aac3d6cd40d8ea23ae29c13e", "score": "0.5684763", "text": "public function do_shortcode( $atts, $content = null, $shortcode ) {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "96fb0a15620d035d901b45ba30a11c62", "score": "0.567574", "text": "private function can_add_snippet_taxonomy() {\n\t\t$queried_object = get_queried_object();\n\n\t\t/**\n\t\t * Allow developer to remove snippet data.\n\t\t *\n\t\t * @param bool $unsigned Default: false\n\t\t * @param string $unsigned Taxonomy Name\n\t\t */\n\t\tif (\n\t\t\t! is_shop() &&\n\t\t\t(\n\t\t\t\ttrue === Helper::get_settings( 'titles.remove_' . $queried_object->taxonomy . '_snippet_data' ) ||\n\t\t\t\ttrue === apply_filters( 'rank_math/snippet/remove_taxonomy_data', false, $queried_object->taxonomy )\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "529fe6f8e70e6e158d52ff8bab38a42d", "score": "0.5674571", "text": "function opubco_the_content() {\n\tif ( !has_filter( 'opubco_the_content', 'wptexturize' ) ) {\n\t\tadd_filter( 'opubco_the_content', 'wptexturize' );\n\t\tadd_filter( 'opubco_the_content', 'convert_smilies' );\n\t\tadd_filter( 'opubco_the_content', 'convert_chars' );\n\t\tadd_filter( 'opubco_the_content', 'wpautop' );\n\t\tadd_filter( 'opubco_the_content', 'shortcode_unautop' );\n\t\tadd_filter( 'opubco_the_content', 'prepend_attachment' );\n\t\t$vidembed = new WP_Embed();\n\t\tadd_filter( 'opubco_the_content', array( &$vidembed, 'run_shortcode'), 8 );\n\t\tadd_filter( 'opubco_the_content', array( &$vidembed, 'autoembed'), 8 );\n\t\tadd_filter( 'opubco_the_content', 'do_shortcode', 11);\n\t} //end has_filter\n}", "title": "" }, { "docid": "c90d176b50569c3c6216631168c1949e", "score": "0.5671423", "text": "function inlay_shortcodes($atts) {\n $atts = shortcode_atts([ 'id' => '' ], $atts);\n if (preg_match('/^[a-z0-9]+$/', $atts['id'])) {\n $url = get_option( 'inlay_url_prefix', '' );\n if ($url) {\n $output = \"<script src='{$url}inlay-$atts[id].js' data-inlay-id='$atts[id]'></script><noscript>(This part of the page requires Javascript)</noscript>\";\n }\n else {\n $output = \"(A misconfiguration is preventing the form from showing - check inlay plugin settings)\";\n }\n }\n else {\n $output = \"(A misconfiguration is preventing the form from showing - invalid inlay shortcode)\";\n }\n return $output;\n}", "title": "" }, { "docid": "e77f54c251fe6fb077df7f398ed8953b", "score": "0.5667553", "text": "function theme_run_shortcode( $content )\n\t{\n\t\tglobal $shortcode_tags;\n\t\t\n\t\t// Backup current registered shortcodes and clear them all out\n\t\t$orig_shortcode_tags = $shortcode_tags;\n\t\tremove_all_shortcodes();\n\t\t\n\t\t\n\t\tadd_shortcode( 'divider', 'divider' );\n\t\tadd_shortcode( 'letter', 'letter' );\n\t\tadd_shortcode( 'alert', 'alert' );\n\t\tadd_shortcode( 'social_icon', 'social_icon' );\n\t\tadd_shortcode( 'toggle', 'toggle' );\n\t\tadd_shortcode( 'accordion', 'accordion' );\n\t\tadd_shortcode( 'tabs_wrap', 'tabs_wrap' );\n\t\tadd_shortcode( 'tab_pane', 'tab_pane' );\n\t\tadd_shortcode( 'icon', 'icon' );\n\t\tadd_shortcode( 'button', 'button' );\n\t\tadd_shortcode( 'row', 'row' );\n\t\tadd_shortcode( 'column', 'column' );\n\t\tadd_shortcode( 'media_wrap', 'media_wrap' );\n\t\tadd_shortcode( 'video', 'video' );\n\t\tadd_shortcode( 'audio', 'audio' );\n\t\tadd_shortcode( 'link_wrap', 'link_wrap' );\n\t\tadd_shortcode( 'aside', 'aside' );\n\t\tadd_shortcode( 'quote', 'quote' );\n\t\tadd_shortcode( 'slide', 'slide' );\n\t\tadd_shortcode( 'project_action', 'project_action' );\n\t\tadd_shortcode( 'call_to_action', 'call_to_action' );\n\t\tadd_shortcode( 'cta_button_wrap', 'cta_button_wrap' );\n\t\tadd_shortcode( 'progress_bar', 'progress_bar' );\n\t\tadd_shortcode( 'testimonial', 'testimonial' );\n\t\tadd_shortcode( 'timeline', 'timeline' );\n\t\tadd_shortcode( 'event', 'event' );\n\t\tadd_shortcode( 'latest_tweets', 'latest_tweets' );\n\t\tadd_shortcode( 'service', 'service' );\n\t\tadd_shortcode( 'process', 'process' );\n\t\tadd_shortcode( 'fun_fact', 'fun_fact' );\n\t\tadd_shortcode( 'client', 'client' );\n\t\tadd_shortcode( 'image', 'image' );\n\t\tadd_shortcode( 'section_title', 'section_title' );\n\t\tadd_shortcode( 'drop_cap', 'drop_cap' );\n\t\tadd_shortcode( 'tagline', 'tagline' );\n\t\tadd_shortcode( 'code_line', 'code_line' );\n\t\tadd_shortcode( 'code_block', 'code_block' );\n\t\tadd_shortcode( 'code_block_prettify', 'code_block_prettify' );\n\t\tadd_shortcode( 'code_block_line_numbers', 'code_block_line_numbers' );\n\t\tadd_shortcode( 'icon_list', 'icon_list' );\n\t\tadd_shortcode( 'list_item', 'list_item' );\n\t\tadd_shortcode( 'portfolio_field', 'portfolio_field' );\n\t\tadd_shortcode( 'inline_lightbox_wrap', 'inline_lightbox_wrap' );\n\t\tadd_shortcode( 'inline_lightbox_image', 'inline_lightbox_image' );\n\t\tadd_shortcode( 'inline_lightbox_iframe', 'inline_lightbox_iframe' );\n\t\tadd_shortcode( 'portfolio_lightbox_image', 'portfolio_lightbox_image' );\n\t\tadd_shortcode( 'portfolio_lightbox_iframe', 'portfolio_lightbox_iframe' );\n\t\tadd_shortcode( 'map', 'map' );\n\t\tadd_shortcode( 'contact_form', 'contact_form' );\n\t\tadd_shortcode( 'portfolio_tags', 'portfolio_tags' );\n\t\tadd_shortcode( 'intro', 'intro' );\n\t\tadd_shortcode( 'rotate_words', 'rotate_words' );\n\t\tadd_shortcode( 'launch_button_wrap', 'launch_button_wrap' );\n\t\t\n\t\t\n\t\t// Do the shortcode ( only the one above is registered )\n\t\t$content = do_shortcode( $content );\n\t\t\n\t\t// Put the original shortcodes back\n\t\t$shortcode_tags = $orig_shortcode_tags;\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "feee0fb98f48ae434e91a1bbe0606fb3", "score": "0.56653136", "text": "function massdata_faq_shortcode($atts, $content){\n $atts = shortcode_atts(\n array(\n 'content' => !empty($content) ? $content : NULL\n ), $atts\n );\n\n extract($atts);\n\n if(!empty($content)){\n return '<ol class=\"faq\">'.do_shortcode($content).'</ol>';\n }\n \n return \"\";\n}", "title": "" }, { "docid": "a696a74611362f57861fb3553c2a1292", "score": "0.56605864", "text": "public function shortcode_handler( $atts, $content = '', $shortcodename = '', $meta = '' )\n\t\t{\n\t\t\tglobal $shortcode_tags;\n\n\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t\t\t\t\t\t'link'\t\t\t=> '',\n\t\t\t\t\t\t\t\t\t\t'lazy_loading'\t=> 'disabled'\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t), $atts, $this->config['shortcode'] ) );\n\n\t\t\t$post_id = function_exists( 'avia_get_the_id' ) ? avia_get_the_id() : get_the_ID();\n\t\t\t$entry = AviaHelper::get_entry( $link, array( 'post_status' => $this->post_status ) );\n\n\t\t\t$cm = isset( $meta['custom_markup'] ) ? $meta['custom_markup'] : '';\n\n\t\t\t$output = '';\n\t\t\t\n\t\t\tif( ! empty( $entry ) )\n\t\t\t{\n\t\t\t\tif( $entry->ID == $post_id )\n\t\t\t\t{\n\t\t\t\t\t$output .= '<article style = \"padding:20px;text-align:center;\" class=\"entry-content main_color\" ' . avia_markup_helper( array( 'context' => 'entry','echo' => false, 'id' => $entry->ID, 'custom_markup' => $cm ) ) . '>';\n\t\t\t\t\t$output .=\t__( 'You added a Post/Page Content Element to this entry that tries to display itself. This would result in an infinite loop. Please select a different entry or remove the element.', 'avia_framework' );\n\t\t\t\t\t$output .= '</article>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * Remove this shortcode - nesting of same named shortcode is not supported by WP. We must take care of this in a loop outside\n\t\t\t\t\t */\n\t\t\t\t\t$old_tags = $shortcode_tags;\n\t\t\t\t\t$shortcode_tags = array();\n\n\t\t\t\t\t$builder_stat = Avia_Builder()->get_alb_builder_status( $entry->ID );\n\n\t\t\t\t\tif( ( 'active' == $builder_stat ) && ! is_preview() )\n\t\t\t\t\t{\n\t\t\t\t\t\t$content = Avia_Builder()->get_posts_alb_content( $entry->ID );\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$content = $entry->post_content;\n\t\t\t\t\t}\n\n\n\t\t\t\t//\t$output .=\t'<div class=\"entry-content\" ' . avia_markup_helper( array( 'context' => 'entry', 'echo' => false, 'id' => $entry->ID, 'custom_markup' => $cm ) ) . '>';\n\t\t\t\t\t$output .=\t\t$content;\n\t\t\t\t//\t$output .=\t'</div>';\n\n\t\t\t\t\t$shortcode_tags = $old_tags;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t/**\n\t\t\t * Can be removed, because we removed all shortcodes from $shortcode_tags except this one\n\t\t\t */\n\t\t\t//\treturn do_shortcode( $output );\n\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "31f56515a5f9a32c973500a4ad124880", "score": "0.5654506", "text": "function tbcf_embed_code( $content ) {\n\n\tglobal $wp_embed;\n\n\tif ( tbcf_is_url( $content ) ) {\n\t\t$embed_code = $wp_embed->shortcode( array(), $content );\n\t} else {\n\t\t$embed_code = $content;\n\t}\n\n\t$embed_code = do_shortcode( $embed_code );\n\n\treturn $embed_code;\n\n}", "title": "" }, { "docid": "fc12e15c7cf914648ab3c0cc3488b738", "score": "0.564014", "text": "function register_shortcodes(){\n\n // add_shortcode('shortcode', 'shortcode_function');\n\n}", "title": "" }, { "docid": "40ad314ff2e1cffdb57f3f296d464315", "score": "0.5632397", "text": "function icopyright_post_contains_known_unlicensable_content($post) {\r\n // Be aggressive with the fingerprints: better to refuse than accidentally allow license\r\n $fingerprints = array(\r\n 'src=\\\"(http:)?\\/\\/\\w+\\.icopyright\\.net\\/user\\/viewFreeUse\\.act\\?fuid',\r\n 'src=\\\"(http:)?\\/\\/\\w+\\.icopyright\\.net\\/user\\/webEprint\\.act\\?id',\r\n 'src=\\\"https:\\/\\/\\d+.rp-api.com\\/rjs\\/repost-article.js',\r\n 'class=\\\"repubhubembed\\\"',\r\n \t'icopyright\\.net\\/freePost.act',\r\n \t'repubhub\\.com\\/freePost.act'\r\n );\r\n foreach($fingerprints as $fingerprint) {\r\n if(preg_match(\"/$fingerprint/\", $post->post_content)) {\r\n return TRUE;\r\n }\r\n }\r\n return FALSE;\r\n}", "title": "" }, { "docid": "0bd93cfb0aee96d3f8639fff9f6a3e35", "score": "0.5626815", "text": "public function do_shortcode($content) {\n $shortcode_tags = $this->shortCodeTags;\n\n if (empty($shortcode_tags) || !is_array($shortcode_tags))\n return $content;\n\n $pattern = $this->get_shortcode_regex();\n return preg_replace_callback( \"/$pattern/s\", array($this, 'do_shortcode_tag'), $content );\n }", "title": "" }, { "docid": "64843d8b27cfed7c8d23bbf8dfd0622d", "score": "0.56107926", "text": "function add_shortcode( $args ) {\n\t\t$shortcodes = get_option( 'elm_testimonials_shortcodes' );\n\t\n\t\t// Check if shortcode does not exist\n\t\tif ( ! $this->get_shortcode( $args['sc_name'] ) ) {\n\t\t\t$index = strtolower( $args['sc_name'] );\n\t\t\t$shortcodes[$index] = $args;\n\t\t\t\n\t\t\tupdate_option( 'elm_testimonials_shortcodes', $shortcodes );\n\t\t\t\n\t\t\treturn $shortcodes[$index];\n\t\t}\n\t}", "title": "" }, { "docid": "81805cfe0e08b52d225389eda26dc805", "score": "0.56037956", "text": "function bienen_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "398e46705d8a28de0bf3f75d41d4f914", "score": "0.55996513", "text": "function flatsome_html_before_footer(){\n $html_before = get_theme_mod('html_before_footer');\n if($html_before){\n echo do_shortcode($html_before);\n }\n}", "title": "" }, { "docid": "1d0063f7e3542894d36e1c0a4a4020e8", "score": "0.55993694", "text": "function hasSimpleContent($schemaElementRef) \n {\n \t\n $typeDecl = $this->getElementTypeDecl($schemaElementRef);\n if (VWP::isWarning($typeDecl)) {\n \treturn false;\n }\n \n $schemaNSList = $this->getKnownSchemaNamespaces();\n \n if ('complexType' == (string) $typeDecl->localName) {\n \t$len = $typeDecl->childNodes->length;\n \tfor($idx=0;$idx<$len;$idx++) {\n \t\t$item = $typeDecl->childNodes->item($idx);\n \t\tif ($item->nodeType == XML_ELEMENT_NODE \n \t\t && in_array((string)$item->namespaceURI,array_keys($schemaNSList))\n \t\t && 'simpleContent' == (string)$item->localName) {\n \t\t \treturn true;\n \t\t} \t\t\n \t}\n }\n\n // Undefined Type \n return false; \n }", "title": "" }, { "docid": "763f295e03618647890ea897f0693e2b", "score": "0.5597195", "text": "function bweb_prevent_shortcode( $content ) {\n\t$pattern = '#(<pre.*?>|<code.*?>)(.*?)(<\\/pre>|<\\/code>)#imsu';\n\n\treturn preg_replace_callback( $pattern, __NAMESPACE__ . '\\bweb_replace_shortcode', $content );\n\n}", "title": "" }, { "docid": "ce30eaf9f39509a2ec25248249275f12", "score": "0.5588323", "text": "public function isContentSlugAvailable($slug)\n {\n return $this->contentRepository->findOneBySlug($slug) === null;\n }", "title": "" }, { "docid": "82f1580c52da30d2f3a241195c6c045b", "score": "0.5586914", "text": "function embed_head() {\n global $posts;\n\n if ( is_feed() || !is_array( $posts ) )\n return;\n\n $load = false;\n foreach ( $posts as $post ) {\n\n //first check if the post contains a blackbirdpie shortcode\n if ( strpos( $post->post_content, '[blackbirdpie' ) >= 0 ) {\n $load = true;\n break;\n }\n else\n //then check if the post contains a twitter link\n if ( preg_match( '/(\\n|\\A)http(s|):\\/\\/twitter\\.com(\\/\\#\\!\\/|\\/)([a-zA-Z0-9_]{1,20})\\/status(es)*\\/(\\d+)(\\/|)/i', $post->post_content ) ) {\n $load = true;\n break;\n }\n }\n\n if ( $load ) {\n add_action( 'wp_enqueue_scripts', array( &$this, 'load_scripts'), 20 );\n add_action( 'wp_print_styles', array( &$this, 'load_styles'), 20 );\n }\n\n return;\n }", "title": "" }, { "docid": "aa744c175857f15b5e3c96e248e343a1", "score": "0.55803084", "text": "function moments_qodef_is_gutenberg_editor() {\n\t\treturn class_exists( 'WP_Block_Type' );\n\t}", "title": "" }, { "docid": "af7eed739417edd08379090116fecd96", "score": "0.55763996", "text": "function list_check($attr,$content){\r\n return '<ul class=\"adtheme_list adtheme-icon\">'.do_shortcode($content).'</ul>';\r\n}", "title": "" }, { "docid": "c6abb5b12abeffd00ec488760688eb82", "score": "0.55703175", "text": "function variant_page_builder_render_shortcode() {\n\t$output = 'No Shortcode Supplied';\n\t\n\tif( isset($_POST['shortcode']) ){\n\t\t$output = do_shortcode(str_replace('\"\"', '\"', stripslashes($_POST['shortcode'])));\n\t}\n\t\n\twp_die($output);\n}", "title": "" }, { "docid": "ce327715252ffdadd87ac4b479452770", "score": "0.55661947", "text": "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\tif ( have_posts() ) the_post();\n\n\t\techo \"<\".esc_attr($options['tag']).\" id=\\\"\".esc_attr($options['selector']).\"\\\" class=\\\"\".esc_attr($options['classes']).\"\\\" \"; do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); echo \">\";\n\t\t//comment_form();\n\t\tcomments_template();\n\t\techo \"</\".esc_attr($options['tag']).\">\";\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "4a6023e5719a2a8ac6b66875376dc7e6", "score": "0.55526227", "text": "function bbp_is_custom_post_type($the_post = \\false)\n{\n}", "title": "" }, { "docid": "982b65f2cf130c28ad7dd744ce01948f", "score": "0.554874", "text": "public function hasAnyTag();", "title": "" }, { "docid": "fef4630bf07bed8569839721b723fb70", "score": "0.55291796", "text": "public function hasContent()\n {\n return !empty($this->_var) || '0' === $this->_var || !empty($this->label) || '0' === $this->label;\n }", "title": "" }, { "docid": "f16ef336e3e3275b6ae14a1aae34db82", "score": "0.5522593", "text": "static private function hasContent(Node $link_node){\n return (!empty($link_node->field_links_link->uri)\n ||!empty($link_node->field_links_link_text->value)\n ||!empty($link_node->field_links_open_in_new_window->value)\n ||!empty($link_node->field_links_file_link_upload->value));\n }", "title": "" }, { "docid": "d1ede8cf9a1129bffb054ab87b40a092", "score": "0.5520369", "text": "public function check_shortcode_content($shortcode, SyncShortcodeEntry $sce, SyncApiResponse $apiresponse)\n\t{\n\t\t// check shortcode content to ensure everything's already been pushed srs#10\n\t\t$products = array();\n\t\t$categories = array();\n\t\t$tags = array();\n\n\t\tswitch ($shortcode) {\n\t\tcase 'product':\n\t\t\tif ($sce->has_attribute('ids'))\n\t\t\t\t$products[] = $sce->get_attribute('ids');\n\t\t\tif ($sce->has_attribute('id'))\n\t\t\t\t$products[] = $sce->get_attribute('id');\n\t\t\tbreak;\n\t\tcase 'product_page':\n\t\tcase 'add_to_cart':\n\t\tcase 'add_to_cart_url':\n\t\t\tif ($sce->has_attribute('id'))\n\t\t\t\t$products[] = $sce->get_attribute('id');\n\t\t\tbreak;\n\t\tcase 'product_category':\t\t\t// ids, category, parent\n\t\tcase 'products':\t\t\t\t\t// ids, category, tag\n\t\t\tif ($sce->has_attribute('ids'))\n\t\t\t\t$products[] = $sce->get_attribute('ids');\n\t\t\tif ($sce->has_attribute('category'))\n\t\t\t\t$categories[] = $sce->get_attribute('category');\n\t\t\tif ($sce->has_attribute('parent'))\n\t\t\t\t$categories[] = $sce->get_attribute('parent');\n\t\t\tif ($sce->has_attribute('tag'))\n\t\t\t\t$tags[] = $sce->get_attribute('tag');\n\t\t\tbreak;\n\t\tcase 'product_categories':\n\t\t\tif ($sce->has_attribute('ids'))\n\t\t\t\t$categories[] = $sce->get_attribute('ids');\n\t\t\tbreak;\n\t\tcase 'recent_products':\n\t\t\tif ($sce->has_attribute('category'))\n\t\t\t\t$categories[] = $sce->get_attribute('category');\n\t\t\tbreak;\n\t\tcase 'recent_products':\n\t\tcase 'sale_products':\n\t\tcase 'best_selling_products':\n\t\tcase 'top_rated_products':\n\t\tcase 'featured_products':\n\t\t\tif ($sce->has_attribute('category'))\n\t\t\t\t$categories[] = $sce->get_attribute('category');\n\t\t\tbreak;\n\t\t}\n\n\n\t\t// check all product IDs referenced\n\t\tforeach ($products as $id_list) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' checking products: ' . var_export($products, TRUE));\n\t\t\t$id_list = explode(',', $id_list);\n\t\t\tforeach ($id_list as $prod_id) {\n\t\t\t\t$prod_id = abs($prod_id);\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' checking product id#' . $prod_id);\n\t\t\t\tif (!in_array($prod_id, $this->_product_shortcode_ids)) {\n\t\t\t\t\t$this->_product_shortcode_ids[] = $prod_id;\n\t\t\t\t\t$sync_data = $this->_sync_model->get_sync_target_post($prod_id, SyncOptions::get('target_site_key'));\n\t\t\t\t\tif (NULL === $sync_data) {\n\t\t\t\t\t\t$apiresponse->error_code(SyncWooCommerceApiRequest::ERROR_WOOCOMMERCE_DEPENDENT_PRODUCT_NOT_PUSHED, $prod_id);\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}\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' checked products: ' . implode(';', $this->_product_shortcode_ids));\n\n\t\t// check all categories referenced\n\t\t// these don't do anything except add to the _category_short_ids and _tag_shortcode_ids array\n\t\t// which are using during the '' filter to add final taxonomy information to the post_data before the Push API call\n\t\tforeach ($categories as $id_list) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' checking categories: ' . var_export($categories, TRUE));\n\t\t\t$id_list = explode(',', $id_list);\n\t\t\tforeach ($id_list as $cat_id) {\n\t\t\t\t$cat_id = abs($cat_id);\n\t\t\t\tif (!in_array($cat_id, $this->_category_shortcode_ids)) {\n\t\t\t\t\t// build this list so these taxonomies can be added to the Push data\n\t\t\t\t\t$this->_category_shortcode_ids[] = $cat_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($tags as $id_list) {\nSyncDebug::log(__METHOD__.'():' . __LINE__ . ' checking tags: ' . var_export($tags, TRUE));\n\t\t\t$id_list = explode(',', $id_list);\n\t\t\tforeach ($id_list as $tag_id) {\n\t\t\t\t$tag_id = abs($tag_id);\n\t\t\t\tif (!in_array($tag_id, $this->_tag_shortcode_ids)) {\n\t\t\t\t\t// build this list so these taxonomies can be added to the Push data\n\t\t\t\t\t$this->_tag_shortcode_ids[] = $tag_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6922b720b01d3d8ec29f590b5de12ba9", "score": "0.549623", "text": "public function checkContentPageCode($code){\n $arPages = ['content_bin'];\n\n return !in_array($code,$arPages);\n \n }", "title": "" }, { "docid": "d7dea4aa62bc08a719e9e7fc726d5415", "score": "0.54948324", "text": "function pm_ln_run_shortcode( $content ) {\n //global $shortcode_tags;\n // Backup current registered shortcodes and clear them all out\n //$orig_shortcode_tags = $shortcode_tags;\n //remove_all_shortcodes();\n\t\n\t\n\tadd_shortcode(\"singlePost\", \"singlePost\"); \t\n\tadd_shortcode(\"eventPost\", \"eventPost\");\t\n\tadd_shortcode(\"staffItems\", \"staffItems\");//COMPLETE\t\t\n\tadd_shortcode(\"eventItems\", \"eventItems\");//COMPLETE\t\n\tadd_shortcode(\"staffProfile\", \"staffProfile\");\t\n\tadd_shortcode(\"postItems\", \"postItems\");//COMPLETE\t\n\t\n\tadd_shortcode(\"tabGroup\", \"tabGroup\");\n\tadd_shortcode(\"tabItem\", \"tabItem\");\n\tadd_shortcode(\"accordionGroup\", \"accordionGroup\");\n\tadd_shortcode(\"accordionItem\", \"accordionItem\");\t\n\tadd_shortcode(\"alert\", \"alert\");\t\n\tadd_shortcode(\"sponsorsCarousel\", \"sponsorsCarousel\");//COMPLETE\t\n\tadd_shortcode(\"callToAction\", \"callToAction\");\t\n\tadd_shortcode(\"divider\", \"divider\");\t\n\tadd_shortcode(\"googleMap\", \"googleMap\");\n\tadd_shortcode(\"progressBar\", \"progressBar\");\t\n\tadd_shortcode(\"hopeButton\", \"hopeButton\");\n\tadd_shortcode(\"youtubeVideo\", \"youtubeVideo\");\n\tadd_shortcode(\"vimeoVideo\", \"vimeoVideo\");\t\t\t\n\tadd_shortcode(\"featureBox\", \"featureBox\");//COMPLETE\t\t\t\n\tadd_shortcode(\"imagePanel\", \"imagePanel\");\t\t\n\tadd_shortcode(\"socialGroup\", \"socialGroup\");\t\n\tadd_shortcode(\"socialIcon\", \"socialIcon\");\n\tadd_shortcode(\"panelHeader\", \"panelHeader\");\t\t\n\tadd_shortcode(\"featuredPanel\", \"featuredPanel\");\t\n\t\n\t//Bootstrap 2\n\tadd_shortcode(\"columnContainer\", \"columnContainer\");\n\t//add_shortcode(\"container\", \"container\");\n\tadd_shortcode(\"column\", \"column\");\n\t\n // Do the shortcode (only the one above is registered)\n //$content = do_shortcode( $content );\n // Put the original shortcodes back\n //$shortcode_tags = $orig_shortcode_tags;\n return $content;\n}", "title": "" }, { "docid": "292ab0d38c885fd43cea877791900855", "score": "0.5493608", "text": "function parse_shortcode_content($content) {\r\n /* Parse nested shortcodes and add formatting. */\r\n\t$content = trim(do_shortcode(shortcode_unautop($content)));\r\n\r\n\t/* Remove '' from the start of the string. */\r\n\tif (substr($content, 0, 4) == '')\r\n\t\t$content = substr($content, 4);\r\n\r\n\t/* Remove '' from the end of the string. */\r\n\tif (substr($content, -3, 3) == '')\r\n\t\t$content = substr($content, 0, -3);\r\n\r\n\t/* Remove any instances of ''. */\r\n\t$content = str_replace(array('<p></p>'), '', $content);\r\n\t$content = str_replace(array('<p> </p>'), '', $content);\r\n\r\n\treturn $content;\r\n}", "title": "" }, { "docid": "d60b1a16be7315cf9141f4966e1e2fd3", "score": "0.54924244", "text": "function shortcode_handler_function( $atts = [], $content = null, $tag = '' ) {\n $atts = array_change_key_case( (array) $atts, CASE_LOWER );\n \n // override default attributes with user attributes\n $wporg_atts = shortcode_atts(\n array(\n 'title' => 'WordPress.org',\n ), $atts, $tag\n );\n \n // start box\n $o = '<div class=\"wporg-box\">';\n \n // title\n //$o .= '<h2>' . esc_html__( $wporg_atts['title'], 'wporg' ) . '</h2>';\n \n // enclosing tags\n if ( ! is_null( $content ) ) {\n // secure output by executing the_content filter hook on $content\n //$o .= apply_filters( 'the_content', $content );\n \n // run shortcode parser recursively\n $o .= do_shortcode( $content );\n }\n \n // end box\n $o .= '</div>';\n \n // return output\n return $o;\n}", "title": "" }, { "docid": "a7510f42911017a42d88e37612ea0571", "score": "0.5490851", "text": "function popup_contents($shortcode, $title, $intro_text, $sc_atts) {\n ?>\n <div class=\"wp-shortcode-popup wrap\" style=\"padding: 10px 20px;\">\n <h2 id=\"shortcode-title\"><?php echo $title ?></h2>\n <p id=\"shortcode-intro\"><?php echo $intro_text ?></p>\n <?php if ($sc_atts) : ?>\n <form id=\"wp-shortcode\" action=\"\" >\n <table class=\"form-table\"> \n <tbody>\n <?php foreach ($sc_atts as $att) : ?>\n <tr valign=\"top\"> \n <th scopt=\"row\">\n <label for=\"<?php echo $att ?>\"><?php echo ucwords($att) ?></label>\n </th>\n <td>\n <input type=\"text\" class=\"text\" name=\"<?php echo $att ?>\" id=\"<?php echo $att ?>\" />\n </td>\n </tr>\n <?php endforeach; ?>\n <input type=\"hidden\" id=\"shortcode-name\" value=\"<?php echo $shortcode ?>\" />\n </tbody>\n </table>\n </form>\n <?php endif; ?>\n <p>Preview: <code id=\"shortcode-preview\"></code></p>\n <div class=\"submit\">\n <input type=\"button\" name=\"submit-shortcode-api\" id=\"submit-shortcode-api\" class=\"button\" value=\"Insert into Post\">\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "ad1d23b839bda617fea139e88b823b80", "score": "0.5484165", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "ad1d23b839bda617fea139e88b823b80", "score": "0.5484165", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "ad1d23b839bda617fea139e88b823b80", "score": "0.5484165", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "902de5c860c57010bdea348790295cc2", "score": "0.54830664", "text": "function wpv_parse_wpml_shortcode( $content ) {\n\t$output = array();\n\t$content = stripslashes( $content );\n\tpreg_match_all( \"/\\[wpml-string context=\\\"([^\\\"]+)\\\"]([^\\[]+)\\[\\/wpml-string\\]/iUs\", $content, $out );\n\tif ( count( $out[0] ) > 0 ) {\n\t\t$matches = count( $out[0] );\n\t\tfor( $i=0; $i < $matches; $i++ ){\n\t\t\t$output[] = array( 'context' => $out[1][$i], 'content' => $out[2][$i], 'name' => 'wpml-shortcode-' . md5( $out[2][$i] ) );\n\t\t}\n\t}\n\treturn $output;\n}", "title": "" } ]
a05822a4a5440f74516c352630f6a757
Array of Property objects
[ { "docid": "96bcbb3d1a3dd41116467ba5c9577f48", "score": "0.0", "text": "public function toArray(): array\n {\n return array_values($this->elements);\n }", "title": "" } ]
[ { "docid": "9d142b2e4e74d80b0ffd5f6143e6f769", "score": "0.74974203", "text": "public function getProperties(): array;", "title": "" }, { "docid": "9d142b2e4e74d80b0ffd5f6143e6f769", "score": "0.74974203", "text": "public function getProperties(): array;", "title": "" }, { "docid": "b9709a9907d41022b572b48a9352e86c", "score": "0.74599624", "text": "public function getProperties():array;", "title": "" }, { "docid": "a2131c7a1c4638f348ab726b414f42cf", "score": "0.7424145", "text": "public function getProperties() : array {}", "title": "" }, { "docid": "a2131c7a1c4638f348ab726b414f42cf", "score": "0.7424145", "text": "public function getProperties() : array {}", "title": "" }, { "docid": "ca10c96c2a40936cdf20858466cc727e", "score": "0.7409825", "text": "function getProperties() : array ;", "title": "" }, { "docid": "77d76119f1ca2b9e2bef97b8da90e98c", "score": "0.735244", "text": "public function as_array()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "03021f561584d40b16bf2c149245f1ab", "score": "0.7345699", "text": "public function getProperties() : array;", "title": "" }, { "docid": "5706ce7a066f7cb35f2fbec2296d291b", "score": "0.7344539", "text": "public function _getProperties() : array {}", "title": "" }, { "docid": "5e2aad69c3109211c8678234bcfb4968", "score": "0.720201", "text": "public function getPropertiesAsArray()\n\t{\n\t\t$arrArray = $this->arrProperties;\n\t\t$arrArray[\"id\"] = $this->mixID;\n\n\t\treturn $arrArray;\n\t}", "title": "" }, { "docid": "d79d5bb189c37ad1ab56025a53a05275", "score": "0.7162939", "text": "public function getProperties(): array\n {\n return $this->arr_properties;\n }", "title": "" }, { "docid": "0eb5e1efc48c3af82c82827bf869d453", "score": "0.7158751", "text": "public function toArray(): array\n {\n return $this->properties;\n }", "title": "" }, { "docid": "47b3932536dd24e7b0686d79d2a8370e", "score": "0.7148878", "text": "function _getProperties() : array ;", "title": "" }, { "docid": "80abf9f6487c5297755f00d725bc3f59", "score": "0.7133449", "text": "public function getPropertiesAsArray()\n {\n $array = array();\n\n foreach ($this->getProperties() as $property) {\n $array[$property->getName()] = [ 'value' => $property->getValue(), 'type' => $property->getType() ];\n }\n\n return $array;\n }", "title": "" }, { "docid": "207547b76eb105bde60d08a1e487e0c7", "score": "0.71269506", "text": "public function getProperties() {\n return array($this->_property);\n }", "title": "" }, { "docid": "41e97d71e68e6014b2a710a25f42b0f1", "score": "0.707621", "text": "public function getObjectProperties() : array\n {\n return $this->{$this->propertyContainer};\n }", "title": "" }, { "docid": "612417b322eee83e35692faa3a87d9d3", "score": "0.7058592", "text": "public function toArray()\n\t{\n\t\treturn $this->_convertToArray( $this->_propMap );\n\t}", "title": "" }, { "docid": "f584b9617202f3c765d54b91dbfef0e4", "score": "0.6957166", "text": "public function toArray()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "a80ef65f30e8325f753e3aae7b7bfb54", "score": "0.6884917", "text": "public function values($property);", "title": "" }, { "docid": "866f94cb8b019645b55e0493ea176834", "score": "0.68693274", "text": "public static function getArray() {\n $object = new \\ReflectionClass(Item::class);\n $properties = $object->getProperties(\\ReflectionProperty::IS_PUBLIC);\n $array = array();\n\n foreach ($properties as $property) {\n $value = $property->getValue();\n if (!empty($value)) {\n $array[$property->getName()] = $value;\n }\n }\n return $array;\n }", "title": "" }, { "docid": "4ceb93aea09c92a4fa77549b0a64de98", "score": "0.6861806", "text": "public function getPropertiesAsArray()\n\t{\n\t\treturn $this->model->getPropertiesAsArray();\n\t}", "title": "" }, { "docid": "ab2df3a59461f22495e6f3c1d7d1f817", "score": "0.68316054", "text": "public function toArray() {\n $allProperties = array();\n $properties = get_object_vars($this);\n foreach ($properties as $key => $value) {\n $getter = \"get$key\";\n $allProperties[$key] = $this->$getter();\n }\n return $allProperties;\n }", "title": "" }, { "docid": "76d1988bec784b8c483e112f0c5f89f6", "score": "0.68042195", "text": "public function propertyArray($key) {\n\n\t\t$propertyArray = $this->properties()->where('name', $key)->get();\n\t\tif($propertyArray->count()) {\n\t\t return $propertyArray;\n\t\t}\n\t\treturn NULL;\n\n\t}", "title": "" }, { "docid": "83d1ea03a896e2cdb21d9711d0cc2d1e", "score": "0.6788714", "text": "function BuildArray()\n\t{\n\t\treturn $this->_BuildArray($this->arrProperties);\n\t}", "title": "" }, { "docid": "ea57a5f850aff295a761c699c2b9b3bb", "score": "0.6788435", "text": "public function getArray()\r\n {\r\n $name = self::getName();\r\n $temp = (array) ($this);\r\n $array = array();\r\n\r\n foreach ($temp as $property => $value)\r\n {\r\n $property = preg_match('/^\\x00(?:.*?)\\x00(.+)/', $property, $matches) ? $matches[1] : $property;\r\n $getValue = $this->getValue($property);\r\n $value = $getValue ? $getValue : $value;\r\n\r\n if ($value instanceof \\Type\\Generic)\r\n {\r\n $value = $value->toDb();\r\n }\r\n\r\n if ($value instanceof \\Db\\Model)\r\n {\r\n $value = $value->getArray();\r\n }\r\n\r\n $array[$property] = $value;\r\n }\r\n\r\n return $array;\r\n }", "title": "" }, { "docid": "64a65e153715ca667baee4ca05063ab7", "score": "0.678343", "text": "public function propertyAnnotations(string $class, string $property): array;", "title": "" }, { "docid": "e2167b1c44043cdceb9fe129d68fa138", "score": "0.67606044", "text": "protected function properties()\n {\n return [\n 'directory_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DIRECTORY_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Directory number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__directory_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DIRECTORY_NUMBER',\n ]\n ]\n ),\n 'route_partition' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ROUTE_PARTITION',\n C__PROPERTY__INFO__DESCRIPTION => 'Route partition'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__route_partition'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ROUTE_PARTITION',\n ]\n ]\n ),\n 'description2' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__description2'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DESCRIPTION',\n ]\n ]\n ),\n 'alerting_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ALERTING_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Alerting name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__alerting_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ALERTING_NAME',\n ]\n ]\n ),\n 'ascii_alerting_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_ALERTING_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII alerting name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_alerting_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_ALERTING_NAME',\n ]\n ]\n ),\n 'allow_cti_control' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ALLOW_CTI_CONTROL',\n C__PROPERTY__INFO__DESCRIPTION => 'Allow control of device from CTI'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__allow_cti_control'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ALLOW_CTI_CONTROL',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'associated_devices' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASSOCIATED_DEVICES',\n C__PROPERTY__INFO__DESCRIPTION => 'Associated devices'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASSOCIATED_DEVICES',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_voip_phone_line',\n 'callback_property_associated_devices'\n ]\n )\n ]\n ]\n ]\n ),\n 'voice_mail_profile' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__VOICE_MAIL_PROFILE',\n C__PROPERTY__INFO__DESCRIPTION => 'Voice mail profile'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__voice_mail_profile'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__VOICE_MAIL_PROFILE',\n ]\n ]\n ),\n 'calling_search_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLING_SEARCH_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Calling search space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__calling_search_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLING_SEARCH_SPACE',\n ]\n ]\n ),\n 'presence_group' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__PRESENCE_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Presence group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__presence_group'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__PRESENCE_GROUP',\n ]\n ]\n ),\n 'user_hold_moh_audio_source' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__USER_HOLD_MOH_AUDIO_SOURCE',\n C__PROPERTY__INFO__DESCRIPTION => 'User hold MOH audio source'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__user_hold_moh_audio_source'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__USER_HOLD_MOH_AUDIO_SOURCE',\n ]\n ]\n ),\n 'network_hold_moh_audio_source' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__NETWORK_HOLD_MOH_AUDIO_SOURCE',\n C__PROPERTY__INFO__DESCRIPTION => 'Network hold MOH audio source'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__network_hold_moh_audio_source'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__NETWORK_HOLD_MOH_AUDIO_SOURCE',\n ]\n ]\n ),\n 'auto_answer' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__AUTO_ANSWER',\n C__PROPERTY__INFO__DESCRIPTION => 'Auto answer'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__auto_answer'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__AUTO_ANSWER',\n ]\n ]\n ),\n 'call_forward_all' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_FORWARD_ALL',\n C__PROPERTY__INFO__DESCRIPTION => 'Call forward all'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_forward_all'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_FORWARD_ALL',\n ]\n ]\n ),\n 'sec_calling_search_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__SEC_CALLING_SEARCH_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Secondary Calling Search Space for Forward All'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__sec_calling_search_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__SEC_CALLING_SEARCH_SPACE',\n ]\n ]\n ),\n 'forward_busy_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward busy internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_busy_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_INTERNAL',\n ]\n ]\n ),\n 'forward_busy_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward busy external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_busy_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_EXTERNAL',\n ]\n ]\n ),\n 'forward_no_answer_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no answer internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_answer_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_INTERNAL',\n ]\n ]\n ),\n 'forward_no_answer_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no answer external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_answer_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_EXTERNAL',\n ]\n ]\n ),\n 'forward_no_coverage_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no coverage internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_coverage_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_INTERNAL',\n ]\n ]\n ),\n 'forward_no_coverage_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no coverage external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_coverage_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_EXTERNAL',\n ]\n ]\n ),\n 'forward_on_cti_fail' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_ON_CTI_FAIL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward on CTI fail'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_on_cti_fail'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_ON_CTI_FAIL',\n ]\n ]\n ),\n 'forward_unregistered_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward unregistered internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_unregistered_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_INTERNAL',\n ]\n ]\n ),\n 'forward_unregistered_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward unregistered external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_unregistered_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_EXTERNAL',\n ]\n ]\n ),\n 'no_answer_ring_duration' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__NO_ANSWER_RING_DURATION',\n C__PROPERTY__INFO__DESCRIPTION => 'No answer ring duration'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__no_answer_ring_duration'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__NO_ANSWER_RING_DURATION',\n ]\n ]\n ),\n 'call_pickup_group' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP',\n ]\n ]\n ),\n 'display' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DISPLAY',\n C__PROPERTY__INFO__DESCRIPTION => 'Display'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__display'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DISPLAY',\n ]\n ]\n ),\n 'ascii_display' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_DISPLAY',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII Display'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_display'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_DISPLAY',\n ]\n ]\n ),\n 'line_text_label' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__LINE_TEXT_LABEL',\n C__PROPERTY__INFO__DESCRIPTION => 'Line text label'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__line_text_label'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__LINE_TEXT_LABEL',\n ]\n ]\n ),\n 'ascii_line_text_label' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_LINE_TEXT_LABEL',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII Line text label'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_line_text_label'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_LINE_TEXT_LABEL',\n ]\n ]\n ),\n 'visual_message_indicator' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__VISUAL_MESSAGE_INDICATOR',\n C__PROPERTY__INFO__DESCRIPTION => 'Visual Message Waiting Indicator Policy'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__visual_message_indicator'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__VISUAL_MESSAGE_INDICATOR',\n ]\n ]\n ),\n 'audible_message_indicator' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__AUDIBLE_MESSAGE_INDICATOR',\n C__PROPERTY__INFO__DESCRIPTION => 'Audible Message Waiting Indicator Policy'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__audible_message_indicator'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__AUDIBLE_MESSAGE_INDICATOR',\n ]\n ]\n ),\n 'ring_settings_idle' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_IDLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Ring Setting (Phone idle)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ring_settings_idle'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_IDLE',\n ]\n ]\n ),\n 'ring_settings_active' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_ACTIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'Ring Setting (Phone active)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ring_settings_active'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_ACTIVE',\n ]\n ]\n ),\n 'call_pickup_group_idle' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_IDLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group audio alert setting (phone idle)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group_idle'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_IDLE',\n ]\n ]\n ),\n 'call_pickup_group_active' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_ACTIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group audio alert setting (phone active)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group_active'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_ACTIVE',\n ]\n ]\n ),\n 'recording_option' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_OPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Recording option'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__recording_option'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_OPTION',\n ]\n ]\n ),\n 'recording_profile' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_PROFILE',\n C__PROPERTY__INFO__DESCRIPTION => 'Recording profile'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__recording_profile'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_PROFILE',\n ]\n ]\n ),\n 'monitoring_css' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__MONITORING_CSS',\n C__PROPERTY__INFO__DESCRIPTION => 'Monitoring calling search space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__monitoring_css'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__MONITORING_CSS',\n ]\n ]\n ),\n 'log_missed_calls' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__LOG_MISSED_CALLS',\n C__PROPERTY__INFO__DESCRIPTION => 'Log missed calls'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__log_missed_calls'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__LOG_MISSED_CALLS',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'external_phone_number_mask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__EXTERNAL_PHONE_NUMBER_MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'External phone number mask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__external_phone_number_mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__EXTERNAL_PHONE_NUMBER_MASK',\n ]\n ]\n ),\n 'max_number_of_calls' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__MAX_NUMBER_OF_CALLS',\n C__PROPERTY__INFO__DESCRIPTION => 'Maximum number of calls'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__max_number_of_calls'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__MAX_NUMBER_OF_CALLS',\n ]\n ]\n ),\n 'busy_trigger' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__BUSY_TRIGGER',\n C__PROPERTY__INFO__DESCRIPTION => 'Busy trigger'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__busy_trigger'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__BUSY_TRIGGER',\n ]\n ]\n ),\n 'caller_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Caller name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__caller_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NAME',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'caller_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Caller number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__caller_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'redirected_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__REDIRECTED_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Redirected number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__redirected_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__REDIRECTED_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'dialed_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DIALED_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Dialed number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__dialed_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DIALED_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__VOIP_PHONE_LINE\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "4fd0be02a1dfbc33e102cbea2025c521", "score": "0.675532", "text": "public function toArray()\n {\n $array = array();\n foreach($this as $prop => $value) {\n $array[$prop] = $value;\n }\n \n return $array;\n }", "title": "" }, { "docid": "64f03ae94b4400a74441d6508d964980", "score": "0.6737899", "text": "public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "4d615b7e4d0891635d9b9d7840abc302", "score": "0.6733902", "text": "public function getDataArray() {\n\n\t\t$data = array();\n\t\t\n\t\tforeach (array_keys($this->_properties) as $property) {\n\t\t\tif (is_array($this->_properties[$property]) && $this->getConfig($property, 'type') != 'inline' || in_array($property, array('uid', 'pid', 'sorting'))) {\n\t\t\t\t// TODO: no data from aliases!\t\t\t\t\t\n\t\t\t\t$data[$property] = $this->__get($property);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c04e9320d7b7a6445e0ded5e156ea76b", "score": "0.67299473", "text": "public function asArray()\n {\n if ( $this->isSection() || $this->isGlobalSection() ) {\n\n $properties = array();\n\n foreach ( $this->getAllProperties() as $property ) {\n\n /** @var Node $property */\n $properties = array_merge_recursive($properties, $property->asArray());\n\n }\n\n return $properties;\n\n }\n\n if ( $this->isProperty() ) {\n\n return array(\n $this->getAttribute('name') => $this->getAttribute('value'),\n );\n\n }\n\n return array();\n }", "title": "" }, { "docid": "6360299211f5c20286006c045bec5592", "score": "0.6717333", "text": "protected function properties()\n {\n return [\n 'object' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC_UNIVERSAL__OBJECT',\n C__PROPERTY__INFO__DESCRIPTION => 'Object',\n C__PROPERTY__INFO__BACKWARD => true\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_contact_list__isys_obj__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_connection',\n 'isys_connection__isys_obj__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__ORGANISATION_TARGET_OBJECT',\n C__PROPERTY__UI__PARAMS => [\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATG__CONTACT',\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'object'\n ]\n ]\n ]\n ),\n 'object_type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__OBJTYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Object type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__isys_obj_type__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => ''\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'obj_type'\n ]\n ]\n ]\n ),\n 'role' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CONTACT_ROLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Role'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_contact_list__isys_contact_tag__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_contact_tag',\n 'isys_contact_tag__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__ORGANISATION_ROLE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_contact_tag'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_contact_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__PERSON_CONTACT_ASSIGNMENT\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n ]\n )\n ];\n }", "title": "" }, { "docid": "7b67547c4fe6352a32ceb644092e6644", "score": "0.67058015", "text": "public function getAllHandledProperties() : array {}", "title": "" }, { "docid": "7b67547c4fe6352a32ceb644092e6644", "score": "0.6705457", "text": "public function getAllHandledProperties() : array {}", "title": "" }, { "docid": "e7babb8c10924c1984bd6b9e39ee1d65", "score": "0.66874987", "text": "public function toArray()\n {\n $properties = (new \\ReflectionObject($this))->getProperties(\\ReflectionProperty::IS_PUBLIC);\n $fields = array_map(function (\\ReflectionProperty $item)\n {\n return $item->getName();\n }, $properties);\n $values = array_map(function ($item)\n {\n return $this->$item;\n }, $fields);\n $fields = array_map(function ($item)\n {\n return $this->_prefix . $item;\n }, $fields);\n return array_combine($fields, $values);\n }", "title": "" }, { "docid": "d627557fe2220fe9d46106a510b430ae", "score": "0.6685342", "text": "public function getProperties(): array\n {\n return array_map(function($xProperty) {\n return $xProperty->getName();\n }, $this->xReflectionClass->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED));\n }", "title": "" }, { "docid": "465b8a18b019d33d39da6d9fb3d1e5b0", "score": "0.6674673", "text": "protected function parseMagicProperties()\n {\n $result = array();\n $class = $this->getClass();\n foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {\n if ($property = AmPropertyFactory::createFromMethod($class, $method)) {\n $result[] = $property;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "dff1d2e34e9e9148529ac7cb9c9262a0", "score": "0.66685504", "text": "public function toArray()\n {\n return TypeCaster::stripArrays($this->properties);\n }", "title": "" }, { "docid": "29d931b751f89b030df0eeeb7805affd", "score": "0.6655897", "text": "abstract protected function extractableProperties(): array;", "title": "" }, { "docid": "66f06a9865326285b9333e4a2955a218", "score": "0.6630246", "text": "public function toArray()\n {\n return $this->propertiesToArray();\n }", "title": "" }, { "docid": "66f6170766126d249d0e17b9418029f8", "score": "0.6626916", "text": "public function toArray(): array\n {\n $result = [];\n foreach ($this as $propertyName => $propertyValue) {\n if (null !== $propertyValue) {\n $result[$propertyName] = $propertyValue;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "97f316eba03f60dc4903efdc9d2f4fab", "score": "0.66207737", "text": "public function properties()\n\t{\n\n\t\t$data = array();\n\n\t\tforeach($this->attributes as $attribute)\n\t\t{\n\t\t\tif(!in_array($attribute, $this->exclude))\n\t\t\t{\n\t\t\t\t$data[$attribute] = $this->getAttribute($attribute);\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e15d0622845f9b882d7508335bbf80ce", "score": "0.6612975", "text": "public static function getProperties(): array\n {\n return static::$properties;\n }", "title": "" }, { "docid": "b9e6ae3078438e40f9fc031d30d8e778", "score": "0.6604687", "text": "public static function getArray() {\n\n $object = new \\ReflectionClass(MediaLink::class);\n $properties = $object->getProperties(\\ReflectionProperty::IS_PUBLIC);\n $array = array();\n\n foreach ($properties as $property) {\n $value = $property->getValue();\n if (!empty($value)) {\n $array[$property->getName()] = $value;\n }\n }\n return $array;\n }", "title": "" }, { "docid": "7d83c3c9960f37d1c6c6eb014123ffc8", "score": "0.6600125", "text": "public function toArray(): array\n {\n $result = [];\n\n foreach ($this->getPropertyValues() as $propertyValue) {\n $property = $propertyValue->getProperty();\n $propertyType = $property->getType();\n $propertyName = $property->getName();\n\n switch (true) {\n case $propertyType instanceof PrimitiveType:\n $result[$propertyName] = $propertyValue->getPrimitive()->toMixed();\n break;\n\n case $propertyType instanceof ComplexType:\n $result[$propertyName] = $propertyValue->getComplexValue()->toArray();\n break;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "f019b81ce4de4021da2e6c31ec1890a2", "score": "0.6591556", "text": "protected function dynamic_properties()\n {\n return [\n '_autonomy_time' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__AUTONOMY_TIME',\n C__PROPERTY__INFO__DESCRIPTION => 'Autonomy time'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_autonomy_time'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ],\n '_warmup_time' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__WARMUP_TIME',\n C__PROPERTY__INFO__DESCRIPTION => 'Warmup time'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_warmup_time'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ],\n '_fuel_tank' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__FUEL_TANK',\n C__PROPERTY__INFO__DESCRIPTION => 'Fuel tank'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_fuel_tank'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ]\n ];\n }", "title": "" }, { "docid": "01a402cf7bb2bcbef7b651ee2069c179", "score": "0.65869933", "text": "public function toArray()\n\t{\n\t\treturn array_filter($this->a_props, 'strlen');\n\t}", "title": "" }, { "docid": "b2cba6b2a35879b286479e0d09ba0d7a", "score": "0.6579503", "text": "public function toArray()\n {\n //Instantiate the reflection object\n $oReflector = new \\ReflectionClass(get_class($this));\n\n //Now get all the properties from class A in to $properties array\n $arrProperties = $oReflector->getProperties();\n $arrData = array();\n //Now go through the $properties array and populate each property\n foreach ($arrProperties as $oProperty) {\n $sProperty = $oProperty->getName();\n $arrData[$sProperty] = $this->{$sProperty};\n }\n \n return $arrData;\n }", "title": "" }, { "docid": "28642b4a2441bfbef4ecf1f883bdf759", "score": "0.65245557", "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": "b6f3ef25565d6c9487dd6306211857c3", "score": "0.65082777", "text": "protected function properties()\n {\n return [\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__POBJ_TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__isys_cats_eps_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_eps_type',\n 'isys_cats_eps_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__POBJ_TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_cats_eps_type'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'warmup_time' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__WARMUP_TIME',\n C__PROPERTY__INFO__DESCRIPTION => 'Warmup time'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__warmup_time'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__WARMUP_TIME'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['time']\n ],\n C__PROPERTY__FORMAT__UNIT => 'warmup_time_unit'\n ]\n ]\n ),\n 'warmup_time_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__warmup_time__isys_unit_of_time__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_unit_of_time',\n 'isys_unit_of_time__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__WARMUP_TIME_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_unit_of_time'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'fuel_tank' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__FUEL_TANK',\n C__PROPERTY__INFO__DESCRIPTION => 'Fuel tank'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__fuel_tank'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__FUEL_TANK'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['volume']\n ],\n C__PROPERTY__FORMAT__UNIT => 'volume_unit'\n ]\n ]\n ),\n 'volume_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__isys_volume_unit__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_volume_unit',\n 'isys_volume_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__FUEL_TANK_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_volume_unit'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'autonomy_time' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__EPS__AUTONOMY_TIME',\n C__PROPERTY__INFO__DESCRIPTION => 'Autonomy time'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__autonomy_time'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__AUTONOMY_TIME'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['time']\n ],\n C__PROPERTY__FORMAT__UNIT => 'autonomy_time_unit'\n ]\n ]\n ),\n 'autonomy_time_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__autonomy_time__isys_unit_of_time__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_unit_of_time',\n 'isys_unit_of_time__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATS__EPS__AUTONOMY_TIME_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_unit_of_time'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_eps_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__EPS\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "cfcc8ee03a16dbafa9fbfcb2a3eb3705", "score": "0.64705014", "text": "function getAllHandledProperties() : array ;", "title": "" }, { "docid": "292a7a9c283763be0856d0b580e5b59f", "score": "0.6441072", "text": "public function getPropertiesSelect()\n {\n $pl = new PropertyList();\n $properties = $pl->get();\n $arr = [];\n foreach ($properties as $property) {\n /** @var $property Property */\n $arr[$property->getID()] = $property->getName();\n }\n return $arr;\n }", "title": "" }, { "docid": "a7587a1d02a733fdaeade24c88d371ba", "score": "0.6440262", "text": "public function actionDataProperties()\n {\n $data = [];\n foreach (Property::find()->all() as $item) {\n $object = Property::getObject($item->class_name);\n $data[] = [\n 'id' => $item->id,\n 'var_name' => $object->varName(),\n 'option_json' => $object->options(),\n 'label' => $object->label(),\n 'type' => $object->type(),\n 'default_value' => $object->defaultValue(),\n 'help' => $object->help(),\n 'i18n' => $object->i18n,\n ];\n }\n\n return $data;\n }", "title": "" }, { "docid": "ba45047fa9b4508be71e9630b9e7ee87", "score": "0.6434747", "text": "public static function getProperties()\n {\n return [\n 'ID' => [false, self::PROPERTY_TYPE_INT, null, false, false],\n 'Type' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'RelatedClient' => [false, self::PROPERTY_TYPE_OBJECT, 'PracticeManager\\\\Client\\\\RelatedClient', false, false],\n 'NumberOfShares' => [false, self::PROPERTY_TYPE_INT, null, false, false],\n 'Percentage' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'StartDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EndDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "title": "" }, { "docid": "fd3347c70a7b0b252ba44841c20e3c61", "score": "0.6420915", "text": "public function toArray()\n {\n $array = [];\n $r = new \\ReflectionClass($this);\n foreach ($r->getProperties() as $var) {\n $key = $var->name;\n\n if (!is_null($this->$key) || !empty($this->$key)) {\n $array[$key] = $this->$key;\n } else {\n $array[$key] = '';\n }\n }\n return $array;\n }", "title": "" }, { "docid": "29d2fc5e948c88d55769b3dd6fc63626", "score": "0.6416985", "text": "public function getProperties(): array\n {\n $properties = [];\n\n // URL must precede all other properties\n if ($this->url !== null) {\n $properties[] = new Property(Property::VIDEO_URL, $this->url);\n }\n\n if ($this->height !== null) {\n $properties[] = new Property(Property::VIDEO_HEIGHT, $this->height);\n }\n\n if ($this->secureUrl !== null) {\n $properties[] = new Property(Property::VIDEO_SECURE_URL, $this->secureUrl);\n }\n\n if ($this->type !== null) {\n $properties[] = new Property(Property::VIDEO_TYPE, $this->type);\n }\n\n if ($this->width !== null) {\n $properties[] = new Property(Property::VIDEO_WIDTH, $this->width);\n }\n\n return $properties;\n }", "title": "" }, { "docid": "623ddea1f9b086bc9c9978a425516744", "score": "0.6411135", "text": "public function propertyNames() {\n $a = new \\blaze\\collections\\arrays\\ArrayObject(count($this->properties));\n $keys = array_keys($this->properties);\n\n for($i = 0; $i < count($keys); $i++)\n $a[] = new \\blaze\\lang\\String($keys);\n }", "title": "" }, { "docid": "1e8f617f4d2aeff08c264d0368de0b07", "score": "0.6398079", "text": "protected static function define_other_properties(): array {\n return [\n 'coursecompletions' => [\n 'type' => [\n 'courseid' => [\n 'type' => PARAM_INT,\n ],\n 'coursefullname' => [\n 'type' => PARAM_TEXT,\n ],\n 'completionstatus' => [\n 'type' => PARAM_TEXT,\n ],\n 'timecompleted' => [\n 'type' => PARAM_TEXT,\n ],\n ],\n 'multiple' => true,\n 'optional' => true,\n ],\n 'coursecompletionscount' => [\n 'type' => PARAM_INT,\n ],\n ];\n }", "title": "" }, { "docid": "27c58f2ec2c551de45940892dca98430", "score": "0.63921773", "text": "protected function properties()\n {\n return [\n 'database_assignment' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__DATABASE_GATEWAY__TARGET_SCHEMA',\n C__PROPERTY__INFO__DESCRIPTION => 'Target schema'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_database_access_list__isys_obj__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DATABASE_ASSIGNMENT__TARGET_SCHEMA',\n C__PROPERTY__UI__PARAMS => [\n 'typeFilter' => 'C__OBJTYPE__DATABASE_SCHEMA'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => true\n ]\n ]\n ),\n 'runs_on' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DATABASE_ASSIGNMENT__SOFTWARE_RUNS_ON',\n C__PROPERTY__INFO__DESCRIPTION => 'Software runs on'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_relation_list__isys_obj__id__slave'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DATABASE_ASSIGNMENT__RELATION_OBJECT',\n C__PROPERTY__UI__PARAMS => [\n 'categoryFilter' => 'isys_cmdb_dao_category_g_database_assignment::object_browser'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => true\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_database_access_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__DATABASE_ASSIGNMENT\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "1f1b40f0c57978735f7327f725d6a022", "score": "0.6353927", "text": "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCESS_TITLE'\n ]\n ]\n ),\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCESS_TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Access type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__isys_access_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_access_type',\n 'isys_access_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCESS_TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_access_type'\n ]\n ]\n ]\n ),\n 'url' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCESS_URL',\n C__PROPERTY__INFO__DESCRIPTION => 'URL'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__url'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCESS_URL'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'formatted_url' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCESS_URL',\n C__PROPERTY__INFO__DESCRIPTION => 'URL'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__id'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'access_property_formatted_url'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ]\n ]\n ),\n 'primary' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCESS_PRIMARY',\n C__PROPERTY__INFO__DESCRIPTION => 'Primary?'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__primary'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCESS_PRIMARY',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO()),\n 'p_bDbFieldNN' => 1\n ],\n C__PROPERTY__UI__DEFAULT => 1,\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_access_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__ACCESS\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "b00e9f8a9119eef3644819263451dfbc", "score": "0.6353511", "text": "protected function properties()\n {\n return [\n 'assigned_objects' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__POPUP__BROWSER__SELECTED_OBJECT',\n C__PROPERTY__INFO__DESCRIPTION => 'Assigned objects'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__isys_connection__id',\n C__PROPERTY__DATA__RELATION_TYPE => C__RELATION_TYPE__SHARE_ACCESS,\n C__PROPERTY__DATA__RELATION_HANDLER => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_share_access',\n 'callback_property_relation_handler'\n ], [\n 'isys_cmdb_dao_category_g_share_access',\n true\n ]\n ),\n C__PROPERTY__DATA__FIELD_ALIAS => 'access_object',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_connection',\n 'isys_connection__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__ASSIGNED_OBJECTS',\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'connection'\n ]\n ]\n ]\n ),\n 'mountpoint' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SHARE_ACCESS__MOUNTPOINT',\n C__PROPERTY__INFO__DESCRIPTION => 'Mountpoint'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__mountpoint'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__MOUNTPOINT'\n ]\n ]\n ),\n 'shares' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SHARES__SHARE_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Share title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__isys_catg_shares_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_shares_list',\n 'isys_catg_shares_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__ASSIGNED_SHARE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_share_access',\n 'callback_property_shares'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'share_access'\n ]\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'LC__CMDB__LOGBOOK__DESCRIPTION'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__SHARE_ACCESS\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "b45cd8ad51bdef0dce4a99574b3e7665", "score": "0.63430095", "text": "public static function getProperties()\n {\n return [\n 'timesheetLineID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'earningsRateID' => [true, self::PROPERTY_TYPE_GUID, null, false, false],\n 'date' => [true, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'numberOfUnits' => [true, self::PROPERTY_TYPE_INT, null, false, false],\n 'updatedDateUTC' => [false, self::PROPERTY_TYPE_TIMESTAMP, '\\\\DateTimeInterface', false, false],\n 'createdDateUTC' => [false, self::PROPERTY_TYPE_TIMESTAMP, '\\\\DateTimeInterface', false, false],\n ];\n }", "title": "" }, { "docid": "7a0629a9daa45f9170a2d9dac5c0a8d6", "score": "0.6340091", "text": "public function toArray(): array\n {\n if ($this->validate()) {\n $data = [\n '$id' => '#/properties/' . $this->getName(),\n 'type' => $this->field_type ?? $this->getFieldType(),\n 'title' => $this->getTitle(),\n 'name' => $this->getName(),\n 'component_type' => Str::slug($this->getComponentType()),\n 'default_value' => $this->field_default_value,\n 'attrs' => [\n 'label' => $this->field_label,\n 'placeholder' => $this->field_placeholder,\n ],\n 'value' => $this->field_value,\n 'nullable' => $this->is_nullable,\n 'meta' => [],\n ];\n\n if ($this->getFieldFormat()) {\n $data['format'] = $this->getFieldFormat();\n }\n\n if ($this->field_minimum) {\n $data['minimum'] = $this->field_minimum;\n }\n if ($this->field_maximum) {\n $data['maximum'] = $this->field_maximum;\n }\n\n\n if (!empty($this->meta)) {\n $data['meta'] = $this->meta;\n }\n\n $data['meta']['visibility'] = [\n 'browse' => $this->visibility_browse,\n 'read' => $this->visibility_read,\n 'edit' => $this->visibility_edit,\n 'create' => $this->visibility_create,\n ];\n\n if (!empty($this->base_classes)) {\n $data['base_classes'] = $this->base_classes;\n }\n\n if ($this instanceof HasRelationInterface && $this->hasRelation()) {\n $data['meta']['relation'] = $this->relationToArray();\n }\n\n if ($params = $this->getAdditionalProperties()) {\n foreach ($params as $key => $param) {\n if (is_array($param)) {\n $obj = $param;\n $param = $key;\n if (isset($obj['type']) && $obj['type'] == 'object') {\n $data[$param] = (object)$this->{$param};\n }\n } else {\n if (isset($this->{$param})) {\n $data[$param] = $this->{$param};\n }\n }\n }\n }\n return $data;\n } else {\n return [];\n // throw new Exception(\"Invalid data provided for this field. Make sure the Field is a valid Type and/or Relation\");\n }\n }", "title": "" }, { "docid": "3d6bcd3eee06b4c40e79d39bb1b1e836", "score": "0.63377917", "text": "protected function dynamic_properties()\n {\n return [\n '_application' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__OPERATING_SYSTEM',\n C__PROPERTY__INFO__DESCRIPTION => 'Operating system'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_application'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ]\n ];\n }", "title": "" }, { "docid": "4ac19dec36f8c0fd25dbcd1fc7ac8a60", "score": "0.63232744", "text": "public function getListOfProperties()\n {\n return [\n 'id',\n 'name',\n ];\n }", "title": "" }, { "docid": "8957d8f8c74e1fab113149e37af5dcbe", "score": "0.62822104", "text": "public function getProperties()\r\n {\r\n $tmp = array();\r\n foreach($this->getColumns() as $id => $name) {\r\n $tmp[$name]['name'] = $name;\r\n $tmp[$name]['type'] = $this->getTypeFor($name);\r\n $tmp[$name]['desc'] = $this->getMysqlDatatype($name);\r\n }\r\n return $tmp;\r\n }", "title": "" }, { "docid": "a1277b5eec398cc03e60b914f88e8087", "score": "0.6276233", "text": "public function toArray() {\n $arr = array();\n $reflection = new ReflectionObject($this);\n $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC);\n foreach ($properties as $property) {\n $key = $property->getName();\n $value = $property->getValue($this);\n if ($value != null || (is_numeric($value) && $value == 0)) {\n $arr[$key] = $value;\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "4953c5107990ffcc2d7be47cfb511d67", "score": "0.6262338", "text": "public function properties() \n {\n $properties = $this->renderWith();\n\n if (is_null($properties)) {\n return [];\n }\n\n return $properties;\n }", "title": "" }, { "docid": "39df2036c7e1175d09ee51353aaf55ad", "score": "0.62567496", "text": "public function getPropertiesAttribute() {\n\n // Format:\n\n // property: {value1, value2}\n\n // Properties: stcw_regulations, languages, country, state, city, seaman book, dp\n\n // They can be: boolean, scale, specific array_values\n\n $properties = [];\n\n if(count($this->stcw_regulations) > 0) {\n\n $properties[] = [\n 'name' => 'stcw_regulations',\n 'label' => 'STCW Regulations',\n 'type' => 'value',\n 'values' => $this->stcw_regulations()->get()->map( function($item) {\n\n return ['id' => $item->stcw_regulation->id, 'value' => $item->stcw_regulation->regulation, 'country' => null, 'valid' => true];\n }),\n ];\n }\n\n if(count($this->seaman_books) > 0) {\n\n $properties[] = [\n 'name' => 'seaman_books',\n 'label' => 'Seaman Book',\n 'type' => 'value',\n 'values' => $this->seaman_books()->get()->map( function($item) {\n\n //return ['id' => $item->seaman_book_type->id, 'value' => $item->seaman_book_type->label, 'country' => null, 'valid' => true];\n return ['id' => null, 'value' => null, 'country' => $item->country->name, 'valid' => true];\n }),\n ];\n }\n\n if(count($this->languages) > 0) {\n\n $properties[] = [\n 'name' => 'languages',\n 'label' => 'Languages',\n 'type' => 'scale',\n 'values' => $this->languages()->get()->map( function($item) {\n\n return ['id' => $item->language->code, 'value' => $item->language->label, 'scale' => $item->level , 'country' => null];\n }),\n ];\n }\n\n if(count($this->certificates) > 0) {\n\n $properties[] = [\n 'name' => 'certificate_types',\n 'label' => 'Certificates',\n 'type' => 'value',\n 'values' => $this->certificates()->get()->map( function($item) {\n\n return ['id' => $item->certificate_type->id, 'value' => $item->certificate_type->label, 'country' => null, 'valid' => true];\n }),\n ];\n }\n\n // Dynamic positioning\n\n if(count($this->dp) > 0) {\n\n $properties[] = [\n 'name' => 'dp',\n 'label' => 'Dynamic Positioning',\n 'type' => 'value',\n 'values' => $this->dp()->get()->map( function($item) {\n\n return ['id' => $item->dp_type->id, 'value' => $item->dp_type->label, 'country' => null, 'valid' => true];\n }),\n ];\n }\n\n // Experience on ships\n\n if(count($this->ships) > 0) {\n\n $properties[] = [\n 'name' => 'ship_types',\n 'label' => 'Ships',\n 'type' => 'value',\n 'values' => $this->ships()->get()->map( function($item) {\n\n return ['id' => $item->ship_type->id, 'value' => $item->ship_type->label, 'country' => null];\n }),\n ];\n }\n\n // Country\n\n if(count($this->country) > 0) {\n\n $properties[] = [\n 'name' => 'country',\n 'label' => 'Country',\n 'type' => 'value',\n 'values' => [['id' => $this->country->code, 'value' => $this->country->name, 'country' => null]],\n ];\n }\n\n // Location in a country\n\n if($this->state) {\n\n $properties[] = [\n 'name' => 'state',\n 'label' => 'State',\n 'type' => 'value',\n 'values' => [['id' => $this->state, 'value' => $this->state, 'country' => null]],\n ];\n }\n\n return $properties;\n\n }", "title": "" }, { "docid": "82ff470a0d6f44a5979b497a429fcdd7", "score": "0.624892", "text": "public function toArray()\n {\n $keys = array();\n\n foreach ($this->_reflexion->getProperties() as $property) {\n \n $keys[] = $property->getName();\n }\n\n return array_intersect_key(get_object_vars($this), array_flip($keys));\n }", "title": "" }, { "docid": "5350aaa427fd025332520bc3f29bdfa9", "score": "0.62279797", "text": "public function getSerializableContents(): array\n {\n $currentProperties = array_keys(get_object_vars($this));\n $properties = array_diff(\n $currentProperties,\n array_merge($this->ignoredProperties, ['ignoredProperties'])\n );\n\n $results = [];\n\n foreach ($properties as $property) {\n $results[$property] = $this->getSimpleValue($this->$property);\n }\n\n return $results;\n }", "title": "" }, { "docid": "bff9e4a390f9c47c52eaf768281e3f15", "score": "0.62257797", "text": "protected static function getProperties(): array {\n $props = [];\n try {\n $rc = new \\ReflectionClass(static::decoratedClass());\n foreach ($rc->getMethods(\\ReflectionMethod::IS_PUBLIC) as $method) {\n // This is not a property getter rather a utility function.\n if ($method->getNumberOfParameters() > 0) {\n continue;\n }\n // Find property getters on decorated PHP API Client entity classes.\n if (strpos($method->getName(), 'get') === 0) {\n $property = lcfirst(substr($method->getName(), 3));\n }\n elseif (strpos($method->getName(), 'is') === 0) {\n $property = lcfirst(substr($method->getName(), 2));\n }\n else {\n continue;\n }\n\n if (static::exposePropertyAsBaseField($property)) {\n continue;\n }\n $props[$property] = static::propertyFieldType($property);\n }\n }\n catch (\\ReflectionException $e) {\n }\n return $props;\n }", "title": "" }, { "docid": "322692b76e48c470a13f3d350efe5a1a", "score": "0.62213176", "text": "public static function getProperties()\n {\n return [\n 'timesheetID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'payrollCalendarID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'employeeID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'startDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'status' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'totalHours' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'updatedDateUTC' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'lines' => [false, self::PROPERTY_TYPE_OBJECT, Line::class, true, true]\n ];\n }", "title": "" }, { "docid": "c2faba9a6d357381efba8d314fdc2d2a", "score": "0.6212119", "text": "public function properties($prefix = null)\r\n\t{\r\n\t\t$arrReturn = array();\r\n\t\t$arrProperties = get_object_vars($this);\r\n\t\t\r\n\t\tforeach ( $arrProperties as $key => $value )\r\n\t\t{\r\n\t\t\t$array_key = $prefix . $key;\r\n\t\t\t\r\n\t\t\t// exclude arrays\r\n\t\t\t\r\n\t\t\tif ( ! is_array($value) )\r\n\t\t\t{\r\n\t\t\t\t$arrReturn[$array_key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $arrReturn;\r\n\t}", "title": "" }, { "docid": "1e53c9af09d212e4a1cafc098702cd5b", "score": "0.6195019", "text": "public function toArray() {\n\t\t$props = get_object_vars($this);\n\t\tforeach($props as $prop=>$value) {\n\t\t\tif(strpos($prop, '_') === 0) {\n\t\t\t\tunset($props[$prop]);\n\t\t\t}\n\t\t}\n\t\treturn $props;\n\t}", "title": "" }, { "docid": "6664f1289c34e6d43a5569615289843d", "score": "0.6194731", "text": "public function all($property)\n {\n if (!is_string($property) or $property == null or $property == '') {\n throw new InvalidArgumentException(\n \"\\$property should be a string and cannot be null or empty\"\n );\n }\n\n if (isset($this->_properties[$property])) {\n return $this->_properties[$property];\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "90d77acd4af5d45a09a9c6dc0dfdc18e", "score": "0.618623", "text": "public static function _getPropertyNames(): array\n {\n return [\n 'description',\n ];\n }", "title": "" }, { "docid": "4d6ac00f59a0c9bd90545b53f0769f6d", "score": "0.6177349", "text": "public function __toArray() {\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.61751854", "text": "public function getProperties();", "title": "" }, { "docid": "f57d94de483942cd9e851f69c68052c0", "score": "0.61677504", "text": "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "f57d94de483942cd9e851f69c68052c0", "score": "0.61677504", "text": "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "ba729538b314ab5db62f39dd79a7fad4", "score": "0.61618817", "text": "public function properties();", "title": "" }, { "docid": "3d8ad06601a7506c63e3f22a5fac7a7b", "score": "0.61543536", "text": "public function as_array()\n\t{\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "b62aeb36b38be671d214156c01718d75", "score": "0.61521673", "text": "public function toArray() {\n $array = array();\n $rc = new \\ReflectionClass($this);\n\n foreach ($rc->getProperties() as $prop) {\n $prop->setAccessible(true);\n\n $translatedKey = $this->translateKey($prop->getName());\n\n if ($translatedKey === null) {\n $array[strtolower($prop->getName())] = $prop->getValue($this);\n } else {\n $array[strtolower($translatedKey)] = $prop->getValue($this);\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "a5408944b484a9ade441c13c91565f08", "score": "0.614736", "text": "public function jsonSerialize(): array\n {\n return $this->arr_properties;\n }", "title": "" }, { "docid": "4ec24acc4545542bca3904b72cbfcb21", "score": "0.6140436", "text": "public function properties()\n {\n return [\n 'check_command' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_command',\n C__PROPERTY__INFO__DESCRIPTION => 'Command'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_command',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_COMMAND',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_component_dao_nagios',\n 'getCommandsAssoc'\n ]\n ),\n 'p_strClass' => 'input-dual-radio',\n 'p_onChange' => \"idoit.callbackManager.triggerCallback('nagios_service_tpl__check_command_description', this.id);\",\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'check_command'\n ]\n ]\n ]\n ),\n 'name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'name',\n C__PROPERTY__INFO__DESCRIPTION => 'name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NAME'\n ]\n ]\n ),\n 'check_command_plus' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_command_plus',\n C__PROPERTY__INFO__DESCRIPTION => 'Command +'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_command_plus',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_nagios_commands_plus',\n 'isys_nagios_commands_plus__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_COMMAND_PLUS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_nagios_commands_plus',\n 'p_strClass' => 'input-dual-radio mt5',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'check_command_parameters' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_command_parameters',\n C__PROPERTY__INFO__DESCRIPTION => 'Command parameters'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_command_parameters',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_COMMAND_PARAMETERS'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'max_check_attempts' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'max_check_attempts',\n C__PROPERTY__INFO__DESCRIPTION => 'Max attempts'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__max_check_attempts',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__MAX_CHECK_ATTEMPTS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'check_interval' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_interval',\n C__PROPERTY__INFO__DESCRIPTION => 'Interval'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_interval',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_INTERVAL',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'retry_interval' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'retry_interval',\n C__PROPERTY__INFO__DESCRIPTION => 'Retry interval'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__retry_interval',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__RETRY_INTERVAL',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'check_period' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_period',\n C__PROPERTY__INFO__DESCRIPTION => 'Period'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_period',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_PERIOD',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_component_dao_nagios',\n 'getTimeperiodsAssoc'\n ]\n ),\n 'p_strClass' => 'input-dual-radio'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'check_period',\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'check_period_plus' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_period+',\n C__PROPERTY__INFO__DESCRIPTION => 'Check Period +'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_period_plus',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_nagios_timeperiods_plus',\n 'isys_nagios_timeperiods_plus__id'\n ],\n C__PROPERTY__DATA__TABLE_ALIAS => 'timeperiod_plus_a'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_PERIOD_PLUS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_nagios_timeperiods_plus',\n 'p_strClass' => 'input-dual-radio mt5'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'notification_interval' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notification_interval',\n C__PROPERTY__INFO__DESCRIPTION => 'Inertval notification'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notification_interval',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTIFICATION_INTERVAL',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'notification_period' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notification_period',\n C__PROPERTY__INFO__DESCRIPTION => 'Period notification'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notification_period',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTIFICATION_PERIOD',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_component_dao_nagios',\n 'getTimeperiodsAssoc'\n ]\n ),\n 'p_strClass' => 'input-dual-radio'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'notification_period'\n ]\n ]\n ]\n ),\n 'notification_period_plus' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notification_period+',\n C__PROPERTY__INFO__DESCRIPTION => 'Period notification+'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notification_period_plus',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_nagios_timeperiods_plus',\n 'isys_nagios_timeperiods_plus__id'\n ],\n C__PROPERTY__DATA__TABLE_ALIAS => 'timeperiod_plus_b'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTIFICATION_PERIOD_PLUS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_nagios_timeperiods_plus',\n 'p_strClass' => 'input-dual-radio mt5'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'display_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'display_name',\n C__PROPERTY__INFO__DESCRIPTION => 'Dispaly name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__display_name',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__DISPLAY_NAME',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-radio',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'display_name_selection' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'display_name_selection',\n C__PROPERTY__INFO__DESCRIPTION => 'Dispaly name selection'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__display_name_selection',\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__DISPLAY_NAME_SELECTION',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ]\n ]\n ),\n 'active_checks_enabled' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'active_checks_enabled',\n C__PROPERTY__INFO__DESCRIPTION => 'active_checks_enabled'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__active_checks_enabled',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__ACTIVE_CHECKS_ENABLED',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'passive_checks_enabled' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'passive_checks_enabled',\n C__PROPERTY__INFO__DESCRIPTION => 'passive_checks_enabled'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__passive_checks_enabled',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__PASSIVE_CHECKS_ENABLED',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'initial_state' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'initial_state',\n C__PROPERTY__INFO__DESCRIPTION => 'initial_state'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__TYPE => C__TYPE__TEXT,\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__initial_state',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__INITIAL_STATE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_component_dao_nagios',\n 'getServiceFlapDetectionOptionsAssoc'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'service_initial_state'\n ]\n ]\n ]\n ),\n 'notifications_enabled' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notifications_enabled',\n C__PROPERTY__INFO__DESCRIPTION => 'notifications_enabled'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notifications_enabled',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTIFICATIONS_ENABLED',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'service_notification_options' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notification_options',\n C__PROPERTY__INFO__DESCRIPTION => 'notification_options'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notification_options',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTIFICATION_OPTIONS',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_nagios_service_tpl_def',\n 'callback_property_notification_option'\n ]\n ),\n 'emptyMessage' => _L('LC__CATG__NAGIOS__NOTIFICATION_OPTIONS__EMPTY')\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'service_notification_options'\n ]\n ]\n ]\n ),\n 'first_notification_delay' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'first_notification_delay',\n C__PROPERTY__INFO__DESCRIPTION => 'first_notification_delay'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__first_notification_delay',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__FIRST_NOTIFICATION_DELAY',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'flap_detection_enabled' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'flap_detection_enabled',\n C__PROPERTY__INFO__DESCRIPTION => 'flap_detection_enabled'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__flap_detection_enabled',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__FLAP_DETECTION_ENABLED',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'flap_detection_options' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'flap_detection_options',\n C__PROPERTY__INFO__DESCRIPTION => 'flap_detection_options'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__flap_detection_options',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__FLAP_DETECTION_OPTIONS',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_nagios_service_tpl_def',\n 'callback_property_flap_detection_options'\n ]\n ),\n 'emptyMessage' => _L('LC__CATG__NAGIOS__FLAP_DETECTION__EMPTY')\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => null\n ]\n ),\n 'low_flap_threshold' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'low_flap_threshold',\n C__PROPERTY__INFO__DESCRIPTION => 'low_flap_threshold'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__low_flap_threshold',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__LOW_FLAP_THRESHOLD',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ]\n ]\n ),\n 'high_flap_threshold' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'high_flap_threshold',\n C__PROPERTY__INFO__DESCRIPTION => 'high_flap_threshold'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__high_flap_threshold',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__HIGH_FLAP_THRESHOLD',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ]\n ]\n ),\n 'is_volatile' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'is_volatile',\n C__PROPERTY__INFO__DESCRIPTION => 'is_volatile'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__is_volatile',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__IS_VOLATILE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'obsess_over_service' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'obsess_over_service',\n C__PROPERTY__INFO__DESCRIPTION => 'obsess_over_service'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__obsess_over_service',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__OBSESS_OVER_SERVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'check_freshness' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'check_freshness',\n C__PROPERTY__INFO__DESCRIPTION => 'check_freshness'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__check_freshness',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CHECK_FRESHNESS',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'freshness_threshold' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'freshness_threshold',\n C__PROPERTY__INFO__DESCRIPTION => 'freshness_threshold'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__freshness_threshold'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__FRESHNESS_THRESHOLD',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPlaceholder' => '0',\n 'default' => null\n ],\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ]\n ]\n ),\n 'event_handler_enabled' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'event_handler_enabled',\n C__PROPERTY__INFO__DESCRIPTION => 'event_handler_enabled'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__event_handler_enabled'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__EVENT_HANDLER_ENABLED',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'event_handler' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'event_handler',\n C__PROPERTY__INFO__DESCRIPTION => 'event_handler'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__event_handler'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__EVENT_HANDLER',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_component_dao_nagios',\n 'getCommandsAssoc'\n ]\n ),\n 'p_strClass' => 'input-dual-radio',\n 'p_onChange' => \"idoit.callbackManager.triggerCallback('nagios_service_tpl__check_command_description', this.id);\",\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper_nagios',\n 'event_handler'\n ]\n ]\n ]\n ),\n 'event_handler_plus' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'event_handler+',\n C__PROPERTY__INFO__DESCRIPTION => 'event_handler+'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__event_handler_plus',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_nagios_commands_plus',\n 'isys_nagios_commands_plus__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__EVENT_HANDLER_PLUS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_nagios_commands_plus',\n 'p_strClass' => 'input-dual-radio mt5',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ]\n ]\n ),\n 'process_perf_data' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'process_perf_data',\n C__PROPERTY__INFO__DESCRIPTION => 'process_perf_data'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__process_perf_data'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__PROCESS_PERF_DATA',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'retain_status_information' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'retain_status_information',\n C__PROPERTY__INFO__DESCRIPTION => 'retain_status_information'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__retain_status_info',\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__RETAIN_STATUS_INFORMATION',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'retain_nonstatus_information' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'retain_nonstatus_information',\n C__PROPERTY__INFO__DESCRIPTION => 'retain_nonstatus_information'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__retain_nonstatus_info',\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__RETAIN_NONSTATUS_INFORMATION',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'stalking_options' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'stalking_options',\n C__PROPERTY__INFO__DESCRIPTION => 'stalking_options'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__stalking_options',\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__STALKING_OPTIONS',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_nagios_service_tpl_def',\n 'callback_property_stalking_options'\n ]\n ),\n 'emptyMessage' => _L('LC__CATG__NAGIOS__STALKING_OPTIONS__EMPTY')\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => null\n ]\n ),\n 'is_exportable' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__NAGIOS_SERVICE_TPL_DEF__CONFIG_EXPORT',\n C__PROPERTY__INFO__DESCRIPTION => 'Export this configuration'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__is_exportable',\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__IS_EXPORTABLE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO())\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'escalations' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'escalations',\n C__PROPERTY__INFO__DESCRIPTION => 'escalations'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__escalations',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_nagios_service_tpl_def_list',\n 'isys_catg_nagios_service_tpl_def_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__ESCALATIONS',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_nagios_service_tpl_def',\n 'callback_property_escalations'\n ]\n ),\n 'emptyMessage' => _L('LC__CATG__NAGIOS__ESCALATIONS__EMPTY')\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__IMPORT => true,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => null\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__NAGIOS_SERVICE_TPL_DEF\n ]\n ]\n ),\n 'action_url' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'action_url',\n C__PROPERTY__INFO__DESCRIPTION => 'action_url'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__action_url'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__ACTION_URL'\n ]\n ]\n ),\n 'icon_image' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'icon_image',\n C__PROPERTY__INFO__DESCRIPTION => 'icon_image'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__icon_image'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__ICON_IMAGE'\n ]\n ]\n ),\n 'icon_image_alt' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'icon_image_alt',\n C__PROPERTY__INFO__DESCRIPTION => 'icon_image_alt'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__icon_image_alt'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__ICON_IMAGE_ALT'\n ]\n ]\n ),\n 'notes' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notes',\n C__PROPERTY__INFO__DESCRIPTION => 'notes'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notes'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTES'\n ]\n ]\n ),\n 'notes_url' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'notes_url',\n C__PROPERTY__INFO__DESCRIPTION => 'notes_url'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__notes_url'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__NOTES_URL'\n ]\n ]\n ),\n 'custom_object_vars' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::textarea(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'custom_object_vars',\n C__PROPERTY__INFO__DESCRIPTION => 'custom_object_vars'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_nagios_service_tpl_def_list__custom_obj_vars'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__NAGIOS_SERVICE_TPL_DEF__CUSTOM_OBJ_VARS'\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__SANITIZATION => null\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "f595254f2a27845fbc4dbfff297d7054", "score": "0.6135624", "text": "public function getClassProperties(): ?array\n {\n if (!isset($this->properties)) {\n $properties = (new ReflectionClass($this->class))->getProperties();\n\n foreach ($properties as $property) {\n $this->properties[] = $property->getName();\n }\n }\n\n return $this->properties;\n }", "title": "" }, { "docid": "b201e6133ad2e02b6e5057e224bbdb99", "score": "0.61139226", "text": "abstract public function getProperties();", "title": "" }, { "docid": "cc0f44cd4d0a4b6a588a48331981ccc7", "score": "0.6107641", "text": "public function getObjArray() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "7094301671059eeb33bcc27fbbcfc5fd", "score": "0.60931206", "text": "public function getAllProperties();", "title": "" }, { "docid": "7094301671059eeb33bcc27fbbcfc5fd", "score": "0.60931206", "text": "public function getAllProperties();", "title": "" }, { "docid": "ba9c3101ebc8bba44a9f15957bcfeb2d", "score": "0.6090143", "text": "public function getProperty() {\n\t \treturn get_object_vars($this);\n\t }", "title": "" } ]
c64c52ec43a9d7b73dec7aa442a96e27
determine season treatment enteries in order by date
[ { "docid": "e5b532f685ea3aca1a56e10ecef7c082", "score": "0.53587615", "text": "function getAllTreatingDetails(){\n \t$q = Doctrine_Query::create()->from('SeasonTracking s')->where(\"s.seasonid = '\".$this->getID().\"'\")->orderby('s.startdate DESC');\n\t\t$result = $q->execute();\n\t\treturn $result;\n }", "title": "" } ]
[ { "docid": "540f77e3daf038435e1c80f7ce6e8308", "score": "0.6292652", "text": "public function postsBySeason()\n {\n $terms = get_terms(array(\n 'taxonomy' => 'season',\n 'order' => 'DESC',\n 'order_by' => 'name',\n ));\n\n $posts = array();\n // For each term, get all its posts\n foreach ($terms as $term) {\n wp_reset_query();\n\n $args = array(\n 'numberposts' => -1,\n 'post_type' => 'event',\n 'orderby' => 'meta_value',\n 'order' => 'ASC',\n 'meta_key' => 'opening_date',\n 'tax_query' => array(\n array(\n 'taxonomy' => 'season',\n 'field' => 'slug',\n 'terms' => $term->slug,\n )\n ),\n );\n\n $postsList = get_posts($args);\n\n $result = array_map(function ($post) {\n $post->link = get_permalink($post->ID);\n // ACF Fields\n $post->title = get_field('event_title', $post);\n $post->opening_date = get_field('opening_date', $post);\n $post->hour = get_field('event_hour', $post);\n $post->place = get_field('event_place', $post);\n $post->thumbnail = get_field('thumbnail', $post);\n $post->color = get_field('color', $post);\n\n return $post;\n\n }, $postsList);\n\n $posts[] = array($term->name, $result);\n }\n\n return $posts;\n }", "title": "" }, { "docid": "2da069259147a9b9db80ff615a86ff64", "score": "0.5832537", "text": "public function getSeason(): string\n {\n $month = (int) $this->date->format('n');\n\n $season = array_filter($this->seasons, function ($range) use ($month) {\n return in_array($month, $range);\n });\n\n return key($season);\n }", "title": "" }, { "docid": "ffeea6f065bf9e7302f2d6a32601323d", "score": "0.581057", "text": "public function run()\n {\n $items = [\n // 1 = wet , 2 = dry\n [\n 'id' => 1,\n 'season_types_id' => 1, //dry\n 'season_statuses_id' => 2,\n 'season_start'=> '2017-07-24',\n 'season_end'=> '2017-10-01',\n ],\n [\n 'id' => 2,\n 'season_types_id' => 2, //dry\n 'season_statuses_id' => 2,\n 'season_start'=> '2017-11-01',\n 'season_end'=> '2018-02-18',\n ],\n [\n 'id' => 3,\n 'season_types_id' => 2, //wet\n 'season_statuses_id' => 2,\n 'season_start'=> '2018-03-12',\n 'season_end'=> '2018-06-28',\n ],\n [\n 'id' => 4,\n 'season_types_id' => 1, //wet\n 'season_statuses_id' => 2,\n 'season_start'=> '2018-07-18',\n 'season_end'=> '2018-10-20',\n\n ],\n [\n 'id' => 5,\n 'season_types_id' => 1, //dry\n 'season_statuses_id' => 2,\n 'season_start'=> '2018-12-10',\n 'season_end'=> '2019-03-26',\n ],\n // [\n // 'id' => 6,\n // 'season_types_id' => 2, //wet\n // 'season_statuses_id' => 1,\n // 'season_start'=> '2019-03-16',\n // ],\n\n ];\n\n //TYPE 1 = March 16 -> Sept. 15 (March, April, May, June, July, August, September)\n //TYPE 2 Sept. 16 -> March 15 (September, October, November, December, January, February, March)\n\n foreach ($items as $item) {\n \\App\\Season::create($item);\n }\n }", "title": "" }, { "docid": "aa09ec87a270f0c3fba393434646233d", "score": "0.5701341", "text": "public function getSeason(){\n\t\treturn $this->getTextualSeason($this->season);\n\t}", "title": "" }, { "docid": "fd0b5cb03d68139c182a9d132573c2ff", "score": "0.5643081", "text": "public function renderSeasonDateSummary() {\n\t\t$num_assns = $this->getAssignmentsNeededForCurrentSeason();\n\t\t$assns = $this->renderNumberAssignments($num_assns);\n\n\t\t$current_season = $this->season_months;\n\t\treturn \"<h2>season: \" . SEASON_YEAR . ' ' .\n\t\t\tarray_shift($current_season) . ' - ' .\n\t\t\tarray_pop($current_season) . \"</h2>\\n\" .\n\t\t\t$assns;\n\t}", "title": "" }, { "docid": "55abb5eb313f85dcf892211bd22b3132", "score": "0.5638869", "text": "protected function getSeason($date) {\r\n\r\n\t\t$query = \"SELECT clave FROM \".XNAME.\"_temporadas WHERE '{$date}' BETWEEN fecha_comienzo AND fecha_fin\";\r\n\t\t$sql = record($query);\r\n\t\treturn $sql['clave'];\r\n\r\n\t}", "title": "" }, { "docid": "cfb81915e9fac6aaee68d619e56f9898", "score": "0.55788845", "text": "public function getSeason()\r\n {\r\n return $this->season;\r\n }", "title": "" }, { "docid": "cfb81915e9fac6aaee68d619e56f9898", "score": "0.55788845", "text": "public function getSeason()\r\n {\r\n return $this->season;\r\n }", "title": "" }, { "docid": "1eb69fceccf862463f5477fe451fa8fe", "score": "0.55617964", "text": "public function getSeason() {\n return $this->season;\n }", "title": "" }, { "docid": "07f8340f8134cff24d3425d081d4951c", "score": "0.5533827", "text": "public function seasons() {\n if ($this->pilot_imdbfill==FULL_ACCESS) $this->seasoncount = $this->imdb->seasons();\n else return 0;\n return $this->seasoncount;\n }", "title": "" }, { "docid": "0d2643cc9efd70a734ff6e815b6cfd25", "score": "0.5524444", "text": "public function json_active_league_seasons()\n\t{ \n $a_o_id = $this->permissions_model->get_active_org();\n\t\t$league_id=$this->leagues_model->get_league_from_org($a_o_id);\n $seasons=$this->season_model->get_seasons($league_id);\n \n\t\t$fancy=\"F j, Y\";\n\t\t$plain=\"Y/m/d\";\n\t\tforeach($seasons as $i=>&$s)\n\t\t{\n\t\t\t$seasons[$i]['_effective_range_start']=$s['effective_range_start'];\n\t\t\t$seasons[$i]['_effective_range_end' ]=$s['effective_range_end' ];\n $seasons[$i]['_reg_range_start'] =$s['reg_range_start'];\n $seasons[$i]['_reg_range_end' ] =$s['reg_range_end' ];\n //add if checks: if null or emtpy string, date format puts out unix epoch 1969 whne we want blank\n if($s['effective_range_start'])\n {\n\t\t\t\t$s['effective_range_start']=date($plain,strtotime($s['effective_range_start']));\n\t\t\t\t$s['display_start'] =date($fancy,strtotime($s['effective_range_start']));\n }\n else \t$s['display_start']='';\n \n if($s['effective_range_end' ])\n {\n\t\t\t\t$s['effective_range_end' ]=date($plain,strtotime($s['effective_range_end' ]));\n\t\t\t\t$s['display_end' ] =date($fancy,strtotime($s['effective_range_end' ]));\n }\n else \t$s['display_end' ]='';\n\n\t\t\tif($s['reg_range_start'])\n\t\t\t\t$s['reg_range_start'] =date($plain,strtotime($s['reg_range_start']));\n\t\t\tif($s['reg_range_end' ])\n\t\t\t\t$s['reg_range_end' ] =date($plain,strtotime($s['reg_range_end' ]));\n \n //combine all into full display\n $s['season_name_dates'] = $s['season_name'].\" : \".$s['display_start'].\" - \".$s['display_end' ];\n \n\t\t\tif($s['isactive']=='t')\n\t\t\t{\n\t\t\t\t$s['isactive']=true;\n\t\t\t\t$s['isactive_icon']='bullet_green';\n\t\t\t\t$s['isactive_display']=\"Active\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$s['isactive']=false;\n\t\t\t\t$s['isactive_icon']='bullet_yellow';\n\t\t\t\t$s['isactive_display']=\"Inactive\";\n\t\t\t}\n\t\t\t\n if($s['is_enabled']=='t')\n {\n \t$s['reg_needed']=true;\n\t\t\t\t$s['is_enabled_icon']='<img src=http://endeavor.servilliansolutionsinc.com/global_assets/silk/tick.png />';\n\t\t\t\t$s['is_enabled_display']=\"Enabled\";\n }\n else\n {\n\t\t\t\t$s['reg_needed']=false;\n\t\t\t\t$s['is_enabled_icon']='<img src=http://endeavor.servilliansolutionsinc.com/global_assets/silk/cross.png />';\n\t\t\t\t$s['is_enabled_display']=\"Disabled\";\n }\n\n\t\t} \n if($this->input->get_post('combobox'))\n \t$this->result->json($seasons);//regular json encode\n else\n \t$this->result->json_pag($seasons); //encode with root, totalCount, etc for grid paginator\n\t}", "title": "" }, { "docid": "d8ae20f229dbc394250fe717e4c40855", "score": "0.5524287", "text": "public static function season()\n {\n $seasons = array(\"Winter\", \"Spring\", \"Summer\", \"Autumn\");\n\n return $seasons[(int) ((date(\"n\") % 12) / 3)];\n }", "title": "" }, { "docid": "a6cc420c3517c766ecfff8f08ac421e4", "score": "0.55086935", "text": "function load_tour_season_days($season_id = 0) {\n\t\t$days = array();\n\t\tif ($season_id) {\n\t\t\t$sql\t= \"\n\t\t\tSELECT *\n\t\t\tFROM season_days_tbl\n\t\t\tWHERE season_id = \" . $season_id;\n\t\t\t$s\t\t= query($sql);\n\t\t\twhile ($r = fetch_object($s)) {\n\t\t\t\t$days[$r->day_id] = $r->day;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $days;\n\t}", "title": "" }, { "docid": "6d0237452112e1cfc56256310238b66d", "score": "0.54719543", "text": "public function GetListOfSeasons($format=true){\n $data = [];\n $seasons = $this->con->select(\"seasons\",\n [\"id\",\"name\", \"startdate\", \"enddate\",\"theme\",\"comments\"],\n ['ORDER' => [ 'enddate' => 'ASC' ]]);\n $df = new utilities\\DateFormatter();\n foreach($seasons as $idx => $entry){\n $formatted = $entry;\n if($format){\n $formatted[\"startdate\"] = $df\n ->SetDate($entry[\"startdate\"])\n ->FormatDate();\n $formatted[\"enddate\"] = $df\n ->SetDate($entry[\"enddate\"])\n ->FormatDate();\n }\n $data[] = $formatted;\n }\n return $data;\n }", "title": "" }, { "docid": "57aa7f543ed79872b47e07714251d069", "score": "0.54639757", "text": "function _seasonSelections()\n {\n // Season options and labels \n\n $s = array() ;\n\n $season = new SwimTeamSeason() ;\n $seasonIds = $season->getAllSeasonIds() ;\n\n if (!is_null($seasonIds))\n {\n foreach ($seasonIds as $seasonId)\n {\n $season->loadSeasonById($seasonId['seasonid']) ;\n $s[$season->getSeasonLabel()] = $season->getId() ;\n }\n }\n\n return $s ;\n }", "title": "" }, { "docid": "21c6206144e973f7fefacb4e29f0558d", "score": "0.5452895", "text": "private function generateSeasonLimits() {\n\t\t$curYear = $this->currentYear;\n\n\t\t// Sunday after last thur of Nov is Advent\n\t\t$this->adventStart = new DateTimeImmutable(\"last thu of Nov $curYear next sunday\");\n\t\t$this->christmastide1Start = new DateTimeImmutable($curYear . '-12-25');\n\t\t$this->christmastide2Start = new DateTimeImmutable($curYear . '-01-01');\n\n\t\t// Epiphany is celebrated on Jan 6 The Baptism of the Lord (ordinaryTime1Starts) occurs on the Sunday following Jan 6\n\t\t$this->epiphanyDate = new DateTimeImmutable($curYear . '-01-06');\n\t\t$baptismDate = $this->epiphanyDate->modify('next sunday');\n\n\t\tif (EPIPHANY_ON_A_SUNDAY == true) {\n\t\t\t// Epiphany is celebrated on the Sunday occurring from Jan. 2 through Jan. 8 (Both inclusive).\n\t\t\t$this->epiphanyDate = new DateTimeImmutable($curYear . '-01-01 next sunday');\n\n\t\t\tif ($this->epiphanyDate->format('j') > 6) {\n\t\t\t\t// If Epiphany occurs on Jan 7 or Jan 8, then the Baptism of the Lord (Ordinary Time) is the next day\n\t\t\t\t$baptismDate = $this->epiphanyDate->modify('+1 days');\n\t\t\t} else {\n\t\t\t\t// If Epiphany occurs on or before Jan 6, the Sunday following Epiphany is the Baptism of the Lord (Ordinary Time)\n\t\t\t\t$baptismDate = $this->epiphanyDate->modify('next sunday');\n\t\t\t}\n\t\t}\n\n\t\t$this->ordinaryTime1Starts = $baptismDate->modify('+1 days'); // Ordinary Times Starts day after baptism\n\t\t$this->eastertideStarts = new DateTimeImmutable($curYear . '-03-21 + ' . easter_days($curYear) . ' days');\n\t\t$this->lentStart = $this->eastertideStarts->modify('-46 days');\n\t\t$this->ordinaryTime2Starts = $this->eastertideStarts->modify('+50 days');\n\t}", "title": "" }, { "docid": "9da68449802ca8e6d23132ff7220b79a", "score": "0.5403404", "text": "public static function get_grouped_by_year(){\n\n\t\t$episodes = \\Timber::get_posts(array(\n\t\t\t'post_type' => 'episode',\n\t\t\t'orderby' => 'date',\n\t\t\t'order' => 'ASC'\n\t\t), get_called_class());\n\n\t\tif (!$episodes){\n\t\t\treturn false;\n\t\t}\n\n\t\t$years = array();\n\n\t\tforeach ($episodes as $episode){\n\n\t\t\t$year = $episode->date('Y');\n\n\t\t\t$years[$year][] = $episode;\n\n\t\t}\n\n\t\treturn $years;\n\n\t}", "title": "" }, { "docid": "9c1b42d31e28da6e9468f8dfa8b9a604", "score": "0.5340224", "text": "public function testIsStartOfSeasonForAnyGivenMonthValue(){\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason(1));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason(4));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason(7));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason(10));\n\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('Jan'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('Apr'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('Jul'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('Oct'));\n\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('1'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('01'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('4'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('04'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('7'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('07'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason('10'));\n\n foreach ([1, 4, 7, 10] as $item) {\n $date = \\Carbon\\Carbon::create(2018, $item,10);\n $this->assertTrue(\\Yue\\YearAround\\Context::IsStartOfSeason($date));\n $this->assertFalse(\\Yue\\YearAround\\Context::IsStartOfSeason($date->addMonth()));\n }\n\n // Test not end of season month\n $this->assertFalse(\\Yue\\YearAround\\Context::IsStartOfSeason(2));\n $this->assertFalse(\\Yue\\YearAround\\Context::IsStartOfSeason('02'), '02 is not end of any season');\n $this->assertFalse(\\Yue\\YearAround\\Context::IsStartOfSeason('May'), 'May is not end of any season');\n }", "title": "" }, { "docid": "c0edc01fe69ef175156a20d91c2680ff", "score": "0.52666324", "text": "public function seasons() {\n return $this->hasMany('App\\Season');\n }", "title": "" }, { "docid": "5b2079a0dfc6ab6728dba8993b3dac3e", "score": "0.5233725", "text": "public function getSeasonCode()\r\n {\r\n return $this->getFacetGroup(Constants::FACET_SEASON_CODE);\r\n }", "title": "" }, { "docid": "5fca93ea73d0f81cc1668305e86868a3", "score": "0.5230879", "text": "public function testListEventsBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_events_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result['events'])>0);\n foreach($result['events'] as $event)\n {\n $this->assertTrue(isset($event['name']));\n $this->assertTrue(isset($event['location']));\n $this->assertTrue(isset($event['season']));\n $this->assertTrue(isset($event['team']));\n }\n }", "title": "" }, { "docid": "05ee2e2fbb6f5fdd188dea5e881c1adf", "score": "0.5210837", "text": "public function episodes() {\n if ($this->pilot_imdbfill==FULL_ACCESS) $this->season_episodes = $this->imdb->episodes();\n return $this->season_episodes;\n }", "title": "" }, { "docid": "56bda348f254787a2a3c9a99453125c2", "score": "0.52059984", "text": "public function seasons()\n {\n return $this->belongsToMany(Season::class);\n }", "title": "" }, { "docid": "a9936b5110abd99ebc6c421b5ba48154", "score": "0.51917964", "text": "public function list_seasons($params=array()){\n $this->_name = \"season\";\n $select = $this->select()->from(\"season\",array(\"id\",\"season_name\",\"IF(status>0, 'Yayında', 'Yayında Değil') as status\",\"start_date\",\"end_date\"))\n ->joinLeft(\"company\", \"company.id=season.company_id\", array(\"company_name\"));\n if (isset($params['query']) && isset($params['qtype'])){\n $select->where($params['qtype'].\" LIKE ? \",\"%\".$params['query'].\"%\");\n }\n $subselect = clone $select;\n if (isset($params['sortname']) && isset($params['sortorder'])){\n $select->order($params['sortname'].\" \".$params['sortorder']);\n }\n $select->limitPage($params['page'],$params['rp']);\n return array(\n \t\"data\" => $select->query()->fetchAll(),\n \"total\" => $subselect->query()->rowCount(),\n \"page\"\t => $params['page'],\n \"column\" => array(\"season_name\",\"company_name\",\"start_date\",\"end_date\",\"status\"),\n \"defaultId\"=> \"id\"\n );\n }", "title": "" }, { "docid": "6add161caede6c1fadeeabdc36420201", "score": "0.5154682", "text": "public function getAllDates($year)\n {\n $array = [\n new NewYearsDay($year),\n new DutchPancakeDay($year),\n new WorldPiDay($year),\n new ChristmasEvening($year),\n new FirstChristmasDay($year),\n new SecondChristmasDay($year),\n new LastDayOfYear($year),\n new DutchSecretaryDay($year),\n new LiberationDay($year),\n new DutchNeighboursDay($year),\n new DevelopersDay($year),\n new ValentinesDay($year),\n new SeriousRequest($year),\n new FathersDay($year),\n new DayOfConstruction($year),\n new PinkSaturday($year),\n new ChilderensDay($year),\n new AgressionDay($year),\n new EnvironmentDay($year),\n new TouretteDay($year),\n new ChildLabourDay($year),\n new BloodDonationDay($year),\n new DessertDay($year),\n new DrugsAbuseDay($year),\n new DutchVeteransDay($year),\n new HumanDay($year),\n new PeaceAndPreyDay($year),\n new RefugeeDay($year),\n new TortureDay($year),\n new UnitedNationsDay($year),\n new WorldOceanDay($year),\n new InternationalCoopDay($year),\n new NelsonMandelaDay($year),\n new OutsideTheTimeDay($year),\n new SystemEngineerDay($year),\n new GardenGuyDay($year),\n new WorldPopulationDay($year),\n new FirstEasterDay($year),\n new SecondEasterDay($year),\n new GoodFriday($year),\n new MothersDay($year),\n new DutchCarnaval($year),\n new StartCarnavalSeason($year),\n ];\n\n $return = [];\n $counter = 0;\n\n /**\n * @var SpecialDateInterface $item\n */\n foreach ($array as $item) {\n $key = sprintf(\n \"%s-%s-%s.%s\",\n $item->getStartDate()->format('Y'),\n $item->getStartDate()->format('m'),\n $item->getStartDate()->format('d'),\n $counter\n );\n\n $counter++;\n $return[$key] = $item;\n }\n\n ksort($return);\n\n return $return;\n }", "title": "" }, { "docid": "d68f4c3b44833503baedda182b5ce072", "score": "0.51478374", "text": "function arrange_matches()\n {\n \t\n \t\n \t$naamarray = array();\n \t\n \t\n \t$seizoenquery = $this->db->get('korf_cron');\n \t\n \tforeach($seizoenquery->result() as $rij){\n \t\t$season = $rij->seizoen;\n \t\n \t}\n \t\n \t\n \t$divisies = $this->db->get('korf_divisies');\n \t$mdate = date('Y-m-d h:i:s');\n \t\n \tforeach($divisies->result() as $row){\n \t\t$divisieid = $row->divisie_id;\n \t\n\t\t\n\t\t$this->db->where('FK_division_id', $divisieid);\n \t$query = $this->db->get('korf_teams');\n \t\n \t\n \t$j=1;\n \t\n \tforeach($query->result() as $row)\n \t{\n \t\t$naamarray[$j] = $row->team_id; \n \t\t$j++;\n \t\t\n \t}\n \t\n \t//week1\n \t$match1 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 1\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match1);\n \t\n \t$match2 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 1\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match2);\n \t\n \t$match3 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 1\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match3);\n \t\n \t$match4 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 1\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match4);\n \t\n \t\n \t//week2\n \t\n \t$match5 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 2\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match5);\n \t\n \t$match6 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 2\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match6);\n \t\n \t$match7 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 2\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match7);\n \t\n \t$match8 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 2\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match8);\n \t\n \t\n \t//week3\n \t\n \t$match9 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 3\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match9);\n \t\n \t\n \t$match10 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 3\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match10);\n \t\n \t$match11 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 3\n \t\t\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match11);\n \t\n \t$match12 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 3\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match12);\n \t\n \t//week4\n \t\n \t$match13 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 4\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match13);\n \t\n \t\n \t$match14 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 4\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match14);\n \t\n \t$match15 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 4\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match15);\n \t\n \t$match16 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 4\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match16);\n \t\n \t//week5\n \t\n \t$match17 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 5\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match17);\n \t\n \t\n \t$match18 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 5\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match18);\n \t\n \t$match19 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 5\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match19);\n \t\n \t$match20 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 5\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match20);\n \t\n \t\n \t//week6\n \t\n \t$match21 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 6\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match21);\n \t\n \t\n \t$match22 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 6\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match22);\n \t\n \t$match23 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 6\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match23);\n \t\n \t$match24 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 6\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match24);\n \t\n \t\n \t//week7\n \t\n \t$match25 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 7\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match25);\n \t\n \t\n \t$match26 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 7\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match26);\n \t\n \t$match27 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 7\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match27);\n \t\n \t$match28 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 7\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match28);\n \t\n \t\n \t//alles omdraaien voor de tweede helft van het seizoen\n \t\n \t\n \t//week8\n \t$match29 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 8\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match29);\n \t\n \t$match30 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 8\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match30);\n \t\n \t$match31 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 8\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match31);\n \t\n \t$match32 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 8\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match32);\n \t\n \t\n \t//week9\n \t\n \t$match33 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 9\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match33);\n \t\n \t$match34 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 9\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match34);\n \t\n \t$match35 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 9\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match35);\n \t\n \t$match36 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 9\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match36);\n \t\n \t\n \t//week10\n \t\n \t$match37 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 10\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match37);\n \t\n \t\n \t$match38 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 10\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match38);\n \t\n \t$match39 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 10\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match39);\n \t\n \t$match40 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 10\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match40);\n \t\n \t//week11\n \t\n \t$match41 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 11\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match41);\n \t\n \t\n \t$match42 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 11\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match42);\n \t\n \t$match43 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 11\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match43);\n \t\n \t$match44 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 11\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match44);\n \t\n \t//week12\n \t\n \t$match45 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 12\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match45);\n \t\n \t\n \t$match46 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 12\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match46);\n \t\n \t$match47 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 12\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match47);\n \t\n \t$match48 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 12\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match48);\n \t\n \t\n \t//week13\n \t\n \t$match49 = array(\n \t\t'thuisteam' => $naamarray[1],\n \t\t'bezoekersteam' => $naamarray[5],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 13\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match49);\n \t\n \t\n \t$match50 = array(\n \t\t'thuisteam' => $naamarray[3],\n \t\t'bezoekersteam' => $naamarray[7],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 13\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match50);\n \t\n \t$match51 = array(\n \t\t'thuisteam' => $naamarray[2],\n \t\t'bezoekersteam' => $naamarray[6],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 13\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match51);\n \t\n \t$match52 = array(\n \t\t'thuisteam' => $naamarray[4],\n \t\t'bezoekersteam' => $naamarray[8],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 13\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match52);\n \t\n \t\n \t//week14\n \t\n \t$match53 = array(\n \t\t'thuisteam' => $naamarray[7],\n \t\t'bezoekersteam' => $naamarray[1],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 14\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match53);\n \t\n \t\n \t$match54 = array(\n \t\t'thuisteam' => $naamarray[5],\n \t\t'bezoekersteam' => $naamarray[3],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 14\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match54);\n \t\n \t$match55 = array(\n \t\t'thuisteam' => $naamarray[8],\n \t\t'bezoekersteam' => $naamarray[2],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 14\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match55);\n \t\n \t$match56 = array(\n \t\t'thuisteam' => $naamarray[6],\n \t\t'bezoekersteam' => $naamarray[4],\n \t\t'FK_divisie_id' => $divisieid,\n \t\t'seizoen' => $season,\n \t\t'week' => 14\n \t\n \t);\n \t\n \t$insert = $this->db->insert('korf_wedstrijden', $match56);\n\n \t\n \t\n \n \t//print_r($naamarray);\n \t\n \t}\n \t\t\n }", "title": "" }, { "docid": "8f67b234a5929ea77c83a747515e6855", "score": "0.51469046", "text": "public function season()\n\t{\n\t\treturn $this->belongsTo('Fantasee\\Season');\n\t}", "title": "" }, { "docid": "dcf5cf640ca9fd40800f0ce0589ece91", "score": "0.5125423", "text": "public function testListInjuriesBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_injuries_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result[\"injuries\"])>0);\n foreach($result['injuries'] as $injury)\n {\n $this->assertTrue(isset($injury['type']));\n $this->assertTrue(isset($injury['game']));\n }\n }", "title": "" }, { "docid": "09c6769f90e64abf44fb9893b9876a08", "score": "0.5092615", "text": "function getAllHarvestDetails(){\n \t$q = Doctrine_Query::create()->from('SeasonHarvest s')->where(\"s.seasonid = '\".$this->getID().\"'\")->orderby('s.startdate DESC');\n\t\t$result = $q->execute();\n\t\treturn $result;\n }", "title": "" }, { "docid": "0ceda589c0dd52f171afa162bc876a98", "score": "0.5090929", "text": "private function season_create()\n {\n //Load and store parameters\n $month = (int)$this->Request->get('month');\n $ingredient_id = (int)$this->Request->get('ingredient_id');\n $this->responseSetParam('month', $month);\n $this->responseSetParam('ingredient_id', $ingredient_id);\n\n //Set season ingredient\n $IngredientsDB = new IngredientsDB($this->DB, $this->User->getLang());\n $IngredientsDB->seasonSet($month, $ingredient_id);\n }", "title": "" }, { "docid": "6509f0330609ec089e8b72fd5d4000a7", "score": "0.50581855", "text": "public function getForAddMatches(Request $request){\n if(Season::count() < 1){\n $month=date('m');\n $year = date('Y');\n for($month;;$month++){\n if($month == 8) break;\n if($month == 12){\n $month = 0;\n $year++;\n }\n }\n $month = date('F', mktime(0,0,0,$month,1,$year));\n $endMonth = date('F', mktime(0,0,0,5,1,$year+1));\n $season = ['start_date' => ['month' => $month, 'year' => $year], 'end_date' => ['month' => $endMonth, 'year' => $year+1]];\n return view('admin.calendar.seasons.add-matches',['firstSeason' => $season]);\n }\n else{\n $season = Season::latest('start_date')->get()->first();\n if(!$season->end_date){\n //se esta programando una existente\n return view('admin.calendar.seasons.add-matches',['season' => $season]);\n }\n else if(date('Y-m-d') > $season->end_date){\n //se programara una nueva temporada\n $nextSeason = ['start_date'=>mktime(0,0,0,8,1,date('Y',strtotime($season->end_date))+1)];\n return view('admin.calendar.seasons.add-matches',['nextSeason' => $nextSeason]);\n }\n else{\n //season programada y en progreso\n return view('admin.calendar.seasons.add-matches',['uncomingSeason' => $season]);\n }\n }\n }", "title": "" }, { "docid": "3f59f05f9a5e7143aae7fd60e27c18a4", "score": "0.50510263", "text": "function getCurrentSeasonList()\n{\n $query = <<<STR\nSelect seasonid, name\nFrom season\nWHERE GETDATE() BETWEEN sdate AND edate\nOrder by seasonid\nSTR;\n\n return executeQuery($query);\n}", "title": "" }, { "docid": "abd2eb2e5e7979c5dd164aa7475464eb", "score": "0.50224364", "text": "public function testListTrainingsBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_trainings_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result[\"trainings\"])>0);\n foreach($result['trainings'] as $event)\n {\n $this->assertTrue($event['season'] == $season);\n $this->assertTrue($event['type'] == 'training');\n $this->assertTrue(isset($event['team']));\n }\n }", "title": "" }, { "docid": "5f7ea60ae3271cd90f0b21c13dbfa8be", "score": "0.5007644", "text": "function is_season_in_year($date_start, $date_end){\n if (array_key_exists($date_start->format('m-d') . \" \" . $date_end->format('m-d'), $this->seasons)){\n return true;\n }\n else return false;\n }", "title": "" }, { "docid": "4a81381fbd35b54382b5a99edd5f8309", "score": "0.5004323", "text": "protected function getDayPrices($date) {\r\n\t\tglobal $xname,$language;\r\n\t\t$season\t\t\t\t\t\t\t= $this->getSeason($date);\r\n\t\t$query\t\t\t\t\t\t\t= \"\tSELECT precio_temp_alta, precio_temp_media, precio_temp_baja\r\n\t\t\t\t\t\t\t\t\t\t\tFROM {$xname}_viviendas \r\n\t\t\t\t\t\t\t\t\t\t\tWHERE id = {$this->id} \";\r\n\t\t$sql\t\t\t\t\t\t\t= record($query);\r\n\t\r\n\t\t$response\t\t\t\t\t\t= array();\r\n\t\t$response['high_season']\t\t= $sql['precio_temp_alta'];\r\n\t\t$response['mid_season']\t\t\t= $sql['precio_temp_media'];\r\n\t\t$response['low_season']\t\t\t= $sql['precio_temp_baja'];\r\n\t\t// printout($response);\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "f8525e14bd5df10af9bc79ea705a71f7", "score": "0.49807936", "text": "public function season()\n\t{\n\t\treturn $this->belongsTo( Season::class );\n\t}", "title": "" }, { "docid": "59f907e77d8aa452ba672213705d29ee", "score": "0.49525225", "text": "public function getInfoSeason($id, $saeasonNumber);", "title": "" }, { "docid": "e1c8fe0a0c3cf47278357a293eef725a", "score": "0.4945427", "text": "function get_episodes($name, $year = \"\") {\n$url = \"http://imdbapi.poromenos.org/js/?name=\".urlencode($name); if(trim($year) == \"\") { $url.=\"&year=\".urlencode($year); } $curl = curl_init(); \ncurl_setopt($curl, CURLOPT_URL, $url); \ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n$curlData = curl_exec($curl); \ncurl_close($curl); \n$data = json_decode($curlData, true); $arr = array(); \n//restructuring data to by seasons and episodes \nforeach($data as $key => $val) { \n\tif(is_array($val)) { \n\t\tforeach($val as $key => $value) { \n\t\t\tif($key == \"episodes\") { \n\t\t\t\tforeach($value as $num) { \n\t\t\t\t\t$arr[$num['season']][$num['number']] = $num['name']; \n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t} \n\telse { echo \"<li>\".$key.\": \".$val.\"</li>\"; } } //sorting episodes \nforeach($arr as $key => $season) { \n\tksort($arr[$key]); \n} //sorting seasons and returning array \nksort($arr); \nreturn $arr; \n}", "title": "" }, { "docid": "0a3ffeca4d47bcd57770e4e67f904d12", "score": "0.4945387", "text": "public function getCompsSorted ($date = NULL, $sid = NULL){\n \t$dateQuery = $this->mkDateQuery($date, 'eg.close_time');\n\n //event date query\n $eventDateQuery = $this->mkDateQuery($date, 'ev.start_date', \"AND\");\n \t\n \t//select sports if ids set\n \t$sportQuery = ($sid) ? ' AND s.id IN ('.$sid.') ' : '';\n \t\n \t$query = ' SELECT eg.name AS name, eg.created_date, eg.id AS eventGroupId, eg.start_date, eg.close_time, sp.win_odds, sp.override_odds, sp.override_type';\n \t$query .= ' FROM tbdb_event_group as eg';\n\t $query .= ' INNER JOIN tbdb_event_group_event AS ege ON ege.event_group_id = eg.id';\n $query.= ' INNER JOIN tbdb_event AS ev ON ege.event_id = ev.id ';\n\t $query .= ' INNER JOIN tbdb_market AS m ON m.event_id = ege.event_id';\n\t \t$query.= ' INNER JOIN tbdb_selection sel ON sel.market_id = m.id';\n\t \t$query.= ' INNER JOIN tbdb_selection_price sp ON sel.id = sp.selection_id';\n \t$query .= ' LEFT JOIN tb_data_ordering_provider_match AS dopm ON dopm.provider_value = eg.name ';\n \t$query .= ' LEFT JOIN tb_data_ordering_order AS doo ON doo.topbetta_keyword = dopm.topbetta_keyword';\n \t$query .= ' LEFT JOIN tbdb_tournament_sport AS s ON s.id = eg.sport_id';\n \t// $query .= ' LEFT JOIN tb_data_provider AS dp ON dp.id = dopm.provider_id ';\n \t$query.= $dateQuery;\n \t$query.= $sportQuery;\n $query.= $eventDateQuery;\n \t$query .= \" AND eg.display_flag = '1'\";\n $query .= \" AND ev.display_flag = '1' \";\n $query .= \" AND m.display_flag = '1' \";\n $query .= \" AND sel.display_flag = '1' \";\n\t \t$query .= \" AND m.market_status NOT IN ('D', 'S') \";\n\t $query .= \" AND ((sp.win_odds > 1 AND sp.override_type IS NULL) OR (sp.override_odds > 1 AND sp.override_type = 'price') OR (sp.override_odds * sp.win_odds > 1 AND sp.override_type='percentage'))\";\n\t $query .= \" AND sel.selection_status_id = '1'\";\n\t \t$query .= ' GROUP BY eventGroupId';\n \t$query.= ' ORDER BY -doo.order_number DESC, eg.name ASC ';\n\t\t\n \t$result = \\DB::select($query);\n\n\n return array_filter($result, function($value) {\n return \\App::make('TopBetta\\Services\\Betting\\SelectionService')->calculatePrice($value->win_odds, $value->override_odds, $value->override_type) > 1;\n });\n }", "title": "" }, { "docid": "91738a96628d00df0706a6d2f29f05b8", "score": "0.49347055", "text": "public function ndorsement_history_day_weeks() {\n $this->loadModel('ApiSessionLogs');\n $this->layout = \"ajax_new\";\n $this->autoRender = false;\n $organization_id = $this->request->data['organization_id'];\n// pr($this->request->data); ///exit;\n $startdate = \"\";\n $enddate = \"\";\n if (!empty($this->request->data[\"startdate\"]) && !empty($this->request->data[\"enddate\"])) {\n $requestdata = $this->request->data;\n $startdate = $this->Common->dateConvertServer($requestdata[\"startdate\"]);\n $enddate = $this->Common->dateConvertServer($requestdata[\"enddate\"]);\n }\n\n $conditionsendorsementbyday[\"organization_id\"] = $organization_id;\n $conditionsendorsementbyday['type !='] = array('guest', 'daisy');\n\n\n\n if ($startdate != \"\" and $enddate != \"\") {\n array_push($conditionsendorsementbyday, \"date(created) between '$startdate' and '$enddate'\");\n } else {\n $conditionsendorsementbyday[] = 'MONTH(created)=MONTH(CURRENT_DATE())';\n $conditionsendorsementbyday[] = 'YEAR(created) =YEAR(CURRENT_DATE())';\n }\n// pr($conditionsendorsementbyday);\n $this->Endorsement->unbindModel(array('hasMany' => array('EndorseAttachments', 'EndorseReplies', 'EndorseCoreValues', 'EndorseHashtag')));\n $endorsementbyday = $this->Endorsement->find(\"all\", array(\"conditions\" => $conditionsendorsementbyday, \"group\" => \"date(Endorsement.created)\", \"fields\" => array(\"count(*) as cnt\", \"date(created) as cdate\")));\n// echo $this->Endorsement->getLastQuery(); exit;\n// pr($endorsementbyday); exit;\n// $endorsementbyday = $this->Endorsement->find(\"all\", array(\"conditions\" => $conditionsendorsementbyday, \"group\" => \"date(Endorsement.created)\", \"fields\" => array(\"count(*) as cnt\", \"date(created) as cdate\")));\n //pr($endorsementbyday); exit;\n\n\n /* nDorserment History By Week Query */\n $conditionsendorsementbyWeek = array();\n $conditionsendorsementbyWeek[\"organization_id\"] = $organization_id;\n $conditionsendorsementbyWeek['type !='] = array('guest', 'daisy');\n\n if ($startdate != \"\" and $enddate != \"\") {\n array_push($conditionsendorsementbyWeek, \"date(created) between '$startdate' and '$enddate'\");\n } else {\n $conditionsendorsementbyWeek[] = 'MONTH(created)=MONTH(CURRENT_DATE())';\n $conditionsendorsementbyWeek[] = 'YEAR(created) =YEAR(CURRENT_DATE())';\n }\n\n\n\n $this->Endorsement->unbindModel(array('hasMany' => array('EndorseAttachments', 'EndorseReplies', 'EndorseCoreValues', 'EndorseHashtag')));\n $endorsementbyWeek = $this->Endorsement->find(\"all\", array(\"conditions\" => $conditionsendorsementbyWeek, \"group\" => \"date_format(created,'%U')\", \"order\" => \"created\", \"fields\" => array(\"count(*) as cnt\", \"date(created) as cdate\")));\n// echo $this->Endorsement->getLastQuery();\n// pr($endorsementbyWeek);\n// exit;\n\n /** Code to get monthly active users data *\n * added by Babulal prasad\n * @30-march-2021\n */\n $startdate = $enddate = '';\n\n// pr($this->request->data);\n if (!empty($this->request->data[\"startdate\"]) && !empty($this->request->data[\"enddate\"])) {\n $requestdata = $this->request->data;\n $startdate = $this->Common->dateConvertServer($requestdata[\"startdate\"]);\n $enddate = $this->Common->dateConvertServer($requestdata[\"enddate\"]);\n } else {\n $now = new DateTime();\n $back = $now->sub(DateInterval::createFromDateString('29 days'));\n $startdate = $back->format('Y-m-d');\n $enddate = date('Y-m-d');\n }\n\n $until = new DateTime();\n if ($organization_id == 0) {//426 //415\n $interval = new DateInterval('P1M'); //3 months\n } else {\n $interval = new DateInterval('P12M'); //12 months\n// $interval = new DateInterval('P1D'); //12 months\n }\n\n $from = $until->sub($interval);\n\n $last12Mnth = $from->format('Y-m-t');\n\n// echo \"startdate = \" . $startdate;\n// echo \"<br/>enddate = \" . $enddate;\n // Function call with passing the start date and end date\n $DailyDateArray = $this->getDatesFromRange($startdate, $enddate);\n// var_dump($Date);\n\n\n $acitveUserConditions = array();\n\n\n $acitveUserConditions['(CAST(ApiSessionLogs.created AS DATE) BETWEEN ? AND ? )'] = array($startdate, $enddate);\n\n// $acitveUserConditions[\"ApiSession.created >\"] = $last12Mnth;\n $acitveUserConditions[\"UserOrganization.organization_id\"] = $organization_id;\n// $acitveUserConditions[\"DefaultOrg.organization_id\"] = $organization_id;\n// $acitveUserConditions[\"DefaultOrg.status\"] = 1;\n\n $params['conditions'] = $acitveUserConditions;\n// $params['joins'] = array(\n// array(\n// 'table' => 'user_organizations',\n// 'alias' => 'UserOrganization',\n// 'type' => 'RIGHT',\n// 'conditions' => array(\n// 'UserOrganization.user_id = ApiSession.user_id',\n// 'UserOrganization.organization_id = ' . $organization_id,\n// )\n// )\n// );\n// $params['fields'] = array('ApiSession.*');\n\n $params['group'] = array('DATE(ApiSessionLogs.created)');\n $params['fields'] = array('COUNT(DISTINCT ApiSessionLogs.user_id) AS login_counts', 'DATE(ApiSessionLogs.created) AS login_date');\n// $params['joins'] = array(\n// array(\n// 'table' => 'api_sessions',\n// 'alias' => 'ApiSession',\n// 'type' => 'LEFT',\n// 'conditions' => array(\n// 'ApiSession.user_id = UserOrganization.user_id1',\n// )\n// ) /* ,\n// array(\n// 'table' => 'default_orgs',\n// 'alias' => 'DefaultOrg',\n// 'type' => 'LEFT',\n// 'conditions' => array(\n// 'DefaultOrg.user_id = UserOrganization.user_id',\n// )\n// ) */\n// );\n $params['joins'] = array(\n array(\n 'table' => 'user_organizations',\n 'alias' => 'UserOrganization',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'UserOrganization.user_id = ApiSessionLogs.user_id',\n )\n ) /* ,\n array(\n 'table' => 'default_orgs',\n 'alias' => 'DefaultOrg',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'DefaultOrg.user_id = UserOrganization.user_id',\n )\n ) */\n );\n// pr($params);\n// exit;\n// $this->Endorsement->unbindModel(array('hasMany' => array('EndorseAttachments', 'EndorseCoreValues', 'EndorseReplies', 'EndorseHashtag')));\n\n// $activeUserData = $this->UserOrganization->find(\"all\", $params);\n $activeUserData = $this->ApiSessionLogs->find(\"all\", $params);\n// echo $this->UserOrganization->getLastQuery();\n// exit;\n// pr($activeUserData);\n// exit;\n $dailyAllData = array();\n foreach ($activeUserData as $index => $data) {\n\n// pr($data); exit;\n $count = $data[0]['login_counts'];\n $date = $data[0]['login_date'];\n $month = date(\"M-y\", strtotime($data[0]['login_counts']));\n $dailyAllData[$date] = (int) $count;\n }\n// pr($dailyAllData); exit;\n $activeMonthwiseCounts = array();\n $orgActiveUserCountArray = array();\n// pr($monthwiseallData);\n// pr($DailyDateArray); exit;\n if (!empty($DailyDateArray)) {\n foreach ($DailyDateArray as $i => $daily_date) {\n if (!isset($dailyAllData[$daily_date])) {\n $dailyAllData[$daily_date] = 0;\n }\n }\n }\n ksort($dailyAllData);\n $totalActiveUsers = array();\n foreach ($dailyAllData as $dateIndex => $counts) {\n $totalActiveUsers[] = $counts;\n }\n// $totalActiveUsers = $dailyAllData;\n// pr($activeMonthwiseCounts);\n// exit;\n //Calculation for dynamic months range on date range selection\n// $date1 = new DateTime($enddate);\n// $date2 = new DateTime($startdate);\n// $diff = $date1->diff($date2);\n// $monthsDiff = (($diff->format('%y') * 12) + $diff->format('%m'));\n//\n// if ($startdate != \"\" and $enddate != \"\") {\n// for ($i = 0; $i <= $monthsDiff; $i++) {\n// $months[] = date(\"M-y\", strtotime($enddate . \" -$i months\"));\n// }\n// $months = array_reverse($months);\n// } else {\n// for ($i = 0; $i <= 11; $i++) {\n// $months[] = date(\"M-y\", strtotime(date('Y-m-01') . \" -$i months\"));\n// }\n// $months = array_reverse($months);\n// }\n// foreach ($months as $index => $monthID) {\n// //Monthwise Org Endorsement Count Data\n// if (isset($activeMonthwiseCounts[$monthID])) {\n// $orgActiveUserCountArray[$monthID] = count($activeMonthwiseCounts[$monthID]);\n// } else {\n//// foreach ($corevaluesIDsArray as $indx => $cvID) {\n// $orgActiveUserCountArray[$monthID] = 0;\n//// }\n// }\n// }\n//// pr($orgActiveUserCountArray);\n//// exit;\n// $monthsnew = json_encode($months);\n// $totalActiveUsers = array();\n// foreach ($orgActiveUserCountArray as $monthID => $totalCount) {\n// $totalActiveUsers[] = array($totalCount);\n// }\n\n\n\n $DailyDateArray = json_encode($DailyDateArray);\n\n $totalActiveUsers = json_encode($totalActiveUsers); //exit;\n// pr($totalActiveUsers);\n $this->set(compact(\"endorsementbyWeek\", \"endorsementbyday\", \"DailyDateArray\", \"totalActiveUsers\"));\n echo $this->render('/Elements/leaderboard_barchart');\n exit;\n }", "title": "" }, { "docid": "c742f270057492cecce31096ca8c1ebe", "score": "0.49321762", "text": "function sort(&$array){\n if (!function_exists('cmp_2017')){\n function cmp_2017($a, $b){\n return ($a['day1'] == $b['day1']\n\t ? 0\n\t : ($a['day1'] < $b['day1']) ? -1 : 1);\n }\n }\n usort($array,'cmp_2017');\n }", "title": "" }, { "docid": "e94d972d5aa60c973e8af463ae8a8b76", "score": "0.49306202", "text": "public function getAllSeason($id)\n {\n $series = Series::find($id);\n\n // Check if series is already in database\n if (is_null($series)) {\n return response()->json(['status' => 'success', 'message' => 'There is no series found'], 404);\n }\n\n // Get season\n $getSeason = DB::table('episodes')\n ->join('series', 'series.t_id', '=', 'episodes.series_id')\n ->where('series.t_id', $id)\n ->paginate(15);\n\n // Check if there is no result\n if (empty($getSeason->all())) {\n $getSeason = null;\n }\n return response()->json([\n 'status' => 'success',\n 'data' => [\n 'season' => $getSeason,\n 'cdn' => [\n 'cdn_poster' => Storage::disk('s3')->url('posters/'),\n ],\n ],\n ]);\n }", "title": "" }, { "docid": "f3d3b0e3251fc31089f2c088f2c95e56", "score": "0.49039572", "text": "public function getSeasonAmount($idSerie);", "title": "" }, { "docid": "9a4852fdb68b0db5f5438be9d1696458", "score": "0.48999625", "text": "function getDailyCalendarAspects($lines, $dynamic = false, $crossing = false) {\n $planets = array (\"1000\" => \"Sun\", \"1001\" => \"Moon\", \"1002\" => \"Mercury\", \"1003\" => \"Venus\", \"1004\" => \"Mars\", \"1005\" => \"Jupiter\", \"1006\" => \"Saturn\", \"1007\" => \"Uranus\", \"1008\" => \"Neptune\", \"1009\" => \"Pluto\", \"1010\" => \"Node\", \"1011\" => \"SNode\",\t\t/* put here to stop the nag messages, not used */\n \"1012\" => \"Ascendant\", \"1013\" => \"Midheaven\",\t/* \"MC\", */\n \"1014\" => \"IC\", \"1015\" => \"Descendant\" );\n $houses = array (\"0001\" => \"Ascendant\", \"0002\" => \"2nd Cusp\", \"0003\" => \"3rd Cusp\", \"0004\" => \"IC\", \"0005\" => \"5th Cusp\", \"0006\" => \"6th Cusp\", \"0007\" => \"Descendant\", \"0008\" => \"8th Cusp\", \"0009\" => \"9th Cusp\", \"0010\" => \"Midheaven\", \"0011\" => \"11th Cusp\", \"0012\" => \"12th Cusp\" );\n $aspects = array (\"000\" => \"Con\", \"060\" => \"Sex\", \"090\" => \"Squ\", \"120\" => \"Tri\", \"180\" => \"Opp\" );\n /* iterate through the results */\n foreach ( $lines as $line ) {\n /* manage last (blank) line */\n if (strlen ( $line ) < 1) {\n continue;\n }\n\n /* look for the transiting planet */\n $trans = trim ( substr ( $line, 25, 8 ) );\n for($i = 0; $i < count ( $planets ); $i ++) {\n if ($i >= 11) {\n $i ++;\n }\n if ($planets [(1000 + $i)] == $trans) {\n $transvalue = intval ( (1000 + $i) );\n break;\n }\n }\n\n /*\n\t\t \t * look for the natal object\n\t\t \t * take special care where returns are encountered\n */\n if ($crossing === true) {\n $natal = trim ( substr ( $line, 55, 10 ) );\n for($i = 0; $i < count ( $houses ); $i ++) {\n /* if( $i >= 11 ) { $i++; } */\n if ($houses [sprintf ( \"%04d\", ($i + 1) )] == $natal) {\n $natalvalue = intval ( $i + 1 );\n break; /* from for loop */\n }\n }\n } else {\n /* look for the natal object */\n $natal = trim ( substr ( $line, 55, 10 ) );\n for($i = 0; $i < count ( $planets ); $i ++) {\n /* if( $i >= 11 ) { $i++; } */\n /*\n\t\t \t\t\t * The following works on the basis that we look for the polled object\n\t\t \t\t\t * using the length of the string in the planets table. This should\n\t\t \t\t\t * prevent the (<object> Return) string factoring in the equation\n */\n if ($planets [sprintf ( \"%04d\", (1000 + $i) )] == substr ( $natal, 0, strlen ( $planets [sprintf ( \"%04d\", (1000 + $i) )] ) )) {\n $natalvalue = intval ( (1000 + $i) );\n break;\n } else {\n // oops\n }\n }\n }\n\n $aspect = trim ( substr ( $line, 39, 3 ) );\n reset ( $aspects );\n while ( $aspectname = current ( $aspects ) ) {\n if ($aspectname == $aspect) {\n $aspectvalue = intval ( key ( $aspects ) );\n break;\n }\n next ( $aspects );\n }\n\n if ($dynamic === false) {\n array_push ( $this->m_aspect,\t\t/* seasonal/calendars */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 0, 2 ) ), intval ( substr ( $line, 3, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n } else {\n if ($crossing === true) {\n array_push ( $this->m_crossing,\t\t/* Jupiter/Saturn house crossing */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 3, 2 ) ), intval ( substr ( $line, 0, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n } else {\n if($natalvalue != 1012 && $natalvalue != 1013 ) {\n array_push ( $this->m_transit,\t\t/* Transiting aspects */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 3, 2 ) ), intval ( substr ( $line, 0, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d945727445585582308aa202837b3874", "score": "0.4891193", "text": "function threedegrees_global_season_sort($a, $b) {\n $scores = array(\n 'spring',\n 'winter',\n 'autumn',\n 'summer',\n );\n $a_score = array_search(strtolower($a['name']), $scores);\n $b_score = array_search(strtolower($b['name']), $scores);\n\n if($a_score == $b_score) {\n return 0;\n }\n return ($a_score < $b_score) ? -1 : 1;\n}", "title": "" }, { "docid": "d976d48c5ee080340966a6b2e1e82be4", "score": "0.48627692", "text": "public function indexForActiveSeason()\n {\n return $this->indexForSeason(Season::active());\n }", "title": "" }, { "docid": "5292be039148eb5357c9effe72ec4330", "score": "0.48548985", "text": "public function get_season_offers_list(){\n\t\t$date = new DateTime(\"now\");\n\t\t$curr_date = $date->format('Y-m-d h:i:s A');\n\t\t$this->db->select('sellers.seller_name,sellers.seller_id,sellers.seller_rand_id,COUNT(season_sales.item_id) AS itemscount,')->from('season_sales');\n\t\t$this->db->join('sellers', 'sellers.seller_id = season_sales.seller_id', 'left');\n\t\t $this->db->group_by('season_sales.seller_id');\n\t\t $this->db->where('sellers.status', 1);\n\t\t$this->db->where('season_sales.expairdate >=', $curr_date); \n\t\t$query=$this->db->get()->result_array();\n\t\t foreach ($query as $offers)\n {\n //echo \"<pre>\";print_r($offers);exit;\n\t\t\t$return[$offers['seller_id']] = $offers;\n\n\t\t\t$return[$offers['seller_id']]['count'] = $this->get_homepage_active_count($offers['seller_id']);\n }\n\t\tif(!empty($return))\n\t\t{\n\t\treturn $return;\n\t\t}\n\t}", "title": "" }, { "docid": "282bbe1d145e62b73a687f6d92231530", "score": "0.48531133", "text": "public function run()\n {\n foreach ([\n ['7.1 nov 3 hotfix', '2016-11-03', '2016-11-14'],\n ['7.1 nov 15 hotfix', '2016-11-15', null],\n ] as $data) {\n $date = $data[1];\n $season = Season::where('start_date', '<=', $date)\n ->where(function ($q) use ($date) {\n $q->where('end_date', '>=', $date)\n ->orWhereNull('end_date');\n })\n ->orderBy('start_date', 'DESC')\n ->first();\n if (!$season) {\n throw new \\Exception(\"No season found for term: \" . implode(',', $data));\n }\n $term = Term::firstOrCreate([\n 'season_id' => $season->id,\n 'name' => $data[0],\n 'start_date' => $data[1],\n ]);\n $term->end_date = $data[2];\n $term->save();\n }\n }", "title": "" }, { "docid": "6daca09074df1460d5fbb500daec2867", "score": "0.48518562", "text": "function pc_get_season($post_ID) { \r\n $play_seasons = get_the_terms($post_ID, 'seasons'); \r\n return $play_seasons;\r\n}", "title": "" }, { "docid": "0fbfa6bab74edf170a324c18b5ef4fdd", "score": "0.48433498", "text": "public function getOptions() {\n\t\t// Initialize variables.\n\t\t$options = array ();\n\t\t\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t$query->select('min(mindate) as firstdate, max(maxdate) as lastdate');\n\t\t$query->from('#__freestroke_meets AS a');\n\t\t\n\t\t// Get the options.\n\t\t$db->setQuery($query);\n\t\t$meetdates = $db->loadObjectList();\n\t\t\n\t\t// Check for a database error.\n\t\tif ($db->getErrorNum()) {\n\t\t\tJError::raiseWarning(500, $db->getErrorMsg());\n\t\t}\n\t\t\n\t\trequire_once JPATH_COMPONENT . '/helpers/freestroke.php';\n\t\t$firstseason = FreestrokeHelper::getSeasonForDate($meetdates[0]->firstdate);\n\t\t$lastseason = FreestrokeHelper::getSeasonForDate($meetdates[0]->lastdate);\n\t\t\n\t\t$season = $firstseason;\n\t\t$options = array();\n\t\twhile ($season->startdate < $lastseason->enddate) {\n\t\t\t$option = new stdClass();\n\t\t\t$option->id = $season->startdate->year;\n\t\t\t$option->name = $season->startdate->year . '-' . $season->enddate->year;\n\t\t\t$options[] = $option;\n\t\t\t\n\t\t\t$season->startdate->setDate($season->startdate->year + 1, $season->startdate->month, $season->startdate->day);\n\t\t\t$season->enddate->setDate($season->enddate->year + 1, $season->startdate->month, $season->startdate->day);\n\t\t}\n\t\t\n\t\tusort($options, array('JFormFieldSeason','compareSeasons'));\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "f9931fb469fc0317553fff59103cf11f", "score": "0.48421308", "text": "public function testIsEndOfSeasonForAnyGivenMonthValue(){\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason(3));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason(6));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason(9));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason(12));\n\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('Mar'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('Jun'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('Sep'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('Dec'));\n\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('3'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('03'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('6'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('06'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('9'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('09'));\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason('12'));\n\n foreach ([3, 6, 9, 12] as $item) {\n $date = \\Carbon\\Carbon::create(2018, $item,10);\n $this->assertTrue(\\Yue\\YearAround\\Context::IsEndOfSeason($date));\n $this->assertFalse(\\Yue\\YearAround\\Context::IsEndOfSeason($date->addMonth()));\n }\n\n // Test not end of season month\n $this->assertFalse(\\Yue\\YearAround\\Context::IsEndOfSeason(1));\n $this->assertFalse(\\Yue\\YearAround\\Context::IsEndOfSeason('01'), '01 is not end of any season');\n $this->assertFalse(\\Yue\\YearAround\\Context::IsEndOfSeason('Jan'), 'Jan is not end of any season');\n }", "title": "" }, { "docid": "dff5662f10c5323c61e9f99f29b5cbb2", "score": "0.48315224", "text": "public function dateProvider()\n {\n return array(\n array('2018-01-03', null, null),\n array('2018-03-21', null, null),\n array('2018-03-22', null, null),\n array('2018-12-27', null, null),\n\n array('2018-01-01', null, array('name' => 'uusaasta')),\n array('2018-02-24', null, array('name' => 'iseseisvuspäev')),\n array('2018-05-01', null, array('name' => 'kevadpüha')),\n array('2018-06-23', null, array('name' => 'võidupüha and jaanilaupäev')),\n array('2018-06-24', null, array('name' => 'võidupüha and jaanilaupäev')),\n array('2018-08-20', null, array('name' => 'taasiseseisvumispäev')),\n array('2018-12-24', null, array('name' => 'jõululaupäev')),\n array('2018-12-25', null, array('name' => 'esimene jõulupüha')),\n array('2018-12-26', null, array('name' => 'teine jõulupüha')),\n\n // Easter dates 2018\n array('2018-03-30', null, array('name' => 'suur reede')),\n array('2018-04-01', null, array('name' => 'ülestõusmispühade 1. püha')),\n array('2018-05-20', null, array('name' => 'nelipühade 1. püha')),\n\n // Easter dates 2019\n array('2019-04-19', null, array('name' => 'suur reede')),\n array('2019-04-21', null, array('name' => 'ülestõusmispühade 1. püha')),\n array('2019-06-09', null, array('name' => 'nelipühade 1. püha')),\n );\n }", "title": "" }, { "docid": "e54266e36d1ab9383269fe4912c05b39", "score": "0.48281178", "text": "function getYearForCurrentSeason($dbh, &$output) {\n $result = $dbh->query(\"SELECT `year`, `first_round_epiweek`, `last_round_epiweek` FROM `ec_fluv_season`\");\n if($row = $result->fetch_assoc()) {\n $output['season'] = array(\n 'year' => intval($row['year']),\n 'first_epiweek' => intval($row['first_round_epiweek']),\n 'last_epiweek' => intval($row['last_round_epiweek'])\n );\n setResult($output, 1);\n } else {\n setResult($output, 2);\n }\n return getResult($output);\n}", "title": "" }, { "docid": "40ad7d1279b8ce49dcfd9bfa28890309", "score": "0.48262995", "text": "public function testListGamesBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_games_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result['games'])>0);\n foreach($result['games'] as $event)\n {\n $this->assertTrue(isset($event['season']));\n $this->assertTrue($event['season'] == $season);\n $this->assertTrue($event['type'] == 'game');\n $this->assertTrue(isset($event['team']));\n }\n }", "title": "" }, { "docid": "7613b0cc9f38fc0c0485a0c70417eda8", "score": "0.48214713", "text": "function myHoroscope($month, $day){\n //FM = First month. LM = Last month, FD = First day. LD = Last day.\n $allHoroscopes = array(\n \"vattumannenFM\" => 1, \"vattumannenLM\" => 2, \"vattumannenFD\" => 21, \"vattumannenLD\" => 18,\n \"fiskarnaFM\" => 2, \"fiskarnaLM\" => 3, \"fiskarnaFD\" => 19, \"fiskarnaLD\" => 20,\n \"vädurenFM\" => 3, \"vädurenLM\" => 4, \"vädurenFD\" => 21, \"vädurenLD\" => 20,\n \"oxenFM\" => 4, \"oxenLM\" => 5, \"oxenFD\" => 21, \"oxenLD\" => 21,\n \"tvillingFM\" => 5, \"tvillingLM\" => 6, \"tvillingFD\" => 22, \"tvillingLD\" => 21,\n \"kräftanFM\" => 6, \"kräftanLM\" => 7, \"kräftanFD\" => 22, \"kräftanLD\" => 22,\n \"lejonetFM\" => 7, \"lejonetLM\" => 8, \"lejonetFD\" => 23, \"lejonetLD\" => 23,\n \"jungfrunFM\" => 8, \"jungfrunLM\" => 9, \"jungfrunFD\" => 24, \"jungfrunLD\" => 22,\n \"vågenFM\" => 9, \"vågenLM\" => 10, \"vågenFD\" => 23, \"vågenLD\" => 23,\n \"skorpionenFM\" => 10, \"skorpionenLM\" => 11, \"skorpionenFD\" => 24, \"skorpionenLD\" => 22,\n \"skyttenFM\" => 11, \"skyttenLM\" => 12, \"skyttenFD\" => 23, \"skyttenLD\" => 21,\n \"stenbockenFM\" => 12, \"stenbockenLM\" => 1, \"stenbockenFD\" => 22, \"stenbockenLD\" => 20\n \n );\n\n //Second part of the function, checking wich sign you are using if statements.\n if($month == $allHoroscopes[\"vattumannenFM\"] && $day >= $allHoroscopes[\"vattumannenFD\"] \n || $month == $allHoroscopes[\"vattumannenLM\"] && $day <= $allHoroscopes[\"vattumannenLD\"]){\n $horoscope = \"<h2>Vattuman</h2>\" . '<img src=\"images/Vattuman.png\" class=\"signImage\">' ;\n }\n if($month == $allHoroscopes[\"fiskarnaFM\"] && $day >= $allHoroscopes[\"fiskarnaFD\"] \n || $month == $allHoroscopes[\"fiskarnaLM\"] && $day <= $allHoroscopes[\"fiskarnaLD\"]){\n $horoscope = \"<h2>Fisk</h2>\" . '<img src=\"images/fiskarna.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"vädurenFM\"] && $day >= $allHoroscopes[\"vädurenFD\"] \n || $month == $allHoroscopes[\"vädurenLM\"] && $day <= $allHoroscopes[\"vädurenLD\"]){\n $horoscope = \"<h2>Vädur</h2>\" . '<img src=\"images/väduren.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"oxenFM\"] && $day >= $allHoroscopes[\"oxenFD\"] \n || $month == $allHoroscopes[\"oxenLM\"] && $day <= $allHoroscopes[\"oxenLD\"]){\n $horoscope = \"<h2>Oxe</h2>\" . '<img src=\"images/oxen.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"tvillingFM\"] && $day >= $allHoroscopes[\"tvillingFD\"] \n || $month == $allHoroscopes[\"tvillingLM\"] && $day <= $allHoroscopes[\"tvillingLD\"]){\n $horoscope = \"<h2>Tvilling</h2>\" . '<img src=\"images/tvillingarna.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"kräftanFM\"] && $day >= $allHoroscopes[\"kräftanFD\"] \n || $month == $allHoroscopes[\"kräftanLM\"] && $day <= $allHoroscopes[\"kräftanLD\"]){\n $horoscope = \"<h2>Kräftan</h2>\" . '<img src=\"images/kräftan.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"lejonetFM\"] && $day >= $allHoroscopes[\"lejonetFD\"] \n || $month == $allHoroscopes[\"lejonetLM\"] && $day <= $allHoroscopes[\"lejonetLD\"]){\n $horoscope = \"<h2>Lejon</h2>\" . '<img src=\"images/lejonet.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"jungfrunFM\"] && $day >= $allHoroscopes[\"jungfrunFD\"] \n || $month == $allHoroscopes[\"jungfrunLM\"] && $day <= $allHoroscopes[\"jungfrunLD\"]){\n $horoscope = \"<h2>Jungfru</h2>\" . '<img src=\"images/jungfrun.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"vågenFM\"] && $day >= $allHoroscopes[\"vågenFD\"] \n || $month == $allHoroscopes[\"vågenLM\"] && $day <= $allHoroscopes[\"vågenLD\"]){\n $horoscope = \"<h2>Våg</h2>\" . '<img src=\"images/vågen.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"skorpionenFM\"] && $day >= $allHoroscopes[\"skorpionenFD\"] \n || $month == $allHoroscopes[\"skorpionenLM\"] && $day <= $allHoroscopes[\"skorpionenLD\"]){\n $horoscope = \"<h2>Skorpion</h2>\" . '<img src=\"images/skorpionen.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"skyttenFM\"] && $day >= $allHoroscopes[\"skyttenFD\"] \n || $month == $allHoroscopes[\"skyttenLM\"] && $day <= $allHoroscopes[\"skyttenLD\"]){\n $horoscope = \"<h2>Skytt</h2>\" . '<img src=\"images/skytten.png\" class=\"signImage\">';\n }\n if($month == $allHoroscopes[\"stenbockenFM\"] && $day >= $allHoroscopes[\"stenbockenFD\"] \n || $month == $allHoroscopes[\"stenbockenLM\"] && $day <= $allHoroscopes[\"stenbockenLD\"]){\n $horoscope = \"<h2>Stenbock</h2>\" . '<img src=\"images/stenbocken.png\" class=\"signImage\">';\n }if($month < 2 && $day < 2){\n $horoscope = \"<h2>Testa igen!</h2>\";\n }\n \n if(isset($horoscope)){\n return $horoscope;\n }\n }", "title": "" }, { "docid": "79e61d33f6e77cff24ade933c21b75d6", "score": "0.4809538", "text": "public function testListCardsBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_cards_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result[\"cards\"])>0);\n foreach($result['cards'] as $card)\n {\n $this->assertTrue(isset($card['type']));\n $this->assertTrue(isset($card['game']));\n }\n }", "title": "" }, { "docid": "410d344bdc402aeccd891e07d499fd64", "score": "0.4792537", "text": "public function getDefaultSeasons() {\n return Category::pluck(\"id\");\n }", "title": "" }, { "docid": "acbdaeeaae9e3b3f7bb54ed73485d0a0", "score": "0.47826853", "text": "private function _getSeasonService()\n {\n return $this->get('AW_season_service');\n }", "title": "" }, { "docid": "9293c2ba050068c73bb8164adb163397", "score": "0.47739482", "text": "function __sortEvents( $month, $year ) {\r\n $result = array();\r\n if ( !empty( $this->data ) ) {\r\n $first_of_month = gmmktime( 0, 0, 0, $month, 1, $year );\r\n $days_in_month = gmdate( 't', $first_of_month );\r\n for ( $day = 1; $day <= $days_in_month; $day++ ) {\r\n $result[$day] = $this->__findRecordsForDay( $day, $month, $year );\r\n }\r\n }\r\n if ( !empty( $result ) ) {\r\n $this->data = $result;\r\n }\r\n }", "title": "" }, { "docid": "da299453dade192036d84fb473ecf5e1", "score": "0.47687796", "text": "public static function getNameDay($date = 'now') {\r\n $svatky = array(\r\n //leden\r\n array('Nový rok', 'Karina', 'Radmila', 'Diana', 'Dalimil',\r\n 'Tři králové', 'Vilma', 'Čestmír', 'Vladan', 'Břetislav',\r\n 'Bohdana', 'Pravoslav', 'Edita', 'Radovan', 'Alice',\r\n 'Ctirad', 'Drahoslav', 'Vladislav', 'Doubravka', 'Ilona',\r\n 'Běla', 'Slavomír', 'Zdeněk', 'Milena', 'Miloš', 'Zora',\r\n 'Ingrid', 'Otýlie', 'Zdislava', 'Robin', 'Marika'),\r\n //unor\r\n array('Hynek', 'Nela/Hromnice', 'Blažej', 'Jarmila', 'Dobromila',\r\n 'Vanda', 'Veronika', 'Milada', 'Apolena', 'Mojmír',\r\n 'Božena', 'Slavěna', 'Věnceslav', 'Valentýn', 'Jiřina',\r\n 'Ljuba', 'Miloslava', 'Gizela', 'Patrik', 'Oldřich',\r\n 'Lenka', 'Petr', 'Svatopluk', 'Matěj', 'Liliana',\r\n 'Dorota', 'Alexandr', 'Lumír', 'Horymír'),\r\n //brezen\r\n array('Bedřich', 'Anežka', 'Kamil', 'Stela', 'Kazimír',\r\n 'Miroslav', 'Tomáš', 'Gabriela', 'Františka', 'Viktorie',\r\n 'Anděla', 'Řehoř', 'Růžena', 'Rút/Matylda', 'Ida',\r\n 'Elena/Herbert', 'Vlastimil', 'Eduard', 'Josef', 'Světlana',\r\n 'Radek', 'Leona', 'Ivona', 'Gabriel', 'Marián',\r\n 'Emanuel', 'Dita', 'Soňa', 'Taťána', 'Arnošt',\r\n 'Kvido'),\r\n //duben\r\n array('Hugo', 'Erika', 'Richard', 'Ivana', 'Miroslava',\r\n 'Vendula', 'Heřman/Hermína', 'Ema', 'Dušan', 'Darja',\r\n 'Izabela', 'Julius', 'Aleš', 'Vincenc', 'Anastázie',\r\n 'Irena', 'Rudolf', 'Valérie', 'Rostislav', 'Marcela',\r\n 'Alexandra', 'Evženie', 'Vojtěch', 'Jiří', 'Marek',\r\n 'Oto', 'Jaroslav', 'Vlastislav', 'Robert', 'Blahoslav'),\r\n //kveten\r\n array('Svátek práce', 'Zikmund', 'Alexej', 'Květoslav', 'Klaudie, Květnové povstání českého lidu',\r\n 'Radoslav', 'Stanisla', 'Den osvobození od fašismu', 'Ctibor', 'Blažena',\r\n 'Svatava', 'Pankrác', 'Servác', 'Bonifác', 'Žofie',\r\n 'Přemysl', 'Aneta', 'Nataša', 'Ivo', 'Zbyšek',\r\n 'Monika', 'Emil', 'Vladimír', 'Jana', 'Viola',\r\n 'Filip', 'Valdemar', 'Vilém', 'Maxmilián', 'Ferdinand',\r\n 'Kamila'),\r\n //cerven\r\n array('Laura', 'Jarmil', 'Tamara', 'Dalibor', 'Dobroslav',\r\n 'Norbert', 'Iveta/Slavoj', 'Medard', 'Stanislav', 'Gita',\r\n 'Bruno', 'Antonie', 'Antonín', 'Roland', 'Vít',\r\n 'Zbyněk', 'Adolf', 'Milan', 'Leoš', 'Květa',\r\n 'Alois', 'Pavla', 'Zdeňka', 'Jan', 'Ivan',\r\n 'Adriana', 'Ladislav', 'Lubomír', 'Petr a Pavel', 'Šárka'),\r\n //cervenec\r\n array('Jaroslava', 'Patricie', 'Radomír', 'Prokop', 'Den slovanských věrozvěstů Cyrila a Metoděje',\r\n 'Upálení mistra Jana Husa', 'Bohuslava', 'Nora', 'Drahoslava', 'Libuše/Amálie',\r\n 'Olga', 'Bořek', 'Markéta', 'Karolína', 'Jindřich',\r\n 'Luboš', 'Martina', 'Drahomíra', 'Čeněk', 'Ilja',\r\n 'Vítězslav', 'Magdeléna', 'Libor', 'Kristýna', 'Jakub',\r\n 'Anna', 'Věroslav', 'Viktor', 'Marta', 'Bořivoj',\r\n 'Ignác'),\r\n //srpen\r\n array('Oskar', 'Gustav', 'Miluše', 'Dominik', 'Kristián',\r\n 'Oldřiška', 'Lada', 'Soběslav', 'Roman', 'Vavřinec',\r\n 'Zuzana', 'Klára', 'Alena', 'Alan', 'Hana',\r\n 'Jáchym', 'Petra', 'Helena', 'Ludvík', 'Bernard',\r\n 'Johana', 'Bohuslav', 'Sandra', 'Bartoloměj', 'Radim',\r\n 'Luděk', 'Otakar', 'Augustýn', 'Evelína', 'Vladěna',\r\n 'Pavlína'),\r\n //zari\r\n array('Linda/Samuel', 'Adéla', 'Bronislav', 'Jindřiška', 'Boris',\r\n 'Boleslav', 'Regína', 'Mariana', 'Daniela', 'Irma',\r\n 'Denisa', 'Marie', 'Lubor', 'Radka', 'Jolana',\r\n 'Ludmila', 'Naděžda', 'Kryštof', 'Zita', 'Oleg',\r\n 'Matouš', 'Darina', 'Berta', 'Jaromír', 'Zlata',\r\n 'Andrea', 'Jonáš', 'Václav, Den české státnosti', 'Michal', 'Jeroným'),\r\n //rijen\r\n array('Igor', 'Olívie', 'Bohumil', 'František', 'Eliška',\r\n 'Hanuš', 'Justýna', 'Věra', 'Štefan/Sára', 'Marina',\r\n 'Andrej', 'Marcel', 'Renáta', 'Agáta', 'Tereza',\r\n 'Havel', 'Hedvika', 'Lukáš', 'Michaela', 'Vendelín',\r\n 'Brigita', 'Sabina', 'Teodor', 'Nina', 'Beáta',\r\n 'Erik', 'Šarlota/Zoe', 'Den vzniku samostatného československého státu', 'Silvie', 'Tadeáš',\r\n 'Štěpánka'),\r\n //listopad\r\n array('Felix', 'Památka zesnulých', 'Hubert', 'Karel', 'Miriam',\r\n 'Liběna', 'Saskie', 'Bohumír', 'Bohdan', 'Evžen',\r\n 'Martin', 'Benedikt', 'Tibor', 'Sáva', 'Leopold',\r\n 'Otmar', 'Mahulena, Den boje studentů za svobodu a demokracii', 'Romana', 'Alžběta', 'Nikola',\r\n 'Albert', 'Cecílie', 'Klement', 'Emílie', 'Kateřina',\r\n 'Artur', 'Xenie', 'René', 'Zina', 'Ondřej'),\r\n //prosinec\r\n array('Iva', 'Blanka', 'Svatoslav', 'Barbora', 'Jitka',\r\n 'Mikuláš', 'Ambrož/Benjamín', 'Květoslava', 'Vratislav', 'Julie',\r\n 'Dana', 'Simona', 'Lucie', 'Lýdie', 'Radana',\r\n 'Albína', 'Daniel', 'Miloslav', 'Ester', 'Dagmar',\r\n 'Natálie', 'Šimon', 'Vlasta', 'Adam a Eva, Štědrý den', 'Boží hod vánoční - svátek vánoční',\r\n 'Štěpán - svátek vánoční', 'Žaneta', 'Bohumila', 'Judita', 'David',\r\n 'Silvestr - Nový rok')\r\n );\r\n\r\n $dat = strtotime($date);\r\n if (date('Y', $dat) > 1970) {\r\n return $svatky[date('n', $dat) - 1][date('j', $dat) - 1];\r\n } else {\r\n throw new ExceptionCore('Spatny format datumu!');\r\n }\r\n }", "title": "" }, { "docid": "71f5015c3e5aac171184fb9179a76e79", "score": "0.47670358", "text": "public function dataIndoTeamMonitoringIrel($date){\n $data_array['columns'] = [];\n $data_array['data'] = [];\n $title = [\n \"No.\",\n \"Date\",\n \"Help Authors\",\n \"Follow Up\",\n \"Solved Problems\"\n ];\n foreach ($title as $key => $value) {\n array_push($data_array['columns'], [\"title\" => $value]);\n }\n $xdate = explode(\",\", $date);\n $d = $this->DataIndoIrel($xdate[0],$xdate[1]);\n $dateRange = $this->dateRange($xdate[0],$xdate[1]);\n $no = 1;\n array_push($data_array['data'], [\n $no++,\n \"Monthly Total\",\n $d['daily']->whereNotNull('date')->count(),\n $d['fu_1']->whereNotNull('fu_1')->count()+\n $d['fu_2']->whereNotNull('fu_2')->count()+\n $d['fu_3']->whereNotNull('fu_3')->count()+\n $d['fu_4']->whereNotNull('fu_4')->count()+\n $d['fu_5']->whereNotNull('fu_5')->count()+\n $d['fu_6']->whereNotNull('fu_6')->count()+\n $d['fu_7']->whereNotNull('fu_7')->count()+\n $d['fu_8']->whereNotNull('fu_8')->count()+\n $d['fu_9']->whereNotNull('fu_9')->count()+\n $d['fu_10']->whereNotNull('fu_10')->count(),\n $d['date_solved']->whereNotNull('date_solved')->count()\n ]);\n foreach($dateRange as $key => $date){\n $answer = [];\n $fu_1 = [];\n $fu_2 = [];\n $fu_3 = [];\n $fu_4 = [];\n $fu_5 = [];\n $fu_6 = [];\n $fu_7 = [];\n $fu_8 = [];\n $fu_9 = [];\n $fu_10 = [];\n $solved = [];\n foreach ($d['daily']->where('date','=',$date) as $key => $dv) {\n $dv->date!=null ? array_push($answer, $dv->date) : null;\n }\n foreach ($d['fu_1']->where('fu_1','=',$date) as $key => $dv) {\n $dv->fu_1!=null ? array_push($fu_1, $dv->fu_1) : null;\n }\n foreach ($d['fu_2']->where('fu_2','=',$date) as $key => $dv) {\n $dv->fu_2!=null ? array_push($fu_2, $dv->fu_2) : null;\n }\n foreach ($d['fu_3']->where('fu_3','=',$date) as $key => $dv) {\n $dv->fu_3!=null ? array_push($fu_3, $dv->fu_3) : null;\n }\n foreach ($d['fu_4']->where('fu_4','=',$date) as $key => $dv) {\n $dv->fu_4!=null ? array_push($fu_4, $dv->fu_4) : null;\n }\n foreach ($d['fu_5']->where('fu_5','=',$date) as $key => $dv) {\n $dv->fu_5!=null ? array_push($fu_5, $dv->fu_5) : null;\n }\n foreach ($d['fu_6']->where('fu_6','=',$date) as $key => $dv) {\n $dv->fu_6!=null ? array_push($fu_6, $dv->fu_6) : null;\n }\n foreach ($d['fu_7']->where('fu_7','=',$date) as $key => $dv) {\n $dv->fu_7!=null ? array_push($fu_7, $dv->fu_7) : null;\n }\n foreach ($d['fu_8']->where('fu_8','=',$date) as $key => $dv) {\n $dv->fu_8!=null ? array_push($fu_8, $dv->fu_8) : null;\n }\n foreach ($d['fu_9']->where('fu_9','=',$date) as $key => $dv) {\n $dv->fu_9!=null ? array_push($fu_9, $dv->fu_9) : null;\n }\n foreach ($d['fu_10']->where('fu_10','=',$date) as $key => $dv) {\n $dv->fu_10!=null ? array_push($fu_10, $dv->fu_10) : null;\n }\n foreach ($d['date_solved']->where('date_solved','=',$date) as $key => $dv) {\n $dv->date_solved!=null ? array_push($solved, $dv->date_solved) : null;\n }\n $answer = count($answer);\n $fu = count($fu_1)+count($fu_2)+count($fu_3)+count($fu_4)+count($fu_5)+count($fu_6)+count($fu_7)+count($fu_8)+count($fu_9)+count($fu_10);\n $solved = count($solved);\n array_push($data_array['data'], [\n $no++,date('d/m/Y',strtotime($date)),$answer,$fu,$solved\n ]);\n }\n return $data_array;\n }", "title": "" }, { "docid": "9c3a2d5cd378b074cfafe8a40e4faf7d", "score": "0.4754141", "text": "public function run()\n {\n // データいったん全削除\n DB::table('lol_seasons')->truncate();\n // 初期データ\n DB::table('lol_seasons')->insert([\n [\n 'season' => 'S1',\n 'start_at' => '2010-07-13 05:00:00',\n 'end_at' => '2011-11-29 04:59:59',\n ],\n [\n 'season' => 'S2',\n 'start_at' => '2011-11-29 05:00:00',\n 'end_at' => '2013-02-01 04:59:59',\n ],\n [\n 'season' => 'S3',\n 'start_at' => '2013-02-01 05:00:00',\n 'end_at' => '2014-01-15 04:59:59',\n ],\n [\n 'season' => 'S4',\n 'start_at' => '2014-01-15 05:00:00',\n 'end_at' => '2015-01-21 04:59:59',\n ],\n [\n 'season' => 'S5',\n 'start_at' => '2015-01-21 05:00:00',\n 'end_at' => '2016-01-20 04:59:59',\n ],\n [\n 'season' => 'S6',\n 'start_at' => '2016-01-20 05:00:00',\n 'end_at' => '2016-12-07 04:59:59',\n ],\n [\n 'season' => 'S7',\n 'start_at' => '2016-12-07 05:00:00',\n 'end_at' => '2018-01-16 04:59:59',\n ],\n [\n 'season' => 'S8',\n 'start_at' => '2018-01-16 05:00:00',\n 'end_at' => '2020-12-31 04:59:59',\n ],\n ]);\n\n }", "title": "" }, { "docid": "4689e5b6e4a18c4100bc6ab0f2f74f7b", "score": "0.47442958", "text": "public function json_get_assigned_teams_by_season()\n { \n $season_id=(int)$this->input->get_post(\"season_id\"); \n //get teams that are assigned\n $result=$this->teams_model->get_season_teams($season_id,null);//\n \n //find out which divs are used\n $used_divisions=array();\n foreach($result as &$r)\n {\n \t//make sure used_ has uniques, only once eacy\n \t$divid=$r['division_id'];\n \t$r['division_fullname']=$r['division_name'];\n\t\t\tif(!in_array($divid,$used_divisions))$used_divisions[]=$divid;\n }\n \n //get UNused / empty divisions\n $divs=$this->divisions_model->get_concated_names($season_id,true);//TRUE for json\n \n foreach($divs as $div)\n {\n \t$div_id=$div['division_id']; \n \t//if we found a division that hasnt been used yet, that is, a div that has no teams, we sitll\n \t//want to show it here\n\t\t\tif(!in_array($div_id,$used_divisions))\n\t\t\t{\n\t\t\t\t$div['season_id']=$season_id;\n\t\t\t\t$div['team_id']='';\n\t\t\t\t$div['team_name']='';\n \t\t$div['division_fullname']=$div['division_name'];\n\t\t\t\t$result[]=$div;//array('division_id'=>$div_id,'division_name'=>$div_name,)\n\t\t\t\t\n\t\t\t}\n }\n \n \n $this->result->json_pag($result);\n }", "title": "" }, { "docid": "2b9fa5974a64326e5e595149c03fc36c", "score": "0.47405365", "text": "public function dateProvider()\n {\n return array(\n array('01.01.2013', null, array('name' => 'Neujahr')),\n array('06.01.2013', null, array('name' => 'Heilige Drei Könige')),\n array('01.04.2013', null, array('name' => 'Ostermontag')),\n array('01.05.2013', null, array('name' => 'Staatsfeiertag')),\n array('09.05.2013', null, array('name' => 'Christi Himmelfahrt')),\n array('20.05.2013', null, array('name' => 'Pfingstmontag')),\n array('30.05.2013', null, array('name' => 'Fronleichnam')),\n array('15.08.2013', null, array('name' => 'Mariä Himmelfahrt')),\n array('26.10.2013', null, array('name' => 'Nationalfeiertag')),\n array('01.11.2013', null, array('name' => 'Allerheiligen')),\n array('08.12.2013', null, array('name' => 'Mariä Empfängnis')),\n array('25.12.2013', null, array('name' => 'Weihnachten')),\n array('26.12.2013', null, array('name' => 'Stefanitag')),\n array('01.01.2015', null, array('name' => 'Neujahr')),\n array('06.01.2015', null, array('name' => 'Heilige Drei Könige')),\n array('06.04.2015', null, array('name' => 'Ostermontag')),\n array('01.05.2015', null, array('name' => 'Staatsfeiertag')),\n array('14.05.2015', null, array('name' => 'Christi Himmelfahrt')),\n array('25.05.2015', null, array('name' => 'Pfingstmontag')),\n array('04.06.2015', null, array('name' => 'Fronleichnam')),\n array('15.08.2015', null, array('name' => 'Mariä Himmelfahrt')),\n array('26.10.2015', null, array('name' => 'Nationalfeiertag')),\n array('01.11.2015', null, array('name' => 'Allerheiligen')),\n array('08.12.2015', null, array('name' => 'Mariä Empfängnis')),\n array('25.12.2015', null, array('name' => 'Weihnachten')),\n array('26.12.2015', null, array('name' => 'Stefanitag')),\n );\n }", "title": "" }, { "docid": "5735b16bcaf022d1616cd1cd39120666", "score": "0.4738872", "text": "public function CountSeasonalAssessments() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn SeasonalAssessment::CountByUserId($this->intId);\n\t\t}", "title": "" }, { "docid": "bd25f75dceceff7019d368ba44b94915", "score": "0.4737193", "text": "public function dateProvider()\n {\n return array(\n // National Static\n array('2017-01-01', null, array('name' => 'Confraternização Universal')),\n array('2017-04-21', null, array('name' => 'Tiradentes')),\n array('2017-05-01', null, array('name' => 'Dia do Trabalhador')),\n array('2017-09-07', null, array('name' => 'Dia da Pátria')),\n array('2017-10-12', null, array('name' => 'Nossa Senhora Aparecida')),\n array('2017-11-02', null, array('name' => 'Finados')),\n array('2017-11-15', null, array('name' => 'Proclamação da República')),\n array('2017-12-25', null, array('name' => 'Natal')),\n // National Variable\n array('2016-02-09', null, array('name' => 'Carnaval')),\n array('2017-02-28', null, array('name' => 'Carnaval')),\n array('2018-02-13', null, array('name' => 'Carnaval')),\n array('2016-03-25', null, array('name' => 'Sexta-Feira Santa')),\n array('2017-04-14', null, array('name' => 'Sexta-Feira Santa')),\n array('2018-03-30', null, array('name' => 'Sexta-Feira Santa')),\n array('2016-05-26', null, array('name' => 'Corpus Christi')),\n array('2017-06-15', null, array('name' => 'Corpus Christi')),\n array('2018-05-31', null, array('name' => 'Corpus Christi')),\n\n // Acre State\n array('2017-01-23', BR::STATE_AC, array('name' => 'Dia do Evangélico')),\n array('2017-03-08', BR::STATE_AC, array('name' => 'Alusivo ao Dia Internacional da Mulher')),\n array('2016-06-15', BR::STATE_AC, array('name' => 'Aniversário do Estado')), // conflicts: 2017-06-15\n array('2017-09-05', BR::STATE_AC, array('name' => 'Feriado Estadual')),\n array('2017-11-17', BR::STATE_AC, array('name' => 'Assinatura do Tratado de Petrópolis')),\n\n // Alagoas State\n array('2017-06-24', BR::STATE_AL, array('name' => 'São João')),\n array('2017-06-29', BR::STATE_AL, array('name' => 'São Pedro')),\n array('2017-09-16', BR::STATE_AL, array('name' => 'Emancipação Política')),\n array('2017-11-20', BR::STATE_AL, array('name' => 'Dia da Consciência Negra')),\n\n // Amapá State\n array('2017-03-19', BR::STATE_AP, array('name' => 'São José')),\n array('2017-09-13', BR::STATE_AP, array('name' => 'Criação do Território Federal')),\n\n // Amazonas State\n array('2017-09-05', BR::STATE_AM, array('name' => 'Feriado Estadual')),\n array('2017-11-20', BR::STATE_AM, array('name' => 'Dia da Consciência Negra')),\n\n // Bahia State\n array('2017-07-02', BR::STATE_BA, array('name' => 'Independência da Bahia')),\n\n // Ceará State\n array('2017-03-25', BR::STATE_CE, array('name' => 'Data da Abolição da Escravidão no Ceará')),\n\n // Distrito Federal District\n array('2017-04-21', BR::STATE_DF, array('name' => 'Tiradentes')), // Fundação de Brasília\n array('2017-11-30', BR::STATE_DF, array('name' => 'Dia do Evangélico')),\n\n // Espírito Santo State (Without Holidays)\n array('2017-01-01', BR::STATE_ES, array('name' => 'Confraternização Universal')),\n\n // Goiás State (Without Holidays)\n array('2017-01-01', BR::STATE_GO, array('name' => 'Confraternização Universal')),\n\n // Maranhão State\n array('2017-07-28', BR::STATE_MA, array('name' => 'Adesão do Maranhão à Independência do Brasil')),\n\n // Mato Grosso State\n array('2017-11-20', BR::STATE_MT, array('name' => 'Dia da Consciência Negra')),\n\n // Mato Grosso do Sul State\n array('2017-10-11', BR::STATE_MS, array('name' => 'Criação do Estado')),\n\n // Minas Gerais State\n array('2017-04-21', BR::STATE_MG, array('name' => 'Tiradentes')), // Data Magna do Estado\n\n // Pará State\n array('2017-08-15', BR::STATE_PA, array('name' => 'Adesão do Grão-Pará à Independência do Brasil')),\n\n // Paraíba State\n array('2017-07-26', BR::STATE_PB, array('name' => 'Homenagem à Memória do Ex-Presidente João Pessoa')),\n array('2017-08-05', BR::STATE_PB, array('name' => 'Fundação do Estado')),\n\n // Paraná State\n array('2017-12-19', BR::STATE_PR, array('name' => 'Emancipação Política')),\n\n // Pernambuco State (Variable)\n array('2016-03-06', BR::STATE_PE, array('name' => 'Revolução Pernambucana')),\n array('2017-03-05', BR::STATE_PE, array('name' => 'Revolução Pernambucana')),\n array('2018-03-04', BR::STATE_PE, array('name' => 'Revolução Pernambucana')),\n\n // Piauí State\n array('2017-10-19', BR::STATE_PI, array('name' => 'Dia do Piauí')),\n\n // Rio de Janeiro State\n array('2017-04-23', BR::STATE_RJ, array('name' => 'São Jorge')),\n array('2017-11-20', BR::STATE_RJ, array('name' => 'Dia da Consciência Negra')),\n\n // Rio de Janeiro State\n array('2016-02-09', BR::STATE_RJ, array('name' => 'Carnaval')),\n array('2017-02-28', BR::STATE_RJ, array('name' => 'Carnaval')),\n array('2018-02-13', BR::STATE_RJ, array('name' => 'Carnaval')),\n\n // Rio Grande do Norte State\n array('2017-10-03', BR::STATE_RN, array('name' => 'Mártires de Cunhaú e Uruaçu')),\n\n // Rio Grande do Sul State\n array('2017-09-20', BR::STATE_RS, array('name' => 'Proclamação da República Rio-Grandense')),\n\n // Rondônia State\n array('2017-01-04', BR::STATE_RO, array('name' => 'Criação do Estado')),\n array('2017-06-18', BR::STATE_RO, array('name' => 'Dia do Evangélico')),\n\n // Roraima State\n array('2017-10-05', BR::STATE_RR, array('name' => 'Criação do Estado')),\n\n // Santa Catarina State\n array('2017-07-09', BR::STATE_SC, array('name' => 'Revolução Constitucionalista')),\n array('2017-11-25', BR::STATE_SC, array('name' => 'Santa Catarina de Alexandria')),\n\n // São Paulo State\n array('2017-07-09', BR::STATE_SP, array('name' => 'Revolução Constitucionalista')),\n\n // Sergipe State\n array('2017-07-08', BR::STATE_SE, array('name' => 'Emancipação Política')),\n\n // Tocantins State\n array('2017-03-18', BR::STATE_TO, array('name' => 'Autonomia do Estado')),\n array('2017-09-08', BR::STATE_TO, array('name' => 'Padroeira do Estado')),\n array('2017-10-05', BR::STATE_TO, array('name' => 'Criação do Estado')),\n );\n }", "title": "" }, { "docid": "89090cd9832b2bc5c70d8ce4ddb18c54", "score": "0.47230268", "text": "public function mySeasonsAction()\n {\n $user= $this->get('security.context')->getToken()->getUser();\n\n $seasons = $this->getDoctrine()\n ->getRepository('MbyCommunityBundle:Season')\n ->findAllUserSeasons($user);\n\n return $this->render('MbyCommunityBundle:Membership:mySeasons.html.twig', array(\n 'seasons' => $seasons\n ));\n\n }", "title": "" }, { "docid": "31bed28c8f5e51d19f8d583043c6eea1", "score": "0.4720903", "text": "public function getCategoriesByDays() {\n $market = new Market();\n $listMarket = $market->getMarket();\n \n if(empty($listMarket)) {\n throw new MPException('', MPException::$codeNoMarket);\n }\n \n // on recupere les jours d'affichage\n $listMarketByDate = array();\n $dateTime = new DateTime();\n $dayStart = 1;\n $dayEnd = 7;\n if((int) $dateTime->format('H')>=(int) MPTools::LIMITE_HOUR_COMMAND_TODAY) {\n $dateTime->modify('+1 day');\n }\n for($i=$dayStart;$i<$dayEnd;$i++) {\n if($i!=$dayStart) {\n $dateTime->modify('+1 day');\n }\n $dayOfWeek = $dateTime->format('w');\n if($dayOfWeek==1) {\n $dateTime->modify('+1 day');\n $dayOfWeek = $dateTime->format('w');\n }\n $stringDay = MPTools::$listJour[$dayOfWeek];\n foreach($listMarket as $marketDto) {\n if($marketDto->{(string) 'get' . $stringDay}()) {\n $listMarketByDate[$dateTime->format('Ymd')][] = $marketDto->getIdMarket();\n }\n }\n }\n \n\n $listSupplierByDate = array();\n $supplier = new Supplier();\n foreach($listMarketByDate as $dateFormat=>$listIdMarket) {\n $nextDate = new DateTime($dateFormat);\n $dateTime = new DateTime();\n $interval = $dateTime->diff($nextDate, true);\n $diff = $interval->format('%a');\n // on recupere tous les paysans associes aux marches\n foreach($listIdMarket as $idMarket) {\n $listSupplier = $supplier->getFromIdMarketWithDelay($idMarket, $diff);\n if(!empty($listSupplier)) {\n if(isset($listSupplierByDate[$nextDate->format('Ymd')])) {\n $suppliers = $listSupplierByDate[$nextDate->format('Ymd')];\n $listSupplier = array_merge($listSupplier, $suppliers);\n }\n $listSupplierByDate[$nextDate->format('Ymd')] = $listSupplier;\n }\n }\n }\n unset($listSupplier);\n\n if(empty($listSupplierByDate)) {\n throw new MPException('', MPException::$codeNoSupplier);\n }\n \n unset($listMarket);\n // a partir des idSupplier on recupere, par jour, les cartegories de leurs produits\n $listCategoryByDate = array();\n $category = new Category();\n foreach($listSupplierByDate as $date=>$listSupplier) {\n $listCategoryForIdSupplier = array();\n foreach ($listSupplier as $supplierDto) {\n $listCategoryForIdSupplier[] = $category->getCategoryFromIdSupplier($supplierDto->getIdSupplier());\n }\n $listCategoryByDate[$date] = $this->deleteDoublon($listCategoryForIdSupplier);\n }\n unset($listSupplierByDate, $listCategoryForIdSupplier);\n // on ordonne les categories par position\n foreach($listCategoryByDate as $date=>$listCategoryDto) {\n $tmp = array();\n foreach($listCategoryDto as $categoryDto) {\n $tmp[$categoryDto->getPosition()][] = $categoryDto;\n }\n ksort($tmp);\n $listCategoryByDate[$date] = $tmp;\n }\n if(empty($listCategoryByDate)) {\n throw new MPException('', MPException::$codeNoCateggory);\n }\n ksort($listCategoryByDate);\n return $listCategoryByDate;\n }", "title": "" }, { "docid": "97e782a55eb67c929f36453dbb0be3be", "score": "0.47178325", "text": "public function post_delete_season()\n\t{\n\t\t\n\t\t$user=$this->permissions_model->get_active_user();\n\t\t$season_id = (int)$this->input->get_post('season_id');\n\t\t\n\t\t\n\t\t$count_schedules=$this->schedule_model->count_schedules_in_season($season_id);\n\t\t\n\t\t$s = ($count_schedules== 1 ? '' : 's');\n\t\tif($count_schedules > 0)\n\t\t{\n\t\t\t$r= \"We found \".$count_schedules.\n\t\t\t\" schedule\".$s.\" that have been created in this season, which must be deleted first. \"\n\t\t\t.\" Alternatively, you can set this season to Inactive.\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$r= $this->season_model->delete($season_id,$user);\n\t\t}\n\t\t$this->result->success($r);\n\t}", "title": "" }, { "docid": "b10f8829fa97abed563269aef1b01465", "score": "0.47173524", "text": "function getAllSalesDetails(){\n \t$q = Doctrine_Query::create()->from('Sales s')->where(\"s.seasonid = '\".$this->getID().\"'\")->orderby('s.startdate DESC');\n\t\t$result = $q->execute();\n\t\treturn $result;\n }", "title": "" }, { "docid": "dda2396612db47e6043c351aedcb582a", "score": "0.47157025", "text": "public function getResultsBySeason($seasonId);", "title": "" }, { "docid": "ee1b709fb83406e0e387f7f4d841fcf2", "score": "0.4707425", "text": "function getCalendarAspects($lines, $dynamic = false, $crossing = false) {\n $planets = array (\"1000\" => \"Sun\", \"1001\" => \"Moon\", \"1002\" => \"Mercury\", \"1003\" => \"Venus\", \"1004\" => \"Mars\", \"1005\" => \"Jupiter\", \"1006\" => \"Saturn\", \"1007\" => \"Uranus\", \"1008\" => \"Neptune\", \"1009\" => \"Pluto\", \"1010\" => \"Node\", \"1011\" => \"SNode\",\t\t/* put here to stop the nag messages, not used */\n \"1012\" => \"Ascendant\", \"1013\" => \"Midheaven\",\t/* \"MC\", */\n \"1014\" => \"IC\", \"1015\" => \"Descendant\" );\n $houses = array (\"0001\" => \"Ascendant\", \"0002\" => \"2nd Cusp\", \"0003\" => \"3rd Cusp\", \"0004\" => \"IC\", \"0005\" => \"5th Cusp\", \"0006\" => \"6th Cusp\", \"0007\" => \"Descendant\", \"0008\" => \"8th Cusp\", \"0009\" => \"9th Cusp\", \"0010\" => \"Midheaven\", \"0011\" => \"11th Cusp\", \"0012\" => \"12th Cusp\" );\n $aspects = array (\"000\" => \"Con\", \"060\" => \"Sex\", \"090\" => \"Squ\", \"120\" => \"Tri\", \"180\" => \"Opp\" );\n /* iterate through the results */\n foreach ( $lines as $line ) {\n /* manage last (blank) line */\n if (strlen ( $line ) < 1) {\n continue;\n }\n\n /* look for the transiting planet */\n $trans = trim ( substr ( $line, 25, 8 ) );\n for($i = 0; $i < count ( $planets ); $i ++) {\n if ($i >= 11) {\n $i ++;\n }\n if ($planets [(1000 + $i)] == $trans) {\n $transvalue = intval ( (1000 + $i) );\n break;\n }\n }\n\n /*\n\t\t \t * look for the natal object\n\t\t \t * take special care where returns are encountered\n */\n if ($crossing === true) {\n $natal = trim ( substr ( $line, 55, 10 ) );\n for($i = 0; $i < count ( $houses ); $i ++) {\n /* if( $i >= 11 ) { $i++; } */\n if ($houses [sprintf ( \"%04d\", ($i + 1) )] == $natal) {\n $natalvalue = intval ( $i + 1 );\n break; /* from for loop */\n }\n }\n } else {\n /* look for the natal object */\n $natal = trim ( substr ( $line, 55, 10 ) );\n for($i = 0; $i < count ( $planets ); $i ++) {\n /* if( $i >= 11 ) { $i++; } */\n /*\n\t\t \t\t\t * The following works on the basis that we look for the polled object\n\t\t \t\t\t * using the length of the string in the planets table. This should\n\t\t \t\t\t * prevent the (<object> Return) string factoring in the equation\n */\n if ($planets [sprintf ( \"%04d\", (1000 + $i) )] == substr ( $natal, 0, strlen ( $planets [sprintf ( \"%04d\", (1000 + $i) )] ) )) {\n $natalvalue = intval ( (1000 + $i) );\n break;\n } else {\n // oops\n }\n }\n }\n\n $aspect = trim ( substr ( $line, 39, 3 ) );\n reset ( $aspects );\n while ( $aspectname = current ( $aspects ) ) {\n if ($aspectname == $aspect) {\n $aspectvalue = intval ( key ( $aspects ) );\n break;\n }\n next ( $aspects );\n }\n\n if ($dynamic === false) {\n array_push ( $this->m_aspect,\t\t/* seasonal/calendars */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 0, 2 ) ), intval ( substr ( $line, 3, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n } else {\n if ($crossing === true) {\n array_push ( $this->m_crossing,\t\t/* Jupiter/Saturn house crossing */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 3, 2 ) ), intval ( substr ( $line, 0, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n } else {\n if($natalvalue != 1012 && $natalvalue != 1013 ) {\n array_push ( $this->m_transit,\t\t/* Transiting aspects */\n sprintf ( \"%04d-%02d-%02d %02d:%02d %04d%03d%04d\",\n /* date\t\t\t*/\tintval ( substr ( $line, 6, 4 ) ), intval ( substr ( $line, 3, 2 ) ), intval ( substr ( $line, 0, 2 ) ),\n /* time\t\t\t*/\tintval ( substr ( $line, 11, 2 ) ), intval ( substr ( $line, 14, 2 ) ),\n /* transiting\t*/\t$transvalue,\n /* aspect\t\t*/\t$aspectvalue,\n /* natal\t\t*/\t$natalvalue ) );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "95fb834e946031aaf7f972ec069309df", "score": "0.46950266", "text": "function sga_ranking_get_date( $args = array() )\n{\n return sga_ranking_ids( $args );\n}", "title": "" }, { "docid": "d3249de43d4c900333ab8a5dd4dcf2f0", "score": "0.46859846", "text": "public function json_get_unassigned_teams_by_season()\n {\n $season_id=(int)$this->input->get_post(\"season_id\");\n $result=$this->teams_model->get_unassigned_teams_by_season($season_id);\n //if(!$result)$result=array();//should never happen, but it did once\n $this->result->json_pag($result);\n }", "title": "" }, { "docid": "fc98e265e02df3735f5b2f74a87250f8", "score": "0.4657429", "text": "function getAllInputDetails(){\n \t$q = Doctrine_Query::create()->from('SeasonInput s')->where(\"s.seasonid = '\".$this->getID().\"'\")->orderby('s.startdate DESC');\n\t\t$result = $q->execute();\n\t\treturn $result;\n }", "title": "" }, { "docid": "b409f35d60d2bef4885cf47f0fc726a6", "score": "0.465349", "text": "public function getIsSemesterBreak($date) {\n //$this->logger->info('In InstallationService::getIsSemesterBreak()');\n \n\t\t$params = array('date' => $date);\n $dql = 'SELECT COUNT(i) FROM GinsbergTransportationBundle:Installation i WHERE \n :date < i.fallStart\n OR :date BETWEEN i.fallEnd AND i.winterStart\n OR :date > i.winterEnd';\n \n $query = $this->getEntityManager()->createQuery($dql)->setParameters($params);\n\n try {\n $result = $query->getSingleScalarResult();\n return ((bool) $result) ? TRUE : FALSE;\n } catch (\\Doctrine\\ORM\\NoResultException $ex) {\n return null;\n }\n }", "title": "" }, { "docid": "874f0ef6ae4acf24b8428d9c98a37a7d", "score": "0.46417314", "text": "public function index(Request $request)\n {\n $eds = '';\n $exam_season ='';\n if ($request->exam_season) {\n $eds = ExamDate::where('exam_season_id', $request->exam_season)->orderBy('exam_date')->get();\n $exam_season = ExamSeason::find($request->exam_season);\n }\n return view('super_admin.exam_date.index')\n ->with('eds', $eds)\n ->with('exam_season', $exam_season)\n ->with('exam_seasons',ExamSeason::orderBy('exam_year','desc')->get());\n }", "title": "" }, { "docid": "54d6c862cabe761092a962e8f1eed91c", "score": "0.46385783", "text": "function index()\n {\n $data['season'] = $this->Season_model->get_all_season();\n \n $data['_view'] = 'season/index';\n $this->load->view('layouts/main',$data);\n }", "title": "" }, { "docid": "f6a95c74137c8538ef172c2d4a7bebc9", "score": "0.46296445", "text": "private function findHurricaneInSeasonPage(): ?array\n {\n $season = $this->hurricane->season;\n $basin = ucfirst($this->hurricane->basin);\n $name = $this->hurricane->name;\n \n $wikipedia_page_name = sprintf(\"%d_%s_hurricane_season\", $season, $basin);\n if ($season === 2005) {\n // ONLY EXCEPTION. WASN'T THIS A GREAT YEAR -_- \n $wikipedia_page_name = \"2005_Atlantic_hurricane_season\";\n }\n $wikipedia_url = sprintf(\n \"https://en.wikipedia.org/api/rest_v1/page/mobile-sections/%s\",\n $wikipedia_page_name\n );\n\n $json = file_get_contents($wikipedia_url);\n if (! $json) {\n return null; // :(\n }\n\n $json = json_decode($json, true);\n\n // im just doing this out of paranoia:\n $sections = collect($json['lead']['sections']);\n $this_storm_section = $sections->first(function ($section) use ($name) {\n return key_exists('line', $section) && stripos($section['line'], $name) !== false;\n });\n\n $sections_content = collect($json['remaining']['sections']);\n\n $section_content = $sections_content->first(function ($section) use ($this_storm_section) {\n return $section['id'] === $this_storm_section['id'];\n });\n\n $html = $section_content['text'];\n\n if (trim($html) === '') {\n // sometimes they don't exist, like Hurricane One in 1853 https://en.wikipedia.org/wiki/1853_Atlantic_hurricane_season\n return null;\n }\n\n $domdocument = new \\DOMDocument();\n libxml_use_internal_errors(true); // :( :@\n $domdocument->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));\n\n $images = [];\n $main_paragraph = null;\n $main_article = null;\n\n /// images\n\n $image_nodes = $domdocument->getElementsByTagName('img');\n foreach ($image_nodes as $image) {\n $src = $image->getAttribute('src');\n $srcset = $image->getAttribute('srcset');\n if ($srcset) {\n $sources = explode(',', $srcset);\n $source_and_size = trim(end($sources));\n $source_and_size = explode(' ', $source_and_size);\n $src = $source_and_size[0]; // todo: bring a bigger size just by tweaking the \"px\" in the URL\n }\n\n if (! Str::startsWith($src, 'https:')) {\n $src = 'https:' . $src;\n }\n $images[] = $src;\n }\n\n // main paragraph\n\n $paragraphs = $domdocument->getElementsByTagName('p');\n foreach ($paragraphs as $paragraph) {\n $main_paragraph = strip_tags($paragraph->ownerDocument->saveHTML($paragraph));\n break;\n }\n\n // main article\n $domxpath = new \\DOMXPath($domdocument);\n $elem = $domxpath->query(\"//*[contains(@class, 'navigation-not-searchable')]\");\n if ($elem->length > 0) {\n $elem = $elem->item(0);\n $title = $elem->childNodes[0]->textContent;\n if (stripos($title, 'Main') !== false) {\n $anchor = $elem->childNodes[1];\n $href = $anchor->getAttribute('href');\n $main_article = str_replace('/wiki/', '', $href); // :D\n }\n }\n\n\n $web_url = sprintf(\"https://en.wikipedia.org/wiki/%s\", $wikipedia_page_name);\n $main_paragraph_source = sprintf(\"%s#%s\", $web_url, $section_content['anchor']);\n\n return [\n 'main_article' => $main_article,\n 'images' => $images,\n 'main_paragraph' => $main_paragraph,\n 'main_paragraph_source' => $main_paragraph_source,\n ];\n }", "title": "" }, { "docid": "b8b8244f75b0e759882af907e51c071f", "score": "0.4628712", "text": "public function run()\n {\n $data = array(\n array('hijri_date' => '02-02-1379','internal_date' => '21767','greg_date' => '1959-08-06 00:00:00'),\n array('hijri_date' => '02-02-1385','internal_date' => '23893','greg_date' => '1965-06-01 00:00:00'),\n array('hijri_date' => '02-02-1396','internal_date' => '27791','greg_date' => '1976-02-02 00:00:00'),\n array('hijri_date' => '02-02-1399','internal_date' => '28854','greg_date' => '1978-12-31 00:00:00'),\n array('hijri_date' => '02-02-1413','internal_date' => '33815','greg_date' => '1992-07-31 00:00:00'),\n array('hijri_date' => '02-02-1416','internal_date' => '34879','greg_date' => '1995-06-30 00:00:00'),\n array('hijri_date' => '02-03-1368','internal_date' => '17898','greg_date' => '1949-01-01 00:00:00'),\n array('hijri_date' => '02-03-1371','internal_date' => '18962','greg_date' => '1951-12-01 00:00:00'),\n array('hijri_date' => '02-03-1373','internal_date' => '19670','greg_date' => '1953-11-08 00:00:00'),\n array('hijri_date' => '02-03-1385','internal_date' => '23923','greg_date' => '1965-07-01 00:00:00'),\n array('hijri_date' => '02-03-1396','internal_date' => '27820','greg_date' => '1976-03-02 00:00:00'),\n array('hijri_date' => '02-03-1410','internal_date' => '32781','greg_date' => '1989-10-01 00:00:00'),\n array('hijri_date' => '02-03-1427','internal_date' => '38806','greg_date' => '2006-03-31 00:00:00'),\n array('hijri_date' => '02-04-1350','internal_date' => '11549','greg_date' => '1931-08-15 00:00:00'),\n array('hijri_date' => '02-04-1357','internal_date' => '14030','greg_date' => '1938-05-31 00:00:00'),\n array('hijri_date' => '02-04-1364','internal_date' => '16511','greg_date' => '1945-03-16 00:00:00'),\n array('hijri_date' => '02-04-1368','internal_date' => '17928','greg_date' => '1949-01-31 00:00:00'),\n array('hijri_date' => '02-04-1382','internal_date' => '22889','greg_date' => '1962-09-01 00:00:00'),\n array('hijri_date' => '02-04-1384','internal_date' => '23597','greg_date' => '1964-08-09 00:00:00'),\n array('hijri_date' => '02-04-1396','internal_date' => '27850','greg_date' => '1976-04-01 00:00:00'),\n array('hijri_date' => '02-04-1399','internal_date' => '28913','greg_date' => '1979-02-28 00:00:00'),\n array('hijri_date' => '02-04-1406','internal_date' => '31394','greg_date' => '1985-12-14 00:00:00'),\n array('hijri_date' => '02-04-1410','internal_date' => '32811','greg_date' => '1989-10-31 00:00:00'),\n array('hijri_date' => '02-04-1423','internal_date' => '37418','greg_date' => '2002-06-12 00:00:00'),\n array('hijri_date' => '02-05-1354','internal_date' => '12996','greg_date' => '1935-08-01 00:00:00'),\n array('hijri_date' => '02-05-1368','internal_date' => '17957','greg_date' => '1949-03-01 00:00:00'),\n array('hijri_date' => '02-05-1382','internal_date' => '22918','greg_date' => '1962-09-30 00:00:00'),\n array('hijri_date' => '02-05-1396','internal_date' => '27880','greg_date' => '1976-05-01 00:00:00'),\n array('hijri_date' => '02-05-1404','internal_date' => '30714','greg_date' => '1984-02-03 00:00:00'),\n array('hijri_date' => '02-05-1410','internal_date' => '32841','greg_date' => '1989-11-30 00:00:00'),\n array('hijri_date' => '02-05-1424','internal_date' => '37802','greg_date' => '2003-07-01 00:00:00'),\n array('hijri_date' => '02-06-1354','internal_date' => '13026','greg_date' => '1935-08-31 00:00:00'),\n array('hijri_date' => '02-06-1368','internal_date' => '17987','greg_date' => '1949-03-31 00:00:00'),\n array('hijri_date' => '02-06-1379','internal_date' => '21885','greg_date' => '1959-12-02 00:00:00'),\n array('hijri_date' => '02-06-1396','internal_date' => '27910','greg_date' => '1976-05-31 00:00:00'),\n array('hijri_date' => '02-06-1407','internal_date' => '31807','greg_date' => '1987-01-31 00:00:00'),\n array('hijri_date' => '02-06-1409','internal_date' => '32516','greg_date' => '1989-01-09 00:00:00'),\n array('hijri_date' => '02-06-1421','internal_date' => '36768','greg_date' => '2000-08-31 00:00:00'),\n array('hijri_date' => '02-06-1424','internal_date' => '37832','greg_date' => '2003-07-31 00:00:00'),\n array('hijri_date' => '02-07-1351','internal_date' => '11992','greg_date' => '1932-10-31 00:00:00'),\n array('hijri_date' => '02-07-1365','internal_date' => '16953','greg_date' => '1946-06-01 00:00:00'),\n array('hijri_date' => '02-07-1368','internal_date' => '18017','greg_date' => '1949-04-30 00:00:00'),\n array('hijri_date' => '02-07-1376','internal_date' => '20851','greg_date' => '1957-02-01 00:00:00'),\n array('hijri_date' => '02-07-1379','internal_date' => '21914','greg_date' => '1959-12-31 00:00:00'),\n array('hijri_date' => '02-07-1383','internal_date' => '23332','greg_date' => '1963-11-18 00:00:00'),\n array('hijri_date' => '02-07-1393','internal_date' => '26875','greg_date' => '1973-07-31 00:00:00'),\n array('hijri_date' => '02-07-1400','internal_date' => '29356','greg_date' => '1980-05-16 00:00:00'),\n array('hijri_date' => '02-07-1427','internal_date' => '38924','greg_date' => '2006-07-27 00:00:00'),\n array('hijri_date' => '02-08-1351','internal_date' => '12022','greg_date' => '1932-11-30 00:00:00'),\n array('hijri_date' => '02-08-1365','internal_date' => '16983','greg_date' => '1946-07-01 00:00:00'),\n array('hijri_date' => '02-08-1382','internal_date' => '23007','greg_date' => '1962-12-28 00:00:00'),\n array('hijri_date' => '02-08-1388','internal_date' => '25133','greg_date' => '1968-10-23 00:00:00'),\n array('hijri_date' => '02-08-1407','internal_date' => '31866','greg_date' => '1987-03-31 00:00:00'),\n array('hijri_date' => '02-09-1356','internal_date' => '13823','greg_date' => '1937-11-05 00:00:00'),\n array('hijri_date' => '02-09-1362','internal_date' => '15949','greg_date' => '1943-09-01 00:00:00'),\n array('hijri_date' => '02-09-1377','internal_date' => '21265','greg_date' => '1958-03-22 00:00:00'),\n array('hijri_date' => '02-09-1390','internal_date' => '25872','greg_date' => '1970-11-01 00:00:00'),\n array('hijri_date' => '02-09-1402','internal_date' => '30124','greg_date' => '1982-06-23 00:00:00'),\n array('hijri_date' => '02-09-1404','internal_date' => '30833','greg_date' => '1984-06-01 00:00:00'),\n array('hijri_date' => '02-09-1407','internal_date' => '31896','greg_date' => '1987-04-30 00:00:00'),\n array('hijri_date' => '02-09-1415','internal_date' => '34730','greg_date' => '1995-02-01 00:00:00'),\n array('hijri_date' => '02-09-1418','internal_date' => '35794','greg_date' => '1997-12-31 00:00:00'),\n array('hijri_date' => '02-09-1427','internal_date' => '38983','greg_date' => '2006-09-24 00:00:00'),\n array('hijri_date' => '02-09-1429','internal_date' => '39691','greg_date' => '2008-09-01 00:00:00'),\n array('hijri_date' => '02-10-1359','internal_date' => '14915','greg_date' => '1940-11-01 00:00:00'),\n array('hijri_date' => '02-10-1362','internal_date' => '15979','greg_date' => '1943-10-01 00:00:00'),\n array('hijri_date' => '02-10-1368','internal_date' => '18105','greg_date' => '1949-07-27 00:00:00'),\n array('hijri_date' => '02-10-1376','internal_date' => '20940','greg_date' => '1957-05-01 00:00:00'),\n array('hijri_date' => '02-10-1390','internal_date' => '25901','greg_date' => '1970-11-30 00:00:00'),\n array('hijri_date' => '02-10-1404','internal_date' => '30863','greg_date' => '1984-07-01 00:00:00'),\n array('hijri_date' => '02-10-1429','internal_date' => '39721','greg_date' => '2008-10-01 00:00:00'),\n array('hijri_date' => '02-11-1359','internal_date' => '14945','greg_date' => '1940-12-01 00:00:00'),\n array('hijri_date' => '02-11-1362','internal_date' => '16009','greg_date' => '1943-10-31 00:00:00'),\n array('hijri_date' => '02-11-1376','internal_date' => '20970','greg_date' => '1957-05-31 00:00:00'),\n array('hijri_date' => '02-11-1387','internal_date' => '24867','greg_date' => '1968-01-31 00:00:00'),\n array('hijri_date' => '02-11-1389','internal_date' => '25576','greg_date' => '1970-01-09 00:00:00'),\n array('hijri_date' => '02-11-1401','internal_date' => '29828','greg_date' => '1981-08-31 00:00:00'),\n array('hijri_date' => '02-11-1406','internal_date' => '31601','greg_date' => '1986-07-09 00:00:00'),\n array('hijri_date' => '02-11-1410','internal_date' => '33018','greg_date' => '1990-05-26 00:00:00'),\n array('hijri_date' => '02-11-1418','internal_date' => '35853','greg_date' => '1998-02-28 00:00:00'),\n array('hijri_date' => '02-12-1373','internal_date' => '19935','greg_date' => '1954-07-31 00:00:00'),\n array('hijri_date' => '02-12-1387','internal_date' => '24897','greg_date' => '1968-03-01 00:00:00'),\n array('hijri_date' => '02-12-1401','internal_date' => '29858','greg_date' => '1981-09-30 00:00:00'),\n array('hijri_date' => '02-12-1415','internal_date' => '34819','greg_date' => '1995-05-01 00:00:00'),\n array('hijri_date' => '03-01-1371','internal_date' => '18904','greg_date' => '1951-10-04 00:00:00'),\n array('hijri_date' => '03-01-1372','internal_date' => '19258','greg_date' => '1952-09-22 00:00:00'),\n array('hijri_date' => '03-01-1374','internal_date' => '19966','greg_date' => '1954-08-31 00:00:00'),\n array('hijri_date' => '03-01-1381','internal_date' => '22447','greg_date' => '1961-06-16 00:00:00'),\n array('hijri_date' => '03-01-1388','internal_date' => '24927','greg_date' => '1968-03-31 00:00:00'),\n array('hijri_date' => '03-01-1391','internal_date' => '25991','greg_date' => '1971-02-28 00:00:00'),\n array('hijri_date' => '03-01-1416','internal_date' => '34850','greg_date' => '1995-06-01 00:00:00'),\n array('hijri_date' => '03-01-1422','internal_date' => '36977','greg_date' => '2001-03-28 00:00:00'),\n array('hijri_date' => '03-01-1427','internal_date' => '38748','greg_date' => '2006-02-01 00:00:00'),\n array('hijri_date' => '03-01-1429','internal_date' => '39457','greg_date' => '2008-01-11 00:00:00'),\n array('hijri_date' => '03-02-1360','internal_date' => '15035','greg_date' => '1941-03-01 00:00:00'),\n array('hijri_date' => '03-02-1366','internal_date' => '17161','greg_date' => '1946-12-26 00:00:00'),\n array('hijri_date' => '03-02-1374','internal_date' => '19996','greg_date' => '1954-09-30 00:00:00'),\n array('hijri_date' => '03-02-1388','internal_date' => '24957','greg_date' => '1968-04-30 00:00:00'),\n array('hijri_date' => '03-02-1399','internal_date' => '28855','greg_date' => '1979-01-01 00:00:00'),\n array('hijri_date' => '03-02-1413','internal_date' => '33816','greg_date' => '1992-08-01 00:00:00')\n );\n foreach ($data as $d) {\n GregHijriActual2::create($d);\n }\n }", "title": "" }, { "docid": "d53d046970b85c863381e605a39bf241", "score": "0.46277037", "text": "public function testListGoalsBySeason()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n $season = '2013-2014';\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_goals_season', array(\n 'playerID'=>$player->getId(),\n 'season'=>$season,\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result[\"goals\"])>0);\n foreach($result['goals'] as $goal)\n {\n $this->assertTrue(isset($goal['type']));\n $this->assertTrue(isset($goal['game']));\n }\n }", "title": "" }, { "docid": "699271793a46f05d39d572707c3e296e", "score": "0.46208307", "text": "public function __construct(Season $season)\n {\n $this->season = $season;\n }", "title": "" }, { "docid": "cc525ccf8d977d4c19677cabb5d6595b", "score": "0.46150786", "text": "public function getGamesByDate()\r\n\t{\r\n\t\t$games = $this->attribs['games'];\r\n\t\tusort($games, array('Application_Model_Games','dateSort'));\r\n\t\t\r\n\t\treturn $games;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3982f45039d93b1bbdb5d5bd0aa069ab", "score": "0.46125448", "text": "public function allEpisodes(int $id, string $seasonType = self::SEASON_TYPE_DEFAULT) : array\n {\n $result = [];\n\n // Boolean to catch throw.\n $throwS = false;\n $throwP = false;\n\n if ($this->parent->getSecondaryLanguage() !== \"\") {\n // Pre-fill results with fallback language, assuming the fallback language always has more results than the\n // translated, primary language.\n try {\n $page = 0;\n do {\n $eps = $this->episodes($id, 0, $page, $seasonType, $this->parent->getSecondaryLanguage());\n foreach ($eps as $episode) {\n $result[$episode->id] = $episode;\n }\n $page++;\n } while (sizeof($eps) === 500);\n } catch (ResourceNotFoundException $exception) {\n $throwS = true;\n }\n }\n try {\n $page = 0;\n do {\n $translatedEpisodes = $this->episodes($id, 0, $page, $seasonType, $this->parent->getPrimaryLanguage());\n foreach ($translatedEpisodes as $episode) {\n if (array_key_exists($episode->id, $result)) {\n $result[$episode->id]->name = ($episode->name ?? $result[$episode->id]->name);\n $result[$episode->id]->overview = ($episode->overview ?? $result[$episode->id]->overview);\n } else {\n $result[$episode->id] = $episode;\n }\n }\n $page++;\n } while (sizeof($translatedEpisodes) === 500);\n } catch (ResourceNotFoundException $exception) {\n $throwP = true;\n }\n\n if ($throwS && $throwP) {\n throw ResourceNotFoundException::noTranslationAvailable();\n }\n\n return array_values($result);\n }", "title": "" }, { "docid": "47f6172c595c36a56e2f250b70fb8fad", "score": "0.46072087", "text": "public function json_seasons_assignedto_ao_team()\n\t{\n\t\t$team_org=$this->permissions_model->get_active_org();\n\t\t$team_id=$this->teams_model->get_team_id_byorg($team_org);\n\t\t\n\t\t$seasons=$this->season_model->get_seasons_assigned_to_team($team_id);\n\t\t//get_seasons_assigned_to_team\n\t\t\n\t\t$seasons = $this->_format_seasons_array($seasons);\n\t\t$this->result->json($seasons);\n\t\t\n\t}", "title": "" }, { "docid": "f7143955cb5632d1c9f909fda2c0f1be", "score": "0.4592169", "text": "public function submitPilot(){\n //or should create series insert the season??\n }", "title": "" }, { "docid": "6512dadb4821d9a7fbc546fefd548ac6", "score": "0.45896813", "text": "public function Season()\n {\n return $this->belongsTo(Season::class, 'season_id');\n }", "title": "" }, { "docid": "772f24f375a7771e745c96fd6d35f464", "score": "0.45824772", "text": "public static function GetListOfDates() {\n $game = new Self();\n $season = Season::GetActual();\n \n if($season instanceof Season === false) return false;\n \n $query = static::Select($game->getConnection()->raw('CONCAT(MONTH(`date`), \"/\", DAY(`date`), \"/\", YEAR(`date`)) AS `dayDate`'))\n ->Where('season_id', $season->id)\n ->GroupBy($game->getConnection()->raw('CONCAT(MONTH(`date`), \"/\", DAY(`date`), \"/\", YEAR(`date`))'))\n ->get();\n\n return $query->map(function($game){\n return strtotime($game->dayDate);\n });\n }", "title": "" }, { "docid": "2ef2fbd0d2a4ffd96f64caad0659f1f4", "score": "0.45742804", "text": "function jx_brand_sales($brandid=\"\",$s=\"\",$e=\"\")\r\n\t{\r\n\t\t$st = date('Y-m-d',strtotime($s));\r\n\t\t$en = date('Y-m-d',strtotime($e));\r\n\t\t$date_diff = date_diff_days($en,$st);\r\n\t\tif($date_diff <= 31)\r\n\t\t{\r\n\t\t\t$sql =\"select date_format(from_unixtime(ki.init),'%d-%b') as mn,ROUND(SUM((i_orgprice-(i_coup_discount+i_discount))*a.quantity),2) as ttl\r\n\t\t\t\tfrom king_orders a\r\n\t\t\t\tjoin king_transactions ki on ki.transid=a.transid\r\n\t\t\t\tjoin king_dealitems di on di.id=a.itemid\r\n\t\t\t\tjoin king_deals d on d.dealid=di.dealid\r\n\t\t\t\tjoin king_brands br on br.id=d.brandid\r\n\t\t\t\twhere br.id='\".$brandid.\"' and date_format(from_unixtime(ki.init),'%Y-%m-%d') between '\".$st.\"' and '\".$en.\"' and a.status !=3 and ki.is_pnh=1\r\n\t\t\t\tgroup by date(from_unixtime(ki.init))\";\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql =\"select date_format(from_unixtime(ki.init),'%b-%Y') as mn,ROUND(SUM((i_orgprice-(i_coup_discount+i_discount))*a.quantity),2) as ttl\r\n\t\t\t\tfrom king_orders a\r\n\t\t\t\tjoin king_transactions ki on ki.transid=a.transid\r\n\t\t\t\tjoin king_dealitems di on di.id=a.itemid\r\n\t\t\t\tjoin king_deals d on d.dealid=di.dealid\r\n\t\t\t\tjoin king_brands br on br.id=d.brandid\r\n\t\t\t\twhere br.id='\".$brandid.\"' and date_format(from_unixtime(ki.init),'%Y-%m-%d') between '\".$st.\"' and '\".$en.\"' and a.status !=3 and ki.is_pnh=1\r\n\t\t\t\tgroup by date_format(from_unixtime(ki.init),'%m-%Y')\r\n\t\t\t\torder by date(from_unixtime(ki.init))\";\r\n\t\t}\r\n\t\t $res = $this->db->query($sql);\r\n\t\t $sales_on = array();\r\n\t\t $sales_summary = array();\r\n\t\t \r\n\t\tif($res->num_rows())\r\n\t\t{\r\n\t\t\tforeach($res->result_array() as $row)\r\n\t\t\t{\r\n\t\t\t\tarray_push($sales_summary,array($row['mn'],$row['ttl']*1)); \t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$output = array();\r\n\t\t$output['date_diff'] = $date_diff;\r\n\t\t$output['summary'] = $sales_summary;\r\n\t\techo json_encode($output);\r\n\t}", "title": "" }, { "docid": "b87c4447f08269498cd037313efb21f6", "score": "0.45699286", "text": "function getTotalSeasonInputs() {\n \t$total = 0;\n \t$inputline = $this->getSeasonInputs();\n \tif($inputline->count() > 0){\n\t \tforeach ($inputline as $expense) {\n\t \t\t$total = $total + $expense->getTotalAmount();\n\t \t}\n \t}\n \treturn $total;\n }", "title": "" }, { "docid": "b4249f287b430ba92d476e9b6f183b5f", "score": "0.45664212", "text": "public function getSportAndComps($date = NULL, $sid = NULL) {\n\t\t\t$dateQuery = $this->mkDateQuery($date, 'c.close_time');\n\n //event date query\n $eventDateQuery = $this->mkDateQuery($date, 'ev.start_date', \"AND\");\n\n\t\t\t//select sports if ids set\n\t\t\t//if ($sid) { $sportQuery = ' AND s.id IN ('.$sid.') ' ; }\n\t\t\t$sportQuery = ($sid) ? ' AND s.id IN ('.$sid.') ' : '';\n\n\t\t\t//get sports and competitions\n\t\t\t$query = ' SELECT s.id AS sportID, s.name AS sportName, c.name AS name, c.created_date, c.id AS eventGroupId, sp.win_odds, sp.override_odds, sp.override_type ';\n\t\t\t$query.= ' , c.start_date, c.close_time ';\n\t\t\t$query.= ' FROM tbdb_tournament_sport AS s ';\n\t\t\t$query.= ' INNER JOIN tbdb_event_group AS c ON c.sport_id = s.id ';\n\t\t\t$query.= ' INNER JOIN tbdb_event_group_event AS ege ON ege.event_group_id = c.id';\n $query.= ' INNER JOIN tbdb_event AS ev ON ege.event_id = ev.id ';\n\t\t\t$query.= ' INNER JOIN tbdb_market AS m ON m.event_id = ege.event_id';\n\t\t\t$query.= ' INNER JOIN tbdb_selection sel ON sel.market_id = m.id';\n\t\t\t$query.= ' INNER JOIN tbdb_selection_price sp ON sel.id = sp.selection_id';\n\t\t\t$query.= $dateQuery;\n\t\t\t$query.= $sportQuery;\n $query.= $eventDateQuery;\n\t\t\t$query .= \" AND c.display_flag = '1' \";\n $query .= \" AND ev.display_flag = '1' \";\n $query .= \" AND m.display_flag = '1' \";\n $query .= \" AND sel.display_flag = '1' \";\n\t\t\t$query .= \" AND m.market_status NOT IN ('D', 'S') \";\n\t\t\t$query .= \" AND ((sp.win_odds > 1 AND sp.override_type IS NULL) OR (sp.override_odds > 1 AND sp.override_type = 'price') OR (sp.override_odds * sp.win_odds > 1 AND sp.override_type='percentage'))\";\n\t\t\t$query .= \" AND sel.selection_status_id = '1'\";\n\t\t\t$query.= \" GROUP BY sportId, eventGroupId\";\n\t\t\t$query.= ' ORDER BY sportName, name ASC ';\n\n\t\t\t//dd($query);\n\t\t\t$result = \\DB::select($query);\n\n return array_filter($result, function($value) {\n return \\App::make('TopBetta\\Services\\Betting\\SelectionService')->calculatePrice($value->win_odds, $value->override_odds, $value->override_type) > 1;\n });\n\t}", "title": "" }, { "docid": "b6f58cd89f2f219617e86214227813ea", "score": "0.45641997", "text": "function ajr_trackmate_find_dodgy_shit( $type, $start_time, $args ) { \n\n\tglobal $wpdb; \n\n\t# Variables\n\t$table_name\t\t= $args['table_name'];\n\t$horse_name\t\t= $args['horse_name'];\n\t$before_date\t= $args['before_date'];\n\t$abandoned \t\t= array();\n\t$nonrunners\t\t= array();\n\t\n\t# Get all races for horse\n\t$args_get_races\t\t= array( 'type'\t=> 'find_abandoned',\n\t\t\t\t\t\t\t'select'\t=> 'horse_name, race_date, race_time, track_name',\n\t\t\t\t\t\t\t'where'\t\t=> 'WHERE horse_name LIKE \"'.$horse_name.'%\" AND race_date < \"'.$before_date.'\"',\n\t\t\t\t\t\t\t'order_by'\t=> 'ORDER BY race_date',\n\t\t\t\t\t\t\t'order'\t\t=> 'DESC',\n\t\t\t\t\t\t\t'limit'\t\t=> '' );\n\t$query_get_races\t= ajr_trackmate_db_get_race( $table_name, '', $args_get_races);\n\t//if( current_user_can('administrator') ) : echo '<pre><strong>Races for each horse:</strong> '; print_r($query_get_races); echo '</pre>'; endif;\n\n\tforeach( $query_get_races as $key => $val ) :\n\n\t\t# Get all horses from races\n\t\t$args_get_race\t\t\t= array( 'type'\t=> 'find_abandoned2',\n\t\t\t\t\t\t\t\t\t'select'\t=> 'race_date, race_time, track_name, horse_name, place',\n\t\t\t\t\t\t\t\t\t'where'\t\t=> 'WHERE race_date = \"'.$val->race_date.'\" AND race_time = \"'.$val->race_time.'\"',\n\t\t\t\t\t\t\t\t\t'order_by'\t=> 'ORDER BY IF(placing_numerical RLIKE \"^[0-9]\", 1, 2), placing_numerical',\n\t\t\t\t\t\t\t\t\t'order'\t\t=> 'ASC',\n\t\t\t\t\t\t\t\t\t'limit'\t\t=> '' );\n\t\t$query_get_race\t\t\t= ajr_trackmate_db_get_race( $table_name, '', $args_get_race);\n\t\t//if( current_user_can('administrator') ) : echo '<pre><strong>Horses in each race:</strong> '; print_r($query_get_race); echo '</pre>'; endif;\n\n\t\t# Check if race has results\n\t\t$abandoned[$key]\t\t\t\t= ajr_trackmate_racecard_has_results( $val->race_date, $val->race_time, $val->track_name );\n\t\t$abandoned[$key]['abandoned']\t= ( $abandoned[$key]['count_results'] < '1' ? true : false );\n\t\t//if( current_user_can('administrator') ) : echo '<br>'.$val->race_date.' - '.$val->race_time.' - '.$val->track_name.' - '.$abandoned[$key]['count']; endif;\n\n\t\tif( $abandoned[$key]['abandoned'] ) :\n\t\t\t\n\t\t\t## ----------------------------------------------------------------------------------------------------------------------\n\t\t\t## RACE ABANDONED - Ignore/Skip\n\t\t\t## ----------------------------------------------------------------------------------------------------------------------\n\t\t\t\n\t\t\t# trigger\n\t\t\t$abandoned_trigger = $abandoned[$key]['track_name'].', '.$abandoned[$key]['race_date'].', '.$abandoned[$key]['race_time'].', results_'.$abandoned[$key]['count_results'].', missing_'.$abandoned[$key]['count_missing'];\n\t\t\t\n\t\t\t# check if exists\n\t\t\t$adandoned_exists = $wpdb->get_var($wpdb->prepare( 'SELECT COUNT(abandoned_trigger) FROM ajr_trackmate_abandoned WHERE abandoned_trigger = \"'.$abandoned_trigger.'\"' ));\n\t\t\tif( $adandoned_exists > 0 ) :\n\n\t\t\t\t# already exists\n\t\t\t\t//if( ajr_trackmate_authorised('username') ) : echo '<div style=\"margin-bottom:2em; text-align:center;\">Found abandoned race but it already exists. View \"Abandoned Checker\" to add correct data: <a class=\"button\" href=\"'.site_url('/ajr-abandoned-checker/').'\" target=\"_blank\">click here</a></div>'; endif;\n\n\t\t\telse :\n\t\t\t\n\t\t\t\t# add new abandoned race to database\n\t\t\t\t$data = array(\n\t\t\t\t\t'added_date'\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t'added_by'\t\t\t=> (ajr_trackmate_current_user('user_login')?:'cron'),\n\t\t\t\t\t'track_name'\t\t=> $abandoned[$key]['track_name'],\n\t\t\t\t\t'race_date'\t\t\t=> $abandoned[$key]['race_date'],\n\t\t\t\t\t'race_time'\t\t\t=> $abandoned[$key]['race_time'],\n\t\t\t\t\t'found_results'\t\t=> $abandoned[$key]['count_results'],\n\t\t\t\t\t'found_missing'\t\t=> $abandoned[$key]['count_missing'],\n\t\t\t\t\t'abandoned_trigger'\t=> $abandoned_trigger\n\t\t\t\t);\n\t\t\t\t$wpdb->insert_id = 0;\n\t\t\t\t$wpdb->insert( 'ajr_trackmate_abandoned', $data );\n\t\n\t\t\t\t# check insertion and show results to admins\n\t\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\t\techo '<pre><span style=\"color:'.( $wpdb->insert_id > 0 ? 'green;\"><strong>SUCCESS</strong>' : 'red;\"><strong>ERROR</strong>' ).' adding new Abandoned Race:</span> '; print_r($data); echo '</pre>';\n\t\t\t\t\techo ( $wpdb->insert_id > 0 ? '<div style=\"margin-bottom:2em; text-align:center;\">View \"Abandoned Checker\" to add correct data: <a class=\"button\" href=\"'.site_url('/ajr-abandoned-checker/').'\" target=\"_blank\">click here</a></div>' : '' );\n\t\t\t\tendif;\n\t\t\t\n\t\t\tendif;\n\n\t\tendif;\n\tendforeach;\n\n\t# Abandoned\n\t//if( current_user_can('administrator') ) : echo '<pre><strong>Abandoned:</strong> '; print_r($abandoned); echo '</pre>'; endif;\n\n\t# Non-runners\n\t//if( ajr_trackmate_authorised('username') ) : echo '<pre><strong>Non-Runners:</strong> '; print_r($nonrunners); echo '</pre>'; endif;\n\n\t## Load Timer\n\t//if( ajr_trackmate_authorised('username') ) : echo '<div class=\"info\"><div class=\"page-load-time\">Page load time: <span>'.number_format( microtime(true) - $args['start_time'], 5 ).' seconds.</span></div></div>'; endif;\n}", "title": "" }, { "docid": "6dc9e410f964879bbadd6abc95668756", "score": "0.4561829", "text": "protected function getSeasonList($sid)\n {\n $season = array();\n $this->schemeMapping = $sid;\n $this->fields = array(\"Title\", \"Project_Associator\");\n $this->The_Clause = new KORA_Clause(\"kid\", \"=\", array_values($this->all_season_kids));\n\n self::search();\n \n foreach ($this->comprehensive_results as $key => $value) {\n $projAssoc = isset($value[\"Project_Associator\"][0])?$value[\"Project_Associator\"][0]:\"\";\n if (isset($value['Title'])) {\n $season[$key] = array(\n \"Name\" => $value['Title'],\n \"Project Associator\" => $projAssoc\n );\n }\n\n }\n return $season;\n\n }", "title": "" }, { "docid": "fff2cb5676ae2d89d336fa8b55e0d7b4", "score": "0.4561148", "text": "public function getStageNames()\n {\n /*\n * These events have been set up to cover all current DiRT stages and tracks.\n * If for some reason they don't work, set up some new ones and replace the\n * IDs. There's no results; just a list of stages to be parsed and read.\n */\n $eventIDs = [\n 165504, # greece\n 165505, # germany\n 165506, # finland\n 165507, # monaco\n 165508, # wales\n 165509, # sweden\n\n 165513, # vvv rallycross vvv\n 165514,\n 165515,\n 165516,\n 165517,\n 165518,\n 165519,\n 165520, # ^^^ rallycross ^^^\n\n 165522, # Hillclimb (Pikes Peak)\n ];\n\n foreach($eventIDs AS $eventID) {\n $page = $this->getPage($this->getShortEventPathFromID($eventID, 0));\n $totalStages = $page->TotalStages;\n for ($stageID = 1; $stageID <= $totalStages; $stageID++) {\n $page = $this->getPage($this->getShortEventPathFromID($eventID, $stageID));\n\n DirtStageInfo::create([\n 'location_name' => $page->LocationName,\n 'stage_name' => $page->StageName,\n\n ]);\n }\n }\n }", "title": "" }, { "docid": "ef99e68c42859637bcfe7fe40e60b37f", "score": "0.45562962", "text": "public function getDaysWithoutLessons();", "title": "" }, { "docid": "f698f2c268108f93c8aeb1dbc6ca6137", "score": "0.45513615", "text": "public function getCategoriesByDaysWithoutPosition() {\n // on recupere la liste des marches proche de $numDep\n $market = new Market();\n $listMarket = $market->getMarket();\n \n if(empty($listMarket)) {\n throw new MPException('', MPException::$codeNoMarket);\n }\n \n // on recupere les jours d'affichage\n $listMarketByDate = array();\n $dateTime = new DateTime();\n $dayStart = 1;\n $dayEnd = 7;\n if($dateTime->format('H')<MPTools::LIMITE_HOUR_COMMAND_TODAY) {\n $dayStart = 0;\n $dayEnd = 6;\n }\n for($i=$dayStart;$i<$dayEnd;$i++) {\n if($i!=$dayStart) {\n $dateTime->modify('+1 day');\n }\n $dayOfWeek = $dateTime->format('w');\n if($dayOfWeek==1) {\n $dateTime->modify('+1 day');\n $dayOfWeek = $dateTime->format('w');\n }\n $stringDay = MPTools::$listJour[$dayOfWeek];\n foreach($listMarket as $marketDto) {\n if($marketDto->{(string) 'get' . $stringDay}()) {\n $listMarketByDate[$dateTime->format('Ymd')][] = $marketDto->getIdMarket();\n }\n }\n }\n \n $listSupplierByDate = array();\n $supplier = new Supplier();\n foreach($listMarketByDate as $dateFormat=>$listIdMarket) {\n $nextDate = new DateTime($dateFormat);\n $dateTime = new DateTime();\n $interval = $dateTime->diff($nextDate, true);\n $diff = $interval->format('%a');\n // on recupere tous les paysans associes aux marches\n foreach($listIdMarket as $idMarket) {\n $listSupplier = $supplier->getFromIdMarketWithDelay($idMarket, $diff);\n if(!empty($listSupplier)) {\n if(isset($listSupplierByDate[$nextDate->format('Ymd')])) {\n $suppliers = $listSupplierByDate[$nextDate->format('Ymd')];\n $listSupplier = array_merge($listSupplier, $suppliers);\n }\n $listSupplierByDate[$nextDate->format('Ymd')] = $listSupplier;\n }\n }\n }\n unset($listMarket, $listSupplier, $listMarketByDate);\n\n if(empty($listSupplierByDate)) {\n throw new MPException('', MPException::$codeNoSupplier);\n }\n // on ne garde que les 7 premiers marches\n if(count($listSupplierByDate)>7) {\n array_pop($listSupplierByDate);\n }\n \n // a partir des idSupplier on recupere, par jour, les categories de leurs produits\n $listCategoryByDate = array();\n $category = new Category();\n foreach($listSupplierByDate as $date=>$listSupplier) {\n $listCategoryForIdSupplier = array();\n foreach ($listSupplier as $supplierDto) {\n $categoryDto = $category->getCategoryFromIdSupplier($supplierDto->getIdSupplier());\n $listCategoryForIdSupplier[] = $categoryDto;\n }\n $listCategoryByDate[$date] = $this->deleteDoublon($listCategoryForIdSupplier);\n }\n unset($listSupplierByDate, $listCategoryForIdSupplier);\n \n foreach($listCategoryByDate as $date=>$listCategory) {\n $tmp = array();\n $nextDate = new DateTime($date);\n $dateTime = new DateTime();\n $interval = $dateTime->diff($nextDate, true);\n $diff = $interval->format('%a');\n $stringDay = strtolower(MPTools::$listJour[$nextDate->format(\"w\")]);\n foreach($listCategory as $categoryDto) {\n $result = $category->hasBioForThisDay($categoryDto->getIdCategory(), $stringDay, $diff);\n $categoryDto->setIsBio(!empty($result));\n $tmp[] = $categoryDto;\n }\n $listCategoryByDate[$date] = $tmp;\n }\n \n if(empty($listCategoryByDate)) {\n throw new MPException('', MPException::$codeNoCateggory);\n }\n ksort($listCategoryByDate);\n return $listCategoryByDate;\n }", "title": "" }, { "docid": "a39a8c2e6844dbab4fc607e976d1fa84", "score": "0.45502248", "text": "public function dates()\n {\n $oldest_record_dates[] = Completion::min('start_of_week');\n $oldest_record_dates[] = TrackEvent::min('start_of_week');\n\n $start_date = new DateTime(min($oldest_record_dates), new DateTimeZone('America/Phoenix'));\n $end_date = new DateTime('last Sunday', new DateTimeZone('America/Phoenix'));\n\n $sundays = Helpers::get_sundays_between($start_date, $end_date);\n\n return Response::json($sundays);\n }", "title": "" }, { "docid": "fe139c7f0e6faf5a1ad4c61c270b06d1", "score": "0.454499", "text": "public function upcoming_seminars_trainings()\n\t{\n\t\t$employee_id = $this->session->userdata('employee_id');\n\t\t$date = date('Y-m-d');\n\t\t$company_id = $this->session->userdata('company_id');\n\t\t$settings = $this->get_seminar_training_settings($company_id);\n\t\tif(empty($settings) || $settings==0)\n\t\t{\n \t$this->db->where('datefrom <=',$date);\n \t$this->db->where('dateto >=',$date);\n\t\t}\n\t\t$this->db->where('employee_info_id',$employee_id);\n\t\t$query = $this->db->get('emp_trainings_seminars');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "1818e2effda740066e05203688e06efa", "score": "0.45410874", "text": "public function moveSeasons($fallYear){\n\t\t$sql = \"INSERT INTO season(fallYear) VALUES(:fallYear)\"; // sql stamement\n\t\t\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bindValue(':fallYear', $fallYear);\t\t// bind to fallYear\n\t\t$afNo = $stmt->execute();\n\t}", "title": "" }, { "docid": "48db08fd0889d682c1622d24e37b4f5f", "score": "0.45407566", "text": "function sort_array_by_date($data)\n{\n $movie_array = $data['results'];\n usort($movie_array, 'date_compare');\n return (array(\n 'count' => $data['count'],\n 'results' => $movie_array\n ));\n}", "title": "" } ]
d2432c410103da84d4c84c94a55eb991
Index // page d'accueil
[ { "docid": "a4f23d62ca4956056525b41c0fe00846", "score": "0.0", "text": "public function index()\t{\n\t\t$data['pictures'] = $this->pictures->as_object()->get_all(); \n\t $this->template->view('galerie/index',$data);\n\t}", "title": "" } ]
[ { "docid": "52f9494c85bc6ebf20d1fa9798c9993a", "score": "0.7431008", "text": "public function index()\n {\n $titreDeLaPage = \"Accueil Framework\";\n\n $message = \"Bienvenue dans la documentation\";\n $messageChangeable = \"Changez moi grace au formulaire\";\n if (!empty($_POST['messageChangeable'])) {\n $messageChangeable = $_POST['messageChangeable'];\n }\n\n\n // render un template\n //render() sert a transmettre des informations d 'un page a une autre\n //compact() cree un tableau associatif a paritir des variable et de leurs valeurs.\n \\Rendering::render('home/home', compact('messageChangeable', 'titreDeLaPage', 'message'));\n }", "title": "" }, { "docid": "3dfcaf439aee5eee524172e3095411d9", "score": "0.73949575", "text": "public function indexAction(){\n $this->render('acceuil');\n // self::$_render = \"Votre compte a ete cree .\" .PHP_EOL;\n }", "title": "" }, { "docid": "25ab6e4643acf93d6ca25704aea2b44e", "score": "0.73693764", "text": "public function index()\n\t{\n\t\t$indexData['title'] = 'Accueil';\n\t\tloadViews(\n\t\t\t['templates/client/header', 'client/home/index', 'templates/client/footer'],\n\t\t\t[$indexData, NULL, NULL]\n\t\t);\n\t}", "title": "" }, { "docid": "d827ceb396ff9f5be676602fcdc4be7f", "score": "0.7364221", "text": "public function indexAction() {\r\n\t\t# nothing to do, just display the page with link inside\r\n\t}", "title": "" }, { "docid": "422da9e1517beedeab2992d7eb2b170d", "score": "0.73560554", "text": "function index() {\n //Vista que se carga\n }", "title": "" }, { "docid": "e5e0795a397da05eb2322319cbe27464", "score": "0.73391825", "text": "public function action_index(){\r\n\t\t$users = array();\r\n\t\t$results = \\core\\sqlOrm::getByField(self::$connect, self::$name, self::$page, self::$routes);\r\n\t\tif($results){\r\n\t\t\t$users = $results;\r\n\t\t}\r\n\t\t$this->showView(self::$name.'/index.html', \"Page \".self::$name, $users);\r\n\t}", "title": "" }, { "docid": "483bb681470fbfcc160dfeab9e24d5a4", "score": "0.72758305", "text": "public function index(){\n\t\t\t$posts = $this->Post->last(2);\n\n\t\t\t$title = $this->pageTitle('Accueil');\n\n\t\t\t$this->render('home.index', compact('posts', 'title'));\n\t\t}", "title": "" }, { "docid": "8aa44af4b66b0fe34a70fdf8ec0f232b", "score": "0.7273887", "text": "public function index()\n {\n return view('Admin/accueil' );\n }", "title": "" }, { "docid": "199cc73791e163bf78c592360e83cddf", "score": "0.71923006", "text": "public function indexAction()\n {\n Logger::getInstance()->pm_log(\"indexAction ===== == ===== == ===== == ===== ==\");\n return $this->redirect(array('action'=>'displayPageRO', 'params'=>array('pageId'=>1)));\n }", "title": "" }, { "docid": "a81960e82d16e65502b64546ea652baa", "score": "0.7175631", "text": "public function action_index()\n\t{\n\t\t// Applauds for us :P\n\t\t$this->action_applaud();\n\t}", "title": "" }, { "docid": "51db98b514ef6e77cd63bb79a57b4b2a", "score": "0.7144568", "text": "public function index_action()\n {\n\n\n $pageTitle = 'index';\n $indexLinkStyle = 'current_page';\n\n $backgroundColor = $this->getBackgroundColor();\n $cssStyleRule = $this->buildStyleRule();\n\n $isLoggedInAsAdmin = $this->isAdminUser();\n\n $isLoggedIn = $this->is_logged_in_from_session();\n $user_name = $this->username_from_session();\n\n require_once __DIR__ . '/../template/index.php';\n }", "title": "" }, { "docid": "68cc34a992c549d8ad1418757069b23a", "score": "0.7106923", "text": "public function index(){\n\n $data['title'] = 'Home - '.project_name;\n $data['url'] = $this->uri->uri_string();\n $this->CekProfil();\n $this->template->display('content/index',$data);\n \n /*================ Fungsi untuk memanggil halaman Index ================*/\n }", "title": "" }, { "docid": "f472353f07c1abf5bc79525684c169ab", "score": "0.7102241", "text": "private function index_action() {\n \n if($this->getParam('page') != false)\n { \n $page = ($this->getParam('page') * $this->qtd) - $this->qtd;\n }\n //Solicita os dados\n $dados_novidades = $this->Delegator('ConcreteNovidades', 'SelectNovidades', array('page' => $page, 'qtd' => $this->qtd));\n\n //Coloca o Helper na View\n $this->View()->assign('Helper', HelperFactory::getInstance());\n\n //Leva os dados para a view\n $this->View()->assign('dados_novidades', $dados_novidades);\n \n if($this->getParam('page') != false){\n $this->htmlPaginacao($this->getParam('page'));\n \n }else{\n $this->htmlPaginacao(1);\n \n }\n\n //Exibe a view\n $this->View()->display('index.php');\n }", "title": "" }, { "docid": "5458c4beb1654010b4f2af15bf290436", "score": "0.70763606", "text": "function accueil()\n {\n $manager = $this->modelManager;\n $posts = $manager->getPublishedList();\n \\models\\Renderer::render(\"accueil\", compact('posts'));\n }", "title": "" }, { "docid": "9c23608bd35814f9569dd4252742cf37", "score": "0.70759326", "text": "function view_Index()\n\t{\n\t\t@session_start();\n $menu_activo = \"mantenimiento_persona_index\";\n\t\t$business_Persona = new business_Persona();\n\t\t$dtListarPersonas = $business_Persona -> fncBusinessListarPersonas();\n\t\t$dtListarPersonas = utf8_converter($dtListarPersonas);\n\t\tinclude('../views/includes/header.php');\n\t\tinclude('../views/mod_persona/index.php');\n\t\tinclude('../views/includes/footer.php');\n\t}", "title": "" }, { "docid": "810ae31db03c3fe61566811a14e824fd", "score": "0.70699584", "text": "public function index()\n {\n $page = 1;\n $billets = $this->billet->getBilletsTronquesVisible($page, 200);\n $nbPages = $this->billet->getNombrePages();\n if (isset($_COOKIE['no_splash'])) {\n $this->genererVue(array('billets' => $billets,\n 'page' => $page,\n 'nbPages' => $nbPages,\n ));\n } else {\n $this->rediriger('accueil', 'splash');\n }\n }", "title": "" }, { "docid": "d77ecb52146987c4c8d54ad4b3a1918c", "score": "0.70531785", "text": "public function index(){\n $this->vista(\"paginas/inicio_V\");\n }", "title": "" }, { "docid": "9592d6e42071b57fd066e0218fdf235b", "score": "0.704648", "text": "function index(){\n\t\t\t$datos = array(\n\t\t\t\t'titulo' => 'Mi cmc | '.$this->pagina->titulo,\n\t\t\t\t'clase' => __CLASS__,\n\t\t\t\t'pagina' => $this->pagina,\n\t\t\t\t'menu' => $this->menu\n\n\t\t\t);\n\t\t\t//cargar vistas\n\t\t\tcargar_vista('publico/vista_cabecera',$datos);\n\t\t\tcargar_vista('publico/vista_pagina',$datos);\n\t\t}", "title": "" }, { "docid": "73c51ae4630dd84eb2b625db29c28c15", "score": "0.7033012", "text": "public function indexaccount()\n\t{\n\t}", "title": "" }, { "docid": "808e9c2ff8865cd58d3d4f8aa97e5c15", "score": "0.6999928", "text": "public function actionIndex()\n\t{\n $this->assign(\"name\", \"leiyi\");\n\n $this->display('home/page/index.tpl');\n\t}", "title": "" }, { "docid": "8fbb8c5f1fd5448f894508af121cf211", "score": "0.6991574", "text": "public function index() {\r\n $citas = Cita::all();//Guardamos todos las citas\r\n require_once('views/citas/index.php');\r\n }", "title": "" }, { "docid": "588449399e473411a1078d1bcafb1b9e", "score": "0.6969452", "text": "public function action_index();", "title": "" }, { "docid": "5c61262fde912efaeb71f49be8fa4344", "score": "0.69666594", "text": "public function index()\n\t{\n\t\t$this->Model_angkatan->index();\n\t}", "title": "" }, { "docid": "18983a8c4b6e47ee08a4f67d75f15ee3", "score": "0.6962098", "text": "public static function action_index()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0b19114c7dc054251860c6261668fe18", "score": "0.6942709", "text": "private function index_action() {\n //Exibe a tela de login\n $this->View()->display('index.php');\n }", "title": "" }, { "docid": "865c03fd046fc2ef4787d9cdffc935f3", "score": "0.69363326", "text": "public function indexAction()\r\n {\r\n $this->view->setTitrePage(\"Transports scolaires\");\r\n $this->view->siteOuvert = $this->isSiteOuvert();\r\n $this->view->etatInscriptions = $this->getEtatInscriptions();\r\n $this->view->dateOuvertureInscriptions = $this->getDateOuvertureInscriptions();\r\n $this->view->anneeScolaire = $this->getAnneeScolaire();\r\n }", "title": "" }, { "docid": "8c87834daf2b34b833a470eb25005f50", "score": "0.6927871", "text": "public function index() {\n\n\t\t$this->redirect(array(\n\t\t\t'controller' => 'Pages', 'action' => 'view'\n\t\t));\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "bcab103b7f1bb6647bc08c4249187334", "score": "0.6915005", "text": "public function action_index(){\n\n\n\t}", "title": "" }, { "docid": "42bac6c356a8eabf6b9774c27e98a000", "score": "0.6914721", "text": "public function indexAction()\n {\n \t$em = $this->getDoctrine()->getManager();\n \t$actusRepository = $em->getRepository('AppBundle:Actu');\n \t$actus = $actusRepository->findBy(array(), array('date' => 'desc'), 2);\n \t$img = $this->container->getParameter('img_dir') . '/';\n\n return $this->render('Default/accueil.html.twig', array('actus' => $actus, 'imgDir' => $img));\n }", "title": "" }, { "docid": "1f3e444a683731a1062e1850b5e36580", "score": "0.6913362", "text": "function index()\n\t {\n\t }", "title": "" }, { "docid": "672ca09944fc48ec2d66037225e215c2", "score": "0.6910513", "text": "public function index()\n {\n return view('admin/admin_accueil');\n }", "title": "" }, { "docid": "b0850d38653218d188bebf56ce9d5f71", "score": "0.69043595", "text": "public function index()\n {\n $this->authorize('contratos');\n $contratos = Contrato::where(\"contratos.status\",1)\n ->latest()\n ->paginate(5000);\n\n \n return view('admin.contrato.index',compact('contratos'))->with('i', (request()->input('page', 1) -1) * 12);\n \n }", "title": "" }, { "docid": "b0f1505109b055898126d06619352b9c", "score": "0.69014406", "text": "public function index(){\n autoriza(2);\n $this->load->template_admin(\"curso/cadastro_curso.php\");\n }", "title": "" }, { "docid": "9b1f7a84aa3db7ae3144ab73977f8be7", "score": "0.6901074", "text": "public function indexAction()\n {\n // despacha para buscarpronac.phtml\n $this->_forward(\"buscardocumentos\");\n }", "title": "" }, { "docid": "c5cbfbb2745db2fd409565b59040f443", "score": "0.6879932", "text": "public function index()\n\t{\n\t\tdie('halaman ini terproteksi');\n\t}", "title": "" }, { "docid": "4f5b14896dfb50b3f120b42f1be71766", "score": "0.6877429", "text": "public function index()\n {\n $aModule = ['administration' => '', 'administration_parking' => '', 'supervision' => '', 'calendrier' => ''];\n // Parcours des modules\n foreach ($aModule as $key => &$ligne) {\n if (!Auth::user()->isModuleAccessibleByUrl($key)) {\n $ligne = 'hide';\n }\n }\n return View::make('pages.accueil')->with('url', $aModule);\n }", "title": "" }, { "docid": "2348851661296d9e0148ab889ca79385", "score": "0.6870601", "text": "public function index()\n\t{\n\t\t$this->login_page();\n\t}", "title": "" }, { "docid": "261c9291f9a82aee51721d3cd2fcafc6", "score": "0.6870393", "text": "public function indexAction();", "title": "" }, { "docid": "ea50f57a68cef078a2a8863968999f76", "score": "0.6867347", "text": "function indexAction() {\n $this->listarAction();\n }", "title": "" }, { "docid": "8a1a2af5bb2203b4914f5dffd06db7b7", "score": "0.6864639", "text": "public function index()\n {\n if (!Auth::user()->hasPermissionTo('ModuloSecretaria'))\n abort(403);\n\n\n\n $citas = Cita::pendiente()->paginate(10);\n return view ('cite.index',['citas' => $citas]);\n\n }", "title": "" }, { "docid": "28f53e65aaba3785f9965146cccfee50", "score": "0.68639696", "text": "public function indexAction() {\n \n }", "title": "" }, { "docid": "ddd3b6f4b18104aa329a42ae29f94de0", "score": "0.686337", "text": "public function index(){ \n $this->getView('pages/usuarios/iniciarSesion', [\n ['tittle' => 'Iniciar Sesion',\n 'currentMenu' => '6']\n ]);\n }", "title": "" }, { "docid": "6f7d3e26c98210916d6d00073ba6c513", "score": "0.68608075", "text": "public function index() {\n\t // require_once('views/pages/index.php');\n }", "title": "" }, { "docid": "2029898752bf033c0c7b2139121a6bbd", "score": "0.6860209", "text": "function index()\n {\n $data['accounts'] = $this->Account_model->get_all_accounts();\n $this->template->loadContent(\"account/index.php\", array(\"accounts\" => $data['accounts']));\n }", "title": "" }, { "docid": "31be54410c7dcfe064af39b58c15a7c4", "score": "0.6855476", "text": "public function actionIndex()\n\t{\n\n\t}", "title": "" }, { "docid": "2e217a436ffd6e31b17d9bcea07a035a", "score": "0.68519974", "text": "public function index()\n {\n $this->views->setPageTitle(\"Đăng nhập\");\n $this->views->render(\"admin/login/index\");\n }", "title": "" }, { "docid": "61cfe677851989aac1440da9de020ea6", "score": "0.6850664", "text": "public function indexAction() \n {\n\t\t//$this->view->formIndexClient = $formIndexClient;\n\t\t\n\t\t//$formIndexAuthor = new Form_Index_author();\n\t\t//$this->view->formIndexAuthor = $formIndexAuthor;\n\t\t\n }", "title": "" }, { "docid": "05e3cfdc9b34170a22899545cc43fc96", "score": "0.6849758", "text": "public function indexAction() {\n\t\t\n\t}", "title": "" }, { "docid": "1ce45498fdabbbf919a0da936c68e908", "score": "0.6845699", "text": "public function actionIndex()\n\t{\n\t}", "title": "" }, { "docid": "1ce45498fdabbbf919a0da936c68e908", "score": "0.6845699", "text": "public function actionIndex()\n\t{\n\t}", "title": "" }, { "docid": "90fe885179a885168064cbae8717df51", "score": "0.68325436", "text": "public function index() {\n\t $this->Utilidades->validar($this->Session->get('admin'.$this->Config->get('app')));\n\t $data['breadCrumb'] = $this->BreadCrumb->listarBreadCrumb($_REQUEST);\n\t $paginador= $this->Utilidades->paginador($this->Staff->listarStaff(),5);\n\t $data['paginador'] = $paginador;\n\t if($this->Session->get('mensaje')) {\n\t\t$data['mensaje'] = $this->Session->get('mensaje');\n\t\t$this->Session->del('mensaje');\n\t }\n\t $this->Vistas->show('index.html',$data);\n\t}", "title": "" }, { "docid": "e0d3f48d0180efa8df54766ae8acd0a0", "score": "0.68309206", "text": "public function actionIndex()\n {\n\t\t$this->view->params['page_class'] = '';\n\t\t\n return $this->render('/index', [\n \n ]);\n }", "title": "" }, { "docid": "29057bd0964461c0fb5286076aa5bf99", "score": "0.68294996", "text": "protected function index(){}", "title": "" }, { "docid": "6248acf844476a0c5bb7a109e099b1ce", "score": "0.68175036", "text": "function index() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b18d836c0379d71ef7c12e363045dc74", "score": "0.68036497", "text": "function index()\n {\n $this->listado();\n }", "title": "" }, { "docid": "575b0bdf76c180d7e30a232ce690faaf", "score": "0.67970747", "text": "public function index()\n\t{\n\t\t$this->_view->titulo = 'Portada';\n\n\t\t//para llamar a la vista\n $this->_view->renderizar('index','inicio');\n\t}", "title": "" }, { "docid": "d143ca8b3ca5737e15839a584e1b435e", "score": "0.6795122", "text": "abstract protected function index();", "title": "" }, { "docid": "54c33acfd74131ebeab860df3701006e", "score": "0.6792075", "text": "public function indexAction()\n {\n\n $this->view->titulo=\"** Bienvenido **\"; \n }", "title": "" }, { "docid": "e8d25d0d417fb8f7ee19438e46183e09", "score": "0.6790432", "text": "public function index()\n {\n $this->global['pageTitle'] = 'Dashboard';\n \n\t\tif($this->isAdmin() == true)\n {\n \n\t\t\tredirect('Account_Pel/AccpelList/');\n \n\t\t\n\t\t}\n else\n {\n redirect('/Main');\n }\n }", "title": "" }, { "docid": "c5d79287acf8773383697a57e683df8b", "score": "0.6788837", "text": "function action_index()\n {\n $data = $this->model->get_data();\n\n $param['pages'] = $this->model->get_page_count();\n\n if (isset($_POST['add']))\n $param['add_result'] = $this->model->add_task();\n\n if (isset($_POST['signin']))\n $param['signin_result'] = $this->model->authorization();\n\n if (isset($_POST['signout'])) {\n setcookie('login', '', time()-3600);\n setcookie('password', '', time()-3600);\n header('Refresh:1');\n }\n\n $login = isset($_COOKIE['login']) ? $_COOKIE['login'] : '';\n $password = isset($_COOKIE['password']) ? $_COOKIE['password'] : '';\n\n $admin = false;\n if ((strcasecmp($login, Config::get('admin_login')) == 0) && (strcasecmp($password, md5(Config::get('admin_password'))) == 0))\n $admin = true;\n\n if (isset($_POST['checked'])) {\n if ($admin)\n $this->model->checked();\n }\n\n if (isset($_POST['save'])) {\n if ($admin)\n $param['save_result'] = $this->model->save();\n else\n $param['add_result'] = 'Вы не вошли в систему!';\n }\n\n if ($admin)\n $this->view->generate('admin_view.php', 'template_view.php', $data, $param);\n else\n $this->view->generate('tasks_view.php', 'template_view.php', $data, $param);\n\n $this->model->close_connect();\n }", "title": "" }, { "docid": "66ee4a5749d4d0d31d33cbaa0bf15129", "score": "0.6782391", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $acces = $em->getRepository('AppBundle:acces')->findAll();\n\n return $this->render('acces/index.html.twig', array(\n 'acces' => $acces,\n ));\n }", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.678054", "text": "abstract function index();", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.678054", "text": "abstract function index();", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.678054", "text": "abstract function index();", "title": "" }, { "docid": "008544d0903014ccb53083e620547e91", "score": "0.6780246", "text": "public function indexAction()\n {\n $this->_forward('mod-facturare');\n }", "title": "" }, { "docid": "8305caf28ad81d324bc2cc725438fe12", "score": "0.67760295", "text": "public function index()\n {\n $this->global['pageTitle'] = 'PUSATDATA : CEK DOKUMENTASI';\n\n $this->loadViews(\"cek_dokumentasi\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "a29b0b8c6bf49227fe52c0d96838d13f", "score": "0.67753655", "text": "public function indexAction() {\r\n\t}", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.6770525", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.6770525", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.6770525", "text": "abstract public function index();", "title": "" }, { "docid": "6385af9d4b1e3d31d56296c20137a2ab", "score": "0.67689246", "text": "public function index()\n\t{\n\t\tif(!in_array('viewAccount', $this->permission)) {\n\t\t\tredirect('dashboard', 'refresh');\n\t\t}\n\t\t$this->render_template('account/index', $this->data);\t\n\t}", "title": "" }, { "docid": "14192226a6dc78c581f22c6c3c90cfb9", "score": "0.67644644", "text": "public function index()\r\n\t{\r\n\t\t$data[\"menu_activo\"] = \"index\";\r\n\t\t$data[\"total\"] = $this->carrito->get_total();\r\n\t\t$data[\"NumeroItems\"] = $this->carrito->get_numero_items();\r\n\t\t$data[\"content\"] = \"login\";\r\n\t\t$this->load->view(\"template\", $data);\r\n\t}", "title": "" }, { "docid": "70a1eb16f14276a68824fa264b4e8da3", "score": "0.6763596", "text": "public function Index()\n {\n $act = '';\n if ($this->mIsAdmin)\n {\n uni_redirect(PATH_ROOT_ADM);\n }\n uni_redirect(PATH_ROOT);\n }", "title": "" }, { "docid": "53aa1577859af26309767f7c4f1db924", "score": "0.6760888", "text": "public function index() {\n\t\t$this->loadMenu();\n\t\t\n\t\tif(!$this->data['accessView'])\n\t\t\tredirect($this->data['base_url_index'].'login', 'location', 301);\n\t\t\n\t\t$this->data['account']\t\t\t= $this->model_account->getAccountData();\n\t\t$this->data['pageBreadCumb'] \t= \"\";\n\t\t$this->data['pageTemplate']\t\t= \"user-management/view_account\";\n\t\t$this->load->view('layout/main', $this->data);\n\t}", "title": "" }, { "docid": "29af58e430f500f4ee1d7a55b7ccd67a", "score": "0.6760182", "text": "public function index()\n\t{\n\t\t$data['titre'] = \"Création compte\"; // nom de la page\n\n\t\t$this->load->helper('url'); // base url\n\n\t\t$this->load->view('header', $data); // menu\n\t\t$this->load->view('creation_compte_page'); // accueil\n\t\t$this->load->view('footer'); // bas de page\n\t}", "title": "" }, { "docid": "2560705ab12c978d9e036b401dbc55b6", "score": "0.6759719", "text": "public function actionIndex() {\n }", "title": "" }, { "docid": "637fc9f618c3202910abfa8fe9a2988a", "score": "0.6756665", "text": "public function index()\n {\n return view('page_principale.index');\n }", "title": "" }, { "docid": "9a327e15271e632732fb5065526f3474", "score": "0.67555755", "text": "public function index()\n\t{\n\t\t$this->adminpage('Administrator/beranda');\t\n\t}", "title": "" }, { "docid": "67c81bd25049a14d73ea077fc58de98c", "score": "0.67547864", "text": "public function page()\n {\n $this->index();\n }", "title": "" }, { "docid": "72bf7dca66318df07bee25227d0a4105", "score": "0.6753289", "text": "public function indexAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n\n $session = $this->getRequest()->getSession();\n $session->set('seccion',0);\n\n return $this->render('AdminBundle:Default:index.html.twig');\n }", "title": "" }, { "docid": "46dd93346d97455b1980e17c9cbe7e0c", "score": "0.6752808", "text": "public function actionIndex()\n {\n return $this->render('Pruebas');\n }", "title": "" }, { "docid": "6b2de2e0e149c49c67359062dab01de4", "score": "0.6750701", "text": "public function indexAction()\r\n\t{\r\n\t}", "title": "" }, { "docid": "9cc32aafb5d8919383556930d4bfc5b4", "score": "0.6742593", "text": "public function index() {\t\n\n\t\t$this->set(\"tabs\", $this->Tabs);\t\t\n\t\t$this->set(\"navigationlinks\", $this->NavigationLinks);\t\n\t\t$this->set(\"notes\", $this->UtilNotes->GetNotes());\n }", "title": "" }, { "docid": "01ef2d95502588c2e9efef3bce1d7fee", "score": "0.6738508", "text": "public function action_index() {\n }", "title": "" }, { "docid": "735afe73bc70bac79829dd5cfab9952d", "score": "0.6738337", "text": "public function index($page = '1'){\n $this->id($page);\n }", "title": "" }, { "docid": "382b58bb33871e8602486b53b5df01d5", "score": "0.67343116", "text": "public function indexAction()\n\t{\n\t\t$this->loadLayout();\n\t\t$this->_title('Fedobe');\n\t\t$this->_title($this->__('Landing Pages by Fedobe'));\n\t\t$this->_setActiveMenu('landingpage');\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "5d710deae83a9543bf6399f5e0dc8142", "score": "0.6732016", "text": "public function index()\n {\n\t\t\t$this->View->render('about/index', array(\n 'user_name' => Session::get('user_name'),\n 'user_email' => Session::get('user_email'),\n 'user_gravatar_image_url' => Session::get('user_gravatar_image_url'),\n 'user_avatar_file' => Session::get('user_avatar_file'),\n 'user_account_type' => Session::get('user_account_type'),\n\t\t\t'page' => 'about',\n ));\n }", "title": "" }, { "docid": "095431d6f86e5059ea9bfd705715edaf", "score": "0.6731324", "text": "public function view()\n {\n\t\t$this->__indexPage();\n }", "title": "" }, { "docid": "4b159677b02cc6255f45438ae8bf9a2b", "score": "0.67309225", "text": "public function index() {\n\t\t$this->getTemplateTop();\n\t\techo \"INDEX PAGE FOR PLACES\";\r\n\t\t$this->getTemplateBottom();\n\t}", "title": "" }, { "docid": "18ad0f828e2811140751eb89f65e7f47", "score": "0.6730075", "text": "public function index() {\n\n\t\t$data['title'] = ucfirst(\"Connexion - FOKUZA\");\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member/member_identification');\n\t\t$this->load->view('templates/footer');\n\n\t}", "title": "" }, { "docid": "22b3c0f33e1bf23fa049832d893f197a", "score": "0.6726554", "text": "public function indexAction() {\n\n\n\n\n return $this->render('AdministrateurBundle:Default:index.html.twig', array());\n }", "title": "" }, { "docid": "e81d4224eccc8daafa3761c87a3d205a", "score": "0.6724881", "text": "public function index()\r\n {\r\n $this->pageData['title'] = \"About user\";\r\n $this->view->render($this->nameTemplate('index'), $this->pageData);\r\n }", "title": "" }, { "docid": "3fdcb3f92e3019078b17ffbb6c4b72be", "score": "0.6723248", "text": "abstract public function indexAction();", "title": "" }, { "docid": "3fdcb3f92e3019078b17ffbb6c4b72be", "score": "0.6723248", "text": "abstract public function indexAction();", "title": "" }, { "docid": "3fdcb3f92e3019078b17ffbb6c4b72be", "score": "0.6723248", "text": "abstract public function indexAction();", "title": "" }, { "docid": "04851751908c94ecd01f2d1cc6b9f1ac", "score": "0.67192364", "text": "public function index()\n {\n $this->global['pageTitle'] = 'Dashboard';\n \n\t\tif($this->isAdmin() == true)\n {\n \n\t\t\tredirect('Mitra/mitraList/');\n \n\t\t\n\t\t}\n else\n {\n redirect('/Main');\n }\n }", "title": "" }, { "docid": "4422b854b936897f47e5b2739cbbabfa", "score": "0.67166954", "text": "public function index(){\n\t\t/* Obtiene los datos necesarios para el correcto funcionamiento de las vistas. */\n\t\t$this->title_header = '¿Quiénes somos?';\n\t\t$this->header_folder = 'compara';\n\t\t$this->breadcrumb = array('#'=>'¿Quiénes somos?');\n\t\t$this->subtitle_header = '\n\t\t\tMejoraTuEscuela.org es una plataforma que busca <br />\n\t\t\tpromover la participación ciudadana para transformar <br />\n\t\t\tla educación en México.';\n\t\t$this->include_theme('index','index');\n\t}", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.67146087", "text": "public function index(){}", "title": "" }, { "docid": "ed9ed4aa31cbe47b7d0ff1800ccd131d", "score": "0.6712609", "text": "public function index() {\n $this->tplVars = $this->tplVars + [\n 'page_title' => $this->pageTitle\n ];\n \n //liste des données\n $this->tplVars = $this->tplVars + [\n 'lists' => $this->model->findAll()\n ];\n \n \n foreach($this->tplVars['lists'] as $list){\n \n if($list[\"Admin\"] == null){\n \n $list[\"Admin\"] = \"Non\";\n \n }else($list[\"Admin\"] = \"Oui\");\n }\n \n \n \n //afficher la liste \n \\Renderer::showAdmin(strtolower($this->pageCrud).\"/display\",$this->tplVars);\n\n \n }", "title": "" }, { "docid": "e8ba83130b2da09ed4b5d580d1d39557", "score": "0.67095417", "text": "public function index() {\n\t\t\n\n\t\t}", "title": "" }, { "docid": "38c551891a2510dc998c42717a5eae06", "score": "0.6703153", "text": "public function actionIndex()\n {\n }", "title": "" } ]
50085b520cc23b97595bd9fb23a68c6e
Add the basic purge filters
[ { "docid": "88d8ba45ab9dec7566b3fb305dd48a1f", "score": "0.8091744", "text": "protected function addBasicPurgeFilters() {\n if ($this->purgeFiltersInitialized) {\n return;\n }\n\n $this->purgeFilters[] = function ($attributeKey) {\n // disallow password confirmation fields\n if (Str::endsWith($attributeKey, '_confirmation')) {\n return false;\n }\n\n // \"_method\" is used by Illuminate\\Routing\\Router to simulate custom HTTP verbs\n if (strcmp($attributeKey, '_method') === 0) {\n return false;\n }\n\n // \"_token\" is used by Illuminate\\Html\\FormBuilder to add CSRF protection\n if (strcmp($attributeKey, '_token') === 0) {\n return false;\n }\n\n return true;\n };\n\n $this->purgeFiltersInitialized = true;\n }", "title": "" } ]
[ { "docid": "fbef111b5db2e5645e6dc0b48dac1788", "score": "0.6121844", "text": "public function hard_remove_filters()\r\n {\r\n $remove_posts_clauses = false;\r\n $remove_posts_where = false;\r\n\r\n if(isset($GLOBALS['wp_filter']['posts_clauses']))\r\n {\r\n $remove_posts_clauses = true;\r\n }\r\n\r\n if(isset($GLOBALS['wp_filter']['posts_where']))\r\n {\r\n $remove_posts_where = true;\r\n }\r\n\r\n //\r\n if(($remove_posts_clauses)||($remove_posts_where))\r\n {\r\n $this->WP_FILTER = $GLOBALS['wp_filter'];\r\n }\r\n\r\n if($remove_posts_clauses)\r\n {\r\n\r\n unset($GLOBALS['wp_filter']['posts_clauses']);\r\n }\r\n\r\n if($remove_posts_where)\r\n {\r\n\r\n unset($GLOBALS['wp_filter']['posts_where']);\r\n }\r\n }", "title": "" }, { "docid": "cb19c7914d01e736a9cf578834220db8", "score": "0.60627705", "text": "function remove_filters() {\r\n\t\t\t//remove any filters added b WP media Folder plugin to get the all attachments\r\n\t\t\tif ( class_exists( 'Wp_Media_Folder' ) ) {\r\n\t\t\t\tglobal $wp_media_folder;\r\n\t\t\t\tif ( is_object( $wp_media_folder ) ) {\r\n\t\t\t\t\tremove_filter( 'pre_get_posts', array( $wp_media_folder, 'wpmf_pre_get_posts1' ) );\r\n\t\t\t\t\tremove_filter( 'pre_get_posts', array( $wp_media_folder, 'wpmf_pre_get_posts' ), 0, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tglobal $wpml_query_filter;\r\n\t\t\t//If WPML is not installed, return\r\n\t\t\tif ( ! is_object( $wpml_query_filter ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Remove language filter and let all the images be smushed at once\r\n\t\t\tif ( has_filter( 'posts_join', array( $wpml_query_filter, 'posts_join_filter' ) ) ) {\r\n\t\t\t\tremove_filter( 'posts_join', array( $wpml_query_filter, 'posts_join_filter' ), 10, 2 );\r\n\t\t\t\tremove_filter( 'posts_where', array( $wpml_query_filter, 'posts_where_filter' ), 10, 2 );\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "ae0027ad7575d9059c3ed4dd8b948691", "score": "0.6011638", "text": "function LogsPurgeAction() {\n\t\t;\n\t}", "title": "" }, { "docid": "99dd5f27fe0da51b36415d720b0ed660", "score": "0.5990971", "text": "public function removeDefaultFilters();", "title": "" }, { "docid": "d3efc656d9df70190569c0a8dfb1daf4", "score": "0.5970495", "text": "private function setup_filters() {\n\t\t\n\t}", "title": "" }, { "docid": "bbd32817e08901fe4673025a1e06c05f", "score": "0.59279054", "text": "public function delete() {\n parent::delete();\n foreach ($this->filters as $f) {\n $f->delete();\n }\n }", "title": "" }, { "docid": "f72b91a04471108526850b066b4f115e", "score": "0.5891974", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('cars.component_block_addfilters_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "570e2b527e4e86f410cedb52d3044187", "score": "0.5869932", "text": "function clearFilters()\t{\n\t\t$this->clearPreEncryptFilter();\n\t\t$this->clearPostDecryptFilter();\n\t}", "title": "" }, { "docid": "0d2467e2c22e32b9d42842daa6ff72d3", "score": "0.57978356", "text": "public function remove_option_filters() {\n\t\tparent::remove_option_filters();\n\n\t\tlist( $hookname, $callback, $priority ) = $this->get_verify_features_option_filter_hook();\n\n\t\tremove_filter( $hookname, $callback, $priority );\n\t}", "title": "" }, { "docid": "a414ea839d3540db973c78a789157b2a", "score": "0.5747411", "text": "public function removeAllFilters()\n {\n $this->filters = array();\n }", "title": "" }, { "docid": "43ade2299697fd051036f3497faea379", "score": "0.5746056", "text": "protected function setupFilters()\n {\n //\n }", "title": "" }, { "docid": "15ae87d1ec5c4ff08c6d5e74924c6391", "score": "0.57357234", "text": "public function register_filters() {\r\n\r\n\t\t}", "title": "" }, { "docid": "4604a52b401b8a37190aaabe9864c11a", "score": "0.5731063", "text": "abstract function purge($all);", "title": "" }, { "docid": "a0077c0202c770ee81e855b786c47dd7", "score": "0.57285565", "text": "function purgeAll();", "title": "" }, { "docid": "04b2bedd456bbc09d9b725eca6d20d8c", "score": "0.57264745", "text": "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + delete',\n ), parent::filters());\n }", "title": "" }, { "docid": "d2da134b0433514a605c55aa89e89caa", "score": "0.5712065", "text": "public function remove_default_filters() {\n\t\tparent::remove_default_filters();\n\n\t\tlist( $hookname, $callback, $priority ) = $this->get_verify_features_default_option_filter_hook();\n\n\t\tremove_filter( $hookname, $callback, $priority );\n\t}", "title": "" }, { "docid": "6971a39227e4bdb485c08bd42e40efba", "score": "0.571045", "text": "public function purge() {\n\t\t//\n\t}", "title": "" }, { "docid": "827cde95f101f128a42c7befbc49fbee", "score": "0.57018405", "text": "public static function purge()\n\t{\n\t\tLiteSpeed_Cache_API::purge( LiteSpeed_Cache_Tag::TYPE_ESI . 'yith-wcwl-add' ) ;\n\t}", "title": "" }, { "docid": "6ce386e6517a2b9411e24caad4e0c4a3", "score": "0.5686488", "text": "private function add_actions_and_filters() {\n\n\t\t// Dequeue jQuery Migrate.\n\t\tadd_filter( 'wp_default_scripts', array( $this, 'dequeue_jquery_migrate' ) );\n\n\t\t// Dequeue WP Embed.\n\t\tremove_action( 'wp_head', 'wp_oembed_add_host_js', 10 );\n\n\t\t// Add javascript detection.\n\t\tadd_action( 'wp_head', array( $this, 'javascript_detection' ), 0 );\n\n\t\t// Remove emoji support.\n\t\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\t\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\t\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\t\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\tremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n\t\tremove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n\t\tremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n\t\tadd_filter( 'tiny_mce_plugins', array( $this, 'disable_emojis_tinymce' ) );\n\n\t\t// Modify Tiny_MCE toolbars.\n\t\tadd_filter( 'tiny_mce_before_init', array( $this, 'custom_format_tinymce' ) );\n\n\t\t// Set jpeg compression.\n\t\tadd_filter( 'jpeg_quality', array( $this, 'filter_jpeg_quality' ) );\n\n\t\t// Replace accented characters in file names.\n\t\tadd_filter( 'sanitize_file_name', array( $this, 'remove_accents' ) );\n\n\t\t// Remove admin pointers.\n\t\tremove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );\n\n\t\t// Remove customizer from admin bar.\n\t\tadd_action( 'admin_bar_menu', array( $this, 'remove_customizer_from_admin_bar' ), 999 );\n\t}", "title": "" }, { "docid": "efe81d957da5775ed5c6d6892c792dd6", "score": "0.5627523", "text": "function avia_wc_clear_catalog_ordering_args_filters()\n\t{\n\t\tremove_filter( 'posts_clauses', array( WC()->query, 'order_by_price_desc_post_clauses' ) );\n\t\tremove_filter( 'posts_clauses', array( WC()->query, 'order_by_price_asc_post_clauses' ) );\n\t\tremove_filter( 'posts_clauses', array( WC()->query, 'order_by_popularity_post_clauses' ) );\n\t\tremove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );\n\t}", "title": "" }, { "docid": "5174bd7a1388c6858993e900662189ba", "score": "0.5621708", "text": "public function clearFilters()\n\t{\n\t\t$this->filters = array();\n\t}", "title": "" }, { "docid": "21fc6de6bf04cf69df8212dc2fb04fdb", "score": "0.56213975", "text": "function atozsitesVarnishPurgeAll() {\n $this->atozsitesVarnishPurgeObject('/.*');\n }", "title": "" }, { "docid": "f4dbd8dbeba49d7e046edd9ec5d2a59c", "score": "0.5605541", "text": "function filters() {\n\t\tremove_filter( 'the_content', 'wpautop' );\n\t\tadd_filter( 'the_content', 'wpautop' , 12);\n\t\tremove_filter( 'the_content', 'wptexturize' );\n\t\tadd_filter( 'the_content', 'wptexturize' , 12);\n\t}", "title": "" }, { "docid": "1dc5765136603d4fc56b28adb28078c2", "score": "0.5604963", "text": "function drush_cache_tools_purge() {\n\n drush_print(dt('Preparing to truncate persistent cache tables... '));\n\n // Clear all caches to purge expired objects first.\n drupal_flush_all_caches();\n drush_log(dt('Cleared caches.'), 'ok');\n\n // Trigger a rebuild of router paths to discover changes.\n \\Drupal::service(\"router.builder\")->rebuild();\n\n // Persistent cache bin stores to truncate.\n $bins = [\n 'bootstrap',\n 'config',\n 'data',\n 'default',\n 'discovery',\n 'dynamic_page_cache',\n 'entity',\n 'menu',\n 'migrate',\n 'render',\n 'rest',\n 'toolbar',\n ];\n foreach ($bins as $bin) {\n if (\\Drupal::hasService(\"cache.$bin\")) {\n \\Drupal::cache($bin)->deleteAll();\n }\n }\n}", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.55997616", "text": "public function purge();", "title": "" }, { "docid": "a854af89c533c9eab3a629976a2279cd", "score": "0.5595372", "text": "public function removeOptionFilters();", "title": "" }, { "docid": "ef6fd7c3475e17971ba1c0490a0410b3", "score": "0.5583741", "text": "abstract static function add_filters(): void;", "title": "" }, { "docid": "45c71f0de25d2c1f1e30183491aec70b", "score": "0.55781966", "text": "public static function clear()\n\t{\n\t\tstatic::$filters = array();\n\t}", "title": "" }, { "docid": "ef02c69a5ab503d5af5a98a0d7c4f61f", "score": "0.55564827", "text": "private function remove_buddypress_filters() {\n\t\tremove_filter( 'wp_mail_from', 'bp_core_email_from_address_filter' );\n\t\tremove_filter( 'wp_mail_from_name', 'bp_core_email_from_name_filter' );\n\t}", "title": "" }, { "docid": "607fb0a95a35b1493521019e0b78240a", "score": "0.555155", "text": "private function setupActionsFilters()\n {\n add_action('after_setup_theme', [$this, 'actionAfterThemeSetup'], 14);\n add_action('init', [$this, 'actionInit'], 11);\n\n add_action('wp_enqueue_scripts', [$this, 'actionEnqueueScripts'], 999);\n\n add_filter('query_vars', [$this, 'filterQueryVars']);\n add_filter('post_gallery', [$this, 'filterPostGallery'], 10, 3);\n add_filter('_get_page_link', [$this, 'filterPostLink'], 10, 2);\n add_filter('the_title', [$this, 'filterTheTitle'], 10, 2);\n\n add_filter('pre_wp_nav_menu', [$this, 'filterDoingNavMenu'], 10, 2);\n add_filter('wp_nav_menu', [$this, 'filterDoingNavMenu'], 10, 2);\n }", "title": "" }, { "docid": "56a3622d42ed8559c0b88369735df0ef", "score": "0.55203485", "text": "public function setup_filters() {\n\n // Modify ?ver query string for development environments to bust cache\n if ( defined( 'WP_ENV' ) && 'development' === strtolower( WP_ENV ) ) {\n add_filter( 'script_loader_src', [ $this, 'filter_cache_busting_file_src' ], 10 );\n add_filter( 'style_loader_src', [ $this, 'filter_cache_busting_file_src' ], 10 );\n } else {\n add_filter( 'script_loader_src', [ $this, 'filter_remove_ver_query_string' ], 10 );\n add_filter( 'style_loader_src', [ $this, 'filter_remove_ver_query_string' ], 10 );\n }\n\n // 3rd party hosted JavaScript should have async set so they don't block\n // our JavaScript from functioning if 3rd party scripts fail to load.\n add_filter( 'script_loader_tag', function( $script_tag = '', $handle = '' ) {\n $async_handles = [ 'soundcite', 'instagram-embed' ];\n if ( ! in_array( $handle, $async_handles ) ) {\n return $script_tag;\n }\n return str_replace( ' src', ' async=\"async\" src', $script_tag );\n }, 10, 2 );\n\n // Load our own chosen version of jQuery\n add_filter( 'script_loader_tag', [ $this, 'filter_script_loader_tag_reload_jquery' ], 10, 3 );\n\n // Modify dfp-loader.js <script> element\n add_filter( 'script_loader_tag', [ $this, 'filter_script_loader_tag_modify_dfp_loader' ], 10, 3 );\n\n add_filter( 'timber_context', function( $context ) {\n $context['local_storage_cookie_script_url'] = PEDESTAL_DIST_DIRECTORY_URI . '/js/globalLocalStorageCookie.js';\n return $context;\n } );\n }", "title": "" }, { "docid": "e37b7e8032a15affbad0ce96c5e7a44d", "score": "0.5472615", "text": "private function add_filters() {\n\t\tadd_filter( 'body_class', [ $this, 'body_class' ], 10, 2 );\n\t\tadd_filter( 'post_class', [ $this, 'post_class' ] );\n\t\tadd_filter( 'get_the_excerpt', [ $this, 'fix_the_excerpt' ] );\n\t\tadd_filter( 'wp_kses_allowed_html', [ $this, 'allow_data_attributes' ], 10, 2 );\n\t}", "title": "" }, { "docid": "06cfb41df92996b515d942ac8ac32fd7", "score": "0.5471278", "text": "function filters_enable() {\n foreach ($this->filters_kill as $filter_id) {\n $this->view->filter[$filter_id]->options['exposed'] = TRUE;\n }\n }", "title": "" }, { "docid": "49699dd4e5aa6b3e0c6eb09b2fb9ce4f", "score": "0.5445431", "text": "public function reset_filter() {\n\t\t$this->filters = array();\n\t\tif ($this -> folder -> is_autorefresh())\n\t\t{\n\t\t\t$this -> folder -> refresh();\n\t\t}\n\t}", "title": "" }, { "docid": "78ba6de46cb4356e96e7f1b648ece808", "score": "0.54395986", "text": "public function updatedFilters(): void\n {\n // Remove the search filter when it's empty\n if (isset($this->filters['search']) && $this->filters['search'] === '') {\n $this->resetSearch();\n }\n\n // Remove any url params that are empty\n $this->checkFilters();\n\n // Reset the page when filters are changed\n $this->resetPage();\n }", "title": "" }, { "docid": "19d9988f389b1bb1d6598116a47a1079", "score": "0.5421134", "text": "private function define_filters() {\n $this->loader->add_filter('cron_schedules', $this, 'vsei_cron_weekly_recurrence');\n }", "title": "" }, { "docid": "8c63a89dbbc4c82c5b3a0da68030c97d", "score": "0.5415874", "text": "public function testUpdateGeoFiltersCommandDelete() {\n $this->assertInstanceOf('Norse\\IPViking\\Settings_GeoFilter_Filter', $filter = $this->_ipv->getNewGeoFilter());\n $filter->setCommand('delete');\n $filters = array($filter);\n\n $this->assertInstanceOf('Norse\\IPViking\\Settings_GeoFilter_Collection', $collection = $this->_ipv->updateGeoFilters($filters));\n }", "title": "" }, { "docid": "d7b4fd13a90f8be942d2eb9ef35a4a10", "score": "0.54103833", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "6e7396ee321d736ef2ff7961c2c2ea05", "score": "0.54069686", "text": "public function add_option_filters() {\n\t\tparent::add_option_filters();\n\n\t\tlist( $hookname, $callback, $priority ) = $this->get_verify_features_option_filter_hook();\n\n\t\tif ( has_filter( $hookname, $callback ) === false ) {\n\t\t\tadd_filter( $hookname, $callback, $priority );\n\t\t}\n\t}", "title": "" }, { "docid": "e8880dc20d398b40909d20ff716a32fd", "score": "0.54018235", "text": "public function filters()\r\n {\r\n\t\t$filters = array(\r\n //'postOnly + delete, slug',\r\n );\r\n return CMap::mergeArray($filters, parent::filters());\r\n }", "title": "" }, { "docid": "fe49efd1ff79d25d64bd494b8e99ae11", "score": "0.5398492", "text": "function wpcf_legacy() {\n\tdelete_option('contfilt_keyword');\n\tdelete_option('contfilt_post');\n\tdelete_option('contfilt_post_title');\n\tdelete_option('contfilt_comment');\n\tdelete_option('contfilt_tags');\n\tdelete_option('contfilt_tag_cloud');\n\tdelete_option('contfilt_remove_options');\n\tdelete_option('contfilt_case');\n\tdelete_option('contfilt_filter_type');\n\tdelete_option('contfilt_dropdown');\n}", "title": "" }, { "docid": "c39fd07509a7cdff670da9b4edab0037", "score": "0.5395848", "text": "protected function _configure_purge_options ($options)\n {\n $options->remove_resources = $this->value_for ('remove_resources');\n }", "title": "" }, { "docid": "e54619684810d62e23ea576faec8d59d", "score": "0.5383224", "text": "protected function addFilters() {\n\t\t\tadd_filter( 'comments_template', array( $this, 'commentsTemplate' ) );\n\t\t\tadd_filter( 'get_comments_link', array( $this, 'commentsLink' ), 10, 2 );\n\t\t\tadd_filter( 'get_comments_number', array( $this, 'muutCommentsNumber' ), 10, 2 );\n\t\t\tadd_filter( 'wp_head', array( $this, 'fetchCommentCountForMuutPosts' ) );\n\t\t}", "title": "" }, { "docid": "8f1570fab7ac577c64838cb3e4e8092b", "score": "0.5375677", "text": "public function apply_filters() {\n\t\t// Only if there are any filters hooked\n\t\tif ( has_filter( 'use_cdnjs_scripts' ) ) {\n\t\t\t$this->replace_scripts( wp_scripts() );\n\t\t}\n\n\t\tif ( has_filter( 'use_cdnjs_styles' ) ) {\n\t\t\t$this->replace_styles( wp_styles() );\n\t\t}\n\t}", "title": "" }, { "docid": "44f123b1c4892766ca2e23e133a603f8", "score": "0.53689533", "text": "public function clearFilters() {\n\t\tunset($this->filter);\n\t\t$this->filter = null;\n\t}", "title": "" }, { "docid": "2851d765788e5977c2373182291d29b3", "score": "0.53495264", "text": "public function purgeAll() {\n if (!$this->enabled) {\n return;\n }\n\n if (!empty($this->errors)) {\n return;\n }\n\n try {\n $response = $this->processRequest(['purge_everything' => true]);\n\n if ($response === TRUE) {\n \\Drupal::logger('cf_purge')->notice('Purged everything from cache');\n }\n else {\n \\Drupal::logger('cf_purge')->error('Unable to purge everything from cache');\n }\n }\n catch (\\Exception $e) {\n \\Drupal::logger('cf_purge')->error('Unable to purge everything from cache');\n }\n }", "title": "" }, { "docid": "92c5ae2d5662d0aa0340a9331e408d3a", "score": "0.5349104", "text": "private function add_filters() {\n\n\t\tif ( function_exists( 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) ) {\n\t\t\t$filters = array(\n\t\t\t\t'option_woocommerce_email_from_name' => 10,\n\t\t\t\t'the_title_attribute' => 10,\n\t\t\t\t'woocommerce_attribute' => 10,\n\t\t\t\t'woocommerce_attribute_label' => 10,\n\t\t\t\t'woocommerce_cart_item_name' => 10,\n\t\t\t\t'woocommerce_cart_shipping_method_full_label' => 10,\n\t\t\t\t'woocommerce_cart_tax_totals' => 10,\n\t\t\t\t'woocommerce_email_footer_text' => 10,\n\t\t\t\t'woocommerce_gateway_description' => 10,\n\t\t\t\t'woocommerce_gateway_title' => 10,\n\t\t\t\t'woocommerce_page_title' => 10,\n\t\t\t\t'woocommerce_product_title' => 10,\n\t\t\t\t'woocommerce_order_item_name' => 10,\n\t\t\t\t'woocommerce_order_item_display_meta_value' => 10,\n\t\t\t\t'woocommerce_order_product_title' => 10,\n\t\t\t\t'woocommerce_order_shipping_to_display' => 10,\n\t\t\t\t'woocommerce_order_subtotal_to_display' => 10,\n\t\t\t\t'woocommerce_variation_option_name' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_translate_string_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage', $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'get_term' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_translate_term_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'translate_term' ), $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'get_terms' => 10,\n\t\t\t\t'wp_get_object_terms' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_translate_terms_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'translate_terms' ), $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'woocommerce_order_tax_totals' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_translate_tax_totals_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'translate_tax_totals' ), $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'option_woocommerce_bacs_settings' => 10,\n\t\t\t\t'option_woocommerce_cheque_settings' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_translate_gateway_settings_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'translate_gateway_settings' ), $priority );\n\t\t\t}\n\t\t}\n\n\t\tif ( function_exists( 'qtrans_convertURL' ) ) {\n\t\t\t$filters = array(\n\t\t\t\t'post_type_archive_link' => 10,\n\t\t\t\t'post_type_link' => 10,\n\t\t\t\t'woocommerce_add_to_cart_url' => 10,\n\t\t\t\t'woocommerce_breadcrumb_home_url' => 10,\n\t\t\t\t'woocommerce_checkout_no_payment_needed_redirect' => 10,\n\t\t\t\t'woocommerce_get_cancel_order_url' => 10,\n\t\t\t\t'woocommerce_get_checkout_payment_url' => 10,\n\t\t\t\t'woocommerce_get_return_url' => 10,\n\t\t\t\t'woocommerce_product_add_to_cart_url' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_convertURL_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, 'qtrans_convertURL', $priority );\n\t\t\t}\n\t\t}\n\n\t\tif ( function_exists( 'qtrans_getLanguage' ) ) {\n\t\t\t$filters = array(\n\t\t\t\t'woocommerce_get_cart_url' => 10,\n\t\t\t\t'woocommerce_get_checkout_url' => 10,\n\t\t\t\t'woocommerce_get_endpoint_url' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_url_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'add_lang_query_var_to_url' ), $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'site_url' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_site_url_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'add_lang_query_var_to_site_url' ), $priority, 2 );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'woocommerce_payment_successful_result' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_payment_redirect_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'add_lang_query_var_to_payment_redirect_url' ), $priority );\n\t\t\t}\n\n\t\t\t$filters = array(\n\t\t\t\t'wc_add_to_cart_params' => 10,\n\t\t\t\t'wc_cart_fragments_params' => 10,\n\t\t\t\t'wc_cart_params' => 10,\n\t\t\t\t'wc_checkout_params' => 10,\n\t\t\t\t'woocommerce_params' => 10,\n\t\t\t);\n\t\t\t$filters = apply_filters( 'im8qtranslatewoocommerce_woocommerce_params_filters', $filters );\n\t\t\tforeach ( $filters as $id => $priority ) {\n\t\t\t\tadd_filter( $id, array( $this, 'add_lang_query_var_to_woocommerce_params' ), $priority );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "16d26e6007523f5e28824048f2b7b313", "score": "0.53443307", "text": "protected function filter()\n {\n //\n }", "title": "" }, { "docid": "64b8aa1404a9bb2a89926e0d3e73b71b", "score": "0.53260386", "text": "private function hookFilters() {\n \\add_filter('wp_title_rss', [$this, 'setTitle']);\n \\add_filter('the_excerpt_rss', [$this, 'filterRssDescription']);\n \\add_filter('wp_trim_words', [$this, 'reformatExcerpt'], 10, 4);\n }", "title": "" }, { "docid": "21cf148553caaa880a69d6e5bde28954", "score": "0.5299935", "text": "function jflex_mefibs_filter_alter(&$filters) {\n // Clear the filters if we pressed the button \"clean all\"\n if (isset($_REQUEST['op']) && $_REQUEST['op'] == 'Очистить все') {\n if (isset($_SESSION['mefibs'])) {\n unset($_SESSION['mefibs']);\n }\n $filters = array();\n drupal_goto(base_path() . request_path());\n }\n\n // Clear the filters if we moved to other the a page\n if (isset($_SESSION['mefibs_q']) && $_SESSION['mefibs_q'] <> $_GET['q']) {\n if (isset($_SESSION['mefibs'])) {\n unset($_SESSION['mefibs']);\n }\n $filters = array();\n }\n $_SESSION['mefibs_q'] = $_GET['q'];\n}", "title": "" }, { "docid": "35a24c5fb392982be4959c31fbf23147", "score": "0.5283189", "text": "private function buildFilters()\n {\n $this->buildDefaultFilters();\n $this->doneFilter = $this->filterStatus($this->config['doneStatus']);\n $this->homologFilter = $this->filterStatus($this->config['homologStatus']);\n $this->productionFilter = $this->filterStatus($this->config['productionStatus']);\n $this->releaseFilter = $this->filterStatus($this->config['releaseStatus']);\n $this->toTestFilter = $this->filterStatus($this->config['toTestStatus']);\n }", "title": "" }, { "docid": "7f25eeb34b0ccac794955e44f4f41925", "score": "0.5264129", "text": "function fn_delete_product_filter($filter_id)\n{\n fn_set_hook('delete_product_filter_pre', $filter_id);\n\n db_query(\"DELETE FROM ?:product_filters WHERE filter_id = ?i\", $filter_id);\n db_query(\"DELETE FROM ?:product_filter_descriptions WHERE filter_id = ?i\", $filter_id);\n\n /**\n * Adds additional actions after deleting product filter\n *\n * @param int $filter_id Filter identifier\n */\n fn_set_hook('delete_product_filter_post', $filter_id);\n\n return true;\n}", "title": "" }, { "docid": "2d4f8e19afd36b322df4e7cb2d158948", "score": "0.5253023", "text": "public function removeRuntimeFilters()\n {\n $filters = array();\n foreach ($this->filters as $filter)\n {\n if (!$filter->availableAtRunTime)\n {\n $filters[] = $filter;\n }\n }\n $this->filters = $filters;\n }", "title": "" }, { "docid": "1712172bed2c1cb421721c7919edbfbc", "score": "0.5250739", "text": "public function add_default_filters() {\n\t\tparent::add_default_filters();\n\n\t\tlist( $hookname, $callback, $priority ) = $this->get_verify_features_default_option_filter_hook();\n\n\t\tif ( has_filter( $hookname, $callback ) === false ) {\n\t\t\tadd_filter( $hookname, $callback, $priority );\n\t\t}\n\t}", "title": "" }, { "docid": "60d9c95f9411fb5246bdef8c381ea3df", "score": "0.5248542", "text": "private function add_admin_filters() {\n\t\tadd_filter( 'fw_ext_seo_general_settings', array( $this, '_admin_filter_set_framework_options' ) );\n\t}", "title": "" }, { "docid": "3364c5882d7734c57267408d37951884", "score": "0.52395284", "text": "function filter_load() {\n\t\tadd_action( current_filter(), array( $this, 'setup_vars' ), 20 );\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'get_select' ) );\n\t\tadd_filter( \"manage_taxonomies_for_{$this->post_type}_columns\", array( $this, 'add_columns' ) );\n\t}", "title": "" }, { "docid": "1aea0817c629965a3bb5bd4365cd9e31", "score": "0.52293503", "text": "protected function addFilters() {\n\t\t\tadd_filter( 'template_include', array( $this, 'getProperTemplate' ) );\n\t\t}", "title": "" }, { "docid": "f4df129840faa3aae113d7abefa28074", "score": "0.5227669", "text": "public function purgeAction() {\n\t\t@set_time_limit(300);\n\n\t\t$nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1);\n\t\t$date_min = time() - (3600 * 24 * 30 * $nb_month_old);\n\n\t\t$feedDAO = FreshRSS_Factory::createFeedDao();\n\t\t$feeds = $feedDAO->listFeeds();\n\t\t$nb_total = 0;\n\n\t\tinvalidateHttpCache();\n\n\t\tforeach ($feeds as $feed) {\n\t\t\t$feed_history = $feed->keepHistory();\n\t\t\tif ($feed_history == -2) {\n\t\t\t\t// TODO: -2 must be a constant!\n\t\t\t\t// -2 means we take the default value from configuration\n\t\t\t\t$feed_history = FreshRSS_Context::$user_conf->keep_history_default;\n\t\t\t}\n\n\t\t\tif ($feed_history >= 0) {\n\t\t\t\t$nb = $feedDAO->cleanOldEntries($feed->id(), $date_min, $feed_history);\n\t\t\t\tif ($nb > 0) {\n\t\t\t\t\t$nb_total += $nb;\n\t\t\t\t\tMinz_Log::debug($nb . ' old entries cleaned in feed [' . $feed->url() . ']');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$feedDAO->updateCachedValues();\n\n\t\tinvalidateHttpCache();\n\t\tMinz_Request::good(_t('feedback.sub.purge_completed', $nb_total), array(\n\t\t\t'c' => 'configure',\n\t\t\t'a' => 'archiving'\n\t\t));\n\t}", "title": "" }, { "docid": "3227ec938c588d6f4c502a56ed40e245", "score": "0.52169627", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete, copy, enable, disable',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "41da5fa3be4642a0827648ef40c9bc16", "score": "0.52141356", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete', // we only allow deletion via POST request\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "425ee8391ca19bf4c4f8875c969ee3f2", "score": "0.52121586", "text": "function register_filters() {\n\t\t\t// ie. add_filter($this->slug.\"/get_feeds\", array($this,\"import_user_feed\"), 1,2);\n\t\t\tadd_filter($this->slug.\"/get_pages\", array($this,\"get_pages\"), 1,2);\n\t\t}", "title": "" }, { "docid": "70625edc6d5dddfef859b40866c810e2", "score": "0.5175071", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', \n\t\t\t'postOnly + delete', \n\t\t);\n\t}", "title": "" }, { "docid": "7d88db695b058b2e3f125d404651de81", "score": "0.51734436", "text": "public function purge() {\n\t\t$this->log->write ( 'User is trying to wipe system data' );\n\t\t\n\t\tif ($this->request->post ['pass'] != '**135**') {\n\t\t\t$this->log->write ( 'User failed password validation' );\n\t\t\t$json = array (\n\t\t\t\t\t'msg' => 'Password wrong, check the source code for the password! This is so you know what this feature does.' \n\t\t\t);\n\t\t} else {\n\t\t\t/**\n\t\t\t * $this->log->write('User passed validation');\n\t\t\t * $this->db->query(\"TRUNCATE `\" .\n\t\t\t * DB_PREFIX . \"order`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"order_history`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"order_option`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"order_product`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"order_total`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"customer`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"customer_activity`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"customer_ban_ip`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"customer_transaction`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"address`\");\n\t\t\t *\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_order`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_order_lock`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_transaction`\");\n\t\t\t *\n\t\t\t * if ($this->config->get('ebay_status') == 1) {\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_category`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_category_history`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_image_import`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_listing`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_listing_pending`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_stock_reserve`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_payment_method`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_profile`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_setting_option`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_shipping`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_shipping_location`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_shipping_location_exclude`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_template`\");\n\t\t\t * }\n\t\t\t *\n\t\t\t * if ($this->config->get('etsy_status') == 1) {\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"etsy_listing`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"etsy_setting_option`\");\n\t\t\t * }\n\t\t\t *\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"etsy_order`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"etsy_order_lock`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"manufacturer`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"manufacturer_to_store`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"attribute`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"attribute_description`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"attribute_group`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"attribute_group_description`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"ebay_listing`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"category`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"category_description`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"category_to_store`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_to_store`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_description`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_attribute`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_option`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_option_value`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_image`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_to_category`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"option`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"option_description`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"option_value`\");\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"option_value_description`\");\n\t\t\t *\n\t\t\t * if ($this->openbay->addonLoad('openstock')) {\n\t\t\t * $this->db->query(\"TRUNCATE `\" . DB_PREFIX . \"product_option_relation`\");\n\t\t\t * }\n\t\t\t */\n\t\t\t\n\t\t\t$this->log->write ( 'Data cleared' );\n\t\t\t$json = array (\n\t\t\t\t\t'msg' => 'Data cleared' \n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->response->addHeader ( 'Content-Type: application/json' );\n\t\t$this->response->setOutput ( json_encode ( $json ) );\n\t}", "title": "" }, { "docid": "e8be17c45f2de578554c62e32306e1ec", "score": "0.5171491", "text": "function init_all_filter_terms()\r\n {\r\n $this->filter_query_args(array(), true);\r\n\r\n }", "title": "" }, { "docid": "b8cb134072b905a0fe4a43e76f0339ff", "score": "0.5167381", "text": "public function removeFilter()\n {\n $this->filter = null;\n }", "title": "" }, { "docid": "b776cecbac6a28be9c8f54b48250173e", "score": "0.5165708", "text": "public function register_hooks() {\n\t\t\\add_filter( 'duplicate_post_excludelist_filter', [ $this, 'exclude_zapier_meta' ] );\n\t}", "title": "" }, { "docid": "a6a5d450d3526b6e9c1dca08ed84c397", "score": "0.51577693", "text": "public function add_filter(){\n\n }", "title": "" }, { "docid": "c72b25e04b7e9bde3d964bb1ea4792e4", "score": "0.515757", "text": "public function addActionsAndFilters()\n {\n $frontendController = $this->controllerFactory->createFrontendController();\n\n //Actions\n $this->wordpress->addAction('admin_menu', [$this, 'registerAdminMenu']);\n $this->wordpress->addAction('admin_init', [$this, 'registerAdminActionsAndFilters']);\n $this->wordpress->addAction('registered_post_type', [$this->objectHandler, 'registeredPostType'], 10, 2);\n $this->wordpress->addAction('registered_taxonomy', [$this->objectHandler, 'registeredTaxonomy'], 10, 3);\n $this->wordpress->addAction('registered_post_type', [$this->config, 'flushConfigParameters']);\n $this->wordpress->addAction('registered_taxonomy', [$this->config, 'flushConfigParameters']);\n $this->wordpress->addAction('wp_enqueue_scripts', [$frontendController, 'enqueueStylesAndScripts']);\n\n //Filters\n $getFile = $frontendController->getRequestParameter('uamgetfile');\n\n if ($this->config->getRedirect() !== false || $getFile !== null) {\n $this->wordpress->addFilter('wp_headers', [$frontendController, 'redirect'], 10, 2);\n }\n\n if ($this->config->showAssignedGroups()) {\n $this->wordpress->addFilter('edit_post_link', [$frontendController, 'showGroupMembership'], 10, 2);\n }\n\n $this->wordpress->addFilter('wp_get_attachment_thumb_url', [$frontendController, 'getFileUrl'], 10, 2);\n $this->wordpress->addFilter('wp_get_attachment_url', [$frontendController, 'getFileUrl'], 10, 2);\n $this->wordpress->addFilter('posts_pre_query', [$frontendController, 'postsPreQuery'], 10, 2);\n $this->wordpress->addFilter('the_posts', [$frontendController, 'showPosts']);\n $this->wordpress->addFilter('get_attached_file', [$frontendController, 'getAttachedFile'], 10, 2);\n $this->wordpress->addFilter('the_content', [$frontendController, 'showContent']);\n $this->wordpress->addFilter('posts_where_paged', [$frontendController, 'showPostSql']);\n $this->wordpress->addFilter('get_terms_args', [$frontendController, 'getTermArguments']);\n $this->wordpress->addFilter('wp_get_nav_menu_items', [$frontendController, 'showCustomMenu']);\n $this->wordpress->addFilter('comments_array', [$frontendController, 'showComment']);\n $this->wordpress->addFilter('the_comments', [$frontendController, 'showComment']);\n $this->wordpress->addFilter('get_pages', [$frontendController, 'showPages'], 20);\n $this->wordpress->addFilter('get_terms', [$frontendController, 'showTerms'], 20);\n $this->wordpress->addFilter('get_term', [$frontendController, 'showTerm'], 20, 2);\n $this->wordpress->addFilter('get_ancestors', [$frontendController, 'showAncestors'], 20, 4);\n $this->wordpress->addFilter('get_next_post_where', [$frontendController, 'showNextPreviousPost']);\n $this->wordpress->addFilter('get_previous_post_where', [$frontendController, 'showNextPreviousPost']);\n $this->wordpress->addFilter('post_link', [$frontendController, 'cachePostLinks'], 10, 2);\n $this->wordpress->addFilter('parse_query', [$frontendController, 'parseQuery']);\n $this->wordpress->addFilter('getarchives_where', [$frontendController, 'showPostSql']);\n $this->wordpress->addFilter('wp_count_posts', [$frontendController, 'showPostCount'], 10, 3);\n $this->wordpress->addFilter('wpseo_sitemap_entry', [$frontendController, 'getWpSeoUrl'], 1, 3);\n }", "title": "" }, { "docid": "c62b6c2a954968796ab60e4d20d2545b", "score": "0.51563984", "text": "protected function _create_filters() {\n\n\t\t\t// Login Logo\n\t\t\tif ( ( isset( $this->args->login->url ) && $this->args->login->url ) || \n\t\t\t\t ( isset( $this->args->login->css ) && $this->args->login->css ) ) { \n\t\t\t\tadd_action( 'login_enqueue_scripts', array( $this, 'set_login_logo' ) );\n\t\t\t}\n\n\t\t\t// Login Link\n\t\t\tif ( isset( $this->args->login->link ) && $this->args->login->link ) { \n\t\t\t\tadd_action( 'login_headerurl', array( $this, 'set_login_link' ) );\n\t\t\t}\n\n\t\t\t// Login Title\n\t\t\tif ( isset( $this->args->login->title ) && $this->args->login->title ) { \n\t\t\t\tadd_action( 'login_headertitle', array( $this, 'set_login_title' ) );\n\t\t\t}\n\n\t\t\t// Footer Left Text\n\t\t\tif ( isset( $this->args->footer_left_text ) && $this->args->footer_left_text ) {\n\t\t\t\tadd_filter( 'admin_footer_text', array( $this, 'set_footer_left_text' ) );\n\t\t\t}\n\n\t\t\t// Footer Right Text\n\t\t\tif ( isset( $this->args->footer_right_text ) && $this->args->footer_right_text ) {\n\t\t\t\tadd_filter( 'update_footer', array( $this, 'set_footer_right_text' ), 11 );\n\t\t\t}\n\n\t\t\t// Change Admin Bar Menu\n\t\t\tif ( isset( $this->args->admin_bar ) && $this->args->admin_bar ) {\n\t\t\t\tadd_action( 'admin_bar_menu', array( $this, 'change_admin_bar_menu' ), 25 );\n\t\t\t}\n\n\t\t\t// Remove Dashboard Widgets\n\t\t\tif ( isset( $this->args->widgets->remove ) && $this->args->widgets->remove ) {\n\t\t\t\tadd_action( 'admin_init', array( $this, 'remove_dashboard_widgets' ) );\n\t\t\t}\n\n\t\t\t// Hide Welcome screen\n\t\t\tadd_action( 'load-index.php', array( $this, 'hide_welcome_screen' ) );\n\t\t\t\n\t\t\t// Remove Menus and Submenus\n\t\t\tif ( ( isset( $this->args->remove_menus->menus ) && $this->args->remove_menus->menus ) || \n\t\t\t\t ( isset( $this->args->remove_menus->submenus ) && $this->args->remove_menus->submenus ) ){\n\t\t\t\tadd_action( 'admin_init', array( $this, 'remove_menus' ) );\n\t\t\t}\n\n\t\t\t// Remove Updates\n\t\t\tif ( ! $this->args->updates ) {\n\t\t\t\t$this->remove_updates();\n\t\t\t\tadd_action( 'admin_init', array( $this, 'remove_updates_submenu' ) );\n\t\t\t}\n\n\t\t\t// Hide Admin Bar on Front End\n\t\t\tif ( isset ( $this->args->admin_bar->front ) && ! $this->args->admin_bar->front ) {\n\t\t\t\tadd_filter('show_admin_bar', '__return_false' );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c1af5995f52555d2fd1c9ac1b6be4a46", "score": "0.5145898", "text": "public function filters()\n {\n return array(\n 'accessControl',\n array('bootstrap.filters.BootstrapFilter - delete'),\n );\n }", "title": "" }, { "docid": "12b551c7011f50326dbcf9cdd6ec1c63", "score": "0.5145785", "text": "public function register_filters() {\n\t\tif ( is_multisite() ) {\n\t\t\tadd_action( 'network_admin_menu', array( &$this, 'admin_menu' ) );\n\t\t\tremove_action( 'admin_menu', array( &$this, 'admin_menu' ) );\n\t\t}\n\t\tadd_action( 'admin_notices', array( &$this, 'display_activation_notice' ) );\n\t\tadd_action( 'check_passwords', array( &$this, 'hack_check_passwords' ) );\n\t\tadd_filter( 'pre_user_display_name', array( &$this, 'hack_pre_user_display_name' ) );\n\t\tadd_filter( 'pre_user_email', array( &$this, 'hack_pre_user_email' ) );\n\t\tadd_action( 'register_post', array( &$this, 'register_post' ), 1, 3 );\n\t\tadd_filter( 'registration_errors', array( &$this, 'registration_errors' ), 1 );\n\t\tadd_action( 'retrieve_password', array( &$this, 'retrieve_password' ) );\n\t\tadd_filter( 'retrieve_password_message', array( &$this, 'retrieve_password_message' ) );\n\t\tadd_action( 'user_profile_update_errors', array( &$this, 'user_profile_update_errors' ), 1, 3 );\n\t\tadd_filter( 'wpmu_validate_user_signup', array( &$this, 'bp_members_validate_user_signup' ) );\n\t\tadd_action( $this->get_hook( 'after_settings_form' ), array( &$this, 'list_multiple_accounts' ) );\n\t}", "title": "" }, { "docid": "a2c9eb1e8aefe8bba1cfa9e16001730c", "score": "0.5131076", "text": "function remove_ai_filters() {\n\tremove_action('the_content', 'ai_content_hook', 99999 );\n remove_action( 'wp_footer', 'ai_hook_function_footer', 5 );\n remove_action( 'wp_footer', 'ai_wp_footer_hook', 5 );\n}", "title": "" }, { "docid": "9f22e3f687f84dabb45c6cd8dbce5eb2", "score": "0.5122149", "text": "function beforeFilter() {\n\t\t$this->Auth->allow('userCleanUp');\n \n\t\n \n }", "title": "" }, { "docid": "e54004b22519e6560955deaa935acdea", "score": "0.51184267", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl',\n\t\t\t'postOnly + delete',\n\t\t);\n\t}", "title": "" }, { "docid": "52eefba9b79161f0d3f33b7640573122", "score": "0.5118289", "text": "public function test_filter ()\n\t\t{\n\t\t}", "title": "" }, { "docid": "1850acfac5dc368fedecbfd76d1bbede", "score": "0.5100196", "text": "function smp_add_filtering_settings( $args ) {\n\t$settings = \\SMP\\Templating\\Settings::get_settings();\n\n\t$mapping = array(\n\t\t'show_book_filter' => 'hide_books',\n\t\t'show_topics_filter' => 'hide_topics',\n\t\t'show_preacher_filter' => 'hide_preachers',\n\t\t'show_series_filter' => 'hide_series',\n\t\t'show_service_type_filter' => 'hide_service_types',\n\t\t'show_date_filter' => 'hide_dates',\n\t);\n\n\tforeach ( $mapping as $setting => $option ) {\n\t\t// Check if setting is set.\n\t\tif ( empty( $settings[ $setting ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( isset( $args['smp_override_settings'] ) && ! $args['smp_override_settings'] ) {\n\t\t\t// Template settings have higher priority, so just ignore what SM setting is.\n\t\t\t$args[ $option ] = 'yes' === $settings[ $setting ] ? '' : 'yes';\n\t\t} else {\n\t\t\tif ( '' === $args[ $option ] ) {\n\t\t\t\t$args[ $option ] = 'yes' === $settings[ $setting ] ? '' : 'yes';\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! empty( $settings['show_fitering'] ) && 'no' === $settings['show_fitering'] ) {\n\t\tadd_filter( 'sm_render_wpfc_sorting', '__return_false' );\n\t}\n\n\treturn $args;\n}", "title": "" }, { "docid": "5e94546e323568e485e322e228a98441", "score": "0.5100174", "text": "public function after_filter() {\n\t}", "title": "" }, { "docid": "c8e0e34e94f37aef4cfb7a5bec1a1916", "score": "0.50988466", "text": "public function purge(): void;", "title": "" }, { "docid": "3e5c8adedff67b094bf90176d78ff774", "score": "0.50866485", "text": "public function init()\n {\n add_filter('posts_join', [$this, 'joinPostMeta']);\n add_filter('posts_where', [$this, 'wherePostMeta']);\n add_filter('post_distinct', [$this, 'preventDuplicates']);\n }", "title": "" }, { "docid": "a38636a64e9129ac68d44f4d6cc7aa45", "score": "0.50802815", "text": "public function setup_filters() {\n add_filter( 'manage_nav-menus_columns', [ $this, 'filter_manage_nav_menus_columns' ], 99 );\n add_filter( 'wp_setup_nav_menu_item', [ $this, 'filter_wp_setup_nav_menu_item' ] );\n }", "title": "" }, { "docid": "aead3dd2e64d2eb55bbb55893ff7168f", "score": "0.5071355", "text": "public function addOptionFilters();", "title": "" }, { "docid": "332e0dbbbfe85fc1e8114685260bc564", "score": "0.50699013", "text": "public function postDispatch()\n {\n $this->plugins->getIterator(false)->clearFilters();\n }", "title": "" }, { "docid": "3fa28fe1aa55b995b460190fbcbbbb03", "score": "0.5062934", "text": "public function purge() {\n try {\n\n $results = [\n 'invalids' => 0,\n 'abandoned' => 0,\n 'obsoletes' => 0,\n 'persistent' => ['pictures' => 0, 'videos' => 0]\n ];\n\n //1 get Adverts where is Valid = false\n $results['invalids'] = $this->purgeInvalidsAdverts();\n\n //2 get Adverts where is publish = false and created_at > 2 hours\n $results['abandoned'] = $this->purgeAbandonedAdverts();\n\n //3 get Adverts where deleted_at > env delay\n $results['obsoletes'] = $this->purgeObsoletesAdverts();\n\n //4 Purge Persistents Pictures\n $persistentPicturesResults = $this->purgePersistentPictures();\n $results['persistent']['pictures'] = $persistentPicturesResults;\n\n //5 Purge Persistents Videos On Vimeo\n $persistentVideosResults = $this->purgePersistentVideos();\n $results['persistent']['videos'] = $persistentVideosResults;\n\n return $results;\n } catch (\\Exception $e) {\n throw new \\Exception(trans('strings.admin_purge_error') . ': ' . $e->getMessage());\n }\n\n }", "title": "" }, { "docid": "85c4a5650cc13d4f7842f697f34f42aa", "score": "0.5057925", "text": "public function applyAdvancedFilters()\n\t{\n\t\t$arrFilters = $this->Input->get('filter');\n\n\t\tif ($this->Input->get('act') == '' && $this->Input->get('key') == '' && is_array($arrFilters))\n\t\t{\n\t\t\t$arrProducts = null;\n\t\t\t$arrNames = array();\n\n\t\t\tforeach ($arrFilters as $filter)\n\t\t\t{\n\t\t\t\tswitch ($filter)\n\t\t\t\t{\n\t\t\t\t\tcase 'noimages':\n\t\t\t\t\t\t$objProducts = $this->Database->execute(\"SELECT id FROM tl_iso_products WHERE pid=0 AND language='' AND images IS NULL\");\n\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $objProducts->fetchEach('id')) : $objProducts->fetchEach('id');\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'nocategory':\n\t\t\t\t\t\t$objProducts = $this->Database->execute(\"SELECT id FROM tl_iso_products p WHERE pid=0 AND language='' AND (SELECT COUNT(*) FROM tl_iso_product_categories c WHERE c.pid=p.id)=0\");\n\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $objProducts->fetchEach('id')) : $objProducts->fetchEach('id');\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'new_today':\n\t\t\t\t\t\t$objProducts = $this->Database->execute(\"SELECT id FROM tl_iso_products p WHERE pid=0 AND language='' AND dateAdded>=\".strtotime('-1 day'));\n\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $objProducts->fetchEach('id')) : $objProducts->fetchEach('id');\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'new_week':\n\t\t\t\t\t\t$objProducts = $this->Database->execute(\"SELECT id FROM tl_iso_products p WHERE pid=0 AND language='' AND dateAdded>=\".strtotime('-1 week'));\n\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $objProducts->fetchEach('id')) : $objProducts->fetchEach('id');\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'new_month':\n\t\t\t\t\t\t$objProducts = $this->Database->execute(\"SELECT id FROM tl_iso_products p WHERE pid=0 AND language='' AND dateAdded>=\".strtotime('-1 month'));\n\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $objProducts->fetchEach('id')) : $objProducts->fetchEach('id');\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// HOOK: add custom logic\n\t\t\t\t\t\tif (isset($GLOBALS['ISO_HOOKS']['applyAdvancedFilters']) && is_array($GLOBALS['ISO_HOOKS']['applyAdvancedFilters']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($GLOBALS['ISO_HOOKS']['applyAdvancedFilters'] as $callback)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$objCallback = (in_array('getInstance', get_class_methods($callback[0]))) ? call_user_func(array($callback[0], 'getInstance')) : new $callback[0]();\n\t\t\t\t\t\t\t\t$arrReturn = $objCallback->$callback[1]($filter);\n\n\t\t\t\t\t\t\t\tif (is_array($arrReturn))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$arrProducts = is_array($arrProducts) ? array_intersect($arrProducts, $arrReturn) : $arrReturn;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->log('Advanced product filter \"'.$filter.'\" not found.', __METHOD__, TL_ERROR);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$arrNames[] = $GLOBALS['TL_LANG']['tl_iso_products']['filter_'.$filter][0];\n\t\t\t}\n\n\t\t\t$GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root'] = $arrProducts;\n\t\t\t$GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['breadcrumb'] .= '<p class=\"tl_info\">' . $GLOBALS['TL_LANG']['tl_iso_products']['filter'][0] . ': ' . implode(', ', $arrNames) . '</p><br>';\n\t\t}\n\t}", "title": "" }, { "docid": "33132051fe49450990980a8cc3c95930", "score": "0.50431615", "text": "private function addFilters()\n {\n if (!empty($this->filters) && is_string($this->filters)) {\n try {\n $this->filters = unserialize($this->filters);\n } catch (Exception $e) {\n $this->filters = null;\n }\n }\n if (empty($this->filters)) {\n return;\n }\n\n if (xarUserIsLoggedIn()) {\n // get the direct parents of the current user (no ancestors)\n $grouplist = xarCache::getParents();\n } else {\n // check anonymous visitors by themselves\n $grouplist = array(_XAR_ID_UNREGISTERED);\n }\n\n foreach ($grouplist as $groupid) {\n if (empty($this->filters[$groupid])) {\n continue;\n }\n foreach ($this->filters[$groupid] as $filter) {\n if (!isset($this->properties[$filter[0]])) {\n // skip filters on unknown properties\n continue;\n }\n $whereclause = '';\n // TODO: cfr. getwhereclause in search ui\n if ($filter != 'in' && !is_numeric($filter[2])) {\n // escape single quotes\n $filter[2] = str_replace(\"'\", \"\\\\'\", $filter[2]);\n $filter[2] = \"'\" . $filter[2] . \"'\";\n }\n switch ($filter[1])\n {\n case 'in':\n $whereclause = ' IN (' . $filter[2] . ')';\n break;\n case 'eq':\n case 'gt':\n case 'lt':\n case 'ne':\n default:\n $whereclause = ' ' . $filter[1] . ' ' . $filter[2];\n break;\n }\n if (!empty($this->where)) {\n // CHECKME: how about when $this->where is an array ?\n $this->where .= ' and ' . $filter[0] . $whereclause;\n } else {\n $this->where = $filter[0] . $whereclause;\n }\n }\n // one group having filters is enough here !?\n return;\n }\n }", "title": "" }, { "docid": "9df04529ecc85c8d63b4789aad2b74bb", "score": "0.5042033", "text": "public function setup_filters() {\n\n\t\t// Add a /dashboard/ rewrite rule (so no fake 'page' required)\n\t\tadd_filter( 'template_include', array( $this, 'template_include__add_section_components_rewrite_rule' ), 100 );\n\n\t\tadd_filter( 'query_vars', array( $this, 'query_vars__add_section_components_rewrite_rule' ) );\n\n\t}", "title": "" }, { "docid": "8706a02b95c296dd54933db19f0f826f", "score": "0.50407404", "text": "public function cleanBackendCache($observer) {\n /** @noinspection PhpUndefinedMethodInspection */\n $transport = $observer->getTransport();\n /** @noinspection PhpUndefinedMethodInspection */\n $tags = $transport->getTags();\n if ( !is_array($tags) ) {\n return;\n }\n $prefix = Mage::app()->getCacheInstance()->getFrontend()->getOption('cache_id_prefix');\n $oldTags = $tags;\n $doFilter = true;\n $changed = false;\n\n if ( $request = Mage::app()->getRequest() ) {\n if ('adminhtml' == $request->getRouteName() && 'cache' == $request->getControllerName()) {\n // We will always allow System > Cache Management\n $doFilter = false;\n }\n }\n if ( !empty($_SERVER['SCRIPT_FILENAME']) ) {\n $baseScript = basename($_SERVER['SCRIPT_FILENAME']);\n if ( 'n98-magerun.phar' == $baseScript || 'n98-magerun' == $baseScript || 'n98' == $baseScript ) {\n // We will always allow N98 Magerun\n $doFilter = false;\n }\n }\n\n if ( $doFilter ) {\n if ( empty($tags) && ! Mage::getStoreConfigFlag( self::CONFIG_SECTION . '/flushes/_without_tags' )) {\n $changed = true; // so we will check if empty later on\n }\n $filters = array( 'catalog_product',\n 'catalog_category',\n 'cms_page',\n 'cms_block',\n 'translate',\n 'store',\n 'website',\n 'block_html',\n 'mage' );\n foreach ($filters as $filter) {\n if ( ! Mage::getStoreConfigFlag( self::CONFIG_SECTION . '/flushes/' . $filter ) ) {\n $newTags = array();\n foreach ($tags as $tag) {\n if ( 0 !== stripos( $tag, $prefix . $filter ) && \n 0 !== stripos( $tag, $filter ) ) {\n $newTags[ ] = $tag;\n } else {\n $changed = true;\n }\n }\n $tags = $newTags;\n }\n }\n if ( $changed && empty($tags) ) {\n $tags[] = 'MAGEHOST_BLOCKCACHE_DUMMY_TAG';\n }\n }\n\n if ( Mage::getStoreConfigFlag(self::CONFIG_SECTION.'/logging/flushes') && class_exists('Zend_Log') ) {\n $message = 'Magento cache flush. Tags:' . $this->logTags($oldTags,$prefix);\n if ( $changed ) {\n $message .= ' AfterFilter:' . $this->logTags($tags,$prefix);\n }\n if ( !$doFilter ) {\n $message .= ' Filter is disabled for this request';\n }\n $message .= $this->getLogSuffix();\n Mage::log( $message, Zend_Log::INFO, self::FLUSH_LOG_FILE );\n Mage::register('MageHost_CacheMate_Logged',__FUNCTION__,true);\n }\n\n /** @noinspection PhpUndefinedMethodInspection */\n $transport->setTags($tags);\n }", "title": "" }, { "docid": "90099c4502e17769733bcbec6170c4c0", "score": "0.5032873", "text": "function filters_disable() {\n // This hacks subsequent handlers' options so they are no longer exposed.\n // Incoming values from these on submit will be simply ignored.\n foreach ($this->filters_kill as $filter_id) {\n $this->view->filter[$filter_id]->options['exposed'] = FALSE;\n }\n }", "title": "" }, { "docid": "5795bfbc1cb6052ce4cacd820900df71", "score": "0.50305754", "text": "function remove_filters_user_clauses(){\n\n\tif( bp_current_component() == \"members\" ){\n\t\tremove_filter('bp_user_query_uid_clauses', 'bp_xprofile_bp_user_query_search');\n\t\tremove_filter('bp_user_query_uid_clauses', 'bps_uid_clauses',99);\t\n\t}\n\n}", "title": "" }, { "docid": "02a05cec3a99225a28be2f6af2e6bd70", "score": "0.50279987", "text": "public static function installFilters()\n {\n // Get the Page List+ package first\n $pageListPlusPackage = Package::getByHandle('skybluesofa_page_list_plus');\n\n // If the page List+ Package exists, then we'll refresh all filters for all installed packages\n if ($pageListPlusPackage) {\n \\Concrete\\Package\\SkybluesofaPageListPlus\\Src\\Installer::refreshFilters();\n }\n }", "title": "" }, { "docid": "dbbf1057d6b6f00a980461cb48c4d7b4", "score": "0.5026661", "text": "private static function add_filters() {\n\t\tadd_filter( 'template_redirect', array( __CLASS__, 'handle_request' ) );\n\t\tadd_filter( 'comment_class', array( __CLASS__, 'add_comment_class' ) );\n\t}", "title": "" }, { "docid": "4f283ce5ddae7321a140526798770752", "score": "0.5026202", "text": "public function remove_default_hooks(){\r\n\r\n //remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\r\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );\r\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );\r\n //remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );\r\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\r\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );\r\n //remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );\r\n\r\n }", "title": "" }, { "docid": "d80926d722b68fb7d81bba0c8dfadc38", "score": "0.50249994", "text": "public function purgeAll()\n {\n // Clear all of CloudFront's caches\n $this->invalidateCdnPath('/*');\n }", "title": "" }, { "docid": "7767489d7b4fd2a5da04876fb07180bf", "score": "0.5019065", "text": "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "title": "" }, { "docid": "fb7b50cea5054fb69c1fd01636320b9a", "score": "0.49949872", "text": "public function cloudflare_purgeAll() {\r\n\r\n\r\n\t\t$cloudflare_key = esc_attr( get_option(\"cloudflare_key\"));\r\n\t\t$cloudflare_email = esc_attr( get_option('cloudflare_email'));\r\n\t\t\r\n\t\t$zoneid = esc_attr( $_POST['purgeZoneID']);\r\n\t\r\n\r\n\t\t $cf = new cloudflare_api();\r\n\t\t $res = $cf->purgeAll($cloudflare_email, $cloudflare_key, $zoneid);\r\n\t\techo json_encode($res);\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "39059165dfa253ff5e37ce6aab5e62ef", "score": "0.49895683", "text": "protected function _init()\r\n\t{\r\n\t\t$this->_filters = [\r\n\t\t\t'filter' => 'float'\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "25992a0109b4124281041bd4b03d0c47", "score": "0.49770227", "text": "public function cleanFilters(): void\n {\n // Filter $filters values\n $this->filters = collect($this->filters)->filter(function ($filterValue, $filterName) {\n $filterDefinitions = $this->filters();\n\n // Ignore search\n if ($filterName === 'search') {\n return true;\n }\n\n // Filter out any keys that weren't defined as a filter\n if (! isset($filterDefinitions[$filterName])) {\n return false;\n }\n\n // Ignore null values\n if (is_null($filterValue)) {\n return true;\n }\n\n // Handle 'select' filters\n if ($filterDefinitions[$filterName]->isSelect()) {\n foreach ($this->getFilterOptions($filterName) as $optionValue) {\n // If the option is an integer, typecast filter value\n if (is_int($optionValue) && $optionValue === (int)$filterValue) {\n return true;\n }\n\n // Strict check the value\n if ($optionValue === $filterValue) {\n return true;\n }\n }\n }\n\n if ($filterDefinitions[$filterName]->isDate()) {\n // array_sum trick is a terse way of ensuring that PHP\n // did not do \"month shifting\"\n // (e.g. consider that January 32 is February 1)\n $dt = DateTime::createFromFormat(\"Y-m-d\", $filterValue);\n\n return $dt !== false && ! array_sum($dt::getLastErrors());\n }\n\n return false;\n })->toArray();\n }", "title": "" }, { "docid": "bfe84933dd516638a2b1fb9715ae1cc6", "score": "0.49737763", "text": "function clearPreEncryptFilter() {\n\t\t$this->preEncryptFilter = '';\n\t}", "title": "" }, { "docid": "29d9345a5dd376311319ad3555736b83", "score": "0.4973137", "text": "public function filterSettings()\n {\n add_filter('option_algolia_override_native_search', function () {\n return \"native\";\n });\n\n //Always disable autocomplete\n add_filter('option_algolia_autocomplete_enabled', function () {\n return \"no\";\n });\n }", "title": "" }, { "docid": "e7155c184713c01ae521849efdfbd715", "score": "0.49624658", "text": "public function mountWithFilters(): void\n {\n if (! $this->filtersEnabled) {\n return;\n }\n\n $this->checkFilters();\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.0", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" } ]
[ { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.7393118", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7328834", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "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": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.71638685", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.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": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.7073722", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7072655", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.70215225", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.6994326", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69885707", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6958746", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.693502", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.6919321", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6876466", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" }, { "docid": "f4672fc37d04d0e3bef9bc80e57323e9", "score": "0.6860329", "text": "public function create()\n {\n //\n $question= new Question();\n return view('dashboard.question.form', [\n \"question\" => $question\n ]);\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "95a4952039c4b40b058cc67fba7cd2d7", "score": "0.68573785", "text": "public function create () {\n $course = new Course();\n $btnText = __(\"Enviar curso para revisión\");\n\n return view('courses.form', compact('course', 'btnText'));\n }", "title": "" }, { "docid": "ca80651480f4bbbd35305ceefd136182", "score": "0.6853353", "text": "public function newAction()\n {\n $entity = new Alumni();\n $form = $this->createForm(new AlumniType(), $entity);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "d58534453dca5d05eb6bf9759a643eaa", "score": "0.68512565", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t}", "title": "" }, { "docid": "783d7ee63b2e492087fc641fa43b1ef1", "score": "0.684831", "text": "public function create()\n\t{\n\t\treturn View::make('fornecedors.create');\n\t}", "title": "" }, { "docid": "2d13aa784138fe895746ebaa36bda96f", "score": "0.6847265", "text": "public function create()\n {\n return view('hr.create');\n }", "title": "" }, { "docid": "1406c82292b4f07e3eecfee633a3f557", "score": "0.68437195", "text": "public function create()\n {\n return view('admin.company.form', [\n 'company' => null,\n 'route' => 'admin.company.store',\n 'method' => 'POST'\n ]);\n }", "title": "" }, { "docid": "b1d677deef4bb08323db61d502e8dcee", "score": "0.6843096", "text": "public function create()\n {\n return view('backend.book.create');\n }", "title": "" } ]
dcf1785cb631f0b5dc157ffcb24c690c
Retrieve the GrowDough Giving Card purchase URL and provide to a template.
[ { "docid": "a5895656ed4aaf62107f87c93bd2e63d", "score": "0.698561", "text": "public function givingCardPurchaseUrl(): ?string\n {\n return str_replace('donate', 'giving_cards', $this->donationsUrl());\n }", "title": "" } ]
[ { "docid": "dcd076401c64755ae0d4ce6b2b46d460", "score": "0.61707985", "text": "abstract public function getPaymentUrl();", "title": "" }, { "docid": "c5fe538a54e90ecef2a79614db94e78b", "score": "0.5951144", "text": "function hrb_get_the_order_purchase_url( $order ) {\n\t$post = hrb_get_order_post( $order );\n\n\tif ( empty( $post ) ) {\n\t\treturn;\n\t}\n\n\tif ( APPTHEMES_ORDER_PTYPE == $post->post_type ) {\n\t\t$url = hrb_get_credits_purchase_url();\n\t} else {\n\t\t$url = get_the_hrb_project_create_url( $post->ID );\n\t}\n\n\treturn $url;\n}", "title": "" }, { "docid": "6fac2d5346663478825ba34b62abafdf", "score": "0.5863583", "text": "private function makeGetUrl() {\n\n\t\t$params = array();\n\n\t\tif(!is_null($this->currency_from))\n\t\t\t$params[\"from\"] = $this->currency_from;\n\t\tif(!is_null($this->currency_to))\n\t\t\t$params[\"to\"] = $this->currency_to;\n\t\tif(is_numeric($this->currency_amount))\n\t\t\t$params[\"q\"] = $this->currency_amount;\n\n\t\treturn $this->exchange_url . http_build_query($params);\n\t}", "title": "" }, { "docid": "770d22ae78ed17379c05cd7f3d0bbd16", "score": "0.58004004", "text": "public function getBuyCreditUrl(){\n return $this->getUrl('storecredit/buy/');\n }", "title": "" }, { "docid": "f81fbcee87c4a579de755ea1fdb09122", "score": "0.5767785", "text": "public function getUrl()\n {\n return 'https://www.moneybookers.com/app/payment.pl';\n }", "title": "" }, { "docid": "341c371231cc555ddb771265cddab63b", "score": "0.5688362", "text": "public function getRedirectUrl()\n {\n /**\n * @var HostedCheckoutPurchaseRequest\n */\n $request = $this->getRequest();\n\n return 'https://'\n . (!$request->getTestMode() ? 'checkout' : 'sandbox')\n . '.bluesnap.com/buynow/checkout?'\n . 'storeId=' . strval($request->getStoreReference())\n . '&enc=' . $this->data->{'encrypted-token'};\n }", "title": "" }, { "docid": "65345306dbd4052b55f3af4e91245ca8", "score": "0.54538864", "text": "public function create_credit_card_charge() {\n\n\t\t$this->create_transaction( self::TRANSACTION_TYPE_PURCHASE );\n\t}", "title": "" }, { "docid": "859296c961a0ee53b7407f76342c5c43", "score": "0.5407248", "text": "public static function getURL()\r\n {\r\n return (self::$settings['testMode'] ? self::URL_TEST : self::URL_PRODUCTION) . 'service/' . self::API_VERSION . '/checkout/';\r\n }", "title": "" }, { "docid": "b3e70e0e5f441f14772c9ef87c61106c", "score": "0.5353791", "text": "public function getMerchantReference();", "title": "" }, { "docid": "108a3e85ab6ac1dc67775812611f6ffe", "score": "0.5338121", "text": "function purchased()\n {\n // generate escrow address as the account pass the Purchase id\n $this->purchase->address = $this->coin->generateAddress(['user' => $this->purchase->id]);\n }", "title": "" }, { "docid": "32b529da41b2ea4106f0f6e53ab6625e", "score": "0.5337262", "text": "function warquest_paypal($gold, $price, $key) {\r\n\r\n\tglobal $config;\r\n\tglobal $player;\r\n\r\n\t$tag = 'WarQuest - '.$player->name.' ['.$player->pid.']';\r\n\t\r\n\t$page =\t'<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">';\t \r\n\t$page .=\t'<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"item_name\" value=\"'.$tag.'\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"hosted_button_id\" value=\"'.$config['paypal_buy_key'.$key].'\">';\r\n\t$page .=\t'<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif\" border=\"0\" name=\"submit\" alt=\"\">';\r\n\t$page .=\t'<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">';\r\n\t$page .=\t'</form>';\r\n\t\r\n\treturn $page;\r\n}", "title": "" }, { "docid": "e5e71382dc5e1d6679b22b6d86efed65", "score": "0.531332", "text": "protected function _getTransactionUrl(){\n return ($this->_test_mode === TRUE) ? self::GATEWAY_URL_TEST_MODE : self::GATEWAY_URL_LIVE_MODE;\n }", "title": "" }, { "docid": "2ed67c99a7c5f3006f1f288ca7964e48", "score": "0.53100574", "text": "public function productRenewLink(){\n return $this->productRenewLink;\n }", "title": "" }, { "docid": "cb1dde76e273d6771496f4806bc8b54f", "score": "0.53041464", "text": "public function onTP_GetHTML($vars)\n\t{\n\t\t// Fomating on data\n\t\t$vars = $this->preFormatingData($vars);\n\t\t$plgPaymentEwayrapid3Helper = new plgPaymentEwayrapid3Helper;\n\n\t\t// Split the name in first and last name\n\t\t$user = JFactory::getUser();\n\t\t$nameParts = $user->name;\n\t\t$firstName = $user->name;\n\t\t$lastName = $user->name;\n\n\t\t// Get the base URL without the path\n\t\t$rootURL = rtrim(JURI::base(), '/');\n\t\t$subpathURL = JURI::base(true);\n\n\t\tif (!empty($subpathURL) && ($subpathURL != '/'))\n\t\t{\n\t\t\t$rootURL = substr($rootURL, 0, -1 * strlen($subpathURL));\n\t\t}\n\n\t\t// Customer\n\t\t$request = new CreateAccessCodeRequest;\n\t\t$request->Customer->Reference = $vars->order_id;\n\n\t\t// $request->Customer->TokenCustomerID=\"91665902\";\n\t\t$request->Customer->Title = 'Mr.';\n\t\t$request->Customer->FirstName = $firstName;\n\t\t$request->Customer->LastName = $lastName;\n\t\t$country = !empty($vars->country) ? strtolower(trim($vars->country)) :'au';\n\t\t$request->Customer->Country = $country;\n\t\t$request->Customer->Email = trim($vars->user_email);\n\n\t\t// Shipping details\n\t\t$request->ShippingAddress->Country = !empty($vars->country) ? strtolower(trim($vars->country)) :'au';\n\n\t\t// Item/product\n\t\t$item = new LineItem;\n\t\t$item->SKU = $vars->order_id;\n\t\t$item->Description = !empty($vars->item_name) ? strtolower(trim($vars->item_name)) :'';\n\t\t$request->Items->LineItem[0] = $item;\n\n\t\t// Payment\n\t\t$request->Payment->TotalAmount = (int) ($vars->amount * 100);\n\t\t$request->Payment->InvoiceNumber = $vars->order_id;\n\t\t$request->Payment->InvoiceDescription = \"Orderid -\" . ' #' . $vars->order_id;\n\t\t$request->Payment->InvoiceReference = $vars->order_id;\n\t\t$request->Payment->CurrencyCode = strtoupper($vars->currency_code);\n\n\t\t// Url to the page for getting the result with an AccessCode\n\t\t$vars->return = trim($vars->return);\n\t\t$request->RedirectUrl = (string) $vars->notify_url;\n\n\t\t// Populate values for Options\n\t\t$opt1 = new Option;\n\t\t$opt1->Value = $vars->user_email;\n\t\t$request->Options->Option[0] = $opt1;\n\n\t\t// Method for this request. e.g. ProcessPayment, Create TokenCustomer, Update TokenCustomer & TokenPayment\n\t\t$request->Method = 'ProcessPayment';\n\n\t\ttry\n\t\t{\n\t\t\t// Call RapidAPI\n\t\t\t$result = $this->ewayService->CreateAccessCode($request);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tJError::raiseError(500, 'You have an error in your eWay Rapid 3.0 setup: ' . $e->getMessage());\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($result->Errors))\n\t\t{\n\t\t\t$errorMsg = '';\n\n\t\t\tforeach (explode(',', $result->Errors) as $e)\n\t\t\t{\n\t\t\t\t$errorMsg .= $this->ewayService->APIConfig[$e] . ', ';\n\t\t\t}\n\n\t\t\t$errorMsg = substr($errorMsg, 0, -2);\n\t\t\tJError::raiseError(500, 'You have an error in your eWay Rapid 3.0 setup: ' . $errorMsg);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$vars->AccessCode = $result->AccessCode;\n\t\t$vars->FormActionURL = $result->FormActionURL;\n\t\t$html = $this->buildLayout($vars);\n\t/*\t@ob_start();\n\t\tinclude dirname(__FILE__).'/ewayrapid3/form.php';\n\t\t$html = @ob_get_clean();\n\t*/\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "40af235ded901f70df855498335aec22", "score": "0.5302996", "text": "function payswarm_get_purchase_url(\n $host, $listing_id, $listing_hash, $callback) {\n\n // get purchase URL from authority config\n $config = payswarm_get_authority_config($host);\n $purchase_url = $config->paymentService;\n\n // add query parameters to the purchase URL\n $purchase_url = payswarm_add_query_vars(\n $purchase_url, array(\n 'listing' => $listing_id,\n 'listing-hash' => $listing_hash,\n 'callback' => $callback,\n 'response-nonce' => payswarm_create_nonce())\n );\n\n return $purchase_url;\n}", "title": "" }, { "docid": "bc7815aff9df4d7383f56a236ec6ae7b", "score": "0.52673656", "text": "function _getReturnUrl($id)\n {\n return SITE_URL . '/pay/' . $id;\n }", "title": "" }, { "docid": "3b05c9343fd3b002ac646d3b0f85d654", "score": "0.5263763", "text": "public function get_request_url( $order) {\n $order = new WC_Order( $order );\n $orderTotal = $order->get_total() * 100;\n $orderID = $order->id;\n // Get admin options\n $merchantID = $this->gateway->merchant_id;\n $access_code = $this->gateway->access_code;\n $md5HashData = $this->gateway->secret_hash;\n $secret_hash = $this->gateway->secret_hash;\n $vpc_ReturnURL = $this->notify_url;\n // Set request URL\n $vpcURL = 'https://migs.mastercard.com.au/vpcpay' . '?';\n $vpc_MerchTxnRef = 'woo-payment';\n $data = array(\n 'vpc_Version' => '1',\n 'vpc_Locale' => 'en',\n\t\t\t 'vpc_Command' => 'pay',\n\t\t\t'vpc_AccessCode' => $access_code,\n\t\t\t'vpc_MerchTxnRef' => $vpc_MerchTxnRef,\n\t\t\t'vpc_Merchant' => $merchantID,\n\t\t\t'vpc_OrderInfo' => 'woo-order_'.$orderID,\n\t\t\t'vpc_Amount' => $orderTotal,\n\t\t\t'vpc_ReturnURL' => $vpc_ReturnURL\n\t\t\t//'vpc_Currency' => get_woocommerce_currency()\n );\n ksort ($data);\n // set a parameter to show the first pair in the URL\n $appendAmp = 0;\n /* foreach($data as $key => $value) {\n\t\t\t if(in_array($key, array('vpc_SecureHash', 'vpc_SecureHashType'))) continue;\n // create the md5 input and URL leaving out any fields that have no value\n if (strlen($value) > 0) {\n // this ensures the first paramter of the URL is preceded by the '?' char\n if ($appendAmp == 0) {\n $vpcURL .= $key . '=' . $value;\n $appendAmp = 1;\n } else {\n $vpcURL .= '&' . $key . \"=\" . $value;\n }\n $md5HashData .= $value;\n }\n } \n // Create the secure hash and append it to the Virtual Payment Client Data if\n // the merchant secret has been provided.\n if (strlen($md5HashData) > 0) {\n //$vpcURL .= \"&vpc_SecureHash=\" . strtoupper(md5($md5HashData));\n $vpcURL .= \"&vpc_SecureHash=\" . strtoupper(hash_hmac('SHA256',$md5HashData,pack('H*',$access_code))).\"&vpc_SecureHashType=SHA256\";\n } */\n\t$sha256 = \"\";\t\n\tksort ( $data );\n\tforeach($data as $key => $value) {\t\n\t\tif ( strlen( $value ) > 0 ) {\n\t\t\tif ( $appendAmp == 0 ) {\n\t\t\t\t$vpcURL .= $key . '=' . $value ;\n\t\t\t\t$appendAmp = 1;\n\t\t\t} else {\n\t\t\t\t$vpcURL .= '&' . $key . \"=\" . $value ;\n\t\t\t}\n\t\t\t$sha256 .= $key .\"=\". $value .\"&\";\n\t\t}\n\t}\n\t$sha256 = rtrim($sha256,\"&\");\n\t$vpcURL .= \"&vpc_SecureHash=\". strtoupper( hash_hmac( 'SHA256', $sha256, pack( \"H*\", $secret_hash ) ) );\n\t$vpcURL .= \"&vpc_SecureHashType=SHA256\";\n\t\t#die($vpcURL);\n return $vpcURL;\n }", "title": "" }, { "docid": "58ee87ce3f8639f942e685e9c9d838cd", "score": "0.52320904", "text": "public function getNewUrl()\n {\n return $this->_getUrl('customer/cc/new');\n }", "title": "" }, { "docid": "3a96aaa4d4eb961f43a0af6dab481165", "score": "0.5232076", "text": "private function getUrl()\r\n {\r\n if (is_null($this->url)) {\r\n switch ($this->config['environment']) {\r\n case 'sandbox':\r\n case 'beta-sandbox':\r\n $this->url = \"https://api-3t.sandbox.paypal.com/nvp\";\r\n break;\r\n default:\r\n\t\t\t\t /** $this->url = \"https://api-3t.$environment.paypal.com/2.0\"; */\r\n $this->url = \"https://api-3t.paypal.com/nvp\";\r\n }\r\n }\r\n return $this->url;\r\n }", "title": "" }, { "docid": "bd3a067a82d0ef087b508178d062d88b", "score": "0.51892954", "text": "public function payment_page_get()\n {\n //set the default amount \n\n //create ref number\n $ref_str = $this->generateRef->return_checked_str(10, '', array('uppercase', 'number', 'uppercase', 'lowercase')); \n $data['ref'] = $ref_str;\n //get user id from the curl or the get\n $user_id = $this->get('user_id');\n //get user emial from user id\n $email = $this->generateRef->return_user_email($user_id); \n $data['email'] = $email;\n //get cause id\n $cause_id = $this->get('cause_id');\n //in cases of api being used by other parties and not a cause on payrallel\n if (empty($cause_id)) {\n //$data['cause_id'] = 01;\n } else {\n $data['cause_id'] = $cause_id;\n }\n\n\n //set transaction description\n\n $description = $this->get('description');\n //set default descripion as blank\n if (empty($description)) {\n $data['description'] = \"\";\n } else {\n $data['description'] = $description;\n }\n \n //adding other info to the payment data\n //set date of transaction created\n $data['first_trans_date'] = date('Y-m-d H:i:s');\n\n //set type of payment\n $type_of_payment = $this->get('type_of_payment');\n if (empty($type_of_payment)) {\n $data['type_of_payment'] = 'Payralel API';\n } else {\n $data['type_of_payment'] = $type_of_payment;\n }\n //get currency\n $currency = $this->get('currency');\n //set the default currency to NAIRA\n if (empty($currency)) {\n $currency = \"NIR\";\n } \n\n //check if the currency is allowed or valid\n //would make this code better later\n //maybe get its data from a database table of allowed currency\n //but for now manually check\n if ($currency == \"NIR\") {\n $data['currency'] = $currency;\n }\n //allow Dollar USD\n elseif ($currency == \"USD\") {\n $data['currency'] = $currency;\n }\n //allow POUNDS GBP\n elseif ($currency == \"GBP\") {\n $data['currency'] = $currency;\n }\n //allow EUROS EUR\n elseif ($currency == \"EUR\") {\n $data['currency'] = $currency;\n }\n //allow YEN \n elseif ($currency == \"YEN\") {\n $data['currency'] = $currency;\n }\n else {\n // Invalid currency, set the response and exit.\n $this->response([\n 'status' => FALSE,\n 'error_code' => 3001,\n 'message' => 'Currency not supported'\n ], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n \n \n //get the amount from curl\n $amount = $this->get('amount');\n //check if the amount is a valid figure\n $amount = (int) $amount;\n if ($amount <= 0)\n {\n // Invalid amount, set the response and exit.\n $this->response([\n 'status' => FALSE,\n 'error_code' => 3002,\n 'message' => 'Invalid amount'\n ], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n \n //check if the amount is greater than #50\n\n if ($currency == \"NIR\") {\n if ($amount < 50) {\n // Invalid amount, set the response and exit.\n $this->response([\n 'status' => FALSE,\n 'error_code' => 3003,\n 'message' => 'Amount too small'\n ], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n if ($amount > 2000000) {\n // Invalid amount, set the response and exit.\n $this->response([\n 'status' => FALSE,\n 'error_code' => 3004,\n 'message' => 'Amount too large'\n ], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n }\n else{\n if ($amount > 10000) {\n // Invalid amount, set the response and exit.\n $this->response([\n 'status' => FALSE,\n 'error_code' => 3004,\n 'message' => 'Amount too large'\n ], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n } \n $data['amount'] = $amount;\n\n //create new type of refernce that includes the date of creation\n $data['reference'] = $ref_str.\"-\". date('Ymd');\n\n //get goal goal type \n $goal_type = $this->get('goal_type');\n //set the default goal type\n if (empty($goal_type)) {\n $data['goal_type'] = 'Payralel API';\n } else {\n $data['goal_type'] = $goal_type;\n }\n\n //set the transaction status\n $data['status'] = \"pending\";\n //set the transaction message\n $data['message'] = \"Pending payment\";\n $data['domain'] = $this->agent->referrer();\n \n //we have to log this details in the database first so that we could include the cause id that the payment is for\n //set the status as pending\n //update after succesful payment\n\n $this->generateRef->createTransaction($data);\n\n //get the users cards from user id\n //added this last so that it doesnt add the data to the transaction data\n $user_cards = $this->generateRef->return_payment_info($user_id);\n if (empty($user_cards)) {\n $data['user_cards'] = \"No Cards for user\";\n } else {\n $data['user_cards'] = $user_cards;\n }\n \n \n\n //so instead of outputing and passing the data to the view.. \n //we would just pass the data as the response\n\n\n\n $this->set_response($data, REST_Controller::HTTP_OK); \n}", "title": "" }, { "docid": "9502610ea7418df3761cbcbe9982b84c", "score": "0.51841956", "text": "public function getOrderPlaceRedirectUrl()\n {\n $name = Mage::helper('hyperpay')->getNameData($this->getOrder());\n $address = Mage::helper('hyperpay')->getAddressData($this->getOrder());\n $contact = Mage::helper('hyperpay')->getContactData($this->getOrder());\n $basket = Mage::helper('hyperpay')->getBasketData($this->getOrder());\n\n $credentials = $this->getCredentials();\n $server = $this->getServerMode();\n\n Mage::getSingleton('customer/session')->setServerMode($server);\n\n $lang='';\n $jsUrl = getJsUrl($server,$lang);\n Mage::getSingleton('customer/session')->setJsUrl($jsUrl); \n\n $dataCust['first_name'] = $name['first_name'];\n $dataCust['last_name'] = $name['last_name'];\n $dataCust['street'] = $address['street'];\n $dataCust['zip'] = $address['zip'];\n $dataCust['city'] = $address['city'];\n $dataCust['country_code'] = $address['country_code'];\n $dataCust['email'] = $contact['email'];\n //$dataCust['amount'] = $basket['amount'];\n //$dataCust['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();\n $dataCust['amount'] = $basket['baseAmount'];\n $dataCust['currency'] = $basket['baseCurrency']; \n\n $dataTransaction = $credentials;\n $dataTransaction['tx_mode'] = $this->getTransactionMode();\n $dataTransaction['payment_type'] = $this->getHyperpayTransactionCode();\n $dataTransaction['orderId'] = Mage::getModel(\"sales/order\")->getCollection()->getLastItem()->getIncrementId();\n\n $postData = getPostParameter($dataCust,$dataTransaction);\n\n $url = getTokenUrl($server);\n \n $token = getToken($postData,$url);\n \n Mage::getSingleton('customer/session')->setIframeToken($token); \n Mage::getSingleton('customer/session')->setIframeName($name['first_name'].' '.$name['last_name']); \n Mage::getSingleton('customer/session')->setIframeBrand($this->_accountBrand); \n Mage::getSingleton('customer/session')->setIframeFrontendResponse(Mage::getUrl('hyperpay/response/handleCpResponse/',array('_secure'=>true))); \n\n if ($token != '') {\n $this->_paymentform();\n } else {\n Mage::throwException(Mage::helper('hyperpay')->__('Error before redirect'));\n }\n\n\t\treturn Mage::getSingleton('customer/session')->getRedirectUrl();\n }", "title": "" }, { "docid": "0e840428ef4c6ab3f431b61bce56a259", "score": "0.5181896", "text": "public function generate_releaseurl(Order $order) {\n\t\t\t$url = $this->generate_ordersredirurl();\n\t\t\t$url->query->setData(array('action' => 'release-order','ordn' => $order->ordernumber));\n\t\t\treturn $url->getUrl();\n\t\t}", "title": "" }, { "docid": "1a6995d7dbbc2c83066ac8b9f2297bde", "score": "0.5175824", "text": "public function getCustomerSignUp(){\n return $this->getUrl('customer/account/create');\n }", "title": "" }, { "docid": "0274df60b2d6117b98ca2c6fbec0ebb2", "score": "0.5161181", "text": "public function quote()\r\n\t{\r\n\t\t$merchant_id = ($this->dev_merchant_id)? $this->dev_merchant_id : $this->merchant_id;\r\n\r\n\t\t$data[\"header_html\"] = $this->construct_header(\"ship\");\r\n\t\t$data[\"sidebar_html\"] = $this->construct_ship_sidebar(\"quote\");\r\n\t\t$this->load->view('marketing/product_merchant/ship/pricequote', $data);\r\n\t}", "title": "" }, { "docid": "8a9f1d12e80b25eb4bb1b35d181fc9c1", "score": "0.5154295", "text": "function echo_purchase_link( $post_id, $class) {\n\t$purchase_link = get_field('purchase_link', $post_id );\n\n\tif ( $purchase_link ) :\n\t\techo '<a href=\"';\n\t\tif ( strpos( $purchase_link, 'http' ) !== false ) :\n\t\t\techo $purchase_link;\n\t\telse :\n\t\t\techo 'http://' . $purchase_link;\n\t\tendif;\n\t\techo '\" class=\"' . $class . '\" target=\"_blank\">Buy</a>';\n\tendif;\n}", "title": "" }, { "docid": "a43adb08e5356be98deb4c0a866a9358", "score": "0.5114574", "text": "protected function _getUrl()\n {\n $url = $this->getData('value');\n $config = $this->getData('field_config');\n\n if (!empty($url)) {\n /* @var $config Varien_Simplexml_Element */\n if (!empty($config->base_url)) {\n $el = $config->descend('base_url');\n $urlType = empty($el['type']) ? 'link' : (string)$el['type'];\n $url = Mage::getBaseUrl($urlType) . (string)$config->base_url . '/' . $url;\n }\n } else {\n preg_match(\"/groups\\[([a-zA-Z_]*)/\", $this->getData('name'), $imageName);\n\n if (isset($imageName[1])) {\n $url = Mage::helper('ops/payment')->getPaymentDefaultLogo($imageName[1]);\n }\n }\n\n return $url;\n }", "title": "" }, { "docid": "06e9c4788e3fac370686f139319b7165", "score": "0.51137817", "text": "public function get_renewal_url() {\r\n\t\tif ( ! isset( $this->user->renewal_url ) ) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\treturn $this->user->renewal_url;\r\n\t}", "title": "" }, { "docid": "6abfe939d8125ec19a77eb306a854e4b", "score": "0.5113545", "text": "public function getCartTemplate();", "title": "" }, { "docid": "a9071c0cf5abbb12699f54eb2605b45c", "score": "0.5109268", "text": "public function createLinkByPurchaseDetails(){\n\t\t\n\t\tglobal $Gascomb;\n\t\t// Verificamos la existencia dentro de la tabla compras\n\t\t$Compra = new InventoryControlPurchase();\n\t\t$Compra->id_purchase = '11';\n\t\t\n\t\t$existencia_proveedor \t= $Compra->getExistencia();\n\t\t$cantidad\t\t= $this->getCantidad();\n\t\techo $existencia_proveedor;\n\t\techo $cantidad;\n\t\t\n\t\t// Caso cuando la existencia es mayor a la cantidad solicitada\n\t\tif( $existencia_proveedor >= $cantidad ){\n\t\t\t\n\t\t\t//Si esta el articulo dentro del inventario y hay en existencia\n\t\t\t$data = array(\n\t\t\t\t\t\"folio_id\" => $this->obj_stock->folio,\n\t\t\t\t\t\"stock_id\" => $this->obj_stock->getStockIdByDetails( $this->stock_details_id ),\n\t\t\t\t\t\"stock_details_id\" => $this->stock_details_id,\n\t\t\t\t\t\"id_inventory_control\" => $this->id_inventory_control,\n\t\t\t\t\t\"id_inventory_purchase\" => $Compra->id_purchase, \n\t\t\t\t\t\"cantidad\" => $cantidad,\n\t\t\t\t\t\"user_id\" => $Gascomb->session_user_id(),\n\t\t\t\t\t\"fecha_ingreso\" => time(),\n\t\t\t\t\t\"fecha_modificacion\" => time()\n\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$db = new manejaDB(BD_STOCK_USER,BD_STOCK_PASSWORD,BD_STOCK_DATABASE,BD_STOCK_SERVER);\n\t\t\t$db->makeQueryInsert(Table_Inventory_Link,$data);\n\t\t\t$db->desconectar();\n\t\t\t\n\t\t\t// Actualizamos el status de la tabla stock\n\t\t\t$this->obj_stock->updateStockStatusLink($this->stock_details_id);\n\t\t\t\n\t\t\techo $this->jsonMessage['link'];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// Notificamos que no tenemos producto en existencia\n\t\t\techo $this->jsonMessage['existencia']; \n\t\t}// Notificamos que no tenemos producto en existencia\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\tglobal $Gascomb;\n\n\t\t$existencia = $this->getExistenciaID($this->id_inventory_control);\n\t\t$cantidad\t= $this->obj_stock->getQuantityFromDetaisID($this->stock_details_id);\n\t\t$existencia = (isset( $existencia[0]['existencia'] )) ? $existencia[0]['existencia'] : 0;\n\t\t$cantidad\t= (isset( $cantidad[0]['quantity'] )) ? $cantidad[0]['quantity'] : 0;\n\t\t\n\t\tif( $existencia >= $cantidad ){\n\t\t\t\n\t\t\t//Si esta el articulo dentro del inventario y hay en existencia\n\t\t\t$data = array(\n\t\t\t\t\t\"folio_id\" => $this->obj_stock->folio,\n\t\t\t\t\t\"stock_id\" => $this->obj_stock->getStockIdByDetails( $this->stock_details_id ),\n\t\t\t\t\t\"stock_details_id\" => $this->stock_details_id,\n\t\t\t\t\t\"id_inventory_control\" => $this->id_inventory_control,\n\t\t\t\t\t\"cantidad\" => $cantidad,\n\t\t\t\t\t\"user_id\" => $Gascomb->session_user_id(),\n\t\t\t\t\t\"fecha_ingreso\" => time(),\n\t\t\t\t\t\"fecha_modificacion\" => time()\n\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$db = new manejaDB(BD_STOCK_USER,BD_STOCK_PASSWORD,BD_STOCK_DATABASE,BD_STOCK_SERVER);\n\t\t\t$db->makeQueryInsert(Table_Inventory_Link,$data);\n\t\t\t$db->desconectar();\n\t\t\t\n\t\t\t// Actualizamos el status de la tabla stock\n\t\t\t$this->obj_stock->updateStockStatusLink($this->stock_details_id);\n\t\t\t\n\t\t\techo $this->jsonMessage['link'];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// Notificamos que no tenemos producto en existencia\n\t\t\techo $this->jsonMessage['existencia']; \n\t\t}\n\t\t\n\t\t*/\n\t\t\n\t}", "title": "" }, { "docid": "8189bcd32aec38f2dcd7b35a05030e0c", "score": "0.50743026", "text": "public function purchase(){\n $data = array(\n Input::get('apikey'),\n Input::get('currency'),\n Input::get('amount'),\n Input::get('return_url'),\n Input::get('payprovider'),\n Input::get('cdata1'),\n Input::get('cdata2')\n );\n return View::make('merchant.purchase')\n ->with('data', $data)\n ->with('title', 'Enzympay - Purchase Method');\n }", "title": "" }, { "docid": "0ad2fb093bf972e64caac723dc84d0df", "score": "0.5062321", "text": "public function getUrl()\n\t{\n\t\t$this->getPin();\n\t\t\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "be0e5e7b83ee0feae0ee8cc9e6a6de8e", "score": "0.50532234", "text": "function TorgItem_GenerateUrl($LangId, $prodid, $prodname=\"\", $make_url=\"\" ) { global $upd_link_db;\r\n\treturn $prodid;\r\n}", "title": "" }, { "docid": "72ed076fa4bfd42e02dff0101d2d810b", "score": "0.503969", "text": "protected function getUrl(array $options)\n {\n $query = $this->buildUrl($options);\n return sprintf('credit?%s', $query);\n }", "title": "" }, { "docid": "476dd7f34b3b8142582c0d0ecef030c4", "score": "0.5032652", "text": "public function purchase_return()\n\t{\n\t\t$hash = $this->CI->input->post('HashDigest');\n\n\t\t//Prepare a string of data based on the Public and Private details\n\t\t$hash_string = 'PreSharedKey='.$this->setting('preshared_key').'&';\n\t\t$hash_string .= 'MerchantID='.$this->setting('merchant_id').'&';\n\t\t$hash_string .= 'Password='.$this->setting('password').'&';\n\t\t$hash_string .= 'StatusCode='.$this->CI->input->post('StatusCode').'&';\n\t\t$hash_string .= 'Message='.$this->CI->input->post('Message').'&';\n\t\t$hash_string .= 'PreviousStatusCode='.$this->CI->input->post('PreviousStatusCode').'&';\n\t\t$hash_string .= 'PreviousMessage='.$this->CI->input->post('PreviousMessage').'&';\n\t\t$hash_string .= 'CrossReference='.$this->CI->input->post('CrossReference').'&';\n\t\t$hash_string .= 'AddressNumericCheckResult='.$this->CI->input->post('AddressNumericCheckResult').'&';\n\t\t$hash_string .= 'PostCodeCheckResult='.$this->CI->input->post('PostCodeCheckResult').'&';\n\t\t$hash_string .= 'CV2CheckResult='.$this->CI->input->post('CV2CheckResult').'&';\n\t\t$hash_string .= 'ThreeDSecureAuthenticationCheckResult='.$this->CI->input->post('ThreeDSecureAuthenticationCheckResult').'&';\n\t\t$hash_string .= 'CardType='.$this->CI->input->post('CardType').'&';\n\t\t$hash_string .= 'CardClass='.$this->CI->input->post('CardClass').'&';\n\t\t$hash_string .= 'CardIssuer='.$this->CI->input->post('CardIssuer').'&';\n\t\t$hash_string .= 'CardIssuerCountryCode='.$this->CI->input->post('CardIssuerCountryCode').'&';\n\t\t$hash_string .= 'Amount='.$this->CI->input->post('Amount').'&';\n\t\t$hash_string .= 'CurrencyCode='.$this->CI->input->post('CurrencyCode').'&';\n\t\t$hash_string .= 'OrderID='.$this->CI->input->post('OrderID').'&';\n\t\t$hash_string .= 'TransactionType='.$this->CI->input->post('TransactionType').'&';\n\t\t$hash_string .= 'TransactionDateTime='.$this->CI->input->post('TransactionDateTime').'&';\n\t\t$hash_string .= 'OrderDescription='.$this->CI->input->post('OrderDescription').'&';\n\t\t$hash_string .= 'CustomerName='.$this->CI->input->post('CustomerName').'&';\n\t\t$hash_string .= 'Address1='.$this->CI->input->post('Address1').'&';\n\t\t$hash_string .= 'Address2='.$this->CI->input->post('Address2').'&';\n\t\t$hash_string .= 'Address3='.$this->CI->input->post('Address3').'&';\n\t\t$hash_string .= 'Address4='.$this->CI->input->post('Address4').'&';\n\t\t$hash_string .= 'City='.$this->CI->input->post('City').'&';\n\t\t$hash_string .= 'State='.$this->CI->input->post('State').'&';\n\t\t$hash_string .= 'PostCode='.$this->CI->input->post('PostCode').'&';\n\t\t$hash_string .= 'CountryCode='.$this->CI->input->post('CountryCode').'&';\n\t\t$hash_string .= 'EmailAddress='.$this->CI->input->post('EmailAddress').'&';\n\t\t$hash_string .= 'PhoneNumber='.$this->CI->input->post('PhoneNumber');\n\n\t\t//Hash the string\n\t\t$hash_string = sha1($hash_string);\n\n\t\t//Compare string to that supplied by Cardsave\n\t\tif($hash !== $hash_string){\n\t\t\treturn new Merchant_response('failed', $this->CI->input->post('Message'), lang('cardsave_invalid_hash'));\t\n\t\t}\n\n\t\t//If it does match, see if it went triugh OK\n\t\t$transauthorised = FALSE; \n\t\tswitch (intval($this->CI->input->post('StatusCode')))\n\t\t{\n\t\t\t// transaction authorised\n\t\t\tcase 0:\n\t\t\t\t$transauthorised = TRUE;\n\t\t\t\tbreak;\n\t\t\t// card referred (treat as decline)\n\t\t\tcase 4:\n\t\t\t\t$transauthorised = FALSE;\n\t\t\t\tbreak;\n\t\t\t// transaction declined\n\t\t\tcase 5:\n\t\t\t\t$transauthorised = FALSE;\n\t\t\t\tbreak;\n\t\t\t// duplicate transaction\n\t\t\tcase 20:\n\t\t\t\t// need to look at the previous status code to see if the\n\t\t\t\t// transaction was successful\n\t\t\t\tif (intval($this->CI->input->post('PreviousStatusCode')) == 0)\n\t\t\t\t{\n\t\t\t\t\t// transaction authorised\n\t\t\t\t\t$transauthorised = FALSE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// transaction not authorised\n\t\t\t\t\t$transauthorised = FALSE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// error occurred\n\t\t\tcase 30:\n\t\t\t\t$transauthorised = FALSE;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$transauthorised = FALSE;\n\t\t\t\tbreak;\n\t\t}\n\t\n\t\tif ($transauthorised == TRUE) \n\t\t{\n\t\t\t$transaction_id = str_replace(\"AuthCode: \", \"\", $this->CI->input->post('Message'));\t\n\t\t\treturn new Merchant_response('complete', $this->CI->input->post('Message'), $transaction_id);\n\t\t}\n\t\telse{\n\t\t\treturn new Merchant_response('failed', $this->CI->input->post('Message'), $this->CI->input->post('CrossReference'));\n\t\t} \t\t\n\t}", "title": "" }, { "docid": "440a89b74d212f91b19b3908763c9c3d", "score": "0.4990193", "text": "public function action_purchase()\n\t{\n\t\tif(isset($_POST['stripeToken'])) {\n\t\t\t$token = $_POST['stripeToken'];\n\n\t\t\t// TODO: put stripe version dir in config\n\t\t\trequire_once(ABSPATH.'lib/stripe-php-2.1.1/vendor/autoload.php');\n\n\t\t\t\\Stripe\\Stripe::setApiKey(Conf::STRIPE_SECRET_KEY);\n\n\t\t\t$customer = \\Stripe\\Customer::create(array(\n\t\t\t 'email' => $_POST['stripeEmail'],\n\t\t\t 'card' => $token\n\t\t\t));\n\n\t\t\t$msg = '';\n\t\t\t$capture_results = false;\n\t\t\ttry {\n\t\t\t $charge = \\Stripe\\Charge::create(array(\n\t\t\t 'customer' => $customer->id,\n\t\t\t 'amount' => 5000,\n\t\t\t 'currency' => 'usd'\n\t\t\t ));\n\t\t\t $capture_results = $charge->id;\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$e_body = $e->getJsonBody();\n\t\t\t \t$e_err = $e_body['error'];\t\t\n\t\t\t\t$msg = $e_err['message'];\n\t\t\t\t//return false;\n\t\t\t}\t\t \t\t \n\n\t\t\tif($capture_results === false) {\n\t\t\t\theader(\"Location: \" .'index.php?action=purchaseresultsfail' ) ;\n\t\t\t} else {\n\t\t\t\t$this->recordCharge($charge);\n\t\t\t\theader(\"Location: \" .'index.php?action=purchaseresultspass&orderid='.$charge->id ) ;\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "aa5239f7b994cb7ee126675fef32357b", "score": "0.4987796", "text": "public function getInteractionUrl(): string\n {\n return 'https://unitpay.ru/pay/' . $this->config->get('public');\n }", "title": "" }, { "docid": "88b8571f6b40c3934828ca1ce790c7a6", "score": "0.49730617", "text": "public function getUrl() {\n\t\t$this->_out['success'] = false;\n\t\t$id = v($this->routes->Get(3));\n\t\t$this->site->Identify();\n\t\t$ln = v($this->routes->Get(4));\n\t\tif (!empty($ln))\n\t\t\t$this->site->Set_language($ln);\n\t\t$shop = $this->core->Get_object('PC_shop_site');\n\t\t$d = $shop->products->Get($id);\n\t\tif ($d) {\n\t\t\t$pageId = $shop->products->Get_page_id($id);\n\t\t\t//$p = $this->page->Get_page($pageId);\n\t\t\t//$this->_out['url'] = $p['route'].'/'.$d['link'];\n\t\t\t$this->_out['url'] = $this->page->Get_encoded_page_link_by_id($pageId, $ln) . $d['link'];\n\t\t\t$this->_out['success'] = true;\n\t\t}\n\t}", "title": "" }, { "docid": "35697f20e22d3fa1b3ec84f7a38a9e0c", "score": "0.4957064", "text": "function cavirtex_merchant_purchase($merchantKey, $name, $price, $email, $customerName, $addr1, $addr2,\n\t$city, $prov, $post, $country, $returnUrl, $customData, $secretKey) {\n\t$customData = json_encode($customData); // Will end up being JSON within JSON\n\t$customData = array(\"data\" => $customData, \"hmac\" => hash_hmac(\"sha256\", $customData, $secretKey));\n\t$post = array(\n\t\t\"name\" => $name,\n\t\t\"price\" => $price,\n\t\t\"shipping_required\" => \"0\",\n\t\t\"cancel_url\" => \"\",\n\t\t\"return_url\" => $returnUrl,\n\t\t\"email\" => $email,\n\t\t\"customer_name\" => $customerName,\n\t\t\"address\" => $addr1,\n\t\t\"city\" => $city,\n\t\t\"province\" => cavirtex_abbreviate_province($prov),\n\t\t\"postal\" => $post,\n\t\t\"country\" => $country,\n\t\t\"format\" => \"json\",\n\t\t\"custom_1\" => json_encode($customData)\n\t);\n\t\n\tif(!empty($addr2)) {\n\t\t$post[\"address2\"] = $addr2;\n\t}\n\n\t$c = curl_init();\n\tcurl_setopt($c, CURLOPT_URL, \"https://www.cavirtex.com/merchant_purchase/\" . trim($merchantKey));\n\tcurl_setopt($c, CURLOPT_POST, true);\n\tcurl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($c, CURLOPT_POSTFIELDS, $post);\n\tcurl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);\n\tcurl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);\n\tcurl_setopt($c, CURLOPT_CAINFO, dirname(__FILE__) . \"/cavirtex/GoDaddyClass2CA.crt\");\n\t$data = curl_exec($c);\n\tcurl_close($c);\n\t/* We could do content type checking but it always returns text/html even when it's JSON...\n\t$ct = explode(\";\", curl_getinfo($c, CURLINFO_CONTENT_TYPE));\n\tcurl_close($c);\n\tif(strtolower(trim($ct[0])) != \"application/json\") {\n\t\t//return false;\n\t}\n\t*/\n\t$json = json_decode($data);\n\treturn $data === false || $json === null ? false : $json;\n}", "title": "" }, { "docid": "dbe6361ce3114214bb7130e18505d9d8", "score": "0.49560305", "text": "public function TransferToProvider()\n\t\t{\n\t\t\t$currency = GetDefaultCurrency();\n\n\t\t\t$crypt_after = \"\";\n\t\t\t$shipping_address = \"\";\n\t\t\t$shipping_zip = \"\";\n\t\t\t$total = number_format($this->GetGatewayAmount(),2,'.','');\n\t\t\t$this->_vendorname = $this->GetValue(\"vendorname\");\n\t\t\t$this->_encryptionpassword = $this->GetValue(\"encryptionpassword\");\n\t\t\t$testmode_on = $this->GetValue(\"testmode\");\n\n\t\t\tif($testmode_on == \"YES\") {\n\t\t\t\t$this->_protxurl = \"https://test.sagepay.com/gateway/service/vspform-register.vsp\";\n\t\t\t}\n\t\t\telse if ($testmode_on == \"SIMULATOR\") {\n\t\t\t\t$this->_protxurl = \"https://test.sagepay.com/Simulator/VSPFormGateway.asp\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_protxurl = \"https://live.sagepay.com/gateway/service/vspform-register.vsp\";\n\t\t\t}\n\n\n\t\t\t$description = GetLang('ProtxYourOrderFromX') . str_replace(\"&#39;\", \"'\", $GLOBALS['StoreName']);\n\n\t\t\t$billingDetails = $this->GetBillingDetails();\n\n\t\t\t$billState = '';\n\t\t\tif($billingDetails['ordbillcountrycode'] == 'US') {\n\t\t\t\t$billState = GetStateISO2ById($billingDetails['ordbillstateid']);\n\t\t\t}\n\n\t\t\tif($this->IsDigitalOrder()) {\n\t\t\t\t$ShippingAddress = array(\n\t\t\t\t\t'firstname' => $billingDetails['ordbillfirstname'],\n\t\t\t\t\t'lastname'\t=> $billingDetails['ordbilllastname'],\n\t\t\t\t\t'address1'\t=> $billingDetails['ordbillstreet1'],\n\t\t\t\t\t'address2'\t=> $billingDetails['ordbillstreet2'],\n\t\t\t\t\t'city'\t\t=> $billingDetails['ordbillsuburb'],\n\t\t\t\t\t'state'\t\t=> $billState,\n\t\t\t\t\t'country'\t=> $billingDetails['ordbillcountrycode'],\n\t\t\t\t\t'postcode'\t=> $billingDetails['ordbillzip']\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$shippingAddress = $this->getShippingAddress();\n\t\t\t\t$shipState = '';\n\t\t\t\tif($shippingAddress['country_iso2'] == 'US') {\n\t\t\t\t\t$shipState = GetStateISO2ById($shippingAddress['state_id']);\n\t\t\t\t}\n\n\t\t\t\t$ShippingAddress = array(\n\t\t\t\t\t'firstname' => $shippingAddress['first_name'],\n\t\t\t\t\t'lastname'\t=> $shippingAddress['last_name'],\n\t\t\t\t\t'address1'\t=> $shippingAddress['address_1'],\n\t\t\t\t\t'address2'\t=> $shippingAddress['address_2'],\n\t\t\t\t\t'city'\t\t=> $shippingAddress['city'],\n\t\t\t\t\t'state'\t\t=> $shipState,\n\t\t\t\t\t'country'\t=> $shippingAddress['country_iso2'],\n\t\t\t\t\t'postcode'\t=> $shippingAddress['zip']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$data = array(\n\t\t\t\t\t\t'VendorTxCode'\t\t=> $_COOKIE['SHOP_ORDER_TOKEN'] . \"_\" . rand(1,100000),\n\t\t\t\t\t\t'Amount'\t\t\t=> $total,\n\t\t\t\t\t\t'Currency'\t\t\t=> $currency['currencycode'],\n\t\t\t\t\t\t'Description'\t\t=> $description,\n\t\t\t\t\t\t'SuccessURL'\t\t=> $GLOBALS['ShopPath'].'/finishorder.php',\n\t\t\t\t\t\t'FailureURL'\t\t=> $GLOBALS['ShopPath'].'/finishorder.php?protx_failure=true',\n\t\t\t\t\t\t'CustomerName'\t\t=> str_replace(\"&\", \"\", $billingDetails['ordbillfirstname'].' '.$billingDetails['ordbilllastname']),\n\t\t\t\t\t\t'CustomerEMail'\t\t=> str_replace(\"&\", \"\", $billingDetails['ordbillemail']),\n\t\t\t\t\t\t'VendorEMail'\t\t=> str_replace(\"&\", \"\", GetConfig('OrderEmail')),\n\t\t\t\t\t\t'ContactNumber'\t\t=> str_replace(\"&\", \"\", $billingDetails['ordbillphone']),\n\n\t\t\t\t\t\t'BillingSurname'\t=> str_replace(\"&\", \"\", $billingDetails['ordbilllastname']),\n\t\t\t\t\t\t'BillingFirstnames'\t=> str_replace(\"&\", \"\", $billingDetails['ordbillfirstname']),\n\t\t\t\t\t\t'BillingAddress1'\t=> str_replace(\"&\", \"\", $billingDetails['ordbillstreet1']),\n\t\t\t\t\t\t'BillingAddress2'\t=> str_replace(\"&\", \"\", $billingDetails['ordbillstreet2']),\n\t\t\t\t\t\t'BillingCity'\t\t=> str_replace(\"&\", \"\", $billingDetails['ordbillsuburb']),\n\t\t\t\t\t\t'BillingState'\t\t=> str_replace(\"&\", \"\", $billState),\n\t\t\t\t\t\t'BillingPostCode'\t=> str_replace(\"&\", \"\", $billingDetails['ordbillzip']),\n\t\t\t\t\t\t'BillingCountry'\t=> str_replace(\"&\", \"\", $billingDetails['ordbillcountrycode']),\n\n\t\t\t\t\t\t'DeliverySurname'\t=> str_replace(\"&\", \"\", $ShippingAddress['lastname']),\n\t\t\t\t\t\t'DeliveryFirstnames'=> str_replace(\"&\", \"\", $ShippingAddress['firstname']),\n\t\t\t\t\t\t'DeliveryAddress1'\t=> str_replace(\"&\", \"\", $ShippingAddress['address1']),\n\t\t\t\t\t\t'DeliveryAddress2'\t=> str_replace(\"&\", \"\", $ShippingAddress['address2']),\n\t\t\t\t\t\t'DeliveryCity'\t\t=> str_replace(\"&\", \"\", $ShippingAddress['city']),\n\t\t\t\t\t\t'DeliveryState'\t\t=> str_replace(\"&\", \"\", $ShippingAddress['state']),\n\t\t\t\t\t\t'DeliveryPostCode'\t=> str_replace(\"&\", \"\", $ShippingAddress['postcode']),\n\t\t\t\t\t\t'DeliveryCountry'\t=> str_replace(\"&\", \"\", $ShippingAddress['country'])\n\t\t\t);\n\n\t\t\t$crypt_before = '';\n\t\t\t// Build the XOR'd crypt string as per the Protx documentation\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$crypt_before .= $key.\"=\".$value.\"&\";\n\t\t\t}\n\t\t\t$crypt_before = rtrim($crypt_before, '&');\n\n\t\t\t// Base 64 encode to make it binary-safe\n\t\t\t$crypt_after = $this->simplexor($crypt_before, $this->_encryptionpassword);\n\t\t\t$crypt_after = base64_encode($crypt_after);\n\t\t\t?>\n\t\t\t\t<html>\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<title><?php echo GetLang('RedirectingToProtx'); ?></title>\n\t\t\t\t\t</head>\n\t\t\t\t\t<body onload=\"document.forms[0].submit()\">\n\t\t\t\t\t\t<a href=\"javascript:void(0)\" onclick=\"document.forms[0].submit()\" style=\"color:gray; font-size:12px\"><?php echo GetLang('ClickIfNotRedirected'); ?></a>\n\t\t\t\t\t\t<form action=\"<?php echo $this->_protxurl; ?>\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"VPSProtocol\" value=\"2.23\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"TxType\" value=\"PAYMENT\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"Vendor\" value=\"<?php echo htmlentities($this->_vendorname); ?>\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"Crypt\" value=\"<?php echo $crypt_after; ?>\">\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "7e0074d44109f025d55514888156a291", "score": "0.49520847", "text": "public function getRenewURL()\n {\n return $this->getConfigValue('root_surl') . '/signup';\n }", "title": "" }, { "docid": "7c540fdfcf1e972a3fb86f35391c8a0b", "score": "0.49462405", "text": "function returnViewCreditCardlink($orderID) {\n\tglobal $_SESSION, $menuvar;\n\t$returnVar = \"\";\n\t\n\t$sql = \"SELECT card_type FROM `\" . DBTABLEPREFIX . \"orders_creditcards` WHERE orders_creditcards_order_id='\" . $orderID . \"' LIMIT 1\";\n\t$result = mysql_query($sql);\n\t\n\tif ($result && mysql_num_rows($result) > 0) {\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t\tif ($row['card_type'] == \"MC\") { $ccType = \"creditcard_mastercard\"; }\n\t\t\telse { $ccType = \"creditcard_visa\"; }\n\t\t\n\t\t\t$returnVar = \"<a href=\\\"\" . $menuvar['ORDERS'] . \"&action=viewCreditCard&id=\" . $orderID . \"\\\"><img src=\\\"images/\" . $ccType . \".png\\\" alt=\\\"\\\" style=\\\"width: 20px; height: 20px; border: 0px;\\\" /></a> &nbsp;\";\n\t\t}\n\t}\n\telse {}\n\t\n\treturn $returnVar;\n\t\n\tmysql_free_result($result);\n}", "title": "" }, { "docid": "71d52402c33c7faf0f6a232bb7a9db43", "score": "0.49455687", "text": "public static function getUrl(){\n\t\t$url = \"http://hcm.imeeting.vn/bigbluebutton/\";\n\t\treturn $url; \n\t}", "title": "" }, { "docid": "21b1cccc341191b30787e09b6d3eb7b7", "score": "0.49450532", "text": "public function redirectAction() { \n\t\t// Retrieve order\n\t\t$order = new Mage_Sales_Model_Order();\n\t\t$customcard['order_id'] = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n\t\t$order->loadByIncrementId( $customcard['order_id']);\n\t\t\n\t\t// Get payment gateway config data\n\t\t$customcard['action'] = Mage::getStoreConfig('payment/cashpaymentgateway_checkout/submit_url');\n\t\t$customcard['merchant_id'] = Mage::getStoreConfig('payment/cashpaymentgateway_checkout/merchant_id');\n\t\t$customcard['merchant_password'] = Mage::getStoreConfig('payment/cashpaymentgateway_checkout/merchant_password');\n\t\t\n\t\t$customcard['total_amount'] = round( $order->base_grand_total, 2 );\t\t\n\t\t$customcard['redirect_url'] = Mage::getBaseUrl().'customcard/standard/response';\n // signature genration \n\t\t$customcard['request_signature'] = Mage::helper('cashpaymentgateway')->getHashSignature($customcard['merchant_id'],$customcard['merchant_password']);\n\n // Retrieve order details\n\t\t$billingAddress = $order->getBillingAddress();\n\t\t$billingData = $billingAddress->getData();\n\t\t$shippingAddress = $order->getShippingAddress();\n\t\tif ($shippingAddress)\n\t\t\t$shippingData = $shippingAddress->getData();\n\t\t\n\t\t$customcard['billing_cust_name'] = $billingData['firstname'] . ' ' . $billingData['lastname'];\n\t\t$customcard['billing_cust_address'] = $billingAddress->street;\n\t\t$customcard['billing_cust_state'] = $billingAddress->region;\n\t\t$customcard['billing_cust_country'] = Mage::getModel('directory/country')->load($billingAddress->country_id)->getName();\n\t\t$customcard['billing_city'] = $billingAddress->city;\n\t\t$customcard['billing_zip'] = $billingAddress->postcode;\n\t\t$customcard['billing_cust_tel'] = $billingAddress->telephone;\n\t\t$customcard['billing_cust_email'] = $order->customer_email;\n\t\t\n\t\tif ($shippingAddress){\n\t\t\t$customcard['delivery_cust_name'] = $shippingData['firstname'] . ' ' . $shippingData['lastname'];\n\t\t\t$customcard['delivery_cust_address'] = $shippingAddress->street;\n\t\t\t$customcard['delivery_cust_state'] = $shippingAddress->region;\n\t\t\t$customcard['delivery_cust_country'] = Mage::getModel('directory/country')->load($shippingAddress->country_id)->getName();\n\t\t\t$customcard['delivery_city'] = $shippingAddress->city;\n\t\t\t$customcard['delivery_cust_tel'] = $shippingAddress->telephone;\t\n\t\t\t$customcard['delivery_zip'] = $shippingAddress->postcode;\n\t\t}\n\t\t\n\t\telse {\n\t\t\t$customcard['delivery_cust_name'] = '';\n\t\t\t$customcard['delivery_cust_address'] = '';\n\t\t\t$customcard['delivery_cust_state'] = '';\n\t\t\t$customcard['delivery_cust_country'] = '';\n\t\t\t$customcard['delivery_cust_tel'] = '';\n\t\t\t$customcard['delivery_city'] = '';\n\t\t\t$customcard['delivery_zip'] = '';\n\t\t}\n\t\t\t\t\t\t\t\n\t\t// Add data to registry so it's accessible in the view file\n\t\tMage::register('customcard', $customcard);\n\t\t\n\t\t// Render layout\n\t\t$this->loadLayout();\n\t\t$block = $this->getLayout()->createBlock('Mage_Core_Block_Template','customcard', array('template' => 'cashpaymentgateway/redirect.phtml'));\n\t\t$this->getLayout()->getBlock('content')->append($block);\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "8c7b99bea27a4bdb35d42a45b7161876", "score": "0.4928478", "text": "private function getUrl(): string {\n if($this->config->environment == \"development\") return \"https://api-dev.cryptum.io\";\n if($this->config->environment == \"production\") return \"https://prouction.url.com\";\n \n throw new Exception(\"Environment not found\");\n }", "title": "" }, { "docid": "d5e15dd175eb050bd8087d1d3aa1240b", "score": "0.49148175", "text": "public function getOrderPlaceRedirectUrl() {\n\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n $quoteData = $quote->getData();\n $billingAddress = $quote->getBillingAddress();\n $billingAddressData = $billingAddress->getData();\n $customer = $quote->getCustomer();\n\n //Set Repeat Purchase Request\n $wsca = $this->setRepeatPurchaseRequest($quoteData, $billingAddress, $billingAddressData);\n //It returns a session ID that is needed for the redirect url so the form is correct\n return Mage::getUrl('santander/payment/redirect', array('_secure' => true, 'sid' => $wsca->setRepeatPurchaseReturn, 'recurring' => true));\n }", "title": "" }, { "docid": "a66ef83906981dd769d68be816b56d2b", "score": "0.49146667", "text": "public function getViewQuoteUrl()\n {\n return $this->getUrl('quotes/quote/view/', ['quote_id' => $this->getOrder()->getQuoteId()]);\n }", "title": "" }, { "docid": "44f1a1162bf179f9a7d980839b63e593", "score": "0.4909346", "text": "function payzw_link($params)\n{\n // Gateway Configuration Parameters\n $accountId = $params['accountID'];\n $secretKey = $params['secretKey'];\n $testMode = $params['testMode'];\n// $dropdownField = $params['dropdownField'];\n// $radioField = $params['radioField'];\n// $textareaField = $params['textareaField'];\n // Invoice Parameters\n $invoiceId = $params['invoiceid'];\n $description = $params[\"description\"];\n $amount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $moduleName = $params['paymentmethod'];\n $returnUrl = $params['returnurl'];\n // $completeUrl = $systemUrl . 'modules/gateways/payzw/complete.php?id=' . $invoiceId;\n $resultUrl = $systemUrl . 'modules/gateways/callback/' . $moduleName . '.php';\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $whmcsVersion = $params['whmcsVersion'];\n /**\n * Do cURL request to paynow then process payment\n */\n\n // die($resultUrl);\n $checkoutUrl = paynow($accountId, $secretKey, $amount, $invoiceId, $email, $resultUrl, $returnUrl);\n\n /**\n * Clean up checkout url\n */\n $paymentLink = explode('-', $checkoutUrl)[0];\n\n\n\n\n $htmlOutput = '<form method=\"get\" action=\"' . $paymentLink . '\">';\n $htmlOutput .= '<input name=\"pay\" type=\"submit\" value=\"' . $langPayNow . '\" />';\n $htmlOutput .= '</form>';\n\n return $htmlOutput;\n}", "title": "" }, { "docid": "ab8b2e3c8677a0bfe59c6f314761b469", "score": "0.49086556", "text": "function getPaymentUrl() {\n\t\t$hashfields = array(\n\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t'project_id',\n\t\t\t\t\t\t'sender_holder',\n\t\t\t\t\t\t'sender_account_number',\n\t\t\t\t\t\t'sender_bank_code',\n\t\t\t\t\t\t'sender_country_id',\n\t\t\t\t\t\t'amount','currency_id',\n\t\t\t\t\t\t'reason_1','reason_2',\n\t\t\t\t\t\t'user_variable_0',\n\t\t\t\t\t\t'user_variable_1',\n\t\t\t\t\t\t'user_variable_2',\n\t\t\t\t\t\t'user_variable_3',\n\t\t\t\t\t\t'user_variable_4',\n\t\t\t\t\t\t'user_variable_5',\n\t\t);\n\n\t\t//build parameter-string for hashing\n\t\t$hashstring = '';\n\t\tforeach ($hashfields as $value) {\n\t\t\tif(array_key_exists($value, $this->params)) {\n\t\t\t\t$hashstring.= $this->params[$value];\n\t\t\t}\n\t\t\t$hashstring .= '|';\n\t\t}\n\n\t\t$hashstring .= $this->password;\n\n\t\t//calculate hash\n\t\t$hash = $this->getHashHexValue($hashstring, $this->hashfunction);\n\t\t$this->params['hash'] = $hash;\n\n\t\t//create parameter string\n\t\t$paramString = '';\n\t\tforeach ($this->params as $key => $value) {\n\t\t\t$paramString .= $key.'='.urlencode($value).'&';\n\t\t}\n\t\t$paramString = substr($paramString, 0, -1); //remove last &\n\t\tCakeLog::write('debug', $this->paymentUrl.'?'.$paramString);\n\t\treturn $this->paymentUrl.'?'.$paramString;\n\t}", "title": "" }, { "docid": "05fd6e4a88f6ed7802ef4266bb6e36f5", "score": "0.49054745", "text": "public function getPagamentoDigitalUrl()\n {\n $url='https://www.pagamentodigital.com.br/checkout/pay/';\n return $url;\n }", "title": "" }, { "docid": "bf01031ec5b04063eba613b17d854ef1", "score": "0.4900134", "text": "function bpb_extended_get_template_url() {\n\treturn bpb_extended()->tpl_url;\n}", "title": "" }, { "docid": "f67d1bfae591d56d62d5ca49d91164f9", "score": "0.4892067", "text": "private function createURL(string $username) {\n\n // TODO: NOT HERE but I need to add wallet info to member accounts. Also show earnings & referral url in members area etc.\n\n // Screenshots of APP or animated gifs for main page!\n }", "title": "" }, { "docid": "cdd231ef7ca97390392731ba2d1513d5", "score": "0.4891814", "text": "public function getGatewayURL()\n {\n $file = Libs\\FileSystem::getExportDir().'/.gatewayURL';\n if (file_exists($file) === true) {\n return file_get_contents($file);\n }\n\n return self::$url;\n\n }", "title": "" }, { "docid": "c44fb2f350b5867586ffdc82492ba2c4", "score": "0.48878035", "text": "public function getArticleURL()\n {\n return 'http://kb.x-cart.com/pages/viewpage.action?pageId=7504187';\n }", "title": "" }, { "docid": "8063bb16b871d0632631ed33ba118582", "score": "0.48824948", "text": "function get_deck_url( $object, $field_name, $request ) {\n return get_post_meta( $object[ 'id' ],\"download_link\",true);\n}", "title": "" }, { "docid": "c1211c046f41e36dcc7c1faeba3957b2", "score": "0.48798323", "text": "public function storeURL()\n\t{\n\t\t$this->config->load('payu', TRUE);\n\t\t$myconfig = $this->config->item('payu');\n\t\treturn $myconfig['store_url'];\n\t}", "title": "" }, { "docid": "21db5e7e898d41752e8691623c65ea25", "score": "0.48790485", "text": "public function getReturnUrl()\r\n {\r\n return Mage::getUrl($this->getConfigData('api_return_url', 'pagseguro/express/return'));\r\n }", "title": "" }, { "docid": "8c7a11ad01a93d581cbb83ea4ef3d6bc", "score": "0.48773432", "text": "public function getShopReference()\n {\n return \"d-free-product\";\n }", "title": "" }, { "docid": "9a6873d1636ac973eb9cba773a19a9e2", "score": "0.48761332", "text": "public function get_url()\n\t{\n\t}", "title": "" }, { "docid": "2689566748c36efe87ba3a0aaa5c93cd", "score": "0.4875061", "text": "public function pay()\n {\n // $request = User::where('id', $id)->with('user')->first();\n // $metadata = [\n // 'user_id' => $user->id,\n // 'campaign_id' => $id\n // ];\n return view('sample-pay-page'); //sample pay page\n }", "title": "" }, { "docid": "7467346769d7cc09e1bc120c52c8b690", "score": "0.48714617", "text": "public function url()\n {\n return '/cryptocurrency/new';\n }", "title": "" }, { "docid": "9e521253ff2bc45f87ebb6d54406d643", "score": "0.48602903", "text": "public function getHostedReturnUrl()\n {\n return $this->urlBuilder->getUrl('sveawebpay/callback/index', ['secure' => true]);\n }", "title": "" }, { "docid": "215a90eb8fba3e9643cb4b959a9a3d23", "score": "0.4856756", "text": "function commerce_bitpay_get_pairing_url() {\n\n // Sanitize label.\n $label = preg_replace('/[^a-zA-Z0-9 \\-\\_\\.]/', '', variable_get('site_name'));\n $label = substr('DrupalCommerce - ' . $label, 0, 59);\n // Generate a new Client ID each time.\n // Prevents multiple pair, and revoked token before return issues.\n commerce_bitpay_generate_id();\n $client = commerce_bitpay_get_client();\n $token = $client->createToken(array(\n 'facade' => 'merchant',\n 'label' => $label,\n 'id' => (string) commerce_bitpay_get_public_key()->getSin(),\n ));\n commerce_bitpay_setting('connection', 'connecting');\n commerce_bitpay_setting('token', $token->getToken());\n $network = commerce_bitpay_get_network();\n if (443 === $network->getApiPort()) {\n return 'https://' . $network->getApiHost() . '/api-access-request?pairingCode=' . $token->getPairingCode();\n }\n else {\n return 'http://' . $network->getApiHost() . ':' . $network->getApiPort() . '/api-access-request?pairingCode=' . $token->getPairingCode();\n }\n}", "title": "" }, { "docid": "acc211d429758bc02571723beea0024f", "score": "0.48559314", "text": "function mPAY24CC_link($params)\n{\n\t// Customer\n\t$firstname = utf8_decode($params['clientdetails']['firstname']);\n\t$lastname = utf8_decode($params['clientdetails']['lastname']);\n\t$email = utf8_decode($params['clientdetails']['email']);\n\t$address1 = utf8_decode($params['clientdetails']['address1']);\n\t$address2 = utf8_decode($params['clientdetails']['address2']);\n\t$city = utf8_decode($params['clientdetails']['city']);\n\t$state = utf8_decode($params['clientdetails']['state']);\n\t$postcode = utf8_decode(trim($params['clientdetails']['postcode']));\n\t$country = utf8_decode($params['clientdetails']['country']);\n\t$phone = utf8_decode($params['clientdetails']['phonenumber']);\n\n\t// Invoice\n\t$idInvoice = $params['invoiceid'];\n\t$description = $params[\"description\"];\n\t$amount = $params['amount'];\n\t$currency = $params['currency'];\n\t$topLimit = floatval($params['topLimit']);\n\t$hashKeyExtension = (!empty($params['hashKeyExtension'])) ? $params['hashKeyExtension'] : '';\n\n\t// check orders top limit if it exists\n\t$topLimit = floatval($params['topLimit']);\n\tif($topLimit > 0)\n\t{\n\t\tif(floatval($amount) > $topLimit)\n\t\t{\n\t\t\treturn $params['topLimitText'];\n\t\t}\n\t}\n\t\n\t// is module in testing mode\n\t$mode = ('on' == $params['testmode']) ? 'test' : 'www';\n\n\t// generate the request link\n\t$request = new mPAY24CC_SelectPayment($mode);\n\t$request->setMerchantId($params['partnerID']);\n\t$request->setTid($idInvoice);\n\t$request->setDescription($description);\n\t$request->setPaymentEnab(\"1\");\t// OPTIONAL - enable the following payment types for display (1 - default) or disable (0)\n\t$request->addPaymentType(\"CC\");\t// all available Creditcard Brands\n\n\t// add users address-data to this order\n\t$billing_addr = new mPAY24CC_Address();\n\t$billing_addr->setFirstName($firstname);\n\t$billing_addr->setLastName($lastname);\n\t$billing_addr->setStreet($address1 . ' ' . $address2);\n\t$billing_addr->setZip($postcode);\n\t$billing_addr->setCity($city);\n\t$billing_addr->setCountry($country);\n\t$billing_addr->setEmail($email);\n\t$request->setBillingAddress($billing_addr);\n\n\t// create the order-item for mpay24 external window\n\t$item = new mPAY24CC_Item();\n\t$item->setDescription($description);\n\t$item->setPrice($amount);\n\t$request->addItem($item);\n\n\t$request->setLanguage(\"DE\");\n\t$request->setTotalPrice($amount);\n\t$request->setCurrency($currency);\n\n\t// external mpay24 window styling\n\t$style = new mPAY24CC_Style();\n\t$style->setLogoStyle(\"border: none;padding-bottom: 10px;margin: 10px auto;\");\n\t$style->setPageHeaderStyle(\"text-align: left;\");\n\t$style->setPageCaptionStyle(\"color:#FFFFFF;font-size:9pt;font-weight:bold;padding:4px 10px 1px;margin-right:5px;\");\n\t$style->setSCHeaderStyle(\"text-align:left;\");\n\t$style->setSCCaptionStyle(\"color:#FFFFFF;font-size:14px;font-weight:bold;padding:3px;background-position:left top;margin-right:13px;padding: 2px 10px 1px;\");\n\t$style->setSCPriceStyle(\"padding:3px;\");\n\t$style->setSCItemEvenStyle(\"padding:3px;\");\n\t$style->setSCItemOddStyle(\"padding:3px;\");\n\t$style->setShippingCostsHStyle(\"padding:3px;\");\n\t$style->setShippingCostsStyle(\"padding:3px;\");\n\t$style->setTaxHStyle(\"padding:3px;\");\n\t$style->setTaxStyle(\"padding:3px;\");\n\t$style->setPRHeader(\"Gesamtpreis Ihrer Bestellung\");\n\t$style->setPRHeaderStyle(\"padding:3px;\");\n\t$style->setPRStyle(\"padding:3px;\");\n\t$style->setWholePageStyle(\"margin-left: auto; margin-right: auto; width:600px;\");\n\t$style->setFooterStyle(\"margin-top: 2px;\");\n\t$style->setPageStyle(\"margin-top:10px;\");\n\t$style->setSCHeader($params['wbmiTitle']);\n\n\t$request->setStyle($style);\n\n\t// genrate url which is linked to mpay24 external payment window\n\t$urlParams = array(\n\t\t'confirm=true',\n\t\t'paymentmethod=' . $params['paymentmethod'],\n\t\t'id_user=' . $params['clientdetails']['userid'],\n\t\t'amount=' . $params['amount'],\n\t\t'description=' . urlencode($params[\"description\"]),\n\t);\n\n\t// generate the secret token\n\t$token = sha1($hashKeyExtension.md5($_SERVER['HTTP_HOST'] . sha1($params['clientdetails']['userid'] * 100 / 23.5) . md5($params['amount']) . $params[\"description\"] . $_SERVER['SERVER_ADDR'] . 'CC'));\n\t$urlParams[] = 'token=' . $token;\n\t// ... and the confirmation url\n\t$confirmUrl = $params['systemurl'] . '/modules/gateways/callback/mPAY24CC.php?' . implode('&', $urlParams);\n\n\t$request->setSuccessURL($params['returnurl'] . '&success=true');\n\t$request->setErrorURL($params['returnurl'] . '&success=false');\n\t$request->setConfirmURL($confirmUrl);\n\t$request->createXmlFile();\n\t$request->send();\n\t$request->parseResponse();\n\n\t$STATUS = $request->getSTATUS();\n\t$RETURNCODE = $request->getRETURNCODE();\n\t$LOCATION = $request->getLOCATION();\n\n\tif($STATUS == \"OK\")\n\t{\n\t\tif($RETURNCODE == \"REDIRECT\")\n\t\t{\n\t\t\tif(!empty($LOCATION))\n\t\t\t{\n\t\t\t\t$returnString = '';\n\t\t\t\tif(!empty($params['logoUrl']))\n\t\t\t\t{\n\t\t\t\t\t$returnString .= '<table>\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td style=\"padding-right: 3px;\" align=\"center\"><a href=\"' . $LOCATION . '\"><img src=\"' . $params['logoUrl'] . '\" alt=\"\" border=\"0\" /></a></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 align=\"center\">' . $params['instructions'] . '</td>\n\t\t\t\t\t \t</tr>\n\t\t\t\t\t </table>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnString .= $params['instructions'];\n\t\t\t\t}\n\t\t\t\t$returnString.= '<br /><form method=\"post\" action=\"' . $LOCATION . '\"><input type=\"submit\" value=\"' . $params['linkText'] . '\" />';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$returnString = \"\";\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$returnString = 'Error during init payment-process!';\n\t}\n\treturn $returnString;\n}", "title": "" }, { "docid": "87a171c9213db9132b3306416b69625c", "score": "0.48466545", "text": "public function getGenerateCartUrl()\n {\n $isSecure = $this->request->isSecure();\n return $this->urlInterfaceFactory->create()->getUrl(self::URL_ADMIN_GENERATE_CART, ['_secure'=>$isSecure]);\n }", "title": "" }, { "docid": "92633aed01ea094b2b81dd6a99330508", "score": "0.48405656", "text": "public function createAbandonedCartHtmlContent()\n {\n $content_html = '{*Sailthru zephyr code is used for full functionality*}\n <div id=\"main\">\n <table width=\"700\">\n <tr>\n <td>\n <h2><p>Hello {profile.vars.name}</p></h2>\n <p>Did you forget the following items in your cart?</p>\n\n <table>\n <thead>\n <tr>\n <td colspan=\"2\">\n <div><span style=\"display:block;text-align:center;color:white;font-size:13px;font-weight:bold;padding:15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{profile.purchase_incomplete.items[0].vars.checkout_url}\">Re-Order Now!</a></span></div>\n </td>\n </tr>\n </thead>\n\n <tbody>\n {sum = 0}\n {foreach profile.purchase_incomplete.items as i}\n <table width=\"650\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin:0 0 20px 0;background:#fff;border:1px solid #e5e5e5\">\n <tbody>\n <tr>\n <td style=\"padding:20px\"><a href=\"{i.url}\"><img width=\"180\" height=\"135\" border=\"0\" alt=\"{i.title}\" src=\"{i.vars.image_url}\"></a></td>\n <td width=\"420\" valign=\"top\" style=\"padding:20px 10px 20px 0\">\n <div style=\"padding:5px 0;color:#333;font-size:18px;font-weight:bold;line-height:21px\">{i.title}</div>\n <div style=\"padding:0 0 5px 0;color:#999;line-height:21px;margin:0px\">{i.vars.currency}{i.price/100}</div>\n <div style=\"color:#999;font-weight:bold;line-height:21px;margin:0px\">{i.description}</div>\n <div><span style=\"display:block;text-align:center;width:120px;border-left:1px solid #b43e2e;border-right:1px solid #b43e2e;color:white;font-size:13px;font-weight:bold;padding:0 15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{i.url}\">Buy Now</a></span></div>\n </td>\n </tr>\n </tbody>\n </table>\n {/foreach}\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:3px 9px\" colspan=\"2\"></td>\n <td align=\"right\" valign=\"top\" style=\"padding:3px 9px\"></td>\n </tr>\n\n </tbody>\n\n <tfoot>\n\n </tfoot>\n </table>\n\n <p><small>If you believe this has been sent to you in error, please safely <a href=\"{optout_confirm_url}\">unsubscribe</a>.</small></p>\n {beacon}\n </td>\n </tr>\n </table>\n </div>'; //include css or tables here to style e-mail.\n //It's important that the \"from_email\" is verified, otherwise the code below will not work.\n return $content_html;\n }", "title": "" }, { "docid": "f94b7f048b982dd978f28141b860ee98", "score": "0.48380208", "text": "public static function generateURL($bookID){\n\n\n // rights is optional paramter. Omit it if there are no permissions to send (no further restriction);\n //$rights= $rights ? \"&rights=\".$rights : \"\";\n\n $bookDownloadURL =\n \"action=\".urlencode(self::$action).\n \"&ordersource=\".urlencode(self::$ordersource).\n \"&orderid=\".urlencode(self::$transaction).\n \"&resid=\".urlencode($bookID).\n //$rights.\n //\"&gbauthdate=\".urlencode($gbauthdate).\n \"&dateval=\".urlencode(self::$dateval).\n \"&gblver=4\";\n\n\n\n // Digitaly sign the request\n $bookDownloadURL = self::$linkURL.\"?\".$bookDownloadURL.\"&auth=\".hash_hmac(\"sha1\", $bookDownloadURL, self::$sharedSecret );\n\n return $bookDownloadURL;\n }", "title": "" }, { "docid": "d42506c9ac41817b6e93665fd33fc6a4", "score": "0.48369044", "text": "public function getURL();", "title": "" }, { "docid": "c64030121a6352a62853c6051b8fb8b1", "score": "0.48281193", "text": "public function getRedirectUrl($order)\n {\n $urlFields = array();\n $storeId = $order->getStoreId();\n\n // Destination AccountID\n $urlFields['to'] = $this->getConfigData('to_address', $storeId);\n\n // Amount to send, including three letter currency code, e.g. 15/USD\n $urlFields['amount'] = round($order->getGrandTotal(), 2) . '/' . $this->getCurrencyCode();\n\n // Destination tag; integer in the range 0 to 2^32-1.\n // This value must be encoded in the payment for the user to be credited.\n // @Appmerce: we use the order auto_increment ID\n $urlFields['dt'] = $order->getId();\n\n // @todo supposedly supported?\n // http://bitcoin.stackexchange.com/questions/14149/is-there-a-way-to-specify-an-invoice-id-in-ripple-uri\n $urlFields['invoiceid'] = $order->getIncrementId();\n\n // @todo Source tag; integer in the range 0 to 2^32-1. This value must be encoded in the payment for the payment to be returned if necessary. When the payment is returned, this field is used as the destination_tag.\n //$urlFields['st'] = '';\n\n // A suggested name for this contact.\n $urlFields['name'] = $this->getConfig()->getName($order);\n\n // A message that will be displayed to the user making the payment.\n $urlFields['label'] = $this->getConfig()->getOrderDescription($order);\n\n // A URL with more information about the payment.\n $urlFields['info_url'] = $this->getConfig()->getApiUrl('info', $storeId);\n\n // Clients should send the user here after the payment is made.\n $urlFields['return_url'] = $this->getConfig()->getApiUrl('return', $storeId);\n\n // Client should send the user here if the payment is canceled.\n $urlFields['abort_url'] = $this->getConfig()->getApiUrl('abort', $storeId);\n\n // A message that should be included with the payment and displayed to the recipient.\n $urlFields['msg'] = $this->getConfig()->getOrderDescription($order);\n\n // The time when this payment must be completed by expressed as integer seconds since the POSIX epoch.\n $expiration = (int)$this->getConfigData('expiration');\n $urlFields['exp'] = time() + $expiration;\n\n // Debug\n if ($this->getConfigData('debug_flag')) {\n $debug_url = $this->getRequest()->getPathInfo();\n $data = print_r($urlFields, true);\n Mage::getModel('ripple/api_debug')->setDir('out')->setUrl($debug_url)->setData('data', $data)->save();\n }\n\n // URL for RFC 3986\n // @see https://ripple.com/wiki/Ripple_URIs\n $url = $this->getGatewayUrl();\n $query = $this->httpBuildQuery3986($urlFields);\n return $url . '?' . $query;\n }", "title": "" }, { "docid": "2650a8bdc089159b5ef5195ae3018afe", "score": "0.48277655", "text": "public function getBaseUri()\n {\n $url = 'https://';\n\n if ($this->private) {\n $url .= sprintf('%s:%s@', $this->key, $this->secret);\n }\n\n return $url.$this->shop.'.myshopify.com';\n }", "title": "" }, { "docid": "4b9e6a5920fc30f5536c9738fd85379e", "score": "0.4825592", "text": "public function render_premium_download_box( LaterPay_Core_Event $event ) {\n\n list( $atts ) = $event->get_arguments() + array( array() );\n\n // provide default values for empty shortcode attributes\n $a = shortcode_atts( array(\n 'target_post_id' => '',\n 'target_post_title' => '',\n 'heading_text' => esc_html__( 'Additional Premium Content', 'laterpay' ),\n 'description_text' => '',\n 'content_type' => '',\n 'teaser_image_path' => '',\n // deprecated:\n 'target_page_id' => '',\n 'target_page_title' => '',\n ), $atts );\n\n $error_reason = '';\n\n // get URL for target page\n $page = null;\n\n if ( $a['target_post_id'] !== '' ) {\n $page = get_post( absint( $a['target_post_id'] ) );\n }\n\n // target_post_id was provided, but didn't work\n if ( $page === null && $a['target_post_id'] !== '' ) {\n $error_reason = sprintf(\n esc_html__( 'We couldn\\'t find a page for target_post_id=\"%s\" on this site.', 'laterpay' ),\n absint( $a['target_post_id'] )\n );\n }\n\n if ( $page === null && $a['target_post_title'] !== '' ) {\n $page = LaterPay_Helper_Post::get_page_by_title( $a['target_post_title'], OBJECT, $this->config->get( 'content.enabled_post_types' ) );\n }\n\n // target_post_title was provided, but didn't work (no invalid target_post_id was provided)\n if ( $page === null && empty( $error_reason ) ) {\n $error_reason = sprintf(\n esc_html__( 'We couldn\\'t find a page for target_post_title=\"%s\" on this site.', 'laterpay' ),\n esc_html( $a['target_post_title'] )\n );\n }\n\n if ( $page === null ) {\n $error_message = '<div class=\"lp_shortcode-error\">';\n $error_message .= esc_html__( 'Problem with inserted shortcode:', 'laterpay' ) . '<br>';\n $error_message .= $error_reason;\n $error_message .= '</div>';\n\n $event->set_result( $error_message );\n throw new LaterPay_Core_Exception( $error_message );\n }\n\n $page_id = $page->ID;\n\n // don't render the shortcode, if the target page has a post type for which LaterPay is disabled\n if ( ! in_array( $page->post_type, $this->config->get( 'content.enabled_post_types' ), true ) ) {\n $error_reason = esc_html__( 'Laterpay has been disabled for the post type of the target page.', 'laterpay' );\n $error_message = '<div class=\"lp_shortcode-error\">';\n $error_message .= esc_html__( 'Problem with inserted shortcode:', 'laterpay' ) . '<br>';\n $error_message .= $error_reason;\n $error_message .= '</div>';\n\n $event->set_result( $error_message );\n throw new LaterPay_Core_Exception( $error_message );\n }\n\n // check, if page has a custom post type\n $custom_post_types = get_post_types( array( '_builtin' => false ) );\n $custom_types = array_keys( $custom_post_types );\n $is_custom_post_type = ! empty( $custom_types ) && in_array( $page->post_type, $custom_types, true );\n\n // get the URL of the target page\n if ( $is_custom_post_type ) {\n // getting the permalink of a custom post type requires get_post_permalink instead of get_permalink\n $page_url = get_post_permalink( $page_id );\n } else {\n $page_url = get_permalink( $page_id );\n }\n\n // Supported content data types.\n $content_types = array( 'file', 'gallery', 'audio', 'video', 'text', 'music', 'link' );\n\n if ( empty( $a['content_type'] ) ) {\n // determine $content_type from MIME type of files attached to post\n $page_mime_type = get_post_mime_type( $page_id );\n switch ( $page_mime_type ) {\n case 'application/zip':\n case 'application/x-rar-compressed':\n case 'application/pdf':\n $content_type = 'file';\n break;\n case 'image/jpeg':\n case 'image/png':\n case 'image/gif':\n $content_type = 'gallery';\n break;\n case 'audio/vnd.wav':\n case 'audio/mpeg':\n case 'audio/mp4':\n case 'audio/ogg':\n case 'audio/aac':\n case 'audio/aacp':\n $content_type = 'audio';\n break;\n case 'video/mpeg':\n case 'video/mp4':\n case 'video/quicktime':\n $content_type = 'video';\n break;\n default:\n $content_type = 'text';\n }\n } elseif ( in_array( $a['content_type'], $content_types, true ) ) {\n $content_type = $a['content_type'];\n } else {\n $content_type = 'text';\n }\n\n $heading = $a['heading_text'];\n $description = $a['description_text'];\n\n if ( 'link' === $content_type ) {\n // Build anchor text for premium link.\n $anchor_text = empty( $description ) ? $heading : sprintf( '%s - %s', $heading, $description );\n\n $html = '<a class=\"lp_js_premium-file-box lp_premium_link lp_premium_link_anchor\" title=\"'\n . esc_html__( 'Buy now with Laterpay', 'laterpay' )\n . '\" data-content-type=\"'\n . esc_attr( $content_type )\n . '\" data-post-id=\"'\n . esc_attr( $page_id )\n .'\" data-page-url=\"'\n . esc_url( $page_url )\n . '\">';\n $html .= esc_html( $anchor_text ) . '</a>';\n\n } else {\n $image_path = $a['teaser_image_path'];\n\n\n // build the HTML for the teaser box\n if ( ! empty( $image_path ) ) {\n $html = '<div class=\"lp_js_premium-file-box lp_premium-file-box\" '\n . 'style=\"background-image:url(' . esc_url( $image_path ) . ')'\n . '\" data-post-id=\"' . esc_attr( $page_id )\n . '\" data-content-type=\"' . esc_attr( $content_type )\n . '\" data-page-url=\"' . esc_url ( $page_url )\n . '\">';\n } else {\n $html = '<div class=\"lp_js_premium-file-box lp_premium-file-box lp_is-' . esc_attr( $content_type )\n . '\" data-post-id=\"' . esc_attr( $page_id )\n . '\" data-content-type=\"' . esc_attr( $content_type )\n . '\" data-page-url=\"' . esc_url( $page_url )\n . '\">';\n }\n\n // create a premium box\n $html .= '<div class=\"lp_premium-file-box__details\">';\n $html .= '<h3 class=\"lp_premium-file-box__title\">' . esc_attr( $heading ) . '</h3>';\n\n if ( ! empty( $description ) ) {\n $html .= '<p class=\"lp_premium-file-box__text\">' . esc_attr( $description ) . '</p>';\n }\n\n $html .= '</div>';\n $html .= '</div>';\n }\n $event->set_result( $html );\n }", "title": "" }, { "docid": "d9f47fd0f8c967786550527e8d92b867", "score": "0.4819761", "text": "public function getInvoiceUrlAttribute(): string\n {\n $invoice = $this->attributes['invoice'];\n\n $disc = Storage::disk(env('FILESYSTEM_DRIVER', 'public'));\n\n if ($disc->exists($invoice)) {\n return $disc->url($invoice);\n }\n\n return '';\n }", "title": "" }, { "docid": "26b7432d6435a89b50dca4eca089745a", "score": "0.48111248", "text": "function get_gateway_data( ){\n\t\t\n\t\t$payment_express_username = get_option( 'ec_option_payment_express_username' );\n\t\t$payment_express_password = get_option( 'ec_option_payment_express_password' );\n\t\t$payment_express_currency = get_option( 'ec_option_payment_express_currency' );\n\t\t\n\t\t\n\t\t$payment_express_xml .= \"<Txn>\n\t\t\t\t\t\t\t         <PostUsername>\" . $payment_express_username . \"</PostUsername>\n\t\t\t\t\t\t\t         <PostPassword>\". $payment_express_password . \"</PostPassword>\n\t\t\t\t\t\t\t         <CardHolderName>\" . $this->credit_card->card_holder_name . \"</CardHolderName>\n\t\t\t\t\t\t\t         <CardNumber>\" .$this->credit_card->card_number . \"</CardNumber>\n\t\t\t\t\t\t\t         <Amount>\" . $this->order_totals->grand_total . \"</Amount>\n\t\t\t\t\t\t\t         <DateExpiry>\" . $this->credit_card->expiration_month . $this->credit_card->get_expiration_year( 2 ) . \"</DateExpiry>\n\t\t\t\t\t\t\t         <Cvc2>\" . $this->credit_card->security_code . \"</Cvc2>\n\t\t\t\t\t\t\t         <InputCurrency>\" . $payment_express_currency . \"</InputCurrency>\n\t\t\t\t\t\t\t         <TxnType>Purchase</TxnType>\n\t\t\t\t\t\t\t         <TxnId>\" . $this->order_id . \"</TxnId>\n\t\t\t\t\t\t\t         <MerchantReference>\" . $this->order_id . \"</MerchantReference>\n\t\t\t\t\t\t\t</Txn>\";\n\t\t\t \n\t\treturn $payment_express_xml;\n\t\t\n\t}", "title": "" }, { "docid": "acdba251e0a27933d1193d093a3b500e", "score": "0.48003614", "text": "public function generate_ordersredirurl() {\n\t\t\t$url = new \\Purl\\Url(DplusWire::wire('config')->pages->orders);\n\t\t\t$url->path = DplusWire::wire('config')->pages->orders.\"redir/\";\n\t\t\treturn $url;\n\t\t}", "title": "" }, { "docid": "4c13d6976a07931abe771bbb70c29b61", "score": "0.47994888", "text": "public function getUrl () {}", "title": "" }, { "docid": "f1f57858874f46c02c2f99b8773f9c26", "score": "0.4795703", "text": "public function getUrl(): string{\n $endpoint = $this->getEndpoint();\n $params = $this->params;\n\n return Helper::bindUrlParams($endpoint, ...$params);\n }", "title": "" }, { "docid": "b8a1c9cd763640572cdc59b7565d88d2", "score": "0.4795416", "text": "public function show()\r\n\t{\r\n return View::make('billing.show');\r\n\t}", "title": "" }, { "docid": "749ab125b486fe39dd88742662cf6eb4", "score": "0.4792333", "text": "public function getUrl() {\n $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl(); \n $host = $_SERVER['SERVER_NAME'];\n $url = \"http://$host\".\"$baseUrl/accommodation/show/id/{$this->acc_id}\";\n return $url; \n }", "title": "" }, { "docid": "c8aa529880c3e4bccfaa2befeffd6177", "score": "0.4789638", "text": "public function doPurchase(){\n $validator = Validator::make(Input::all(),\n\t\t\tarray(\n\t\t\t\t'username'\t=> 'required|alpha_dash|min:4',\n\t\t\t\t'password'\t=>'required|alpha_num|min:6'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::route('sandbox/api/merchantapi')\n\t\t\t\t\t->withErrors($validator)\n\t\t\t\t\t->withInput();\n\t\t} else{\n\t\t\t$auth = Auth::attempt(array(\n\t\t\t\t'username' => Input::get('username'),\n\t\t\t\t'password' => Input::get('password'),\n\t\t\t\t'active' => 1\n\t\t\t));\n\n\t\t\tif ($auth) {\n\t\t\t \n\t\t\t\t// Redirect to the intended page\n $data['data'] = array(\n Input::get('apikey'),\n Input::get('currency'),\n Input::get('amount'),\n Input::get('return_url'),\n Input::get('payprovider'),\n Input::get('cdata1'),\n Input::get('cdata2')\n );\n $client = User::find(Auth::user()->id); //the client making the payment\n $merchant = Developer::where('dev_key', '=',$data['data'][0])->get(); //the merchant to whom to make payment to\n \n if($data['data'][4] == 'solidtrustpay'){\n $charges = new PlatformCharges($data['data'][2], $data['data'][1], 'stp');\n $url = 'https://solidtrustpay.com/handle_accver.php';\n $fields = array(\n 'merchantAccount' => 'larryakah',\n 'item_id' => 'Item Purchase: '.$data['data'][5],\n 'amount' => $charges->getDueAmount('stp', $data['data'][4]),\n 'currency' => $data['data'][1],\n 'confirm_url' => URL::route('dashboard').'/stpconfirm',\n 'testmode' => 'on',\n 'user1' => '',\n 'user2' => '',\n 'return_url' => URL::route('dashboard'),\n 'notify_url' => URL::route('dashboard'),\n 'cancel_url' => URL::route('dashboard')\n );\n \n $context = stream_context_create(array(\n 'http' => array(\n 'Content-Type'=>'application/x-form-urlencoded',\n 'method'=>'POST',\n 'content'=>http_build_query($fields)\n )\n ));\n echo file_get_contents($url, null, $context);\n /* \n //url-ify the data for the POST\n $fields_string = '';\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string, '&');\n \n //open connection\n $ch = curl_init();\n \n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch,CURLOPT_POST, count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);\n // curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n //execute post\n $result = curl_exec($ch);\n var_dump($result);\n return Redirect::away($url)\n ->withInput();\n */\n //close connection\n // curl_close($ch);\n }//end solid trust pay payment method\n //Session::put('data', $data);\n\t\t\t\t//return Redirect::action('url')->withInput();\n else\n return Redirect::away('https://solidtrustpay.com/handle.php')\n ->withInput();\n\t\t\t} else{\n\t\t\t\treturn Redirect::route('sandbox/api/merchantapi')\n\t\t\t\t\t\t->with('alertError', 'Username/Password wrong, or account not activated.');\n\t\t\t}\n\t\t}\n\n\t//\treturn Redirect::route('sandbox/api/merchantapi')\n\t\t//\t\t->with('alertError', 'There was a problem loging you in.');\n }", "title": "" }, { "docid": "c50829b7d28971940a468cef34e5adf6", "score": "0.47875345", "text": "function wpc_url_login(){\n\treturn \"{{customer_site}}\"; // your URL here\n}", "title": "" }, { "docid": "f9d508f012845d847ecd419f99556747", "score": "0.47831443", "text": "public function getBilling(){\n\t\treturn View::make('billing');\n\t}", "title": "" }, { "docid": "f10bb8a9442361c657950d599257f8a5", "score": "0.4781419", "text": "public static function custUrl($custID) {\n\t\t$url = new Purl(Menu::cxmUrl());\n\t\t$url->query->set('custID', $custID);\n\t\treturn $url->getUrl();\n\t}", "title": "" }, { "docid": "e02b9850b81247a72e67af48687e25bc", "score": "0.47758776", "text": "public function getCardReference()\n {\n if (! $this->isSuccessful()) {\n // The transaction was not successful, so there won't be a\n // card reference to fetch.\n\n return null;\n }\n\n // Build a new request.\n\n $gateway = Omnipay::create('\\\\' . Gateway::class);\n\n $gateway->setMerchantId($this->request->getMerchantId(true));\n $gateway->setProjectId($this->request->getProjectId(true));\n $gateway->setProjectId($this->request->getProjectId(true));\n $gateway->setProjectPassphrase($this->request->getProjectPassphrase());\n $gateway->setPaymentType($this->request->getPaymentType());\n\n $request = $gateway->getCard();\n\n $request->setTransactionReference($this->getTransactionReference());\n\n $response = $request->send();\n\n if ($response->isSuccessful()) {\n return $response->getCardReference();\n }\n }", "title": "" }, { "docid": "a714c4442f1e22b121edba18430dc44f", "score": "0.47756958", "text": "public function get_buy_url( $data, $options = array() )\n {\n return $this->get_web_url( $data, 'buy', $options );\n }", "title": "" }, { "docid": "36347f95bf29ddc35a7294c83eb96466", "score": "0.4771321", "text": "public function ReplacePayOpenAPITemplate($template,$subject,$TransInfo){\n if(empty($template))return '';\n $obj_trans = new Transations();\n $obj_property=new Properties();\n $obj_company=new \\App\\Models\\Companies();\n $obj_partner=new \\App\\Models\\Partners();\n $idproperty= $TransInfo['property_id'];\n $web_user_id = $TransInfo['trans_web_user_id'];\n $merchant=$obj_property->getPropertyInfo($idproperty);\n $company=$obj_company->getCompanyInfo($merchant['id_companies']);\n $partner=$obj_partner->getDomain($merchant['id_partners']);\n $hostname= config(\"app.hostName\");\n $obj_user=new User();\n $usr=$obj_user->getUsrInfo($web_user_id);\n $disclaimer=$obj_property->getPropertySettings($idproperty, $merchant['id_companies'], $merchant['id_partners'], 'SETTLMENT_DISCLAIMER');\n //get autopay info\n \n $trans_result_auth_code=\"\";\n \n $trans_descr=$obj_trans->get1TransInfo($TransInfo['trans_id'], 'trans_descr');\n $trans_descr=str_replace(\"\\n\",\"<br>\",$trans_descr);\n $nextpay=\"\";\n \n $baseUrl=$hostname . \"/master/index.php/\" . $partner . \"/properties/\" . $merchant['subdomain_clients'];\n $chain=str_replace('[:LOGO:]',\"<img src='\".$hostname.$merchant['logo'].\"'>\",$template);\n $chain=str_replace('[:ERRORMSG:]',$TransInfo['trans_result_error_desc'],$chain);\n $chain=str_replace('[:TICKETLINK:]', \"<a href='\" . $baseUrl . '/newhelp' . \"'>Click here</a>\", $chain);\n $chain=str_replace('[:TRANS_DATE:]',date('M d, Y'),$chain);\n $chain=str_replace('[:DBA_NAME:]',$merchant['name_clients'],$chain);\n $chain=str_replace('[:LOGINLINK:]', $baseUrl . '/login' ,$chain);\n $chain=str_replace('[:CONTACTNAME:]',$company['contact_name'],$chain);\n $chain=str_replace('[:GROUPNAME:]',$company['company_name'],$chain);\n if(!isset($usr['companyname']))$usr['companyname']='';\n $chain=str_replace('[:COMPANYNAME:]',$usr['companyname'],$chain);\n $chain=str_replace('[:FIRSTNAME:]',$usr['first_name'],$chain);\n $chain=str_replace('[:LASTNAME:]',$usr['last_name'],$chain);\n $chain=str_replace('[:ACCOUNT_NUMBER:]',$usr['account_number'],$chain);\n $chain=str_replace('[:ACCOUNTNUMBER:]',$usr['account_number'],$chain);\n $chain=str_replace('[:UNIT:]',$usr['address_unit'],$chain);\n $chain=str_replace('[:UADDR:]',$usr['address'],$chain);\n $chain=str_replace('[:UCITY:]',$usr['city'],$chain);\n $chain=str_replace('[:USTATE:]',$usr['state'],$chain);\n $chain=str_replace('[:UZIP:]',$usr['zip'],$chain);\n $chain=str_replace('[:UPHONE:]',$usr['phone_number'],$chain);\n $chain=str_replace('[:UEMAIL:]',$usr['email_address'],$chain);\n $chain=str_replace('[:DISCLAIMER:]',$disclaimer,$chain);\n $chain=str_replace('[:REFNUM:]',$TransInfo['trans_id'],$chain);\n $chain=str_replace('[:AUTHNUM:]',$TransInfo['trans_result_auth_code'],$chain);\n $chain=str_replace('[:NETAMOUNT:]',$TransInfo['trans_net_amount'],$chain);\n //$chain=str_replace('[:NEXTDATE:]',date('M d, Y', strtotime($nextpay)),$chain);\n //$chain=str_replace('[:STARTDATE:]',date('M d, Y', strtotime($startpay)),$chain);\n $chain=str_replace('[:DESCRIPTION:]',$trans_descr,$chain);\n $chain= str_replace('[:PAYMENT_INFO:]', $TransInfo['trans_card_type'], $chain);\n return $chain;\n }", "title": "" }, { "docid": "6bea21e91fed4d74f892aa2818f7675d", "score": "0.4762757", "text": "public function url():string{\n\t\t$this->fully_load();\n\t\treturn $this->item_data->url;\n\t}", "title": "" }, { "docid": "3d2204dd99077986444e11c6afab3454", "score": "0.47573292", "text": "protected function getFrontendAffirmUrl()\n {\n $loanId = $this->getLoanId();\n return sprintf(\"https://%s/u/#/loans/%s?trk=%s\", $this->getDomainUrl(), $loanId, $this->getPublicApiKey());\n }", "title": "" }, { "docid": "116ca609627f2009d0eeed01d9d86b5c", "score": "0.47564018", "text": "function SecurePayCharge($testingOnly=0,$timeout=120,$URL=\"\"){\r\n\t\t\tif(is_numeric($timeout))\r\n\t\t\t\t$this->_timeout=$timeout;\r\n\t\t\telse\r\n\t\t\t\t$this->_timeout=120;\r\n\t\t\t$this->returnCode=\"N\";\r\n\t\t\t$this->approvNum=\"NOT APPROVED\";\r\n\t\t\t$this->cardResponse=\"NOT APPROVED - ERROR\";\r\n\t\t\t$this->avsResponse=\"NO DATA\";\r\n\t\t\t$this->recordNumber=\"-1\";\r\n\t\t\t$this->recurring=\"NO\";\r\n\t\t\t$this->timeframe=\"MONTH\";\r\n\t\t\t$this->_debug=$testingOnly;\r\n\t\t\tif($URL==\"\")\r\n\t\t\t\t$this->_sURL=\"https://www.securepay.com/secure1/index.asp\";\r\n\t\t\telse\r\n\t\t\t\t$this->_sURL=$URL;\r\n\t\t}", "title": "" }, { "docid": "4862fd4fc1694cd6ba88c4e946086113", "score": "0.4755232", "text": "public function get_certificate_url() {\n $user_id = $this->input->post('user_id');\n $course_id = $this->input->post('course_id');\n $certificate_link = $this->certificate_model->get_certificate_url($user_id, $course_id);\n echo $certificate_link;\n }", "title": "" }, { "docid": "c82dac3c85e3abdd84c15de37ce5a277", "score": "0.475249", "text": "public function generate($context) {\n\t\t$prod_id = $this->prod_obj->get('prod_id');\n\t\t$prod_price = $this->prod_obj->get('prod_price');\n\t\t$prod_brand = $this->prod_obj->get('prod_brand');\n\t\t\n\t\t$thumb_img = $this->item_obj->get_thumbnail();\n\t\t$item_id = $this->item_obj->get('item_id');\n\t\t$item_name = $this->item_obj->get('item_name');\n\t\t$item_size = $this->item_obj->get('item_size');\n\t\t$item_color = $this->item_obj->get('item_color');\n\t\t$item_qty = $this->item_obj->get('item_qty');\n\t\t$item_link = $this->item_link;\n\t\t\n\t\t$max_qty = FunctionPool::clamp($item_qty, 1, 30);\t// ecom.purchase.max_it_qty = 30\n\t\t$options = FunctionPool::array_to_assoc(range(1, $max_qty), false);\n\t\t$qty_selector = HtmlUtil::generate_select($options, $this->cart_qty, null, 'cart_qty');\n\t\t\n\t\t$subtotal = $this->get_subtotal();\n\t\t$queries = array('action'=>'rm', 'prod_id' => $prod_id, 'item_id' => $item_id);\n\t\t$rm_link = LinkUtil::generate_javascript_link($queries, true);\n\t\t\n\t\t$content = \"<div class=\\\"cart_it_content\\\">\\n\";\n\t\t\n\t\t$content .= \"<div class=\\\"cart_it_thumbnail\\\">\\n\";\n\t\t$content .= \"<a href=\\\"$item_link\\\"><img src=\\\"$thumb_img\\\" /></a>\";\n\t\t$content .= \"</div>\\n\";\n\t\t\n\t\t$content .= \"<div class=\\\"cart_it_description\\\">\\n\";\n\t\t$content .= \"<p>$item_name</p>\\n\";\n\t\t$content .= \"<hr />\";\n\t\t$content .= \"<p><span>Marca:</span>$prod_brand</p>\\n\";\n\t\t$content .= \"<p><span>Cor:</span>$item_color</p>\\n\";\n\t\t$content .= \"<p><span>Tamanho:</span>$item_size</p>\\n\";\n\t\t$content .= \"<p><span>ID:</span>$item_id</p>\\n\";\n\t\t$content .= \"</div>\\n\";\n\t\t\n\t\t$content .= \"<div class=\\\"cart_it_pricing\\\">\\n\";\n\t\t$content .= \"<p><span>Price:</span>\\$$prod_price</p>\\n\";\n\t\t$content .= \"<p><span>Quantidade:</span>$qty_selector</p>\\n\";\n\t\t$content .= \"<p><span>Subtotal:</span>\\$$subtotal</p>\\n\";\n\t\t$content .= \"<br /><button class=\\\"button_rm\\\" type=\\\"button\\\" onclick=\\\"$rm_link\\\">Remover</button>\\n\";\n\t\t$content .= \"</div>\\n\";\n\t\t\n\t\t$content .= \"</div>\\n\";\n\t\t\n\t\t//echo \"generating $this->prod_id-$this->item_id x $this->cart_qty <br />\";\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "9bc8eb4b47dbe1fd4644cf9bd64256cf", "score": "0.47487727", "text": "public function getImageLink() {\n\t\t\n\t\t$html = \"\";\n\t\tif (isset($this->image) && strlen($this->image) > 3) {\n\t\t\t\n\t\t\t$img = '<img src=\"%s\" alt=\"%s\" title =\"%s\" class=\"imgx\" border=\"0\" width=\"145\" height=\"200\"/>';\n\t\t\tif (VCDDB_USEPROXY==1) {\n\t\t\t\t$html = sprintf($img, VCDDB_SOAPPROXY.'?page=file&amp;pornstar_id='.$this->id, $this->name, $this->name);\n\t\t\t} else {\n\t\t\t\t$html = sprintf($img, '?page=file&amp;pornstar_id='.$this->id, $this->name, $this->name);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$img = '<img src=\"images/noimagestar.gif\" title=\"%s\" class=\"imgx\" alt=\"%s\" border=\"0\"/>';\n\t\t\t$html = sprintf($img, $this->name, $this->name);\n\t\t}\n\t\t\n\t\treturn $html;\n\t\t\t\n\t}", "title": "" }, { "docid": "572c0bbc330259216f231cdd826c7333", "score": "0.47471824", "text": "public function process()\r\n\t{\r\n\t\tif (!$this->getParam( \"short_key\" ) && !$this->getParam( \"_full_url\" )) {\r\n\t\t\treturn $this->getTemplate();\r\n\t\t}\r\n\r\n\t\t$shortKey = $this->getParam( \"short_key\" );\r\n\r\n\t\tif ($this->getParam( \"_full_url\" )) {\r\n\t\t\t$tpl = $this->getTemplate();\r\n\t\t\t$tpl->envId = $this->getParam(\"env_id\");\r\n\t\t\t$logic = new U_Logic_Api( $this, 0 );\r\n\t\t\t$result = $logic->getShortLinkArray();\r\n\r\n\t\t\tif ($result[ \"status\" ] == U_Logic_Api::STATUS_OK) {\r\n\t\t\t\t$tpl->shortUrl = $result[ \"short_url\" ];\r\n\t\t\t} else {\r\n\t\t\t\t$tpl->shortKey = $shortKey;\r\n\t\t\t\t$tpl->errorMsg = $result[ 'error_msg' ];\r\n\t\t\t\t$tpl->fullUrl = $this->getParam( \"_full_url\" );\r\n\t\t\t}\r\n\r\n\t\t\treturn $tpl;\r\n\t\t}\r\n\r\n\t\treturn $this->getTemplate();\r\n\t}", "title": "" }, { "docid": "aae9f6135c68090e54fbbb3d47d16c23", "score": "0.4745303", "text": "public function getUrlPay() {\n\t\t$row = array(\n\t\t \"vnp_TmnCode\" => $this->getVnpTmnCode(), //Tham so nay lay tu VNPAY, cua cong ty \n\t\t \"vnp_Amount\" => $this->getVnpAmount()*100,//so tien don hang, nhan voi 100\n\t\t \"vnp_Command\" => $this->getVnpCommand(),//ma api su dung, de thanh toan dung 'pay', Yêu cầu truy vấn giao dịch (vnp_Command=querydr)\n\t\t \"vnp_CreateDate\" => $this->getVnpCreateDate(),//ngay tao\n\t\t \"vnp_CurrCode\" => $this->getVnpCurrCode(),//loai currency VND, USD, AUS...\n\t\t \"vnp_IpAddr\" => $this->getVnpIpAddr(),//dia chi IP nguoi mua\n\t\t \"vnp_Locale\" => $this->getVnpLocale(),//ngon ngu vn, en\n\t\t \"vnp_Merchant\" => $this->getVnpMerchant(),//viet tat cua cong ty\n\t\t //\"vnp_OrderInfo\" => $this->getVnpOrderInfo(),//noi dung muon noi khi thanh toan\n\t\t \"vnp_OrderType\" => $this->getVnpOrderType(),//mot trong 3 gia tri ( topup :Nạp tiền điện thoại, billpayment: Thanh toán hóa đơn, fashion: Thời trang)\n\t\t \"vnp_ReturnUrl\" => $this->getVnpReturnUrl(),//callback khi giao dich hoan thanh\n\t\t \"vnp_TxnRef\" => $this->getVnpTxnRef(),//order id ben coz\n\t\t \"vnp_Version\" => $this->getVersion(),//phien ban API\n\t\t //\"vnp_BankCode\" => $this->getVnpBankCode(),//ma ngan hang\n\t\t //\"vnp_SecureHashType\" => $this->getVnpSecureHashType(),//kieu ma hoa key\n\t\t //\"vnp_SecureHash\" => $this->bcryptHashSecret($this->getHashSecret()),//key cua ung dung\n\t\t //\"website_id\" => $this->getWebsiteId(),//key cua ung dung\n\t\t);\n\t\tif( !empty($this->getVnpOrderInfo()) ){\n\t\t\t$row['vnp_OrderInfo'] = $this->getVnpOrderInfo();\n\t\t}\n\t\tif( !empty($this->getVnpBankCode()) ){\n\t\t\t$row['vnp_BankCode'] = $this->getVnpBankCode();\n\t\t}\n\t\tksort($row);\n\t\t$query = '';\n\t\t$hashdata = '';\n\t\tforeach ($row as $key => $value) {\n\t\t\t$hashdata \t.= (!empty($hashdata) ? '&' : '' ) . $key . \"=\" . $value;\n\t\t $query \t\t.= (!empty($query) ? '&' : '' ) . urlencode($key) . \"=\" . urlencode($value);\n\t\t}\n\t\t$url = '';\n\t\tif( !empty($query) ){\n\t\t\t$url = $this->getVnpUrl() . \"?\" . $query;\n\t\t\tif ( !empty($this->getHashSecret()) ) {\n\t\t\t $vnpSecureHash = $this->bcryptHashSecret($this->getHashSecret() . $hashdata);\n\t\t\t $url .= '&vnp_SecureHashType='.$this->getVnpSecureHashType().'&vnp_SecureHash=' . $vnpSecureHash;\n\t\t\t}\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "cccc039918404764acf25e193a55b9f0", "score": "0.47396967", "text": "private function _buildUrl() {\n if (empty($this->config['paypal_signature'])) {\n $url = 'https://api.';\n } else {\n $url = 'https://api-3t.';\n }\n\n if ($this->config['paypal_environment'] === 'sandbox' || $this->config['paypal_environment'] === 'beta-sandbox') {\n $url .= 'sandbox.';\n }\n\n $url .= 'paypal.com/nvp/';\n\n $this->config['url'] = $url;\n }", "title": "" }, { "docid": "9f0043c9607829b28e768546f510ac94", "score": "0.47373897", "text": "public function getFlashyPurchase()\n {\n return $this->getFlashyConfig(self::FLASHY_PURCHASE_STRING_PATH);\n }", "title": "" }, { "docid": "12a35b186524ff93f9e2ded72487ce4f", "score": "0.4734381", "text": "public function getPayURefNo(){\n return $_GET['payrefno'];\n }", "title": "" }, { "docid": "9030f3eb52ed968d34793c3073d829f8", "score": "0.47341612", "text": "public function testCreateAchCardLinkUsingPost()\n {\n }", "title": "" }, { "docid": "66c84d81c8472edd605410893924e4c8", "score": "0.47301745", "text": "protected function getURL()\n\t{\n\t\t$mode = $this->getMode();\n\t\t\n\t\t$hostname = EnterpriseData::getEnterpriseHostname($this->property_short, $mode);\n\t\t$url = NULL;\n\t\t\n\t\tif (!empty($hostname))\n\t\t{\n\t\t\t$url = sprintf(\"http%s://%s/api/%s?company=%s&user=%s&pass=%s\",\n\t\t\t\t($mode === 'LIVE' || $mode === 'STAGING') ? 's' : '', // Always use HTTPS for live servers\n\t\t\t\t$hostname,\n\t\t\t\t$this->getURLFilename(),\n\t\t\t\tstrtolower(EnterpriseData::resolveAlias($this->property_short)),\n\t\t\t\t$this->getUsername($mode),\n\t\t\t\t$this->getPassword($mode)\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "48a0495a0e30a20a7d93ce5d6eccb437", "score": "0.47270462", "text": "function bccl_get_license_deed_url() {\n $cc_settings = get_option(\"cc_settings\");\n if (!$cc_settings) { return \"\"; }\n return $cc_settings[\"deed_url\"];\n}", "title": "" }, { "docid": "a346b4208733611b439c8077c0454889", "score": "0.47269377", "text": "public function acpPage( \\IPS\\nexus\\Purchase $purchase )\n\t{\n\t\tif ( $this->lkey and \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'lkeys_view' ) )\n\t\t{\n\t\t\tif ( $lkey = $purchase->licenseKey() )\n\t\t\t{\n\t\t\t\treturn \\IPS\\Theme::i()->getTemplate('purchases')->lkey( $lkey );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \\IPS\\Theme::i()->getTemplate('purchases')->noLkey( $purchase );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0f59b2eabb08950aa4457664658b899", "score": "0.47240534", "text": "public function getNextFreeCard() {\n $this->layout = \"\";\n $getfreecard = $this->Api->get_freecardDetails($_POST['clinic_id']);\n echo $getfreecard['card_number'];\n exit;\n }", "title": "" } ]
a3c6ff52236d66a26c9f98e910f919e0
/ add custom javascript/css
[ { "docid": "0ed2813f90590c26eab1b565970b011c", "score": "0.0", "text": "function wpb_adding_scripts() {\n\t/*** css ***/\n\twp_register_style('bootstrap', get_theme_file_uri() . '/css/bootstrap.min.css');\n\twp_register_style('swiper', get_theme_file_uri() . '/css/swiper.min.css');\n\twp_enqueue_style('bootstrap');\n\twp_enqueue_style('swiper');\n\t/*** javascript ***/\n\twp_register_script('jquery', get_theme_file_uri() . '/js/jquery.min.js',array( 'jquery' ) );\n\twp_register_script('bootstrap', get_theme_file_uri() . '/js/bootstrap.min.js',array( 'jquery' ),true );\n\twp_register_script('swiper', get_theme_file_uri() . '/js/swiper.min.js',array( 'jquery' ) ,true );\n\twp_register_script('main', get_theme_file_uri() . '/js/main.js',array( 'jquery' ),true);\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('bootstrap');\n\twp_enqueue_script('swiper');\n\twp_enqueue_script('main');\n}", "title": "" } ]
[ { "docid": "f8951c276d9f4420a0b6690d3e5285db", "score": "0.7836067", "text": "private function addCustomJS(){\n $headBlock = $this -> getLayout() -> getBlock('head') ;\n $headBlock -> addJs('zination/zinebuilder/jquery-1.11.3.min.js');\n $headBlock -> addJs('zination/zinebuilder/jquery-ui.min.js') ;\n $headBlock -> addJs('zination/zinebuilder/zinebuilder.js') ;\n \n }", "title": "" }, { "docid": "f39063d9c3d9ee60bd3afe86ccf6e469", "score": "0.7544351", "text": "function addJs(){\n \n }", "title": "" }, { "docid": "efcb57d516313dc43ba60676da523f70", "score": "0.7526345", "text": "public function addCustomCSS()\n {\n if(!Mage::helper('tooso/sdk')->isCustomCSSEnabled()){\n return;\n }\n\n $parentBlock = Mage::helper('tooso/sdk')->getScriptContainerBlock();\n if($parentBlock){\n $blockInitLibrary = Mage::helper('tooso/sdk')->getCustomCSSBlock();\n $parentBlock->append($blockInitLibrary);\n $this->_logger->debug('Javascript SDK: added custom CSS block');\n }else{\n $this->_logger->warn('Cannot include custom CSS block, parent container not found');\n }\n }", "title": "" }, { "docid": "f8747a38c4a56a428cf3ca81110009ea", "score": "0.7501137", "text": "private function addCustomCSS(){\n $headBlock = $this -> getLayout() -> getBlock('head') ;\n $headBlock -> addCss('zination/zinebuilder/jquery-ui.min.css') ;\n $headBlock -> addCss('zination/zinebuilder/zinebuilder.css') ;\n }", "title": "" }, { "docid": "cb8bf1cf67d3c5af4f551e6eaecb175f", "score": "0.7404927", "text": "function wp_custom_style_adding(){\r\n\t\twp_enqueue_style('custom',get_stylesheet_directory_uri() . '/cs/custom-style.css',array(),'2.0','all');\r\n\t\twp_enqueue_script('custom-js',get_stylesheet_directory_uri() .'/js/custom.js',array('jquery'),'1.0','all');\r\n\t}", "title": "" }, { "docid": "b4b916c8ac3a9ed1fae4a69bdef7c297", "score": "0.73993737", "text": "public function dt_button_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n\n }", "title": "" }, { "docid": "7d7a95f914f57db4d3fa67a9a8956038", "score": "0.7386029", "text": "protected function page_js_css()\r\n {\r\n $this->extemplate->add_js( $this->wsdl . 'js/Chart.min.js', 'import', FALSE, FALSE);\r\n //Enable for special handling using js for properties home page\r\n\t $this->extemplate->add_js('js/property_detail_value.js');\r\n $this->extemplate->add_js('js/property_new_listing.js');\r\n $this->extemplate->add_js('js/property_header.js');\r\n }", "title": "" }, { "docid": "ea480dd58ea60be0f6c4d15403942ec4", "score": "0.731783", "text": "public function loadCustomCssJs() {\n $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);\n $this->addJavascript($mgrUrl.\"assets/modext/widgets/system/modx.panel.dashboard.widget.js\");\n $this->addJavascript($mgrUrl.'assets/modext/sections/system/dashboards/widget/update.js');\n $this->addHtml('<script type=\"text/javascript\">Ext.onReady(function() {\n MODx.load({\n xtype: \"modx-page-dashboard-widget-update\"\n ,record: '.$this->modx->toJSON($this->widgetArray).'\n });\n});</script>');\n }", "title": "" }, { "docid": "95847394cc0618378513de1d1750d383", "score": "0.7244032", "text": "protected function page_js_css()\r\n {\r\n $this->extemplate->add_js( $this->wsdl . 'js/flow.min.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/fusty-flow.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/fusty-flow-factory.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/ng-flow.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/scale.fix.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js($this->wsdl . 'js/app.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/google_map.js', 'import', FALSE, FALSE);\r\n $this->extemplate->add_js( $this->wsdl . 'js/flip.min.js', 'import', FALSE, FALSE);\r\n \r\n \r\n \r\n //Enable for special handling using js for properties home page\r\n $this->extemplate->add_js('js/property_detail_value.js');\r\n $this->extemplate->add_js('js/property_details_page.js');\r\n $this->extemplate->add_js('js/property_details_info.js');\r\n $this->extemplate->add_js('js/property_header.js');\r\n $this->extemplate->add_css('css/properties_detail.css', 'link', FALSE, FALSE);\r\n \r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "695e8d3292fc00e7d0894a5ec63b9b1c", "score": "0.72062224", "text": "public function loadCssAndJs() {\n wp_register_style( 'vc_extend_style', plugins_url('../assets/vc_extend.css', __FILE__) );\n wp_enqueue_style( 'vc_extend_style' );\n\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'vc_extend_js', plugins_url('../assets/vc_extend.js', __FILE__), array('jquery') );\n }", "title": "" }, { "docid": "9a4a4ee2a250e23e8a77e8c7f8e54fae", "score": "0.7202246", "text": "public function dt_heading_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/sdroit-wbpakery-addons.css', __FILE__) );\n\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "title": "" }, { "docid": "09ed52aa7a8eb227244ddf4d8683cb52", "score": "0.7179178", "text": "private function rating_add_js() {\r\n global $head_content, $urlServer;\r\n static $loaded;\r\n \r\n if (isset($loaded[$this->widget])) {\r\n return;\r\n } else {\r\n $loaded[$this->widget] = true;\r\n }\r\n \r\n $head_content .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$urlServer.'modules/rating/style.css\">';\r\n \r\n if ($this->widget == 'up_down') {\r\n $head_content .= '<script src=\"'.$urlServer.'modules/rating/js/up_down/rating.js\" type=\"text/javascript\"></script>';\r\n } elseif ($this->widget == 'fivestar') {\r\n load_js('jquery.rateit.min.js');\r\n } elseif ($this->widget == 'thumbs_up') {\r\n $head_content .= '<script src=\"'.$urlServer.'modules/rating/js/thumbs_up/rating.js\" type=\"text/javascript\"></script>';\r\n }\r\n }", "title": "" }, { "docid": "6da7f13afbdcb2f52190e0e9d3fe680d", "score": "0.7153717", "text": "function script_and_style(){\n\t\tglobal $post;\n\n\t\tif( !in_array($post->post_type, array('post','page') ) )\n\t\t\treturn;\n\t\t// add javascript\n\t\twp_enqueue_script( 'codemirror', plugins_url( 'custom-js-meta-box/js/codemirror.js' ), array( 'jquery' ) );\n\t\twp_enqueue_script( 'codemirror-script-js', plugins_url( 'custom-js-meta-box/js/javascript.js' ), array( 'codemirror' ) );\n\t\t// add just the styles\n\t\twp_enqueue_style( 'codemirror-style', plugins_url( 'custom-js-meta-box/css/codemirror.css' ) );\n\n\t}", "title": "" }, { "docid": "98393562552d66a14ce811c5bf3f33f2", "score": "0.71157026", "text": "protected function _registerJS_CSS() {\n $snippetUrl = $modx->config['base_url'].$this->get('snippetUrl');\n foreach ($this->_template['js'] as $js) {\n // Check for relative path\n if (substr($js,0,7) != 'http://' && substr($js,0,1) != '/') {\n $js = $snippetUrl.$js;\n }\n\n $this->modx->regClientStartupScript($js);\n }\n\n foreach ($this->_template['css'] as $css) {\n // Check for relative path\n if (substr($css,0,7) != 'http://' && substr($css,0,1) != '/') {\n $css = $snippetUrl.$css;\n }\n\n $this->modx->regClientCSS($css);\n }\n }", "title": "" }, { "docid": "d82ea60dde42c67a36091addfa6fd08e", "score": "0.7067365", "text": "public static function load_css_js()\n\t{\n\t\t$doc = JFactory::getDocument();\n\t\t$vik = UIApplication::getInstance();\n\t\t\n\t\t$vik->loadFramework('jquery.framework');\n\n\t\t$options = array(\n\t\t\t'version' => VIKAPPOINTMENTS_SOFTWARE_VERSION,\n\t\t);\n\t\t\n\t\t/**\n\t\t * Do not load jQuery again.\n\t\t *\n\t\t * @since 1.6.2\n\t\t */\n\t\t// $vik->addScript(VAPASSETS_URI . 'js/jquery-1.11.1.min.js');\n\t\t$vik->addScript(VAPASSETS_URI . 'js/jquery-ui-1.11.1.min.js');\n\t\t$vik->addScript(VAPASSETS_URI . 'js/jquery-ui.sortable.min.js');\n\t\t$doc->addStyleSheet(VAPASSETS_URI . 'css/jquery-ui.min.css');\n\t\t\n\t\t$vik->addScript(VAPASSETS_ADMIN_URI . 'js/vikappointments.js', $options);\n\t\tVikAppointments::load_utils($options);\n\t\t\n\t\t$doc->addStyleSheet(VAPASSETS_ADMIN_URI . 'css/vikappointments.css', $options);\n\t\t$doc->addStyleSheet(VAPASSETS_ADMIN_URI . 'css/vap-admin.css', $options);\n\t}", "title": "" }, { "docid": "2a07256025a7a44d942d9560656d8638", "score": "0.70520306", "text": "function miTemaTutorial_add_CSS_js() {\n // esto carga algo\n wp_enqueue_style('normalize-styles', \"https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css\");\n // esto carga el archivo style.css\n wp_enqueue_style('miCss', get_template_directory_uri() .'/style.css');\n }", "title": "" }, { "docid": "30b45b1680ee813f7fcc9e0a7c46e794", "score": "0.7046859", "text": "public function setup_css_and_js() {\n \t$main_addons = array( 'Experience' , 'Premier' , 'Power' );\n \tforeach ( $main_addons as $slug ) {\n\t\t $addon = $this->slplus->addon( $slug );\n\t\t if ( ! empty( $addon ) && ! empty( $addon->userinterface_class_name ) ) {\n\t\t \tif ( $slug === 'Power' ) {\n\t\t\t\t $ui = $this->ui;\n\t\t\t } else {\n\t\t\t\t $ui_class = $addon->userinterface_class_name;\n\t\t\t\t $ui = $ui_class::get_instance();\n\t\t\t }\n\n\t\t\t $ui->js_settings = array_merge( $this->slplus->options, $addon->options );\n\t\t\t $ui->js_settings['ajaxurl'] = admin_url( 'admin-ajax.php' );\n\t\t\t $ui->js_settings['resturl'] = rest_url( 'store-locator-plus/v1/' );\n\t\t\t $ui->enqueue_ui_javascript();\n\t\t\t $ui->enqueue_ui_css();\n\t\t }\n\t }\n\n\t defined( 'SLPLUS_SCRIPTS_MANAGED' ) || define( 'SLPLUS_SCRIPTS_MANAGED' , true );\n\t SLP_Actions::get_instance()->wp_enqueue_scripts();\n\t SLP_UI::get_instance()->localize_script();\n\t wp_enqueue_script( 'slp_core' );\n }", "title": "" }, { "docid": "a48971273b0ab3ede95d4282d2d212b4", "score": "0.70190424", "text": "function registry_css_js() {\n\t\t/* registry css */\n\t\t/* wp_enqueue_style( 'style', get_stylesheet_uri()); */\n\n wp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\n wp_enqueue_style( 'style', THEME_URL . '/css/style.css' );\n\n\t /* registry js */\n\t wp_enqueue_script( 'jquery-min', THEME_URL . '/js/jquery-1.11.3.min.js', false, true );\n\t wp_enqueue_script( 'main', THEME_URL . '/js/main.js', false, true );\n\n\t}", "title": "" }, { "docid": "427766cfa606fef2f1b5861a0e9350aa", "score": "0.701713", "text": "public static function onAddScripts() {\n\t\tglobal $wp_version;\n\n\t\t$style_pre = '';\n\t\t$style_post = '';\n\t\tif ( $wp_version < 3.7 ) {\n\t\t\t$style_pre = '<style type=\"text/css\">';\n\t\t\t$style_post = '</style>';\n\t\t}\n\n\t\tself::addStyle( 'edit_layers','edit_layers' );\n\n\t\t// add google font\n\t\t// $urlGoogleFont = \"http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700\";\n\t\t// self::addStyleAbsoluteUrl($urlGoogleFont,\"google-font-pt-sans-narrow\");\n\t\tself::addScriptCommon( 'edit_layers','unite_layers' );\n\t\tself::addScriptCommon( 'css_editor','unite_css_editor' );\n\t\tself::addScript( 'rev_admin' );\n\n\t\tself::addScript( 'jquery.themepunch.tools.min','rs-plugin/js','tp-tools' );\n\n\t\t// include all media upload scripts\n\t\tself::addMediaUploadIncludes();\n\n\t\t// add rs css:\n\t\tself::addStyle( 'settings','rs-plugin-settings','rs-plugin/css' );\n\n\t\t$db = new UniteDBRev();\n\n\t\t$styles = $db->fetch( GlobalsRevSlider::$table_css );\n\t\t$styles = UniteCssParserRev::parseDbArrayToCss( $styles, \"\\n\" );\n\t\t$styles = UniteCssParserRev::compress_css( $styles );\n\t\twp_add_inline_style( 'rs-plugin-settings', $style_pre . $styles . $style_post );\n\n\t\t$custom_css = RevOperations::getStaticCss();\n\t\t$custom_css = UniteCssParserRev::compress_css( $custom_css );\n\t\twp_add_inline_style( 'rs-plugin-settings', $style_pre . $custom_css . $style_post );\n\t\t// self::addStyle(\"static-captions\",\"rs-plugin-static\",\"rs-plugin/css\");\n\t}", "title": "" }, { "docid": "eaa0631c3dfcd3690d2b61adfaf20144", "score": "0.70024157", "text": "public function registerCustomCodes() {\n wp_enqueue_style( \"s2p-main\", plugin_dir_url( __FILE__ ) . \"../assets/css/main.css\", false );\n }", "title": "" }, { "docid": "a178d33f25cc23ed49d724047133019b", "score": "0.7002346", "text": "function savi_add_view_page_js_css(){\n\t$template_dir = get_stylesheet_directory_uri();\n\twp_enqueue_script( 'jquery-ui-core' );\n\twp_enqueue_script( 'savi-pop-js', $template_dir . '/js/pop.js', array( 'jquery'), SAVI_2014_VERSION, false );\n\twp_enqueue_style( 'savi-pop', $template_dir . '/css/pop.css', array(), 1.0 );\n}", "title": "" }, { "docid": "23277894b0cf8f14735e0efe53db6d94", "score": "0.6976465", "text": "function theme_add_js() {\n\techo '<script type=\"text/javascript\" src=\"/js/jquery-2.1.3.min.js\"></script>';\n\techo '<script type=\"text/javascript\" src=\"/js/async.js\"></script>';\n}", "title": "" }, { "docid": "01e64bb5f3ad7c1b35edd9be9f7d73bc", "score": "0.6961323", "text": "protected function addAdditionalScript() {\necho <<< HTML\n <link rel=\"stylesheet\" type=\"text/css\" href=\"styles/baker.css\">\\n\nHTML;\n }", "title": "" }, { "docid": "454219da268f015a3fe4ea22bb01bc22", "score": "0.69528884", "text": "public function cssjs() {\n\n\t\tif( ! bp_is_active( $this->component_id ) )\n\t\t\treturn;\n\n\t\tif( bp_is_activity_component() || ( bp_is_active( 'groups' ) && bp_is_group_home() ) ) {\n\n\t\t\t// CSS is Theme's territory, so let's help him to easily override our css.\n\t\t\t$css_datas = (array) $this->css_datas();\n\n\t\t\twp_enqueue_style( $css_datas['handle'], $css_datas['location'], false, $this->version );\n\t\t\twp_enqueue_script( 'bp-reshare-js', $this->plugin_js . 'reshare.js', array( 'jquery' ), $this->version, true );\n\t\t\twp_localize_script( 'bp-reshare-js', 'bp_reshare_vars', buddyreshare_js_vars() );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ea5a91ad106cca49d082c0e843396a8c", "score": "0.69379425", "text": "public function admin_register_scripts() {\n\n\t\twp_register_style( 'noah-edit-control', $this->uri . 'css/noah-edit-control.css' );\n\t}", "title": "" }, { "docid": "b3e12ab53ffc2cdeec40f635e181d2b0", "score": "0.6925351", "text": "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/sudo/jquery.sudoSlider.js\");\n\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\n\t}", "title": "" }, { "docid": "cb8c203a0856b20e1cea599f341b405b", "score": "0.6923664", "text": "public function AddJsCss($Sender) {\n $Sender->AddCSSFile('voting.css', 'plugins/Voting');\n $Sender->AddJSFile('voting.js', 'plugins/Voting');\n }", "title": "" }, { "docid": "86811ef708c7f28b3e73485e46a41368", "score": "0.6856405", "text": "public static function add_custom_css() {\n\t\t\tif ( is_sensei() || is_tax( 'module' ) ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-sensei', OCEANWP_CSS_DIR_URI .'third/sensei.min.css' );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c6fcd50dbf30c30a0dd7581bd712a6e2", "score": "0.68559736", "text": "public function hookHeader(){\r\n $this->context->controller->addCSS($this->_path.'css/style.css');\r\n $this->context->controller->addJS($this->_path.'js/script.js');\r\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.68408614", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.68408614", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "255e79ca2f2556dc58fb92626e109767", "score": "0.6819823", "text": "static function js_add(){\n\t\twp_enqueue_style('thickbox');\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('media-uploader-services', SERVICE_POST_TYPE_url . '/js/media-uploader.js', array('jquery', 'media-upload', 'thickbox'));\n\t}", "title": "" }, { "docid": "1b0bbff75cbb138677fc29e21e2b963a", "score": "0.6799623", "text": "function add_css()\n{\n link_custom_css('/partners.css');\n link_custom_css('/page5a.css');\n link_custom_css('/donate-info.css');\n}", "title": "" }, { "docid": "82953dc85a1077b1d814e8495835ff71", "score": "0.679279", "text": "function addOwnScript(){\n wp_dequeue_script( 'dp-js' );\n\n // Add your own script \n $js_url = get_bloginfo('stylesheet_directory') . '/js';\n\n wp_enqueue_script( 'customScrollbar-concat-js', \"$js_url/jquery.mCustomScrollbar.concat.min.js\");\n wp_enqueue_script('dp',\"$js_url/common.js\"); \n}", "title": "" }, { "docid": "8233eae88166eb151c17b19db68dd842", "score": "0.6790819", "text": "public function enqueue_scripts() {\n\t\tparent::enqueue_scripts();\n\t\t$this->add_js( 'content-forms' );\n\t\t$this->add_css( 'content-forms' );\n\t}", "title": "" }, { "docid": "ae7c51651e7d6302380151b77601c702", "score": "0.67876697", "text": "public function register_scripts() {\n\t\twp_register_style( 'add-to-cal', ADD_TO_CALENDAR_ASSETS_URL . 'style.css', [] );\n\t\twp_register_script( 'add-to-cal', ADD_TO_CALENDAR_ASSETS_URL . 'generate.js', [ 'jquery' ] );\n\t}", "title": "" }, { "docid": "eec974d9d32ea4d022d2a8511973630d", "score": "0.67799133", "text": "function drupal_add_js() {}", "title": "" }, { "docid": "79274e5146170c991563f874312eddc9", "score": "0.6769382", "text": "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "title": "" }, { "docid": "fd3551bdd7817f9b81922a37aa8fb4f1", "score": "0.67627573", "text": "function child_add_scripts() {\n\t//wp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/inc/js/custom.js', array('jquery'), false, true);\n\t\n\t wp_register_script(\n 'custom',\n get_stylesheet_directory_uri() . '/inc/js/custom.js',\n false,\n '1.0',\n true\n );\n\n wp_enqueue_script( 'custom' );\n}", "title": "" }, { "docid": "b55d165e7caea0a4469826d52a6940a0", "score": "0.67335564", "text": "public function add_scripts() {\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script( 'fusion-button' );\n\t\t\t}", "title": "" }, { "docid": "041c4d279af147d1c33439575cfdb8a2", "score": "0.67003703", "text": "function wcp_js_alter(&$javascript){\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'wcp') . \"/js/vendor/jquery-1.11.2.min.js\";\n}", "title": "" }, { "docid": "727869c6e09e75c17ce27cae821e7e11", "score": "0.6692327", "text": "public function load_js_css_base(){\n global $mf_domain;\n\n wp_enqueue_style( 'mf_field_base', MF_BASENAME.'css/mf_field_base.css' );\n wp_enqueue_script( 'tmpl', MF_BASENAME.'js/third_party/jquery.tmpl.js'); \n wp_enqueue_script( 'mf_field_base', MF_BASENAME.'js/mf_field_base.js'); \n wp_enqueue_script( 'mf_sortable_groups', MF_BASENAME.'js/mf_sortable_groups.js', array( 'jquery-ui-sortable' ) );\n\n //global mf js\n $js_vars = array(\n 'mf_url' => MF_BASENAME,\n 'mf_player_url' => MF_BASENAME . 'js/singlemp3player.swf',\n 'mf_validation_error_msg' => __('Sorry, some required fields are missing. Please provide values for any highlighted fields and try again.',$mf_domain),\n 'mf_image_media_set' => __('Insert into field',$mf_domain)\n );\n wp_localize_script( 'mf_field_base', 'mf_js', $js_vars ); \n \n }", "title": "" }, { "docid": "68170a1860d8a39f04f85fbd8bcdc377", "score": "0.6654094", "text": "function add_onevoice_rarerelated_style() {\r\n\t\r\n\twp_register_style( 'rarerelated-custom-css', plugins_url( '/css/custom.css', __FILE__ ) );\r\n\twp_enqueue_style( 'rarerelated-custom-css' );\r\n\t\r\n\twp_register_script( 'rarerelated-custom-js', plugins_url( '/js/custom.js', __FILE__ ), true );\r\n\twp_enqueue_script( 'rarerelated-custom-js' );\r\n\t\r\n\twp_localize_script('rarerelated-custom-js', 'Ajax', array(\r\n\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\r\n\t));\r\n}", "title": "" }, { "docid": "ef291b17f48b33579bcb288b8d9e235d", "score": "0.6651816", "text": "function custom_js() {\n\n\t$js = get_theme_mod( 'js', '' );\n\t\tif ( ! empty( $js ) ) {\n\t\t\techo '<script id=\"advanced-custom-js\">' . htmlspecialchars_decode($js) . '</script>';\n\t\t}\n\n\t}", "title": "" }, { "docid": "251893f8ca6e59e006b989c5ed8f8d47", "score": "0.6650257", "text": "public function addJS()\n\t{\n\t\twp_enqueue_script(\n\t\t\t'custom-columns',\n\t\t\tCUSTOM_COLUMNS_PLUGINS_DIR . 'src/js/main.js',\n\t\t\tarray( 'jquery', 'jquery-ui-sortable' ),\n\t\t\t'1.0'\n\t\t);\n\t\t\n\t\twp_localize_script( 'custom-columns', 'ccLang', array(\n\t\t\t'defaultTabTitle'\t=>\t__( 'Edit Column-Title' ),\n\t\t));\n\t}", "title": "" }, { "docid": "86c0fcb9abac4bb73d9a52f7584e118e", "score": "0.66418046", "text": "public function prepare_javascript_stylesheet(){\n\n\t\twp_enqueue_script($this->plugin_name_short.'-javascript', plugins_url('js/admin_main.js', __FILE__ ).'?r='.rand());\n\t\twp_enqueue_style($this->plugin_name_short.'-stylesheet', plugins_url('css/admin_style.css', __FILE__ ).'?r='.rand());\n\t}", "title": "" }, { "docid": "28967d8368ec7e6708edee01e0287879", "score": "0.6640619", "text": "public function page_css_js()\n {\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/ionRangeSlider/css/ion.rangeSlider.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/ionRangeSlider/css/ion.rangeSlider.skinNice.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/password-indicator/css/password-indicator.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-combobox/css/bootstrap-combobox.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-select/bootstrap-select.min.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/jquery-tag-it/css/jquery.tagit.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-daterangepicker/daterangepicker.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/select2/dist/css/select2.min.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-eonasdan-datetimepicker/build/css/bootstrap-datetimepicker.min.css\"\n '));\n $this->template->add_css(base_url('color-admin/assets/plugins/bootstrap-colorpalette/css/bootstrap-colorpalette.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/jquery-simplecolorpicker/jquery.simplecolorpicker.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/jquery-simplecolorpicker/jquery.simplecolorpicker-fontawesome.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/jquery-simplecolorpicker/jquery.simplecolorpicker-glyphicons.css'));\n\n $this->template->add_css(base_url('color-admin/assets/plugins/parsley/src/parsley.css'));\n\n // load css datatable\n $this->template->add_css(base_url('color-admin/assets/plugins/DataTables/media/css/dataTables.bootstrap.min.css'));\n $this->template->add_css(base_url('color-admin/assets/plugins/DataTables/extensions/Responsive/css/responsive.bootstrap.min.css'));\n\n // load js plugin form\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/ionRangeSlider/js/ion-rangeSlider/ion.rangeSlider.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/masked-input/masked-input.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-timepicker/js/bootstrap-timepicker.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/password-indicator/js/password-indicator.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-combobox/js/bootstrap-combobox.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-select/bootstrap-select.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput-typeahead.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/jquery-tag-it/js/tag-it.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-daterangepicker/moment.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-daterangepicker/daterangepicker.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/select2/dist/js/select2.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-eonasdan-datetimepicker/build/js/bootstrap-datetimepicker.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-show-password/bootstrap-show-password.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/bootstrap-colorpalette/js/bootstrap-colorpalette.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/jquery-simplecolorpicker/jquery.simplecolorpicker.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/clipboard/clipboard.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/js/release/form-plugins.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/parsley/dist/parsley.js'), TRUE);\n\n // load js datatable\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/media/js/jquery.dataTables.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/media/js/dataTables.bootstrap.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/dataTables.buttons.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/buttons.bootstrap.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/buttons.flash.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/jszip.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/pdfmake.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/vfs_fonts.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/buttons.html5.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Buttons/js/buttons.print.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Responsive/js/dataTables.responsive.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/AutoFill/js/dataTables.autoFill.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/ColReorder/js/dataTables.colReorder.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/KeyTable/js/dataTables.keyTable.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/RowReorder/js/dataTables.rowReorder.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/plugins/DataTables/extensions/Select/js/dataTables.select.min.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/js/release/table-manage-default.js'), TRUE);\n $this->template->add_js(base_url('color-admin/assets/js/angularjs/angular.min.js'), TRUE);\n }", "title": "" }, { "docid": "31bae2a256ea990a462179bd66a45782", "score": "0.6630376", "text": "function css_content() {\r\n\t\t// Setting a javascript header\r\n\t\t$this->header('Content-type: text/javascript');\r\n\t\t$this->layout = 'ajax';\r\n\t}", "title": "" }, { "docid": "60f8d11daaca14f4d280bfae0daf03c9", "score": "0.6628977", "text": "function set_scripts() {\n\n // StyleSheet\n wp_enqueue_style( 'theme-style', get_custom_stylesheet(), array(), Beyond()->get_theme_version(), all );\n\n // JavaScript\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'scripts', Beyond::$template_dir_url . '/assets/js/scripts.min.js', array(), Beyond()->get_theme_version(), true );\n\n}", "title": "" }, { "docid": "47efef002fca74a17810d8adfb7aee8e", "score": "0.6625889", "text": "public function addAssets()\n {\n $this->addJs('/modules/system/assets/ui/vendor/bootstrap/js/modal.js');\n $this->addJs('/modules/system/assets/ui/js/popup.js');\n }", "title": "" }, { "docid": "87abe96e6ede0382acf9deb3b7f206ec", "score": "0.6625301", "text": "function xkit_theme_scripts_custom(){\n\tif( $custom_js = xkit_get_theme_option( 'custom_js' ) ){\n\n\t\techo '<script>' . \"\\n\";\n\t\t\techo '//<![CDATA[' . \"\\n\";\n\t\t\t\techo xkit_minify_js( $custom_js ) . \"\\n\";\n\t\t\techo '//]]>' . \"\\n\";\n\t\techo '</script>' . \"\\n\";\n\t}\n}", "title": "" }, { "docid": "9535a09cb166123cf64300871c8c8f3d", "score": "0.6625028", "text": "public static function add_script() {\n\t\t\tglobal $library_url;\n\t\t\twp_register_script( 'vk-mobile-nav-js', $library_url . '/js/vk-mobile-nav.min.js', array(), self::$version );\n\t\t\twp_enqueue_script( 'vk-mobile-nav-js' );\n\t\t\twp_enqueue_style( 'vk-mobile-nav-css', $library_url . '/css/vk-mobile-nav-bright.css', array(), self::$version, 'all' );\n\t\t}", "title": "" }, { "docid": "ca5becbede4803eddb69ef9a41b732bc", "score": "0.6618197", "text": "function cca_js_alter(&$javascript) {\n if ($javascript['misc/jquery.js']) {\n $javascript['misc/jquery.js']['version'] = '1.10.2';\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme','cca').'/js/vendor/jquery-1.10.2.min.js';\n }\n foreach($javascript as &$script) {\n $script['scope'] = 'footer';\n }\n}", "title": "" }, { "docid": "e04df77b107f81eafedda68d91c7baa3", "score": "0.6615735", "text": "public function add_js(){\n\n\t\t// registering our scripts first\n\t\twp_enqueue_script( 'jqueryvalidate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array( 'jquery' ), '1.0', true );\n\t\twp_enqueue_script( 'comthemescripts', get_template_directory_uri() . '/assets/js/scripts.js', array( 'jquery' ), '1.0', true );\n\n\t\tif( is_single() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t} // single && get_option\n\n\t}", "title": "" }, { "docid": "023701bd4a761cec966b84c6286d80ee", "score": "0.66114646", "text": "function add_JS() {\n\t\twp_register_script( 'my_jquery', get_template_directory_uri() . '/js/jquery-1.8.0.min.js' );\n\t\twp_register_script( 'jqueryCarouFredSel', get_template_directory_uri() . '/js/jquery.carouFredSel-5.5.0-packed.js', array('my_jquery') );\n\t\twp_register_script( 'functions', get_template_directory_uri() . '/js/functions.js', array('jqueryCarouFredSel') );\n\t\tglobal $wp_scripts;\n\t\twp_register_script('lt-ie-9', get_template_directory_uri() . '/js/modernizr.custom.js' );\n\t\t$wp_scripts->add_data('lt-ie-9', 'conditional', 'lt IE 9');\n\t\twp_enqueue_script( 'my_jquery' );\n\t\twp_enqueue_script( 'jqueryCarouFredSel' );\n\t\twp_enqueue_script( 'functions' );\n\t\twp_enqueue_script('lt-ie-9');\n\t\twp_enqueue_script( 'jquery' );\t\t\t\n\t}", "title": "" }, { "docid": "eed4795d8a4b27a38d7d094a6d6aacf9", "score": "0.66085917", "text": "public function scripts() \n\t{\t\n\t\t$page = isset( $_GET['page'] ) ? $_GET['page'] : '';\n\t\t\n\t\t// Only add on Upload Avatar Page\n\t\tif( $page == 'upload-avatar' )\n\t\t{\n\t\t\twp_register_style( 'style', WP_AVATAR_URL . 'assets/style.css' );\n\t\t\twp_register_script( 'script', WP_AVATAR_URL . 'assets/script.js' );\n\t\t\twp_enqueue_style( 'style' );\n\t\t\twp_enqueue_script( 'script' );\n\t\t}\n\t}", "title": "" }, { "docid": "ba6194c4ccca2f370b1b74eb8e06ee81", "score": "0.6593506", "text": "function add_style() {\n wp_register_style('style', plugins_url('/css/style.css',__FILE__ ));\n wp_enqueue_style('style');\n wp_register_script('checkbox', plugins_url('/js/style.css',__FILE__ ));\n wp_enqueue_script('checkbox');\n}", "title": "" }, { "docid": "3c084c6fcea04777bd48cf02aafb89df", "score": "0.65930843", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/gradiadsense.js');\n $this->context->controller->addCSS($this->_path.'/views/css/gradiadsense.css');\n }", "title": "" }, { "docid": "4fea7b3349ea8131f3c69d8afefac552", "score": "0.65925103", "text": "function addJs($file){\n if( !is_admin() ){\n wp_enqueue_script(\n 'mvc-'.$file,\n JS_DIR. $file.'.js',\n array('jquery', 'mvc-child-js' )\n );\n } else {\n wp_enqueue_script(\n 'mvc-'.$file,\n JS_DIR. $file.'.js',\n array('jquery', 'mvc-admin-js' )\n ); \n \n }\n }", "title": "" }, { "docid": "0e90b6f464fe98e99b22f6c347a49e89", "score": "0.6585356", "text": "function add_assets() {\n\twp_enqueue_script('add-js', plugins_url( \".\", __FILE__ ).'/dist/main.js?v=2', $in_footer = true );\n}", "title": "" }, { "docid": "6719aa94b3ce4bc8d25519c3c2edecb3", "score": "0.6582282", "text": "public function addJS()\n {\n $this->kee->include_script('keeweb1.js');\n $this->kee->include_script('keeweb2.js');\n $this->kee->include_script('keeweb3.js');\n }", "title": "" }, { "docid": "be4226083b4fed22693998b376fed890", "score": "0.6580087", "text": "function custom_scripts() {\n\t\t\t\n\t// enqueue script\n\twp_enqueue_script('custom-js', get_stylesheet_directory_uri() .'/js/customJs.js', array('jquery'), '', true);\n\t\n}", "title": "" }, { "docid": "208697238b1991bd2fae0362ff5219a5", "score": "0.6570244", "text": "public function includeJsCssFiles();", "title": "" }, { "docid": "9cfebc1f39e99538c2526b3857fa4fa4", "score": "0.6567004", "text": "public function addAssets()\n\t{\n\t\twp_register_style(\n\t\t\t'csframework-jquery-ui-theme',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/jquery-ui.theme.min.css',\n\t\t\tarray(),\n\t\t\t'1.11.4'\n\t\t);\n\t\twp_register_style(\n\t\t\t'csframework-jquery-ui-structure',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/jquery-ui.structure.min.css',\n\t\t\tarray(),\n\t\t\t'1.11.4'\n\t\t);\n\t\twp_register_style(\n\t\t\t'csframework-jquery-ui',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/jquery-ui.min.css',\n\t\t\tarray( 'csframework-jquery-ui-theme', 'csframework-jquery-ui-structure' ),\n\t\t\t'1.11.4'\n\t\t);\n\t\twp_register_style(\n\t\t\t'iris',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/iris.min.css',\n\t\t\tarray(),\n\t\t\t'1.0.7'\n\t\t);\n\t\twp_register_style(\n\t\t\t'csframework-sortable-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/sortable.css',\n\t\t\tarray(),\n\t\t\t'1.0.0'\n\t\t);\n\t\twp_register_style(\n\t\t\t'csframework-repeatable-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/css/repeatable.css',\n\t\t\tarray( 'csframework-sortable-field' ),\n\t\t\t'1.0.0'\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-ajax-form',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/ajax-form.js',\n\t\t\tarray( 'jquery-form' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-sortable-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/sortable.js',\n\t\t\tarray( 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-sortable' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-repeatable-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/repeatable.js',\n\t\t\tarray( 'csframework-sortable-field' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-date-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/date.js',\n\t\t\tarray( 'jquery', 'jquery-ui-datepicker' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/field.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-accordion',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/accordion-init.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'iris',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/iris.min.js',\n\t\t\tarray( 'jquery-ui-draggable', 'jquery-ui-slider' ),\n\t\t\t'1.0.7',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'csframework-color-field',\n\t\t\tCSFRAMEWORK_PLUGIN_URL . 'assets/js/colorpicker-init.js',\n\t\t\tarray( 'iris' ),\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t);\n\n\t}", "title": "" }, { "docid": "a4622de1b33ceec3a41a11a15a12616e", "score": "0.6566212", "text": "function enqueue_additional_scripts() {\n\n\tglobal $typenow;\n\tif ($typenow == 'project') {\n\t\twp_register_script( 'jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js\"');\n\t\twp_enqueue_script('jquery-ui');\n\t\t\n\t\twp_enqueue_media();\n\t\t// Registers and enqueues the required javascript.\n\t\twp_register_script('meta-box-image', get_stylesheet_directory_uri() . '/js/meta-box-image.js', array('jquery'));\n\t\twp_localize_script('meta-box-image', 'meta_image', array(\n\t\t\t'title' => __('meta-imageUpload an Image', 'prfx-textdomain'),\n\t\t\t'button' => __('Use this image', 'prfx-textdomain'),\n\t\t\t\t)\n\t\t);\n\t\twp_enqueue_script('meta-box-image');\n\t\t\n\t}\n}", "title": "" }, { "docid": "3fee7fd52d4d1faf5c0865c9b4e347bd", "score": "0.6562745", "text": "function addCommonJs()\r\n\t{\r\n\t\t$this->addJsForGrid();\r\n\t}", "title": "" }, { "docid": "2f7fc385167937784afe9fdc36c5c91a", "score": "0.65572435", "text": "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "title": "" }, { "docid": "5edfba06386613b9e08e8c0bbd23672b", "score": "0.6554176", "text": "function prostart_add_meta_box_scripts() {\n\t\t// If current screen is 'Edit Page' - load font icons\n\t\t$screen = function_exists('get_current_screen') ? get_current_screen() : false;\n\t\tif (is_object($screen) && prostart_allow_meta_box(!empty($screen->post_type) ? $screen->post_type : $screen->id)) {\n\t\t\twp_enqueue_style( 'prostart-icons', prostart_get_file_url('css/font-icons/css/fontello-embedded.css'), array(), null );\n\t\t\twp_enqueue_script( 'jquery-ui-tabs', false, array('jquery', 'jquery-ui-core'), null, true );\n\t\t\twp_enqueue_script( 'jquery-ui-accordion', false, array('jquery', 'jquery-ui-core'), null, true );\n\t\t\twp_enqueue_script( 'prostart-options', prostart_get_file_url('theme-options/theme-options.js'), array('jquery'), null, true );\n\t\t\twp_localize_script( 'prostart-options', 'prostart_dependencies', prostart_get_theme_dependencies() );\n\t\t}\n\t}", "title": "" }, { "docid": "dad89e549f495dc2676e205acb694ea5", "score": "0.655062", "text": "function head_script() // add a Javascript file from plugin directory\r\n\t\t{\r\n\t\t\t$this->content['script'][]='<SCRIPT SRC=\"'.\r\n\t\t\t\tqa_html('./qa-content/mp-google-analytics.js').\r\n\t\t\t\t'\" TYPE=\"text/javascript\"></SCRIPT>';\r\n\t\t\t\t\r\n\t\t\tqa_html_theme_base::head_script();\r\n\t\t}", "title": "" }, { "docid": "eb2a95a4942a356f70e2df1d9a5711bd", "score": "0.6544717", "text": "function artothek_include_scripts(){\n\t\twp_register_script('jquery-ui', get_stylesheet_directory_uri() . '/js/jquery.mousewheel.min.js', array('jquery'), '1.0', true);\n\t\twp_register_script( 'jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js\"');\n\t\twp_enqueue_script('jquery-ui');\n\t\t\n\t\twp_dequeue_script( 'vertex-custom-script', get_template_directory_uri() . '/js/custom.js' );\n\t\t\n\t\twp_register_script('arscustom', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true);\n\t\twp_enqueue_script('arscustom');\n\t\t\n\t\twp_register_script('modal', get_stylesheet_directory_uri() . '/js/jquery.easyModal.js');\n\t\twp_enqueue_script('modal');\n\n}", "title": "" }, { "docid": "b661aac3b243d72ac513b187cd489cac", "score": "0.65431845", "text": "public function add_scripts()\n {\n ///ADMIN PAGES META\n wp_enqueue_script(\"uip-admin-pages\", $this->pathURL . \"admin/apps/admin-pages/js/admin-pages-meta.min.js\", [\"jquery\"], $this->version, true);\n }", "title": "" }, { "docid": "601322e7f8daaffc72d7b179a8081395", "score": "0.6538317", "text": "function addJavascriptCode($code)\n {\n $this->head_content[] = (object) array('type' => 'javascript', 'body' => $code);\n }", "title": "" }, { "docid": "20661cc5ac523bb6407091751ee25c34", "score": "0.6536944", "text": "function include_required_scripts() {\n if ( $this->custom_post_type === foo_current_screen_post_type() ) {\n\n $base_url = plugins_url( '', dirname(__FILE__) );\n\n //include some default styles\n $url = $base_url . '/css/admin-metabox.css';\n wp_enqueue_style( 'foopluginbase-metabox-default', $url, array(), $this->plugin_version );\n\n //include some default javascript\n $url = $base_url . '/js/admin-metabox.js';\n wp_enqueue_script( 'foopluginbase-metabox-default', $url, array( 'jquery' ), $this->plugin_version );\n\n if ( $this->is_field_type_being_used( 'colorpicker' ) ) {\n //spectrum needed for the colorpicker field\n $url = $base_url . '/js/spectrum.js';\n wp_enqueue_script( 'foopluginbase-metabox-spectrum', $url, array( 'jquery' ), $this->plugin_version );\n $url = $base_url . '/css/spectrum.css';\n wp_enqueue_style( 'foopluginbase-metabox-spectrum', $url, array(), $this->plugin_version );\n }\n }\n }", "title": "" }, { "docid": "9c9b4962ea069a43323f83d12bb8708f", "score": "0.6535495", "text": "public function add_custom_script(){\r\n \r\n if ( !wp_script_is( 'google-maps', 'registered' ) ) {\r\n wp_register_script( 'google-maps', ( is_ssl() ? 'https' : 'http' ) . '://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&key=AIzaSyCkldtSiTJ6TQ5sJsa2E_b6l5rGDfe3DMQ', array( 'jquery' ), false );\r\n }\r\n \r\n //enqueue google maps api if not already enqueued\r\n if ( !wp_script_is( 'google-maps', 'enqueued' ) ) {\r\n wp_enqueue_script( 'google-maps' );\r\n } \r\n \r\n wp_enqueue_script( 'my-custom-js', PLUG_DIR_URI.'assets/js/wisetr-frontend.js',array('jquery','wp-util'),'1.0',true);\r\n wp_enqueue_style( 'my-custom-css', PLUG_DIR_URI.'assets/css/custom-style.css');\r\n }", "title": "" }, { "docid": "6e67b0401b596c507407b4bbd1d87cf6", "score": "0.65338767", "text": "function add_js_css_theme()\n\t{\n\t\tif(!is_admin())\n\t\t{\n\t\t\twp_enqueue_script('jquery'); //loading js for the calendar and date/time input for the user form upfront\n\t\t\t$url = get_bloginfo('wpurl').'/wp-content/plugins/eventify/js/'; \n\t\t\twp_register_script('momentjs','//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js',false,'');\n\t \t wp_enqueue_script( 'momentjs' );\n\t \t\t\t\n\t\t\twp_register_script('pickaday',$url.'pickaday.js',false,'');\n\t \t wp_enqueue_script( 'pickaday' );\n\t\t\t\n\t\t\twp_register_script('jquery.timepicker',$url.'jquery.timepicker.js',false,'');\n\t\t \twp_enqueue_script( 'jquery.timepicker' );\n\t\t\twp_register_script('jquery.validate',$url.'jquery.validate.pack.js',false,'');\n\t\t\twp_enqueue_script('jquery.validate');\n\t\t\twp_register_script('popupscript', WP_PLUGIN_URL . '/eventify/js/eventifypopups.js'); //make the script available to all pages and sidebars using eventify\n\t\t\t\n\t\t\twp_enqueue_script('popupscript');\n\t\t\t//wp_register_script('fullcalendar',$url.'fullcalendar.min.js',false,'');\n\t\t\twp_register_script('fullcalendar','//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.min.js',false,'');\n\t\t\twp_enqueue_script('fullcalendar'); //register and enqueue the script to load when cal short tag is called.\n\t\t\twp_register_script('qtip',$url.'qtip.js',false,'');\n\t\t\twp_enqueue_script('qtip');\n\t\t\t\n\t\t\t$url = get_bloginfo('wpurl').'/wp-content/plugins/eventify/css/'; \n\t\t\techo '<link type=\"text/css\" rel=\"stylesheet\" href=\"' .$url. 'pickaday.css\" />' . \"\\n\";\n\t\t\techo '<link type=\"text/css\" rel=\"stylesheet\" href=\"' .$url. 'eventify.fullcall.css\" />' . \"\\n\";\n\t\t\t$popupcssurl = get_bloginfo('wpurl').'/wp-content/plugins/eventify/css/popup_widget.css'; //keep css for popups\n\t\t\techo \"<link type=\\\"text/css\\\" rel=\\\"stylesheet\\\" href=\\\"$popupcssurl\\\" />\";\n\t\t}\n\t}", "title": "" }, { "docid": "046aa7dac4e943a4933e103ccf9ed368", "score": "0.6529413", "text": "function enqueue_scripts() {\n\t\t\tif( function_exists( 'cp_register_addon' ) ) {\n\t\t\t\tcp_register_addon( $this->slug, $this->setting );\n\t\t\t}\n\t\t\twp_register_script( $this->slug.'-script', plugins_url('js/'.$this->slug.'-script.js', __FILE__), array('jquery'), '1.1', true );\n\t\t\twp_enqueue_script( $this->slug.'-script' );\n\t\t\tadd_action( 'admin_head', array( $this, 'hook_css' ) );\n\t\t}", "title": "" }, { "docid": "235c4b3df4e204e998cd0fe634de579f", "score": "0.6524827", "text": "function adminpanel_scripts_styles()\n{\n // admin css syles\n\n // admin javascript\n //wp_register_script('adminscript', get_template_directory_uri() . '/js/admin.js', array('jquery'), '1.0.0'); // Custom scripts\n //wp_enqueue_script('adminscript'); // Enqueue it!\n}", "title": "" }, { "docid": "f1f74564f9d8c46a043027a425063c69", "score": "0.6517409", "text": "public function assets() {\n\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );\n\t\tadd_filter( 'admin_footer_text', array( $this, 'footer' ) );\n\t\tadd_action( 'in_admin_header', array( $this, 'output_plugin_screen_banner') );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'fix_plugin_js_conflicts'), 100 );\n\n\t}", "title": "" }, { "docid": "95f447be4a7b2150c59f8dd4f8a52cc8", "score": "0.65165246", "text": "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n\t<script src=\"./js/setSelectedStore.js\" type=\"text/javascript\"></script>\n\t<link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "title": "" }, { "docid": "f66c380a0fd5f97558331245cfa25eae", "score": "0.65089667", "text": "public static function onAddScriptsBrowser(){\r\n\t\t\t\r\n\t\t\tself::addScripts_settingsBase();\r\n\t\t\t\r\n\t\t\tHelperUC::addStyle(\"unitecreator_browser\",\"unitecreator_browser_css\");\r\n\t\t\tHelperUC::addScript(\"unitecreator_browser\", \"unitecreator_browser\");\t\t\t\r\n\t\t\tHelperUC::addScript(\"unitecreator_addon_config\", \"unitecreator_addon_config\");\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "965b72d299d86aa3feddb3f5a317467b", "score": "0.650453", "text": "function add_css() {\n\t\t$instances = get_option('widget_gk_tabs');\n\t\t$loaded_files = array();\n\n\t\tif(is_array($instances) || is_object($instances)) {\n\t\t\tforeach($instances as $instance) {\n\t\t\t\tif(!empty($instance['style']) && $instance['style'] != '' && $instance['style'] != 'none' && !in_array($instance['style'], $loaded_files)) {\n\t\t\t\t\twp_register_style( 'gk-tabs-' . $instance['style'], plugins_url('styles/'. $instance['style'] .'.css', __FILE__), array(), false, 'all');\n\t\t\t\t\twp_enqueue_style('gk-tabs-' . $instance['style']);\t\n\t\t\t\t\tarray_push($loaded_files, $instance['style']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "761a1851dac77b8804c55b477e5b8145", "score": "0.65040505", "text": "function add_hooks_and_filters() {\n add_action( 'slp_after_render_shortcode' , array( $this , 'enqueue_ui_javascript' ) );\n add_action( 'slp_after_render_shortcode' , array( $this , 'enqueue_ui_css' ) );\n }", "title": "" }, { "docid": "fb3756e06014251775f23682f8c70e1d", "score": "0.6499598", "text": "public static function est_register_scripts()\n\t\t{\n\t\t\twp_register_style('style.css',EST_DIR_URL.'assets/css/style.css');\n\t\t\twp_register_style('sweetalertcss',EST_DIR_URL.'assets/css/sweetalert.min.css');\n\t\t\twp_register_style('fontawasome','https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css');\n\t\t\twp_register_script('blockui',EST_DIR_URL.'assets/js/jquery.blockUI.js',array('jquery'));\n\t\t\twp_register_script('sweetalertjs',EST_DIR_URL.'assets/js/sweetalert.js',array('jquery'));\n\t\t\twp_register_script('jqueryui.js',EST_DIR_URL.'assets/js/jquery-ui.js',array('jquery','sweetalertjs','blockui'));\n\t\t\twp_register_script('validate.js',EST_DIR_URL.'assets/js/validate.js',array('jquery','sweetalertjs','blockui'));\n\t\t}", "title": "" }, { "docid": "7032ab34de2212306427109809759f56", "score": "0.6498688", "text": "function cc_scripts()\n{ \n\t$frontController = Zend_Controller_Front::getInstance();\n\t$baseUri = $frontController->getBaseUrl();\n\t?>\n\t\t<style type=\"text/css\" >\n\t\t/* Import Styles for the CC License Chooser */\n\t\t<?php include('cc.css') ?>\n\t\t</style>\n\t\t\n\t\t<p />\n <div id=\"cc_widget_container\" style='display:block;clear:both;'>\n\t<script type=\"text/javascript\" src=\"http://api.creativecommons.org/jswidget/tags/0.97/complete.js?locale=en_US\"></script>\n\t<?php //echo js('complete'); ?>\n </div>\n\n\t<?php\n}", "title": "" }, { "docid": "4f549ea808faa0b3bcf7bd6651a9f501", "score": "0.64986616", "text": "function add_meta() {\n parent::add_meta();\n ctools_add_js('ajax-responder');\n ctools_add_js('panels_selective_ipe', 'panels_selective_ipe');\n }", "title": "" }, { "docid": "3c17bd66437904d6e4c0b771de4d7cac", "score": "0.6496044", "text": "function scripts_and_styles() {\n\t\t\n\t\t// styles (enqueued in widget function)\n\t\twp_register_style( 'coenv-faculty-widget', COENVFW_DIRNAME . 'assets/styles/build/coenv-faculty-widget.css' );\n\t\twp_enqueue_style( 'coenv-faculty-widget' );\n\n\t\t// scripts (enqueued in widget function)\n\t\twp_register_script( 'coenv-faculty-widget', COENVFW_DIRNAME . 'assets/scripts/build/coenv-faculty-widget.js', array( 'jquery' ), '', true );\n\n\t\t// set up plugin js vars\n\t\twp_localize_script( 'coenv-faculty-widget', 'coenvfw', $this->js_vars() );\n\t}", "title": "" }, { "docid": "9b15c79fc0af1de1d8d01696a4d4af22", "score": "0.64954185", "text": "function admin_script_style(){\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\t\t\twp_register_script( 'psforum-shortcodes-scripts', plugins_url( '/admin/js/psfs-admin' . $suffix . '.js', PSFS_PLUGIN_FILE ), array( 'jquery' ), PSFS_VERSION, true );\n\t\t\twp_localize_script( 'psforum-shortcodes-scripts', 'psforum_shortcodes', array(\n\t\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' )\n\t\t\t) );\n\t\t\twp_enqueue_script( 'psforum-shortcodes-scripts' );\n\t\t\twp_enqueue_style( 'psforum-shortcodes-styles', plugins_url( '/admin/css/psfs-admin.css', PSFS_PLUGIN_FILE ), array(), PSFS_VERSION );\n\t\t}", "title": "" }, { "docid": "eaea0f09b96ac3e8c5f10689f24bc3c7", "score": "0.64945185", "text": "public function conditional_scripts(){\n\t\tif( ! $this->add_script )\n\t\t\treturn;\n\t\t\n\t\twp_enqueue_style( $this->plugin_name );\n\t\twp_enqueue_script( $this->plugin_name );\n\t}", "title": "" }, { "docid": "db81054529295f88ce2a3d30ca39461c", "score": "0.64925", "text": "protected function registerScript()\n {\n $clientOptions = Json::encode($this->clientOptions);\n $this->getView()->registerJs(\"jQuery('#{$this->options['id']}').redactor({$clientOptions});\");\n }", "title": "" }, { "docid": "cc47521c2b5c5f9d143ab66e6fc8f6fd", "score": "0.64882934", "text": "function twentytwenty_child_register_scripts() {\n\t\n\t$theme_version = wp_get_theme()->get( 'Version' );\n // Add jqury\n wp_enqueue_script( 'jquery');\n\t\n\t//Add my script\n\twp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/assets/js/custom.js', array(), $theme_version, false );\n\twp_script_add_data( 'custom', 'async', true );\n\t\n\n}", "title": "" }, { "docid": "bfd5e61a7c232aa5a02459b24c1f4a38", "score": "0.6474918", "text": "function add_hooks(){\n //add admin scripts\n add_action('admin_enqueue_scripts', array($this, 'hvp_admin_scripts'));\n\n //add public scripts\n add_action('wp_enqueue_scripts', array($this, 'hvp_public_scripts'));\n\n //add public styles\n add_action('wp_enqueue_scripts', array($this, 'hvp_public_styles'));\n }", "title": "" }, { "docid": "d3671bf441c7b95fade5933d622a2b2d", "score": "0.64705384", "text": "public function add_inline_js($text) {\n\t\t\tglobal $sedlex_list_scripts ; \n\t\t\t$id = sha1($text) ; \n\t\t\t// Repertoire de stockage des css inlines\n\t\t\t$path = WP_CONTENT_DIR.\"/sedlex/inline_scripts\";\n\t\t\t$path_ok = false ; \n\t\t\tif (!is_dir($path)) {\n\t\t\t\tif (@mkdir(\"$path\", 0755, true)) {\n\t\t\t\t\t$path_ok = true ; \t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tSLFramework_Debug::log(get_class(), \"The folder \". WP_CONTENT_DIR.\"/sedlex/inline_scripts\".\" cannot be created\", 2) ; \n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$path_ok = true ; \n\t\t\t}\n\t\t\t\n\t\t\t// On cree le machin\n\t\t\tif ($path_ok) {\n\t\t\t\t$css_f = $path.\"/\".$id.'.js' ; \n\t\t\t\tif (!@is_file($css_f)) {\n\t\t\t\t\t@file_put_contents($css_f, $text) ; \n\t\t\t\t}\n\t\t\t\t@chmod($css_f, 0755);\n\t\t\t\t$sedlex_list_scripts[] = $css_f ; \n\t\t\t} else {\n\t\t\t\techo \"\\n<script type='text/javascript'>\\n\" ; \n\t\t\t\techo $text ; \n\t\t\t\techo \"\\n</script>\\n\" ; \n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b5dc2d7c81de0a10ed6fc1fb153cd192", "score": "0.64670485", "text": "protected function initJS()\n {\n \n sfContext::getInstance()->getResponse()->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/prototype');\n sfContext::getInstance()->getResponse()->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/effects');\n sfContext::getInstance()->getResponse()->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/builder');\n sfContext::getInstance()->getResponse()->addJavascript('/js/yzAjaxValidation/yzAjaxValidation'); \n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.6458921", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.6458921", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "19b59b3977ed696cf4e0fd2bd5d69b28", "score": "0.6455772", "text": "function jsIncludes()\n\t\t{\n\n\t\t\twp_register_script( 'themeists_like_script', plugins_url( 'themeists_like_script.js', __FILE__ ), array('jquery'), '', true );\n\t\t\twp_localize_script( 'themeists_like_script', 'themeists_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'themeists_like_script' );\n\n\t\t\tif( of_get_option( 'show_likethis_stylesheet' ) == 1 )\n\t\t\t\twp_enqueue_style( 'themeists_likethis_stylesheet', plugins_url( 'themeists_likethis.css', __FILE__ ) );\n\n\n\t\t}", "title": "" }, { "docid": "8a3f6646bf6d5338730d913b35fd2fdf", "score": "0.6452527", "text": "public function admin_scripts_with_js() {\n\t\twp_enqueue_style( 'fusion_builder_admin_css', FUSION_BUILDER_PLUGIN_URL . 'css/fusion-builder-admin.css' );\n\t\twp_enqueue_script( 'fusion_builder_admin_faq_js', FUSION_BUILDER_PLUGIN_URL . 'js/admin/fusion-builder-admin.js' );\n\t}", "title": "" }, { "docid": "6ac0b1909a3d969da405856a96bf9dfe", "score": "0.6452108", "text": "function add_scripts()\n\t\t{\t\n\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\twp_enqueue_script( 'media-upload' );\n\t\t\twp_enqueue_script( 'jquery-ui-sortable');\n\t\t\n\t\t\t$files = ace_backend_load_scripts_by_folder( ACE_JS );\n\t\t\tforeach ( $files as $index => $file ) \n\t\t\t{ \n\t\t\t\t$file_info = pathinfo($file);\n\t\t\t\t\n\t\t\t\tif(isset($file_info['extension']) && $file_info['extension'] == \"js\")\n\t\t\t\t{\n\t\t\t\t\t$filename = basename($file_info['basename'], \".\".$file_info['extension']) ;\n\t\t\t\t\twp_enqueue_script( $filename, ACE_JS_URL . $file ); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "500e12fa4d7ea4afb2686ef726812efa", "score": "0.6449193", "text": "public function assets() {\n\n\t\twp_register_script(\n\t\t\t'jquery.cookie',\n\t\t\t$this->plugin_url( 'js/jquery.cookie.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.3'\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'cftpeuc',\n\t\t\t$this->plugin_url( 'js/script.js' ),\n\t\t\tarray( 'jquery', 'jquery.cookie' ),\n\t\t\t$this->plugin_ver( 'js/script.js' ),\n\t\t\ttrue\n\t\t);\n\t\twp_localize_script(\n\t\t\t'cftpeuc',\n\t\t\t'cftpeuc',\n\t\t\tarray(\n\t\t\t\t'path' => COOKIEPATH\n\t\t\t)\n\t\t);\n\t\twp_enqueue_style(\n\t\t\t'cftpeuc',\n\t\t\t$this->plugin_url( 'css/style.css' ),\n\t\t\tnull,\n\t\t\t$this->plugin_ver('css/style.css' )\n\t\t);\n\n\t}", "title": "" }, { "docid": "632d72aef0aa526f95ada05a88c2bfbe", "score": "0.6445965", "text": "function swi_add_scripts()\n{\n wp_enqueue_style(\n 'swi-main-style',\n plugins_url() . '/star-wars-info/css/style.css'\n );\n wp_enqueue_script(\n 'swi-main-js',\n plugins_url() . '/star-wars-info/js/main.js'\n );\n}", "title": "" }, { "docid": "add0aedbc188888bc02fdca9c87ed84a", "score": "0.64430165", "text": "private function _assets(){\n\t\t//Footable\n\t\tAsset::container('footer')->add('footable','js/footable-0.1.js');\n\t\tAsset::container('head')->add('footable','css/footable-0.1.css');\n\t\t//Tabs\n\t\tAsset::container('footer')->add('tabs','js/tabs.js');\n\t}", "title": "" } ]
66b33bcec19c3d37f4a0aeb77d862a1c
Returns Authenticated User Details
[ { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.71532255", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" } ]
[ { "docid": "37f5d8c3fb8cffbeea23662d714f4a12", "score": "0.76468927", "text": "public function detailsTheLoggedUser()\n {\n $user = auth()->user ();\n return response()->json($user, 200);\n }", "title": "" }, { "docid": "731f35b069b7e9576f2d4e640868f213", "score": "0.75692236", "text": "public function userDetails()\r\n\t{\r\n\t\t$graphModule = new Graph();\r\n $api = $graphModule->matchNode('User', 'sessionid', $_SESSION['sid']);\r\n\t\treturn $api['data'][0][0]['data'];\r\n\t}", "title": "" }, { "docid": "872bcf98e60c119490329790e4d4c12c", "score": "0.7390826", "text": "public function getAuthUser()\n {\n return response()->json($this->guard()->user());\n }", "title": "" }, { "docid": "61fd4e8341c207157b2df475ff49d32e", "score": "0.7388985", "text": "public function getUserInformation() ;", "title": "" }, { "docid": "e8a8f3a87d44512a003fe00e9cffa4a1", "score": "0.7344403", "text": "public function details() {\n return Auth::user();\n }", "title": "" }, { "docid": "bdc07feec61e42830d88ac388026e2ce", "score": "0.7342519", "text": "public function getUserDetails()\n {\n return new UserDetailsResource(Auth::user());\n }", "title": "" }, { "docid": "a99eeab82c9011a9135f6631e59a460c", "score": "0.7283104", "text": "function getUserInfo() {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n }\n else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "title": "" }, { "docid": "4454855c3fe63b3d5a64020604a3d94d", "score": "0.7269179", "text": "public function details()\n {\n $authUser = new UserResource(auth()->user());\n return response()->json($authUser, 200);\n }", "title": "" }, { "docid": "b1a09e5c69d51929b837831f10b5f50d", "score": "0.721672", "text": "function UserDetails()\n\t{\tob_start();\n\t\tprint_r($this->user->details);\n\t\techo \"<div id='db_details'>\\n<p><a href='editprofile.php'>edit your details</a></p>\\n</div>\\n\";\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "1436085e1ce82fc0524bdba2a2ad6ec7", "score": "0.7207695", "text": "public function details()\n {\n $user = Auth::user();\n\n if(!$user){\n return $this->sendError('', 'Not Found', 404);\n }\n\n return $this->sendResponse($user->toArray(), '');\n }", "title": "" }, { "docid": "9bee97de1656e5bb5fc74c82627cff90", "score": "0.72068745", "text": "public function userDetails()\n {\n // fetch the header data\n $decoded = $this->fetchHeaders();\n\n // set API response via helper\n $response = setAPIresponse(['Success'=>'User detail found'], 200, ['data' => $decoded]);\n\n return $this->respond($response);\n \n }", "title": "" }, { "docid": "b09ede812cc38bf25b9836c3b8316e57", "score": "0.7159356", "text": "public function getLoggedInUserInfo() {\n // Check login and id valid\n if (Auth::check() && Auth::id() > 0) {\n return response((new Message(true, json_encode(Auth::user())))->toJson(), 200);\n } else {\n return response((new Message(false, \"User not login or user id invalid\"))->toJson(), 200);\n }\n }", "title": "" }, { "docid": "4f712192b3f878942b0d82f62a639854", "score": "0.7120144", "text": "public function getAuthenticatedUser()\n {\n return $this->success($this->user);\n }", "title": "" }, { "docid": "0b990d66e8e9edb5eb03cac72fba0b73", "score": "0.71168494", "text": "public function details()\n {\n return response()->json(['user' => auth()->User()], 200);\n }", "title": "" }, { "docid": "967029b203e9dd682bbdcb88974d2043", "score": "0.7111702", "text": "public function get()\n {\n return $this->authUser->load('image', 'address', 'role', 'city');\n }", "title": "" }, { "docid": "4359dcf54b4356a7cd37d9845afc5c8c", "score": "0.7111153", "text": "public function getLoggedUser(){\n\n $userId = System::userLoginId();\n $role = System::defaultRole($userId);\n $username = System::userUsername();\n $getStatus = SystemTransaction::getStatusAbsen($userId);\n $profilePicture = ApiAuthTransaction::getProfilePicture($username);\n $personProfile = EditProfileTransaction::getPersonProfile($userId);\n\n $user = Auth::user();\n $data['username'] = $user->username;\n $data['full_name'] = $user->full_name;\n $data['email'] = $user->email;\n $data['role'] = $role;\n $data['profile_picture'] = $profilePicture==null?'':$profilePicture;\n $data[\"phone_number\"] = $personProfile->mobile_no;\n $data[\"checkStatus\"] = $getStatus;\n\n \treturn response()->json([\n \t\t'status' => 'OK',\n \t\t'data' => $data\n \t]);\n }", "title": "" }, { "docid": "073b10063d6d63efa997738fb271da3a", "score": "0.70998144", "text": "private function _get_user_info() {\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $password = md5($password);\n\n $where = array('email' => $email, 'password' => $password);\n $user = $this->user_model->get_info_rule($where);\n return $user;\n }", "title": "" }, { "docid": "ed0ad0a6222a1e07bff75ce5a9e36072", "score": "0.70979655", "text": "public function getUserInfo()\n {\n return $this->user_info;\n }", "title": "" }, { "docid": "ed0ad0a6222a1e07bff75ce5a9e36072", "score": "0.70979655", "text": "public function getUserInfo()\n {\n return $this->user_info;\n }", "title": "" }, { "docid": "72d702dbfc5f45fb22eecc39e74d7030", "score": "0.7094516", "text": "public function getUserDetails()\n {\n $authUser = Auth::user();\n // get the user details\n $userData = Profile::where('id', $authUser->user_id)->first();\n\n return $userData;\n }", "title": "" }, { "docid": "8ee108fdcd23d0f52196472a99d66cfa", "score": "0.7057764", "text": "public function getUserInfo(){\n\t\t$authUser = $this->Auth->user();\n\t\t$this->find('first',array('conditions'=>array('email'=>$authUser['User']['email'])));\n\t}", "title": "" }, { "docid": "3c67433d8a49d58f1dac05b7deac0e05", "score": "0.70527077", "text": "public function getUserDetails(){\n try {\n if (!$user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n } catch (TokenExpiredException $e) {\n return response()->json(['token_expired'], $e->getStatusCode());\n } catch (TokenInvalidException $e) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n } catch (JWTException $e) {\n return response()->json(['token_absent'], $e->getStatusCode());\n } catch (\\Exception $e) {\n return response()->json(['error' => 'could_not_create_token'], 500);\n }\n\n $user['role'] = Role::find($user['id_role'])->role;\n unset($user['id_role']);\n $user['branch_name'] = Branch::find($user['id_branch'])->branch_name;\n unset($user['id_branch']);\n\n return response()->json(compact('user'));\n }", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.70497364", "text": "public function getUser();", "title": "" }, { "docid": "34e0892c6d25309edafb279cbff122ea", "score": "0.7046671", "text": "public function actionGetDetailsOfLoggedInUser(){\n $userdetails = Yii::$app->user;\n echo Json::encode($username);\n }", "title": "" }, { "docid": "35596b68c70ff9e2b8d41898ec55a0ec", "score": "0.70249104", "text": "function getAuthInfo();", "title": "" }, { "docid": "0049c297179b2700b4dc3be7725f7a20", "score": "0.70157546", "text": "public function getAuthenticationDetails() {\n\t\t$details = $this->_getAuthenticationDetails();\n\t\treturn $details;\n\t}", "title": "" }, { "docid": "974aba97062c73c3ed607e4638381d40", "score": "0.69926876", "text": "public function getUserDetails()\n {\n $this->setOptions(array('action' => 'api/v1/user_details'));\n $this->setUserDetails();\n return $this->user_configuration;\n }", "title": "" }, { "docid": "a3a2e23260fd7e6e7f940d86a2e3f212", "score": "0.69711256", "text": "final public function getUserInfo()\n {\n // ensure access_token parameter\n $this->getAccessToken();\n\n $userinfo_url = $this->generateUrl('user_info');\n \n return $this->oauth_client->fetch($userinfo_url);\n }", "title": "" }, { "docid": "fea846502de153ad736f795cc8ffce3f", "score": "0.6928118", "text": "public function getUserViewDataOfLoggedIn()\n {\n return $this->user;\n }", "title": "" }, { "docid": "645ddb57de608f1837074a310413c809", "score": "0.69220144", "text": "public function getUserInfo()\n {\n return $this->userinfo;\n }", "title": "" }, { "docid": "fab4fa124a1c8ca9551375a3b4880418", "score": "0.69211274", "text": "public function profile()\n {\n return auth('api')->user();\n }", "title": "" }, { "docid": "177eba0f978476e9fbc2a7a5472ea287", "score": "0.6919635", "text": "public function getAuthUser()\n {\n $user = JWTAuth::authenticate(JWTAuth::getToken());\n return response()->json(['user' => $user]);\n }", "title": "" }, { "docid": "ef63041a86ff518f05ce06656d65cb46", "score": "0.69125384", "text": "public function getUserInfo() {\n //kita ambil dulu session login nya\n $sessionToken = $this->getSessionToken();\n //kita dapatkan id user berdasarkan token yang di simpan di cookie atau session\n $uid = $this->getUserIdByToken($sessionToken);\n //ambil data berdasarkan user_is\n $uinfo = $this->db->query(\"SELECT * FROM tbl_users WHERE user_id='$uid'\");\n if ($uinfo->num_rows > 0) {\n return $uinfo->fetch_assoc();\n } else {\n $this->logout();\n header(\"location:\".base_url('login'));\n }\n }", "title": "" }, { "docid": "ea71e9806ba6cff90378a8bf0fb2608e", "score": "0.6891207", "text": "public function getUser() {\n\t\treturn $this->session->read('Auth');\n\t}", "title": "" }, { "docid": "d64e71c965971b2e8f155401b37dbcc1", "score": "0.68748015", "text": "private function _get_user_info(){\n\t\t$id = $this->input->post('id');\n\t\t$password = $this->input->post('password');\n\n\t\t$this->load->model('user_model');\n\t\t$where = array('id' => $id, 'password' => $password);\n\t\t$user = $this->user_model->get_info_rule($where);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "c7d4af3acf1abe62b83a65e9f9561a78", "score": "0.68710554", "text": "public function auth () {\n\t\t\n\t\t# query db for user \n\t\t\n\t\t# if user doesnt exist save to db and send back details\n\t\t\n\t\t# else update ts and user details such as profile image and name \n\t}", "title": "" }, { "docid": "4dad99726764fc58e6a1e9af2ee5802f", "score": "0.6859122", "text": "public function getAuthenticatedUser()\n {\n //return response(Auth::user(), 200);\n return new UserResource(Auth::user());\n }", "title": "" }, { "docid": "a4c65896d8f223907459018d7312f97b", "score": "0.6852618", "text": "public function basicInfo()\n {\n return $this->get(\"user/basic_info\");\n }", "title": "" }, { "docid": "7634271854a9817d2b9f711b8dba1119", "score": "0.6840196", "text": "public function getUser()\n\t{\n\t\treturn UserFactory::auth()->user();\n\t}", "title": "" }, { "docid": "43ad6e9b7513f4d33f7dce4d5199244f", "score": "0.68228424", "text": "public function getUserInfo()\n {\n $rawResponse = $this->httpClient->get($this->getUrl('users/_current'));\n return $this->buildResponse($rawResponse);\n }", "title": "" }, { "docid": "4dfc37acf577bc7cf1aa8ceab3ae5aac", "score": "0.6809897", "text": "private function _get_user_info()\n \t{\n \t\t$email=$this->input->post('email');\n \t\t$password=$this->input->post('password');\n \t\t$password=md5($password);\n\n \t\t\n \t\t$where = array('email' =>$email,'password'=>$password);\n \t\t$user=$this->user_model->get_info_rule($where);\n \t\treturn $user;\n \t}", "title": "" }, { "docid": "481ae688b96ced025f374781a469fdc8", "score": "0.680758", "text": "public function authUser()\n {\n return request()->user();\n }", "title": "" }, { "docid": "db7080c329da82b453bc916dd6f1c1b7", "score": "0.67962444", "text": "public function getUserInfo()\n {\n return $this->userInfo;\n }", "title": "" }, { "docid": "f9ea87797c24ef6afda01b888571da75", "score": "0.67860234", "text": "public function getUserDetails()\r\n\t{\r\n // Receiving user input data\r\n $inputUserData = \\Input::all();\r\n // Validating user input data\r\n $validation = $this->EnterpriseGateway->validateEnterpriseGetUserDetails($inputUserData); \r\n if($validation['status'] == 'success') {\r\n $returnResponse = \\Response::json($this->EnterpriseGateway->enterpriseGetUserDetails($inputUserData));\r\n } else {\r\n // returning validation failure\r\n $returnResponse = \\Response::json($validation);\r\n }\r\n \r\n return $returnResponse;\r\n\t}", "title": "" }, { "docid": "031e54d1b9cc19fff64117090dce7384", "score": "0.6778296", "text": "public function show()\n {\n return request()->user();\n }", "title": "" }, { "docid": "2a47e7799065022e386501e6eba877ed", "score": "0.67600137", "text": "public function userProfile() {\n return response()->json(auth()->user());\n }", "title": "" }, { "docid": "2a47e7799065022e386501e6eba877ed", "score": "0.67600137", "text": "public function userProfile() {\n return response()->json(auth()->user());\n }", "title": "" }, { "docid": "d4ba0a0e2b2fa21c30b23855115c6f81", "score": "0.67537796", "text": "public function profile()\n {\n return response()->json(auth()->user());\n }", "title": "" }, { "docid": "d4ba0a0e2b2fa21c30b23855115c6f81", "score": "0.67537796", "text": "public function profile()\n {\n return response()->json(auth()->user());\n }", "title": "" }, { "docid": "218e2c7fd1711f27275054bdb027c8a9", "score": "0.6744162", "text": "public function getUser()\n {\n return $this->auth->getUser();\n }", "title": "" }, { "docid": "c0751cdc0e32a0e5603f5f7a127578e3", "score": "0.67311823", "text": "public function user_get() {\n $is_valid_token = $this->authorization_token->validateToken();\n if (!empty($is_valid_token) AND $is_valid_token['status'] === TRUE) {\n $user = $this->authorization_token->userData();\n $this->response($user, REST_Controller::HTTP_OK);\n } else {\n $this->response(['status' => FALSE, 'message' => $is_valid_token['message']], REST_Controller::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "b31685c482bce24edda40f067c26ca62", "score": "0.6719594", "text": "public function getUserInfo()\n {\n $userInfo = $this->username;\n\n if (!empty($this->password)) {\n $userInfo .= ':' . $this->password;\n }\n\n return $userInfo;\n }", "title": "" }, { "docid": "8215ae1574d56e9dfa05f1748c462d36", "score": "0.6715959", "text": "public function userProfile() {\n return response()->json(JWTAuth::user());\n }", "title": "" }, { "docid": "132dc966e40ba2400369e70d4554230d", "score": "0.67088413", "text": "public function details()\n {\n return response()->json(['success' => true, 'user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "d9da9b0f792cc3a58e64f6be61d80c6e", "score": "0.66913724", "text": "public function getUser()\r\n {\r\n return session()->get(\"FRONTEND_USER\");\r\n }", "title": "" }, { "docid": "df8a1706b99b14076a648012651ab06d", "score": "0.6690023", "text": "public function getUser() {\n\n\t\treturn response()->json($this->auth->user());\n\t}", "title": "" }, { "docid": "688ab4cd4e4fec00cde9caa46329518f", "score": "0.6680391", "text": "public function getUserInfo( ){\n $controller = new UserGetUserInfo( $this->debugger );\n // done \n return $controller->getUserInfo( $this );\n }", "title": "" }, { "docid": "79192ffa8bec3dc37f96651374937fa5", "score": "0.66794896", "text": "public function getLoggedUser();", "title": "" }, { "docid": "9729213e5fab641fb2f9f7b1a1f42489", "score": "0.6678915", "text": "public function getUserIdentity();", "title": "" }, { "docid": "9729213e5fab641fb2f9f7b1a1f42489", "score": "0.6678915", "text": "public function getUserIdentity();", "title": "" }, { "docid": "947ece50b663e8fad0e386d56fdd4212", "score": "0.66774297", "text": "abstract protected function getUser();", "title": "" }, { "docid": "49fb25dce297f311a4c88d9b25e301aa", "score": "0.6671581", "text": "public function user()\n {\n return response()->json(auth()->user());\n }", "title": "" }, { "docid": "96f441f4de4a13df3b18a4cf721efc73", "score": "0.6665394", "text": "private function getCurrentUserData()\n {\n //Sending GET request to obtain current authorized user data\n $serviceUrl = REST . '/user/';\n $curl = curl_init($serviceUrl);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPHEADER, [\n 'Authorization: Bearer ' . $_COOKIE[\"API-token\"]\n ]);\n $response = curl_exec($curl);\n return json_decode($response, true);\n }", "title": "" }, { "docid": "dcaa77f372fbe683d43c0cfa4b9c489a", "score": "0.6663916", "text": "protected function getUserDetail($params) { //Non-logged user\n if ($params['userInfo']) {\n $user = $params['userInfo'];\n $url = self::BASE_URL . \"users/\" . $user->username;\n $ch = $this->getConfiguredCURL($url, $user);\n $response = $this->performCURL($ch);\n return $response;\n }\n }", "title": "" }, { "docid": "196f9597f39f9e1c331bd00701f2b0c7", "score": "0.66633916", "text": "public function userFullDetails($userToken)\n {\n return $this->requester->runGet('/v1.1/user', array(\n 'user_token' => $userToken\n ));\n }", "title": "" }, { "docid": "63fc6af7e95fa92e68cab893ffd2fa2e", "score": "0.66629297", "text": "public function getUser(){\n $auth = new Auth();\n try {\n $user = $auth->headerToken();\n } catch (Exception $e) {\n throw new RestException(\"Erreur d'authentication\",401);\n }\n\n $userInfos = $this->model->getDetails($user->id);\n\n if($userInfos){\n $this->sendResponse(200, $userInfos);\n } else {\n $this->sendResponse(404,[\n \"errorMessage\" => 'Aucun utilisateur trouvé.'\n ]);\n }\n }", "title": "" }, { "docid": "5177181b71cb2566bed39d1a5ca7004a", "score": "0.66580254", "text": "static function user()\n {\n return \\Sys::svc('Auth')->user();\n }", "title": "" }, { "docid": "bf26333f3101b85e25daaacacc217065", "score": "0.6647945", "text": "public function userLogged()\n {\n return response()->json(Auth::user());\n }", "title": "" }, { "docid": "fea4b019a239fb7f2ac0199aaf4fefb2", "score": "0.66437256", "text": "public function getUserInfo(): UserInfo\n {\n return $this->authority->getUserInfo();\n }", "title": "" }, { "docid": "4e5bea579adef428a0e7dca0473fb9bf", "score": "0.66369945", "text": "protected function getAuthenticatedUser()\n {\n return 1;\n }", "title": "" }, { "docid": "a6cc07a918f6080a5a0fcbc22c89522d", "score": "0.6625863", "text": "public function showDetails(){\n $userData = session('user_created');\n\n $user = $this->user->findOrFail($userData['id']);\n $user->password = $userData['password'];\n\n return view('admin.users.show_details', compact('user'));\n }", "title": "" }, { "docid": "ba53855f879811a26ee3ffa8b914aa16", "score": "0.6618651", "text": "public function getAuthUser()\n {\n return $this->getConfig()->getAuthUser();\n }", "title": "" }, { "docid": "197d9f5ea86f46537312b037237540a4", "score": "0.66160154", "text": "public function getUserInfo()\n {\n $user = $this->getUser();\n\n $password = $this->getPassword();\n $password = !is_null($password) ? ':' . $password : null;\n\n if (is_null($user)) {\n return null;\n }\n\n $userInfo = $user . $password;\n\n return '' !== trim($userInfo) ? $userInfo : null;\n }", "title": "" }, { "docid": "2490528b3a89ea0a8a38603be71a4a22", "score": "0.66147053", "text": "public function user()\n {\n return auth($this->guard)->user();\n }", "title": "" }, { "docid": "666e73f3f1bdaa94a71076c58f0c87b3", "score": "0.661066", "text": "public function get_user()\r\n\t{\r\n\t\treturn $this->logged_in();\r\n\t}", "title": "" }, { "docid": "eadfdbfb4cc0627a8cd167ec4a7dd32b", "score": "0.66048074", "text": "public function auth()\n {\n $user = User::where('id', Config::get('apiuser'))->with('levels')->with('locations')->with('wards')->get();\n return response()->json($user);\n }", "title": "" }, { "docid": "e44a90d9421af609c01e4cdcb6c7d041", "score": "0.65983474", "text": "public function getUserInfo(){\n\n return $this->userData;\n }", "title": "" }, { "docid": "fcaed5ff937d106fbcc08937b251f6b8", "score": "0.6594429", "text": "function GetAuthenticated()\n{\n\tif(isset($_SESSION[\"user_id\"]))\n\t{\n return GetUserDataById($_SESSION[\"user_id\"]);\n\t}\n return NULL;\n}", "title": "" }, { "docid": "2ef51d44f190b685b2ccecc658d6c025", "score": "0.659091", "text": "public function profile(){\n\n return response()->json([\n 'status' => 1,\n 'message' => \"Get author details\",\n 'data' => auth()->user()\n ]);\n\n }", "title": "" }, { "docid": "abefff0abebd29334b0d2694b79319f3", "score": "0.6586327", "text": "public function getUser()\n {\n return $_SESSION['user'];\n }", "title": "" }, { "docid": "4e0f000a0de53922149b4b94f733d067", "score": "0.6585009", "text": "public function get_user() \n {\n return $this->user;\n }", "title": "" }, { "docid": "7b10d5677bead00318845772e992a081", "score": "0.6578422", "text": "public static function getUser()\n {\n if (self::checkAuth()) {\n return phpCAS::getUser();\n }\n return '';\n }", "title": "" }, { "docid": "7524810c12cd2f8b7c9c45ad58335380", "score": "0.65755045", "text": "public function getUser()\n {\n \treturn $this->user;\n }", "title": "" }, { "docid": "2f294eaeb868a0983a0cf2950d8d5db5", "score": "0.65702045", "text": "public function me()\n\t{\n\t\t$user = $this->guard()->user()->toArray();\t\t\n\t\treturn response()->json($user);\n\t}", "title": "" }, { "docid": "a35465bbff43b0a78debe1502b850f7e", "score": "0.65667504", "text": "public function userInfo()\n {\n try {\n $this->startBrokerSession();\n $username = $this->getSessionData('sso_user');\n if (!$username) {\n $this->fail('User not authenticated. Session ID: ' . $this->getSessionData('id'));\n }\n if (!$user = $this->getUserInfo($username)) {\n $this->fail('User not found.');\n }\n } catch (SSOServerException $e) {\n return $this->returnJson(['error' => $e->getMessage()]);\n }\n return $this->returnUserInfo($user);\n }", "title": "" }, { "docid": "1a7ac6a5194a5f67554bc9dfa800c9a2", "score": "0.656037", "text": "function user_data(){\n\t$user = \\Auth::user();\n\treturn $user;\n}", "title": "" }, { "docid": "69224e9ea07339596bb083e61f4ed858", "score": "0.6560292", "text": "function getUser() {\n\t\t\treturn $this->API->getUser($this->User->ID);\n\t\t}", "title": "" }, { "docid": "e77e0883d1944b1cbbcfb5452379ed43", "score": "0.6558882", "text": "function getUser() { return $this->_user; }", "title": "" }, { "docid": "d8c129a07bdf3c370058b830568a1f8a", "score": "0.6557118", "text": "public function getuser()\n {\n \n # logica para buscar cadastro aqui.\n \n }", "title": "" }, { "docid": "ec9d0e03eb2e1bf19c849f40a6118408", "score": "0.65545005", "text": "public function getUserInfo(){\n\t\t\t\treturn '';\n\t\t\t}", "title": "" }, { "docid": "8b9f6fbc9d84a5a0dcf1ef3cfb312106", "score": "0.6553656", "text": "function getUser() {\r\n\t\t$this->u = owa_coreAPI::entityFactory('base.user');\r\n\t\t$this->u->getByColumn('user_id', $this->credentials['user_id']);\r\n\t}", "title": "" } ]
b12a560c21c4609b2d52ff155031eeab
function to add admins to the library level
[ { "docid": "4a95b04a31ab3c86aa208c45852944f2", "score": "0.0", "text": "public function createAdmin($firstName, $lastName, $username, $password) {\n \t$admin = new Admin($firstName, $lastName, $username, $password);\n array_push($this->admins, $admin);\n \treturn $admin;\n }", "title": "" } ]
[ { "docid": "cd2de9802e16d0c65f6822fe216a4a1e", "score": "0.6716833", "text": "public function init_admin() {\n\n\t\t// Checking user rights\n\t\tif (!current_user_can('level_10')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Add the hooks to add your functions to the framework here!\n\n\t\t/*\n\t\t * Example - Hooking into a jquery tab\n\t\t * add_filter( 'tk_wp_jqueryui_tabs_after_content_YOUR_ELEMENT_ID', 'myfunctiontoaddcontenttotab' );\n\t\t *\n\t\t */\n\t\t$wml = TS_PLUGIN_ABSPATH . 'components/admin/backend.xml'; // Using the backend.xml in components dir as default\n\n\t\ttk_wml_parse_file($wml);\n\n\t\t// tk_register_wp_option_group( 'sp_post_metabox' );\n\t}", "title": "" }, { "docid": "dc913e737cb373ea7efa87e26fc8018a", "score": "0.660909", "text": "function el_admin() {\n\t\tel_register_admin_sidemenu('admin:components', 'admin:components', el_site_url('administrator/components'), el_print('admin:sidemenu:components'));\n\t\tel_register_admin_sidemenu('admin:install', 'admin:install', el_site_url('administrator/com_installer'), el_print('admin:sidemenu:components'));\n\t\t\n\t\tel_register_admin_sidemenu('admin:themes', 'admin:themes', el_site_url('administrator/themes'), el_print('admin:sidemenu:themes'));\n\t\tel_register_admin_sidemenu('admin:install', 'admin:install', el_site_url('administrator/theme_installer'), el_print('admin:sidemenu:themes'));\n\t\t\n\t\tel_register_admin_sidemenu( 'admin:basic', 'admin:basic', el_site_url('administrator/settings/basic'), el_print('admin:sidemenu:settings'));\n\t\tel_register_admin_sidemenu('admin:cache', 'admin:cache', el_site_url('administrator/cache'), el_print('admin:sidemenu:settings'));\n\t\t//el_register_admin_sidemenu('admin/sidemenu', 'admin:mode', el_site_url('administrator/theme_installer'), el_print('admin:sidemenu:settings'));\n\t\t\n\t\tel_register_admin_sidemenu('admin:users', 'admin:users', el_site_url('administrator/users'), el_print('admin:sidemenu:usermanager'));\n\t\tel_register_admin_sidemenu('admin:add:user', 'admin:add:user', el_site_url('administrator/adduser'), el_print('admin:sidemenu:usermanager'));\n\t\tel_register_admin_sidemenu('admin:users:unvalidated', 'admin:users:unvalidated', el_site_url('administrator/unvalidated_users'), el_print('admin:sidemenu:usermanager'));\n\t\t\n\t\t\n\t\tel_register_menu_link('home', 'admin:dashboard', el_site_url('administrator'), 'topbar_admin');\n\t\t\n\t\tel_register_menu_link('help', 'admin:help', 'https://www.opensource-socialnetwork.org/', 'topbar_admin');\n\t\tel_register_menu_item('topbar_admin', array(\n\t\t\t\t'name' => 'support',\n\t\t\t\t'text' => 'el:premium',\n\t\t\t\t'href' => 'https://www.softlab24.com/',\n\t\t\t\t'target' => '_blank',\n\t\t));\t\n\t\t\n\t\tel_register_menu_link('viewsite', 'admin:view:site', el_site_url(), 'topbar_admin');\n\t\t\n\t\tel_register_action('admin/login', el_route()->actions . 'administrator/login.php');\n\t\tel_register_action('admin/logout', el_route()->actions . 'administrator/logout.php');\n\t\t\n\t\tif(el_isAdminLoggedin()) {\n\t\t\t\tel_register_site_settings_page('account', 'pages/account');\n\t\t\t\t\n\t\t\t\tel_register_action('component/enable', el_route()->actions . 'administrator/component/enable.php');\n\t\t\t\tel_register_action('component/disable', el_route()->actions . 'administrator/component/disable.php');\n\t\t\t\tel_register_action('component/delete', el_route()->actions . 'administrator/component/delete.php');\n\t\t\t\t\n\t\t\t\tel_register_action('theme/enable', el_route()->actions . 'administrator/theme/enable.php');\n\t\t\t\tel_register_action('theme/delete', el_route()->actions . 'administrator/theme/delete.php');\n\t\t\t\t\n\t\t\t\tel_register_action('admin/add/user', el_route()->actions . 'administrator/user/add.php');\n\t\t\t\tel_register_action('admin/edit/user', el_route()->actions . 'administrator/user/edit.php');\n\t\t\t\tel_register_action('admin/delete/user', el_route()->actions . 'administrator/user/delete.php');\n\t\t\t\tel_register_action('admin/validate/user', el_route()->actions . 'administrator/user/validate.php');\n\t\t\t\t\n\t\t\t\tel_register_action('admin/com_install', el_route()->actions . 'administrator/component/com_install.php');\n\t\t\t\tel_register_action('admin/theme_install', el_route()->actions . 'administrator/theme/theme_install.php');\n\t\t\t\t\n\t\t\t\tel_register_action('admin/settings/save/basic', el_route()->actions . 'administrator/settings/save/basic.php');\n\t\t\t\tel_register_action('admin/cache/create', el_route()->actions . 'administrator/cache/create.php');\n\t\t\t\tel_register_action('admin/cache/flush', el_route()->actions . 'administrator/cache/flush.php');\n\t\t\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Register login and backend pages\n\t\t */\n\t\tif(el_isAdminLoggedin()) {\n\t\t\t\tel_register_page('administrator', 'el_administrator_pagehandler');\n\t\t\t\tel_register_site_settings_page('basic', 'settings/admin/basic_settings');\n\t\t\t\t\n\t\t\t\tel_register_menu_item('topbar_dropdown', array(\n\t\t\t\t\t\t'name' => 'administration',\n\t\t\t\t\t\t'text' => el_print('admin'),\n\t\t\t\t\t\t'href' => el_site_url('administrator')\n\t\t\t\t));\n\t\t} else {\n\t\t\t\tel_register_page('administrator', 'el_administrator_login_pagehandler');\n\t\t}\n}", "title": "" }, { "docid": "b0a33de6c3f9ffd22d9d791a42f8b3b7", "score": "0.6560976", "text": "public function setup(){\n \t$this->sp->ref('Rights')->addRight('Settings', 'administer_settings');\n\t\t\t$this->sp->ref('Rights')->authorizeGroup('Settings', 'administer_settings', User::getUserGroup('root'));\n\t\t\t$this->sp->ref('Rights')->authorizeGroup('Settings', 'administer_settings', User::getUserGroup('admin'));\n\t\t\t\n\t\t\t$this->sp->ref('Rights')->addRight('Settings', 'administer_hidden_settings');\n\t\t\t$this->sp->ref('Rights')->authorizeGroup('Settings', 'administer_hidden_settings', User::getUserGroup('root'));\n }", "title": "" }, { "docid": "83ebec8adcaf7ddd924ea746684ed0a3", "score": "0.6557943", "text": "public function addAdminRights()\n {\n $this->roles()->save(Role::adminRole());\n }", "title": "" }, { "docid": "88b64c9813567114d5dee34db2747d56", "score": "0.6495265", "text": "function add_admin_menu(){\r\n\t\t// JLL_MOD - fixed\r\n\t\t$hook = add_submenu_page( 'bp-general-settings',\r\n\t\t\t__( 'CommunityPress Moderation', 'bp-moderation' ),\r\n\t\t\t__( 'Moderation', 'bp-moderation' ), 'manage_options',\r\n\t\t\t'bp-moderation', array(&$this, 'admin_page' ) );\r\n\r\n\t\tadd_action( \"admin_print_styles-$hook\", array(&$this, 'admin_css') );\r\n\t\tadd_action( \"admin_print_scripts-$hook\", array(&$this, 'admin_js') );\r\n\t}", "title": "" }, { "docid": "7b9afaf51994b84da89aad5e06c45b41", "score": "0.6367006", "text": "public static function addAdminMenu()\n {\n add_menu_page('Overlay Options',\n 'Overlay',\n 'administrator', \n 'sw_overlay_settings',\n array('SW_Overlay', 'admin_settings'));\n\n }", "title": "" }, { "docid": "28bf44e2c523dbc83b6b42d2c6b64700", "score": "0.63260263", "text": "function add_ol_system_caps() {\r\n // gets the roles\r\n $role_sys_1 = get_role( 'ol_admin' );\r\n\t\r\n // would allow the above roles to access the following capabilities\r\n\t$tr_sys_caps = array(\r\n\t\t'create_posts',\r\n\t\t'delete_others_posts',\r\n\t\t'delete_posts',\r\n\t\t'delete_private_posts',\r\n\t\t'delete_published_posts',\r\n\t\t'edit_others_posts',\r\n\t\t'edit_posts',\r\n\t\t'edit_private_posts',\r\n\t\t'edit_published_posts',\r\n\t\t'manage_categories',\r\n\t\t'moderate_comments',\r\n\t\t'publish_posts',\r\n\t\t'read_private_posts',\r\n\t\t'upload_files'\r\n\t);\r\n\t\r\n\tforeach($tr_sys_caps as $tr_sys_cap) {\r\n\t\t$role_sys_1->add_cap( $tr_sys_cap );\r\n\t}\r\n}", "title": "" }, { "docid": "16e6cce86272f96aa28f57d2d92dfd2a", "score": "0.6312917", "text": "function registerAdminPanels() {\n\t\t\n\t\t$this->addAdminPanel(array( 'do' \t\t\t=> 'hello.exampleSettings', \n\t\t\t\t\t\t\t\t\t'priviledge' \t=> 'admin', \n\t\t\t\t\t\t\t\t\t'anchortext' \t=> 'Hello World!',\n\t\t\t\t\t\t\t\t\t'group'\t\t\t=> 'Test',\n\t\t\t\t\t\t\t\t\t'order'\t\t\t=> 1));\n\t\t\n\t\t\t\t\t\t\t\t\t\n\t\treturn;\n\t\t\n\t}", "title": "" }, { "docid": "66be0f1209e1ef65cf58e4b294a94b03", "score": "0.63066065", "text": "function add_new_admin_menu() {\n $users_roles = array(\n get_bk_option( 'booking_user_role_booking' ),\n get_bk_option( 'booking_user_role_addbooking' ),\n get_bk_option( 'booking_user_role_settings' ) ,\n get_bk_option( 'booking_user_role_resources' )\n );\n\n for ($i = 0 ; $i < count($users_roles) ; $i++) {\n \n if ( empty($users_roles[$i]) ) $users_roles[$i] = 'editor'; //Fix: 2015-03-02 Need to have this fix for WordPress MU installations. \n \n if ( $users_roles[$i] == 'administrator' ) $users_roles[$i] = 'manage_options'; //Fix: 2015-03-02 Need to have this fix for WordPress MU installations. \n if ( $users_roles[$i] == 'editor' ) $users_roles[$i] = 'publish_pages';\n if ( $users_roles[$i] == 'author' ) $users_roles[$i] = 'publish_posts';\n if ( $users_roles[$i] == 'contributor' ) $users_roles[$i] = 'edit_posts';\n if ( $users_roles[$i] == 'subscriber') $users_roles[$i] = 'read';\n }\n \n\n if (wpbc_is_field_in_table_exists('booking','is_new') == 0) $update_count = 0; // do not created this field, so do not use this method\n else $update_count = getNumOfNewBookings();\n\n $title = __('Booking' ,'booking');\n $update_title = $title;\n $is_user_activated = apply_bk_filter('multiuser_is_current_user_active', true ); //FixIn: 6.0.1.17\n if ( ( $update_count > 0 ) && ( $is_user_activated ) ) {\n $update_count_title = \"<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count bk-update-count'>\" . number_format_i18n($update_count) . \"</span></span>\" ;\n $update_title .= $update_count_title;\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // M A I N B O O K I N G\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n $pagehook1 = add_menu_page( __('Booking calendar' ,'booking'), $update_title , $users_roles[0],\n WPDEV_BK_FILE . 'wpdev-booking', array(&$this, 'on_show_booking_page_main'), WPDEV_BK_PLUGIN_URL . '/img/bc-16x16.png' );\n add_action(\"admin_print_scripts-\" . $pagehook1 , array( &$this, 'load_admin_scripts_on_page')); \n add_action(\"admin_print_styles-\". $pagehook1 , array( &$this, 'load_css_skip_client_css') ); //Fix. 5.3 We need to load at client side and admin side styles for having correct calendar skins at datepick elemtns. This hook for loading the styles at the header of page \n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // A D D R E S E R V A T I O N\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n $pagehook2 = add_submenu_page(WPDEV_BK_FILE . 'wpdev-booking',__('Add booking' ,'booking'), __('Add booking' ,'booking'), $users_roles[1],\n WPDEV_BK_FILE .'wpdev-booking-reservation', array(&$this, 'on_show_booking_page_addbooking') );\n add_action(\"admin_print_scripts-\" . $pagehook2 , array( &$this, 'load_admin_client_scripts_on_page'));\n add_action(\"admin_print_styles-\". $pagehook2 , array( &$this, 'load_admin_client_styles_on_page') ); // This hook for loading the styles at the header of page \n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // A D D R E S O U R C E S Management\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n $version = get_bk_version();\n //$is_can = apply_bk_filter('multiuser_is_user_can_be_here', true, 'not_low_level_user'); //Anxo customizarion\n if ($version != 'free') { //Anxo customizarion\n\n $pagehook4 = add_submenu_page(WPDEV_BK_FILE . 'wpdev-booking',__('Resources' ,'booking'), __('Resources' ,'booking'), $users_roles[3],\n WPDEV_BK_FILE .'wpdev-booking-resources', array(&$this, 'on_show_booking_page_resources') );\n add_action(\"admin_print_scripts-\" . $pagehook4 , array( &$this, 'load_admin_scripts_on_page'));\n add_action(\"admin_print_styles-\". $pagehook4 , array( &$this, 'load_admin_styles_on_page') ); // This hook for loading the styles at the header of page \n }\n\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // S E T T I N G S\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n $pagehook3 = add_submenu_page(WPDEV_BK_FILE . 'wpdev-booking',__('Booking Calendar Settings' ,'booking'), __('Settings' ,'booking'), $users_roles[2],\n WPDEV_BK_FILE .'wpdev-booking-option', array(&$this, 'on_show_booking_page_settings') );\n add_action(\"admin_print_scripts-\" . $pagehook3 , array( &$this, 'load_admin_scripts_on_page'));\n add_action(\"admin_print_styles-\". $pagehook3 , array( &$this, 'load_admin_styles_on_page') ); // This hook for loading the styles at the header of page \n \n \n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n global $submenu, $menu; // Change Title of the Main menu inside of submenu\n if (isset($submenu[plugin_basename( WPDEV_BK_FILE ) . 'wpdev-booking']))\n $submenu[plugin_basename( WPDEV_BK_FILE ) . 'wpdev-booking'][0][0] = __('Bookings' ,'booking');\n }", "title": "" }, { "docid": "281cfe53b9b0962c3f610d398e5139bc", "score": "0.6285703", "text": "function add_admin($username, $password,$privilages)\n\t{\n\t\t$this->db=Connect::connect();\n\t\t$query=\"insert into admin values(null,'\".$username.\"','\".$password.\"','\".$privilages.\"')\";\n\t\t$result=$this->db->query($query);\t\t\t\n\t}", "title": "" }, { "docid": "1582065ebd2a2e4f0250acd8f83af9a1", "score": "0.6277038", "text": "function admin_add() {\n\t\t//\n\t}", "title": "" }, { "docid": "1582065ebd2a2e4f0250acd8f83af9a1", "score": "0.6277038", "text": "function admin_add() {\n\t\t//\n\t}", "title": "" }, { "docid": "79a17ef69112604c2e50e5f0a5019ea4", "score": "0.6229561", "text": "private function define_admin_hooks() {\n \t$plugin_admin = new WPF_Admin( \n $this->get_plugin_name(), \n $this->get_version()\n );\n }", "title": "" }, { "docid": "94bc2a63c8501915574c0b53a6002570", "score": "0.6226691", "text": "function admin_init()\n\t{\n\t\t// Add plugin main menu option (last)\n\t\textend_elgg_admin_page('admin/main_opt/statistics', 'admin/main');\n\t\textend_elgg_admin_page('admin/main_opt/site', 'admin/main'); \n\t\textend_elgg_admin_page('admin/main_opt/user', 'admin/main'); \n\t\textend_elgg_admin_page('admin/main_opt/plugins', 'admin/main', 999); // Always last\n\n\t\tregister_action('admin/user/ban', false, \"\", true);\n\t\tregister_action('admin/user/unban', false, \"\", true);\n\t\tregister_action('admin/user/delete', false, \"\", true);\n\t\tregister_action('admin/user/resetpassword', false, \"\", true);\n\t\tregister_action('admin/user/makeadmin', false, \"\", true);\n\t\tregister_action('admin/user/removeadmin', false, \"\", true);\n\t\t\n\t\t// Register some actions\n\t\tregister_action('admin/site/update_basic', false, \"\", true); // Register basic site admin action\n\t\t\n\t\t// Page handler\n\t\tregister_page_handler('admin','admin_settings_page_handler');\n\t\t\n\t\tif (isadminloggedin()) {\n\t\t\tglobal $is_admin;\n\t\t\t$is_admin = true;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "78bc600e744afe3f56905a82262c814c", "score": "0.62180316", "text": "private function define_admin_hooks(){\n $this->add_action('cssf_framework_load_config', $this, 'load_module_config');\n\n\n /**\n * Enqueue Scripts\n * \n * @since 2.0.0\n */\n $this->add_action( 'admin_enqueue_scripts', $this, 'enqueue_scripts' );\n\n\n /**\n\t\t * AJAX CALLS\n\t\t * \n\t\t * 1. Menu Save\n\t\t * 2. Menu Reset\n\t\t * 3. Menu User Role Change\n\t\t * \n\t\t * @since 2.0.0\n\t\t */\n\t\t$this->add_action('wp_ajax_ipido_menu_save', $this, 'menu_save_callback');\n $this->add_action('wp_ajax_ipido_menu_reset', $this, 'menu_reset_callback');\n $this->add_action('wp_ajax_ipido_menu_change', $this, 'menu_change_callback');\n\n\n /**\n\t\t * Custom Admin Menu Manager\n\t\t * \n\t\t * @since 1.2.0\n\t\t */\n\n\t\tif ($this->gs('sidebar_status')){\n $this->add_filter( 'custom_menu_order', $this, 'maybe_custom_adminmenu', 100, 1 );\n\t\t\t$this->add_filter( 'menu_order', $this, 'custom_admin_menu_manager', 100, 1 );\n\t\t}\n }", "title": "" }, { "docid": "0ef4a18074f0934962df9aff017e6b1b", "score": "0.62143314", "text": "function ox_add_menu() {\n\n\tglobal $rt_admin_menu;\n\techo $rt_admin_menu->run();\n}", "title": "" }, { "docid": "603c209bc366bf7b6fd16a5bd9d63f9f", "score": "0.6207133", "text": "public static function set_hooks_admin() {\n\t}", "title": "" }, { "docid": "5a5c05b50685bb1d94560570504a03a2", "score": "0.6193222", "text": "function add_ol_custom_caps() {\r\n // gets the roles\r\n $role_1 = get_role( 'administrator' );\r\n\t$role_2 = get_role( 'ol_admin' );\r\n\t\r\n // would allow the above roles to access the following capabilities\r\n\t$tr_caps = array( 'ol_options', 'ol_settings', 'ol_country_data', 'ol_acp_access' );\r\n\tforeach($tr_caps as $tr_cap) {\r\n\t\t$role_1->add_cap( $tr_cap );\r\n\t\t$role_2->add_cap( $tr_cap );\r\n\t}\r\n}", "title": "" }, { "docid": "98bfe6740d360704b1081a624380d10c", "score": "0.61744297", "text": "function admin_menu() {\n\n\t\t// reg our section\n\t\tadd_settings_section( 'api', 'API Credentials', '__return_false', 'bitly-options' );\n\n\t\t// create an api login and key field\n\t\tadd_settings_field( 'bitly_api_login', 'API Login', array( $this, 'textfield' ), 'bitly-options', 'api', array(\n\t\t\t'name' => 'bitly_settings[api_login]',\n\t\t\t'value' => $this->options['api_login'],\n\t\t));\n\n\t\tadd_settings_field( 'show_lede_dates', 'API Key', array( $this, 'textfield' ), 'bitly-options', 'api', array(\n\t\t\t'name' => 'bitly_settings[api_key]',\n\t\t\t'value' => $this->options['api_key'],\n\t\t));\n\n\t\t// set our validation callback\n\t\tregister_setting( 'bitly_settings', 'bitly_settings', array( $this, 'validate_settings' ) );\n\n\t\t// create a sub menu page within settings menu page\n\t\tadd_submenu_page( 'options-general.php', 'Bit.ly Settings', 'Bit.ly', 'edit_theme_options', 'bitly-settings', array( $this, 'settings_page' ) );\n\t}", "title": "" }, { "docid": "094ecd6dfa8c4a9189c0ecedaee88354", "score": "0.61495686", "text": "public function add_admin_menus() {\n// // About Page\n// add_dashboard_page(\n// __( 'Welcome to MashShare', 'mashsb' ), __( 'Welcome to MashShare', 'mashsb' ), $this->minimum_capability, 'mashsb-about', array($this, 'about_screen')\n// );\n//\n// // Changelog Page\n// $mashsb_about = add_dashboard_page(\n// __( 'MashShare Changelog', 'mashsb' ), __( 'MashShare Changelog', 'mashsb' ), $this->minimum_capability, 'mashsb-changelog', array($this, 'changelog_screen')\n// );\n//\n// // Getting Started Page\n// $mashsb_quickstart = add_submenu_page(\n// 'mashsb-settings', __( 'Quickstart', 'mashsb' ), __( 'Quickstart', 'mashsb' ), $this->minimum_capability, 'mashsb-getting-started', array($this, 'getting_started_screen')\n// );\n//\n// // Credits Page\n// $mashsb_credits = add_dashboard_page(\n// __( 'The people that build MashShare', 'mashsb' ), __( 'The people that build MashShare', 'mashsb' ), $this->minimum_capability, 'mashsb-credits', array($this, 'credits_screen')\n// );\n// \n // Getting Started Page\n $mashsb_quickstart = add_submenu_page(\n 'mashsb-settings', __( 'Quickstart', 'mashsb' ), __( 'Quickstart', 'mashsb' ), $this->minimum_capability, 'mashsb-getting-started', array($this, 'getting_started_screen')\n );\n // About Page\n add_submenu_page(\n 'mashsb-settings', __( 'Welcome to MashShare', 'mashsb' ), __( 'Welcome to MashShare', 'mashsb' ), $this->minimum_capability, 'mashsb-about', array($this, 'about_screen')\n );\n\n // Changelog Page\n $mashsb_about = add_submenu_page(\n 'mashsb-settings',__( 'MashShare Changelog', 'mashsb' ), __( 'MashShare Changelog', 'mashsb' ), $this->minimum_capability, 'mashsb-changelog', array($this, 'changelog_screen')\n );\n\n\n // Credits Page\n $mashsb_credits = add_submenu_page(\n 'mashsb-settings',__( 'The people that build MashShare', 'mashsb' ), __( 'The people that build MashShare', 'mashsb' ), $this->minimum_capability, 'mashsb-credits', array($this, 'credits_screen')\n );\n }", "title": "" }, { "docid": "339d60211a878453975626912bd61cbb", "score": "0.61483264", "text": "public function addons() {\n\t\trequire_once( 'admin-screens/addons.php' );\n\t}", "title": "" }, { "docid": "88e53f746bf8c831511893cd00c8817c", "score": "0.6135352", "text": "function woo_ali_add_admin_menu() { \n\n\t// Setting the global variable\n\tglobal $woo_ali_settings_page;\n\n\t$woo_ali_settings_page = add_options_page( \n\t\t'Woo Advanced Login Item', // Page title\n\t \t'Woo Advanced Login Item', // Menu title\n\t \t'manage_options', // Capability\n\t \t'woo_ali_options', // Page slug\n\t \t'woo_ali_options_page' // Callback function\n\t);\n}", "title": "" }, { "docid": "e7ab7fd1687c627d1207a97c49922019", "score": "0.6133923", "text": "function ldap_admin_menu($menu){\n\t\tarray_push($menu,\n\t\tarray(\n\t\t'NAME' => 'Ldap Login',\n\t\t'URL' => get_admin_plugin_menu_link(LDAP_LOGIN_PATH.'/admin.php') )\n\t\t);\n\t\treturn $menu;\n\t}", "title": "" }, { "docid": "a8dac9d66b278eba40fc3df7dd7ac1b7", "score": "0.61319834", "text": "private function define_admin_hooks()\n {\n $plugin_admin = new WordPress_Security_Txt_Admin($this->get_plugin_name(), $this->get_version());\n\n if (isset($_GET['page']) && ($_GET['page'] == 'wordpress-security-txt' || $_GET['page'] == 'wordpress-security-txt-help')) {\n $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');\n $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');\n }\n\n $this->loader->add_action('admin_menu', $plugin_admin, 'add_options_page');\n $this->loader->add_action('admin_init', $plugin_admin, 'register_settings');\n $this->loader->add_action('admin_init', $plugin_admin, 'register_sections');\n $this->loader->add_action('admin_init', $plugin_admin, 'register_fields');\n $this->loader->add_filter('plugin_action_links_' . WORDPRESS_SECURITY_TXT_FILE, $plugin_admin,\n 'link_settings');\n $this->loader->add_action('plugin_row_meta', $plugin_admin, 'link_row', 10, 2);\n $this->loader->add_action('wp_before_admin_bar_render', $plugin_admin, 'admin_bar');\n }", "title": "" }, { "docid": "cfb1068307696c327d6378e94e72b09d", "score": "0.6120644", "text": "public static function set_admin_menu() {\n\t\t// plugins submenu item: add_plugins_page()\n\t\t// users submenu item: add_users_page()\n\t\t// theme submenu item: add_theme_page()\n\t\t// settings submenu item: add_options_page()\n\t\t\n\t\tadd_options_page(\n\t\t\t'Page Title',\n\t\t\t'Circle Tree Login',\n\t\t\t'manage_options',\n\t\t\t'options_page_slug',\n\t\t\tarray(\n\t\t\t\t'Mod_Options',\n\t\t\t\t'get_settings_page'\n\t\t\t)\n\t\t);\n\t\n\t}", "title": "" }, { "docid": "c2207f549cf7adcba46ac4cec365ea48", "score": "0.6120641", "text": "function ultimate_admin_menus() {\r\n\t\t// Add a new menu under Manage:\r\n\t\tadd_management_page('Tag Management', 'Tags', 8, basename(__FILE__), array('UltimateTagWarriorActions', 'ultimate_better_admin'));\r\n\r\n\t\t// And one under options\r\n\t\tadd_options_page('Tag Options', 'Tags', 8, basename(__FILE__), array('UltimateTagWarriorActions', 'utw_options'));\r\n\t}", "title": "" }, { "docid": "21183bfae0f30f2e5d866c7171f622cd", "score": "0.61092484", "text": "public function adminMenu() {\r\n add_settings_section('link_footnotes',\r\n 'Link Footnotes',\r\n array(\r\n $this,\r\n 'drawSection')\r\n , 'writing');\r\n add_settings_field('lf_default', \r\n 'Default On', \r\n array(\r\n $this, \r\n 'drawDefaultOn'\r\n ) , \r\n 'writing',\r\n 'link_footnotes'); \r\n \r\n add_settings_field('lf_header',\r\n 'Heading',\r\n array(\r\n $this,\r\n 'drawHeader'\r\n ), 'writing', 'link_footnotes'); \r\n add_settings_field('lf_target',\r\n 'Link Target',\r\n array(\r\n $this,\r\n 'drawTarget'\r\n ), 'writing', 'link_footnotes'\r\n );\r\n }", "title": "" }, { "docid": "276099d2d1dc1719b30a198d39e93894", "score": "0.60734963", "text": "public function adminPrivileges()\n {\n\n $app = $this->adminModel->displayAdmin();\n $this->render('view/admin/admin.php', $app);\n }", "title": "" }, { "docid": "78c44780ef19e0386d13eeb106f0ef91", "score": "0.6070537", "text": "function mixd_wp_demo_add_caps() {\n \n $role = get_role('administrator');\n $role->add_cap('mixd_wp_demo_config');\n \n $role = get_role('editor');\n $role->add_cap('mixd_wp_demo_config');\n}", "title": "" }, { "docid": "0d589a281d48afd717ba8b05901c6e2a", "score": "0.6061366", "text": "function admin_member() {\n\n\t\t}", "title": "" }, { "docid": "b10aaf6c9bc0d8d44dbc8fca21d834d8", "score": "0.6059517", "text": "public function adminGlobal();", "title": "" }, { "docid": "b341878469ebcc6cf96cae468b8b3efc", "score": "0.6053338", "text": "function add_pmbus_admin_menu(){\n /* add_submenu_page(\n\t 'pmbus_members_page',\n\t 'Companies',\n\t 'Companies',\n\t 'manage_options',\n\t 'companies_page_build',\n \t\t 'companies_page_build');\n add_submenu_page(\n \t 'pmbus_members_page',\n \t'Add New Member',\n\t\t 'Add New Member',\n\t\t 'manage_options',\n\t\t 'add_new_members_slug',\n\t\t 'add_new_members_function');\n\t\t\t*/\n /* add_menu_page(\n\t'PMBus Admin Settings',\n\t 'PMBus Dev Testing',\n\t 'manage_options',\n\t\t 'pmbus_dev_page',\n\t\t 'pmbus_dev_testing_page_build', // Function that is called to build 'PMBus' Page\n\t\t\t 'dashicons-admin-tools', // Icon that displays next to menu item\n\t\t\t\t3); */\n\n\t/* add_menu_page(\n 'PMBus Admin Settings',\n \t'Training Resources',\n \t 'manage_options',\n \t\t'training_recourses',\n \t\t 'training_resources_page_build', // Function that is called to build 'PMBus' Page\n \t\t\t'dashicons-media-video', // Icon that displays next to menu item\n \t\t\t 99); */\n}", "title": "" }, { "docid": "5372b97a4bc056eecbe5784463408780", "score": "0.6045106", "text": "function set_admin_api_permissions($args) {\n\n // Require the Rest Permissions Inc\n require_once MIDRUB_BASE_PATH . 'inc/rest/api_permissions.php';\n\n // Register Admin's Components Options\n md_set_admin_api_permissions($args);\n \n }", "title": "" }, { "docid": "5b0212efc36b6830feda9c1995be2e58", "score": "0.60409355", "text": "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Extend_Product_Vendors_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t//debug\n\t\t$this->loader->add_action('admin_footer', $plugin_admin, 'debug_admin');\n\n //load resources\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t\t//Default sidebar (front-end)\n\t\t$this->loader->add_action( 'widgets_init', $plugin_admin, 'register_sidebars' );\n\t\t$this->loader->add_action( 'widgets_init', $plugin_admin, 'epv_load_widget' );\n\n\t\t//Vendor admin action restrictions\n\t\t$this->loader->add_action( 'admin_head', $plugin_admin, 'colorbox_hack' );\n\t\t$this->loader->add_action( 'admin_footer', $plugin_admin, 'admin_redirect_for_gc' );\n\t\t$this->loader->add_action( 'admin_footer-post.php', $plugin_admin, 'disable_vendor_gc_cat_selection' );\n $this->loader->add_action( 'admin_footer-post-new.php', $plugin_admin, 'disable_vendor_gc_cat_selection' );\n $this->loader->add_action( 'admin_head', $plugin_admin, 'remove_vendor_admin_meta_boxes' );\n\n //Allow site admins to request new serial numbers for review\n $this->loader->add_action( 'admin_menu', $plugin_admin, 'send_serial_numbers_for_review' );\n\n //Vendor admin display\n $this->loader->add_action( 'admin_body_class', $plugin_admin, 'vendor_back_end_class' );\n $this->loader->add_filter( 'pre_site_transient_update_core', $plugin_admin, 'epv_remove_notifications_for_vendors' );\n $this->loader->add_filter( 'pre_site_transient_update_plugins', $plugin_admin, 'epv_remove_notifications_for_vendors' );\n $this->loader->add_filter( 'pre_site_transient_update_themes', $plugin_admin,'epv_remove_notifications_for_vendors' );\n\n //Emails\n $this->loader->add_filter( 'woocommerce_email_classes', $plugin_admin, 'add_get_new_gift_cards_email' );\n $this->loader->add_action( 'wp_ajax_trigger_newgcs_email', $plugin_admin, 'trigger_get_new_gift_cards_email' );\n\n\t\t//Brand attribute image meta\n\t\t$this->loader->add_action('pa_brand_add_form_fields', $plugin_admin, 'add_brand_image_meta_field', 10, 2);\n\n\t}", "title": "" }, { "docid": "69b92feec2e87dc458b948ae275e7ff0", "score": "0.6022861", "text": "function createAdmin() {\n\t\t# if we already have an admin user, exit\n\t\t$adminUser = $this->_db->getUser(2);\n\t\tif ($adminUser !== false) {\n\t\t\treturn ;\n\t\t} # if\n\t\t\n\t\t# DB connectie\n\t\t$dbCon = $this->_db->getDbHandle();\n\n\t\t# Vraag de password salt op \n\t\t$passSalt = $this->_settings->get('pass_salt');\n\t\t\n\t\t# Bereken het password van de dummy admin user\n\t\t$adminPwdHash = sha1(strrev(substr($passSalt, 1, 3)) . 'admin' . $passSalt);\r\n\t\t\r\n\t\t# Maak een apikey aan. Deze kan niet worden gebruikt, maar is bij voorkeur niet leeg\r\n\t\t$apikey = md5('admin');\n\t\t\n\t\t# Create the dummy 'admin' user\n\t\t$admin_user = array(\n\t\t\t# 'userid'\t\t=> 2,\t\t\n\t\t\t'username'\t\t=> 'admin',\n\t\t\t'firstname'\t\t=> 'admin',\n\t\t\t'passhash'\t\t=> $adminPwdHash,\n\t\t\t'lastname'\t\t=> 'user',\n\t\t\t'mail'\t\t\t=> '[email protected]',\n\t\t\t'apikey'\t\t=> $apikey,\n\t\t\t'lastlogin'\t\t=> 0,\n\t\t\t'lastvisit'\t\t=> 0,\n\t\t\t'deleted'\t\t=> 0);\n\t\t$this->_db->addUser($admin_user);\n\n\t\t# update handmatig het userid\n\t\t$currentId = $dbCon->singleQuery(\"SELECT id FROM users WHERE username = 'admin'\");\n\t\t$dbCon->exec(\"UPDATE users SET id = 2 WHERE username = 'admin'\");\n\t\t$dbCon->exec(\"UPDATE usersettings SET userid = 2 WHERE userid = '%s'\", Array( (int) $currentId));\n\n\t\t# Geef user 2 (de admin user, naar we van uit gaan) de anon, auth en admin group\n\t\t$dbCon->rawExec(\"INSERT INTO usergroups(userid,groupid,prio) VALUES(2, 1, 1)\");\n\t\t$dbCon->rawExec(\"INSERT INTO usergroups(userid,groupid,prio) VALUES(2, 2, 2)\");\n\t\t$dbCon->rawExec(\"INSERT INTO usergroups(userid,groupid,prio) VALUES(2, 3, 3)\");\r\n\t\t$dbCon->rawExec(\"INSERT INTO usergroups(userid,groupid,prio) VALUES(2, 4, 4)\");\n\t}", "title": "" }, { "docid": "256a6b482c1cd16cfc196455b4a6fe06", "score": "0.60203934", "text": "public function admin() {\n\n\t\tif ( is_admin() )\n\t\t\trequire_once( CARESEXTRA_ADMIN . 'admin.php' );\n\t}", "title": "" }, { "docid": "2bfd61c9b7b8d0d501c6c7e5c612cd93", "score": "0.60102195", "text": "public function admin_menu() {\n\t\t}", "title": "" }, { "docid": "cb9a0f8ca7bbc21cafd6748cf18a61a7", "score": "0.60049444", "text": "function audition_admin_add_menu_items() {\n\n\t// Bail if multisite and not in the network admin\n\tif (is_multisite() && ! is_network_admin()) {\n\t\treturn;\n\t}\n\n\t$audition_admin = audition_admin();\n\n\t// Add the main menu item\n\t$audition_admin->add_menu_item(array(\n\t\t'page_title' => esc_html__('Audition Settings', 'audition'),\n\t\t'menu_title' => esc_html__('Audition', 'audition'),\n\t\t'menu_slug' => 'audition',\n\t\t'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode(\n\t\t\tfile_get_contents(AUDITION_PATH . 'admin/assets/images/logo.svg')\n\t\t),\n\t\t'parent_slug' => false,\n\t));\n\n\t// Add the submenu item\n\t$audition_admin->add_menu_item(array(\n\t\t'page_title' => esc_html__('Audition Settings', 'audition'),\n\t\t'menu_title' => esc_html__('General', 'audition'),\n\t\t'menu_slug' => 'audition',\n\t\t'parent_slug' => 'audition',\n\t));\n\n\t$has_licenses = false;\n\n\tif ($has_licenses) {\n\t\t// Add the licenses menu item\n\t\t$audition_admin->add_menu_item(array(\n\t\t\t'page_title' => esc_html__('Audition Licenses', 'audition'),\n\t\t\t'menu_title' => esc_html__('Licenses', 'audition'),\n\t\t\t'menu_slug' => 'audition-licenses',\n\t\t\t'parent_slug' => 'audition',\n\t\t));\n\t\tadd_settings_section('audition_settings_licenses', '', '__return_null', 'audition-licenses');\n\t}\n}", "title": "" }, { "docid": "2449552cfdf2bc845e0f4fbac1936e44", "score": "0.5997057", "text": "public function add_admin_notices() {\n\n\n\t}", "title": "" }, { "docid": "a4d55bb20f41b4ef4d78c50dcdeb6691", "score": "0.5991752", "text": "function add_set_page() {\n\t\t/*\n\t\tif ( current_user_can( 'level_10' ) && function_exists( 'add_management_page' ) )\n\t\t\t$hook = add_management_page( 'WPSID', 'WPSID', 'level_10', 'wpsid', array( &$this, 'admin_page' ) );\n\t\t*/\n\t\tadd_options_page('WPSID Config', 'WPSID', 'manage_options', 'wpsid', array( &$this, 'admin_page' ));\n\t\t// add_action( \"admin_print_scripts-{$hook}\", array( &$this, 'admin_script' ) );\n\t\t// add_action( \"admin_footer-{$hook}\", array( &$this, 'footer_script' ) );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "6ff60a33e9494ae37caba6d985341a65", "score": "0.5984957", "text": "static public function addAdminCaps()\n {\n // récupération du rôle administrateur\n $adminRole = get_role('administrator');\n\n // pour chaque capability, on l'ajoute pour l'admin\n foreach(static::CAPABILITIES as $cap => $cptCap) {\n $adminRole->add_cap($cptCap);\n }\n }", "title": "" }, { "docid": "456ba3c67238ed0075824fb366929336", "score": "0.59795547", "text": "function csl_slplus_setup_admin_interface() {\n global $slplus_plugin;\n \n // Don't have what we need? Leave.\n if (!isset($slplus_plugin)) { return; }\n\n // Show message if not licensed\n //\n if (get_option(SLPLUS_PREFIX.'-purchased') == 'false') {\n $slplus_plugin->notifications->add_notice(\n 2,\n \"Your license \" . get_option(SLPLUS_PREFIX . '-license_key') . \" could not be validated.\"\n ); \n } \n\n // Already been here? Get out.\n if (isset($slplus_plugin->settings->sections['How to Use'])) { return; }\n \n \n //-------------------------\n // How to Use Section\n //------------------------- \n $slplus_plugin->settings->add_section(\n array(\n 'name' => 'How to Use',\n 'description' => get_string_from_phpexec(SLPLUS_PLUGINDIR.'/how_to_use.txt')\n )\n );\n\n //-------------------------\n // Google Communiations\n //------------------------- \n $slplus_plugin->settings->add_section(\n array(\n 'name' => 'Google Communication',\n 'description' => 'These settings affect how the plugin communicates with Google to create your map.'.\n '<br/><br/>'\n )\n );\n \n $slplus_plugin->settings->add_item(\n 'Google Communication', \n 'Google API Key', \n 'api_key', \n 'text', \n false,\n 'Your Google API Key. You will need to ' .\n '<a href=\"http://code.google.com/apis/maps/signup.html\" target=\"newinfo\">'.\n 'go to Google</a> to get your Google Maps API Key.'\n );\n\n\n $slplus_plugin->settings->add_item(\n 'Google Communication', \n 'Geocode Retries', \n 'goecode_retries', \n 'list', \n false,\n 'How many times should we try to set the latitude/longitude for a new address. ' .\n 'Higher numbers mean slower bulk uploads ('.\n '<a href=\"http://www.cybersprocket.com/products/store-locator-plus/\">plus version</a>'.\n '), lower numbers makes it more likely the location will not be set during bulk uploads.',\n array (\n 'None' => 0,\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n '5' => '5',\n '6' => '6',\n '7' => '7',\n '8' => '8',\n '9' => '9',\n '10' => '10',\n )\n );\n \n //-------------------------\n // Reporting\n //------------------------- \n $slp_rep_desc = __('These settings affect how the reporting system behaves. ', SLPLUS_PREFIX);\n if (!function_exists('slplus_add_report_settings')) {\n $slp_rep_desc .= '<br/><br/>'.\n __('This is a <a href=\"http://www.cybersprocket.com/products/store-locator-plus/\">plus version</a>'.\n ' feature. It provides a way to generate reports on what locations' .\n ' people have searched for and what results they received back. ', SLPLUS_PREFIX);\n }\n $slp_rep_desc .= '<br/><br/>'; \n \n $slplus_plugin->settings->add_section(\n array(\n 'name' => 'Reporting',\n 'description' => $slp_rep_desc\n )\n );\n \n if (function_exists('slplus_add_report_settings')) {\n slplus_add_report_settings();\n } \n}", "title": "" }, { "docid": "9e682c4305b53306a5446296264075fa", "score": "0.5976833", "text": "function mentorz_plugin_menu() {\n\t\tadd_menu_page( \"Mentorz Administration\", \"Mentorz\", 'manage_options', 'mentorz', 'mentorz_plugin_options' );\n\t\tadd_submenu_page( 'mentorz', 'Installation', 'Installation Guidelines', 'manage_options', 'mentorz_installation', 'mentorz_insallation_page' );\n\n\t\tadd_submenu_page( 'mentorz', 'Groups', 'Groups Administration', 'manage_options', 'mentorz_groups', 'mentorz_groups_page' );\n\t\tadd_submenu_page( 'mentorz', 'Users', 'Users Administration', 'manage_options', 'mentorz_userss', 'mentorz_users_page' );\n\t}", "title": "" }, { "docid": "29f021f6f4fbbffcc1aab1476476fdb6", "score": "0.59753287", "text": "public function admin_page () \n {\n global $wp_roles;\n \n $this->userdata= get_userdata( get_current_user_id() );\n $icon = self::$icon;\n\n $menu[] = array( self::$name, self::$name, 1, self::$plugin_slug, array( $this, self::$plugin_slug.'_function'), $icon );\n $menu[] = array( 'Manage', 'Manage', 1, self::$plugin_slug, 'manage_'.self::$plugin_slug, array( $this, 'manage_'.self::$plugin_slug.'_function' ) );\n $menu[] = array( 'Help?', 'Help?', 1, self::$plugin_slug, 'help_'.self::$plugin_slug, array( $this, 'help_'.self::$plugin_slug.'_function' ) );\n \n if( is_array( $menu ) ) add::load_menu_page( $menu );\n }", "title": "" }, { "docid": "59b8d065e1f508fce8dda7de4c3e365e", "score": "0.5971365", "text": "public function __construct(){\n\t\t\tUsers::setAdminLevel(\\Twist::framework()->setting('WS_REQUIRED_ADMIN_LEVEL'));\n\t\t}", "title": "" }, { "docid": "5ddbb18eaac5fe4e568714d8acc7c02c", "score": "0.5970176", "text": "public abstract function adminMenu();", "title": "" }, { "docid": "59917d992b0b3c9fa1e57122109d4ea9", "score": "0.59552914", "text": "function openbadges_admin_init () {\n\trequire_once(dirname(__FILE__).'/admin/init.php');\n}", "title": "" }, { "docid": "1213775533ce4ef0cf1f563d0d49fde4", "score": "0.5943241", "text": "function setup_admin_menus() {\n\t\t$admin_menus = array();\n\n\t\t$admin_menus[] = array(\n\t\t\t'page_title' => __( 'User Control', 'pf' ),\n\t\t\t'menu_title' => __( 'User Control', 'pf' ),\n\t\t\t'cap' => 'edit_posts',\n\t\t\t'slug' => 'pf-user-control',\n\t\t\t'callback' => array( $this, 'admin_menu_callback' ),\n\t\t);\n\n\t\tparent::setup_admin_menus( $admin_menus );\n\t}", "title": "" }, { "docid": "4d316837d17b5a8250a02c2506d8b54e", "score": "0.5941594", "text": "function add_admin_panel(){\n\n\t\tglobal $wpc_options_page;\n\n\t\t$wpc_options_page = add_menu_page(\n\t\t\t__( 'WP Connect', WPC_TEXT_DOMAIN ),\n\t\t\t__( 'WP Connect', WPC_TEXT_DOMAIN ),\n\t\t\t'manage_options',\n\t\t\tWPC_SETTINGS_PAGE,\n\t\t\tarray( &$this, 'admin_section_page' )\n\t\t);\n\n\t}", "title": "" }, { "docid": "3caa08d16af18fc33d823548c8adaea4", "score": "0.59319305", "text": "function permissions_admin_create()\n{\n // MMaes,2003-06-23: Added sec.check\n if (!pnSecAuthAction(0, 'Permissions::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n // Confirm authorisation code\n // MMaes,2003-06-23: Redirect to base if the AuthKey doesn't compute.\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Permissions',\n 'admin',\n 'main'));\n return true;\n }\n\n // Get parameters\n list($permtype,\n \t $permgrp,\n $realm,\n $id,\n $component,\n $instance,\n $level,\n $insseq) = pnVarCleanFromInput('permtype',\n 'permgrp',\n 'realm',\n 'id',\n 'component',\n 'instance',\n 'level',\n 'insseq');\n\n\t// Since we're using TextAreas, make sure no carriage-returns etc get through unnoticed.\n\t$warnmsg = '';\n\tif (ereg(\"[\\n\\r\\t\\x0B]\",$component)) {\n\t\t$component = trim(ereg_replace(\"[\\n\\r\\t\\x0B]\",\"\",$component));\n\t\t$instance = trim(ereg_replace(\"[\\n\\r\\t\\x0B]\",\"\",$instance));\n $warnmsg .= _PERM_COMP_INPUTERR;\n\t}\n\tif (ereg(\"[\\n\\r\\t\\x0B]\",$instance)) {\n\t\t$component = trim(ereg_replace(\"[\\n\\r\\t\\x0B]\",\"\",$component));\n\t\t$instance = trim(ereg_replace(\"[\\n\\r\\t\\x0B]\",\"\",$instance));\n $warnmsg .= _PERM_INST_INPUTERR;\n\t}\n\n // Load in API\n pnModAPILoad('Permissions', 'admin');\n\n // Pass to API\n if (pnModAPIFunc('Permissions',\n 'admin',\n 'create', array('type'\t => $permtype,\n 'realm' => $realm,\n\t\t\t\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t\t\t\t 'component' => $component,\n\t\t\t\t\t\t\t\t 'instance'\t => $instance,\n\t\t\t\t\t\t\t\t 'level'\t => $level,\n\t\t\t\t\t\t\t\t 'insseq' => $insseq))) {\n // Success\n\t\tif ($warnmsg == '') {\n \tpnSessionSetVar('statusmsg', _PERM_CREATED);\n } else {\n \tpnSessionSetVar('errormsg', $warnmsg);\n }\n }\n\n pnRedirect(pnModURL('Permissions',\n 'admin',\n 'view',\n array('permtype' => $permtype,\n \t 'permgrp'\t => $permgrp)));\n\n return true;\n}", "title": "" }, { "docid": "6f34e0fdd7c7625cd05b45ab3b12a4ed", "score": "0.5918763", "text": "public function admin_add() {\r\n \t$this->instantAdd();\r\n }", "title": "" }, { "docid": "1133111971f0b3e910797e94dadbb869", "score": "0.59106934", "text": "public function add_admin_menu() {\n\t\t\tadd_submenu_page( 'woostify-welcome', 'WooBuilder', __( 'WooBuilder', 'woostify-pro' ), 'manage_options', 'edit.php?post_type=woo_builder' );\n\t\t}", "title": "" }, { "docid": "c20b2114bca8541b12cef86648d8dc4a", "score": "0.5907652", "text": "public function initAdmin()\n {\n }", "title": "" }, { "docid": "6197c68acc17f55fd01a276eb0c18771", "score": "0.5904585", "text": "public function admin_add() {\n $this->add();\n }", "title": "" }, { "docid": "f24608af117f050e65e72c956345b60a", "score": "0.590142", "text": "function wtbChatRoom_add_admin_menu() {\n add_options_page( 'Website Toolbox Chat Room', 'Website Toolbox Chat Room', 'manage_options', 'wtbchatroomoptions', 'wtbchatroom_options_page' );\n}", "title": "" }, { "docid": "f08de6bf753bf83a66d56920425adeef", "score": "0.589653", "text": "public function registerAdministrationHooks()\n\t{\n\t\t// extend the admin user list with custom columns\n\t\t$this->dc()->getExtendUserList()->register();\n\t}", "title": "" }, { "docid": "95f01bdc25b2aacc40d7863128b23346", "score": "0.589481", "text": "function admin() {\n\n\t\tif ( defined('USE_ZUES_ADMIN_NOTICES') ) {\n\n\t\t\t// Class for generating admin notices\n\t\t\tinclude_once ZUES_FRAMEWORK_DIR . '/classes/class-admin-notices.php';\n\n\t\t}\n\n\t\tif ( defined('USE_ZUES_CUSTOMIZER') ) {\n\n\t\t\t// Class for required/recommend plugin notification and installation.\n\t\t\tinclude_once ZUES_FRAMEWORK_DIR . '/libraries/customizer/customizer-library.php';\n\n\t\t}\n\n\t\tif ( defined('USE_TGMPA') ) {\n\n\t\t\t// Class for required/recommend plugin notification and installation.\n\t\t\tinclude_once ZUES_FRAMEWORK_DIR . '/libraries/TGMPA/class-tgm-plugin-activation.php';\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "851deaf5c2836cc431ca511e978e463d", "score": "0.58938885", "text": "function pc_robots_txt_admin_menu() {\n\t\n\tif ( function_exists('add_options_page') ) {\n\t\tif ( function_exists('is_super_admin') && !is_super_admin() )\n\t\t\treturn;\n\t\t#add_options_page(page_title, menu_title, access_level/capability, file, [function]);\n\t\tadd_options_page('Robots.txt', 'Robots.txt', 'manage_options', str_replace(\"\\\\\", \"/\", __FILE__), 'pc_robots_txt_options');\n\t}\n\n}", "title": "" }, { "docid": "d6057c4f3fb57063bc3dbddfd4dca493", "score": "0.58898306", "text": "private function setup_actions() {\n\n\t\t// Always hide the old user levels in Members.\n\t\tadd_filter( 'members_remove_old_levels', '__return_true', 95 );\n\t}", "title": "" }, { "docid": "ca17c9fee12902ade0cda76370ac5e08", "score": "0.588845", "text": "public function create_admin_menu() {\n \n $sub_menus = apply_filters( 'exmspl_sub_menu_items', array(\n array(\n 'page_title' => __( 'Settings', 'exmspl' ),\n 'menu_title' => __( 'Settings', 'exmspl' ),\n 'caps' => 'manage_exmspl_settings',\n 'menu_slug' => 'exmspl_settings',\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=exmspl_practitioners', $sub_menu['page_title'], $sub_menu['menu_title'], $sub_menu['caps'], $sub_menu['menu_slug'], $sub_menu['function'] );\n }\n } \n }", "title": "" }, { "docid": "5a59427ed85015c0c633d38e93f31e7f", "score": "0.5887749", "text": "private function defineAdminHooks()\n {\n $admin = new Admin();\n\n add_action('admin_enqueue_scripts', array($admin, 'enqueueStyles'));\n add_action('admin_enqueue_scripts', array($admin, 'enqueueScripts'));\n\n add_action('admin_menu', array($admin, 'initAdminMenu'));\n add_action('admin_post_api_credentials_post', array($admin, 'apiCredentialsPost'));\n add_action('admin_post_google_api_key_post', array($admin, 'googleApiKeyPost'));\n }", "title": "" }, { "docid": "9b83bdeddc90c91ba64298b3c10da9f8", "score": "0.5886961", "text": "function phpweltsozial_admin_menu()\r\n{\r\n\t// Add admin page to the Options Tab of the admin section\r\n\t\r\n\tif ( function_exists('add_submenu_page') )\r\n\t\tadd_submenu_page('plugins.php', __('SociBook'), __('SociBook'), 1, __FILE__, 'phpweltsozial_plugin_options');\r\n\t\telse add_options_page('SociBook', 'SociBook', 8, __FILE__, 'phpweltsozial_plugin_options');\r\n\t// Check if the options exists on the database and add them if not\r\n}", "title": "" }, { "docid": "953cfbdc2f952e39940851d6ef752e17", "score": "0.5883673", "text": "function ai_admin_menu() {\n\tadd_menu_page( 'Arbre Integral', 'Arbre Integral', 'manage_options', 'arbreintegral', 'ai_admin_page', 'dashicons-tickets', 4 );\n\t// add_menu_page( 'Arbre Integral maj', 'AI maj', 'manage_options', 'arbreintegral_update', 'ai_update_page', 'dashicons-tickets', 5 );\n}", "title": "" }, { "docid": "d9498609d6149b69577d1141cf3393f0", "score": "0.5881677", "text": "function register() {\n\tadd_action( 'admin_menu', '\\\\Sgdd\\\\Admin\\\\SettingsPages\\\\Advanced\\\\add_menu' );\n\tEmbed\\register();\n}", "title": "" }, { "docid": "1b4f04fc9bd103659d81f8b68f20773a", "score": "0.58734953", "text": "function tie_admin_bar() {\n\tglobal $wp_admin_bar;\n\t\n\tif ( current_user_can( 'switch_themes' ) ){\n\t\t$wp_admin_bar->add_menu( array(\n\t\t\t'parent' => 0,\n\t\t\t'id' => 'mpanel_page',\n\t\t\t'title' => theme_name ,\n\t\t\t'href' => admin_url( 'admin.php?page=panel')\n\t\t) );\n\t}\n\t\n}", "title": "" }, { "docid": "dcfc20d8a7a986da4ede78aae18be16d", "score": "0.5868176", "text": "public function admin_init() {\n add_settings_section(\n 'basic_settings',\n 'Basic settings',\n array($this, 'print_section_basic_settings'),\n 'zeta-multiple-login'\n );\n\n add_settings_field(\n 'basic_settings_login_chooser', \n 'Login chooser page ID', \n array($this, 'print_setting_login_chooser'), \n 'zeta-multiple-login',\n 'basic_settings'\n );\n\n add_settings_field(\n 'basic_settings_phpcas_path', \n 'Full path to phpCAS', \n array($this, 'print_setting_phpcas_path'), \n 'zeta-multiple-login',\n 'basic_settings'\t\t\t\n );\n\n add_settings_field(\n 'basic_settings_defaultrole', \n 'New users default role', \n array($this, 'print_setting_defaultrole'), \n 'zeta-multiple-login',\n 'basic_settings'\t\t\t\n );\n\n add_settings_field(\n 'basic_settings_email_suffix', \n 'New users email suffix', \n array($this, 'print_setting_email_suffix'), \n 'zeta-multiple-login',\n 'basic_settings'\t\t\t\n );\n\n add_settings_section(\n 'cas_settings',\n 'CAS settings',\n array($this, 'print_section_cas_settings'),\n 'zeta-multiple-login'\n );\n\n add_settings_field(\n 'basic_settings_cas_host', \n 'CAS host', \n array($this, 'print_setting_cas_host'), \n 'zeta-multiple-login',\n 'cas_settings'\n );\n\n add_settings_field(\n 'basic_settings_cas_port', \n 'CAS port', \n array($this, 'print_setting_cas_port'), \n 'zeta-multiple-login',\n 'cas_settings'\t\t\t\n );\n \n add_settings_field(\n 'basic_settings_cas_path', \n 'CAS path', \n array($this, 'print_setting_cas_path'), \n 'zeta-multiple-login',\n 'cas_settings'\t\t\t\n );\n \n add_settings_field(\n 'basic_settings_cas_version', \n 'CAS version', \n array($this, 'print_setting_cas_version'), \n 'zeta-multiple-login',\n 'cas_settings'\t\t\t\n );\n \n add_settings_section(\n 'ldap_settings',\n 'LDAP settings',\n array($this, 'print_section_ldap_settings'),\n 'zeta-multiple-login'\n );\n \n add_settings_field(\n 'basic_settings_ldap_host', \n 'LDAP host', \n array($this, 'print_setting_ldap_host'), \n 'zeta-multiple-login',\n 'ldap_settings'\t\t\t\n );\n \n add_settings_field(\n 'basic_settings_ldap_port', \n 'LDAP port', \n array($this, 'print_setting_ldap_port'), \n 'zeta-multiple-login',\n 'ldap_settings'\t\t\t\n );\n \n add_settings_field(\n 'basic_settings_ldap_useradd', \n 'Add new users?', \n array($this, 'print_setting_ldap_useradd'), \n 'zeta-multiple-login',\n 'ldap_settings'\t\t\t\n );\n \n add_settings_field(\n 'basic_settings_ldap_basedn', \n 'Base DN', \n array($this, 'print_setting_ldap_basedn'), \n 'zeta-multiple-login',\n 'ldap_settings'\t\t\t\n );\n \n register_setting('zeta_multiple_login', 'zeta_multiple_login', array(&$this, 'check_options'));\n }", "title": "" }, { "docid": "a2201a0294c3d086992c58c5db1385bf", "score": "0.586099", "text": "public function enable()\n {\n $RBAC = RBAC::getSingleton();\n $RBAC->initRBAC();\n $RBAC->createPermision('PS_DEVTOOLS');\n }", "title": "" }, { "docid": "8a6f907de9dc0b851027b90e01678dbf", "score": "0.58595175", "text": "function zwp_add_admin_bar_link() {\n\t\tglobal $wp_admin_bar;\n\n\t\t//Options for editors and up\n\t\tif( current_user_can( 'edit_pages' ) ){\n\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t'id' => 'environments_link'\n\t\t\t\t, 'title' => __( 'Environments')\n\t\t\t) );\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'parent' => 'environments_link'\n\t\t\t\t\t, 'id' => 'environments-production-link'\n\t\t\t\t\t, 'title' => __( 'Production')\n\t\t\t\t\t, 'href' => __( 'http://site.com' )\n\t\t\t\t));\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'parent' => 'environments_link'\n\t\t\t\t\t, 'id' => 'environments-stage-link'\n\t\t\t\t\t, 'title' => __( 'Stage')\n\t\t\t\t\t, 'href' => __( 'http://stage.site.com' )\n\t\t\t\t));\n\t\t}//if edit_pages\n\n\t\t//Options for contributors and up\n\t\tif( current_user_can( 'edit_posts' ) ){\n\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t'id' => 'theme_info_link'\n\t\t\t\t, 'title' => __( 'Theme info')\n\t\t\t) );\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'parent' => 'theme_info_link'\n\t\t\t\t\t, 'id' => 'theme-documentation-link'\n\t\t\t\t\t, 'title' => __( 'Documentation')\n\t\t\t\t\t, 'href' => __( 'http://site.com' )\n\t\t\t\t));\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'parent' => 'theme_info_link'\n\t\t\t\t\t, 'id' => 'theme-demo-link'\n\t\t\t\t\t, 'title' => __( 'Demo')\n\t\t\t\t\t, 'href' => __( 'http://site.com' )\n\t\t\t\t));\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'parent' => 'theme_info_link'\n\t\t\t\t\t, 'id' => 'theme-support-link'\n\t\t\t\t\t, 'title' => __( 'Support')\n\t\t\t\t\t, 'href' => __( 'http://site.com' )\n\t\t\t\t));\n\t\t}//if edit_posts\n}", "title": "" }, { "docid": "0e6090243e787f8e54cb18fb3fb4e69e", "score": "0.58569044", "text": "public function admin_menu() {\n\t\t\tadd_submenu_page(\n\t\t\t\t'themed_login',\n\t\t\t\t__('Login Security Settings', 'themed-login'),\n\t\t\t\t__('Security', 'themed-login'),\n\t\t\t\t'manage_options',\n\t\t\t\t$this->options_key,\n\t\t\t\t[$this, 'settings_page']\n\t\t\t);\n\n\t\t\tadd_settings_section('general', null, '__return_false', $this->options_key);\n\n\t\t\tadd_settings_field('private_site', __('Private Site', 'themed-login'), [$this, 'settings_field_private_site'], $this->options_key, 'general');\n\t\t\tadd_settings_field('private_login', __('Private Login', 'themed-login'), [$this, 'settings_field_private_login'], $this->options_key, 'general');\n\t\t\tadd_settings_field('login_attempts', __('Login Attempts', 'themed-login'), [$this, 'settings_field_login_attempts'], $this->options_key, 'general');\n\t\t}", "title": "" }, { "docid": "3097c98f073f0aad75baa63128fed22b", "score": "0.5853791", "text": "function um_extend_admin_menu() {\n\t\tadd_submenu_page( $this->slug, __( 'Notices', 'um-notices' ), __( 'Notices', 'um-notices' ), 'manage_options', 'edit.php?post_type=um_notice', '' );\n\t}", "title": "" }, { "docid": "7b09b39e387594daecab52440fa25c2d", "score": "0.58513576", "text": "private function includeAdminEnv()\n\t{\n\t\t// load the language files for the admin messages as well\n\t\t$language\t= JFactory::getLanguage();\n\t\t$language->load('joomla', JPATH_ADMINISTRATOR, null, true);\n\t\t$language->load('com_helloworld', JPATH_ADMINISTRATOR, null, true);\n\n\t\tJLoader::register('JToolBarHelper', JPATH_ADMINISTRATOR . '/includes/toolbar.php');\n\t\tJLoader::register('JSubMenuHelper', JPATH_ADMINISTRATOR . '/includes/subtoolbar.php');\n\t\tJLoader::register('HelloWorldHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/helloworld.php');\n\t}", "title": "" }, { "docid": "9cdd5966a4569e2bb0f21948b0a8313a", "score": "0.58487475", "text": "public static function add_admin_menu() {\n\t\tadd_options_page(\n\t\t\t__( 'Statify', 'statify' ),\n\t\t\t__( 'Statify', 'statify' ),\n\t\t\t'manage_options',\n\t\t\t'statify-settings',\n\t\t\tarray( __CLASS__, 'create_settings_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "965a5c11ecc30e0f41d49a9c5be5118c", "score": "0.58485425", "text": "public function admin_menu() {\n\n\t\t$label = apply_filters( 'envira_whitelabel', false ) ? '' : __( 'Envira Gallery ', 'envira-gallery' );\n\t\t// Register the submenu.\n\t\t$this->hook = add_submenu_page(\n\t\t\t'edit.php?post_type=envira',\n\t\t\t$label . __( 'Tools', 'envira-gallery' ),\n\t\t\t'<span> ' . __( 'Tools', 'envira-gallery' ) . '</span>',\n\t\t\tapply_filters( 'envira_gallery_menu_cap', 'manage_options' ),\n\t\t\tENVIRA_SLUG . '-tools',\n\t\t\tarray( $this, 'tools_page' )\n\t\t);\n\n\t\t// If successful, load admin assets only on that page and check for tools refresh.\n\t\tif ( $this->hook ) {\n\t\t\tadd_action( 'load-' . $this->hook, array( $this, 'tools_page_assets' ) );\n\t\t\tadd_action( 'load-' . $this->hook, array( $this, 'maybe_fix_migration' ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "11058515b51baaf722460b1b45b56d72", "score": "0.58426946", "text": "function set_fields()\n\t{\n\t\tif (!addon_installed('galleries')) return;\n\n\t\t$admin_groups=$GLOBALS['FORUM_DRIVER']->get_super_admin_groups();\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,true);\n\t\t$GLOBALS['SITE_DB']->query_delete('gsp',array('specific_permission'=>'have_personal_category','the_page'=>'cms_galleries'));\n\t\tif (post_param_integer('keep_personal_galleries',0)==1)\n\t\t{\n\t\t\tforeach (array_keys($groups) as $group_id)\n\t\t\t{\n\t\t\t\tif (!in_array($group_id,$admin_groups))\n\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('gsp',array('specific_permission'=>'have_personal_category','group_id'=>$group_id,'module_the_name'=>'','category_name'=>'','the_page'=>'cms_galleries','the_value'=>1));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ee9510929fecdae60698f7d788a2fee0", "score": "0.58409166", "text": "function admin_menu(){\r\n //$level = 'manage-options'; // for wpmu sub blog admins\r\n $level = 'administrator'; // for single blog intalls\r\n add_options_page ( 'Feedblitz Membermail Settings', 'Feedblitz Membermail', $level, $this->slug, array (&$this, 'options_page' ) );\r\n }", "title": "" }, { "docid": "da2766cdb932687e5e61ca870576b5bc", "score": "0.5832824", "text": "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Sponsors', \n\t\t\t'All Sponsors', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=sponsors'\n\t\t);\n\t}", "title": "" }, { "docid": "ab01d8c5935188d7076482f34c6f2659", "score": "0.58237594", "text": "public function add_admin_menu() {\n\t\t\tadd_submenu_page( 'woostify-welcome', 'Mega Menu', __( 'Mega Menu', 'woostify-pro' ), 'manage_options', 'edit.php?post_type=mega_menu' );\n\t\t}", "title": "" }, { "docid": "990c2a1babd1cebbbfbe61ef8a9a5970", "score": "0.5822615", "text": "public function on_admin()\n {\n // YOUR CUSTOM CODE HERE.\n }", "title": "" }, { "docid": "9d82818aa63f67b7f9ab9604294db49c", "score": "0.58222187", "text": "private function admin_tools(){\n\n register_activation_hook(__FILE__, 'nu_loader_plugin_activate');\n\n add_action( 'admin_menu','nuloader_add_admin_menu'); // adds menu item to wp dashboard\n add_action( 'admin_init','register_mysettings');\n add_action('admin_init', 'nu_loader_plugin_redirect');\n\n function nuloader_add_admin_menu(){\n add_menu_page( 'NU Loader Settings', 'NU Loader', 'manage_options', 'nu_loader', 'settings_page', plugin_dir_url( __FILE__ ) . '_ui/n.png' );\n }\n\n function register_mysettings(){ // whitelist options\n register_setting( 'nu-loader-settings', 'global_material_icons' );\n register_setting( 'nu-loader-settings', 'global_header' );\n register_setting( 'nu-loader-settings', 'global_footer' );\n }\n\n function settings_page(){\n include('interfaces/settings.php'); // call in the settings interface\n }\n\n function nu_loader_plugin_activate(){\n add_option('nu_loader_plugin_do_activation_redirect', true);\n }\n\n function nu_loader_plugin_redirect(){\n if(get_option('nu_loader_plugin_do_activation_redirect', false)){\n delete_option('nu_loader_plugin_do_activation_redirect');\n if(!isset($_GET['activate-multi'])){\n wp_redirect(\"admin.php?page=nu_loader\");\n }\n }\n }\n\n }", "title": "" }, { "docid": "7f58f25619fde262aec535dfd72e637c", "score": "0.5820014", "text": "public function createAdminMenuItems() {\n\t\t\tadd_menu_page(\n\t\t\t\t__( 'Muut', 'muut' ),\n\t\t\t\t__( 'Muut', 'muut' ),\n\t\t\t\t'manage_options',\n\t\t\t\tself::SLUG,\n\t\t\t\tarray( $this, 'renderAdminSettingsPage' )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "9a0e9797b93a939c2da8b2b936ee1180", "score": "0.5811467", "text": "function add_admin_menus() {\n\n\t\t/* Use a different screen icon for the MP6 interface */\n\t\tif ( get_user_option( 'admin_color' ) !== 'mp6' )\n\t\t\t$menu_icon = apply_filters( 'code_snippets_menu_icon', plugins_url( 'images/menu-icon.png', $this->file ) );\n\t\telse\n\t\t\t$menu_icon = 'div';\n\n\t\t/* Add the top-level menu and relevant subpage */\n\t\t$this->admin_manage = add_menu_page(\n\t\t\t__('Snippets', 'code-snippets'),\n\t\t\t__('Snippets', 'code-snippets'),\n\t\t\tis_network_admin() ? 'manage_network_snippets' : 'manage_snippets',\n\t\t\t$this->admin_manage_slug,\n\t\t\tarray( $this, 'display_admin_manage' ),\n\t\t\t$menu_icon,\n\t\t\tis_network_admin() ? 21 : 67\n\t\t);\n\n\t\tadd_submenu_page(\n\t\t\t$this->admin_manage_slug,\n\t\t\t__('Snippets', 'code-snippets'),\n\t\t\t__('Manage', 'code-snippets'),\n\t\t\tis_network_admin() ? 'manage_network_snippets' : 'manage_snippets',\n\t\t\t$this->admin_manage_slug,\n\t\t\tarray( $this, 'display_admin_manage')\n\t\t);\n\n\t\t/* Add the Edit/Add New Snippet page */\n\t\tif ( isset( $_REQUEST['page'], $_REQUEST['edit'] ) &&\n\t\t $this->admin_single_slug === $_REQUEST['page'] ) {\n\n\t\t\t$this->admin_single = add_submenu_page(\n\t\t\t\t$this->admin_manage_slug,\n\t\t\t\t__('Edit Snippet', 'code-snippets'),\n\t\t\t\t__('Edit', 'code-snippets'),\n\t\t\t\tis_network_admin() ? 'install_network_snippets' : 'install_snippets',\n\t\t\t\t$this->admin_single_slug,\n\t\t\t\tarray( $this, 'display_admin_single' )\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t$this->admin_single = add_submenu_page(\n\t\t\t\t$this->admin_manage_slug,\n\t\t\t\t__('Add New Snippet', 'code-snippets'),\n\t\t\t\t__('Add New', 'code-snippets'),\n\t\t\t\tis_network_admin() ? 'install_network_snippets' : 'install_snippets',\n\t\t\t\t$this->admin_single_slug,\n\t\t\t\tarray( $this, 'display_admin_single' )\n\t\t\t);\n\t\t}\n\n\t\tadd_action( \"load-$this->admin_manage\", array( $this, 'load_admin_manage' ) );\n\t\tadd_action( \"load-$this->admin_single\", array( $this, 'load_admin_single' ) );\n\t}", "title": "" }, { "docid": "e0a0411fd7ca6e00db60b278737f4b82", "score": "0.58108693", "text": "public function api_plugin_setup_menu(){\n\t\tadd_menu_page( __('API','api_erp'), __('Api ERP','api_erp'), 'manage_options', 'api-erp', array($this,'api_admin_page') );\n\t}", "title": "" }, { "docid": "b75ab48824088055b343530315e4ceba", "score": "0.58102953", "text": "public function registerAdministrationMenu()\n\t{\n\t\t// link menu\n\t\t$this->dc()->getMenu()->register();\n\t}", "title": "" }, { "docid": "537bd34d82278e536c8f9be1a24d9f7b", "score": "0.58101356", "text": "public function init_admin() {\n\n\t\t// stub\n\t}", "title": "" }, { "docid": "91255ee940e44d79a26fbaef6daca19b", "score": "0.58078605", "text": "function king_media_adminmenu(){\n\tadd_submenu_page('plugins.php', 'King Media', 'King Media', 'activate_plugins', 'king-media.php','king_media_loader' );\n}", "title": "" }, { "docid": "1758f9b8bee57dd770196f931013ec0e", "score": "0.58067834", "text": "function my_admin_menu() {\n //create a sub admin panel link above\n add_menu_page('Annunci', 'Annunci', 'administrator', 'main_handle', array(&$this, 'overview'), plugin_dir_url(__DIR__) . 'images/banane-icon_16x16x32.png');\n add_submenu_page('main_handle', 'Platform Settings', 'Impostazioni', 'administrator', 1, array(&$this, 'settings'));\n add_submenu_page('main_handle', 'Manage classifications', 'Classificazioni', 'administrator', 2, array(&$this, 'manage_classification'));\n add_submenu_page('main_handle', 'Gestisci Annunci', 'gestisci_annunci', 'administrator', 3, array(&$this, 'gestisci_annunci'));\n\n\n\n //These functions adds sub menu for different kinds of admin panel on back end\n// add_options_page('Mahesh Options', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_options'));\n// add_posts_page('Mahesh posts', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_posts'));\n// add_media_page('Mahesh media', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_media'));\n// add_pages_page('Mahesh pages', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_pages'));\n// add_users_page('Mahesh users', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_users'));\n// add_management_page('maheshchari', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_tools'));\n// add_theme_page('maheshchari', 'Mahesh Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_themes'));\n }", "title": "" }, { "docid": "e09b21b73d5df1664d7d2adf17465129", "score": "0.57985926", "text": "public function addAdminMenu()\n {\n add_menu_page('Импорт','Property Импорт',8,'dreamvilla-import-xml', [ $this, 'indexAction'], 'dashicons-download', '27.2');\n }", "title": "" }, { "docid": "3d1def4d4af21bef1c00073089053a7d", "score": "0.5795943", "text": "function psp_add_role_caps() {\r\r\n $roles = array('d3_user_role','editor','administrator');\r\r\n \r\r\n // Loop through each role and assign capabilities\r\r\n foreach($roles as $the_role) { \r\r\n \r\r\n $role = get_role($the_role);\r\r\n \r\r\n $role->add_cap( 'read' );\r\r\n $role->add_cap( 'read_psp_product');\r\r\n $role->add_cap( 'read_private_psp_products' );\r\r\n $role->add_cap( 'edit_psp_product' );\r\r\n $role->add_cap( 'edit_psp_products' );\r\r\n $role->add_cap( 'edit_others_psp_products' );\r\r\n $role->add_cap( 'edit_published_psp_products' );\r\r\n $role->add_cap( 'publish_psp_products' );\r\r\n $role->add_cap( 'delete_others_psp_products' );\r\r\n $role->add_cap( 'delete_private_psp_products' );\r\r\n $role->add_cap( 'delete_published_psp_products' );\r\r\n \r\r\n \t\t}\r\r\n}", "title": "" }, { "docid": "b9ce4c1811d497938badaddba7dd2443", "score": "0.57906556", "text": "public static function putAdminBarMenus(){\n\t\treturn RevSliderFront::add_admin_bar();\n\t}", "title": "" }, { "docid": "251f40b26395024d29140f552c5573ca", "score": "0.57894486", "text": "function users_roles_examples_add_toplevel_menu() {\n\n\tadd_menu_page(\n\t\tesc_html__('Users and Roles: Add & Remove Roles', 'myplugin'),\n\t\tesc_html__('Add & Remove Roles', 'myplugin'),\n\t\t'manage_options',\n\t\t'users_roles_examples',\n\t\t'users_roles_examples_display_settings_page',\n\t\t'dashicons-admin-generic',\n\t\tnull\n\t);\n\n}", "title": "" }, { "docid": "3a7e71d856df430161b7f8222e72686c", "score": "0.57860744", "text": "function elementorIoAdminMenuSetup(){\n\n add_submenu_page(\n 'elementor',\n __('Importer / Exporter', ELEMENTOR_IO_PLUGIN),\n __('Importer / Exporter', ELEMENTOR_IO_PLUGIN),\n 'manage_options',\n 'elementor-io-admin',\n 'elementorIoAdminPage'\n );\n\n}", "title": "" }, { "docid": "a3761a5d0bead395168afab61ec8ebd7", "score": "0.57855695", "text": "public function callback_admin_menu() {\n\t\t\\eoxia\\Custom_Menu_Handler::register_menu( 'digirisk-dashboard', __( 'Ajouter un site', 'digirisk' ), __( 'Ajouter un site', 'digirisk' ), 'manage_options', 'digirisk-dashboard-add', array( Class_Site::g(), 'display_edit' ), 'fas fa-plus' );\n\t}", "title": "" }, { "docid": "bcad1274f1d4ed54c0500b746ec16221", "score": "0.57850057", "text": "static function admin_menu() {\n $title = '<span style=\"font-size: 11px;\">UnderConstruction <span style=\"color: #FF7900; vertical-align: super; font-size: 9px;\">' . strtoupper(self::get_licence_name()) . '</span></span>';\n add_options_page('UnderConstructionPage', $title, 'manage_options', 'ucp', array(__CLASS__, 'main_page'));\n }", "title": "" }, { "docid": "8727fc53be617022fc6e22c1858a06c0", "score": "0.57842195", "text": "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new O3PO_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_plugin_pretty_name() );\n $settings = O3PO_Settings::instance();\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\t\t$this->loader->add_action( 'plugin_action_links_' . $this->get_plugin_name() . '/' . $this->get_plugin_name() . '.php', $plugin_admin, 'add_plugin_action_links' );\n $this->loader->add_action( 'admin_head', $plugin_admin, 'enable_mathjax' );\n $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_meta_data_explorer_page_to_menu' );\n\n $this->loader->add_action( 'admin_menu', $settings, 'add_settings_page_to_menu' );\n $this->loader->add_action( 'admin_init', $settings, 'register_settings' );\n\n $this->loader->add_action( 'admin_head', $this->environment, 'modify_css_if_in_test_environment' );\n $this->loader->add_action( 'upload_mimes', $this->environment, 'custom_upload_mimes' );\n $this->loader->add_filter( 'wp_check_filetype_and_ext', $this->environment, 'disable_real_mime_check_for_selected_extensions', 10, 4 );\n\n $this->loader->add_action( 'load-post.php', Null, 'O3PO_PublicationType::init_metabox' );\n $this->loader->add_action( 'load-post-new.php', Null, 'O3PO_PublicationType::init_metabox' );\n\n if(!empty($settings->get_plugin_option('relevanssi_mime_types_to_exclude')))\n $this->loader->add_filter( 'relevanssi_do_not_index', null, 'O3PO_Relevanssi::exclude_mime_types_by_regexp', 10, 2 );\n\n\t}", "title": "" }, { "docid": "6c169270a4772c709bcbc0d9f17781bd", "score": "0.5778135", "text": "function zayso_admin_actions()\n{\n add_options_page(\"Zayso Admin\", \"Zayso Admin\", 10, \"zayso-admin\", \"zayso_admin\"); \n}", "title": "" }, { "docid": "41598064a4c41357b52eac5fbe3f0f43", "score": "0.5772877", "text": "public function define_admin_hooks() {\n\n $plugin_admin = new WPP_Admin( $this->get_plugin_name(), $this->get_version() );\n\n // Check admin notices\n $this->loader->add_action( 'admin_notices', $plugin_admin, 'check_admin_notices' );\n // Upgrade check\n $this->loader->add_action( 'init', $plugin_admin, 'upgrade_check' );\n // Hook fired when a new blog is activated on WP Multisite\n $this->loader->add_action( 'wpmu_new_blog', $plugin_admin, 'activate_new_site' );\n // Hook fired when a blog is deleted on WP Multisite\n $this->loader->add_filter( 'wpmu_drop_tables', $plugin_admin, 'delete_site_data', 10, 2 );\n // Load WPP's admin styles and scripts\n $this->loader->add_action( 'admin_print_styles', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n // Add admin screen\n $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_menu' );\n // Thickbox setup\n $this->loader->add_action( 'admin_init', $plugin_admin, 'thickbox_setup' );\n // Contextual help\n $this->loader->add_action( 'admin_head', $plugin_admin, 'add_contextual_help' );\n // Add plugin settings link\n $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'add_plugin_settings_link', 10, 2 );\n // Update chart\n $this->loader->add_action( 'wp_ajax_wpp_update_chart', $plugin_admin, 'update_chart' );\n // Get lists\n $this->loader->add_action( 'wp_ajax_wpp_get_most_viewed', $plugin_admin, 'get_most_viewed' );\n $this->loader->add_action( 'wp_ajax_wpp_get_most_commented', $plugin_admin, 'get_most_commented' );\n // Delete plugin data\n $this->loader->add_action( 'wp_ajax_wpp_clear_data', $plugin_admin, 'clear_data' );\n // Empty plugin's images cache\n $this->loader->add_action( 'wp_ajax_wpp_clear_thumbnail', $plugin_admin, 'clear_thumbnails' );\n // Flush cached thumbnail on featured image change\n $this->loader->add_action( 'update_postmeta', $plugin_admin, 'flush_post_thumbnail', 10, 4 );\n // Purge post data on post/page deletion\n $this->loader->add_action( 'admin_init', $plugin_admin, 'purge_post_data' );\n // Purge old data on demand\n $this->loader->add_action( 'wpp_cache_event', $plugin_admin, 'purge_data' );\n // Initialize widget\n $this->loader->add_action( 'widgets_init', $plugin_admin, 'register_widget' );\n\n }", "title": "" }, { "docid": "64af22f7aaf9e43d96f483537c327b18", "score": "0.5771007", "text": "function loyalty_module_init_menu_items() {\n\n\t$CI = &get_instance();\n\tif (has_permission('loyalty', '', 'view')) {\n\n\t\t$CI->app_menu->add_sidebar_menu_item('loyalty', [\n\t\t\t'name' => _l('loyalty'),\n\t\t\t'icon' => 'fa fa-handshake-o',\n\t\t\t'position' => 20,\n\t\t]);\n\n\t\t$CI->app_menu->add_sidebar_children_item('loyalty', [\n 'slug' => 'loyalty-user',\n 'name' => _l('user'),\n 'icon' => 'fa fa-user-circle menu-icon',\n 'href' => admin_url('loyalty/user'),\n 'position' => 1,\n ]);\n \n \n $CI->app_menu->add_sidebar_children_item('loyalty', [\n 'slug' => 'loyalty-transation',\n 'name' => _l('transation'),\n 'icon' => 'fa fa-backward',\n 'href' => admin_url('loyalty/transation'),\n 'position' => 2,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('loyalty', [\n 'slug' => 'loyalty-mbs',\n 'name' => _l('membership'),\n 'icon' => 'fa fa-address-book',\n 'href' => admin_url('loyalty/membership?group=membership_rule'),\n 'position' => 3,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('loyalty', [\n 'slug' => 'loyalty-rule',\n 'name' => _l('loyalty_programs'),\n 'icon' => 'fa fa-address-book-o',\n 'href' => admin_url('loyalty/loyalty_rule'),\n 'position' => 4,\n ]);\n\n $CI->app_menu->add_sidebar_children_item('loyalty', [\n 'slug' => 'loyalty-config',\n 'name' => _l('configuration'),\n 'icon' => 'fa fa-gears',\n 'href' => admin_url('loyalty/configruration'),\n 'position' => 5,\n ]);\n\t}\n\n}", "title": "" }, { "docid": "80a12414c260cf361521bc0cd34725ef", "score": "0.5769435", "text": "function action_admin_menu() {\n\t\tglobal $edit_flow;\n\n\t\t$ef_logo = 'lib/eflogo_s32w.png';\n\t\t\n\t\tadd_menu_page( $this->module->title, $this->module->title, 'manage_options', $this->module->settings_slug, array( $this, 'settings_page_controller' ), $this->module->module_url . $ef_logo ) ;\n\t\t\n\t\tforeach ( $edit_flow->modules as $mod_name => $mod_data ) {\n\t\t\tif ( isset( $mod_data->options->enabled ) && $mod_data->options->enabled == 'on'\n\t\t\t\t&& $mod_data->configure_page_cb && $mod_name != $this->module->name )\n\t\t\t\tadd_submenu_page( $this->module->settings_slug, $mod_data->title, $mod_data->title, 'manage_options', $mod_data->settings_slug, array( $this, 'settings_page_controller' ) ) ;\n\t\t}\n\t}", "title": "" }, { "docid": "b37ff21e4c3c2a43552c81eaf650acdd", "score": "0.57689637", "text": "public function set_capabilities() {\r\n\t\tif ( $role = get_role( 'administrator' ) ) {\r\n\t\t\t$role->add_cap( 'manage_admin_columns' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "76e79c9a3f1a69572e7b82e189320727", "score": "0.5759836", "text": "public function administration() {\n \n $vue = new VueAdmin(\"Administration\");\n $vue->generer(array());\n \n\t}", "title": "" }, { "docid": "0a29c300f444266a072b7dbd915c3a41", "score": "0.5758933", "text": "public function voice_talent_management_menu()\n {\n if (!current_user_can('manage_options')) {\n return;\n }\n\n require_once('class/class_vtm_admin_menu.php');\n\n $menu = new Class_VTM_Admin_Menu();\n\n $menu->create_vtm_admin_menu();\n }", "title": "" } ]
dc7833c1ff1b2e6233509dd0f2190acd
Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.
[ { "docid": "e7fcbb557a283df76ae174007693af3f", "score": "0.0", "text": "public function mkdirs($mode = 0755) {\n if ($this->exists()) {\n return false;\n }\n try {\n if ($this->mkdir($mode)) {\n return true;\n }\n } catch (IOException $ioe) {\n // IOException from mkdir() means that directory propbably didn't exist.\n }\n $parentFile = $this->getParentFile();\n return (($parentFile !== null) && ($parentFile->mkdirs($mode) && $this->mkdir($mode)));\n }", "title": "" } ]
[ { "docid": "02c436d52d005786886ecec119670624", "score": "0.73513067", "text": "public function createDir() {\n\t\tmkdir($this -> getDir());\n\t}", "title": "" }, { "docid": "7a7b17bff4e8eb7f4cb5e7d07643e88e", "score": "0.7029259", "text": "public function create()\n {\n $this->createUniqueDirectoryName();\n $this->makeDirectory();\n }", "title": "" }, { "docid": "e95b3bc00aca824f3a8808617aa9471c", "score": "0.699078", "text": "public function createDirectory($directoryName, $path = \"/\");", "title": "" }, { "docid": "d1ac81a5a728e1c7b77a18977f3ef70d", "score": "0.69478065", "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": "942d028a458949a995b04abead150777", "score": "0.6783222", "text": "private function createDestinationDirectory()\n {\n ensure_directory($this->getDestination());\n }", "title": "" }, { "docid": "a5c8b14770da4369da6ded7cc399d561", "score": "0.6765009", "text": "public static function mkdir()\n {\n if (!file_exists(self::getDir())) {\n mkdir(self::getDir(), self::FOLDER_PERMISSIONS, true);\n }\n }", "title": "" }, { "docid": "a7a5802f895f51a95c233cb0c6863d26", "score": "0.66716665", "text": "public function createDir($path) { }", "title": "" }, { "docid": "ee81b11c29c2fb2a52c4f3f53dd11aaf", "score": "0.66503614", "text": "protected function createDirectoriesIfNotExist()\n\t{\n\t\t$storage_dir = $this->getStorageDirectory();\n\t\t$cert_files_dir = $this->getCertificateFilesDirectory();\n\n\t\tif (! is_dir($storage_dir)) {\n\t\t\tmkdir($storage_dir);\n\t\t\t$this->write($this->getMetadataFilename(), $this->getDefaultJSONStructure());\n\t\t}\n\n\t\tif (! is_dir($cert_files_dir)) {\n\t\t\tmkdir($cert_files_dir);\n\t\t}\n\t}", "title": "" }, { "docid": "bddc1d3a45bf615899691de3ec029d6c", "score": "0.6600266", "text": "public function createDirectory($name) {\r\n\r\n parent::createDirectory($this->getDecodedStr($name)); \r\n\r\n }", "title": "" }, { "docid": "1524a0bae54d23979d3e813d669f0334", "score": "0.6559302", "text": "public function CreateDirectory(){\n\t\t$this->logedChecker();\n\t\t//get folder name from form\n\t\t$FolderName = $this->input->post(\"FolderName\");\n\t\t//check if its not blank\n\t\tif($FolderName == ''){\n\t\t\tredirect('DataExplorer/index');\n\t\t}\n\t\t//create path\n\t\t$TempFilePath=$this->session->userdata('curr_path') . $this->PARSE_SIGN . $FolderName;\n\t\t//if doesnt exist, create it\n\t\tif (!file_exists($TempFilePath)) {\n\t\t\tmkdir($TempFilePath, 0777, true);\n\t\t}\n\t\tredirect('DataExplorer/index');\n\t}", "title": "" }, { "docid": "e46c3bdec8696498b41bba44024521b8", "score": "0.6510741", "text": "protected function __create_parent_directory()\n {\n $this->moduleFolderName = app_path('Modules/'.$this->module.'/');\n File::makeDirectory($this->moduleFolderName);\n $this->line( trans('system.console.module.created', ['folder' => $this->module ]) );\n }", "title": "" }, { "docid": "d7a4e07d5f7f441ce7119c4a3c321fde", "score": "0.64709026", "text": "function dir_create ($pathname, $mode = 0777, $recursive = false, $context = null)\n{\n return mkdir($pathname, $mode, $recursive, $context);\n}", "title": "" }, { "docid": "012a6889d5ca9f5090c45288ab2eb476", "score": "0.64591384", "text": "protected abstract function createDir($dir);", "title": "" }, { "docid": "614872d31478677bf8437d46d33cb29b", "score": "0.64539045", "text": "public function create($mode = self::MODE_DEFAULT)\n {\n if (! $this->exists()) {\n if (!mkdir($this->getPath(), $mode, true) && !is_dir($this->getPath())) {\n throw new FilesystemException(\n sprintf('Could not create directory \"%s\". Permission denied.', $this->getPath())\n );\n }\n }\n }", "title": "" }, { "docid": "2cec1d22d19e48e9f92cf651aacd17b8", "score": "0.64224195", "text": "protected function createDir()\n {\n\n $name = $_POST['mkdir'];\n $dest_path = FILEMANAGER_WORKSPACE . $this->sanitizePathFragment($_POST['within']) . '/';\n\n if (!is_readable($dest_path) || !is_writeable($dest_path)) {\n return $this->_handleAccessError($dest_path);\n }\n\n if (is_dir($dest_path . $name) || file_exists($dest_path . $name)) {\n return $this->handleGeneralError('directory {$file} already exists', array('file' => $name, 'path' => $dest_path));\n }\n\n try {\n mkdir($dest_path . $name);\n\n return $this->handleSuccess('Directory {$dir} successfully created in {$path}', array(\n 'dir' => $name,\n 'path' => substr($dest_path, strlen(FILEMANAGER_WORKSPACE . '/')),\n 'destination' => $dest_path . $name,\n 'destination_path' => $dest_path,\n 'oo_within' => $_POST['within'],\n 'within' => $this->sanitizePathFragment($_POST['within'])\n )\n );\n } catch (Exception $e) {\n return $this->handleGeneralError('Failed creating Directory {$dir} in {$path}', array(\n 'dir' => $name,\n 'path' => substr($dest_path, strlen(FILEMANAGER_WORKSPACE . '/')),\n 'destination' => $dest_path . $name,\n 'destination_path' => $dest_path\n )\n );\n }\n\n return false;\n }", "title": "" }, { "docid": "82cecd2d47e2f0f50fbb9f679d1f6a0a", "score": "0.6402721", "text": "public function createDirectory($path)\n {\n $this->mkdir($path);\n }", "title": "" }, { "docid": "e85e2a6aec8fb698b5ab138dbb098e2c", "score": "0.63887155", "text": "protected function createDirectories()\n {\n if (!is_dir($directory = path('app/Handlers'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "153292ca1139b7b046eed16af4332ccb", "score": "0.63204414", "text": "protected function createDirectory($path){\n // Build the final path\n $finalPath = $this->getOutputPath() . $path;\n\n // Get the log and file system\n $log = $this->getLog();\n $fs = $this->getFile();\n\n // Check if already exists\n if($fs->exists($finalPath)){\n $log->notice('skipped \"{path}\", folder already exists', ['path' => $finalPath]);\n return;\n }\n\n // Create the directory\n $hasCreated = $fs->makeDirectory($finalPath, self::MODE, true);\n\n // Check if directory was NOT created\n if(!$hasCreated){\n throw new CannotCreateDirectoryException(sprintf('Cannot create directory; %s', $finalPath));\n }\n\n // Finally, log the output\n $log->info('created \"{path}\"', ['path' => $finalPath]);\n }", "title": "" }, { "docid": "aa62b37beaf97b8399c2853f2c99ea77", "score": "0.62943107", "text": "public function createDirIfItDoesNotExist(string $dir) : void;", "title": "" }, { "docid": "5410f6892d1d7f3f9fa402f68a0f8583", "score": "0.62937105", "text": "protected static function _createDir($path)\n {\n if (! file_exists($path)) {\n mkdir($path);\n }\n }", "title": "" }, { "docid": "58a3309fe223ec575a73e7a7ef013352", "score": "0.6275422", "text": "public function createDirs($createDir);", "title": "" }, { "docid": "c72be54692a074fae96a7df2e91e811f", "score": "0.6274879", "text": "final public static function MakeDirectory($pathname, $mode = 0777, $recursive = FALSE, $context = NULL)\n {\n if (!mkdir($pathname, $mode, $recursive, $context))\n {\n throw new Exception('Failed to create folders...');\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "132516c328f92db6cfb06f4257e53675", "score": "0.6274124", "text": "private static function createPath(string $path): void\n {\n if (!is_dir(dirname(dirname($path)))) {\n mkdir(dirname(dirname($path)), 0775, true);\n }\n if (!is_dir(dirname($path))) {\n mkdir(dirname($path), 0775, true);\n }\n }", "title": "" }, { "docid": "2a43914decaf48168c6bd301cc1acc8b", "score": "0.6258674", "text": "public function createDirectory()\n {\n $form = $this->createDirectoryForm();\n $form->bind($this->app['request']);\n\n Browser::setDirectory($form['directory']->getData());\n Browser::setRedirect($form['redirect']->getData());\n Browser::setUsage($form['usage']->getData());\n Browser::setDirectoryStart($form['start']->getData());\n Browser::setDirectoryMode($form['mode']->getData());\n Browser::setCKEditorFuncNum($form['CKEditorFuncNum']->getData());\n\n $create_directory = FRAMEWORK_PATH.$this->getDirectory().$this->app['utils']->sanitizePath($form['create_directory']->getData());\n\n $Filesystem = new Filesystem();\n $Filesystem->mkdir($create_directory);\n\n $this->setMessage($this->app['translator']->trans('<p>The directory <b>%directory%</b> was successfull created.</p>',\n array('%directory%' => substr($create_directory, strlen(FRAMEWORK_PATH)))));\n\n return $this->exec();\n }", "title": "" }, { "docid": "88f5b809820e5ce6157270b03cf5b162", "score": "0.62573737", "text": "function make_child_dir($path)\n\t\t\t{\n\t\t\t\tif (is_dir($path)) return true;\n\n\t\t\t\t// Make sure parent exists\n\t\t\t\t$parent = dirname($path);\n\t\t\t\tif (!is_dir($parent))\n\t\t\t\t{\n\t\t\t\t\tmake_child_dir($parent);\n\t\t\t\t}\n\n\t\t\t\t$created = false;\n\t\t\t\t$old = umask(0);\n\n\t\t\t\t// Try to create new directory with parent directory's permissions\n\t\t\t\t$permissions = substr(sprintf('%o', fileperms($parent)), -4);\n\t\t\t\tif (mkdir($path, octdec($permissions), true))\n\t\t\t\t{\n\t\t\t\t\t$created = true;\n\t\t\t\t}\n\t\t\t\t// If above doesn't work, chmod to 777 and try again\n\t\t\t\telse if (\t$permissions == '0755' &&\n\t\t\t\t\t\t\tchmod($parent, 0777) &&\n\t\t\t\t\t\t\tmkdir($path, 0777, true)\n\t\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$created = true;\n\t\t\t\t}\n\t\t\t\tumask($old);\n\t\t\t\treturn $created;\n\t\t\t}", "title": "" }, { "docid": "5511abd164a8970df58a1fdd2a03400c", "score": "0.6237468", "text": "protected function makeDir($path) {\n\t\tif(!static::folderExists($path)) {\n\t\t// the directory didn't already exist\n\t\t\t// get a copy of the current umask value\n\t\t\t$old_umask = umask(0);\n\t\t\t// make the directory with 0777 (rwx) attribute permissions\n\t\t\tmkdir($path, static::CHMOD_RWX);\n\t\t\t// reset the umask back to the original value\n\t\t\tumask($old_umask);\n\t\t} else {\n\t\t// the directory already exists\n\t\t\tthrow FileSystemException::withMakeDirFailed($path);\n\t\t}\n\t}", "title": "" }, { "docid": "2261b63c76bf2390b87af1908b9a9c62", "score": "0.6236543", "text": "function createDirectory($name){\n\t\tif (empty($name))\n\t\t\treturn False;\n\t\treturn mkdir(PROJECT_BASE_DIR.'/'.REPOSITORY_DIR.'/'.$name, 0777); // 0777 o 0700\n\t}", "title": "" }, { "docid": "6451fe018c83c7eafa3cb100eea50136", "score": "0.6231659", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('app/Controllers'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "c65e16b9e986e5b14e245298e1035b7b", "score": "0.6230234", "text": "public static function makeDir($path, $is_directory = false)\n {\n $path = $is_directory ? $path : dirname($path);\n if (!file_exists($path)) {\n $parent_path = $path;\n while (!file_exists($parent_path)) {\n $parent_path = dirname($parent_path);\n }\n\n mkdir($path, fileperms($parent_path), true);\n }\n }", "title": "" }, { "docid": "f7ed16249245a97ce49fb25c9f46549c", "score": "0.62280375", "text": "function mk_dir($path) {\n if(is_dir($path)) {\n return true;\n }\n if(is_dir(dirname($path))) {\n return mkdir($path);\n }\n\n //父目录不存在\n mk_dir(dirname($path));\n return mkdir($path);\n\n }", "title": "" }, { "docid": "fcbe6c50e225e211c967192980170b3d", "score": "0.62258387", "text": "private function createLockDirectory()\n {\n $this->removeLockDirectory();\n (new Filesystem())->mkdir($this->getLockDirectory());\n }", "title": "" }, { "docid": "db5c9ade8829cc6a1431ebe6f14ebaf1", "score": "0.6210866", "text": "public function create_dir() {\n\t\t// Bail if no specific base dir is set.\n\t\tif ( empty( $this->base_dir ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if upload path already exists.\n\t\tif ( ! is_dir( $this->upload_path ) ) {\n\n\t\t\t// If path does not exist, attempt to create it.\n\t\t\tif ( ! wp_mkdir_p( $this->upload_path ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Directory exists.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8e57c6eec2b1bb48daa8f05a5fb2e35b", "score": "0.6208124", "text": "private function createBaseDir() : void\n {\n if (!$this->filesystem->exists($this->basePath)) {\n $this->filesystem->mkdir($this->basePath);\n }\n }", "title": "" }, { "docid": "6141fdd25a8279c3a7119068aad1cbff", "score": "0.6203969", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('resources/views/layouts'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n\r\n if (!is_dir($directory = path('resources/views/auth/passwords'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "2dda57593ef6075ff3060affeea4d4e3", "score": "0.6201663", "text": "public function create_dir( $dirname ) \r\n {\r\n $status = 1;\r\n $ret = ftp_mkdir( $this->connection, $dirname );\r\n\r\n if ( !$ret ) \r\n {\r\n $status = 0;\r\n $this->add_message( $this->ERROR[\"5\"] );\r\n }\r\n\r\n return $this->return_value( $status );\r\n }", "title": "" }, { "docid": "9c2e56b4371e3a71a38b5223d7e74662", "score": "0.61881226", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('app/Providers'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "ab036b11c446aa2c337f7ef305339018", "score": "0.61817735", "text": "protected function ensureDirectoriesExist()\n {\n if (! is_dir($directory = $this->getViewPath('auth/passwords'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = $this->getViewPath('content'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = $this->getViewPath('layouts'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = $this->getViewPath('panels'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "6776564f25d974f3ddf040943b5d4e9a", "score": "0.6177323", "text": "public static function createDirectory($dir_name, $dir_mode=NULL, $createIndex=false)\n\t\t{\n if (!$dir_mode)\n {\n $dir_mode = CAT_Registry::exists('OCTAL_DIR_MODE')\n ? CAT_Registry::get('OCTAL_DIR_MODE')\n : (int) octdec(self::defaultDirMode());\n }\n $dir_name = self::sanitizePath($dir_name);\n\t\t if($dir_name != '' && !is_dir($dir_name))\n\t\t {\n\t\t $umask = umask(0);\n\t\t mkdir($dir_name, $dir_mode, true);\n\t\t umask($umask);\n\t\t if ( $createIndex )\n\t\t {\n\t\t\t self::recursiveCreateIndex( $dir_name );\n\t\t }\n\t\t return true;\n\t\t }\n\t\t return false;\n\t\t }", "title": "" }, { "docid": "2ed17b46da3de8bcf2c6a673f6a46038", "score": "0.61756146", "text": "public function createDirectory($path) {\n\n $this->subject->createDirectory($path);\n\n }", "title": "" }, { "docid": "78a057bac64e67cc700a2dae1c5c4371", "score": "0.6155157", "text": "public function createDirectory($path) {\n try {\n if (trim($path) != \"\") {\n $arr_path = explode(\"/\", $path);\n $folder = '';\n for ($i = 0; $i < count($arr_path); $i++) {\n if ($i == 0)\n $concat = \"\";\n else\n $concat = \"/\";\n $folder .= $concat . $arr_path[$i];\n if ($arr_path[$i] != \"\" && !is_dir($folder)) {\n mkdir($folder, 0777);\n }\n }\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "c6a5690e0060f576d81296ba827aea59", "score": "0.613172", "text": "public function createDirectories()\r\n\t{\r\n\t\t$path='';\r\n\t\t$directories=explode('/',trim($this->_imagePath,'/'));\r\n\t\tforeach($directories as $directory)\r\n\t\t{\r\n\t\t\tif(empty($path))\r\n\t\t\t\t$path=$this->_basePath;\r\n\r\n\t\t\t$path.='/'.$directory;\r\n\t\t\tif(!file_exists($path))\r\n\t\t\t\tmkdir($path);\r\n\t\t}\r\n\r\n\t\t$versionPath=$path.'/versions';\r\n\t\tif(!file_exists($versionPath))\r\n\t\t\tmkdir($versionPath);\r\n\t}", "title": "" }, { "docid": "6c02fe8abf99eb31ca64f835d9bdd111", "score": "0.61081403", "text": "public function createFileDir()\n {\n\n $filePath = oxRegistry::getConfig()->getConfigParam(tc_cleverreach_config::SETTING_EXPORT_PATH);\n $filePath = getShopBasePath() . $filePath;\n\n @mkdir($filePath);\n $msg = oxRegistry::getLang()->translateString('TC_CLEVERREACH_ERROR_NO_PATH2') . ': ' . $filePath;\n if (file_exists($filePath) === false) {\n throw new tc_cleverreach_exception($msg);\n }\n }", "title": "" }, { "docid": "af0fe3a3c0f3f9a00553f4abe48de589", "score": "0.6096003", "text": "protected function createDirectory($path)\r\n {\r\n if (!$this->files->isDirectory(dirname($path))) {\r\n $this->files->makeDirectory(dirname($path), 0777, true, true);\r\n }\r\n }", "title": "" }, { "docid": "c50448999fdba13b5e3fe936e98c492a", "score": "0.60853523", "text": "public function createDir($path)\n {\n $dir = dirname($path);\n \n if (!file_exists($dir))\n {\n mkdir($dir, 0777, true);\n }\n }", "title": "" }, { "docid": "c26bc0d5fd198fc1da9b3aea8d428512", "score": "0.60778713", "text": "function make_directory($dir, $mode=0777)\n{\n\t$parent_dir = dirname($dir);\n\n\tif (!file_exists($parent_dir)) {\n\t\tmake_directory($parent_dir, $mode);\n\t}\n\n\tmkdir($dir);\n\tchmod($dir, $mode);\n}", "title": "" }, { "docid": "c96d7d404ab10c3439c63f03cdf8185e", "score": "0.6074227", "text": "public function createDirectory(Directory $where, array $names, $user = null, $group = null, int $mode = null): Directory\n {\n $uid = $this->getUserId($user);\n $gid = $this->getGroupId($group);\n\n $dir = new Directory(self::finalName($names), $uid, $gid, $mode);\n\n return $this->createTree($where, $dir, self::parentNames($names), $uid, $gid, $mode);\n }", "title": "" }, { "docid": "a392b9212492660e6c4b5f3278c286d3", "score": "0.60704595", "text": "protected function createDirectories()\n {\n if (!is_dir($directory = path('app/Events'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "387f0ac631b9c671f8f75af46a5cc029", "score": "0.6063512", "text": "private function createDirectories()\n {\n if (strlen($this->lockup['directories']) > 0 && !file_exists(APPPATH . $this->type . 's/' . $this->lockup['directories'])) {\n return mkdir(APPPATH . $this->type . 's/' . $this->lockup['directories'], 0777, true);\n }\n\n return true;\n }", "title": "" }, { "docid": "026974fac4b9cf17449c990a4f4f9e64", "score": "0.6028971", "text": "protected abstract function createTargetDir();", "title": "" }, { "docid": "cdc4268693a165f34b872e9160b10eea", "score": "0.60219496", "text": "public function mkdir($mode = 0755) {\n if (self::$fs->checkAccess(new File($this->path), true) !== true) {\n throw new IOException(\"No write access to \" . $this->getPath()->toNative());\n }\n return self::$fs->createDirectory($this, $mode);\n }", "title": "" }, { "docid": "2330628c044b03a020406c4963afb3fb", "score": "0.6007456", "text": "public static function make_dir($path) {\n\t\tif( File::isDirectory($path) == false ) {\n\t\t\tFile::makeDirectory($path, 0777, true);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fd89e9aa43252b5a5c08f868a2e53b76", "score": "0.6006338", "text": "protected function createDirectories()\n {\n \t/*\n\t\t * View directories\n\t\t */ \n if (! is_dir($directory = resource_path('views/layouts'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = resource_path('views/logged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/unlogged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/auth'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/auth/passwords'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail/html'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail/markdown'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/notifications'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Translations directories\n\t\t */ \n \tif (! is_dir($directory = resource_path('lang/fr'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Controllers directories\n\t\t */\n\t\tif (! is_dir($directory = app_path('Http/Controllers/Auth'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = app_path('Http/Controllers/Logged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = app_path('Http/Controllers/UnLogged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Notifications directories\n\t\t */\n\t\tif (! is_dir($directory = app_path('Notifications'))) {\n \tmkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "a7ffe60dc0bfacc0c152d88b13a17e6d", "score": "0.60005325", "text": "function createPath($path) {\n if (is_dir($path)) return true;\n $prev_path = substr($path, 0, strrpos($path, '/', -2) + 1 );\n $return = createPath($prev_path);\n\t\n return ($return && is_writable($prev_path)) ? mkdir($path) : false;\n}", "title": "" }, { "docid": "872ab4836498931e5f2b967da9e95d51", "score": "0.59976697", "text": "function directory_create($path, $mode = 0777) {\n if ( ! directory_exists($path)) {\n return mkdir($path, $mode, true);\n }\n\n return true;\n }", "title": "" }, { "docid": "e59bf9c24de0fffba02990bee761881f", "score": "0.59691536", "text": "private function makeDirectory(string $path)\n {\n if (File::exists($path)) {\n return;\n }\n\n File::makeDirectory($path);\n }", "title": "" }, { "docid": "2095108694263c8e6743d4d994a2538d", "score": "0.5964624", "text": "protected function mkdir($path) {\n $dir = dirname($path);\n if (!is_dir($dir) && !mkdir($dir, 0777, true))\n throw new Exception(\"Failed to create directory $dir\");\n }", "title": "" }, { "docid": "bb72556476305c8a1215a124e6eb522a", "score": "0.5961457", "text": "function createDir($path){\n\t//base case\n\tif (is_dir($path)){\n\t\treturn;\n\t} else {\n\t\tpreg_match('/(.*)[\\/\\\\\\\\]([^\\\\\\\\\\/]+)\\/?$/', $path, $matches);\n\t\tcreateDir($matches[1]);\n\t\t//make directory if it's not a filename.\n\t\tif (preg_match('/(.*)\\.[\\w]+$/', $matches[2])===0) {\n\t\t\tmkdir($matches[0], 0700);\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "1c85ed5df045fad443892473c2cd2d33", "score": "0.5960087", "text": "private function ensureDirectoryExists(string $dirname)\n {\n return Directory::new($dirname)->create();\n }", "title": "" }, { "docid": "e45dfb8ba0daea07df7e0754cfffdbc9", "score": "0.5958822", "text": "public function mkDir($path)\n {\n $path = $this->getBasePath() . DIRECTORY_SEPARATOR . $path;\n return file_exists($path) ? false : mkdir($path);\n }", "title": "" }, { "docid": "dfcc84a315a6f3912d319433735dc5c8", "score": "0.59487605", "text": "protected function _createDir($absPath) {\n if(!is_dir($absPath)) {\n $made = @mkdir($absPath, $this->_dirMode, true);\n if (!$made || !is_readable($absPath)) {\n throw new Scalar_Storage_Exception(\"Error making directory: $absPath\");\n }\n }\n }", "title": "" }, { "docid": "fae1c906635ddac17aca5b39c7838552", "score": "0.594685", "text": "public function createDirectory($parents = false)\n\t{\n\t\t$this->pathname->rootAdapter()->createDirectory($this->pathname, $parents);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "11ae61723b265860036f37aa85ca9e15", "score": "0.59356016", "text": "public function mkdir($dirname)\n {\n $name = $this->path . '/' . $dirname;\n $create = Storage::cloud()->makeDirectory($this->path . '/' . $dirname);\n\n $directory = new DirectoryHandler();\n $directory->path = $name;\n\n return $directory;\n }", "title": "" }, { "docid": "af8ee81d1a934cad5dcd2caf9c55bd39", "score": "0.59314644", "text": "function createDir($dirPath)\n{\n if (!is_dir($dirPath)) {\n if (!mkdir($dirPath, 0777)) {\n throw new Exception(msgFailureCreate($dirPath));\n }\n }\n}", "title": "" }, { "docid": "f1dc3f678136c79aff507f27db671fc7", "score": "0.5927053", "text": "protected function makeDirectory()\n {\n $dir = dirname($this->final_path);\n if (! $this->files->isDirectory($dir)) {\n $this->files->makeDirectory($dir, 0777, true, true);\n }\n\n return $dir;\n }", "title": "" }, { "docid": "536d1b8ac90b877da5509612bcee1b3d", "score": "0.5916346", "text": "protected function makeDirectory()\n {\n $path = $this->getFilePath();\n\n if (!$this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n return $path;\n }", "title": "" }, { "docid": "177fb5c0058f275642dafb5342161b83", "score": "0.5911285", "text": "public function createDirectoryRecursively(string $path, int $mode = 0777): Promise;", "title": "" }, { "docid": "f2049c0d7303c8a475102adffef7eb8b", "score": "0.58943874", "text": "private function generateDirectory()\n {\n $this->storePath = api_get_path(SYS_COURSE_PATH) . $this->course['path'] . '/exercises/';\n\n if (!is_dir($this->storePath)) {\n mkdir($this->storePath);\n }\n\n if (!is_dir($this->storePath . $this->sessionId)) {\n mkdir($this->storePath . $this->sessionId);\n }\n\n if (!empty($this->exerciseId) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId);\n }\n\n if (!empty($this->id) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id);\n }\n\n if (!empty($this->userId) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id . '/' . $this->userId)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id . '/' . $this->userId);\n }\n\n $params = [\n $this->sessionId,\n $this->exerciseId,\n $this->id,\n $this->userId,\n ];\n\n $this->storePath .= implode('/', $params).'/';\n\n return $this->storePath;\n }", "title": "" }, { "docid": "5959b9cf1981f8b5cd092ef43a2462f3", "score": "0.58836436", "text": "protected function _mkdir($path, $name) {\n\t\t$path = $this->_normpath($path.'/'.$name);\n\t\ttry {\n\t\t\t$this->dropbox->createFolder($path);\n\t\t} catch (Dropbox_Exception $e) {\n\t\t\t$this->deltaCheck();\n\t\t\tif ($this->dir($this->encode($path))) {\n\t\t\t\treturn $path;\n\t\t\t}\n\t\t\treturn $this->setError('Dropbox error: '.$e->getMessage());\n\t\t}\n\t\t$this->deltaCheck();\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "66f315c0be73be8ebdfa07f7eeaa741d", "score": "0.5880875", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('database/migrations'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "72815a2e82106eac92da771ba7236f80", "score": "0.58615965", "text": "protected function ensureDirectoriesExist()\n {\n if (! is_dir($directory = $this->getViewPath('layouts'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = $this->getViewPath('includes'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "7c865c72b82f54959e295242f3377683", "score": "0.5853968", "text": "private function makeDirectory()\n {\n $config = Config::getInstance();\n \n $dir = '../' . $config->get('upload_dir') . '/users/' . $this->value;\n \n if ( is_dir( $dir ) ) {\n return true;\n }\n \n if ( mkdir( $dir, 0757 ) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ea3ad70e9beb76ae05e7090be93f6257", "score": "0.5853336", "text": "public function createDir($dirname) {\r\n $path = USER_ROOT_DIR . $dirname;\r\n if (!file_exists($path)) {\r\n //echo \"Creating folder '$dirname' at \" . $path;\r\n mkdir($path, 0777);\r\n if (file_exists($path)) {\r\n //echo \"Directory '$dirname' created\";\r\n return true;\r\n } else {\r\n //echo \"Error creating directory '$dirname'\";\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "5b455e087739709f2eee62b547edf1c3", "score": "0.58491427", "text": "public function createDirectory(string $dirname, array $config = []): bool;", "title": "" }, { "docid": "8134ef81ee07693ed3a135521e1ffe59", "score": "0.58434534", "text": "public function createFolderPath($path)\r\n {\r\n if( ! file_exists(dirname($path)) ) {\r\n mkdir(dirname($path), $this->options['default_new_folder_permissions'], true);\r\n } else {\r\n }\r\n }", "title": "" }, { "docid": "109539779206a3fd796769185bbf30bd", "score": "0.5834667", "text": "protected function makeDirectory($path)\n {\n if (!$this->filesystem->isDirectory(dirname($path))) {\n $this->filesystem->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "title": "" }, { "docid": "d824c17aa037269da1e59106370dba4f", "score": "0.5830267", "text": "public function createDirectory(DirectoryInterface $directory, DirectoryInterface $parent): DirectoryInterface\n {\n $parentPath = $parent->getPath() . '/' . $parent->getName();\n $path = $parentPath . '/' . $directory->getName();\n\n $this->adapter->makeDirectory($path);\n\n $directory->setPath($parentPath);\n\n return $directory;\n }", "title": "" }, { "docid": "2adde7cf9e9289feea038f3346392fad", "score": "0.5809119", "text": "public function mkdir($path , $mode , $options);", "title": "" }, { "docid": "5816cb708be3acabf99043d2421123ea", "score": "0.5803526", "text": "public function createDir(string $path): bool;", "title": "" }, { "docid": "227e6b08c67c9d16d42d8232c18a2248", "score": "0.5802493", "text": "protected function makeDirectory($path)\n {\n if (!$this->files->exists($path)) {\n $this->files->makeDirectory($path, 0777, true, true);\n }\n }", "title": "" }, { "docid": "11364fee3f4ec289404dd8b36d463690", "score": "0.57790196", "text": "function create_dir($dir_name) {\n if (!is_dir($dir_name)) {\n mkdir($dir_name);\n echo \"dir created..\";\n }\n }", "title": "" }, { "docid": "5d1ce5f38cb4401fe7ad97d276146b99", "score": "0.57639265", "text": "public function createFolder(string $name): self;", "title": "" }, { "docid": "45bd1b5bbf89e9de14244e7c26f6b73a", "score": "0.5758234", "text": "public function mkdir($dirName, $permissions = 0755);", "title": "" }, { "docid": "4d60e19e0eb25f111aede7b4189d0f29", "score": "0.5749601", "text": "private function prepareDirectories() {\n\n\t\tif (file_exists($this->settings['location'])) {\n\n\t\t\t$this->rmtree($this->settings['location']);\n\n\t\t}\n\n\t\tmkdir($this->settings['location']);\n\n\t\tmkdir($this->settings['location'] . '/' . $this->settings['jsDirectory']);\n\n\t\tmkdir($this->settings['location'] . '/' . $this->settings['cssDirectory']);\n\n\t\tmkdir($this->settings['location'] . '/' . $this->settings['fontsDirectory']);\n\n\t\tmkdir($this->settings['location'] . '/' . $this->settings['flashDirectory']);\n\n\t\tmkdir($this->settings['location'] . '/' . $this->settings['imgDirectory']);\n\n\t}", "title": "" }, { "docid": "bbaf5ce01114a178a543f0c385f8bef3", "score": "0.574344", "text": "private function _create_build_directory()\n\t{\n\t\t// initialize variables\n\t\t$dir \t\t\t= $this->_build_dir;\n\n\t\t// see if directory exists\n\t\tif ( ! is_dir($dir)):\n\n\t\t\t// dir does not exist, create it\n\t\t\tif ( ! mkdir($dir)):\n\t\t\t\treturn $this->create('Failed creating directory: '.$this->_build_name);\t// return error\n\t\t\tendif;\n\n\t\telse:\t// this means the directory already exists - store current files into versioning folder\n\n\t\t\t// initialize variables\n\t\t\t$archive \t= $this->_archive_dir.$this->_build_name.'/';\n\n\t\t\t// see if this build already has an archive directory\n\t\t\tif( ! is_dir($archive)):\n\t\t\t\t// dir does not exist, create it\n\t\t\t\tif ( ! mkdir($archive)):\n\t\t\t\t\treturn $this->create('Failed creating directory: archive/'.$this->_build_name);\t// return error\n\t\t\t\tendif;\t\t\t\t\n\t\t\tendif;\n\n\t\t\t// new archive version directory name\n\t\t\t$archive \t= $archive.strtotime(date('Y-m-d H:i:s')).'/';\n\n\t\t\t// create new version folder within /archives directory\n\t\t\tmkdir($archive);\n\n\t\t\t// move all files from current build directory into archive\n\t\t\t$this->_move_all_files($dir,$archive);\n\n\t\tendif;\t// end seeing if directory exists\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "4620f41d06531eb1f2a185aa5b0ae768", "score": "0.5734576", "text": "public static function create(): Directory\n {\n $name = self::faker()->words(self::faker()->numberBetween(4, 5), true);\n\n return (new Directory())\n ->setName($name)\n ->setCreatedTime(self::faker()->dateTime)\n ->setPath('./testing-tmp');\n }", "title": "" }, { "docid": "8c627c7f568b3b75d0510c41e2fdfa67", "score": "0.5724791", "text": "public function createDirectory($name, $path)\n {\n if (!preg_match(self::DIRECTORY_NAME_REGEXP, $name)) {\n Mage::throwException(Mage::helper('cms')->__('Invalid folder name. Please, use alphanumeric characters, underscores and dashes.'));\n }\n if (!is_dir($path) || !is_writable($path)) {\n $path = $this->getHelper()->getStorageRoot();\n }\n\n $newPath = $path . DS . $name;\n\n if (file_exists($newPath)) {\n Mage::throwException(Mage::helper('cms')->__('A directory with the same name already exists. Please try another folder name.'));\n }\n\n $io = new Varien_Io_File();\n if ($io->mkdir($newPath)) {\n if (Mage::helper('core/file_storage_database')->checkDbUsage()) {\n $relativePath = Mage::helper('core/file_storage_database')->getMediaRelativePath($newPath);\n Mage::getModel('core/file_storage_directory_database')->createRecursive($relativePath);\n }\n\n $result = array(\n 'name' => $name,\n 'short_name' => $this->getHelper()->getShortFilename($name),\n 'path' => $newPath,\n 'id' => $this->getHelper()->convertPathToId($newPath)\n );\n return $result;\n }\n Mage::throwException(Mage::helper('cms')->__('Cannot create new directory.'));\n }", "title": "" }, { "docid": "81c88012c5e9ad75683e1019bd195a01", "score": "0.5721326", "text": "function create_dir($user_dir, $jenis){\n\t\t$dir = $_POST['new_dir'];\n\t\t$location = \"siak_public/siak_upload/\".$user_dir.\"/\".$jenis;\n\t\tif (is_dir($location) == false) {\n\t\t $old_umask = umask(0);\n\t\t mkdir($location, 0755, true);\n\t\t umask($old_umask);\n\t\t if (is_dir($location.\"/\".$dir) == false) {\n\t\t\t$old_umask = umask(0);\n\t\t\tmkdir($location.\"/\".$dir, 0755, true);\n\t\t\tumask($old_umask);\n\t\t }\n\t\t}else{\n\t\t if (is_dir($location.\"/\".$dir) == false) {\n\t\t\t$old_umask = umask(0);\n\t\t\tmkdir($location.\"/\".$dir, 0755, true);\n\t\t\tumask($old_umask);\n\t\t }\n\t\t}\n\t}", "title": "" }, { "docid": "d68327efbff700cd86461f2fd6298fca", "score": "0.57189226", "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": "c376a4a355c74ca4a7d2969ce3baec77", "score": "0.57138526", "text": "public function createDir($dirname, Config $config)\n {\n }", "title": "" }, { "docid": "282b1e4b5e0e0c99a8f2da1ebd22a52c", "score": "0.5712423", "text": "private function makeTmpDir()\n {\n $tmpDir = $this->getTempDir();\n\n // Directory already exists, return true\n if (is_dir($tmpDir)) {\n return true;\n }\n\n // dir doesn't exist, make it\n return mkdir($tmpDir);\n }", "title": "" }, { "docid": "ce2aad720593d8c19ab39ff311d17322", "score": "0.57112783", "text": "public function createDirectories()\n {\n foreach (config('webserver', []) as $key => $params) {\n $path = array_get($params, 'path');\n\n if ($path && ! File::isDirectory($path)) {\n File::makeDirectory($path, 0755, true);\n }\n }\n }", "title": "" }, { "docid": "cb856cfc3a74c116a6964d59ae691cab", "score": "0.5695864", "text": "public static function createDir( $dirName, $mode = self::FILE_DEFAULT_DIRECTORY_CREATION_MODE, $recursive = true )\n {\n \n // realpath( $dirName )\n \n if( self::exists( $dirName ) ) {\n return true;\n }\n\n if( substr($dirName, strlen($dirName)-1) == \"/\" ) {\n $dirName = substr($dirName, 0,strlen($dirName)-1);\n }\n\n if( $recursive ) {\n // for example, we will create dir \"/a/b/c\"\n // $firstPart = \"/a/b\"\n $firstPart = substr( $dirName,0,strrpos($dirName, \"/\") );\n\n if(file_exists($firstPart)) {\n if( !@mkdir($dirName,$mode) ) {\n return false;\n }\n @chmod( $dirName, $mode );\n }\n else {\n self::createDir( $firstPart, $mode, $recursive );\n if( !@mkdir($dirName,$mode) ) {\n return false;\n }\n @chmod( $dirName, $mode );\n }\n }\n else {\n if( @mkdir( $dirName )) {\n @chmod( $dirName, $mode );\n return( true );\n }\n else {\n return( false );\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "6e459d312b7b0000acaf17d66a71e884", "score": "0.5690677", "text": "public function testCreatingDirectory(): void {\r\n\r\n $this -> assertFalse($this -> directory -> isReadable());\r\n $this -> assertFalse($this -> directory -> isWritable());\r\n $this -> assertFalse($this -> directory -> exists());\r\n\r\n $this -> directory -> create();\r\n $this -> directory -> setOwner('administrator');\r\n $this -> directory -> setGroupId(1000);\r\n\r\n $this -> assertTrue($this -> directory -> isReadable());\r\n $this -> assertTrue($this -> directory -> isWritable());\r\n $this -> assertTrue($this -> directory -> exists());\r\n\r\n $this -> directory -> delete();\r\n }", "title": "" }, { "docid": "7ce1440e5df9e1f89c7280e031aceba5", "score": "0.568876", "text": "public function mkdir($pathname, $mode = 777){\r\n mkdir($pathname, $mode, true);\r\n }", "title": "" }, { "docid": "e87cac7d7bcaf4e33b14825e4f5719de", "score": "0.56858414", "text": "protected function makeDirectory($path)\n {\n if (!$this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "title": "" }, { "docid": "bcb5c81dbdd288034af60e03d9ae7c1f", "score": "0.56795233", "text": "protected function prepareDirectory($path) {\n $this->fileSystem->prepareDirectory($path, FileSystemInterface::CREATE_DIRECTORY);\n }", "title": "" }, { "docid": "fbeff316a24f650d34561d22751b06be", "score": "0.5672184", "text": "function mkdir_p($target)\n{\n if (is_dir($target) || empty ($target)) {\n return 1; // best case check first\n }\n if (file_exists($target) && !is_dir($target)) {\n return 0;\n }\n if (mkdir_p(substr($target, 0, strrpos($target, '/')))) {\n return mkdir($target); // crawl back up & create dir tree\n }\n return 0;\n}", "title": "" }, { "docid": "7ae2d9700a378696256d10341dcda87c", "score": "0.56685543", "text": "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0777, true, true);\n if($this->option('database')):\n $this->files->makeDirectory($path.\"/Database\", 0777, true, true);\n endif;\n $this->files->makeDirectory($path.\"/Controllers\", 0777, true, true);\n $this->files->makeDirectory($path.\"/Models\", 0777, true, true);\n $this->files->makeDirectory($path.\"/Views\", 0777, true, true);\n }\n }", "title": "" }, { "docid": "fe04481e4d5ec8654964cfd9f387085a", "score": "0.5667391", "text": "private function createFolder()\n\t{\n\t\t// Check if the log folder exists, create it if not.\n\t\tif (!is_dir($this->currentLogFolder)) {\n\t\t\t$old = umask(0777);\n\t\t\tif (!mkdir($this->currentLogFolder)) {\n\t\t\t\tthrow new \\LoggerException('Unable to create log file folder ' . $this->currentLogFolder);\n\t\t\t}\n\t\t\tchmod($this->currentLogFolder, 0777);\n\t\t\tumask($old);\n\t\t}\n\t}", "title": "" }, { "docid": "1ff641e4b9b24fc5b9368239f4b78875", "score": "0.5663771", "text": "private function nDirectory($path = ''){\n $path = $path ? DIRECTORY_SEPARATOR.$path : '';\n if(!is_dir($this->_FilePath.$path)){\n mkdir($this->_FilePath.$path,0755,true);\n }\n\n// if(!is_dir($this->_FilePath)){\n// mkdir($this->_FilePath,0755);\n// }\n// if($path && !is_dir($this->_FilePath.$path)){\n// mkdir($this->_FilePath.$path,0755);\n// }\n }", "title": "" }, { "docid": "944dedca4b8a13b4b0d8f556f8713297", "score": "0.5648326", "text": "function ensureDirExists($path, $owner = null, $mode = 0755)\n {\n if (! $this->isDir($path)) {\n $this->mkdir($path, $owner, $mode);\n }\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "230849e4782f70b2cf3f21f98b601ebc", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth:api');\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "5412f0b9b053fcd0929c40d71994403a", "score": "0.69773793", "text": "public function index()\n {\n try {\n $resources = Resource::all();\n return $this->showAll($resources);\n } catch (Exception $ex) {\n return $this->errorResponse(\"Danh sách trống!\", Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "cbc2f6f0039706d1ede6b809aad8c23e", "score": "0.6894162", "text": "public function index()\n\t{\n\t\t//\n\t\t$this->getlist();\n\t\n\t}", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "efde97fbf9254ea0e2b2b7023e05101a", "score": "0.68546814", "text": "public function indexAction()\n {\n\t\tif(!Engine_Api::_()->core()->hasSubject('list_listing')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET LISTING SUBJECT\n\t\t$subject = Engine_Api::_()->core()->getSubject();\n\n\t\t//GET VARIOUS WIDGET SETTINGS\n\t\t$this->view->statisticsRating = (int) Engine_Api::_()->getApi('settings', 'core')->getSetting('list.rating', 1);\n\t\t$this->view->truncation = $this->_getParam('truncation', 23);\n\t\t$related = $this->_getParam('related', 'categories');\n\n\t\t$params = array();\n\n\t\tIf($related == 'tags') {\n\n\t\t\t//GET TAGS\n\t\t\t$listingTags = $subject->tags()->getTagMaps();\n\n\t\t\t$params['tags'] = array();\n\t\t\tforeach ($listingTags as $tag) {\n\t\t\t\t$params['tags'][] = $tag->getTag()->tag_id;\n\t\t\t}\n\n\t\t\tif(empty($params['tags'])) {\n\t\t\t\treturn $this->setNoRender();\n\t\t\t}\n\n\t\t}\n\t\telseif($related == 'categories') {\n\t\t\t$params['category_id'] = $subject->category_id;\n\t\t}\n\t\telse {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n //FETCH LISTINGS\n\t\t$params['listing_id'] = $subject->listing_id;\n $params['orderby'] ='RAND()';\n $params['limit'] = $this->_getParam('itemCount', 3);\n $this->view->paginator = Engine_Api::_()->getDbtable('listings', 'list')->widgetListingsData($params);\n\n if (Count($this->view->paginator) <= 0) {\n return $this->setNoRender();\n }\n }", "title": "" }, { "docid": "248744b37e08a9b9e31438a427fee7ee", "score": "0.68331116", "text": "public function index()\n {\n $module = Module::get('Resources');\n \n if(Module::hasAccess($module->id)) {\n return View('la.resources.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => Module::getListingColumns('Resources'),\n 'module' => $module\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "954a21a94c60b4569f28c882641e7298", "score": "0.68295634", "text": "public function index()\n {\n return view('admin.resources.index', [\n 'resources' => Resource::published()->get()\n ]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "b27b06ba87e23efaf02018ba6a48d4b4", "score": "0.68071634", "text": "public function index()\n {\n /// Get cars\n $cars = Car::paginate();\n\n // Return collection of articles as a resource\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "ecd287988f4b7da6fd1ee3a4ce0dbbb4", "score": "0.6772568", "text": "public function index()\n {\n $tickets = TicketsModel::paginate(10);\n\n //passing data to resource\n return TicketsResource::collection($tickets);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "465ee43697fce30b312a8f52108bb059", "score": "0.6708992", "text": "public function listAction ( )\n {\n $model = $this->getModel('Scale');\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "5370c2b221a0c31116fb4369ab9f4812", "score": "0.66993403", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new ProfileRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page');\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['profile/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "cd9c5c4bfebd4034e9aab606b543d95a", "score": "0.66892284", "text": "public function index()\n {\n $todos = Todo::paginate(50);\n return TodosResource::collection($todos);\n }", "title": "" }, { "docid": "5509d28122c561e86197cbcc735e8008", "score": "0.6688171", "text": "public function index()\n {\n $products = Product::filter()->paginate();\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "712af5c8b3ebcbb93ccacf71c37b0d64", "score": "0.66876715", "text": "public function index()\n {\n return ResourceResource::collection(auth()->user()->resources);\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "4749d27d60b7528b95f66725757fb6f5", "score": "0.66763073", "text": "public function listAction()\n {\n $tags = $this->getTags();\n $this->view->assign('tags', $tags);\n }", "title": "" }, { "docid": "148383f68d3328f7ff820d3aa26f22ff", "score": "0.6669373", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$this->_view->itemsStatusCount \t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$status \t\t\t\t\t\t\t= $this->_arrParam['status'] ?? 'all';\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[$status], $this->_pagination);\n\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->slbCategory \t\t\t\t= [0 => ' - Select Category - '] + $this->_model->itemInSelectbox($this->_arrParam, null);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "0e3a54a39646333a6d375a7c945db124", "score": "0.6655571", "text": "public function listAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $films = $em->getRepository(Film::class)\n ->findAll();\n return $this->render('admin/listFilm.html.twig', [\n 'films' => $films,\n 'user' => $user\n ]);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "2564823d78cf46605ebc641dd521408d", "score": "0.6619503", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStage:list.html.twig');\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "ffa4ab9d8165639a117e4bc3980fc30d", "score": "0.6590207", "text": "public function index()\n {\n //\n // $authors= Author::all();\n $authors = QueryBuilder::for(Author::class)->allowedSorts([\n 'name',\n 'created_at'\n ])->jsonPaginate();\n return AuthorsResource::collection($authors);\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "74d4617df84723cff26f33e255390482", "score": "0.65881836", "text": "public function actionIndex()\n {\n $items = ModelGeneral::showItems();\n\n $this->view->render('index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "0221833762d40c420a048045edcecf8f", "score": "0.6586874", "text": "public function actionList()\n {\n $searchModel = new RecipeRepository();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render([\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "fb55b34f40f8931a10a91283716c2912", "score": "0.6586714", "text": "public function index()\n {\n return ListItem::all();\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.6585575", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "7056dcfc0479ee6a004c692cbdce673b", "score": "0.65567315", "text": "public function index()\n {\n $operations = $this->Operations->getAllOperations();\n $this->set(compact('operations'));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "8ffe23111661c679bede8757d6ebad59", "score": "0.65496445", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->role_model->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "901678e4ca1d10119628a2768429725f", "score": "0.65128183", "text": "public function index()\n {\n return AlbumResource::collection(\\App\\Album::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "ff30a4ae8d49f1706d1dbd328394a294", "score": "0.6493153", "text": "public function index()\n {\n $brands = Brand::query()->paginate();\n return BrandResource::collection($brands);\n }", "title": "" }, { "docid": "629569270186c168f2f698db8154b51a", "score": "0.6487244", "text": "public function index()\n {\n $articles = Article::query()->latest()->paginate(10);\n\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "25aaedcb3f8fbe36cdc02986a86cf453", "score": "0.64846873", "text": "public function index()\n {\n // Get Specifications\n $specifications = Specification::orderBy('created_at', 'desc')->paginate(100);\n\n // Return collection of Specifications as a resource\n return SpecificationResource::collection($specifications);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" } ]
740a55f92efce2421907759ed24cb766
Fill selected field for all collection
[ { "docid": "e5db945e78131f8f9af8bb907ef260f0", "score": "0.0", "text": "public function set($field, $value, array $excludeValue = [])\n {\n foreach ($this->items as $item) {\n if($item->in == 'path'){\n continue;\n }\n if (in_array($item->$field, $excludeValue)) {\n continue;\n }\n $item->required = true;\n $item->$field = $value;\n }\n }", "title": "" } ]
[ { "docid": "b5576bc6f28cb12a08d471ff4de1e062", "score": "0.64470553", "text": "protected function setFieldsData()\n {\n if (!is_null($this->id)) {\n $sql = \"SELECT * FROM \" . $this->tableName . \" WHERE id=? LIMIT 1\";\n $result = $this->db->selectRow($sql, $this->id);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n if (array_key_exists($key, $this->fields)) {\n $this->fields[$key] = $value;\n }\n }\n } else {\n $this->id = null;\n }\n }\n }", "title": "" }, { "docid": "f754f05fe6f4331b56af9de148b63d85", "score": "0.6242357", "text": "private function populateFields()\n\t{\n\t\tif (!empty($this->fields))\n\t\t{\n\t\t\t$search = ldap_search($this->ldapconn, $this->dn, $this->filter, $this->fields);\n\t\t\t$results = ldap_get_entries($this->ldapconn, $search);\n\t\t\t$temp_fields = array();\n\t\t\tforeach ($this->fields as $field)\n\t\t\t{\n\t\t\t\tif (array_key_exists($field, $results[0]))\n\t\t\t\t{\n\t\t\t\t\t$temp_fields[$field] = $results[0][$field][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->fields = $temp_fields;\n\t\t}\n\t}", "title": "" }, { "docid": "af5ae9d8431bbb07b7708b266aa9928e", "score": "0.6239325", "text": "protected function setFieldOptions()\n {\n $this->fieldOptions = $this->options()->get()->map(function ($item) {\n return [\n 'id' => $item->id,\n 'option_name' => $item->name,\n 'option_price' => $item->price,\n ];\n })->toArray();\n }", "title": "" }, { "docid": "5e3f1d60007895d363226e5a11bacd40", "score": "0.60978127", "text": "public function setAll()\r\n {\r\n $this->selectModifiers[] = self::ALL;\r\n }", "title": "" }, { "docid": "c169f8f7021ef0f42b6b71edec3a6a12", "score": "0.5987531", "text": "public function populate(){\n\n }", "title": "" }, { "docid": "15c3ba69f2f6c206e228f56286e26894", "score": "0.5864711", "text": "protected function setSelectedItems()\r\n {\r\n // Gets the rows\r\n $this->foreignTableSelectQuerier->processQuery();\r\n $rows = $this->foreignTableSelectQuerier->getRows();\r\n\r\n // Builds the selected items\r\n $this->selectedItems = [];\r\n if (is_array($rows)) {\r\n foreach ($rows as $row) {\r\n $this->selectedItems[] = $row['uid'];\r\n }\r\n }\r\n }", "title": "" }, { "docid": "1d56ed37050f905780d39bea9a9b07bb", "score": "0.5843977", "text": "protected function fillUpFields() {\n\n\t}", "title": "" }, { "docid": "052b6f14ee82dfb988d861b1ba764e0a", "score": "0.5831899", "text": "protected function _prepareFields() {\n\t\tforeach ($this->_FilterFieldSet->get() as $name => $FilterField) {\n\t\t\t$FilterField->setPreferences();\n\t\t}\n\t}", "title": "" }, { "docid": "9dec03f7cdced5a812df26ae2dc41a6a", "score": "0.58302003", "text": "public function populateAll()\n {\n while ($this->valid()) {\n $this->next();\n }\n }", "title": "" }, { "docid": "5957f6f0fe7ebf77de8bc55182e0d975", "score": "0.5815674", "text": "protected function initFields()\n {\n $fields = static::fields();\n foreach($fields as $field => $opts) {\n if(!isset($this->_data[$field])) {\n $this->_data[$field] = isset($opts['default']) ? $opts['default'] : null;\n }\n }\n }", "title": "" }, { "docid": "53bdc5f18c5a4793b903efbb08a44c59", "score": "0.58112335", "text": "protected function selectDefaultFields()\n {\n $select = $this->getClause('select');\n $this->hasFields = true;\n $repository = $this->getRepository();\n\n if(!count($select) || $this->isAutoFieldsEnabled()) {\n $this->hasFields = false;\n $this->select($repository->getSchema()->columns());\n $select = $this->getClause('select');\n }\n\n $aliased = $this->aliasFields($select, $repository->getAlias());\n $this->select($aliased, true);\n }", "title": "" }, { "docid": "153dd6a00ee0607dc6fe1c2f6d65b8cf", "score": "0.5803482", "text": "public function setAllFormValues()\n\t{\n\t\tforeach($this->Form()->getFields() as $Field)\n\t\t{\n\t\t\tif($Field->type == 'daysofweek')\n\t\t\t{\n\t\t\t\t$data = (isset($this->{$Field->name}) ? explode('|', $this->{$Field->name}) : ($this->Form()->{$Field->name}->default_value != '' ? $this->Form()->{$Field->name}->default_value : array()));\n\t\t\t\tforeach($this->Form()->getDaysOfWeekValues() as $key => $day){\n\t\t\t\t\tif(in_array($key, $data))\n\t\t\t\t\t{\n\t\t\t\t\t\t$return[$key] = 1;\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$return[$key] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->Form()->{$Field->name}->value = $return;\n\t\t\t}\n\t\t\telseif($Field->type == 'checkbox')\n\t\t\t{\n\t\t\t\t$this->Form()->{$Field->name}->value = (!isset($this->{$Field->name}) || $this->{$Field->name} == '' ? ($this->Form()->{$Field->name}->default_value != '' ? $this->Form()->{$Field->name}->default_value : array()) : explode('|', $this->{$Field->name}));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Form()->{$Field->name}->value = (isset($this->{$Field->name}) ? $this->{$Field->name} : ($this->Form()->{$Field->name}->default_value != '' ? $this->Form()->{$Field->name}->default_value : ''));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "940ef5b0481fa934e71f0cb64372cc09", "score": "0.5796084", "text": "public function fill_set()\n\t{\n\t\tglobal $venus;\n\t\t$item = $this->get();\n\n\t\t$data = $this->db->fill($this->get_table(), [], '.', '.');\n\n\t\t$item->set_data($data);\n\n\t\t$venus->plugins->run($this->prefix . 'fill_set', $this, $item);\n\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "438c98457159ed5492332280615a3a09", "score": "0.5787039", "text": "protected abstract function populate();", "title": "" }, { "docid": "cf75d944cff2d6895b9779c24587094c", "score": "0.5751987", "text": "public function nuevo() {\n $this->groups_for_select = Group::all_for_select_with('name');\n }", "title": "" }, { "docid": "92c993b9ed279c3638359c31b84dba6c", "score": "0.5741007", "text": "protected function doInitialize()\n {\n $this->collection = new FieldCollection();\n $this->collection->setGrouping($this->grouping);\n\n if ($this->references) {\n $repo = $this->em->getRepository(FieldValue::class);\n $instances = $repo->findBy(['id' => $this->references]);\n if ($instances === false) {\n return;\n }\n\n /** @var FieldValue $val */\n foreach ($instances as $val) {\n $fieldType = $val->getFieldType();\n $field = $this->em->getFieldManager()->getFieldFor($fieldType);\n $type = $field->getStorageType();\n $typeName = $type->getName();\n $typeCol = 'value_' . $typeName;\n $valCol = 'value_' . $typeName;\n if ($typeName === 'json') {\n /** @deprecated since 3.3 to be renamed in v4. */\n $valCol = 'value_json_array';\n }\n\n // Because there's a potential for custom fields that use json storage to 'double hydrate' this causes\n // json_decode to throw a warning. Here we prevent that by replacing the error handler.\n set_error_handler(\n function ($errNo, $errStr, $errFile) {},\n E_WARNING\n );\n $hydratedVal = $this->em->getEntityBuilder($val->getContenttype())->getHydratedValue($val->$typeCol, $val->getName(), $val->getFieldName());\n restore_error_handler();\n\n // If we do not have a hydrated value returned then we fall back to the one passed in\n if ($hydratedVal) {\n $val->setValue($hydratedVal);\n } else {\n $val->setValue($val->$valCol);\n }\n\n $this->collection->add($val);\n }\n }\n\n $this->em = null;\n }", "title": "" }, { "docid": "990f0d155963bc20d9e14bca1ffef974", "score": "0.57155186", "text": "protected function addFieldToSelect()\n {\n if ($this->getData('config/add_field')) {\n $this->getContext()->getDataProvider()->addField($this->getName());\n }\n }", "title": "" }, { "docid": "38bb5bbf709716e111c18e1e5b573059", "score": "0.57095665", "text": "protected function preSelect(){}", "title": "" }, { "docid": "bb87e240484fea2202c4ada0ebbdbbc2", "score": "0.5687559", "text": "static public function prepare_fields( &$all_fields )\r\n\t{\r\n\t\tforeach($all_fields as &$field)\r\n\t\t{\r\n\t\t\tswitch( $field['type'] )\r\n\t\t\t{\r\n\t\t\t\tcase 'checkbox':\r\n\t\t\t\tcase 'radio':\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$subfields = explode(\",\", $field['value']);\r\n\t\t\t\t\t$checkbox_options = array();\r\n\t\t\t\t\tforeach($subfields as $subfieldname)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$temp = explode(\"{(*#)}\", $subfieldname);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$checkbox_options[] = array(\r\n\t\t\t\t\t\t\t\t'title'\t=> $temp[0],\r\n\t\t\t\t\t\t\t\t'checked'\t=> ((count($temp) == 1) ? \"\" : ( $field['type']=='select' ? \"selected='selected'\" : \"checked='checked'\") ) \r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$field['options'] = $checkbox_options; \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7724fdbd137808c461b061b7844afb1b", "score": "0.5607896", "text": "public function initAllOptValues() {\n\t\t$this->getAll();\n\t}", "title": "" }, { "docid": "a0a18a381dc696f0575535aacc5cbc2a", "score": "0.5549678", "text": "function setField(){\n\n}", "title": "" }, { "docid": "cdcf551abd5f02b03302d293f75987bd", "score": "0.5531679", "text": "protected function _prepareCollection()\r\n {\r\n $collection = Mage::getModel('widget_slider/slider')->getCollection()->addAttributeToSelect('*');\r\n\r\n\r\n $this->setCollection($collection);\r\n return parent::_prepareCollection(); // TODO: Change the autogenerated stub\r\n }", "title": "" }, { "docid": "6fb6759c3188a7926f956a4aaccd718d", "score": "0.5526959", "text": "private function setFieldSets()\n\t{\n\t\t// From list data view in admin\n\t\t$id = JRequest::getInt('listid', 0);\n\n\t\t// From list of lists checkbox selection\n\t\t$cid = JRequest::getVar('cid', array(0));\n\t\tJArrayHelper::toInteger($cid);\n\t\tif ($id === 0)\n\t\t{\n\t\t\t$id = $cid[0];\n\t\t}\n\t\tif (($id !== 0))\n\t\t{\n\t\t\t$db = FabrikWorker::getDbo();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('label')->from('#__{package}_lists')->where('id = ' . $id);\n\t\t\t$db->setQuery($query);\n\t\t\t$this->listName = $db->loadResult();\n\t\t}\n\t\t$fieldsets = array('details');\n\t\t$fieldsets[] = $id === 0 ? 'creation' : 'append';\n\t\t$fieldsets[] = 'format';\n\t\treturn $fieldsets;\n\t}", "title": "" }, { "docid": "4cd4b94f9d7b07ddc15bb8588af28b40", "score": "0.5515665", "text": "protected function _prepareSelect(){ }", "title": "" }, { "docid": "b08381d8b433de30e89d64d50d1e3500", "score": "0.5499212", "text": "private function _populate($element,$options)\n {\n if(is_array($options)){\n $table = new $options['className']();\n if(is_array($options['firstField'])){\n $this->$element->addMultiOption($options['firstField'][0],$options['firstField'][1]);\n }\n $select=$table->select()->order($options['order']);\n $id = $options['id'] ? $options['id'] : 'id';\n foreach($table->fetchAll($select) as $row){\n $this->$element->addMultiOption($row->$id,$row->$options['showField']);\n }\n }\n\t}", "title": "" }, { "docid": "b1bbede5c34bc07a6a455cf601ff0a70", "score": "0.54980826", "text": "public function addSelect($field);", "title": "" }, { "docid": "18e95c0fa4986bab85c83c4912582723", "score": "0.54806465", "text": "function setup_field_data() {\n\t\tglobal $current_user, $post, $ninja_forms_fields;\n\t\t$form_id = $this->data['form_ID'];\n\t\t$field_results = ninja_forms_get_fields_by_form_id($form_id);\n\t\t//$field_results = apply_filters('ninja_forms_display_fields_array', $field_results, $form_id);\n\n\t\tforeach( $field_results as $field ) {\n\t\t\t$data = $field['data'];\n\t\t\t$field_id = $field['id'];\n\t\t\t$field_type = $field['type'];\n\n\t\t\tif( isset ( $data['default_value'] ) ) {\n\t\t\t\t$default_value = $data['default_value'];\n\t\t\t} else if ( isset ( $ninja_forms_fields[$field_type]['default_value'] ) ) { \n\t\t\t\t$default_value = $ninja_forms_fields[$field_type]['default_value'];\n\t\t\t} else {\n\t\t\t\t$default_value = '';\n\t\t\t}\n\n\t\t\t$default_value_type = isset ( $data['default_value_type'] ) ? $data['default_value_type'] : '';\n\n\t\t\t// Check to see if our default value is one of our preset values:\n\t\t\twp_get_current_user();\n\t\t\t$user_ID \t\t\t= $current_user->ID;\n\t\t\tif ( $user_ID and !empty( $user_ID ) ) {\n\t\t\t\t$user_firstname \t= $current_user->user_firstname;\n\t\t\t $user_lastname \t\t= $current_user->user_lastname;\n\t\t\t $user_display_name \t= $current_user->display_name;\n\t\t\t $user_email \t\t= $current_user->user_email;\n\t\t\t} else {\n\t\t\t\t$user_ID \t\t\t= '';\n\t\t\t\t$user_firstname \t= '';\n\t\t\t $user_lastname \t\t= '';\n\t\t\t $user_display_name \t= '';\n\t\t\t $user_email \t\t= '';\n\t\t\t}\n\n\n\t\t if ( is_object ( $post ) ) {\n\t\t\t $post_ID \t\t\t= $post->ID;\n\t\t\t $post_title \t\t= $post->post_title;\n\t\t\t $post_url\t\t\t= get_permalink( $post_ID );\n\t\t } else {\n\t\t \t$post_ID \t\t= '';\n\t\t \t$post_title \t\t= '';\n\t\t \t$post_url \t\t\t= '';\n\t\t }\n\n\t\t switch( $default_value ){\n\t\t\t\tcase '_user_id':\n\t\t\t\t\t$default_value = $user_ID;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_user_firstname':\n\t\t\t\t\t$default_value = $user_firstname;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_user_lastname':\n\t\t\t\t\t$default_value = $user_lastname;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_user_display_name':\n\t\t\t\t\t$default_value = $user_display_name;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_user_email':\n\t\t\t\t\t$default_value = $user_email;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post_id':\n\t\t\t\t\t$default_value = $post_ID;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post_title':\n\t\t\t\t\t$default_value = $post_title;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post_url':\n\t\t\t\t\t$default_value = $post_url;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'today':\n\t\t\t\t\t$plugin_settings = nf_get_settings();\n\t\t\t\t\tif ( isset ( $plugin_settings['date_format'] ) ) {\n\t\t\t\t\t\t$date_format = $plugin_settings['date_format'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$date_format = 'm/d/Y';\n\t\t\t\t\t}\n\t\t\t\t\t$default_value = date( $date_format, current_time( 'timestamp' ) );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ( 'querystring' == $default_value_type ) {\n\t\t\t\t\t\t$default_value = isset ( $_GET[ $default_value ] ) ? stripslashes( esc_html( $_GET[ $default_value ] ) ) : '';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->data['fields'][$field_id] = $default_value;\n\t\t\t$field_row = ninja_forms_get_field_by_id( $field_id );\n\t\t\t$field_row['data']['field_class'] = 'ninja-forms-field';\n\t\t\t$this->data['field_data'][$field_id] = $field_row;\n\t\t}\n\t}", "title": "" }, { "docid": "25beb6b096a5a9745a6d5333272c9085", "score": "0.54692423", "text": "public function deriveFields(){\n \n foreach($values as $field => $value){\n $this->fields[$field] = $value;\n }\n }", "title": "" }, { "docid": "ba850d7b9eca73bef7865992d328e8a3", "score": "0.5468259", "text": "function dynamic_form_id_picker( $field ) {\n \n // reset choices\n $field['choices'] = array();\n $forms = jlt_get_GF_forms();\n \n // check if the repeater field has rows of data\n if( isset( $forms ) ){\n \n // loop through the rows of data\n foreach ( $forms as $form ){\n\n $field['choices'][ $form['id'] ] = $form['title'];\n\n }\n\n }\n \n\n // return the field\n return $field;\n \n}", "title": "" }, { "docid": "8c65ed8082f3fe7036df0194883e7ca7", "score": "0.54669243", "text": "abstract public function fillFields(&$data);", "title": "" }, { "docid": "f07b7126aedd2502961df6ebc47a52a1", "score": "0.5433412", "text": "function prepare_field( $field ) {\n /*\n * Get the Ninja Forms version and the forms\n */\n $nf_version = $this->get_ninja_forms_version();\n $forms = $nf_version === 2 ? ninja_forms_get_all_forms() : Ninja_Forms()->form()->get_forms();\n\n $choices = array();\n\n /*\n * Store each form as a possible select choice\n */\n if ( $forms ) {\n foreach( $forms as $form ) {\n if ($nf_version === 2) {\n $choices[ $form[ 'id' ] ] = ucfirst( $form[ 'data' ][ 'form_title' ] );\n } else {\n $choices[ $form->get_id() ] = ucfirst( $form->get_setting( 'title' ) );\n }\n }\n }\n\n /*\n * Add a default placeholder value\n */\n if( empty($field['placeholder']) ) {\n $field['placeholder'] = _x('Select', 'verb', 'acf');\n }\n\n /*\n * Add the placeholder choice if allow_null is true and multiple is false\n */\n if( $field['allow_null'] && !$field['multiple'] ) {\n\t\t\t$choices = array( '' => \"- {$field['placeholder']} -\" ) + $choices;\n }\n\n /*\n * Add choices, set type to select, and add missing 'ajax' key\n */\n $field['choices'] = $choices;\n $field['type'] = 'select';\n $field['ajax'] = false;\n\n /*\n * Let ACF handle the rest\n */\n return $field;\n }", "title": "" }, { "docid": "358da1a7df049a56e5fb26973bc06350", "score": "0.5420822", "text": "public function load_fields() {}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "0b934a0619e988bf5ac831986ba40c30", "score": "0.5418219", "text": "function SelectAll(){}", "title": "" }, { "docid": "f90a4709d9e8f0283c6490d70dd64486", "score": "0.54158866", "text": "public function setFieldData()\r\n\t{\r\n\t\tif (!JRequest::getVar('id'))\r\n\t\t{\r\n\t\t\t$app = JFactory::getApplication();\r\n\t\t\t$app->setUserState('lib_windwalker.cck.fields', null);\r\n\t\t}\r\n\r\n\t\t$type = JRequest::getVar('field_type');\r\n\r\n\t\t$this->value = $type ? $type : $this->value;\r\n\t}", "title": "" }, { "docid": "2191ddaeea8c35385157360f15af05df", "score": "0.538716", "text": "private function _populateCollection()\n {\n //merge the properties into the collection\n $this->collection = $this->_getBaseArray();\n $this->collection['cover-back'] = array_merge(\n $this->collection['cover-back'],\n $this->rawProperties['cover-back']);\n\n //merge the complex properties into the ticket\n if ($this->media_collection) {\n $this->collection['cover-back']['media-col'] = $this->media_collection->getCollection()['media-col'];\n }\n }", "title": "" }, { "docid": "ab72b64b6a7aa826ee5177d56cbd6650", "score": "0.53830326", "text": "private function _set_fields()\n {\n\t\t$this->form_data = new StdClass;\n $this->form_data->group_id = 0;\n $this->form_data->group_name = '';\n\n $this->form_data->filter_group_name = '';\n \n $this->form_data->priv_ids = array();\n $this->form_data->user_group_ids = array();\n }", "title": "" }, { "docid": "2f2dd1edc6c9f50bb6ded4314c51ec89", "score": "0.5379549", "text": "public function setFields()\n {\n if (empty($this->fields))\n {\n $ast = $this->queryBuilder->getQuery()->getAST();\n\n $fieldNumber = 1;\n $returnFields = array();\n foreach ($ast->selectClause->selectExpressions as $selectExpression)\n {\n $expression = $selectExpression->expression;\n\n // if the expression is a string, there is an alias used to get all fields\n // to get all fields from the alias, we fetch the entity class and retrieve\n // the metadata from it, so we can set the fields correctly\n if (is_string($expression))\n {\n // the expression itself is a pathexpression, where we can directly\n // fetch the title and field\n\n $alias = $expression;\n $tableName = $this->_getModelFromAlias($alias);\n $metadata = $this->entityManager->getClassMetadata($tableName);\n\n foreach ($metadata->fieldMappings as $key => $detail)\n {\n $returnFields[$key]['title'] = $this->formatTitle($key);\n $returnFields[$key]['field'] = $alias . '.' . $key;\n $returnFields[$key]['type'] = $details['type'];\n }\n }\n elseif ($expression instanceof AST\\PathExpression)\n {\n $field = ($selectExpression->fieldIdentificationVariable != null) ? $selectExpression->fieldIdentificationVariable : $expression->field;\n $returnFields[$field]['title'] = $this->formatTitle($field);\n $returnFields[$field]['field'] = $expression->identificationVariable . '.' . $expression->field;\n $returnFields[$field]['type'] = '';\n }\n elseif ($expression instanceof AST\\Subselect)\n {\n //handle subselects. we only need the identification variable for the field\n $field = $selectExpression->fieldIdentificationVariable;\n $returnFields[$field]['title'] = $this->formatTitle($field);\n $returnFields[$field]['field'] = $field;\n $returnFields[$field]['type'] = '';\n }\n else\n {\n $field = $selectExpression->fieldIdentificationVariable;\n\n //doctrine uses numeric keys for expressions which got no\n //identification variable, so the key will be set to the\n //current counter $i\n if ($field === null)\n {\n $field = $this->_getNameForExpression($expression);\n $key = $fieldNumber;\n $fieldNumber++;\n }\n else\n {\n $key = $field;\n }\n\n $returnFields[$field]['title'] = $this->formatTitle($field);\n $returnFields[$key]['field'] = $field;\n $returnFields[$key]['type'] = '';\n }\n }\n $this->fields = $returnFields;\n }\n }", "title": "" }, { "docid": "d2404333783cc673835531e88fc6b5fb", "score": "0.5367041", "text": "private function _loadFields()\n {\n //at last, we got the defaults\n $this->_fields = $this->_default_fields;\n\n $model = new ImportModel();\n //we go with default fields if model cannot be loaded\n if ( $model->load() ) {\n $this->_fields = $model->getFields();\n }\n }", "title": "" }, { "docid": "d51b728df01085c9967a5bee722ebe9c", "score": "0.5360808", "text": "public function selectAll() {\n\t\treturn $this->model->all()->pluck('name', 'id')->prepend(__('service.select', ['attribute' => __('page.user')]), '');\n\t}", "title": "" }, { "docid": "454b84210cda73701a3fe69b193e382f", "score": "0.53546804", "text": "function select_none_reg_form_fields(){\r\n\t\tglobal $wpdb;\r\n\t\t$fields = $this->get_all_fields();\r\n\t\tforeach( $fields as $object ){\r\n\t\t\t$meta_key = $object->meta_key;\r\n\t\t\t$this->update_fields( $meta_key, 'field_required', false );\r\n\t\t\t$this->update_fields( $meta_key, 'approve_view', false );\r\n\t\t\t$this->update_fields( $meta_key, 'registration_field', false );\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a3f6d5d01d928a58b8fac1a04bb02bb9", "score": "0.5343905", "text": "public function field($fields='*'){\n $this->select = $fields;\n return $this;\n }", "title": "" }, { "docid": "cf0362be86c616c539f0d5b0bd0a06b7", "score": "0.5337545", "text": "protected function _prepareCollection()\n {\n $collection = $this->_getCpCollectionInstance()->setStoreId(\n 0\n )->addAttributeToSelect(\n 'name',\n 'type_id',\n 'attribute_set_id'\n );\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "title": "" }, { "docid": "348572ef582fa9cee697c8093ef9ddfc", "score": "0.5334123", "text": "public function populateCollection($data);", "title": "" }, { "docid": "7f71fc8ac7925b4e617c766a78860ca7", "score": "0.5319262", "text": "protected function _prepareCollection() \n {\n \n parent::_prepareCollection();\n }", "title": "" }, { "docid": "620c170b636ed1f2b03fe45f3188fed7", "score": "0.53175825", "text": "public function populateSpecific()\n {\n array_map(function ($store) {\n $specificStore = $this->generateSpecificPropName($store);\n $this->$specificStore = $this->findSpecific($this->$store);\n }, $this->_stores);\n }", "title": "" }, { "docid": "5e47a5691f6ac434812b0a374b9e3a65", "score": "0.53061503", "text": "protected function composeFields()\n {\n $addFields = [];\n $updateFields = [];\n\n foreach ($this->entities as $entity) {\n if ($entity->id) {\n $updateFields[] = $entity->get();\n } else {\n $addFields[] = $entity->get();\n }\n }\n\n if (count($addFields)) {\n $this->fields['add'] = $addFields;\n }\n\n if (count($updateFields)) {\n $this->fields['update'] = $updateFields;\n }\n }", "title": "" }, { "docid": "3f40ad0dd13df7b6c7512459702cd85c", "score": "0.529792", "text": "function populate_country_select( $selectedCountry = null, $field ) {\n\n\t\tglobal $wpdb;\n\t\t$db = $wpdb->get_results( \"\n SELECT * FROM \" . $wpdb->prefix . \"faculty\n group by country_code\n order by country ASC\n \" );\n\n\t\t$items = array();\n\t\tif ( null == $selectedCountry ) {\n\t\t\tif ( $field['show_labels'] == 1 ) {\n\t\t\t\t$items[] = '-';\n\t\t\t} else {\n\t\t\t\t$items[] = esc_html__( 'Select a country', 'acf-faculty-selector' );\n\t\t\t}\n\t\t}\n\t\tforeach ( $db as $data ) {\n\t\t\t$items[ $data->country_code ] = $data->country;\n\t\t\t//$items[ $data->price ] = $data->country;\n\t\t}\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "244e5f9344c0bd5bc536fd007f3cfcca", "score": "0.5289003", "text": "public function fill()\n {\n // loads submited values\n $this->_aRegParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n }", "title": "" }, { "docid": "4e24697bfd1418588ecc78f811cfb5db", "score": "0.52871835", "text": "public function pre_render()\n\t{\n\t\tif ($this->_pre_render_run === TRUE)\n\t\t\t// Don't run this method more than once per form\n\t\t\treturn;\n\n\t\tforeach ($this->_relational_fields as $alias => $query)\n\t\t{\n\t\t\tif ($this->_form->$alias->get('render') === FALSE OR $this->_form->$alias->get('ignore') === TRUE)\n\t\t\t\t// Dont' load fields if the field is ignored or not rendered\n\t\t\t\tcontinue;\n\n\t\t\t$options = array();\n\t\t\t$this->_add_options($alias, $query, $options);\n\n\t\t\t// Set the options in the field object\n\t\t\t$this->_form->$alias->set('options', $options['options']);\n\n\t\t\t// Determine values for has_many relationships at pre_render time\n\t\t\tif ($this->_form->$alias->val_isset() === FALSE AND $definitions = Arr::get($this->_has_many['definitions'], $alias))\n\t\t\t{\n\t\t\t\t$values = array();\n\t\t\t\tforeach ($this->model->$alias->find_all() as $row)\n\t\t\t\t{\n\t\t\t\t\t$primary_key = $row->primary_key();\n\t\t\t\t\t// Add the value\n\t\t\t\t\t$values[] = $row->$primary_key;\n\t\t\t\t}\n\n\t\t\t\t$this->_form->$alias->val($values);\n\t\t\t}\n\n\t\t\tif ($this->_form->$alias->val_isset() === FALSE AND $definitions = Arr::get($this->_has_one['definitions'], $alias))\n\t\t\t{\n\t\t\t\t$this->_form->$alias->val($this->model->$alias->pk());\n\t\t\t}\n\t\t}\n\n\t\t// Track that this method has been run\n\t\t$this->_pre_render_run = TRUE;\n\t}", "title": "" }, { "docid": "3df07b0dafd05b535ba21f6c06e589a6", "score": "0.5279836", "text": "function select_none_req_fields(){\r\n\t\tglobal $wpdb;\r\n\t\t$fields = $this->get_all_fields();\r\n\t\tforeach( $fields as $object ){\r\n\t\t\t$meta_key = $object->meta_key;\r\n\t\t\t$this->update_fields( $meta_key, 'field_required', true );\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "03fdc1202b08f5cc7c7e684f590517d1", "score": "0.5277766", "text": "public function createInputFields()\n {\n $productDataType = DataType::where('slug', $this->bread()['slug'])->firstOrFail();\n\n collect($this->inputFields())->each(function ($field, $key) use ($productDataType) {\n $dataRow = $this->dataRow($productDataType, $key);\n if (!$dataRow->exists) {\n $dataRow->fill($field)->save();\n }\n });\n\n }", "title": "" }, { "docid": "4a9830cc8cd392cf63ea62e87a1d691e", "score": "0.52700275", "text": "public function item_custom_fields_to_form() {\n // 1. special management for fields equipped with \"free\" checkbox\n // here, at local level (in survey_character ONLY) I manage the <not standard> \"pattern\" field\n // $this->pattern_text and $this->pattern_check don't exist in the database\n $options = array(SURVEYFIELD_CHARACTER_EMAILPATTERN, SURVEYFIELD_CHARACTER_URLPATTERN); // SURVEYFIELD_CHARACTER_CUSTOMPATTERN can not be used\n\n $fieldlist = $this->item_fields_with_free_checkbox();\n foreach ($fieldlist as $field) {\n if (!isset($this->{$field})) {\n $this->{$field.'_check'} = 1;\n } else {\n $this->{$field.'_check'} = 0;\n if (!in_array($this->{$field}, $options)) {\n $this->{$field.'_text'} = $this->{$field};\n $this->{$field} = SURVEYFIELD_CHARACTER_CUSTOMPATTERN;\n }\n }\n }\n\n // 2. special management for composite fields\n // nothing to do: they don't exist in this plugin\n\n // 3. special management for defaultvalue\n // nothing to do: defaultvalue doesn't need any further care\n }", "title": "" }, { "docid": "1f64495a8b692047afc875b70b5830cc", "score": "0.52658397", "text": "protected function doInitialize()\n {\n $this->collection = new ArrayCollection($this->queryBuilder->getQuery()->getResult());\n }", "title": "" }, { "docid": "b4fb8e292f1af7e74b92678d5cf1d872", "score": "0.5260357", "text": "protected function fill()\n {\n foreach ($this->attributes as $key => $value) {\n $key = $this->camelCase($key);\n\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "b4fb8e292f1af7e74b92678d5cf1d872", "score": "0.5260357", "text": "protected function fill()\n {\n foreach ($this->attributes as $key => $value) {\n $key = $this->camelCase($key);\n\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "b4fb8e292f1af7e74b92678d5cf1d872", "score": "0.5260357", "text": "protected function fill()\n {\n foreach ($this->attributes as $key => $value) {\n $key = $this->camelCase($key);\n\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "5bdd4ef496991d3654800e6a830a97bb", "score": "0.5259069", "text": "public function setCollection($name)\n\t{\n\t\t$this->c = $this->db->selectCollection($name);\n }", "title": "" }, { "docid": "58740ae8b5e2c3aac8b314f5f5d913cb", "score": "0.5251915", "text": "public function updateFormFieldsFromRequest() { \n $data = $this->getDataFromRequest();\n /* @var $field FormField */\n foreach($this->items as $field) {\n @$field->setValue($data[$field->getName()]);\n }\n return $this;\n }", "title": "" }, { "docid": "1503ed99b2dab81fdb02d3fb20cfb58a", "score": "0.5242525", "text": "private function setFieldAssociations() {\n\t\t$this->FieldAssociations['name'] = array(\"name1\", \"name2\");\n\t\t$this->FieldAssociations['addr'] = array(\"addr1\", \"addr2\", \"baddr1\", \"baddr2\");\n\t\t$this->FieldAssociations['city'] = array(\"city\", \"bcity\");\n\t\t$this->FieldAssociations['zip'] = array(\"zip\", \"bzip\");\n\t\t$this->FieldAssociations['state'] = array(\"state\", \"bstate\");\n\t\t$this->FieldAssociations['acct'] = array(\"account\");\n\t\t$this->FieldAssociations['fname'] = array(\"name1\", \"name2\");\n\t\t$this->FieldAssociations['lname'] = array(\"name1\", \"name2\");\n\t\t$this->FieldAssociations['saddr'] = array(\"addr1\", \"addr2\", \"baddr1\", \"baddr2\");\n\t\t$this->FieldAssociations['scity'] = array(\"city\", \"bcity\");\n\t\t$this->FieldAssociations['szip5'] = array(\"zip\", \"bzip\");\n\t}", "title": "" }, { "docid": "2cb9f6c110ac5541c81a4e3c87bf5352", "score": "0.52423173", "text": "protected function fill()\n {\n foreach ($this->attributes as $key => $value) {\n $key = $this->camelCase($key);\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "322ed3d2b83eeaf53c504dbb5dfa7715", "score": "0.52414036", "text": "public function getFields() : FieldCollection\n {\n return (new FieldCollection($this->fields()))\n ->merge($this->extraFields)\n ->each(function (Field $field) {\n $field->setResource($this);\n if ($this->modelInstance) $field->setModel($this->modelInstance);\n });\n }", "title": "" }, { "docid": "b1f6b2987549c35e2af100c24e921a2d", "score": "0.52392435", "text": "protected function prepareForValidation()\n {\n if(isset(request()->dados) && is_array(request()->dados))\n {\n $all = $this->all();\n foreach($all['dados'] as $key => $value)\n if(isset($all['dados'][$key]['campo']) && is_array($all['dados'][$key]['campo']))\n $all['dados'][$key]['campo'] = array_unique($value['campo']);\n $this->replace($all);\n }\n }", "title": "" }, { "docid": "b49bba7910c4c1b56be2611d92b0099b", "score": "0.5231159", "text": "public function set_field($name) {\n \n }", "title": "" }, { "docid": "0f2b5107677b49fd0174a5628cbc95f8", "score": "0.5228497", "text": "private static function select(&$f)\n\t{\n\t\t// Check if the option_call field is set, if not use the options array\n\t\t$multi = ! empty($f['option_call']) ? '' : $f['options'];\n\n\t\tif ( ! empty($multi))\n\t\t{\n\t\t\t$f['options'] = array();\n\t\t\t\n\t\t\tforeach ($multi as $k => $v)\n\t\t\t{\n\t\t\t\tif ( ! empty($k))\n\t\t\t\t{\n\t\t\t\t\t$f['options'][] = array(\n\t\t\t\t\t\t'content' => $k,\n\t\t\t\t\t\t'value' => $v,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$f['options'] = '';\n\t\t}\n\t}", "title": "" }, { "docid": "4c2c1d5d16ba551de07dd26f41bb4a88", "score": "0.52279073", "text": "public function changeField()\n {\n $sAddField = oxRegistry::getConfig()->getRequestParameter(\"sAddField\");\n if (empty($sAddField)) {\n oxRegistry::getSession()->setVariable(\"iErrorCode\", ERR_REQUIREDMISSING);\n\n return;\n }\n\n $aChangeFields = oxRegistry::getConfig()->getRequestParameter(\"aFields\");\n if (is_array($aChangeFields) && count($aChangeFields)) {\n\n $oSelectlist = oxNew(\"oxselectlist\");\n if ($oSelectlist->loadInLang($this->_iEditLang, $this->getEditObjectId())) {\n\n $this->aFieldArray = oxRegistry::getUtils()->assignValuesFromText($oSelectlist->oxselectlist__oxvaldesc->getRawValue());\n $sChangeFieldName = $this->parseFieldName($aChangeFields[0]);\n\n foreach ($this->aFieldArray as $sKey => $oField) {\n if ($oField->name == $sChangeFieldName) {\n $this->aFieldArray[$sKey]->name = $sAddField;\n $this->aFieldArray[$sKey]->price = oxRegistry::getConfig()->getRequestParameter(\"sAddFieldPriceMod\");\n $this->aFieldArray[$sKey]->priceUnit = oxRegistry::getConfig()->getRequestParameter(\"sAddFieldPriceModUnit\");\n if ($iPos = oxRegistry::getConfig()->getRequestParameter(\"sAddFieldPos\")) {\n if ($this->_rearrangeFields($this->aFieldArray[$sKey], $iPos - 1)) {\n return;\n }\n }\n break;\n }\n }\n $this->save();\n }\n }\n }", "title": "" }, { "docid": "2dd1a9d882efe782a99c1d9f72f3678b", "score": "0.52059054", "text": "final protected function withFields()\n\t{\n\t\t$this->fields = explode(',', $this->request->input('fields'));\n\n\t\tif(($key = array_search('password', $this->fields)) !== false) {\n\t\t unset($this->fields[$key]);\n\t\t}\n\n\t\t$this->model = $this->model->get()->each(function($row) {\n\t\t\t$row->setVisible($this->fields);\n\t\t});\n\t}", "title": "" }, { "docid": "b1cb202cc372ea3857bc8411ebd32c92", "score": "0.52040535", "text": "public function populate_from_save($field, $i)\n {\n if (isset($_REQUEST[$field][$i])) {\n $this->$field = $_REQUEST[$field][$i];\n }\n\n // handling advanced fields\n if (isset($_REQUEST['set_type'][$i]) && $_REQUEST['set_type'][$i] == 'Advanced') {\n $this->value = $_REQUEST['adv_value'][$i];\n } else {\n if (isset($_REQUEST['adv_type'][$i], $_REQUEST['ext1'][$i])\n && $_REQUEST['adv_type'][$i] == 'datetime' && $_REQUEST['ext1'][$i] != '') {\n // compensates for datetime field types\n } else {\n $this->adv_type = '';\n $this->ext1 = '';\n $this->ext2 = '';\n $this->ext3 = '';\n }\n }\n }", "title": "" }, { "docid": "048b738474fe6193d989003e9cb7d2a2", "score": "0.5202286", "text": "public function populate(Fieldset $fieldset, array $fields);", "title": "" }, { "docid": "12575facda2f2abff6263832b5a660a6", "score": "0.5200853", "text": "protected function _prepareCollection()\n\t{\n\t}", "title": "" }, { "docid": "088ba41fb954d03eb0aa86cc7e0ba437", "score": "0.519956", "text": "public function _init() {\n\t\t$this->_fields += array(\n\t\t\t'id' => new Sprig_Field_Auto,\n\t\t\t'article' => new Sprig_Field_BelongsTo(array(\n\t\t\t\t'model' => 'article',\n\t\t\t)),\n\t\t\t'data' => new Sprig_Field_Char(array(\n\t\t\t\t'empty' => TRUE,\n\t\t\t)),\n\t\t\t'total' => new Sprig_Field_Integer(array(\n\t\t\t\t'empty' => TRUE,\n\t\t\t\t'default' => 0,\n\t\t\t)),\n\t\t\t'views' => new Sprig_Field_Integer(array(\n\t\t\t\t'empty' => TRUE,\n\t\t\t\t'default' => 0,\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "93da8e3b4c6d8e90b7aa51179aac735e", "score": "0.5199111", "text": "public function fillMunicipios() {\n $idEstado = $this->input->post('idEstado');\n \n if($idEstado){\n $this->load->model('Comboboxesmodel');\n $municipios = $this->Comboboxesmodel->getMunicipios($idEstado);\n echo '<option value=\"0\">Seleccione</option>';\n foreach($municipios as $fila){\n echo '<option value=\"'. $fila->id .'\">'. $fila->nombre .'</option>';\n }\n } else {\n echo '<option value=\"0\">Seleccione</option>';\n }\n }", "title": "" }, { "docid": "49c8f8ccc471627ea4595d1e283a31ad", "score": "0.51973236", "text": "function fill_form(array &$form, array $data): void\n{\n foreach ($form['fields'] as $field_index => &$field) {\n if (isset($data[$field_index])) {\n $field['value'] = $data[$field_index];\n }\n }\n}", "title": "" }, { "docid": "b94b4b62e1ab5106adcb71d390c6f9bb", "score": "0.5195743", "text": "function fill_form(&$form, $input)\n{\n foreach ($input as $field_index => $field_value) {\n $form['fields'][$field_index]['value'] = $field_value;\n }\n}", "title": "" }, { "docid": "10b767aea4a8aee1c773d081ad9f04df", "score": "0.5194226", "text": "public function save()\n {\n parent::save();\n\n $sOxId = $this->getEditObjectId();\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n\n // shopid\n $sShopID = oxRegistry::getSession()->getVariable(\"actshop\");\n $aParams['oxselectlist__oxshopid'] = $sShopID;\n $oAttr = oxNew(\"oxselectlist\");\n\n if ($sOxId != \"-1\") {\n $oAttr->loadInLang($this->_iEditLang, $sOxId);\n } else {\n $aParams['oxselectlist__oxid'] = null;\n }\n\n\n //$aParams = $oAttr->ConvertNameArray2Idx( $aParams);\n $oAttr->setLanguage(0);\n $oAttr->assign($aParams);\n\n //#708\n if (!is_array($this->aFieldArray)) {\n $this->aFieldArray = oxRegistry::getUtils()->assignValuesFromText($oAttr->oxselectlist__oxvaldesc->getRawValue());\n }\n // build value\n $oAttr->oxselectlist__oxvaldesc = new oxField(\"\", oxField::T_RAW);\n foreach ($this->aFieldArray as $oField) {\n $oAttr->oxselectlist__oxvaldesc->setValue($oAttr->oxselectlist__oxvaldesc->getRawValue() . $oField->name, oxField::T_RAW);\n if (isset($oField->price) && $oField->price) {\n $oAttr->oxselectlist__oxvaldesc->setValue($oAttr->oxselectlist__oxvaldesc->getRawValue() . \"!P!\" . trim(str_replace(\",\", \".\", $oField->price)), oxField::T_RAW);\n if ($oField->priceUnit == '%') {\n $oAttr->oxselectlist__oxvaldesc->setValue($oAttr->oxselectlist__oxvaldesc->getRawValue() . '%', oxField::T_RAW);\n }\n }\n $oAttr->oxselectlist__oxvaldesc->setValue($oAttr->oxselectlist__oxvaldesc->getRawValue() . \"__@@\", oxField::T_RAW);\n }\n\n $oAttr->setLanguage($this->_iEditLang);\n $oAttr->save();\n\n // set oxid if inserted\n $this->setEditObjectId($oAttr->getId());\n }", "title": "" }, { "docid": "007fe6de1f60af9bddda2690108ddd64", "score": "0.5193473", "text": "public function initSettingsData()\n {\n foreach ($this->getFieldConfig()->fields as $field => $data) {\n $this->{$field} = isset($data['default']) ? $data['default'] : '';\n }\n }", "title": "" }, { "docid": "b42506c7de9f2261e2bcb7387a786795", "score": "0.5187383", "text": "public function setup_fields() {\n\t\t\t// register_setting( $this->slug, 'our_first_field' );\n\t\t\t$fields = array(\n\t\t\t\tarray(\n\t\t\t\t\t'uid' => 'iterable_api_key',\n\t\t\t\t\t'label' => 'Iterable API Key',\n\t\t\t\t\t'section' => 'first_section',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'options' => 'false',\n\t\t\t\t\t'placeholder' => 'Enter API Key',\n\t\t\t\t\t// 'helper' => 'Helper Text',\n\t\t\t\t\t'supplemental' => 'Enter your Iterable API Key.',\n\t\t\t\t\t// 'default' => '**************'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'uid' => 'iterable_list_id',\n\t\t\t\t\t'label' => 'Iterable List Id',\n\t\t\t\t\t'section' => 'first_section',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'options' => 'false',\n\t\t\t\t\t'placeholder' => 'Enter List Id',\n\t\t\t\t\t// 'helper' => 'Helper Text',\n\t\t\t\t\t'supplemental' => 'Enter your Iterable List Id.',\n\t\t\t\t\t// 'default' => '**************'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'uid' => 'list_of_form_ids',\n\t\t\t\t\t'label' => 'My Text Area',\n\t\t\t\t\t'section' => 'first_section',\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'options' => false,\n\t\t\t\t\t// 'placeholder' => 'Ex: form_id_1',\n\t\t\t\t\t// 'helper' => 'This is helper text',\n\t\t\t\t\t'supplemental' => 'Enter form ids, separated by a comma.',\n\t\t\t\t\t// 'default' => 'hello text area'\n\t\t\t\t),\n\t\t\t\t// array(\n\t\t\t\t// \t'uid' => 'our_third_field',\n\t\t\t\t// \t'label' => 'Select Field',\n\t\t\t\t// \t'section' => 'first_section',\n\t\t\t\t// \t'type' => 'select',\n\t\t\t\t// \t'options' => array(\n\t\t\t\t// \t\t'yes' => 'Yes!!',\n\t\t\t\t// \t\t'no' => 'No way dude!',\n\t\t\t\t// \t\t'maybe' => 'Maybe?!'\n\t\t\t\t// \t),\n\t\t\t\t// \t'placeholder' => 'This is placeholder text',\n\t\t\t\t// \t'helper' => 'some more helper text',\n\t\t\t\t// \t'supplemental' => 'I am underneath!',\n\t\t\t\t// \t'default' => 'maybe'\n\t\t\t\t// )\n\t\t\t);\n\t\t\tforeach( $fields as $field ) {\n\t\t\t\tadd_settings_field( $field['uid'], $field['label'], array( $this, 'field_callback' ), $this->slug, $field['section'], $field );\n\t\t\t\tregister_setting( $this->slug, $field['uid'] );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b6d1fe9d91b7b6eac0dc916246ecdb35", "score": "0.51737535", "text": "protected function _prepareCollection() \n {\n $collection = Mage::getModel('oscpproductenquiry/productenquiry')->getCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "title": "" }, { "docid": "cb737ae69bafd199468b5138f048ed2f", "score": "0.51734865", "text": "public function edit_set()\n{\n\n $this->BASE['data']['basedaytype'] = Daytype::get();\n\n foreach ($this->BASE['data']->daytype as $role) {\n\n $checked_daytype[] = $role->id;\n }\n $this->BASE['data']['checked_daytype'] = $checked_daytype;\n $this->BASE['data']['id'] = $id;\n}", "title": "" }, { "docid": "5d962cb8390742fa61789a650f3b746d", "score": "0.51712596", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_activ('');\n $this->setOrden('');\n $this->setTipo('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "de1fe76da24b2626b069b490f6fd762f", "score": "0.51688963", "text": "private function setCustomFields()\n {\n $customFieldCollection = new CustomFieldCollection();\n\n if (isset($this->simpleXml->{'custom-fields'})) {\n /** @var SimpleXMLElement $field */\n foreach ($this->simpleXml->{'custom-fields'}->children() as $field) {\n $customField = $this->convertToCustomField($field);\n if (!is_null($customField)) {\n $customFieldCollection->add($customField);\n }\n }\n }\n $this->customFields = $customFieldCollection;\n }", "title": "" }, { "docid": "18abc48acfbef755bce583275d2fef5e", "score": "0.51688474", "text": "protected function prePopulate()\n {\n\n }", "title": "" }, { "docid": "0d2d66edea2bdb2993d93359a1a31762", "score": "0.5167191", "text": "protected function _prepareCollection()\n {\n $collection = new Varien_Data_Collection();\n\n foreach (Mage_Api2_Model_Auth_User::getUserTypes() as $type => $label) {\n $collection->addItem(\n new Varien_Object(array('user_type_name' => $label, 'user_type_code' => $type))\n );\n }\n\n $this->setCollection($collection);\n }", "title": "" }, { "docid": "1d402fd429ab47d663bcf164826ea1a4", "score": "0.51661515", "text": "protected function setModelFields()\n {\n $result = $this->db->query('DESCRIBE ' . $this->tableName);\n if (!empty($result)) {\n foreach ($result as $value) {\n $this->fields[$value['Field']] = $value['Default'];\n }\n }\n }", "title": "" }, { "docid": "5d923eba1a231b1fea68680a602cbe3f", "score": "0.5160762", "text": "protected function getSelect()\n { \n }", "title": "" }, { "docid": "7cbf6a9204375edc3a92a1c988c44f80", "score": "0.51598835", "text": "public function addField(\\Magento\\Framework\\Data\\Collection $collection, $field, $alias = null)\r\n {\r\n\r\n\t\t//$collection->getSelect()->from($subquery);\r\n\t\t\r\n\t\t$collection->getSelect()->columns(\r\n array(\r\n 'quantity_pending' => new \\Zend_Db_Expr('(SELECT SUM(soi.qty_ordered) FROM sales_order_item soi INNER JOIN sales_order so ON soi.order_id=so.entity_id WHERE status=\"pending\" AND soi.product_id=e.entity_id GROUP BY soi.product_id,so.status)')));\r\n\t\t\r\n //$collection->joinField('quantity_pending', 'sales_order_item', 'manage_stock', 'product_id=entity_id', null, 'left');\r\n\t\t\r\n\t\t/*$collection->getSelect()->group('e.entity_id'); // TRY THIS LINE OF CODE\r\n\r\n\t\t$collection->getSelect()\r\n\t\t\t\t->columns('SUM(qty_ordered) AS quantity_pending')\r\n\t\t\t\t->joinLeft(array(\"soi\" => \"sales_order_item\"), \"soi.product_id = e.entity_id\");\r\n\r\n\t\t$collection->getSelect()\r\n\t\t\t\t->joinLeft(array(\"so\" => \"sales_order\"), \"soi.order_id=so.entity_id AND so.status='pending'\");*/\r\n }", "title": "" }, { "docid": "364be249af37cf88114e589c07938782", "score": "0.51530886", "text": "protected function _prepareCollection()\n {\n //$collection = Mage::getResourceModel($this->_getCollectionClass());\n \t$collection = Mage::getModel('fourdem/fourdem')->getCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "title": "" }, { "docid": "03739d42b1d3b63c9252f82a4e548320", "score": "0.5151477", "text": "protected static function fillFields(RestifyRequest $request, Model $model, Collection $fields)\n {\n return $fields->map(fn (Field $field) => $field->fillAttribute($request, $model));\n }", "title": "" }, { "docid": "b1572b258e5cb17e62385bc0e8df1957", "score": "0.5148828", "text": "protected function setAvailableFields() {\r\n\r\n\t\t$this->availableFieldsArray = array(\r\n\t\t\t'uid',\r\n\t\t\t'pid',\r\n\t\t\t'cn_iso_2',\r\n\t\t\t'cn_iso_3',\r\n\t\t\t'cn_iso_nr',\r\n\t\t\t'cn_parent_tr_iso_nr',\r\n\t\t\t'cn_official_name_local',\r\n\t\t\t'cn_official_name_en',\r\n\t\t\t'cn_capital',\r\n\t\t\t'cn_tldomain',\r\n\t\t\t'cn_currency_iso_3',\r\n\t\t\t'cn_currency_iso_nr',\r\n\t\t\t'cn_phone',\r\n\t\t\t'cn_eu_member',\r\n\t\t\t'cn_address_format',\r\n\t\t\t'cn_zone_flag',\r\n\t\t\t'cn_short_local',\r\n\t\t\t'cn_short_en',\r\n\t\t\t'cn_uno_member',\r\n\t\t\t'cn_short_de'\t\t\r\n\t\t);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "77a3a6317c4622c50ea2b343e50dd9b4", "score": "0.51473755", "text": "function getSelectFieldsValues($field_data) {\n \n \n $model = $this->getModel('comments');\n $results = $model->getDataForView($field_data);\n \n \n foreach($results as $list) {\n $result = null;\n if($field_data == 'post_id') {\n $result_list[] = $list->post_id;\n }\n if($field_data == 'created_date') {\n $result_list[] = $list->created_date;\n }\n if($field_data == 'creator') {\n $result_list[] = $list->creator; \n }\n if($field_data == 'comment_id') {\n $result_list[] = $list->comment_id;\n }\n }\n return $result_list;\n }", "title": "" }, { "docid": "6e528a7fa0efe3a4e0fee275ed9d5a52", "score": "0.5141484", "text": "public function setupFields () {\n\t\tif ($this->setupComplete) {\n\t\t\treturn;\n\t\t}\n\t\t$this->keys = array(\n\t\t\t'index' => array(),\n\t\t\t'primary' => array(),\n\t\t\t'unique' => array(),\n\t\t\t'foreign' => array(),\n\t\t\t'fulltext' => array()\n\t\t);\n\t\tforeach ($this->fields as $field_name => &$field) {\n\t\t\tif ($field instanceof FDataModelField) {\n\t\t\t\t$prefixed_name = (($field->prefix) ? $this->prefix : '') . $field_name;\n\t\t\t\t// Indexes\n\t\t\t\tif ($field->index) {\n\t\t\t\t\t$key_name = $field->indexName;\n\t\t\t\t\tif ($key_name == '') $key_name = 'idx_' . $prefixed_name;\n\t\t\t\t\t$this->keys['index'][$key_name][] = $prefixed_name;\n\t\t\t\t}\n\t\t\t\t// Primary Keys\n\t\t\t\tif ($field->primary) {\n\t\t\t\t\t$this->keys['primary'][] = $prefixed_name;\n\t\t\t\t}\n\t\t\t\t// Unique Keys\n\t\t\t\tif ($field->unique) {\n\t\t\t\t\t$key_name = $field->uniqueName;\n\t\t\t\t\tif ($key_name == '') $key_name = 'unq_' . $prefixed_name;\n\t\t\t\t\t$this->keys['unique'][$key_name][] = $prefixed_name;\n\t\t\t\t}\n\t\t\t\t// Foreign Keys\n\t\t\t\tif ($field->foreignKeyField) {\n\t\t\t\t\t$key_name = $field->foreignKeyName;\n\t\t\t\t\tif ($key_name == '') $key_name = 'fk_' . $this->table . '_' . $prefixed_name;\n\t\t\t\t\t$this->keys['foreign'][$key_name][] = array(\n\t\t\t\t\t\t'field' => $prefixed_name,\n\t\t\t\t\t\t'reference' => $field->foreignKeyField,\n\t\t\t\t\t\t'table' => $field->foreignKeyTable,\n\t\t\t\t\t\t'delete' => $field->foreignKeyDelete,\n\t\t\t\t\t\t'update' => $field->foreignKeyUpdate\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Fulltext Keys\n\t\t\t\tif (count($field->fulltext)) {\n\t\t\t\t\tforeach ($field->fulltext as $fulltext) {\n\t\t\t\t\t\tif ($fulltext === null) {\n\t\t\t\t\t\t\t$fulltext = 'ft_' . $this->table;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->keys['fulltext'][$fulltext][] = $prefixed_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->setupComplete = true;\n\t}", "title": "" }, { "docid": "172bebc48c7006612becdb7f5cd60184", "score": "0.5130182", "text": "public function init_fields() {\n\t\t\tforeach ( $this->fields as $o => $options ) {\n\t\t\t\tif ( false === $this->valid_option( $options ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $options['callback'] ) && false !== $options['callback'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $options['sections'] ) ) {\n\t\t\t\t\tforeach ( $options['sections'] as $s => $section ) {\n\t\t\t\t\t\tif ( false === $this->valid_option( $options, true ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isset( $section['callback'] ) && false !== $section['callback'] || false === isset( $section['fields'] ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach ( $section['fields'] as $f => $field ) {\n\t\t\t\t\t\t\t$this->render_field( $field, $options['name'], $section['name'], true );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} elseif ( isset( $options['fields'] ) ) {\n\t\t\t\t\tforeach ( $options['fields'] as $f => $field ) {\n\t\t\t\t\t\t$this->render_field( $field, $options['name'], false, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "298f1f680750473abd551d03fc7f0c8b", "score": "0.51191115", "text": "function SetSelectList($obj);", "title": "" }, { "docid": "f79250bb0c531db5104fcc5040b5b3e3", "score": "0.51189184", "text": "public function fillData()\n {\n $unit = ProductUnit::findOrFail($this->id);\n $this->name = $unit->name;\n $this->unit_price = $unit->unit_price;\n $this->total_price = ($unit->price * $this->quantity) - $this->total_discount;\n $this->product_id = $unit->product_id;\n }", "title": "" }, { "docid": "0507c8e6a07313e6ba5d9ea36d10be47", "score": "0.51187325", "text": "function printRefField($field, $describeRefObjResult) {\n if (is_array($describeRefObjResult)) {\n $polyExtFields = array();\n foreach ($describeRefObjResult as $describeRefObjResultKey => $describeRefObjResult) {\n $extFields = null;\n if (isset($describeRefObjResult->fields)) {\n foreach ($describeRefObjResult->fields as $extFieldKey => $extFieldVal) {\n if ($extFieldVal->idLookup == true) {\n $extFields[$extFieldKey] = $extFieldVal;\n }\n }\n $polyExtFields[$describeRefObjResult->name] = $extFields;\n }\n }\n\n //check if the new array has any fields\n print \"<td><select name='$field->name:$field->relationshipName' style='width: 100%;'\";\n\n $numOfExtFields = 0;\n foreach ($polyExtFields as $extFields) {\n if (count($extFields) > 1) {\n $numOfExtFields = $numOfExtFields + count($extFields) - 1;\n }\n }\n\n if ($numOfExtFields <= 0) {\n print \" disabled='true' \";\n }\n print \">\\n\";\n\n print \" <option value='Id' selected='true'></option>\\n\";\n foreach ($polyExtFields as $objectType => $extFields) {\n if (count($extFields) > 0) {\n foreach ($extFields as $extFieldKey => $extFieldVal) {\n if ($extFieldVal->name != 'Id') {\n $isPolymorphic = is_array($field->referenceTo) ? \"1\" : \"0\";\n print \" <option value='$field->name.$field->relationshipName.$isPolymorphic.$objectType.$extFieldVal->name'>$objectType.$extFieldVal->name</option>\\n\";\n }\n }\n }\n }\n print \"</select></td>\\n\";\n\n } else { //for scalar values\n //check to see if there are any IdLookup fields and if so move them to a new array\n $extFields = null;\n if (count($describeRefObjResult->fields) > 0) {\n foreach ($describeRefObjResult->fields as $extFieldKey => $extFieldVal) {\n if ($extFieldVal->idLookup == true) {\n $extFields[$extFieldKey] = $extFieldVal;\n }\n }\n }\n\n\n //check if the new array has any fields and if so\n if (count($extFields) > 0) {\n print \"<td><select name='$field->name:$field->relationshipName' style='width: 100%;'\";\n if (count($extFields) == 1) print \" disabled='true' \"; //disable the selection if only one choice ('Id') is available\n print \">\\n\";\n\n print \" <option value='Id' selected='true'></option>\\n\";\n foreach ($extFields as $extFieldKey => $extFieldVal) {\n if ($extFieldVal->name != 'Id') {\n $isPolymorphic = is_array($field->referenceTo) ? \"1\" : \"0\";\n print \" <option value='$field->name.$field->relationshipName.$isPolymorphic.$describeRefObjResult->name.$extFieldVal->name'>$describeRefObjResult->name.$extFieldVal->name</option>\\n\";\n }\n }\n print \"</select></td>\\n\";\n }\n }\n\n}", "title": "" }, { "docid": "cc59052141388e1e1121be6a8a2b654c", "score": "0.51186997", "text": "function fillValues($table, $idfield, $id) {\n if ($table) { $tab = $table; }\n else { $tab = $this->table; }\n $sq = new sql;\n $sq->query($this->dbc, \"select * from $tab where $idfield = '\".addslashes($id).\"'\");\n $data = $sq->nextrow();\n if (is_array($data)) {\n while (list($key, $val) = each($data)) {\n $this->fields[$key][\"value\"] = $val;\n }\n }\n $sq->free();\n }", "title": "" } ]
731f489a932df88b2e708461cd8fc935
Trae datos de la condicion de venta
[ { "docid": "12c2824d0abdcd5a4e173e1b164419af", "score": "0.0", "text": "public static function ListarMetodosPagos($TIPO_PAGO, $busqueda, $pag) {\n try {\n $cant = 10;\n //print_r('ASD');\n //print_r($busqueda);\n $consulta = \"select DSA.COD_METODO,\n DSA.DESC_METODO,\n DSA.TIPO_PAGO\n from (select asd.*, rownum r\n from (SELECT E.COD_METODO, E.DESCRIPCION DESC_METODO, E.TIPO_PAGO\n FROM WEB_APP_METODO_PAGO E\n WHERE E.TIPO_PAGO = :TIPO_PAGO\n AND (E.COD_METODO like\n upper('%' || trim(:busqueda) || '%') OR\n E.DESCRIPCION like\n upper('%' || trim(:busqueda1) || '%'))\n\n and rownum <= ({$pag} * {$cant} )) asd) dsa\n where r >= ({$pag} + ({$pag} * {$cant} ) - ({$cant} + {$pag} ) + 1)\";\n\n //print_r($consulta);\n // Preparar sentencia\n $comando = oraconnect::getInstance()->getDb()->prepare($consulta);\n\n // Ejecutar sentencia preparada\n $comando->execute([':TIPO_PAGO' => $TIPO_PAGO,\n ':busqueda' => $busqueda,\n ':busqueda1' => $busqueda]);\n\n $result = $comando->fetchAll(PDO::FETCH_ASSOC);\n //PRINT_R($result);\n return utf8_converter($result);\n } catch (PDOException $e) {\n print_r($e->getMessage());\n return false;\n }\n }", "title": "" } ]
[ { "docid": "77aac7fd1da835b5d8b0ef1e65eae50e", "score": "0.74648535", "text": "function traerSucursalesVenta()\n\t{\n\t\t$ventaID = $this->uri->segment(2);\n\t\t//creamos un arreglo de los datos recibidos\n\t\t$datos = explode(\"@\", $this->input->post(\"datos\"));\n\t\t//tomamos el id de empresa de primer dato\n\t\t$empresaID = $datos[0];\n\n\t\t//seteamos la sucursal de la venta en NULL\n\t\t$campos = array(\"sucursal_id\" => NULL);\n\t\t$paramWhere = array(\"venta_id\" => $ventaID);\n\t\t$setSucursal = $this->consultas_model->actualizar(\"t_venta\",$campos,$paramWhere);\n\n\t\tif (!empty($empresaID)) {\n\t\t\t\n\t\t\t//traemos las sucursales\n\t\t\t$sucursales = $this->empresas_model->traerSucursalesEmpresa($empresaID);\n\n\t\t\t//codificamos el resultado en json\n\t\t\t$sucursales = json_encode($sucursales);\n\n\t\t}else{\n\n\t\t\t$sucursales = false;\n\n\t\t}\n\n\t\t\n\n\t\techo $sucursales;\n\t}", "title": "" }, { "docid": "83e33a7a15149b2d5afc27e06f4d60a2", "score": "0.7332506", "text": "public function traerCiudades(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad \" );\n $sentencia->execute(); // ejecuta -\n $respuesta= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta \n return $respuesta; \n }", "title": "" }, { "docid": "56b203bc1273efb932c429ec9e917e81", "score": "0.69664276", "text": "function listarCuentaContable(){\n\t\t$this->procedimiento='sigep.ft_cuenta_contable_sel';\n\t\t$this->transaccion='SIGEP_CUE_CONT_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_cuenta_contable','int4');\n\t\t$this->captura('des_cuenta_contable','varchar');\n\t\t$this->captura('cuenta_contable','varchar');\n\t\t$this->captura('imputable','varchar');\n\t\t$this->captura('id_cuenta','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('modelo_contable','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('gestion','int4');\n\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": "d73764f2bbd5ba0cf46b6306d64a7a53", "score": "0.6873737", "text": "function listarCuentas(){\n $this->procedimiento='cos.ft_tipo_costo_cuenta_sel';\n $this->transaccion='COS_CUE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //Definicion de la lista del resultado del query\n $this->captura('id_cuenta','int4');\n $this->captura('nro_cuenta','varchar');\n $this->captura('nombre_cuenta','varchar');\n $this->captura('desc_cuenta','varchar');\n $this->captura('nivel_cuenta','int4');\n $this->captura('tipo_cuenta','varchar');\n $this->captura('sw_transaccional','varchar');\n $this->captura('sw_auxiliar','varchar');\n $this->captura('tipo_cuenta_pat','varchar');\n $this->captura('desc_moneda','varchar');\n $this->captura('gestion','int4');\n $this->captura('sw_control_efectivo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "title": "" }, { "docid": "2940902a31fa83e11611c5bc864b6473", "score": "0.6754723", "text": "public function libroVentas()\n {\n $sql = \"select * from tb_factura AS A inner join tb_regi_cli AS B on A.codi_clie = B.codi_clie\";\n $res = mysql_query($sql, Conectar::conecta());\n\n while ($reg = mysql_fetch_assoc($res))\n {\n $this->datos[] = $reg;\n }\n\n return $this->datos;\n }", "title": "" }, { "docid": "0464b0d23fad300d67765d027138d20d", "score": "0.67456514", "text": "protected abstract function buscarContatosPendentes();", "title": "" }, { "docid": "a526ce28e6fe81f66245909f8841615b", "score": "0.67336804", "text": "function _getDatosGuardados(){\n if(($this->Campeonato == '')){\n return 'codigo de campeonato vacio, introduzca un nuevo codigo campeonato, para recuperar el campeonato que desee';\n }else{\n $sql = $this->mysqli->prepare(\"SELECT * FROM Campeonato WHERE Campeonato = ?\"); \n $sql->bind_param(\"i\", $this->Campeonato);\n $sql->execute();\n \n $resultado = $sql->get_result();\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else if($resultado->num_rows == 0){\n return 'No existe el codigo campeonato';\n}\n else{\n $fila = $resultado->fetch_row();\n \n $this->setFechaInicio($fila[1]);\n $this->setFechaFinal($fila[2]);\n $this->setNombre($fila[3]);\n }\n }\n }", "title": "" }, { "docid": "f80cc07e381e23bb2019a849a09c1356", "score": "0.6724573", "text": "function procesar_vinculo ($datos){\n \n if(strcmp($datos['tipo_asignacion'], \"CURSADA\")==0){\n $mensaje=\"No se puede seleccionar el tipo de asignacion CURSADA porque es incompatible con \"\n . \"una asignación por periodo. \";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n return ;\n }\n \n $hora_inicio_datos=\"{$datos['hora_inicio']}:00\";\n $hora_fin_datos=\"{$datos['hora_fin']}:00\";\n \n if(($hora_inicio_datos < $hora_fin_datos) && (($hora_inicio_datos >= $this->s__hora_inicio) && ($hora_inicio_datos <= $this->s__hora_fin)) && ($hora_fin_datos <= $this->s__hora_fin)){\n \n $this->registrar_asignacion($datos);\n \n $datos['fecha_fin']=$datos['fecha_inicio'];\n $datos['dias']=array($datos['fecha_inicio']);\n $this->registrar_asignacion_periodo($datos);\n \n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n $this->registrar_equipo_de_catedra($secuencia);\n $this->s__accion=\"Nop\";\n }\n else{\n $this->s__aula_disponible['hora_inicio']=$this->s__hora_inicio;\n $this->s__aula_disponible['hora_fin']=$this->s__hora_fin;\n $mensaje=\" El horario especificado no pertenece al rango disponible : {$this->s__hora_inicio} y {$this->s__hora_fin} hs \";\n toba::notificacion()->agregar($mensaje, 'info');\n }\n }", "title": "" }, { "docid": "3cfa483607134b8ee9cf04ef5380da3c", "score": "0.67139363", "text": "public function buscarOrdenesNovedad()\n {\n $GLOBALS['mensaje'] = \"\";\n\n $tipoUser = $_SESSION['perfil'];\n\n $m = new Modelo_consultas(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario,\n Config::$mvc_bd_clave, Config::$mvc_bd_hostname);\n\n $dataNew = array();\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $info = json_decode($_POST['jObject'], true);\n\n $data = $m->buscarOrdenNovedad($info['novedad'], $info['campus'], $info['edificio'], $info['piso'], $info['fechaInicio'], $info['fechaFin']);\n\n foreach ($data as $clave => $valor) {\n \t $temp1 = $valor['descripcion1'];\n\t \t\t $temp2 = $valor['descripcion2'];\n\t\t\t $temp3 = $valor['descripcion3'];\n \t $novedad1 = $m->getNombreNovedad($temp1);\n\t\t\t $novedad2 = $m->getNombreNovedad($temp2);\n\t\t\t $novedad3 = $m->getNombreNovedad($temp3);\n \t foreach ($novedad1 as $a => $b) {\n \t\t $novedad1 = $b['novedad'];\n \t }foreach ($novedad2 as $c => $d) {\n \t\t $novedad2 = $d['novedad'];\n \t }foreach ($novedad3 as $e => $f) {\n \t\t $novedad3 = $f['novedad'];\n \t }\n $arrayAux = array(\n 'numero_solicitud' => $valor['numero_solicitud'],\n 'usuario' => $valor['usuario'],\n 'telefono' => $valor['telefono'],\n 'extension' => $valor['extension'],\n 'cod_sede' => $valor['cod_sede'],\n 'codigo_campus' => $valor['codigo_campus'],\n 'codigo_edificio' => $valor['codigo_edificio'],\n 'piso' => $valor['piso'],\n 'espacio' => $valor['espacio'],\n 'cantidad1' => $valor['cantidad1'],\n 'descripcion1' => $novedad1,\n 'descripcion_novedad' => $valor['descripcion_novedad'],\n 'cantidad2' => $valor['cantidad2'],\n 'descripcion2' => $novedad2,\n 'descripcion_novedad2' => $valor['descripcion_novedad2'],\n 'cantidad3' => $valor['cantidad3'],\n 'descripcion3' => $novedad3,\n 'descripcion_novedad3' => $valor['descripcion_novedad3'],\n 'contacto' => $valor['contacto'],\n 'estado' => $valor['estado'],\n 'descripcion' => $valor['descripcion'],\n 'fecha' => $valor['fecha'],\n 'impreso' => $valor['impreso'],\n 'operario' => $valor['operario'],\n 'responsable_ejecucion' => $valor['responsable_ejecucion'],\n 'fecha_entrega_responsable' => $valor['fecha_entrega_responsable'],\n );\n array_push($dataNew, $arrayAux);\n\n \t}\n }\n\n $dataNew['mensaje'] = $GLOBALS['mensaje'];\n\n echo json_encode($dataNew);\n\n }", "title": "" }, { "docid": "52247c785e29732db30051336fc39c19", "score": "0.66774035", "text": "public function trabajosparatutores($datos){\n\t$requestData = $_POST;\n\t$columns = array( \n\t\t0 =>'usu.nombre'\n\t);\n// getting total number records without any search\n\t$sql1 = \"SELECT COUNT(usu.idusuario) as totalusuario FROM titulo tit INNER JOIN usuario usu ON tit.usuario_id_normal = usu.idusuario WHERE tit.estado = '0' GROUP BY usu.idusuario\";\n\t$query=self::ejecutarConsultaSimpleFila($sql1,$datos);\n// Revisar desde aqui\n\tif ($query) {\n\t\t$totalData = $query->totalusuario;\n\t}\n\n// SELECT tit.idtitulo, tit.titulo, tit.descripcion, usu.idusuario as ideltutor, usu.nombre, usu.apellido, usu.telefono, usu.correo FROM titulo tit INNER JOIN usuario usu ON tit.sugerir_tutor = usu.idusuario WHERE tit.estado = '0' AND tit.usuario_id_normal = '$id'\n\n\n\t$sql = \"SELECT usu.idusuario, usu.cedula, usu.nombre, usu.apellido, usu.telefono, usu.correo, usu.foto FROM titulo tit INNER JOIN usuario usu ON tit.usuario_id_normal = usu.idusuario WHERE tit.estado = '0' \";\n // \n// getting records as per search parameters\nif( isset($requestData['search']) && $requestData['search'] !== \"\" ){ //name\n\t$sql.=\" AND usu.nombre LIKE '%\".addslashes($requestData['search']['value']).\"%' GROUP BY usu.idusuario \";\n}\n// Revisar esto\n$query=self::ejecutarConsultaCantidadRow($sql,$datos);\n$totalFiltered = $query;\n$sql.=\" ORDER BY \". $columns[$requestData['order'][0]['column']].\" \".$requestData['order'][0]['dir'].\" LIMIT \".$requestData['start'].\" ,\".$requestData['length'].\" \"; // adding length\n$query=self::ejecutarConsultaTodasFilas($sql,$datos);\n$data=array();\n\nif ($query) {\n\tforeach ($query as $row) {\n\t\t$data[]=array( \"0\"=>'<div class=\"text-dark\">\n\t\t\tCedula: '.$row->cedula.'<br>Nombre y Apellido: '.$row->nombre.' '.$row->apellido.'<br>Telefono: '.$row->telefono.'<br>Correo: '.$row->correo.'<br>Ver los titulos de trabajo de grado de este usuario <button type=\"button\" class=\"btn btn-success\" onclick=\"vertitulos(\\''.$row->idusuario.'\\');\" data-toggle=\"modal\" data-target=\"#vertitulos\">Ver titulos para aprobar</button>\n\t\t\t</div>'\n\t);\n\n\t}\n}else{\n\t$data[]=array( \"0\"=>'No hay nada.');\n}\n\n$json_data = array(\n \"sEcho\"=>intval( $requestData['draw'] ), //Informacion para el datatables\n \"iTotalRecords\"=>intval( $totalData ),//enviamos el total de registros al datatable \n \"iTotalDisplayRecords\"=>intval( $totalFiltered ),//enviamos el total registros a visualizar \n \"aaData\"=>$data\n);\necho json_encode($json_data); // send data as json format\t\n}", "title": "" }, { "docid": "4a608d631dec34134fe2a561d6d53a49", "score": "0.6676613", "text": "function _getDatosGuardados(){\n if(($this->Enfrentamiento == '')){\n return 'codigo de Enfrentamiento vacio, introduzca un nuevo codigo de Enfrentamiento, para recuperar el Enfrentamiento que desee';\n }else{\n $sql = $this->mysqli->prepare(\"SELECT * FROM Enfrentamiento WHERE Enfrentamiento = ?\"); \n $sql->bind_param(\"i\", $this->Enfrentamiento);\n $sql->execute();\n \n $resultado = $sql->get_result();\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else if($resultado->num_rows == 0){\n return 'No existe el codigo Enfrentamiento';\n }\n else{\n $fila = $resultado->fetch_row();\n \n $this->setNombre($fila[1]);\n $this->setCampeonatoCategoria($fila[2]);\n $this->setPareja1($fila[3]);\n $this->setPareja2($fila[4]);\n $this->setSet1($fila[5]);\n $this->setSet2($fila[6]);\n $this->setSet3($fila[7]);\n }\n }\n}", "title": "" }, { "docid": "8785044aa82923950679a4ce90d44994", "score": "0.665611", "text": "function fechaApertura(){\n $this->procedimiento='vef.ft_entrega_sel';\n $this->transaccion='VF_ENG_FECH_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n //$this->setCount(false);\n\n //Definicion de la lista del resultado del query\n $this->captura('fecha_cierre','varchar');\n $this->captura('id_punto_venta','int4');\n $this->captura('nombre_cajero','text');\n $this->captura('nombre','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "5bb23cd573aaaeb74e2f75789541149a", "score": "0.6649855", "text": "function consulta_Trans_Ventas($aju_codigo,$usuario,$pwd)\n\t{\n\t\tglobal $DATABASE_NAME;\n\t\tglobal $dsn ;\n\t\t$username=$usuario;\n\t\t$passwd=$pwd;\n\n\t\tTry\n\t\t{\n\t\t\t$db_link = new PDO($dsn, $username, $passwd);\n\n\t\t\t$query = \"SELECT codigo, codigo_barras, referencia , fecha_solicitud , cli_codigo , aju_codigo , ppj_codigo , tp_codigo , pnc_codigo , valor_producto , valor_comision_servicio , valor_impuesto , valor_total ,\n\t\tfecha_entrega , longitud , latitud , est_codigo \n\t\tFROM trans_ventas WHERE aju_codigo = $aju_codigo \";\n\n\t\t\t$result = $db_link->query($query);\n\t\t\t$retorno = \"CODIGO|CODIGO_BARRAS|REFERENCIA|FECHA_SOLICITUD|CLI_CODIGO|AJU_CODIGO|TTP_CODIGO|TP_CODIGO|TNC_CODIGO|VALOR_PRODUCTO|VALOR_COMISION_SERVICIO|VALOR_IMPUESTO|VALOR_TOTAL|FECHA_ENTREGA|LONGITUD|LATITUD|ESTADO\";\n\t\t\t$retorno=$retorno. \"\\n\";\n\t\t\t$db_link->beginTransaction();\n\t\t\t$result->execute(); //SE EJECUTA EL QUERY\n\t\t\t$arr = $result->errorInfo(); // SE OBTIENE EL ERROR\n\t\t\t$error = $arr[0];\n\t\t\t$errorMessage = str_replace(\"'\", \"\", $arr[2]);\n\t\t\t\t\n\t\t\t/*\n\t\t\t * SI EL CODIGO DEL ERROR ES 00000 TODO ESTA BIEN CONSULTA CORRECTA\n\t\t\t * */\n\t\t\tif($error==\"00000\")\n\t\t\t{\n\t\t\t\t$db_link->commit();\n\n\t\t\t\t/*\n\t\t\t\t * PREPARA Y GENERA LA INFORMACION PARA MOSTRAR\n\t\t\t\t * */\n\t\t\t\t$array_enc=explode(\"|\",$retorno);\n\t\t\t\t$u=sizeof($array_enc);\n\t\t\t\t$j=0;\n\t\t\t\t\t\n\t\t\t\twhile($row = $result->fetch(PDO::FETCH_NUM))\n\t\t\t\t{\n\t\t\t\t\tfor($k=0; $k<$u; $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$registros[$j][$k]= ($row[$k]);\n\t\t\t\t\t\t$retorno.=$registros[$j][$k];\n\t\t\t\t\t\tif($k!=$u-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$retorno=$retorno.\"|\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$j++;\n\t\t\t\t\t$retorno=$retorno. \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$db_link->rollBack();\n\n\t\t\t\t$error_tipo = 'mysql';\n\t\t\t\t$error_archivo = 'server.argos.class.php';\n\t\t\t\t$error_accion = 'consulta_Trans_Ventas';\n\n\t\t\t\t$consulta= new Consultas();\n\t\t\t\t$consulta->set_logs_errors($usuario,$pwd,$error_accion,$error_archivo,$error_tipo,$error,$errorMessage,$query,$ip,$longitud,$latitud);\n\t\t\t\t//echo $msg=\"Ha ocurrido un error al intentar obtener la informacion $errorMessage\";\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$retorno = '0';\n\t\t}\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "4ac676eddd6a6c7efc724825ed432ed8", "score": "0.6636899", "text": "function recuperarTodasLasVentas($id_carrito){\n\t$link=conectarBaseDatos();\n\tif($link != \"error\"){\n\t\t$query=$link->prepare(\"\tSELECT * FROM `venta` as v\n\t\t\t\t\t\t\t\tINNER JOIN `libroventa` as lv ON v.id_venta=lv.id_venta\n\t\t\t\t\t\t\t\tINNER JOIN `estado_venta` as ev ON v.estado_venta=ev.id_estado\n\t\t\t\t\t\t\t\tINNER JOIN `libro`\tas l ON lv.id_libro=l.id_libro\n\t\t\t\t\t\t\t\tWHERE id_carrito=:IdCarrito ORDER BY `fecha` DESC\");\n\t\t$res=$query->execute(array('IdCarrito'=>$id_carrito));\n\t\t$res= $query->fetchAll();\n\t\t$link=cerrarConexion();\n\t\treturn $res;\n\t}\n}", "title": "" }, { "docid": "cf9fd31de017f2a510835fb844ecaf6c", "score": "0.6636717", "text": "function clientesVenta($id)\n{\n \t$cnn = new Conexion();\n\t$con = $cnn->conexionMysql();\n\t$estado=\"Activo\";\n\t$completo=\"\";\n\t$sql = \"SELECT * FROM cliente where documento_Identidad='$id'\";\n\tmysqli_select_db($con,\"sistemaferreteria\");\n\t\t$consulta1 = $con->query($sql);\n\t\t$fila=$consulta1->fetch_assoc();\n\t\t$completo= \"<b>Nombre completo: </b>\".$fila[\"nombre\"].\" \".$fila[\"apellidos\"].\" <br><b>Documento Identidad: </b>\".$fila[\"documento_Identidad\"].\"<br><b>Direccion :</b>\".$fila[\"direccion\"].\"<br><b>Telefono :</b>\".$fila[\"telefono\"];\n\t\t$consulta1->free();\n\t$con->close();\n\treturn $completo;\n}", "title": "" }, { "docid": "4b5cb32269c8845c0aab6fc886894f48", "score": "0.6627719", "text": "public function getEstacionalidadVentas(){\n // Hace la consulta y lo guarda en una variable\n $estVen = \\DB::select('CALL II_pro_select_estacionalidad_ventas_id(?)', array(\\Auth::user()->id_usuario));\n \n // Variable que tendrá un botón html para agregar o borrar el contenido de la tabla\n // Por defecto tendrá el de agregar\n $boton = '<a href=\"#FormEstacionVentas\" class=\"modal-effect btn btn-oblong btn-success\" data-toggle=\"modal\" data-effect=\"effect-slide-in-bottom\">Agregar</a>';\n\n // La estructura del datatable se guarda en una variable\n // Primero las cabeceras\n $tabla = '\n <table id=\"TablaEstacionVentas\" class=\"table display responsive nowrap\">\n <thead>\n <tr>\n <th>Número del Mes</th>\n <th>Nombre del Mes</th>\n <th>Ventas del Mes</th>\n <th>Promedio del Mes</th>\n <th>Índice</th>\n </tr>\n </thead>\n <tbody>';\n // Luego con los datos obtenidos de la consulta se guardan en filas\n foreach($estVen as $row){\n $tabla .= '\n <tr>\n <td>'.$row->n_mes.'</td>\n <td>'.$row->mes_estacionalidad_ventas.'</td>\n <td>'.$row->variacion_ventas_estacionalidad_ventas.'</td>\n <td>'.$row->promedio_mes_estacionalidad_ventas.'</td>\n <td>'.$row->indice_estacionalidad_ventas.'</td>\n </tr>\n ';\n // Cuando se encuentre al menos un registro se cambiará al botón de borrar\n $boton = '<button onclick=\"borrarEstacionVentas('.\\Auth::user()->id_usuario.')\" class=\"btn btn-oblong btn-danger mg-l-10\">Eliminar todos los registros</button>';\n }\n \n // Finalmente las etiquetas de cierre\n $tabla .='\n </tbody>\n </table>';\n \n // Retorna la tabla\n // return $tabla;\n\n return response()->json([\n 'tabla' => $tabla,\n 'boton' => $boton\n ]);\n \n }", "title": "" }, { "docid": "a525a0cee8897bf8901ff385c01aa0ba", "score": "0.6593319", "text": "public function buscarContatos() {\r\n\r\n\t\t$rows = array();\r\n\t\t$descartados = array();\r\n\t\t\r\n\t\t$sql = $this->buscarContatosPendentes();\r\n\t\t\r\n\t\t$rs = $this->query($sql);\r\n\t\t\r\n\t\twhile($row = pg_fetch_object($rs)) {\r\n\t\t\t\r\n\t\t\t$contrato = new AtendimentoAutomaticoContratoVO($row);\r\n\t\t\t\r\n\t\t\tif ($this->descartar($contrato)) {\r\n\t\t\t\t$descartados[] = $row->codigo;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tratar($contrato);\r\n\t\t\t\r\n\t\t\t$contatos = $this->buscarTelefones($contrato); // @TODO O que deve acontecer quando não achar telefones ?\r\n\t\t\t\r\n\t\t\t$rows[$contrato->codigo] = $contatos;\r\n\t\t}\r\n\t\t\r\n\t\techo '<pre>';\r\n\t\techo 'DESCARTADOS INI: <hr>';\r\n\t\tprint_r($descartados);\r\n\t\techo 'DESCARTADOS FIM: <hr>';\r\n\t\t\r\n\t\treturn $rows;\r\n\t}", "title": "" }, { "docid": "3dae276871c18192fb7b5151e98f418d", "score": "0.65916806", "text": "public function get_detalle_nueva_orden($id_paciente,$venta_numero){\n $conectar=parent::conexion();\n parent::set_names();\n $sql=\"select p.id_paciente,p.telefono_oficina,p.nombres,p.dui,p.nit,p.ocupacion,p.edad,p.telefono,e.nombre,v.subtotal,v.subtotal/c.plazo as cuotas,c.plazo,c.finaliza_credito,v.numero_venta,p.correo from empresas as e inner join pacientes as p on p.id_empresas=e.id_empresas inner join ventas as v on v.id_paciente=p.id_paciente join creditos as c where c.id_paciente=v.id_paciente and p.id_paciente=? and v.numero_venta=?;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$id_paciente);\n $sql->bindValue(2,$venta_numero);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "3b3fdd380d36cb70a91789af12cf0b4d", "score": "0.65859824", "text": "function consultar() {\r\n $codProyecto = (isset($_REQUEST['codProyecto']) ? $_REQUEST['codProyecto'] : '');\r\n $codFacultad = (isset($_REQUEST['codFacultad']) ? $_REQUEST['codFacultad'] : '');\r\n if (!is_numeric($codFacultad)) {\r\n echo \"Por favor regrese y seleccione facultad\";\r\n exit;\r\n }\r\n //consulta los proyectos de la facultad con registros de carga de inscripciones\r\n $proyectos = $this->consultarProyectosFacultad($codFacultad);\r\n if (is_array($proyectos)) {\r\n foreach ($proyectos as $proyecto) {\r\n $codProyecto = $proyecto['CODIGO_CARRERA'];\r\n $variablesInscritos = array('ano' => $this->ano,\r\n 'periodo' => $this->periodo,\r\n 'codProyecto' => $codProyecto);\r\n //consultar preinscripciones por demanda del proyecto\r\n $resultadoInscritos = $this->consultarEspaciosInscritosPreinscripcion($variablesInscritos);\r\n if (is_array($resultadoInscritos) && !empty($resultadoInscritos)) {\r\n //extraer codigos de estudiantes con espacios preinscritos\r\n $estudiantes = '';\r\n foreach ($resultadoInscritos as $key => $estudiante) {\r\n $estudiantes[] = $estudiante['COD_ESTUDIANTE'];\r\n }\r\n //consultar datos de estudiantes en tabla de carga\r\n $estudiantes = array_unique($estudiantes);\r\n $espacios = '';\r\n $preinscritosPorBorrar = '';\r\n foreach ($estudiantes as $key => $codEstudiante) {\r\n $datosEstudiante = $this->consultarDatosEstudiante($codEstudiante);\r\n //extraer datos de espacios por cursar\r\n $espacios = json_decode($datosEstudiante['ESPACIOS_POR_CURSAR'], true);\r\n unset($datosEstudiante);\r\n //comparar espacios preinscritos que no esten en espacios por cursar\r\n $borrar = 1;\r\n foreach ($resultadoInscritos as $preinscritos) {\r\n if ($preinscritos['COD_ESTUDIANTE'] == $codEstudiante) {\r\n if (is_array($espacios) && !empty($espacios)) {\r\n foreach ($espacios as $porCursar) {\r\n //si esta no lo borra\r\n if ($preinscritos['ASI_CODIGO'] == $porCursar['CODIGO']) {\r\n $borrar = 0;\r\n break;\r\n }\r\n }\r\n if ($borrar == 1) {\r\n //si el preinscrito no esta en los espacios por cursar se inactiva\r\n $inactivo = $this->inactivarPreinscripcionErronea($preinscritos);\r\n $preinscritos['inactivo'] = $inactivo;\r\n $preinscritosPorBorrar[] = $preinscritos;\r\n } else {\r\n $borrar = 1;\r\n }\r\n } else {\r\n $inactivo = $this->inactivarPreinscripcionErronea($preinscritos);\r\n $preinscritos['inactivo'] = $inactivo;\r\n $preinscritosPorBorrar[] = $preinscritos;\r\n }\r\n }\r\n }\r\n unset($espacios);\r\n }\r\n unset($estudiantes);\r\n //presenta reporte de inactivaciones por proyecto\r\n $this->presentarReportePreinscripciones($preinscritosPorBorrar, $codProyecto);\r\n $preinscritosPorBorrar = '';\r\n } else {\r\n $this->presentarReportePreinscripciones($preinscritosPorBorrar, $codProyecto);\r\n $preinscritosPorBorrar = '';\r\n }\r\n unset($resultadoInscritos);\r\n }\r\n }\r\n ?>\r\n <table ><hr>\r\n <tr>\r\n <td class='sin_inscripciones' >\r\n Total espacios preinscritos inactivados: <? echo $this->todas; ?>.\r\n </td>\r\n </tr>\r\n </table>\r\n <?\r\n }", "title": "" }, { "docid": "690ef54c570bb4ef8e27e9fb19581f59", "score": "0.6558521", "text": "public function buscarproveedor() {\n $contacto = new proveedor($this->adapter);\n $allcontac = $contacto->getAll();\n echo json_encode($allcontac);\n }", "title": "" }, { "docid": "3d5a98a0863516d346281bcc74a60ea8", "score": "0.6549351", "text": "function datosNomina($idNomina){\n $pdo = new conexion();\n $query = $pdo->prepare(\"SELECT * FROM nomina WHERE idNomina = '\"\n .$idNomina.\"';\");\n $query->execute();\n $res = $query->fetchAll();\n foreach ($res as $value) {\n $this->idNomina = $value['idNomina'];\n $this->fechaInicial = $value['fechaInicial'];\n $this->fechaFinal = $value['fechaFinal'];\n $this->periodo = $value['periodo'];\n $this->diasTrabajados = $value['DiasTrabajados'];\n $this->pagoTotal = $value['pagoTotal'];\n $this->idEmpleado = $value['idEmpleado'];\n }\n }", "title": "" }, { "docid": "938f30f3dfbe46f6bdcd8642e7f42e50", "score": "0.65465146", "text": "function listarReporteCuenta(){\n\t\t$this->procedimiento='obingresos.ft_reporte_cuenta_sel';\n\t\t$this->transaccion='OBING_ENT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n\t\t\t\t$this->setParametro('fecha_fin','fecha_fin','varchar');\n\t\t\t\t$this->setParametro('fecha_ini','fecha_ini','varchar');\n\t\t\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t\t\t$this->setParametro('tipo','tipo','varchar');\n\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n $this->captura('id_agencia','int4');\n\t\t\t\t$this->captura('nombre','varchar');\n $this->captura('tipo','varchar');\n $this->captura('pnr','varchar');\n $this->captura('fecha','date');\n $this->captura('autorizacion__nro_deposito','text');\n $this->captura('billete','varchar');\n $this->captura('comision','numeric');\n $this->captura('importe','numeric');\n $this->captura('neto','numeric');\n\t\t\t\t$this->captura('saldo','numeric');\n\t\t\t\t$this->captura('tipo_credito','varchar');\n\t\t\t\t$this->captura('tipo_ajustes','varchar');\n $this->captura('garantia','numeric');\n //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->respuesta);exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "4cd94427b8c59a87e6c7478de4c2e25b", "score": "0.65430325", "text": "function recuperarTodasLasVentasGenerales(){\n\t$link=conectarBaseDatos();\n\tif($link != \"error\"){\n\t\t$query=$link->prepare(\"\tSELECT * FROM `venta` as v\n\t\t\t\t\t\t\t\tINNER JOIN `carrito` as c ON v.id_carrito=c.id_carrito\n\t\t\t\t\t\t\t\tINNER JOIN `usuario` as u ON c.id_usuario=u.id_usuario\n\t\t\t\t\t\t\t\tINNER JOIN `libroventa` as lv ON v.id_venta=lv.id_venta\n\t\t\t\t\t\t\t\tINNER JOIN `estado_venta` as ev ON v.estado_venta=ev.id_estado\n\t\t\t\t\t\t\t\tINNER JOIN `libro`\tas l ON lv.id_libro=l.id_libro\n\t\t\t\t\t\t\t\tORDER BY `fecha` DESC\");\n\t\t$res=$query->execute();\n\t\t$res= $query->fetchAll();\n\t\t$link=cerrarConexion();\n\t\treturn $res;\n\t}\n}", "title": "" }, { "docid": "c1de7650a100e5f7f8db7519fdacc838", "score": "0.6540977", "text": "public function obtenerDatos($id){\n $this->pedido = Pedido::find($id);\n // Obtenemos los datos del pedido para verlos en el form\n $this->pedido_id = $this->pedido->id;\n $this->ref = $this->pedido->ref;\n $this->estado = $this->pedido->estado;\n $this->total = $this->pedido->total;\n $this->observaciones = $this->pedido->observaciones;\n $this->pago = $this->pedido->pago;\n\n // Obtenemos las lineas del pedido\n $this->lineaspedidos = $this->pedido->lineaspedido;\n\n // Obtenenos el pedido del pedido\n $this->usuario = $this->pedido->usuario;\n $this->name = $this->usuario->name;\n $this->email = $this->usuario->email;\n $this->telefono = $this->usuario->telefono;\n\n\n // Comprobamos si el pedido tiene direccion\n $idDireccion = $this->usuario->direccion;\n if(isset($idDireccion)){\n $this->direccion = Direccion::find($idDireccion->direccion_id);\n\n $this->tipo_via = $this->direccion->tipo_via;\n $this->nombre_via = $this->direccion->nombre_via;\n $this->numero = $this->direccion->numero;\n $this->planta = $this->direccion->planta;\n $this->puerta = $this->direccion->puerta;\n $this->localidad = $this->direccion->localidad;\n $this->provincia = $this->direccion->provincia;\n $this->codigo_postal = $this->direccion->codigo_postal;\n $this->pais = $this->direccion->pais;\n $this->dni = $this->direccion->dni;\n\n }\n\n }", "title": "" }, { "docid": "847a617cf31239a9b70b9cb220dbdd97", "score": "0.6536219", "text": "function listado_pagos_casa($venta){\n// where vprod_ven_id='$venta->ven_id' and vprod_estado='Pendiente'\n// order by vprod_id asc limit 0,1\");\n \n $venta_producto = FUNCIONES::obtener_producto($venta->ven_id);\n \n ?>\n <div class=\"box-plan box-plan-casa\"> \n <br><br>\n <?php\n $this->cabecera_venta_producto($venta_producto);\n ?>\n <br><br><center><h2>SEGUIMIENTO DE CUOTAS</h2>\n <table width=\"100%\" class=\"tablaReporte\" cellpadding=\"0\" cellspacing=\"0\">\n <thead>\n <tr>\t\t \t\n <th >Id</th>\n <th >Usuario</th>\n <th >Nro. Cuota</th>\n <th>Interes </th>\n <th>Capital </th>\n <th>Cuota </th>\n <th>Form. </th>\n <th>Monto </th>\n <th>F. Prog.</th>\n <th>F. Pag.</th>\n <th class=\"tOpciones\">Int. Pag.</th>\n <th class=\"tOpciones\">Cap. Pag.</th>\n <th >Dif. Capital</th>\n <th>Cuota Pag.</th>\n \n <!--<th >Mora Pag.</th>-->\n <!--<th>Form.</th>-->\n <th class=\"tOpciones\">Form Pag.</th>\n <th class=\"tOpciones\">Envio Pag.</th>\n <th>Monto. Pag.</th>\n \n <th>Desc.</th>\n <th>Inc.</th>\n <th>Saldo</th>\n <!--<th>Costo</th>-->\n <?php\n $tiene_intereses = FUNCIONES::tiene_intereses($venta->ven_id);\n if (!$tiene_intereses) { \n ?>\n <th>Dias Retraso</th>\n <th>Multa</th>\n <?php\n }\n ?>\n <th>Estado</th>\n <!--<th class=\"tOpciones\">&nbsp;</th>-->\n </tr>\n </thead>\n <tbody>\n <?php\n $conec= new ADO();\n $sql=\"SELECT idpr_id,idpr_monto,idpr_moneda,idpr_concepto,idpr_fecha,idpr_estado,idpr_monto_parcial,int_nombre,\n int_apellido,idpr_fecha_programada,idpr_fecha_pago,idpr_interes,idpr_capital,idpr_saldo,\n idpr_estado_mora,idpr_tabla_id, idpr_estado_parcial,idpr_interes_pagado,idpr_capital_pagado, \n idpr_monto_pagado, idpr_saldo_final, idpr_mora,idpr_mora_pagado,idpr_form,idpr_form_pagado,idpr_num_correlativo,idpr_usu_id,\n idpr_costo_pagado,idpr_capital_desc,idpr_capital_inc,idpr_venta_id,idpr_envio_pagado\n FROM \n interno_deuda_producto inner join interno on (idpr_tabla='venta_producto' and(idpr_estado='Pendiente' or idpr_estado='Pagado') and idpr_tabla_id='\".$venta_producto->vprod_id.\"' and idpr_int_id=int_id)\t\t\n order by idpr_id asc\";\n \n// echo $sql.'<br>';\n $conec->ejecutar($sql);\n $num=$conec->get_num_registros();\n $conversor = new convertir();\n //$form= FUNCIONES::atributo_bd_sql(\"select urb_val_form as campo from urbanizacion where urb_id='$venta->ven_urb_id'\");\n $form = $venta->ven_form;\n if (!$tiene_intereses) {\n $arr_dias_retr = FUNCIONES::array_dias_retraso($venta->ven_id, date('Y-m-d'));\n $total_multa = 0;\n }\n\t\t\t\t?>\n \n <?php for($i=0;$i<$num;$i++){ ?>\n <?php $cu=$conec->get_objeto(); ?>\n <?php $total_pagado=$cu->idpr_interes_pagado+$cu->idpr_capital_pagado+$cu->idpr_form_pagado+$cu->idpr_envio_pagado+$cu->idpr_mora_pagado; ?>\n <tr>\n <td><?php echo $cu->idpr_id;?></td>\n <td><?php echo $cu->idpr_usu_id;?></td>\n <td>\n <?php \n if($cu->idpr_num_correlativo>=0){\n echo $cu->idpr_num_correlativo>0?\"<b># $cu->idpr_num_correlativo</b>\":($cu->idpr_num_correlativo==0?'Cuota Inicial':'');\n }else{\n if($cu->idpr_num_correlativo==-3){\n echo \"<b>FV $cu->idpr_venta_id</b>\";\n }else{\n if($cu->idpr_capital_desc>0 && $cu->idpr_capital_inc>0){\n echo \"<b>Desc., Inc.</b>\";\n }elseif($cu->idpr_capital_desc>0){\n echo \"<b>Desc.</b>\";\n }elseif($cu->idpr_capital_inc>0){\n echo \"<b>Inc.</b>\";\n }\n }\n }\n ?>\n </td> \n <td><?php echo number_format($cu->idpr_interes, 2);?></td>\n <td><?php echo number_format($cu->idpr_capital, 2);?></td>\n <td><?php echo number_format($cu->idpr_monto, 2);?></td>\n <td><?php echo number_format($form, 2);?></td>\n <td><?php echo number_format($form+$cu->idpr_monto, 2);?></td>\n <td style=\"color:<?php echo $cu->idpr_fecha_programada < date('Y-m-d') && $cu->idpr_estado=='Pendiente'?'#ff0000':'000'?>\"><?php echo FUNCIONES::get_fecha_latina($cu->idpr_fecha_programada);?></td>\n <td><?php echo $cu->idpr_capital_pagado>0 || $cu->idpr_capital_desc>0 || $cu->idpr_capital_inc>0 ?FUNCIONES::get_fecha_latina($cu->idpr_fecha_pago):'';?></td>\n <td><?php echo $total_pagado>0?number_format($cu->idpr_interes_pagado, 2):'';?></td>\n <td><?php echo $total_pagado>0?number_format($cu->idpr_capital_pagado, 2):'';?></td>\n <?php $dif_capital=$total_pagado>0?$cu->idpr_capital-$cu->idpr_capital_pagado:0;?>\n <td><?php echo $dif_capital>0?number_format($dif_capital, 2):'';?></td>\n \n <td><?php echo $total_pagado>0?number_format($cu->idpr_monto_pagado, 2):'';?></td>\n \n <td><?php echo $total_pagado>0?number_format($cu->idpr_form_pagado, 2):'';?></td>\n <td><?php echo $total_pagado>0?number_format($cu->idpr_envio_pagado, 2):'';?></td>\n <td><?php echo $total_pagado>0?number_format($total_pagado, 2):'';?></td>\n <td><?php echo $cu->idpr_capital_pagado>0 || $cu->idpr_capital_desc>0?number_format($cu->idpr_capital_desc, 2):'';?></td>\n <td><?php echo $cu->idpr_capital_pagado>0 || $cu->idpr_capital_inc>0?number_format($cu->idpr_capital_inc, 2):'';?></td>\n <?php \n if($cu->idpr_capital_pagado>0){\n $saldo_ini=$cu->idpr_saldo+$cu->idpr_capital;\n $saldo_fin=$saldo_ini-$cu->idpr_capital_pagado-$cu->idpr_capital_desc+$cu->idpr_capital_inc;\n }else{\n $saldo_fin=$cu->idpr_saldo;\n }\n ?>\n <td><?php echo $cu->idpr_estado=='Pagado'?number_format($cu->idpr_saldo_final, 2):number_format($saldo_fin, 2);?></td>\n <!--<td><?php // echo $total_pagado>0?number_format($cu->idpr_costo_pagado, 2):'';?></td>-->\n <?php\n if (!$tiene_intereses) {\n ?>\n <td >\n <?php \n $dias_retraso = $arr_dias_retr[$cu->idpr_id];\n echo $dias_retraso;\n ?>\n </td>\n <td >\n <?php \n $multa_dia = $dias_retraso * $venta->ven_multa_dia;\n echo $multa_dia;\n $total_multa += $multa_dia;\n ?>\n </td>\n <?php\n }\n ?>\n <td >\n <span class=\"reg_estado <?php echo $cu->idpr_estado=='Pagado'?'est_green':($cu->idpr_capital_pagado+$cu->idpr_interes_pagado>0?'est_gold':'est_red');?>\">\n <?php echo $cu->idpr_estado;?>\n </span>\n </td>\n <!--<td>\n <?php // if($cu->idpr_venta_id>0){?>\n <img class=\"det_venta\" src=\"images/b_browse.png\" data-id=\"<?php echo $cu->idpr_venta_id;?>\">\n <?php // }else{?>\n <?php // if($cu->idpr_capital_pagado+$cu->idpr_interes_pagado+$cu->idpr_mora_pagado+$cu->idpr_form_pagado>0){?>\n <img class=\"det_pagos\" data-id=\"<?php echo $cu->idpr_id;?>\" src=\"images/b_browse.png\">\n <?php // } ?>\n <?php // } ?>\n </td>-->\n </tr>\n <?php $conec->siguiente(); ?>\n <?php \n } \n if (!$tiene_intereses) {\n ?>\n <tr>\n <td colspan=\"21\">&nbsp;</td>\n <td colspan=\"1\"><?php echo number_format($total_multa, 2, '.', ',');?></td>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <?php\n }\n ?>\n </tbody> \n </table>\n </center>\n </div>\n <?php\n }", "title": "" }, { "docid": "279b55d487da889a64587aa5aab4ff10", "score": "0.65271175", "text": "public function carritoSelectores()\n {\n $data = array();\n $result = 0;\n $existe = false;\n $key = $_POST['linAcc'];\n if (!is_null($_SESSION['carritoSelec'])) {\n $data = $_SESSION['carritoSelec'];\n }\n if (isset($_POST['linAcc'])) {\n foreach ($data as $r) {\n if ($r->iIdLineaAccion == $key) {\n $existe = true;\n if ($r->iActivo == 1) {\n $result = 0;\n break;\n } else {\n $r->iActivo = 1;\n $result = 1;\n break;\n }\n }\n }\n if ($existe === false) {\n $instrumento = $this->pat->getRecord($key);\n if (isset($instrumento[0])) {\n $instrumento = $instrumento[0];\n $instrumento->iActivo = 1;\n $data[] = $instrumento;\n $result = 1;\n }\n }\n }\n echo json_encode($result);\n $_SESSION['carritoSelec'] = $data;\n //print_r($data);\n }", "title": "" }, { "docid": "04957c29cb26337755101e6bbcb15f27", "score": "0.65266645", "text": "function ResumenEstadoCC(){\n $this->procedimiento='obingresos.ft_reporte_cuenta_sel';\n $this->transaccion='OBING_ENT_RE';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('tipo','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric');\n $this->captura('aux','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b614ada9ed6f3a56bd01d0a962018cbc", "score": "0.6515355", "text": "public function obtenerElementos(){\r\n\r\n //haremos una select a la base de datos\r\n $sql = \"SELECT * FROM \".$this->tabla.\";\";\r\n\r\n //ahora generamos un archivo conexion que envia la consulta y nos retorne una estructura de datos con la peticion que hacemos a la base de datos\r\n\r\n\r\n $conexion = new Bd();\r\n $res = $conexion -> consulta($sql);\r\n\r\n //print_r($res); esto era para comprobar solo\r\n\r\n //ahora tenemos que coger cada fila de la base de datos que hemos traido ( con la funcion list)\r\n //asignarle una variable , en el mismo orden que la base de datos\r\n //meter el dato\r\n //y luego crear un objeto con esos datos\r\n\r\n while(list($id, $nombre, $pais, $estilo, $unidades, $precio, $coleccion, $foto, $descripcion) = mysqli_fetch_array($res)) { //mysqli_fetch_array esto hace coger el array de sql y lo devuelve de una manera que php pueda interpretar bien, para que el list pueda asignarle las variables\r\n\r\n $fila = new Cerveza($id, $nombre, $pais, $estilo, $unidades, $precio, $coleccion, $foto, $descripcion);\r\n array_push($this->lista,$fila);\r\n //cada vez que el while coge una linea de la respuesta de mysql la convierta en variable, luego construya un objeto con esas variable y lo inserto en la lista.\r\n }\r\n\r\n //traza($this); con esto comprobamos que traemos los datos de la base de datos y los sacamos arriba de la pagina\r\n }", "title": "" }, { "docid": "a575c8fb754c71880764ac035a3e57c5", "score": "0.6508686", "text": "public function listarNaoConfirmados(){\n $sql = SELECT . VIEW_CANCELAMENTO;\n\n require_once(IMPORT_VVISUALIZACAO_CANCELAMENTO);\n\n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //executa o script de select no bd\n $select = $PDO_conex->query($sql);\n $cont = 0;\n \n /* $select->fetch no formado pdo retorna os dados do BD\n também retorna com característica do PDO como o fetch\n é necessário especificar o modelo de conversão.\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\n $listVisualizacao_cancelamentos[] = new Vvisualizacao_cancelamento();\n $listVisualizacao_cancelamentos = null;\n while($rsVisualizacao_cancelamentos=$select->fetch(PDO::FETCH_ASSOC)){\n \n $vvisualizacao_cancelamento = new Vvisualizacao_cancelamento();\n\n $vvisualizacao_cancelamento->setIdCancelamento($rsVisualizacao_cancelamentos[\"idCancelamento\"]);\n $vvisualizacao_cancelamento->setIdLocacao($rsVisualizacao_cancelamentos[\"idLocacao\"]);\n $vvisualizacao_cancelamento->setIdCliente($rsVisualizacao_cancelamentos[\"idCliente\"]);\n $vvisualizacao_cancelamento->setMotivo($rsVisualizacao_cancelamentos[\"motivo\"]);\n $vvisualizacao_cancelamento->setConfirmacao($rsVisualizacao_cancelamentos[\"confirmacao\"]);\n $vvisualizacao_cancelamento->setNome($rsVisualizacao_cancelamentos[\"nome\"]);\n\n $listVisualizacao_cancelamentos[$cont] = $vvisualizacao_cancelamento;\n\n $cont++;\n }\n\n $this->conex->closeDataBase();\n\n return($listVisualizacao_cancelamentos);\n\n}", "title": "" }, { "docid": "1791d50790ee0954e440eebd12fd4a37", "score": "0.65061986", "text": "public function getVentaXId($id)\n {\n /*$aux_venta= venta::with('productosenventa.producto','serviciosenventa','cliente','pago','puntoventa.empleado')\n ->where(\"documentoventa.codigoventa\",\"=\", $id)->get();\n\n $aux_puntoVenta= puntoventa::with('empleado', 'establecimiento')->where(\"idpuntoventa\",\"=\",$aux_venta[0]->idpuntoventa)->limit(1)->get();\n $aux_cliente=cliente::where(\"codigocliente\",\"=\",$aux_venta[0]->codigocliente)->get();\n $aux_data = array(\n \"venta\" => $aux_venta,\n \"puntoventa\" => $aux_puntoVenta,\n \"cliente\"=> $aux_cliente\n );\n return $aux_data;*/\n /*return Cont_DocumentoNotaCreditFactura::with(\"cliente\",\"Cont_ItemNotaCreditFactura.cont_catalogoitem\",\"cont_puntoventa\")\n ->whereRaw(\" iddocumentoventa='$id' \")\n ->get();*/\n $datadocventa=Cont_DocumentoNotaCreditFactura::whereRaw(\" iddocumentonotacreditfactura='$id' \")->get();\n $dataclient=Cliente::join(\"persona\",\"persona.idpersona\",\"=\",\"cliente.idpersona\")\n ->join(\"sri_tipoimpuestoiva\",\"sri_tipoimpuestoiva.idtipoimpuestoiva\",\"=\", \"cliente.idtipoimpuestoiva\")\n ->join(\"cont_plancuenta\", \"cont_plancuenta.idplancuenta\",\"=\",\"cliente.idplancuenta\")\n ->whereRaw(\" cliente.idcliente=\".$datadocventa[0]->idcliente.\" \")\n ->get();\n /*$dataitemventa=Cont_ItemNotaCreditFactura::with(\"cont_catalogoitem\")\n ->whereRaw(\" iddocumentoventa=$id \")\n ->get();*/\n $dataitemventa=Cont_ItemNotaCreditFactura::join(\"cont_catalogitem\",\"cont_catalogitem.idcatalogitem\",\"=\",\"cont_itemnotacreditfactura.idcatalogitem\")\n ->join(\"sri_tipoimpuestoiva\",\"sri_tipoimpuestoiva.idtipoimpuestoiva\",\"=\",\"cont_catalogitem.idtipoimpuestoiva\")\n ->selectRaw(\"*\")\n ->selectRaw(\"sri_tipoimpuestoiva.porcentaje as PorcentIva \")\n ->selectRaw(\" (SELECT aux_ice.porcentaje FROM sri_tipoimpuestoice aux_ice WHERE aux_ice.idtipoimpuestoice=cont_catalogitem.idtipoimpuestoice ) as PorcentIce \")\n ->selectRaw(\"( SELECT concepto FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta) as concepto\")\n ->selectRaw(\"( SELECT controlhaber FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta) as controlhaber\")\n ->selectRaw(\"( SELECT tipocuenta FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta) as tipocuenta\")\n ->selectRaw(\"( SELECT concepto FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta_ingreso) as conceptoingreso\")\n ->selectRaw(\"( SELECT controlhaber FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta_ingreso) as controlhaberingreso\")\n ->selectRaw(\"( SELECT tipocuenta FROM cont_plancuenta WHERE idplancuenta=cont_catalogitem.idplancuenta_ingreso) as tipocuentaingreso\")\n ->selectRaw(\"(SELECT f_costopromedioitem(cont_catalogitem.idcatalogitem,'') ) as CostoPromedio\")\n ->whereRaw(\" iddocumentonotacreditfactura=$id \")\n ->get();\n\n $dataConta=Cont_Transaccion::whereRaw(\" idtransaccion=\".$datadocventa[0]->idtransaccion.\"\")->get();\n $full_data_venta= array(\n 'Venta' => $datadocventa,\n 'Cliente' => $dataclient,\n 'Items' => $dataitemventa,\n 'Contabilidad'=> $dataConta\n );\n return $full_data_venta;\n\n }", "title": "" }, { "docid": "78cd2e3cd75cde3b1b2e96550e90e22e", "score": "0.650302", "text": "function listarEntrega(){\n\t\t$this->procedimiento='vef.ft_entrega_sel';\n\t\t$this->transaccion='VF_ENG_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setParametro('id_punto_venta','id_punto_venta','integer');\n $this->setParametro('tipo_usuario','tipo_usuario','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_entrega_brinks','int4');\n\t\t$this->captura('fecha_recojo','date');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('arqueo_moneda_local','numeric');\n $this->captura('arqueo_moneda_extranjera','numeric');\n $this->captura('id_punto_venta','int4');\n $this->captura('nombre_punto_venta','varchar');\n $this->captura('estacion','varchar');\n $this->captura('codigo','varchar');\n $this->captura('cajero','text');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "7924888084e21c3494fce23ca96fc15e", "score": "0.6498454", "text": "function getPuntoVenta(){\n $this->procedimiento='vef.ft_entrega_ime';\n $this->transaccion='VF_ENG_GET';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_punto_venta','id_punto_venta','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "4d6a7a6974e03a73d1706fd3cc2e3d8f", "score": "0.6497875", "text": "function polizas_en_vencimiento(){\n $sql = \n 'SELECT\n contratos.Numero,\n contratos.Objeto,\n tbl_terceros.Nombre AS Contratista,\n poliza_tipo.Poliza_Tipo,\n contratos_polizas.Fecha_Final,\n DATEDIFF(contratos_polizas.Fecha_Final, CURDATE()) AS Dias_Vencidos\n FROM\n contratos_polizas\n INNER JOIN poliza_tipo ON poliza_tipo.Pk_Id_Poliza_Tipo = contratos_polizas.Fk_Id_Poliza_Tipo\n INNER JOIN contratos ON contratos_polizas.Fk_Id_Contratos = contratos.Pk_Id_Contrato\n INNER JOIN tbl_terceros ON tbl_terceros.Pk_Id_Terceros = contratos.Fk_Id_Terceros\n WHERE\n (contratos_polizas.Fecha_Final - CURDATE()) BETWEEN 0 AND 5\n ORDER BY\n contratos.Numero ASC,\n poliza_tipo.Pk_Id_Poliza_Tipo ASC';\n \n //Se retorna la consulta\n return $this->db->query($sql)->result(); \n }", "title": "" }, { "docid": "8a9eaf95d00f57552eb84f26ea270470", "score": "0.6471695", "text": "function reporteGenrealCuenta(){\n $this->procedimiento='obingresos.ft_reporte_cuenta_sel';\n $this->transaccion='OBING_RERE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n\t\t\t\t$this->setParametro('fecha_fin','fecha_fin','varchar');\n //$this->setParametro('fecha_ini','fecha_ini','varchar');\n $this->setParametro('id_lugar','id_lugar','int4');\n $this->setParametro('tipo_agencia','tipo_agencia','varchar');\n $this->setParametro('forma_pago','forma_pago','varchar');\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('nombre','varchar');\n $this->captura('codigo_int','varchar');\n $this->captura('tipo_agencia','varchar');\n $this->captura('formas_pago','varchar');\n $this->captura('codigo_ciudad','varchar');\n $this->captura('monto_creditos','numeric');\n $this->captura('garantia','numeric');\n $this->captura('monto_debitos','numeric');\n $this->captura('monto_ajustes','numeric');\n\t\t\t\t$this->captura('saldo_con_boleto','numeric');\n $this->captura('saldo_sin_boleto','numeric');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //var_dump( $this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "457bb832a84a570b006f2545945a26b2", "score": "0.64603484", "text": "function getDatos(){\n $res = $this->Consulta('SELECT * FROM '.$this->Table .' WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n print_r( json_encode( $res[0] ) );\n }", "title": "" }, { "docid": "f2ad845c91b8959bc83751ce17be703d", "score": "0.6460308", "text": "function contratos_en_vencimiento(){\n $sql = \n 'SELECT\n contratos.Numero,\n tbl_terceros.Nombre AS Contratista,\n contratos.Objeto,\n contratos.Fecha_Vencimiento,\n contratos.Fecha_Vencimiento - CURDATE() AS Dias_Restantes\n FROM\n contratos\n INNER JOIN tbl_terceros ON contratos.Fk_Id_Terceros = tbl_terceros.Pk_Id_Terceros\n WHERE (contratos.Fecha_Vencimiento - CURDATE()) BETWEEN 0 AND 5\n ORDER BY\n contratos.Fecha_Vencimiento ASC';\n \n //Se retorna la consulta\n return $this->db->query($sql)->result(); \n }", "title": "" }, { "docid": "b199ca0c179bcb15d9c700547b4f099e", "score": "0.6455211", "text": "public function getContratos($criterio = \"1\") {\r\n $contratos = null;\r\n $sql = \"SELECT c.*, m.Descripcion_Moneda as moneda, \"\r\n . \"(SELECT descripcion FROM otrosi o WHERE o.idContrato = c.idContrato AND o.idOtroSi = (SELECT MAX(idOtroSi) FROM otrosi)) as objetoContrato, \"\r\n . \"GREATEST(COALESCE((SELECT MAX(fecha) FROM otrosi o WHERE o.idContrato = c.idContrato), 0), c.fechaFin) as fechaContrato, \"\r\n . \"COALESCE((SELECT SUM(valor) FROM otrosi o WHERE o.idContrato = c.idContrato), 0) + c.valor as valorContrato, \"\r\n . \"(SELECT SUM(valor_total) FROM ordenesdepago WHERE contrato_idContrato = c.idContrato) as sumaOrdenes, \"\r\n . \"(SELECT COUNT(valor_total) FROM ordenesdepago WHERE contrato_idContrato = c.idContrato) as numeroOrdenes, \"\r\n . \"(SELECT SUM(amortizacion) FROM ordenesdepago WHERE contrato_idContrato = c.idContrato) as amortizacion \"\r\n . \"FROM contrato c \"\r\n . \"INNER JOIN monedas m ON m.Id_Moneda = c.idMoneda \"\r\n . \"WHERE \" . $criterio;\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 $contratos[$cont]['idContrato'] = $w['idContrato'];\r\n $contratos[$cont]['numero'] = $w['numero'];\r\n $contratos[$cont]['objeto'] = $w['objeto'];\r\n if ($w['objetoContrato'] != NULL) {\r\n $contratos[$cont]['objeto'] = $w['objetoContrato'];\r\n }\r\n $contratos[$cont]['valor'] = number_format($w['valorContrato'], 2, ',', '.');\r\n\t\t\t\t$contratos[$cont]['anticipo'] = number_format($w['anticipo'], 2, ',', '.');\r\n\t\t\t\t$contratos[$cont]['amortizacion'] = number_format($w['amortizacion'], 2, ',', '.');\r\n\t\t\t\t$amortizacionPorPagar = $w['anticipo'] - $w['amortizacion'];\r\n\t\t\t\t$contratos[$cont]['amortizacionPorPagar'] = number_format($amortizacionPorPagar, 2, ',', '.');\r\n $valorPorEjecutar = $w['valorContrato'] - ($w['sumaOrdenes'] - $w['anticipo']) + $w['amortizado'];\r\n\t\t\t\t$valorEjecutado = $w['valorContrato'] - $valorPorEjecutar;\r\n $contratos[$cont]['valorEjecutado'] = number_format($valorEjecutado, 2, ',', '.');\r\n $contratos[$cont]['valorPorEjecutar'] = number_format($valorPorEjecutar, 2, ',', '.');\r\n if ($valorPorEjecutar < 0) {\r\n $contratos[$cont]['valorPorEjecutar'] = \"<div style='color: red'>\" . number_format($valorPorEjecutar, 0, ',', '.') . \"</div>\";\r\n }\r\n $contratos[$cont]['numeroOrdenes'] = $w['numeroOrdenes'];\r\n $contratos[$cont]['plazo'] = $w['plazo'];\r\n $contratos[$cont]['fechaInicio'] = $w['fechaInicio'];\r\n $contratos[$cont]['fechaFin'] = $w['fechaContrato'];\r\n $contratos[$cont]['soporte'] = \"<a href='\" . RUTA_DOCUMENTOS . \"/soporteContrato/\" . $w['soporte'] . \"' >\" . $w['soporte'] . \"</a>\";\r\n $contratos[$cont]['moneda'] = $w['moneda'];\r\n $contratos[$cont]['estado'] = '<img src=./templates/img/ico/verde.gif> Liquidado';\r\n if ($w['valor'] != $w['sumaOrdenes']) {\r\n date_default_timezone_set('America/Bogota');\r\n $fechaActual = date(\"Y-m-d\");\r\n if ($fechaActual < $w['fechaContrato']) {\r\n $contratos[$cont]['estado'] = '<img src=./templates/img/ico/amarillo.gif> Vigente';\r\n } else {\r\n $contratos[$cont]['estado'] = '<img src=./templates/img/ico/rojo.gif> Finalizado';\r\n }\r\n }\r\n $cont++;\r\n }\r\n }\r\n return $contratos;\r\n }", "title": "" }, { "docid": "525469fa9b4aabc6b6c066fdcb703875", "score": "0.64536655", "text": "public function todosticConta(){\r\n $sql=\"SELECT * FROM tbl_tickets_cliente WHERE estatus = 2\";\r\n\t\treturn ejecutarConsulta($sql); \r\n }", "title": "" }, { "docid": "6f02eba18dff5ecc98d4cd5bf51f5e2f", "score": "0.6449685", "text": "public function getVentasProdSer(){\n // Hace la consulta y lo guarda en una variable\n #$prodSer = \\DB::select('CALL II_pro_select_productos_servicios_id(?)', array(\\Auth::user()->id_usuario));\n $prodSer = Mezcla_productos_servicio::where('id_empresa','=',\\Auth::user()->id_empresa)->get();\n\n $totalUnidades = 0;\n $totalVentas = 0;\n $ite = 0;\n\n // Variable que guarda la tabla a mostrar\n $tabla = '\n <table id=\"TablaAnalisisVentas\" class=\"table display responsive nowrap\">\n <thead>\n <tr>\n <th>Producto/Servicio</th>\n <th>Unidad al Mes</th>\n <th>Precio Unitario en Pesos</th>\n <th>Ventas en Pesos al Mes</th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>';\n // Recorre los registros traidos de la base de datos\n foreach($prodSer as $row){\n // Y se agregan a la tabla\n $tabla .= '\n <tr>\n <td>'.$row->nombre.'</td>\n <td>'.number_format($row->unidades_mes).' unidades</td>\n <td>$ '.number_format($row->precio,2).'</td>\n <td>$ '.number_format($row->ventas_mes,2).'</td>\n <td><button onclick=\"llenarFormularioEdit('.$row->id.')\" class=\"modal-effect btn-oblong btn-warning edit-ProSer\" data-toggle=\"modal\" data-effect=\"effect-slide-in-bottom\"><i class=\"icon ion-edit\"></i></button></td>\n <td><button onclick=\"borrarProSer('.$row->id.')\" class=\"btn-oblong btn-danger delete-ProSer\"><i class=\"icon ion-trash-a\"></i></button></td>\n </tr>\n ';\n $totalUnidades += $row->unidades_mes;\n $totalVentas += $row->ventas_mes;\n $ite++;\n }\n \n if($ite>0){\n $totalPrecioUnit = round(($totalVentas / $totalUnidades),2);\n\n $tabla .= '<tr class=\"tx-bold bg-gray-900\">\n <td>Total</td>\n <td>'.number_format($totalUnidades).' unidades</td>\n <td>$ '.number_format($totalPrecioUnit,2).'</td>\n <td>$ '.number_format($totalVentas,2).'</td>\n <td></td>\n <td></td>\n </tr>';\n }\n\n // Etiquetas de cierre de la tabla \n $tabla .='\n </tbody>\n </table>';\n \n // Retorna en formato json\n return $tabla;\n \n }", "title": "" }, { "docid": "7f4ff31fd2d9e029f65af69f3c1bc910", "score": "0.6448032", "text": "function ReporteDetalleActivos(){\n $this->procedimiento='kaf.ft_activo_fijo_sel';\n $this->transaccion='SKA_REP_DETAF_SEL'; // texto < 20\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n //$this->setCount(false);\n\n $this->setParametro('id_clasificacion','id_clasificacion','varchar');\n\n //Definicion de la lista del resultado del query\n $this->captura('id_clasificacion','int4');\n $this->captura('id_clasificacion_fk','int4');\n $this->captura('codigo_completo_tmp','varchar');\n $this->captura('nombre','varchar');\n $this->captura('nivel','int4');\n $this->captura('hijos','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "title": "" }, { "docid": "ea2ee3094228b8f94319eef218fe50ba", "score": "0.64474964", "text": "public function VentasPorArticulo(){\n\t\t\t$query = \"SELECT articulo.id_articulo, des_articulo, sum(cant_ventas), \tSUM(precio_venta*cant_ventas) FROM venta, venta_articulo, articulo WHERE \tventa.id_venta = venta_articulo.id_venta AND venta_articulo.id_articulo = articulo.id_articulo GROUP BY 1\";\n\t\t\t$resultado = $this->db->query($query);\n\t\t\treturn $resultado->result_array();\n\t\t}", "title": "" }, { "docid": "7b0c1804e4b85486c727efdfa4a70e75", "score": "0.6440746", "text": "public function recordatorioClien(){\r\n $sql=\"SELECT TUS.*, TUS.*,TDO.*,TDO.clave as tdcla, TUS.estatus as estapara\r\n FROM tbl_usuarios as TUS\r\n INNER JOIN tbl_documentacion AS TDO ON TUS.id_usuario = TDO.id_usuario\r\n WHERE TUS.estatus IN (1,3)\";\r\n\t\treturn ejecutarConsulta($sql); \r\n }", "title": "" }, { "docid": "645bba77f20753848a8250e962849242", "score": "0.64298356", "text": "protected function QueryObtieneDatos(){\n\t\t\t$this->AbreCnx();\n\t\t\t$rs = ibase_query($this->cnx, $this->query);\n\t\t\treturn $this->FetchAs($rs);\n\t\t\tunset($this->query);\t\n\t\t\t$this->CierraCnx();\n\t\t}", "title": "" }, { "docid": "24f3277ee99ca7ad2f460e2b0e8d1fb7", "score": "0.6422336", "text": "static public function ctrCrearVenta( $id_sesion_caja, $listaProductos_par , $listaCobros_par, $descuento , $descuentoMotivo , $vuelto , $id_vendedor, $nombre_vendedor,$id_local , $comprobante_par, $comentario_venta){\n\n\n \n\n\t\t//echo \"<script> console.log('estoy aqui'); </script>\";\n\n//\t\tif(isset($_POST[\"nuevaVentaListaProductos\"])){\n\n\t\t\t//echo \"<script> console.log('si entre\t'); </script>\";\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR LAS COMPRAS DEL CLIENTE Y REDUCIR EL STOCK Y AUMENTAR LAS VENTAS DE LOS PRODUCTOS\n\t\t\t=============================================*/\n\n\n\t\t\t$listaProductos = array();\n\t\t\t$listaCobros = array();\n\n\t\t\t$listaProductos = json_decode( $listaProductos_par , true);\t\t\n\t\t\t$listaCobros = json_decode( $listaCobros_par, true );\t\t\n\t\t\t$comprobante= json_decode( $comprobante_par, true );\t\t\n\n\n\n\t\t\tif( $descuento !== '' )\n\t\t\t\t$descuento \t= $descuento ;\n\t\t\telse \n\t\t\t\t$descuento \t= 0 ;\n\n \n\n\n \n/*\n\t\t\tforeach ($listaProductos as $key => $value) {\n\n\t\t\t array_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t $tablaProductos = \"producto\";\n\n// ARREGLAR ESTA PARTE PARA QUE SOLO SEA UNA LLAMADA A BD SIMPLEMENTE DEBERIA SE UNA LLAMADA A LA BD ACTUALIZANDO EL PRODUCTO EN SU CANDIDAD DE VENTAS Y SU STOCK\n\t\t\t $item = \"id\";\n\t\t\t $valor = $value[\"id\"];\n\t\t\t $traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor);\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $value[\"cantidad\"] + $traerProducto[\"ventas\"];\n\t\t\t $nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $traerProducto[\"stock\"] - $value[\"cantidad\"];\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n// ARREGLAR ESTA PARTE PARA QUE SOLO SEA UNA LLAMADA A BD\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"cliente\";\n\n\t\t\t$item = \"id\";\n\t\t\t//$valor = $_POST[\"nuevaVentaSeleccionarCliente\"];\n\t\t\t$valor = $_POST[\"nuevaVentaClienteSeleccionado\"] ;\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $item, $valor);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = array_sum($totalProductosComprados) + $traerCliente[\"compras\"];\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valor);\n\n\t\t\t$item1b = \"fecha_ultima_compra\";\n\n\n\n\t\t\t$fechaCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1b, $valor1b, $valor);\n\t\t\t// ARREGLAR ESTA PARTE PARA QUE SOLO SEA UNA LLAMADA A BD\n*/\n\n\n\t\t\tdate_default_timezone_set('America/Bogota');\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fecha = $fecha.' '.$hora;\n\n\n\t\t\t/*=============================================\n\t\t\tGUARDAR LA COMPRA\n\t\t\t=============================================*/\t\n\n\t\t\t$respuesta = ModeloVentas::mdlIngresarVenta( $listaProductos, $listaCobros , $descuento , $descuentoMotivo,$fecha ,$id_sesion_caja , $vuelto , $id_vendedor, $nombre_vendedor, $id_local , $comprobante, $comentario_venta);\n\n\t\t\treturn $respuesta;\n\n/*\n\t\t\tif( $respuesta ==\"ok\" ){\n\n\n\n\n\t\t\t\techo'<script>\t\t\t\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La compra ha sido guardada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then((result) => {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"crear-ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t} else \n\t\t\t\t\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"'.$respuesta .'\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"crear-ventas\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n*/\n\n\t\n\n\t\t}", "title": "" }, { "docid": "1c85fdc938089a510c3f7e9a6d5c7af8", "score": "0.6420485", "text": "public function consultaVentasMeli(Request $request){\n try{\n $cntErrores = 0;\n $idControlVentas = $request->idControlVenta;\n $fechaInicial = $request->fechaInicial;\n $fechaFinal = $request->fechaFinal;\n \n //~Consulta bitacora control\n $controlVentasMeli = ControlVentasMeli::findOrFail($idControlVentas);//~Se busca en base al ID entrante\n $idCuentaTienda = $controlVentasMeli->id_cuenta_tienda;\n\n $controlVentasMeli->estatus = 'PRO'; \n $controlVentasMeli->update();\n \n //~Detalle de la tienda\n $cuentaTienda = CuentaTienda::findOrFail($idCuentaTienda);//~Se busca en base al ID entrante\n $ventas = app(MercadoLibreController::class)->ventas($cuentaTienda->att_id, $cuentaTienda->att_access_token, $fechaInicial, $fechaFinal);\n\n if($ventas['httpCode']==200){\n $listaVentas = $ventas['lista']; \n foreach ($listaVentas as $venta) {\n $id = $venta->id;\n\n try{ \n $idPaquete = $venta->pack_id; \n $idPublicacion = $venta->order_items[0]->item->id;\n $idVariante = $venta->order_items[0]->item->variation_id;\n $titulo = $venta->order_items[0]->item->title;\n $cantidad = $venta->order_items[0]->quantity; \n $fechaVenta = new \\DateTime($venta->date_created);\n \n $comision = ($venta->order_items[0]->sale_fee) * $cantidad;\n\n $idPago = 0;\n $precioVenta = 0;\n $montoPagado = 0;\n $iva = 0;\n $fechaPago = date('Y-m-d');\n\n foreach ($venta->payments as $pago) {\n if($pago->status == \"approved\"){\n $idPago = $pago->id;\n $precioVenta = $pago->transaction_amount;\n $montoPagado = $pago->total_paid_amount; \n $iva = ($precioVenta / 1.16)*.08;\n $fechaPago = substr($pago->date_approved, 0, 10);\n\n $statusMeli = $venta->status;\n }else{\n $statusMeli = $pago->status;\n }\n }\n\n $nombreCliente = substr($venta->buyer->first_name.' '.$venta->buyer->last_name.'['.$venta->buyer->nickname.']',0,40);\n $idEnvio = $venta->shipping->id; \n \n if(isset($venta->comments)){\n $nota = $venta->comments;\n }else{\n $nota = \"\";\n }\n \n\n //~Valida si ya existe la orden\n $ventaMeli = VentaMeli::where('id_orden_meli','=',$id)->get(); \n $existeVenta = true; \n \n //~Inserta como PENDIENTE la venta\n if($ventaMeli->isEmpty()){\n $ventaMeli = new VentaMeli();\n $existeVenta = false; \n }else{\n $ventaMeli = VentaMeli::findOrFail($ventaMeli[0]->id_venta_meli);\n }\n\n $ventaMeli->id_control_ventas_meli=$idControlVentas;\n $ventaMeli->id_cuenta_tienda=$idCuentaTienda;\n $ventaMeli->id_paquete_meli=$idPaquete;\n $ventaMeli->id_orden_meli=$id;\n $ventaMeli->fecha_venta=$fechaVenta;\n $ventaMeli->id_publicacion=$idPublicacion;\n $ventaMeli->id_variante=$idVariante;\n $ventaMeli->titulo=$titulo;\n $ventaMeli->id_pago=$idPago;\n $ventaMeli->fecha_pago=$fechaPago;\n $ventaMeli->monto_pagado=$montoPagado;\n $ventaMeli->cantidad=$cantidad;\n $ventaMeli->precio_venta=$precioVenta;\n $ventaMeli->comision=$comision; \n $ventaMeli->iva=$iva;\n $ventaMeli->id_envio=$idEnvio;\n $venta->costo_envio_cliente=0;\n $venta->costo_envio_empresa=0;\n $ventaMeli->nombre_cliente=preg_replace('([^A-Za-z0-9 ])', '', $nombreCliente);\n $ventaMeli->nota=$nota;\n $ventaMeli->estatus_meli=$statusMeli;\n $ventaMeli->estatus='PEN';\n\n if($existeVenta){\n $ventaMeli->update();\n }else{\n $ventaMeli->save(); \n }\n\n }catch(Exception $e){\n Log::error( 'No fue posible procesar la venta '.$id. 'id Cuenta Tienda = '.$idCuentaTienda.': '.$e->getMessage() ); \n Log::error( $e->getTraceAsString() );\n $cntErrores++;\n //~Actualiza control ventas\n $controlVentasMeli->estatus = 'ERR';\n $controlVentasMeli->update();\n } \n }\n }else{\n throw new Exception('No fue posible recuperar la lista de ventas '.$ventas['httpCode']);\n }\n\n\n //~Borra las publicaciones al existir un solo error\n if($cntErrores>0){\n VentaMeli::where('id_control_ventas_meli','=',$idControlVentas)->delete(); \n }\n \n \n\n return [ 'xstatus'=>true, \n 'totalProcesados'=>count($listaVentas),\n 'totalErrores'=>$cntErrores\n ];\n\n }catch(Exception $e){\n Log::error( $e->getTraceAsString() ); \n return [ 'xstatus'=>false, 'error' => $e->getMessage() ];\n }\n }", "title": "" }, { "docid": "e73af759ab76f71dbb397941505a3c95", "score": "0.6419053", "text": "public function servicio_prestado(){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\";\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$num_de_orden);\n $sql->bindValue(2,$id_paciente);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "5d9c81f0299e1a4030203523954a1472", "score": "0.641771", "text": "public function BuscarActividadesCarrera($id) {\n\n $carga = array();\n $Conexion = conectar_bd();\n $Conexion->conectarse();\n\n $Creditos = $Conexion->ejecutar(\"SELECT id_solicitud, \n alumno.nombre_completo as alumno,creditos.nombre as credito, \n docente.nombre as docente, estado,periodo.idPeriodo,\n periodo.inicio,periodo.fin, anio FROM solicitud_credito\n inner join alumno on alumno.idAlumno = solicitud_credito.id_alumno\n inner join periodo on periodo.idPeriodo = solicitud_credito.periodo_id_periodo\n inner join creditos on creditos.id_credito = solicitud_credito.actividad_id_actividad\n inner join docente on docente.idDocente = solicitud_credito.docente_id_docente\n where solicitud_credito.id_carrera = '\" . $id . \"';\");\n\n\n\n while ($renglon = mysql_fetch_array($Creditos)) {\n $objeto = new credito_sol();\n $objeto->setid($renglon['id_solicitud']);\n $objeto->setalumno($renglon['alumno']);\n $objeto->setcredito($renglon['credito']);\n $objeto->setdocente($renglon['docente']);\n $objeto->setedo($renglon['estado']);\n $periodo = $renglon['idPeriodo'];\n $anio = $renglon['anio'];\n if ($periodo == 1) {\n $anio++;\n $cadena = $renglon['inicio'] . \" \" . $renglon['anio'] . \"-\" . $renglon['fin'] . \" \" . $anio;\n } else {\n $cadena = $renglon['inicio'] . \" \" . $anio . \"-\" . $renglon['fin'] . \" \" . $anio;\n }\n $objeto->setperiodo($cadena);\n\n\n array_push($carga, $objeto);\n }\n\n $Conexion->desconectarse();\n return $carga;\n }", "title": "" }, { "docid": "06cd0768a258e91bd3d63a63c282d979", "score": "0.641326", "text": "public static function ventas($fecha)\n {\n \t\n /* --------------------------------------------------------------------------------- */\n\n //INIICAR VARIABLES\n\n $anioNull[] = array(\"TOTAL\" => 0,\"ID_SUCURSAL\"=>0,\"SUCURSAL\"=>\"Ninguna Venta\");\n $anio = date('Y');\n $mes = date('m');\n $dia = date('d');\n $sucursal = 4;\n $ventasMes[] = array();\n\n /* --------------------------------------------------------------------------------- */\n\n // CALCULAR DATOS DE FECHAS\n\n if($mes === 1) {\n $mesAnterior = 12;\n $anioAnterior = $anio - 1;\n } else {\n $mesAnterior = $mes - 1;\n $anioAnterior = $anio;\n }\n\n if($dia === 1) {\n if ($mes === 1) {\n $diaAnterior = date(\"d\",(mktime(0,0,0,$mes+1,1,$anio-1)-1));\n $diaMesAnterior = 12;\n $diaAnioAnterior = $anio - 1;\n } else {\n $diaAnterior = date(\"d\",(mktime(0,0,0,$mes,1,$anio)-1));\n $diaMesAnterior = $mes - 1;\n $diaAnioAnterior = $anio;\n }\n } else {\n $diaAnterior = $dia - 1;\n $diaMesAnterior = $mes;\n $diaAnioAnterior = $anio;\n }\n \n //print_r(\"dia Anterior \".$diaAnterior.\" Mes Anterior \".$diaMesAnterior.\" Año anteriro \".$diaAnioAnterior);\n /* --------------------------------------------------------------------------------- */\n\n // LLAMAR LA CONSULTA - PRIMERA CAJA\n \n // Año y dia Actual\n\n $diaActualR = DB::connection('retail')\n ->table('VENTAS')\n ->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL'))\n ->whereYear('VENTAS.FECALTAS', $anio)\n ->whereMonth('VENTAS.FECALTAS', $mes)\n ->whereDay('VENTAS.FECALTAS', $dia)\n ->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n ->groupBy('VENTAS.ID_SUCURSAL')\n ->get();\n\n // Año y mes Anterior\n \n $diaAnteriorR = DB::connection('retail')\n ->table('VENTAS')\n ->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL'))\n ->whereYear('VENTAS.FECALTAS', $diaAnioAnterior)\n ->whereMonth('VENTAS.FECALTAS', $diaMesAnterior)\n ->whereDay('VENTAS.FECALTAS', $diaAnterior)\n ->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n ->groupBy('VENTAS.ID_SUCURSAL')\n ->get();\n\n /* --------------------------------------------------------------------------------- */\n\n // LLAMAR LA CONSULTA - SEGUNDA CAJA\n \t\n // Año y mes Actual\n\n $mesActualR = DB::connection('retail')\n \t->table('VENTAS')\n \t->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL'))\n \t->whereYear('VENTAS.FECALTAS', $anio)\n ->whereMonth('VENTAS.FECALTAS', $mes)\n \t->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n \t->groupBy('VENTAS.ID_SUCURSAL')\n \t->get();\n\n // Año y mes Anterior\n \n $mesAnteriorR = DB::connection('retail')\n ->table('VENTAS')\n ->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL'))\n ->whereYear('VENTAS.FECALTAS', $anioAnterior)\n ->whereMonth('VENTAS.FECALTAS', $mesAnterior)\n ->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n ->groupBy('VENTAS.ID_SUCURSAL')\n ->get();\n\n /* --------------------------------------------------------------------------------- */\n\n // LLAMAR LA CONSULTA - TERCERA CAJA\n \n // Año Actual\n\n $anioActualR = DB::connection('retail')\n ->table('VENTAS')\n ->join('SUCURSALES', 'ID_SUCURSAL', '=', 'SUCURSALES.CODIGO')\n ->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL, VENTAS.ID_SUCURSAL, SUCURSALES.DESCRIPCION AS SUCURSAL'))\n ->whereYear('VENTAS.FECALTAS', $anio)\n ->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n ->groupBy('VENTAS.ID_SUCURSAL')\n ->get();\n\n // Año Anterior\n \n $anioAnteriorR = DB::connection('retail')\n ->table('VENTAS')\n ->select(DB::raw('SUM(VENTAS.TOTAL) AS TOTAL'))\n ->whereYear('VENTAS.FECALTAS', $anio - 1)\n ->where('VENTAS.ID_SUCURSAL', '=', $sucursal)\n ->groupBy('VENTAS.ID_SUCURSAL')\n ->get();\n\n /* --------------------------------------------------------------------------------- */\n\n // CUARTA CAJA\n \n // CANTIDAD DE ANULACIONES\n\n $anulacionesActual = DB::connection('retail')\n ->table('VENTASDET')\n ->select(DB::raw('COUNT(ANULADO) AS ANULADO'))\n ->whereYear('VENTASDET.FECALTAS', $anio)\n ->whereMonth('VENTASDET.FECALTAS', $mes)\n ->where('VENTASDET.ID_SUCURSAL', '=', $sucursal)\n ->where('VENTASDET.ANULADO', '=', 1)\n ->groupBy('VENTASDET.CODIGO')\n ->groupBy('VENTASDET.CAJA')\n ->get();\n\n\n /* --------------------------------------------------------------------------------- */\n\n $anulacionesActualTotal = DB::connection('retail')\n ->table('VENTASDET')\n ->select(DB::raw('SUM(PRECIO) AS TOTAL'))\n ->whereYear('VENTASDET.FECALTAS', $anio)\n ->whereMonth('VENTASDET.FECALTAS', $mes)\n ->where('VENTASDET.ID_SUCURSAL', '=', $sucursal)\n ->where('VENTASDET.ANULADO', '=', 1)\n ->where(function ($query) {\n $query->where('VENTASDET.DESCRIPCION', 'NOT LIKE', 'DESCUENTO%')\n ->where('VENTASDET.COD_PROD', '<>', 2);\n })\n ->groupBy('VENTASDET.ID_SUCURSAL')\n ->get();\n\n /* --------------------------------------------------------------------------------- */\n\n // PREPARAR ARRAY\n\n unset($ventasMes[0]);\n\n // MES ACTUAL\n \n if (count($mesActualR) <> 0) {\n foreach ($mesActualR as $value) {\n $ventasMes[0][\"mesActual\"] = $value->TOTAL;\n }\n } else {\n $ventasMes[0][\"mesActual\"] = 0;\n } \n \n if (count($mesAnteriorR) <> 0) { \n foreach ($mesAnteriorR as $value) {\n $ventasMes[0][\"mesAnterior\"] = $value->TOTAL;\n $ventasMes[0][\"comportamiento\"] = number_format((($ventasMes[0][\"mesActual\"] / $ventasMes[0][\"mesAnterior\"]) - 1) * 100, 2);\n }\n } else {\n $ventasMes[0][\"mesAnterior\"] = 0;\n if ($ventasMes[0][\"mesActual\"] === 0) {\n $ventasMes[0][\"comportamiento\"] = 0;\n } else {\n $ventasMes[0][\"comportamiento\"] = 100;\n }\n } \n\n // DIA ACTUAL\n\n if (count($diaActualR) <> 0) {\n foreach ($diaActualR as $key => $value) {\n $ventasMes[0][\"diaActual\"] = $value->TOTAL;\n }\n } else {\n $ventasMes[0][\"diaActual\"] = 0;\n } \n\n // DIA ANTERIOR\n\n if (count($diaAnteriorR) <> 0) {\n foreach ($diaAnteriorR as $key => $value) {\n $ventasMes[0][\"diaAnterior\"] = $value->TOTAL;\n $ventasMes[0][\"comportamientoDia\"] = number_format((($ventasMes[0][\"diaActual\"] / $ventasMes[0][\"diaAnterior\"]) - 1) * 100, 2);\n }\n } else {\n $ventasMes[0][\"diaAnterior\"] = 0;\n if ($ventasMes[0][\"diaActual\"] === 0) {\n $ventasMes[0][\"comportamientoDia\"] = 0;\n } else {\n $ventasMes[0][\"comportamientoDia\"] = 100;\n }\n } \n\n // AÑO ACTUAL\n\n if (count($anioActualR) <> 0) {\n foreach ($anioActualR as $key => $value) {\n $ventasMes[0][\"anioActual\"] = $value->TOTAL;\n $ventasMes[0][\"sucursal\"] = $value->SUCURSAL;\n $ventasMes[0][\"id_sucursal\"] = $value->ID_SUCURSAL; \n }\n } else {\n $ventasMes[0][\"anioActual\"] = 0;\n } \n\n // AÑO ANTERIOR\n\n if (count($anioAnteriorR) <> 0) {\n foreach ($anioAnteriorR as $key => $value) {\n $ventasMes[0][\"anioAnterior\"] = $value->TOTAL;\n $ventasMes[0][\"comportamientoAnio\"] = number_format((($ventasMes[0][\"anioActual\"] / $ventasMes[0][\"anioAnterior\"]) - 1) * 100, 2);\n }\n } else {\n $ventasMes[0][\"anioAnterior\"] = 0;\n if ($ventasMes[0][\"anioActual\"] === 0) {\n $ventasMes[0][\"comportamientoAnio\"] = 0;\n } else {\n $ventasMes[0][\"comportamientoAnio\"] = 100;\n }\n } \n\n // ANULACIONES CANTIDAD\n\n if (count($anulacionesActual) <> 0) {\n $ventasMes[0][\"anulado\"] = 0;\n foreach ($anulacionesActual as $value) {\n $ventasMes[0][\"anulado\"] += 1;\n }\n } else {\n $ventasMes[0][\"anulado\"] = 0;\n }\n\n // ANULACIONES TOTAL\n\n if (count($anulacionesActualTotal) <> 0) {\n foreach ($anulacionesActualTotal as $value) {\n $ventasMes[0][\"anuladoTotal\"] = -$value->TOTAL;\n }\n } else {\n $ventasMes[0][\"anuladoTotal\"] = 0;\n }\n \n /* --------------------------------------------------------------------------------- */\n\n // RETORNAR VALOR \n\n if (count($ventasMes) === 0) {\n return $anioNull;\n } else {\n return $ventasMes;\n }\n\n /* --------------------------------------------------------------------------------- */\n \n }", "title": "" }, { "docid": "21126ef727f38e9eff734a6298875619", "score": "0.64114994", "text": "public function get_consulta_TUBERIAS($id_celda){\r\n \r\n \r\n $sql=\"SELECT * FROM material_isometricos_temp where TUBERIA_ID =:SECC\";\r\n \r\n $sentencia=$this->conexion_db->prepare($sql);//creamos una sentencia preparada.\r\n \r\n $sentencia->execute(array(\":SECC\"=>$id_celda));//ejecutamos la sentencia preparada.\r\n \r\n $resultado =$sentencia->fetchAll(PDO::FETCH_ASSOC);//guardamos el resultado de la consulta en un array asociativo.\r\n \r\n $sentencia->closeCursor();//cerramos el cursor.\r\n \r\n return $resultado;//devolvemos el resultado de la consulta.\r\n \r\n $this->conexion_db=null;//cerramos la conexion.\r\n \r\n }", "title": "" }, { "docid": "d34e8caee4819652a29688c4490811fa", "score": "0.64113474", "text": "public function listaEstudianteBecasTransporte() {\n $datos = array();\n //enlisto todas las cedulas de estudiantes becados\n $listaEstudianteBecas = $this->db->select(\"SELECT ced_estudiante, (ingreso1+ingreso2+ingreso3+ingreso4)/totalMiembros promedioIngresos \"\n . \"FROM sipce_estudiante_beca \"\n . \"WHERE annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \"\n . \"AND becaTransporte = 1 \"\n . \"ORDER BY promedioIngresos ASC\");\n foreach ($listaEstudianteBecas as $lista => $value) {\n //Cedula\n $estudiante['ced_estudiante'] = $value['ced_estudiante'];\n\n //verifico si el estudiante posee especialidad\n $consultaEstudianteEspecialidad = $this->db->select(\"SELECT * FROM sipce_especialidad_estudiante WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \");\n\n if ($consultaEstudianteEspecialidad != null) {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.id_consecutivo,eb.numeroRuta,\"\n . \"d.Distrito,g.nivel,esp.nombreEspecialidad,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_especialidad as esp, \"\n . \"sipce_especialidad_estudiante as ee, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = ee.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $value['ced_estudiante'] . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND esp.codigoEspecialidad = ee.cod_especialidad \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \"\n . \"AND eb.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n if ($resultado != null) {\n $estudiante['apellido1'] = $resultado[0]['apellido1'];\n $estudiante['apellido2'] = $resultado[0]['apellido2'];\n $estudiante['nombre'] = $resultado[0]['nombre'];\n $estudiante['distancia'] = $resultado[0]['distancia'];\n $estudiante['id_consecutivo'] = $resultado[0]['id_consecutivo'];\n $estudiante['numeroRuta'] = $resultado[0]['numeroRuta'];\n $estudiante['Distrito'] = $resultado[0]['Distrito'];\n $estudiante['nivel'] = $resultado[0]['nivel'];\n $estudiante['nombreEspecialidad'] = $resultado[0]['nombreEspecialidad'];\n $estudiante['ingreso1'] = $resultado[0]['ingreso1'];\n $estudiante['ingreso2'] = $resultado[0]['ingreso2'];\n $estudiante['ingreso3'] = $resultado[0]['ingreso3'];\n $estudiante['ingreso4'] = $resultado[0]['ingreso4'];\n $estudiante['totalMiembros'] = $resultado[0]['totalMiembros'];\n $estudiante['ced_encargadoCheque'] = $resultado[0]['ced_encargadoCheque'];\n $estudiante['parentesco'] = $resultado[0]['parentesco'];\n }\n } else {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.numeroRuta,\"\n . \"d.Distrito,g.nivel,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $value['ced_estudiante'] . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n\n if ($resultado != null) {\n $estudiante['apellido1'] = $resultado[0]['apellido1'];\n $estudiante['apellido2'] = $resultado[0]['apellido2'];\n $estudiante['nombre'] = $resultado[0]['nombre'];\n $estudiante['distancia'] = $resultado[0]['distancia'];\n $estudiante['numeroRuta'] = $resultado[0]['numeroRuta'];\n $estudiante['Distrito'] = $resultado[0]['Distrito'];\n $estudiante['nivel'] = $resultado[0]['nivel'];\n $estudiante['nombreEspecialidad'] = \"-\";\n $estudiante['ingreso1'] = $resultado[0]['ingreso1'];\n $estudiante['ingreso2'] = $resultado[0]['ingreso2'];\n $estudiante['ingreso3'] = $resultado[0]['ingreso3'];\n $estudiante['ingreso4'] = $resultado[0]['ingreso4'];\n $estudiante['totalMiembros'] = $resultado[0]['totalMiembros'];\n $estudiante['ced_encargadoCheque'] = $resultado[0]['ced_encargadoCheque'];\n $estudiante['parentesco'] = $resultado[0]['parentesco'];\n }\n }\n\n\n //verifico el encargado de cangear cheques\n if ($resultado != null) {\n if ($estudiante['parentesco'] == 'Padre') {\n\n $consultaEstudiantePadre = $this->db->select(\"SELECT * \n FROM sipce_padre \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_padre = '\" . $estudiante['ced_encargadoCheque'] . \"'\");\n if ($consultaEstudiantePadre != null) {\n //Cargo datos del padre en el array\n $estudiante['nombre_encargado'] = $consultaEstudiantePadre[0]['nombre_padre'];\n $estudiante['apellido1_encargado'] = $consultaEstudiantePadre[0]['apellido1_padre'];\n $estudiante['apellido2_encargado'] = $consultaEstudiantePadre[0]['apellido2_padre'];\n }\n } elseif ($estudiante['parentesco'] == 'Madre') {\n $consultaEstudianteMadre = $this->db->select(\"SELECT * \n FROM sipce_madre \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_madre = '\" . $estudiante['ced_encargadoCheque'] . \"'\");\n\n if ($consultaEstudianteMadre != null) {\n //Cargo datos de la madre en el array\n $estudiante['nombre_encargado'] = $consultaEstudianteMadre[0]['nombre_madre'];\n $estudiante['apellido1_encargado'] = $consultaEstudianteMadre[0]['apellido1_madre'];\n $estudiante['apellido2_encargado'] = $consultaEstudianteMadre[0]['apellido2_madre'];\n }\n } elseif ($estudiante['parentesco'] == 'Otro') {\n $consultaEstudianteEncargado = $this->db->select(\"SELECT * \n FROM sipce_encargado \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_encargado = '\" . $estudiante['ced_encargadoCheque'] . \"' \n AND parentesco = 'Otro'\");\n\n if ($consultaEstudianteEncargado != null) {\n //Cargo datos en un array\n $estudiante['nombre_encargado'] = $consultaEstudianteEncargado[0]['nombre_encargado'];\n $estudiante['apellido1_encargado'] = $consultaEstudianteEncargado[0]['apellido1_encargado'];\n $estudiante['apellido2_encargado'] = $consultaEstudianteEncargado[0]['apellido2_encargado'];\n }\n } else {\n //Cargo datos en un array\n $estudiante['nombre_encargado'] = null;\n $estudiante['apellido1_encargado'] = null;\n $estudiante['apellido2_encargado'] = null;\n }\n }\n $datos[] = $estudiante;\n $estudiante = \"\";\n }\n return $datos;\n }", "title": "" }, { "docid": "4ab939faa6d6a31e9ea674af7d91775b", "score": "0.64102423", "text": "function listarCaja(){\n\t\t$this->procedimiento='tes.ft_caja_sel';\n\t\t$this->transaccion='TES_CAJA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_caja','int4');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('importe_maximo_caja','numeric');\n\t\t$this->captura('saldo','numeric');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado_proceso','varchar');\n\t\t$this->captura('importe_maximo_item','numeric');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('cuenta_bancaria','text');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('cajero','text');\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$this->captura('desc_moneda','varchar');\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_depto_lb','varchar');\n\t\t$this->captura('tipo_ejecucion','varchar');\t\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('nro_tramite','varchar');\t\t\n\t\t$this->captura('dias_maximo_rendicion','int4');\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->consulta); exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "edc5775c258dc944d394043ef7bdfcfa", "score": "0.64080924", "text": "function clonarCuentaContable(){\n $this->procedimiento='sigep.ft_cuenta_contable_ime';\n $this->transaccion='SIGEP_CLONAR_CUE_CON';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_gestion','id_gestion','int4');\n $this->setParametro('gestion','gestion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta(); //echo $this->consulta; exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "26327abeb460784e0e2d03edf3606cf2", "score": "0.6402689", "text": "public function dados($motorista){\n if (Locacao::consultarMotorista($motorista))\n {\n //solicitação ao banco os dados dos motoristas\n //por enquanto esta sendo buscado dos clientes\n $veiculo = Veiculo::retornarVeiculo($_POST['veiculo_id']);\n $modelo = Modelo::retornarModelo($veiculo[0]->modelo_id);\n $categoria = Categoria::retornaCategoria($modelo[0]->categoria_id);\n\n /*\n twig é uma api que permite mostrar conteudos na view sem a necessidade de escrever\n codigo php no html da view, assim o codigo não fica misturado.\n sintaxe:\n naview: {{conteudo}}\n na controller: array[conteudo] = nome\n\n o valores na view dentro de {{}} sao substituidos pela valor da chave no array\n\n */\n $parametros = array();\n $parametros['motorista_id'] = $motorista;\n $parametros['veiculo_id'] = $_POST['veiculo_id'];\n $parametros['cliente_id'] = $_POST['cliente_id'];\n $parametros['categorias'] = $categoria;\n $loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n $twig = new \\Twig\\Environment($loader);\n $template = $twig->load('locacaoDados.html');\n\n //renderizar o template, parametros de render seriam dados vindos de alguma model\n echo $template->render($parametros);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"Motorista não pode participar da locação pois ja esta vinculado a outra locação\")'; \n echo '</script>';\n LocacaoController::motorista();\n }\n\n }", "title": "" }, { "docid": "957987ba0b853b4707fa81785467ef5b", "score": "0.6402116", "text": "function polizas_vencidas(){\n $sql = \n 'SELECT\n contratos.Numero,\n contratos.Objeto,\n tbl_terceros.Nombre AS Contratista,\n poliza_tipo.Poliza_Tipo,\n contratos_polizas.Fecha_Final,\n DATEDIFF(CURDATE(), contratos_polizas.Fecha_Final) AS Dias_Vencidos\n FROM\n contratos_polizas\n INNER JOIN poliza_tipo ON poliza_tipo.Pk_Id_Poliza_Tipo = contratos_polizas.Fk_Id_Poliza_Tipo\n INNER JOIN contratos ON contratos_polizas.Fk_Id_Contratos = contratos.Pk_Id_Contrato\n INNER JOIN tbl_terceros ON tbl_terceros.Pk_Id_Terceros = contratos.Fk_Id_Terceros\n WHERE\n contratos_polizas.Fecha_Final < CURDATE() AND\n contratos.Fk_Id_Estado != 2 AND\n contratos_polizas.Fecha_Final != \"0000-00-00\"\n ORDER BY\n contratos.Numero ASC,\n poliza_tipo.Pk_Id_Poliza_Tipo ASC';\n \n //Se retorna la consulta\n return $this->db->query($sql)->result(); \n }", "title": "" }, { "docid": "5eb9f0233961c78bff3777e834a054af", "score": "0.6399532", "text": "public function Select(){\n \n// $sql = \" select concat_ws(' ', c.nome, c.sobrenome) AS nome, d.destino, c.rg, c.email,c.telefone, d.hora_saida, d.data FROM tbl_cliente AS c inner join tbl_destino as d ON c.idCliente = d.idCliente ORDER BY d.data, d.hora_saida; \";\n \n //$sql =\"SELECT * FROM tbl_passageiros ORDER BY data, hora\";\n \n \n $sql=\"select * from passageiros_view;\";\n \n $conex = new Mysql_db();\n \n // Chama o metodo para conectar no BD, e guarda o retorno da conexão na variavel $PDO_conex.\n $POD_conex = $conex->Conectar();\n \n // Executa o select no BD e guarda o retorno na variavel $select.\n $select = $POD_conex->query($sql);\n \n $cont = 0;\n \n while($rs = $select->fetch(PDO::FETCH_ASSOC)){\n \n // Cria um array de objetos da classe Contato.\n $listPassageiros[] = new Passageiros();\n \n // Guarda os dados de BD em cada indice do objeto criado.\n $listPassageiros[$cont]->idPassagem = $rs['idPassagem'];\n $listPassageiros[$cont]->nome = $rs['nomeCompleto'];\n $listPassageiros[$cont]->destino = $rs['Destino'];\n $listPassageiros[$cont]->email = $rs['email'];\n $listPassageiros[$cont]->dtPartida = $rs['dtPartida'];\n $listPassageiros[$cont]->hrPartida = $rs['hrPartida'];\n $listPassageiros[$cont]->ativo = $rs['ativo'];\n \n// var_dump($listPassageiros);\n \n $cont+=1;\n }\n \n $conex->Desconectar();\n \n // Apenas retorna o listContatos se existir dados no BD.\n if(isset($listPassageiros)){\n return $listPassageiros;\n }\n \n }", "title": "" }, { "docid": "11c2771f1c73df38887d8c382b988896", "score": "0.6399068", "text": "public function datosEncargadoCheque($ced_estudiante) {\n\n //verifico si el estudiante posee padre\n $consultaEstudiantePadre = $this->db->select(\"SELECT * FROM sipce_padre WHERE ced_estudiante = '\" . $ced_estudiante . \"' \");\n\n if ($consultaEstudiantePadre != null) {\n //Cargo datos en un array\n $estudiante['ced_padre'] = $consultaEstudiantePadre[0]['ced_padre'];\n $estudiante['nombre_padre'] = $consultaEstudiantePadre[0]['nombre_padre'];\n $estudiante['apellido1_padre'] = $consultaEstudiantePadre[0]['apellido1_padre'];\n $estudiante['apellido2_padre'] = $consultaEstudiantePadre[0]['apellido2_padre'];\n } else {\n //Cargo datos en un array\n $estudiante['ced_padre'] = null;\n $estudiante['nombre_padre'] = null;\n $estudiante['apellido1_padre'] = null;\n $estudiante['apellido2_padre'] = null;\n }\n\n //verifico si el estudiante posee madre\n $consultaEstudianteMadre = $this->db->select(\"SELECT * FROM sipce_madre WHERE ced_estudiante = '\" . $ced_estudiante . \"' \");\n\n if ($consultaEstudianteMadre != null) {\n //Cargo datos en un array\n $estudiante['ced_madre'] = $consultaEstudianteMadre[0]['ced_madre'];\n $estudiante['nombre_madre'] = $consultaEstudianteMadre[0]['nombre_madre'];\n $estudiante['apellido1_madre'] = $consultaEstudianteMadre[0]['apellido1_madre'];\n $estudiante['apellido2_madre'] = $consultaEstudianteMadre[0]['apellido2_madre'];\n } else {\n //Cargo datos en un array\n $estudiante['ced_madre'] = null;\n $estudiante['nombre_madre'] = null;\n $estudiante['apellido1_madre'] = null;\n $estudiante['apellido2_madre'] = null;\n }\n\n //verifico si el estudiante posee otro encargado que no sea padre o madre\n $consultaEstudianteEncargado = $this->db->select(\"SELECT * \n FROM sipce_encargado \n WHERE ced_estudiante = '\" . $ced_estudiante . \"' \n AND parentesco = 'Otro'\");\n\n if ($consultaEstudianteEncargado != null) {\n //Cargo datos en un array\n $estudiante['ced_encargado'] = $consultaEstudianteEncargado[0]['ced_encargado'];\n $estudiante['nombre_encargado'] = $consultaEstudianteEncargado[0]['nombre_encargado'];\n $estudiante['apellido1_encargado'] = $consultaEstudianteEncargado[0]['apellido1_encargado'];\n $estudiante['apellido2_encargado'] = $consultaEstudianteEncargado[0]['apellido2_encargado'];\n } else {\n //Cargo datos en un array\n $estudiante['ced_encargado'] = null;\n $estudiante['nombre_encargado'] = null;\n $estudiante['apellido1_encargado'] = null;\n $estudiante['apellido2_encargado'] = null;\n }\n\n return $estudiante;\n }", "title": "" }, { "docid": "1e7c5c047d49f9366139cf0fa33e500d", "score": "0.6395164", "text": "function listarTipoCostoCuenta(){\n\t\t$this->procedimiento='cos.ft_tipo_costo_cuenta_sel';\n\t\t$this->transaccion='COS_CO_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_costo_cuenta','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo_cuenta','varchar');\n\t\t$this->captura('id_auxiliares','varchar');\n\t\t$this->captura('codigo_auxiliares','varchar');\n\t\t$this->captura('auxiliares','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_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\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$this->captura('id_tipo_costo','int4');\n $this->captura('nombre_cuenta','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "7e9f7551ff559681f8a95c4e2e763ec1", "score": "0.63921016", "text": "public function calculaVentaEstadistica(Request $request){\n DB::beginTransaction();\n try{\n $idControlVentas = $request->idControlVenta;\n \n //~Consulta bitacora control\n $controlVentasMeli = ControlVentasMeli::findOrFail($idControlVentas);//~Se busca en base al ID entrante\n $idCuentaTienda = $controlVentasMeli->id_cuenta_tienda;\n \n //~Detalle de la tienda\n $cuentaTienda = CuentaTienda::findOrFail($idCuentaTienda);//~Se busca en base al ID entrante\n\n $ventas = VentaMeli::where('id_control_ventas_meli','=',$idControlVentas)->get(); \n\n $cntVentaProcesada = 0;\n foreach ($ventas as $venta) {\n try{\n $idVentaMeli = $venta->id_venta_meli;\n $idPublicacion = $venta->id_publicacion;\n $idVariante = $venta->id_variante_publicacion;\n\n \n //Completa el envio\n $idEnvio = $venta->id_envio;\n $envio = app(MercadoLibreController::class)->envioDetalle($idEnvio, $cuentaTienda->att_access_token);\n if($envio['httpCode'] == 200){\n $tipoEnvio = $envio['body']->logistic_type;\n $direccion = $envio['body']->receiver_address->city->name. ', '.$envio['body']->receiver_address->street_name. ' '.$envio['body']->receiver_address->street_number; \n $costoEnvioCargoEmpresa = $envio['body']->shipping_option->list_cost;\n $costoEnvioCargoCliente = $envio['body']->shipping_option->cost;\n }else{\n $tipoEnvio = 'NoDef';\n $direccion = 'NoDef';\n $costoEnvioCargoEmpresa = 0;\n $costoEnvioCargoCliente = 0;\n }\n\n $idPago = $venta->id_pago;\n $pago = app(MercadoLibreController::class)->pagoDetalle($idPago, $cuentaTienda->att_access_token);\n\n if($pago->status == \"approved\"){\n\n $detalleTransaccion = $pago->transaction_details;\n \n $neto = $detalleTransaccion->net_received_amount - (($venta->monto_pagado - $venta->precio_venta) + ($costoEnvioCargoEmpresa-$costoEnvioCargoCliente));\n \n $isr = ($venta->precio_venta - ($costoEnvioCargoEmpresa-$costoEnvioCargoCliente)- $venta->comision - $venta->iva) - $neto;\n \n if($idVariante!=null){\n $publicacion = Publicacion::where('id_publicacion_tienda','=',$idPublicacion)->where('id_variante_publicacion','=',$idVariante)->get();\n }else{\n $publicacion = Publicacion::where('id_publicacion_tienda','=',$idPublicacion)->get();\n }\n\n if($publicacion->isEmpty()){\n $precioCompra = 0;\n }else{\n $idPub = $publicacion[0]->id_publicacion;\n $configPublicacion = ConfigPublicacion::where('id_publicacion','=',$publicacion[0]->id_publicacion)->get();\n\n if($configPublicacion->isEmpty()){\n $precioCompra = 0;\n }else{\n $precioCompra=0; \n foreach ($configPublicacion as $config) {\n $producto = Producto::findOrFail($config->id_producto);\n $cantidad = $config->cantidad;\n $precioCompra+= ($producto->ultimo_precio_compra)*$cantidad;\n }\n \n }\n }\n\n //~Multiplica por la cantidad de piezas vendidas\n $precioCompra = $precioCompra * $venta->cantidad;\n\n $utilidadMonto = $neto - $precioCompra;\n if($precioCompra==0){\n $utilidadPorcentaje = 0;\n }else{\n $utilidadPorcentaje = $utilidadMonto / $precioCompra;\n }\n }else{\n $neto = 0;\n $isr = 0;\n $precioCompra = 0;\n $utilidadMonto = 0;\n $utilidadPorcentaje = 0; \n }\n\n $venta->isr=$isr;\n $venta->neto=$neto;\n $venta->precio_compra=$precioCompra;\n $venta->utl_monto=$utilidadMonto;\n $venta->utl_porcentaje=$utilidadPorcentaje;\n $venta->direccion_entrega=$direccion;\n $venta->metodo_envio=$tipoEnvio;\n $venta->costo_envio_cliente=$costoEnvioCargoCliente;\n $venta->costo_envio_empresa=$costoEnvioCargoEmpresa;\n $venta->estatus='TER';\n $venta->update();\n \n $cntVentaProcesada++;\n }catch(Exception $e){\n DB::rollBack();\n Log::error( 'No fue posible procesar la venta '.$idVentaMeli.': '.$e->getMessage() ); \n Log::error( $e->getTraceAsString() );\n \n //~Actualiza control ventas\n $controlVentasMeli->estatus = 'ERR';\n $controlVentasMeli->update();\n DB::commit();\n throw new Exception('No fue posible procesar la venta '.$idVentaMeli.': '.$e->getMessage());\n }\n \n }\n\n //~Actualiza control ventas\n $controlVentasMeli->estatus = 'TER';\n $controlVentasMeli->update();\n\n DB::commit();\n \n return [ 'xstatus'=>true, \n 'totalProcesados'=>$cntVentaProcesada\n ]; \n }catch(Exception $e){\n DB::rollBack();\n Log::error( $e->getTraceAsString() ); \n return [ 'xstatus'=>false, 'error' => $e->getMessage() ];\n }\n }", "title": "" }, { "docid": "2907d3f00a54431aad59d70afd56c6bc", "score": "0.6391296", "text": "function contratos_vencidos(){\n $sql = \n 'SELECT\n contratos.Numero,\n contratos.Objeto,\n tbl_terceros.Nombre AS Contratista,\n contratos.Fecha_Vencimiento,\n DATEDIFF(CURDATE(),contratos.Fecha_Vencimiento) AS Dias_Vencidos\n FROM\n contratos\n INNER JOIN tbl_terceros ON contratos.Fk_Id_Terceros = tbl_terceros.Pk_Id_Terceros\n WHERE\n contratos.Fecha_Vencimiento < CURDATE() AND\n contratos.Fk_Id_Estado != 2\n ORDER BY\n contratos.Numero ASC';\n \n //Se retorna la consulta\n return $this->db->query($sql)->result(); \n }", "title": "" }, { "docid": "aed3da321c652178e9660195cda34e2e", "score": "0.63806856", "text": "function listarIndicadorValor(){\n\t\t$this->procedimiento='ssig.ft_indicador_valor_sel';\n\t\t$this->transaccion='SSIG_INVA_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_indicador_valor','int4');\n\t\t$this->captura('id_indicador','int4');\n\t\t$this->captura('semaforo3','varchar');\n\t\t$this->captura('semaforo5','varchar');\n\t\t$this->captura('no_reporta','varchar');\n\t\t$this->captura('semaforo4','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('semaforo2','varchar');\n\t\t$this->captura('valor','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('hito','varchar');\n\t\t$this->captura('semaforo1','varchar');\n\t\t$this->captura('justificacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('semaforo','varchar');\n\t\t$this->captura('frecuencia','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": "9c44ed125423df5be86a596d560dc542", "score": "0.6371086", "text": "function listaTraffico(){\n\t$configFile = __DIR__ . \"/../config.php\";\n\t$config = include $configFile;\n\t$conn = new ConnectionStatic($config);\n\t\n\tif (!isset($conn)){\n\t\terror_log(\"Connessione non valida.\");\n\t\techo json_encode(\"\");\n\t\treturn;\n\t}\n\t\n\t\n\t$where = MngTrafficoWs::getWhere($_GET);\n\t\n\t\n\t$query = \"select count(*) from cmv.traffico_unito_cres_descres_v \".$where;\n\t$stmt = $conn->pdo->prepare($query, [\\PDO::ATTR_CURSOR => \\PDO::CURSOR_SCROLL]);\n\terror_log(\"Query estrazione numero righe. \".$query);\n\t$stmt -> execute();\n\t$numeroRighe=$stmt->fetch(\\PDO::FETCH_NUM);\n\n\t//estrazione dei colori del traffico\n\t//vecchia gestione dei colori non usata perché messo tutto nella vista\n// \t$select = \"SELECT tipo_strada, velocita_inizio, velocita_fine, colore from cmv.colore_velocita \";\n// \t$stmt = $conn->pdo->prepare($select, [\\PDO::ATTR_CURSOR => \\PDO::CURSOR_SCROLL]);\n// \t$stmt -> execute();\n// \t$colore = array();\n// \twhile ($row = $stmt->fetch(\\PDO::FETCH_OBJ)) {\n// \t\t//error_log(\"Riga: \" . print_r($row, TRUE));\n// \t\t$colore[] = $row;\n// \t}\n\t\n\t\n\t$select = \"SELECT tipo, cod_strada, nome_strada, compartimento, id_traffico_crescente, direzione_crescente, progressiva_crescente, progressiva_fine_crescente, velocita_crescente,direzione_decrescente,coloreCrescente,id_traffico_decrescente, progressiva_decrescente,progressiva_fine_decrescente,velocita_decrescente,coloreDecrescente from cmv.traffico_unito_cres_descres_v \";\n\t$orderby = MngTrafficoWs::getOrderBy($_GET);\n\t$limit = MngTrafficoWs::getLimit($_GET,$numeroRighe);\n\t\n\tif (isset($_GET['pagina']))\t$pagina=$_GET['pagina'];\n\telse $pagina=1;\n\t\t\n\t$query = $select.$where.$orderby.$limit;\n\terror_log(\"Query estrazione dati. \".$query);\n\t$stmt = $conn->pdo->prepare($query, [\\PDO::ATTR_CURSOR => \\PDO::CURSOR_SCROLL]);\n\t\n\tif (!$stmt) {\n\t\terror_log(\"Errore nell'esecuzione della query, motivo: \". print_r($conn->errorInfo(),true) );\n\t}\n\t\n\t$stmt -> execute();\n\t$out = array();\n\twhile ($row = $stmt->fetch(\\PDO::FETCH_OBJ)) {\n\t\t$appo=$row;\n//\t\t$appo->coloreCrescente=MngTrafficoWs::getColore($row->cod_strada,$row->velocita_crescente,$colore);\n//\t\t$appo->coloreDecrescente=MngTrafficoWs::getColore($row->cod_strada,$row->velocita_decrescente,$colore);\n\t\t$out[] = $row;\n\t}\n\t$res = new TrafficoPage();\n\t$res->obj=$out;\n\t$res->totaleRecord=$numeroRighe[0];\n\t$res->paginaCorrente=$pagina;\n\t$res->totalePagine=ceil($res->totaleRecord/30);\n\treturn $res;\n\t//\treturn $out;\n}", "title": "" }, { "docid": "9fe81f07296ea7c92f770d5251d399ce", "score": "0.63606745", "text": "function getConversacionesPosibles(){\n\n\t$sql = \"SELECT INTERCAMBIO.ID , prod1.TITULO AS TITULO1,\n\t\t\t\tprod2.TITULO AS TITULO2, prod1.VENDEDOR_DNI AS DNI1,\n\t\t\t\tprod2.VENDEDOR_DNI AS DNI2, user1.LOGIN AS LOGIN1, user2.LOGIN AS LOGIN2\n\t\t\tFROM INTERCAMBIO\n\t\t\tINNER JOIN PRODUCTOS AS prod1 ON INTERCAMBIO.ID_PRODUCTO1 = prod1.ID\n\t\t\tINNER JOIN PRODUCTOS AS prod2 ON INTERCAMBIO.ID_PRODUCTO2 = prod2.ID\n INNER JOIN USUARIOS AS user1 ON prod1.VENDEDOR_DNI = user1.DNI\n INNER JOIN USUARIOS AS user2 ON prod2.VENDEDOR_DNI = user2.DNI\n\t\t\tWHERE ( INTERCAMBIO.ACCEPT1 = 'denegado' OR \n\t\t\t\t\tINTERCAMBIO.ACCEPT2 = 'denegado')\";\n\t$resultado = $this->mysqli->query($sql);\n\treturn $resultado;\n}", "title": "" }, { "docid": "f05ac550145677acb128bdbb47c3dcb6", "score": "0.6350006", "text": "public function getTrabajador()\n\t\t{\n\t\t\t$query = \"select trabajador.RUT, trabajador.DV, trabajador.APELLIDO_PATERNO, trabajador.APELLIDO_MATERNO, trabajador.NOMBRES, trabajador.FECHA_NACIMIENTO, estado_civil.DETALLE as ESTADO_CIVIL, trabajador.TELEFONO, trabajador.EMAIL, trabajador.DIRECCION, comuna.DETALLE as COMUNA, region.DETALLE as REGION, pais.DETALLE as PAIS, empresa.razon_social as EMPRESA from trabajador inner join estado_civil on trabajador.ESTADO_CIVIL = estado_civil.ID inner join comuna on trabajador.COMUNA = comuna.ID inner join region on trabajador.REGION = region.ID inner join pais on trabajador.PAIS = pais.ID inner join empresa on trabajador.EMPRESA = empresa.RUT\";\n\t\t\t$this->conexionDAO->Abrir();\n\t\t\t$resultado = $this->conexionDAO->select($query);\n\t\t\t$trabajadores = array();\n\t\t\twhile($row = $resultado->fetch_array()) \n\t\t\t{\n\t\t\t\t$trabajador = new Trabajador();\n\t\t\t\t$trabajador->rut = $row[\"RUT\"];\n\t\t\t\t$trabajador->dv = $row[\"DV\"];\n\t\t\t\t$trabajador->ap_paterno = $row[\"APELLIDO_PATERNO\"];\n\t\t\t\t$trabajador->ap_materno = $row[\"APELLIDO_MATERNO\"];\n\t\t\t\t$trabajador->nombres = $row[\"NOMBRES\"];\n\t\t\t\t$trabajador->fecha_nacimiento = $row[\"FECHA_NACIMIENTO\"];\n\t\t\t\t$trabajador->estado_civil = $row[\"ESTADO_CIVIL\"];\n\t\t\t\t$trabajador->telefono = $row[\"\tTELEFONO\"];\n\t\t\t\t$trabajador->mail = $row[\"EMAIL\"];\n\t\t\t\t$trabajador->direccion = $row[\"DIRECCION\"];\n\t\t\t\t$trabajador->comuna = $row[\"COMUNA\"];\n\t\t\t\t$trabajador->region = $row[\"REGION\"];\n\t\t\t\t$trabajador->pais = $row[\"PAIS\"];\n\t\t\t\t$trabajador->empresa = $row[\"EMPRESA\"];\n\n\t\t\t\t$trabajadores[] = $trabajador;\n\t\t\t} \n\t\t\t$this->conexionDAO->Cerrar();\n\t\t\treturn $clientes;\n\t\t}", "title": "" }, { "docid": "108e220e992c33c156c020288f8a6793", "score": "0.63433284", "text": "function getProducto(){\n \n $sentencia = $this->bbdd->prepare( \" SELECT * FROM cerveza\");\n $sentencia->execute();\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "0de81841c91cd69ecc5f38e468c48949", "score": "0.6337876", "text": "public function accionesEst() {\r\n global $cnx;\r\n $query = \"SELECT idacu, cveacu, nomacu \"\r\n . \"FROM catacuerdo WHERE idtipacu = 1 OR idtipacu = 2 ORDER BY cveacu\";\r\n $rs = $cnx->Execute($query);\r\n $data = array();\r\n while (!$rs->EOF) {\r\n array_push($data, $rs->fields);\r\n $rs->movenext();\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "84d0c68d5f9828c0e51c0a01805a501a", "score": "0.63374627", "text": "static public function mdlIngresarVenta($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(id,fecha,codigo,tipo,id_cliente, nombre,documento,id_vendedor,tabla,productos,impuesto,neto,total,adeuda,metodo_pago,fechapago,referenciapago) VALUES (:id,:fecha,:codigo,:tipo, :id_cliente,:nombre,:documento, :id_vendedor,:tabla, :productos, :impuesto, :neto, :total,:adeuda,:metodo_pago,:fechapago,:referenciapago)\");\n\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":id_vendedor\", $datos[\"id_vendedor\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":tipo\", $datos[\"tipo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_cliente\", $datos[\"id_cliente\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":documento\", $datos[\"documento\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":tabla\", $datos[\"tabla\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":productos\", $datos[\"productos\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":impuesto\", $datos[\"impuesto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":neto\", $datos[\"neto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":total\", $datos[\"total\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":adeuda\", $datos[\"adeuda\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":metodo_pago\", $datos[\"metodo_pago\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":referenciapago\", $datos[\"referenciapago\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fechapago\", $datos[\"fechapago\"], PDO::PARAM_STR);\n\t\t\n\t\t\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": "9e1d6df7b7e496a7c610e752bca5cef0", "score": "0.6337371", "text": "public function cargar(){\n $controlador = $this->controlador;\n $accion = $this->accion;\n $sesion = Session :: get ('app.busqueda');\n return $this->condicion = $sesion[$controlador][$accion]['consulta'];\n }", "title": "" }, { "docid": "afb9cd3d8c0bfbf6eb599c00f8c77350", "score": "0.6333854", "text": "public function datosEstudiante($ced_estudiante) {\n\n if ($ced_estudiante != null) {\n //verifico si el estudiante posee especialidad\n $consultaEstudianteEspecialidad = $this->db->select(\"SELECT * FROM sipce_especialidad_estudiante WHERE ced_estudiante = '\" . $ced_estudiante . \"' \");\n if ($consultaEstudianteEspecialidad != null) {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.numeroRuta,eb.becaComedor,eb.becaTransporte,eb.becaAvancemos,\"\n . \"d.Distrito,g.nivel,esp.nombreEspecialidad,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_especialidad as esp, \"\n . \"sipce_especialidad_estudiante as ee, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = ee.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $ced_estudiante . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND esp.codigoEspecialidad = ee.cod_especialidad \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \"\n . \"AND eb.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n //print_r($resultado);\n //die;\n } else {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.numeroRuta,eb.becaComedor,eb.becaTransporte,eb.becaAvancemos,\"\n . \"d.Distrito,g.nivel,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $ced_estudiante . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n }\n\n return $resultado;\n } else {\n \n }\n }", "title": "" }, { "docid": "3238a58ccb4ff053461c4e8849fca6a7", "score": "0.6333551", "text": "function listarEntregaBs(){\n $this->procedimiento='vef.ft_entrega_sel';\n $this->transaccion='VF_ENG_REPRO';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_entrega_brinks','id_entrega_brinks','int4');\n //Definicion de la lista del resultado del query\n $this->captura('nombre_cajero','text');\n $this->captura('estacion','varchar');\n $this->captura('punto_venta','varchar');\n $this->captura('fecha_recojo','text');\n $this->captura('fecha_apertura_cierre','text');\n $this->captura('arqueo_moneda_local','numeric');\n $this->captura('nro_cuenta','varchar');\n $this->captura('denominacion','varchar');\n $this->captura('total','numeric');\n $this->captura('literial','varchar');\n\t\t\t\t$this->captura('id_moneda','int4');\n $this->captura('moneda_local','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "9e3d2942460735c54d7226cf67ddf822", "score": "0.6332784", "text": "function eventos_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"eventos\";\n\t\t$this->campoClave=\"IdEvento\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEvento\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",2);\n$this->agregarVariable2($v);\n\n\t}", "title": "" }, { "docid": "53be310b3a1f5ce08057faab69f2ad08", "score": "0.63301015", "text": "function listarEstadoSiguiente(){\n\t\t//Definicion de variables para ejecucion del procedimientp\n\t\t$this->procedimiento='wf.ft_tipo_estado_sel';\n\t\t$this->transaccion='WF_SIGEST_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('id_tipo_estado_padre','id_tipo_estado_padre','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_estado','int4');\n\t\t$this->captura('nombre_estado','varchar');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('inicio','varchar');\n\t\t$this->captura('disparador','varchar');\n\t\t$this->captura('tipo_asignacion','varchar');\n\t\t$this->captura('nombre_func_list','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_tipo_proceso','varchar');\n\t\t$this->captura('codigo_estado','varchar');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('depto_asignacion','varchar');\n\t\t$this->captura('nombre_depto_func_list','varchar');\n\t\t$this->captura('fin','varchar');\n\t\t$this->captura('alerta','varchar');\n\t\t$this->captura('pedir_obs','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": "33813906915cc875b89b51f88672b762", "score": "0.63297987", "text": "public function dataTrabajadores()\n {\n //\n // return DB::table('trabajadores')->get();\n return DB::table('trabajadores')\n ->select('trabajadores.id', 'trabajadores.Nombre', 'trabajadores.Apellidos')\n ->where('trabajadores.Estado','=','1')\n ->get();\n }", "title": "" }, { "docid": "6bd23f11c62cfcf051cdfb0394148f2f", "score": "0.6328681", "text": "public function ServicioDatos() {\n //se llama al metodo padre\n parent::Conexion();\n }", "title": "" }, { "docid": "a336d9a4645f198ebd22faa7f2a3ef18", "score": "0.6321504", "text": "private function obtenerDatos(){\n $this->load->helper('cookie');\n\t\t$sesionUsuario = unserialize($this->input->cookie('datosSesion', true));\n\t\t$id=$sesionUsuario->id_interprete;\n\t\t$this->load->model('interprete_modelo');\n\t\t$historial= $this->interprete_modelo->hitorialCitas($id);\n\t\t$datos['id']=$id;\n\t\t$datos['historial']=$historial;\n $datos['sesionUsuario']=1;\n $datos['interpreteDatos']=$sesionUsuario;\n \n \treturn $datos;\n\t}", "title": "" }, { "docid": "0d4988da51674857fa813ecd2832dcb2", "score": "0.6318361", "text": "function ListaDetActivo(){\n $this->procedimiento='kaf.ft_activo_fijo_sel';\n $this->transaccion='SKA_LI_ACLIDE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n //Ejecuta la instruccion\n $this->captura('id_clasificacion','int4');\n $this->captura('codigo','varchar');\n $this->captura('nombre','varchar');\n $this->captura('nivel','int4');\n\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "title": "" }, { "docid": "135cc5b6d22869b2818f6246f5dcc81c", "score": "0.6315941", "text": "public function misdatos()\n {\n if ($this->Session->read('Auth.User.Usuario.rol') == ConstantesRoles::EMPRESA){\n //OBTNEMOS EL ID DEL USUARIO LOGUEADO\n $user = $this->Session->read('Auth.User.Usuario.id');\n //OBTNEMOS EL EMAIL DEL USUARIO LOGUEADO\n $mail = $this->Usuario->obtenermail($user);\n //OBTENEMOS LOS DATOS DE LA EMPRESA MEDIANTE SU MAIL\n $datos = $this->Empresa->obtenerdatosempresabymail($mail);\n $images = $this->Image->findByUsuario($this->Session->read('Auth.User.Usuario.id'));\n //MANDAMOS LOS DATOS A LA VISTA\n $this->set(array(\n 'datos' => $datos,\n 'image' => $images\n ));\n }\n\n }", "title": "" }, { "docid": "dc56698fffc7e499ac529d700a4a9f70", "score": "0.6315599", "text": "public function getResultados(){\n \n // Hace la consulta y lo guarda en una variable\n //$res = \\DB::select('CALL II_pro_get_suma_valores_mezcla_productos_servicios_1_anio(?)', array(\\Auth::user()->id_usuario));\n $sumaVentasMes = Mezcla_productos_servicio::where('id_empresa','=',\\Auth::user()->id_empresa)->sum('ventas_mes')*12;\n $sumaUnidadesMes = Mezcla_productos_servicio::where('id_empresa','=',\\Auth::user()->id_empresa)->sum('unidades_mes')*12;\n $precioPromedio = $sumaVentasMes/$sumaUnidadesMes;\n\n \n // Se inicia la variable para guardar el contenido html por mostrar\n $tabla = '';\n // Luego con los datos obtenidos de la consulta se guardan en filas\n \n $tabla .= '\n <div class=\"col-md\">\n <p class=\"invoice-info-row\">\n <span>Unidades al año</span>\n <span>'.number_format($sumaUnidadesMes).' unidades</span>\n </p>\n <p class=\"invoice-info-row\">\n <span>Ventas al año</span>\n <span>$ '.number_format($sumaVentasMes,2).'</span>\n </p>\n <p class=\"invoice-info-row\">\n <span>Precio Promedio</span>\n <span>$ '.number_format($precioPromedio,2).'</span>\n </p>\n </div>';\n \n \n // Retorna la tabla\n return $tabla;\n \n }", "title": "" }, { "docid": "32a44e455a8570e550cfb72fc7ad77bd", "score": "0.6312752", "text": "public function getVentas()\n {\n $this->db->select('v.*, c.nombres, p.proyecto as nombreProyecto');\n $this->db->from('ventas v');\n $this->db->join('ventas p','v.id_presupuesto = p.id_ventas');\n $this->db->join('clientes c', 'v.id_clientes = c.id_clientes');\n $this->db->join('tipo_comprobante tc','v.id_tipo_comprobante = tc.id_tipo_comprobante');\n $this->db->where('v.id_tipo_comprobante !=','3');\n $this->db->where('v.estado','1');\n $resultado = $this->db->get()->result_array();\n\n if (count($resultado) > 0) {\n return $resultado;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4e4ff0dbfbdadc86b0499df16f253e2b", "score": "0.6311087", "text": "public function clientesAtivos(){\r\n $sql = 'SELECT count(*) as qtde FROM `tb_cliente` WHERE cli_status = :status';\r\n \r\n $stmt = BD::conn()->prepare($sql);\r\n $stmt->bindValue(':status', 1, PDO::PARAM_INT);\r\n $stmt->execute();\r\n \r\n return $stmt->fetch(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "c9944c1ac655d62bf4c5613cef0488b2", "score": "0.6306398", "text": "public function dadosRemessaDevolucao(RemessaDevolucao $remessaDevolucao)\n {\n\t\t//$remessaDevolucao = RemessaDevolucao::where($where)->firstOrFail();\n\n\t\t $remessaDevolucao->load('tipoSituacaoDevolucao');\n\n\t\t$whereContratos[] = ['remessa_devolucao_id', $remessaDevolucao->id ];\n\t\t//$contratosDevolvidos = DevolucaoContratos::where($whereContratos)->get();\n\t\t//$contratosDevolvidos->load('pagamentosContratos.notasPagamento','contratos.protocolosInstituicaos');\n \t\n\t\t$instituicao = DevolucaoContratos::join('tab_contratos','tab_contratos.id','=','tab_devolucao_contratos.contrato_id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->join('opc_instituicoes_financeiras','opc_instituicoes_financeiras.id','=','tab_contratos.instituicao_id')\n \t\t\t\t\t\t\t\t\t\t\t\t ->select('instituicao_id','txt_nome_if','txt_nome_completo_if')\n \t\t\t\t\t\t\t\t\t\t\t\t ->where($whereContratos)\n \t\t\t\t\t\t\t\t\t\t\t\t ->groupBy('instituicao_id','txt_nome_if','txt_nome_completo_if')\n \t\t\t\t\t\t\t\t\t\t\t\t ->firstOrFail();\n\n\n\n // return $instituicao;\n\n $parcelasRemessas = PagamentosParcelasRemessaDevolucao::where($whereContratos)\n ->orderBy('sg_uf')\n ->orderBy('ds_municipio')\n ->orderBy('txt_nome_beneficiario')\n ->get(); \t\t\t\t\t\t\t\t\t\t\t\t \n //\treturn $parcelasRemessas->load('pagamentosContratosParcelaDtePagam');\n //\t$parcelasRemessas = $parcelasRemessas->sortBy('protocolosInstituicao.sg_uf')\n //\t\t\t\t\t\t\t\t\t\t ->sortBy('protocolosInstituicao.ds_municipio')\n //\t\t\t\t\t\t\t\t\t\t ->sortBy('beneficiario.txt_nome_beneficiario');\n\n\t\t$totalPago = 0; \t\t\t\t\t\t\t\t\t\t \n \tforeach ($parcelasRemessas as $parcelas) {\n \t\t$totalPago += $parcelas->parcela_1 + $parcelas->parcela_2 + $parcelas->parcela_3 + $parcelas->parcela_4 + $parcelas->parcela_5 + $parcelas->parcela_6 + $parcelas->parcela_7;\n \t}\n\n //return $totalPago;\n \t//$max = $contratosDevolvidos->where('instituicao_id', $contratosDevolvidos->max('instituicao_id'))->first();\n\n \t$subtitulo1 = 'Remessa de Devolução: '.$remessaDevolucao->id;\n\n\n \treturn view('views_sishab.oferta_publica.relatorio_remessa_devolucao', compact('remessaDevolucao','parcelasRemessas','instituicao','totalPago','subtitulo1'));\n \t\n \n }", "title": "" }, { "docid": "d8b1cf55ae043c170c058f1dfd1a1c3e", "score": "0.63054264", "text": "public function TRD_ver_datos_clientes() {\r\n $obj = new padreModelo();\r\n $sql = \" select * from vw_cliente where cliente_id in (\" . $this->cliente_id . \")\";\r\n $data = $obj->ejecutar_query($sql);\r\n return $data[0];\r\n }", "title": "" }, { "docid": "bffb6b0a8026e284a1be7e15cbe3a17e", "score": "0.63021594", "text": "public function buscarParametrosAvanzados()\n {\n $GLOBALS['mensaje'] = \"\";\n\n $tipoUser = $_SESSION['perfil'];\n\n $m = new Modelo_consultas(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario,\n Config::$mvc_bd_clave, Config::$mvc_bd_hostname);\n\n $dataNew = array();\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $info = json_decode($_POST['jObject'], true);\n\n if(is_string($info['fechaInicio']) and is_string($info['fechaFin']) and is_string($info['edificio']) and is_numeric($info['campus']) and is_numeric($info['piso']) and is_numeric($info['sistema']))\n {\n if($info['sistema'] == '10'){\n if($tipoUser == 'hidraulico'){\n $sistema = 1;\n $info['campus'] = 1;\n }else if($tipoUser == 'planta'){\n $sistema = 3;\n $info['campus'] = 1;\n }else if($tipoUser == 'electrico'){\n $sistema = 2;\n $info['campus'] = 1;\n }else if($tipoUser == 'mobiliario'){\n $sistema = 4;\n $info['campus'] = 1;\n }else{\n $sistema = -1;\n }\n $info['sistema'] = $sistema;\n }\n\n if($tipoUser == 'sanfernando'){\n if ($sistema == -1) {\n $info['campus'] = -2; //Para que muestre las ordenes del campus San Fernando y Otro.\n }\n }\n\n $data = $m->buscarOrdenesParametrosAvanzados($info['campus'], $info['edificio'], $info['sistema'], $info['piso'], $info['fechaInicio'], $info['fechaFin']);\n foreach ($data as $clave => $valor) {\n \t $temp1 = $valor['descripcion1'];\n\t\t \t\t $temp2 = $valor['descripcion2'];\n\t\t\t\t $temp3 = $valor['descripcion3'];\n \t $novedad1 = $m->getNombreNovedad($temp1);\n\t\t\t\t $novedad2 = $m->getNombreNovedad($temp2);\n\t\t\t\t $novedad3 = $m->getNombreNovedad($temp3);\n \t foreach ($novedad1 as $a => $b) {\n \t\t $novedad1 = $b['novedad'];\n \t }foreach ($novedad2 as $c => $d) {\n \t\t $novedad2 = $d['novedad'];\n \t }foreach ($novedad3 as $e => $f) {\n \t\t $novedad3 = $f['novedad'];\n \t }\n $arrayAux = array(\n 'numero_solicitud' => $valor['numero_solicitud'],\n 'usuario' => $valor['usuario'],\n 'telefono' => $valor['telefono'],\n 'extension' => $valor['extension'],\n 'cod_sede' => $valor['cod_sede'],\n 'codigo_campus' => $valor['codigo_campus'],\n 'codigo_edificio' => $valor['codigo_edificio'],\n 'piso' => $valor['piso'],\n 'espacio' => $valor['espacio'],\n 'cantidad1' => $valor['cantidad1'],\n 'descripcion1' => $novedad1,\n 'descripcion_novedad' => $valor['descripcion_novedad'],\n 'cantidad2' => $valor['cantidad2'],\n 'descripcion2' => $novedad2,\n 'descripcion_novedad2' => $valor['descripcion_novedad2'],\n 'cantidad3' => $valor['cantidad3'],\n 'descripcion3' => $novedad3,\n 'descripcion_novedad3' => $valor['descripcion_novedad3'],\n 'contacto' => $valor['contacto'],\n 'estado' => $valor['estado'],\n 'descripcion' => $valor['descripcion'],\n 'fecha' => $valor['fecha'],\n 'impreso' => $valor['impreso'],\n 'operario' => $valor['operario'],\n 'responsable_ejecucion' => $valor['responsable_ejecucion'],\n 'fecha_entrega_responsable' => $valor['fecha_entrega_responsable'],\n );\n array_push($dataNew, $arrayAux);\n\n \t}\n }\n else\n {\n $dataNew['mensaje'] = 'Error selecciones opciones válidas';\n }\n }\n\n $dataNew['mensaje'] = $GLOBALS['mensaje'];\n\n echo json_encode($dataNew);\n\n }", "title": "" }, { "docid": "5d91c2589ba7be5564c22de42eef41dd", "score": "0.62895894", "text": "public function cadastra_venda($tipo_pagamento)\n\t{\n\t\t\n\t\t$dados[id_usuario]\t\t\t=\tUtil::trata_dados_formulario($_SESSION[usuario][idusuario]); \n\t\t$dados[data]\t\t\t\t=\tdate(\"d/m/Y\"); \n\t\t$dados[hora]\t\t\t\t=\tdate(\"H:i\");\n\t\t$dados[mensagem_cartao]\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][mensagem]);\n\t\t$dados[id_frete]\t\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][bairro]); \n\t\t$dados[endereco]\t\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][endereco]); \n\t\t$dados[numero]\t\t\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][numero]); \n\t\t$dados[complemento]\t\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][complemento]);\n\t\t$dados[nome_contato]\t\t=\tUtil::trata_dados_formulario($_SESSION[entrega][nome_contato]);\n\t\t$dados[telefone_contato]\t=\tUtil::trata_dados_formulario($_SESSION[entrega][telefone_contato]);\n\t\t$dados[tipo_pagamento] \t\t= \t$tipo_pagamento; \n\t\t\n\t\t\n\t\t//\tCADASTRO NA TABELA DE VENDAS\n\t\t$vendas[id] = parent::insert('tb_vendas', $dados);\n\t\t\n\t\t\n\t\t//\tCADASTRO OS PRODUTO\n\t\tif(count($_SESSION[produtos]) > 0):\n\t\t\t\n\t\t\tforeach($_SESSION[produtos] as $produto):\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t$sql = \"INSERT INTO tb_vendas_produtos \n\t\t\t\t\t\t(id_venda, id_produto, valor, qtd, titulo)\n\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t('$vendas[id]', '$produto[idproduto]', '$produto[preco]', '$produto[qtd]', '$produto[titulo]')\n\t\t\t\t\t\t\";\n\t\t\t\tparent::executaSQL($sql);\n\t\t\t\t\n\t\t\t\t$total += $produto[preco] * $produto[qtd];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t#\t=====================================================\t#\n\t\t\t\t#\tMENSAGEM DOS PRODUTOS\n\t\t\t\t#\t=====================================================\t#\n\t\t\t\t$vendas[msg_produtos] .= \n\t\t\t\t\"\n\t\t\t\t <tr>\n\t\t\t\t\t<td>\". $produto[titulo] .\"</td>\n\t\t\t\t\t<td align='right'>\". $produto[qtd] .\"</td>\n\t\t\t\t\t<td align='right'>R$ \". Util::formata_moeda($produto[preco]) .\"</td>\n\t\t\t\t </tr>\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\tendforeach;\n\t\t\t\n\t\tendif;\n\t\t\n\t\t\n\t\t//\tCALCULO O VALOR DO FRETE\n\t\t$frete = $this->get_frete($dados[id_frete]);\n\t\t$vendas[frete] = $frete[valor];\n\t\t$vendas[total_produtos] = $total;\n\t\t$vendas[total] = $vendas[frete] + $vendas[total_produtos];\n\t\t$vendas[data]\t= $dados[data];\n\t\t$vendas[hora]\t= $dados[hora];\n\t\t\n\t\t\n\t\treturn $vendas;\n\t\t\n\t\t\n\t\t\t\n\t}", "title": "" }, { "docid": "88894c60687c5076b3e826964018aced", "score": "0.6287622", "text": "public function buscarTodosClientesAtivos(){\r\n $sql = 'SELECT \r\n cli_id,\r\n cli_nome,\r\n cli_email,\r\n cli_site,\r\n cli_ufid,\r\n cli_cidade,\r\n cli_endereco,\r\n cli_complemento,\r\n cli_bairro,\r\n cli_cep,\r\n cli_logotipo,\r\n det_fiwi,\r\n det_acessodefic,\r\n det_estacionamento,\r\n det_outrasunidades,\r\n uf_nome,\r\n uf_sigla,\r\n tel_fixo,\r\n tel_celular,\r\n tel_fax\r\n FROM `tb_cliente` \r\n inner join tb_detalhes on det_cliid = cli_id\r\n inner join tb_estados on uf_id = cli_ufid \r\n inner join tb_telefones on tel_cliid = cli_id\r\n WHERE cli_status = 1\r\n ORDER BY cli_cidade ASC';\r\n \r\n $stmt = BD::conn()->prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "fac285672f80e1b8f3ff4a9d61d30d55", "score": "0.62814844", "text": "function listarCorrespondencia(){\n\t\t//Definicion de variables para ejecucion del procedimientp\n\t\t$this->procedimiento='corres.ft_correspondencia_sel';\n\t\t$this->transaccion='CO_COR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t//$this->setParametro('interface','interface','integer');\n\t\t//$parametros = $this->aParam->getArregloParametros('interface');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_correspondencia','int4');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_documento','date');\n\t\t$this->captura('fecha_fin','date');\n\t\t\n\t//\t$this->captura('id_acciones','int4');//array\n\t\t\n\t\t$this->captura('id_archivo','integer[]');\n\t\t$this->captura('id_correspondencia_fk','int4');\n\t\t$this->captura('id_correspondencias_asociadas','integer[]');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('id_documento','int4');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('id_periodo','int4');\n\t\t$this->captura('id_persona','int4');\n\t\t$this->captura('id_uo','int4');\n\t\t$this->captura('mensaje','text');\n\t\t$this->captura('nivel','int4');\n\t\t$this->captura('nivel_prioridad','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('observaciones_estado','text');\n \t\t$this->captura('referencia','varchar');\n\t\t$this->captura('respuestas','varchar');\n\t\t$this->captura('sw_responsable','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_documento','varchar');\n\t\t\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('ruta_archivo','varchar');\n\t\t$this->captura('version','int4');\n\t\t\n\t\t$this->captura('desc_uo','text');\n $this->captura('desc_clasificador','text');\n $this->captura('id_clasificador','integer');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "df00144d0893863e094a9a936abcfc7e", "score": "0.6280839", "text": "private function consultar_estado_civil_todos() {\n $dbName = new DataBase($this->db);\n $sentencia = \"select id,nombre,detalle from estado_civil ec;\";\n $this->respuesta = $dbName->consultar_script($sentencia);\n }", "title": "" }, { "docid": "c6a3ca523587176219fcb43b44b8156c", "score": "0.6280579", "text": "function fill_datatable_corte(){\n\t\techo('\n\t\t <thead>\n\t <tr>\n\t <th>Id de la Venta</th>\n\t <th>Total de Venta</th>\n\t <th>Vendedor</th>\n\t </tr>\n\t </thead>\n\t <tbody>\n\t ');\n\t\t$daten=date_create(\"now\");\n\t\t$daten=date_format($daten,\"Y-m-d\");\n\n\t\t$today = select(\"select id, total,id_usuario from venta where fecha='\".$daten.\"'\");\n\t\t\n\t\tfor($i=0;$i<sizeof($today);$i++){\n\t\t\techo('\n\t\t\t\t<tr>\n\t\t\t\t\t<td>'.array_values($today[$i])[0].'</td>\n\t\t\t\t\t<td>'.array_values($today[$i])[1].'</td>\n\t\t\t\t\t<td>'.array_values(select(\"select CONCAT(nombre, apellido_paterno, apellido_materno) from usuario where id='\".array_values($today[$i])[2].\"'\")[0])[0].'</td>\n\t\t\t\t</tr>\n\t\t\t\t');\n\t\t}\n\t echo('</tbody>');\t\n\t}", "title": "" }, { "docid": "5a068a080c9bb6ed623efad1efe64610", "score": "0.6279287", "text": "public function detalleCuenta($id_Cue)\n {\n $this->conectar();\n $total=0;\n $orden='<div class=\"table-responsive\">\n <table class=\"pure-table pure-table-horizontal\">\n <thead>\n <tr>\n <th>Cant</th>\n <th>Nombre</th>\n <th>Tipo</th>\n <th>Precio</th>\n <th>Total</th>\n </tr>\n </thead>\n <tbody>';\n $sql1 = \"SELECT * FROM orden WHERE id_Cue=\".$id_Cue;\n $result1 = $this->con->query($sql1);\n if ($result1->num_rows > 0) {\n while($row1 = $result1->fetch_assoc()) \n {\n switch($row1['tipo']){\n case 'platillo': \n $sql2 = \"SELECT * FROM platillo WHERE id_Plat=\".$row1['id_Menu'];\n break;\n case 'combos':\n $sql2 = \"SELECT * FROM combos WHERE id_Comb=\".$row1['id_Menu'];\n break;\n case 'promos':\n $sql2 = \"SELECT * FROM promos WHERE id_Promo=\".$row1['id_Menu'];\n break;\n }\n $result2 = $this->con->query($sql2);\n if ($result2->num_rows > 0) {\n $row2 = $result2->fetch_assoc();\n $orden.='\n <tr>\n <td>'.$row1['cantidad'].'</td>\n <td>'.$row2['nombre'].'</td>\n <td>'.$row1['tipo'].'</td>\n <td>$ '.number_format($row2['precio'],2).'</td>\n <td>$ '.number_format(($row1['cantidad']*$row2['precio']),2).'</td>\n </tr>';\n $total+=($row1['cantidad']*$row2['precio']);\n }\n }\n }\n \n $orden.='\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td>Total</td>\n <td>$ '.number_format($total,2).'</td>\n </tr>\n </tbody>\n </table>';\n \n echo $orden;\n $this->con->close();\n }", "title": "" }, { "docid": "a1d00dfc109064133b63699c80b2d4ad", "score": "0.62768626", "text": "function cargarTablaCentroCostosServicios($datos) {\r\n parent::ConnectionOpen(\"pnsListarServiciosXCentroCostos\", \"dbweb\");\r\n parent::SetParameterSP(\"bus\", '1');\r\n parent::SetParameterSP(\"var1\", $datos['idCentroCosto']);\r\n $resultadoArray = parent::executeSPArrayX();\r\n parent::ConnectionClose();\r\n return $resultadoArray;\r\n }", "title": "" }, { "docid": "500cf102719c93564dad2b3e1625f663", "score": "0.6276515", "text": "public function obtenerCorreosPapelera()\n {\n\n try\n {\n\n $idEmpleado=$_SESSION[\"usuario\"][\"idUsuario\"];\n\n //Sentencia SQL para selección de datos.\n $stm = $this->pdo->prepare(\"SELECT * FROM correo WHERE idUsuarioEnvioCorreo='$idEmpleado'\");\n\n //Ejecución de la sentencia SQL.\n $stm->execute();\n $datos=array();\n $datosSeguimiento=array();\n $dataIdCorreo=array();\n while ($row = $stm->fetch(PDO::FETCH_ASSOC)) {\n\n $idCorreo=base64_encode($row['idCorreo']);\n $idCorreoSecundario=$row['idCorreo']; \n $asunto=$row['asunto'];\n $grupoDestinatario=$row['grupoDestinatario'];\n // var_dump($idCorreoSecundario);\n\n $dataIdCorreo[] = array('idCorreoSecundario' => $idCorreoSecundario,'idCorreo' => $idCorreo,'asunto' => $asunto,'grupoDestinatario' => $grupoDestinatario);\n\n }\n\n\n if (!empty($dataIdCorreo)) {\n\n for ($i=0; $i < sizeof($dataIdCorreo) ; $i++) { \n\n $idCorreo=$dataIdCorreo[$i]['idCorreoSecundario'];\n\n //BUSCAR ETIQUETA DE CORREO\n $buscarSeguimiento = $this->pdo->prepare(\"SELECT * FROM seguimiento_correo WHERE Correo_idCorreo='$idCorreo' AND Estatus_idEstatus=4 AND estatusSeguimiento=1\");\n $buscarSeguimiento->execute();\n\n while ($filaSeguimiento = $buscarSeguimiento->fetch(PDO::FETCH_ASSOC)) {\n\n $idSeguimiento_correo=$filaSeguimiento['idSeguimiento_correo'];\n // var_dump($idSeguimiento_correo);\n // var_dump($dataIdCorreo[$i]['asunto']);\n\n $enlaceCorreo=\"<td><div class='col text-center'><a href='?c=GestionarUsuarios&a=EditarDatosUsuario&g=\".$dataIdCorreo[$i]['idCorreo'].\"' title='Ver correo'>\".$dataIdCorreo[$i]['grupoDestinatario'].\"</a></div></td>\";\n\n $asuntoC=\"<td><div class='col text-center'>\".$dataIdCorreo[$i]['asunto'].\"</div></td>\";\n\n // $BotonRestablecer=\"<td><div class='col text-center'><a href='?c=GestionarUsuarios&a=EditarDatosUsuario&g=\".$idCorreo.\"'title='Editar información' class='btn btn-warning btn-circle'><i class='fas fa-trash-restore'></i></a></div></td>\";\n\n $BotonEliminar=\"<td><div class='col text-center'><button onclick='alertaDefiCorreo(\".$dataIdCorreo[$i]['idCorreoSecundario'].\");' title='Dar de baja' class='bajaUsuario btn btn-danger btn-circle'><i class='fas fa-trash'></i></button></div></td>\";\n\n $datos[] = array('enlaceCorreo' => $enlaceCorreo, 'asuntoC' => $asuntoC,'BotonEliminar' => $BotonEliminar);\n\n }\n\n }\n }\n\n\n $tabla = array(\n \"data\" => $datos\n\n );\n\n echo json_encode($tabla);\n\n }\n catch(Exception $e)\n {\n //Obtener mensaje de error.\n die($e->getMessage());\n }\n}", "title": "" }, { "docid": "98816e0959dd3c13f95cd8785ef3b6c6", "score": "0.62699056", "text": "function procesar_carga ($datos){\n //-- Check en sesion.\n $hora_inicio=toba::memoria()->get_dato_instancia(100);\n $hora_fin=toba::memoria()->get_dato_instancia(101);\n $tipo=toba::memoria()->get_dato_instancia(102); \n \n //Hacemos un ultimo check en el server, verificamos si el usuario hizo un movimiento de horarios y no \n //selecciono nuevamente un aula disponible. Si hacemos un movimiento de horarios no sabemos si ese \n //mismo aula estara disponible. Y esto ocurre cuando el usuario modifica el horario y no abre el \n //pop up aula.\n //En $datos traemos el ultimo movimiento de horarios realizado.\n if(!(($datos['hora_inicio']>=$hora_inicio && $datos['hora_inicio']<=$hora_fin) && $datos['hora_fin']<=$hora_fin)){\n $mensaje=\" Acaba de realizar un movimiento de horarios y no seleccionó nuevamente un aula \";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n toba::memoria()->limpiar_datos_instancia();\n return ;\n }\n \n switch($tipo){\n case 'Definitiva' : $dia=toba::memoria()->get_dato_instancia(103);\n \n if(!(strcmp($dia, $datos['dia_semana'])==0)){\n $mensaje=\"Acaba de cambiar el dia de la asignación y no seleccionó nuevamente un aula\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n toba::memoria()->limpiar_datos_instancia();\n return ;\n }\n \n if(strcmp($this->s__accion, \"Registrar\")==0){\n $this->s__dia=$datos['dia_semana']; \n //Si ejecutamos un script sql, con insert into, la secuencia no se actualiza, por lo tanto debemos\n //resetearla manualmente mediante select setval('secuencia', numero, 't').\n //recuperar_secuencia utiliza la funcion currval('secuencia') que devuleve el valor actual de la\n //misma. Cuando insertamos una tupla en una tabla, toba de alguna manera, usa la funcion \n //nextval('secuencia') para obtener el proximo id, y asi evitar problemas con claves repetidas.\n $this->registrar_asignacion($datos);\n //Obtenemos el numero que utiliza postgres para garantizar unicidad en claves serials\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n \n $this->registrar_asignacion_definitiva($datos);\n\n $this->registrar_equipo_de_catedra($secuencia);\n \n toba::memoria()->limpiar_datos_instancia();\n }else{//En accion tenemos 'Editar'\n $this->procesar_edicion($datos);\n }\n \n break;\n \n \n \n case 'Periodo' : \n \n switch($datos['tipo_asignacion']){\n \n case 'EXAMEN PARCIAL' : \n case 'EXAMEN FINAL' : $fecha_inicio=date('Y-m-d', strtotime(toba::memoria()->get_dato_instancia(103)));\n \n if(!strcmp($fecha_inicio, $datos['fecha_inicio'])==0){\n $mensaje=\"Acaba de cambiar la fecha de inicio y no seleccionó nuevamente un aula\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n toba::memoria()->limpiar_datos_instancia();\n return ;\n }\n \n if(strcmp($this->s__accion, \"Registrar\")==0){\n //Para evitar conflictos. La fecha es la misma.\n $fecha_fin=$datos['fecha_inicio'];\n //La lista de fechas se guarda en un arreglo asociativo.\n $dias=array(0 => $fecha_fin);\n $datos['fecha_fin']=$fecha_fin;\n $datos['dias']=$dias;\n \n $this->registrar_asignacion($datos);\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n \n $this->registrar_asignacion_periodo($datos);\n $this->registrar_equipo_de_catedra($secuencia);\n \n toba::memoria()->limpiar_datos_instancia();\n }else{\n \n }\n\n break;\n case 'CONSULTA' :\n case 'EVENTO' : $fecha_inicio=date('Y-m-d', strtotime(toba::memoria()->get_dato_instancia(103)));\n $fecha_fin=date('Y-m-d', strtotime(toba::memoria()->get_dato_instancia(104)));\n $lista_dias=toba::memoria()->get_dato_instancia(105);\n \n if(!(strcmp($fecha_inicio, $datos['fecha_inicio'])==0 && strcmp($fecha_fin, $datos['fecha_fin'])==0)){\n $mensaje=\"Acaba de cambiar las fechas de inicio y fin y no seleccionó nuevamente un aula\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n toba::memoria()->limpiar_datos_instancia();\n return ;\n }\n \n if(!($this->mismos_dias($datos['dias'], $lista_dias))){\n $mensaje=\"Acaba de modificar la lista de días elegidos y no seleccionó nuevamente un aula\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n toba::memoria()->limpiar_datos_instancia();\n return ;\n }\n \n if(strcmp($this->s__accion, \"Registrar\")==0){\n \n $hd=new HorariosDisponibles();\n $dias=$hd->get_dias($datos['fecha_inicio'], $datos['fecha_fin'], $datos['dias']);\n \n $datos['dias']=$dias;\n \n $this->registrar_asignacion($datos);\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n \n $this->registrar_asignacion_periodo($datos);\n $this->registrar_equipo_de_catedra($secuencia);\n toba::memoria()->limpiar_datos_instancia();\n }else{\n \n }\n\n break;\n }\n \n break;\n }\n \n }", "title": "" }, { "docid": "29b5735aade8c10655663a96c7d8f089", "score": "0.62645036", "text": "static public function ctrCrearVenta()\n {\n\n if (isset($_POST[\"totalVenta\"])) {\n echo '\n <script> console.log(\"inició venta\");</script>\n\n ';\n /*=============================================\n\t\t\tACTUALIZAR LAS COMPRAS DEL CLIENTE Y REDUCIR EL STOCK Y AUMENTAR LAS VENTAS DE LOS PRODUCTOS\n\t\t\t=============================================*/\n\n if ($_POST[\"listaProductos\"] == \"\") {\n\n echo '<script>\n swal.fire({\n icon:\"error\",\n title: \"No Hay Productos Agregados\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false \n }).then((result)=>{\n if(result.value){\n window.location=\"vender\";\n }\n });\n </script>';\n\n return;\n }\n\n\n $listaProductos = json_decode($_POST[\"listaProductos\"], true);\n\n $totalProductosComprados = array();\n\n foreach ($listaProductos as $key => $value) {\n\n array_push($totalProductosComprados, $value[\"cantidad\"]);\n\n $tablaProductos = \"productos\";\n\n $item = \"producto_nombre\";\n $valor = $value[\"nombre\"];\n\n $traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor);\n\n $item1a = \"producto_ventas\";\n $valor1a = $value[\"cantidad\"] + $traerProducto[\"producto_ventas\"];\n\n $nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n $tablaInventario = \"inventario\";\n $item1b = \"producto_inventario\";\n $valor1b = $value[\"inventario\"];\n $sucursal = $_SESSION[\"sucursal\"];\n $nuevoStock = ModeloProductos::mdlActualizarInventario($tablaInventario, $item1b, $valor1b, $valor, $sucursal);\n }\n\n $tablaClientes = \"clientes\";\n\n $item = \"cliente_id\";\n $valor = $_POST[\"clienteFormulario\"];\n\n $traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $item, $valor);\n $item1a = \"cliente_compras\";\n $valor1a = array_sum($totalProductosComprados) + $traerCliente[\"cliente_compras\"];\n $comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valor);\n /*=============================================\n descuento de puntos al cliente \n =============================================*/\n if ($_POST[\"puntosClienteUsar\"] > 0) {\n $puntosAUsar = $_POST[\"puntosClienteUsar\"];\n //Traer todas las tuplas de puntos del cliente ordenadas por fecha en orden ascendente\n $puntos = ModeloClientes::mdlMostrarPuntos($valor);\n //evaluar una por una si es mayor a los puntos a usar y hacer la resta\n //si la tupla tiene menos de los que va a usar, elimina la tupla y resta los puntos a usar para \n //pasar a la siguiente tupla y restar lo que falta\n foreach ($puntos as $key => $value) {\n if ($value[\"puntos_cantidad\"] <= $puntosAUsar) {\n $puntosAUsar -= $value[\"puntos_cantidad\"];\n ModeloClientes::mdlBorrarPuntos($value[\"puntos_id\"]);\n } else {\n $actualizarPuntos = $value[\"puntos_cantidad\"] - $puntosAUsar;\n ModeloClientes::mdlDescontarPuntos($value[\"puntos_id\"], $actualizarPuntos);\n $puntosAUsar = 0;\n }\n }\n }\n /*=============================================\n Agregar los puntos que se obtuvieron en la compra\n =============================================*/\n if ($_POST[\"totalPuntos\"] > 0) {\n $puntosNuevos = $_POST[\"totalPuntos\"];\n ModeloClientes::mdlAgregarPuntos($valor, $puntosNuevos);\n }\n /*=============================================\n \n =============================================*/\n $idCliente = $traerCliente[\"cliente_id\"];\n $descuento = ModeloClientes::mdlMostrarDescuento($item, $idCliente);\n /*=============================================\n\t\t\tGUARDAR LA COMPRA\n\t\t\t=============================================*/\n\n $tabla = \"ventas\";\n $total = number_format($_POST[\"totalVenta\"], 2, '.', '');\n $iva = $total * 0.16;\n $iva = number_format($iva, 2, '.', '');\n $impuestoAdicional = 0;\n if ($_POST[\"listaMetodoPago\"] == \"Tarjeta\") {\n $impuestoAdicional = $total * 0.035;\n }\n\n $impuestoAdicional = number_format($impuestoAdicional, 2, '.', '');\n $neto = $total - $iva - $impuestoAdicional;\n $neto = number_format($neto, 2, '.', '');\n $datos = array(\n \"id\" => $_POST[\"clienteFormulario\"],\n \"descuentoCliente\" => $descuento[\"tipo_descuento\"],\n \"descuentoAdicional\" => $_POST[\"nuevoDescuentoVenta\"],\n \"descuentoPuntos\" => $_POST[\"puntosClienteUsar\"],\n \"iva\" => $iva,\n \"impuestoAdicional\" => $impuestoAdicional,\n \"metodoPago\" => $_POST[\"listaMetodoPago\"],\n \"productos\" => $_POST[\"listaProductos\"],\n \"sesion\" => $_SESSION[\"sesion\"],\n \"total\" => $total,\n \"neto\" => $neto,\n \"sucursal\" => $_SESSION[\"sucursal\"],\n \"puntos\" => $_POST[\"totalPuntos\"]\n );\n //var_dump($datos);\n $respuesta = ModeloVentas::mdlIngresarVenta($tabla, $datos);\n if ($respuesta == \"ok\") {\n /*=============================================\n Ver si pidió préstamo \n =============================================*/\n if (\n $_POST[\"listaMetodoPago\"] != \"Efectivo\" &&\n $_POST[\"listaMetodoPago\"] != \"Tarjeta\" &&\n $_POST[\"listaMetodoPago\"] != \"Trasferencia\"\n ) {\n\n /*=============================================\n si pidió préstamo, traer el id de la venta recien creada \n =============================================*/\n $ultimaVenta = ModeloVentas::mdlUltimaVenta($_POST[\"clienteFormulario\"]);\n //Preparar los datos para el prestamo\n $datosP = array(\n \"monto\" => $total,\n \"cliente\" => $_POST[\"clienteFormulario\"],\n \"sesion\" => $_SESSION[\"sesion\"],\n \"venta\" => $ultimaVenta[\"MAX(venta_id)\"],\n \"caducidad\" => $_POST[\"listaMetodoPago\"]\n );\n //crear el prestamo\n ModeloPrestamos::mdlIngresarPrestamo($datosP);\n }\n /*=============================================\n Ver si pidió un contacto futuro \n =============================================*/\n if (isset($_POST[\"fechaContactar\"])) {\n $ultimaVenta = ModeloVentas::mdlUltimaVenta($_POST[\"clienteFormulario\"]);\n $datosC = array(\n \"cliente\" => $_POST[\"clienteFormulario\"],\n \"fecha\" => $_POST[\"fechaContactar\"],\n \"venta\" => $ultimaVenta[\"MAX(venta_id)\"]\n );\n ModeloAgenda::mdlIngresarAgenda($datosC);\n }\n echo '<script>\n\t\t\t\tlocalStorage.removeItem(\"rango\");\n\t\t\t\tswal.fire({\n icon:\"success\",\n title: \"Venta Realizada Con Éxito\",\n showConfirmButton: false,\n timer: 500\n }).then(function (result) {\n if (result.dismiss === swal.DismissReason.timer) {\n window.location=\"vender\";\n }\n });\n\t\t\t\t</script>';\n } else {\n echo '<script>\n\n\t\t\t\tlocalStorage.removeItem(\"rango\");\n\n\t\t\t\tswal.fire({\n icon:\"error\",\n title: \"Venta No Realizada Con Éxito\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false \n }).then((result)=>{\n if(result.value){\n window.location=\"vender\";\n }\n });\n\n\t\t\t\t</script>';\n }\n }\n }", "title": "" }, { "docid": "edb3081b6052b1008f78f3ec18cc36b3", "score": "0.62631106", "text": "public function cargar_comunas($vig){\n\n try{\n \n \n $pdo = AccesoDB::getCon();\n\n if ($vig == 0) {\n $sql = \"select id_comuna, nom_comuna from comunas_cl\";\n \n }else if ($vig == 1) {\n $sql = \"select id_comuna, nom_comuna from comunas_cl where vig_comuna = 1\";\n }\n \n \n \n \n\n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n\n $response = $stmt->fetchAll();\n return $response;\n\n } catch (Exception $e) {\n echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='index.php';</script>\";\n }\n }", "title": "" }, { "docid": "f4fa6ed895351b26dcd06c2cfea0f7d8", "score": "0.6262978", "text": "public function listar() {\n $db = new BD();\n $sentencia = \"SELECT * FROM votaprofesional\";\n $res = mysqli_query($db->connection,$sentencia);\n $db->desconectar();\n return $res;\n }", "title": "" }, { "docid": "a27c3ab65e60f6011f3a26a75c2f83e7", "score": "0.6259527", "text": "public function listaEstudianteBecasComedor() {\n $datos = array();\n //enlisto todas las cedulas de estudiantes becados\n $listaEstudianteBecas = $this->db->select(\"SELECT ced_estudiante, (ingreso1+ingreso2+ingreso3+ingreso4)/totalMiembros promedioIngresos \"\n . \"FROM sipce_estudiante_beca \"\n . \"WHERE annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \"\n . \"AND becaComedor = 1 \"\n . \"ORDER BY promedioIngresos ASC\");\n foreach ($listaEstudianteBecas as $lista => $value) {\n //Cedula\n $estudiante['ced_estudiante'] = $value['ced_estudiante'];\n\n //verifico si el estudiante posee especialidad\n $consultaEstudianteEspecialidad = $this->db->select(\"SELECT * FROM sipce_especialidad_estudiante WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \");\n\n if ($consultaEstudianteEspecialidad != null) {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.id_consecutivo,eb.numeroRuta,\"\n . \"d.Distrito,g.nivel,esp.nombreEspecialidad,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_especialidad as esp, \"\n . \"sipce_especialidad_estudiante as ee, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = ee.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $value['ced_estudiante'] . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND esp.codigoEspecialidad = ee.cod_especialidad \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \"\n . \"AND eb.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n if ($resultado != null) {\n $estudiante['apellido1'] = $resultado[0]['apellido1'];\n $estudiante['apellido2'] = $resultado[0]['apellido2'];\n $estudiante['nombre'] = $resultado[0]['nombre'];\n $estudiante['distancia'] = $resultado[0]['distancia'];\n $estudiante['id_consecutivo'] = $resultado[0]['id_consecutivo'];\n $estudiante['numeroRuta'] = $resultado[0]['numeroRuta'];\n $estudiante['Distrito'] = $resultado[0]['Distrito'];\n $estudiante['nivel'] = $resultado[0]['nivel'];\n $estudiante['nombreEspecialidad'] = $resultado[0]['nombreEspecialidad'];\n $estudiante['ingreso1'] = $resultado[0]['ingreso1'];\n $estudiante['ingreso2'] = $resultado[0]['ingreso2'];\n $estudiante['ingreso3'] = $resultado[0]['ingreso3'];\n $estudiante['ingreso4'] = $resultado[0]['ingreso4'];\n $estudiante['totalMiembros'] = $resultado[0]['totalMiembros'];\n $estudiante['ced_encargadoCheque'] = $resultado[0]['ced_encargadoCheque'];\n $estudiante['parentesco'] = $resultado[0]['parentesco'];\n }\n } else {\n $resultado = $this->db->select(\"SELECT e.cedula,e.apellido1,e.apellido2,e.nombre,eb.distancia,eb.id_consecutivo,eb.numeroRuta,\"\n . \"d.Distrito,g.nivel,eb.ingreso1,eb.ingreso2,eb.ingreso3,eb.ingreso4,eb.totalMiembros,eb.ced_encargadoCheque,eb.parentesco \"\n . \"FROM sipce_estudiante as e, sipce_grupos as g, sipce_distritos as d, sipce_estudiante_beca as eb \"\n . \"WHERE e.cedula = g.ced_estudiante \"\n . \"AND e.cedula = eb.ced_estudiante \"\n . \"AND e.cedula = '\" . $value['ced_estudiante'] . \"' \"\n . \"AND e.IdDistrito = d.IdDistrito \"\n . \"AND g.annio = \" . $this->datosSistema[0]['annio_lectivo'] . \" \");\n\n if ($resultado != null) {\n $estudiante['apellido1'] = $resultado[0]['apellido1'];\n $estudiante['apellido2'] = $resultado[0]['apellido2'];\n $estudiante['nombre'] = $resultado[0]['nombre'];\n $estudiante['distancia'] = $resultado[0]['distancia'];\n $estudiante['id_consecutivo'] = $resultado[0]['id_consecutivo'];\n $estudiante['numeroRuta'] = $resultado[0]['numeroRuta'];\n $estudiante['Distrito'] = $resultado[0]['Distrito'];\n $estudiante['nivel'] = $resultado[0]['nivel'];\n $estudiante['nombreEspecialidad'] = \"-\";\n $estudiante['ingreso1'] = $resultado[0]['ingreso1'];\n $estudiante['ingreso2'] = $resultado[0]['ingreso2'];\n $estudiante['ingreso3'] = $resultado[0]['ingreso3'];\n $estudiante['ingreso4'] = $resultado[0]['ingreso4'];\n $estudiante['totalMiembros'] = $resultado[0]['totalMiembros'];\n $estudiante['ced_encargadoCheque'] = $resultado[0]['ced_encargadoCheque'];\n $estudiante['parentesco'] = $resultado[0]['parentesco'];\n }\n }\n\n\n //verifico el encargado de cangear cheques\n if ($resultado != null) {\n if ($estudiante['parentesco'] == 'Padre') {\n\n $consultaEstudiantePadre = $this->db->select(\"SELECT * \n FROM sipce_padre \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_padre = '\" . $estudiante['ced_encargadoCheque'] . \"'\");\n if ($consultaEstudiantePadre != null) {\n //Cargo datos del padre en el array\n $estudiante['nombre_encargado'] = $consultaEstudiantePadre[0]['nombre_padre'];\n $estudiante['apellido1_encargado'] = $consultaEstudiantePadre[0]['apellido1_padre'];\n $estudiante['apellido2_encargado'] = $consultaEstudiantePadre[0]['apellido2_padre'];\n }\n } elseif ($estudiante['parentesco'] == 'Madre') {\n $consultaEstudianteMadre = $this->db->select(\"SELECT * \n FROM sipce_madre \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_madre = '\" . $estudiante['ced_encargadoCheque'] . \"'\");\n\n if ($consultaEstudianteMadre != null) {\n //Cargo datos de la madre en el array\n $estudiante['nombre_encargado'] = $consultaEstudianteMadre[0]['nombre_madre'];\n $estudiante['apellido1_encargado'] = $consultaEstudianteMadre[0]['apellido1_madre'];\n $estudiante['apellido2_encargado'] = $consultaEstudianteMadre[0]['apellido2_madre'];\n }\n } elseif ($estudiante['parentesco'] == 'Otro') {\n $consultaEstudianteEncargado = $this->db->select(\"SELECT * \n FROM sipce_encargado \n WHERE ced_estudiante = '\" . $value['ced_estudiante'] . \"' \n AND ced_encargado = '\" . $estudiante['ced_encargadoCheque'] . \"' \n AND parentesco = 'Otro'\");\n\n if ($consultaEstudianteEncargado != null) {\n //Cargo datos en un array\n $estudiante['nombre_encargado'] = $consultaEstudianteEncargado[0]['nombre_encargado'];\n $estudiante['apellido1_encargado'] = $consultaEstudianteEncargado[0]['apellido1_encargado'];\n $estudiante['apellido2_encargado'] = $consultaEstudianteEncargado[0]['apellido2_encargado'];\n }\n } else {\n //Cargo datos en un array\n $estudiante['nombre_encargado'] = null;\n $estudiante['apellido1_encargado'] = null;\n $estudiante['apellido2_encargado'] = null;\n }\n }\n $datos[] = $estudiante;\n $estudiante = \"\";\n }\n return $datos;\n }", "title": "" }, { "docid": "260b39b8fd012a43155579250935a03d", "score": "0.62572426", "text": "public function cambiar_de_curso( $estudiante_id, $curso_actual_id, $curso_nuevo_id )\n {\n $tablas_relacionadas = '{\n \"0\":{\n \"tabla\":\"sga_control_disciplinario\",\n \"llave_foranea\":\"estudiante_id\",\n \"mensaje\":\"Tiene registros de control disciplinario.\"\n },\n \"1\":{\n \"tabla\":\"sga_asistencia_clases\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Tiene registros de asistencia a clases.\"\n },\n \"2\":{\n \"tabla\":\"sga_calificaciones\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Ya Tiene calificaciones.\" \n },\n \"3\":{\n \"tabla\":\"sga_calificaciones_auxiliares\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Ya Tiene calificaciones.\"\n },\n \"4\":{\n \"tabla\":\"sga_matriculas\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Tiene matrículas asociadas.\"\n },\n \"5\":{\n \"tabla\":\"sga_observaciones_boletines\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Tiene registros de observaciones en informes.\"\n },\n \"6\":{\n \"tabla\":\"sga_preinformes_academicos\",\n \"llave_foranea\":\"id_estudiante\",\n \"mensaje\":\"Tiene registros en preinformes académicos.\" \n },\n \"7\":{\n \"tabla\":\"sga_estudiante_reconocimientos\",\n \"llave_foranea\":\"estudiante_id\",\n \"mensaje\":\"Tiene registros en preinformes académicos.\" \n },\n \"8\":{\n \"tabla\":\"sga_notas_nivelaciones\",\n \"llave_foranea\":\"estudiante_id\",\n \"mensaje\":\"Tiene registros en preinformes académicos.\" \n }\n }';\n\n $tablas = json_decode( $tablas_relacionadas );\n foreach( $tablas AS $una_tabla )\n { \n // UPDATE `sga_asistencia_clases` SET curso_id = 12 WHERE `id_estudiante` = 249 AND `curso_id` = 11\n $registros = DB::table( $una_tabla->tabla )->where( [\n [ $una_tabla->llave_foranea, '=', $estudiante_id],\n [ 'curso_id', '=', $curso_actual_id]\n ] )\n ->update(['curso_id' => $curso_nuevo_id]);\n }\n\n \n }", "title": "" }, { "docid": "b7ccb6b5ba041eca177ec403b3c0a03c", "score": "0.62489146", "text": "public function getListaVentas(Request $request){\n try{\n $idCuentaTienda = $request->idCuentaTienda;\n $fechaInicial = $request->fechaInicial;\n $fechaFinal = $request->fechaFinal;\n $page = $request->page;\n $buscar = $request->buscar;\n $color = $request->color;\n\n $sqlBuscar =\"\";\n if($buscar!=null){\n $sqlBuscar =\"and (titulo like '%\".$buscar.\"%' or id_publicacion like'%\".$buscar.\"%' or nombre_cliente like '%\".$buscar.\"%')\";\n }\n\n $sqlColor =\"\";\n if($color!=\"todos\"){\n if($color==\"verde\"){\n $sqlColor =\" and utl_porcentaje >= .20 \";\n }elseif($color==\"naranja\"){\n $sqlColor =\" and (utl_porcentaje >= .05 and utl_porcentaje < .20) \";\n }else{\n $sqlColor =\" and utl_porcentaje < .05 \";\n }\n }\n\n $sql= \"select \tid_venta_meli idVentaMeli, \t\t\t\n IF(id_paquete_meli>0, (\tselect count(*) \n from venta_meli vaux \n where vaux.id_control_ventas_meli = vmeli.id_control_ventas_meli \n and vaux.id_cuenta_tienda = vmeli.id_cuenta_tienda \n and vaux.id_paquete_meli = vmeli.id_paquete_meli), 1) totalPaquete,\n id_paquete_meli idPaqueteMeli, \n id_orden_meli idOrdenMeli, \n DATE_FORMAT(fecha_venta,'%d/%m%/%Y') fechaVenta, \n id_publicacion idPublicacion, \n id_variante idVariante, \n titulo, \n id_pago idPago, \n DATE_FORMAT(fecha_pago,'%d/%m%/%Y') fechaPago, \n monto_pagado montoPagoCliente, \n cantidad, \n precio_venta precioVenta, \n comision, \n isr, \n iva, \n neto, \n precio_compra ultimoPrecioCompra, \n utl_monto utlMonto, \n utl_porcentaje utlPorcentaje, \n id_envio idEnvio, \n nombre_cliente nombreCliente, \n direccion_entrega direccionEntrega, \n metodo_envio metodoEnvio, \n costo_envio_cliente costoEnvioCliente, \n costo_envio_empresa costoEnvioEmpresa, \n nota nota, \n estatus_meli estatusVentaMeli \n from venta_meli vmeli\n where id_cuenta_tienda = $idCuentaTienda\n and estatus = 'TER'\n $sqlBuscar\n $sqlColor\n and DATE(fecha_venta) between STR_TO_DATE('$fechaInicial', '%Y-%m-%d') and STR_TO_DATE('$fechaFinal', '%Y-%m-%d')\n order by id_paquete_meli\"; \n\n $rs = DB::select( $sql );\n $collect = collect($rs); \n $size=100;\n \n $paginationData = new \\Illuminate\\Pagination\\LengthAwarePaginator(\n $collect->forPage($page, $size),\n $collect->count(), \n $size, \n $page\n );\n\n return [ \n 'pagination' => $paginationData,\n 'xstatus'=>true, \n 'ventas'=>$rs\n ];\n\n }catch(Exception $e){\n Log::error( $e->getTraceAsString() ); \n return [ 'xstatus'=>false, 'error' => $e->getMessage() ];\n }\n }", "title": "" }, { "docid": "294721b27aa6f6bfb67bd242c2c76935", "score": "0.62451416", "text": "public static function obtener_comentarios($conexion, $entrada_id){\n //creamos un array vacio\n $comentarios = array();\n //comprobamos si la conexion existe o no\n if(isset($conexion)){\n try {\n //creamos la sentencia sql a realizar\n $sql = \"SELECT * FROM comentarios WHERE entrada_id = :entrada_id\";\n //la variable sentencia se encarga de preparar el sql y evitar la sqlinjeccion\n $sentencia = $conexion -> prepare($sql);\n //indicamos el parametro necesario\n $sentencia -> bindParam(':entrada_id', $entrada_id, PDO::PARAM_STR);\n //ejecutamos la sentencia\n $sentencia -> execute();\n //recuperamos todos los resultados\n $resultado = $sentencia -> fetchAll();\n //verificamos cuantos comentarios se han recuperado\n if(count($resultado)){\n //recorremos el array\n foreach ($resultado as $fila){\n //añadimos lo recuperado al array entradas\n $comentarios[] = new Comentario(\n $fila['id'], $fila['autor_id'], $fila['entrada_id'], $fila['titulo'],\n $fila['texto'], $fila['fecha']\n ); \n }\n } \n \n } catch (PDOException $ex) {\n print \"Error al consultar los datos\" .$ex -> getMessage();\n }\n }\n //retornamos el valor\n return $comentarios;\n }", "title": "" }, { "docid": "b7f160684999fee54883913eb5f3192d", "score": "0.6244945", "text": "public function codigosTablas(){\r\n $sql = \"SELECT * FROM tbl_codigos\";\r\n return ejecutarConsulta($sql); \r\n }", "title": "" }, { "docid": "ab92a0ecb289a8e0b74559ba5e0c108f", "score": "0.62401587", "text": "public function get_consulta_VALVULAS($id_celda){\r\n \r\n \r\n $sql=\"SELECT * FROM material_isometricos_temp where VALVULAS_ID =:SECC\";\r\n \r\n $sentencia=$this->conexion_db->prepare($sql);//creamos una sentencia preparada.\r\n \r\n $sentencia->execute(array(\":SECC\"=>$id_celda));//ejecutamos la sentencia preparada.\r\n \r\n $resultado =$sentencia->fetchAll(PDO::FETCH_ASSOC);//guardamos el resultado de la consulta en un array asociativo.\r\n \r\n $sentencia->closeCursor();//cerramos el cursor.\r\n \r\n return $resultado;//devolvemos el resultado de la consulta.\r\n \r\n $this->conexion_db=null;//cerramos la conexion.\r\n \r\n }", "title": "" }, { "docid": "d4c78c4b8a55f23fa9efab7d50f70011", "score": "0.6238719", "text": "public function clientesInativos(){\r\n $sql = 'SELECT count(*) as qtde FROM `tb_cliente` WHERE cli_status = :status';\r\n \r\n $stmt = BD::conn()->prepare($sql);\r\n $stmt->bindValue(':status', 0, PDO::PARAM_INT);\r\n $stmt->execute();\r\n \r\n return $stmt->fetch(PDO::FETCH_ASSOC);\r\n }", "title": "" } ]